Methods, apparatuses, and storage media for determining formation porosity
By constructing a pre-defined model based on a spatial feature extraction network, a bidirectional long short-term memory network, and a multi-head attention layer, the problems of insufficient porosity prediction accuracy and poor generalization ability in oil and gas development are solved, achieving high-precision and widely applicable porosity prediction and supporting oil and gas development under complex geological conditions.
Patent Information
- Application Number
- CN202510419450.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-04-03
AI Technical Summary
Existing technologies face problems such as insufficient accuracy and poor generalization ability in predicting formation porosity in oil and gas development. In particular, they are difficult to accurately reflect the nonlinear relationship between parameters and porosity in complex non-sandstone reservoirs, which affects the development decision of oil and gas reservoirs and increases costs.
A pre-defined model was built using a spatial feature extraction network, a bidirectional long short-term memory network, and a multi-head attention layer. By extracting and fusing the spatial distribution features and temporal correlation features of the formation data, the model parameters were optimized to improve the accuracy and generalization ability of porosity prediction.
It improves the accuracy of porosity prediction and the generalization ability of the model under different reservoir conditions, providing more reliable support for oil and gas development under complex geological conditions.
Smart Images

Figure CN120468965B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of oil and gas formation evaluation technology, and specifically to a method, apparatus and storage medium for determining formation porosity. Background Technology
[0002] Porosity is a key parameter for evaluating formation reservoir performance and plays a crucial role in oil and gas formation evaluation. Measuring formation porosity allows for the analysis of reservoir space characteristics, revealing the size, morphology, and distribution of pores, and further assessing their oil and gas storage capacity. Porosity analysis enables the classification of formation reservoir performance, and combined with other reservoir parameters, it helps predict reservoir potential and recoverable reserves, providing data support for the rational development of oil and gas reservoirs. Therefore, accurate measurement and evaluation of porosity are essential for oil and gas resource exploration and development. Accurate porosity prediction is crucial for reservoir evaluation, but traditional porosity calculation formulas are difficult to use accurately. Factors such as the diversity of pore types beneath the formation, rock heterogeneity, and the degree of fracture development all contribute to the challenges. Evaluating formation porosity requires fully considering these factors and selecting appropriate calculation methods. Traditional porosity calculation methods typically rely on core analysis, well logging curves, and well testing data. They establish well logging interpretation models through experimental measurements, empirical formulas, mathematical statistics, and rock physics models, then combine these with geological characteristics to select appropriate parameters for calculation, thereby obtaining reservoir parameters such as porosity. For sandstone reservoirs with simple pore structures and good homogeneity, porosity is relatively easy to measure using models built using traditional methods. Conversely, in non-sandstone reservoirs with complex pore structures and poor homogeneity, there are strong nonlinear relationships between various parameters and porosity, which cannot accurately reflect the nonlinear relationships between parameters and porosity, posing a significant challenge. In recent years, as oil and gas development has gradually entered the unconventional stage, reservoir geological environments have become increasingly complex, significantly increasing the difficulty of predicting key reservoir parameters such as porosity. Due to the enhanced nonlinear relationships between formation parameters, traditional physical modeling methods are insufficient to accurately characterize these relationships, while existing artificial intelligence methods often suffer from strong data dependence and poor cross-regional generalization capabilities, failing to meet the prediction needs of reservoir characteristics in different regions, thus affecting development decisions and increasing costs. Summary of the Invention
[0003] The purpose of this application is to provide a method, apparatus, and storage medium for determining formation porosity, in order to solve the technical problems of insufficient accuracy and poor generalization ability of formation porosity prediction in oil and gas development in the prior art.
[0004] To achieve the above objectives, the first aspect of this application provides a method for determining formation porosity, the method comprising:
[0005] Acquire the first porosity-related data of the area to be tested, which includes well logging data and seismic attribute data;
[0006] The first porosity-related data is input into a pre-trained model, which includes a spatial feature extraction network, a bidirectional long short-term memory network, and a multi-head attention layer. The spatial feature extraction network extracts the spatial distribution features of the first porosity-related data. The bidirectional long short-term memory network performs temporal modeling on the spatial distribution features to output temporal correlation features. The temporal correlation features are input into the multi-head attention layer for weight optimization to fuse the branch features output by all attention heads of the multi-head attention layer to obtain global perception features.
[0007] Based on the preset model, the first porosity of the test area is output according to the global perception features.
[0008] In the embodiments of this application, the bidirectional long short-term memory network includes a forward long short-term memory network and a backward long short-term memory network. The process of using the bidirectional long short-term memory network to perform temporal modeling of spatial distribution features to output temporal correlation features includes: passing the spatial distribution features along the forward time dimension to generate a forward temporal state sequence corresponding to the spatial distribution features through the forward long short-term memory network; passing the spatial distribution features along the backward time dimension to generate a backward temporal state sequence corresponding to the spatial distribution features through the backward long short-term memory network; and concatenating the forward and backward temporal state sequences through the bidirectional long short-term memory network to output the temporal correlation features.
[0009] In the embodiments of this application, inputting temporal correlation features into a multi-head attention layer for weight optimization, and fusing the output branch features of all attention heads in the multi-head attention layer to obtain global perception features, includes: dividing the temporal correlation features to generate input branch features for each attention head in the multi-head attention layer; obtaining a preset time window for each attention head; for each attention head, dividing the input branch features of the attention head into multiple local segment features through the preset time window of the attention head; calculating the attention weight matrix corresponding to the multiple local segment features for each attention head; performing weighted fusion processing on the input branch features of the attention head corresponding to each attention head using the attention weight matrix to obtain the output branch features of the attention head; and fusing the output branch features of all attention heads to obtain global perception features.
[0010] In the embodiments of this application, each attention head is used to focus on any one of the abrupt change mode, gradual change mode, periodic fluctuation mode, and local fluctuation mode of porosity in the formation.
[0011] In embodiments of this application, the method further includes: acquiring second porosity-related data under different measured porosities; acquiring multiple hyperparameter sets, each hyperparameter set including multiple preset hyperparameter values of the same type; sequentially selecting a preset hyperparameter from each hyperparameter set to generate a target hyperparameter set based on the multiple preset hyperparameters selected each time; for each target hyperparameter set, setting the hyperparameters of the initial model as the target hyperparameter set, training the initial model based on all first porosity-related data and all measured porosities to obtain a trained initial model corresponding to the target hyperparameter set; determining the accuracy of each trained initial model; and determining the target hyperparameter set corresponding to the trained initial model with the highest accuracy among all trained initial models as the hyperparameter set of the preset model.
[0012] In embodiments of this application, the multiple hyperparameter sets include at least one of the following: learning rate, number of neural network layers in the bidirectional long short-term memory network, number of units in each hidden layer of the bidirectional long short-term memory network, and number of training epochs.
[0013] In embodiments of this application, the method further includes a training step for each initial model, the training step including: determining target data for each second porosity-related data; training the initial model based on each target data to obtain the second porosity corresponding to each target data; and optimizing the model parameters of the initial model based on all second porosities and all measured porosities to obtain a pre-trained model.
[0014] In embodiments of this application, determining the target data for each second porosity-related data includes: analyzing the correlation of each second porosity-related data based on a preset correlation coefficient to determine the target data for the second porosity-related data, wherein the preset correlation coefficient includes at least one of Pearson correlation coefficient, Kendall rank correlation coefficient, and Spearman rank correlation coefficient.
[0015] A second aspect of this application provides an apparatus for determining formation porosity, comprising:
[0016] The memory is configured to store instructions; and the processor is configured to retrieve instructions from the memory and, when executing the instructions, to implement the method described above for determining formation porosity.
[0017] A third aspect of this application provides a machine-readable storage medium storing instructions that cause a machine to perform the method described above for determining formation porosity.
[0018] The above technical solutions, based on a spatial feature extraction network, a bidirectional long short-term memory network, and a multi-head attention layer, improve the accuracy of porosity prediction and enhance the model's generalization ability under different reservoir conditions, providing more reliable support for oil and gas development under complex geological conditions.
[0019] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description
[0020] The accompanying drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the following detailed description to explain the embodiments of this application, but do not constitute a limitation on the embodiments of this application. In the drawings:
[0021] Figure 1 The illustration schematically shows a process flow diagram of a method for determining formation porosity according to an embodiment of this application;
[0022] Figure 2 This illustration schematically shows a diagram of the correlation analysis results of porosity-related data according to an embodiment of this application;
[0023] Figure 3 A schematic diagram illustrating the network framework of a CNN-BiLSTM-TPA network model according to an embodiment of this application is shown.
[0024] Figure 4 and Figure 5 The diagrams illustrate the evaluation curves of each hyperparameter of the CNN-BiLSTM-TPA network model according to embodiments of this application.
[0025] Figure 6 and Figure 7 The diagrams illustrating the porosity prediction effect curves of various neural network models according to embodiments of this application are shown in the figures.
[0026] Figure 8 and Figure 9 The prediction results of various neural network models according to embodiments of this application for other well area data are illustrated in the illustrations.
[0027] Figure 10 The diagram illustrates the intersection of predicted and actual values from various models according to embodiments of this application.
[0028] Figure 11 The diagram schematically illustrates a structural block diagram of an apparatus for determining formation porosity according to an embodiment of this application;
[0029] Figure 12The illustration shows a schematic diagram of the structure of a computer device according to an embodiment of the present application. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for illustration and explanation of the embodiments of this application and are not intended to limit the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0031] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.
[0032] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0033] Figure 1 The illustration schematically shows a flow diagram of a method for determining formation porosity according to an embodiment of this application. Figure 1 As shown in the figure, this application provides a method for determining formation porosity, which may include the following steps.
[0034] S102, acquire the first porosity-related data of the area to be measured, which includes well logging data and seismic attribute data.
[0035] S104, the first porosity-related data is input into the trained preset model. The preset model includes a spatial feature extraction network, a bidirectional long short-term memory network, and a multi-head attention layer. The spatial feature extraction network extracts the spatial distribution features of the first porosity-related data. The bidirectional long short-term memory network performs temporal modeling on the spatial distribution features to output temporal correlation features. The temporal correlation features are input into the multi-head attention layer for weight optimization to fuse the branch features output by all attention heads of the multi-head attention layer to obtain global perception features.
[0036] S106, based on a preset model, outputs the first porosity of the area to be tested according to the global perception features.
[0037] Porosity is a key parameter for evaluating formation reservoir performance and plays a crucial role in oil and gas formation evaluation. Measuring formation porosity allows analysis of the reservoir space characteristics of rocks, revealing the size, shape, and distribution of pores, and further assessing their oil and gas storage capacity. The area to be measured refers to the geological area where porosity measurements are required. Porosity-related data includes well logging data and seismic attribute data; the primary porosity-related data refers to the porosity-related data of the area to be measured. During oil and gas extraction, well logging measurements are typically performed on the area to be measured. Well logging data refers to various physical quantities used to describe and analyze the properties of underground rocks and fluids during well logging. Well logging data includes, but is not limited to, resistivity, sonic transit time, natural gamma rays, fluid velocity, density, water holdup, elastic modulus, bulk modulus, organic carbon content, temperature, and pressure. Seismic attribute data refers to characteristic parameters of seismic data, including but not limited to shear wave impedance, p-wave impedance, amplitude, frequency, phase, and profile. For sandstone reservoirs with simple pore structures and good homogeneity, porosity is relatively easy to measure using models built using traditional methods. However, in non-sandstone reservoirs with complex pore structures and poor homogeneity, there is a strong nonlinear relationship between various parameters and porosity, which cannot accurately reflect the nonlinear relationship between parameters and porosity. A pre-set model trained based on deep learning can more accurately identify porosity. This pre-set model is trained using porosity as a training label, combined with porosity-related data corresponding to different porosities, to predict porosity. Therefore, the first porosity-related data can be input into the trained pre-set model, and the model can output the first porosity of the area to be measured.
[0038] Specifically, the pre-defined model includes a spatial feature extraction network, a bidirectional long short-term memory (LSSM) network, and a multi-head attention layer. The spatial feature extraction network, a deep learning model, is a neural network that can encode local or global spatial relationships into high-level features through specific operations. In the pre-defined model, the spatial feature extraction network acts as a "primary feature processor," responsible for extracting and optimizing local features from the raw data, thereby reducing dimensionality or compressing sequence length and decreasing computational load. Specifically, the spatial feature extraction network extracts the spatial distribution features of the first porosity-related data. The bidirectional LSSM network captures long-term dependencies in the sequence data through bidirectional temporal modeling, while combining contextual information to enhance the representation ability of temporal dynamic features, capturing the dynamic evolution of well logging data and seismic attribute data. For example, porosity at a certain depth may be influenced by the combined features of the upper and lower strata; the bidirectional LSSM network can capture the long-term dependencies between well logging data and seismic attribute data in the time or depth direction, focusing on the non-stationary changes in porosity in complex reservoirs. Specifically, the bidirectional LSSM network performs temporal modeling of spatial distribution features to output temporal correlation features. Multi-Head Attention is a core component of the Transformer architecture and its derivative models (such as BERT and GPT). Its role is to enhance the model's ability to model complex relationships through a parallelized, multi-view attention mechanism. Specifically, after temporal correlation features are input into the multi-head attention layer, these features are split into multiple subspaces (i.e., "attention heads"). Each attention head independently learns different attention patterns, and then generates an independent attention weight matrix for weight optimization. Finally, these are concatenated and fused using a linear transformation, integrating information from different perspectives to obtain globally perceived features. These globally perceived features fuse multi-scale features output from multiple attention heads. Based on a pre-defined model, these globally perceived features can be mapped to the dimension of porosity, thereby outputting the first porosity of the region to be measured. Bidirectional Long Short-Term Memory (BSSM) networks may struggle to effectively transmit long-distance dependencies due to excessively long sequences. A multi-head attention mechanism, however, allows for the arbitrary association of two time steps, enhancing the model's ability to perceive key time steps (such as porosity abrupt changes). Weight adjustments are made to the temporal features output by the BSSM network, focusing on key time steps while simultaneously considering short-term fluctuations and long-term trends, thus improving accuracy. A pre-defined model constructed from a spatial feature extraction network, the BSSM network, and a multi-head attention layer enables the model to understand global temporal dependencies while focusing on key local features, ultimately achieving high-precision porosity prediction. By analyzing porosity using this pre-defined model, the reservoir performance of formations can be classified. Combined with other reservoir parameters, the reservoir potential and recoverable reserves of formations can be predicted, providing data support for the rational development of oil and gas reservoirs.
[0039] The above technical solutions, based on a spatial feature extraction network, a bidirectional long short-term memory network, and a multi-head attention layer, improve the accuracy of porosity prediction and enhance the model's generalization ability under different reservoir conditions, providing more reliable support for oil and gas development under complex geological conditions.
[0040] In the embodiments of this application, the bidirectional long short-term memory network includes a forward long short-term memory network and a backward long short-term memory network. The process of using the bidirectional long short-term memory network to perform temporal modeling of spatial distribution features to output temporal correlation features includes: passing the spatial distribution features along the forward time dimension to generate a forward temporal state sequence corresponding to the spatial distribution features through the forward long short-term memory network; passing the spatial distribution features along the backward time dimension to generate a backward temporal state sequence corresponding to the spatial distribution features through the backward long short-term memory network; and concatenating the forward and backward temporal state sequences through the bidirectional long short-term memory network to output the temporal correlation features.
[0041] Specifically, the bidirectional Long Short-Term Memory (LSTM) network comprises a forward LSTM network and a backward LSTM network. Spatial distribution features are propagated forward along time steps, with the hidden state calculated at each time step using the forward LSTM. Spatial distribution features are also propagated backward along time steps, with the hidden state calculated at each time step using the backward LSTM. For each time step t, the forward and backward hidden states are concatenated, resulting in a merged state sequence across all time steps, representing the temporal correlation features. The forward LSTM models historical trends, while the backward LSTM captures potential future patterns; their combination provides a more comprehensive temporal context. By using the bidirectional LSTM network to temporally model the spatial distribution features of first-order porosity-related data, the long-term dependencies between well logging data and seismic attribute data in the time or depth direction can be captured. For example, the gradual or abrupt changes in porosity with formation depth.
[0042] In the embodiments of this application, inputting temporal correlation features into a multi-head attention layer for weight optimization, and fusing the output branch features of all attention heads in the multi-head attention layer to obtain global perception features, includes: dividing the temporal correlation features to generate input branch features for each attention head in the multi-head attention layer; obtaining a preset time window for each attention head; for each attention head, dividing the input branch features of the attention head into multiple local segment features through the preset time window of the attention head; calculating the attention weight matrix corresponding to the multiple local segment features for each attention head; performing weighted fusion processing on the input branch features of the attention head corresponding to each attention head using the attention weight matrix to obtain the output branch features of the attention head; and fusing the output branch features of all attention heads to obtain global perception features.
[0043] Specifically, the dimensions of the temporal correlation features are evenly distributed across each attention head, and each attention head processes its corresponding input branch features. For each attention head, a preset time window of a corresponding size is set. This preset time window is a fixed-size sliding window defined on the data stream to limit the scope of attention computation, making it focus more on patterns in adjacent time steps. Each attention head slides across its input branch feature sequence through the preset time window, covering the entire sequence and dividing the input branch features into multiple local segment features. Specifically, for each time step t in the sequence, the attention weight within its window is calculated. Thus, the entire sequence of input branch features is divided into multiple local segment features, and the generated attention weights can form an attention weight matrix corresponding to the input branch features. This attention weight matrix can optimize the weights of each local segment feature, thereby performing weighted fusion processing on the input branch features of that attention head to obtain the output branch features of that attention head. The weight of each head determines how the information within the window is fused. Different attention heads will calculate local attention under different time window strategies, therefore, the information focused on by the output branch features of each attention head is different. After fusing the output branch features of all attention heads, a globally perceived feature can be obtained. Multi-head attention layers help the model focus on key information by quantifying the importance of different time steps or features and limiting the computational range of each attention head by combining time windows, thereby improving prediction accuracy.
[0044] Specifically, each attention head can be a TPA (Temporal Pattern Attention) module. TPA, by introducing local time windows and multi-head parallel computation, enables the model to focus on key features at different time scales. Specifically, in the embodiments of this application, each attention head is used to focus on any one of the abrupt, gradual, periodic, or local fluctuation patterns of porosity in the formation. For example, each TPA head can adopt different window strategies when calculating attention weights. Specifically, head 1 can set a short window to detect abrupt patterns; head 2 can set a long window to model gradual trends; head 3 can set equally spaced windows to capture periodicity; head 4 can set an adaptive window to dynamically adjust window compensation and suppress noise. Specifically, the abrupt porosity pattern refers to the synergistic change of TOC (organic carbon content) anomalies and LAMRHO (Lambda-Rho, i.e., the combination of Lamé constant and density) abrupt changes. The gradual pattern refers to the gradual trend of the AI-SI-RHOB (shear wave impedance-longitudinal wave impedance-density) parameter combination. Periodic fluctuations refer to the phase difference characteristic of the EE-KK (elastic modulus-bulk modulus) elastic parameters. Local fluctuation modes refer to nonlinear response modes coupled with multiple parameters. Through the above scheme, key local features can be dynamically focused on, while attention heads with different functions can be globally allocated, ultimately achieving high-precision prediction of porosity.
[0045] Furthermore, the data after passing through the multi-head attention mechanism enters the fully connected layer for nonlinear transformation and overfitting prevention operations, mapping the dimension of the globally perceived features to the dimension of porosity, and finally the output layer outputs the predicted porosity value.
[0046] In embodiments of this application, the method further includes: acquiring second porosity-related data under different measured porosities; acquiring multiple hyperparameter groups, each hyperparameter group including multiple preset hyperparameter values of the same type; sequentially selecting a preset hyperparameter from each hyperparameter group to generate a target hyperparameter group based on the multiple preset hyperparameters selected each time; for each target hyperparameter group, setting the hyperparameters of the initial model as the target hyperparameter group, training the initial model based on all first porosity-related data and all measured porosities to obtain a trained initial model corresponding to the target hyperparameter group; determining the accuracy of each trained initial model; and determining the target hyperparameter group corresponding to the trained initial model with the highest accuracy among all trained initial models as the hyperparameter group of the preset model. It can be understood that the hyperparameters of the preset model can be set before training the preset model. Specifically, multiple hyperparameter groups A, B, and C can be acquired, each hyperparameter group including multiple preset hyperparameter values of the same type. Hyperparameter group A includes (A1, A2, A3), hyperparameter group B includes (B1, B2, B3), and hyperparameter group C includes (C1, C2, C3). A preset hyperparameter is sequentially selected from each hyperparameter group to generate a target hyperparameter group based on the selected preset hyperparameters. That is, the preset hyperparameters included in multiple hyperparameter groups are arranged and combined to obtain many target hyperparameter groups. Specifically, in the embodiments of this application, the multiple hyperparameter groups include at least one of the following: learning rate, number of neural network layers in the bidirectional long short-term memory network, number of units in each hidden layer of the bidirectional long short-term memory network, and number of training epochs. For each target hyperparameter group, the hyperparameters of the initial model are set as the target hyperparameter group. The initial model is trained based on all first porosity-related data and all measured porosity to obtain a trained initial model corresponding to the target hyperparameter group. The first porosity-related data includes sample datasets of formation information in the horizontal and vertical directions, and the formation information includes well logging information and seismic attribute information. The measured porosity refers to the actual porosity information of the same geological region corresponding to the first porosity-related data. Using the measured porosity as the training label, the initial model is trained in conjunction with the first porosity-related data. It can be understood that the network structure of the initial model is the same as that of the preset model; the initial model is the predecessor of the preset model. Therefore, after setting different target hyperparameter sets for the initial model, the accuracy of each trained initial model can be determined. Then, the target hyperparameter set corresponding to the initial model with the highest accuracy among all trained initial models can be determined as the hyperparameter set of the preset model. Specifically, the hyperparameters can be determined by using a grid search method to train the initial model until the loss function converges. After training, the model is evaluated using a test set, and common evaluation metrics such as mean squared error (MSE), root mean square error (RMSE), and goodness of fit (R²) are calculated. 2(e.g., ) are used to verify the predictive ability of the model.
[0047] In embodiments of this application, the method further includes a training step for each initial model, the training step including: determining target data for each second porosity-related data; training the initial model based on each target data to obtain the second porosity corresponding to each target data; and optimizing the model parameters of the initial model based on all second porosities and all measured porosities to obtain a pre-trained model.
[0048] It can be understood that target data refers to feature data with a high correlation to porosity among the second porosity-related data. The initial model is trained based on the target data to obtain the porosity prediction result output by the model, i.e., the second porosity. Then, the loss can be calculated based on all second porosities and all measured porosities to evaluate the model and optimize its parameters. Specifically, the constructed training set can be traversed multiple times, performing forward propagation, calculating the loss, and then backpropagating to update the model parameters of the initial model. In one specific implementation, the second porosity-related data can include data from different well logs. For example, data from well A can be used as the training set, and data from well B as the validation set. During the model training phase, the data from well A is normalized, with the first 80% used as the training set and the last 20% as the test set input into the model for training. During the model validation phase, the same data preprocessing operation is performed on the data from well B, and the data is input into the model for validation.
[0049] In embodiments of this application, determining the target data for each second porosity-related data point includes: analyzing the correlation of each second porosity-related data point based on a preset correlation coefficient to determine the target data for that second porosity-related data point. The preset correlation coefficient includes at least one of the Pearson correlation coefficient, Kendall's rank correlation coefficient, and Spearman's rank correlation coefficient. Specifically, the target data includes, but is not limited to, transverse wave impedance (AI), longitudinal wave impedance (SI), total organic carbon content (TOC), bulk modulus (KK), density (RHOB), Lamé impedance (λ), and longitudinal wave velocity (VP).
[0050] In one specific embodiment, a method for determining formation porosity is provided, which specifically includes the following steps.
[0051] Step 1: Use three feature selection methods to select the parameter with the highest correlation to porosity. The specific steps are as follows:
[0052] Step 11: Using Pearson correlation coefficient, Kendall rank correlation coefficient, and Spearman rank correlation coefficient, analyze the linear and nonlinear correlations between seismic attribute data and well logging curves and porosity, respectively.
[0053] Step 12, refer to... Figure 2 Based on the correlation analysis results, the transverse wave impedance (AI), longitudinal wave impedance (SI), total organic carbon content (TOC), bulk modulus (KK), density (RHOB), Lamé impedance (λ), and longitudinal wave velocity (VP) were ultimately selected as feature parameters to construct a sample dataset to improve the prediction accuracy of the model.
[0054] Step 2: The constructed sample dataset is partitioned and processed to obtain training samples for the deep learning model. The specific steps are as follows:
[0055] Step 21: Use data from well A (straight-wave impedance, long-wave impedance, organic carbon content, bulk modulus, density, Lamé impedance, and long-wave velocity) as the training set and data from well B as the validation set. During model training, the data from well A is normalized, with the first 80% used as the training set and the last 20% as the test set, input into the model for training. During model validation, the same data preprocessing is performed on the data from well B, and the data is then input into the model for validation.
[0056] Step 3: Build the CNN-BiLSTM-TPA network model and determine the optimal hyperparameters. Use the training set constructed above to perform multiple iterations, including forward propagation, loss calculation, backpropagation, and updating the model parameters. The specific steps are as follows:
[0057] Step 31: Build the CNN-BiLSTM-TPA network model. The network framework diagram of this model is as follows: Figure 3 As shown. The specific structure of the CNN part of the model is as follows: it includes two one-dimensional convolutional layers (Conv1D) and pooling layers (MaxPool1D) for feature extraction and dimensionality reduction. The first convolutional layer (Conv1D(64,4)+ReLU), the max pooling layer (MaxPool1D(2,2)), and the second convolutional layer (Conv1D(128,4)+ReLU). After processing by the convolutional and pooling layers, it enters the BiLSTM(120) layer for temporal modeling, and the output hidden dimension is 240 dimensions to extract the temporal dependencies of the data. Finally, the features output by BiLSTM are further input into the multi-head attention layer (4-head TPA module) to calculate multiple attention weights in parallel and enhance the global perception capability. After the multi-head attention mechanism, the data enters the fully connected layer (dense layers) and the Dropout layer (Dropout(0.1)) for nonlinear transformation and to prevent overfitting. Finally, the output layer outputs the predicted porosity value.
[0058] Step 32: Set the learning rate (0.001, 0.003, 0.005, 0.008, 0.01), the number of units per hidden layer of the BiLSTM (Num epochs) (8, 16, 32, 64, 128), the number of layers in the BiLSTM neural network (Num layers) (1, 2, 3, 4, 5), and the training epochs (Hidden dim) (100, 150, 220, 250, 280). Optimize these parameters using grid search to select the best-performing hyperparameter combination in the model. Evaluate the CNN-BiLSTM-TPA model using two metrics: root mean square error (RMSE) and mean absolute error (MAE). Figure 4 and Figure 5 In this example, we fix one of the hyperparameters as the independent variable and plot RMSE and MAE as the dependent variables. From... Figure 4 (a) and Figure 5 The results in (a) show that the model's prediction error is minimized when the learning rate is set to α = 0.005. Based on this result, we gradually determined the values of other hyperparameters and finally selected the optimal parameter combination in terms of overall performance by observing the changing trends of RMSE and MAE. This combination consists of 3 neural network layers, 128 hidden layers, 280 training epochs, and a learning rate of 0.005.
[0059] Step 4: Apply the trained optimal model to other well areas to predict porosity. The specific process is as follows:
[0060] Step 41: Read well logging data and seismic attribute data, interpolate missing data values, and then perform normalization.
[0061] Step 42: Input the preprocessed data into a hybrid neural network model (CNN-BiLSTM-TPA) to train and obtain the optimal model. Figure 6 and Figure 7 The table shows the performance of the hybrid neural network model (CNN-BiLSTM-TPA) and other neural network models on the porosity prediction curve. The goodness of fit of the hybrid neural network model (CNN-BiLSTM-TPA) can reach 87.21%. Table 1 shows the goodness of fit of each model.
[0062] Table 1. Goodness of fit of each neural network model
[0063]
[0064] Step 43: Use the trained model to make predictions in other well areas to verify the model's prediction accuracy and generalization ability. Figure 8 and Figure 9It represents the prediction results of a hybrid neural network model (CNN-BiLSTM-TPA) and other neural network models in other well areas.
[0065] refer to Figure 10 , Figure 10 This is a graph showing the intersection of predicted and actual values from various models. Compared to other neural network models, the CNN-BiLSTM-TPA model can predict porosity curves more accurately, especially when dealing with numerically abrupt sample data and relatively stable regions, demonstrating superior predictive ability. In contrast, other neural networks show larger prediction errors in regions of numerical abrupt change, exhibiting certain limitations.
[0066] The porosity prediction model based on the CNN-BiLSTM-TPA model, constructed using the above technical solution, firstly selects the parameters most correlated with porosity using three feature selection methods, thus building a sample dataset that provides stratigraphic information in both horizontal and vertical directions. Secondly, the multi-head attention mechanism is improved, making each head a TPA module, with multiple heads calculating different attention weights in parallel. Finally, a grid search method is used to find the optimal network parameters. Compared to traditional neural network models, this model can further improve the accuracy and generalization ability of the model in predicting porosity.
[0067] Figure 1 This is a flowchart illustrating a method for determining formation porosity in one embodiment. It should be understood that, although... Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0068] Figure 11 A schematic block diagram of an apparatus for determining formation porosity according to an embodiment of this application is shown. Figure 11 As shown in the figure, this application provides an apparatus for determining formation porosity, which may include:
[0069] The memory is configured to store instructions; and
[0070] The processor is configured to retrieve instructions from memory and, when executing the instructions, to implement the aforementioned method for determining formation porosity.
[0071] Specifically, in this embodiment of the application, the processor can be configured as follows:
[0072] Acquire the first porosity-related data of the area to be tested, which includes well logging data and seismic attribute data;
[0073] The first porosity-related data is input into a pre-trained model, which includes a spatial feature extraction network, a bidirectional long short-term memory network, and a multi-head attention layer. The spatial feature extraction network extracts the spatial distribution features of the first porosity-related data. The bidirectional long short-term memory network performs temporal modeling on the spatial distribution features to output temporal correlation features. The temporal correlation features are input into the multi-head attention layer for weight optimization to fuse the branch features output by all attention heads of the multi-head attention layer to obtain global perception features.
[0074] Based on the preset model, the first porosity of the test area is output according to the global perception features.
[0075] In embodiments of this application, the bidirectional long short-term memory network includes a forward long short-term memory network and a backward long short-term memory network, and the processor can also be configured to:
[0076] Spatial distribution features are passed along the forward time dimension to generate a forward temporal state sequence corresponding to the spatial distribution features through a forward long short-term memory network; spatial distribution features are passed along the reverse time dimension to generate a reverse temporal state sequence corresponding to the spatial distribution features through a reverse long short-term memory network; the forward and reverse temporal state sequences are concatenated through a bidirectional long short-term memory network to output temporal correlation features.
[0077] In embodiments of this application, the processor may also be configured to:
[0078] The temporal correlation features are divided to generate input branch features for each attention head in the multi-head attention layer; a preset time window is obtained for each attention head; for each attention head, the input branch features are divided into multiple local segment features through the preset time window; the attention weight matrix corresponding to the multiple local segment features is calculated for each attention head; the attention weight matrix corresponding to each attention head is used to perform weighted fusion processing on the input branch features of the attention head to obtain the output branch features of the attention head; the output branch features of all attention heads are fused to obtain the global perception features.
[0079] In the embodiments of this application, each attention head is used to focus on any one of the abrupt change mode, gradual change mode, periodic fluctuation mode, and local fluctuation mode of porosity in the formation.
[0080] In embodiments of this application, the processor may also be configured to:
[0081] Acquire second porosity-related data under different measured porosities; acquire multiple hyperparameter sets, each hyperparameter set including multiple preset hyperparameter values of the same type; sequentially select one preset hyperparameter from each hyperparameter set to generate a target hyperparameter set based on the selected preset hyperparameters; for each target hyperparameter set, set the hyperparameters of the initial model to the target hyperparameter set, and train the initial model based on all first porosity-related data and all measured porosities to obtain a trained initial model corresponding to the target hyperparameter set; determine the accuracy of each trained initial model; determine the target hyperparameter set corresponding to the trained initial model with the highest accuracy among all trained initial models as the hyperparameter set of the preset model.
[0082] In embodiments of this application, the multiple hyperparameter sets include at least one of the following: learning rate, number of neural network layers in the bidirectional long short-term memory network, number of units in each hidden layer of the bidirectional long short-term memory network, and number of training epochs.
[0083] In embodiments of this application, the processor may also be configured to:
[0084] Determine the target data for each second porosity-related data; train the initial model based on each target data to obtain the second porosity corresponding to each target data; optimize the model parameters of the initial model based on all second porosities and all measured porosities to obtain the pre-trained model.
[0085] In embodiments of this application, the processor may also be configured to:
[0086] The correlation of each second porosity correlation data is analyzed based on a preset correlation coefficient to determine the target data of the second porosity correlation data. The preset correlation coefficient includes at least one of Pearson correlation coefficient, Kendall rank correlation coefficient and Spearman rank correlation coefficient.
[0087] This application also provides a machine-readable storage medium storing instructions that cause a machine to perform the above-described method for determining formation porosity.
[0088] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 12As shown. The computer device includes a processor A01, a network interface A02, memory (not shown), and a database (not shown) connected via a system bus. The processor A01 provides computational and control capabilities. The memory includes internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02, and a database (not shown). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 stored in the non-volatile storage medium A04. The database stores data for methods used to determine formation porosity. The network interface A02 communicates with external terminals via a network connection. When the computer program B02 is executed by the processor A01, it implements a method for determining formation porosity.
[0089] Those skilled in the art will understand that Figure 12 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0090] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0091] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0092] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0093] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0094] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0095] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0096] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0097] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0098] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for determining formation porosity, characterized in that, The method includes: Acquire the first porosity-related data of the area to be tested, which includes well logging data and seismic attribute data; The first porosity-related data is input into a pre-trained model. The pre-trained model includes a spatial feature extraction network, a bidirectional long short-term memory network, and a multi-head attention layer. The spatial feature extraction network extracts the spatial distribution features of the first porosity-related data. The bidirectional long short-term memory network performs temporal modeling on the spatial distribution features to output temporal correlation features. The temporal correlation features are input into the multi-head attention layer for weight optimization to fuse the branch features output by all attention heads of the multi-head attention layer to obtain global perception features. Based on the preset model, the first porosity of the region to be tested is output according to the global perception features.
2. The method for determining formation porosity according to claim 1, characterized in that, The bidirectional long short-term memory network includes a forward long short-term memory network and a backward long short-term memory network. The step of using the bidirectional long short-term memory network to perform temporal modeling of the spatial distribution features to output temporal correlation features includes: The spatial distribution features are transmitted along the positive time dimension to generate a positive temporal state sequence corresponding to the spatial distribution features through the forward long short-term memory network; The spatial distribution features are transmitted along the reverse time dimension to generate a reverse temporal state sequence corresponding to the spatial distribution features through the reverse long short memory network; The forward and reverse temporal state sequences are concatenated using the bidirectional long short-term memory network to output temporal correlation features.
3. The method for determining formation porosity according to claim 1, characterized in that, The step of inputting the temporal correlation features into the multi-head attention layer for weight optimization, and fusing the output branch features of all attention heads of the multi-head attention layer to obtain globally perceptual features, includes: The temporal correlation features are divided to generate input branch features for each attention head of the multi-head attention layer; Obtain the preset time window for each attention point; For each attention head, the input branch features of the attention head are divided into multiple local segment features through a preset time window of the attention head; The attention weight matrix corresponding to the multiple local segment features is calculated using each attention head; The attention weight matrix corresponding to each attention head is used to perform weighted fusion of the input branch features of that attention head to obtain the output branch features of that attention head; The global perception features are obtained by fusing the output branch features of all attention heads.
4. The method for determining formation porosity according to claim 3, characterized in that, Each attention head is used to focus on any one of the abrupt, gradual, periodic, or local fluctuation patterns of porosity in the formation.
5. The method for determining formation porosity according to claim 1, characterized in that, The method further includes: Obtain relevant data on the second porosity under different measured porosities; Obtain multiple hyperparameter groups, each hyperparameter group including multiple preset hyperparameter values of the same type; In each hyperparameter group, a preset hyperparameter is selected sequentially to generate a target hyperparameter group based on the multiple preset hyperparameters selected each time. For each target hyperparameter set, the hyperparameters of the initial model are set to the target hyperparameter set. The initial model is trained based on all first porosity-related data and all measured porosity to obtain the trained initial model corresponding to the target hyperparameter set. Determine the accuracy of each initial model after training is complete; The target hyperparameter set corresponding to the highest accuracy initial model among all trained initial models is determined as the hyperparameter set of the preset model.
6. The method for determining formation porosity according to claim 5, characterized in that, The set of hyperparameters includes at least one of the following: learning rate, number of neural network layers in the bidirectional long short-term memory network, number of units in each hidden layer of the bidirectional long short-term memory network, and number of training epochs.
7. The method for determining formation porosity according to claim 5, characterized in that, The method also includes a training step for each initial model, the training step comprising: Determine the target data for each second porosity-related data; The initial model is trained based on each target data to obtain a second porosity corresponding to each target data. The model parameters of the initial model are optimized based on all second porosities and all measured porosities to obtain a trained preset model.
8. The method for determining formation porosity according to claim 7, characterized in that, The target data for determining each second porosity-related data includes: The correlation of each second porosity correlation data is analyzed based on a preset correlation coefficient to determine the target data of the second porosity correlation data. The preset correlation coefficient includes at least one of Pearson correlation coefficient, Kendall rank correlation coefficient and Spearman rank correlation coefficient.
9. An apparatus for determining formation porosity, characterized in that, include: The memory is configured to store instructions; as well as The processor is configured to retrieve the instructions from the memory and, when executing the instructions, to implement the method for determining formation porosity according to any one of claims 1 to 8.
10. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores instructions for causing the machine to perform a method for determining formation porosity according to any one of claims 1 to 8.
Citation Information
Patent Citations
Reservoir feature prediction method and model based on deep learning
CN113359212A
Oil reservoir parameter prediction method, device and equipment based on petrophysics
CN118939955A