WaveNet-BiLSTM-ATA oil well yield prediction method based on PSO optimization
By combining the WaveNet-BiLSTM-ATA model with adaptive temporal attention and particle swarm optimization, the problems of multi-scale features and temporal dependency in oil well production prediction are solved, and high-precision daily oil well production prediction is achieved.
Patent Information
- Application Number
- CN202510756487.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-09-19
AI Technical Summary
Existing oil well production prediction methods have low prediction accuracy when faced with factors such as multi-scale characteristics, strong nonlinearity of variables, and global time series dependence. Traditional methods make overly ideal assumptions and rely on simplified models, and machine learning methods cannot effectively extract time series data relationships in complex scenarios.
The WaveNet-BiLSTM-ATA model is adopted, combining the waveform neural network and the bidirectional long short-term memory network, introducing an adaptive temporal attention mechanism, and optimizing through the particle swarm optimization algorithm to improve the model's local feature extraction and global temporal modeling capabilities.
It has achieved accurate prediction of the daily oil production of oil wells, improved prediction efficiency and network convergence speed, and significantly enhanced the generalization ability and robustness of the model.
Smart Images

Figure CN120671898A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of oil well production prediction in the petroleum industry, and specifically relates to a WaveNet-BiLSTM-ATA oil well production prediction method based on PSO optimization. Background Art
[0002] In the petroleum industry, oil well production prediction has been a hot research topic in recent years. Its findings are crucial for petroleum geological planning, economic benefit assessment, resource supply allocation, and production process optimization. As exploration gradually shifts toward heterogeneous areas and deeper layers, the efficiency of oil production prediction is significantly limited by factors such as multi-scale characteristics, strong nonlinearity of variables, and global temporal dependencies.
[0003] Traditional oil production forecasting methods include empirical analysis, gradient solving, and grey prediction models. However, these methods rely on overly idealistic assumptions and simplified models, resulting in low prediction accuracy. With the development of digital technology and artificial intelligence, machine learning has gradually entered the oil industry. Methods such as support vector machines (SVM) and random forests (RF) can estimate oil production by mining the relationship between historical production data and production. However, these methods are static learning methods and cannot effectively extract strong dependencies between contexts. Therefore, they are not suitable for time series data forecasting in the complex scenarios of the oil industry.
[0004] By simulating the neural network structure of the human brain, deep learning can extract and learn multi-level structural features from complex neurons to solve complex nonlinear problems. Among them, convolutional neural networks (CNN), temporal convolutional networks (TCN), and long short-term memory networks (LSTM) are commonly used network models.
[0005] Oil production involves multiple processes. The variables involved in oil production prediction exhibit complex time-series characteristics, such as strong nonlinearity and multi-scale integration. Furthermore, oil well production is affected by multiple factors, including formation pressure, water content, and temperature, and the dynamic coupling of multiple fields. For this reason, some researchers have used LSTM for oil production prediction. This approach mitigates the vanishing gradient problem through a gating mechanism, but its ability to capture long-term time-series data features is limited, and errors are prone to accumulation. Other researchers have used CNN models, but while they are suitable for extracting local structured features, they lack the ability to model time-series dependencies and are less adaptable to different scenarios. To improve prediction efficiency and network convergence, this paper combines a bidirectional LSTM variant, BiLSTM, with a CNN variant, WaveNet. WaveNet's dilated convolutions are used to extract multi-scale local features from oil production data. The BiLSTM's bidirectional time-series modeling capabilities are then leveraged to integrate effective contextual information from the past and future. Furthermore, an adaptive time-series attention mechanism (ATA) is introduced to focus on key time-series features, dynamically assign weights, and then perform a weighted summation. Finally, a particle swarm optimization (PSO) algorithm is used to optimize the model's hyperparameters, aiming to find the global optimal solution within the solution space. Summary of the Invention
[0006] To effectively improve the efficiency of oil well production prediction, this example proposes a WaveNet-BiLSTM-ATA oil well production prediction method based on PSO optimization. The core of this method is to integrate the local feature extraction capabilities of WaveNet, the advantages of BiLSTM bidirectional time series modeling, and the efficient parameter optimization characteristics of PSO. It includes the following steps:
[0007] In order to achieve the above object, the technical solution adopted by the present invention is:
[0008] 1) Collecting time-series-based oil well characteristic production data;
[0009] 2) performing preprocessing such as cleaning and denoising on the data obtained in step 1);
[0010] 3) Formatting and standardizing the data in step 2) to adapt to the model processing requirements;
[0011] 4) Dividing the data in step 3) according to the oil well type to determine the training set and the test set;
[0012] 5) Use the isolation forest algorithm and Pearson correlation coefficient to perform feature correlation analysis on the oil well data, retain the attribute features with high correlation with daily oil production, and construct the oil well daily oil production data set;
[0013] 6) The oil well feature data in step 5) are sequentially input into the Waveform Neural Network (WaveNet) module and the Bi-directional Long Short-Term Memory (BiLSTM) module for deep learning. At the same time, the Adaptive Temporal Attention (ATA) mechanism is introduced to implement temporal feature weight allocation, and finally a daily oil production prediction model for the oil well is built;
[0014] 7) Based on the loss function optimization objective, the particle swarm optimization (PSO) algorithm is used to optimize the model hyperparameters and output the optimal parameter combination;
[0015] 8) Based on the trained prediction model, independent testing is performed to verify the group performance. The model is evaluated by calculating the mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) indicators, and the prediction results are output.
[0016] Furthermore, in step 1), the oil well characteristic parameters mainly include: date, oil layer thickness, cumulative water production, water content, static liquid level, dynamic liquid level, gas-oil ratio, pump depth, pump diameter, etc.
[0017] Furthermore, in step 2), the input data is checked for missing values and outliers. Outliers are identified using a boxplot, and data samples with a daily oil production of 0 are removed. Missing values are filled using forward interpolation to ensure feature integrity and reliability.
[0018] Furthermore, in step 3), the oil well data is scaled using maximum and minimum normalization, and unified into the interval [0, 1] to eliminate the adverse effects of different dimensions and orders of magnitude on the prediction results. The normalization formula is shown in (1):
[0019]
[0020] In the above formula, x′ is the normalized result, x is the original data point, and x min is the minimum value of the column where the attribute x is located, x max The maximum value of the column where attribute x is located.
[0021] Furthermore, in step 4), group training is adopted, and each group sets oil well data of different models as test sets and training sets to ensure the independence of data and the generalization, robustness and interpretability of the model.
[0022] Furthermore, in step 5), the core of the isolation forest algorithm is that abnormal features are isolated first. The algorithm generates a discriminant tree by randomly combining feature dimensions and thresholds, and identifies abnormal features by calculating the average path length based on the principle of topological density hierarchical segmentation. The shorter the path, the weaker the correlation, and vice versa, and thus screens key features. The Pearson correlation coefficient can measure the degree of association between two variables. It is calculated by solving the covariance and has a value range of [-1, 1]. The closer the value is to 1, the higher the degree of positive correlation between the variables, otherwise it is negative. The calculation formula of the Pearson correlation coefficient is shown in (2):
[0023]
[0024] In the above formula, r is the Pearson correlation coefficient, which ranges from -1 to 1. i and y i represent the oil well characteristics and daily oil production observation values, and are the average of the two.
[0025] Furthermore, the specific process in step 6) is as follows:
[0026] 6.1) The data samples in step 5) are first input to the WaveNet module. This module adopts a multi-level dilated convolution architecture, combined with a gating mechanism and residual connection, which can effectively capture the multi-scale dependencies in time series data. The dilated convolution is in exponential form (2 i , i=0, 1, 2…) to expand the receptive field. The specific steps are as follows:
[0027] 6.1.1) Use the first convolutional block to initially extract local features of oil production in the oil well and map them to the corresponding feature space;
[0028] 6.1.2) The mapped features are fed into the first WaveNet residual block, where dilated convolutions are performed in parallel using 128 one-dimensional convolution kernels of size 3. The convolution outputs are then nonlinearly transformed using the tanh and sigmoid activation functions, respectively.
[0029] 6.1.3) The gating mechanism multiplies the upper layer tanh and sigmoid outputs element by element to achieve information selectivity control. The specific calculation formula is shown in (3):
[0030]
[0031] In the above formula, gate is the result of multiplication; W1 and W2 represent different dilated convolution kernels; the * symbol represents the convolution operation; x represents the upper layer output signal; Represents element-by-element multiplication; tanh(W1*x) represents the convolution operation under the hyperbolic tangent function; σ(W2*x) represents the convolution operation under the Sigmoid function.
[0032] 6.1.4) The skip connection performs a one-dimensional convolution on the gated output to generate skip_connection for subsequent feature merging. The residual connection is responsible for adding the original input data to the skip_connection to alleviate the gradient vanishing problem in deep networks;
[0033] 6.1.5) Feed the data into the remaining WaveNet residual blocks, where the convolution dilation factor is increased layer by layer by powers of 2. Repeat steps 6.1.2) to 6.1.4) for each residual block until the loop ends.
[0034] 6.1.6) Add up all skip_connections, apply ReLU to the accumulated sum, and then further extract local fine features through two one-dimensional convolution operations. At the same time, use a dropout rate of 0.2 to prevent network overfitting.
[0035] 6.2) The feature data extracted by the WaveNet module is fed into the BiLSTM module, which, combined with a gated recurrent structure, implements bidirectional encoding of temporal information. This allows for the effective capture of long-term dependencies in oil well production through the flow of forward and reverse temporal information.
[0036] The specific steps are as follows:
[0037] 6.2.1) Input the upper layer output into the first layer of BiLSTM gate control structure, which contains 256 neurons;
[0038] 6.2.2) Use the gate control structure to process the first layer of data forward. The forget gate dynamically determines the cell state information based on the cell hidden state at the previous moment and the current data, and the value is in the range of [0, 1]. The output vector of the forward forget gate at time t is The calculation formula is shown in (4);
[0039]
[0040] In the above formula, (1) represents the first layer of BiLSTM; → represents the positive sign; W f is the forget gate weight matrix; is the positive hidden state at the previous moment; x t is the input at the current moment; b f is the bias vector; represents the vector concatenation operation; σ(·) is the sigmoid activation function.
[0041] 6.2.3) The input gate is composed of Sigmoid and tanh layers, which determine which information will be updated in the cell state. The input gate vector at time t and the current input cell state The calculation formulas are shown in (5) and (6);
[0042]
[0043] In the above formula, (1) represents the first layer of BiLSTM; → represents the positive sign; W i and W c are the input gate weight matrix and the weight matrix for calculating candidate values of memory units; b i and b c are the bias vectors for input gate and calculation of candidate values for memory cells, respectively; represents the vector concatenation operation; σ(·) and tanh(·) are the sigmoid activation function and the hyperbolic tangent activation function, respectively.
[0044] 6.2.4) The update of the memory unit is determined by the results of the forget gate and the input gate. The state of the memory unit at time t is The updated calculation formula is shown in (7);
[0045]
[0046] In the above formula, (1) represents the first layer of BiLSTM; ⊙ represents the element-wise multiplication operation.
[0047] 6.2.5) The output gate is responsible for extracting important information from the cell state and outputting it, while generating hidden information about the current state. The output vector at time step t is and the forward hidden state The calculation formulas are shown in (8) and (9);
[0048]
[0049] In the above formula, (1) represents the first layer of BiLSTM; → represents the positive sign; W o and b o Output the gate weight matrix and bias vector respectively; represents the vector concatenation operation; tanh(·) is the hyperbolic tangent activation function; ⊙ represents the element-wise multiplication operation.
[0050] 6.2.6) Follow the forward output steps 6.2.2) to 6.2.5) to reverse encode the data and obtain the reverse output result in the same way. The forward output of the first layer of BiLSTM and reverse output The results were concatenated in the feature dimension, and some neuron activations were randomly suppressed at a ratio of 0.2;
[0051] 6.2.7) The concatenated result of the upper layer is input to the second layer of BiLSTM to further extract global features. The principle is similar to that of the first layer. The forward and reverse output vectors of the second layer at time t are and The number of neurons is 128, the dropout rate is 0.2, and the final output sequence of BiLSTM is bilstm. t ;
[0052] 6.3) Adaptive temporal attention mechanism. This mechanism first converts the bilstm t The output sequence is mapped into the attention space, and then the importance score of each time step is calculated and softmax normalized to generate the overall probability distribution. Finally, the input features are weighted and summed according to the weights. The specific calculation formulas for the output vector of the attention mechanism are shown in (10) to (12).
[0053]
[0054] In the above formula, is the weight matrix; bilstm t,n is the specific value of the BiLSTM output vector on the nth feature at time t; is the bias vector; exp(·) represents the exponential operation; e t is the attention score at time t; a t is the normalized attention weight at time t.
[0055] 6.4) The Adam optimizer is used, with softplus activation introduced to avoid negative oil production output. Finally, a fully connected layer is used to integrate features and map them to the final daily oil production output data.
[0056] Furthermore, in step 7), the daily oil production prediction model uses mean squared error (MSE) as the loss function, calculated as shown in equation (13), and used as the objective function of the particle swarm optimization algorithm. In the particle swarm optimization algorithm, each potential feasible solution is called a "particle," and each particle has two inherent properties: position and velocity. The algorithm mainly consists of steps such as parameter initialization, fitness calculation, updating particle position and velocity, and evaluating new solutions. During the search process, the update increment of each solution is affected by both the local optimum and the global optimum. After multiple searches and iterations, two sets of optimal hyperparameter combinations are finally output.
[0057]
[0058] In the above formula, y i is the actual value of reserves; is the predicted reserve value; n is the number of samples. The accuracy of the model is related to the MSE. The smaller the MSE, the smaller the error between the actual value and the predicted value.
[0059] Furthermore, in step 8), the mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) are calculated to predict the daily oil production of the oil well and output the prediction results. The calculation formulas are shown in equations (14) to (16):
[0060]
[0061] In the above formula, n is the number of samples; y i is the actual value of daily oil production; is the predicted value of daily oil production. The smaller the MAE, RMSE, and MAPE values, the smaller the error between the actual and predicted daily oil production values, indicating that the model has stronger generalization and predictive capabilities.
[0062] The beneficial effects of the present invention are:
[0063] This paper proposes a WaveNet-BiLSTM-ATA oil well production forecasting method based on PSO optimization. This method combines the global time series modeling capabilities of BiLSTM with the powerful local feature extraction capabilities of WaveNet to deeply mine multi-scale oil well data. By calculating key metrics such as MAE, RMSE, and MAPE, it accurately predicts daily oil production for different oil wells from 1996 to 2018, providing valuable technical insights for oil production forecasting and other areas in the petroleum industry.
[0064] 2. In this invention, the standardization and integrity of the data samples are fully ensured by performing anomaly processing, missing fill-in, and normalization on the data. Furthermore, the data is grouped, with different well types selected within each group as the test and training sets. This not only ensures the independence of the test data but also helps verify the robustness and adaptability of the generated model.
[0065] 3. This invention utilizes an adaptive temporal attention mechanism that fully leverages historical oil volume data to focus on key information, sensitively capturing the importance of data at different time steps. By dynamically assigning weights and integrating features, it effectively improves the model's generalization capabilities in complex oil wells. Furthermore, the PSO algorithm, leveraging information sharing and collaboration between particles, rapidly locates the optimal combination of network hyperparameters in the solution space, resulting in more refined model capture and more accurate prediction capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 This is a flow chart of the WaveNet-BiLSTM-ATA oil well production prediction method based on PSO optimization.
[0067] Figure 2 This is the WaveNet-BiLSTM-ATA network model diagram.
[0068] Figure 3 This is a diagram showing the predicted effects of group 1 in a specific embodiment.
[0069] Figure 4 This is a diagram showing the predicted effects of group 2 in a specific embodiment.
[0070] Figure 5 This is a diagram showing the predicted effects of group 3 in a specific embodiment. DETAILED DESCRIPTION
[0071] In order to more intuitively and clearly demonstrate the purpose and expected effects achieved by the present invention, the specific structural composition and technical route are described in detail and completely in conjunction with the accompanying drawings and implementation process. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work are within the scope of protection of the present invention.
[0072] Example
[0073] See also Figure 1 The WaveNet-BiLSTM-ATA oil well production prediction method based on PSO optimization provided in this embodiment has the following steps:
[0074] 1) Collecting production data based on time series of oil well characteristics;
[0075] 2) performing data preprocessing on the data obtained in step 1);
[0076] 3) Convert the data in step 2) into a format suitable for model training and prediction;
[0077] 4) Divide the data in step 3) to determine the training set and test set;
[0078] 5) Use the isolation forest algorithm and Pearson correlation coefficient to perform feature correlation analysis on the oil well data, retain the attribute features with high correlation with daily oil production, and construct the oil well daily oil production data set;
[0079] 6) The oil well characteristic data in step 5) are sequentially input into the Waveform Neural Network (WaveNet) module and the Bi-directional Long Short-Term Memory (BiLSTM) module, and the Adaptive Temporal Attention (ATA) mechanism is introduced for learning and training to build an oil well daily oil production prediction model;
[0080] 7) Calculate the loss function, use the particle swarm optimization (PSO) algorithm to optimize the model's hyperparameters, and output the optimal model parameter value set;
[0081] 8) Based on the trained daily oil production prediction model, use independent test data to verify the model performance, calculate the MAE, RMSE, and MAPE, predict the daily oil production of the oil well, and output the prediction results.
[0082] The test samples in this embodiment are from some oil-producing well data in a block in eastern my country from 1996 to 2018, specifically covering attributes such as date, oil layer thickness, cumulative water production, water cut, static liquid level, dynamic liquid level, gas-oil ratio, pump depth, pump diameter, stroke, and stroke frequency. The predicted value is daily oil production.
[0083] In this example, in step 4), nine wells were selected as experimental data. The nine wells were divided into three groups: Group 1, Group 2, and Group 3. In Group 1, wells 2-2 and 2-23 were used as the training set, and well 2-5 was used as the test set. In Group 2, wells 2-1 and 2-26 were used as the training set, and well 2-15 was used as the test set. In Group 3, wells 2-4 and 2-20 were used as the training set, and well 2-35 was used as the test set.
[0084] In this example, in step 5), the isolation forest algorithm was used to perform feature importance analysis on the data in groups 1, 2, and 3. The results were compared with those obtained by the Pearson correlation coefficient method. The attributes with the highest correlation with daily oil production were retained, in order: daily water production, cumulative water production, pump efficiency, pump depth, water content, reservoir thickness, stroke, and dynamic liquid level. Finally, an oil well production dataset was constructed.
[0085] In this embodiment, in step 6), the data samples are sequentially input into the WaveNet module and the BiLSTM module for deep learning to accurately extract local and global temporal features, and an adaptive temporal attention mechanism is introduced to perform feature weight allocation. The specific process is as follows:
[0086] 6.1) The data samples from step 5) are first fed into the WaveNet module. This module employs a multi-level dilated convolutional architecture, combined with a gating mechanism and residual connections, to effectively capture multi-scale dependencies in time series data. The dilated convolutions are increased exponentially (2i, i = 0, 1, 2…) to expand the receptive field.
[0087] 6.2) The spatiotemporal features extracted by the WaveNet module are fed into the BiLSTM module, which, combined with a gated recurrent structure, implements bidirectional encoding of temporal information. This effectively captures long-term dependencies in oil well production through the flow of forward and reverse temporal information.
[0088] 6.3) An adaptive temporal attention mechanism is used to perform a weighted summation operation on the upper layer output data. Then, the Adam optimizer is used, and softplus activation is introduced to avoid negative oil production output. Finally, a fully connected layer is used to integrate features and map them into the final daily oil production output data.
[0089] During implementation, the model uses WaveNet-BiLSTM-ATA, which specifically includes 3 WaveNet network residual blocks, 2 BiLSTM layers, and 1 fully connected layer.
[0090] In this embodiment, in step 7), when implementing the operation, taking the initial parameter configuration of Group 1 as an example, each WaveNet residual block uses 128 3×3 convolution kernels, and the convolution expansion rate increases layer by layer at a power of 2. At the same time, the Dropout mechanism is introduced to improve the generalization ability of the model, wherein the neuron dropout rate after the WaveNet convolution layer is set to 0.2. The number of neurons in the first layer of BiLSTM is 256, and the number of neurons in the second layer is 128, and the dropout rate between both layers is 0.2. The fully connected layer uses the softplus activation function to implement nonlinear mapping. The batch size is uniformly set to 32, that is, 32 sets of data are extracted for each training process for experiment. The mean square error (MSE) is used as the loss function of WaveNet-BiLSTM-ATA, the number of iterations is set to 200, and the entire network is optimized with the help of Adam optimizer, with a learning rate of 0.0001. To obtain the optimal parameter combination of the model, the PSO algorithm is used to traverse and search part of the network parameter space. Among them, the number of WaveNet residual blocks is in the range of [2, 10], the number of WaveNet convolution filters is in the range of [16, 128], the number of BiLSTM first layer neurons is in the range of [16, 256], the number of BiLSTM second layer neurons is in the range of [16, 128], the BiLSTM layer neuron dropout rate is in the range of [0.1, 0.5], the learning rate is in the range of [0.0001, 0.01], and the batch size is in the range of [32, 64, 128]. Table 1 shows the hyperparameter optimization combination results of WaveNet-BiLSTM-ATA after PSO optimization on test wells in groups 1, 2, and 3.
[0091] Table 1 Hyperparameter optimization results of WaveNet-BiLSTM-ATA based on PSO optimization
[0092]
[0093] Furthermore, the oil production prediction effects of LR, CNN, LSTM, WaveNet, WaveNet-LSTM and other models on the same data sets (Group 1, Group 2 and Group 3) were compared to verify the generalization ability and accuracy of WaveNet-BiLSTM-ATA after PSO optimization. Table 2 shows the RMSE, MAE and MAPE of different models on the same data. The conclusion shows that the errors of the hybrid model are significantly smaller than those of other comparison models. Therefore, the method proposed in this embodiment can be well applied to the actual prediction task of daily oil production.
[0094] Table 2 Model performance evaluation table
[0095]
[0096] Table 2 Model performance evaluation table
[0097]
[0098] In summary, the WaveNet-BiLSTM-ATA oil well production prediction method based on PSO optimization can be applied to the specific prediction task of oil well production. This method fully extracts the information characteristics of global and local time series data, further adjusts and improves the original daily oil production calculation scheme, and achieves good prediction results in the experiment.
[0099] The above content is a further detailed description of the present invention in conjunction with specific embodiments, and the specific implementation of the present invention should not be considered to be limited to these descriptions. For those skilled in the art of the present invention, without departing from the concept of the present invention, several simple deductions or substitutions can be made, which should be considered to fall within the scope of protection of the present invention.
Claims
1. A WaveNet-BiLSTM-ATA oil well production prediction method based on PSO optimization, characterized in that: The following steps are involved: 1) Collecting time-series-based oil well characteristic production data; 2) performing preprocessing such as cleaning and denoising on the data obtained in step 1); 3) Formatting and standardizing the data in step 2) to adapt to the model processing requirements; 4) Dividing the data in step 3) according to the oil well type to determine the training set and the test set; 5) Use the isolation forest algorithm and Pearson correlation coefficient to perform feature correlation analysis on the oil well data, retain the attribute features with high correlation with daily oil production, and construct the oil well daily oil production data set; 6) The oil well feature data from step 5) are sequentially input into the Waveform Neural Network (WaveNet) module and the Bi-directional Long Short-Term Memory (BiLSTM) module for deep learning. At the same time, an Adaptive Temporal Attention (ATA) mechanism is introduced to implement temporal feature weight allocation, and finally a daily oil production prediction model for the oil well is constructed; 7) Based on the loss function optimization objective, the particle swarm optimization (PSO) algorithm is used to optimize the model hyperparameters and output the optimal parameter combination; 8) Based on the trained prediction model, independent testing is performed to verify the group performance. The model is evaluated by calculating the mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) indicators, and the prediction results are output.
2. The WaveNet-BiLSTM-ATA oil well production prediction method based on PSO optimization according to claim 1 is characterized in that: In step 1), the oil well characteristic parameters mainly include: date, oil layer thickness, cumulative water production, water content, static liquid level, dynamic liquid level, gas-oil ratio, pump depth, pump diameter, etc.
3. The WaveNet-BiLSTM-ATA oil well production prediction method based on PSO optimization according to claim 2 is characterized in that: In step 2), the input data is checked for missing values and outliers. Outliers are identified using a box plot, and data samples with a daily oil production of 0 are removed. Missing values are filled using forward interpolation to ensure feature integrity and reliability.
4. The WaveNet-BiLSTM-ATA oil well production prediction method based on PSO optimization according to claim 3 is characterized in that: In step 3), the oil well data are scaled using maximum and minimum normalization, and are uniformly merged into the interval [0, 1] to eliminate the adverse effects of different dimensions and orders of magnitude on the prediction results.
5. The WaveNet-BiLSTM-ATA oil well production prediction method based on PSO optimization according to claim 4 is characterized in that: In step 4), group training is adopted, and each group is set with oil well data of different models as a test set and a training set to ensure the independence of the data and the generalization, robustness and interpretability of the model.
6. The WaveNet-BiLSTM-ATA oil well production prediction method based on PSO optimization according to claim 5 is characterized in that: In step 5), the core of the isolation forest algorithm is to prioritize the isolation of abnormal features. The algorithm generates a discriminant tree by randomly combining feature dimensions and thresholds. Based on the principle of topological density hierarchical segmentation, it identifies abnormal features by calculating the average path length. The shorter the path, the weaker the correlation, and vice versa, the stronger the correlation, thereby screening key features. The Pearson correlation coefficient can measure the degree of association between two variables. It is calculated by solving the covariance and has a value range of [-1, 1]. The closer the value is to 1, the higher the degree of positive correlation between the variables, and vice versa.
7. The WaveNet-BiLSTM-ATA oil well production prediction method based on PSO optimization according to claim 6 is characterized in that: The specific process in step 6) is as follows: 6.1) The data samples in step 5) are first input to the WaveNet module. This module adopts a multi-level dilated convolution architecture, combined with a gating mechanism and residual connection, which can effectively capture the multi-scale dependencies in time series data. The dilated convolution is in exponential form (2 i , i=0, 1, 2…) to expand the receptive field. The specific steps are as follows: 6.1.1) Use the first convolutional block to initially extract local features of oil production in the oil well and map them to the corresponding feature space; 6.1.2) The mapped features are fed into the first WaveNet residual block, where dilated convolutions are performed in parallel using 128 one-dimensional convolution kernels of size 3. The convolution outputs are then nonlinearly transformed using the tanh and sigmoid activation functions, respectively. 6.1.3) The gating mechanism multiplies the upper layer tanh and sigmoid outputs element-wise to achieve information selectivity control; 6.1.4) The skip connection performs a one-dimensional convolution on the gated output to generate skip_connection for subsequent feature merging. The residual connection is responsible for adding the original input data to the skip_connection to alleviate the gradient vanishing problem in deep networks; 6.1.5) Feed the data into the remaining WaveNet residual blocks, where the convolution dilation factor is increased layer by layer by powers of 2. Repeat steps 6.1.2) to 6.1.4) for each residual block until the loop ends. 6.1.6) Add up all skip_connections, apply ReLU to the accumulated sum, and then further extract local fine features through two one-dimensional convolution operations. At the same time, use a dropout rate of 0.2 to prevent network overfitting. 6.2) The feature data extracted by the WaveNet module is fed into the BiLSTM module, which, combined with a gated recurrent structure, implements bidirectional encoding of temporal information. This allows for the effective capture of long-term dependencies in oil well production through the flow of forward and reverse temporal information. The specific steps are as follows: 6.2.1) Input the upper layer output into the first layer of BiLSTM gate control structure, which contains 256 neurons; 6.2.2) Use the gate control structure to forward process the first layer of data. The forget gate dynamically determines the cell state information to be discarded based on the cell's hidden state at the previous moment and the current data, and the value is in the range of [0, 1]; 6.2.3) The input gate consists of a sigmoid and tanh layer, which determines what information will be updated in the cell state; 6.2.4) The update of the memory unit is determined by the results of the forget gate and the input gate; 6.2.5) The output gate is responsible for extracting important information from the cell state and outputting it, while also generating hidden information about the current state. 6.2.6) Reverse encode the data according to the forward output steps 6.2.2) to 6.2.5) and obtain the reverse output results in the same way. Concatenate the forward and reverse output results of the first layer of the BiLSTM in the feature dimension and randomly suppress the activation of some neurons at a ratio of 0.
2. 6.2.7) The concatenated result of the upper layer is input to the second layer of BiLSTM to further extract global features. The principle is similar to the first layer. Finally, the forward and reverse output vectors of the second layer are concatenated again. The number of neurons is 128, the dropout rate is 0.2, and the final output sequence of BiLSTM is bilstm t ; 6.3) Adaptive temporal attention mechanism. This mechanism first converts the bilstm t The output sequence is mapped into the attention space, and then the important score of each time step is calculated and softmax normalized to generate the overall probability distribution, and finally the input features are weighted and summed according to the weights. 6.4) The Adam optimizer is used, with softplus activation introduced to avoid negative oil production output. Finally, a fully connected layer is used to integrate features and map them to the final daily oil production output data.
8. The WaveNet-BiLSTM-ATA oil well production prediction method based on PSO optimization according to claim 7 is characterized in that: In step 7), the daily oil production prediction model uses mean squared error (MSE) as the loss function and the objective function of the particle swarm optimization algorithm. In the particle swarm optimization algorithm, each potential feasible solution is called a "particle," and each particle has two unique properties: position and velocity. The algorithm primarily consists of steps such as parameter initialization, fitness calculation, updating particle position and velocity, and evaluating new solutions. During the search process, the incremental update of each solution is influenced by both local and global optima. After multiple searches and iterations, a set of optimal hyperparameter combinations is ultimately output.
9. The WaveNet-BiLSTM-ATA oil well production prediction method based on PSO optimization according to claim 8 is characterized in that: In step 8), the mean absolute error (MAE), root mean square error (RMSE) and mean absolute percentage error (MAPE) are used to evaluate the performance of the model, and the prediction results are output at the same time.
Citation Information
Cited By
Gas leakage trend prediction method and system based on deep learning
CN121071749A
A gas leakage trend prediction method and system based on deep learning
CN121071749B