TOC prediction method and system based on BP neural network

Through the TOC prediction method based on BP neural network, combined with particle swarm optimization algorithm and SHAP value analysis, the problems of insufficient data quality and interpretability in TOC prediction are solved, and high-precision and interpretable TOC prediction is achieved.

CN120670946AActive Publication Date: 2025-09-19CHENGDU UNIVERSITY OF TECHNOLOGY
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510759513.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-09-19
Estimated Expiration
2045-06-09

AI Technical Summary

Technical Problem

Existing TOC prediction technology has deficiencies in data quality, model generalization, multi-source fusion mechanism and technical interpretability, making it difficult to achieve a combination of high precision and interpretability.

Method used

A TOC prediction method based on BP neural network is adopted, combined with particle swarm optimization algorithm to optimize initial weights and SHAP value analysis to quantify feature importance, perform data preprocessing, feature optimization and model training, support structured and unstructured data processing, and evaluate model performance through root mean square error.

Benefits of technology

It improves the data quality and model generalization of TOC prediction, enhances the multi-source data fusion capability and interpretability, and is suitable for a variety of application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670946A_ABST
    Figure CN120670946A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information and communication technologies specially suitable for a supervision purpose, in particular to a BP neural network-based TOC prediction method and system, which optimizes the initial weight of a BP neural network through a particle swarm optimization algorithm, analyzes the importance of quantitative features in combination with an SHAP value, and realizes multi-source data fusion and high-precision prediction. According to the method, the data quality can be improved, the model generalization and interpretability are enhanced, and the method is suitable for various application scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information and communication technology specifically suitable for supervision purposes, and in particular to a TOC prediction method based on a BP neural network, and also to a TOC prediction system. Background Art

[0002] With the development of oil exploration technology, total organic carbon content (TOC), as an important indicator for evaluating source rock quality, has an increasing demand for its prediction.

[0003] Currently, TOC prediction relies primarily on methods such as laboratory geochemical analysis, well log modeling, seismic data interpretation, and machine learning. Laboratory analysis calculates TOC by measuring CO2 content in combustion samples, providing accurate results but being costly, time-consuming, and applicable to limited sample sizes. Well log prediction utilizes statistical relationships between various logging parameters and TOC, which is cost-effective and suitable for continuous well sections, but is significantly affected by data quality and formation conditions. Seismic data interpretation enables large-scale regional predictions, but has low resolution and limited ability to identify thin layers or localized changes. While machine learning methods have some potential, they are limited by the small amount of annotated data, insufficient feature extraction capabilities, and poor model interpretability. Traditional methods struggle to quantify the specific contributions of features in single-sample predictions, leading to reduced confidence in decision-making. Consequently, current TOC prediction still has room for improvement in terms of data quality, model generalization, multi-source fusion mechanisms, and technical interpretability.

[0004] In summary, how to provide a TOC prediction technology solution that takes into account both prediction accuracy and explainability is an urgent problem to be solved by those skilled in the art. Summary of the Invention

[0005] The purpose of the present invention is to provide a TOC prediction method and system based on BP neural network, and to solve the technical problems that the existing technology cannot provide a TOC prediction method in terms of data quality, model generalization, multi-source fusion mechanism and technical interpretability by introducing particle swarm optimization algorithm and SHAP value analysis method.

[0006] According to one aspect of the present invention, a TOC prediction method based on a BP neural network is provided. The method is executed by a processor and includes:

[0007] Receive raw data and determine whether it is structured data or unstructured data; if it is unstructured data, convert it into structured data; if it is structured data, directly enter the subsequent processing flow;

[0008] Perform preprocessing operations on raw data, including missing value processing, outlier detection, data normalization, and time series alignment;

[0009] Divide the preprocessed data into training set and test set;

[0010] Use particle swarm optimization algorithm to optimize the initial weights and thresholds of BP neural network;

[0011] TOC prediction based on optimized BP neural network;

[0012] The importance of features is quantified through SHAP value analysis, and features with smaller contributions are eliminated based on the analysis results.

[0013] In some embodiments, the missing value processing includes the following steps: for numerical data, filling with mean or median, or interpolation based on KNN algorithm; for categorical data, marking as Unknown category.

[0014] In some embodiments, the outlier detection uses the Z-Score method to identify outliers, and the calculation formula is:

[0015]

[0016] Where X represents the value of the current data point; μ represents the mean of the data set; σ represents the standard deviation of the data set; when |Z|≤2, it is considered normal data; when 2<|Z|≤3, the user is prompted to confirm whether to delete; when |Z|>3, the outlier is directly deleted.

[0017] In some embodiments, the data normalization scales the data to the interval [0, 1], and the calculation formula is:

[0018]

[0019] Where X represents the original data value; X min and X max Represents the minimum and maximum values ​​in the data set respectively; X norm Indicates the normalized value.

[0020] In some embodiments, the timing alignment uses a linear interpolation method to unify the timestamp frequency, and the calculation formula is:

[0021]

[0022] Among them, x0 and x1 represent the critical values ​​of the interval where the value to be estimated is located; y0 and y1 represent the corresponding known values; x represents the position of the point to be estimated; and y represents the estimation result.

[0023] In some embodiments, the particle swarm optimization algorithm updates the particle velocity and position using the following formulas:

[0024] v i (t+1)=w·vi (t)+c1·r1·(pbest i -x i (t))+c2·r2·(gbest-x i (t))

[0025] x i (t+1)=x i (t)+v i (t+1)

[0026] Among them, v i (t) and x i (t) represents the velocity and position of the i-th particle at the t-th iteration; w represents the inertia weight; c1 and c2 represent the learning factor; r1 and r2 represent random numbers; pbest i represents the optimal position of an individual; gbest represents the optimal position of a group.

[0027] In some embodiments, the activation function of the BP neural network is ReLU, and the mathematical expression is:

[0028] f(x)=max(0,x)

[0029] In some embodiments, the calculation formula for the SHAP value analysis is:

[0030]

[0031] Among them, F represents the set of all features; S represents the subset that does not contain feature i; M represents the total number of features; f(S) represents the predicted value of the model on the feature subset S.

[0032] In some embodiments, the removing of features with smaller contributions includes an automatic mode and a manual mode;

[0033] In the automated mode, features with a SHAP value less than 0.05 were automatically removed;

[0034] In manual mode, users select the features to be retained through a visual interface, and the system provides real-time feedback on the estimated model performance after feature removal.

[0035] According to another aspect of the present invention, a TOC prediction system based on a BP neural network is provided, comprising a processor, a first judgment module connected to the processor, a data preprocessing module, a feature optimization module, a model training module, and a prediction evaluation module; wherein:

[0036] The first judgment module is used to receive the original data and judge the data type to determine whether it needs to be converted into structured data;

[0037] The data preprocessing module is used to process missing values, detect outliers, normalize data, and perform time series alignment operations on the original data;

[0038] The feature optimization module is used to quantify the importance of features through SHAP value analysis and eliminate features with less contribution based on the analysis results;

[0039] The model training module is used to predict TOC based on the optimized BP neural network;

[0040] The prediction evaluation module is used to evaluate the model accuracy through the root mean square error and generate a comparison chart between the prediction results and the test set.

[0041] Compared with the existing technology, the present invention has the following advantages and beneficial effects: the present invention optimizes the initial weights of the BP neural network through the particle swarm optimization algorithm, combines the SHAP value analysis to quantify the importance of features, and realizes multi-source data fusion and high-precision prediction; at the same time, the present invention supports structured and unstructured data processing, provides missing value filling, outlier detection, normalization and time series alignment operations, and evaluates model performance through root mean square error, thereby improving data quality, enhancing model generalization and interpretability, and is suitable for a variety of application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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.

[0043] Figure 1 is a flow chart of the prediction method of the present invention;

[0044] Figure 2 It is a schematic diagram of the prediction system structure of the present invention;

[0045] Figure 3 It is a schematic diagram of the prediction method of the present invention;

[0046] Figure 4 This is a comparison of prediction results of a test set according to an embodiment of the present invention;

[0047] Figure 5 This is a comparison of prediction results of a training set according to an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The following is a combination of the embodiments of the present invention Figure 1-5 The technical solutions in the embodiments of the present invention are described clearly and completely. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0049] Example 1

[0050] Figure 1 This is a flow chart of a TOC prediction method based on a BP neural network provided in an embodiment of the present invention, which is executed by a processor. The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0051] The method specifically includes: receiving raw data, determining whether the raw data is structured data or unstructured data; if it is unstructured data, converting it into structured data; if it is structured data, directly entering the subsequent processing flow; performing preprocessing operations on the raw data, including missing value processing, outlier detection, data normalization and time series alignment; dividing the preprocessed data into a training set and a test set; optimizing the initial weights and thresholds of the BP neural network using a particle swarm optimization algorithm; performing TOC prediction based on the optimized BP neural network; quantifying the importance of features through SHAP value analysis, and eliminating features with smaller contributions based on the analysis results.

[0052] In some preferred embodiments, the data import phase also includes using ETL tools to parse the data format and automatically map fields to system preset templates to ensure data standardization. Supported data sources include local databases (SQL / NoSQL), cloud storage platforms, and third-party API interfaces. The data preprocessing phase also includes normalizing the image data to a fixed size of 224×224 pixels and extracting the RGB channel numerical matrix; performing structured conversion on the text data and defining fields and data types. The model training phase also includes adjusting the weights and thresholds of the BP neural network through the backpropagation algorithm and minimizing the error using the gradient descent method. The loss function uses the mean square error (MSE), and the formula is as follows:

[0053]

[0054] Where N represents the number of samples; y i represents the true value; Represents the predicted value.

[0055] The prediction evaluation stage also includes evaluating the model accuracy using the root mean square error (RMSE), as follows:

[0056]

[0057] After feature removal, the BP neural network model is retrained and a new prediction result and test set comparison chart is generated to intuitively show the changes in model performance.

[0058] In some possible implementations, missing value processing includes the following steps: for numerical data, filling with the mean or median, or interpolation based on the KNN algorithm; for categorical data, marking as the Unknown category.

[0059] In some possible implementations, outlier detection uses the Z-Score method to identify outliers, and the calculation formula is:

[0060]

[0061] Where X represents the value of the current data point; μ represents the mean of the data set; σ represents the standard deviation of the data set; when |Z|≤2, it is considered normal data; when 2<|Z|≤3, the user is prompted to confirm whether to delete; when |Z|>3, the outlier is directly deleted.

[0062] In some possible implementations, data normalization scales the data to the interval [0, 1], and the calculation formula is:

[0063]

[0064] Where X represents the original data value; X min and X max Represents the minimum and maximum values ​​in the data set respectively; X norm Indicates the normalized value.

[0065] In some possible implementations, timing alignment uses a linear interpolation method to unify the timestamp frequency, and the calculation formula is:

[0066]

[0067] Among them, x0 and x1 represent the critical values ​​of the interval where the value to be estimated is located; y0 and y1 represent the corresponding known values; x represents the position of the point to be estimated; and y represents the estimation result.

[0068] In some possible implementations, the particle swarm optimization algorithm updates the particle velocity and position using the following formulas:

[0069] v i (t+1)=w·v i(t)+c1·r1·(pbest i -x i (t))+c2·r2·(gbest-x i (t))

[0070] x i (t+1)=x i (t)+v i (t+1)

[0071] Among them, v i (t) and x i (t) represents the velocity and position of the i-th particle at the t-th iteration; w represents the inertia weight; c1 and c2 represent the learning factor; r1 and r2 represent random numbers; pbest i represents the optimal position of an individual; gbest represents the optimal position of a group.

[0072] In some possible implementations, the activation function of the BP neural network is ReLU, and the mathematical expression is:

[0073] f(x)=max(0,x)

[0074] In some possible implementations, the calculation formula for SHAP value analysis is:

[0075]

[0076] Among them, F represents the set of all features; S represents the subset that does not contain feature i; M represents the total number of features; f(S) represents the predicted value of the model on the feature subset S.

[0077] In some possible implementations, eliminating features with smaller contributions includes an automatic mode and a manual mode;

[0078] In the automated mode, features with a SHAP value less than 0.05 were automatically removed;

[0079] In manual mode, users select the features to be retained through a visual interface, and the system provides real-time feedback on the estimated model performance after feature removal.

[0080] Example 2

[0081] Based on the same inventive concept as the TOC prediction method based on BP neural network in the above embodiment 1, Figure 2As shown, the present invention also provides a TOC prediction system based on a BP neural network, comprising a processor, and also comprising a first judgment module connected to the processor data, a data preprocessing module, a feature optimization module, a model training module and a prediction evaluation module; wherein the first judgment module is used to receive original data and judge the data type, and decide whether it needs to be converted into structured data; the data preprocessing module is used to perform missing value processing, outlier detection, data normalization and time series alignment operations on the original data; the feature optimization module is used to quantify the importance of features through SHAP value analysis, and eliminate features with smaller contributions based on the analysis results; the model training module is used to perform TOC prediction based on the optimized BP neural network; the prediction evaluation module is used to evaluate the model accuracy through the root mean square error, and generate a comparison chart of the prediction results and the test set.

[0082] In actual applications, first, the first judgment module receives raw data from different sources and determines the data type. If the data is unstructured data, it is converted into structured data; if the data is structured data, it directly enters the subsequent process. The conversion process of unstructured data relies on the ETL tool to parse the data format and automatically map the fields to the system preset template to achieve data standardization. The data sources supported by this process include local databases (SQL / NoSQL), cloud storage platforms, and third-party API interfaces. For example, for image data, the RGB channel numerical matrix is ​​extracted after the size is fixed to 224×224 pixels; for text data, the fields and data types are defined for structured conversion. These operations are all completed by the first judgment module to ensure that the data input to the subsequent modules has a uniform format and quality.

[0083] The data preprocessing module is responsible for performing a series of preprocessing operations on the raw data, including missing value handling, outlier detection, data normalization, and time series alignment. During missing value handling, numerical data is filled with the mean or median, or interpolated using the KNN algorithm; categorical data is marked as "Unknown" or filled with the mode. Outlier detection uses the Z-Score method to identify outliers, calculated using the following formula:

[0084]

[0085] Where X represents the value of the current data point; μ represents the mean of the data set; and σ represents the standard deviation of the data set. When |Z|≤2, the data is considered normal. When 2<|Z|≤3, the user is prompted to confirm whether to delete the data. When |Z|>3, the outlier is directly deleted. Data normalization scales the data to the range [0,1]. The calculation formula is:

[0086]

[0087] Where X represents the original data value; Xmin and X max Represents the minimum and maximum values ​​in the data set respectively; X norm Represents the normalized value. For multi-source asynchronous data, the linear interpolation method is used to unify the timestamp frequency. The calculation formula is:

[0088]

[0089] Here, x0 and x1 represent the critical values ​​of the interval to be estimated; y0 and y1 represent the corresponding known values; x represents the location of the point to be estimated; and y represents the estimated result. All of the above preprocessing operations are performed by the data preprocessing module to ensure that the data quality meets the requirements of subsequent analysis.

[0090] The preprocessed data is divided into a training set and a test set with a default ratio of 8:2. The user can adjust the ratio according to needs. The data then enters the feature optimization module. This module uses SHAP value analysis to quantify the importance of features. The calculation formula for SHAP value analysis is:

[0091]

[0092] Where F represents the set of all features; S represents the subset excluding feature i; M represents the total number of features; and f(S) represents the model's predicted value on feature subset S. SHAP value analysis uses a visual interface to display the contribution of each feature to the model's prediction and provides options for feature removal in both automated and manual modes. In automated mode, features with a SHAP value less than 0.05 are automatically removed. In manual mode, users can select features to retain, and the system provides real-time feedback on the estimated model performance after feature removal. Feature Optimization Module 3 reduces computational burden and improves model efficiency by removing features with less significant contributions.

[0093] The optimized data enters the model training module, which performs TOC prediction based on the BP neural network. The structure of the BP neural network includes an input layer, a hidden layer, and an output layer. The number of nodes in the input layer corresponds to the number of features, the number of nodes in the hidden layer is determined by cross-validation, and the number of nodes in the output layer is 1. ReLU is used as the activation function to avoid the gradient vanishing problem, and its mathematical expression is f(x) = max(0, x). During the training process, the particle swarm optimization algorithm is used to optimize the initial weights and thresholds of the BP neural network. Each particle represents a potential solution and has two attributes: position and speed. The position represents the candidate solution, and the speed determines the search direction and step size. During the iteration process, the particle dynamically adjusts the speed according to the individual optimal position and the group optimal position. The update formula is:

[0094] v i (t+1)=w·v i (t)+c1·r1·(pbesti -x i (t))+c2·r2·(gbest-x i (t))

[0095] x i (t+1)=x i (t)+v i (t+1)

[0096] Among them, v i (t) and x i (t) represents the velocity and position of the i-th particle at the t-th iteration; w represents the inertia weight; c1 and c2 represent the learning factor; r1 and r2 represent random numbers; pbest i The optimal position of an individual is represented by gbest, while the optimal position of a group is represented by gbest. The weights and thresholds of the BP neural network are adjusted by the back propagation algorithm, and the error is minimized by the gradient descent method. The mean square error (MSE) is used as the loss function. The formula is:

[0097]

[0098] Where N represents the number of samples; y i represents the true value; Represents the predicted value.

[0099] Finally, the data enters the prediction evaluation module, which evaluates the model accuracy through the root mean square error (RMSE), the formula is:

[0100]

[0101] The prediction evaluation module generates a comparison chart of the prediction results and the test set, visually demonstrating changes in model performance. Furthermore, after feature removal, the BP neural network model is retrained and a new comparison chart of the prediction results and the test set is generated to further verify the improvement in model performance.

[0102] The connection and collaboration between these modules are as follows: The first judgment module receives raw data, determines the data type, and passes the standardized data to the data preprocessing module. After completing data cleaning and formatting, the data preprocessing module passes the processed data to the feature optimization module. The feature optimization module uses SHAP value analysis to eliminate features with less contribution and passes the optimized data to the model training module. The model training module completes TOC prediction based on the optimized BP neural network and passes the results to the prediction evaluation module. The prediction evaluation module evaluates model accuracy using RMSE and generates a comparison chart of the prediction results and the test set. Data is transferred between modules through standardized interfaces to ensure the scalability and flexibility of the system.

[0103] In order to better enable relevant personnel in this technical field to fully understand and implement the present invention, the specific implementation principle of the present invention is supplemented below with reference to a specific application scenario.

[0104] In an oil exploration project, technicians needed to predict the total organic carbon (TOC) content of source rocks in a specific area. The geological conditions in this area were complex, and data came from a variety of sources, including well logs, seismic data, and laboratory analysis results. This data was stored in local databases, cloud storage platforms, and third-party APIs. Some of this data was in unstructured form, such as images and text reports.

[0105] First, the first judgment module receives raw data from the various sources mentioned above and determines its type. Structured data, such as well logs and seismic data, enters the subsequent processing flow directly. Unstructured data, such as images and text reports, is parsed and converted into pre-defined structured templates using ETL tools. For example, image data is fixed to 224×224 pixels and the RGB channel matrix is ​​extracted, while text reports are structured by defining fields and data types. This process ensures that all input data is of uniform format and quality, laying the foundation for processing by subsequent modules.

[0106] The data preprocessing module then performs a series of operations on the standardized data. Taking well logging data as an example, due to missing resistivity values ​​at certain depth points, the data preprocessing module uses the KNN algorithm to interpolate the missing values ​​and the Z-Score method to detect outliers. Assuming the Z-score calculated for the resistivity value at a certain depth point is 3.5, based on the normal distribution assumption, this value is considered an outlier and is deleted. Furthermore, to eliminate the impact of different dimensions on model training, data normalization scales all features to the [0,1] range. For asynchronous data from multiple sources, such as those with inconsistent timestamps between well logging and seismic data, linear interpolation is used to unify the timestamp frequency, thereby achieving temporal alignment of the data.

[0107] The preprocessed data is divided into training and test sets with a default ratio of 8:2. Subsequently, the data enters the feature optimization module. In this module, SHAP value analysis is used to quantify the contribution of each feature to TOC prediction. For example, through preliminary analysis of the training set data, it was found that the SHAP value of some seismic attribute features was lower than 0.05, indicating that their contribution to model prediction was small. In automatic mode, these features are automatically eliminated; in manual mode, technicians use the visual interface to select the retained features and view the changing trend of model performance after feature elimination in real time. Ultimately, only features that contribute significantly to TOC prediction are retained, thereby reducing the computational burden and improving model efficiency.

[0108] The optimized data enters the model training module and performs TOC prediction based on the BP neural network. During the training process, the particle swarm optimization algorithm is used to optimize the initial weights and thresholds of the BP neural network. For example, the initial position and velocity of a particle are x i (0) and v i (0), in the iterative process, the particles are positioned according to their individual optimal position pbest i The swarm optimal position (gbest) dynamically adjusts speed and position. Through multiple iterations, particles gradually approach the global optimal solution, thereby determining the initial parameters of the BP neural network. Subsequently, the backpropagation algorithm adjusts the network's weights and thresholds, minimizing the mean squared error (MSE) using gradient descent. For example, in one training batch, the loss function value dropped from an initial 0.08 to 0.02, indicating that the model's fitting ability is gradually improving.

[0109] Finally, the data enters the prediction evaluation module to evaluate the model accuracy through the root mean square error (RMSE). Assuming that the test set contains 100 samples and the sum of squared errors between the true value and the predicted value is 20, the RMSE value is The prediction evaluation module generates a comparison chart of prediction results against the test set, visually demonstrating changes in model performance. Furthermore, after feature removal, the BP neural network model is retrained and a new comparison chart of prediction results against the test set is generated to verify the improved model performance. For example, after removing low-contribution features, the RMSE value dropped from 0.447 to 0.385, indicating a significant improvement in the model's prediction accuracy.

[0110] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention. Therefore, from all points of view, the embodiments should be regarded as illustrative and non-restrictive. The scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes that fall within the meaning and range of equivalents of the claims are included in the present invention. Any reference signs in the claims should not be construed as limiting the claim to which they relate.

[0111] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.

Claims

1. A TOC prediction method based on BP neural network, which is executed by a processor and is characterized in that: include: Receive original data and determine whether the original data is structured data or unstructured data; If it is unstructured data, convert it into structured data; If it is structured data, it will directly enter the subsequent processing flow; Perform preprocessing operations on raw data, including missing value processing, outlier detection, data normalization, and time series alignment; Divide the preprocessed data into training set and test set; Use particle swarm optimization algorithm to optimize the initial weights and thresholds of BP neural network; TOC prediction based on optimized BP neural network; The importance of features is quantified through SHAP value analysis, and features with smaller contributions are eliminated based on the analysis results.

2. The method according to claim 1, characterized in that The missing value processing includes the following steps: for numerical data, filling with mean or median, or interpolation based on KNN algorithm; for categorical data, marking as Unknown category.

3. The method according to claim 1, characterized in that The outlier detection uses the Z-Score method to identify outliers, and the calculation formula is: Where X represents the value of the current data point; μ represents the mean of the data set; σ represents the standard deviation of the data set; when |Z|≤2, it is considered normal data; when 2<|Z|≤3, the user is prompted to confirm whether to delete; when |Z|>3, the outlier is directly deleted.

4. The method according to claim 1, wherein The data normalization scales the data to the interval [0,1], and the calculation formula is: Where X represents the original data value; X min and X max Represents the minimum and maximum values ​​in the data set respectively; X norm Indicates the normalized value.

5. The method according to claim 1, wherein The timing alignment uses a linear interpolation method to unify the timestamp frequency, and the calculation formula is: Among them, x0 and x1 represent the critical values ​​of the interval where the value to be estimated is located; y0 and y1 represent the corresponding known values; x represents the position of the point to be estimated; and y represents the estimation result.

6. The method according to claim 1, characterized in that The particle swarm optimization algorithm updates the particle velocity and position using the following formulas: v i (t+1)=w·v i (t)+c1·r1·(pbest i -x i (t))+c2·r2·(gbest-x i (t)) x i (t+1)=x i (t)+v i (t+1) Among them, v i (t) and x i (t) represents the velocity and position of the i-th particle at the t-th iteration; w represents the inertia weight; c1 and c2 represent the learning factor; r1 and r2 represent random numbers; pbest i represents the optimal position of an individual; gbest represents the optimal position of a group.

7. The method according to claim 1, characterized in that The activation function of the BP neural network is ReLU, and the mathematical expression is: f(x)=max(0,x) 8. The method according to claim 1, characterized in that The calculation formula of the SHAP value analysis is: Among them, F represents the set of all features; S represents the subset that does not contain feature i; M represents the total number of features; f(S) represents the predicted value of the model on the feature subset S.

9. The method according to claim 1, characterized in that The features with smaller contribution are eliminated in the automatic mode and the manual mode; In the automated mode, features with a SHAP value less than 0.05 were automatically removed; In manual mode, users select the features to be retained through a visual interface, and the system provides real-time feedback on the estimated model performance after feature removal.

10. A TOC prediction system based on BP neural network, comprising a processor, characterized in that: It also includes a first judgment module, a data preprocessing module, a feature optimization module, a model training module, and a prediction and evaluation module connected to the processor data; wherein: The first judgment module is used to receive the original data and judge the data type to determine whether it needs to be converted into structured data; The data preprocessing module is used to process missing values, detect outliers, normalize data, and perform time series alignment operations on the original data; The feature optimization module is used to quantify the importance of features through SHAP value analysis and eliminate features with less contribution based on the analysis results; The model training module is used to predict TOC based on the optimized BP neural network; The prediction evaluation module is used to evaluate the model accuracy through the root mean square error and generate a comparison chart between the prediction results and the test set.

Citation Information

Patent Citations

  • Soil carbon sequestration driving force identification method and device based on interpretable model and medium

    CN117094123A

  • Method for predicting content of organic matters in shale oil reservoir affected by lithology based on artificial intelligence

    CN117558364A

  • Shale oil mobility and adsorbability prediction method and device based on machine learning

    CN119358721A

  • Ultra-high performance concrete compressive strength prediction method based on grey wolf optimization algorithm

    CN119918388A

  • Graph neural network (GNN)-based prediction system for total organic carbon (TOC) in shale

    US20230162052A1