A shale organic matter enrichment master control factor evaluation method and system
By combining the random forest model and the SHAP model, the problem of quantifying and dynamically evolving the contribution of the main controlling factors in shale organic matter enrichment was solved, achieving high-precision and interpretable quantitative evaluation and revealing the dynamic evolution law of the main controlling factors.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNIV OF GEOSCIENCES (BEIJING)
- Filing Date
- 2026-04-30
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies cannot accurately and comparablely quantify the contribution of the main controlling factors in shale organic matter enrichment, and it is difficult to reveal the dynamic evolution of the main controlling factors with different sedimentary stages.
By combining the random forest model and the SHAP model, and through data preprocessing, logical grouping, and contribution percentage analysis, we quantitatively calculated the specific contribution of paleoenvironmental indicators to organic matter enrichment. We also performed independent modeling and result comparison by geological strata grouping to reveal the dynamic evolution of the main controlling factors.
It achieves high-precision and interpretable quantitative evaluation of the main controlling factors of shale organic matter enrichment, overcomes the limitations of existing technologies, and provides a high-precision and interpretable dynamic analysis scheme.
Smart Images

Figure CN122177290A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of shale organic matter technology, and in particular to a method and system for evaluating the main controlling factors of shale organic matter enrichment. Background Technology
[0002] The enrichment of organic matter in shale is the material basis for the formation of shale gas reservoirs. Accurately identifying the main controlling factors of organic matter enrichment is of crucial guiding significance for the prediction of favorable shale gas areas and exploration deployment. Shale organic matter enrichment is comprehensively controlled by multiple paleoenvironmental factors, including paleoclimate, paleoproductivity, redox conditions, terrigenous input, sedimentary rate, and paleohydrology. These factors exhibit complex nonlinear relationships and interactions. Therefore, how to quantitatively identify and evaluate the main controlling factors of organic matter enrichment from multiple factors has long been a core issue of concern in this field.
[0003] To address the above problems, existing technologies mainly propose two solutions:
[0004] (1) With technological advancements, machine learning methods have begun to be introduced to handle complex nonlinear relationships in geological processes. Among these, the random forest model has become a relatively close existing technique due to its ability to handle high-dimensional data, insensitivity to outliers, and ability to assess feature importance. For example, some studies have attempted to use the random forest model to predict TOC content based on paleoenvironmental characteristics and to assess the relative contribution of different environmental factors to organic matter enrichment based on the "feature importance" score output by the model. This method represents a step forward compared to traditional linear analysis and can reveal, to some extent, the complex interactions between multiple factors. However, the random forest model is essentially a "black box" system; it can only provide a global ranking of feature importance (such as '…'). The model's opacity (i.e., its most important feature) fails to explain why it is important, whether its impact is positive or negative, or its specific contribution to the prediction of a single sample. It also fails to provide accurate and comparable quantification of contribution. This lack of transparency severely undermines the model's interpretability.
[0005] (2) Chinese Patent CN116228453A, "Evaluation Method, System, Equipment and Terminal for Controlling Factors of Shale Organic Matter Enrichment," proposes a "paleoenvironmental normalization coefficient" based on the reconstruction of paleosedimentary environment and paleoproductivity using inorganic geochemical element indicators. This normalization method processes multiple element indicators belonging to the same controlling factor into a single comprehensive coefficient. SPSS software is then used to analyze the importance of predictive variables for each normalized controlling factor indicator. A linear TOC correlation model with multi-factor comprehensive control is established with the measured total organic carbon content as the target. Finally, the main controlling factor of organic matter enrichment is determined based on the model coefficients. However, the shale organic matter enrichment process is comprehensively controlled by multiple paleoenvironmental factors, and nonlinear relationships and interaction effects are common among these factors. Linear models struggle to capture these complex relationships, resulting in low model prediction accuracy. Furthermore, the importance of the predictive variables output by this scheme is only a qualitative ranking result, failing to provide the specific percentage contribution of each factor to organic matter enrichment, thus failing to achieve accurate and comparable contribution quantification.
[0006] In summary, both of the aforementioned existing technologies can only provide qualitative ranking of feature importance, failing to achieve accurate and comparable quantification of contributions, and are also unable to reveal the dynamic evolution of the controlling factors across different stratigraphic stages. Therefore, there is an urgent need for a method to evaluate the controlling factors of shale organic matter enrichment that can simultaneously achieve high-precision prediction, quantitative attribution, and dynamic evolution analysis. Summary of the Invention
[0007] Based on this, and in response to the aforementioned technical problems, a method and system for evaluating the main controlling factors of shale organic matter enrichment are provided to address the issue that existing technologies cannot achieve accurate quantification of Kobe's contribution.
[0008] Firstly, a method for evaluating the main controlling factors of shale organic matter enrichment, the method comprising:
[0009] Step S100: Collect geochemical data of shale samples from the target area and construct a raw dataset; the raw dataset includes paleoenvironmental indicators and the corresponding measured total organic carbon content;
[0010] Step S200: Perform data preprocessing on the original dataset to obtain a standardized feature subset; construct a multidimensional feature matrix from the standardized feature subset; the independent variable of the multidimensional feature matrix is the paleoenvironmental index, and the dependent variable is the total organic carbon content;
[0011] Step S300: Logically group all samples in the multidimensional feature matrix according to their geological strata; for each geological stratum, use the paleoenvironmental index of the stratum as the model input feature and the total organic carbon content as the model prediction target, and input them into the random forest model for training, optimization and validation, to obtain the random forest model corresponding to each geological stratum.
[0012] Step S400: Use the SHAP model to interpret the random forest model corresponding to each geological segment, calculate the quantitative contribution percentage of each paleoenvironmental indicator in each geological segment, and determine the main controlling factor of each stratum from all paleoenvironmental indicators in each segment based on the contribution percentage.
[0013] Step S500: Obtain the set of contribution percentages of each paleoenvironmental indicator within each geological stratum, compare the set of contribution percentages of paleoenvironmental indicators in different geological strata, and analyze the dynamic evolution of the contribution percentages of the main controlling factors in different strata.
[0014] In the above scheme, optionally, the paleoenvironmental indicators include: paleoclimate indicators, pale productivity indicators, terrestrial input indicators, redox condition indicators, sedimentation rate indicators, and paleohydrological indicators;
[0015] The paleoclimate indicators include: chemical alteration index and chemical weathering index; the paleoproductivity indicators include the content of copper, zinc, and nickel from biological sources; the terrestrial input indicators include the content of aluminum and titanium; the redox condition indicators include the ratio of uranium / thorium, vanadium enrichment factor, uranium enrichment factor, and molybdenum enrichment factor; the sedimentation rate indicators include rare earth element differentiation coefficients; and the paleohydrological indicators include the cobalt-manganese product.
[0016] Optionally, in the above scheme, the data preprocessing of the original dataset includes:
[0017] A subset of samples is formed by randomly sampling from the original dataset. Construct multiple isolation trees to form an isolated forest, and calculate the samples of each subset. An anomaly score is determined, and an anomaly score threshold is set. All samples with an anomaly score higher than the threshold are marked as outliers and removed. The subset of samples... Data records containing multiple samples;
[0018] Quantile standardization is performed on the original dataset after removing outliers to unify all feature variables to the same dimension and distribution range, forming a quantile-standardized dataset.
[0019] Calculate the correlation matrix among all independent variables in the processed dataset, and remove redundant data in the processed dataset where the collinearity is higher than a preset threshold.
[0020] In the above scheme, optionally, the calculation of each subset sample Abnormal scores include:
[0021] Step S201: Randomly sample a subset of samples from the standardized feature subset. For this subset of samples Recursively and randomly select an independent variable feature and a random split value, the split value being between the selected independent variable feature and the current subset of samples. Between the minimum and maximum values;
[0022] Step S202: Based on the segmentation value, divide the subset samples... Divide into two child nodes, left and right, and continue recursively dividing the two child nodes;
[0023] Step S203: Repeat steps S201-S202 until only one subset of samples remains in the segmented nodes. Or the isolation tree has reached the preset maximum depth, and the subset samples... Multiple isolation trees are formed: among which, the maximum depth is where n is the size of the subset sample;
[0024] Step S204: For each subset sample in the standardized feature subset... This allows it to traverse every isolated tree in the isolated forest and calculate subset samples. The path length at which the person is isolated in each isolation tree. And calculate subset samples Average path length across all isolation trees Each subset sample is calculated using the following formula. abnormal scores :
[0025] ;
[0026] in, A subset of samples The sample size; It includes The theoretical expected value of the average path length of an isolated tree in a dataset of randomly distributed samples is used for standardization. Its calculation formula is: ,in It is a harmonic number.
[0027] In the above scheme, optionally, the SHAP model is used to interpret the random forest model corresponding to each geological segment, calculate the quantitative contribution percentage of each paleoenvironmental indicator within each segment, and determine the main controlling factors of each stratum from all paleoenvironmental indicators of each segment based on the contribution percentage. Specifically, these factors include:
[0028] Based on cooperative game theory, the Shapley value is used to predict the total organic carbon content for each paleoenvironmental indicator in each feature subset S. Assign a contribution value at time ;
[0029] The average of the absolute values of the contribution of each paleoenvironmental index across all samples is calculated as the global importance of that paleoenvironmental index. ;
[0030] The global importance of all paleoenvironmental indicators is normalized to obtain the quantitative contribution percentage of each indicator. ;
[0031] Within each geological stratum, the percentage contribution of all paleoenvironmental indicators belonging to the same geological category. The total contribution percentage of each geological category within the stratum is summed to obtain the total contribution percentage of each geological category. Within each geological stratum, the total contribution percentage of each geological category is compared, and the geological category with the highest total contribution percentage is determined as the controlling factor of that stratum.
[0032] In the above scheme, optionally, each paleoenvironmental indicator in each feature subset S is used to predict the total organic carbon content. Assign a contribution value at time Calculated using the following formula:
[0033] ;
[0034] Where N is the complete set of features composed of paleoenvironmental indicators; S is a subset of features formed by sampling. It is the predicted value when the random forest model uses features from the feature subset S; It is the size of the feature subset S; Size of the feature set; To include paleoenvironmental indicators as an independent participant in the feature subset S, This represents the marginal contribution of paleoenvironmental indicators to the feature subset S.
[0035] In the above scheme, optionally, the global importance of the paleoenvironmental indicators is further... Calculated using the following formula:
[0036] ;
[0037] Where n is the total number of all shale samples. This represents the contribution value of the paleoenvironmental index to the i-th shale sample.
[0038] In the above scheme, optionally, the global importance of all paleoenvironmental indicators can be normalized using the following formula to obtain the quantitative contribution percentage of each paleoenvironmental indicator. Specifically, it includes:
[0039] ;
[0040] Where m represents the total number of paleoenvironmental indicators, and the percentage is... This refers to the quantitative contribution of paleoenvironmental indicators to the enrichment of organic matter.
[0041] Optionally, the above scheme may further include, after analyzing the dynamic evolution of the contribution percentage of the main controlling factors in different strata, the following:
[0042] The controlling factors of each stratum are presented in numerical and graphical form.
[0043] Secondly, a system for evaluating the main controlling factors of shale organic matter enrichment, the system comprising:
[0044] Data collection module: used to collect geochemical data of shale samples from the target area and construct a raw dataset; the raw dataset includes paleoenvironmental indicators and measured total organic carbon content;
[0045] Multidimensional feature matrix construction module: used to preprocess the original dataset to obtain a standardized feature subset; construct a multidimensional feature matrix from the standardized feature subset; the independent variable of the multidimensional feature matrix is the paleoenvironmental index, and the dependent variable is the total organic carbon content;
[0046] Random forest model construction module: used to logically group all samples in the multidimensional feature matrix according to their geological strata; for each geological stratum, the paleoenvironmental index of the stratum is used as the model input feature and the total organic carbon content is used as the model prediction target, and these are respectively input into the random forest model for training, optimization and validation to obtain the random forest model corresponding to each geological stratum;
[0047] The main control factor determination module is used to interpret the random forest model corresponding to each geological segment using the SHAP model, calculate the quantitative contribution percentage of each paleoenvironmental indicator in the segment, and determine the main control factor of the segment from all paleoenvironmental indicators in the segment based on the contribution percentage.
[0048] The evolution law determination module is used to obtain the contribution percentage set of each paleoenvironmental indicator within each geological stratum, compare the contribution percentage sets of paleoenvironmental indicators in different geological strata, and analyze the dynamic evolution law of the contribution percentage of the main controlling factors of each stratum in different strata.
[0049] This application has at least the following beneficial effects:
[0050] This application innovatively integrates random forest and SHAP models to construct a complete technical chain from high-precision prediction to transparent and quantitative attribution. The application uses a random forest model to handle the complex nonlinear relationship between paleoenvironmental indicators and total organic carbon content; simultaneously, it introduces a game theory-based SHAP model, which can quantitatively calculate the specific percentage contribution of each paleoenvironmental indicator to organic matter enrichment and clearly distinguish the direction of influence, achieving a leap from qualitative ranking to quantitative attribution. Furthermore, by independently modeling groups according to geological strata and comparing the contribution analysis results, the application can reveal the dynamic evolution of the main controlling factors with different sedimentary stages, overcoming the limitations of existing technologies that can only perform static overall analysis. This provides a high-precision, interpretable, and quantitative technical solution for identifying the main controlling factors of shale organic matter enrichment. Attached Figure Description
[0051] Figure 1 A flowchart illustrating a method for evaluating the main controlling factors of shale organic matter enrichment according to an embodiment of this application;
[0052] Figure 2 An R2 result plot of a random forest model is provided for one embodiment of this application;
[0053] Figure 3 This is a quantitative contribution evaluation chart of the main controlling factors for shale organic matter enrichment in one embodiment of this application. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0055] In one embodiment, such as Figure 1 As shown, a method for evaluating the main controlling factors of shale organic matter enrichment is provided, the method comprising:
[0056] Step S100: Collect geochemical data of shale samples from the target area and construct a raw dataset; the raw dataset includes paleoenvironmental indicators and the corresponding measured total organic carbon content;
[0057] In step S100, the paleoenvironmental indicators include: paleoclimate indicators, paleproductivity indicators, terrigenous input indicators, redox condition indicators, sedimentation rate indicators, and palehydrological indicators.
[0058] Among them, paleoclimate indicators include: chemical alteration index and chemical weathering index;
[0059] Ancient productivity indicators include the content of biologically derived copper, zinc, and nickel;
[0060] Land-based input indicators include aluminum and titanium content;
[0061] Redox condition indicators include the uranium / thorium ratio, vanadium enrichment factor, uranium enrichment factor, and molybdenum enrichment factor ratio;
[0062] Deposition rate indicators include rare earth element differentiation coefficients;
[0063] Paleohydrological indicators include the cobalt-manganese product.
[0064] By constructing a unified dataset that integrates multiple wells and multi-dimensional geochemical indicators, a comprehensive information foundation reflecting the paleosedimentary environment is provided for subsequent random forest models. This overcomes the limitations of single-well or single-indicator analysis and ensures the regional representativeness and reliability of subsequent analysis results.
[0065] Step S200: Perform data preprocessing on the original dataset to obtain a standardized feature subset; construct a multidimensional feature matrix from the standardized feature subset; the independent variable of the multidimensional feature matrix is the paleoenvironmental index, and the dependent variable is the total organic carbon content.
[0066] In step S200, the original dataset is preprocessed to remove outliers, ensure uniformity of units, and remove collinear redundant features. This is crucial for ensuring the robustness of the model.
[0067] To ensure the robustness of subsequent machine learning models, this invention employs the Isolation Forest unsupervised machine learning algorithm to automatically identify and remove outliers from the original geochemical dataset. This step is crucial for eliminating anomalous data points caused by analytical testing errors, sample contamination, or atypical local geological events.
[0068] The core assumption of the Isolation Forest algorithm is that outlier data points are not only scarce, but their attribute values are also significantly different from normal data points, making them easier to "isolate". It constructs multiple "isolation trees" by randomly partitioning the subspace, without relying on traditional distance or density measures, making it particularly suitable for processing high-dimensional geochemical data.
[0069] Specifically, data preprocessing of the original dataset includes:
[0070] (1): A subset of samples is formed by randomly sampling from the original dataset. Construct multiple isolation trees to form an isolated forest, and calculate the samples of each subset. Anomaly scores are used to set an anomaly score threshold. All samples with anomaly scores exceeding the threshold are marked as outliers and removed. (Subset samples) Data records containing multiple samples;
[0071] In this process, each subset sample is calculated. Abnormal scores include:
[0072] Step S201: Randomly sample a subset of samples from the standardized feature subset. For this subset of samples Recursively select an independent variable feature and a random split value, the split value being between the selected independent variable feature and the current subset of samples. Between the minimum and maximum values;
[0073] Step S202: Based on the segmentation value, divide the subset samples... Divide into two child nodes, left and right, and continue recursively dividing the two child nodes;
[0074] Step S203: Repeat steps S201-S202 until only one subset of samples remains in the segmented nodes. Or the isolation tree has reached the preset maximum depth, and the subset samples... Multiple isolation trees are formed: among which, the maximum depth is where n is the size of the subset sample;
[0075] Step S204: For each subset of samples in the standardized feature subset... This allows it to traverse every isolated tree in the isolated forest and calculate subset samples. The path length at which the person is isolated in each isolation tree. And calculate subset samples Average path length across all isolation trees Each subset sample is calculated using the following formula. abnormal scores :
[0076] ;
[0077] in, A subset of samples The sample size; It includes The theoretical expected value of the average path length of an isolated tree in a dataset of randomly distributed samples is used for standardization. Its calculation formula is: ,in It is a harmonic number.
[0078] when When s approaches 0, s approaches 1, indicating that the sample is very easy to isolate and the probability of outliers is high.
[0079] when tending to When s approaches 0, it indicates that the sample is extremely difficult to isolate and is a normal point with a very concentrated distribution.
[0080] Depending on the specific data, an outlier score threshold is set (e.g., 0.6). All samples with outlier scores higher than this threshold will be marked as outliers. After calculating and determining the outlier scores, all samples marked as outliers are systematically removed from the original dataset to create a "clean" dataset for subsequent analysis.
[0081] By integrating the isolated forest algorithm, this method achieves automated and intelligent identification and cleaning of outliers in high-dimensional geochemical data. This step effectively prevents a small number of outliers from excessively influencing subsequent random forest model training and SHAP value calculation, significantly improving the robustness of the entire technical process and the reliability of the final quantitative evaluation results of the controlling factors.
[0082] (2): Quantile standardization is performed on the original dataset after removing outliers to unify all feature variables to similar dimensions and distribution ranges, forming a quantile-standardized dataset.
[0083] Quantile standardization is performed on the data after outlier removal, unifying all feature variables to similar dimensions and distribution ranges, resulting in a processed dataset with outlier and quantile standardization. This eliminates the bias caused by different dimensions of the dependent variable in the model, providing a fair benchmark for comparing feature importance.
[0084] (3): Calculate the correlation matrix among all independent variables in the processed dataset and remove redundant data in the processed dataset where the collinearity is higher than a preset threshold.
[0085] Calculate the correlation matrix among all independent variables in the processed dataset, remove redundant features with high collinearity from the processed dataset, and form a standardized feature subset with independent features and low information redundancy.
[0086] Through automated and intelligent data cleaning and feature dimensionality reduction, the data quality for subsequent machine learning model training is significantly improved. This not only enhances the model's prediction accuracy and generalization ability, but more importantly, it removes the obstacle for the SHAP model to accurately and unbiasedly quantify the independent contribution of each feature.
[0087] This implementation integrates the Isolation Forest algorithm for automated outlier detection and removal, and combines it with a correlation heatmap for objective feature selection, constructing a more robust and less redundant optimized feature subset. The entire process is standardized and highly automated, reducing reliance on human experience and ensuring the quality of the input data to the model, thereby improving the reliability and repeatability of the final results.
[0088] Step S300: Logically group all samples in the multidimensional feature matrix according to their geological strata; For each geological stratum, use the paleoenvironmental index of that stratum as the model input feature and the total organic carbon content as the model prediction target, and input them into the random forest model for training, optimization and validation, to obtain the random forest model corresponding to each geological stratum.
[0089] In step S300, a random forest model is constructed, and the random forest model is trained, optimized, and validated using a multidimensional feature matrix so that the total organic carbon content predicted by the random forest model meets expectations.
[0090] Random Forest Algorithm Principles and Construction: Random forest is an ensemble learning algorithm that constructs multiple decision trees and combines their results for prediction. For regression tasks, its final prediction is the mean of the predictions from all decision trees.
[0091] ;
[0092] in, Here, N represents the predicted TOC value, and Ntrees represents the number of decision trees. This is the predicted output of the k-th decision tree for the input feature vector x.
[0093] During training, each decision tree recursively selects the optimal feature to split nodes, minimizing node impurity. For regression problems, the mean squared error (MSE) is typically used as the splitting criterion.
[0094] ;
[0095] Where Nnode represents the number of node samples, and yi represents the true value of the sample. The mean of the true values of the samples within a node.
[0096] To address the difficulty of manually tuning hyperparameters, this application employs a Bayesian optimization algorithm, using the average score of K-fold cross-validation (e.g., negative mean squared error) as the objective function to efficiently search the key hyperparameter space of the random forest. The core hyperparameters to be optimized include: (1) the number of decision trees, with a search range of up to [number missing]. (2) The maximum depth of a single decision tree, and the search range can be... (3) The minimum number of samples required for internal node re-splitting, the search range can be: (4) The minimum number of samples required for a leaf node, the search range can be: (5) The size of the random subset of features to be considered when finding the best split.
[0097] Bayesian optimization approximates the global optimum by constructing a surrogate model (such as a Gaussian process) to fit the objective function and using a sampling function (such as the desired improvement in EI) to determine the next evaluation point, thereby approximating the global optimum with the fewest iterations.
[0098] The coefficient of determination is the quantitative standard for model performance. The calculation formula is as follows:
[0099]
[0100] Where yi is the measured TOC value. To predict the TOC value for the model, is the mean of the measured TOC values, and n is the sample size.
[0101] This implementation method explicitly requires that the optimized model must have an R² greater than 0.85 on the independent test set to be considered qualified and have the accuracy basis for subsequent attribution analysis.
[0102] This application employs a random forest model, which can automatically learn and handle complex nonlinear relationships and interaction effects between high-dimensional features. After Bayesian optimization and cross-validation, the model's prediction accuracy on the test set is [not specified]. It can stably reach 0.87 to 0.89 or higher. Figure 2 The accuracy is far higher than that of traditional linear models when dealing with such complex geological problems, providing a more reliable basis for subsequent attribution analysis.
[0103] Step S400: Use the SHAP model to interpret the random forest model corresponding to each geological segment, calculate the quantitative contribution percentage of each paleoenvironmental indicator in each geological segment, and determine the main controlling factor of each stratum from all paleoenvironmental indicators in each segment based on the contribution percentage.
[0104] In step 400, the SHAP model is used to quantitatively identify the main controlling factors affecting the predicted value of the dependent variable from the independent variables, and the quantitative contribution percentage of each main controlling factor is calculated. The dynamic evolution of the contribution percentage of each main controlling factor in different stratigraphic depositional stages is analyzed.
[0105] Specifically, the SHAP model was used to interpret the random forest model corresponding to each geological segment, and the quantitative contribution percentage of each paleoenvironmental indicator within each segment was calculated. Based on the contribution percentage, the main controlling factors of each stratum were determined from all paleoenvironmental indicators of each segment, including:
[0106] Based on cooperative game theory, the Shapley value is used to predict the total organic carbon content for each paleoenvironmental indicator in each feature subset S. Assign a contribution value at time ;
[0107] The average of the absolute values of the contribution of each paleoenvironmental index across all samples is calculated as the global importance of that paleoenvironmental index. ;
[0108] The global importance of all paleoenvironmental indicators is normalized to obtain the quantitative contribution percentage of each indicator. ;
[0109] Within each geological stratum, the percentage contribution of all paleoenvironmental indicators belonging to the same geological category. The total contribution percentage of each geological category within the stratum is summed to obtain the total contribution percentage of each geological category. Within each geological stratum, the total contribution percentage of each geological category is compared, and the geological category with the highest total contribution percentage is determined as the controlling factor of that stratum.
[0110] It should be further explained that different characteristic values represent certain environmental significance. First, based on the causal significance of each geochemical indicator (independent variable) (for example, uranium / thorium and molybdenum both represent the degree of oxygen deficiency in the water during shale deposition; biologically derived copper, zinc, and other elements represent the paleoproductivity level during organic matter formation), they are categorized into limited geological control categories such as "paleoproductivity" and "redox conditions." Then, the percentage contribution of all characteristics belonging to the same environmental significance (geological category) is calculated. The percentage contribution of each category to organic matter enrichment was summed to obtain the total percentage contribution. Finally, by comparing the total percentage contribution of all geological categories, the highest-ranking environmental significance was identified as the "controlling factor" of organic matter enrichment in the stratigraphic segment represented by the study dataset.
[0111] In addition, f( This refers to the predicted output value of a specific input sample S within a trained random forest model, that is, the total organic carbon content estimated by the model based on the independent variable features of that sample. The steps to obtain this value are as follows:
[0112] In step 300, the "standardized feature subset" is used to train and optimize the random forest model. After training, the model determines a stable random forest model f composed of multiple decision trees that can be used for prediction. For any sample S (which can come from the training set, validation set, or a new sample to be analyzed), we input its independent variable feature values into the trained random forest model f. Each decision tree in the random forest independently outputs a TOC prediction value for sample S. The final prediction value f(S) of the random forest model f is the average of the prediction results of all decision trees (for regression problems). This can be simply expressed by the formula:
[0113]
[0114] Where T is the total number of decision trees, It is the predicted value of the t-th tree for sample S.
[0115] For example: Suppose we have a shale sample S from a certain stratum, whose paleoproductivity indicators (such as biological...) ), redox indicators (such as The feature values (such as ) are known. These feature values are then input into a pre-trained random forest model. The 100 decision trees within the model each provide a TOC prediction, as follows: Model f's final output This serves as the predicted TOC for that sample. This refers to the target value that needs to be explained in the subsequent SHAP analysis.
[0116] Wherein, each paleoenvironmental index in each feature subset S is used to predict total organic carbon content. Assign a contribution value at time Calculated using the following formula:
[0117] ;
[0118] Where N is the complete set of features composed of paleoenvironmental indicators; S is a subset of features formed by sampling. It is the predicted value when the random forest model uses features from the feature subset S; It is the size of the feature subset S; Size of the feature set; To include paleoenvironmental indicators as an independent participant in the feature subset S, This represents the marginal contribution of paleoenvironmental indicators to feature subset S. Its physical meaning is: the change in the model's predicted value after adding information from feature j, based on the existing prediction using feature subset S.
[0119] Among them, the global importance of paleoenvironmental indicators Calculated using the following formula:
[0120] ;
[0121] Where n is the total number of all shale samples. This represents the contribution value of the paleoenvironmental index to the i-th shale sample.
[0122] The global importance of all paleoenvironmental indicators is normalized using the following formula to obtain the quantitative contribution percentage of each paleoenvironmental indicator. Specifically, it includes:
[0123] ;
[0124] Where m represents the total number of paleoenvironmental indicators, and the percentage is... This refers to the quantitative contribution of paleoenvironmental indicators to the enrichment of organic matter.
[0125] Step S500: Obtain the set of contribution percentages of each paleoenvironmental indicator within each geological stratum, compare the set of contribution percentages of paleoenvironmental indicators in different geological strata, and analyze the dynamic evolution of the contribution percentages of the main controlling factors in different strata.
[0126] The paleoenvironmental factors were ranked from highest to lowest according to their total contribution percentage, with the factor ranked first having the greatest impact on organic matter enrichment. The degree of influence was then ranked in descending order of contribution percentage. The contribution percentage calculated by the SHAP value objectively reflects the marginal contribution of each feature to the model prediction. After classifying and summing these features according to their geological significance, the total contribution percentage of the paleoenvironmental factors represents the relative intensity of the influence of the environmental control conditions on organic matter enrichment. The higher the contribution percentage, the stronger the control effect of the environmental conditions on organic matter enrichment at the corresponding sedimentary stage.
[0127] This implementation introduces the SHAP interpretation model, assigning a contribution value (SHAP value) to each feature based on rigorous game theory. This value is resistant to collinearity interference and can be directly normalized to a contribution percentage. Figure 3 For example, applying this method, it can be clearly concluded that "in segment II, the contribution of preservation conditions to the enrichment of organic matter is..." Productivity contribution rate ( Figure 3 This represents a leap from qualitative judgments of "which factor is more important" to quantitative evaluations of "how much each factor specifically contributes."
[0128] Among them, the contribution value of preservation conditions refers to the sum of all characteristic values that represent the environmental significance of preservation conditions (for example, the concentration of Mo and U elements represents the degree of oxygen deficiency in the water, i.e., the quality of preservation conditions; the sum of the contributions of biological characteristic values such as Cu and Zu represents the degree of contribution to productivity).
[0129] Furthermore, based on the quantitative conclusions obtained in step 400 and combined with traditional geological analysis, a dynamic conceptual model of shale organic matter enrichment in the study area was established. This model clearly indicates which geological processes (such as sea-level change and climate change) at different sedimentary stages ultimately control the formation of high-quality shale by regulating specific factors (preservation conditions, productivity, sedimentation rate, etc.) and their contribution weights. This model can be directly used to guide the scientific prediction of favorable shale gas exploration areas and the selection of target areas.
[0130] Furthermore, existing technologies typically only allow for holistic analysis of static datasets or specific stratigraphic sections, making it difficult to clearly reveal the evolution of controlling factors over geological time (such as different sedimentary sections). This application addresses this issue by dividing the dataset into geological sections (such as section I and section II) and performing SHAP analysis on each section. This method can quantitatively demonstrate the dynamic evolution of controlling factors. For example, the results show that from section II to section III, the controlling factor for organic matter enrichment shifts from "dual control by productivity and preservation conditions" to "a ternary synergy of preservation conditions, sedimentation rate, and terrigenous clastic input." This provides direct data support for establishing dynamic organic matter enrichment models with spatiotemporal resolution.
[0131] Therefore, this implementation method constructs a complete technical chain from high-precision prediction to transparent and quantitative attribution by innovatively combining random forest (which solves the problem of nonlinear prediction accuracy) and SHAP interpreter (which solves the problem of quantitative attribution and model interpretability). This solves the core bottlenecks of existing technologies in terms of accuracy, quantification depth and mechanism explanation capability.
[0132] In the aforementioned method for evaluating the main controlling factors of shale organic matter enrichment, a complete technical chain from high-precision prediction to transparent and quantitative attribution is constructed through the innovative integration of random forest and SHAP models. This application uses a random forest model to handle the complex nonlinear relationship between paleoenvironmental indicators and total organic carbon content; simultaneously, it introduces a game theory-based SHAP model, which can quantitatively calculate the specific percentage contribution of each paleoenvironmental indicator to organic matter enrichment and clearly distinguish the direction of influence, achieving a leap from qualitative ranking to quantitative attribution. Furthermore, by independently modeling groups according to geological strata and comparing the contribution analysis results, the dynamic evolution of the main controlling factors with the sedimentary stages of strata can be revealed, overcoming the limitations of existing technologies that can only perform static overall analysis. This provides a high-precision, interpretable, and quantitative technical solution for identifying the main controlling factors of shale organic matter enrichment.
[0133] In one embodiment, a system for evaluating the main controlling factors of shale organic matter enrichment is provided, the system comprising:
[0134] Data collection module: used to collect geochemical data of shale samples from the target area and construct a raw dataset; the raw dataset includes paleoenvironmental indicators and measured total organic carbon content;
[0135] Multidimensional feature matrix construction module: used to preprocess the original dataset to obtain a standardized feature subset; construct a multidimensional feature matrix from the standardized feature subset; the independent variable of the multidimensional feature matrix is the paleoenvironmental index, and the dependent variable is the total organic carbon content;
[0136] Random forest model construction module: used to logically group all samples in the multidimensional feature matrix according to their geological strata; for each geological stratum, the paleoenvironmental index of the stratum is used as the model input feature and the total organic carbon content is used as the model prediction target, and these are respectively input into the random forest model for training, optimization and validation to obtain the random forest model corresponding to each geological stratum;
[0137] The main control factor determination module is used to interpret the random forest model corresponding to each geological segment using the SHAP model, calculate the quantitative contribution percentage of each paleoenvironmental indicator in the segment, and determine the main control factor of the segment from all paleoenvironmental indicators in the segment based on the contribution percentage.
[0138] The evolution law determination module is used to obtain the contribution percentage set of each paleoenvironmental indicator within each geological stratum, compare the contribution percentage sets of paleoenvironmental indicators in different geological strata, and analyze the dynamic evolution law of the contribution percentage of the main controlling factors of each stratum in different strata.
[0139] For specific limitations regarding the evaluation system for key controlling factors of shale organic matter enrichment, please refer to the limitations described above, which will not be repeated here. Each module in the aforementioned evaluation system for key controlling factors of shale organic matter enrichment can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0140] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0141] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for evaluating the main controlling factors of shale organic matter enrichment, characterized in that, The method includes: Step S100: Collect geochemical data of shale samples from the target area and construct a raw dataset; the raw dataset includes paleoenvironmental indicators and the corresponding measured total organic carbon content; Step S200: Perform data preprocessing on the original dataset to obtain a standardized feature subset; construct a multidimensional feature matrix from the standardized feature subset; the independent variable of the multidimensional feature matrix is the paleoenvironmental index, and the dependent variable is the total organic carbon content; Step S300: Logically group all samples in the multidimensional feature matrix according to their geological strata; for each geological stratum, use the paleoenvironmental index of the stratum as the model input feature and the total organic carbon content as the model prediction target, and input them into the random forest model for training, optimization and validation, to obtain the random forest model corresponding to each geological stratum. Step S400: Use the SHAP model to interpret the random forest model corresponding to each geological segment, calculate the quantitative contribution percentage of each paleoenvironmental indicator in each geological segment, and determine the main controlling factor of each stratum from all paleoenvironmental indicators in each segment based on the contribution percentage. Step S500: Obtain the set of contribution percentages of each paleoenvironmental indicator within each geological stratum, compare the set of contribution percentages of paleoenvironmental indicators in different geological strata, and analyze the dynamic evolution of the contribution percentages of the main controlling factors in different strata.
2. The method for evaluating the main controlling factors of shale organic matter enrichment according to claim 1, characterized in that, The paleoenvironmental indicators include: paleoclimate indicators, paleproductivity indicators, terrestrial input indicators, redox condition indicators, sedimentation rate indicators, and palehydrological indicators. The paleoclimate indicators include: chemical alteration index and chemical weathering index; the paleoproductivity indicators include the content of copper, zinc, and nickel from biological sources; the terrestrial input indicators include the content of aluminum and titanium; the redox condition indicators include the ratio of uranium / thorium, vanadium enrichment factor, uranium enrichment factor, and molybdenum enrichment factor; the sedimentation rate indicators include rare earth element differentiation coefficients; and the paleohydrological indicators include the cobalt-manganese product.
3. The method for evaluating the main controlling factors of shale organic matter enrichment according to claim 1, characterized in that, The data preprocessing of the original dataset includes: A subset of samples is formed by randomly sampling from the original dataset. Construct multiple isolation trees to form an isolated forest, and calculate the samples of each subset. An anomaly score is determined, and an anomaly score threshold is set. All samples with an anomaly score higher than the threshold are marked as outliers and removed. The subset of samples... Data records containing multiple samples; Quantile standardization is performed on the original dataset after removing outliers to unify all feature variables to the same dimension and distribution range, forming a quantile-standardized dataset. Calculate the correlation matrix among all independent variables in the processed dataset, and remove redundant data in the processed dataset where the collinearity is higher than a preset threshold.
4. The method for evaluating the main controlling factors of shale organic matter enrichment according to claim 3, characterized in that, The calculation of each subset sample Abnormal scores include: Step S201: Randomly sample a subset of samples from the standardized feature subset. For this subset of samples Recursively and randomly select an independent variable feature and a random split value, the split value being between the selected independent variable feature and the current subset of samples. Between the minimum and maximum values; Step S202: Based on the segmentation value, divide the subset samples... Divide into two child nodes, left and right, and continue recursively dividing the two child nodes; Step S203: Repeat steps S201-S202 until only one subset of samples remains in the segmented nodes. Or the isolation tree has reached the preset maximum depth, and the subset samples... Multiple isolation trees are formed: among which, the maximum depth is where n is the size of the subset sample; Step S204: For each subset sample in the standardized feature subset... This allows it to traverse every isolated tree in the isolated forest and calculate subset samples. The path length at which the person is isolated in each isolation tree. And calculate subset samples Average path length across all isolation trees Each subset sample is calculated using the following formula. abnormal scores : ; in, A subset of samples The sample size; It includes The theoretical expected value of the average path length of an isolated tree in a dataset of randomly distributed samples is used for standardization. Its calculation formula is: ,in It is a harmonic number.
5. The method for evaluating the main controlling factors of shale organic matter enrichment according to claim 1, characterized in that, The SHAP model was used to interpret the random forest model corresponding to each geological segment, and the quantitative contribution percentage of each paleoenvironmental indicator within each segment was calculated. Based on the contribution percentage, the main controlling factors of each stratum were determined from all paleoenvironmental indicators of each segment, including: Based on cooperative game theory, the Shapley value is used to predict the total organic carbon content for each paleoenvironmental indicator in each feature subset S. Assign a contribution value at time ; The average of the absolute values of the contribution of each paleoenvironmental index across all samples is calculated as the global importance of that paleoenvironmental index. ; The global importance of all paleoenvironmental indicators is normalized to obtain the quantitative contribution percentage of each indicator. ; Within each geological stratum, the percentage contribution of all paleoenvironmental indicators belonging to the same geological category. The total contribution percentage of each geological category within the stratum is summed to obtain the total contribution percentage of each geological category. Within each geological stratum, the total contribution percentage of each geological category is compared, and the geological category with the highest total contribution percentage is determined as the controlling factor of that stratum.
6. The method for evaluating the main controlling factors of shale organic matter enrichment according to claim 5, characterized in that, For each paleoenvironmental indicator in each feature subset S, the prediction of total organic carbon content is... Assign a contribution value at time Calculated using the following formula: ; Where N is the complete set of features composed of paleoenvironmental indicators; S is a subset of features formed by sampling. It is the predicted value when the random forest model uses features from the feature subset S; It is the size of the feature subset S; Size of the feature set; To include paleoenvironmental indicators as an independent participant in the feature subset S, This represents the marginal contribution of paleoenvironmental indicators to the feature subset S.
7. The method for evaluating the main controlling factors of shale organic matter enrichment according to claim 5, characterized in that, Global importance of the paleoenvironmental indicators Calculated using the following formula: ; Where n is the total number of all shale samples. This represents the contribution value of the paleoenvironmental index to the i-th shale sample.
8. The method for evaluating the main controlling factors of shale organic matter enrichment according to claim 5, characterized in that, The global importance of all paleoenvironmental indicators is normalized using the following formula to obtain the quantitative contribution percentage of each paleoenvironmental indicator. Specifically, it includes: ; Where m represents the total number of paleoenvironmental indicators, and the percentage is... This refers to the quantitative contribution of paleoenvironmental indicators to the enrichment of organic matter.
9. The method for evaluating the main controlling factors of shale organic matter enrichment according to claim 1, characterized in that, The analysis of the dynamic evolution of the contribution percentage of the main controlling factors in different strata also includes: The controlling factors of each stratum are presented in numerical and graphical form.
10. A system for evaluating the main controlling factors of shale organic matter enrichment, characterized in that, The system includes: Data collection module: used to collect geochemical data of shale samples from the target area and construct a raw dataset; the raw dataset includes paleoenvironmental indicators and measured total organic carbon content; Multidimensional feature matrix construction module: used to preprocess the original dataset to obtain a standardized feature subset; construct a multidimensional feature matrix from the standardized feature subset; the independent variable of the multidimensional feature matrix is the paleoenvironmental index, and the dependent variable is the total organic carbon content; Random forest model construction module: used to logically group all samples in the multidimensional feature matrix according to their geological strata; for each geological stratum, the paleoenvironmental index of the stratum is used as the model input feature and the total organic carbon content is used as the model prediction target, and these are respectively input into the random forest model for training, optimization and validation to obtain the random forest model corresponding to each geological stratum; The main control factor determination module is used to interpret the random forest model corresponding to each geological segment using the SHAP model, calculate the quantitative contribution percentage of each paleoenvironmental indicator in the segment, and determine the main control factor of the segment from all paleoenvironmental indicators in the segment based on the contribution percentage. The evolution law determination module is used to obtain the contribution percentage set of each paleoenvironmental indicator within each geological stratum, compare the contribution percentage sets of paleoenvironmental indicators in different geological strata, and analyze the dynamic evolution law of the contribution percentage of the main controlling factors of each stratum in different strata.