CEEMDAN-SA-LSTM-based oil well oil production prediction method
By adopting the CEEMDAN-SA-LSTM method in the prediction of oil well oil production, the problem of difficult nonlinear feature and time series data processing in the prior art is solved, and higher prediction accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202411545712.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-14
AI Technical Summary
The existing oil well oil production prediction methods are prone to overfitting and insufficient prediction accuracy when processing nonlinear characteristics and time series data.
The prediction method based on CEEMDAN-SA-LSTM is adopted, and the data is characterized by the CEEMDAN algorithm, combined with PCA dimensionality reduction, and key features are extracted; then the self-attention mechanism and LSTM model are used for training to construct an oil well oil production prediction model.
The accuracy and efficiency of oil production prediction of oil wells is improved, the difficulty of model training is reduced, and the accuracy of prediction results is significantly improved through repeated iteration and tuning.
Smart Images

Figure CN119443392A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of oil well production prediction in the petroleum industry, and specifically relates to an oil well production prediction method based on CEEMDAN-SA-LSTM. Background Art
[0002] Oil plays an important role in the energy field, and the international crude oil price is easily affected by oil production, which in turn affects the financial market. High-precision oil well production prediction methods are helpful to optimize reservoir production technology and reasonably arrange production schedules, thereby reducing economic losses caused by prediction errors.
[0003] In order to improve the accuracy of oil well production prediction, many scholars have applied statistical learning and machine learning methods to oil well production prediction. The statistical method is to use the analysis of historical data to find the potential laws of oil production changes, so as to build a probabilistic statistical model and use the model for prediction and analysis; the prediction method based on machine learning uses classical machine learning methods or deep learning methods for prediction. The former includes linear regression (LR), support vector regression (SVR), back propagation neural network (BPNN), etc. The latter is to build a similar network structure based on the neural structure of the human brain to simulate the learning process of the human brain. It includes recurrent neural network (RNN), convolutional neural network (CNN), etc.
[0004] Since the oil production of oil wells and the multivariate feature sequence information show nonlinear changes, as the network input data increases, the model convergence speed will slow down and overfitting problems will occur; at the same time, the lack of consideration of the characteristic that oil production changes over time limits the improvement of prediction accuracy. Compared with the traditional linear regression model, the nonlinear relationship between these factors leads to the limitations of the traditional model, and it is difficult to accurately capture the changing law of oil production. In order to solve this problem, in recent years, the oil production prediction method based on deep learning has received widespread attention. The LSTM model is a form of deep neural network, which is suitable for dealing with problems with long intervals and delays in the prediction time series and is widely used in the industrial field.
[0005] However, the prediction effect of a single LSTM model is not good and it cannot effectively obtain the features of the input data. In order to improve the accuracy, it is necessary to combine LSTM with other methods to build a composite prediction model for time series. CEEMDAN has powerful time series feature decomposition and mining capabilities. Therefore, scholars combine CEEMDAN with LSTM to more effectively extract spatiotemporal features in input data. The self-attention mechanism is introduced to automatically learn and select features that are more important for oil production prediction. By giving different attention weights to different IMFs and Res, the model can adaptively focus on the most informative components and improve the accuracy of the prediction. Summary of the invention
[0006] In view of the accuracy problem of existing oil well production prediction, the present invention provides an oil well production prediction method based on CEEMDAN-SA-LSTM, which extracts the key features of the data and PCA dimension reduction by CEEMDAN decomposition of the data set to reduce the difficulty of model training; at the same time, the model is repeatedly iterated and repeatedly trained to improve the accuracy. It includes the following steps:
[0007] In order to achieve the above object, the technical solution adopted by the present invention is:
[0008] 1) Collect oil well characteristic data, complete missing value and outlier processing, and convert them into a format suitable for model training and prediction to obtain the data set D = {A1, A2, ..., A i , ...A n}; i represents the number of features; 1≤i≤n;
[0009] 2) Using the Boruta algorithm to perform feature importance analysis on the oil well characteristic data of the standard data set in step 1), retaining the attributes with a high correlation with the oil well production, and constructing the oil well production characteristic data set;
[0010] 3) dividing the data converted in step 2) into data sets;
[0011] 4) The training data set obtained in step 3) is subjected to feature decomposition using Complete Ensemble Empirical Mode Decomposition with Adaptive Noise (CEEMDAN) to obtain intrinsic modal functions (IMFs) and residual (Residual, Res) component features, and principal component analysis (PCA) is used to reduce the data dimension to obtain the final component feature data set.
[0012] 5) inputting the final component feature data set obtained in step 4) into a long short-term memory neural network (Long Short-Term Memory, LSTM) model containing a self-attention mechanism (Self-Attention Mechanism, SA) for learning and model training to construct an oil well production prediction model;
[0013] 6) Calculate the loss function and use a parallel genetic algorithm to tune the model to obtain the optimal combination of model parameters;
[0014] 7) Based on the trained oil well production prediction model, use independent test set data to verify the model performance, calculate the mean absolute error (MAE), root mean square error (RMSE) and mean absolute percentage error (MAPE), and predict the oil well production to obtain the output prediction result.
[0015] Furthermore, in step 1), it is checked whether there are missing values or outliers in the obtained data, and the missing values are filled by forward interpolation, and the outliers are modified by zeroing, which ensures the uniformity and integrity of the data set to a certain extent. The oil well characteristic curve data set is normalized, and the range of each characteristic value in the data set is converted to the interval [0, 1] to eliminate the influence of the dimension on the accuracy of oil well production prediction. The normalization formula is shown in formula (1):
[0016]
[0017] In the above formula, is the result of the operation of the input value, x is the input value, x min is the minimum value of the data feature of this column, x max The maximum value of the data feature in this column.
[0018] Furthermore, in step 2), when the Boruta algorithm is used to perform feature importance analysis, a copy of the original feature is created as a shadow feature, and then the original feature and the shadow feature are merged together to form an extended feature set. The feature set is input into the random forest model for training. During the training process, the algorithm compares the importance of each original feature and the corresponding shadow feature. When the importance of the original feature is significantly higher than all its corresponding shadow features, it is screened as an important feature.
[0019] Furthermore, in step 3), the data set is divided into a training set and a test set in a chronological order in a ratio of 8:2. This operation can prevent model training and testing from interfering with each other, thereby ensuring the accuracy of model evaluation.
[0020] Furthermore, in step 4), when the CEEMDAN algorithm performs feature decomposition, firstly, adaptive white noise is added to the original data, and then cubic spline interpolation is performed on the local maximum and minimum points of the data, respectively. The upper envelope is constructed according to the maximum points, and the lower envelope is constructed according to the minimum points. The mean of the upper and lower envelopes is calculated, and the mean envelope is subtracted from the original data to obtain the IMF component. This step is repeated until it cannot be decomposed again, and several IMFs can be obtained. The CEEMDAN algorithm can eliminate the mutual influence between the various feature vectors in the oil production process and the instability of the oil well feature data. The formula is shown in formula (2):
[0021]
[0022] In the above formula: F(t) is the original signal; f i (t) is the i-th IMFs component; R(t) is the signal residual.
[0023] Furthermore, the feature dimension increases sharply after decomposition by the CEEMDAN algorithm. When the PCA algorithm reduces the dimension of the component data, the covariance matrix of the data is calculated, and the eigenvalue decomposition of the covariance matrix is performed to obtain the eigenvalues and corresponding eigenvectors. The eigenvectors are sorted according to the size of the eigenvalues, and the largest k eigenvectors are selected as the principal components. K is usually the target dimension after dimensionality reduction. The original data is projected onto the selected principal component to obtain the reduced dimensional data. The PCA method is used to reduce the dimensionality of the data, while overfitting is overcome, thereby improving the efficiency of oil well production prediction.
[0024] Furthermore, the specific process in step 5) is:
[0025] 5.1) The final component feature dataset obtained in step 4) is input into the SA module, which is stacked by the self-attention mechanism. The self-attention mechanism takes the sequence data as the input of query, key and value, and projects it through the linear layer to obtain query (Query, Q), key (Key, K) and value (Value, V); Q and K are calculated by scaling and SoffMax operation to obtain the attention weight W i ;W i With V i Multiply them together to get the weighted feature representation. The weighted features are summed and concatenated, and a linear layer is used to map the weighted features to the same dimension as the input data, thereby extracting high-level feature information that is more significant for predicting oil well production. The attention mechanism calculates the weights and the SoftMax formula is shown in equations (3) and (4):
[0026]
[0027]
[0028] In the above formula: Represents the vector length, x i Represents the xth element of the input vector, and n represents the dimension of the vector.
[0029] 5.2) Input the output data of the upper layer into the LSTM module to capture the long-term dependencies of the sequence. The main components of the LSTM unit include the input gate, forget gate, output gate and cell state. The specific process is as follows:
[0030] 5.2.1) The forget gate decides which information to discard from the cell state based on the current input data and the hidden state at the previous moment. The output value of the forget gate is between 0 and 1. A value close to 0 indicates complete forgetting, and a value close to 1 indicates complete retention. ft The calculation formula is shown in (5):
[0031] Γ ft =Sigmoid(W xf x t +W hf h t-1 +b f ) (5)
[0032] 5.2.2) The input gate determines which new information will be stored in the memory cell. The input gate consists of two parts: the sigmoid layer determines which values will be updated, and the tanh layer generates new candidate values. The input gate Γ it The calculation formula is shown in (6):
[0033] Γ it =Sigmoid(W xi x t +W hi h t-1 +b i ) (6)
[0034] 5.2.3) The memory cell is updated according to the results of the forget gate and the input gate. That is, the old memory cell is multiplied by the output value of the forget gate, plus the new candidate value multiplied by the output value of the input gate. Cell state c t The calculation formula is shown in (7):
[0035] c t =Γ ft c t-1 +i t tanh(W xc x t +W hc h t-1 +b c ) (7)
[0036] 5.2.4) The output gate determines which information will be output from the cell state and generates the hidden state at the current moment. Output gate Γ ot The formulas for updating the hidden state are shown in (8) and (9):
[0037] Γ ot =Sigmoid(W xo x t +W ho h t-1 +b o ) (8)
[0038] h t =o t tanh(c t ) (9)
[0039] 5.2.5) The hidden state is processed by a fully connected layer to obtain the prediction result.
[0040] In the above formula: Sigmoid(·) is the Sigmoid activation function; tanh(·) is the hyperbolic tangent activation function; x t represents the input vector at time t; h t-1 represents the hidden layer state value at time t-1; W xi , W xf , W xo Respectively represent the weight vectors from the input layer to the input gate, forget gate, and output gate; W hi , W hf , W ho Respectively represent the weight vectors from the hidden layer to the input gate, forget gate, and output gate; b i 、b f 、b o Represent the offsets of the input gate, forget gate, and output gate respectively.
[0041] Furthermore, in step 6), the mean square error (MSE) is selected as the loss function in the model, and is used as the objective function of the parallel genetic algorithm. The parallel genetic algorithm divides the population into multiple sub-populations and evolves them simultaneously on different processors or computing nodes. Each sub-population performs genetic operations independently, and records the optimal individual of each sub-population at the same time. Information is exchanged between sub-populations regularly, and excellent individuals are transferred from one sub-population to another sub-population through migration operations. The above process is repeated until the stopping condition is met, such as reaching the maximum number of iterations, the objective function value converges, etc., and then all sub-populations are merged, and the global optimal individual is selected as the final parameter tuning result. The mean square error MSE formula is shown in formula (10):
[0042]
[0043] In the above formula, y i is the actual value of oil production of the oil well; is the predicted value of oil production of the oil well; m is the number of samples.
[0044] Furthermore, in step 7), the root mean square error (RMSE), mean absolute percentage error (MAPE), and mean absolute error (MAE) are used to evaluate the model and finally evaluate the performance of the model. The specific calculation formulas of RMSE, MAPE, and MAE are:
[0045]
[0046]
[0047]
[0048] In the above formula: y i is the actual value of daily oil production of the oil well; is the predicted value of daily oil production of the oil well; m is the number of test sample sets. The smaller the evaluation index is, the smaller the error between the predicted value and the actual value is, that is, the higher the accuracy of the prediction model is.
[0049] The beneficial effects of the present invention are:
[0050] 1. The present invention is a method for predicting oil production of oil wells based on CEEMDAN-SA-LSTM, which selects oil well characteristic data to train the model and evaluate the prediction results, calculates RMSE, MAPE, MAE values and predicts the oil production of oil wells. The implementation process of the present invention is simple, and the accuracy is significantly improved compared with the previous method.
[0051] 2. In the present invention, the oil well characteristic data are screened by Boruta algorithm, decomposed by CEEMDAN algorithm, and reduced by PCA in order to ensure the correlation between the model characteristic data and the oil well production data in the method of the present invention, discard irrelevant characteristic data and component data, and ensure that the subsequent oil production prediction has higher accuracy.
[0052] 3. In the present invention, by combining the SA module and the LSTM model, this model has a more comprehensive feature extraction capability. The SA module can deeply capture the internal weight relationship between IMFs and Res, while the LSTM module can mine the global features. Combining the two can more accurately predict the changing trend of oil well production. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 This is a flow chart of the oil well production prediction method based on CEEMDAN-SA-LSTM.
[0054] Figure 2 This is the CEEMDAN-SA-LSTM model diagram.
[0055] Figure 3 This is the CEEMDAN decomposition diagram of well 2-26.
[0056] Figure 4 It is the prediction curve diagram of well 2-13 in the specific embodiment.
[0057] Figure 5 It is the prediction curve diagram of well 2-20 in the specific embodiment.
[0058] Figure 6 It is the prediction curve diagram of well 2-25 in the specific embodiment.
[0059] Figure 7 It is the prediction curve diagram of well 2-26 in the specific embodiment.
[0060] Figure 8 This is a prediction curve diagram for well 2-32 in a specific embodiment.
[0061] Fig. 9 It is the prediction curve diagram of well 2-34 in the specific embodiment. DETAILED DESCRIPTION
[0062] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose, the specific implementation methods and the effects of the structural features of the present invention are described in detail below in combination with the accompanying drawings and embodiments. The technical scheme in the embodiments of the present invention will be clearly and completely described below in combination with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0063] Example
[0064] See also Figure 1 The oil production prediction method of an oil well based on CEEMDAN-SA-LSTM provided in this embodiment includes the following steps:
[0065] 1) Collect oil well characteristic data, fill missing values and process outliers, and convert them into a format suitable for model training and prediction to obtain a data set D = {A1, A2, ..., A i , ...A n}; i represents the number of features; 1≤i≤n;
[0066] 2) Using the Boruta algorithm to perform feature importance analysis on the oil well characteristic data of the standard data set in step 1), retaining the attributes with a high correlation with the oil well production, and constructing the oil well production characteristic data set;
[0067] 3) dividing the data converted in step 2) into data sets;
[0068] 4) The training data set obtained in step 3) is decomposed by CEEMDAN to obtain IMFs and Res component features. PCA is used to reduce the data dimension to obtain the final component feature data set.
[0069] 5) inputting the final component feature data set obtained in step 4) into the SA-LSTM model for learning and model training to construct an oil well production prediction model;
[0070] 6) Calculate the loss function and use a parallel genetic algorithm to tune the model to obtain the optimal combination of model parameters;
[0071] 7) Based on the trained oil well production prediction model, use independent test set data to verify the model performance, calculate MAE, RMSE and MAPE, and predict the oil well production to obtain the output prediction results.
[0072] The experimental data of this embodiment comes from six wells in a block of an oil field in eastern my country, namely Well 2-13, Well 2-20, Well 2-25, Well 2-26, Well 2-32 and Well 2-34. The time span includes 23 years of measured daily oil production data from 1995 to 2018, with a total of more than 47,000 data items. Specifically, it includes oil layer thickness, pump depth, stroke, stroke number, cumulative water production, dynamic liquid level, water content and oil production, and the oil production is used as the predicted value.
[0073] In this embodiment, in step 2), the Boruta algorithm is used to perform feature importance analysis on the correlation between the oil characteristic data of the six wells and the predicted oil production data of the target oil wells, and the cumulative water production, pump depth, water content and dynamic liquid level are selected as the final feature inputs. The feature importance is shown in Table 1.
[0074] Table 1 Feature importance table
[0075]
[0076] In this embodiment, in step 3), the data set obtained in step 2) is divided into a training set and a test set in a chronological order in an 8:2 format.
[0077] In this embodiment, the specific process in step 4) is:
[0078] 4.1) Add adaptive white noise to the feature data set obtained in step 3).
[0079] 4.2) Perform cubic spline interpolation on the local maximum and minimum points of the data.
[0080] 4.3) Construct the upper envelope based on the maximum point, construct the lower envelope based on the minimum point, and calculate the mean of the upper and lower envelopes.
[0081] 4.4) Subtract the mean envelope from the original data to obtain the IMF component. Repeat this step until it cannot be decomposed again, and you will get several IMFs and a Res.
[0082] 4.5) Use the PCA algorithm to screen component features to form the final component data set.
[0083] During implementation, the number of IMFs and Res components generated by the CEEMDAN algorithm is shown in Table 2. The component curve in the experiment takes Well 2-26 as an example. Figure 2 shown.
[0084] Table 2 Number of CEEMDAN components for each well
[0085]
[0086] During implementation, PCA was used to reduce the dimension of data and obtain the final component feature data set. Taking Well 2-26 as an example, Table 3 shows the variance contribution rate and cumulative contribution rate obtained by PCA. Among the first 15 feature sequences, their eigenvalues are all greater than 0.02, and the cumulative contribution rate reaches 93.87%, which is selected as the principal component feature sequence. According to the same method, the input dimensions of Well 2-13, Well 2-20, Well 2-25, Well 2-32, and Well 2-34 are reduced to 13, 16, 13, 15, and 13 respectively.
[0087] Table 3. Principal component variance contribution rate of Well 2-26
[0088]
[0089] In this embodiment, in step 5), when the operation is implemented, the number of self-attention heads is set to 19, the second layer is LSTM with a total of 49 hidden units, and the third layer is a Dropout layer, which is used to randomly discard a part of the neurons in the input data during training to prevent overfitting. The fourth layer is an LSTM with 38 hidden units. A fully connected (Dense) layer is added to the last layer, with 50 neurons and a ReLU (Rectified Linear Units) activation function. The mean square error MSE is used as the loss function of SA-LSTM, the number of iterations is 150 times, and the Adam optimizer is used to optimize the entire network weights to minimize the loss value of the loss function, and the learning rate is 0.001; and a parallel genetic algorithm is used to optimize the model to obtain the optimal combination of model parameters. The number of attention heads is [8, 16, 32, 48], the number of LSTM units is [16, 50], the dropout value is [0.1, 0.5], the learning rate value is [1e-5, 1e-1], the batch size is [16, 32, 64], and the number of training rounds is [50, 200].
[0090] Furthermore, in order to verify the accuracy of the model, LR, SVR, BPNN, RNN, CNN, LSTM, SA-LSTM, and CEEMDAN-LSTM models are compared. The oil production prediction effects of different models using the same feature data set are shown in Table 4. A careful observation of Table 4 shows that the RMSE, MAE, and MAPE of the CEEMDAN-SA-LSTM model are significantly smaller than those of other models. Therefore, the method proposed in this embodiment can be well applied to the task of predicting oil well production.
[0091] Table 4 Evaluation results
[0092]
[0093] Table 4 Evaluation results
[0094]
[0095] In summary, the oil well production prediction method based on CEEMDAN-SA-LSTM can be applied to the oil well production prediction task. This method can obtain good prediction results and is excellent in processing periodic, trend and random nonlinear data.
[0096] The above contents are further detailed descriptions of the present invention in combination with specific implementation methods, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A method for predicting oil production of oil wells based on CEEMDAN-SA-LSTM, characterized by: The following steps are involved: 1) Collect oil well characteristic data, complete missing value and outlier processing, and convert them into a format suitable for model training and prediction to obtain the data set D = {A1, A2, ..., A i , ...A n }; i represents the number of features; 1≤i≤n; 2) Using the Boruta algorithm to perform feature importance analysis on the oil well characteristic data of the standard data set in step 1), retaining the attributes with a high correlation with the oil well production, and constructing the oil well production characteristic data set; 3) dividing the data converted in step 2) into data sets; 4) The training data set obtained in step 2) is subjected to feature decomposition using Complete Ensemble Empirical Mode Decomposition with Adaptive Noise (CEEMDAN) to obtain intrinsic modal functions (IMFs) and residual (Residual, Res) component features. Principal Coordinate Analysis (PCA) is then used to reduce the data dimension and obtain the final component feature data set. 5) inputting the final component feature data set obtained in step 3) into a long short-term memory neural network (Long Short-Term Memory, LSTM) model containing a self-attention mechanism (Self-Attention Mechanism, SA) for learning and model training to construct an oil well production prediction model; 6) Calculate the loss function and use a parallel genetic algorithm to tune the model to obtain the optimal combination of model parameters; 7) Based on the trained oil well production prediction model, use independent test set data to verify the model performance, calculate the mean absolute error (MAE), root mean square error (RMSE) and mean absolute percentage error (MAPE), and predict the oil well production to obtain the output prediction result.
2. The oil well production prediction method based on CEEMDAN-SA-LSTM according to claim 1, characterized in that: In the step 1), it is checked whether there are missing values or outliers in the obtained data, and the missing values are filled by forward interpolation, and the outliers are modified by zeroing, which ensures the uniformity and integrity of the data set to a certain extent. The oil well characteristic curve data set is normalized, and the range of each characteristic value in the data set is converted to the interval [0, 1] to eliminate the influence of the dimension on the accuracy of oil well production prediction.
3. The oil well production prediction method based on CEEMDAN-SA-LSTM according to claim 2, characterized in that: In step 2), when the Boruta algorithm is used to perform feature importance analysis, a copy of the original feature is created as a shadow feature, and then the original feature and the shadow feature are merged together to form an extended feature set. The feature set is input into the random forest model for training. During the training process, the algorithm compares the importance of each original feature and the corresponding shadow feature. When the importance of the original feature is significantly higher than all its corresponding shadow features, it is screened as an important feature.
4. The oil well production prediction method based on CEEMDAN-SA-LSTM according to claim 3 is characterized in that: In the step 3), the data set is divided into a training set and a test set in a 8:2 manner in chronological order. This operation can prevent model training and testing from interfering with each other, thereby ensuring the accuracy of model evaluation.
5. The oil well production prediction method based on CEEMDAN-SA-LSTM according to claim 4 is characterized in that: In the step 4), when the CEEMDAN algorithm performs eigendecomposition, firstly, adaptive white noise is added to the original data, then the local maximum and minimum points of the data are respectively interpolated by cubic spline, the upper envelope is constructed according to the maximum point, the lower envelope is constructed according to the minimum point, the mean of the upper and lower envelopes is calculated, and the mean envelope is subtracted from the original data to obtain the IMF component. This step is repeated until it cannot be decomposed again, and several IMFs can be obtained. The CEEMDAN algorithm can eliminate the mutual influence between the eigenvectors of the oil well data and the instability of the oil well characteristic curve. The PCA algorithm is used to reduce the dimension of the component data. First, the covariance matrix of the data is calculated, and the eigenvalue decomposition of the covariance matrix is performed to obtain the eigenvalue and the corresponding eigenvector. Then the eigenvectors are sorted according to the size of the eigenvalue, and the largest k eigenvectors are selected as the principal components, and k is usually the target dimension after the dimension reduction. Finally, the original data is projected onto the selected principal component to obtain the data after the dimension reduction. The PCA method is used to reduce the dimension of the data and overcome the problem of overfitting.
6. The oil production prediction method of oil wells based on CEEMDAN-SA-LSTM according to claim 5, characterized in that: The specific process in step 5) is: 5.1) The final component feature dataset obtained in step 4) is input into the SA module, which is stacked by the self-attention mechanism. The self-attention mechanism takes the sequence data as the input of query, key and value, and projects it through the linear layer to obtain query (Query, Q), key (Key, K) and value (Value, V); Q and K are calculated by scaling and SoftMax operation to obtain the attention weight W i ; W i With V i Multiply them together to get the weighted feature representation. The weighted features are summed and concatenated, and a linear layer is used to map the weighted features to the same dimension as the input data, thereby extracting high-level feature information that is more significant for predicting oil well production. 5.2) Input the output data of the upper layer into the LSTM module to capture the long-term dependencies of the sequence. The main components of the LSTM unit include the input gate, forget gate, output gate and cell state. The specific process is as follows: 5.2.1) The forget gate decides which information to discard from the cell state based on the current input data and the hidden state at the previous moment. The output value of the forget gate is between 0 and 1, close to 0 means complete forgetting, and close to 1 means complete retention. 5.2.2) The input gate determines which new information will be stored in the memory cell. The input gate consists of two parts: the sigmoid layer determines which values will be updated, and the tanh layer generates new candidate values. 5.2.3) The memory unit is updated according to the results of the forget gate and the input gate. That is, the old memory unit is multiplied by the output value of the forget gate, plus the new candidate value multiplied by the output value of the input gate. 5.2.4) The output gate determines which information will be output from the cell state and produces the hidden state at the current moment. 5.2.5) The hidden state is processed by a fully connected layer to obtain the prediction result.
7. The oil well production prediction method based on CEEMDAN-SA-LSTM according to claim 6, characterized in that: In the step 6), the mean square error (MSE) is selected as the loss function in the model and used as the objective function of the parallel genetic algorithm. The parallel genetic algorithm divides the population into multiple sub-populations and evolves them simultaneously on different processors or computing nodes. Each sub-population performs genetic operations independently, records the best individual of each sub-population, regularly exchanges information between sub-populations, and transfers excellent individuals from one sub-population to another sub-population through migration operations. Repeat the above process until the stopping conditions are met, such as reaching the maximum number of iterations, convergence of the objective function value, etc., then merge all sub-populations, and select the global optimal individual as the final parameter tuning result.
8. The oil well production prediction method based on CEEMDAN-SA-LSTM according to claim 7, characterized in that: In step 7), the root mean square error (RMSE), mean absolute percentage error (MAPE), and mean absolute error (MAE) are used to evaluate the model and ultimately evaluate the performance of the model.
Citation Information
Patent Citations
Spark-based parallel genetic algorithm
CN108197708A
Oil production prediction method based on LSTM
CN109523072A
Indoor environment quality prediction method based on CEEMDAN-PCA-LSTM
CN115096357A
Parameter calibration method and device of parallel genetic algorithm based on adaptive strategy
CN117151212A
Crop yield and price joint prediction method based on model parameter sharing
CN118504756A
Cited By
Oil reservoir layered injection-production production prediction method based on LSTM-Attention
CN119692576A
AI-based oil well yield prediction system and method
CN120373562A
AI-based oil well production prediction system and method
CN120373562B