An oil well tubing pressure prediction method based on residual hybrid recurrent neural network
By using a residual hybrid recurrent neural network model to predict oil well tubing pressure, the problem of missing and erroneous oil well pressure data was solved, enabling real-time optimization of oilfield production management and improvement of extraction efficiency.
Patent Information
- Application Number
- CN202410348439.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2044-03-26
AI Technical Summary
Oil well tubing pressure data may be erroneous or missing due to sensor malfunction or interference, resulting in low data utilization and difficulty in achieving accurate long-term predictions, which in turn affects oilfield production management.
A residual hybrid recurrent neural network-based approach is adopted. Through data cleaning, preprocessing, and construction of a hybrid recurrent neural network model, edge devices are used for real-time prediction to fill in missing values and capture complex patterns in the tubing pressure time series.
It improves the prediction accuracy and model generalization performance of oil well tubing pressure data, provides real-time and accurate prediction of pressure change trends, optimizes oilfield production processes, and improves extraction efficiency.
Smart Images

Figure CN118030039B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oilfield data analysis technology, and in particular to a method for predicting oil well tubing pressure based on residual hybrid recurrent neural networks. Background Technology
[0002] In the process of oilfield exploration and production, various sensors are installed in pumping wells to achieve real-time monitoring and analysis of important parameters of the oil well production process. Currently, intelligent monitoring devices for oil wells have made new progress, enabling real-time acquisition, transmission, and storage of data such as dynamometer diagrams, wellhead pressure, temperature, motor three-phase voltage, current, and power. While accumulating a large amount of data, the actual utilization rate of this data is low. How to apply this data to achieve smart oilfields is a new challenge. Therefore, in the digital transformation of smart oilfields, the effective analysis and use of data becomes crucial.
[0003] Tubing pressure in an oil well is a critical production parameter, providing real-time monitoring of well productivity and production status. By monitoring changes in tubing pressure, operators can promptly understand the well's production status, which helps adjust production strategies and understand information such as oilfield pressure distribution, productivity, and permeability, thereby enabling better planning of oilfield development and management.
[0004] In actual oilfield production, it is inevitable that pressure sensors in the field will generate abnormal data due to external interference or malfunctions. This leads to errors or missing oil pipe pressure data uploaded to the cloud. However, sensor equipment is usually located downhole in the well, making replacement extremely difficult once damaged or malfunctioning. Therefore, timely and accurate long-term pressure forecasting data is crucial for oilfield production management. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method for predicting oil well tubing pressure based on residual hybrid recurrent neural networks, which aims to predict the time series of tubing pressure in oil wells and provide an efficient, accurate and convenient data analysis method for oil extraction.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] Firstly, a method for predicting oil well tubing pressure based on residual hybrid recurrent neural networks includes the following steps:
[0008] Step 1: Collect oil well tubing pressure data and perform data cleaning to remove duplicate and erroneous data;
[0009] Step 2: Preprocess the oil well tubing pressure data after cleaning, and use the mean method to fill in missing values to obtain tubing pressure time series data;
[0010] Step 3: Generate a dataset from the tubing pressure time series data using a sliding window;
[0011] Step 4: Use the dataset to train and construct a residual hybrid recurrent neural network model;
[0012] Step 5: Validate the performance of the residual hybrid recurrent neural network model using actual production data;
[0013] Step 6: Deploy the residual hybrid recurrent neural network model to edge devices for real-time prediction.
[0014] Furthermore, in step two, the missing values of the oil pipe pressure per hour are processed by replacing the missing values with the average of the values from the previous hour and the next hour:
[0015]
[0016] Among them, P t Let P be the tubing pressure data at time t. t-1 Here is the tubing pressure data at time t-1, P t+1 This is the tubing pressure data at time t+1.
[0017] Furthermore, the hybrid recurrent neural network model in step four includes a recurrent neural network and a long short-term memory neural network.
[0018] Furthermore, the recurrent neural network includes a recurrent unit that receives the input and the hidden state of the previous time step at each time step, and produces the output of the current time step and a new hidden state:
[0019] The formula for updating the hidden state is:
[0020] h t =tanh(W hh ·h t-1 +W xh ·x t +b h );
[0021] Where h t It is the hidden state at the current time step, h t-1 It is the hidden state of the previous time step, x t It is the input at the current time step, W hh W is the weight matrix of the previous hidden state. xh Is input x t The weight matrix to the hidden state, where tanh is the hyperbolic tangent activation function that maps the input to the range [-1, 1];
[0022] The corresponding formula for output calculation is:
[0023] y t =W hy ·h t +b y ;
[0024] Where y t It is the output at time t, W hy It is the process from the hidden state to the output y. t The weight matrix, h t It is the hidden state at the current time step, b y It is the bias of the output layer.
[0025] Furthermore, long short-term memory networks include forgetting gates, input gates, output gates, and cell states:
[0026] Forgotten Gate f t Each element of the output represents the degree of information retention at the corresponding position. The closer the value is to 1, the more information is retained; the closer it is to 0, the more information is forgotten. The formula is:
[0027] f t =σ(W f [h t-1 x t ]+b f );
[0028] In the formula f t For the output of the forget gate, W f It is the weight matrix of the forget gate, [h t-1 x t [] is the hidden state h connected to the previous time step. t-1 and the input x at the current time t The resulting vector, b f σ is the bias of the forget gate, and σ is the sigmoid activation function that maps the input to the range [0, 1].
[0029] The input gate formula is:
[0030] i t =σ(W i [h t-1 x t ]+b i );
[0031] In the formula i t It is the output of the input gate, W i It is the weight matrix of the input gate, b i It is the bias of the input gate;
[0032] Candidate cell states measure which new information should be added to the cell state, and the update formula is:
[0033]
[0034] In the formula It is a candidate value for a new cell state, W c It is the weight matrix used to update the cell state, b c It is the bias for updating the cell state, and tanh is the hyperbolic tangent activation function;
[0035] The current cell state is updated after passing through the forget gate, input gate, and candidate cell states, using the following formula:
[0036]
[0037] In the formula C t It represents the current cell state, f t It is the output of the forget gate, C t-1 It is the cell state at the previous moment, i t It is the output of the input gate. It is the output of the candidate cell state;
[0038] Output gate output o t The hidden state at the current moment is determined by the formula:
[0039] o t =σ(W o [h t-1 x t ]+b o );
[0040] In the formula o t It is the output of the output gate, W o It is the weight matrix of the output gate, b o It is the bias of the output gate;
[0041] The final output h of the Long Short-Term Memory network t This is used to propagate to the next time step, and the formula is:
[0042] h t =o t *tanh(C t );
[0043] In the formula o t For the output of the output gate, C t This represents the current cell renewal status.
[0044] Furthermore, in the hybrid recurrent neural network model in step four, there are four hidden layers and one output layer; the hidden layers are a recurrent neural network layer followed by a long short-term memory neural network layer, and then another recurrent neural network layer followed by a long short-term memory neural network layer, which is a symmetrical structure; the output layer is a fully connected layer.
[0045] Furthermore, in step four, the recurrent neural network layer and the long short-term memory neural network layer in the hidden layer appear in pairs. The model is constructed using residual connections, connecting the recurrent neural network layer in the first pair to the recurrent neural network layer in the second pair, and connecting the long short-term memory neural network layer in the first pair to the long short-term memory neural network layer in the second pair.
[0046] Furthermore, step four also includes a model training process, in which the dataset is input into the model for training, and the network structure, network parameters, and the loss function of the residual hybrid recurrent neural network model during training are determined as the accumulated absolute error.
[0047] Furthermore, the verification of the performance of the residual hybrid recurrent neural network model using actual production data includes:
[0048] Using a trained hybrid recurrent neural network model, pressure data from 1000 tubing lines in two oil wells within the same working area were used for prediction. Based on the test results, the mean absolute percentage error was calculated using the following formula:
[0049]
[0050] Where n is the number of sequences, and i is the number of points predicted for each sequence. For the predicted value, y i This is the corresponding actual value.
[0051] The technical solution adopted in this invention has the following beneficial effects:
[0052] 1. This invention fully leverages the advantages of recurrent neural networks and long short-term memory networks by using a hybrid recurrent neural network with residual connections. Combined with residual connections, it improves the modeling capability of tubing pressure time series data in oil wells, captures complex patterns in tubing pressure time series, and achieves more accurate results in long-term prediction tasks.
[0053] 2. The hybrid recurrent neural network structure proposed in this invention allows the network to better adapt to changes at different time scales and better capture the instantaneous and long-term trends in the oil pipe pressure time series, thereby improving the generalization performance of the model.
[0054] 3. The model proposed by the method of this invention can be deployed on edge devices to perform real-time predictions using data collected in the field. The long-term prediction results obtained after real-time prediction have practical application significance in oilfield production management, providing decision-makers with more accurate pressure change trends, helping to optimize oilfield production processes and improve oilfield extraction efficiency. Attached Figure Description
[0055] Figure 1 This is a schematic diagram of an oil well tubing pressure prediction method based on residual hybrid recurrent neural networks;
[0056] Figure 2 This is a flowchart of a method for predicting oil well tubing pressure based on a residual hybrid recurrent neural network.
[0057] Figure 3 This is a model architecture diagram of an oil well tubing pressure prediction method based on residual hybrid recurrent neural networks;
[0058] Figure 4 This is a diagram of the recurrent neural network unit structure.
[0059] Figure 5 This is a diagram of the neural network unit structure of a Long Short-Term Memory (LSTM) network.
[0060] Figure 6 This is a structural diagram of the residual connection;
[0061] Figure 7 This is a graph showing the pressure prediction results of oil well No. 1 based on a hybrid recurrent neural network in an embodiment of the present invention.
[0062] Figure 8 This is a graph showing the pressure prediction results of oil well No. 2 based on a hybrid recurrent neural network in an embodiment of the present invention. Detailed Implementation
[0063] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0064] It should be noted that when a component is referred to as being "fixed to" or "set on" another component, it can be directly on or indirectly on that other component. When a component is referred to as being "connected to" another component, it can be directly connected to or indirectly connected to that other component.
[0065] It should also be noted that the same or similar reference numerals in the accompanying drawings of the embodiments of the present invention correspond to the same or similar components; in the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the accompanying drawings are only for illustrative purposes and should not be construed as limiting the present patent. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0066] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0067] See Figure 1 and Figure 2 The process of a method for predicting oil well tubing pressure based on residual hybrid recurrent neural networks is as follows:
[0068] Step 1: Collect oil well tubing pressure data and perform data cleaning to remove duplicate and erroneous data.
[0069] Step 2: Preprocess the cleaned oil well tubing pressure data, and use the mean method to fill in missing values to obtain tubing pressure time series data.
[0070] Specifically, in this embodiment, the acquired tubing pressure data undergoes data preprocessing, including format conversion, timestamp processing, outlier handling, duplicate value removal, resampling, and missing value filling. This process transforms irregular data into standard data, yielding tubing pressure time series data P. t ={P1, P2, ..., P n-1 P n}, where P t Let t be the pressure value at time t, where t ranges from 1 to n.
[0071] In imputing missing values, assuming that the tubing pressure data at time t is missing, the average of the tubing pressure at times t-1 and t+1 is taken, i.e. Among them, P t Let P be the tubing pressure data at time t. t-1 Here is the tubing pressure data at time t-1, P t+1 This is the tubing pressure data at time t+1.
[0072] Step 3: Generate a dataset from the time series data of tubing pressure using a sliding window.
[0073] In this example, the specific implementation of obtaining the dataset by sliding window is to set 24 input data and 12 output data, that is, a time series contains 36 oil well pressure data, and slide window is performed according to the 36 tubing pressure data with a step size of 1 to finally form the dataset.
[0074] Step 4: Use the dataset to train and construct a residual hybrid recurrent neural network model.
[0075] Establish a hybrid recurrent neural network model using residual connections, with the model architecture as follows: Figure 3 As shown, the hybrid recurrent neural network model proposed in this invention includes a recurrent neural network and a long short-term memory network.
[0076] A recurrent neural network model contains a recurrent unit that receives the input and the hidden state from the previous time step at each time step, and produces the output and the new hidden state for the current time step. A diagram of the recurrent neural network structure is shown below. Figure 4 As shown.
[0077] The formula for updating the hidden state is:
[0078] h t =tanh(W hh ·h t-1 +W xh ·x t +b h (1)
[0079] Where h t It is the hidden state at the current time step, h t-1 It is the hidden state of the previous time step, x t It is the input at the current time step, W hh W is the weight matrix of the previous hidden state. xh Is input x t The weight matrix is used to map the input to the hidden state, and tanh is the hyperbolic tangent activation function that maps the input to the range [-1, 1].
[0080] The corresponding formula for output calculation is:
[0081] y t =W hy ·h t +b y (2)
[0082] Where y t It is the output at time t, W hy It is the process from the hidden state to the output y. t The weight matrix, ht It is the hidden state at the current time step, b y It is the bias of the output layer.
[0083] Long Short-Term Memory (LSTM) networks are a variant of recurrent neural networks that introduce the concept of gates into the original network. These gates mainly include forget gates, input gates, output gates, and cell states. A diagram of the LSM network structure is shown below. Figure 5 As shown.
[0084] Forgotten Gate f t Each element of the output represents the degree of information retention at the corresponding position. The closer the value is to 1, the more information is retained; the closer it is to 0, the more information is forgotten. The formula is:
[0085] f t =σ(W f [h t-1 x t ]+b f (3)
[0086] In the formula f t For the output of the forget gate, W f It is the weight matrix of the forget gate, [h t-1 x t [] is the hidden state h connected to the previous time step. t-1 and the input x at the current time t The resulting vector, b f σ is the bias of the forget gate, and σ is the sigmoid activation function that maps the input to the range [0, 1].
[0087] The input gate formula is:
[0088] i t =σ(W i [h t-1 x t ]+b i (4)
[0089] In the formula i t It is the output of the input gate, W i It is the weight matrix of the input gate, b i It is the bias of the input gate.
[0090] Candidate cell states measure which new information should be added to the cell state, and the update formula is:
[0091]
[0092] In the formula It is a candidate value for a new cell state, W c It is the weight matrix used to update the cell state, b cIt is the bias for updating the cell state, and tanh is the hyperbolic tangent activation function.
[0093] The formula for updating the current cell state after passing through the forget gate, input gate, and candidate cell states is:
[0094]
[0095] In the formula C t It represents the current cell state, f t It is the output of the forget gate, C t-1 It is the cell state at the previous moment, i t It is the output of the input gate. The output of the candidate cell state is a step that integrates forgetting, input, and new cell state updates, which determines the cell state at the current moment.
[0096] Output gate output o t The hidden state at the current moment is determined by the formula:
[0097] o t =σ(W o [h t-1 x t ]+b o (7)
[0098] In the formula o t It is the output of the output gate, W o It is the weight matrix of the output gate, b o It is the bias of the output gate.
[0099] The final output h of the Long Short-Term Memory network t This is used to propagate to the next time step, and the formula is:
[0100] h t =o t *tanh(C t (8)
[0101] In the formula o t For the output of the output gate, C t This represents the current cell renewal status.
[0102] Residual connections are also added to the direct connections of the hybrid recurrent neural network, as shown in the structure diagram below. Figure 6 As shown. The output X of layer L-1 is directly superimposed on the output F(X) of layer L, and used as the input of the next layer, i.e., the input of the next layer is X+F(X). In this description, the residual connection method is to connect the recurrent neural network layer in the first pair to the recurrent neural network layer in the second pair, and the long short-term memory network layer in the first pair to the long short-term memory network layer in the second pair.
[0103] See Figure 3 The final residual hybrid recurrent neural network model structure consists of a recurrent neural network layer, a long short-term memory network layer, a recurrent neural network layer, a long short-term memory network layer, and finally a fully connected layer as the output.
[0104] In the first layer of the first pair of recurrent neural networks, x t Given the input sequence, the formula is:
[0105] S t1 =σ(U1·x t +W1·S (t-1)1 +b1) (9)
[0106] o t1 =σ(V1·S t1 +c1) (10)
[0107] In the second layer of the first pair of long short-term memory neural networks, o t1 Given the input sequence, the formula is:
[0108] f t1 =σ(W f1 [h (t-1)1 o t1 ]+b f1 (11)
[0109] i t1 =σ(W i1 [h (t-1)1 o t1 ]+b i1 (12)
[0110]
[0111]
[0112] o t1 ′=σ(W o1 [h (t-1)1 o t1 ]+b o1 (15)
[0113] h t1 =o t1 ′*tanh(C t1 (16)
[0114] After the residual connection, the input to the first layer of the second recurrent neural network is o. t1 +h t1 h t1 The output of the second layer of the Long Short-Term Memory neural network in the first pair is given by the following formula:
[0115] S t2 =σ(U2·(o t1 +h t1 )+W2·S (t-1)2 +b2) (17)
[0116] o t2 =σ(V2·S t2 +c2) (18)
[0117] After the residual connection, the input to the second pair of second-layer long short-term memory networks is h. t1 +o t2 o t2 The output of the first layer of the recurrent neural network in the second pair is given by the following formula:
[0118] f t2 =σ(W f1 [h (t-1)2 h t1 +o t2 ]+b f2 (19)
[0119] i t2 =σ(W i2 [h (t-1)2 h t1 +o t2 ]+b i2 (20)
[0120]
[0121]
[0122] o t2 ′=σ(W a2 [h (t-1)2 h t1 +o t2 ]+b o2 ) (twenty three)
[0123] h t2 =o t2 ′*tanh(C t2 ) (twenty four)
[0124] In a recurrent neural network, x t O represents the input at time t. t1 S represents the output at time t. t1 S t2 Let t represent the memory at time t. Each layer of the network shares a set of parameters. The parameters of the first layer are (U1, W1, V1), and the parameters of the second layer are (U2, W2, V2). b1, c1, b2, and c2 are bias coefficients.
[0125] In long short-term memory networks, h (t-1)1 h (t-1)2 It is the output at time t-1, f t1 f t2 For the output of the forget gate, W f1 W f2 This is the weight matrix of the forget gate, b f1 b f2 It's a bias in the forgetting gate. t1 i t2 It is the output of the input gate, W i1 W i2 It is the weight matrix of the input gate, b i1 b i2 It is the bias of the input gate. It is a candidate value for a new cell state, W c1 W c2 It is the weight matrix used to update the cell state, b c1 b c2 It is a bias used to update the cell state. C t1 C t2 It represents the current cell state, C. (t-1)1 C (t-1)2 This refers to the cell state at the previous moment. t1 ′, o t2 ′ is the output of the output gate, W o1 W o2 It is the weight matrix of the output gate, b o1 b o2 This is the bias of the output gate. The final output is h. t2 σ is the sigmoid activation function, which maps the input to the range [0, 1], and tanh is the hyperbolic tangent activation function, which maps the input to the range [-1, 1].
[0126] In this example, the hybrid recurrent neural network model trained yields the following optimal model parameters: input dimension 24, output dimension 12, 4 hidden layers, and 24 units per layer. The length of a single sample is 36, the training batch size is 10, the Adam optimizer is selected, the learning rate is 0.001, the number of training epochs is 1000, the activation function for each layer is leaky_relu, and the accumulated mean absolute error is used as the loss function.
[0127] Step 5: Validate the performance of the residual hybrid recurrent neural network model using actual production data.
[0128] Using a trained hybrid recurrent neural network model, predictions were made using 1000 tubing pressure data points from two oil wells in the same working area, and test results were obtained. The absolute percentage error at each point was calculated, as shown in Tables 1 and 2, and the mean absolute percentage error was calculated to verify the model's practicality.
[0129] The curve comparing the predicted and actual values of oil well No. 1 is shown below. Figure 7 As shown, the diamonds represent actual values, and the pentagrams represent predicted values. It can be seen that when there is no clear trend in historical data, the predicted values can generally fit the trend of the actual values well, indicating that the model has learned the inherent relationships between the data and has good application value. At the same time, the absolute error between the predicted and actual values is very small, which meets the requirements for data size and trend.
[0130] The curve comparing the predicted and actual values of oil well No. 2 is shown below. Figure 8 As shown, the actual data on tubing pressure fluctuates significantly, but the model's predicted values fit the curve's trend well, with very small absolute errors compared to the actual values, thus meeting the requirements for data size and trend.
[0131] The error metric used is Mean Absolute Percentage Error (MAPE), calculated using the following formula:
[0132]
[0133] In the formula, n is the number of sequences, and i is the number of points predicted for each sequence. For the predicted value, y i This is the corresponding actual value.
[0134] Calculations show that the predicted MAPE for well No. 1 is 1.322%, and the predicted MAPE for well No. 2 is 3.285%. Both errors are very small, meeting the requirements for tubing pressure data prediction.
[0135] Table 1. Pressure test results of Oil Well No. 1
[0136]
[0137]
[0138] Table 2. Pressure test results of oil well No. 2
[0139]
[0140] Step 6: Deploy the residual hybrid recurrent neural network model on an edge device and use the data collected on-site for real-time prediction.
[0141] The present invention has the following beneficial effects:
[0142] 1. This invention fully leverages the advantages of recurrent neural networks and long short-term memory networks by using a hybrid recurrent neural network with residual connections. Combined with residual connections, it improves the modeling capability of tubing pressure time series data in oil wells, captures complex patterns in tubing pressure time series, and achieves more accurate results in long-term prediction tasks.
[0143] 2. The hybrid recurrent neural network structure proposed in this invention allows the network to better adapt to changes at different time scales and better capture the instantaneous and long-term trends in the oil pipe pressure time series, thereby improving the generalization performance of the model.
[0144] 3. The model proposed by the method of this invention can be deployed on edge devices to perform real-time predictions using data collected in the field. The long-term prediction results obtained after real-time prediction have practical application significance in oilfield production management, providing decision-makers with more accurate pressure change trends, helping to optimize oilfield production processes and improve oilfield extraction efficiency.
[0145] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the solutions disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims.
Claims
1. A method for predicting oil well tubing pressure based on residual hybrid recurrent neural networks, characterized in that, Includes the following steps: Step 1: Collect oil well tubing pressure data and perform data cleaning to remove duplicate and erroneous data; Step 2: Preprocess the oil well tubing pressure data after cleaning, and use the mean value method to fill in missing values to obtain tubing pressure time series data; Step 3: Generate a dataset from the tubing pressure time series data using a sliding window; Step 4: Use the dataset to train and construct a residual hybrid recurrent neural network model; Step 5: Validate the performance of the residual hybrid recurrent neural network model using actual production data; Step 6: Deploy the residual hybrid recurrent neural network model to edge devices for real-time prediction; The hybrid recurrent neural network model in step four includes a recurrent neural network and a long short-term memory neural network. In the hybrid recurrent neural network model in step four, there are four hidden layers and one output layer. The hidden layers are a recurrent neural network layer followed by a long short-term memory neural network layer, and then another recurrent neural network layer followed by a long short-term memory neural network layer, which is a symmetrical structure. The output layer is a fully connected layer. In step four, the recurrent neural network layer and the long short-term memory neural network layer in the hidden layer appear in pairs. The model is constructed using residual connections, connecting the recurrent neural network layer in the first pair to the recurrent neural network layer in the second pair, and connecting the long short-term memory neural network layer in the first pair to the long short-term memory neural network layer in the second pair. The residual in step four is the... Layer output Directly superimposed on the first Output of layer network The above serves as the input to the next layer of the network, and the input to the next layer is... .
2. The method for predicting oil well tubing pressure based on a residual hybrid recurrent neural network according to claim 1, characterized in that, In step two, the missing hourly values of the tubing pressure are processed by replacing the missing values with the average of the values from the previous and following hours. ; in, Here is the tubing pressure data at time t. The data represents the tubing pressure at time t-1. This is the tubing pressure data at time t+1.
3. The method for predicting oil well tubing pressure based on a residual hybrid recurrent neural network according to claim 1, characterized in that, The recurrent neural network includes a recurrent unit that receives the input and the hidden state of the previous time step at each time step, and produces the output and the new hidden state for the current time step. The formula for updating the hidden state is: ; in It is the hidden state at the current time step. It is the hidden state of the previous time step. This is the input for the current time step. It is the weight matrix of the previous hidden state. It is input The weight matrix to the hidden state, The hyperbolic tangent activation function maps the input to the range [−1, 1]. The corresponding formula for output calculation is: ; in yes Output at any moment It is the process of moving from hidden state to output. The weight matrix, It is the hidden state at the current time step. It is the bias of the output layer.
4. The method for predicting oil well tubing pressure based on a residual hybrid recurrent neural network according to claim 1, characterized in that, Long Short-Term Memory (LSTM) networks consist of forgetting gates, input gates, output gates, and cell states. Forgotten Gate Each element of the output represents the degree of information retention at the corresponding position. The closer the value is to 1, the more information is retained; the closer it is to 0, the more information is forgotten. The formula is: ; In the formula For the output of the forget gate, It is the weight matrix of the forget gate. It connects to the hidden state of the previous moment. and the input at the current moment The resulting vector, It's a bias in the forgetting gate. It is the sigmoid activation function, which maps the input to the range [0,1]. The input gate formula is: ; In the formula It is the output of the input gate. It is the weight matrix of the input gate. It is the bias of the input gate; Candidate cell states measure which new information should be added to the cell state, and the update formula is: ; In the formula These are candidate values for new cell states. It is a weight matrix used to update the cell state. It is a bias that updates the cell state. It is the hyperbolic tangent activation function; The current cell state is updated after passing through the forget gate, input gate, and candidate cell states, using the following formula: ; In the formula This refers to the current cell state. It is the output of the forget gate. It represents the cell state at the previous moment. It is the output of the input gate. It is the output of the candidate cell state; Output gate output The hidden state at the current moment is determined by the formula: ; In the formula It is the output of the output gate. It is the weight matrix of the output gate. It is the bias of the output gate; The final output of a Long Short-Term Memory (LSTM) network Used to propagate to the next time step, the formula is: ; In the formula For the output of the output gate, This represents the current cell renewal status.
5. The method for predicting oil well tubing pressure based on a residual hybrid recurrent neural network according to claim 1, characterized in that, Step four also includes a model training process, in which the dataset is input into the model for training, and the network structure, network parameters, and the loss function of the residual hybrid recurrent neural network model during training are determined as the accumulated absolute error.
6. The method for predicting oil well tubing pressure based on a residual hybrid recurrent neural network according to claim 1, characterized in that, The verification of the performance of the residual hybrid recurrent neural network model using actual production data includes: Using a trained hybrid recurrent neural network model, pressure data from 1000 tubing lines in two oil wells within the same working area were used for prediction. Based on the test results, the mean absolute percentage error was calculated using the following formula: ; in, Let be the number of sequences, and i be the number of points predicted for each sequence. For predicted values, This is the corresponding actual value.