Logging curve reconstruction method and device based on large language model, equipment and medium

By using a well logging curve reconstruction method based on a large language model, and combining a pre-trained backbone network and an adapter module, the problems of poor generalization ability and high training cost in well logging curve reconstruction are solved, and cross-regional applicability and efficient well logging data reconstruction are achieved.

CN122490404APending Publication Date: 2026-07-31YANGTZE UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YANGTZE UNIVERSITY
Filing Date
2026-04-20
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing deep learning methods have poor generalization ability in well logging curve reconstruction, their accuracy decreases when applied across reservoirs, and their training cost is high. They are difficult to adapt to rapid exploration and low-cost application scenarios, their input and output are incompatible with general large models, and their accuracy in reconstructing complex formations is insufficient.

Method used

A well logging curve reconstruction method based on a large language model is adopted. By acquiring well logging data from multiple regions and types, a model is constructed that includes a pre-trained large language model backbone network, an adapter module, an input mapping layer, an output mapping layer, and a physical constraint layer. Lightweight training is then performed. The adapter module includes a layer normalization layer, a linear dimension-scaling layer, and an activation layer. The physical constraint layer ensures that the output is within a reasonable range.

Benefits of technology

It significantly improves the generalization ability of well logging curve reconstruction, reduces computing power consumption and training costs, ensures the rationality and engineering usability of reconstruction results, adapts to different geological conditions and reservoir types, and shortens the training cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122490404A_ABST
    Figure CN122490404A_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, equipment, and medium for reconstructing well logging curves based on a large language model. The method includes: acquiring well logging data from multiple regions and of different types, and preprocessing it to obtain a standardized well logging sequence; constructing a well logging curve reconstruction model, which includes a pre-trained large language model backbone network, multiple adapter modules inserted into the backbone network, an input mapping layer connected to the input of the backbone network, an output mapping layer connected to the output of the backbone network, and a physical constraint layer connected after the output mapping layer; training the parameters of the input mapping layer, adapter modules, output mapping layer, and physical constraint layer based on the well logging sequence to obtain a trained well logging curve reconstruction model; inputting the well logging data of the well to be reconstructed into the well logging curve reconstruction model, and outputting the reconstructed well logging curve. This invention improves the generalization and adaptability of well logging curve reconstruction and reduces training costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of exploration and development technology, specifically to a method, apparatus, equipment, and medium for reconstructing well logging curves based on a large language model. Background Technology

[0002] Well logging curves are the core data carriers characterizing the physical properties of subsurface rocks (such as lithology, porosity, and permeability) and reservoir fluid characteristics (distribution of oil, gas, and water) in oil and gas exploration and development. Their completeness and accuracy directly determine the reliability of reservoir evaluation, geological modeling, reserve calculation, and development plan optimization. Throughout the entire oil and gas exploration process, well logging curves are not only the "eyes" for identifying reservoirs and judging hydrocarbon potential in new blocks, but also a key basis for dynamically monitoring reservoir changes and optimizing well network deployment during the development and adjustment of older areas.

[0003] In actual well logging operations, factors such as high temperature and pressure downhole, wellbore collapse, instrument drift, sensor malfunction, and exploration cost constraints often lead to problems such as amplitude distortion, partial missing data, and invalid data segments in well logging curves. Therefore, professional curve reconstruction techniques are needed to fill in missing segments and correct distorted segments, providing a complete and accurate data foundation for subsequent geological analysis and engineering applications. Existing well logging curve reconstruction methods are mainly divided into two categories: traditional statistical methods and deep learning methods. Among them, deep learning methods have become the mainstream due to their stronger modeling capabilities.

[0004] However, existing deep learning methods still have obvious technical defects: First, traditional deep learning models have poor generalization ability, are highly dependent on the geological features of specific regions, and their accuracy drops significantly when applied across oil reservoirs, requiring repeated modeling; moreover, the computational requirements for full parameter training of models are high, the cycle is long, and the cost is high, making it difficult to adapt to rapid exploration and low-cost application scenarios; second, general large models are difficult to directly adapt to the field of well logging, and there are problems such as incompatibility between input and output, lack of physical constraints, and insufficient accuracy in complex formation reconstruction. Summary of the Invention

[0005] In view of this, it is necessary to provide a method, device, equipment and medium for reconstructing logging curves based on a large language model, so as to solve the technical problems of poor generalization ability, high training cost and inability to effectively adapt to the field of logging in the existing technology.

[0006] To address the aforementioned technical problems, in a first aspect, the present invention provides a well logging curve reconstruction method based on a large language model, comprising: Acquire well logging data from multiple regions and of different types, and obtain standardized well logging sequences through preprocessing; A well logging curve reconstruction model is constructed, which includes a pre-trained large language model backbone network, multiple adapter modules inserted into the backbone network, an input mapping layer connected to the input end of the backbone network, an output mapping layer connected to the output end of the backbone network, and a physical constraint layer connected after the output mapping layer. Based on the well logging sequence, the parameters of the input mapping layer, adapter module, output mapping layer and physical constraint layer are trained to obtain a trained well logging curve reconstruction model. Input the logging data of the well to be reconstructed into the trained logging curve reconstruction model, and output the reconstructed logging curve.

[0007] In one possible implementation, the adapter module includes a layer normalization layer, a first linear dimension upscaling layer, a GELU activation layer, a SwiGLU activation layer, a second linear dimension downscaling layer, and a residual connection layer connected in sequence.

[0008] In one possible implementation, the input mapping layer includes a first fully connected layer, a second fully connected layer, and a third fully connected layer that sequentially upscale the multidimensional logging features to the input dimension of the backbone network.

[0009] In one possible implementation, the output mapping layer is a fully connected network whose input dimension is equal to the hidden layer dimension of the backbone network.

[0010] In one possible implementation, the physical constraint layer incorporates a reasonable range of geophysical values ​​for well logging curves, which is used to truncate and correct the boundaries of the output mapping layer's results.

[0011] In one possible implementation, the preprocessing includes: Outliers were screened and removed using the interquartile range method combined with geological and physical boundaries. Min-max normalization is used to map the logging data of the region to be reconstructed after removing outliers to the interval [0,1]. The sliding window method is used to divide the normalized logging data of the region to be reconstructed into sequences of fixed length.

[0012] In one possible implementation, training the parameters of the input mapping layer, adapter module, output mapping layer, and physical constraint layer based on the logging sequence to obtain a trained logging curve reconstruction model includes: Freeze all parameters of the backbone network and perform gradient updates on the parameters of the input mapping layer, adapter module, output mapping layer and physical constraint layer; Iterative training is performed using a composite loss function that includes mean absolute error loss and geophysical range constraint loss, and the optimal model is obtained by combining an early stopping strategy.

[0013] On the other hand, the present invention also provides a well logging curve reconstruction device based on a large language model, comprising: The data processing module is used to acquire well logging data from multiple different regions and of different types, and to obtain standardized well logging sequences after preprocessing. The model building module is used to build a well logging curve reconstruction model, which includes a pre-trained large language model backbone network, multiple adapter modules inserted into the backbone network, an input mapping layer connected to the input end of the backbone network, an output mapping layer connected to the output end of the backbone network, and a physical constraint layer connected after the output mapping layer. The model training module is used to train the parameters of the input mapping layer, adapter module, output mapping layer and physical constraint layer based on the well logging sequence to obtain a trained well logging curve reconstruction model. The curve reconstruction module is used to input the logging data of the well to be reconstructed into the trained logging curve reconstruction model and output the reconstructed logging curve.

[0014] In a second aspect, the present invention also provides an electronic device, including a memory and a processor, wherein, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the well logging curve reconstruction method based on a large language model as described in any of the above implementations.

[0015] Thirdly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instruction, which, when executed by a processor, can implement the steps in the well logging curve reconstruction method based on a large language model described in any of the above implementations.

[0016] The beneficial effects of this invention are as follows: The well logging curve reconstruction method based on a large language model provided by this invention first acquires well logging data from multiple regions and of different types, enabling the model to learn general features across regions and reservoirs, significantly improving the generalization ability of well logging curve reconstruction. This allows it to adapt to different geological conditions and reservoir types, avoiding redundant modeling and improving engineering application efficiency. Next, an adapter module is inserted into the pre-trained large language model backbone network, and only the parameters of the input mapping layer, adapter module, output mapping layer, and physical constraint layer are trained, achieving lightweight training, significantly reducing computational power consumption and training costs, and shortening the training cycle. By setting input mapping layers and output mapping layers at the input and output ends of the pre-trained large language model backbone network, accurate adaptation between multi-dimensional well logging physical signals and high-dimensional model features is achieved, solving the problem of incompatibility between general models and well logging data. Furthermore, a physical constraint layer is set after the output mapping layer to ensure that the reconstruction results conform to the reasonable geological and physical range of the well logging curves, guaranteeing the rationality and engineering usability of the reconstructed curves and avoiding physically meaningless abnormal values. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A schematic flowchart of an embodiment of the well logging curve reconstruction method based on a large language model provided by the present invention; Figure 2 For the present invention Figure 1 A schematic diagram of an embodiment of S103; Figure 3 A schematic diagram of an embodiment of the well logging curve reconstruction device based on a large language model provided by the present invention; Figure 4 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0020] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0021] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.

[0022] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0023] This invention provides a method, apparatus, electronic device, and storage medium for reconstructing well logging curves based on a large language model, which will be described below.

[0024] Figure 1 This is a flowchart illustrating an embodiment of the well logging curve reconstruction method based on a large language model provided by the present invention. The execution entity of the well logging curve reconstruction method of the present invention is an electronic device equipped with dedicated well logging data processing software. Specifically, it can be an industrial workstation commonly used in the oil exploration field, a high-performance server, or an edge computing terminal, or a portable computer with data processing capabilities. All of the above execution entities must be equipped with processors, memory, and related peripherals capable of supporting model training and inference, enabling batch import, processing, model training, and reconstruction result output of well logging data. The well logging curve reconstruction method can be applied to well logging data repair and completion covering the entire process of oil and gas exploration and development, and can adapt to the needs of well logging data processing across regions and reservoirs. It can effectively solve the pain points of traditional models, such as weak generalization ability, high training cost, and difficulty in engineering implementation.

[0025] like Figure 1 As shown, the well logging curve reconstruction method based on a large language model includes: S101. Acquire logging data from multiple regions and of different types, and obtain standardized logging sequences through preprocessing.

[0026] It should be noted that the well logging data must cover at least three different geological regions and include more than two types of reservoirs, such as shale oil, tight sandstone, carbonate rock, and loose sandstone, to ensure that the model can learn generalized features that are geologically representative, improve its cross-reservoir generalization ability, and avoid the problem that the model can only adapt to the geological features of a single region and its performance will decline when applied across regions.

[0027] In terms of feature selection, the input features adopt at least four types of core logging parameters, including neutron porosity (CNL), acoustic transit time (AC), undisturbed formation resistivity (RT), natural gamma ray (GR), and compensated density (DEN). These parameters are key parameters characterizing formation lithology, reservoir properties, and fluid characteristics, and can provide sufficient geological feature information for the model. The target reconstruction curve can be flexibly configured according to actual engineering needs, such as density curve, neutron porosity curve, deep lateral resistivity curve, or P-wave velocity curve, which can specifically solve the problems of missing or distorted logging curves of different types.

[0028] It should be understood that the collected raw logging data also needs to be processed for format compatibility, supporting batch import of CSV, HDF5, LAS formats and binary logging curve files. The format parsing module automatically extracts depth sequences and logging values, and converts them into a standardized data matrix, effectively solving the problem of inconsistent formats and difficulty in batch processing of multi-source heterogeneous data in engineering applications, and improving data processing efficiency.

[0029] S102. Construct a well logging curve reconstruction model, which includes a pre-trained large language model backbone network, multiple adapter modules inserted into the backbone network, an input mapping layer connected to the input end of the backbone network, an output mapping layer connected to the output end of the backbone network, and a physical constraint layer connected after the output mapping layer.

[0030] It should be noted that the pre-trained large language model backbone network can be a Llama 3.1 pre-trained decoder, which contains 32 Transformer layers and adopts Group Query Attention (GQA) mechanism and RMS Norm normalization. Compared with the traditional Transformer, the pre-trained large language model decoder has higher computational efficiency and feature abstraction ability in long sequence modeling.

[0031] It should also be noted that, in order to adapt to the characteristics of well logging time-series data, this embodiment removes the native text token embedding layer of the backbone network, while retaining the attention mechanism of the Transformer encoder and the Feed-Forward network structure. At the same time, the native text generation masking mechanism is turned off and replaced with a causal masking of time-series data, ensuring that the model only uses historical and current depth information when predicting the curve value at the current depth point, which is consistent with the depth sequence characteristics of well logging curves.

[0032] S103. Based on the well logging sequence, the parameters of the input mapping layer, adapter module, output mapping layer and physical constraint layer are trained to obtain a trained well logging curve reconstruction model.

[0033] S104. Input the logging data of the well to be reconstructed into the trained logging curve reconstruction model, and output the reconstructed logging curve.

[0034] In summary, the well logging curve reconstruction method based on a large language model provided in this invention first acquires well logging data from multiple regions and of different types, enabling the model to learn general features across regions and reservoirs. This significantly improves the generalization ability of well logging curve reconstruction, allowing it to adapt to different geological conditions and reservoir types, avoiding redundant modeling, and improving engineering application efficiency. Next, an adapter module is inserted into the pre-trained large language model backbone network, and only the parameters of the input mapping layer, adapter module, output mapping layer, and physical constraint layer are trained, achieving lightweight training, significantly reducing computational power consumption and training costs, and shortening the training cycle. By setting input mapping layers and output mapping layers at the input and output ends of the pre-trained large language model backbone network, accurate adaptation between multi-dimensional well logging physical signals and high-dimensional model features is achieved, solving the problem of incompatibility between general models and well logging data. Furthermore, a physical constraint layer is set after the output mapping layer to ensure that the reconstruction results conform to the reasonable geological and physical range of the well logging curves, guaranteeing the rationality and engineering usability of the reconstructed curves and avoiding physically meaningless abnormal values.

[0035] In some embodiments of the present invention, the preprocessing includes outlier removal, standardization, sequence segmentation, and dataset partitioning, specifically: Outliers were screened and removed using the interquartile range method combined with geological and physical boundaries. Min-max normalization is used to map the logging data of the region to be reconstructed after removing outliers to the interval [0,1]. The sliding window method is used to divide the normalized logging data of the region to be reconstructed into sequences of fixed length.

[0036] It should be noted that in the outlier removal stage, the interquartile range (IQR) method combined with geophysical boundaries is used for dual screening to ensure the accuracy of outlier removal. Firstly, based on the statistical interval [Q1...] [1.5IQR, Q3+1.5IQR] identifies outlier data (where Q1 is the first quartile, Q3 is the third quartile, and IQR is the interquartile range). This is combined with the geophysical boundaries of logging parameters; for example, the reasonable range for natural gamma is typically 0–300 API, and the reasonable range for density is 2000–3000 kg / m³. This eliminates abrupt and invalid values ​​caused by instrument drift, wellbore collapse, and construction interference, preventing outlier data from affecting model training accuracy. For missing data, a segmented processing strategy is adopted, balancing sequence continuity and reconstruction specificity: short, localized missing segments of a single parameter with a missing length of no more than 5 data points are temporarily filled using linear interpolation to ensure the continuity of the logging sequence and avoid short missing segments disrupting the integrity of formation features; long missing segments with a missing length greater than 5 data points are marked as areas to be reconstructed and are not blindly filled to prevent incorrect data from misleading model training, thus ensuring the specificity and accuracy of subsequent reconstruction.

[0037] It should also be noted that min-max normalization is used to map all logging parameters to the [0, 1] interval, eliminating the dimensional and amplitude differences between different logging parameters, and bringing various curve features to the same numerical scale, thereby improving the model training stability and convergence speed. The normalization formula is as follows:

[0038] in, These are the original well logging data values. , These represent the minimum and maximum values ​​of the original well logging data. This is the standardized data.

[0039] To further improve the robustness of normalization, the 1% quantile and 99% quantile are used to replace the original extreme value pairs. , Truncation is performed to avoid extreme outliers from shifting the normalization results and to ensure the rationality of data distribution.

[0040] It should be understood that after normalization, a sliding window method is used for sequence segmentation to adapt the continuous logging data to the model's requirements for time-series input. The window length is set to 5m, corresponding to 40 data points. This length matches the sedimentary cycle scale and can completely cover a small sedimentary unit, facilitating the model's capture of formation rhythm features. The sliding step size is consistent with the logging sampling interval, typically 0.125m, enabling overlapping segmentation of the sequence and improving the model's ability to capture local formation features. During the segmentation process, multiple logging curves are synchronously aligned based on depth coordinates to ensure that all features within the same window correspond to the same formation location, preserving the vertical correlation of formations and avoiding feature distortion caused by depth misalignment. For the missing segment to be reconstructed, the window completely covers the missing area and 20 valid data points before and after it, providing the model with sufficient contextual geological feature information and improving the reconstruction accuracy of the missing segment.

[0041] Finally, the sequence-segmented dataset was stratified and sampled in a 7:2:1 ratio to ensure uniform data distribution across regions and reservoir types, constructing separate training, validation, and test sets to avoid data bias. The stratified sampling strategy followed a two-dimensional "region-reservoir type" approach, ensuring consistent distribution across the three datasets for each region and reservoir type, preventing data bias that could reduce model generalization ability, and ensuring the model can learn common characteristics across different regions and reservoirs. During the training phase, slight data augmentation can be applied to the training set, such as adding ±0.01 standard deviation Gaussian noise (simulating slight interference from downhole instruments) or locally flipping the sequence while maintaining depth order, further improving the model's robustness to noise and formation morphology differences, and enhancing its engineering adaptability.

[0042] After the above series of preprocessing steps, the raw logging data is converted into a standardized, fixed-length, and uniformly distributed model input time series, providing a high-quality and highly reliable data foundation for subsequent model training.

[0043] In some embodiments of the present invention, the adapter module includes a layer normalization layer, a first linear dimension upscaling layer, a GELU activation layer, a SwiGLU activation layer, a second linear dimension downscaling layer, and a residual connection layer connected in sequence.

[0044] It should be noted that the input features are first normalized, then the first linear dimensionality increase layer increases the dimension from 8192 to 512 (the bottleneck dimension). After GELU activation, they are fed into a SwiGLU activation layer, and then the second linear dimensionality reduction layer restores them to 8192 dimensions. The module's input and output dimensions are unified at 8192, perfectly matching the backbone network's feature dimensions, requiring no additional dimensionality transformation. The intermediate bottleneck dimension is set to 512, which is 1 / 16 of the input dimension. This ensures the module's feature transformation and nonlinear fitting capabilities while maximizing the control of the module's parameter count, achieving a lightweight design. Finally, the original input of the adapter module is added to the dimensionality-reduced output through residual connections to obtain the final output of the adapter module.

[0045] It should be understood that the layer normalization layer is used to stabilize the input feature distribution, suppress gradient vanishing, and improve training stability; the first linear dimensionality increase layer expands the input features to a high-dimensional space, improving the model's nonlinear expressive power and facilitating the capture of complex geological features; the GELU activation layer and the SwiGLU activation layer are used in series to balance feature smoothness and gating filtering capabilities, enabling more accurate extraction of multi-scale geological features from well logging sequences and filtering out invalid noise; the second linear dimensionality reduction layer compresses high-dimensional features back to the original dimension, ensuring structural matching with the backbone network and avoiding dimensionality incompatibility issues; the residual connection layer directly superimposes the input of the adapter module onto the output, avoiding gradient degradation in deep networks and improving the model's stability in modeling long-sequence well logging data.

[0046] It should also be noted that the number of adapter modules inserted can be flexibly adjusted according to the number of layers in the pre-trained large language model backbone network and the complexity of the well logging data features, without specific limitations. The insertion position is preferably before the high-order Transformer blocks at the output of the backbone network. In this embodiment, the backbone network can be Llama 3.1 70B, containing 32 Transformer blocks. Therefore, adapter modules (a total of 6) are inserted before the 27th to 32nd Transformer blocks at the output of the backbone network. This layer region is the final stage of high-order feature abstraction in the backbone network. Inserting adapters here can accurately capture high-order semantic features specific to the well logging domain, while avoiding interference with the learning process of general features at the lower levels of the network, thus preserving the original generalization ability of the pre-trained model. If other pre-trained large language model backbone networks are used (such as GPT-2 with fewer layers or Llama 3.1 405B with more layers), the number of adapter modules can be increased or decreased accordingly.

[0047] To further enhance the model's ability to capture long-sequence dependencies in well logging curves, a cross-layer collaborative design is added. A feature interaction layer is built between adjacent adapter modules, and cross-module feature fusion is achieved through an attention weight sharing mechanism. This opens up the feature transmission path of multi-level adapters and improves the model's ability to model long-distance geological patterns such as continuous formation changes and sedimentary cycles.

[0048] The adapter module in this embodiment adopts a compact structure design with a very small number of parameters, which can achieve efficient domain adaptation without increasing the computing power burden, and enable the model to quickly fit the distribution of logging data.

[0049] In some embodiments of the present invention, the input mapping layer includes a first fully connected layer, a second fully connected layer, and a third fully connected layer that sequentially upscale the multidimensional logging features to the input dimension of the backbone network.

[0050] The first fully connected layer maps the input features to 2048 dimensions, the second fully connected layer maps 2048 dimensions to 4096 dimensions, and the third fully connected layer maps 4096 dimensions to 8192 dimensions (consistent with the dimensions of the backbone network's hidden layers). After each fully connected layer, RMS Norm normalization and the GELU activation function are added to suppress gradient vanishing and enhance non-linear expressive power. A Dropout layer (with a dropout rate of 0.1) is also inserted between the second and third layers to reduce the risk of overfitting.

[0051] In this embodiment of the invention, the input mapping layer is located at the very front of the model and adopts a stepped dimensionality increase structure. This avoids the loss of fine-grained geological features caused by direct dimensionality increase, ensuring that fine-grained geological features such as stratigraphic interfaces, sedimentary cycles, and lithological changes are completely transmitted to the backbone network, thus guaranteeing accurate feature extraction by the model. RMS Norm normalization and GELU activation functions can be set between each fully connected layer to further improve feature transfer efficiency and training stability, avoiding gradient vanishing or gradient exploding problems.

[0052] In some embodiments of the present invention, the output mapping layer is a fully connected network whose input dimension is equal to the hidden layer dimension of the backbone network.

[0053] It should be understood that the output mapping layer uses a single-layer fully connected network, with its input dimension matching the hidden layer dimension of the backbone network. This layer maps the high-dimensional abstract features output by the backbone network into one-dimensional continuous physical quantities, ultimately restoring them to directly usable well logging curve values. This layer employs a linear activation function to avoid numerical distortion that might result from nonlinear transformations, ensuring the numerical fidelity of the reconstructed results and guaranteeing that the output well logging curve values ​​are continuous, smooth, and conform to the natural variation patterns of well logging curves.

[0054] In some embodiments of the present invention, the physical constraint layer incorporates a reasonable range of geophysical values ​​for well logging curves, which is used to truncate and correct the boundaries of the output mapping layer results.

[0055] It should be noted that this layer contains reasonable geophysical numerical ranges for various well logging curves, including but not limited to natural gamma 0–300 API, density 2000–3000 kg / m³, and sonic transit time 100–500 μs / m. These ranges are used for numerical truncation and boundary correction of the model output. When the model output values ​​exceed the reasonable range, the physical constraint layer will truncate them to the reasonable interval or pull them back to the reasonable range through linear correction. This ensures that the reconstructed curves always remain within the range that conforms to the actual underground geological conditions, avoiding physicalally meaningless anomalies. This significantly improves the engineering usability of the reconstruction results and provides reliable data support for subsequent reservoir evaluation and geological modeling.

[0056] In some embodiments of the present invention, such as Figure 2 As shown, step S103, training the parameters of the input mapping layer, adapter module, output mapping layer, and physical constraint layer based on the logging sequence to obtain the trained logging curve reconstruction model, includes: S201. Freeze all parameters of the backbone network and perform gradient updates on the parameters of the input mapping layer, adapter module, output mapping layer and physical constraint layer; S202. Iterative training is performed using a composite loss function that includes mean absolute error loss and geophysical range constraint loss, and the optimal model is obtained by combining an early stopping strategy.

[0057] It should be noted that during training, all parameters of the pre-trained large language model backbone network (Transformer blocks in layers 1-32) are frozen to maintain the general sequence modeling capabilities acquired during pre-training. Gradient updates are performed only on the parameters of the input mapping layer, adapter module, output mapping layer, and physical constraint layer. This ensures the model retains the general sequence modeling capabilities learned during pre-training and only performs adaptation learning for well logging domain features. To achieve gradient isolation, the gradient calculation flag for each layer parameter of the backbone network can be disabled, causing the backpropagation algorithm to calculate only the gradients of trainable layers and ignore the backbone network. For example, the `requires_grad` attribute of the backbone network parameter in the PyTorch deep learning framework can be set to `False` to isolate gradients from the frozen layers, preventing gradient backpropagation to the backbone network during training and ensuring the effectiveness of lightweight training.

[0058] It should be understood that the total number of model parameters remains consistent with the Llama 3.1 backbone network (70×10⁻⁶). 8The trainable parameters only include the adapter modules (6 modules, totaling approximately 7.2 × 10). 6 Parameters) and input / output mapping layer (approximately 2.6 × 10) 6 The number of trainable parameters is reduced by 1.4% of the total parameters. This training method significantly reduces the number of trainable parameters and shortens the training time by 70% compared to the traditional Transformer full-parameter training (from 168 hours to 48 hours). The interpretation time of a single well is reduced from 45 minutes to 8 minutes, and the cost of human and computing resources is significantly reduced, making it suitable for rapid exploration needs.

[0059] It should also be noted that the model training uses a composite loss function. Supervised optimization is performed using this composite loss function. It also includes the average absolute error loss. Loss due to geological and physical constraints Dual constraints improve model training performance. Among them, the composite loss function... The formula is expressed as:

[0060] in, This is the weighting coefficient, which can be adjusted to 0.1–0.3 based on the actual training effect.

[0061] The mean absolute error loss is used to measure the numerical deviation between the reconstructed curve and the actual logging data, and the formula is:

[0062] Where N is the number of data samples, These are the actual well logging values. The model's predicted values ​​are guided by the mean absolute error loss function to make the model output closer to the real data, thereby improving the reconstruction accuracy. The geophysical range constraint loss is used to penalize predicted values ​​that exceed a reasonable range, guiding the model output to better conform to geological laws and reduce anomaly bias. The formula can be expressed as:

[0063] in, , These represent the upper and lower limits of the reasonable range for well logging parameters, respectively.

[0064] The Adam optimizer is employed, with β1=0.9, β2=0.999, and ε=1e-8, to adapt to sparse gradient scenarios and improve convergence speed. A cyclic learning rate strategy is used, with a peak learning rate of 0.0001 and a base learning rate of 0.00001, and a learning rate cycle of 50 iterations. Periodic fluctuations prevent the model from getting trapped in local optima. The learning rate decay factor is set to 0.9, starting to decay linearly after 100 iterations to ensure stable convergence in later stages. The batch size is set to 256 for hardware adaptation, using mixed-precision training (FP16+FP32) to reduce GPU memory usage. Gradient accumulation (accumulation steps of 4) is enabled, effectively increasing the batch size and improving training stability. Furthermore, L2 regularization is added to the adapter module and input / output mapping layer, with a weight decay coefficient of 0.01 to suppress overfitting.

[0065] It should be noted that the model training process and early stopping strategy include: inputting the training set into the model in batches, updating trainable parameters after each iteration, outputting the training loss every 10 iterations, evaluating model performance using the validation set every 20 iterations (calculating MAE and R²), and saving the model weights with the lowest validation set loss as the optimal model. The early stopping strategy sets the early stopping trigger cycle to 5 training cycles (1 cycle = traversing the training set once). If the validation set loss does not decrease for 5 consecutive cycles and the fluctuation range is less than 1e-5, training is automatically stopped to avoid invalid iterations. During training, training metrics are also monitored in real time, including but not limited to training loss, validation loss, gradient norm (setting the gradient clipping threshold to 1.0 to prevent gradient explosion), and code vector utilization (ensuring effective updates of adapter module parameters), generating training logs for easy troubleshooting.

[0066] Through the lightweight training method described above, the model can converge quickly on a common computing platform while maintaining high reconstruction accuracy and cross-regional applicability, effectively solving the problems of high training cost, long cycle, and difficulty in engineering deployment of traditional models.

[0067] In some embodiments of the present invention, after the model training is completed, the logging data of the well to be reconstructed is input into the trained logging curve reconstruction model for inference, so as to realize the missing completion and distortion repair of the logging curve of the well to be reconstructed.

[0068] The well data to be reconstructed first undergoes the preprocessing procedure in step S101, including format parsing, outlier removal, min-max normalization, and sliding window segmentation, to ensure that the format and distribution of the input data are consistent with the training set, avoiding a decrease in reconstruction accuracy due to data differences. For overlapping regions generated by sliding window segmentation, a weighted average method is used for sequence splicing. In this embodiment, the weight of the overlapping regions is set to 0.5, that is, the arithmetic mean of the predicted values ​​of two adjacent windows is taken. This processing method can effectively eliminate the window boundary effect and ensure the smoothness of the reconstruction curve.

[0069] The model outputs a standardized reconstructed sequence, which is then destandardized to restore the logging curves to their true scale. This destandardization restoration employs the inverse normalization transform from step 101, expressed as follows:

[0070] in, The reconstructed actual well logging values, For standardized data, , These are the normalized minimum and maximum values ​​saved during training.

[0071] Following step S104, the process further includes multi-dimensional accuracy verification, result correction, and optimization of the reconstructed curves output by the model. Specifically, the output reconstructed curves can undergo further verification and correction processes. For example, the mean square error (MSE), mean absolute error (MAE), and root mean square error (RMSE) of the reconstructed curves and the measured curves (without missing / distorted segments) can be calculated to verify the reconstruction accuracy. The Pearson correlation coefficient (r) and coefficient of determination (R²) between the reconstructed curves and the measured curves are calculated using correlation and goodness of fit. R ≥ 0.9 and R² ≥ 0.85 are considered acceptable to ensure the consistency of the curve trends. For cross-reservoir generalization verification targeting cross-regional reconstruction scenarios, the formula for calculating the error increment is as follows:

[0072] in, The error increment is ΔMAE ≤ 5%, which is the standard for acceptable generalization performance.

[0073] The result correction and optimization include: for anomalous segments in the reconstructed curve that exceed the geologically reasonable range or fluctuate drastically, if the length of the anomalous segment does not exceed 3 data points, a smoothing correction is performed using a moving average method (window size of 3); if the length of the anomalous segment exceeds 3 data points, a secondary correction is performed by combining the curve shape of the corresponding layer in adjacent wells to ensure the rationality of the correction results. For complex strata (such as fractured sections in carbonate rocks), the output results of traditional reconstruction models (such as models based on CNN-LSTM) can be introduced and weighted and fused with the results of the model in this embodiment. For example, the weight of the model in this embodiment is set to 0.7, and the weight of the traditional model is set to 0.3, and the reconstruction accuracy is further improved by weighted summation. After reconstruction, the results can be exported to various commonly used engineering formats such as LAS, CSV, and HDF5, while retaining metadata such as depth coordinates and parameter units, which can be directly imported into subsequent software such as reservoir evaluation and geological modeling. This effectively solves the technical problems of weak generalization ability, high training cost, and difficulty in engineering application of large models in traditional methods.

[0074] After reconstruction, the results can be exported to commonly used engineering formats such as LAS, CSV, or HDF5, while retaining metadata such as depth coordinates and parameter units, which can be directly imported into subsequent software such as reservoir evaluation and geological modeling.

[0075] To verify the effectiveness of the method of the present invention, the following comparative experiment was conducted in this embodiment: 1. Experimental Data: Logging data from 250 wells across different regions were collected, covering shale oil reservoirs in the Fox Creek region of Canada (50 wells), tight sandstone reservoirs in central and western China (100 wells), and carbonate reservoirs in northeastern China (100 wells). Input features included neutron porosity (CNL), sonic transit time (AC), undisturbed formation resistivity (RT), and natural gamma (GR). The target reconstruction parameter was the density curve (DEN), and the data sampling interval was 0.125 m.

[0076] The statistical characteristics of the logging parameters after data cleaning are shown in Table 1: Table 1: Statistical characteristics of logging parameters after data cleaning

[0077] 2. Comparison method: The method of the present invention is compared with two existing methods: ① traditional Transformer model (full parameter training); ② GPT-2 pre-trained model (adapter adaptation).

[0078] Reconstruction accuracy comparison: The method of this invention is compared with the traditional Transformer model and GPT-2 (adapter adaptation). The error indicators on the test set are shown in Table 2 below: Table 2: Comparison of Reconstruction Errors Using Different Methods

[0079] On the test set, the mean absolute error (MAE) of the method of this invention is 0.079, which is about 20% lower than that of the traditional Transformer model (0.098) and about 26% lower than that of the GPT-2 adapter model (0.106); the mean squared error (MSE) is reduced by 37% and 48%, respectively. The results show that the reconstruction accuracy of the method of this invention is significantly better than that of existing methods.

[0080] Generalization capability verification: Leave-one-out cross-validation was used, selecting data from two regions to train the model, and then conducting blind well testing in the remaining region (without adjacent well data). The results are shown in Table 3 below: Table 3: Comparison of Generalization Performance in Blind Well Tests

[0081] Experimental results show that the method of this invention reduces the MAE by 79%, 72% and 55% respectively in the three blind zone tests compared with the traditional Transformer model, and the generalization error increment across reservoirs is only 3.2%, which is far superior to the traditional model.

[0082] Engineering efficiency verification: The training time of the method of this invention is about 48 hours, which is about 70% shorter than the traditional Transformer full parameter training (168 hours); the single well reconstruction interpretation time is about 8 minutes, which is about 5.6 times faster than the traditional method (45 minutes), which significantly reduces the cost of engineering application.

[0083] The experimental data above show that the method of the present invention is significantly superior to the prior art in terms of reconstruction accuracy, cross-reservoir generalization ability and engineering efficiency, verifying the effectiveness of the adapter module and the weak physical constraint mechanism.

[0084] To better implement the logging curve reconstruction method in this embodiment of the invention, based on the logging curve reconstruction method, correspondingly, as follows: Figure 3 As shown, this embodiment of the invention also provides a logging curve reconstruction device based on a large language model. The logging curve reconstruction device 300 based on a large language model includes: The data processing module 301 is used to acquire logging data of multiple different regions and types, and to obtain standardized logging sequences after preprocessing. The model building module 302 is used to build a well logging curve reconstruction model, which includes a pre-trained large language model backbone network, multiple adapter modules inserted into the backbone network, an input mapping layer connected to the input end of the backbone network, an output mapping layer connected to the output end of the backbone network, and a physical constraint layer connected after the output mapping layer. The model training module 303 is used to train the parameters of the input mapping layer, adapter module, output mapping layer and physical constraint layer based on the well logging sequence to obtain a trained well logging curve reconstruction model. The curve reconstruction module 304 is used to input the logging data of the well to be reconstructed into the trained logging curve reconstruction model and output the reconstructed logging curve.

[0085] The well logging curve reconstruction device 300 based on a large language model provided in the above embodiments can realize the technical solutions described in the above embodiments of the well logging curve reconstruction method based on a large language model. The specific implementation principles of each module or unit can be found in the corresponding content in the above embodiments of the well logging curve reconstruction method based on a large language model, and will not be repeated here.

[0086] like Figure 4 As shown, the present invention also provides an electronic device 400. The electronic device 400 includes a processor 401, a memory 402, and a display 403. Figure 4 Only some components of the electronic device 400 are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.

[0087] In some embodiments, processor 401 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 402 or process data, such as the well logging curve reconstruction method of the present invention.

[0088] In some embodiments, processor 401 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 401 may be local or remote. In some embodiments, processor 401 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, intranet, multi-cloud, etc., or any combination thereof.

[0089] In some embodiments, memory 402 may be an internal storage unit of electronic device 400, such as a hard disk or memory of electronic device 400. In other embodiments, memory 402 may also be an external storage device of electronic device 400, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 400.

[0090] Furthermore, the memory 402 may include both internal storage units of the electronic device 400 and external storage devices. The memory 402 is used to store application software and various types of data installed on the electronic device 400.

[0091] In some embodiments, display 403 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 403 is used to display information from electronic device 400 and to display a visual user interface. Components 401-403 of electronic device 400 communicate with each other via a system bus.

[0092] In one embodiment, when processor 401 executes the well logging curve reconstruction program based on a large language model in memory 402, the following steps can be implemented: Acquire well logging data from multiple regions and of different types, and obtain standardized well logging sequences through preprocessing; A well logging curve reconstruction model is constructed, which includes a pre-trained large language model backbone network, multiple adapter modules inserted into the backbone network, an input mapping layer connected to the input end of the backbone network, an output mapping layer connected to the output end of the backbone network, and a physical constraint layer connected after the output mapping layer. Based on the well logging sequence, the parameters of the input mapping layer, adapter module, output mapping layer and physical constraint layer are trained to obtain a trained well logging curve reconstruction model. Input the logging data of the well to be reconstructed into the trained logging curve reconstruction model, and output the reconstructed logging curve.

[0093] It should be understood that when the processor 401 executes the well logging curve reconstruction program based on the large language model in the memory 402, in addition to the functions mentioned above, it can also perform other functions, as can be found in the description of the corresponding method embodiments above.

[0094] Accordingly, this application also provides a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions of the well logging curve reconstruction method based on a large language model provided in the above-described method embodiments.

[0095] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0096] The above provides a detailed description of the well logging curve reconstruction method, apparatus, equipment, and medium based on a large language model provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A method for reconstructing well logging curves based on a large language model, characterized in that, include: Acquire well logging data from multiple regions and of different types, and obtain standardized well logging sequences through preprocessing; A well logging curve reconstruction model is constructed, which includes a pre-trained large language model backbone network, multiple adapter modules inserted into the backbone network, an input mapping layer connected to the input end of the backbone network, an output mapping layer connected to the output end of the backbone network, and a physical constraint layer connected after the output mapping layer. Based on the well logging sequence, the parameters of the input mapping layer, adapter module, output mapping layer and physical constraint layer are trained to obtain a trained well logging curve reconstruction model. Input the logging data of the well to be reconstructed into the trained logging curve reconstruction model, and output the reconstructed logging curve.

2. The well logging curve reconstruction method based on a large language model according to claim 1, characterized in that, The adapter module includes a layer normalization layer, a first linear dimension upscaling layer, a GELU activation layer, a SwiGLU activation layer, a second linear dimension downscaling layer, and a residual connection layer connected in sequence.

3. The well logging curve reconstruction method based on a large language model according to claim 1, characterized in that, The input mapping layer includes a first fully connected layer, a second fully connected layer, and a third fully connected layer that sequentially upscale the multidimensional logging features to the input dimension of the backbone network.

4. The well logging curve reconstruction method based on a large language model according to claim 1, characterized in that, The output mapping layer is a fully connected network with an input dimension equal to the hidden layer dimension of the backbone network.

5. The well logging curve reconstruction method based on a large language model according to claim 1, characterized in that, The physical constraint layer contains a reasonable range of geophysical values ​​for well logging curves, which is used to truncate and correct the boundaries of the output mapping layer results.

6. The well logging curve reconstruction method based on a large language model according to claim 1, characterized in that, The preprocessing includes: Outliers were screened and removed using the interquartile range method combined with geological and physical boundaries. Min-max normalization is used to map the logging data of the region to be reconstructed after removing outliers to the interval [0,1]. The sliding window method is used to divide the normalized logging data of the region to be reconstructed into sequences of fixed length.

7. The well logging curve reconstruction method based on a large language model according to claim 1, characterized in that, The step of training the parameters of the input mapping layer, adapter module, output mapping layer, and physical constraint layer based on the well logging sequence to obtain the trained well logging curve reconstruction model includes: Freeze all parameters of the backbone network and perform gradient updates on the parameters of the input mapping layer, adapter module, output mapping layer and physical constraint layer; Iterative training is performed using a composite loss function that includes mean absolute error loss and geophysical range constraint loss, and the optimal model is obtained by combining an early stopping strategy.

8. A well logging curve reconstruction device based on a large language model, characterized in that, include: The data processing module is used to acquire well logging data from multiple different regions and of different types, and to obtain standardized well logging sequences after preprocessing. The model building module is used to build a well logging curve reconstruction model, which includes a pre-trained large language model backbone network, multiple adapter modules inserted into the backbone network, an input mapping layer connected to the input end of the backbone network, an output mapping layer connected to the output end of the backbone network, and a physical constraint layer connected after the output mapping layer. The model training module is used to train the parameters of the input mapping layer, adapter module, output mapping layer and physical constraint layer based on the well logging sequence to obtain a trained well logging curve reconstruction model. The curve reconstruction module is used to input the logging data of the well to be reconstructed into the trained logging curve reconstruction model and output the reconstructed logging curve.

9. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the well logging curve reconstruction method based on a large language model as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the well logging curve reconstruction method based on a large language model as described in any one of claims 1 to 7.