CO2 injection capacity prediction method for optimizing BP neural network based on dung beetle algorithm

By optimizing the BP neural network using the dung beetle algorithm, the problems of long computation time and inaccurate prediction in CO2 injection capacity prediction are solved, and fast and accurate CO2 injection capacity prediction is achieved.

CN121834336APending Publication Date: 2026-04-10HUADIAN WATER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511961513.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies for predicting CO2 injection capacity are computationally time-consuming and consider only a single factor. Backpropagation neural networks are prone to getting trapped in local optima and overfitting, resulting in inaccurate predictions.

Method used

The dung beetle algorithm is used to optimize the BP neural network. By optimizing the weights through optimal Latin hypercube sampling, data normalization, and the dung beetle algorithm, a nonlinear regression model is constructed to predict CO2 injection capacity.

Benefits of technology

It improves the accuracy and speed of CO2 injection capacity prediction, avoids local optima, and establishes a prediction system under complex multivariate conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121834336A_ABST
    Figure CN121834336A_ABST
Patent Text Reader

Abstract

A CO2 injection capability prediction method for optimizing a BP neural network based on a dung beetle algorithm comprises the steps that S1, data collection and preprocessing are carried out to obtain an optimal sampling point set, and the optimal sampling point set comprises a verification set and a training set; carrying out data collection by adopting an optimal Latin hypercube sampling strategy; s2, constructing a BP neural network model; s3, inputting the training set into the BP neural network model, and randomizing a weight value and a threshold value in the BP neural network model to realize initialization of the weight value and the threshold value of the BP neural network model; s4, optimizing the BP neural network model by adopting a dung beetle algorithm; s5, further training the optimized BP neural network model; and S6, evaluating the training effect of the BP neural network model and determining whether to output or not. The method has the advantage of high prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CO2 geological storage technology, and in particular to a method for predicting CO2 injection capacity based on a dung beetle algorithm-optimized BP neural network. Background Technology

[0002] In the petrochemical industry, carbon dioxide capture, utilization, and storage (CCUS) is considered one of the safest and most effective ways to achieve negative carbon emissions. CCUS refers to the industrial process of separating CO2 from industrial emission sources and then either utilizing it directly or storing it geologically to achieve CO2 emission reduction.

[0003] In global commercial CCUS projects, directly injecting CO2 into saline aquifers for permanent sequestration is considered one of the most promising methods. Currently, industrial CO2 injection methods rely on abandoned oil and gas wells or newly constructed injection wells to inject liquid or supercritical CO2 into the target formation through the wellbore. CO2 injection capacity is an important reference for implementing saline aquifer carbon sequestration projects and a key parameter affecting injection scheme design and equipment compatibility.

[0004] Currently, most assessments of CO2 injection capacity at the mine scale rely on traditional numerical simulation methods, which are time-consuming and involve relatively simple influencing factors. There is no established prediction system for CO2 injection capacity under complex multivariate conditions.

[0005] Back propagation (BP) neural networks are multi-layer feedforward networks trained by backpropagation of errors. They have strong nonlinear mapping capabilities, and the number of intermediate layers and neurons in each layer can be adjusted arbitrarily according to the situation. They have advantages such as simple structure, strong operability, and fast convergence speed, and are widely used in nonlinear modeling, function approximation, pattern recognition and other fields.

[0006] To more accurately and quickly predict the injection capacity of CO2 sequestration in saline aquifers, this invention first collects operational data from the Sleipner CO2 sequestration project in Norway; secondly, a prediction technique based on a backpropagation (BP) neural network is developed, optimizing the activation function, the number of hidden layer neurons, and the learning rate to construct a nonlinear regression model that can replace traditional numerical simulation; finally, based on the geological properties and operational parameters of the target sequestration block, rapid and accurate prediction of CO2 injection capacity is achieved.

[0007] However, BP neural networks are prone to getting stuck in local optima and overfitting, which can affect the prediction results. Summary of the Invention

[0008] The purpose of this invention is to provide a prediction method for CO2 injection capability based on the dung beetle algorithm and optimized BP neural network, which has the advantage of high prediction accuracy.

[0009] To achieve the above objectives, this invention provides a prediction method for CO2 injection capability based on the dung beetle algorithm to optimize a BP neural network. The method includes: Step S1, data collection and preprocessing to obtain an optimal sampling point set, which includes a validation set and a training set; data collection is performed using an optimal Latin hypercube sampling strategy; Step S2, constructing a BP neural network model; Step S3, inputting the training set into the BP neural network model, randomly assigning weights and thresholds to the BP neural network model to initialize the weights and thresholds; Step S4, optimizing the BP neural network model using the dung beetle algorithm; Step S5, further training the optimized BP neural network model; passing the globally optimal weights and thresholds optimized by the dung beetle algorithm to the BP neural network, transmitting data from the input layer to the output layer, calculating the output, calculating the error between the output value and the actual value, and using the chain rule to propagate the error back from the output layer to the input layer, updating the weights and thresholds to reduce the error; Step S6, evaluating the training effect of the BP neural network model and deciding whether to output.

[0010] Preferably, step S1 includes: step S11, data collection and processing to obtain an optimal sampling point set, the optimal sampling point set including a validation set and a training set; step S12, determining the value range of the sample data according to the probability distribution; generating an initial sampling point set according to the probability distribution within the value range; adjusting the spatial position of the sampling points using an iterative optimization algorithm; obtaining a set of optimal sampling points with uniform spatial distribution and low cross-correlation; step S13, processing the optimal sampling point set using a linear normalization method, the transformation function being:

[0011] ;

[0012] Where x′ is the normalization parameter; x is the actual value; max(x) and min(x) are the maximum and minimum values ​​of variable x, respectively.

[0013] Preferably, in step S2, the BP neural network model includes: an input layer, a hidden layer, and an output layer, with nodes in the previous and next layers connected by corresponding weights; based on the formula:

[0014] ;

[0015] Where q is the flow velocity in the wellbore, m 3 / d; K is the reservoir permeability, 10 -3 μm 2h is the reservoir thickness, in meters; Δp is the pressure difference between the reservoir and the wellbore, in MPa; μ is the viscosity of the injected phase, in mPa·s; r e The equivalent discharge radius is m; r w The wellbore radius is m; the input layer includes reservoir permeability, thickness, pressure difference between the reservoir and the wellbore, viscosity of the injected phase, equivalent discharge radius, and wellbore radius, with 6 input layers; the number of hidden layers is 12; the output layer is the predicted flow velocity in the wellbore, with 1 output layer.

[0016] Preferably, step S2 further includes model parameter design: the learning accuracy of the preset BP neural network is 0.001, the maximum number of learning iterations is 500, the momentum factor is 0.95, the activation function of the hidden layer is a hyperbolic tangent sigmoid function, and the training function uses the Levenberg-Marquardt algorithm.

[0017] Preferably, step S4 includes: optimizing the BP neural network model using the dung beetle algorithm, and evaluating the individual fitness using the mean squared error E as the fitness function;

[0018] ;

[0019] Where N is the number of samples, y i d y is the ideal output value of the i-th sample. i This is the actual output value of the i-th sample; E is related to the flow velocity q in the wellbore, and a smaller value indicates a better solution. i d For the predictions of q, y on the training set i This represents the actual flow velocity value within the wellbore.

[0020] Preferably, step S4 further includes: treating the flow velocity q in the well as an individual in the dung beetle swarm, forming a solution space; evaluating the fitness of each individual based on the performance of the BP neural network on the training set; simulating and updating the position of the individual through four behaviors such as dung beetle rolling a ball, reproducing, foraging, and stealing, and repeating the fitness evaluation and position update until the stopping condition is met, obtaining the corresponding weights and thresholds when the fitness is better to optimize the BP neural network; wherein, the stopping condition is reaching the preset maximum number of iterations or the fitness value no longer changing.

[0021] Preferably, the dung beetle optimization algorithm in step S4 includes:

[0022] In obstacle-free mode, when the dung beetle has no obstacles to move forward, it uses polarized sunlight or moonlight as navigation to enable it to roll in a straight line and carry its cargo; the position update formula is as follows:

[0023] ;

[0024] Where xi(t) represents the position information of the i-th dung beetle in the t-th iteration; t is the iteration number; a is a natural coefficient, assigned a value of -1 or 1, where 1 indicates no deviation in direction and -1 indicates deviation from the original direction; k∈(0, 0.2] represents the deflection coefficient; b is a natural coefficient between (0, 1); Δx is used to simulate the change in light intensity; X W This is the worst position in the current population;

[0025] In obstacle mode, when the dung beetle encounters an obstacle, it typically obtains a new route by dancing, using a tangent function to simulate the new rolling direction with a deflection angle of [0, π]. The position update formula in this case is:

[0026] ;

[0027] Where θ is the deflection angle, and the dung beetle's position will not be updated when θ = 0, π / 2 or π;

[0028] Dung beetles reproduce by rolling their dung balls to safe environments suitable for egg-laying. Therefore, a boundary selection strategy is proposed to simulate the egg-laying area of ​​dung beetles. The specific calculation formula is as follows:

[0029] ;

[0030] Among them, X * Indicates the current local optimum position; and Let R and T represent the lower and upper bounds of the spawning region, respectively; where R = 1 - t / T, and T is the maximum number of iterations; the boundary of the spawning region is dynamically changing and determined by R. The formula for updating the spawning location is as follows:

[0031] ;

[0032] Among them, B i (t) represents the position of the i-th brood ball in the t-th iteration; b1 and b2 represent two independent random vectors of size 1×D, where D represents the dimension of the optimization problem;

[0033] Dung beetles forage for food. Some mature dung beetles will emerge from the ground to forage. The optimal foraging area boundary for dung beetles is defined as follows:

[0034] ;

[0035] Among them, X b For the best position, and These are its lower and upper bounds, respectively; the dung beetle's position has been updated as follows:

[0036] ;

[0037] Where, x i (t) represents the position information of the i-th dung beetle in the t-th iteration, C1 represents a random number that follows a normal distribution, and C2 represents a random vector belonging to (0, 1);

[0038] Dung beetle theft: Within a colony, some dung beetles will steal dung balls from others. The locations of these thieving dung beetles are updated as follows:

[0039] ;

[0040] Where g is a 1×D random vector following a normal distribution; x i (t) represents the information of the i-th thief at the t-th iteration.

[0041] Preferably, the evaluation in step S6 includes: evaluating the flow velocity in the wellbore using indicators such as R. 2 Three types of errors: RMSE, MAPE, and R. 2 The calculation formula is as follows:

[0042] ;

[0043] in, The predicted flow velocity in the wellbore; This represents the measured flow velocity in the wellbore. is the measured average flow velocity in the wellbore, and n is the number of training data points;

[0044] The formula for calculating RMSE is as follows:

[0045] ;

[0046] The formula for calculating MAPE is as follows:

[0047] .

[0048] Preferably, in step S6, R is used. 2 The prediction termination conditions are set as follows: a value greater than 0.8, an RMSE less than 5, and a MAPE less than 10, or reaching the set maximum number of iterations. When the evaluation index of the flow velocity prediction value in the wellbore obtained by the BP neural network model and the actual flow velocity value in the wellbore of the test set meets the above conditions, the model verification is considered to be completed and output can be performed; otherwise, the network weights and thresholds are adjusted and training continues until the prediction termination conditions are met.

[0049] In summary, compared with the prior art, the CO2 injection capability prediction method based on the dung beetle algorithm to optimize the BP neural network provided by this invention has the following beneficial effects:

[0050] First, this invention provides a prediction method for CO2 injection capability based on the dung beetle algorithm to optimize the BP neural network. By introducing the dung beetle algorithm, it is possible to avoid getting trapped in local optima. The initial weights and thresholds of the BP neural network algorithm are used as the optimization targets of the dung beetle algorithm, and the mean square error is used as the fitness value of the dung beetle algorithm. Through multiple iterations, the optimization results are assigned to the BP neural network, thereby enhancing the optimization capability of the BP neural network algorithm and improving the accuracy of CO2 sequestration injection capability prediction.

[0051] Second, this invention considers different geological and operational parameters in numerical simulations, using Latin hypercube sampling to form 200 sets of numerical simulation schemes and establishing a machine learning sample library. Then, using techniques such as data normalization, a surrogate model for predicting CO2 injection capacity is formed. Compared with traditional numerical simulation techniques, this technique has the advantages of shorter computation time and higher accuracy. Attached Figure Description

[0052] Figure 1 This is a flowchart of the CO2 injection capability prediction method based on the dung beetle algorithm to optimize the BP neural network proposed in this invention. Detailed Implementation

[0053] The following will be combined with the appendix in the embodiments of the present invention. Figure 1 The technical solutions, structural features, objectives and effects achieved in the embodiments of the present invention will be described in detail.

[0054] It should be noted that the accompanying drawings are in a very simplified form and use non-precise proportions. They are only used to facilitate and clarify the purpose of illustrating the embodiments of the present invention, and are not intended to limit the implementation conditions of the present invention. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportional relationship, or adjustments to the size should still fall within the scope of the technical content disclosed in the present invention, provided that they do not affect the effects and objectives that the present invention can produce.

[0055] It should be noted that, in this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only the expressly listed elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.

[0056] like Figure 1 As shown, this invention provides a method for predicting CO2 injection capability based on a dung beetle algorithm-optimized BP neural network, comprising the following steps:

[0057] Step S1: Data collection and preprocessing to obtain the optimal set of sampling points, the optimal set of sampling points including the validation set and the training set;

[0058] The data collection part uses existing technology, which will be briefly explained below.

[0059] The Norwegian Sleipner project was selected for training. As the world's first large-scale offshore carbon capture and storage demonstration project, and also the longest-running and largest-capacity commercial CCS project to date, the Sleipner project offers irreplaceable reference value and inspiration for the planning and implementation of similar projects globally, thanks to its geological adaptability, injection monitoring technology, and risk management experience. One year of operational data from the Sleipner project was selected, including reservoir permeability, thickness, pressure differential between the reservoir and wellbore, viscosity of the injected phase, equivalent discharge radius, wellbore radius, and flow velocity within the wellbore.

[0060] Due to the large number of parameters, the optimal Latin hypercube sampling strategy is used to make the initial solution set more uniformly distributed. Optimal Latin hypercube sampling is a sampling method that ensures a uniform distribution of samples in the sample space. It further improves sampling efficiency and accuracy by optimizing the position of sampling points in space. Using the optimal Latin hypercube strategy, the distribution of these points in space becomes very uniform, and this uniform distribution ensures that each region has an appropriate number of points.

[0061] Step S2: Construct the BP neural network model;

[0062] Step S3: Input the training set into the BP neural network model, and randomly assign weights and thresholds to the BP neural network model to initialize the weights and thresholds of the BP neural network model.

[0063] Step S4: Optimize the BP neural network model using the dung beetle algorithm;

[0064] Step S5: The optimized BP neural network model is further trained;

[0065] The globally optimal weights and thresholds, optimized by the dung beetle algorithm, are passed to the backpropagation neural network. The data is then passed from the input layer to the output layer, where the output is calculated. The error between the output value and the actual value is calculated, and the error is propagated back from the output layer to the input layer using the chain rule to update the weights and thresholds and reduce the error.

[0066] Step S6: Evaluate the training effect of the BP neural network model and decide whether to output it.

[0067] Specifically, step S1 includes:

[0068] Step S11: Data collection and processing to obtain the optimal set of sampling points, which includes a validation set and a training set;

[0069] For example, 200 sets of data are obtained through the aforementioned technology, which serve as the sample space for the next step of training and prediction of the BP neural network. These 200 sets of data include reservoir permeability, thickness, pressure difference between the reservoir and the wellbore, viscosity of the injected phase, equivalent discharge radius and wellbore radius, and flow velocity in the wellbore.

[0070] Step S12: Determine the range of values ​​for the sample data based on the probability distribution; generate an initial set of sampling points within the range according to the probability distribution; use an iterative optimization algorithm to adjust the spatial position of the sampling points; and obtain a set of optimal sampling points with uniform spatial distribution and low cross-correlation.

[0071] Step S13: The optimal sampling point set is processed using a linear normalization method, and the transformation function is:

[0072] ;

[0073] Where x′ is the normalization parameter; x is the actual value; max(x) and min(x) are the maximum and minimum values ​​of the variable x, respectively. Because the input parameters have different dimensions and a large range, the learning effect of the neural network model is severely affected. Therefore, a linear normalization method is used to process the optimal set of sampling points.

[0074] In a specific embodiment, the optimal set of sampling points is divided into 10 groups, one group is taken as the validation set, and the rest are taken as the training set.

[0075] Specifically, in step S2, the BP neural network model includes:

[0076] The input layer, hidden layer, and output layer are connected to each other by corresponding weights.

[0077] According to the formula:

[0078] ;

[0079] Where q is the flow velocity in the wellbore, m 3 / d; K is the reservoir permeability, 10 -3 μm 2 h is the reservoir thickness, in meters; Δp is the pressure difference between the reservoir and the wellbore, in MPa; μ is the viscosity of the injected phase, in mPa·s; r e The equivalent discharge radius is m; r w Let be the radius of the wellbore, in meters (m).

[0080] The parameters required for this invention are determined based on the factors affecting injection capacity. The input neurons of this network are six dimensionless parameters affecting CO2 injection capacity: reservoir permeability, thickness, pressure difference between the reservoir and the wellbore, viscosity of the injected phase, equivalent drainage radius, and wellbore radius. The network output is q, where q is the flow velocity in the wellbore, and m is the velocity in the wellbore. 3 / d, therefore there is 1 neuron in the output layer.

[0081] Therefore, the input layer includes reservoir permeability, thickness, pressure difference between the reservoir and the wellbore, viscosity of the injected phase, equivalent discharge radius, and wellbore radius, i.e., the number of input layers is 6; the number of hidden layers is 12; and the output layer is the predicted flow velocity in the wellbore, i.e., the number of output layers is 1.

[0082] Step S2 also includes model parameter design: the learning accuracy of the preset BP neural network is 0.001, the maximum number of learning iterations is 500, the momentum factor is 0.95, the activation function of the hidden layer is a hyperbolic tangent sigmoid function, and the training function uses the Levenberg-Marquardt algorithm.

[0083] Specifically, step S4 includes: optimizing the BP neural network model using the dung beetle algorithm, and evaluating individual fitness using the mean squared error E as the fitness function;

[0084] ;

[0085] Where N is the number of samples, y i d y is the ideal output value of the i-th sample. i It is the actual output value of the i-th sample;

[0086] The individual fitness E in this invention is related to the flow velocity q in the wellbore; a smaller value indicates a better solution. i d Let q be the predicted value from the training set, and yi be the actual flow velocity value in the wellbore.

[0087] Specifically, the flow velocity q in the well shaft is considered as an individual in the dung beetle swarm, forming a solution space. The fitness of each individual is evaluated based on the performance of the BP neural network on the training set. The position of the individual is updated by simulating four behaviors: dung beetle rolling a ball, reproducing, foraging, and stealing. The fitness evaluation and position update are repeated until a stopping condition is met. The corresponding weights and thresholds for the optimal fitness are then used to optimize the BP neural network. The stopping condition is reaching a preset maximum number of iterations or the fitness value no longer changing.

[0088] The dung beetle optimization algorithm is an intelligent optimization algorithm inspired by the dung beetle's ball-rolling, dancing, foraging, stealing, and reproductive behaviors. Different subpopulations of dung beetles execute different search methods. The dung beetle optimization algorithm consists of four basic steps: ball-rolling, reproduction, foraging, and stealing.

[0089] (1) Obstacle-free mode. When the dung beetle has no obstacles to move forward, it uses polarized sunlight or moonlight as navigation to roll in a straight line and carry its load. The position update formula is as follows:

[0090] ;

[0091] Where, x i (t) represents the position information of the i-th dung beetle at the t-th iteration; t is the iteration number; a is a natural coefficient, assigned a value of -1 or 1, where 1 indicates no deviation in direction and -1 indicates deviation from the original direction; k∈(0,0.2] represents the deflection coefficient; b is a natural coefficient between (0,1); Δx is used to simulate the change in light intensity; X W This is the worst position in the current population.

[0092] (2) Obstacle Mode. When a dung beetle encounters an obstacle, it usually obtains a new route by dancing, using the tangent function to simulate a new rolling direction with a deflection angle of [0, π]. The position update formula in this case is:

[0093] ;

[0094] Where θ is the deflection angle, and the dung beetle's position will not be updated when θ = 0, π / 2 or π.

[0095] (3) Dung beetle reproduction. Dung beetles roll dung balls to safe environments suitable for egg laying. Therefore, a boundary selection strategy is proposed to simulate the egg-laying area of ​​dung beetles. The specific calculation formula is as follows:

[0096] ;

[0097] Among them, X * Indicates the current local optimum position; and Let R and T represent the lower and upper bounds of the spawning region, respectively. Where R = 1 - t / T, and T is the maximum number of iterations. The boundary of the spawning region is dynamically changing and determined by R. The formula for updating the spawning location is as follows:

[0098] ;

[0099] Among them, B i (t) represents the position of the i-th brood ball in the t-th iteration; b1 and b2 represent two independent random vectors of size 1×D, where D represents the dimension of the optimization problem.

[0100] (4) Dung beetle foraging. Some mature dung beetles will emerge from the ground to forage. The optimal foraging area boundary for dung beetles is defined as follows:

[0101] ;

[0102] Among them, X b For the best position, and These are its lower and upper bounds, respectively. The dung beetle's location has been updated as follows:

[0103] ;

[0104] Where, x i (t) represents the position information of the i-th dung beetle in the t-th iteration; C1 represents a random number that follows a normal distribution; C2 represents a random vector belonging to (0, 1).

[0105] (5) Dung beetle theft. Within the population, some dung beetles will steal dung balls from other dung beetles. The locations of the thieving dung beetles are updated as follows:

[0106] ;

[0107] Where g is a 1×D random vector following a normal distribution; x i (t) represents the information of the i-th thief at the t-th iteration.

[0108] Specifically, the evaluation in step S6 includes:

[0109] Evaluation indicators for flow velocity in the wellbore include R. 2 There are three types of errors: coefficient of determination (R²), RMSE (root mean square error), and MAPE (mean absolute percentage error). R² represents the proportion of variance of the target variable explained by the model, typically ranging from [0,1]. A value closer to 1 indicates a better model fit; a value closer to 0 indicates a poorer model fit. RMSE is the square root of the mean square error (MSE), with units consistent with the original data, making it easy to interpret. It penalizes larger errors more strongly because the error is amplified by squaring. A smaller RMSE indicates higher model prediction accuracy. MAPE, expressed as a percentage, measures the relative magnitude of prediction error and is suitable for comparing datasets with different scales. A smaller value indicates a better model, but it's important to note that a true value of zero may cause computational problems.

[0110] R 2 The calculation formula is as follows:

[0111] ;

[0112] in, The predicted flow velocity in the wellbore; This represents the measured flow velocity in the wellbore. denoted as the measured average flow velocity in the wellbore, and n represents the number of training data points.

[0113] The formula for calculating RMSE is as follows:

[0114] ;

[0115] The formula for calculating MAPE is as follows:

[0116] ;

[0117] In a specific embodiment, R is used. 2 The prediction termination conditions are set as follows: a value greater than 0.8, an RMSE less than 5, and a MAPE less than 10, or reaching the set maximum number of iterations. When the evaluation index of the flow velocity prediction value in the wellbore obtained by the BP neural network model and the actual flow velocity value in the wellbore of the test set meets the above conditions, the model verification is considered to be completed and output can be performed; otherwise, the network weights and thresholds are adjusted and training continues until the prediction termination conditions are met.

[0118] Although the present invention has been described in detail through the preferred embodiments above, it should be understood that the above description should not be considered as a limitation of the present invention. Various modifications and substitutions to the present invention will be apparent to those skilled in the art after reading the above description. Therefore, the scope of protection of the present invention should be defined by the appended claims.

Claims

1. A prediction method for CO2 injection capability based on dung beetle algorithm and optimized BP neural network, characterized in that, The method includes: Step S1: Data collection and preprocessing to obtain the optimal sampling point set, which includes a validation set and a training set; data collection is performed using the optimal Latin hypercube sampling strategy. Step S2: Construct the BP neural network model; Step S3: Input the training set into the BP neural network model, and randomly assign weights and thresholds to the BP neural network model to initialize the weights and thresholds of the BP neural network model. Step S4: Optimize the BP neural network model using the dung beetle algorithm; Step S5: The optimized BP neural network model is further trained; The globally optimal weights and thresholds optimized by the dung beetle algorithm are passed to the BP neural network. The data is passed from the input layer to the output layer, the output is calculated, and the error between the output value and the actual value is calculated. Using the chain rule, the error is propagated back from the output layer to the input layer to update the weights and thresholds in order to reduce the error. Step S6: Evaluate the training effect of the BP neural network model and decide whether to output it.

2. The method for predicting CO2 injection capability based on BP neural network optimization using the dung beetle algorithm according to claim 1, characterized in that, Step S1 includes: Step S11: Data collection and processing to obtain the optimal set of sampling points, which includes a validation set and a training set; Step S12: Determine the range of values ​​for the sample data based on the probability distribution; generate an initial set of sampling points within the range according to the probability distribution; use an iterative optimization algorithm to adjust the spatial position of the sampling points; and obtain a set of optimal sampling points with uniform spatial distribution and low cross-correlation. Step S13: The optimal sampling point set is processed using a linear normalization method, and the transformation function is: ; Where x′ is the normalization parameter; x is the actual value; max(x) and min(x) are the maximum and minimum values ​​of variable x, respectively.

3. The prediction method for CO2 injection capability based on BP neural network optimization using the dung beetle algorithm according to claim 2, characterized in that, In step S2, the BP neural network model includes an input layer, a hidden layer, and an output layer, with nodes in the previous and next layers connected by corresponding weights; based on the formula: ; Where q is the flow velocity in the wellbore, m 3 / d; K is the reservoir permeability, 10 -3 μm 2 h is the reservoir thickness, in meters; Δp is the pressure difference between the reservoir and the wellbore, in MPa; μ is the viscosity of the injected phase, in mPa·s; r e The equivalent discharge radius is m; r w Let be the radius of the wellbore, in meters (m). The input layer includes reservoir permeability, thickness, pressure difference between the reservoir and the wellbore, viscosity of the injected phase, equivalent drainage radius, and wellbore radius. The number of input layers is 6. The number of hidden layers is 12. The output layer is the predicted flow velocity in the wellbore. The number of output layers is 1.

4. The prediction method for CO2 injection capability based on BP neural network optimization using the dung beetle algorithm according to claim 3, characterized in that, Step S2 also includes model parameter design: the learning accuracy of the preset BP neural network is 0.001, the maximum number of learning iterations is 500, the momentum factor is 0.95, the activation function of the hidden layer is a hyperbolic tangent sigmoid function, and the training function uses the Levenberg-Marquardt algorithm.

5. The method for predicting CO2 injection capability based on BP neural network optimization using the dung beetle algorithm according to claim 4, characterized in that, Step S4 includes: optimizing the BP neural network model using the dung beetle algorithm, and evaluating individual fitness using the mean squared error E as the fitness function; ; Where N is the number of samples, y i d y is the ideal output value of the i-th sample. i This is the actual output value of the i-th sample; E is related to the flow velocity q in the wellbore, and a smaller value indicates a better solution. i d For the predictions of q, y on the training set i This represents the actual flow velocity value within the wellbore.

6. The method for predicting CO2 injection capability based on BP neural network optimization using the dung beetle algorithm according to claim 5, characterized in that, Step S4 further includes: treating the flow velocity q in the well as an individual in the dung beetle swarm, forming a solution space; evaluating the fitness of each individual based on the performance of the BP neural network on the training set; simulating and updating the position of the individual through four behaviors of dung beetles, such as rolling a ball, reproducing, foraging, and stealing, and repeating the fitness evaluation and position update until the stopping condition is met, obtaining the corresponding weights and thresholds when the fitness is better to optimize the BP neural network; wherein, the stopping condition is reaching the preset maximum number of iterations or the fitness value no longer changing.

7. The method for predicting CO2 injection capability based on BP neural network optimization using the dung beetle algorithm according to claim 6, characterized in that, The dung beetle optimization algorithm in step S4 includes: In obstacle-free mode, when the dung beetle has no obstacles to move forward, it uses polarized sunlight or moonlight as navigation to enable it to roll in a straight line and carry its cargo; the position update formula is as follows: ; Where xi(t) represents the position information of the i-th dung beetle in the t-th iteration; t is the iteration number; a is a natural coefficient, assigned a value of -1 or 1, where 1 indicates no deviation in direction and -1 indicates deviation from the original direction; k∈(0, 0.2] represents the deflection coefficient; b is a natural coefficient between (0, 1); Δx is used to simulate the change in light intensity; X W This is the worst position in the current population. In obstacle mode, when the dung beetle encounters an obstacle, it typically obtains a new route by dancing, using a tangent function to simulate the new rolling direction with a deflection angle of [0, π]. The position update formula in this case is: ; Where θ is the deflection angle, and the dung beetle's position will not be updated when θ = 0, π / 2 or π; Dung beetles reproduce by rolling their dung balls to safe environments suitable for egg-laying. Therefore, a boundary selection strategy is proposed to simulate the egg-laying area of ​​dung beetles. The specific calculation formula is as follows: ; Among them, X * Indicates the current local optimum position; and Let R and T represent the lower and upper bounds of the spawning region, respectively; where R = 1 - t / T, and T is the maximum number of iterations; the boundary of the spawning region is dynamically changing and determined by R. The formula for updating the spawning location is as follows: ; Among them, B i (t) represents the position of the i-th brood ball in the t-th iteration; b1 and b2 represent two independent random vectors of size 1×D, where D represents the dimension of the optimization problem; Dung beetles forage for food. Some mature dung beetles will emerge from the ground to forage. The optimal foraging area boundary for dung beetles is defined as follows: ; Among them, X b For the best position, and These are its lower and upper bounds, respectively; the dung beetle's position has been updated as follows: ; Where, x i (t) represents the position information of the i-th dung beetle in the t-th iteration, C1 represents a random number that follows a normal distribution, and C2 represents a random vector belonging to (0, 1); Dung beetle theft: Within a colony, some dung beetles will steal dung balls from others. The locations of these thieving dung beetles are updated as follows: ; Where g is a 1×D random vector following a normal distribution; x i (t) represents the information of the i-th thief at the t-th iteration.

8. The method for predicting CO2 injection capability based on BP neural network optimization using the dung beetle algorithm according to claim 7, characterized in that, The evaluation in step S6 includes: Evaluation indicators for flow velocity in the wellbore include R. 2 Three types of errors: RMSE and MAPE; R 2 The calculation formula is as follows: ; in, The predicted flow velocity in the wellbore; This represents the measured flow velocity in the wellbore. is the measured average flow velocity in the wellbore, and n is the number of training data points; The formula for calculating RMSE is as follows: ; The formula for calculating MAPE is as follows: 。 9. The method for predicting CO2 injection capability based on BP neural network optimization using the dung beetle algorithm according to claim 8, characterized in that, In step S6, R is used 2 The prediction termination condition is set as follows: the predicted flow velocity in the wellbore obtained by the BP neural network model is greater than 0.8, RMSE is less than 5, and MAPE is less than 10, or the maximum number of iterations is reached. When the evaluation index of the predicted flow velocity in the wellbore obtained by the BP neural network model and the actual flow velocity in the wellbore of the test set meets the above conditions, the model is considered to be completed and can be output; otherwise, the network weights and thresholds are adjusted and training continues until the prediction termination condition line is reached.