An online multi-step prediction method for wellhead pressure based on stacking ensemble learning

By adopting the wellhead pressure online multi-step prediction method based on Stacking integrated learning in shale gas mining, the problems of low multi-time step prediction accuracy of wellhead pressure and poor adaptability to data distribution changes in the prior art are solved, and high-accuracy multi-step prediction and stable prediction performance are achieved.

CN115222065BActive Publication Date: 2025-04-18SOUTHWEST PETROLEUM UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210722350.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-20
Publication Date
2025-04-18
Estimated Expiration
2042-06-20

AI Technical Summary

Technical Problem

The prior art has low accuracy in prediction of wellhead pressure in shale gas extraction and is difficult to adapt to the problem of data distribution changes.

Method used

The wellhead pressure online multi-step prediction method based on Stacking integrated learning is used to build an OSE-MS model, and feature engineering is carried out by obtaining fracturing operation data in real time, and the basic learner integration and meta learner are dynamically built, and the model is updated in real time to adapt to the data distribution changes.

Benefits of technology

It significantly improves the accuracy of multi-time step prediction of wellhead pressure, improves the MAE, RMSE and MAPE indicators, and maintains good stability when prediction 30 steps in advance, and is suitable for actual shale gas mining scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115222065B_ABST
    Figure CN115222065B_ABST
Patent Text Reader

Abstract

The present invention discloses an online multi-step prediction method for wellhead pressure based on Stacking integrated learning, which relates to the technical field of shale gas development. The method comprises: constructing an online Stacking integrated multi-step prediction model, acquiring fracturing operation data in real time and inputting the data into the online Stacking integrated multi-step prediction model, outputting multi-time step prediction data based on the online Stacking integrated multi-step prediction model, and updating the online Stacking integrated multi-step prediction model using the fracturing operation data. The present invention combines online learning with Stacking integration, continuously learns new data distribution and forgets outdated concepts, improves the adaptability and prediction performance of the integrated model OSE-MS to changes in data stream distribution, and applies the method to the multi-step prediction of wellhead pressure in fracturing construction, which can help on-site construction personnel to adjust fracturing operation parameters in a timely manner, thereby improving operation efficiency and avoiding the occurrence of safety accidents.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of shale gas development, and in particular to an online multi-step prediction method for wellhead pressure based on Stacking ensemble learning. Background Art

[0002] In shale gas extraction, fracturing operations have a significant effect on increasing reserves and production. During the fracturing operation, a large amount of high-viscosity liquid needs to be pressed into the formation. After sufficient cracks are formed, proppants such as quartz sand are added to fill the cracks, thereby effectively improving the permeability of the oil and gas layer. The existing fracturing operation control system mainly presents real-time wellhead pressure and other data about fracturing operations through the monitoring system. On-site experts then adjust the fracturing operation parameters based on experience to control the effective expansion of the cracks, and manually predict the wellhead pressure in advance to prevent the wellhead pressure from exceeding the safety threshold. This has great limitations.

[0003] The real-time operation data collected during the fracturing operation (i.e., fracturing operation data) is a typical time series data. According to the investigation, the existing time series prediction research mostly considers single-step prediction, and there are few studies on multi-step prediction, and most of them are concentrated in special fields such as wind power prediction, network traffic prediction, and power prediction. For example, Zhou et al. proposed a deep multi-output model to predict air quality 4 steps in advance, with a short number of prediction steps; Guo Jia et al. introduced the full attention mechanism into the multi-step prediction problem of time series to predict the second-level traffic in the future minute-level time window; Galicia et al. proposed a method for multi-step prediction of big data time series based on ensemble learning, which integrates random forests, decision trees, and gradient boosting trees. The research of Guo Jia and Galicia both has the problem of error accumulation, and does not consider the time-dependent characteristics of the predicted value in the prediction window; Sahoo et al. compared the effects of different multi-step prediction strategies on multi-step prediction of network bandwidth utilization, and the experiment proved that the multi-step prediction with a multi-input and multi-output strategy can achieve the best effect. Chen et al. proposed a nonlinear learning integration for time series prediction, which integrates long short-term memory network, support vector machine and extreme optimization algorithm for multi-step wind speed prediction. The results show that the integrated model can effectively improve the prediction accuracy. The above methods all assume that the prediction data is relatively stable and does not drift. In fact, in various special fields, the data distribution will always change. For the field of shale gas development technology, due to the large differences in data distribution of different oil and gas wells and different physical segments, the model trained with the fracturing operation data of a well cannot be directly applied to other well segments. Therefore, it is difficult to directly apply the existing multi-step prediction method to the wellhead multi-time step pressure prediction. In addition, through investigation, it is found that the research on online learning is mostly focused on classification tasks, and a small amount of research on prediction tasks is limited to single-step prediction. No online learning method for multi-step prediction tasks has been found.

[0004] In addition, ensemble learning is also widely used in time series prediction. The ensemble model uses multiple base learners for sequence prediction, which has better generalization ability than a single model. Stacking ensemble learning is a typical ensemble model. First, multiple training subsets are obtained on the entire training data set through cross-validation or self-sampling methods, and then a series of base learners are trained using the sub-training sets. Finally, the outputs of the base learners are fused to train a meta-learner, and the meta-learner is used for prediction. As time goes by, the data distribution of non-steady data streams will change. In order to solve this problem, Oza proposed online ensemble learning, and proposed online boosting algorithms and online bagging algorithms. Through the changes in online learning distribution, the effective integration of base learners can be achieved, which can improve the performance of the overall model to a certain extent. The main idea of ​​online ensemble learning is to update the parameters of some base learners or replace some of them during the prediction process. However, no researchers have studied online Stacking ensemble.

[0005] Fracturing operation data is collected in time, and has the characteristics of large distribution changes and strong data correlation. According to the characteristics of fracturing operation data, the advance prediction of wellhead pressure can be regarded as a multi-time step sequence prediction (i.e., multi-step prediction) problem. Multi-step prediction is to estimate multiple observation values ​​in the future. Compared with single-step prediction, which only estimates one future value based on historical data, multi-step prediction faces more uncertain factors. The accumulation of errors and lack of information make multi-step prediction more difficult. In addition, the current research on multi-step prediction has the shortcomings of short prediction time and difficulty in adapting to the ever-changing wellhead pressure data stream. Therefore, in order to guide safe and efficient fracturing operations, how to improve the accuracy of predicting wellhead pressure based on multi-step prediction is an urgent problem to be solved. Summary of the invention

[0006] The purpose of the present invention is to provide an online multi-step prediction method for wellhead pressure based on Stacking ensemble learning in order to solve the problem of low accuracy of existing methods in predicting wellhead multi-time-step pressure in fracturing operation data with large fluctuations and prone to concept drift.

[0007] The technical solution adopted by the present invention is as follows:

[0008] An online multi-step prediction method for wellhead pressure based on Stacking ensemble learning is as follows: construct an online Stacking ensemble multi-step forecast model (OSE-MS model for short), obtain fracturing operation data in real time and input it into the OSE-MS model, output multi-time step prediction data based on the OSE-MS model, and update the OSE-MS model using the fracturing operation data. Some symbols and their meanings involved in this method are shown in Table 1 below:

[0009] Table 1 - Symbols and their meanings

[0010]

[0011]

[0012] In the present invention, the fracturing operation data includes the wellhead pressure value and its related factor data set, and the related factor data set includes the characteristics of the fracturing physical segment, stage, casing pressure, discharge displacement, stage discharge displacement, cumulative discharge displacement, and sand concentration. The number of features contained in the related factor data set is d, and d is a variable and a positive integer. The fracturing operation data is single time step data, and its formula is as follows:

[0013]

[0014] The OSE-MS model includes three parts: feature engineering, online training mechanism and online prediction. The method of building the OSE-MS model includes the following steps:

[0015] Step 1. Initialization settings: Initialize parameters and train the initial base learner BM0{lstm0,gru0} based on offline data (denoted as B0). The parameters include the prediction loss threshold T h , minimum number of samples for model training M, prediction output window size w, number of validation sets N verify , T h , M, w, N verify The offline data B0 is a constant in the time period [1, t 0 ]The feature data is obtained by converting the real fracturing operation data into feature engineering data.

[0016] Among them, the method of feature engineering data conversion is: based on the prediction output window size w, the fracturing operation data is divided by a sliding time window, and the divided fracturing operation data is converted into multi-time step data by feature engineering.

[0017] Step 2. Online training: Based on the online training mechanism, the base learner ensemble SE and meta learner MM are dynamically constructed online. The online training mechanism includes two submodules: base learner online learning and meta learner online learning. Each base learner (denoted as BM) is composed of a long short-term memory network (Long Short-Term Memory, referred to as LSTM) and a gated recurrent unit (GRU); the online training mechanism uses an online method to construct a base learner ensemble SE from 0 to n (in the present invention, n is a variable and an integer), using {BM0,...,BM n}, and use the multivariate linear regressor as the meta-learner MM, and construct the online training data of the meta-learner MM based on the intermediate prediction data obtained by the base learner ensemble SE. The method of this step is as follows:

[0018] Step 2.1. Online learning of base learners: dynamically build the base learner ensemble SE online. The specific method is as follows:

[0019] Hot start: First, the initial base learner BM0{lstm0,gru0} obtained by training the offline data B0 as the first data subset is added to the base learner ensemble SE. When the number of base learners included in the base learner ensemble SE is 1 (i.e., it only includes the initial base learner BM0{lstm0,gru0}), the initial base learner BM0{lstm0,gru0} is directly used to predict the wellhead pressure value, and the predicted average of lstm0 and gru0 is used as the wellhead pressure prediction value.

[0020] As the fracturing operation data flow continues to increase, the OSE-MS model continuously delays the verification of the current prediction effect during the entire prediction process. The specific operation is as follows: after each wellhead pressure value prediction is completed, if the current OSE-MS model prediction error is greater than the prediction loss threshold T h , then the data stream dynamic collection method is triggered. The data stream dynamic collection method is: let the collection time point be t 1 , the time period (t 0 ,t 1 ] are used to perform feature engineering data conversion on several fracturing operation data (whose number is greater than the minimum number of samples M for model training) to obtain a data subset B1, and a new base learner BM1 is obtained by online training using the data subset B1, and the new base learner BM1 is added to the base learner ensemble SE. The data subset B continuously obtained in this step n With B n-1 There is no overlap between them, so the differentiated base learner BM can be obtained continuously n {lstm n ,gru n} to adapt to the current data distribution.

[0021] Preferably, when initializing the settings in step 1, the maximum number of base learners N is also initialized. N is a constant used to limit the number of base learners in the base learner ensemble SE during the entire prediction process to control the memory space occupied by the OSE-MS model during the prediction process. After setting the maximum number of base learners N, the maximum number of base learners n in the base learner ensemble SE has a value range of [0, N].

[0022] Step 2.2. Meta-learner online learning: Subset the data {B0,...,B n} is used as the validation set of the base learner ensemble SE to obtain intermediate prediction data; feature engineering is used to convert the acquired true value of the wellhead pressure to obtain the real data label, and the intermediate prediction data is concatenated with the real data label to construct the online training data of the meta-learner MM.

[0023] When the number of base learners in the base learner ensemble SE changes, it is assumed that there are n data subsets {B0,B1,...,B n} and the corresponding trained n base learners {BM0,BM1,...,BM n}, where the data corresponding to the n sub-datasets are The kth (k is a variable, and 1≤k≤n-1) data subset is used as the validation set of the k+1th base learner, and the initial base learner BM0 will use the validation set B at the current time n Fitting is performed to obtain the corresponding intermediate prediction data. Finally, the intermediate prediction data Sorted by timestamp and real data labels (Each element in the real data label is n The real value of the wellhead pressure obtained after time and the real label obtained after feature engineering data conversion are spliced ​​to obtain the training data of the meta-learner MM.

[0024] Step 2.3. Dynamic integration: Based on the real-time accuracy evaluation method and the number of fracturing operation data that have not been trained online in the fracturing operation data stream, determine whether to add a base learner; based on the prediction errors before and after adding the base learner, determine whether to delete the base learner in the base learner ensemble SE. The method of this step is as follows:

[0025] Real-time accuracy evaluation method: Let the time point of the last data subset collection be t n-1 , each time the wellhead pressure value prediction is completed, t is calculated n-1 From time t to the current time t, all wellhead pressure prediction values And all the real values ​​of wellhead pressure obtained The prediction error between .

[0026] Dynamically add base learners: If the prediction error of the multi-time step prediction data of the current OSE-MS model is greater than the prediction loss threshold T h And the time period [t n-1 When the number of fracturing operation data in the time period [t +1,t] is greater than the minimum number of samples M for model training, the data stream dynamic collection method is triggered: First, the data in the time period [t n-1 +1,t], the fracturing operation data within is transformed into feature engineering data to obtain a new data subset, which is then used for online training to obtain a new base learner, and the new base learner is added to the base learner ensemble SE. Finally, the base learner ensemble SE is used to iterate the meta-learner MM; and the variable Δ is set equal to the prediction error of the current OSE-MS model to determine whether the base learner needs to be dynamically deleted in the future.

[0027] Dynamically delete base learners: In order to limit the scale of the OSE-MS model and effectively improve the overall prediction performance, weak base learners need to be deleted during the dynamic integration process: if the prediction error after adding a base learner is greater than the prediction error Δ before adding a base learner, the time period [tN verify ,t] fracturing operation data as the validation set, calculate the prediction error of each base learner in the validation set, delete the base learner corresponding to the largest prediction error (the base learner is the weak base learner), and retrain the meta learner MM. If the maximum number of base learners N is initialized, the judgment condition for whether the weak base learner needs to be deleted is: the prediction error after adding a base learner is greater than the prediction error Δ before adding a base learner, or the number of base learners in the base learner ensemble SE is greater than the maximum number of base learners N. When this condition is met, the weak base learner in the base learner ensemble SE needs to be deleted.

[0028] Online prediction: The OSE-MS model uses feature engineering to convert the real-time fracturing operation data into multi-time step data, and then obtains the intermediate prediction data through the base learner integration SE. After averaging the intermediate prediction data, it is input into the meta-learner MM, which makes the final prediction and obtains multi-time step prediction data, that is, multiple wellhead pressure prediction values.

[0029] Preferably, the prediction error is calculated using mean absolute error, root mean square error or mean absolute percentage error.

[0030] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0031] 1. Since fracturing operations are often carried out in sections according to well depth, the geology of each section varies greatly, and it is difficult to collect complete training data. Therefore, this method first obtains an initial base learner based on a small amount of offline data training to achieve a hot start of prediction; as real-time fracturing operation data continues to arrive, the prediction error of the current OSE-MS model prediction result is continuously evaluated. When the prediction error exceeds the set prediction loss threshold, a new base learner is trained using the previously collected fracturing operation data, and added to the OSE-MS model online in a Stacking integrated manner, the meta-learner MM is updated, and finally multi-time step prediction data is obtained. The present invention combines online learning and Stacking integration, continuously learns new data distributions and forgets outdated concepts, and improves the adaptability and prediction performance of the integrated model OSE-MS to changes in data stream distribution.

[0032] 2. Regarding the prediction performance of wellhead pressure during fracturing construction, compared with various existing benchmark methods, this method has improved the MAE, RMSE, and MAPE indicators by more than 63.8%, 56.0%, and 64.6%, respectively. It has high prediction accuracy and is highly consistent with the actual wellhead pressure.

[0033] 3. This method uses multiple recurrent neural network models as base learners, reducing the error accumulation caused by the long prediction output window; integrating the recurrent neural network in the form of Stacking gives full play to the advantages of strong stability of the integrated model, overcomes the defect of large fluctuations in the prediction performance of the recurrent neural network, and can still maintain good stability when predicting 30 steps in advance. In field applications, it can provide reliable multi-step prediction results of wellhead pressure to on-site construction personnel, helping them to adjust fracturing operation parameters in time, which is of positive significance to improving operation efficiency and avoiding the occurrence of safety accidents. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0035] Figure 1 Figure A is a comparison of the prediction performance of the present invention and the existing method;

[0036] Figure 2 Figure B is a comparison of the prediction performance of the present invention and the existing method;

[0037] Figure 3 It is a characteristic engineering schematic diagram of the present invention;

[0038] Figure 4 Schematic diagram of online training of OSE-ME model in the present invention;

[0039] Figure 5 This is a comparison chart of MAE change trends between the present invention and the existing method at different prediction steps;

[0040] Figure 6 This is a comparison chart of RMSE variation trends between the present invention and the existing method at different prediction steps;

[0041] Figure 7 This is a comparison chart of MAPE change trends between the present invention and the existing method in different prediction steps. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0043] An online multi-step prediction method for wellhead pressure based on Stacking ensemble learning is proposed. The OSE-MS model is constructed, the fracturing operation data is acquired in real time and input into the OSE-MS model, the multi-time-step prediction data is output based on the OSE-MS model, and the OSE-MS model is updated using the fracturing operation data.

[0044] Among them, the fracturing operation data includes the wellhead pressure value and its related factor data set. The related factor data set includes the characteristics of fracturing physical segment, stage, casing pressure, discharge displacement, stage discharge displacement, cumulative discharge displacement, and sand concentration. The number of features contained in the related factor data set is d, where d is a variable and a positive integer. The fracturing operation data is single time step data, as shown in formula (1):

[0045]

[0046] The OSE-MS model includes three parts: feature engineering, online training mechanism and online prediction. The method of building the OSE-MS model includes the following steps:

[0047] Step 1. Initialization settings: Initialize parameters and train the initial base learner BM0{lstm0,gru0} based on the offline data B0. The parameters include the prediction loss threshold T h , minimum number of samples for model training M, prediction output window size w, maximum number of base learners N, number of validation sets N verify , T h , M, w, N verify The offline data B0 is a constant in the time period [1, t 0 ]The feature data is obtained by converting the real fracturing operation data into feature engineering data.

[0048] Specifically, the prediction loss threshold T h The setting of is related to the application scenario and controls the time to update the OSE-MS model; the minimum number of model training samples M is the minimum number of training samples for the base learner units LSTM and GRU, which depends on whether the prediction accuracy of the OSE-MS model trained with M fracturing operation data can meet the application requirements; the prediction window size w controls the prediction time span. The larger the window size, the greater the impact of this parameter on the prediction accuracy, which can be seen in Section 3.2 below; the maximum number of base learners N controls the number of base learners included in the base learners in the base learner ensemble SE. The larger N is, the higher the memory space occupied by the OSE-MS model. The determination of N needs to be combined with the hardware equipment in the application scenario and the prediction time requirements.

[0049] Among them, the method of feature engineering data conversion is: based on the prediction output window size w, the fracturing operation data is divided by a sliding time window, and the divided fracturing operation data is converted into multi-time step data by feature engineering.

[0050] Specifically, feature engineering uses fracturing operation data at multiple consecutive moments to model wellhead pressure values ​​at multiple moments in the future, thereby constructing a mapping relationship between historical fracturing operation data and future wellhead pressure changes.

[0051] In order to convert single time step data into multi-time step data, this method divides the fracturing operation data into a series of time segments by sliding the time window, and sets the time segment step to 1s. Figure 3 As shown, Figure 3 In the figure, the horizontal axis represents time and the vertical axis represents the true value of the wellhead pressure. Assuming that the current time is t, the sliding time window size is set to be equal to the prediction output window size w, and t>w, then the white box represents the feature data composed of the feature vector corresponding to the time period [tw, t-1] and the true value of the wellhead pressure, represented by {X' t-w ,X' t-w+1 ,...,X' t-1 The gray box represents the predicted value of the wellhead pressure predicted by the OSE-MS model for the time period [t, t+w-1] starting from time t. use In the prediction process, the OSE-MS model also continuously obtains the true value of the wellhead pressure, that is, y t At time t+1, it can be obtained. Similarly, the true value of the wellhead pressure y at time t+w-1 t+w-1 It can be obtained at time t+w. Therefore, starting from time t, the real value sequence of wellhead pressure in the sliding time window with width w {y t ,y t+1 ,..,,yt+w-1} will be obtained after w time. Through the above feature engineering, the historical wellhead pressure data is converted into the real label for subsequent online training, and Y t-w The feature engineering data transformation is shown in formulas (2) and (3).

[0052]

[0053]

[0054] The multi-time step data obtained after the single time step data is converted into feature engineering data is (X'1, Y1), (X'2, Y2), ..., (X' t-w ,Y t-w ), where X' t-w is the characteristic value that will be input into the OSE-MS model at time t-w, Y t-w is the true value of the wellhead pressure collected after w time and the true label after feature engineering data conversion.

[0055] Step 2. Online training: Based on the online training mechanism, the base learner ensemble SE and meta-learner MM are dynamically constructed online.

[0056] like Figure 4 As shown in Figure 1, the online training mechanism includes two submodules: base learner online learning and meta learner online learning, represented by subgraphs (a) and (b) respectively. Each base learner BM is composed of an LSTM unit and a GRU unit, and an online base learner ensemble SE is constructed from 0 to n, represented by {BM0,...,BM n At the same time, in order to prevent overfitting, a multivariate linear regressor is used as the meta-learner MM, and the intermediate prediction data obtained by integrating the base learner SE Construct online training data for the meta-learner MM, and finally predict multi-time-step prediction data by the meta-learner MM.

[0057] Step 2.1. Online learning of base learners: dynamically build the base learner ensemble SE online as follows:

[0058] Hot start: First, the initial base learner BM0{lstm0,gru0} obtained by training the offline data B0 as the first data subset is added to the base learner ensemble SE; when the number of base learners contained in the base learner ensemble SE is 1 (that is, it only contains the initial base learner BM0{lstm0,gru0}), the initial base learner BM0{lstm0,gru0} is directly used to predict the wellhead pressure value, and the predicted average value of lstm0 and gru0 is used as the predicted value of the wellhead pressure.

[0059] As the wellhead pressure data flow continues to increase, the OSE-MS model continuously delays the verification of the current prediction effect during the entire prediction process. The specific operation is as follows: after each wellhead pressure value prediction is completed, if the mean absolute error value of the current OSE-MS model is greater than the prediction loss threshold T h , then the data stream dynamic collection method is triggered. The data stream dynamic collection method is: let the collection time point be t 1 , the time period (t 0 ,t 1 ] are used to perform feature engineering data conversion on several fracturing operation data (whose number is greater than the minimum number of samples M for model training) to obtain a data subset B1, and a new base learner BM1 is obtained by online training using the data subset B1, and the new base learner BM1 is added to the base learner ensemble SE. The data subset B continuously obtained in this step n With B n-1 There is no overlap between them, so the differentiated base learner BM can be obtained continuously n {lstm n ,gru n} to adapt to the current data distribution.

[0060] Step 2.2. Meta-learner online learning: Subset the data {B0,...,B n} is used as the validation set of the base learner ensemble SE to obtain intermediate prediction data; feature engineering is used to convert the acquired true value of the wellhead pressure to obtain the real data label, and the intermediate prediction data is concatenated with the real data label to construct the online training data of the meta-learner MM.

[0061] When the number of base learners in the base learner ensemble SE changes, it is assumed that there are n data subsets {B0,B1,...,B n} and the corresponding trained n base learners {BM0,BM1,...,BM n}, where the data corresponding to the n sub-datasets are The kth (k is a variable, and 1≤k≤n-1) data subset is used as the validation set of the k+1th base learner (i.e., the offline data B0 is used as the validation set of the new base learner BM1, and the data subset B n-2 As a new basis learner BM n-1 The validation set, data subset B n-1 As a new basis learner BM n The initial base learner BM0 will use the current time validation set B n Fitting is performed to obtain the corresponding intermediate prediction data. Finally, the intermediate prediction data Sorted by timestamp and real data labels (Each element in the real data label isn The real value of the wellhead pressure obtained after time and the real label obtained after feature engineering data conversion are spliced ​​to obtain the training data of the meta-learner MM. During the entire prediction process, the meta-learner MM will be continuously iterated and updated with the dynamic integration of the base learners, so that it can obtain better prediction performance.

[0062] Step 2.3. Dynamic integration: Based on the real-time accuracy evaluation method and the number of fracturing operation data that have not been trained online in the fracturing operation data stream, determine whether to add a base learner; based on the mean absolute error before and after adding the base learner, determine whether to delete the base learner in the base learner ensemble SE. The method of this step is as follows:

[0063] Real-time accuracy evaluation method: Let the time point of the last data subset collection be t n-1 , each time the wellhead pressure value prediction is completed, t is calculated n-1 From time t to the current time t, all wellhead pressure prediction values And all the real values ​​of wellhead pressure obtained The mean absolute error value δ between them is calculated as shown in formula (4):

[0064]

[0065] In the above formula, i is the independent variable, y i and They represent the true value of the wellhead pressure and the predicted value of the wellhead pressure at time i respectively.

[0066] Dynamically add base learners: If the mean absolute error value δ of the multi-time step prediction data of the current OSE-MS model is greater than the prediction loss threshold T h And the time period [t n-1 ,t] is greater than the minimum number of samples M for model training, the data stream dynamic collection method is triggered: first, the time period [t n-1 +1,t], the fracturing operation data within the range of t is transformed into feature engineering data to obtain a new data subset, which is then used for online training to obtain a new base learner, and the new base learner is added to the base learner ensemble SE. Finally, the base learner ensemble SE is used to iterate the meta-learner MM. The variable Δ is set equal to the mean absolute error value δ of the current OSE-MS model, which is used to determine whether the base learner needs to be dynamically deleted in the future.

[0067] Dynamically delete base learners: In order to limit the scale of the OSE-MS model and effectively improve the overall prediction performance, weak base learners need to be deleted during the dynamic integration process: if the mean absolute error value δ after adding a base learner is greater than the mean absolute error value Δ before adding a base learner, or the number of base learners is greater than the maximum number of base learners N, the time period [tN verify ,t] as the validation set, calculate the mean absolute error δ of each base learner in the validation set, delete the base learner corresponding to the largest mean absolute error value (the base learner is the weak base learner), and retrain the meta-learner MM. The mean absolute error δ of the dynamic deletion base learner stage is shown as follows:

[0068]

[0069] In the above formula, N verify is the total number of data, i is the independent variable, y i and They represent the true value of the wellhead pressure and the predicted value of the wellhead pressure at time i respectively.

[0070] Online prediction: The OSE-MS model uses feature engineering to convert the real-time fracturing operation data into multi-time step data, and then obtains the intermediate prediction data through the base learner integration SE. After averaging the intermediate prediction data, it is input into the meta-learner MM, which makes the final prediction and obtains multi-time step prediction data, that is, multiple wellhead pressure prediction values.

[0071] The test of this method is as follows:

[0072] 1. Data description

[0073] The experimental data is fracturing operation data. The data set is sampled in seconds and includes 139,800 fracturing operation data instances and 8 features. The data set features and their related descriptions are shown in Table 2 below.

[0074] Table 2 - Fracturing data description

[0075] Feature Name unit Maximum Minimum average value Standard Deviation Fracturing physical section - - - - - stage - - - - - Casing Pressure MPa 19.73 3.98 9.64 2.24 Discharge volume <![CDATA[m 3 / min]]> 12.54 2.04 11.05 0.98 Stage discharge volume <![CDATA[m 3 ]]> 262.34 0.04 22.05 20.05 Cumulative discharge volume <![CDATA[m 3 ]]> 2326.29 94.29 1058.24 545.64 Sand concentration <![CDATA[Kg / m 3 ]]> 190.80 0.00 41.58 50.91 Wellhead pressure MPa 88.74 57.41 75.86 4.09

[0076] 2. Experimental Setup

[0077] The experimental hardware environment of this experiment is Intel I9-9900 CPU and NVIDIA Geforce 2080s graphics card.

[0078] In order to evaluate the performance of multi-step prediction of this method, the experiment compared it with LSTM, GRU, Multilayer Perceptron (MLP), Random Forests (RF) and Bootstrap aggregating (Bagging) in ensemble learning methods. The neural network model is implemented using the Keras framework, and the ensemble learning method is implemented based on the Scikit-Learn package.

[0079] In this experiment, the base learner units LSTM and GRU are set to a simple two-layer structure, each layer contains 200 neurons; the model parameters are adjusted using the stochastic gradient descent method of the ADAM optimizer; through experimental analysis, the loss threshold T is set h When it is 0.7, a relatively stable result can be obtained; at the same time, in order to make the base learner have good prediction performance, the minimum number of samples for model training is set to 500; combined with the opinions of on-site experts, the maximum number of base learners is set to 8, which can meet the memory usage requirements of on-site operations. The parameter settings of the LSTM and GRU methods in the comparison method are the same as those in the OSE-MS model. MLP uses the ADAM optimizer and the activation function is the Relu function. The number of base learners in the random forest and bagging algorithms is set to 100.

[0080] The mean absolute error (MAE), root mean square error (RMSE) and mean absolute percentage error (MAPE) are used to measure the prediction performance. Their definitions are as shown in the following equations (6)-(8):

[0081]

[0082]

[0083]

[0084] Among them, n is the total number of wellhead pressure prediction data, y t and They represent the true value and predicted value at time t respectively.

[0085] 3. Experimental results and analysis

[0086] The multi-step prediction effect of the present invention in the fracturing operation scenario is tested and analyzed, including multi-step prediction performance analysis, stability analysis, time efficiency analysis and parameter experiments.

[0087] 3.1 Prediction Performance

[0088] Single-step prediction: Currently, many models can only achieve single-step prediction. In order to illustrate the effectiveness of the present invention, the performance of single-step prediction of the OSE-MS model on fracturing data is first compared with that of several other regression models. The experimental results are shown in Table 3.

[0089] Table 3 - Single-step prediction performance comparison

[0090] Model MAE RMSE MAPE / % LSTM 0.907 1.125 1.208 GRU 1.271 1.487 1.726 MLP 2.177 2.688 2.924 RF 3.955 4.962 5.032 Bagging 3.982 4.961 5.015 OSE-MS 0.603 0.883 0.823

[0091] The results show that the deep learning model has better prediction accuracy than the integrated learning model, and the OSE-MS model integrated with LSTM and GRU has a significant performance improvement compared with other models, with MAE, RMSE and MAPE increased by 33.5%, 21.5% and 31.9% respectively. This fully demonstrates that the OSE-MS model still has a good prediction effect in single-step prediction.

[0092] Multi-step prediction: This experiment designed a series of prediction steps for comparison, with a step range of [2-20] steps and a step interval of 2. Three experiments were conducted for each prediction step, for a total of 30 experiments. Table 4 below shows the average performance comparison of the multi-step prediction of the present invention and the benchmark method.

[0093] Table 4 - Comparison of average performance of multi-step prediction

[0094] Model MAE RMSE MAPE / % LSTM 1.944 2.367 2.630 GRU 1.819 2.158 2.487 MLP 3.793 4.723 5.013 RF 2.711 3.884 3.457 Bagging 2.712 3.884 3.776 OSE-MS 0.657 0.950 0.881

[0095] According to the above table, in the multi-step prediction task, the GRU in the deep learning model performs better than the LSTM. Compared with the GRU model, the present invention has improved the MAE, RMSE and MAPE indicators by 63.8%, 56% and 64.6% respectively, which is a significant increase compared to the single-step prediction task. It can be seen that the present invention integrates the deep learning model with the online Stacking method, combines the advantages of LSTM and GRU in joint modeling of the prediction output window, and can adapt to the distribution changes of the data stream in real time.

[0096] In order to more intuitively compare the prediction performance of this method with existing methods, Figure 1 and Figure 2 The prediction curves of the [0,4000] time interval and the [14000,18000] time interval in the wellhead pressure data stream test data are shown respectively. This experiment uses only 2000 offline data as training data to obtain the initial OSE-MS model. It can be seen from the experimental results that compared with other methods, the prediction value of the wellhead pressure of this method always maintains the smallest prediction error with the true value.

[0097] 3.2 Multi-step prediction stability

[0098] In order to analyze the stability of the OSE-MS method, this section expands the range of prediction steps and conducts statistical analysis in the interval of [2-30]. The step size is set to 2, and three experiments are performed for each prediction step, for a total of 45 experiments. Figures 5 to 7 The changes of MAE, RMSE, and MAPE are shown respectively. As can be seen from the figure, the prediction performance of MLP fluctuates most obviously, indicating that the prediction effect of MLP is not closely related to the number of prediction steps. As the number of prediction steps increases, the prediction performance of random forest and bagging algorithms fluctuates the least, indicating that ensemble learning is extremely stable in multi-step prediction, but its prediction accuracy is much lower than that of deep learning models, and is not suitable for scenarios with high precision requirements. LSTM and GRU have a smaller fluctuation range. As the number of steps increases, the prediction accuracy shows a fluctuating downward trend, which conforms to the general law of multi-step prediction. The present invention combines the characteristics of high prediction accuracy of deep learning models and strong stability of ensemble models, and integrates LSTM and GRU base learners in the form of Stacking integration, which always maintains the best prediction accuracy in this experiment; when the prediction steps are in the range of [2-20], the stability of the OSE-MS model is relatively strong. After exceeding 20 steps, the prediction accuracy changes greatly, but the overall stability is second only to ensemble learning, which fully verifies the effectiveness and reliability of the OSE-MS model.

[0099] 3.3 Time efficiency

[0100] In order to evaluate the effectiveness of the present invention, this section experimentally counts the average unit training time of the newly added base learners and the average number of online newly added base learners of the dynamically updated base learner ensemble SE within the prediction step range of [2-30].

[0101] In actual fracturing operations, the fracturing operation time of a well is usually about 1-2 days. In this method, the average training time for each hundred data of the base learner is about 0.044 seconds during online training. During the entire operation, the number of online base learners added is about 9.33 times on average. This shows that this method can fully meet the timeliness requirements of fracturing operations and has high practical application value.

[0102] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. An online multi-step prediction method for wellhead pressure based on Stacking ensemble learning, characterized in that: Build an online Stacking integrated multi-step prediction model, obtain fracturing operation data in real time and input it into the online Stacking integrated multi-step prediction model, output multi-time step prediction data based on the online Stacking integrated multi-step prediction model, and use the fracturing operation data to update the online Stacking integrated multi-step prediction model; Among them, building an online Stacking integrated multi-step prediction model includes the following steps: Step 1. Initialization settings: Initialize parameters and train an initial base learner based on offline data, where the parameters include the prediction loss threshold T h , minimum number of samples for model training M, prediction output window size w, number of validation sets N verify , T h , M, w, N verify are all constants; the offline data is feature data obtained by converting the real fracturing operation data within a period of time during the fracturing operation through feature engineering data; Step 2. Online training: Based on the online training mechanism, the base learner ensemble SE and meta learner MM are dynamically constructed online. The specific operations are as follows: Step 2.

1. Online learning of base learners: Add the initial base learner to the base learner ensemble SE, and continuously delay the verification of the prediction effect of the online Stacking ensemble multi-step prediction model. That is, after each wellhead pressure prediction, if the prediction error of the current online Stacking ensemble multi-step prediction model is greater than the prediction loss threshold T h , then a data subset is obtained based on the data stream dynamic collection method, a new basis learner is trained online using the data subset, and the new basis learner is added to the basis learner ensemble SE; Step 2.

2. Meta-learner online learning: All data subsets are used as validation sets of the base learner ensemble SE to obtain intermediate prediction data; feature engineering is used to convert the acquired true values ​​of the wellhead pressure to obtain real data labels, and the intermediate prediction data is concatenated with the real data labels to construct online training data for the meta-learner MM; Step 2.

3. Dynamic integration: Based on the real-time accuracy evaluation method and the number of fracturing operation data that have not been trained online in the fracturing operation data stream, determine whether to add a base learner; based on the prediction error before and after adding the base learner, determine whether to delete the base learner in the base learner ensemble SE.

2. The method for online multi-step prediction of wellhead pressure based on Stacking ensemble learning according to claim 1 is characterized in that: The fracturing operation data includes a wellhead pressure value and a data set of related factors, and the data set of related factors includes a characteristic fracturing physical segment, a stage, a casing pressure, a discharge displacement, a stage discharge displacement, a cumulative discharge displacement, and a sand concentration.

3. The method for online multi-step prediction of wellhead pressure based on Stacking ensemble learning according to claim 1 is characterized in that: The method of feature engineering data conversion is as follows: based on the prediction output window size w, the fracturing operation data is divided by a sliding time window, and the divided fracturing operation data is converted into multi-time step data by feature engineering.

4. The method for online multi-step prediction of wellhead pressure based on Stacking ensemble learning according to claim 1, characterized in that: In step 2.1, the data stream dynamic collection method is: the fracturing operation data that has not been trained online are sorted in chronological order, and feature engineering data conversion is performed on multiple fracturing operation data to obtain a data subset, wherein the number of the multiple fracturing operation data is greater than the minimum number of samples M for model training.

5. The method for online multi-step prediction of wellhead pressure based on Stacking ensemble learning according to claim 1, characterized in that: In step 2.3, the real-time accuracy evaluation method is: each time the wellhead pressure value prediction is completed, the last data subset collection time point t is calculated. n-1 The prediction error between all the wellhead pressure prediction values ​​and all the acquired wellhead pressure true values ​​up to the current time t; The method for determining whether to add a base learner is: if the prediction error of the multi-time-step prediction data of the current online Stacking integrated multi-step prediction model is greater than the prediction loss threshold T h , and the time period [t n-1 +1,t] is greater than the minimum number of samples M for model training of the data subset, a new base learner is added based on the data stream dynamic acquisition method: First, the time period [t n-1 +1,t], the fracturing operation data within the range of [1, 1, 2] is transformed into feature engineering data to obtain a new data subset, which is then used for online training to obtain a new base learner, and the new base learner is added to the base learner ensemble SE, and finally the base learner ensemble SE is used to iterate the meta-learner MM; The method for determining whether to delete the base learner is as follows: if the prediction error after adding the base learner is greater than the prediction error before adding the base learner, the base learner needs to be deleted: intercept time period [tN verify ,t] as the validation set, calculate the prediction error of each base learner in the validation set, delete the base learner corresponding to the largest calculated prediction error, and retrain the meta-learner MM. The deleted base learner is the weak base learner.

6. The method for online multi-step prediction of wellhead pressure based on Stacking ensemble learning according to claim 1, characterized in that: The method for outputting multi-time-step prediction data based on the online Stacking integrated multi-step prediction model is as follows: the online Stacking integrated multi-step prediction model uses feature engineering to convert the real-time acquired fracturing operation data into multi-time-step data, and then obtains intermediate prediction data based on the base learner integration SE. After averaging the intermediate prediction data, it is input into the meta-learner MM, and the multi-time-step prediction data is obtained through the meta-learner MM prediction.

7. The method for online multi-step prediction of wellhead pressure based on Stacking ensemble learning according to claim 1 or 5, characterized in that: The prediction error is calculated by using mean absolute error, root mean square error or mean absolute percentage error.

8. The method for online multi-step prediction of wellhead pressure based on Stacking ensemble learning according to claim 1, characterized in that: In the step 1, a maximum number N of base learners is also initialized, where N is a constant used to limit the number of base learners in the base learner ensemble SE. The value range of the number of base learners in the base learner ensemble SE is [0, N].

9. The method for online multi-step prediction of wellhead pressure based on Stacking ensemble learning according to claim 8, characterized in that: The judgment condition for determining whether a weak base learner needs to be deleted is: the prediction error after adding a base learner is greater than the prediction error before adding the base learner, or the number of base learners in the base learner ensemble SE is greater than the maximum number of base learners N. When this condition is met, the weak base learner in the base learner ensemble SE needs to be deleted.