Introduction

Alkali-Surfactant-Polymer (ASP) flooding is an effective technique for enhancing oil recovery by combining the benefits of three chemical agents. In this system, polymers increase the viscosity of the injected fluid, which expands the swept volume and improves the displacement efficiency. Surfactants reduce the interfacial tension between oil and water, allowing trapped oil to mobilize more easily. Alkaline agents react with acidic components in the crude oil to form in-situ surfactants, further enhancing the displacement process. Together, these components synergistically contribute to a significant improvement in oil recovery1,2,3,4,5,6. It has made a tremendous contribution to the oil production of the Daqing Oilfield7,8,9,10,11. The annual oil production of ASP flooding in Daqing Oilfield has exceeded 4 million tons for seven consecutive years, providing strong support for high and stable production of Daqing Oilfield.

According to the laboratory research12,13,14,15,16,17,18,19,20, reservoir numerical simulation results21,22,23 and oilfield experience24,25,26,27,28,29,30,31, in order to achieve the optimal EOR effect and economic benefits, the development process of ASP flooding in Daqing Oilfield is set as blank water flooding, pre polymer, ASP main, ASP sub, subsequent polymer and subsequent water flooding(hereinafter referred to as SWF). The chemical concentration and slug size are demonstrated and the development effect is predicted in the development program before the block is put into development. However, due to various uncertainties in the development, the actual effect may be different from the prediction in the original scheme32. In order to achieve the optimal technical and economic result, the subsequent polymer slug should be appropriately extended to further improve the recovery and expand the economic benefit when the actual development effect of the block is better than the prediction of the original plan. While the development effect is worse than expectation, the injection of chemicals should be stopped prematurely at an appropriate time, and the SWF should be transferred to avoid economic losses. Therefore, it is of vital importance for efficient development of ASP flooding to optimize the optimal time of transferring to SWF.

At present, some studies were done on the timing for SWF in polymer flooding33,34,35,36,37,38,39,40,41,42 and the oil increment per ton of polymer was used as the objective function for the transfer timing of SWF. When the economic benefits obtained by increasing crude oil per ton of polymer was the same as the polymer price, it was considered that the optimized timing for SWF was reached. However, this index only took the chemical agent cost into account and did not fully take other costs of block development into account, nor did it analyze the impact of input-output ratio and net profit on the opportunity of SWF. What’s more, there are no literature reports on the exploration of the optimal opportunity for the transfer to SWF in ASP flooding.

In the ASP flooding blocks already completed in Daqing Oilfield, due to the deterioration of block development effectiveness, there had been precedents of prematurely ceasing chemical injection and transfer to SWF in blocks X12 and N6. Additionally, for blocks where the development effectiveness closely aligns with the predicted schemes, no injection scheme adjustments are implemented; this situation includes blocks such as N5, X6D2, and LBD. In actual development of ASP flooding in Daqing Oilfield, a more common scenario is that, due to the better-than-expected development effectiveness of blocks, the subsequent polymer plug segments are extended to enhance development effectiveness and economic benefits. This situation includes blocks such as B2X, X6D1, and X6D2. In practical field operations, the aforementioned injection scheme adjustments for prematurely transfer to SWF blocks and extending subsequent polymer plug segment blocks both employ a combination of similar block analogies and reservoir engineer experiential decision-making, lacking scientific rigor and quantitative basis. Therefore, there is an urgent need to explore and establish a precise prediction method for transfer to SWF based on actual development conditions, achieving the optimized decision for improving the recovery degree and economic benefits of ASP flooding blocks.

In this paper, by calculating the changes of the total cost and net profit of the ASP flooding blocks in the whole process, the optimal opportunity of SWF in ASP flooding block was established. In addition, a high-precision prediction model for the optimal timing for SWF was established using machine learning technology, which made the work automatic and intelligent, and greatly improved the work efficiency.

Current situation of SWF after ASP flooding in Daqing Oilfield

The basic information of the completed ASP flooding field trials and industrial blocks in Daqing Oilfield was summarized. Blocks with abnormal development processes were excluded. Details of their basic characteristics and the timing for SWF were presented in Table 1.

Table 1 Statistics of the time for SWF of the completed ASP flooding blocks.
Fig. 1
figure 1

The relationship between development parameters of completed ASP flooding block and water cut for SWF. (a) Relationship between water cut for SWF and effective thickness. (b) Relationship between water cut for SWF and permeability. (c) Relationship between water cut for SWF and enhanced oil recovery per chemical dosage. (d) Bubble chart of water cut for SWF, effective thickness, permeability and enhanced oil recovery per chemical dosage (Bubble size represents water cut, bubble color represents EOR per chemical dosage).

The results shows that the water cut of the completed blocks were between 91.55% and 98.19% when transferred to SWF.

It can be observed from Fig. 1 that the water cut when transfer to SWF is negatively correlated with EOR per unit chemical agent and reservoir permeability, and positively correlated with the effective thickness of the reservoir. The Pearson coefficients between each parameter in Table 1 and the water cut when transfer to SWF also confirm this observation. Additionally, the absolute value of the Pearson coefficient between the EOR per unit chemical agent dosage and the water cut is as high as 0.905, indicating a very strong linear relationship between the two.

The injection methods, types of chemicals, and other parameters of the injection schemes for all blocks were similar, only slight variations existed in the concentration of chemicals used and the size of the plugs. Consequently, the EOR per unit chemical agent dosage was comparable across all blocks. The variations of water cut and recovery degree curves for ASP flooding blocks with different development effect were depicted in Fig. 2. A more favorable development effect for a block implies a higher increase in recovery rate per unit chemical agent dosage. Under such circumstances, the decline of water cut is more pronounced, the rate of water cut recovery is slower, and the water cut at the end of chemical agent injection is lower. Permeability serves as an indicator of the quality of reservoir rock, higher permeability facilitates easier oil recovery within the reservoir, leading to better development effect. Consequently, higher permeability correlates with a higher increase in EOR per unit chemical agent dosage, resulting in lower water cut when transfer to SWF. A greater effective thickness of a block may imply both a larger reservoir volume and potential oil extraction. The recovery degree represents the ratio of the two. In this regard, its impact on increasing the EOR and water cut when transfer to SWF is relatively minor. However, a large effective thickness of the development strata may be caused by either a thick individual oil layer or a greater number of oil layers within the strata. These scenarios could respectively increase the likelihood of intra-layer and inter-layer heterogeneity, resulting in poorer development effect, reduced EOR, and higher water cut when transfer to SWF.

The research of optimal timing for SWF in ASP flooding

In order to evaluate the optimal timing for SWF in ASP flooding, the evaluation parameters and their selection range were selected first. And then, objective function was established.

The selection of evaluation parameters

The evaluation parameters were mainly divided into two categories. First, five parameters were selected to determine expenditure, which were single well construction cost and depreciation, operating cost, chemical agent expense, management expense and financial expense. The second type was the parameters related to income. Three parameters were selected, namely, EOR value of the scheme, single well controlled reserves and oil price.

(1) Values of parameters affecting expenditure.

At present, when evaluating the total cost of ASP flooding in Daqing Oilfield, the economic parameters mainly taken into consideration are single well construction cost and depreciation, operating cost, chemical agent expense, management expense and financial cost. According to the actual condition of Daqing Oilfield, the values of the above five parameters were set as follows. The comprehensive drilling and construction cost of a single well was 4 million CNY/well, and the period of depreciation was 10 years. The operating cost was 918.74 CNY/ton. As for chemical agent expense, 11508.62 CNY/ton was set for high molecular weight polymer, 6637.93 CNY/ton for petroleum sulfonate surfactant and 2132.22 CNY/ton for sodium carbonate. Ratio of pore volume to reserves was 1.94. The management cost was 378.4 CNY/ton, including 361.41 CNY/ton of general management cost and 17 CNY/ton of safety production cost. The financial cost was 121.1 CNY/ton, including 64.9 CNY/ton of long-term loan interest, 6.0 CNY/ton of working capital loan interest, 34.4 CNY/ton of short-term loan interest and 15.8 CNY/ton of retirement cost financial cost.

(2) Values of parameters affecting income.

In order to characterize the average development level of the ASP flooding blocks in Daqing Oilfield to a greater extent and make the evaluation model more representative, on the basis of referring to the ASP benchmark curves43 and the development level of the completed ASP flooding blocks, the oil displacement effects of the evaluation models were designed as three levels and the ultimate EOR was 15%, 18%, and 21% respectively. The dynamic changes of the model were shown in Fig. 2.

In addition, under the condition of similar enhanced oil recovery level, the single well controlled reserves have an important influence on the economic performance. At present, the single well controlled reserves of the completed ASP flooding blocks are between 20,000 and 40,000 tons/well. Therefore, the single well controlled reserves of the models were set as 20,000, 25,000, 30,000 and 35,000 tons/well in this study.

Fig. 2
figure 2

Dynamic change curve of evaluation model.

Table 2 Selection of economic evaluation parameters and values.

Based on the established basic value combination, various values for each parameter were selected within a reasonable range, as shown in Table 2. Subsequently, the appropriate transfer timings to the SWF under various parameter values were analyzed. The management and financial fees were minimally affected by external factors, and their rate of change was small over the years. Hence, they were considered constants.

Determination of the optimal timing for SWF based on variation in net profit during development process and its sensitivity analysis

Most literature currently considers the cost of chemical agents and oil prices when evaluating the transfer of polymer flooding to SWF24,25,26,27,28,29,30,31,32. However, the timing of the SWF needs to consider the overall profitability of the block. Therefore, the cumulative net profit was chosen as evaluation indices for the optimized timing of the SWF.

The cumulative net profit of the ASP flooding block is the most direct indicator of block earnings. The cumulative net profit for the entire ASP flooding process was calculated, and the maximum value on the index and water cut curve was identified as the optimized timing for SWF. At this point, the income and expenditure are equal. The net profit at this stage is zero, and the cumulative net profit reaches its maximum. After this point, net profit becomes negative, and losses begin. Therefore, the transfer to SWF must be completed before this point. (Fig. 3)

$${\rm{Cumulative}}\,{\rm{net}}\,{\rm{profit = Cumulative}}\,{\rm{input - Cumulative}}\,{\rm{output}}$$
(1)
Fig. 3
figure 3

Relationship between cumulative net profit and water cut when transfer to SWF. (a) Enhanced oil recovery is 15% (b) Enhanced oil recovery is 18%. (c) Enhanced oil recovery is 21% (d) Three-dimensional scatter plot.

(In Fig. 3a and c, the dashed line indicates the maximum cumulative net profit, which corresponds to the optimized timing of the SWF. Figure 3d illustrates the relationship between Enhanced Oil Recovery, Oil Price, and Water Cut. The color of the points represents the Cumulative Net Profit. Red solid circles denote the optimized timing for SWF, while the gray plane connects these points, representing the surface of optimized SWF timings.)

Table 3 Optimized timings for SWF calculated by cumulative net profit.
Fig. 4
figure 4

Heat map of Variable Correlation Matrix. The heat map was generated by the Matplotlib library (Python 3.9.11, https://matplotlib.org/).

The findings indicate that when considering cumulative net profit, the optimized timing for transitioning to SWF for a single well with a controlled reserve of 30,000 tons, under varying oil prices, ranges from 91.47 to 97.56% water cut(Table 3). Correlation analysis in Fig. 4 reveals that the factors influencing the optimized timing, in order of decreasing impact, are oil price, single-well controlled reserves, operating costs, single-well drilling and completion costs, chemical agent costs, and pore-to-reserve ratio. Single-well controlled reserves show a positive correlation, while the other factors show negative correlations. The analysis indicates that oil price and single-well controlled reserves are positively correlated with revenue: higher values result in a later stage when net profit reaches zero, permitting a higher water cut at the transition point to SWF. In contrast, operating costs, single-well drilling and completion costs, chemical agent costs, and pore-to-reserve ratio are positively correlated with costs: higher values lead to an earlier stage when net profit reaches zero, requiring a lower water cut at the transition point. The enhanced oil recovery (EOR) index is a comprehensive metric, and differences in water cut patterns do not affect stage net profit. Following this methodology, the optimized timing for transitioning to SWF was determined for 189 scenarios, and the results would be used in the machine learning modeling in the next section.

Optimal timing optimization for SWF in ASP flooding based on automatic machine learning

The aforementioned method determines the optimized timing for transitioning to SWF, but it requires calculating various indicators that affect block development expenditure and revenue throughout the entire ASP flooding process. This process is complex and labor-intensive, potentially delaying the timely adjustment of injection schemes and leading to irreversible economic losses for the flooding block. To address this issue, a high-precision prediction model for the optimized timing of transitioning to SWF was developed using automated machine learning techniques, based on the calculated results of the optimized timing.

Automated machine learning systems

In this study, we utilized the Autosklearn2.0 automated machine learning system, which integrates three key functionalities: meta-learning, Bayesian optimization, and model ensembling. This platform offers substantial advantages in its algorithmic structure (Fig. 5). Meta-learning44 facilitates knowledge transfer from previous tasks, enabling Autosklearn2.0 to select machine learning framework instances likely to perform well on the target dataset, thereby preheating the Bayesian optimization process and enhancing model optimization efficiency. Bayesian optimization45 operates by fitting a probabilistic model to capture the relationship between hyperparameter combinations and model performance. It leverages this model to choose optimized hyperparameter settings, computes hyperparameter combinations, updates the model based on the results, and iteratively reduces errors, thereby automating the model optimization process. Model ensembling involves storing multiple high-performing models during the automatic modeling process and constructing an ensemble model. Typically, an ensemble model outperforms individual models, especially when the base models within the ensemble are robust and have uncorrelated errors46,47. Due to these integrated advantages, automated machine learning generally surpasses conventional machine learning algorithms across most datasets48,49. In this study, we employed this automated machine learning framework to conduct a 24-hour run.

Fig. 5
figure 5

Schematic diagram of automatic machine learning process39.

Other machine learning modeling

To benchmark the automated machine learning system, this study selected five well-established machine learning algorithms: Random Forest, Bagging, KNN, Adaboost, and LightGBM. The choice of these algorithms as benchmark algorithms is based on their proven performance across diverse datasets and their unique strengths. Random Forest and Bagging are ensemble methods known for reducing variance and providing robust predictions, which is valuable in capturing the nonlinear relationships present in oilfield data. K-Nearest Neighbors (KNN), as a non-parametric method, was included to evaluate performance on locally weighted observations, which could offer insights into block-specific variability. Adaboost, as an adaptive boosting algorithm, was selected for its ability to improve predictive accuracy by focusing on difficult-to-predict instances. LightGBM, known for its high efficiency and scalability in handling large datasets, was chosen for its suitability in complex reservoir modeling and real-time application demands. Together, these algorithms provide a comprehensive comparison for assessing the effectiveness of the AutoML framework. We utilized these algorithms for modeling and compared their predictive performance to that of the automated machine learning system. The detailed implementation steps are as follows.

(1) Data preprocessing.

To eliminate the influence of differences in magnitude between features, the feature set was standardized using formulas (5) to (7). Additionally, the dataset was randomly divided into a training set and a test set in a 75:25 ratio.

$$\:{z}_{i}=\frac{{x}_{i}-\mu\:}{\sigma\:}$$
(2)
$$\:\mu\:=\frac{1}{n}\sum\:_{i=1}^{N}{x}_{i}$$
(3)
$$\:\sigma\:=\sqrt{\frac{1}{n}\sum\:_{i=1}^{n}{({x}_{i}-\mu\:)}^{2}}$$
(4)

Where: zi is the standardized score of the sample i; xi is the sample i; µ is the mean value of the samples; σ is the standard deviation of the samples; n is the number of samples.

(2) Model training and optimization.

The model’s hyper-parameters were optimized using 7-fold cross-validation, comparing the average cross-validation error. The entire training set was then used with the optimized hyper-parameters, and the algorithm’s accuracy was evaluated using a test set that had not participated in model training.

(3) Support library, hyper-parameter adjustment and model evaluation.

In this study, the Scikit-learn library28 was used to implement various conventional machine learning algorithms. Hyper-parameter tuning was conducted using grid search. The coefficient of determination (R²) was used to evaluate model performance.

$$\:{R}^{2}=1-\frac{\sum\:_{i=1}^{n}{({Y}_{i}-{\widehat{Y}}_{i})}^{2}}{\sum\:_{i=1}^{n}{({Y}_{i}-\stackrel{-}{Y})}^{2}}$$
(5)

Where: n is the number of samples; Yi is the actual value of the sample i; \({\hat Y_i}\)is the predicted value of the sample i; \(\overline {{Y_i}}\)is the average of all samples.

Result analysis

Figure 6 compares the predictive performance of five conventional machine learning algorithms with that of the automated machine learning model (Fig. 6). The results show that the automated machine learning model achieves higher predictive accuracy than other algorithms, such as Random Forest, without overfitting. Its R² on the test set is close to 1. The comparison between predicted and actual values clearly demonstrates that the model’s predictions are very close to the actual values, indicating high precision (Fig. 7).

Fig. 6
figure 6

Comparison of different machine learning algorithms in calculating the optimized timing for transition to SWF.

Fig. 7
figure 7

Comparison of real value and predicted value calculated by automatic machine learning model.

Limitations of the machine learning model

While the machine learning model used in this study demonstrates high predictive accuracy and practical utility in determining the optimal timing for transitioning to SWF, it has inherent limitations due to its reliance on historical data and the complex, dynamic nature of reservoir conditions.

Firstly, the model’s predictions are based on historical data from previously developed blocks, which may not fully capture real-time changes in reservoir conditions. Properties such as permeability, pressure, and fluid composition can evolve over time during prolonged chemical flooding, altering the effectiveness of subsequent water flooding. This can introduce uncertainties, especially when the model is applied to blocks with significantly different or dynamically changing reservoir characteristics.

Secondly, external factors, particularly fluctuations in operational costs, can substantially impact the economic evaluation of SWF timing. Although the model performs well under relatively stable conditions, it is not designed to dynamically adjust to sudden cost changes. For instance, an increase in operational costs may make an earlier transition to SWF more economically viable, while a decrease may extend the favorable period for chemical flooding, potentially deviating from the model’s suggested optimal timing.

Lastly, like many predictive models, this machine learning approach may be susceptible to overfitting historical patterns, limiting its adaptability in novel scenarios or with outlier data. Thus, while the model provides robust guidance for SWF timing, continuous monitoring and integration with real-time field data are recommended to make adaptive adjustments as reservoir and operational conditions evolve. Future improvements could include the incorporation of adaptive algorithms or hybrid models that combine machine learning with reservoir simulation techniques, enhancing flexibility and predictive accuracy under changing conditions.

Field application

Using the prediction method based on the full-process techno-economic evaluation indicators proposed in Sect. 2 and the prediction model based on automated machine learning established in Sect. 3, we predicted the water cut timing for SWF in six ASP flooding blocks in Daqing Oilfield that are in the subsequent polymer slug phase. The basic parameters of these blocks are shown in Table 4. All evaluation parameters were selected based on the actual values during the development process of each block. When using the method based on full-process techno-economic evaluation indicators, future indicators that change over time were predicted using a reservoir numerical simulation model calibrated by historical fitting for oil production, while other indicators were replaced by their current values. The optimized timing for SWF using both methods and the timing according to the original injection scheme are compared in Table 5.

Table 4 Basic parameters of ASP flooding blocks in Daqing Oilfield in the subsequent polymer slug.

The prediction results for the timing of transferring to SWF using the two optimization methods were similar, further validating the strong predictive performance of the model. Currently, five blocks (X7D1, B2DZ, B2XD, B2DX, N6D) have achieved actual enhanced oil recovery values higher than the predicted values, indicating that their development performance exceeds the original plan. The optimized timing for these blocks for SWF is later than the original predictions, suggesting the need to extend the size of the subsequent polymer slug.

For Block X34D2, located in the distal areas of the Changyuan Oilfield in Daqing, the ASP flooding performance is hindered despite favorable geological parameters such as high permeability. This reduced performance can be attributed to significant horizontal and vertical heterogeneity. Specifically, pronounced horizontal heterogeneity leads to poor connectivity between injection and production wells, diminishing ASP flooding efficiency. Additionally, strong vertical heterogeneity may impede recovery in medium- and low-permeability layers. These factors collectively contribute to the lower development effectiveness observed in this block than anticipated and others, indicating a need to terminate chemical injection earlier and transition to SWF. To enhance oil recovery in highly heterogeneous reservoirs, adaptive injection strategies tailored to specific reservoir characteristics—such as variable injection rates or modified injection patterns—could improve sweep efficiency. Furthermore, advanced hydrophobically associating polymers may increase the effectiveness of ASP flooding in heterogeneous reservoirs, providing improved adaptability to complex geological conditions. It is important to note that for blocks with unique characteristics, particularly those with strong reservoir heterogeneity, the model’s predictive accuracy may decrease. Future studies could address this limitation by incorporating additional representative factors related to heterogeneity or by using reservoir simulation methods to supplement machine learning predictions, thereby enhancing decision-making accuracy.

Following the optimal timing predicted by the machine learning model in Table 5, these blocks were transferred to SWF. Due to uncertainties in actual field development, to minimize the impact of any fluctuations in water cut, SWF is initiated only if the water cut exceeds the transition threshold for two consecutive months. If the water cut surpasses the threshold in the first month but then drops below it in the second month, SWF is postponed. Therefore, the actual transition timing may have slight variations compared to the optimal timing predicted. As of January 2024, four blocks should have completed the injection according to the original plan but are currently in the extended polymer slug phase based on the optimization results. The other two blocks have reached the optimized timing and have already transitioned to SWF, as shown in Table 5.

Table 5 Prediction and evaluation of the timing for SWF in ASP flooding fields.

Economic benefit calculation

Using the technical and economic evaluation metrics calculation method proposed in Sect. 2, we assessed the economic benefits for the six blocks adjusted according to this study’s results. The calculation method involved determining the cumulative net profit for each block under the original plan and the optimized injection plan (Fig. 8). We then calculated the predicted final increase in cumulative net profit by January 2024 and at the end of block development (Table 6). Upon transitioning to SWF, the sudden reduction in chemical costs leads to a significant short-term increase in cumulative net profit. However, extending the polymer slug results in a longer-term increase in crude oil production, leading to more substantial long-term net profit for the extended polymer slug blocks.

After optimizing the plans for the six blocks according to the model, the cumulative net profit increased by 224.9 million CNY compared to the original plan by January 2024. By the projected end of development, the cumulative net profit could increase by up to 752.1 million CNY, assuming stable conditions. These findings suggest that the technology developed in this study has contributed to higher recovery rates and economic benefits in the Daqing Oilfield. However, it should be noted that actual results may vary due to fluctuations in operational costs and other reservoir-specific factors.

Fig. 8
figure 8

Relationship between cumulative net profit and water cut varying with volume of injected chemical agent before and after optimization in each block. (a)X34D2 Block (b)X7D1 Block. (c)B2DZ Block (d)B2XD Block. (e)B2DX Block (f)N6D Block. (The blue line represents the original plan, while the red line signifies the optimized plan. The solid lines indicate the actual progress that has already been achieved. The dashed blue line represents the unimplemented part of the original plan, and the dashed red line represents the future projection, with January 2024 serving as the demarcation point).

Table 6 Economic benefit calculation for optimized timing for SWF.

Conclusion

(1) The water cut for subsequent water flooding ranged between 91.55% and 97.4% in the completed field test, and between 93.34% and 98.19% in the extended blocks. The water cut during subsequent water flooding was found to be negatively correlated with the enhanced oil recovery per unit of chemical agent and reservoir permeability, while being positively correlated with effective reservoir thickness. The correlation with EOR per unit of chemical agent was the strongest.

(2) By using cumulative net profit as an objective function, the optimal timing for subsequent water flooding was determined for 189 different parameter combinations. The results showed that the optimal timing for subsequent water flooding varied from 91.47 to 97.56% across different schemes. The influencing factors for the optimal timing, in order of impact, were oil price, single-well controlled reserves, operating costs, single-well drilling, chemical and expenses, and porosity-reservoir ratio. Among these, single-well controlled reserves were positively correlated, while the other factors were negatively correlated.

(3) An optimization model for optimal subsequent water flooding was established using automated machine learning techniques for ternary composite flooding and compared with models established using other conventional machine learning algorithms. The results indicated that the automated machine learning model outperformed other conventional machine learning models, providing the highest prediction accuracy.

(4) Using two methods – the entire process indicator changes and the automated machine learning prediction model – the optimal timing for subsequent water flooding was predicted for six blocks in the Daqing Oilfield currently in the follow-up polymer slug phase. The results obtained by both methods were similar, further validating the strong practical prediction capability of the model. Adjusting the injection plan for these blocks based on the optimal timing predicted by the machine learning model resulted in an economic benefit.