Intelligent well completion yield prediction method and system based on attention-LSTM
By applying attention-LSTM model in oil well output prediction, the problem that traditional methods are difficult to deal with complex nonlinear relationships is solved, more accurate output prediction is achieved, and the efficiency and economic benefits of production management are improved.
Patent Information
- Application Number
- CN202411427603.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-25
AI Technical Summary
Traditional oil well yield prediction methods are difficult to effectively deal with complex nonlinear and multivariate relationships, resulting in insufficient prediction accuracy.
An intelligent completion yield prediction method based on attention-LSTM is adopted, and the changes in oil well output are captured and predicted by preprocessing and model training of historical timing data, and the attention mechanism and LSTM gating mechanism are used.
In the complex and changeable geological and production environment, it is possible to predict changes in oil well production more accurately and flexibly, improve the accuracy of production plans, optimize resource utilization, and reduce operating costs.
Smart Images

Figure CN119514750A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of production prediction of oil exploration, and in particular to an attention-LSTM-based intelligent completion production prediction method and system. Background Art
[0002] With the continuous advancement of oilfield development technology, the application of technologies such as sensor technology, big data analysis, and artificial intelligence is becoming more and more widespread, and the level of oilfield intelligence is gradually improving. As an important part of oilfield intelligence, intelligent completion production prediction can more accurately estimate future production changes of oil wells, detect problems in advance and take corresponding measures, thereby optimizing oilfield production management to the greatest extent. Traditional production prediction methods are usually based on statistical or physical models, which have certain difficulties in dealing with nonlinearity, time-varying and complex multivariate relationships. Oil well production is affected by many factors, and there are complex nonlinear relationships between these factors, which are difficult to accurately model using traditional methods.
[0003] Long short-term memory network (LSTM) is a variant of recurrent neural network (RNN) specially designed to handle long sequence dependency problems. Compared with traditional RNN, LSTM can better capture and store long-term memory by introducing a gating mechanism, effectively solving problems such as gradient disappearance and gradient explosion, and achieving remarkable results in fields such as processing time series data. The model's attention mechanism is a technology that mimics the human attention mechanism, which improves model performance by dynamically adjusting the model's attention to the input.
[0004] By learning historical data through the attention-LSTM model, future oil production can be predicted more accurately, which helps to formulate more accurate production plans and optimize wellhead operations and maintenance, thereby improving production efficiency; intelligent completion production prediction methods can also help determine the best mining strategy, so that oil wells can operate in the best way under different working conditions, which helps to optimize resource utilization and increase output value; by improving the accuracy of production predictions, manpower, equipment and materials can be better deployed to avoid unnecessary waste, which helps to reduce production and operating costs and improve overall economic benefits.
[0005] In summary, the attention-LSTM-based intelligent completion production prediction method combines a large neural network model with the actual needs of the oil field, has better prediction performance and adaptability, and helps to realize the intelligent and refined management of oil field production and improve production efficiency and economic benefits, which is crucial for the sustainable development and resource management of the oil field industry. Summary of the invention
[0006] The purpose of the present invention is to provide an intelligent completion production prediction method based on attention-LSTM, which can more accurately and flexibly capture and predict the changes in oil well production, especially in complex and changeable geological and production environments.
[0007] The purpose of the present invention is to provide an intelligent completion production system based on attention-LSTM. The intelligent completion oil production prediction method based on attention-LSTM can capture and predict the changes in oil well production more accurately and flexibly, especially in complex and changeable geological and production environments.
[0008] To achieve the above object, the present invention adopts the following technical solution, including the following steps:
[0009] S1. Collect and save the historical time series data of intelligent completion production;
[0010] S2. Preprocess the collected historical time series data and divide them into training sets and test sets;
[0011] S3. Establish an initial model for intelligent completion production prediction based on attention-LSTM;
[0012] S4. Training and optimizing the initial model of intelligent completion production prediction to obtain an optimized model;
[0013] S5. Use the test set to evaluate the performance of the tuned model to determine whether the effect meets the expected standard. If not, return to step S4; otherwise, determine it as the final model;
[0014] S6: The newly collected completion production time series data together with the historical production data collected in S1 are preprocessed and input into the trained final model to generate a prediction of production at future moments.
[0015] Preferably, in step S1, the historical time series data includes: time, water production, oil production and ICV valve opening.
[0016] Preferably, in step S2, the collected historical time series data is preprocessed and divided into a training set and a test set, specifically:
[0017] S2-1. Perform a preliminary screening of the collected historical time series data, remove incomplete, outlier and invalid data, and use the remaining historical time series data as target data;
[0018] S2-2. Clean the target data, including correcting erroneous data, completing missing data, and unifying the format;
[0019] S2-3, normalize the cleaned target data to the same scale range;
[0020] S2-4. Divide the normalized target data into a training set and a test set in a ratio of 7:3.
[0021] Preferably, in step S2-3, the normalization method is maximum-minimum normalization, and the formula is as follows:
[0022]
[0023] Among them, X normalized is the normalized data; X is the original data; min(X) is the minimum value of the original data; max(X) is the maximum value of the original data.
[0024] Preferably, in step S3, the intelligent completion production prediction model based on attention-LSTM consists of an input layer, a hidden layer and an output layer; the input layer receives time, oil production, water production and ICV valve opening data; the hidden layer consists of an LSTM unit including an attention mechanism, and a forget gate, an input gate and an output gate are provided inside the LSTM unit for processing and storing information; the output layer is used to predict future production data.
[0025] Preferably, the hidden layer is composed of an LSTM unit including an attention mechanism, wherein the LSTM unit internally includes a forget gate, an input gate, and an output gate, and the basic formulas involved in the attention mechanism and each gate are as follows:
[0026] Attention(Q,K,V)=Softmax(sum(tnh(Linear([Q,K]))))*V
[0027] In the formula, Q represents query, K represents key, and V represents value. The Softmax function takes the dot product of Q and K to get the similarity score, thereby obtaining the attention weight.
[0028] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0029] In the formula, f t is the output of the forget gate, σ is the activation function, W f and b f is the weight and bias of the forget gate, h t-1 is the hidden state at the previous moment, x tis the input at the current moment;
[0030] i t =σ(W i ·[h t-1 ,x t ]+b i )
[0031] 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 respectively;
[0032]
[0033] In the formula, is the candidate value of the memory cell updated by the tanh activation function, W c and b c are weight and bias respectively;
[0034]
[0035] In the formula, C t is the updated memory unit, C t-1 is the memory unit of the previous moment;
[0036] o t =σ(W o ·[h t-1 ,x t ]+b o )
[0037] In the formula, o t is the output of the output gate, Wo is the weight, b o is bias;
[0038] h t =o t +tanh(C t )
[0039] In the formula, h t is the hidden state at the current moment, O t , h and C t are the output of the output gate, the hidden state, and the memory unit, respectively.
[0040] Preferably, in step S4, the initial model is trained and tuned as follows:
[0041] S4-1. Use the training set to train the initial model and obtain basic performance indicators;
[0042] S4-2. Use the Adam optimization algorithm to adjust the model parameters and complete the model parameter tuning.
[0043] Preferably, the Adam optimization algorithm used in step S4-2 calculates the estimation of the first-order moment (mean) and the second-order moment (variance) of the gradient by the exponential decay averaging method, dynamically adjusts the parameter learning rate, and improves the efficiency and stability of the model training, and the steps are as follows:
[0044] S4-1-1, initialize and set the initial learning rate α, the exponential decay rate β1 of the first-order moment estimate, the exponential decay rate β2 of the second-order moment estimate, and the small value constant ∈;
[0045] S4-1-2, each iteration, update the time step t, calculate the gradient g corresponding to the current parameter t ;
[0046] S4-1-3. Calculate the first-order moment estimate m of the current gradient by exponential decay averaging method t and the second-order moment estimate v t , the formula is as follows:
[0047] m t =β1m t-1 -1+(1-β1)g t
[0048]
[0049] Where β1 is the exponential decay rate of the first-order moment estimate, β2 is the exponential decay rate of the second-order moment estimate, and ∈ is a small constant; g t is the gradient corresponding to the previous parameter, m t-1 is the first-order moment estimate of the previous time step, v t-1 is the second-order moment estimate for the previous time step.
[0050] S4-1-4. Correct the deviation of the estimation of the first-order moment and the second-order moment. The calculation formula is as follows:
[0051]
[0052] in is the first-order moment corrected deviation, is the second-order moment corrected deviation.
[0053] S4-1-5, update the model parameter θ of the tth step according to the corrected first-order moment estimate, second-order moment estimate and learning rate t .
[0054]
[0055] Among them, θ t-1 is the model parameter value of the previous time step, ∈ is a small constant used to prevent the denominator from being zero, and α is the learning rate, which controls the step size of parameter update.
[0056] Preferably, in step S5, the performance of the tuned model is evaluated using the test set. The evaluation method is as follows: the time series data in the test set is input into the tuned model to perform yield prediction, and the prediction result is compared with the actual yield data in the test set. 2 , MSE, and relative error are used to evaluate the prediction accuracy of the attention-LSTM intelligent completion production prediction model. The formula is as follows:
[0057] R 2 It is a statistic that indicates the degree of explanation of the target variable by the model. Its value range is between 0 and 1. The closer it is to 1, the better the model explains the target variable.
[0058]
[0059] Where: y i is the observed value of the target variable, is the target variable value predicted by the model, is the mean value of the target variable, n is the number of samples;
[0060] MSE is the average of the squared errors of the predicted values. The smaller it is, the better the model performance is.
[0061]
[0062] In the formula, y i is the observed value of the target variable, is the target variable value predicted by the model, and n is the number of samples;
[0063] Relative error is the relative difference between the observed and predicted values, usually expressed as a percentage;
[0064]
[0065] In the formula, y i is the observed value of the target variable, is the target variable value predicted by the model;
[0066] The expected standard is R 2 The value is greater than 0.7, the MSE is less than 10% of the target data mean, and the relative error is less than 15%; if the above expected standard requirements are not met, further optimize the model parameters, increase training iterations, and improve the model performance and generalization ability.
[0067] An attention-LSTM-based intelligent completion production system, comprising: a data acquisition module, a data preprocessing module and a future production prediction module;
[0068] The data acquisition module is used to collect the oil production, water production and corresponding ICV valve opening data at certain moments;
[0069] The data preprocessing module is used to preprocess the data acquired by the data acquisition module, divide it into a training data set and a test data set, and perform normalization processing to provide a basis for model training and prediction.
[0070] The prediction module for future production is used to construct a time series prediction model for predicting future production. The module uses the Attention-LSTM model to perform model training through a training data set to learn the time series features in the data and form a time series prediction model. Finally, the trained prediction model is used to predict future production data.
[0071] The beneficial effect of the present invention is that the intelligent completion oil production prediction method based on attention-LSTM can more accurately and flexibly capture and predict the changes in oil well production, especially in complex and changeable geological and production environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 This is a flowchart of the intelligent completion production prediction method based on attention-LSTM;
[0073] Figure 2 This is a schematic diagram of the structure of attention-LSTM;
[0074] Figure 3 The figure is a training flowchart of the attention-LSTM-based intelligent completion production prediction method. DETAILED DESCRIPTION
[0075] The invention is further described in detail below in conjunction with the accompanying drawings so that those skilled in the art can implement it according to the description.
[0076] It should be understood that terms such as “having”, “including” and “comprising” used herein do not exclude the existence or addition of one or other elements or combinations thereof.
[0077] Example 1
[0078] like Figure 1-3 As shown, an intelligent completion production prediction method based on attention-LSTM of the present invention comprises the following steps:
[0079] S1. Collect and save the historical time series data of intelligent completion production;
[0080] In step S1, the historical time series data includes: time, water production, oil production and ICV valve opening.
[0081] When collecting data, it is necessary to install oil production, water production and ICV valve opening sensors in the oil well system respectively. The sensors can be distributed on the wellhead, pipeline or downhole equipment to ensure comprehensive and accurate monitoring of the bottom hole environment and operating parameters. Equipped with data acquisition equipment, it is responsible for centralized processing and storage of the data collected by the sensors; in order to ensure the time synchronization of the data, an accurate clock synchronization mechanism is adopted so that the data of oil production, water production and ICV valve opening can be accurately recorded and stored at the same time; a data acquisition module is set to continuously record the data of oil production, water production and ICV valve opening, and according to actual needs, a high-frequency sampling interval is selected to ensure timely response to changes in the bottom hole environment.
[0082] S2. Preprocess the collected historical time series data and divide them into training sets and test sets;
[0083] In step S2, the data preprocessing method is:
[0084] S2-1. Perform a preliminary screening of the collected historical time series data, remove incomplete, outlier and invalid data, and use the remaining historical time series data as target data; incomplete data refers to data entries with a missing value ratio exceeding 10%, outliers refer to abnormal data with a value exceeding 3 times the standard deviation, and invalid data refers to time series data with fluctuations exceeding the set threshold;
[0085] S2-2, cleaning the target data, including correcting erroneous data, completing missing data, unifying the format, finding missing data in the target data, and performing linear interpolation processing on the missing data at the corresponding time, including piecewise linear interpolation and cubic spline interpolation;
[0086] S2-3, normalize the cleaned target data to the same scale range;
[0087] Normalization uses Min-Max Normalization, the formula is as follows:
[0088]
[0089] Among them, X normalized is the normalized data; X is the original data; min(X) is the minimum value of the original data; max(X) is the maximum value of the original data. The normalization process should be performed based on the training set, and then the same scaling parameters should be applied to the test set to ensure consistency.
[0090] S2-4. Divide the normalized target data into training set and test set in a ratio of 7:3
[0091] The normalized data set is divided into a training data set and a test data set. Since the continuous time series data of the whole well including oil production, water production and ICV valve opening are used for training and testing, the wells are divided into whole wells according to the ratio of 7:3. The oil production, water production and ICV valve opening of some wells are used as training sets, and the remaining wells are used as test sets.
[0092] S3. Establish an initial model for intelligent completion production prediction based on attention-LSTM;
[0093] The initial model of intelligent completion production prediction based on attention-LSTM described in S3 consists of an input layer, a hidden layer, and an output layer; the input layer receives time, oil production, water production, and ICV valve opening data; the hidden layer consists of LSTM units containing an attention mechanism, and the LSTM unit has a forget gate, an input gate, and an output gate for processing and storing information; the output layer is used to predict future production data. This model solves the gradient vanishing and gradient exploding problems in traditional RNNs through the attention mechanism and the gate mechanism in the LSTM unit.
[0094] The hidden layer consists of LSTM units with attention mechanism. The LSTM unit contains forget gate, input gate and output gate. The basic formulas involved in attention mechanism and each gate are as follows:
[0095] Attention(Q,K,V)=Softmax(sum(tanh(Hinear([Q,K]))))·V
[0096] In the formula, Q represents query, K represents key, and V represents value. The Softmax function takes the dot product of Q and K to get the similarity score, thereby obtaining the attention weight.
[0097] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0098] In the formula, f t is the output of the forget gate, σ is the Sigmoid activation function, W f and b f is the weight and bias of the forget gate, h t-1 is the hidden state at the previous moment, x t is the input at the current moment;
[0099] i t =σ(W i ·[h t-1 ,x t ]+b i )
[0100] 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 respectively;
[0101]
[0102] In the formula, is the candidate value of the memory cell updated by the tanh activation function, W c and b c are weight and bias respectively;
[0103]
[0104] In the formula, C t is the updated memory unit, C t-1 is the memory unit of the previous moment;
[0105] o t =σ(W o ·[h t-1 ,x t ]+b o )
[0106] In the formula, o t is the output of the output gate, Wo is the weight, b o is bias;
[0107] h t =o t +tanh(C t )
[0108] In the formula, h t is the hidden state at the current moment, O t , h and C t are the output of the output gate, the hidden state, and the memory unit, respectively.
[0109] S4. Train and optimize the initial model of intelligent completion production prediction to obtain an optimized model.
[0110] The steps for training and tuning the initial model are as follows:
[0111] S4-1. Use the training set to train the initial model and obtain basic performance indicators;
[0112] S4-2. Use the Adam optimization algorithm to adjust the model parameters and complete the model parameter tuning.
[0113] The Adam optimization method is used for optimization. The first-order moment (mean) and second-order moment (variance) of the gradient are estimated by the exponential decay averaging method. The parameter learning rate is dynamically adjusted to improve the efficiency and stability of model training. The specific steps are as follows:
[0114] (1) Perform initialization settings, set the initial learning rate α to 0.001, the exponential decay rate β1 of the first-order moment estimate to 0.9, the exponential decay rate β2 of the second-order moment estimate to 0.999, and the small value constant ∈ to 10 -8 , initial first-order moment estimate m0 = 0, initial second-order moment estimate v0 = 0, time step t = 0, initial parameter θ0 = 0;
[0115] (2) Each iteration, update the time step t = t + 1 and calculate the gradient g corresponding to the current parameter t ;
[0116] (3) Calculate the first-order moment of the gradient by the exponential decay average method to estimate m t and the second-order moment estimate v t , the formula is as follows:
[0117] m t =β1m t-1 -1+(1-β1)g t
[0118]
[0119] (4) Correct the deviation of the estimation of the first-order moment and the second-order moment. The calculation formula is as follows:
[0120]
[0121] (5) Update the model parameter θ of the tth step based on the corrected first-order moment estimate, second-order moment estimate and learning rate t .
[0122]
[0123] Through these steps, the Adam optimization algorithm can effectively tune the parameters of the Attention-LSTM model to ensure efficient training and high-quality prediction of the model.
[0124] S5. Use the test set to evaluate the performance of the tuned model to determine whether the effect meets the expected standard. If not, return to step S4; otherwise, determine the final model. Use the remaining 30% of the data as the test set, input the test set data into the trained tuned model, that is, use the target data of another well to evaluate the trained prediction model; compare the prediction results of the model with the real data in the test set, and use R 2 , MSE, and relative error are used to measure the performance of the model to see whether it achieves the expected effect. If so, it is determined as the final model. Otherwise, the S4 step is performed to continue iterative training and optimization. 2 , MSE, and relative error are three indicators to measure model performance. The formulas are as follows:
[0125] R 2 It is a statistic that indicates the degree of explanation of the target variable by the model. Its value range is between 0 and 1. The closer it is to 1, the better the model explains the target variable.
[0126]
[0127] Where: y i is the observed value of the target variable, is the target variable value predicted by the model, is the mean value of the target variable, n is the number of samples;
[0128] MSE is the average of the squared errors of the predicted values. The smaller it is, the better the model performance is.
[0129]
[0130] In the formula, y i is the observed value of the target variable, is the target variable value predicted by the model, and n is the number of samples;
[0131] Relative error is the relative difference between the observed and predicted values, usually expressed as a percentage;
[0132]
[0133] In the formula, y i is the observed value of the target variable, is the value of the target variable predicted by the model.
[0134] The indicator standards in this scheme are set as follows: R 2 The value is greater than 0.7, and the MSE is less than 10% of the target data mean. The relative error is less than 15%. If the above indicators are not met, further optimize the model parameters, increase training iterations, and improve the model performance and generalization ability.
[0135] S6. The newly collected completion production time series data together with the relevant historical production data are preprocessed and input into the trained model to generate a prediction of production at future times.
[0136] In the prediction phase, ICV valve opening and production data at new time points are collected from these wells and combined with past production data to be input into the prediction model to predict future production. This ensures that the model can use its learned historical trends and patterns to make effective predictions.
[0137] An intelligent completion production system based on attention-LSTM, including: a data acquisition module, a data preprocessing module and a future production prediction module;
[0138] The data acquisition module is used to collect the oil production, water production and corresponding ICV valve opening data at certain moments;
[0139] The data preprocessing module is used to preprocess the data acquired by the data acquisition module, divide it into a training data set and a test data set, and perform normalization processing to provide a basis for model training and prediction.
[0140] The prediction module for future production is used to construct a time series prediction model for predicting future production. The module uses the Attention-LSTM model to perform model training through a training data set to learn the time series features in the data and form a time series prediction model. Finally, the trained prediction model is used to predict future production data.
[0141] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and implementation modes. They can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and the illustrations shown and described herein.
Claims
1. An intelligent completion production prediction method based on attention-LSTM, characterized in that: The following steps are involved: S1. Collect and save the historical time series data of intelligent completion production; S2. Preprocess the collected historical time series data and divide them into training sets and test sets; S3. Establish an initial model for intelligent completion production prediction based on attention-LSTM; S4. Training and optimizing the initial model of intelligent completion production prediction to obtain an optimized model; S5. Use the test set to evaluate the performance of the tuned model to determine whether the effect meets the expected standard. If not, return to step S4; otherwise, determine it as the final model; S6: The newly collected completion production time series data together with the historical production data collected in S1 are preprocessed and input into the trained final model to generate a prediction of production at future moments.
2. The intelligent completion production prediction method based on attention-LSTM according to claim 1 is characterized in that: In step S1, the historical time series data includes: time, water production, oil production and ICV valve opening.
3. The intelligent completion production prediction method based on attention-LSTM according to claim 2 is characterized in that: In step S2, the collected historical time series data is preprocessed and divided into a training set and a test set, specifically: S2-1. Perform a preliminary screening of the collected historical time series data, remove incomplete, outlier and invalid data, and use the remaining historical time series data as target data; S2-2. Clean the target data, including correcting erroneous data, completing missing data, and unifying the format; S2-3, normalize the cleaned target data to the same scale range; S2-4. Divide the normalized target data into a training set and a test set in a ratio of 7:
3.
4. The intelligent completion production prediction method based on attention-LSTM according to claim 3 is characterized in that: In step S2-3, the normalization method is maximum-minimum normalization, and the formula is as follows: Among them, X normalized is the normalized data; X is the original data; min(X) is the minimum value of the original data; max(X) is the maximum value of the original data.
5. The intelligent completion production prediction method based on attention-LSTM according to claim 1 is characterized in that: In step S3, the intelligent completion production prediction model based on attention-LSTM consists of an input layer, a hidden layer and an output layer; the input layer receives time, oil production, water production and ICV valve opening data; the hidden layer consists of an LSTM unit containing an attention mechanism, and a forget gate, an input gate and an output gate are provided inside the LSTM unit for processing and storing information; the output layer is used to predict future production data.
6. The intelligent completion production prediction method based on attention-LSTM according to claim 5 is characterized in that: The hidden layer consists of LSTM units with attention mechanism. The LSTM unit contains forget gate, input gate and output gate. The basic formulas involved in attention mechanism and each gate are as follows: Attention(Q,K,V)=Softmax(sum(tanh(Linear([Q,K]))))*V In the formula, Q represents query, K represents key, and V represents value. The Softmax function takes the dot product of Q and K to get the similarity score, thereby obtaining the attention weight. f t =σ(W f ·[h t-1 ,x t ]+b f ) In the formula, f t is the output of the forget gate, σ is the activation function, W f and b f is the weight and bias of the forget gate, h t-1 is the hidden state at the previous moment, x t is the input at the current moment; i t =σ(W i ·[h t-1 ,x t ]+b i ) 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 respectively; In the formula, is the candidate value of the memory cell updated by the tanh activation function, W c and b c are weight and bias respectively; In the formula, C t is the updated memory unit, C t-1 is the memory unit of the previous moment; the t =σ(W o ·[h t-1 ,x t ]+b o ) In the formula, o t is the output of the output gate, Wo is the weight, b o is bias; h t =o t +tanh(C t ) In the formula, h t is the hidden state at the current moment, O t , h and C t are the output of the output gate, the hidden state, and the memory unit, respectively.
7. The intelligent completion production prediction method based on attention-LSTM according to claim 1 is characterized in that: In step S4, the initial model is trained and tuned as follows: S4-1. Use the training set to train the initial model and obtain basic performance indicators; S4-2. Use the Adam optimization algorithm to adjust the model parameters and complete the model parameter tuning.
8. The intelligent completion production prediction method based on attention-LSTM according to claim 7 is characterized in that: The Adam optimization algorithm used in step S4-2 calculates the first-order moment (mean) and second-order moment (variance) of the gradient through the exponential decay averaging method, dynamically adjusts the parameter learning rate, and improves the efficiency and stability of model training. The steps are as follows: S4-1-1, initialize and set the initial learning rate α, the exponential decay rate β1 of the first-order moment estimate, the exponential decay rate β2 of the second-order moment estimate, and the small value constant ∈; S4-1-2, each iteration, update the time step t and calculate the gradient gt corresponding to the current parameter; S4-1-3. Calculate the first-order moment estimate m of the current gradient by exponential decay averaging method t and the second-order moment estimate v t , the formula is as follows: m t =β1m t-1 -1+(1-β1)g t Where β1 is the exponential decay rate of the first-order moment estimate, β2 is the exponential decay rate of the second-order moment estimate, and ∈ is a small constant; g t is the gradient corresponding to the previous parameter, m t-1 is the first-order moment estimate of the previous time step, v t-1 is the second-order moment estimate for the previous time step. S4-1-4. Correct the deviation of the estimation of the first-order moment and the second-order moment. The calculation formula is as follows: in is the first-order moment corrected deviation, is the second-order moment corrected deviation. S4-1-5, update the model parameter θ of the tth step according to the corrected first-order moment estimate, second-order moment estimate and learning rate t . Among them, θ t-1 is the model parameter value of the previous time step, ∈ is a small constant used to prevent the denominator from being zero, and α is the learning rate, which controls the step size of parameter update.
9. The intelligent completion production prediction method based on attention-LSTM according to claim 1 is characterized in that: In step S5, the performance of the tuned model is evaluated using the test set. The evaluation method is as follows: the time series data in the test set is input into the tuned model to perform yield prediction, and the prediction results are compared with the actual yield data in the test set. 2 , MSE, and relative error are used to evaluate the prediction accuracy of the attention-LSTM intelligent completion production prediction model. 2 , MSE, and relative error are three indicators to measure model performance. The formulas are as follows: R 2 It is a statistic that indicates the degree of explanation of the target variable by the model. Its value range is between 0 and 1. The closer it is to 1, the better the model explains the target variable. Where: y i is the observed value of the target variable, is the target variable value predicted by the model, is the mean value of the target variable, n is the number of samples; MSE is the average of the squared errors of the predicted values. The smaller it is, the better the model performance is. In the formula, y i is the observed value of the target variable, is the target variable value predicted by the model, and n is the number of samples; Relative error is the relative difference between the observed and predicted values, usually expressed as a percentage; In the formula, y i is the observed value of the target variable, is the target variable value predicted by the model; The expected standard is R 2 The value is greater than 0.7, the MSE is less than 10% of the target data mean, and the relative error is less than 15%; if the above expected standard requirements are not met, further optimize the model parameters, increase training iterations, and improve the model performance and generalization ability.
10. An intelligent completion production system based on attention-LSTM, characterized in that: include: Data collection module, data preprocessing module and future production prediction module; The data acquisition module is used to collect the oil production, water production and corresponding ICV valve opening data at certain moments; The data preprocessing module is used to preprocess the data acquired by the data acquisition module, divide it into a training data set and a test data set, and perform normalization processing to provide a basis for model training and prediction. The prediction module for future production is used to construct a time series prediction model for predicting future production. The module uses the Attention-LSTM model to perform model training through a training data set to learn the time series features in the data and form a time series prediction model. Finally, the trained prediction model is used to predict future production data.