Three-dimensional digital core generation method
Through the combination of CSAUnet and DDIM diffusion models, the problems of long time, high cost and low accuracy of digital core generation in the prior art are solved, and efficient and high-precision three-dimensional digital core generation is achieved, especially in complex geological feature simulations, which show higher adaptability and accuracy.
Patent Information
- Application Number
- CN202510745387.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-06-05
AI Technical Summary
When the existing digital core generation method simulates the connection between rock microstructure, nano-scale pores and pores, it has problems such as long time, high cost and low accuracy, especially in the modeling of complex geological features, it is difficult to meet the needs of high efficiency and high accuracy.
The CSAUnet model is used to combine the DDIM diffusion model, and the noise data and geological conditions are processed through the dual-channel convolution block, downsampling module, upsampling module and convolution module. The self-attention mechanism and weighted loss function optimization generation process are used to gradually denoise to generate the target three-dimensional digital core image.
The generated digital core images can accurately simulate the internal porosity and stratigraphic structure of the core, improving the simulation accuracy of complex geological characteristics, especially in the capture of fine pores and stratigraphic structures, reducing noise interference and improving the quality of details recovery.
Smart Images

Figure CN120279192A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the technical field of digital core, and in particular, to a method for generating a three-dimensional digital core. Background Art
[0002] With the continuous development of oil and gas exploration and development, digital core technology, as a key tool, plays an important role in oil and gas field development, reservoir evaluation, fluid simulation, etc. Digital cores simulate the microscopic structure, porosity, formation characteristics, etc. of rocks through high-precision three-dimensional modeling and simulation technologies, providing real and reliable digital support for oil and gas exploration. Existing digital core generation methods mostly use means such as CT scanning and nuclear magnetic resonance imaging (NMR) to collect core image data, and then perform modeling and reconstruction through image processing algorithms. However, traditional digital core generation methods still face many challenges, such as long time, high cost, low generation accuracy, etc. Especially when meticulously simulating the microscopic structure of rocks, nanoscale pores, and the connections between pores, existing technologies often struggle to meet the requirements of high precision and high efficiency.
[0003] For example, the patent "A Digital Core Construction Method and System for Simulating Nanometer and Micrometer Pores in Shale Matrix" (Patent No. CN 115115783B) proposes a digital core construction method based on a dual discriminator generative adversarial network (GAN). By CT scanning shale matrix core data, a training dataset is obtained after preprocessing, and a generative adversarial network is used for training to generate a high-precision three-dimensional digital core. This method optimizes the generation process by introducing a dual discriminator, overcoming the time and cost problems of traditional methods in constructing digital cores and significantly improving the three-dimensional reconstruction accuracy of nanoscale pores in shale matrix. However, the GAN method is often troubled by problems such as unstable training and mode collapse, and there are certain limitations in capturing the detailed features of rocks and pore structures.
[0004] In addition, the patent "A Multi-Condition Constrained Three-Dimensional Digital Core Generation Method Based on a Diffusion Model" (Patent No. CN117830510B) adopts a multi-condition constrained generation method based on a 3DUnet network. This method obtains multiple three-dimensional digital core samples and their label information, and uses various geological conditions (such as porosity, pore size standard deviation, etc.) to train the generation model, thereby generating a three-dimensional digital core with high fidelity under multiple condition constraints. This method can truly restore the internal pore structure of rocks and improve the quality of the generated cores. However, although the 3DUnet method performs well in processing high-dimensional images, it still faces difficulties in modeling complex geological features (such as bedding structure, pore distribution, etc.), and its performance in noise suppression and refined modeling is still limited.
[0005] Therefore, it is necessary to improve one or more problems existing in the above-related technical solutions.
[0006] It should be noted that this part aims to provide background or context for the technical solutions of the present disclosure stated in the claims. The description herein is not admitted to be prior art merely because it is included in this part. Summary of the Invention
[0007] The purpose of the embodiments of the present disclosure is to provide a method for generating a three-dimensional digital core, thereby at least to some extent overcoming one or more problems caused by the limitations and defects of the related art.
[0008] According to an embodiment of the present disclosure, there is provided a method for generating a three-dimensional digital core, the method comprising: Inputting noise data and geological conditions into a trained CSAUnet model for processing; wherein, the CSAUnet model includes a dual-channel convolutional block, a downsampling module, an upsampling module, a dual attention module, and a convolutional module; The dual-channel convolutional block extracts the features of the noise data to obtain an initial feature map; The downsampling module performs three downsampling operations on the initial feature map, and then processes it using the dual attention module to obtain a first feature image block, a second feature image block, and a third feature image block respectively; wherein, each downsampling operation is processed using two first double convolutional blocks, and then auxiliary features such as time embedding, porosity information, and lithology category are introduced for integration; The upsampling module performs three upsampling operations on the third feature image block. Each upsampling operation is processed using two second double convolutional blocks, and then auxiliary features such as time embedding, porosity information, and lithology category are introduced, and after being spliced and fused with the first feature image block and the second feature image block, it is processed using the dual attention module to obtain a fused feature; The convolutional module processes the fused feature to generate an initial three-dimensional digital core image; Using the DDIM diffusion model to gradually denoise the noise in the initial three-dimensional digital core image to generate a denoised target three-dimensional digital core image.
[0009] Further, the downsampling module includes a first downsampling block, a second downsampling block, and a third downsampling block, and the upsampling module includes a first upsampling block, a second upsampling block, and a third upsampling block.
[0010] Further, in the step where the downsampling module performs three downsampling operations on the initial feature map and then processes it using the dual attention module to obtain a first feature image block, a second feature image block, and a third feature image block respectively, it includes: The first downsampling block performs a downsampling operation on the initial feature map. After two 3D convolutions and three activation functions in two first double convolutional blocks, a 3D max pooling operation is carried out. At the same time, auxiliary features of time embedding, porosity information, and lithology categories are introduced and processed using a dual attention module to obtain a first feature image block with a size of 40×40×40 and 16 channels. The second downsampling block performs a downsampling operation on the first feature image block. After two 3D convolutions and three activation functions in two first double convolutional blocks, a 3D max pooling operation is carried out. At the same time, auxiliary features of time embedding, porosity information, and lithology categories are introduced and processed using a dual attention module to obtain a second feature image block with a size of 20×20×20 and 32 channels. The third downsampling block performs a downsampling operation on the second feature image block. After two 3D convolutions and three activation functions in two first double convolutional blocks, a 3D max pooling operation is carried out. At the same time, auxiliary features of time embedding, porosity information, and lithology categories are introduced and processed using a dual attention module to obtain a target feature image block with a size of 10×10×10 and 128 channels.
[0011] Further, the upsampling module performs three upsampling operations on the third feature image block. Each upsampling operation is processed using two second double convolutional blocks, then auxiliary features of time embedding, porosity information, and lithology categories are introduced. After splicing and fusing with the first feature image block and the second feature image block and processing using a dual attention module to obtain the fused features, it includes: The first upsampling block performs an upsampling operation on the third feature image block. After two 3D convolutions and three activation functions in two second double convolutional blocks, a linear interpolation operation is carried out. At the same time, auxiliary features of time embedding, porosity information, and lithology categories are introduced and processed using a dual attention module to obtain a first fused feature image block with a size of 20×20×20 and 32 channels. The second upsampling block performs an upsampling operation on the first fused feature image block. After two 3D convolutions and three activation functions in two second double convolutional blocks, a linear interpolation operation is carried out. At the same time, auxiliary features of time embedding, porosity information, and lithology categories are introduced. After splicing and fusing with the second feature image block and processing using a dual attention module to obtain a second fused feature image block with a size of 40×40×40 and 16 channels. The third upsampling block performs an upsampling operation on the second fused feature image block. After two three-dimensional convolutions and three activation functions in two second double convolutional blocks, a linear interpolation operation is performed. At the same time, auxiliary features of time embedding, porosity information, and lithology categories are introduced. After splicing and fusing with the first feature image block, it is processed using a dual attention module to obtain a fused feature with a size of 80×80×80 and 8 channels.
[0012] Further, in the step of the convolutional module processing the fused feature to generate the initial three-dimensional digital core image, it includes: The convolutional module performs a convolution operation with a kernel size of 1×1×1 on the fused feature with a size of 80×80×80 and 8 channels to obtain an initial three-dimensional digital core image with a size of 80×80×80 and 1 channel.
[0013] Further, in the step of using the DDIM diffusion model to gradually denoise the initial three-dimensional digital core image to generate the denoised target three-dimensional digital core image, it includes: Use the DDIM diffusion model to sample the initial three-dimensional digital core image; By iteratively applying the denoising equation, generate a real image from the noise and optimize it through conditional control to generate the target three-dimensional digital core image:
[0014] Among them, is the sample at time t, represents the category conditional information, represents the porosity conditional information, is the parameter for controlling the noise diffusion degree at time t, is the parameter for controlling the noise diffusion degree at time t - 1, is the noise function, is the cumulative product of, is the cumulative product of.
[0015] Further, the method further includes: Obtain the original real core image and perform preprocessing to obtain a three-dimensional core dataset; Construct a digital core generation model according to the CSAUnet model and the DDIM diffusion model; Input the three-dimensional core dataset and the corresponding geological conditions into the digital core generation model for training, and introduce a weighted loss function during the training process to obtain a trained digital core generation model.
[0016] Further, the weighted loss function is:
[0017] Among them, is the pixel value in the generated image, is the pixel value in the real image, N is the total number of pixels in the image, is the weighting factor:
[0018] Among them, is the geological feature weight, is the noise weight, is the first hyperparameter, is the second hyperparameter.
[0019] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: In the embodiments of the present disclosure, through the above three-dimensional digital core generation method, on the one hand, by obtaining the three-dimensional digital data of the real core and preprocessing it, a core training data set is obtained; based on the generation model architecture of the DDIM diffusion model and CSAUnet, a digital core generation model is constructed, and by inputting the training data set for training, the network parameters are gradually optimized, and finally the optimal model is obtained. During the generation process, by inputting noise and geological condition information, a target digital core image that conforms to the target geological features is generated; the generated target digital core image has the geological features and visual effects of the real core, and can accurately simulate the porosity and bedding structure inside the core. On the other hand, by using the self-attention mechanism of the DDIM model and CSAUnet model, the geological features in the core can be restored more finely, including porosity, pore distribution, and rock type, etc. Especially in capturing complex bedding structures and subtle geological features, the generation accuracy is significantly improved. By introducing an enhanced MSE loss function with noise level and geological feature weighting factors, the noise processing process is further optimized, reducing the interference of noise on the core image generation, and at the same time improving the quality of detail restoration. Especially when simulating subtle pore structures and tiny geological differences, the effect is more significant. Combining the advantages of the DDIM model and CSAUnet model enables the model to generate more accurate three-dimensional digital cores under complex geological conditions, especially in the simulation of complex geological features such as bedding structures and micro-pores, showing higher adaptability and generation accuracy. Description of the Drawings
[0020] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.
[0021] Figure 1 A step diagram showing a method for generating a three-dimensional digital core in an exemplary embodiment of the present disclosure; Figure 2 A specific flowchart showing a method for generating a three-dimensional digital core in an exemplary embodiment of the present disclosure; Figure 3 A three-dimensional example diagram of a digital core sample in an exemplary embodiment of the present disclosure; Figure 4 A sample porosity distribution diagram in an exemplary embodiment of the present disclosure; Figure 5 A structural diagram showing the CSAUNet model in an exemplary embodiment of the present disclosure; Figure 6 A structural diagram showing the double convolution module in an exemplary embodiment of the present disclosure; Figure 7 A structural diagram showing the double attention module in an exemplary embodiment of the present disclosure; Figure 8 A structural diagram showing the downsampling module in an exemplary embodiment of the present disclosure; Figure 9 A structural diagram showing the upsampling module in an exemplary embodiment of the present disclosure; Figure 10 A fully convolutional self-attention network in an exemplary embodiment of the present disclosure; Figure 11 A training loss curve showing the CSAUnet model in an exemplary embodiment of the present disclosure; Figure 12 A two-dimensional slice showing a real sample and generated carbonate and sandstone cores in an exemplary embodiment of the present disclosure; Figure 13 A comparison diagram showing real samples, digital core samples generated by CGAN and DDIM in an exemplary embodiment of the present disclosure; Figure 14 A comparison diagram showing a DDIM-generated sample and a real sample of the pore space of carbonate rock in an exemplary embodiment of the present disclosure; Figure 15 A comparison diagram showing a DDIM-generated sample and a real sample of the pore space of sandstone in an exemplary embodiment of the present disclosure. Detailed implementation manners
[0022] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments.
[0023] In addition, the accompanying drawings are only schematic illustrations of the embodiments of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities.
[0024] A three-dimensional digital core generation method is provided in this example embodiment. Referring to Figure 1 as shown, the three-dimensional digital core generation method may include: Step S101: Inputting noise data and geological conditions into a trained CSAUnet model for processing; wherein, the CSAUnet model includes a dual-channel convolutional block, a downsampling module, an upsampling module, a dual-attention module, and a convolutional module; Step S102: The dual-channel convolutional block extracts features of the noise data to obtain an initial feature map; Step S103: The downsampling module performs three downsampling operations on the initial feature map, and then processes it using the dual-attention module to obtain a first feature image block, a second feature image block, and a third feature image block respectively; wherein, each downsampling operation is processed using two first double convolutional blocks, and then auxiliary features such as time embedding, porosity information, and lithology category are introduced for integration; Step S104: The upsampling module performs three upsampling operations on the third feature image block. Each upsampling operation is processed using two second double convolutional blocks, and then auxiliary features such as time embedding, porosity information, and lithology category are introduced, and after being spliced and fused with the first feature image block and the second feature image block, it is processed using the dual-attention module to obtain a fused feature; Step S105: The convolutional module processes the fused feature to generate an initial three-dimensional digital core image; Step S106: Using the DDIM diffusion model to gradually denoise the noise in the initial three-dimensional digital core image to generate a denoised target three-dimensional digital core image.
[0025] Through the above three-dimensional digital core generation method, on the one hand, by obtaining the three-dimensional digital data of the real core and preprocessing it, a core training data set is obtained; based on the generation model architecture of the DDIM diffusion model and CSAUnet, a digital core generation model is constructed, and through inputting the training data set for training, the network parameters are gradually optimized, and finally the optimal model is obtained. During the generation process, by inputting noise and geological condition information, a target digital core image that conforms to the target geological characteristics is generated; the generated target digital core image has the geological characteristics and visual effects of the real core, and can accurately simulate the internal porosity and bedding structure of the core. On the other hand, by adopting the self-attention mechanism of the DDIM model and CSAUnet model, the geological characteristics in the core can be restored more precisely, including porosity, pore distribution, and rock type, etc. Especially in capturing complex bedding structures and subtle geological characteristics, the generation accuracy is significantly improved. By introducing an enhanced MSE loss function with noise level and geological feature weighting factors, the noise processing process is further optimized, reducing the interference of noise on the core image generation, and at the same time improving the quality of detail restoration. Especially when simulating subtle pore structures and tiny geological differences, the effect is more significant. Combining the advantages of the DDIM model and CSAUnet model enables the model to generate more accurate three-dimensional digital cores under complex geological conditions, especially in the simulation of complex geological characteristics such as bedding structures and micro pores, showing higher adaptability and generation accuracy.
[0026] Next, with reference to Figures 1 to 15 each step of the above three-dimensional digital core generation method in the present exemplary embodiment will be described in more detail.
[0027] In one embodiment, as Figure 2 shown, it is a specific flowchart of the three-dimensional digital core generation method.
[0028] 1. Obtain the original image of the real core obtained by CT scanning, and through preprocessing, obtain a three-dimensional core data set.
[0029] Specifically, obtain the original image from the existing three-dimensional digital core data set and perform binarization processing; use the Otsu method to determine the optimal threshold by analyzing the gray histogram of the image, and calculate the porosity of the core image; introduce different degrees of noise into the data set while marking the rock type.
[0030] More specifically, the three-dimensional core data set used in this embodiment is the Digital Core Super-Resolution Data Set 1 (DRSRD1), which contains 2,000 high-resolution micro-CT three-dimensional images, covering Bentheimer sandstone and Estaillades carbonate rock. The resolution of the sandstone image is 3.8 microns, and the resolution of the carbonate rock image is 3.1 microns, which can display complex pore structures. AsFigure 3 As shown, sandstone is mainly composed of quartz sand grains, contains a small amount of feldspar and rock debris, and has good porosity and permeability; carbonate rock is a calcareous single-mineral rock with two types of porosity, macro-pores and micro-pores. The image provides three-phase segmentation data, including pore voxels, unresolved voxels, and solid voxels.
[0031] The image porosity is obtained through binarization and subsequent calculations. The Otsu method is used to automatically calculate the optimal threshold to divide the core image into pore part and solid part. The pixel ratio of the pore part in the binarized image is calculated to obtain the porosity value. According to the calculation, the porosity of carbonate rock samples in the dataset ranges from 13% to 35%, and the porosity of sandstone samples ranges from 14% to 32%, as Figure 4 shown.
[0032] To increase the diversity of the dataset, data augmentation technology is used to rotate the images, expanding the three-dimensional core dataset to 8000 samples to improve the robustness of the model on core images at different angles.
[0033] 2. The digital core generation model framework is based on the CSAUnet architecture, combining the feature extraction ability of the UNet structure and the detail optimization function of the self-attention mechanism; among them, the UNet structure captures the spatial hierarchical features of the image through the encoder-decoder architecture and restores the image details through skip connections; the self-attention mechanism uses a fully convolutional self-attention network to optimize feature focusing and detail extraction, improving the accuracy and fineness during the denoising process.
[0034] In this embodiment, a three-dimensional digital core generation model framework based on CSAUnet is constructed. This framework learns features from the preprocessed core data and optimizes the denoising ability. The model architecture is based on the traditional UNet structure and combines the self-attention mechanism to improve the performance of the model when processing long-sequence inputs, especially enhancing the ability to identify and focus on important features during the denoising process. As Figure 5 shown, the model predicts and removes noise based on conditions such as time, category, and porosity. Specifically as follows: First, the core image Xt with a size of 1×80×80×80 is input into the double-channel convolutional block DoubleConvBlock (i.e., the double-channel convolutional block) to extract the initial feature map, and the number of channels is gradually reduced to 8.
[0035] Through three layers of downsampling blocks DownBlock (i.e., the downsampling module), each layer contains a double convolution or attention block, respectively extracting the first feature image block, the second feature image block, and the third feature image block, and the output channels are sequentially increased to 16→32→64→128, and the spatial size is reduced to 80×80×80→40×40×40→20×20×20→10×10×10; In each downsampling stage, auxiliary features such as temporal embeddings, porosity information, and lithology categories are introduced, and after being embedded by an MLP and concatenated, the feature representation ability is enhanced. After the deepest convolution, an upsampling block UpBlock (i.e., the upsampling module) is used for decoding and reconstruction. The number of channels is gradually restored to 128→64→32→16, and the spatial dimensions are gradually enlarged to 10×10×10→20×20×20→40×40×40→80×80×80. In each upsampling block, skip connection features from the corresponding layer of the downsampling block are received, and feature concatenation and fusion are performed. At the end of the decoding path, a 1×1×1 convolution is used to generate the predicted "noise" map, which has the same size as the input, 1×80×80×80, and is used to guide the noise estimation in the diffusion process.
[0036] As Figures 6 to 9 shown, it is the structure diagram of the main functional units in the CSAUnet model; among them, Figure 6 is the structure diagram of the double convolution module; Figure 7 is the structure diagram of the double attention module; Figure 8 is the structure diagram of the downsampling module; Figure 9 is the structure diagram of the upsampling module.
[0037] Specifically, a) The double convolution module (DoubleConvBlock), consisting of two groups of Conv3d + GroupNorm + ReLU, is responsible for local feature extraction.
[0038] b) The double attention module (DoubleAttentionBlock) contains two layers of ConvAttentionBlock + ConvBlock, introducing a spatial attention mechanism to enhance information selectivity.
[0039] c) The downsampling module (DownBlock) encodes the input features after fusing them with information such as time, porosity, and category. First, it passes through the SiLU activation and then enters the fully connected layer and broadcasts, and is concatenated to the input features and then enters two convolution modules.
[0040] d) The upsampling module (UpBlock) not only receives the feature map from the previous step but also fuses the skip connection features Xdown from the downsampling path. At the same time, after concatenating all the embedded information with the skip features, they are all input into two consecutive convolution blocks to achieve the reconstruction of high-resolution features.
[0041] To improve the precision of denoising, the model not only relies on the basic convolutional network structure but also adopts an improved self-attention mechanism. As Figure 10As shown, the traditional self-attention mechanism is improved into a fully convolutional self-attention network, enabling the model to flexibly learn complex features in long time series and enhancing the ability of feature focusing.
[0042] 3. Input the preprocessed core dataset and geological condition information into the generated CSAUnet model for model training. The training process includes: 3-1. Input the preprocessed core dataset and the corresponding geological condition information into the generated model, and at the same time add noise data to enhance the robustness of training; among them, the geological condition information includes: rock type and porosity. 3-2. Set the training parameters, including learning rate, batch size, number of training epochs, and the input noise size and output image size matching the generation task of the model; the parameter settings in this embodiment are shown in Table 1.
[0043] Table 1 Training parameter settings
[0044] 3-3. In the CSAUnet module, use the fully convolutional architecture and self-attention mechanism to extract geological features and bedding structures from the input data to optimize the input data, accurately remove noise and enhance image details. 3-4. Introduce a weighted loss function to optimize the training process of the model by minimizing the difference between the generated image and the real image through weighting. The formula is as follows:
[0045] Among them, is the pixel value in the generated image, is the pixel value in the real image, and N is the total number of pixels in the image; is the weighting factor, which is weighted by combining the noise level and geological features. The calculation formula is as follows:
[0046] Among them, represents the geological feature weight; represents the noise weight; and are hyperparameters for adjusting the importance of geological features and noise, used to balance the influence of both on the weighted loss function.
[0047] 3-5. Through backpropagation and gradient update, gradually adjust the model parameters to make the generated noise prediction result closer to the target denoised image until the model converges.
[0048] After training, the model finally converges successfully, as shown in Figure 11As shown, CSAUnet successfully reduced the MSE loss to approximately 0.026, achieving a relatively accurate benchmark and laying the foundation for subsequent DDIM iterative generation.
[0049] 4. Input the noise data and geological conditions into the trained CSAUnet model, and use the DDIM sampling method for step-by-step denoising to generate the denoised target three-dimensional digital core image.
[0050] The denoising process generates a real image from the noise by iteratively applying the denoising equation and further optimizes the generation result through conditional control. The specific formula is:
[0051] where, is the sample at time t, represents the class conditional information, represents the porosity conditional information, is the parameter controlling the noise diffusion degree, is the noise function, which gradually removes the noise and restores the core structure features.
[0052] In this embodiment, the CSAUnet model is used for the iterative denoising process (DDIM) to generate three-dimensional digital cores of two rock types. The two-dimensional slice images are as Figure 12 shown. Compared with the images generated by the traditional generative adversarial network (CGAN), DDIM shows more prominent performance in terms of details, textures, and continuity, and the generated images are more similar to the real samples. The slices generated by CGAN capture some basic grain textures, but there is overall ambiguity and noise appears in some slices (as shown in the boxes). In addition, the mode collapse phenomenon also occurs during the CGAN generation process, further affecting the generation effect.
[0053] Figure 13 shows two groups of three-dimensional digital core samples, each group including two rock types: carbonate rock and sandstone. The samples generated by DDIM are similar to the actual cores. Compared with the samples generated by CGAN, the carbonate rock samples generated by DDIM show more fine details in terms of porosity and texture, and the gray-scale changes and spatial distributions more accurately reflect the heterogeneity of the rock. The images generated by DDIM in the sandstone samples show more complex grain textures and pore structures, demonstrating higher precision and realism than the samples generated by CGAN.
[0054] Figure 14 shows the comparison between the pore space of the carbonate rock generated by DDIM and the real sample, and the generated sample accurately reproduces the pore structure of the actual core. Figure 15The comparison of sandstone pore spaces is shown. The samples generated by DDIM are highly consistent with the actual samples in terms of pore structure and texture. Through these images, DDIM demonstrates remarkable capabilities in generating digital cores with realistic pore structures.
[0055] This application also provides a three-dimensional digital core generation system for implementing the above three-dimensional digital core generation method, including: a data acquisition and preprocessing module, a geological feature input module, a model training and optimization module, a generation and post-processing module, and a system interaction and control module; The data acquisition and preprocessing module is responsible for obtaining core images and preprocessing the image data, including denoising, normalization, and size adjustment, to adapt to subsequent generation tasks; The geological feature input module is used to provide geological condition data through a dedicated interface and use these conditions as inputs to assist the model in maintaining consistency in geological features when generating images; The model training and optimization module is used to optimize the model through a training environment. It is responsible for using the self-attention mechanism of CSAUnet to improve the quality of digital core generation and gradually optimize the difference between the generated images and the actual core images; The generation and post-processing module is used to generate digital core images by inputting noise and geological conditions using the trained model, and use the DDIM diffusion model to gradually denoise the generated images to generate three-dimensional digital core images that conform to the target geological features; The system interaction and control module is used to provide a user interface and interaction functions, and support system status monitoring and control of the model training process.
[0056] Through the above three-dimensional digital core generation method, on the one hand, by obtaining the three-dimensional digital data of the real core and preprocessing it, a core training data set is obtained; based on the generation model architecture of the DDIM diffusion model and CSAUnet, a digital core generation model is constructed, and through inputting the training data set for training, the network parameters are gradually optimized, and finally the optimal model is obtained. During the generation process, by inputting noise and geological condition information, a target digital core image that conforms to the target geological characteristics is generated; the generated target digital core image has the geological characteristics and visual effects of the real core, and can accurately simulate the porosity and bedding structure inside the core. On the other hand, by using the self-attention mechanism of the DDIM model and CSAUnet model, the geological characteristics in the core can be restored more precisely, including porosity, pore distribution, and rock type, etc. Especially in capturing complex bedding structures and subtle geological characteristics, the generation accuracy is significantly improved. By introducing an enhanced MSE loss function with noise level and geological feature weighting factors, the noise processing process is further optimized, reducing the interference of noise on the core image generation, and at the same time improving the quality of detail restoration. Especially when simulating subtle pore structures and tiny geological differences, the effect is more significant. Combining the advantages of the DDIM model and CSAUnet model enables the model to generate more accurate three-dimensional digital cores under complex geological conditions, especially in the simulation of complex geological characteristics such as bedding structures and micro-pores, showing higher adaptability and generation accuracy.
[0057] In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of those features. In the description of the embodiments of the present disclosure, the meaning of "a plurality" is two or more unless otherwise specifically defined.
[0058] In the description of this specification, the description with reference to terms such as "an embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification.
[0059] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common general knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the appended claims.
Claims
1. A method for generating a three-dimensional digital core, characterized in that, The method includes: Inputting noise data and geological conditions into a trained CSAUnet model for processing; wherein, the CSAUnet model includes a dual-channel convolutional block, a downsampling module, an upsampling module, a dual attention module, and a convolutional module; The dual-channel convolutional block extracts the features of the noise data to obtain an initial feature map; The downsampling module performs three downsampling operations on the initial feature map, and then processes it using the dual attention module to obtain a first feature image block, a second feature image block, and a third feature image block respectively; wherein, each downsampling operation is processed using two first double convolutional blocks, and then auxiliary features of time embedding, porosity information, and lithology category are introduced for integration; The upsampling module performs three upsampling operations on the third feature image block. Each upsampling operation is processed using two second double convolutional blocks, and then auxiliary features of time embedding, porosity information, and lithology category are introduced, and after splicing and fusing with the first feature image block and the second feature image block, it is processed using the dual attention module to obtain a fused feature; The convolutional module processes the fused feature to generate an initial three-dimensional digital core image; Using the DDIM diffusion model to gradually denoise the noise in the initial three-dimensional digital core image to generate a denoised target three-dimensional digital core image.
2. The three-dimensional digital core generation method according to claim 1, wherein The downsampling module includes a first downsampling block, a second downsampling block, and a third downsampling block, and the upsampling module includes a first upsampling block, a second upsampling block, and a third upsampling block.
3. The three-dimensional digital core generation method according to claim 2, wherein In the step where the downsampling module performs three downsampling operations on the initial feature map and then processes it using the dual attention module to obtain a first feature image block, a second feature image block, and a third feature image block respectively, it includes: The first downsampling block performs a downsampling operation on the initial feature map. After two three-dimensional convolutions and three activation functions in two first double convolutional blocks, a three-dimensional max pooling operation is performed, and at the same time, auxiliary features of time embedding, porosity information, and lithology category are introduced, and it is processed using the dual attention module to obtain a first feature image block with a size of 40×40×40 and 16 channels; The second downsampling block performs a downsampling operation on the first feature image block. After two three-dimensional convolutions and three activation functions in two first double convolutional blocks, a three-dimensional max pooling operation is performed, and at the same time, auxiliary features of time embedding, porosity information, and lithology category are introduced, and it is processed using the dual attention module to obtain a second feature image block with a size of 20×20×20 and 32 channels; The third downsampling block performs a downsampling operation on the second feature image block. After two three-dimensional convolutions and three activation functions in two first double convolutional blocks, a three-dimensional max pooling operation is performed, and at the same time, auxiliary features of time embedding, porosity information, and lithology category are introduced, and it is processed using the dual attention module to obtain a target feature image block with a size of 10×10×10 and 128 channels.
4. The three-dimensional digital core generation method according to claim 3, wherein, In the step where the upsampling module performs three upsampling operations on the third feature image block, and after each upsampling operation is processed by two second double convolutional blocks, auxiliary features of temporal embedding, porosity information, and lithology category are introduced, and after being concatenated and fused with the first feature image block and the second feature image block, they are processed by the dual attention module to obtain the fused feature, including: The first upsampling block performs an upsampling operation on the third feature image block. After two three-dimensional convolutions and three activation functions in two second double convolutional blocks, a linear interpolation operation is performed. At the same time, auxiliary features of temporal embedding, porosity information, and lithology category are introduced, and they are processed by the dual attention module to obtain the first fused feature image block with a size of 20×20×20 and 32 channels; The second upsampling block performs an upsampling operation on the first fused feature image block. After two three-dimensional convolutions and three activation functions in two second double convolutional blocks, a linear interpolation operation is performed. At the same time, auxiliary features of temporal embedding, porosity information, and lithology category are introduced, and after being concatenated and fused with the second feature image block, they are processed by the dual attention module to obtain the second fused feature image block with a size of 40×40×40 and 16 channels; The third upsampling block performs an upsampling operation on the second fused feature image block. After two three-dimensional convolutions and three activation functions in two second double convolutional blocks, a linear interpolation operation is performed. At the same time, auxiliary features of temporal embedding, porosity information, and lithology category are introduced, and after being concatenated and fused with the first feature image block, they are processed by the dual attention module to obtain the fused feature with a size of 80×80×80 and 8 channels.
5. The three-dimensional digital core generation method according to claim 4, wherein In the step where the convolutional module processes the fused feature to generate the initial three-dimensional digital core image, including: The convolutional module performs a convolution operation with a 1×1×1 convolution kernel on the fused feature with a size of 80×80×80 and 8 channels to obtain the initial three-dimensional digital core image with a size of 80×80×80 and 1 channel.
6. The three-dimensional digital core generation method according to claim 5, characterized in that In the step where the DDIM diffusion model is used to gradually denoise the initial three-dimensional digital core image to generate the denoised target three-dimensional digital core image, including: Using the DDIM diffusion model to sample the initial three-dimensional digital core image; By iteratively applying the denoising equation, generating a real image from the noise and optimizing it through conditional control to generate the target three-dimensional digital core image: Among them, is the sample at time t, represents the category condition information, represents the porosity condition information, is the parameter for controlling the noise diffusion degree at time t, is the parameter for controlling the noise diffusion degree at time t - 1, is the noise function, is the cumulative product of, is the cumulative product of.
7. The three-dimensional digital core generation method according to claim 6, wherein, This method further includes: Obtaining the original image of the real core and performing preprocessing to obtain a three-dimensional core dataset; Constructing a digital core generation model according to the CSAUnet model and the DDIM diffusion model; Inputting the three-dimensional core dataset and the corresponding geological conditions into the digital core generation model for training, and introducing a weighted loss function during the training process to obtain the trained digital core generation model.
8. The three-dimensional digital core generation method according to claim 7, characterized in that, The weighted loss function is: Among them, is the pixel value in the generated image, is the pixel value in the real image, N is the total number of pixels in the image, is the weighting factor: Among them, is the weight of geological features, is the weight of noise, is the first hyperparameter, is the second hyperparameter.
Citation Information
Patent Citations
A method and system for constructing digital cores to simulate nano- and micro-pores in shale matrix
CN115115783B
A method for generating 3D digital core with multiple constraints based on diffusion model
CN117830510B
Integrated cross pseudo tag-based tumor image semi-supervised segmentation method
CN115393289A
Multi-condition constraint three-dimensional digital core generation method based on diffusion model
CN117830510A
Diffusion model defogging method fusing parallel multi-convolution attention
CN117994167A