A TOC prediction method and system based on BP neural network

By combining a BP neural network with particle swarm optimization and SHAP value analysis, the problems of insufficient data quality and model generalization in TOC prediction are solved, achieving high-precision and interpretable TOC prediction, which is suitable for multi-source data fusion and various application scenarios.

CN120670946BActive Publication Date: 2026-01-06CHENGDU UNIVERSITY OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing TOC prediction technologies have shortcomings in terms of data quality, model generalization, multi-source fusion mechanisms, and technical interpretability, making it difficult to achieve a combination of high accuracy and interpretability.

Method used

A TOC prediction method based on BP neural network is adopted, which combines the particle swarm optimization algorithm to optimize the initial weights and the SHAP value analysis to quantify the importance of features, so as to realize multi-source data fusion and high-precision prediction, support structured and unstructured data processing, and evaluate the model performance through root mean square error.

Benefits of technology

It improves the data quality and model generalization of TOC prediction, enhances the interpretability of the technology, and is suitable for a variety of application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670946B_ABST
    Figure CN120670946B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of information and communication technology specially applicable to supervision purposes, and particularly relates to a TOC prediction method and system based on a BP neural network, which optimizes initial weights of the BP neural network through a particle swarm optimization algorithm, combines SHAP value analysis to quantify feature importance, and realizes multi-source data fusion and high-precision prediction.The present application can improve data quality, enhance model generalization and explainability, and is applicable to various application scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information and communication technology, specifically for supervisory purposes, and particularly to a TOC prediction method based on a BP neural network, as well as a TOC prediction system. Background Technology

[0002] With the development of petroleum exploration technology, the demand for predicting total organic carbon (TOC) content, as an important indicator for evaluating the quality of source rocks, is increasing.

[0003] Currently, TOC prediction mainly relies on laboratory geochemical analysis, well logging modeling, seismic data interpretation, and machine learning. Laboratory analysis calculates TOC by measuring CO2 content in combustion samples, yielding accurate results, but it is costly, time-consuming, and applicable to a limited number of samples. Well logging prediction utilizes statistical relationships between various well logging parameters and TOC, making it economical, efficient, and suitable for continuous well sections, but it is significantly affected by data quality and formation conditions. Seismic data interpretation can achieve large-scale regional predictions, but its resolution is low, and its ability to identify thin layers or local variations is limited. While machine learning methods have some potential, they are limited by small-scale labeled data, have insufficient feature extraction capabilities, and poor model interpretability. Traditional methods struggle to quantify the specific contribution of features in single-sample predictions, leading to reduced decision confidence. Therefore, 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 balances prediction accuracy and interpretability is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

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

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

[0007] Receive raw data and determine whether it is structured or unstructured. If it is unstructured, convert it into structured data. If it is structured, proceed directly to the next processing step.

[0008] Preprocessing operations are performed on the raw data, including missing value handling, outlier detection, data normalization, and time series alignment.

[0009] The preprocessed data is divided into training and testing sets;

[0010] The initial weights and thresholds of a backpropagation neural network are optimized using the particle swarm optimization algorithm.

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

[0012] The importance of features is quantified by analyzing SHAP values, and features with smaller contributions are removed based on the analysis results.

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

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

[0015]

[0016] Where X represents the value of the current data point; This represents the mean of the dataset; Represents the standard deviation of the dataset; when When, it is considered normal data; when When prompted to confirm deletion; In such cases, delete the outlier value directly.

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

[0018]

[0019] Where X represents the original data value; X min and X max X represents the minimum and maximum values ​​in the dataset, respectively; norm This represents 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 as follows:

[0021]

[0022] Where 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 location of the point to be estimated; and y represents the estimation result.

[0023] In some embodiments, the formulas for updating particle velocity and position in the particle swarm optimization algorithm are as follows:

[0024]

[0025]

[0026] in, and These represent the velocity and position of the i-th particle in the t-th iteration, respectively. Indicates inertia weight; and Indicates the learning factor; and Represents a random number; Indicates the optimal position of an individual; This indicates the optimal position for the group.

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

[0028]

[0029] In some embodiments, the formula for calculating the SHAP value analysis is as follows:

[0030]

[0031] Where F represents the set of all features; S represents the subset that does not contain feature i; M represents the total number of features; and f(S) represents the model's prediction on the feature subset S.

[0032] In some embodiments, the removal of features that contribute less to the elimination process includes automated and manual modes;

[0033] In automated mode, features with a SHAP value less than 0.05 are 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 model's performance prediction 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, and further comprising a first judgment module, a data preprocessing module, a feature optimization module, a model training module, and a prediction evaluation module connected to the processor via data connection; wherein:

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

[0037] The data preprocessing module is used to perform missing value handling, outlier detection, data normalization, and time-series alignment operations on the raw data;

[0038] The feature optimization module is used to quantify feature importance through SHAP value analysis and to remove features with smaller contributions based on the analysis results;

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

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

[0041] Compared with existing technologies, this invention has the following advantages and beneficial effects: This invention optimizes the initial weights of the BP neural network through particle swarm optimization algorithm and combines SHAP value analysis to quantify feature importance, thereby achieving multi-source data fusion and high-precision prediction; at the same time, this invention supports structured and unstructured data processing, provides missing value imputation, 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 making it suitable for various application scenarios. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is a flowchart of the prediction method of the present invention;

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

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

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

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

[0048] The following will refer to the appendices in the embodiments of the present invention. Figure 1-5 The technical solutions in the embodiments of the present invention will be clearly and completely described together. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0049] Example 1

[0050] Figure 1 The flowchart illustrates a TOC prediction method based on a BP neural network, provided in this embodiment of the invention. This method is executed by a processor. The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), 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 and determining whether the raw data is structured or unstructured; if it is unstructured, converting it into structured data; if it is structured, proceeding directly to the subsequent processing flow.

[0052] Preprocessing operations are performed on the raw data, including missing value handling, outlier detection, data normalization, and time series alignment.

[0053] The preprocessed data is divided into training and testing sets; the initial weights and thresholds of the BP neural network are optimized using the particle swarm optimization algorithm; TOC prediction is performed based on the optimized BP neural network; the importance of features is quantified by SHAP value analysis, and features with small contributions are removed based on the analysis results.

[0054] In some preferred embodiments, the data import stage 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 stage also includes normalizing image data to a fixed size of 224×224 pixels and extracting the RGB channel numerical matrix; and performing structured transformation on text data, defining fields and data types. The model training stage also includes adjusting the weights and thresholds of the BP neural network using the backpropagation algorithm and minimizing the error using gradient descent. The mean squared error (MSE) is used as the loss function, as shown in the following formula:

[0055]

[0056] Where N represents the number of samples; y i Represents the actual value; This represents the predicted value.

[0057] The prediction and evaluation phase also includes assessing model accuracy using the root mean square error (RMSE), as shown in the following formula:

[0058]

[0059] After feature removal, the process also includes retraining the BP neural network model and generating a new prediction result comparison chart with the test set to visually demonstrate the changes in model performance.

[0060] In some possible implementations, missing value handling includes the following steps: for numerical data, imputation is performed using the mean or median, or imputation based on the KNN algorithm; for categorical data, it is labeled as the Unknown category.

[0061] In some possible implementations, outlier detection uses the Z-Score method to identify outliers, calculated as follows:

[0062]

[0063] Where X represents the value of the current data point; This represents the mean of the dataset; Represents the standard deviation of the dataset; when When, it is considered normal data; when When prompted to confirm deletion; In such cases, delete the outlier value directly.

[0064] In some possible implementations, data normalization scales the data to the [0, 1] interval, calculated as follows:

[0065]

[0066] Where X represents the original data value; X min and X max X represents the minimum and maximum values ​​in the dataset, respectively; norm This represents the normalized value.

[0067] In some possible implementations, timing alignment uses a linear interpolation method to unify the timestamp frequency, calculated using the following formula:

[0068]

[0069] Where 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 location of the point to be estimated; and y represents the estimation result.

[0070] In some possible implementations, the formulas for updating particle velocity and position in the particle swarm optimization algorithm are as follows:

[0071]

[0072]

[0073] in, and These represent the velocity and position of the i-th particle in the t-th iteration, respectively. Indicates inertia weight; and Indicates the learning factor; and Represents a random number; Indicates the optimal position of an individual; This indicates the optimal position for the group.

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

[0075]

[0076] In some possible implementations, the formula for calculating SHAP value analysis is as follows:

[0077]

[0078] Where F represents the set of all features; S represents the subset that does not contain feature i; M represents the total number of features; and f(S) represents the model's prediction on the feature subset S.

[0079] In some possible implementations, features that contribute less are eliminated, including in automated and manual modes;

[0080] In automated mode, features with a SHAP value less than 0.05 are automatically removed;

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

[0082] Example 2

[0083] Based on the same inventive concept as the TOC prediction method based on BP neural network in Embodiment 1 above, such as Figure 2As shown, this invention also provides a TOC prediction system based on a BP neural network, including a processor, and further including a first judgment module, a data preprocessing module, a feature optimization module, a model training module, and a prediction evaluation module connected to the processor via data. The first judgment module receives raw data and determines its data type, deciding whether it needs to be converted to structured data. The data preprocessing module performs missing value processing, outlier detection, data normalization, and time-series alignment operations on the raw data. The feature optimization module quantifies feature importance through SHAP value analysis and removes features with lower contributions based on the analysis results. The model training module performs TOC prediction based on the optimized BP neural network. The prediction evaluation module evaluates the model accuracy through root mean square error and generates a comparison chart of the prediction results and the test set.

[0084] In practical applications, the first judgment module first receives raw data from different sources and determines the data type. If the data is unstructured, it is converted into structured data; otherwise, it proceeds directly to the next step. The conversion of unstructured data relies on ETL tools to parse the data format and automatically map fields to system-preset templates to achieve data standardization. Supported data sources include local databases (SQL / NoSQL), cloud storage platforms, and third-party API interfaces. For example, for image data, the RGB channel value matrix is ​​extracted after fixing the size to 224×224 pixels; for text data, fields and data types are defined for structured conversion. These operations are all completed by the first judgment module, ensuring that the data input to subsequent modules has a uniform format and quality.

[0085] 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 imputed using the mean or median, or based on the KNN algorithm; categorical data is labeled as "Unknown" or imputed using the mode. Outlier detection identifies outliers using the Z-Score method, calculated as follows:

[0086]

[0087] Where X represents the value of the current data point; This represents the mean of the dataset; Represents the standard deviation of the dataset; when When, it is considered normal data; when When prompted to confirm deletion; When outliers are found, they are directly deleted. Data normalization scales the data to the [0, 1] interval, and the calculation formula is as follows:

[0088]

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

[0090]

[0091] Where x0 and x1 represent the critical values ​​of the interval containing the value 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 estimation result. All the above preprocessing operations are completed by the data preprocessing module to ensure that the data quality meets the requirements of subsequent analysis.

[0092] The preprocessed data is divided into training and testing sets, with a default ratio of 8:2, which users can adjust as needed. The data then enters the feature optimization module. This module uses SHAP value analysis to quantify feature importance; the formula for calculating the SHAP value is:

[0093]

[0094] 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 prediction on the feature subset S. SHAP value analysis visualizes 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 SHAP values ​​less than 0.05 are automatically removed; in manual mode, users can select the features to retain, and the system provides real-time feedback on the model's performance prediction after feature removal. Feature optimization module 3 reduces computational burden and improves model efficiency by removing features with lower contributions.

[0095] The optimized data enters the model training module, which performs TOC prediction based on a BP neural network. The BP neural network structure includes an input layer, hidden layers, 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 through cross-validation, and the output layer has one node. The ReLU activation function is chosen to avoid the vanishing gradient problem; its mathematical expression is: During training, the initial weights and thresholds of the backpropagation (BP) neural network are optimized using a particle swarm optimization (PSO) algorithm. Each particle represents a potential solution and has two attributes: position and velocity. Position indicates a candidate solution, while velocity determines the search direction and step size. During iteration, the particle dynamically adjusts its velocity based on its individual optimal position and the swarm's optimal position. The update formula is as follows:

[0096]

[0097]

[0098] in, and These represent the velocity and position of the i-th particle in the t-th iteration, respectively. Indicates inertia weight; and Indicates the learning factor; and Represents a random number; Indicates the optimal position of an individual; This represents the optimal position of the group. The weights and thresholds of the BP neural network are adjusted using the backpropagation algorithm, and the error is minimized using gradient descent. The mean squared error (MSE) is chosen as the loss function, and the formula is:

[0099]

[0100] Where N represents the number of samples; y i Represents the actual value; This represents the predicted value.

[0101] Finally, the data enters the prediction and evaluation module, which evaluates the model accuracy using the root mean square error (RMSE), as shown in the formula:

[0102]

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

[0104] The connections and collaboration processes between the modules are as follows: The first judgment module receives the raw data and determines its data type, then passes the standardized data to the data preprocessing module; the data preprocessing module cleans and unifies the data format, then passes the processed data to the feature optimization module; the feature optimization module uses SHAP value analysis to remove features with low contribution and passes the optimized data to the model training module; the model training module performs TOC prediction based on the optimized BP neural network and passes the results to the prediction evaluation module; the prediction evaluation module evaluates the model accuracy using RMSE and generates a comparison chart of the prediction results and the test set. Data is passed between the modules through standardized interfaces to ensure the system's scalability and flexibility.

[0105] To enable those skilled in the art to fully understand and implement this invention, the specific implementation principle of this invention will be further explained below in conjunction with a specific application scenario.

[0106] In a certain oil exploration project, technicians needed to predict the total organic carbon (TOC) content of source rocks in a specific area. The area had complex geological conditions and diverse data sources, including well logging curves, seismic data, and laboratory analysis results. This data was stored in local databases, cloud storage platforms, and third-party API interfaces, and some data was in unstructured formats, such as images and text reports.

[0107] First, the initial judgment module receives raw data from the aforementioned sources and determines its type. Structured data, such as well logging curves and seismic data, proceeds directly to subsequent processing. Unstructured data, such as images and text reports, is parsed using ETL tools and converted into a system-preset structured template. For example, image data is fixed at 224×224 pixels before the RGB channel numerical matrix is ​​extracted, while text reports undergo structured conversion by defining fields and data types. This process ensures that all input data has a consistent format and quality, laying the foundation for subsequent module processing.

[0108] Subsequently, the data preprocessing module 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 impute missing values ​​and simultaneously utilizes the Z-Score method to detect outliers. Assuming the Z-value calculated for the resistivity at a certain depth point is 3.5, according to the normal distribution assumption, this value is considered an outlier and is removed. Furthermore, to eliminate the influence of different units on model training, data normalization scales all features to the [0, 1] interval. For multi-source asynchronous data, such as the inconsistency between the timestamps of well logging curves and seismic data, linear interpolation methods are used to unify the timestamp frequency, thereby achieving temporal alignment of the data.

[0109] The preprocessed data is divided into training and test sets, with a default ratio of 8:2. The data then 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, preliminary analysis of the training set data revealed that some seismic attribute features had SHAP values ​​below 0.05, indicating a small contribution to model prediction. In automated mode, these features are automatically removed; in manual mode, technicians use a visual interface to select the features to retain and monitor the model performance trends after feature removal in real time. Ultimately, only features that significantly contribute to TOC prediction are retained, thereby reducing computational burden and improving model efficiency.

[0110] The optimized data is fed into the model training module for TOC prediction based on a backpropagation (BP) neural network. During training, a particle swarm optimization (PSO) algorithm is used to optimize the initial weights and thresholds of the BP neural network. Taking a specific particle as an example, its initial position and velocity are as follows: and During the iteration process, the particle is determined according to its optimal position. The swarm optimization (gbest) dynamically adjusts the velocity and position. Through multiple iterations, particles gradually approach the global optimum, thus determining the initial parameters of the BP neural network. Subsequently, the backpropagation algorithm adjusts the network weights and thresholds, using gradient descent to minimize the mean squared error (MSE). For example, in a certain training batch, the loss function value decreased from the initial 0.08 to 0.02, indicating that the model's fitting ability gradually improved.

[0111] Finally, the data enters the prediction evaluation module, where the model accuracy is assessed using the root mean square error (RMSE). Assuming the test set contains 100 samples and the sum of squared errors between the true and predicted values ​​is 20, then the RMSE value is... The prediction evaluation module generates a comparison chart of the prediction results and the test set, visually demonstrating the 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 verify the improved model performance. For example, after removing low-contribution features, the RMSE value decreased from 0.447 to 0.385, indicating a significant improvement in the model's prediction accuracy.

[0112] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the scope of the invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0113] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A TOC prediction method based on BP neural network, the method is executed by a processor, characterized in that, The method comprises the following steps: Receiving original data, and determining whether the original data is structured data or unstructured data; If the original data is unstructured data, converting the original data into structured data; If the original data is structured data, directly entering a subsequent processing flow; Performing a preprocessing operation on the original 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 initial weights and thresholds of a BP neural network by using a particle swarm optimization algorithm; Performing TOC prediction based on the optimized BP neural network; Quantifying feature importance by SHAP value analysis, and removing features with small contribution according to the analysis result; The time series alignment adopts a linear interpolation method to unify the timestamp frequency, and the calculation formula is: , Wherein, x0 and x1 represent critical values of an interval in which a to-be-estimated value is located; y0 and y1 represent corresponding known values; x represents the position of a to-be-estimated point; and y represents an estimation result. The calculation formula of the SHAP value analysis is: , Wherein, F represents a set of all features; S represents a subset not containing feature i; M represents the total number of features; and f(S) represents a prediction value of a model on the feature subset S. The removal of features with small contribution includes an automatic mode and a manual mode; In the automatic mode, features with a SHAP value less than 0.05 are automatically removed; In the manual mode, a user selects features to be retained through a visual interface, and the system feeds back a model performance estimation value after feature removal in real time.

2. The method of claim 1, wherein, The missing value processing includes the following steps: for numerical data, mean or median filling or KNN algorithm interpolation is adopted; and for classification data, an Unknown category is marked.

3. The method of claim 1, wherein, The outlier detection adopts a 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 the data is considered normal; when the user is prompted to confirm whether to delete; when the outlier is deleted directly.

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

5. The method of claim 1, wherein, The formulas for updating particle speed and position of the particle swarm optimization algorithm are: , , wherein, and vi(t) and xi(t) represent the velocity and position of the i-th particle at the t-th iteration, respectively; wi(t) represents the inertia weight; and ei(t) represents the learning factor; and ri(t) represents the random number; xi(t) represents the individual optimal position; xi(t) represents the group optimal position.

6. The method of claim 1, wherein, The activation function of the BP neural network selects ReLU, and the mathematical expression is: 。 7.A TOC prediction system based on BP neural network, comprising a processor, characterized in that, Further comprising a first judgment module, a data preprocessing module, a feature optimization module, a model training module and a prediction evaluation module connected with the processor; wherein: The first judgment module is used for receiving original data and determining the data type, and deciding whether the original data needs to be converted into structured data; The data preprocessing module is used for performing missing value processing, outlier detection, data normalization and time series alignment operations on the original data; The feature optimization module is used for quantifying feature importance by SHAP value analysis, and removing features with small contribution according to the analysis result; The model training module is used for performing TOC prediction based on the optimized BP neural network; The prediction evaluation module is used for evaluating model accuracy by root mean square error, and generating a comparison chart of a prediction result and a test set; The time series alignment adopts a linear interpolation method to unify the timestamp frequency, and the calculation formula is: , Wherein, x0 and x1 represent critical values of an interval in which a to-be-estimated value is located; y0 and y1 represent corresponding known values; x represents the position of a to-be-estimated point; and y represents an estimation result. The calculation formula of the SHAP value analysis is: , Wherein, F represents a set of all features; S represents a subset not containing feature i; M represents the total number of features; f (S) represents the predicted value of the model on the feature subset S; The removing of the features with small contribution includes an automatic mode and a manual mode; In the automatic mode, the features with SHAP values less than 0.05 are automatically removed; In the manual mode, the user checks the features to be retained through the visual interface, and the system real-time feedbacks the model performance estimation value after the feature removal.

Citation Information

Patent Citations

  • 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