Method and system for predicting heavy oil fireflooding productivity based on improved SSA-RF algorithm
By optimizing the sparrow search algorithm, combining Logistic mapping and cosine algorithm, the random forest model is improved, and the problem of local extreme value and convergence slowdown in the late iteration of the heavy oil fire-fighting production capacity prediction model in the existing technology is solved, and the prediction efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202510129568.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-05
- Publication Date
- 2025-05-30
AI Technical Summary
When the prior art predicts the production capacity of heavy oil fired, there is room for further optimization of algorithm efficiency and accuracy, especially in the later stage of iteration, the problems of local extreme values and convergence slowdown are prone to occur.
The prediction model of the random forest model (RF) is improved to improve the heavy oil fire-flooding capacity by optimizing the Sparrow Search Algorithm (SSA), combined with Logistic mapping and cosine algorithm.
It reduces the situation where the sparrow search algorithm falls into local optimal solutions due to individual differences and limitations, and improves the global search and prediction capabilities of the model.
Smart Images

Figure CN120069195A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of crude oil development, and particularly to a method and system for predicting the productivity of heavy oil fire flooding based on an improved SSA-RF algorithm. Background Technique
[0002] China is rich in heavy oil resources, and at present, it is mainly developed through thermal recovery technology, among which fire flooding is one of the most effective development methods. The main principle of this method is to inject air through an injection well, and through artificial ignition or spontaneous combustion, promote the combustion of crude oil and the injected air, form a forward-propagating combustion front, and then push the crude oil not affected by the thermal effect to the production well. At present, the productivity of heavy oil fire flooding is mainly predicted by theoretical calculation methods, but the theoretical calculation methods are relatively complex.
[0003] The Chinese invention patent with the publication number CN117474158A provides a method for predicting the oil recovery rate of natural core polymer flooding based on machine learning. Based on the experimental results of polymer enhanced oil recovery in the laboratory, this method uses the polymer flooding experimental data as a training set to establish an oil recovery prediction model, evaluate the ultimate oil recovery rate of the reservoir, and realize the optimization design of the polymer flooding enhanced oil recovery plan in low-permeability oil reservoirs. The results show that the established prediction model has high accuracy, indicating that machine learning methods can be applied to oil reservoir development.
[0004] Taking the random forest model as an example, it has high accuracy in prediction, while the data obtained from actual fire flooding often has a non-linear relationship. Therefore, there is still room for further optimization in terms of algorithm efficiency and accuracy. The sparrow search algorithm has strong optimization ability and high solution rate. However, similar to other intelligent optimization algorithms, the sparrow search algorithm is prone to problems such as local extreme values and slow convergence in the later stage of iteration. Therefore, it is very necessary to design a method and system for predicting the productivity of heavy oil fire flooding based on an improved SSA-RF algorithm. Summary of the Invention
[0005] The purpose of the present invention is to provide a method and system for predicting the productivity of heavy oil fire flooding based on an improved SSA-RF algorithm. The random forest model is optimized by the optimized sparrow search algorithm to obtain an optimized prediction model, so as to reduce the situation that the sparrow search algorithm falls into a local optimal solution due to individual differences and limitations, and improve the global search and prediction ability of the model.
[0006] To achieve the above purpose, the present invention provides the following solutions:
[0007] A method for predicting the productivity of heavy oil fire flooding based on an improved SSA-RF algorithm, comprising the following steps:
[0008] Obtain the fire flooding oil recovery rate under different influencing factors, establish an original data set, and divide the original data set into a training set and a test set;
[0009] Construct a heavy oil in-situ combustion production capacity prediction model;
[0010] Optimize the sparrow search algorithm through the Logistic mapping and the sine-cosine algorithm to obtain an optimized algorithm;
[0011] Iteratively optimize the heavy oil in-situ combustion production capacity prediction model through the optimized algorithm to obtain an optimized prediction model;
[0012] Predict the heavy oil in-situ combustion production capacity through the optimized prediction model to obtain a prediction result.
[0013] Optionally, the influencing factors include: reservoir burial depth, oil layer thickness, viscosity, porosity, permeability, and reservoir temperature.
[0014] Optionally, the heavy oil in-situ combustion production capacity prediction model is a random forest model.
[0015] Optionally, optimizing the sparrow search algorithm through the Logistic mapping and the sine-cosine algorithm to obtain an optimized algorithm includes:
[0016] Reorder the fitness of the initial population of the sparrow search algorithm through the Logistic mapping to obtain an optimized initial population;
[0017] Update the position of the discoverer of the sparrow search algorithm through the sine-cosine algorithm.
[0018] Optionally, the expression of the optimized initial population is: Xn +1 = r × Xn × (1 - Xn); where X n+1 is the position at the next moment, r is the chaos control parameter, and X n is the initial position.
[0019] Optionally, the expression of the updated position of the discoverer is: where is the position of the i-th sparrow at the j-th dimension after t + 1 iterations, X best is the optimal position, r 1 is the search step of the discoverer, r 2 and r 3 are both constants, R 2 is the warning value, and S T is the safety value.
[0020] A system for predicting heavy oil in-situ combustion production capacity based on the improved SSA-RF algorithm, including:
[0021] A data acquisition module, configured to obtain the in-situ combustion recovery rate under different influencing factors, establish an original data set, and divide the original data set into a training set and a test set;
[0022] A model construction module for constructing a heavy oil fire flooding productivity prediction model;
[0023] An optimization iteration module for optimizing the sparrow search algorithm through the Logistic mapping and the sine-cosine algorithm to obtain an optimized algorithm;
[0024] A model update module for iteratively optimizing the heavy oil fire flooding productivity prediction model through the optimized algorithm to obtain an optimized prediction model;
[0025] A result prediction module for predicting the heavy oil fire flooding productivity through the optimized prediction model to obtain a prediction result.
[0026] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects: The method for predicting heavy oil fire flooding productivity based on the improved SSA-RF algorithm provided by the present invention includes: obtaining the fire flooding recovery rate under different influencing factors, establishing an original data set, and dividing the original data set into a training set and a test set; constructing a heavy oil fire flooding productivity prediction model; optimizing the sparrow search algorithm through the Logistic mapping and the sine-cosine algorithm to obtain an optimized algorithm; iteratively optimizing the heavy oil fire flooding productivity prediction model through the optimized algorithm to obtain an optimized prediction model; predicting the heavy oil fire flooding productivity through the optimized prediction model to obtain a prediction result. The present invention reduces the situation that the sparrow search algorithm falls into a local optimal solution due to individual differences and limitations, and improves the global search and prediction capabilities of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0028] Figure 1 It is a flow chart of the method for predicting heavy oil fire flooding productivity of the present invention;
[0029] Figure 2 It is a prediction result graph of the test set of the RF model in the embodiment of the present invention;
[0030] Figure 3 It is a prediction result graph of the validation set of the RF model in the embodiment of the present invention;
[0031] Figure 4 It is a prediction result graph of the test set of the SSA-RF model in the embodiment of the present invention;
[0032] Figure 5 It is a prediction result graph of the validation set of the SSA-RF model in the embodiment of the present invention;
[0033] Figure 6 This is the prediction result graph of the optimized prediction model test set in the embodiment of the present invention;
[0034] Figure 7 This is the prediction result graph of the optimized prediction model validation set in the embodiment of the present invention. Detailed implementation manners
[0035] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0036] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.
[0037] As Figure 1 shown, the present invention provides a method for predicting the heavy oil fire flooding production capacity based on an improved SSA-RF algorithm, including the following steps:
[0038] Step 100: Obtain the fire flooding recovery rates under different influencing factors, establish an original data set, and divide the original data set into a training set and a test set;
[0039] Specifically, collect the fire flooding recovery rates of domestic and foreign fire flooding projects under different reservoir burial depths, oil layer thicknesses, viscosities, porosities, permeabilities, and reservoir temperatures, establish an original data set, and divide the original data set into a training set and a test set at a ratio of 8:2. The original data set is shown in Table 1:
[0040] Table 1 Original data table
[0041]
[0042]
[0043]
[0044]
[0045] Step 200: Construct a heavy oil fire flooding production capacity prediction model;
[0046] Specifically, the heavy oil fire flooding production capacity prediction model in this embodiment adopts a random forest (RF) model.
[0047] Step 300: Optimizing the sparrow search algorithm (SSA) by using logistic mapping and sine-cosine algorithm to obtain an optimized algorithm;
[0048] Specifically, the traditional process of the sparrow search algorithm is as follows:
[0049] First, determine the number and size of the sparrow population, and sort the population according to fitness, dividing it into discoverers, joiners, and vigilants. The expression for determining the number and size of the sparrow population is: Among them, X is the position matrix of the individual, a mn is the element in the mth row and nth column, where m is the total number of sparrows and n is the spatial dimension.
[0050] Then, through the expression: Update the location of the discoverer, where: is the position of the i-th sparrow in the j-dimension after t+1 iterations, t is the number of iterations, i termax is the maximum number of iterations, α∈(0,1] is a random number, R 2 ∈[0, 1] is the warning value, S T ∈[0.5, 1] is a safe value, Q is a random number that follows a normal distribution, and L is a matrix whose elements are all 1 and have the same latitude as X.
[0051] Then move the joiner closer to the finder and search around the joiner itself, using the expression: Update the position of the joiner, where X p is the optimal position of the finder at present, Xworst is the worst position of the finder at present, A is a 1×n matrix, A + =A T (AA T ) -1 .
[0052] Finally, through the expression: Update the position of the sentinel, where β is a normally distributed random number with a mean of 0 and a variance of 1, K is a random number in the range of [-1, 1], and f i is the fitness of the i-th sparrow, f b and f w are the current optimal fitness and the worst fitness of the sparrow, respectively, and σ is a very small constant. The vigilants account for about 10%-20% of the entire population, and the initial positions are randomly distributed. SSA continuously updates the positions of the discoverers, joiners, and vigilants. If the fitness of the new positions of the discoverers, joiners, and vigilants is better than the previous positions of the discoverers, joiners, and vigilants, the global optimal position is updated.
[0053] More specifically, the sparrow search algorithm is optimized by the Logistic mapping and the sine-cosine algorithm to obtain an optimized algorithm, including:
[0054] The fitness of the initial population of the sparrow search algorithm is re-sorted through the Logistic mapping to obtain an optimized initial population;
[0055] The position of the discoverer of the sparrow search algorithm is updated by the sine-cosine algorithm.
[0056] Furthermore, the expression of the optimized initial population is:
[0057] X n+1 = r × X n × (1 - X n );
[0058] where X n+1 is the position at the next moment, X n+1 ∈ (0, 1), r is the chaotic control parameter in (0, 4), and X n is the initial position.
[0059] Furthermore, the expression of the updated position of the discoverer is:
[0060]
[0061] where, is the position of the i-th sparrow in the j-th dimension after (t + 1) iterations, X best is the optimal position of the discoverer, r 1 is the search step of the discoverer, r 2 and r 3 are both constants in [0, 2π].
[0062] Step 400: Iteratively optimize the heavy oil fire flooding production prediction model through the optimized algorithm to obtain an optimized prediction model;
[0063] Specifically, in this embodiment, the initial population value of the optimized algorithm is set to 20, the number of iterations is set to 10, and the dimension is set to 2.
[0064] Step 500: Predict the heavy oil fire flooding production through the optimized prediction model to obtain a prediction result.
[0065] This embodiment also verifies the practical application ability of the optimized prediction model through experiments. The prediction results obtained using the RF model, the RF optimized by SSA (SSA-RF) model, and the optimized prediction model are respectively as Figures 2 - 7As shown, where the true values are the actual data in Table 1 and the fitted values are the results of fitting the data in Table 1 using machine learning. The mean absolute percentage error (MAPE) and root mean square error (RMSE) of the RF model, SSA-RF model, and optimized prediction model for the training set and test set are shown in Table 2:
[0066] Table 2 Comparison Table of Model Errors
[0067]
[0068] The present invention also provides a system for predicting the production capacity of heavy oil fire flooding based on an improved SSA-RF algorithm, including:
[0069] A data acquisition module for obtaining the fire flooding recovery rate under different influencing factors, establishing an original data set, and dividing the original data set into a training set and a test set;
[0070] A model construction module for constructing a prediction model for the production capacity of heavy oil fire flooding;
[0071] An optimization iteration module for optimizing the sparrow search algorithm through the Logistic mapping and sine-cosine algorithm to obtain an optimized algorithm;
[0072] A model update module for iteratively optimizing the prediction model for the production capacity of heavy oil fire flooding through the optimized algorithm to obtain an optimized prediction model;
[0073] A result prediction module for predicting the production capacity of heavy oil fire flooding through the optimized prediction model to obtain a prediction result.
[0074] The beneficial effects of the present invention are as follows:
[0075] 1) Optimize the initial population of sparrows through the Logistic mapping, sort the fitness in the population, and increase the ethnic diversity;
[0076] 2) Update the position of the discoverer through the sine-cosine method, optimize the problem of updating the optimal position of the discoverer, and improve the search ability and accuracy of the model;
[0077] 3) Use the network model of machine learning to predict the fire flooding recovery rate of heavy oil, improving the operation speed and accuracy of the prediction.
[0078] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other.
[0079] In the present invention, specific examples are used to illustrate the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation on the present invention.
Claims
1. A method for predicting heavy oil fire flooding capacity based on an improved SSA-RF algorithm, characterized in that: The steps include: Obtaining fire flooding recovery factors under different influencing factors, establishing an original data set, and dividing the original data set into a training set and a test set; Construct a heavy oil fire flooding capacity prediction model; The sparrow search algorithm is optimized by Logistic mapping and sine-cosine algorithm to obtain the optimized algorithm; Iteratively optimizing the heavy oil fire flooding capacity prediction model by using an optimization algorithm to obtain an optimized prediction model; The heavy oil fire drive capacity is predicted by the optimization prediction model to obtain a prediction result.
2. The method for predicting heavy oil fire flooding capacity based on improved SSA-RF algorithm according to claim 1, characterized in that: The influencing factors include: reservoir depth, oil layer thickness, viscosity, porosity, permeability and reservoir temperature.
3. The method for predicting heavy oil fire flooding capacity based on improved SSA-RF algorithm according to claim 1, characterized in that: The heavy oil fire flooding capacity prediction model is a random forest model.
4. The method for predicting heavy oil fire flooding capacity based on improved SSA-RF algorithm according to claim 1, characterized in that: The sparrow search algorithm is optimized by Logistic mapping and sine-cosine algorithm to obtain the optimized algorithm, including: Reordering the fitness of the initial population of the sparrow search algorithm through the Logistic map to obtain an optimized initial population; The finder position of the sparrow search algorithm is updated by the sine-cosine algorithm.
5. The method for predicting heavy oil fire flooding capacity based on improved SSA-RF algorithm according to claim 4, characterized in that: The expression of optimizing the initial population is: n+1 = r × X n ×(1-X n ), where X n+1 is the position at the next moment, r is the chaos control parameter, X n is the initial position.
6. The method for predicting heavy oil fire flooding capacity based on improved SSA-RF algorithm according to claim 4, characterized in that: The expression for the updated finder position is: in, is the position of the i-th sparrow in the j-th dimension after t+1 iterations, X best is the optimal position, r1 is the search step of the finder, r2 and r3 are constants, R2 is the warning value, S T is a safe value.
7. A system for predicting heavy oil fire flooding capacity based on improved SSA-RF algorithm, characterized in that: include: A data acquisition module, used to obtain the fire flooding recovery factor under different influencing factors, establish an original data set, and divide the original data set into a training set and a test set; Model building module, used to build a heavy oil fire flooding capacity prediction model; An optimization iteration module is used to optimize the sparrow search algorithm through Logistic mapping and sine-cosine algorithm to obtain an optimized algorithm; A model updating module, used for iteratively optimizing the heavy oil fire flooding capacity prediction model through an optimization algorithm to obtain an optimized prediction model; The result prediction module is used to predict the heavy oil fire flooding capacity through the optimized prediction model to obtain the prediction result.
Citation Information
Patent Citations
Natural core polymer oil displacement recovery ratio prediction method based on machine learning
CN117474158A