Method and system for predicting contents of major elements and trace elements in marine shale

By combining machine learning technology with the random forest algorithm and the sparrow search algorithm, the accuracy bottleneck of logging technology in predicting major and trace elements in marine shales has been solved, achieving efficient and low-cost element content prediction, and improving prediction accuracy and efficiency.

CN120626153APending Publication Date: 2025-09-12CHINA UNIV OF GEOSCIENCES (WUHAN)
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510800457.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing logging technologies face accuracy bottlenecks when predicting major and trace elements in marine shales. In particular, ECS spectrum interpretation is affected by instrument gain drift and NGS misjudgments in permeable formations. In addition, the logging response characteristics of some trace elements are not significant and need to be verified with core data.

Method used

Machine learning technology is combined with the random forest algorithm and the multi-strategy improved sparrow search algorithm. By obtaining drilling coring and logging curve data, depth alignment and data integration are performed, and a machine learning model is constructed to predict element content. Rock samples are tested using XRF and ICP-MS, and hyperparameters are optimized to improve prediction accuracy.

Benefits of technology

It achieves high-precision prediction of major and trace elements in marine shales, simplifies the operating process, reduces costs, improves prediction efficiency, and provides new geochemical analysis and logging technology methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120626153A_ABST
    Figure CN120626153A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of geochemistry and logging, in particular to a method and system for predicting the content of major elements and microelements in marine shale, and the method comprises the steps: obtaining drilling coring and logging curve data, and carrying out the depth alignment of a feature response section and a coring section on a logging curve based on lithologic features; rock samples of different lithofacies are collected through a system, main trace element content testing is carried out, deep matching processing is carried out based on the characteristic response section after depth alignment, and main trace element content data and logging data are subjected to depth consistency integration; constructing a data set based on the main trace element content data and the logging data with consistent depth, and constructing a machine learning model by applying a random forest algorithm, the machine learning model performing hyper-parameter optimization and feature selection based on a multi-strategy improved sparrow search algorithm; and inputting the logging data with the depth to be predicted into the trained model to predict the content of the main quantity and the content of the trace elements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of geochemistry and well logging technology, and in particular to a method and system for predicting the contents of major and trace elements in marine shale. Background Art

[0002] Analysis of major and trace elements holds significant practical value in shale oil and gas exploration and development. The concentrations and ratios of major elements (such as Si, Al, Ca, and Mg) and trace elements (such as Mo, U, Ni, and Cu) in shale can be used to reconstruct sedimentary environments. Specifically, the biogenic Si content indicates the presence of abundant siliceous organisms (such as diatoms and radiolarians), reflecting high paleoproductivity. Al, primarily derived from clay minerals, indicates terrigenous input. High Ca and Mg concentrations typically indicate carbonate input. Mo and U are typical redox-sensitive elements and are often highly enriched in anoxic environments. Ni and Cu are closely related to organic matter enrichment. On the one hand, Ni and Cu act as nutrients, enhancing productivity. On the other hand, Ni and Cu are easily adsorbed by organic matter and co-enriched with it. Therefore, analysis of major and trace element concentrations is of irreplaceable importance in paleoenvironmental reconstruction and organic matter enrichment studies. By analyzing these elements, we can reconstruct the ancient sedimentary environment conditions, analyze the organic matter enrichment mechanism, determine the organic matter enrichment intervals, and provide a scientific basis for the exploration of shale oil and gas.

[0003] Currently, the field of logging technology mainly relies on element capture spectroscopy (ECS) and natural gamma ray spectroscopy (NGS) to predict major and trace elements in marine shales. Although this method can achieve continuous element content prediction with high vertical resolution, and ECS technology can directly measure major elements such as Si, Ca, and Fe, and NGS technology can quantitatively obtain trace elements related to organic matter such as U and Th, this technology still has limitations. For example, ECS spectrum interpretation is affected by instrument gain drift and needs to be corrected. NGS may lead to misjudgment due to uranium dissolution in permeable formations. In addition, the logging response characteristics of some trace elements (such as Mo and Ni) are not significant and need to be verified with core data. Machine learning technology, as a data-driven nonlinear modeling tool, can integrate multi-source data, capture complex geological relationships, and significantly improve the accuracy and efficiency of major and trace element predictions. Therefore, in order to break through the simplified assumptions of traditional logging interpretation models on complex geological relationships and overcome the accuracy bottleneck of single logging technology for trace element prediction, it is necessary to use machine learning technology to capture the complex coupling relationship between element content and logging response to break through the limitations of traditional linear spectrum analysis. Summary of the Invention

[0004] In order to improve the prediction accuracy of major and trace elements in marine shale, the present invention aims to provide a method and system for predicting the content of major and trace elements in marine shale. The technical solutions adopted are as follows: In a first aspect, the present application discloses a method for predicting the content of major and trace elements in marine shale, the method comprising: S1. Obtain drilling coring and logging curve data, and align the characteristic response segment on the logging curve with the coring segment in depth based on lithologic characteristics; S2. Systematically collect rock samples from different lithofacies, conduct major and trace element content testing, and perform depth matching processing based on the characteristic response segments after depth alignment to integrate the major and trace element content data with the logging data for depth consistency; S3. Constructing a dataset based on depth-consistent major and trace element content data and well logging data, and applying a random forest algorithm to build a machine learning model. The machine learning model uses a multi-strategy improved sparrow search algorithm for hyperparameter optimization and feature selection. S4. Input the well logging data of the depth to be predicted into the trained model to predict the content of major and trace elements.

[0005] Furthermore, in step S1, the acquisition of drilling coring and logging curve data, and depth alignment of the characteristic response segment on the logging curve with the coring segment based on lithologic characteristics, includes: S11. Acquire drilling coring data and well logging curve data of the target layer, wherein the drilling coring data includes depth information and lithologic description information of the coring section, and the well logging curve data includes natural gamma ray curves, acoustic transit time curves, neutron porosity curves, and density curves; S12. Determine rock characteristics corresponding to the coring section based on the lithologic description information; S13, screening out a target logging curve corresponding to the rock characteristics based on the logging curve data, and determining a characteristic response segment corresponding to the lithologic characteristics on the target logging curve; S14. Based on the depth information, align the characteristic response segment with the coring segment in depth.

[0006] Furthermore, in step S2, the system collects rock samples of different lithofacies, conducts major and trace element content testing, and performs depth matching processing based on the characteristic response segments after depth alignment to integrate the major and trace element content data with the logging data for depth consistency, including: S21. Determine the lithofacies present in the target interval based on known geological information and systematically collect rock samples of different lithofacies; S22. Testing the sampled samples using XRF (X-ray fluorescence spectrometry) to determine the content of major elements in the lithofacies; S23. The sampled samples were tested using ICP-MS (inductively coupled plasma mass spectrometry) to determine the content of trace elements in the lithofacies; S24. Perform depth matching and linear interpolation processing on the obtained content data to ensure that the main and trace element content data are consistent with the depth of the logging data.

[0007] Furthermore, in step S24, linear interpolation is performed using the following formula: ; Where, 、 Respectively represent the depth of the point to be interpolated and its corresponding content data, 、 、 、 Respectively represent two adjacent known depth points and their corresponding content data.

[0008] Furthermore, in step S3, before constructing a data set based on the main and trace element content data and logging data that remain consistent at depth, the method also includes: identifying and deleting invalid data items, filling missing values ​​with the average values ​​of similar geological features or adjacent depth segment data items, deleting data items with continuous missing values, and identifying and deleting data items with outliers based on the isolation forest algorithm.

[0009] Furthermore, the method of identifying and deleting data items containing outliers based on the isolation forest algorithm includes: (1) When initializing the isolated forest, well logging features that are closely related to lithologic changes, sedimentary cycles, and elemental geochemical behavior are selected and used as initial segmentation features; (2) Introducing the geological expert knowledge base, weighting the initial segmentation features according to their importance based on the expert experience scores, and selecting the splitting features on this basis; (3) Randomly select a split point within the value range of the split feature, and divide the data into two parts according to the split point, wherein each part of the data is placed in a preset left child node and a preset right child node respectively; (4) Recursively perform feature weighted splitting operations until each data point is isolated or the preset maximum tree height is reached; (5) For each data point, calculate its geologically weighted path length in each isolated tree; (6) By averaging the weighted path lengths in all isolated trees, each data point is assigned a corresponding anomaly score, and the data items containing outliers are identified and deleted based on the anomaly score.

[0010] Furthermore, in step S3, the multi-strategy-based improved sparrow search algorithm performs hyperparameter optimization, including: S31. Initialize the population based on the Logistic chaotic map to form an initial population; S32. Assigning roles of discoverer, joiner, and scout based on the fitness values ​​of individuals in the population, wherein the fitness values ​​are determined by the root mean square error; S33, based on adaptive weight and step size, Levy flight and random perturbation mechanism, the position update of the discoverer, joiner and scout is performed; S34. Through multiple iterations of optimization, the optimal hyperparameter combination is finally output.

[0011] Furthermore, in step S33, random perturbation is performed using the following formula: ; in, represents the value of a variable after random perturbation, represents random numbers from a standard normal distribution, Represents a preset constant used to control the amplitude of the disturbance.

[0012] Furthermore, in step S3, during the model training process, the generalization ability of the model and the importance of features are estimated based on the feature importance calculation method of out-of-bag error estimation that incorporates geological constraints. The calculation formula of feature importance is as follows: ; ; in, Representation characteristics The feature importance of 、 Respectively represent the features The out-of-bag error estimated before and after random permutation, represents the number of decision trees, represents the weighted characteristic variance of geological attributes, Represents the geological sensitivity adjustment coefficient determined based on expert experience In a second aspect, the present application discloses a system for predicting the content of major and trace elements in marine shale, the system comprising a data acquisition and depth alignment module, a lithofacies analysis and data integration module, a machine learning model training and optimization module, and a data prediction module, wherein: The data acquisition and depth alignment module is used to acquire drilling coring and logging curve data, and to perform depth alignment between the characteristic response segment on the logging curve and the coring segment based on lithologic characteristics; The petrographic analysis and data integration module is used to systematically collect rock samples of different lithofacies, conduct major and trace element content tests, and perform depth matching processing based on the characteristic response segments after depth alignment, so as to integrate the major and trace element content data with the logging data for depth consistency; The machine learning model training and optimization module is used to construct a data set based on the main and trace element content data and well logging data that remain consistent at depth, and to apply the random forest algorithm to build a machine learning model. The machine learning model is based on a multi-strategy improved sparrow search algorithm for hyperparameter optimization and feature selection; The data prediction module is used to input the well logging data of the depth to be predicted into the trained model to predict the content of major and trace elements.

[0013] The present invention has the following beneficial effects: (1) The machine learning model selected in this application combines the optimization capability of the sparrow search algorithm and the nonlinear fitting capability of the decision tree. It has the advantages of high prediction accuracy and strong generalization ability, and is particularly suitable for complex data regression prediction problems. At the same time, the model also introduces a variety of improvement strategies, such as Logistics chaos mapping, Levy flight, adaptive weights and step sizes, random perturbations, etc., which not only enhance the global search capability of the algorithm, but also improve its optimization ability on complex data sets. By optimizing hyperparameters, the model can better fit the data, further improving the prediction accuracy of the model, and providing an efficient and reliable method for predicting the content of major and trace elements in marine shales based on well logging data.

[0014] (2) The technical solution provided by this application is simple to operate and low-cost. This solution only requires the collection of a small amount of rock samples for laboratory testing. By combining it with well logging data of the corresponding depth and training the model, it can achieve accurate prediction of the major and trace element contents of the entire well section through optimization methods such as data standardization, preprocessing, multi-strategy improved sparrow search algorithm (MS-SSA) optimization, and feature importance estimation. Experimental verification results show that the prediction results of the model are highly consistent with the laboratory measured data, and can accurately predict the major and trace element contents in marine shale, greatly saving the time cost and experimental resource consumption required for traditional laboratory determination of major and trace element contents, and providing new methods and ideas for the application of geochemical analysis and well logging technology. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0016] Figure 1 A flow chart of a method for predicting the contents of major and trace elements in marine shale provided by one embodiment of the present invention; Figure 2 is the prediction result of the machine learning model training set in an embodiment of the present invention; Figure 3 is the prediction result of the machine learning model test set in an embodiment of the present invention; Figure 4 is the prediction result of a blind test on a new well in an embodiment of the present invention; Figure 5 A diagram showing the structure of a system for predicting the contents of major and trace elements in marine shale, provided in one embodiment of the present invention. DETAILED DESCRIPTION

[0017] To further illustrate the technical means and effectiveness of the present invention in achieving its intended objectives, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effectiveness of a method and system for predicting the content of major and trace elements in marine shale according to the present invention. In the following description, references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.

[0018] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0019] The following describes in detail a method and system for predicting the contents of major and trace elements in marine shale provided by the present invention with reference to the accompanying drawings.

[0020] See also Figure 1 , which shows a flow chart of a method for predicting the content of major and trace elements in marine shale provided by one embodiment of the present invention, the method comprising: Step S1: Acquire drilling coring and logging curve data, and align the characteristic response section on the logging curve with the coring section in depth based on lithologic characteristics.

[0021] In step S2, the system collects rock samples of different lithofacies, conducts major and trace element content tests, and performs depth matching processing based on the characteristic response segments after depth alignment to integrate the major and trace element content data with the logging data for depth consistency.

[0022] Step S3: construct a data set based on the main and trace element content data and logging data that remain consistent at depth, and apply the random forest algorithm to construct a machine learning model, wherein the machine learning model performs hyperparameter optimization and feature selection based on the multi-strategy improved sparrow search algorithm.

[0023] Step S4: input the well logging data of the depth to be predicted into the trained model to predict the contents of major and trace elements.

[0024] From the above, it can be seen that the method disclosed in this application for predicting the content of major and trace elements in marine shale, the selected machine learning model combines the optimization ability of the sparrow search algorithm and the nonlinear fitting ability of the decision tree, and has the advantages of high prediction accuracy and strong generalization ability, and is particularly suitable for complex data regression prediction problems. At the same time, the model also introduces a variety of improvement strategies, such as Logistics chaos mapping, Levy flight, adaptive weights and step sizes, random perturbations, etc., which not only enhance the global search capability of the algorithm, but also improve its optimization ability on complex data sets. By optimizing hyperparameters, the model can better fit the data, further improving the prediction accuracy of the model, and providing an efficient and reliable method for predicting the content of major and trace elements in marine shale from logging data. The technical solution provided by this application is simple to operate and low-cost. This approach requires only a small amount of rock sample collection for laboratory testing. By combining it with well logging data from the appropriate depth and training a model, and through optimization methods such as data standardization, preprocessing, optimization using the Multi-Strategy Improved Sparrow Search Algorithm (MS-SSA), and feature importance estimation, it accurately predicts the major and trace element contents of the entire wellbore. Experimental validation results demonstrate that the model's predictions are highly consistent with laboratory measured data, enabling accurate prediction of major and trace element contents in marine shales. This significantly reduces the time and experimental resource consumption required for traditional laboratory determinations of major and trace element contents, providing new methods and insights for geochemical analysis and the application of well logging technology.

[0025] In one embodiment, in step S1, obtaining drilling coring and well logging curve data, and aligning the characteristic response segment on the well logging curve with the coring segment in depth based on lithologic characteristics, includes: Step S11, obtaining the drilling coring data and logging curve data of the target layer segment, wherein the drilling coring data includes the depth information and lithologic description information of the coring segment, and the logging curve data includes the natural gamma ray curve, sonic time difference curve, neutron porosity curve and density curve.

[0026] Specifically, drilling coring data is obtained through the coring process in drilling operations, which records the starting depth, ending depth and lithologic description information of the coring section, such as rock color, mineral composition, structural structure, etc.; logging curve data is obtained through continuous measurement by logging instruments during the drilling process, covering natural gamma curves (reflecting the radioactive element content of rocks), acoustic time difference curves (reflecting the acoustic properties of rocks), neutron porosity curves (assessing rock porosity) and density curves (reflecting rock density properties). These data need to be preprocessed, such as denoising and standardization, to ensure data quality.

[0027] Step S12: determining the rock characteristics corresponding to the coring section based on the lithologic description information.

[0028] Specifically, this application determines the rock type represented by the core section, such as sandstone, mudstone, carbonate rock, etc., based on the lithologic description information and combined with the petrological classification standards, and further describes the rock characteristics corresponding to the rock type, such as mineral composition, sedimentary structure, etc. These characteristics will be used for subsequent correlation analysis with logging responses.

[0029] Step S13: Filter out a target logging curve corresponding to the rock characteristics based on the logging curve data, and determine a characteristic response segment corresponding to the lithologic characteristics on the target logging curve.

[0030] Specifically, this application analyzes the sensitivity of different logging curves to rock characteristics and selects the logging curve with the most pronounced response to lithologic characteristics as the target logging curve, such as the natural gamma ray logging curve, which has a distinct response characteristic to mudstone. Furthermore, based on the changing trends of lithologic characteristics, this application also identifies characteristic response segments corresponding to the lithologic characteristics of the coring section within the selected target logging curves, such as the high natural gamma ray curve segment corresponding to the mudstone section.

[0031] Step S14: Based on the depth information, align the characteristic response segment with the coring segment in depth.

[0032] For example, if a limestone section is selected for calibration, since the acoustic time difference and natural gamma of the limestone section are usually small, in order to accurately identify the response characteristics of the limestone section on the logging curve, this application will use the curve segment with low acoustic time difference and low natural gamma value on the target logging curve as the characteristic response segment, and align the characteristic response segment with the core sampling segment based on the depth information of the limestone section.

[0033] In one embodiment, in step S2, the system collects rock samples of different lithofacies, conducts major and trace element content testing, and performs depth matching processing based on the characteristic response segments after depth alignment to integrate the major and trace element content data with the logging data for depth consistency, including: Step S21: Determine the lithofacies existing in the target layer based on known geological information, and systematically collect rock samples of different lithofacies.

[0034] Specifically, when sampling the target layer, it is first necessary to identify the different lithofacies existing in the target layer, such as mudstone, siliceous mudstone, gray mudstone, etc., based on known geological information (such as core color and sedimentary structure), and sample rock samples of the lithofacies according to the lithofacies distribution law and research objectives.

[0035] Step S22: XRF (X-ray fluorescence spectrometry) is used to test the sampled material to determine the content of major elements in the rock phase.

[0036] Specifically, the XRF (X-ray fluorescence spectrometry) method uses an X-ray fluorescence spectrometer to excite the sample in a vacuum or helium atmosphere, and quantitatively detects the intensity of the characteristic X-rays. 、 、 、 、 、 、 、 During the test, standard materials are used for calibration and spectral line overlap interference is deducted. The final data are corrected for Lorentz polarization and used for lithofacies composition analysis and geological process interpretation.

[0037] In step S23, the sample is tested using an ICP-MS (inductively coupled plasma mass spectrometry) method to determine the content of trace elements in the lithofacies.

[0038] Specifically, in the process of testing the sampled samples using the ICP-MS (inductively coupled plasma mass spectrometry) method, the sample powder needs to be completely digested with a nitric acid-hydrofluoric acid mixture, then made up to volume with ultrapure water and internal standard elements such as rhodium and rhenium are added. The contents of trace elements such as V, Cr, Ni, Cu, Zn, Rb, Sr, Y, Zr, Nb, Ba and rare earth elements are detected by inductively coupled plasma mass spectrometry in helium collision mode. The standard curve method combined with internal standard correction is used to eliminate matrix effects and polyatomic ion interference. The final data is filtered by mass number and used for lithologic genesis and provenance tracing analysis.

[0039] Step S24 : performing depth matching and linear interpolation processing on the obtained content data to ensure that the main and trace element content data are consistent with the depth of the logging data.

[0040] Specifically, this application will use the marker layer or lithologic mutation interface in the logging curve as a benchmark, adjust the depth coordinates of the test and analysis data by comparing the characteristic response segments, and use linear interpolation to supplement the major or trace element content for the missing depth segments, and use sliding average filtering to eliminate interpolation noise, and finally generate a continuous geochemical profile that corresponds point by point to the logging curve, ensuring that the changes in facies composition are consistent with the sedimentary cycle and logging response in depth.

[0041] In one embodiment, in step S24, linear interpolation is performed using the following formula: ; Where, 、 Respectively represent the depth of the point to be interpolated and its corresponding content data, 、 、 、 Respectively represent two adjacent known depth points and their corresponding content data.

[0042] It should be noted that this formula is used to calculate the content data of the interpolated point using two adjacent depth points and their content data, ensuring the depth consistency of lithofacies composition changes with sedimentary cycles and logging responses. This process achieves a high degree of depth consistency between lithofacies composition changes, sedimentary cycles, and logging responses, providing a reliable data foundation for subsequent geological analysis.

[0043] In one embodiment, in step S3, before constructing a data set based on the main and trace element content data and logging data that remain consistent at depth, the method further includes: identifying and deleting invalid data items, filling missing values ​​with the average values ​​of similar geological features or adjacent depth segment data items, deleting data items with continuous missing values, and identifying and deleting data items with outliers based on the isolation forest algorithm.

[0044] Specifically, in the data preprocessing stage, this application will identify and eliminate invalid data items that are obviously erroneous or exceed a reasonable range through data verification rules (such as non-negative verification of content data, mutation verification of logging curves, lithology-logging response matching verification, etc.), such as abnormal situations such as negative content data or mutation spikes in logging curves; for isolated missing values, the arithmetic mean of data of the same geological characteristics (such as the same lithology section) or adjacent depth sections is used to fill in. If a data item has multiple consecutive missing values, the data item is directly deleted to avoid introducing too much uncertainty; finally, the isolation forest algorithm is used to detect outliers in the data distribution, and multiple isolated trees are iteratively constructed to identify outliers that deviate from the normal data pattern, and the data items containing outliers are removed from the training set, thereby ensuring that the training data input to the model is of high quality and consistency.

[0045] In one embodiment, identifying and deleting data items containing outliers based on the isolation forest algorithm includes: (1) When initializing the isolated forest, well logging features that are closely related to lithologic changes, sedimentary cycles, and elemental geochemical behavior are selected and used as initial segmentation features; (2) Introducing the geological expert knowledge base, weighting the initial segmentation features according to their importance based on the expert experience scores, and selecting the splitting features on this basis; (3) Randomly select a split point within the value range of the split feature, and divide the data into two parts according to the split point, wherein each part of the data is placed in a preset left child node and a preset right child node respectively; (4) Recursively perform feature weighted splitting operations until each data point is isolated or the preset maximum tree height is reached; (5) For each data point, calculate its geologically weighted path length in each isolated tree; (6) By averaging the weighted path lengths in all isolated trees, each data point is assigned a corresponding anomaly score, and the data items containing outliers are identified and deleted based on the anomaly score.

[0046] Based on steps (1) to (6), it should be noted that the isolation forest algorithm constructs multiple isolated trees. Unlike the traditional isolation forest's completely random feature selection mechanism, this application uses feature selection weighted by geological expert knowledge and split points constrained by geological attributes to divide the data space. The path length of each data point is calculated and an anomaly score is generated. The shorter the path length, the more likely the data point is an anomaly. Because the number of abnormal data points is small and they differ significantly from normal data points, they are more likely to be isolated.

[0047] In one embodiment, the present application calculates the anomaly score using the following formula: ; in, represents the anomaly score; Represents data points In isolated tree The path length in Indicates the number of isolated trees constructed, represents the path length normalization constant.

[0048] In one embodiment, before constructing a data set based on the depth-consistent major and trace element content data and well logging data, the method further includes: normalizing the data based on the following formula so that the value range of each parameter is within the interval [0, 1]: ; in, represents the standardized data, represents the data before normalization, 、 Indicates the maximum and minimum values ​​of the normalized data.

[0049] In one embodiment, the present application divides the data into a training set and a test set in a ratio of 4:1, wherein the training set is mainly used to train the model, and the test set is mainly used to evaluate the model performance, so that the model parameters can be adjusted based on the evaluation results to optimize the prediction accuracy.

[0050] In one embodiment, in step S3, the hyperparameter optimization of the multi-strategy improved sparrow search algorithm includes: Step S31: Initialize the population based on the Logistic chaotic map to form an initial population.

[0051] Specifically, the present application generates a chaotic sequence through the Logistic Chaos Mapping formula and maps the chaotic sequence into the search space to generate a diverse initial population. The Logistic Chaos Mapping formula is as follows: ; in, represents the control parameter, Indicates the The state variables of the step.

[0052] This formula can be considered as the mathematical expression of the Logistic Chaos Map, which provides a tool for quantitatively describing and explaining chaotic phenomena. Through the regulation and fine-tuning of initial conditions, we can observe the diverse behaviors that appear in the evolution of the system, and thus understand and study the nature of chaotic phenomena. As a control parameter, it determines the dynamic characteristics of the Logistic map. The value of is within a specific range (such as ), the system exhibits chaotic characteristics, that is, highly complex randomness and unpredictable behavior. Indicates the proportion of the population to the maximum possible population size, by adjusting the parameter and initial value , to observe the population proportion changes.

[0053] Step S32: assigning roles of discoverer, joiner, and scout based on the fitness values ​​of individuals in the population, wherein the fitness values ​​are determined by the root mean square error.

[0054] Specifically, the calculation formula of the root mean square error is as follows: ; in, Indicates the first The fitness value of each individual, Indicates the first characteristics of an individual, represents the true value, Represents the model prediction value.

[0055] It should be noted that during each iteration, this application will sort the obtained fitness values, and based on the sorting results, the top 20% individuals with the smallest fitness values ​​will be used as discoverers, whose role is to conduct global search and explore new solution space; individuals with medium fitness values ​​(that is, individuals whose fitness values ​​are close to the average fitness of the group) will be used as joiners, whose role is to conduct local search and use the information of the discoverers to optimize the solution; the last 20% individuals with the largest fitness values ​​will be used as scouts, whose role is to avoid falling into local optimality and find new solutions through global search.

[0056] Step S33: Based on the adaptive weight and step size, Levy flight and random perturbation mechanism, the positions of the discoverer, joiner and scout are updated.

[0057] Specifically, the discoverer's position update formula is: ; in, represents the nonlinear weight, Indicates the The discoverer in The position at the iteration, represents a random number, Indicates the maximum number of iterations; represents the adaptive step size, Represents the dimension of the problem, represents the initial weight, represents the minimum weight, 、 represents a normally distributed random number, Indicates fixed parameters.

[0058] Specifically, the position update formula of the joiner can be divided into the following two cases according to the relationship between the individual index and the population size: (1) When the index is less than half of the population, that is, the joiner is closer to the first half of the population, the position update formula is: ; in, Indicates the location of the current optimal solution, represents the random direction factor.

[0059] (2) When the index is greater than half of the population, that is, the joiner is closer to the second half of the population, the position update formula is: ; in, Represents random numbers from the standard normal distribution.

[0060] Specifically, the scout's position update formula is divided into the following two cases according to the relationship between the fitness value and the optimal fitness value: (1) When the scout's fitness value is greater than the optimal fitness value, the position update formula is: ; (2) When the scout's fitness value is less than the optimal fitness value, the position update formula is: ; in, represents the minimum value of all individual positions in the population, Represents a preset constant used to avoid the denominator being zero.

[0061] Step S34: Search for the optimal value through multiple iterations until the fitness value meets the preset threshold, and then output the optimal hyperparameter combination.

[0062] In one embodiment, in step S33, random perturbation is performed using the following formula: ; in, represents the value of a variable after random perturbation, represents random numbers from a standard normal distribution, Represents a preset constant used to control the amplitude of the disturbance.

[0063] It should be noted that this formula enhances the global search capability of the algorithm by introducing a random perturbation term, thus preventing the algorithm from converging to a local optimal solution too early.

[0064] In one embodiment, in step S3, during the model training process, the generalization ability of the model and the importance of features are estimated based on a feature importance calculation method based on out-of-bag error estimation that incorporates geological constraints. The calculation formula of feature importance is as follows: ; ; in, Representation characteristics The feature importance of 、 Respectively represent the features The out-of-bag error estimated before and after random permutation, represents the number of decision trees, represents the weighted characteristic variance of geological attributes, Represents the geological sensitivity adjustment coefficient determined based on expert experience.

[0065] It should be noted that the calculation process of the out-of-bag error incorporates geological constraints. Specifically, In the process, this application only uses the features Samples with high geological correlation are used to avoid interference of geological background noise on error assessment; In the process of The replacement range is limited (e.g., replacement is only allowed within the same lithologic segment) to ensure the geological rationality of feature replacement. Directly reflects the characteristics Contribution to the prediction of geological processes (e.g., lithologic changes, fluid properties).

[0066] It should be further explained that the number of decision trees in the traditional random forest is Through empirical settings, considering that traditional random forests lack geological prior knowledge and are difficult to adapt to the needs of feature importance evaluation under different geological conditions, empirical settings may lead to unstable evaluation results. This application dynamically adjusts the number of decision trees according to geological characteristics. Specifically, this application will dynamically calculate the number of decision trees that adapt to different geological conditions based on geological characteristics and geological sensitivity adjustment coefficients. This dynamic adjustment method not only improves the stability of feature importance evaluation, but also optimizes computational efficiency, enabling the model to better adapt to complex and changing geological environments.

[0067] In one embodiment, during the model training process, the present application uses the coefficient of determination , and the root mean square error Evaluate the prediction results, and the calculation formulas are: ; ; in, represents the coefficient of determination, represents the root mean square error, Indicates the observations, represents the observed mean, Indicates the predicted values, Represents the number of observations.

[0068] Please refer to Figure 2 , which is the prediction result of the machine learning model training set in the embodiment of the present invention. The results show that the machine learning model used in this embodiment has a good training effect in predicting the major and trace elements in marine shale. Among them, the actual value and predicted value of SiO2 in the prediction results of the model are =0.96, =1.2; the actual value and predicted value of CaO =0.95, =0.4; the actual value and predicted value of Al2O3 =0.97, =0.7; the actual and predicted values ​​of MgO =0.92, =0.2; Mo true value and predicted value =0.98, =1.9; U true value and predicted value =0.97, =1.2; Cu true value and predicted value =0.94, =3.8; Ni true value and predicted value =0.93, =6.6.

[0069] Please refer to Figure 3, which is the prediction result of the machine learning model test set in the embodiment of the present invention. The results show that the machine learning model used in this embodiment has a good prediction effect on the major and trace elements in marine shale. Among them, the actual value and predicted value of SiO2 in the prediction results of the model are =0.92, =1.5; the actual value and predicted value of CaO =0.95, =0.3; the actual value and predicted value of Al2O3 =0.95, =0.5; the actual value and predicted value of MgO =0.91, =0.2; Mo true value and predicted value =0.87, =1.5; U true value and predicted value =0.93, =1.9; Cu true value and predicted value =0.90, =5.8; Ni true value and predicted value =0.91, =8.5.

[0070] Please refer to Figure 4 , which is the result of blind testing of a new well in the embodiment of the present invention. The results show that the machine learning model used in this embodiment has high practicality and reliability in predicting the major and trace elements in marine shale. Among them, the actual value and predicted value of SiO2 in the prediction results of the model are =0.90, =2.5; the actual and predicted values ​​of CaO =0.87, =0.2; the actual value and predicted value of Al2O3 =0.88, =1.1; the actual value and predicted value of MgO =0.96, =0.3; Mo true value and predicted value =0.95, =1.6; U true value and predicted value =0.91, =2.5; Cu true value and predicted value =0.88, =5.0; Ni true value and predicted value =0.85, =6.7.

[0071] In summary, in the training set, the model predicts key elements such as SiO2, Al2O3, Mo The values ​​are all over 0.95. A value below 2.0 indicates that the model can accurately capture the complex patterns in the geological data; on the test set, the model maintains >0.87, The excellent performance of <8.5 verifies its strong fitting ability; in the blind test of the new well, the model predicts MgO, Mo and other elements The value is still over 0.85, The value is controlled within 6.7, proving that the prediction results have a high geological credibility.

[0072] Please refer to Figure 5 The present application discloses a system for predicting the content of major and trace elements in marine shale, the system comprising a data acquisition and depth alignment module, a lithofacies analysis and data integration module, a machine learning model training and optimization module, and a data prediction module, wherein: The data acquisition and depth alignment module is used to acquire drilling coring and logging curve data, and to perform depth alignment between the characteristic response section on the logging curve and the coring section based on lithologic characteristics.

[0073] The lithofacies analysis and data integration module is used to systematically collect rock samples of different lithofacies, conduct major and trace element content tests, and perform depth matching processing based on the characteristic response segments after depth alignment, so as to integrate the major and trace element content data with the logging data for depth consistency.

[0074] The machine learning model training and optimization module is used to construct a data set based on depth-consistent main and trace element content data and well logging data, and apply the random forest algorithm to build a machine learning model, wherein the machine learning model performs hyperparameter optimization and feature selection based on a multi-strategy improved sparrow search algorithm.

[0075] The data prediction module is used to input the well logging data of the depth to be predicted into the trained model to predict the content of major and trace elements.

[0076] In one embodiment, the above modules are also used to implement a method for predicting the content of major and trace elements in marine shale as described in any one of the above method embodiments, which is not limited in this application.

[0077] From the above, it can be seen that the system disclosed in this application for predicting the content of major and trace elements in marine shales uses a machine learning model that combines the optimization capabilities of the sparrow search algorithm and the nonlinear fitting capabilities of the decision tree. It has the advantages of high prediction accuracy and strong generalization ability, and is particularly suitable for complex data regression prediction problems. At the same time, the model also introduces a variety of improvement strategies, such as Logistics chaos mapping, Levy flight, adaptive weights and step sizes, random perturbations, etc., which not only enhance the global search capability of the algorithm, but also improve its optimization capability on complex data sets. By optimizing hyperparameters, the model can better fit the data, further improving the prediction accuracy of the model, and providing an efficient and reliable method for predicting the content of major and trace elements in marine shales from logging data. The technical solution provided by this application is easy to operate and low-cost. This approach requires only a small amount of rock sample collection for laboratory testing. By combining it with well logging data from the appropriate depth and training a model, and through optimization methods such as data standardization, preprocessing, optimization using the Multi-Strategy Improved Sparrow Search Algorithm (MS-SSA), and feature importance estimation, it accurately predicts the major and trace element contents of the entire wellbore. Experimental validation results demonstrate that the model's predictions are highly consistent with laboratory measured data, enabling accurate prediction of major and trace element contents in marine shales. This significantly reduces the time and experimental resource consumption required for traditional laboratory determinations of major and trace element contents, providing new methods and insights for geochemical analysis and the application of well logging technology.

[0078] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0079] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.

Claims

1. A method for predicting the content of major and trace elements in marine shale, characterized in that: The method comprises: S1. Obtain drilling coring and logging curve data, and align the characteristic response segment on the logging curve with the coring segment in depth based on lithologic characteristics; S2. Systematically collect rock samples from different lithofacies, conduct major and trace element content testing, and perform depth matching processing based on the characteristic response segments after depth alignment to integrate the major and trace element content data with the logging data for depth consistency; S3. Constructing a dataset based on depth-consistent major and trace element content data and well logging data, and applying a random forest algorithm to build a machine learning model. The machine learning model uses a multi-strategy improved sparrow search algorithm for hyperparameter optimization and feature selection. S4. Input the well logging data of the depth to be predicted into the trained model to predict the content of major and trace elements.

2. The method according to claim 1, characterized in that In step S1, the acquisition of drilling coring and logging curve data, and depth alignment of characteristic response segments on the logging curve with the coring segments based on lithologic characteristics, includes: S11. Acquire drilling coring data and well logging curve data of the target layer, wherein the drilling coring data includes depth information and lithologic description information of the coring section, and the well logging curve data includes natural gamma ray curves, acoustic transit time curves, neutron porosity curves, and density curves; S12. Determine rock characteristics corresponding to the coring section based on the lithologic description information; S13, screening out a target logging curve corresponding to the rock characteristics based on the logging curve data, and determining a characteristic response segment corresponding to the lithologic characteristics on the target logging curve; S14. Based on the depth information, align the characteristic response segment with the coring segment in depth.

3. The method according to claim 1, characterized in that In step S2, the system collects samples of different lithofacies, conducts major and trace element content testing, and performs depth matching processing based on the characteristic response segments after depth alignment to integrate the major and trace element content data with the logging data for depth consistency, including: S21. Determine the lithofacies present in the target interval based on known geological information and systematically collect rock samples of different lithofacies; S22. Testing the sampled samples using XRF (X-ray fluorescence spectrometry) to determine the content of major elements in the lithofacies; S23. The sampled samples were tested using ICP-MS (inductively coupled plasma mass spectrometry) to determine the content of trace elements in the lithofacies; S24. Perform depth matching and linear interpolation processing on the obtained content data to ensure that the main and trace element content data are consistent with the depth of the logging data.

4. The method according to claim 3, characterized in that In step S24, linear interpolation is performed using the following formula: ; Where, 、 Respectively represent the depth of the point to be interpolated and its corresponding content data, 、 、 、 Respectively represent two adjacent known depth points and their corresponding content data.

5. The method according to claim 1, wherein In step S3, before constructing a data set based on the main and trace element content data and logging data that remain consistent at depth, the method also includes: identifying and deleting invalid data items, filling missing values ​​with the average values ​​of similar geological features or adjacent depth segment data items, deleting data items with continuous missing values, and identifying and deleting data items with outliers based on the isolation forest algorithm.

6. The method according to claim 5, characterized in that The method of identifying and deleting data items containing outliers based on the isolation forest algorithm includes: (1) When initializing the isolated forest, well logging features that are closely related to lithologic changes, sedimentary cycles, and elemental geochemical behavior are selected and used as initial segmentation features; (2) Introducing the geological expert knowledge base, weighting the initial segmentation features according to their importance based on the expert experience scores, and selecting the splitting features on this basis; (3) Randomly select a split point within the value range of the split feature, and divide the data into two parts according to the split point, wherein each part of the data is placed in a preset left child node and a preset right child node respectively; (4) Recursively perform feature weighted splitting operations until each data point is isolated or the preset maximum tree height is reached; (5) For each data point, calculate its geologically weighted path length in each isolated tree; (6) By averaging the weighted path lengths in all isolated trees, each data point is assigned a corresponding anomaly score, and the data items containing outliers are identified and deleted based on the anomaly score.

7. The method according to claim 1, characterized in that In step S3, the multi-strategy-based improved sparrow search algorithm performs hyperparameter optimization, including: S31. Initialize the population based on the Logistic chaotic map to form an initial population; S32. Assigning roles of discoverer, joiner, and scout based on the fitness values ​​of individuals in the population, wherein the fitness values ​​are determined by the root mean square error; S33, based on adaptive weight and step size, Levy flight and random perturbation mechanism, the position update of the discoverer, joiner and scout is performed; S34. Through multiple iterations of optimization, the optimal hyperparameter combination is finally output.

8. The method according to claim 7, characterized in that In step S33, random perturbation is performed using the following formula: ; in, represents the value of a variable after random perturbation, represents random numbers from a standard normal distribution, Represents a preset constant used to control the amplitude of the disturbance.

9. The method according to claim 1, characterized in that In step S3, during the model training process, the generalization ability of the model and the importance of the features are estimated based on the feature importance calculation method of the out-of-bag error estimation that incorporates geological constraints. The calculation formula of feature importance is as follows: ; ; in, Representation characteristics The feature importance of 、 Respectively represent the features The out-of-bag error estimated before and after random permutation, represents the number of decision trees, represents the weighted characteristic variance of geological attributes, Represents the geological sensitivity adjustment coefficient determined based on expert experience.

10. A system for predicting the content of major and trace elements in marine shale, characterized in that: The system includes a data acquisition and depth alignment module, a lithographic analysis and data integration module, a machine learning model training and optimization module, and a data prediction module, wherein: The data acquisition and depth alignment module is used to acquire drilling coring and logging curve data, and to perform depth alignment between the characteristic response segment on the logging curve and the coring segment based on lithologic characteristics; The petrographic analysis and data integration module is used to systematically collect rock samples of different lithofacies, conduct major and trace element content tests, and perform depth matching processing based on the characteristic response segments after depth alignment, so as to integrate the major and trace element content data with the logging data for depth consistency; The machine learning model training and optimization module is used to construct a data set based on the main and trace element content data and well logging data that remain consistent at depth, and to apply the random forest algorithm to build a machine learning model. The machine learning model is based on a multi-strategy improved sparrow search algorithm for hyperparameter optimization and feature selection; The data prediction module is used to input the well logging data of the depth to be predicted into the trained model to predict the content of major and trace elements.

Citation Information

Cited By

  • Lithofacies combination identification method, apparatus and device, and storage medium

    CN121051611A