Method for predicting old well production horizon by using improved Transform network
By improving the Transformer network model and related technologies, the problem of unstable and inaccurate formation data feature extraction in old well production strata prediction is solved, continuous and dynamic formation data analysis is realized, and the accuracy of missing value filling and model training is improved. , ensure economic benefits and production tier selection, significantly improving prediction accuracy and reliability.
Patent Information
- Application Number
- CN202410975624.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-19
AI Technical Summary
The existing technology has problems of unstable and inaccurate extraction of strata data feature in the prediction of old well production strata. Traditional methods are difficult to capture complex strata structures, and gradient disappearance or gradient explosion problems are prone to problems, missing values are inaccurately filled, and lack of systems. sensitivity analysis and optimization process.
Using the improved Transformer network model, combining adaptive spatiotemporal convolutional neural network, multi-scale context aggregation layer and adaptive formation feature transformation layer, the model parameters are optimized through cross-validation, and the minimum yield threshold is set using continuous sliding window and context aggregation technology. Carry out dynamic analysis and yield prediction of stratigraphic data.
Improve the stability and accuracy of stratigraphic data feature extraction, realize continuous and dynamic stratigraphic data analysis, enhance the accuracy of missing value filling, avoid overfitting and underfitting, and provide economic benefits and practical operation. The selection of production strata significantly improves the accuracy and reliability of production strata prediction of old wells.
Smart Images

Figure CN118979725A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of production layer prediction of old wells, and in particular to a method for predicting production layer of old wells by using an improved Transformer network. Background Art
[0002] Existing stratigraphic analysis mainly relies on traditional geological analysis and simple statistical methods, which have many shortcomings in dealing with complex geological structures and production layer prediction. Stratigraphic analysis is an important part of oil and gas field development, which has a direct impact on the production efficiency of wells and the formulation of development plans. Traditional stratigraphic analysis methods usually use shallow neural networks or non-neural network algorithms, which show limitations in capturing complex structural features in stratigraphic data and often fail to accurately reflect the true situation of the stratigraphic data.
[0003] In traditional methods, shallow neural networks have limited network depth and are difficult to fully learn and extract complex features in stratigraphic data. In deep neural networks, as the number of network layers increases, gradient vanishing or gradient exploding problems are prone to occur, making model training difficult and reducing accuracy. In addition, stratigraphic data has significant continuity and hierarchy. Traditional methods often treat stratigraphic data as discrete points, ignoring the subtle changes and depth correlations between strata. This processing method cannot effectively cope with changes in different geological environments and conditions, and cannot provide accurate stratigraphic division and production layer prediction.
[0004] In the prior art, traditional stratigraphic data preprocessing methods, including data standardization and denoising, usually use simple statistical methods and fail to fully consider the complexity and heterogeneity of stratigraphic data. Missing value filling methods are also relatively simple and lack comprehensive consideration of the temporal and spatial correlation of stratigraphic data, resulting in insufficient accuracy and consistency of filling results. In addition, most existing stratigraphic data feature extraction methods are based on shallow models or simple convolutional neural networks, which cannot fully explore the deep-level features in stratigraphic data, affecting the accuracy of stratigraphic division.
[0005] In terms of model training, traditional methods usually use a single training set and validation set for model optimization, lack the application of cross-validation technology, and the optimization effect of model parameters is poor, which easily leads to overfitting or underfitting problems. In the process of production prediction, existing methods mostly use fixed window or simple sliding window technology, fail to make full use of continuous sliding window and context aggregation technology, and cannot accurately reflect the dynamic changes and complex structure of formation data. For the setting of the minimum production threshold, traditional methods are mostly based on experience or simple economic models, lack of systematic sensitivity analysis and optimization process, and it is difficult to ensure the economic benefits and practical operability of production layer selection.
[0006] Therefore, in view of the above-mentioned deficiencies in the prior art, the present invention proposes an improved method, which combines the improved Transformer network model, the adaptive spatiotemporal convolutional neural network, the multi-scale context aggregation layer and the adaptive formation feature transformation layer, aiming to improve the stability and accuracy of formation data feature extraction and realize continuous and dynamic formation data analysis and division. At the same time, the model parameters are optimized through the systematic cross-validation technology, combined with the continuous sliding window and context aggregation technology, to achieve accurate production prediction of new layers of old wells, and set the minimum production threshold through sensitivity analysis and optimization to ensure the economic benefits and practical operability of production layer selection. Summary of the invention
[0007] The purpose of this invention is to provide a method for predicting the production layer of old wells using an improved Transformer network. By introducing technologies such as residual neural network, multi-head attention mechanism and adaptive feature transformation, it aims to solve the shortcomings of the existing technology, improve the stability and accuracy of formation data feature extraction, and realize continuous and dynamic formation data analysis and division.
[0008] The present invention is achieved through the following technical solutions:
[0009] The present invention relates to a method for predicting production layers of old wells by using an improved Transformer network, comprising the following steps:
[0010] S1. Collect and pre-process formation data and production data from multiple wells with known production horizons;
[0011] Among them, the formation data includes seismic data, well logging data and experimental data, and the production data is the cumulative production from the start of production to the end of production;
[0012] The preprocessing is specifically as follows: data standardization and denoising of formation data;
[0013] S2. For missing stratigraphic data, the missing value filling method is used for processing;
[0014] S3. Design an improved Transformer network model that includes multiple improved self-attention layers and feedforward neural network layers; each self-attention layer includes a multi-head attention mechanism, a normalization layer, and a residual connection, and each feedforward neural network layer includes a fully connected layer, an activation function, and a residual connection;
[0015] S4, using the pre-processed formation data and production data in steps S1 and S2 to train the improved Transformer network model designed in step S3, and using cross-validation technology to optimize the Transformer network model parameters during the training process;
[0016] S5. Apply the trained improved Transformer network model to the production prediction of new layers in old wells. Collect new formation data each time the window moves by continuous sliding window processing, predict the production of the formation within the window, and form the production of continuous deep formations.
[0017] S6. Set the minimum output threshold for development and production, and optimize it in combination with the economic model;
[0018] S7, the continuous production at different depths obtained in S5 is screened by the threshold value set in S6, and the final layer where the old well can be produced is determined.
[0019] Preferably, the specific steps of S1 are:
[0020] S11. Collect stratigraphic data from multiple wells with known production horizons;
[0021] S12. Standardize the collected formation data and convert each characteristic value into standard normal distribution data with a mean of 0 and a standard deviation of 1. Formula (1) is as follows:
[0022]
[0023] In formula (1), x is the original data, μ is the mean of the data, and σ1 is the standard deviation of the data;
[0024] S13, performing denoising processing on the standardized formation data:
[0025] Using wavelet denoising technology, by selecting appropriate wavelet basis functions and decomposition layers, the seismic data is decomposed and reconstructed at multiple scales to remove high-frequency noise;
[0026] Apply a moving average filter to the logging data to smooth the data and remove random noise by calculating the average of multiple adjacent data points;
[0027] Use a low-pass filter on the experimental data, set a suitable cutoff frequency, and filter out high-frequency noise components;
[0028] S14. Collect production data from multiple wells at known production layers, where the production data includes cumulative production from the start of production to the end of production;
[0029] S15, standardizing the collected production data, converting each characteristic value into standard normal distribution data with a mean of 0 and a standard deviation of 1;
[0030] S16. De-noising the standardized production data, specifically including:
[0031] Using wavelet denoising technology, by selecting appropriate wavelet basis functions and decomposition levels, the production data is decomposed and reconstructed at multiple scales to remove high-frequency noise;
[0032] Apply a moving average filter to the production data to smooth the data and remove random noise by calculating the average of multiple adjacent data points;
[0033] Use a low-pass filter on the yield data and set an appropriate cutoff frequency to filter out high-frequency noise components.
[0034] Preferably, the specific steps of S2 are:
[0035] S21. Identify missing values in the formation data and record the locations of the missing values. The specific steps are as follows:
[0036] Data Check:
[0037] Perform an initial data check to identify any obvious missing values, scanning each entry in the dataset for null values, non-numeric values, infinity, or pre-defined identifiers.
[0038] Data checking is done through data processing libraries in programming languages, such as the Pandas library in Python. The isnull() or isna() methods can be used to check for missing values in a data frame.
[0039] Missing Value Identification:
[0040] Apply automated scripts or data analysis tools to identify missing data points. In well logging data, values should appear continuously at consecutive depths. If data is missing in a certain depth segment, that portion will be marked as missing. During the identification process, set up logical checks to find values that are outside the normal range or do not conform to the expected data distribution. Outliers indicate data corruption or missingness.
[0041] Record the missing value position:
[0042] After identifying missing values, it is important to record the location of the value, either at its index position in the dataset or at its depth in stratigraphic data.
[0043] This is done using a data structure such as a list or array, which stores the exact location of each missing value.
[0044] Using the data logging tool:
[0045] When processing large-scale stratigraphic data, use a database management system or professional data analysis software to help record and manage information on missing values.
[0046] S22. Construct an adaptive spatiotemporal convolutional neural network model. The spatiotemporal convolutional neural network model can consider the spatiotemporal correlation of the formation data. The model includes multiple spatiotemporal convolutional layers and pooling layers. The convolution process is shown in formula (2):
[0047]
[0048] In formula (2), y i,j,k is an element in the output feature map, σ is the activation function, and w m,n,l is the convolution kernel, x i+m,j+n,k+l is the element in the input feature map, b is the bias, M, N, L are the sizes of the convolution kernel in time and space respectively;
[0049] S23. Optimize the parameters of the spatiotemporal convolutional neural network model by back propagation algorithm, where the loss function is formula (3) as follows:
[0050]
[0051] In formula (3), L is the loss function, N is the number of samples, and y i is the true value, is the predicted value, λ is the regularization parameter, w j are model parameters;
[0052] S24, input the stratigraphic data segment where the missing value is located into the trained spatiotemporal convolutional neural network model, and the formula for predicting the missing value is shown in formula (4):
[0053]
[0054] In formula (4), x i is a missing value, x i-1 ,x i+1 is the adjacent data point, t i-1 ,t i+1 is the corresponding time point, α k is the weight of the kth spatiotemporal convolution kernel, and K is the number of spatiotemporal convolution kernels;
[0055] S25. Perform multi-level aggregation analysis on the filled stratigraphic data to ensure that the filled data are consistent at different scales. The relevant information is shown in formula (5):
[0056]
[0057] In formula (5), x' i is the aggregated data point, S is the number of scales, g s is the aggregation function at the sth scale.
[0058] Preferably, the specific steps of S3 are:
[0059] S31, constructing an improved self-attention layer that integrates stratigraphic sequence coding and production parameters, including a stratigraphic sequence coding module and a production parameter fusion module, specifically including formula (6):
[0060]
[0061] In formula (6), D is the formation data matrix, P is the production parameter matrix, d i ·p i are the characteristic vectors of formation data and production parameters respectively, and Encode is the sequence encoding function;
[0062] S32. Design a multi-scale context aggregation layer to model the multi-scale structure of the formation and the production layer by aggregating formation data and production parameters at different scales, as shown in formula (7):
[0063]
[0064] In formula (7), x is the input data, S is the number of different scales, and α s is the scale weight, Conv s (x) is the convolution operation of the sth scale;
[0065] S33, introduce an adaptive formation feature transformation layer to dynamically adjust the feature representation according to different formations and production conditions, as shown in formula (8):
[0066] AdaptiveFeatureTransform(x)=W(t)·x+b(t) (8)
[0067] In formula (8), W(t) and b(t) are trainable parameters that change over time, and x is the input feature vector;
[0068] S34. Construct an enhanced production prediction layer to accurately predict the production layer by integrating the formation characteristics and production data at different levels, as shown in formula (9):
[0069]
[0070] In formula (9), σ is the activation function, W l and b l is the weight and bias of the lth layer, x l is the input data feature of the lth layer;
[0071] S35. An innovative joint normalization layer is added between each layer to perform normalization processing on the characteristics of formation data and production parameters, as shown in formula (10):
[0072]
[0073] In formula (10), x and y are formation data and production parameters respectively, μ x and σ x is the mean and standard deviation of the formation data, μ y and σ y is the mean and standard deviation of the production parameters;
[0074] S36, stack multiple improved layers to form an improved Transformer network model; the network depth is determined by specific application requirements to adapt to different old well production layer prediction tasks;
[0075] S37. Initialize the constructed improved Transformer network model, and use an adaptive initialization method based on input data characteristics and production conditions to make the model parameters have good numerical characteristics in the initial state. The specific formula (11) is:
[0076]
[0077] In formula (11), W ij (t) is the initial value of the weight matrix at time point t, init is the initialization function, d is the feature dimension of the input data, α is the adaptive parameter, and T is the time period.
[0078] In S3 described in the present invention: the improved self-attention layer fuses the formation sequence coding and production parameters, and captures the complex relationship between the formation and production data through joint coding. The multi-scale context aggregation layer achieves multi-scale modeling of complex formation structures and production layers by aggregating data of different scales, and enhances the model's ability to capture information at different levels. The adaptive formation feature transformation layer dynamically adjusts the feature representation according to different formations and production conditions to enhance the adaptability and generalization ability of the model. The enhanced production prediction layer achieves accurate prediction of production layers by fusing formation features and production data at different levels, and is specifically optimized for prediction of production layers of old wells. The joint normalization layer performs joint normalization processing on formation data and production parameters to improve the model's adaptability to data heterogeneity. The adaptive initialization method performs adaptive initialization based on input data characteristics and production conditions to ensure that the model has good numerical characteristics in the initial state.
[0079] Preferably, the specific steps of S4 are:
[0080] S41, dividing the formation data and production data preprocessed in steps S1 and S2 into a training set, a validation set and a test set, with the division ratios being 70%, 20% and 10% respectively;
[0081] S42, input the data of the training set into the improved Transformer network model designed in step S3 for training, and use cross-validation technology to optimize model parameters during the training process:
[0082] S421, divide the training set data into k subsets, select one of the subsets as the validation set, and the remaining subsets as the training set, repeat k times, so that each subset is used as a validation set, and the average result of cross-validation is used as the final evaluation indicator of the model;
[0083] S422. In each training, the back propagation algorithm and the gradient descent optimizer (Adam optimizer) are used to update the model parameters. The specific formula (12) is:
[0084]
[0085] In formula (12), θ is the model parameter, η is the learning rate, and L(θ t ) is the value of the loss function at the tth iteration, and the loss function includes the mean square error loss and the regularization term;
[0086] S43. In each cross-validation, record the loss value of each validation set and the model evaluation indicators (mean square error, mean absolute error, and R 2 value), select the model parameters with the smallest validation set loss value and the best evaluation index as the final model parameters;
[0087] S44. Use the final model parameters to predict the validation set and test set, evaluate the generalization ability and prediction accuracy of the model, and ensure that the model has good performance on different data sets;
[0088] S45. Save the final trained improved Transformer network model, including the model structure, model parameters and optimizer status, for subsequent use and deployment.
[0089] Preferably, the specific steps of S5 are:
[0090] S51, deploy the trained improved Transformer network model in the production environment to receive new layer stratigraphic data of old wells;
[0091] S52, using the continuous sliding window technology to process the stratigraphic data of the new layer, the specific method is as follows:
[0092] S521, setting the size of the sliding window to W, and the step size of each window movement to S, to ensure that the window covers continuous formation data segments;
[0093] S522: Extracting formation data fragment D in each sliding window i:i+W , where i is the starting position of the sliding window;
[0094] S523, input each formation data segment into the trained improved Transformer network model to perform production prediction, and obtain the production prediction value in the corresponding window
[0095] S53, splicing the prediction results of all sliding windows to form a production prediction sequence of continuous depth formations Where N is the total length of the stratigraphic data;
[0096] S54. Smoothing the predicted output sequence to eliminate the window boundary effect is performed, as shown in formula (13):
[0097]
[0098] In formula (13), is the smoothed output forecast value, n j is the number of overlaps within the window, and W is the size of the sliding window;
[0099] S55, using the smoothed continuous production prediction sequence as the production prediction result of the new layer of the old well, and generating a prediction report, the report content including formation depth, predicted production, and prediction accuracy information;
[0100] S56. Based on the forecast report, adjust the development decision and production plan for the new strata of the old wells.
[0101] Preferably, the specific steps of S6 are:
[0102] S61. Collect and analyze historical production data and economic benefit data to determine the initial estimate of the minimum production threshold, as shown in formula (14):
[0103]
[0104] In formula (14), P min is the minimum production threshold, C fixed is the fixed cost, C variable is the variable cost, t is the production time, and R is the oil price or rate of return;
[0105] S62. Use formation characteristics and production forecast results, combined with economic models for optimization, and adjust the minimum production threshold to ensure the economic feasibility of development and production;
[0106] S63. Conduct sensitivity analysis on the production under different formations and production conditions to evaluate the impact of different production thresholds on economic benefits, as shown in formula (15):
[0107]
[0108] In formula (15), S(P min ) is the sensitivity of the output threshold, E is the economic benefit, P min is the minimum production threshold;
[0109] S64. According to the sensitivity analysis results, determine the final minimum production threshold P min,final , ensuring that it can meet the economic benefit requirements under different production conditions.
[0110] Preferably, the specific steps of S7 are:
[0111] S71. Continuous production prediction results at different depths With the set minimum output threshold P min,final Make a comparison;
[0112] S72, continuous production forecast results Converted to production prediction value at each depth point Where i is the stratigraphic depth index;
[0113] S73. For each depth point i, determine its production prediction value Is it greater than or equal to the minimum production threshold P? min,final :
[0114]
[0115] In formula (16), Flag i is the sign of depth point i, 1 means production can be carried out, 0 means no production;
[0116] S74, according to the output forecast results and flag i , generate a production distribution map of the formation depth, marking the layers where production can be carried out;
[0117] S75. Perform cluster analysis on all depth points marked as 1 to determine continuous productive layers:
[0118] S751, calculate the distance d(i,i+1) between adjacent depth points, if the flags of the adjacent depth points are both 1 and the distance is less than the preset threshold d max , they are classified into the same layer;
[0119] S752, smoothing the clustering results, removing isolated depth points, and ensuring the continuity and practical operability of the layers;
[0120] S76. According to the results of cluster analysis and smoothing processing, the final layer of the old well that can be produced is determined, and a production layer report is generated. The report content includes layer depth range, predicted production, and production suggestion information;
[0121] S77. The final production layer will be used in the formulation of production plans and development programs for old wells to ensure that the selection of production layers is economical and practical.
[0122] The present invention has the following advantages:
[0123] (1) The present invention improves the stability and accuracy of stratigraphic data feature extraction: by introducing a residual neural network, a multi-head attention mechanism, and an adaptive feature transformation layer into an improved Transformer network, the common gradient vanishing or gradient exploding problems in traditional deep neural networks are solved; the present invention can effectively capture the complex structural features in stratigraphic data through an improved self-attention layer, ensuring high accuracy and stability during deep-level feature extraction, thereby greatly improving the accuracy of stratigraphic division and production layer prediction.
[0124] (2) The present invention realizes continuous and dynamic analysis and division of stratigraphic data: by using continuous sliding window technology and multi-scale context aggregation layer, features can be dynamically extracted and analyzed from stratigraphic data; the method of the present invention not only analyzes based on static single-point data, but also reflects the continuity and hierarchy of stratigraphic layers based on the overall depth sequence information. Through this continuous and dynamic analysis method, it can better cope with the changes in different geological environments and conditions and provide more accurate stratigraphic division results.
[0125] (3) The present invention adopts an adaptive missing value filling method: an adaptive spatiotemporal convolutional neural network model is used to fill in the missing stratigraphic data, taking into account the spatiotemporal correlation of the stratigraphic data; through the joint encoding of stratigraphic data and production parameters and adaptive feature transformation, the filled data is consistent with the original data in statistical characteristics, which significantly improves the accuracy and consistency of missing value filling.
[0126] (4) Model training and optimization of the system of the present invention: The improved Transformer network model is trained and optimized using cross-validation technology, which effectively avoids overfitting and underfitting problems. By dividing the preprocessed formation data and production data into training sets, validation sets, and test sets, it is ensured that the optimization effect of the model parameters has good generalization ability and prediction accuracy on different data sets.
[0127] (5) Accurate production prediction and production layer division of the present invention: The continuous sliding window technology is used to process new stratigraphic data to form a production prediction sequence for continuous depth stratigraphic layers. Through multi-level aggregation analysis and sensitivity analysis, a reasonable minimum production threshold is set, and production layers that meet economic benefit requirements are screened out. The final production layer division result is smoothed to ensure the continuity and practical operability of the layers.
[0128] (6) Maximization of the economic benefits of the present invention: Through systematic sensitivity analysis and optimization, the minimum production threshold is set to ensure the economic benefits and practical operability of the production layer selection. Combined with the formation characteristics and production prediction results, the production under different formations and production conditions is evaluated to provide a scientific basis for production decision-making, effectively improving the overall economic benefits of old well production.
[0129] (7) The present invention achieves remarkable beneficial effects in terms of improving the stability and accuracy of formation data feature extraction, realizing continuous and dynamic formation data analysis and division, adaptive missing value filling, systematic model training and optimization, accurate production prediction and production layer division, and maximizing economic benefits by improving the application of Transformer network and related technologies, and significantly improving the accuracy and reliability of production layer prediction of old wells. BRIEF DESCRIPTION OF THE DRAWINGS
[0130] Figure 1 The present invention relates to a flow chart of a method for predicting production layers of old wells using an improved Transformer network. DETAILED DESCRIPTION
[0131] The present invention is described in detail below in conjunction with specific embodiments. It should be noted that the following embodiments are only further descriptions of the present invention, but the protection scope of the present invention is not limited to the following embodiments.
[0132] Example
[0133] This embodiment relates to a method for predicting production layers of old wells using an improved Transformer network. Figure 1 As shown,
[0134] S1. In this oil field block, 10 representative old wells were selected for experiments. The formation data of these old wells include seismic data, well logging data and experimental data, and the production data include the cumulative production from the start of production to the end of production. First, these formation data and production data are preprocessed, including data standardization and denoising. For seismic data, wavelet denoising technology is used to remove high-frequency noise; for well logging data, moving average filter is applied to smooth the data; for experimental data, low-pass filter is used to filter out high-frequency noise.
[0135] S2. Missing values are filled using an adaptive spatiotemporal convolutional neural network model to accurately fill missing values by considering the spatiotemporal correlation of stratigraphic data.
[0136] S3. Design an improved Transformer network model that includes multiple improved self-attention layers and feedforward neural network layers; each self-attention layer includes a multi-head attention mechanism, a normalization layer, and a residual connection, and each feedforward neural network layer includes a fully connected layer, an activation function, and a residual connection;
[0137] S4. The preprocessed data is used to train the improved Transformer network model. During the training process, the cross-validation technique is used to optimize the model parameters to avoid overfitting and underfitting problems. Specifically, the data is divided into training set, validation set and test set, and the back propagation algorithm and gradient descent optimizer are used to update the model parameters. The loss value and model evaluation index of each validation set are recorded, and the best model parameters are selected as the final model.
[0138] S5. The trained model is applied to the production prediction of new layers in old wells. The continuous sliding window technology is used to process the new formation data, predict the formation production within each window, and form a production prediction sequence for continuous depth formations. The predicted production sequence is smoothed to eliminate the window boundary effect.
[0139] S6. Set a minimum production threshold based on historical production data and economic benefit data, and optimize it in combination with the economic model to ensure the economic feasibility of development and production.
[0140] S7. Compare the production prediction results with the minimum production threshold, screen out the production layers that meet the economic benefit requirements, and generate a production layer report.
[0141] The experimental results show that among the 10 old wells, the production prediction results of 7 wells are significantly better than the traditional method, and the prediction error is reduced by more than 15%. In a well (numbered W1), after applying this method, the predicted cumulative production is 50,000 barrels of oil, while the actual production is 48,500 barrels of oil, and the prediction error is only 3%. In contrast, the prediction error of the traditional method reached 20%. In another well (numbered W2), the cumulative production predicted by this method is 45,000 barrels of oil, and the actual production is 44,000 barrels of oil. The prediction error is 2.2%, while the prediction error of the traditional method is 18%. These data show that this method has significant advantages in stratigraphic division and production prediction.
[0142] In addition, the economic benefits of production layer selection were further improved through sensitivity analysis and optimization of the minimum production threshold. Among the 10 old wells, the cumulative production of 5 wells increased by more than 10% after the production layer was optimized, and the economic benefits were significantly improved. For example, in the well No. W3, by adjusting the production layer, the cumulative production increased from 35,000 barrels of oil to 38,500 barrels of oil, and the economic benefits increased by 9.8%. In the well No. W4, the cumulative production increased from 40,000 barrels of oil to 44,000 barrels of oil, and the economic benefits increased by 10%.
[0143] Through the application of this embodiment, the effectiveness and reliability of the improved Transformer network in the prediction of production layers of old wells are proved. This method not only improves the stability and accuracy of stratigraphic data feature extraction, realizes continuous and dynamic stratigraphic data analysis and division, but also significantly improves the accuracy and economic benefits of production prediction through adaptive missing value filling and systematic model training and optimization. This method provides a scientific decision-making basis for the production of old wells under complex geological conditions, and effectively improves the overall benefits of oilfield development.
[0144] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art may make various modifications or variations within the scope of the claims, which will not affect the essence of the present invention.
Claims
1. A method for predicting production layers of old wells using an improved Transformer network, characterized in that: The following steps are involved: S1. Collect and pre-process formation data and production data from multiple wells with known production horizons; Among them, the formation data includes seismic data, well logging data and experimental data, and the production data is the cumulative production from the start of production to the end of production; The preprocessing is specifically as follows: data standardization and denoising of formation data; S2. For missing stratigraphic data, the missing value filling method is used for processing; S3. Establish an improved Transformer network model including multiple improved self-attention layers and feedforward neural network layers; each self-attention layer includes a multi-head attention mechanism, a normalization layer and a residual connection; each feedforward neural network layer includes a fully connected layer, an activation function and a residual connection; S4, using the pre-processed formation data and production data in steps S1 and S2 to train the improved Transformer network model established in step S3, and using cross-validation technology to optimize the Transformer network model parameters during the training process; S5. Use the trained improved Transformer network model to predict the production of new layers in old wells. Collect new formation data each time the window moves by continuous sliding window processing, predict the production of the formation within the window, and form the production of continuous deep formations. S6. Set the minimum output threshold for development and production, and optimize it in combination with the economic model; S7, the continuous production at different depths obtained in S5 is screened by the threshold value set in S6, and the final layer where the old well can be produced is determined.
2. The method for predicting production strata of old wells using an improved Transformer network as claimed in claim 1, characterized in that: The specific steps of S1 are: S11. Collect stratigraphic data from multiple wells with known production horizons; S12. Standardize the collected formation data and convert each characteristic value into standard normal distribution data with a mean of 0 and a standard deviation of 1. Formula (1) is as follows: In formula (1), x is the original data, μ is the mean of the data, and σ1 is the standard deviation of the data; S13, performing denoising processing on the standardized formation data: Using wavelet denoising technology, by selecting appropriate wavelet basis functions and decomposition layers, the seismic data is decomposed and reconstructed at multiple scales to remove high-frequency noise; Apply a moving average filter to the logging data to smooth the data and remove random noise by calculating the average of multiple adjacent data points; Use a low-pass filter on the experimental data, set a suitable cutoff frequency, and filter out high-frequency noise components; S14. Collect production data from multiple wells at known production layers, where the production data includes cumulative production from the start of production to the end of production; S15, standardizing the collected production data, converting each characteristic value into standard normal distribution data with a mean of 0 and a standard deviation of 1; S16. De-noising the standardized production data, specifically including: Using wavelet denoising technology, by selecting appropriate wavelet basis functions and decomposition levels, the production data is decomposed and reconstructed at multiple scales to remove high-frequency noise; Apply a moving average filter to the production data to smooth the data and remove random noise by calculating the average of multiple adjacent data points; Use a low-pass filter on the yield data and set an appropriate cutoff frequency to filter out high-frequency noise components.
3. The method for predicting production strata of old wells using an improved Transformer network as claimed in claim 1, characterized in that: The specific steps of S2 are: S21, identifying missing values in the formation data, and recording the locations of the missing values; S22. Construct a spatiotemporal convolutional neural network model, which includes multiple spatiotemporal convolutional layers and pooling layers. The convolution process is shown in formula (2): In formula (2), y i,j,k is an element in the output feature map, σ is the activation function, and w m,n,l is the convolution kernel, x i+m,j+n,k+l is the element in the input feature map, b is the bias, M, N, L are the sizes of the convolution kernel in time and space respectively; S23. Optimize the parameters of the spatiotemporal convolutional neural network model by back propagation algorithm, where the loss function is formula (3) as follows: In formula (3), L is the loss function, N is the number of samples, and y i is the true value, is the predicted value, λ is the regularization parameter, w j are model parameters; S24, input the stratigraphic data segment where the missing value is located into the trained spatiotemporal convolutional neural network model, and the formula for predicting the missing value is shown in formula (4): In formula (4), x i is a missing value, x i-1 ,x i+1 is the adjacent data point, t i-1 ,t i+1 is the corresponding time point, α k is the weight of the kth spatiotemporal convolution kernel, and K is the number of spatiotemporal convolution kernels; S25. Perform multi-level aggregation analysis on the filled stratigraphic data to ensure that the filled data are consistent at different scales. The relevant information is shown in formula (5): In formula (5), x' i is the aggregated data point, S is the number of scales, g s is the aggregation function at the sth scale.
4. The method for predicting production strata of old wells using an improved Transformer network as claimed in claim 1, characterized in that: The specific steps of S3 are: S31, constructing an improved self-attention layer that integrates stratigraphic sequence coding and production parameters, including a stratigraphic sequence coding module and a production parameter fusion module, specifically including formula (6): In formula (6), D is the formation data matrix, P is the production parameter matrix, d i ·p i are the characteristic vectors of formation data and production parameters respectively, and Encode is the sequence encoding function; S32. Design a multi-scale context aggregation layer to model the multi-scale structure of the formation and the production layer by aggregating formation data and production parameters at different scales, as shown in formula (7): In formula (7), x is the input data, S is the number of different scales, and α s is the scale weight, Conv s (x) is the convolution operation of the sth scale; S33, introduce an adaptive formation feature transformation layer to dynamically adjust the feature representation according to different formations and production conditions, as shown in formula (8): AdaptiveFeatureTransform(x)=W(t)·x+b(t) (8) In formula (8), W(t) and b(t) are trainable parameters that change over time, and x is the input feature vector; S34. Construct an enhanced production prediction layer to accurately predict the production layer by integrating the formation characteristics and production data at different levels, as shown in formula (9): In formula (9), σ is the activation function, W l and b l is the weight and bias of the lth layer, x l is the input data feature of the lth layer; S35. An innovative joint normalization layer is added between each layer to perform normalization processing on the characteristics of formation data and production parameters, as shown in formula (10): In formula (10), x and y are formation data and production parameters respectively, μ x and σ x is the mean and standard deviation of the formation data, μ y and σ y is the mean and standard deviation of the production parameters; S36, stack multiple improved layers to form an improved Transformer network model; S37. Initialize the constructed improved Transformer network model, and use an adaptive initialization method based on input data characteristics and production conditions to make the model parameters have good numerical characteristics in the initial state. The specific formula (11) is: In formula (11), W ij (t) is the initial value of the weight matrix at time point t, init is the initialization function, d is the feature dimension of the input data, α is the adaptive parameter, and T is the time period.
5. The method for predicting production strata of old wells using an improved Transformer network as claimed in claim 1, characterized in that: The specific steps of S4 are: S41, dividing the formation data and production data preprocessed in steps S1 and S2 into a training set, a validation set and a test set, with the division ratios being 70%, 20% and 10% respectively; S42, input the data of the training set into the improved Transformer network model established in step S3 for training, and use cross-validation technology to optimize model parameters during the training process: S421, divide the training set data into k subsets, select one of the subsets as the validation set, and the remaining subsets as the training set, repeat k times, so that each subset is used as a validation set, and the average result of cross-validation is used as the final evaluation indicator of the model; S422. In each training, the model parameters are updated using the back propagation algorithm and the gradient descent optimizer. The specific formula (12) is: In formula (12), θ is the model parameter, η is the learning rate, and L(θ t ) is the value of the loss function at the tth iteration, and the loss function includes the mean square error loss and the regularization term; S43. In each cross-validation, the loss value and model evaluation index of each validation set are recorded, and the model parameters with the smallest validation set loss value and the best evaluation index are selected as the final model parameters; S44. Use the final model parameters to predict the validation set and test set to evaluate the generalization ability and prediction accuracy of the model; S45. Save the finally trained improved Transformer network model.
6. The method for predicting production strata of old wells using an improved Transformer network as claimed in claim 1, characterized in that: The specific steps of S5 are: S51, deploy the trained improved Transformer network model in the production environment to receive new layer stratigraphic data of old wells; S52, using the continuous sliding window technology to process the stratigraphic data of the new layer, the specific method is as follows: S521, setting the size of the sliding window to W, and the step size of each window movement to S, to ensure that the window covers continuous formation data segments; S522: Extracting formation data fragment D in each sliding window i:i+W , where i is the starting position of the sliding window; S523, input each formation data segment into the trained improved Transformer network model to perform production prediction, and obtain the production prediction value in the corresponding window S53, splicing the prediction results of all sliding windows to form a production prediction sequence of continuous depth formations Where N is the total length of the stratigraphic data; S54. Smoothing the predicted output sequence to eliminate the window boundary effect is performed, as shown in formula (13): In formula (13), is the smoothed output forecast value, n j is the number of overlaps within the window, and W is the size of the sliding window; S55, using the smoothed continuous production prediction sequence as the production prediction result of the new layer of the old well, and generating a prediction report, the report content including formation depth, predicted production, and prediction accuracy information; S56. Based on the forecast report, adjust the development decision and production plan for the new strata of the old wells.
7. The method for predicting production strata of old wells using an improved Transformer network as claimed in claim 1, characterized in that: The specific steps of S6 are: S61. Collect and analyze historical production data and economic benefit data to determine the initial estimate of the minimum production threshold, as shown in formula (14): In formula (14), P min is the minimum production threshold, C fixed is the fixed cost, C variable is the variable cost, t is the production time, and R is the oil price or rate of return; S62. Use formation characteristics and production forecast results, combined with economic models for optimization, and adjust the minimum production threshold to ensure the economic feasibility of development and production; S63. Conduct sensitivity analysis on the production under different formations and production conditions to evaluate the impact of different production thresholds on economic benefits, as shown in formula (15): In formula (15), S(P min ) is the sensitivity of the output threshold, E is the economic benefit, P min is the minimum production threshold; S64. According to the sensitivity analysis results, determine the final minimum production threshold P min,final .
8. The method for predicting production strata of old wells using an improved Transformer network as claimed in claim 1, characterized in that: The specific steps of S7 are: S71. Continuous production prediction results at different depths With the set minimum output threshold P min,final Make a comparison; S72, the continuous production forecast results Converted to production prediction value at each depth point Where i is the stratigraphic depth index; S73. For each depth point i, determine its production prediction value Is it greater than or equal to the minimum production threshold P? min,final : In formula (16), Flag i is the sign of depth point i, 1 means production can be carried out, 0 means production cannot be carried out; S74, according to the output forecast results and flag i , generate a production distribution map of the formation depth, marking the layers where production can be carried out; S75. Perform cluster analysis on all depth points marked as 1 to determine continuous productive layers: S751, calculate the distance d(i,i+1) between adjacent depth points, if the flags of the adjacent depth points are both 1 and the distance is less than the preset threshold d max , they are classified into the same layer; S752, smoothing the clustering results, removing isolated depth points, and ensuring the continuity and practical operability of the layers; S76. According to the results of cluster analysis and smoothing processing, the final layer of the old well that can be produced is determined, and a production layer report is generated. The report content includes layer depth range, predicted production, and production suggestion information; S77. The final production layer will be used to formulate production plans and development programs for old wells.
Citation Information
Cited By
Well logging lithology identification method and system based on wavelet de-drifting and deep learning
CN120316641A
While-drilling electromagnetic wave resistivity logging inversion method
CN120402054A
