Logging data stratification method, device and medium based on T-KAN structure
By combining the Transformer-KAN structure and the focus loss function, the problem of insufficient accuracy of existing logging curve stratification methods for minority classes and thin layers is solved, realizing efficient and intelligent stratification of logging data and improving stratification accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-03-24
AI Technical Summary
Existing logging curve stratification methods rely on manual experience or a single algorithm, making it difficult to generalize to new well blocks. Furthermore, they lack sufficient accuracy for stratification of a few classes and thin layers, and cannot effectively model multi-curve nonlinearity and long-range dependence, resulting in insufficient stratification accuracy and robustness.
A deep learning model with a Transformer-KAN structure, combined with a focus loss function, is used to automatically stratify well logging curves through multi-well data preprocessing, windowed label construction, supervised learning, and smoothing filtering. This improves the identification accuracy of a few types of formations and the comprehensiveness of the stratification results.
It achieves a high degree of automation and intelligence in the well logging stratification process, significantly improving stratification efficiency and accuracy, reducing reliance on human experience, adapting to complex geological conditions, and improving thin-layer identification rate.
Smart Images

Figure CN121234072B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the intersection of well logging curve data processing, formation stratification and artificial intelligence technology, and in particular to a well logging data stratification method based on the T-KAN structure. Background Technology
[0002] Geological logging data records various formation physical parameters that vary with well depth, serving as a crucial basis for stratigraphic division, lithological identification, and reservoir evaluation in oil and gas exploration and development. Traditional logging stratification primarily relies on human experience or simple algorithms to identify features reflecting formation interfaces on logging curves. For example, common methods include determining layer boundaries based on abrupt changes, inflection points, or peak values in the logging curve, or analyzing changes in logging signals using mathematical tools such as continuous wavelet transforms and activity functions to determine stratification locations. However, these traditional methods have several shortcomings: First, manual identification requires extensive experience; different interpreters may yield different stratification results for the same logging curve, leading to low efficiency and a high risk of errors. An experienced expert might spend twenty minutes stratifying a well, while an inexperienced person might need forty minutes or even longer. Second, automatic stratification methods based on fixed thresholds or specific algorithms often utilize only a single logging curve or require manual parameter setting, resulting in poor adaptability to complex geological conditions and a lack of unified standards. Inconsistent measurement mechanisms and resolutions among different logging curves can lead to deviations in layer boundary identification, affecting the accuracy of stratification.
[0003] In recent years, machine learning and deep learning technologies have been increasingly applied to the automatic stratification and lithology identification of geological logging curve data, demonstrating considerable potential. For example, early models such as Support Vector Machine (SVM), Backpropagation (BP) neural networks, and Self-Organizing Maps (SOM) have been used for formation identification, while more advanced deep learning algorithms such as Convolutional Neural Networks (CNN) and Long Short-Term Memory Networks (LSTM) have also been attempted to be introduced into logging curve analysis. However, these methods still face many challenges in practical applications: First, logging curve data often has limited samples and high annotation costs, resulting in fewer stratification labels available for training, making deep learning models prone to overfitting and insufficient generalization ability. Second, different formation categories are unevenly distributed in the sample data, with some special lithologies or thin formations accounting for a small proportion in the training set, causing the model to favor the majority class and resulting in a low minority class recognition rate. Third, logging curves exhibit significant sequential correlations, while traditional neural networks have limited ability to capture long-distance dependencies and global features, making it difficult to fully utilize contextual temporal information to accurately classify formations. Furthermore, directly classifying the entire long sequence of a well can easily be affected by differences between adjacent formations, reducing stratification accuracy.
[0004] To address the aforementioned issues, existing research and patents have proposed several automatic stratification methods, but significant shortcomings remain. Patent CN104793263A proposes an "automatic stratification and evaluation method for well logging curves," identifying stratification through multi-curve weighted synthesis, smoothing, and inflection point detection. Its drawbacks include reliance on manually set weights and thresholds, lacking adaptability; it also relies heavily on local curve abrupt changes, making it difficult to capture long-range dependency features, and often failing to accurately identify a few thin layers. Patent CN102536195A implements sequence partitioning based on a least-squares mean change point model, identifying stratification points through iterative change point detection. While capable of handling multi-scale sequences, it suffers from insufficient noise resistance, low accuracy when dealing with complex nonlinear well logging curves, and difficulty in modeling long-range correlations across layers. Patent CN108562950B utilizes multi-curve pattern matching for automatic stratification, determining stratification points through similarity calculation between reference and target wells. This method is highly dependent on the representativeness of the reference well; when the geological conditions of the reference and target wells differ significantly, the identification results are severely distorted, and its generalization ability is insufficient. Niu et al. (2022) proposed a hierarchical method based on a feature pyramid network combined with boundary guidance to improve the accuracy of layer boundary detection. This method performs well in image segmentation scenarios, but it is insufficient for long dependency modeling of one-dimensional well logging sequences and does not effectively solve the problem of missed detection of thin layers caused by class imbalance.
[0005] In summary, existing methods either rely on manual rules, are only suitable for local features, or are difficult to generalize to new well blocks. They generally suffer from insufficient accuracy in classifying and thin-layer stratification, and are unable to simultaneously model multi-curve nonlinearities and long-range dependencies. Therefore, there is an urgent need to propose a new method that can leverage the global modeling capabilities of deep learning, enhance nonlinear fitting capabilities, and combine class imbalance optimization strategies to improve the accuracy and robustness of intelligent stratification of well logging curve data. Summary of the Invention
[0006] The purpose of this invention is to address the technical problems of existing methods, which either rely on manual rules, are only suitable for local features, or are difficult to generalize to new well blocks, and generally have insufficient accuracy in layering a few classes and thin layers, and cannot simultaneously model multi-curve nonlinearity and long-range dependence. This invention provides a well logging data layering method based on the T-KAN structure.
[0007] The above-mentioned objective of this application is achieved through the following technical solution:
[0008] S1: Acquire logging curve data from multiple wells and perform preprocessing;
[0009] S2: Window the well logging curve data and construct corresponding labels to obtain training samples;
[0010] S3: Constructing a hierarchical model based on the Transformer encoder;
[0011] S4: Supervised learning is used to train the hierarchical model using training samples;
[0012] S5: After preprocessing and windowing the logging curve data of the new well, input it into the trained hierarchical model and output the point-by-point prediction sequence;
[0013] S6: Perform smoothing filtering and merge candidate boundary points on the point-by-point prediction sequence; determine the top and bottom of the layer alternately according to the depth order, divide the continuous stratigraphic segments, and output the top and bottom boundary depths of each segment.
[0014] Optionally, step S1 includes:
[0015] The logging data includes: natural gamma, density, sonic transit time, shallow lateral resistivity, and deep lateral resistivity;
[0016] Each logging curve is normalized using the following formula: ,in These are the original curve values. and These are the minimum and maximum values of the curve. The value is the normalized value;
[0017] The logging curve data is aligned and the sampling rate is standardized according to depth to remove outliers and noise, resulting in standardized logging curve data.
[0018] Optionally, step S2 includes:
[0019] S21: The logging curve data is slicing along the well depth direction using window length W and step size S to form a fixed-length logging curve sequence sample, i.e., a training sample;
[0020] S22: Combine the depth values of each depth sampling point in each window with the corresponding well logging curve data to form a feature vector, and mark each depth sampling point in the window as layer top, layer bottom or non-layer boundary based on the existing formation stratification results;
[0021] The feature vector of each depth sampling point contains the depth value and the corresponding multi-channel logging attribute values.
[0022] Optionally, step S3 includes:
[0023] The classification layer at the end of the hierarchical model is replaced with the output layer of the Kolmogorov-Arnold network to predict the layer category for each depth sampling point.
[0024] Optionally, step S4 includes:
[0025] The hierarchical model is trained using a class imbalance loss function, which is a weighted focus loss function, and its mathematical expression is as follows:
[0026]
[0027] in, The total number of samples, The total number of categories, It is a sample In category The true label indicates, It is the model on the sample Category The predicted probability, For focus modulation coefficients, For category The weighting coefficients, and the weights set for the top and bottom layer categories. Greater than the weight set for non-layer boundary categories.
[0028] Optionally, step S6 includes:
[0029] The point-by-point prediction sequence is the probability distribution and prediction label of the stratigraphic category corresponding to each sampling point within the entire depth range of the well.
[0030] S61: Perform smoothing filtering on the point-by-point prediction sequence to remove isolated pseudo-layer boundaries;
[0031] S62: Set the depth interval to the preset minimum layer thickness threshold. Multiple candidate points of the same type within a given range are merged into a single layer boundary;
[0032] S63: Traverse all candidate boundary points in depth order, and alternately mark the first boundary that appears as the top of the layer and the next boundary that appears as the bottom of the layer to divide the complete stratigraphic segment.
[0033] Optionally, step S6 may also include a correction process:
[0034] When two consecutive boundary layers of the same type with a distance less than a preset value appear, one of the boundary layers is retained based on the confidence level of the surrounding logging curves.
[0035] If the layering model misses a layer boundary based on the thickness information of adjacent layers, the missing layer boundary is supplemented by interpolation.
[0036] An electronic device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to enable the electronic device to perform a well logging data stratification method based on a T-KAN structure.
[0037] A computer-readable storage medium storing instructions that, when executed, perform a well logging data stratification method based on a T-KAN structure.
[0038] The beneficial effects of the technical solution provided in this application are:
[0039] By introducing the Transformer-KAN deep learning structure, the long sequence feature extraction capability of Transformer and the efficient nonlinear representation capability of KAN network are effectively integrated, enabling the model to more accurately identify weak layer boundary features and complex change patterns in well logging curves. By utilizing class imbalance optimization strategies such as focus loss, the model's identification accuracy for a few types of formations is significantly improved, avoiding excessive bias towards the main rock formations, thereby ensuring the comprehensiveness and reliability of the stratification results. This invention achieves a high degree of automation and intelligence in the well logging stratification process, greatly reducing the dependence on human experience, and significantly improving stratification efficiency compared to manual methods. It has important application value in the interpretation of well logging data in actual oil and gas fields. Attached Figure Description
[0040] The present application will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:
[0041] Figure 1 This is a step diagram of an embodiment of this application;
[0042] Figure 2 This is a model structure diagram in the embodiments of this application;
[0043] Figure 3 This is a schematic diagram of the logging curves and stratification labels in the embodiments of this application;
[0044] Figure 4 This is a schematic diagram of a sliding window slice in an embodiment of this application;
[0045] Figure 5 This is a schematic diagram of the network architecture in an embodiment of this application;
[0046] Figure 6 This is a schematic diagram of the confusion matrix in the embodiments of this application;
[0047] Figure 7 This is a schematic diagram of the layering results in the embodiments of this application;
[0048] Figure 8 This is a schematic diagram of the electronic device structure in the embodiments of this application. Detailed Implementation
[0049] To provide a clearer understanding of the technical features, objectives, and effects of this application, the specific embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0050] The embodiments of this application provide a well logging data layering method based on a T-KAN structure.
[0051] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating the steps of a well logging data stratification method based on a T-KAN structure in an embodiment of this application, including:
[0052] S1: Acquire logging curve data from multiple wells and perform preprocessing;
[0053] S2: Window the well logging curve data and construct corresponding labels to obtain training samples;
[0054] S3: Constructing a hierarchical model based on the Transformer encoder;
[0055] S4: Supervised learning is used to train the hierarchical model using training samples;
[0056] S5: After preprocessing and windowing the logging curve data of the new well, input it into the trained hierarchical model and output the point-by-point prediction sequence;
[0057] S6: Perform smoothing filtering and merge candidate boundary points on the point-by-point prediction sequence; determine the top and bottom of the layer alternately according to the depth order, divide the continuous stratigraphic segments, and output the top and bottom boundary depths of each segment.
[0058] As one embodiment, the output layer of the Transformer neural network and the Kolmogorov-Arnold network (Transformer-KAN structure, abbreviated as T-KAN structure, such as...) is utilized. Figure 2 (As shown) is a technique for automatically stratifying well logging curve data.
[0059] Step S1 includes:
[0060] The logging data includes: natural gamma, density, sonic transit time, shallow lateral resistivity, and deep lateral resistivity;
[0061] Each logging curve is normalized using the following formula: ,in These are the original curve values. and These are the minimum and maximum values of the curve. The value is the normalized value;
[0062] The logging curve data is aligned and the sampling rate is standardized according to depth to remove outliers and noise, resulting in standardized logging curve data.
[0063] Step S2 includes:
[0064] S21: The logging curve data is slicing along the well depth direction using window length W and step size S to form a fixed-length logging curve sequence sample, i.e., a training sample;
[0065] As one embodiment, the preprocessed logging data is serialized and segmented according to the depth direction using a sliding window, resulting in a length of... Fixed-length samples are generated, each containing depth and multi-channel curve values, and aligned with the corresponding window labels. All window samples are based on well-standardized multi-channel curve features to ensure consistency across different well scales, in order to construct training samples. Based on existing stratigraphic stratification results, the samples are assigned corresponding stratigraphic labels.
[0066] As one embodiment, the preprocessed logging data is serialized and segmented according to the depth direction using a sliding window, resulting in a length of... Fixed-length samples are generated, each containing depth and multi-channel curve values, and aligned with the corresponding window labels. All window samples are based on well-standardized multi-channel curve features to ensure consistency across different well scales, in order to construct training samples. Based on existing stratigraphic stratification results, the samples are assigned corresponding stratigraphic labels.
[0067] S22: Combine the depth values of each depth sampling point in each window with the corresponding well logging curve data to form a feature vector, and mark each depth sampling point in the window as layer top, layer bottom or non-layer boundary based on the existing formation stratification results;
[0068] As one example, existing manual stratification results are used to construct corresponding labels for each logging window. Based on the top and bottom boundary depths of the strata provided by geological experts, each depth point within the window segment is labeled with its stratum category: if a certain depth corresponds to the top boundary of the stratum, it is labeled as "layer top"; if it corresponds to the bottom boundary of the stratum, it is labeled as "layer bottom"; and other depth points are labeled as non-stratum boundaries.
[0069] The feature vector of each depth sampling point contains the depth value and the corresponding multi-channel logging attribute values.
[0070] Step S3 includes:
[0071] The classification layer at the end of the hierarchical model is replaced with the output layer of the Kolmogorov-Arnold network to predict the layer category for each depth sampling point.
[0072] In one specific implementation of this application, the output layer of the Kolmogorov-Arnold network replaces the original linear fully connected classification layer with a combination of several learnable one-dimensional basis functions, thereby achieving a nonlinear mapping from high-dimensional logging features to the layer category space.
[0073] In one specific implementation of this application, a standard Transformer encoder-decoder structure is constructed as the main architecture, and the linear classification layer at the end of the original decoder is replaced with a KAN (Kolmogorov-Arnold Network) output layer to achieve point-by-point (per-depth sampling point or per-window center) classification prediction. The encoder: stacks multiple layers of multi-head self-attention (MHA) and feedforward networks (FFN) to capture long-range dependencies across depths and the coupling relationships of multi-channel curves; the decoder: receives the encoder representation and obtains contextual features through cross-attention. The KAN output layer: replaces the linear mapping with a learnable combination of several one-dimensional basis functions, enhancing the non-linear expressiveness of the high-dimensional class space and outputting the class scores for each layer.
[0074] In one specific embodiment of this application, the model structure includes an input layer, several feature extraction layers, and an output layer. The input layer converts the data from the well logging curve window into a tensor form that the model can process.
[0075] The multidimensional logging attribute values at each depth point are used to form a feature vector sequence as model input. The main feature extraction mechanism of the model adopts an improved Transformer-KAN encoder, which consists of multiple stacked attention mechanisms and KAN units alternately. Each layer contains a multi-head self-attention sublayer and a feedforward sublayer based on the Kolmogorov-Arnold network to simultaneously capture the depth direction correlation and complex nonlinear feature relationships of the logging curves.
[0076] The formula for calculating the vector feature sequence is as follows:
[0077]
[0078] In the Transformer-KAN structure, the multi-head self-attention sublayer extracts relevant patterns of geological layers by calculating the attention weights between depth points in the sequence; the KAN feedforward sublayer uses a combination of learnable one-dimensional basis functions to replace the traditional fully connected network, performing a nonlinear transformation on the channel features output by each attention sublayer. Each Transformer-KAN unit employs residual connections and layer normalization strategies to ensure model convergence stability.
[0079] The output layer and classification principle: The model's output layer uses a fully connected classifier to predict features at each depth point point by point. Specifically, a fully connected layer is applied to the latent vector hi at each position output by the last layer of the Transformer-KAN encoder to calculate its score belonging to each category, and the softmax function is used to convert the score into a probability.
[0080]
[0081] in The weight matrix is the weight matrix of the corresponding category c of the output layer, where C is the total number of categories (in this invention, C=3 corresponds to the three categories of "layer top", "layer bottom" and "non-layer boundary"). This represents the score for category c. Through the above output layer calculations, the probability distribution of each depth point in the logging curve window belonging to each category can be obtained, and its most likely stratigraphic category can be determined accordingly.
[0082] Step S4 includes:
[0083] The hierarchical model is trained using a class imbalance loss function, which is a weighted focus loss function, and its mathematical expression is as follows:
[0084]
[0085] in, The total number of samples, The total number of categories, It is a sample In category The true label indicates, It is the model on the sample Category The predicted probability, For focus modulation coefficients, For category The weighting coefficients, and the weights set for the top and bottom layer categories. Greater than the weight set for non-layer boundary categories.
[0086] In one specific implementation of this application, a class imbalance loss function is introduced to improve the accuracy of identifying minority class samples at the "top" and "bottom" of a layer. (Focus modulation coefficients) The range of values is Preferred The weighting coefficients of the "top" and "bottom" categories. The value range is the weight coefficient of the "non-layer boundary" category. times, preferably times.
[0087] In one specific implementation of this application, supervised learning is used to train the Transformer-KAN model. To mitigate the bias risk caused by imbalanced class distribution across layers, a class imbalance loss is introduced for multiple optimizations, preferably using focal loss or weighted cross-entropy, which can be combined with L2 regularization. By using appropriate balance factors and focal exponents, the model achieves a better trade-off between overall accuracy and minority class recall; and by combining learning rate scheduling, early stopping, and data augmentation techniques, generalization performance is improved.
[0088] Step S6 includes:
[0089] The point-by-point prediction sequence is the probability distribution and prediction label of the stratigraphic category corresponding to each sampling point within the entire depth range of the well.
[0090] As one embodiment, the logging curve data of the well to be analyzed is processed using the same preprocessing and windowing strategy as during training, and then input into the trained Transformer-KAN model. The model outputs the corresponding layer category prediction result for each window of input logging data, that is, it gives the probability or label of each sampling point within the depth range of the well as belonging to "layer top", "layer bottom", or "non-layer boundary". Based on the point-by-point prediction sequence output by the model, the layer identification result for each sampling point from shallow to deep can be obtained. The model output is usually given in probability form; for ease of interpretation, the category with the highest probability can be used as the determination category for that depth point. For example, when a depth point is determined by the model to be the layer top with the highest probability and exceeds a preset threshold, then that point is considered to correspond to the top boundary of a layer segment. Overlapping results generated during the sliding window prediction process are merged to obtain a complete wellbore layer sequence. Since adjacent windows may repeatedly predict the same depth point, their results should be consistent or merged through voting; for portions at the beginning and end of the well segment that are less than a window, appropriate edge processing strategies can be adopted (e.g., discarding the insufficient portion or using filled data for prediction). Through the above steps, the predicted sequence of stratigraphic class at each point within the entire depth range of the target well is finally obtained.
[0091] S61: Perform smoothing filtering on the point-by-point prediction sequence to remove isolated pseudo-layer boundaries;
[0092] S62: Set the depth interval to the preset minimum layer thickness threshold. Multiple candidate points of the same type within a given range are merged into a single layer boundary;
[0093] S63: Traverse all candidate boundary points in depth order, and alternately mark the first boundary that appears as the top of the layer and the next boundary that appears as the bottom of the layer to divide the complete stratigraphic segment.
[0094] As one implementation, the depths of all locations marked as tops or bottoms are extracted from the stratigraphic sequence results predicted by the model, initially identifying candidate boundary points for stratigraphic segments. These candidate boundary depth values are arranged in depth order to form an initial segment division list. The initial list of candidate boundary points is then filtered and matched to eliminate false positives and determine the top and bottom boundaries of each segment. Methods such as moving window smoothing or median filtering can be used to smooth the predicted sequence and remove isolated noise points. Then, the candidate points are traversed according to stratigraphic order, merging multiple candidate boundaries that are too close together into a single boundary. The first boundary is marked as the top boundary of the first segment, and the next boundary is marked as the bottom boundary of that segment, while also serving as the top boundary of the next segment. This process is repeated to alternately determine the top / bottom boundaries of each segment.
[0095] As one example, the trained model is deployed to the well logging interpretation system to automatically stratify the logging curves of new wells: Inference: The preprocessed and windowed sequences are input into the model to obtain the point-by-point category probability distribution and predicted labels; Post-processing: Formation continuity constraints and interlayer smoothing rules are applied to the point-by-point predicted sequences to suppress pseudo-layers with "short jumps / rebounds"; Result mapping: Adjacent depth points of the same continuous category are grouped into segments, and the top / bottom depth of the segment and the layer name are output. Excel format export is supported for comparison with manual interpretation.
[0096] Step S6 also includes a correction process:
[0097] When two consecutive boundary layers of the same type with a distance less than a preset value appear, one of the boundary layers is retained based on the confidence level of the surrounding logging curves.
[0098] If the layering model misses a layer boundary based on the thickness information of adjacent layers, the missing layer boundary can be supplemented by interpolation.
[0099] As one example, to address the potential for misjudgment of layer boundaries in model predictions, if two consecutive top or bottom layer labels are too close together, contradicting common geological knowledge, one of them can be selectively retained or discarded based on changes in surrounding well logging curves. For layer boundaries not predicted by the model but which should exist based on adjacent layer thickness information, they can be manually supplemented through interpolation or by referencing adjacent well data. Through the above post-processing optimization, the final output is a list of top and bottom depth data for each stratum segment, achieving intelligent stratification output of geological logging data.
[0100] As an example, taking the logging data obtained from nine wells in a certain area, the specific implementation scheme of the present invention is as follows:
[0101] Step 110: Data preparation and sample construction;
[0102] Obtain conventional logging data from nine wells, including at least natural gamma (GR), density (DEN), sonic transit time (DT), and shallow / deep lateral resistivity (RS, RD). The raw data table includes depth, multichannel curve columns, layer (if applicable), and well fields. Perform depth alignment and standardize the sampling step size (e.g., 0.125m) for each well, and remove or interpolate outliers / missing values. Perform a safe logarithmic transformation on resistivity curves to eliminate the influence of non-physical negative values. Subsequently, standardize the data at each wellhead to reduce instrument and regional differences.
[0103] Specifically, conventional logging curves were collected from nine wells, including at least natural gamma (GR), density (DEN), sonic transit time (DT), shallow lateral resistivity (RS), and deep lateral resistivity (RD). Figure 3 The original table structure should at least include: depth, multiple curve columns, layer labels, and well numbers. Automatic field identification can be achieved using the `infer_column` function. Then, the start and end depths and sampling step distances of each curve for each well are calculated, common overlapping segments are extracted and resampled to a uniform step distance (e.g., 0.125m); resampling uses linear interpolation or piecewise cubic Hermite interpolation. Outlier / missing values and safe logarithmic transformation are performed. For outliers (e.g....)... 9999) and missing points are removed or interpolated for repair; a safe logarithmic transformation (safe_log_transform) is performed on resistivity-type RS / RD: severely negative values (≤ threshold) are set to NaN; slightly negative values are shifted as a whole and then the common logarithm is taken to eliminate the adverse effects of non-physical negative values on training.
[0104] Step 120: Windowing and Tag Construction;
[0105] Specifically, along the depth direction, with the window length and step length For each well, multiple curves are sliced using a sliding method to form a fixed-length sequence of samples. To improve location sensitivity, depth is used as a one-dimensional feature and concatenated into the feature vector of each sampling point. Point-by-point labels are generated for each depth point within the window using the existing top / bottom depth of the layer, defining three categories: 0 = non-layer boundary, 1 = layer top, and 2 = layer bottom. If necessary, one-hot encoding is used for supervised training. To improve cross-well comparability, the window length can be interpolated to the target length corresponding to the average layer thickness of the training wells. In this embodiment, the window length is 5, and the step size is 5 (…). Figure 4 ).
[0106] Among them, windowed samples (C is the number of channels)
[0107]
[0108] Step 130: Model Building and Training Optimization
[0109] Specifically, a standard Transformer encoder-decoder structure is adopted: positional encoding + multi-head self-attention (MHA) + feedforward network (FFN), and residual connections and layer normalization are used to ensure stable training; the input is a W×C sequence tensor. The linear classification head at the end of the original decoder is replaced with the KAN (Kolmogorov-Arnold Network) output layer ( Figure 5 This approach uses a combination of learnable one-dimensional basis functions to achieve a non-linear mapping from high-dimensional features to the class space, resulting in more economical parameters and stronger expressive power. A grouped KAN is used to share some basis function parameters to control computational cost and overfitting risk. Subsequently, point-by-point classification and probabilistic mapping are performed, with the decoder at each position... The latent vectors are processed by the KAN output layer to obtain the class scores. Three types of probabilities (non-layer boundary / layer top / layer bottom) are obtained through Softmax:
[0110]
[0111] Training employs a 90% "leave one well" cross-validation method to evaluate generalization ability: each iteration, one well is fixed as the test well, while the remaining eight wells participate in both training and validation (the validation set comprises approximately 20% of the training samples), for a total of nine iterations. The optimizer prioritizes AdamW (learning rate 1×10⁻⁶). 4) Combine ReduceLROnPlateau learning rate scheduling and early stopping to prevent overfitting, and weight decay (L2) to suppress model complexity. To address the problem of significantly fewer samples at the top / bottom of layers, introduce weighted focal loss (FocalLoss) or a combination of it and weighted cross-entropy, give higher weights to boundary classes, and control the focusing intensity of hard examples with γ (e.g., γ=2).
[0112] After training, the script automatically outputs: training / validation loss curves, confusion matrix and classification report for each test fold, and selects two test wells from the nine folds to generate a comparison chart of "true and predicted" layers for intuitive verification.
[0113] Step 140: Reasoning, Continuity Post-processing, and Result Output
[0114] Specifically, the new well data is preprocessed and windowed using the same process as steps 110–120, and then input into the trained and converged Transformer-KAN model to obtain point-by-point class probabilities and label sequences. Multiple predictions from overlapping windows are fused through voting or probability averaging; continuity constraints and a minimum layer thickness threshold are applied, isolated short segments are merged, and pseudo-interfaces with low confidence are removed; subsequently, top / bottom boundaries are paired alternately according to depth, with wellhead / bottom boundary completion used when no pairing is found at the beginning / end. Finally, adjacent points of the same type are merged into continuous segments, outputting a list of top / bottom depths / thicknesses for each segment, and generating a comparison and confusion matrix of true / predicted segments. Figure 6 , Figure 7 ).
[0115] This application also discloses an electronic device. (See reference...) Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. The electronic device 500 may include: at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502.
[0116] The communication bus 502 is used to enable communication between these components.
[0117] The user interface 503 may include a display screen, and optionally, the user interface 503 may also include a standard wired interface or a wireless interface.
[0118] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0119] This application also discloses a computer-readable storage medium storing multiple instructions adapted for loading by a processor to execute the above-described well logging data layering method based on a T-KAN structure.
[0120] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure.
[0121] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A well logging data stratification method based on T-KAN structure, characterized in that, The method includes the following steps: S1: Acquire logging curve data from multiple wells and perform preprocessing; S2: Window the well logging curve data and construct corresponding labels to obtain training samples; Step S2 includes: S21: The logging curve data is slicing along the well depth direction using window length W and step size S to form a fixed-length logging curve sequence sample, i.e., a training sample; S22: Combine the depth values of each depth sampling point in each window with the corresponding well logging curve data to form a feature vector, and mark each depth sampling point in the window as layer top, layer bottom or non-layer boundary based on the existing formation stratification results; The feature vector of each depth sampling point contains the depth value and the corresponding multi-channel logging attribute values; S3: Constructing a hierarchical model based on the Transformer encoder; Step S3 includes: Replace the classification layer at the end of the hierarchical model with the output layer of the Kolmogorov-Arnold network; The feature extraction main body of the hierarchical model adopts an improved Transformer-KAN encoder, which consists of multiple stacked attention mechanisms and KAN units alternately. Each encoder layer contains a multi-head self-attention sub-layer and a feedforward sub-layer based on the Kolmogorov-Arnold network. S4: Supervised learning is used to train the hierarchical model using training samples; S5: After preprocessing and windowing the logging curve data of the new well, input it into the trained hierarchical model and output the point-by-point prediction sequence; S6: Perform smoothing filtering and merge candidate boundary points on the point-by-point prediction sequence; determine the top and bottom of the layer alternately according to the depth order, divide the continuous stratigraphic segments, and output the top and bottom boundary depths of each segment; Step S6 includes: The point-by-point prediction sequence is the probability distribution and prediction label of the stratigraphic category corresponding to each sampling point within the entire depth range of the well. S61: Perform smoothing filtering on the point-by-point prediction sequence to remove isolated pseudo-layer boundaries; S62: Set the depth interval to the preset minimum layer thickness threshold. Multiple candidate points of the same type within a given range are merged into a single layer boundary; S63: Traverse all candidate boundary points in depth order, and alternately mark the first boundary that appears as the top of the layer and the next boundary that appears as the bottom of the layer to divide the complete stratigraphic segment; Step S6 also includes a correction process: When two consecutive boundary layers of the same type with a distance less than a preset value appear, one of the boundary layers is retained based on the confidence level of the surrounding logging curves. If the layering model misses a layer boundary based on the thickness information of adjacent layers, the missing layer boundary is supplemented by interpolation.
2. The well logging data stratification method based on T-KAN structure as described in claim 1, characterized in that, Step S1 includes: The logging data includes: natural gamma, density, sonic transit time, shallow lateral resistivity, and deep lateral resistivity; Each logging curve is normalized using the following formula: ,in These are the original curve values. and These are the minimum and maximum values of the curve. The value is the normalized value; The logging curve data is aligned and the sampling rate is uniform according to depth to remove outliers and noise, resulting in standardized logging curve data; the logging curve data consists of multichannel logging curve data.
3. The well logging data stratification method based on T-KAN structure as described in claim 1, characterized in that, Step S4 includes: The hierarchical model is trained using a class imbalance loss function, which is a weighted focus loss function, and its mathematical expression is as follows: in, The total number of samples, The total number of categories, It is a sample In category The true label indicates, It is the model on the sample Category The predicted probability, For focus modulation coefficients, For category The weighting coefficients, and the weights set for the top and bottom layer categories. Greater than the weight set for non-layer boundary categories.
4. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to enable the electronic device to perform a well logging data layering method based on a T-KAN structure as described in any one of claims 1-3.
5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a computer, perform a well logging data layering method based on a T-KAN structure as described in any one of claims 1-3.
Citation Information
Patent Citations
Method for automatically dividing logging depositional sequence
CN102536195A
Well logging curve automatic tiered value extraction and evaluation method
CN104793263A
A method for intelligent stratigraphic delineation based on well logging information
CN108562950B
Cross-project software defect prediction method based on shared hidden layer auto-encoder
CN111198820A
Intelligent logging horizon division method
CN112784980A