Low-yield gas well intelligent intermittent opening real-time production dynamic prediction method
Through the Seq2Seq deep learning model and LSTM network, the problem of dynamic prediction of high-frequency real-time production between gas wells between low-yield gas wells is solved, and efficient and high-precision real-time prediction is achieved, which is suitable for field applications and reduces computing costs.
Patent Information
- Application Number
- CN202411007082.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-15
AI Technical Summary
Traditional methods are difficult to achieve high-frequency real-time production dynamic prediction of gas-opening wells between low-yield gas wells, and are highly computationally cost-effective and are not suitable for on-site real-time applications.
The Seq2Seq deep learning model is used combined with the LSTM network, and preprocessing and model training is performed based on high-frequency inter-gas-opening well production data, automatically splitting the inter-opening cycles and extracting key parameters to achieve real-time prediction of production parameters in the future cycle.
It realizes efficient and high-precision real-time production dynamic prediction of gas-opening wells between low-yield gas wells, reduces calculation costs, is suitable for on-site real-time dynamic prediction, and improves prediction accuracy and speed.
Smart Images

Figure CN118965158A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of computer deep learning and natural gas extraction, and in particular to a method for intelligently splicing and dynamically predicting real-time production of low-yield gas wells. Background Art
[0002] my country has abundant low-permeability gas reservoirs. However, due to the poor physical properties of some reservoirs, the developed gas wells have the characteristics of low pressure, low production and low efficiency. The experience of gas field development shows that in the middle and late stages of natural gas production, due to the decline in formation energy, the stable production capacity of gas wells deteriorates and the production decreases. At the same time, the internal gas flow in the gas wells is insufficient in carrying liquid, which is prone to liquid accumulation, thus severely restricting natural gas production. Gas well interleaving production is a commonly used drainage gas production process in the production of low-pressure, low-yield and liquid-accumulating gas wells. Specifically, after the gas wells are opened for production for a period of time, the wells are shut down for a period of time to restore the formation pressure in order to achieve periodic drainage and improve the gas well production capacity. The reasonable design of the interleaving system has a significant impact on the implementation effect of gas well interleaving. Efficient and accurate simulation or prediction of the changes in relevant production parameters of interleaved gas wells to characterize the interleaved production performance of gas wells is a necessary prerequisite for the above work. Since the interleaved gas well production process is a large-scale simulation problem involving multiple phases and multiple flow states, the traditional numerical simulation method based on computational fluid dynamics (CFD) has great limitations in its actual application in gas fields due to its high computational cost and time cost.
[0003] With the rapid development of artificial intelligence technology, deep learning has been widely used in the field of oil and gas fields, and can achieve prediction by analyzing information in a large amount of historical data. The wellhead data in the production process of intermittent gas wells is a typical time series data. The long short-term memory neural network (LSTM) can solve the gradient vanishing and gradient explosion problems in the traditional recurrent neural network (RNN), and enhance the modeling ability of long-term dependencies, which enables LSTM to achieve better prediction results when processing gas well production data with time series characteristics. However, for the high-frequency (minute-level) real-time production data of intermittent gas wells, the conventional prediction scheme based on dynamic pressure and production cannot achieve real-time production dynamic prediction due to the huge amount of data, the difficulty of prediction work and the high time cost, and is not suitable for real-time production dynamic prediction of field gas wells. Therefore, how to establish a deep learning model based on a large amount of high-frequency production data of gas wells and combine it with a deep learning architecture to achieve real-time production dynamic prediction of intermittent gas wells, and at the same time, it can improve the accuracy and time cost compared with conventional methods is a problem that needs to be solved urgently. Summary of the invention
[0004] In view of the above shortcomings, the present invention proposes a method for predicting the real-time production dynamics of low-yield gas wells by intelligent splicing. The method first automatically splits the splicing cycle and extracts the key production parameters of the splicing cycle according to the high-frequency (minute-level) data of the splicing gas wells, and efficiently characterizes the splicing production performance of the gas wells. Then, a Seq2Seq deep learning model for predicting key splicing parameters is constructed to efficiently and accurately predict the production dynamics of gas wells under different splicing cycle systems, and realize the real-time production dynamics prediction of splicing gas wells.
[0005] The present invention specifically adopts the following technical solutions:
[0006] A method for predicting the real-time production dynamics of a low-yield gas well by intelligent intermittent production, comprising the following steps:
[0007] Step 1: pre-process the acquired high-frequency gas well production time series data, automatically extract the key parameters of the cycle, and construct a cycle parameter data set;
[0008] Step 2: Establish a deep learning model based on Seq2Seq architecture;
[0009] Step 3: Deep learning model established based on data set training;
[0010] Step 4: Input real-time data into the trained deep learning model and make real-time predictions of key production parameters for future cycles.
[0011] Preferably, the preprocessing of the acquired high-frequency gas well production time series data in step 1 comprises the following steps:
[0012] 1) Perform data cleaning for data anomalies;
[0013] 2) Taking the interval period parameter as an indicator;
[0014] 3) Using high-frequency data as a carrier, extracting according to cycle parameters, splitting the original minute-level time series data into cycles according to the gas well intermittent production cycle, and automatically calculating and extracting the work system and key production parameters of each intermittent cycle. The extracted intermittent cycle parameters are used as subsequent analysis objects to construct an intermittent cycle data set, and divided into training set, validation set and test set according to a certain ratio;
[0015] 4) The improved Z-score method is used to process outliers in the divided data sets. The Z-score method combines the median and the median absolute deviation MAD to measure the concentration and dispersion of the data. MAD is used as a substitute for the standard deviation in the traditional Z-score method to calculate the improved Z-score of each data point. The calculation formula is:
[0016]
[0017] Where X is a single data value, n med is the median of the data set, n MAD is the median of all absolute deviations in the data set, and 0.6745 is used to adjust the Z-score distribution to make it closer to a standard normal distribution.
[0018] Preferably, the network architecture of the deep learning model in step 2 includes:
[0019] 1) The input of the deep learning model includes two parameters:
[0020] (i) Historical cycle work systems and key cycle production parameters;
[0021] (ii) the work system for future cycles;
[0022] The output of the deep learning model is the key cycle production parameters under the corresponding work system of the future cycle;
[0023] 2) For the prediction of key period production parameters, a deep learning model based on the Seq2Seq model architecture combined with the LSTM network is constructed. The specific architecture of the model includes: an encoding layer based on LSTM, a decoding layer based on LSTM, and an output layer composed of a fully connected layer;
[0024] The Seq2Seq model is also called the encoder-decoder model. The encoder encodes the input sequence into an intermediate vector as the input of the decoder through learning, and the decoder outputs the intermediate vector through learning.
[0025] The LSTM unit controls the continuous transmission and flow of information through the hidden state h and the cell state C, and determines which part of the information to retain and transmit through the gating mechanism, including the forget gate, input gate and output gate; the calculation formula of the forget gate is:
[0026] f t =σ(W f ·[h t-1 , x t ]+b f ) (2)
[0027] In the formula, f t is the output of the forget gate, h t-1 is the hidden state of the previous time step, x t is the input of the current time step, W f and b f is the weight and bias of the forget gate, σ is the Sigmoid activation function, and the calculation formula is: σ(x)=(1+e -x ) -1 ;
[0028] The calculation formula of the input gate is:
[0029] i t =σ(W i ·[h t-1 , x t ]+b i ) (3)
[0030] In the formula, i t is the output of the input gate, W i and b i are the weight and bias of the input gate, σ, h t-1 and x t The meaning of is the same as above;
[0031] The calculation formula for cell state update is:
[0032]
[0033] In the formula, is a candidate memory cell, C t is the output of the cell state at the current time step, C t-1 is the cell state at the previous time step, W c and b c are the weights and biases of the cell state, f t 、i t 、h t-1 and x t The meaning of is the same as above. Tanh is the activation function, and the calculation formula is:
[0034] The calculation formula of the output gate is:
[0035] o t =σ(W o ·[h t-1 , x t ]+b o ) (6)
[0036] In the formula, o t is the output of the output gate, W o and b o are the weight and bias of the output gate, σ, h t-1 and x t The meaning of is the same as above;
[0037] The LSTM-based encoding layer accepts the type I input in 1), extracts the complex cycle parameter relationship and timing information in the historical cycle data and stores them in the cell state and hidden state of the LSTM unit, and continuously transmits them in time steps; the LSTM-based decoding layer accepts the cell state and hidden state obtained in the last time step of the encoding layer as the initial state, and accepts the type II input in 1), and outputs the final cell state and hidden state; finally, the output of the LSTM network is converted into a suitable data format through a fully connected layer to realize the dynamic prediction output of key production parameters of future cycles.
[0038] Preferably, the model training process of step 3 is:
[0039] 1) Use the sliding window method to generate fixed-size subsequences from the continuous data sequences of each well in the training set and the validation set. These subsequences are encapsulated through the data loader in Pytorch to form batch data for model training;
[0040] 2) During the training and verification process of the deep learning model using the training set and the validation set, the prediction effect of the model is quantified by the mean square error loss function, and the model parameters are continuously optimized through the back propagation algorithm and the AdamW optimizer to minimize the difference between the model prediction value and the true value;
[0041] 3) The mean square error (MSE) is used as the loss function, which is often used in deep learning to quantify the difference between the model prediction value and the true value. The calculation formula of MSE is:
[0042]
[0043] In the formula, n is the number of samples, m is the output feature of each sample, and y ij and Respectively represent the true value and predicted value of the jth feature in the i-th sample;
[0044] 4) Use the AdamW optimizer in the Pytorch framework to calculate the network weights and perform parameter optimization. The update formula of AdamW is:
[0045] θ t =θ t-1 -αλθ t-1 (8)
[0046] In the formula, θ t is the model weight at the current time step, θ t-1 is the model weight at the previous time step, α is the learning rate, and λ is the regularization coefficient.
[0047] Preferably, the specific process of step 4 is:
[0048] 1) According to R2 The value is used to judge the prediction effect of the evaluation model on the test set. R is taken from the Pearson correlation coefficient, which is used to reflect the linear relationship between two quantities. The value range is [-1,1] and is defined as:
[0049]
[0050] In the formula, y true i and pre i Represent the i-th true value and predicted value respectively, and Represent the mean of the true value and the predicted value respectively; if R 2 The value result is close to 1, indicating that the predicted value and the true value are strongly correlated, and the model prediction effect is good; if R 2 The value result is close to 0, indicating that there is no relationship between the predicted value and the true value, and the model prediction effect is poor;
[0051] 2) Input the real-time high-frequency production data of the gas well into the trained deep learning model to automatically split each interval cycle and extract key cycle parameters. After the deep learning model predicts and outputs, the real-time prediction of the production parameters of the future interval cycle is obtained, realizing the real-time dynamic prediction of the intelligent interval production of the gas well.
[0052] The present invention has the following beneficial effects:
[0053] (1) This method can automatically split the intermittent period and extract the key production parameters of the intermittent period based on high-frequency (minute) real-time data, and efficiently characterize the intermittent production performance of gas wells.
[0054] (2) The Seq2Seq deep learning model constructed by this method for predicting key spacing parameters can efficiently and accurately predict the production performance of gas wells under different spacing cycle systems.
[0055] (3) Compared with conventional dynamic pressure and production prediction schemes, the method proposed in this paper has fast calculation speed and high accuracy, is more suitable for on-site real-time dynamic prediction, and can serve as the basis and technical support for the optimization of the working system of intermittent gas wells. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 A flow chart of a method for intelligently opening real-time production dynamic prediction for low-yield gas wells;
[0057] Figure 2 It is a schematic diagram of splitting high-frequency data of interspersed gas wells by period and extracting key parameters of interspersed period;
[0058] Figure 3 This is the core network architecture diagram of the deep learning model based on the Seq2Seq architecture;
[0059] Figure 4This is a detailed diagram of encoding and decoding of a deep learning model based on the Seq2Seq architecture.
[0060] Figure 5a is the casing pressure prediction result R at the end of shut-in in the test set 2 =0.94 Statistical chart;
[0061] Figure 5b is the casing pressure prediction result R at the end of well opening in the test set 2 =0.97 Statistical chart;
[0062] Figure 6 This is a comparison chart of the actual value and predicted value of the interval cycle parameter in a certain production period of a gas well. DETAILED DESCRIPTION
[0063] The specific implementation of the present invention is further described below in conjunction with the accompanying drawings and specific embodiments:
[0064] like Figure 1 As shown, a method for predicting the real-time production dynamics of a low-yield gas well intelligently is provided, comprising the following steps:
[0065] Step 1: pre-process the acquired high-frequency (minute-level) time-series data of gas well production, automatically extract key cycle parameters, and construct a cycle parameter data set;
[0066] The preprocessing of the acquired high-frequency (minute-level) time series data of gas well production includes the following steps:
[0067] 1) During the long-term data recording of gas wells, there may be abnormal conditions such as sensor failure or measurement error. Therefore, data cleaning processing is required for data anomalies such as data missing and data anomalies to ensure data quality.
[0068] 2) High-frequency (minute-level) data is too large in volume, and considering the characteristics of gas well intermittent production, data information in a large number of time periods may be invalid, and the processing cost is high. The changes in production parameters between different intermittent production cycles are more valuable for reflecting the changes in the intermittent production characteristics of gas wells. The changes in oil and casing pressure in different intermittent cycles can indirectly reflect the changes in the liquid accumulation of gas wells. The production capacity of gas wells in different intermittent cycles can be reflected by the average gas production in the well opening stage. Therefore, using the intermittent cycle parameters as indicators can not only avoid the tedious processing of high-frequency data, but also can reduce the workload while efficiently and comprehensively evaluating the production status of each intermittent cycle of the gas well.
[0069] 3) Using high-frequency data as a carrier, a program is written to automatically split the original minute-level time series data into cycles according to the gas well intermittent production cycle (an adjacent shut-in-well stage) according to the cycle parameter extraction idea in 2), and automatically calculate and extract the working system (cycle shut-in time and well opening time) and cycle key production parameters (such as the tubing and casing pressure at the end of well opening, the tubing and casing pressure at the end of well closing, and the average gas production in the well opening stage, etc.) in each intermittent cycle. The schematic diagram of cycle splitting and extraction of related intermittent cycle key parameters is shown in Figure 2 Subsequently, the extracted key parameters of the inter-opening cycle are used as the analysis object to construct an inter-opening cycle dataset, which is divided into a training set, a validation set, and a test set according to a certain ratio.
[0070] 4) Use the improved Z-score method to process outliers on the data set obtained in step 3). The Z-score method combines the median and median absolute deviation MAD to measure the concentration and dispersion of the data. MAD is used as a substitute for the standard deviation in the traditional Z-score method to calculate the improved Z-score of each data point. The calculation formula is:
[0071]
[0072] Where X is a single data value, n med is the median of the data set, n MAD is the median of all absolute deviations in the data set, and 0.6745 is used to adjust the Z-score distribution to make it closer to a standard normal distribution.
[0073] Step 2: Establish a deep learning model based on Seq2Seq architecture;
[0074] The network architecture of the deep learning model includes the following core parts:
[0075] 1) The input of the deep learning model includes two parts of parameters: (i) historical cycle work system and key cycle production parameter parameters: historical cycle well closing time, historical cycle well opening time, tubing pressure corresponding to the end time of well opening and closing in the historical cycle, casing pressure corresponding to the end time of well opening and closing in the historical cycle, and average gas production in the historical cycle; (ii) future cycle work system: future cycle well closing time and future cycle well opening time. The output of the deep learning model is the key cycle production parameters under the corresponding work system of the future cycle: casing pressure corresponding to the end time of well opening and closing in the future cycle, tubing pressure corresponding to the end time of well opening and closing in the future cycle, and average gas production in the future cycle;
[0076] 2) For the prediction of key cycle production parameters, a deep learning model based on the Seq2Seq model architecture combined with the LSTM network is constructed. The specific architecture of the model includes: an encoding layer based on LSTM, a decoding layer based on LSTM, and an output layer composed of a fully connected layer, such as Figure 3 shown.
[0077] The Seq2Seq model is also called the encoding-decoding model. The encoder encodes the input sequence into an intermediate vector as the input of the decoder through learning, and the decoder outputs the intermediate vector through learning. RNN is often used as an encoder and decoder in time series prediction tasks. In order to improve the prediction accuracy and solve the multi-input multi-output task, the present invention uses LSTM, one of the variants of RNN, as the encoder and decoder, which has better performance in dealing with long-term dependent prediction problems.
[0078] The LSTM unit controls the continuous transmission and flow of information through the hidden state h and the cell state C, and decides which part of the information to retain and transmit through the gating mechanism, including the forget gate, input gate and output gate. The calculation formula of the forget gate is:
[0079] f t =σ(W f ·[h t-1 , x t ]+b f ) (2)
[0080] In the formula, f t is the output of the forget gate, h t-1 is the hidden state of the previous time step, x t is the input of the current time step, W f and b f is the weight and bias of the forget gate, σ is the Sigmoid activation function, and the calculation formula is: σ(x)=1+e -x ) -1 ;
[0081] The calculation formula of the input gate is:
[0082] i t =σ(W i ·[h t-1 ,x t ]+b i ) (3)
[0083] In the formula, i t is the output of the input gate, W i and b i are the weight and bias of the input gate, σ, h t-1 and x t The meaning of is the same as above;
[0084] The calculation formula for cell state update is:
[0085]
[0086] In the formula, is a candidate memory cell, C t is the output of the cell state at the current time step, C t-1 is the cell state at the previous time step, W c and b c are the weights and biases of the cell state, f t 、i t 、h t-1 and x t The meaning of is the same as above. Tanh is the activation function, and the calculation formula is:
[0087] The calculation formula of the output gate is:
[0088] o t =σ(W o ·[h t-1 , x t ]+b o ) (6)
[0089] In the formula, o t is the output of the output gate, W o and b o are the weight and bias of the output gate, σ, h t-1 and x t The meaning of is the same as above.
[0090] First, the encoding layer based on LSTM accepts the input of type i in 1), extracts the complex cycle parameter relationship and timing information in the historical cycle data, and stores them in the cell state and hidden state of the LSTM unit, and continuously transmits them in time steps. Secondly, the decoding layer based on LSTM accepts the cell state and hidden state obtained in the last time step of the encoding layer as the initial state, and accepts the input of type ii in 1), and outputs the final cell state and hidden state. Finally, the output of the LSTM network is converted into a suitable data format through a fully connected layer to realize the dynamic prediction output of key production parameters in the future cycle;
[0091] 3) The specific flow of information in the encoding layer and decoding layer is as follows Figure 4 The LSTM encoding layer inputs the opening and closing system (opening and closing time) of each gas well in the previous m historical cycles and its corresponding key production parameter data, namely Figure 2 The first type of input data x. 0 , …, c m-1 and h 0 ,…,hm-1 The cell state and hidden state of the LSTM unit are continuously updated during the information transmission process. After the LSTM encoding layer processes and extracts historical information, the complex relationship of parameters obtained from the historical information is retained in the cell state and hidden state of the LSTM unit, and output in the last time step, which is represented as c in the figure. m and h m , used to initialize the LSTM decoding layer. m+1 , …, c n and h m+1 , ..., h n Inheriting the cell state and hidden state transmitted by the encoder, combined with the input of the future cycle's intermittent system, that is, the second type of input w in the figure, it can finally achieve the predicted output of the production parameters under the corresponding working system of the future m+1 to n cycles, Y m+1 , ..., Y n The production parameters of the intermittent gas wells under the working system corresponding to the future intermittent cycle output by the model.
[0092] Step 3: Deep learning model established based on data set training;
[0093] The core part of the model training process is:
[0094] 1) Use the sliding window method to generate fixed-size subsequences from the continuous data sequences of each well in the training set and the validation set. The size of the subsequence is related to the input and output data length of the model. These subsequences are encapsulated through the data loader in Pytorch to form batch data for model training;
[0095] 2) During the model training and verification process, the prediction effect of the model is quantified by combining the mean square error loss function. The model parameters are continuously optimized through the back propagation algorithm and AdamW optimizer to minimize the difference between the model prediction value and the true value, and the production parameter prediction model is obtained by training;
[0096] 3) To evaluate the prediction performance of the model, the mean square error (MSE) is used as the loss function. It is often used in deep learning to quantify the difference between the model prediction value and the true value. The calculation formula of MSE is:
[0097]
[0098] In the formula, n is the number of samples, m is the output feature of each sample, and y ij and Respectively represent the true value and predicted value of the jth feature in the i-th sample;
[0099] 4) Use the AdamW optimizer in the Pytorch framework to calculate the network weights and perform parameter optimization. The update formula of AdamW is:
[0100] θ t =θ t-1 -αλθ t-1 (8)
[0101] In the formula, θ t is the model weight at the current time step, θ t-1 is the model weight at the previous time step, α is the learning rate, and λ is the regularization coefficient.
[0102] Step 4: Input the real-time data into the trained deep learning model, and make real-time predictions of the cycle production parameters such as tubing pressure, casing pressure and cycle average gas production at the end of the future cycle of well opening and closing;
[0103] The model predictions include:
[0104] 1) According to R 2 The value is used to judge the prediction effect of the evaluation model on the test set. The R here is taken from the Pearson correlation coefficient, which is used to reflect the linear relationship between two quantities. The value range is [-1,1] and the formula is defined as:
[0105]
[0106] In the formula, y true i and pre i Represent the i-th true value and predicted value respectively, and Represent the mean of the true value and the predicted value respectively. 2 The value result is close to 1, indicating that the predicted value and the true value are strongly correlated, and the model prediction effect is good; if R 2 The value result is close to 0, indicating that there is no relationship between the predicted value and the true value, and the model prediction effect is poor;
[0107] 2) Inputting the real-time high-frequency production data of the gas well into the trained deep learning model will automatically realize the splitting of each interval cycle and the extraction of key production parameters. Through the prediction output of the deep learning model, the real-time prediction of the production parameters of the future interval cycle can be obtained, realizing the real-time dynamic prediction of the intelligent interval production of the gas well.
[0108] Case Study
[0109] The high-frequency (minute-level) data of the intermittent gas wells obtained in step 1 are preprocessed, and the abnormal data are preliminarily cleaned. According to the intermittent production system of "shut-in and open-in", a program is written to automatically split the historical data of each gas well into cycles and calculate and extract key cycle parameters, including the casing pressure and oil pressure at the end of shut-in, the casing pressure and oil pressure at the end of opening, and the average gas production of the cycle. This process extracts more than 80,000 sets of discrete cycle parameter data, and splits the data of each well in a ratio of 8:1:1 to construct a training set, a validation set, and a test set. At the same time, the improved Z-score statistical method is used with reference to formula (1) to perform discrete value processing on the data set. The training set and the validation set are processed using a sliding window algorithm to generate fixed-size subsequences with a window size of 5. The subsequences are encapsulated through the data loader in Pytorch to form batch data for model training.
[0110] Through step 2, combined with the input and output data formats, a deep learning model is built based on the Seq2Seq architecture combined with the LSTM encoding layer, LSTM decoding layer and fully connected layer to achieve accurate prediction of future cycle production parameters.
[0111] In step 3, the model built in step 2 is trained and verified using the training set and validation set. The network training hyperparameters are: the number of neurons in the LSTM layer, the number of LSTM layers, the dimension of the hidden layer, the batch size, the number of training rounds, and the learning rate are 256, 7, 256, 256, 150, and 0.0005, respectively. During the training process, the encoding layer accepts the intermittent working system and production parameters of 5 historical cycles as input, and passes the historical information to the decoding layer through the flow of cell states and hidden states. At the same time, the decoding layer accepts the intermittent working system of the next cycle as input to realize the prediction of production parameters within the cycle. The loss function uses the mean square error (MSE). During the training process, the AdamW optimizer is used to calculate the weights of the neural network to obtain a deep learning model.
[0112] The test set is input into the prediction model through step 4, and the prediction results of the corresponding production parameters are obtained by using the model forward propagation algorithm to observe the prediction effect of the prediction model on production parameters such as oil pressure, casing pressure and average gas production during the gas well inter-opening cycle. The R of the casing pressure prediction results at the end of the well shut-in and the end of the well opening in the test set is 2 See the statistical chart Figure 5a and Figure 5b , circles represent different period data of different gas wells, R 2The correlation coefficients are 0.97 and 0.94, respectively. In addition, this method is applied to a gas well on site. By reading high-frequency (minute-level) production data, this method can automatically split the cycle data and extract key cycle parameters, realize real-time prediction of production parameters for future cycles, and further realize the real-time production dynamic prediction of gas wells. The comparison effect diagram of the actual value and predicted value of the cycle parameters during the production process of the gas well is shown in Figure 6 .
[0113] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by technicians in this technical field within the essential scope of the present invention should also fall within the protection scope of the present invention.
Claims
1. A method for predicting the real-time production dynamics of low-yield gas wells with intelligent intermittent operation. It is characterized in that The following steps are involved: Step 1: pre-process the acquired high-frequency gas well production time series data, automatically extract the key parameters of the cycle, and construct a cycle parameter data set; Step 2: Establish a deep learning model based on Seq2Seq architecture; Step 3: Deep learning model established based on data set training; Step 4: Input real-time data into the trained deep learning model and make real-time predictions of key production parameters for future cycles.
2. A method for predicting the real-time production dynamics of a low-yield gas well according to claim 1, It is characterized in that The preprocessing of the acquired high-frequency gas well production time series data in step 1 includes the following steps: 1) Perform data cleaning for data anomalies; 2) Taking the interval period parameter as an indicator; 3) Using high-frequency data as a carrier, extracting according to cycle parameters, splitting the original minute-level time series data into cycles according to the gas well intermittent production cycle, and automatically calculating and extracting the work system and key production parameters of each intermittent cycle. The extracted intermittent cycle parameters are used as subsequent analysis objects to construct an intermittent cycle data set, and divided into training set, validation set and test set according to a certain ratio; 4) The improved Z-score method is used to process outliers in the divided data sets. The Z-score method combines the median and the median absolute deviation MAD to measure the concentration and dispersion of the data. MAD is used as a substitute for the standard deviation in the traditional Z-score method to calculate the improved Z-score of each data point. The calculation formula is: Where X is a single data value, n med is the median of the data set, n MAD is the median of all absolute deviations in the data set, and 0.6745 is used to adjust the Z-score distribution to make it closer to a standard normal distribution.
3. The method for predicting the real-time production dynamics of a low-yield gas well according to claim 1, It is characterized in that The network architecture of the deep learning model in step 2 includes: 1) The input of the deep learning model includes two parameters: (i) Historical cycle work systems and key cycle production parameters; (ii) the work system for future cycles; The output of the deep learning model is the key cycle production parameters under the corresponding work system of the future cycle; 2) For the prediction of key period production parameters, a deep learning model based on the Seq2Seq model architecture combined with the LSTM network is constructed. The specific architecture of the model includes: an encoding layer based on LSTM, a decoding layer based on LSTM, and an output layer composed of a fully connected layer; The Seq2Seq model is also called the encoder-decoder model. The encoder encodes the input sequence into an intermediate vector as the input of the decoder through learning, and the decoder outputs the intermediate vector through learning. The LSTM unit controls the continuous transmission and flow of information through the hidden state h and the cell state C, and determines which part of the information to retain and transmit through the gating mechanism, including the forget gate, input gate and output gate; the calculation formula of the forget gate is: f t =σ(W f ·[h t-1 ,x t ]+b f ) (2) In the formula, f t is the output of the forget gate, h t-1 is the hidden state of the previous time step, x t is the input of the current time step, W f and b f is the weight and bias of the forget gate, σ is the Sigmoid activation function, and the calculation formula is: σ(x)=(1+e -x ) -1 ; The calculation formula of the input gate is: i t =σ(W i ·[h t-1 ,x t ]+b i ) (3) In the formula, i t is the output of the input gate, W i and b i are the weight and bias of the input gate, σ, h t-1 and x t The meaning of is the same as above; The calculation formula for cell state update is: In the formula, is a candidate memory cell, C t is the output of the cell state at the current time step, C t-1 is the cell state at the previous time step, W c and b c are the weights and biases of the cell state, f t 、i t 、h t-1 and x t The meaning of is the same as above. Tanh is the activation function, and the calculation formula is: The calculation formula of the output gate is: the t =σ(W o ·[h t-1 ,x t ]+b o ) (6) In the formula, o t is the output of the output gate, W o and b o are the weight and bias of the output gate, σ, h t-1 and x t The meaning of is the same as above; The LSTM-based encoding layer accepts the i-th type of input in 1), extracts the complex cycle parameter relationship and timing information in the historical cycle data and stores them in the cell state and hidden state of the LSTM unit, and continuously transmits them in time steps; the LSTM-based decoding layer accepts the cell state and hidden state obtained in the last time step of the encoding layer as the initial state, and accepts the ii-th type of input in 1), and outputs the final cell state and hidden state; finally, the output of the LSTM network is converted into a suitable data format through a fully connected layer to realize the dynamic prediction output of key production parameters of future cycles.
4. The method for predicting the real-time production dynamics of a low-yield gas well according to claim 1, It is characterized in that The model training process of step 3 is: 1) Use the sliding window method to generate fixed-size subsequences from the continuous data sequences of each well in the training set and the validation set. These subsequences are encapsulated through the data loader in Pytorch to form batch data for model training; 2) During the training and verification process of the deep learning model using the training set and the validation set, the prediction effect of the model is quantified by the mean square error loss function, and the model parameters are continuously optimized through the back propagation algorithm and the AdamW optimizer to minimize the difference between the model prediction value and the true value; 3) The mean square error (MSE) is used as the loss function, which is often used in deep learning to quantify the difference between the model prediction value and the true value. The calculation formula of MSE is: In the formula, n is the number of samples, m is the output feature of each sample, and y ij and Respectively represent the true value and predicted value of the jth feature in the i-th sample; 4) Use the AdamW optimizer in the Pytorch framework to calculate the network weights and perform parameter optimization. The update formula of AdamW is: i t =θ t-1 -alth t-1 (8) In the formula, θ t is the model weight at the current time step, θ t-1 is the model weight at the previous time step, α is the learning rate, and λ is the regularization coefficient.
5. The method for predicting the real-time production dynamics of a low-yield gas well according to claim 1, It is characterized in that The specific process of step 4 is: 1) According to R 2 The value is used to judge the prediction effect of the evaluation model on the test set. R is taken from the Pearson correlation coefficient, which is used to reflect the linear relationship between two quantities. The value range is [-1, 1] and is defined as: In the formula, y true i and pre i Represent the i-th true value and predicted value respectively, and Represent the mean of the true value and the predicted value respectively; if R 2 The value result is close to 1, indicating that the predicted value and the true value are strongly correlated, and the model prediction effect is good; if R 2 The value result is close to 0, indicating that there is no relationship between the predicted value and the true value, and the model prediction effect is poor; 2) Input the real-time high-frequency production data of the gas well into the trained deep learning model to automatically split each interval cycle and extract key cycle parameters. After the deep learning model predicts and outputs, the real-time prediction of the production parameters of the future interval cycle is obtained, realizing the real-time dynamic prediction of the intelligent interval production of the gas well.
Citation Information
Patent Citations
Gas reservoir development law prediction method and system based on deep learning
CN115017827A
Production well production data prediction method and device, equipment and storage medium
CN115618987A
Cited By
Well shut-in control method and device for high-temperature and high-pressure well
CN120444015A
High temperature and high pressure well shut-in control method and device
CN120444015B
Jet pump drainage and mining process parameter intelligent optimization method and device based on machine learning
CN120592596A
Method and device for intelligent optimization of jet pump drainage production process parameters based on machine learning
CN120592596B
