A segmentation and clustering method for shale gas horizontal wells based on graph convolutional neural network
The graph convolutional neural network is used to preprocess and feature engineering shale gas horizontal well data, and the semi-GCN model is used to divide perforation clusters, which solves the problems of low resource utilization and poor identification accuracy in the existing technology, and achieves More efficient horizontal well extraction of shale gas.
Patent Information
- Application Number
- CN202411166060.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-08-23
AI Technical Summary
The existing shale gas horizontal well segmentation and clustering methods have problems such as low resource utilization, poor identification accuracy and high cost. Especially when the productivity of different formations is different and the geological conditions are complex, it is difficult to accurately classify perforation clusters.
A method based on graph convolutional neural network is used to preprocess and feature engineering the oil logging data, construct a node representation matrix and an adjacency matrix, and use the semi-GCN model for semi-supervised node classification to achieve more accurate division of perforation clusters. Reduce manual misjudgments and costs.
It improves the accuracy and adaptability of perforation cluster division, enhances resource utilization, reduces costs, and adapts to mining needs in different geological environments.
Smart Images

Figure CN118673368B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil and gas well completion, and in particular to a shale gas horizontal well segmentation and clustering method based on a graph convolutional neural network. Background Art
[0002] Shale gas is natural gas extracted from underground shale formations. Similar to coalbed methane and tight gas, it is a type of unconventional natural gas and a clean and efficient fossil energy resource. The extraction of shale gas is of great significance to the energy industry and the economy. It is seen as an alternative energy resource that helps reduce dependence on traditional coal and oil and has a positive impact on energy security and environmental sustainability.
[0003] The segmentation and clustering of shale gas horizontal wells usually refers to a commonly used oil and gas well completion technology in shale gas development. This technology involves dividing the oil and gas wells into multiple sections, and then perforating each section to increase the production of oil and gas and improve the extraction efficiency. The essence of segmentation and clustering of shale gas horizontal wells is to conduct a geological assessment of the target shale layer of the shale gas horizontal well, obtain the distribution properties and characteristics of the oil and gas reservoir, and design a corresponding segmentation and clustering completion plan. According to the corresponding plan, the horizontal section of the horizontal well is divided into multiple sections of equal or unequal lengths, each section corresponds to a different geological layer or gas production area, and multiple perforations are implemented in each horizontal section. These perforation points are concentrated in a specific gas production layer or gas production area to increase the effective collection of the reservoir in the section. These assessments are mainly based on geological parameters such as porosity, compensated acoustic waves, and lithology density, and are comprehensively considered in combination with factors such as production gain, hydraulic fracturing effect, wellbore integrity and cost. The segmentation and clustering technology of shale gas horizontal wells is an important technology in the perforation and completion of shale gas horizontal wells. It is one of the important means to improve the recovery rate and production efficiency of shale gas and is widely used in the development of shale gas horizontal wells.
[0004] Under the existing technology, the traditional shale gas horizontal well segmentation and clustering methods mainly include equidistant segmentation fracturing, expert-designed segmentation clustering, seismic or geoelectric logging-guided segmentation clustering, and enhanced horizontal well profile segmentation clustering. All of the above traditional methods have some disadvantages. The equidistant segmentation fracturing method divides the well section of the horizontal well into segments of equal length, which leads to low resource utilization and poor production balance when the production capacity of different formations varies greatly. The expert-designed segmentation clustering method relies too much on the professional knowledge and experience of experts, performs poorly under different geological conditions, and may cause human misjudgment and lead to engineering accidents. The seismic or geoelectric logging-guided segmentation clustering method can provide certain underground geological information, but the accuracy is affected by the underground geological conditions, and some microscopic geological features and fracture distribution cannot be accurately identified, resulting in inaccuracy in segmentation design. The enhanced horizontal well profile segmentation clustering method requires additional technology and equipment support, so the cost is too high and it is not suitable for all projects. In summary, the traditional segmentation and clustering methods under the existing technology have some defects and shortcomings, which affect the current shale gas horizontal well production efficiency.
[0005] In the current research context, more and more researchers are beginning to focus on the optimization of horizontal well segment cluster perforation. With the advancement of data collection methods in the oil and gas production process, the data type and data volume continue to expand, and the use of big data analysis methods to obtain information has received more and more attention. The research direction has also gradually shifted from numerical simulation optimization models to machine learning and deep neural network method models to optimize perforation schemes, including segment cluster related optimization. Summary of the invention
[0006] In response to the problems raised in the background technology, the present invention proposes a shale gas horizontal well segmentation and clustering method based on graph convolutional neural network.
[0007] The specific scheme of the present invention is as follows:
[0008] A shale gas horizontal well segmentation and clustering method based on graph convolutional neural network includes the following steps:
[0009] S1. Preprocessing the original oil well logging data;
[0010] S2. Segment the shale gas horizontal well using the pre-processed oil logging data to obtain perforation segmentation results;
[0011] S3. Use the graph convolutional neural network semi-GCN model to perform perforation clustering on the data in each segment of the shale gas horizontal well; this step includes:
[0012] S301. Constructing a node representation matrix through preprocessed oil well logging data;
[0013] S302. Constructing a node adjacency matrix using the perforation segmented layer data;
[0014] The layer data of the perforation segment specifically includes the layer information of each perforation point, such as depth, position (such as well depth), and identification. The position of the perforation point can be determined through the layer information. The position of each perforation point is taken as a node, and the adjacency matrix is constructed according to whether the nodes are directly adjacent or connected. 1 indicates adjacent or connected, and 0 indicates non-adjacent or non-connected.
[0015] S303. Input the node representation matrix and the node adjacency matrix together into the semi-GCN model for semi-supervised node classification. The semi-GCN model uses semi-supervised learning to set both partially labeled data and unlabeled data as the model's training set. The model first uses the labeled data to train an initial classifier; then uses the initial classifier to predict the unlabeled data, and adds samples with higher prediction confidence as pseudo-labeled data to the training set; uses the expanded training set to continue training the classifier until the evaluation index is met, and obtains the final prediction model;
[0016] S304. Use the final prediction model to predict unknown classified shale gas horizontal well sections and divide them into different clusters.
[0017] Specifically, the data preprocessing of the original petroleum logging data includes:
[0018] S101. Perform data cleaning on the original oil well logging data; data cleaning includes outlier processing, missing value filling and data standardization processing;
[0019] S102. Perform feature engineering processing on the cleaned petroleum logging data.
[0020] Specifically, the feature engineering processing of the cleaned petroleum well logging data is as follows:
[0021] (1) Through grey correlation analysis, the characteristic parameters of the oil well logging data after data cleaning are analyzed to obtain the grey correlation coefficient;
[0022] (2) Random forest method is used to rank the characteristic parameters of the oil well logging data after data cleaning according to their characteristic importance;
[0023] (3) The characteristic parameters with grey correlation coefficient greater than 0.95 and the lower 10% of characteristic importance were eliminated to obtain the horizontal well logging data used in the final single well perforation optimization experiment.
[0024] Specifically, the calculation formula of the grey relational coefficient is:
[0025] ,
[0026] ,
[0027] in, represents the reference sequence, Represents a comparison sequence, Reference sequence No. k The value of an attribute variable, To compare the sequence No. k The value of an attribute variable; is the resolution coefficient, and its value range is [0,1]; is the minimum range of the two levels, is the maximum range of the two levels; Indicates i The comparison sequence and the reference sequence are k The grey correlation coefficient of the indicator variables is is the number of characteristic parameters, is the number of data samples; For the i The grey relational degree of the comparison sequence to the reference sequence.
[0028] Furthermore, the use of the pre-processed petroleum logging data to segment the shale gas horizontal well to obtain the perforation segmentation results includes:
[0029] S201. Performing perforation segmentation of a shale gas horizontal well using a greedy Gaussian segmentation algorithm according to characteristic parameters of oil logging data;
[0030] S202. Based on the characteristic parameters of oil logging data, multi-well perforation segmentation of shale gas horizontal wells is performed through a deep neural network model.
[0031] Furthermore, the deep neural network model adopts a dual-tower transformer structure, through which the time step information and feature space information of the time series of the data are extracted respectively. The time series is a mathematical concept, which refers to a series of observations arranged in chronological order. Any data has a time series. In oil logging data, a time series refers to a logging value arranged in time, which represents the measurement results at different depths from the surface to the bottom of the wellbore or at different times at the same position, such as the above-mentioned geological parameters;
[0032] In perforation segmentation, different geological characteristic parameters that vary with well depth and are not included in the oil logging data and the pre-processed oil logging data are processed as multivariate time series, which is a special case of time series, specifically a series of observations arranged in chronological order, and these observations can vary with time dependently or independently;
[0033] The specific structure of the deep neural network model is:
[0034] The step encoder and channel encoder are set in parallel, where the step encoder is used to encode the time step information, and the masked attention mechanism is used to process the time series structure of the input data, focusing on the features of each time point. The channel encoder encodes the feature space information, considers the association and importance between different features, and captures the spatial relationship between different feature dimensions; the outputs of the step encoder and the channel encoder are jointly input to the gating layer, which is used to assign weights to the outputs of the step encoder and the channel encoder, and the output of the gating layer is sequentially input to the linear layer and the softmax layer, and the output of the softmax layer is the output of the deep neural network model;
[0035] The step encoder includes a first Embedding layer, a multi-head attention mechanism layer, and a first feedforward neural network layer connected in sequence; both the multi-head attention mechanism layer and the feedforward neural network layer use a residual connection structure and are followed by a normalization layer. Specifically, the output of the first Embedding layer and the output of the multi-head attention mechanism layer are added and then normalized, and the output of the multi-head attention mechanism layer and the output of the feedforward neural network layer are added and then normalized;
[0036] The channel-by-channel encoder includes a second Embedding layer, a masked multi-head attention mechanism, and a second feedforward neural network layer connected in sequence, and also includes a position encoding layer; the output of the position encoding layer and the output of the second Embedding layer are jointly input to the masked multi-head attention mechanism layer; the masked multi-head attention mechanism layer and the second feedforward neural network layer both use a residual connection structure and are followed by a normalization layer. Specifically, the output of the second Embedding layer and the output of the masked multi-head attention mechanism layer are added and then normalized, and the output of the masked multi-head attention mechanism layer and the output of the second feedforward neural network layer are added and then normalized.
[0037] The loss function of the deep neural network model is a cross entropy loss function.
[0038] Furthermore, the node representation matrix is constructed by using the pre-processed petroleum logging data as follows:
[0039] The preprocessed horizontal well logging data is constructed into a node representation matrix , , Represents the attribute vector of the node, and the dimension of the node representation matrix is N × F ,in N Indicates the number of nodes, F Represents the feature vector dimension of each node.
[0040] Furthermore, the semi-GCN model is a two-layer graph convolutional network, where the node adjacency matrix of the input network is A, and the node feature matrix of the input network is X. A is set to be an N×N matrix, and X is set to be an N×F matrix, where N is the number of nodes and F is the dimension of the node feature. In the graph convolutional network structure, the first layer of graph convolution is expressed as,
[0041] ,
[0042] ,
[0043] in, represents the output of the first layer of graph convolution, represents the activation function, represents the node adjacency matrix A after adding the self-loop, represents the first weight matrix, represents the degree matrix, Represents the node adjacency matrix Add self-loop and then pass through the degree matrix The matrix obtained by normalizing it; the second layer of graph convolution is expressed as
[0044] ,
[0045] in, represents the output of the first layer of graph convolution, is the second weight matrix;
[0046] Using gradient descent to train weights in graph convolutional networks and ;
[0047] For semi-supervised node classification, the loss function is as follows:
[0048] ,
[0049] in, represents a set of node indices with labels, represents the actual labeled node distribution, represents the predicted labeled node distribution; E represents the total number of node classification categories.
[0050] After adopting the above scheme, the beneficial effects of the present invention are:
[0051] The present invention processes data according to the characteristics of oil logging data, regards each cluster as a node to form a node feature matrix, and forms a node adjacency matrix with the results of shale gas well perforation segmentation. Then, the perforation clusters are divided using a graph convolutional neural network. The graph convolutional neural network model described in this article can not only divide the perforation clusters more accurately by capturing the complex nonlinear relationship between formations, but also has better adaptability and generalization capabilities, solving the problems of low resource utilization and poor recognition accuracy caused by large differences in production capacity in different formations and different underground geological conditions. At the same time, the computer algorithm model is used to judge the segmentation and clustering, which also avoids manual misjudgment, reduces the required cost, and can better adapt to the division of perforation clusters under different geological environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is the main flow chart of the present invention;
[0053] Figure 2 It is a structural diagram of the deep neural network model of the present invention;
[0054] Figure 3 It is an architecture diagram of the semi-GCN model of the present invention;
[0055] Figure 4 It is a detailed schematic diagram of the present invention. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0057] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] The present invention discloses a shale gas horizontal well segmentation and clustering method based on graph convolutional neural network. The overall process is as follows: Figure 1 The detailed process is as shown in Figure 4 As shown below, combined Figure 1and Figure 4 The present invention specifically comprises the following steps:
[0059] S1. Preprocessing the original oil well logging data; the preprocessing of the original oil well logging data includes:
[0060] S101. Clean the original oil logging data. Oil logging data include compensated acoustic wave (AC), brittleness index longitudinal and transverse wave (BRIT), well diameter (CAL), lithology density (DEN), Poisson's ratio (POIS), porosity (POR), Young's modulus (YMOD), mineral component brittleness index without carbonate (BRMC), total organic carbon (TOC), gamma (GR), total diameter (TG), well deviation (DEV), azimuth (DAZ), water saturation (SW) and other geological characteristic parameters; extract a large amount of word and excel semi-structured data in the original oil logging data; because the amount of well logging data for each well is large and contains many missing values and outliers, it is necessary to clean the data to ensure the accuracy of the experiment. Data cleaning includes outlier processing, missing value filling and data standardization. In the process of data cleaning, it is necessary to delete invalid data, duplicate data and smooth noise data in the original data set, and process missing values and outliers to ensure the quality and accuracy of the data, improve the effectiveness and accuracy of subsequent data analysis and mining, and discover potential patterns and trends in the data.
[0061] Data outliers refer to observations that are significantly different from other observations. Common outlier detection methods include statistical methods, clustering methods, density-based methods, and machine learning methods. This specific implementation uses the box plot statistical method. The outliers found are deleted and replaced. This specific implementation uses the average to replace the outliers.
[0062] For missing value filling, direct deletion method or the average value of two values above and below the missing value adjacent position is adopted for filling. This specific implementation adopts a missing value processing method based on genetic algorithm.
[0063] Data Standardization Processing This specific implementation adopts z-score standardization, which is to transform the original data into a standard normal distribution. The specific formula is the existing technology and will not be expanded here.
[0064] Feature engineering is performed on the cleaned oil logging data; the feature dimension of oil logging data is high, but most of the features have very little effect on the target variable, and even the correlation between the features is very large, which will cause information redundancy and affect the calculation results. Therefore, feature selection is needed to eliminate these useless features.
[0065] After data cleaning, the oil logging data still has many geological parameters, including a large amount of redundant or useless information, or erroneous data, which will have a negative impact on the performance of the machine learning algorithm; therefore, the present invention continues to perform feature engineering processing on the oil logging data after data cleaning. The feature engineering processing reduces the influence of redundant features and noise features, and obtains feature variables that have an impact on the target variable, thereby improving the performance and interpretability of the model.
[0066] S102. Perform feature engineering processing on the cleaned oil well logging data; the details are as follows:
[0067] (1) Grey correlation analysis is used to analyze the correlation of characteristic parameters of oil well logging data after data cleaning to obtain the grey correlation coefficient. Grey correlation analysis studies the correlation between variables from multiple angles and determines whether the relationship between them is close by comparing the geometric similarity between characteristic data columns. This method processes data under uncertainty conditions, finds potential correlations between variables, and identifies features with high correlations. Grey correlation analysis uses the grey correlation coefficient to measure the degree of correlation between sequences. The higher the grey correlation coefficient, the closer the correlation between the two sequences. The calculation formula of the grey correlation coefficient is,
[0068] ,
[0069] ,
[0070] In the first formula, the numerator represents the degree of similarity between the two sequences, and the denominator represents the maximum difference between the two sequences; represents the reference sequence, Represents a comparison sequence, Reference sequence No. k The value of an attribute variable, To compare the sequence No. k The value of an attribute variable; is the resolution coefficient, with a value range of [0,1]. It is a factor used to adjust the influencing factors of sequence similarity and difference. = 0, only the similarity of the sequences is considered. =1, only the difference of the sequence is considered, usually the value is 0.5, and the value is also 0.5 in the present invention; is the minimum range of the two levels, is the maximum range of the two levels; Indicates i The comparison sequence and the reference sequence are k The grey correlation coefficient of the indicator variables is is the number of characteristic parameters, is the number of data samples; For the i The grey relational degree of the comparison sequence to the reference sequence.
[0071] (2) Random forest method is used to sort the feature importance of the feature parameters of the oil well logging data after data cleaning; Random forest is an integrated algorithm based on decision trees. It constructs multiple decision trees by randomly selecting features and samples and combines them for prediction. It can handle high-dimensional data sets, can handle a large number of input features at the same time, and handle complex relationships between nonlinear features. It has good robustness and robustness. In random forest feature selection, each decision tree is constructed independently, and for each node, only a part of the randomly selected features is used for splitting. The importance score of each feature is then calculated by calculating the importance of each feature in each decision tree. Mean Decrease Impurity and Mean Decrease Accuracy are used to measure feature importance in random forest feature selection, which uses Gini impurity and out-of-bag error as feature importance measurement methods respectively. This specific implementation method determines the importance of features by using the Gini index method. When establishing a random forest, the reduction in impurity of each feature in each decision tree is calculated, and then the reduction in impurity of each feature in each decision tree is averaged to obtain the average impurity reduction value of the feature. The larger the average impurity reduction value, the more important the feature is, thereby obtaining the importance ranking of the feature.
[0072] (3) The feature parameters with grey correlation coefficient greater than 0.95 and the lower 10% of feature importance were eliminated to reduce data feature redundancy and obtain the horizontal well logging data used in the final single well perforation optimization experiment.
[0073] S2. Use the pre-processed petroleum logging data to segment the shale gas horizontal well and obtain the perforation segmentation results; including:
[0074] S201. Greedy Gaussian time series segmentation algorithm (GGS algorithm) is used to divide the perforation section of a single well in a shale gas horizontal well; the greedy Gaussian segmentation algorithm automatically divides the multivariate time series into several segments, each of which is a Gaussian distribution. The GGS algorithm is based on a greedy strategy, which gradually divides the time series into smaller and smaller segments, and each segment conforms to the characteristics of the Gaussian distribution. Then, by calculating the likelihood function of the segmented data and maximizing the function, the optimal segmentation of the data can be obtained. The GGS algorithm has high efficiency and accuracy, and can obtain a more reasonable segmentation result in a short time.
[0075] Suppose there is a multivariate time series X=[x1,x2,...,x T ] ∈ R n×M , that is, there are M samples in this sequence data set, and each timestamp is n-dimensional. This multivariate time series can be divided into k segments by the split points, and the split points are , the split point satisfies , and each sample vector obeys a multivariate Gaussian distribution, which is represented by x t ∈N(μ t , Σ t ), the mean and covariance of the Gaussian distribution will change only when the data set is split,
[0076] ,
[0077] In the formula, the subscript t represents the timestamp, and the superscript (i) represents the i-th segment. As can be seen from the formula, the purpose of the GGS algorithm is to find the location b of the optimal segmentation point set based on a given number of segmentation points K. op t = b1 , . . . , b k , and the mean μ of each segment (1) ,...,μ (k+1) and covariance Σ (1) ,...,Σ (k+1) .
[0078] S202. Based on the characteristic parameters of oil logging data, multi-well perforation segmentation of shale gas horizontal wells is performed through a deep neural network model.
[0079] The deep neural network model adopts a dual-tower transformer structure, and the dual towers are used to extract the time step information and feature space information of the time series. The dual towers are used to extract the time step information and feature space information of the time series of the data. In the perforation segmentation, different geological characteristic parameters that vary with the depth of different wells and are not included in the oil logging data and the pre-processed oil logging data are processed as multivariate time series. The multivariate time series is a series of observations arranged in time order, and these observations are interdependent or change independently with time. The time series is a mathematical concept, which refers to a series of observations arranged in time order. Any data has a time series. In the oil logging data, the time series refers to a logging value arranged in time, which represents the measurement results at different depths from the surface to the bottom of the wellbore or at different times at the same position, such as the above-mentioned geological parameters.
[0080] In the perforation segmentation, different geological characteristic parameters that vary with well depth in different wells, such as perforation diameter (PTG), perforation spacing (PIS), perforation density (PCD), fracture conditions (PIFN), and rock physical property changes (RPAPP), which are not included in the oil well logging data, and the oil well logging data are treated as multivariate time series;
[0081] The specific structure of the deep neural network model is:
[0082] The step encoder and channel encoder are set in parallel, where the step encoder is used to encode the time step information, and the masked attention mechanism is used to process the time series structure of the input data, focusing on the features of each time point. The channel encoder encodes the feature space information, considers the association and importance between different features, and captures the spatial relationship between different feature dimensions; the outputs of the step encoder and the channel encoder are jointly input to the gating layer, which is used to assign weights to the outputs of the step encoder and the channel encoder, and the output of the gating layer is sequentially input to the linear layer and the softmax layer, and the output of the softmax layer is the output of the deep neural network model;
[0083] The step encoder includes a first Embedding layer, a multi-head attention mechanism layer, and a first feedforward neural network layer connected in sequence; both the multi-head attention mechanism layer and the feedforward neural network layer use a residual connection structure and are followed by a normalization layer. Specifically, the output of the first Embedding layer and the output of the multi-head attention mechanism layer are added and then normalized, and the output of the multi-head attention mechanism layer and the output of the feedforward neural network layer are added and then normalized;
[0084] The channel-by-channel encoder includes a second Embedding layer, a masked multi-head attention mechanism, and a second feedforward neural network layer connected in sequence, and also includes a position encoding layer; the output of the position encoding layer and the output of the second Embedding layer are jointly input to the masked multi-head attention mechanism layer; the masked multi-head attention mechanism layer and the second feedforward neural network layer both use a residual connection structure and are followed by a normalization layer. Specifically, the output of the second Embedding layer and the output of the masked multi-head attention mechanism layer are added and then normalized, and the output of the masked multi-head attention mechanism layer and the output of the second feedforward neural network layer are added and then normalized.
[0085] In the multi-head attention mechanism layer, the input sequence is first mapped into three different matrices Q (Query), K (Key) and V (Value) through three different linear transformations. For each head, its corresponding weight vector is calculated independently through the attention mechanism. Finally, the weight vectors obtained by multiple heads are spliced together and the final output is obtained through linear transformation.
[0086] The feedforward neural network layer consists of two fully connected layers and a ReLU activation function.
[0087] The loss function of the deep neural network model is a cross entropy loss function.
[0088] Each multi-head attention layer is followed by a forward propagation layer to enhance feature extraction. In addition, residual connections are kept around each sub-layer to guide the flow of information and gradients, and layer normalization is performed.
[0089] The channel-by-channel encoder encodes the temporal features and is used to calculate the attention weights between different temporal features throughout the time step to capture the spatial relationship between data features. Since there is no relative or absolute correlation between the positions of features in a multivariate time series, the network structure only adds position encoding to the step-by-step encoder in the expectation that the step-by-step encoder captures the hidden correlations between features of all time steps on all feature parameters. The gating mechanism and multi-head attention mechanism can adaptively select and weight different features of a multivariate time series to better capture the dependencies of depth and time. In perforation segmentation, this approach can accurately classify different rock types and geological layers, leading to a better assessment of oil reserves.
[0090] S3. Use the graph convolutional neural network semi-GCN model to perform perforation clustering on the data in each segment of the shale gas horizontal well; this step includes:
[0091] S301. Construct a node representation matrix through preprocessed oil logging data; specifically:
[0092] The preprocessed horizontal well logging data is constructed into a node representation matrix , , Represents the attribute vector of the node, and the dimension of the node representation matrix is N × F ,in N Indicates the number of nodes, F Represents the feature vector dimension of each node.
[0093] S302. Construct a node adjacency matrix using the layer data of the perforation segment; the layer data of the perforation segment specifically includes the layer information of each perforation point, such as depth, position (such as well depth), and identification, and the position of the perforation point can be determined through the layer information; the position of each perforation point is used as a node, and the adjacency matrix is constructed according to whether the nodes are directly adjacent or connected, 1 indicates adjacent or connected, and 0 indicates non-adjacent or non-connected. Specifically, the adjacency matrix ,in, The dimension is N×N, where N is the number of nodes; is a specific matrix value. If node i is adjacent to node j, then ,otherwise, ; For an undirected graph, the adjacency matrix is symmetric, that is ;
[0094] S303. Input the node representation matrix and the node adjacency matrix into the semi-GCN model for semi-supervised node classification. The semi-GCN model uses partial labeled data and unlabeled data to train the model through semi-supervised learning to obtain the final prediction model. The semi-GCN model is trained in a semi-supervised learning manner, as follows: both partial labeled data and unlabeled data are set as the training set of the model. The model first uses the labeled data to train an initial classifier; then the initial classifier is used to predict the unlabeled data, and the samples with higher prediction confidence are added as pseudo-labeled data to the training set to obtain an expanded training set; the classifier is continued to be trained using the expanded training set until the evaluation index is met to obtain the final prediction model. The semi-GCN model is a two-layer graph convolutional network, in which the node adjacency matrix of the input network is A, and the node feature matrix of the input network is X. A is set to be an N×N matrix, and X is set to be an N×F matrix. N is the number of nodes, and F is the dimension of the node features. In the graph convolutional network structure, the first layer of graph convolution is expressed as,
[0095] ,
[0096] ,
[0097] in, represents the output of the first layer of graph convolution, represents the activation function, represents the node adjacency matrix A after adding the self-loop, represents the first weight matrix, represents the degree matrix, Represents the node adjacency matrix Add self-loop and then pass through the degree matrix The matrix obtained by normalizing it is equivalent to taking a weighted average of the neighbor features of each node and normalizing the degree of each node; in the first layer of convolution, the input feature X Multiply by the weight matrix , then use Perform a convolution operation on the result and finally apply the activation function ;
[0098] The second layer of graph convolution is expressed as
[0099] ,
[0100] in, represents the output of the first layer of graph convolution, represents the output of the second layer of graph convolution, is the second weight matrix; in the second convolution layer, the output of the first convolution layer is Multiply by the weight matrix , then use Perform a convolution operation on the result and finally apply the activation function ;
[0101] The overall calculation process of two-layer graph convolution is
[0102] ,
[0103] Here, z is the output of two layers of graph convolution.
[0104] Using gradient descent to train weights in graph convolutional networks and ;
[0105] For semi-supervised node classification, the loss function is as follows:
[0106] ,
[0107] in, represents a set of node indices with labels, represents the actual labeled node distribution, represents the predicted labeled node distribution; E represents the total number of node classification categories.
[0108] S304. Use the final prediction model to predict unknown classified shale gas horizontal well sections and divide them into different clusters.
[0109] Gated Transformer Networks (GTN) are used to directly input the original logging data into the network. The network automatically learns and extracts features from the data, and then classifies the perforation sections. GTN is a deep neural network structure for multivariate time series classification. It adopts a dual-tower transformer structure and uses the gating mechanism and multi-head attention mechanism to process multivariate time series data. The important part of GTN lies in its dual-tower structure. The dual towers extract the time step information and feature space information of the time series respectively. Each tower contains a multi-head attention mechanism (Multi-head Attention) and a feed forward neural network (Feed Forward) to extract key features in the time series data. In the perforation segmentation, GTN can treat the different geological characteristic parameters of different wells that change with the depth of the well and the logging data as multivariate time series. Different sections are divided by logging parameters to provide data reference for shale gas horizontal well perforation and assist in oil well mining. In the GTN dual-tower structure, each tower processes data of one depth (well depth), so for data sets with multiple depths, multiple towers can be constructed, each focusing on a specific depth. The step-wise encoder is used to encode the time step, and a masked attention mechanism is used to focus on the features of each time point on all channels. In the multi-head attention mechanism, scaled point multiplication attention is used to calculate the attention matrix on all time steps. As in the original Transformer architecture, each multi-head attention layer is connected to a forward propagation layer to enhance feature extraction. In addition, residual connections are retained around each sublayer to guide the flow of information and gradients, and layer normalization is performed. The channel-wise encoder encodes the temporal features and is used to calculate the attention weights between different temporal features within the entire time step to capture the spatial relationship between data features. Since there is no relative or absolute correlation between the positions of features in a multivariate time series, the network structure only adds position encoding to the Step-wise Encoder in the expectation that the Channel-WiseEncoder captures the hidden correlations between the features of all time steps on all feature parameters. The gating mechanism and multi-head attention mechanism of GTN can adaptively select and weight different features of multivariate time series to better capture the dependencies of depth and time. In perforation segmentation, this method can accurately classify different rock types and geological layers, thereby better evaluating oil reserves. The GTN network uses classification cross entropy as a loss function, which measures the difference between the model's prediction results and the actual results. The closer the model's prediction results are to the probability distribution of the actual label, the smaller the cross entropy value. Therefore, by minimizing the loss function to train the model, the performance of the model on classification problems can be improved.
[0110] Table 1 Prediction results of the AutoPlait automatic data mining algorithm
[0111] Section 1 2 3 4 5 6 7 8 9 Segment bottom limit 4717 4575 4468 4535 4378 4334 4319 4266 4132 Segment top boundary 4575 4468 4535 4378 4334 4319 4266 4132 4016 Section 10 11 12 13 14 15 16 10 Segment bottom limit 4016 3891 3801 3754 3692 3617 3505 4016 Segment top boundary 3891 3801 3754 3692 3617 3505 3476 3891
[0112] Table 2 Prediction results of Cut-n-Reveal multivariate spatiotemporal sequence segmentation algorithm
[0113] Section 1 2 3 4 5 6 7 8 9 Segment bottom limit 4665 4682 4546 4486 4376 4346 4309 4239 4123 Segment top boundary 4682 4546 4486 4376 4346 4309 4239 4123 4012 Section 10 11 12 13 14 15 16 17 18 Segment bottom limit 4012 3954 3889 3819 3764 3712 3655 3609 3567 Segment top boundary 3954 3889 3819 3764 3712 3655 3609 3567 3478
[0114] Table 3. Segmentation prediction results of GGS greedy Gaussian algorithm
[0115] Section 1 2 3 4 5 6 7 8 9 10 Segment bottom limit 4687 4603 4578 4535 4493 4388 4334 4306 4254 4146 Segment top boundary 4603 4578 4535 4493 4388 4334 4306 4254 4146 4031 Section 11 12 13 14 15 16 17 18 19 Segment bottom limit 4031 4009 3934 3866 3815 3698 3637 3589 3508 Segment top boundary 4009 3934 3866 3815 3698 3637 3589 3508 3456
[0116] Table 4. Actual segmentation results
[0117] Section 1 2 3 4 5 6 7 8 9 10 Segment bottom limit 4708 4651 4593 4535 4478 4421 4363 4294 4224 4154 Segment top boundary 4651 4593 4535 4478 4421 4363 4294 4224 4154 4084 Section 11 12 13 14 15 16 17 18 19 Segment bottom limit 4084 4015 3960 3905 3830 3754 3679 3600 3537 Segment top boundary 4015 3960 3905 3830 3754 3679 3600 3537 3473
[0118] Tables 1 to 4 are the segmentation result data in the specific embodiments of the present invention. For the segmentation of shale gas well Ning 209H11-9 (specific shale gas well number), Table 1 shows the segmentation results predicted by the AutoPlait automatic data mining algorithm. It can be seen that this method divides 16 perforation sections according to the formation characteristics; this embodiment also selects the temporal cutting CuR-V algorithm that does not introduce spatial relationships in the Cut-n-Reveal algorithm for comparative experiments, and the results are shown in Table 2. It can be seen from Table 2 that this algorithm divides 18 perforation sections; Table 4 is the actual segmentation result; the segmentation results using the GGS algorithm of the present invention are shown in Table 3. It can be seen that the number of perforation sections divided by the method of the present invention is consistent with the actual number of segmentations, both of which are 19 perforation sections, and the difference between the specific segmentation bottom boundary and segmentation top boundary and the actual value is smaller than that of the two compared algorithms. In this embodiment, the mean intersection over union (MIoU) is used to evaluate the performance of the model. The MIoU value in this embodiment reaches an accuracy of 84.6%, which shows that this model has good performance in the perforation segmentation task of oil well logging data.
[0119] The clustering results of shale gas wells Changning H7-2, Ning 209H41-5, and Wei 204H36-3 (specific shale gas well numbers) are shown in Tables 5 to 7. From the information in the tables, it can be seen that through the semi-GCN neural network model, in the 10 perforation sections from the first to the tenth in the shale gas well Changning H7-21, each perforation section contains three perforation clusters on average; in the 1st to the ninth perforation sections of the shale gas well Ning 209H41-5, most of the perforation sections contain three perforation clusters, and only the second perforation section contains six perforation clusters; in the second to the tenth perforation sections of the shale gas well Wei 204H36-3, the third, seventh, and tenth perforation sections all contain four perforation clusters, and the remaining perforation sections contain three perforation clusters. The above results are the same as the actual measurement. It can be seen that the model can make good predictions for the perforation segmentation and clustering of shale gas horizontal wells, and the clustering results of shale gas horizontal wells are the prediction results of the model.
[0120] Table 5. Clustering results of Changning H7-2
[0121] Segment number 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 Cluster number 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 Perforation thickness 36 14 27 18 21 21 20 21 19 26 29 18 24 24 Segment number 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 Cluster number 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 Perforation thickness 28 18 26 26 29 21 26 25 21 22 11 13 22 20 21
[0122] Table 6 Clustering results of Changning 209H41-5
[0123] Segment number 1 1 1 2 2 2 2 2 2 3 3 3 4 4 4 Cluster number 1 2 3 1 2 3 4 5 6 1 2 3 1 2 3 Perforation thickness 1 1 1 0.5 0.5 0.5 0.5 0.5 0.5 1 1 1 1 1 1 Segment number 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 Cluster number 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 Perforation thickness 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[0124] Table 7 Clustering results of Wei 204H36-3
[0125] Segment number 2 2 2 3 3 3 3 4 4 4 5 5 5 6 6 Cluster number 1 2 3 1 2 3 4 1 2 3 1 2 3 1 2 Perforation thickness 1 1 1 0.7 0.7 0.7 0.7 1 1 1 1 1 1 1 1 Segment number 6 7 7 7 7 8 8 8 9 9 9 10 10 10 10 Cluster number 3 1 2 3 4 1 2 3 1 2 3 1 2 3 4 Perforation thickness 1 0.7 0.7 0.7 0.7 1 1 1 1 1 1 0.7 0.7 0.7 0.7
[0126] In this embodiment, the semi-GCN model achieved excellent performance, with a precision rate (Precision) as high as 0.934, a recall rate (Recall) as high as 0.93, and a comprehensive evaluation index F1 value (F1-Score) reaching 0.931. These indicators significantly demonstrate the good performance of the neural network prediction model of the present application in the perforation segmentation clustering task. At the same time, Table 8 shows the performance comparison of the semi-GCN model of the present invention and other existing models.
[0127] Table 8 Clustering results of Wei 204H36-3
[0128]
[0129] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A shale gas horizontal well segmentation and clustering method based on graph convolutional neural network, characterized in that: The steps include: S1. Preprocessing the original oil well logging data; S2. Segment the shale gas horizontal well using the pre-processed oil logging data to obtain perforation segmentation results; S3. Use the graph convolutional neural network semi-GCN model to perform perforation clustering on the data in each section of the shale gas horizontal well; S3 includes: S301. Constructing a node representation matrix through preprocessed oil well logging data; S302. Constructing a node adjacency matrix using the perforation segmented layer data; S303. Input the node representation matrix and the node adjacency matrix into the semi-GCN model for semi-supervised node classification; S304. Using the final prediction model, predict the unknown classified shale gas horizontal well sections and divide them into different clusters; The semi-GCN model is a two-layer graph convolutional network, where the node adjacency matrix of the input network is A, and the node feature matrix of the input network is X. A is set to be an N×N matrix, and X is set to be an N×F matrix, where N represents the number of nodes and F represents the feature vector dimension of each node. In the graph convolutional network structure, the first layer of graph convolution is expressed as, , , in, represents the output of the first layer of graph convolution, represents the activation function, represents the node adjacency matrix A after adding the self-loop, represents the first weight matrix, represents the degree matrix, Represents the node adjacency matrix Add self-loop and then pass through the degree matrix The matrix obtained by normalizing it; the second layer of graph convolution is expressed as , in, represents the output of the first layer of graph convolution, represents the output of the second layer of graph convolution, is the second weight matrix; Using gradient descent to train weights in graph convolutional networks and ; For semi-supervised node classification, the loss function is as follows: , in, represents a set of node indices with labels, represents the actual labeled node distribution, represents the predicted labeled node distribution; E represents the total number of node classification categories.
2. According to claim 1, a shale gas horizontal well segmentation and clustering method based on graph convolutional neural network is characterized in that: The data preprocessing of the original petroleum logging data includes: S101. Perform data cleaning on the original oil well logging data; data cleaning includes outlier processing, missing value filling and data standardization processing; S102. Perform feature engineering processing on the cleaned petroleum logging data.
3. According to claim 2, a shale gas horizontal well segmentation and clustering method based on graph convolutional neural network is characterized in that: The feature engineering processing of the cleaned petroleum logging data is as follows: (1) Through grey correlation analysis, the characteristic parameters of the oil well logging data after data cleaning are analyzed to obtain the grey correlation coefficient; (2) Random forest method is used to rank the characteristic parameters of the oil well logging data after data cleaning according to their characteristic importance; (3) Eliminate the characteristic parameters with grey correlation coefficient greater than 0.95 and the lower 10% of characteristic importance to obtain the final horizontal well logging data.
4. The shale gas horizontal well segmentation and clustering method based on graph convolutional neural network according to claim 3 is characterized in that: The calculation formula of the grey relational coefficient is: , , in, is the reference sequence, To compare sequences, For reference sequence No. k The value of an attribute variable, To compare the sequence No. k The value of an attribute variable; is the resolution coefficient, The value range of is [0,1]; is the minimum range of the two levels, is the maximum range of the two levels; For the i The comparison sequence and the reference sequence are k The grey correlation coefficient of the indicator variables is is the number of characteristic parameters, is the number of data samples; For the i The grey relational degree of the comparison sequence to the reference sequence.
5. The method for segmenting and clustering shale gas horizontal wells based on graph convolutional neural network according to claim 1, characterized in that: The use of pre-processed petroleum logging data to segment the shale gas horizontal well to obtain perforation segmentation results includes: According to the characteristic parameters of oil logging data, the perforation segmentation of shale gas horizontal wells is carried out by using the greedy Gaussian segmentation algorithm; According to the characteristic parameters of oil logging data, multi-well perforation segmentation of shale gas horizontal wells is carried out through a deep neural network model.
6. The method for segmenting and clustering shale gas horizontal wells based on graph convolutional neural network according to claim 5 is characterized in that: The deep neural network model adopts a dual-tower transformer structure. The specific structure of the deep neural network model is: A step encoder and a channel-by-channel encoder are arranged in parallel, wherein the step encoder is used to encode time step information; the channel-by-channel encoder encodes feature space information; the outputs of the step encoder and the channel-by-channel encoder are input to a gating layer, the gating layer is used to assign weights to the outputs of the step encoder and the channel-by-channel encoder, the output of the gating layer is sequentially input to a linear layer and a softmax layer, and the output of the softmax layer is the output of the deep neural network model; The step-by-step encoder includes a first Embedding layer, a multi-head attention mechanism layer, and a first feed-forward neural network layer connected in sequence; The output of the first Embedding layer is input to the multi-head attention mechanism layer. Both the multi-head attention mechanism layer and the first feedforward neural network layer use residual connection structures and are followed by a normalization layer. The channel-by-channel encoder includes a second Embedding layer, a masked multi-head attention mechanism layer and a second feedforward neural network layer connected in sequence, and also includes a position encoding layer; the position encoding layer adds position information to the feature space encoding of the input channel-by-channel encoder, which is achieved by adding a position encoding vector to each feature space vector, and is used to ensure that the model understands the spatial relationship between different feature dimensions; the output of the position encoding layer is added to the output of the second Embedding layer and then input into the masked multi-head attention mechanism layer together, and the masked multi-head attention mechanism layer and the second feedforward neural network layer both use a residual connection structure and are followed by a normalization layer; The loss function of the deep neural network model is a cross entropy loss function.
7. The method for segmenting and clustering shale gas horizontal wells based on graph convolutional neural network according to claim 1, characterized in that: The node representation matrix constructed by using the pre-processed petroleum logging data is specifically: The preprocessed horizontal well logging data is constructed into a node representation matrix Represents the attribute vector of the node. The dimension of the node representation matrix is N×F, where N represents the number of nodes and F represents the dimension of the feature vector of each node.
