Well logging electric imaging missing repair method and device and computer equipment
By combining a denoising diffusion probability model and a vector quantization variational autoencoder, missing regions in well logging electrical imaging data are repaired, solving the problem of blank stripes caused by electrode size limitations and achieving high-precision data repair and geological feature identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA NAT PETROLEUM CORP
- Filing Date
- 2024-12-31
- Publication Date
- 2026-06-30
Smart Images

Figure CN122312440A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of oil and gas exploration and development technology, specifically relating to a method for repairing missing logging electrical imaging, a device for repairing missing logging electrical imaging, a computer device, and a machine-readable storage medium. Background Technology
[0002] Electrical imaging logging is a crucial method for oilfield reservoir evaluation. However, due to the limited electrode size in current electrical imaging instruments, it's impossible to completely cover the wellbore, resulting in blank bands in the raw electrical imaging data. Since well logging interpretation is typically done manually, these blank bands hinder the accurate identification of downhole geological features by logging personnel. For interpreters unfamiliar with the geological conditions and lacking experience in the relevant block, raw electrical imaging data containing blank bands impedes the improvement of interpretation accuracy. In actual well logging interpretation, experts can identify important geological information in the formation, such as fractures and pores, through electrical imaging data, providing crucial information for productivity evaluation. Therefore, obtaining high-quality full-section repair electrical imaging data is of great significance for both manual and AI-based well logging interpretation methods. Research has revealed that full-section repair data obtained through traditional image processing methods exhibits poor correlation of formation features between electrodes and contains significant noise and jagged edges. Therefore, there is an urgent need to improve the current blank band completion scheme for electrical logging data. Summary of the Invention
[0003] The purpose of this application is to provide a method for repairing missing information in well logging electrical imaging, a device for repairing missing information in well logging electrical imaging, a computer device, and a machine-readable storage medium, so as to overcome the problems in the prior art where the formation characteristics between the electrodes are poor and contain a lot of noise and jagged edges in the whole-well section electrical imaging repair results.
[0004] To achieve the above objectives, the first aspect of this application provides a method for repairing missing data in well logging electrical imaging, comprising: The obtained current well logging electrical imaging image is preprocessed, and a mask is made for the missing areas in the preprocessed well logging electrical imaging image; The pre-processed well logging electrical imaging image and the mask are input into a pre-built completion model to fill in the missing areas in the well logging electrical imaging image, and the well logging electrical imaging image with the missing areas filled is output. The completion model is obtained by training the initially constructed denoising diffusion probability model in stages. The stage training consists of pre-training the vector quantization variational autoencoder used for denoising inverse diffusion in the initially constructed denoising diffusion probability model and training the denoising diffusion probability model. Specifically, during the denoising and inverse diffusion process of the current iteration step, the non-missing regions in the denoised logging electrical imaging image are preserved through the mask to obtain a denoised image of the known region. The denoised image of the known region is used as a condition constraint for the denoising and inverse diffusion process of the current iteration step. The denoised logging electrical imaging image is obtained by performing a denoising and diffusion process with an iteration number of the first difference on the preprocessed logging electrical imaging image. The first difference is the difference between the total number of iterations in the denoising and diffusion process and the number of iterations in the denoising and inverse diffusion process including the current iteration step.
[0005] In a specific embodiment of this application, the known region noisy image is used as a conditional constraint for the denoising and inverse diffusion process of the current iteration step, including: The denoised image of the known region is fused with the denoised image of the missing region, and it is determined whether the current iteration step is the termination iteration step of the denoising inverse diffusion process. If so, the fused image is used as the output of the completion model; otherwise, the fused image is used as the input image of the denoising inverse diffusion of the next iteration step. The denoised image of the missing region is an image obtained by using the mask to retain only the missing region in the denoised image obtained by the current iteration step of denoising and inverse diffusion.
[0006] In a specific embodiment of this application, the non-missing regions in the noisy logging electrical imaging image are preserved using the mask to obtain a noisy image of the known region, including: The noisy logging electrical imaging image is multiplied with the mask, and the result of the multiplication is used as the noisy image of the known area.
[0007] In a specific embodiment of this application, the missing region denoised image is obtained by preserving only the missing region in the denoised image obtained by the current iteration step through the mask, including: Invert the mask to obtain the reverse mask; The denoised image obtained by the denoising inverse diffusion in the current iteration step is multiplied with the anti-mask, and the result of the multiplication is used as the denoised image of the missing region.
[0008] In a specific embodiment of this application, the vector quantization variational autoencoder used for denoising inverse diffusion within the pre-trained, initially constructed denoising diffusion probability model includes: The first training set was constructed based on historical well logging electrical imaging data; The vector quantization variational autoencoder is pre-trained using the first training set to obtain the codebook embedded between the encoder and decoder within the vector quantization variational autoencoder.
[0009] In a specific embodiment of this application, training the denoising diffusion probability model includes: The acquired historical well logging electrical imaging images are preprocessed, and a mask is made for the missing areas in the preprocessed historical well logging electrical imaging images. The pre-processed historical well logging electrical imaging image is input into a pre-constructed image restoration model to fill in the missing areas in the historical well logging electrical imaging image, generating a historical well logging electrical imaging image after the missing areas are filled in. The image restoration model includes at least a generative adversarial model. A second training set is constructed using historical well logging electrical imaging images after filling in the missing areas as label data, and preprocessed historical well logging electrical imaging images and masks of the missing areas of historical well logging electrical imaging images as input data. The second training set is used to train the denoised diffusion probability model after the vector quantization variational autoencoder is pretrained to obtain the complete model.
[0010] In a specific embodiment of this application, the loss function for training the denoising diffusion probability model is a weighted sum of a first loss value and a second loss value; wherein, the first loss value is the error between the true value of the Gaussian noise distribution in the non-missing region of the well logging electrical imaging image and the predicted value of the Gaussian noise distribution in the missing region of the well logging electrical imaging image; the second loss value is the error between the true value of the Gaussian noise distribution in the missing region of the well logging electrical imaging image and the predicted value of the Gaussian noise distribution in the missing region of the well logging electrical imaging image; the weight of the first loss value is greater than the weight of the second loss value.
[0011] In a specific embodiment of this application, the obtained well logging electrical imaging image is preprocessed, including: The obtained well logging electrical imaging image is subjected to image correction, which includes at least one of acceleration correction, electrical equalization, and sawtooth correction.
[0012] In a specific embodiment of this application, the obtained well logging electrical imaging image is preprocessed, including: The obtained well logging electrical imaging image is subjected to image correction, which includes at least one of acceleration correction, electrical equalization, and sawtooth correction. The well logging electrical imaging image obtained after image correction is converted to grayscale.
[0013] In a specific embodiment of this application, the well logging electrical imaging image obtained after image correction is converted to grayscale, including: For any pixel in the well logging electrical imaging image obtained after image correction, the RGB three-channel values of the pixel are weighted and summed to obtain the gray value; A grayscale logging electrical imaging map is generated based on the grayscale values of all pixels.
[0014] A second aspect of this application provides a logging electrical imaging defect repair device, comprising: The preprocessing module is used to preprocess the obtained current well logging electrical imaging image; The mask creation module is used to create masks for missing areas in the pre-processed well logging electrical imaging image; The completion module is used to input the pre-processed well logging electrical imaging image and the mask into a pre-built completion model, fill in the missing areas in the well logging electrical imaging image, and output the well logging electrical imaging image after the missing areas are filled in. The completion model is obtained by training the initially constructed denoising diffusion probability model in stages. The stage training consists of pre-training the vector quantization variational autoencoder used for denoising inverse diffusion in the initially constructed denoising diffusion probability model and training the denoising diffusion probability model. Specifically, during the denoising and inverse diffusion process of the current iteration step, the non-missing regions in the denoised logging electrical imaging image are preserved through the mask to obtain a denoised image of the known region. The denoised image of the known region is used as a condition constraint for the denoising and inverse diffusion process of the current iteration step. The denoised logging electrical imaging image is obtained by performing a denoising and diffusion process with an iteration number of the first difference on the preprocessed logging electrical imaging image. The first difference is the difference between the total number of iterations in the denoising and diffusion process and the number of iterations in the denoising and inverse diffusion process including the current iteration step.
[0015] In a specific embodiment of this application, the known region noisy image is used as a conditional constraint for the denoising and inverse diffusion process of the current iteration step, including: The denoised image of the known region is fused with the denoised image of the missing region, and it is determined whether the current iteration step is the termination iteration step of the denoising inverse diffusion process. If so, the fused image is used as the output of the completion model; otherwise, the fused image is used as the input image of the denoising inverse diffusion of the next iteration step. The denoised image of the missing region is an image obtained by using the mask to retain only the missing region in the denoised image obtained by the current iteration step of denoising and inverse diffusion.
[0016] In a specific embodiment of this application, the vector quantization variational autoencoder used for denoising inverse diffusion within the pre-trained, initially constructed denoising diffusion probability model includes: The first training set was constructed based on historical well logging electrical imaging data; The vector quantization variational autoencoder is pre-trained using the first training set to obtain the codebook embedded between the encoder and decoder within the vector quantization variational autoencoder.
[0017] A third aspect of this application provides a computer device, comprising: The memory is configured to store instructions; and The processor is configured to retrieve the instructions from the memory and, when executing the instructions, to implement the well logging electrical imaging defect repair method according to the first aspect of this application.
[0018] A fourth aspect of this application provides a machine-readable storage medium storing instructions for causing a machine to perform the well logging electrical imaging defect repair method according to a first aspect of this application.
[0019] The above technical solution combines a denoising diffusion probability model, a vector quantization variational autoencoder, and prior knowledge of known regions based on the noisy image to achieve accurate filling of blank stripes in well logging electrical imaging data. Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description
[0020] The accompanying drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the following detailed description to explain the embodiments of this application, but do not constitute a limitation on the embodiments of this application. In the drawings: Figure 1 A flowchart illustrating a method for repairing missing logging electrical imaging according to an embodiment of this application is shown schematically. Figure 2 This schematically illustrates the two processes involved in the denoising diffusion probability model; Figure 3 The illustration shows the noisy images obtained by preprocessing the well logging electrical imaging image after 50, 100, 200, and 500 iteration steps, respectively, in a specific application. Figure 4 This diagram illustrates the process of fusing a noisy image of a known region with a denoised image of a missing region. Figure 5 This diagram illustrates the process of filling in missing parts using a completion model. Figure 6 This schematic diagram illustrates a block diagram of a well logging electrical imaging defect repair device according to an embodiment of this application; Figure 7 A schematic block diagram of a computer device according to an embodiment of this application is shown. Detailed Implementation
[0021] The specific embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the embodiments of this application.
[0022] If the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0023] According to research, a well logging image filling method and system based on a variable convolutional U-Net network was proposed in patent application No. 202111039793.4. The method mainly achieves the filling of blank strips in well logging images through the following steps: acquiring well logging electrical imaging images with repair needs based on well logging data, preprocessing them as images to be repaired; inputting the image to be repaired, combined with the corresponding mask image and random noise image, into an image filling network model based on a U-Net network encoder-decoder architecture; the image filling network model encodes and selectively decodes the data of the image to be repaired based on a preset network depth to obtain a filled well logging image. The image filling network model is constructed through model construction steps, based on a network of multi-convolutional combined layer encoder and multi-convolutional combined layer decoder, wherein the layers of the encoder and the layers of the decoder are connected by a connection strategy with attention mechanism constraints. However, due to the large scale variation of formation feature information in well logging electrical imaging, such as pores, natural fractures, and drilling-induced fractures, feature extraction algorithms such as U-Net will superimpose multiple convolutions and pooling when downsampling the image, resulting in the loss of spatial information. This is not conducive to feature extraction from well logging electrical imaging data and leads to poor repair of blank strips.
[0024] To overcome the above-mentioned defects, this application provides a method for repairing missing areas in well logging electrical imaging. This method repairs missing areas in well logging electrical imaging images in the following way: The obtained current well logging electrical imaging image is preprocessed, and a mask is made for the missing areas in the preprocessed well logging electrical imaging image; The pre-processed well logging electrical imaging image and the mask of the missing area are input into the pre-built completion model to fill the missing areas in the well logging electrical imaging image and output the well logging electrical imaging image after the missing areas are filled. The completion model is obtained by training the initially constructed denoising diffusion probability model in stages. The staged training includes pre-training the vector quantization variational autoencoder used for denoising inverse diffusion in the initially constructed denoising diffusion probability model, and training the denoising diffusion probability model as a whole after pre-training the vector quantization variational autoencoder. In the current iteration step, during the denoising and inverse diffusion process, the non-missing regions in the noisy logging electrical imaging image are preserved by using a mask of the missing regions in the preprocessed logging electrical imaging image, resulting in a noisy image of the known regions. This noisy image of the known regions is then used as a conditional constraint for the denoising and inverse diffusion process in the current iteration step. The noisy logging electrical imaging image is obtained by performing a denoising and diffusion process on the preprocessed logging electrical imaging image with an iteration number equal to the first difference. The first difference is the difference between the total number of iterations in the denoising and diffusion process and the number of iterations in the denoising and inverse diffusion process, including the current iteration step.
[0025] It's important to understand that the total number of iterations in the noise-adding diffusion process refers to the total number of iterations performed before denoising and inverse diffusion using a vector quantization variational autoencoder. After this total number of iterations, the resulting image approximates an isotropic Gaussian distribution. This approximate isotropic Gaussian distribution image will serve as the input image for the first iteration of the denoising and inverse diffusion process. The number of iterations in the denoising and inverse diffusion process, including the current iteration, refers to the total number of iterations included in the denoising and inverse diffusion process. The non-missing region in a well logging electrical imaging map refers to a known region in the well logging electrical imaging map. For example, the region containing each pixel in the data measured during formation microresistivity scanning imaging well logging is simply referred to as the known microscan data measurement region.
[0026] As described in the above embodiment, a denoising diffusion probability model and a vector quantization variational autoencoder are combined to complete missing regions. The vector quantization variational autoencoder is used for the denoising inverse diffusion process. This model, a feature quantization encoding model, discretizes the encoded image features into vectors using an embedded codebook. The decoder then upsamples the discretized vector space for output, making it applicable to formation features at various scales. Compared to deep learning models such as U-net, it significantly improves the generalization performance of feature extraction. Furthermore, the noisy image of the known region is used as a conditional constraint for the denoising inverse diffusion process, constraining the semantic information reasoning and reducing the prediction error of the known region in the completed well logging electrical imaging image. Based on this, this application combines a denoising diffusion probability model, a vector quantization variational autoencoder, and conditional constraints based on the noisy image of the known region to achieve accurate repair of well logging electrical imaging data with high precision.
[0027] Figure 1A flowchart illustrating a well logging electrical imaging defect repair method according to an embodiment of this application is shown schematically. Figure 1 As shown, the well logging electrical imaging missing data repair method may include steps 102 to 108. It should be understood that, in specific applications, the well logging electrical imaging missing data repair method may include all steps 102 to 108, or it may include only some of the steps.
[0028] Step 102: Obtain the current well logging electrical imaging map.
[0029] As is known, due to the limited size of the electrodes in current well logging electrical imaging instruments, it is impossible to completely cover the well perimeter. Therefore, the acquired well logging electrical imaging images contain missing areas. These missing areas appear as blank stripes in the well logging electrical imaging images, and are therefore also called blank stripes.
[0030] Step 104: Preprocess the acquired current well logging electrical imaging image.
[0031] Specifically, the original logging electrical imaging images acquired by the electrical imaging instrument need to be corrected and enhanced. The preprocessing methods used in this application combine the logging electrical imaging image correction and enhancement methods in the general embodiments. These image correction and enhancement methods are not described in detail in this embodiment.
[0032] As an example, preprocessing the obtained well logging electrical imaging image includes: image correction of the obtained well logging electrical imaging image, which includes at least one of acceleration correction, electrical equalization, and sawtooth correction.
[0033] For example, acceleration correction, electrical equalization, sawtooth correction, and dynamic enhancement image generation are performed on the obtained well logging electrical imaging images. The purpose is to correct the depth offset in the original well logging electrical imaging images and improve the image quality. It also improves the resolution of the formation features in the images to a certain extent, making the formation features more obvious.
[0034] As an improvement to the above embodiment, to avoid the influence of different color scales on image completion in subsequent steps, the preprocessing of the obtained well logging electrical imaging image also includes grayscale conversion. Grayscale conversion correspondingly reduces the computational load of subsequent image completion steps and improves the efficiency of image completion. Specifically, in one example, the obtained well logging electrical imaging image is preprocessed in the following way: The obtained well logging electrical imaging images are subjected to image correction, which includes acceleration correction, electrical equalization, and sawtooth correction. The image-corrected logging electrical imaging image is converted to grayscale.
[0035] Optionally, a weighted average empirical formula can be used for grayscale conversion. Image grayscale conversion using the weighted average empirical formula mainly includes the following process: for any pixel in the corrected well logging electrical imaging image, the RGB three-channel values of the pixel are weighted and summed to obtain the grayscale value; and a grayscale well logging electrical imaging image is generated based on the grayscale values of all pixels.
[0036] The empirical formula for weighted average is shown in Formula 1: (Formula 1); In Formula 1 above: The grayscale value of a pixel. , , These represent the R, G, and B pixel component values, i.e., the RGB three-channel values as mentioned earlier. It's important to understand that 0.299, 0.587, and 0.144 are empirical values and can be adjusted appropriately for specific applications.
[0037] Step 106: Create a mask for the missing areas in the pre-processed well logging electrical imaging image.
[0038] Step 108: Input the preprocessed well logging electrical imaging image and the mask of the missing area into the pre-built completion model, fill the missing area in the well logging electrical imaging image, and output the well logging electrical imaging image after the missing area is completed.
[0039] Specifically, in this application, the completion model is obtained by training the initially constructed denoising diffusion probability model in stages. Staged training refers to the sequential pre-training of the vector quantization variational autoencoder used for denoising inverse diffusion within the initially constructed denoising diffusion probability model, followed by training the denoising diffusion probability model itself. Furthermore, during the denoising inverse diffusion of the current iteration step, the non-missing regions in the noisy logging electrical imaging image are preserved using a mask of the missing regions, resulting in a noisy image of the known regions. This noisy image of the known regions is used as a conditional constraint for the denoising inverse diffusion process of the current iteration step. The noisy logging electrical imaging image is obtained by performing a denoising diffusion process with an iteration number equal to the first difference on the preprocessed logging electrical imaging image. The first difference is the difference between the total number of iterations in the denoising diffusion process and the number of iterations in the denoising inverse diffusion process, including the current iteration step. It is important to understand that the denoised logging electrical imaging image is obtained by performing a denoising diffusion process on the preprocessed logging electrical imaging image with the number of iterations equal to the first difference. This means that, as a conditional constraint for the denoising reverse diffusion process, the preprocessed logging electrical imaging image is denoised to obtain the denoised logging electrical imaging image. The denoising process is the same as the denoising diffusion process in the denoising diffusion probability model.
[0040] Vector Quantization Variational Autoencoders (VQ-VAEs), also known as VQ-VAE models, are discretized feature learning models. A VQ-VAE model consists of an encoder and a decoder, with an embedding layer between them. The embedding layer stores a codebook. The encoder generates embeddings, encoding features, and then selects the best approximation from the codebook of the embedding layer for a given embedding. The codebook consists of discrete vectors, and L2 distance is used for nearest neighbor lookup to obtain the discrete vector representation of the encoded features. This is then upsampled by the decoder. Pre-training the VQ-VAE allows for the generation of the embedding codebook between the encoder and decoder.
[0041] As an example, the denoising diffusion probability model can be the DDPM model, an improved diffusion model based on the DDPM principle, etc.
[0042] Figure 2 The diagram illustrates two processes involved in the denoising diffusion probability model: the noise-adding diffusion process and the denoising reverse diffusion process. The noise-adding diffusion process refers to the gradual addition of noise to the preprocessed well logging electrical imaging image until the image data becomes random noise. This process progressively adds Gaussian noise to the well logging electrical imaging image, repeating several times to generate a series of noisy image data until the image data is transformed into a nearly isotropic Gaussian distribution. At this point, the image data has completed the transformation from a well logging electrical imaging image to a noisy image. Figure 2 As shown, This represents the electrical logging image before noise was added. , , Let T be the noisy image obtained from the sequentially performed noisy diffusion iterations. Figure 2 The total number of iterations in the noise diffusion process is shown. The purpose of the denoising inverse diffusion process is to gradually restore the data distribution of the image before noise addition (i.e., the noisy image obtained after the noise diffusion process has completed all iterations) from the input noisy image of the vector quantization variational autoencoder through several iterations, thereby generating a new image. For example... Figure 2 As shown, Represents a noisy image. , , Let T be the denoised image obtained by sequential denoising and reverse diffusion. Figure 2 The total number of iterations in the denoising reverse diffusion process is shown. Figure 3 The illustration schematically shows, in a specific application example, noisy images obtained by preprocessing well logging electrical imaging maps after 50, 100, 200, and 500 iteration steps, respectively.
[0043] Combination Figure 2As shown, this application explains the noise addition diffusion principle and the noise inverse diffusion principle of the noise diffusion probability model.
[0044] The specific principle of noise diffusion is as follows: Given the well logging electrical imaging image to be repaired... Assume it follows a certain distribution ,Right now Gaussian noise is gradually added to the electrical logging images to be repaired, and the noise addition process continues. This process will produce multiple images containing noise, i.e. Among them, the current moment in the diffusion process. Output All of these are based on the previous moment. Output It is obtained by adding noise, which is a process of sampling a Gaussian distribution. Therefore, based on the previous time step... of The noise-added result at the current moment is obtained by sampling through the following data distribution: (Formula 2); Formula 2 above refers to... Transform into The sampling process follows a distribution. This distribution has a mean. for ,variance for Among them, the variance of the Gaussian distribution during noisy sampling. As a hyperparameter, it is set manually. It is a fixed value in the interval between 0 and 1, that is (Formula 3). As time progresses... The increase, Increment using a single strategy to satisfy At that moment Gradually increase, until a certain moment. of The noise diffusion process ends when the noise has been completely converted into random noise. Because during the forward diffusion process, at the current time... The state is only different from the previous moment Since the state is related, this process can be viewed as a Markov process, which can be expressed by the following formula: (Formula 4). The state can be determined from the initial time. The state is derived. This process involves continuously sampling from different Gaussian distributions. This sampling process is discrete and does not contain any gradient information, unlike directly applying gradients. Stepwise sampling prevents the denoising diffusion probability model from learning gradient information and updating parameters. Therefore, reparameterization is needed to sample the data, as shown in the following formula:
[0045]
[0046] (Formula 5); In formula five above, This is the sampling result at the current moment. and These are used to calculate the mean and standard deviation of the sampled reference distribution at the current time. This is random noise sampled from a standard Gaussian distribution with a mean of 0 and a standard deviation of 1. The reparameterization process occurs at the current time step. Sampling is performed from a standard Gaussian distribution, and then based on... and By translating and scaling the sampling result, the actual sampling data at the current moment can be obtained. This method can... Stepwise sampling to It can also preserve the parameter gradient information at the time of sampling. Let , Then at any time Based on The following formula can be used to obtain it: (Formula 6); As can be seen from Formula 6, when t When it approaches infinity, As the sampling results of the diffusion process approach 0, they gradually approach a standard normal distribution, that is, noise that follows a standard Gaussian distribution. Satisfying the mean is variance is The Gaussian distribution of is shown in the following equation: (Formula 7).
[0047] The principle of the denoising reverse diffusion process corresponding to the above noise-adding diffusion process is as follows. If the posterior conditional probability distribution is... Then a random noise input New conditions can be generated by iterating through this conditional probability distribution several times. .but Since it cannot be predicted in advance, it is necessary to utilize a weight parameter that can be updated. Vector quantization variational autoencoder to... The probability distribution to be simulated can be expressed by the following formula: (Formula 8); It is evident that the denoising inverse diffusion process can also be viewed as a Markov process; therefore, from random noise... Repeat the sampling process several times until a new sample is generated. The process can be described as follows: (Formula Nine); In Formula Nine above, For random noise that follows a standard Gaussian distribution, The Gaussian distribution simulated by the vector quantization variational autoencoder has the mean of this probability distribution. and variance It is obtained from a vector quantization variational autoencoder. Therefore, the learning objective of the vector quantization variational autoencoder is the posterior conditional probability distribution. ,because In reality, it is unknowable, but given the current moment... and the initial moment It can be found Therefore, vector quantization variational autoencoders are used to simulate posterior conditional probability distributions. ,and It can be represented as: (Formula 10); Simplifying formula ten, we get: (Formula Eleven); In formula eleven above, For about and The constant is negligible. Therefore, it can be seen from the above equation that... It is a function that follows the mean. variance is The Gaussian distribution, mean, and variance are shown in the following formula:
[0048] (Formula 12); In the above formula twelve, For random noise that follows a standard normal distribution, i.e. .
[0049] Specifically, in this application, the condition constraint of using the known region denoised image as the denoising inverse diffusion process of the current iteration step refers to: fusing the known region denoised image with the missing region denoised image, and determining whether the current iteration step is the terminating iteration step of the denoising inverse diffusion process. If so, the fused image is used as the output of the completion model; otherwise, the fused image is used as the input image of the denoising inverse diffusion of the next iteration step. The missing region denoised image is obtained by using a mask of the missing region to retain only the missing region in the denoised image obtained by the denoising inverse diffusion of the current iteration step.
[0050] It is important to understand that, as mentioned earlier, using a mask of the missing regions to preserve the non-missing regions in the noisy logging electrical imaging image to obtain a noisy image of the known regions specifically means multiplying the noisy logging electrical imaging image with the mask of the missing regions, and the result of the multiplication is the noisy image of the known regions. Using a mask of the missing regions to preserve only the missing regions in the denoised image obtained through the denoising and inverse diffusion of the current iteration step to obtain a denoised image of the missing regions specifically means multiplying the denoised image with the result of inverting the mask of the missing regions, and the result of the multiplication is the denoised image of the missing regions.
[0051] Figure 4 This schematically illustrates the process of fusing a noisy image of a known region with a denoised image of a missing region. The "Mask" refers to the mask used to represent the missing region. Specifically, the previous time step... The sampling consists of two parts. The first part involves sampling the known regions in the preprocessed well logging electrical imaging map of the input completion model. The result obtained after sampling, for example, assuming If the mask represents the missing region, then the sampling method for the first part is as follows:
[0052] (Formula Thirteen); In Formula 13 above: the preprocessed well logging electrical imaging image, which serves as the input image for the completion model, is then processed... Second sampling obtained This process is the same as the noise diffusion process; for With mask The multiplied image with added noise to the known region As the previous moment As a component of the sampling results, it provides some prior information, helping to complete the model to more effectively output and repair information related to the input image. Furthermore, the previous time step... Second part of the sampling output Prediction is performed using a vector quantization variational autoencoder, with the following distribution referenced during sampling:
[0053]
[0054]
[0055] (Formula Fourteen); In the above formula fourteen, To use a parameter renormalization method based on a normal distribution The results of the sampling, To input and the current moment The information is fed into the vector quantization variational autoencoder to obtain the prediction noise. To obey random noise, For hyperparameters, The previous iteration in the denoising and reverse diffusion process The recorded sampling results. After sampling is completed, It is calculated by the following formula: (Formula 15). Wherein, the previous moment... Second part of the sampling output For mask Perform the inverse operation and then sum The result of the multiplication is used to predict the data distribution in the missing regions, and finally... and Perform the addition operation to obtain the previous time step in the denoising and anti-diffusion process. The sampling prediction results are repeated until the desired result is obtained. ,at this time The completed well logging electrical imaging image after filling in the missing area.
[0056] As an optional embodiment of the above embodiments, the pre-training process of the initially constructed vector quantization variational autoencoder mainly includes: constructing a first training set based on historical well logging electrical imaging images, and then using the first training set to pre-train the initially constructed vector quantization variational autoencoder to obtain the codebook embedded between the encoder and decoder in the vector quantization variational autoencoder.
[0057] As an optional embodiment of the above embodiments, after pre-training the initially constructed vector quantization variational autoencoder to obtain the codebook, the training process of the denoising diffusion probability model mainly includes: The acquired historical well logging electrical imaging images are preprocessed, and a mask is made for the missing areas in the preprocessed historical well logging electrical imaging images. The preprocessed historical well logging electrical imaging image is input into a pre-built image inpainting model to fill the missing areas in the historical well logging electrical imaging image, generating a historical well logging electrical imaging image after the missing areas are filled. The image inpainting model type includes at least a generative adversarial model. A second training set was constructed using historical well logging electrical imaging images after filling in the missing areas as label data, and preprocessed historical well logging electrical imaging images and masks of the missing areas in the historical well logging electrical imaging images as input data. The second training set was used to train the denoised diffusion probability model after the vector quantization variational autoencoder was pretrained to obtain the complete model.
[0058] As is known, since most of the collected historical well logging electrical imaging images have missing regions, the training of the denoising diffusion probability model adopts a self-supervised training process, using pre-trained image restoration models such as generative adversarial models to generate labeled data for training the denoising diffusion probability model.
[0059] Based on the principles of noise diffusion and denoising inverse diffusion, the goal of training and optimizing the initially constructed denoising diffusion probability model is to achieve a Gaussian distribution. Obtained by vector quantization variational autoencoder The distributions should be as consistent as possible, so that the KL divergence between the two distributions is minimized as mentioned above. At this point, the loss function can be defined as:
[0060] (Formula Sixteen); In the above formula sixteen, Indicates the previous moment loss function, The current time predicted using a vector quantization variational autoencoder noise distribution, For the noise diffusion process at the current moment Generated random noise.
[0061] As an improvement to the above embodiments, this application proposes an improved definition of the loss function, expressed by the following formula: (Formula 17); In the above formula seventeen, The true value of the Gaussian noise distribution in the known region. The predicted value of the Gaussian noise distribution in the known area. This represents the true value of the Gaussian noise distribution in the missing region. The predicted value is the Gaussian noise distribution of the missing region. and These are the loss weights for the noise prediction process in the known and missing regions, respectively. Preferably, .
[0062] By using the improved loss function described above, the denoising diffusion probability model is trained with weighted attention to known and unknown regions, with a greater emphasis on known regions. This increases the generation loss penalty for known regions, thereby improving the prediction accuracy of the trained completion model. Figure 5 As shown, in a specific application, a schematic diagram illustrates the process of using a completion model to fill in missing parts, illustrating the following steps sequentially. The denoising results are shown in the figure. As can be seen from the figure, the completion model obtained after the loss function improvement has a better effect on filling the missing regions.
[0063] In summary, the completion model can learn the data distribution characteristics of known areas in a large number of well logging electrical imaging images with missing regions, perform high-quality data distribution fitting, and generate repair results that are more consistent with global semantic information through discrete vector image encoding based on vector quantization variational autoencoder. Using this application to repair well logging electrical imaging data of the entire well section can reduce the interpretation error of subsequent electrical imaging data and improve the work efficiency of interpreters.
[0064] Corresponding to the logging electrical imaging defect repair method in the above embodiments, Figure 6 The diagram illustrates the components of the logging electrical imaging defect repair device 500 provided in the embodiments of this application. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0065] like Figure 6 As shown, the well logging electrical imaging defect repair device 500 includes: Preprocessing module 510 is used to preprocess the obtained current well logging electrical imaging image; Masking module 520 is used to create masks for missing areas in the pre-processed logging electrical imaging image; The completion module 530 is used to input the pre-processed well logging electrical imaging image and the mask into a pre-built completion model, fill in the missing areas in the well logging electrical imaging image, and output the well logging electrical imaging image after the missing areas are filled. The completion model is obtained by training the initially constructed denoising diffusion probability model in stages. The stage training consists of pre-training the vector quantization variational autoencoder used for denoising inverse diffusion in the initially constructed denoising diffusion probability model and training the denoising diffusion probability model. Specifically, during the denoising and inverse diffusion process of the current iteration step, the non-missing regions in the denoised logging electrical imaging image are preserved through the mask to obtain a denoised image of the known region. The denoised image of the known region is used as a condition constraint for the denoising and inverse diffusion process of the current iteration step. The denoised logging electrical imaging image is obtained by performing a denoising and diffusion process with an iteration number of the first difference on the preprocessed logging electrical imaging image. The first difference is the difference between the total number of iterations in the denoising and diffusion process and the number of iterations in the denoising and inverse diffusion process including the current iteration step.
[0066] As an embodiment of this application, the well logging electrical imaging defect repair device 500 can achieve the following: Figure 1 The embodiments shown are as well as other related method embodiments in this application.
[0067] The process by which each module in the well logging electrical imaging defect repair device 500 provided in this application implements its respective function can be specifically referred to the foregoing. Figure 1 The descriptions of the embodiments shown and other related method embodiments are not repeated here.
[0068] It should be noted that the information interaction and execution process between the above modules are based on the same concept as the method embodiments of this application. Their specific functions and technical effects can be found in the method embodiments section, and will not be repeated here. Furthermore, all of the above modules can be applied to computing devices that include memory and a processor.
[0069] Figure 7 A schematic block diagram of a computer device according to an embodiment of the present application is shown. In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown below. Figure 7 As shown in the figure, the computer device includes a processor A01, a network interface A02, a display screen A04, an input device A05, and a memory (not shown) connected via a system bus. The processor A01 provides computing and control capabilities. The memory includes internal memory A03 and a non-volatile storage medium A06. The non-volatile storage medium A06 stores an operating system B01 and a computer program B02. The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 stored in the non-volatile storage medium A06. The network interface A02 is used for communication with external terminals via a network connection. When the computer program is executed by the processor A01, it implements a method for repairing defects in well logging electrical imaging. The display screen A04 can be a liquid crystal display (LCD) or an e-ink display. The input device A05 can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0070] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0071] In one embodiment, the logging electrical imaging defect repair device 500 provided in this application can be implemented as a computer program, and the computer program can be implemented in, for example... Figure 7 The system runs on the computer device shown. The computer device's memory can store various program modules that constitute the well logging electrical imaging defect repair apparatus 500. The computer program, composed of these program modules, causes the processor to execute the steps in the well logging electrical imaging defect repair methods of the various embodiments of this application described in this specification.
[0072] In one embodiment, this application also provides a machine-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the well logging electrical imaging defect repair method in the above embodiments.
[0073] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0074] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0075] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for repairing missing data in well logging electrical imaging, characterized in that, include: The obtained current well logging electrical imaging image is preprocessed, and a mask is made for the missing areas in the preprocessed well logging electrical imaging image; The pre-processed well logging electrical imaging image and the mask are input into a pre-built completion model to fill in the missing areas in the well logging electrical imaging image, and the well logging electrical imaging image with the missing areas filled is output. The completion model is obtained by training the initially constructed denoising diffusion probability model in stages. The stage training consists of pre-training the vector quantization variational autoencoder used for denoising inverse diffusion in the initially constructed denoising diffusion probability model and training the denoising diffusion probability model. Specifically, during the denoising and inverse diffusion process of the current iteration step, the non-missing regions in the denoised logging electrical imaging image are preserved through the mask to obtain a denoised image of the known region. The denoised image of the known region is used as a condition constraint for the denoising and inverse diffusion process of the current iteration step. The denoised logging electrical imaging image is obtained by performing a denoising and diffusion process with an iteration number of the first difference on the preprocessed logging electrical imaging image. The first difference is the difference between the total number of iterations in the denoising and diffusion process and the number of iterations in the denoising and inverse diffusion process including the current iteration step.
2. The method for repairing missing logging electrical imaging defects according to claim 1, characterized in that, The known region with added noise is used as a conditional constraint for the denoising and inverse diffusion process in the current iteration step, including: The denoised image of the known region is fused with the denoised image of the missing region, and it is determined whether the current iteration step is the termination iteration step of the denoising inverse diffusion process. If so, the fused image is used as the output of the completion model; otherwise, the fused image is used as the input image of the denoising inverse diffusion of the next iteration step. The denoised image of the missing region is an image obtained by using the mask to retain only the missing region in the denoised image obtained by the current iteration step of denoising and inverse diffusion.
3. The method for repairing missing logging electrical imaging defects according to claim 1, characterized in that, The mask is used to preserve non-missing regions in the noisy logging electrical imaging image, resulting in a noisy image of the known region, including: The noisy logging electrical imaging image is multiplied with the mask, and the result of the multiplication is used as the noisy image of the known area.
4. The method for repairing missing logging electrical imaging defects according to claim 2, characterized in that, The mask is used to preserve only the missing regions in the denoised image obtained by the current iteration's inverse diffusion, resulting in a denoised image of the missing regions, including: Invert the mask to obtain the reverse mask; The denoised image obtained by the denoising inverse diffusion in the current iteration step is multiplied with the anti-mask, and the result of the multiplication is used as the denoised image of the missing region.
5. The method for repairing missing logging electrical imaging defects according to claim 1, characterized in that, The vector quantization variational autoencoder used for denoising inverse diffusion within the pre-trained, initially constructed denoising diffusion probability model includes: The first training set was constructed based on historical well logging electrical imaging data; The vector quantization variational autoencoder is pre-trained using the first training set to obtain the codebook embedded between the encoder and decoder within the vector quantization variational autoencoder.
6. The method for repairing missing logging electrical imaging defects according to claim 1, characterized in that, Training the denoising diffusion probability model includes: The acquired historical well logging electrical imaging images are preprocessed, and a mask is made for the missing areas in the preprocessed historical well logging electrical imaging images. The pre-processed historical well logging electrical imaging image is input into a pre-constructed image restoration model to fill in the missing areas in the historical well logging electrical imaging image, generating a historical well logging electrical imaging image after the missing areas are filled in. The image restoration model includes at least a generative adversarial model. A second training set is constructed using historical well logging electrical imaging images after filling in the missing areas as label data, and preprocessed historical well logging electrical imaging images and masks of the missing areas of historical well logging electrical imaging images as input data. The second training set is used to train the denoised diffusion probability model after the vector quantization variational autoencoder is pretrained to obtain the complete model.
7. The method for repairing missing logging electrical imaging defects according to claim 1, characterized in that, The loss function for training the denoising diffusion probability model is the weighted sum of the first loss value and the second loss value; Wherein, the first loss value is the error between the true value of the Gaussian noise distribution in the non-missing region of the well logging electrical imaging image and the predicted value of the Gaussian noise distribution in the missing region of the well logging electrical imaging image; the second loss value is the error between the true value of the Gaussian noise distribution in the missing region of the well logging electrical imaging image and the predicted value of the Gaussian noise distribution in the missing region of the well logging electrical imaging image; the weight of the first loss value is greater than the weight of the second loss value.
8. The method for repairing missing logging electrical imaging defects according to claim 1, characterized in that, The obtained well logging electrical imaging images are preprocessed, including: The obtained well logging electrical imaging image is subjected to image correction, which includes at least one of acceleration correction, electrical equalization, and sawtooth correction.
9. The method for repairing missing logging electrical imaging defects according to claim 1, characterized in that, The obtained well logging electrical imaging images are preprocessed, including: The obtained well logging electrical imaging image is subjected to image correction, which includes at least one of acceleration correction, electrical equalization, and sawtooth correction. The well logging electrical imaging image obtained after image correction is converted to grayscale.
10. The method for repairing missing logging electrical imaging defects according to claim 9, characterized in that, The well logging electrical imaging image obtained after image correction is converted to grayscale, including: For any pixel in the well logging electrical imaging image obtained after image correction, the RGB three-channel values of the pixel are weighted and summed to obtain the gray value; A grayscale logging electrical imaging map is generated based on the grayscale values of all pixels.
11. A well logging electrical imaging defect repair device, characterized in that, include: The preprocessing module is used to preprocess the obtained current well logging electrical imaging image; The mask creation module is used to create masks for missing areas in the pre-processed well logging electrical imaging image; The completion module is used to input the pre-processed well logging electrical imaging image and the mask into a pre-built completion model, fill in the missing areas in the well logging electrical imaging image, and output the well logging electrical imaging image after the missing areas are filled in. The completion model is obtained by training the initially constructed denoising diffusion probability model in stages. The stage training consists of pre-training the vector quantization variational autoencoder used for denoising inverse diffusion in the initially constructed denoising diffusion probability model and training the denoising diffusion probability model. Specifically, during the denoising and inverse diffusion process of the current iteration step, the non-missing regions in the denoised logging electrical imaging image are preserved through the mask to obtain a denoised image of the known region. The denoised image of the known region is used as a condition constraint for the denoising and inverse diffusion process of the current iteration step. The denoised logging electrical imaging image is obtained by performing a denoising and diffusion process with an iteration number of the first difference on the preprocessed logging electrical imaging image. The first difference is the difference between the total number of iterations in the denoising and diffusion process and the number of iterations in the denoising and inverse diffusion process including the current iteration step.
12. The logging electrical imaging defect repair device according to claim 11, characterized in that, The known region with added noise is used as a conditional constraint for the denoising and inverse diffusion process in the current iteration step, including: The denoised image of the known region is fused with the denoised image of the missing region, and it is determined whether the current iteration step is the termination iteration step of the denoising inverse diffusion process. If so, the fused image is used as the output of the completion model; otherwise, the fused image is used as the input image of the denoising inverse diffusion of the next iteration step. The denoised image of the missing region is an image obtained by using the mask to retain only the missing region in the denoised image obtained by the current iteration step of denoising and inverse diffusion.
13. The logging electrical imaging defect repair device according to claim 11, characterized in that, The vector quantization variational autoencoder used for denoising inverse diffusion within the pre-trained, initially constructed denoising diffusion probability model includes: The first training set was constructed based on historical well logging electrical imaging data; The vector quantization variational autoencoder is pre-trained using the first training set to obtain the codebook embedded between the encoder and decoder within the vector quantization variational autoencoder.
14. A computer device, characterized in that, include: The memory is configured to store instructions; as well as The processor is configured to retrieve the instructions from the memory and, when executing the instructions, to implement the logging electrical imaging defect repair method according to any one of claims 1 to 10.
15. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores instructions for causing the machine to perform the logging electrical imaging defect repair method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Well logging image filling method and system based on deformable convolution U-Net network
CN115775288A