A method, apparatus and medium for establishing a three-dimensional rock model

By constructing a generator using a simplified Laplacian pyramid structure and a deep convolutional neural network, and combining a feature statistical hybrid regularization mechanism with a Wasserstein generative adversarial network to optimize the discriminator, the problem of inconsistent quality in the generation of 3D rock models in existing technologies is solved, and stable characterization and accurate parameter calculation of multi-scale rock structures are achieved.

CN119251403BActive Publication Date: 2025-10-21IROCK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411333438.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-10-21
Estimated Expiration
2044-09-24

AI Technical Summary

Technical Problem

Existing methods for constructing three-dimensional rock models suffer from inconsistent generation quality and poor stability, making it particularly difficult to accurately represent multi-scale rock structures in offshore oil and gas fields.

Method used

A simplified Laplacian pyramid structure is used to build the generator, and a discriminator is built by combining a deep convolutional neural network and an integrated feature statistical hybrid regularization mechanism. A 3D rock model is generated by a generative adversarial network, and the model stability is optimized by the Wasserstein generative adversarial network-Laplacian loss function. The generated model is further processed by data augmentation and morphological operations.

Benefits of technology

The generated 3D rock model is more similar to the real rock structure, can stably represent the rock structure at different scales, improves the accuracy of rock physical parameters and flow parameters calculation, and is suitable for modeling multi-scale rock samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251403B_ABST
    Figure CN119251403B_ABST
Patent Text Reader

Abstract

The application relates to a method and device for establishing a three-dimensional rock model and a medium, the method comprising the following steps: cutting a rock sample into a plurality of first three-dimensional sub-samples; performing data enhancement processing on the plurality of first three-dimensional sub-samples to obtain a sub-sample group; performing normalization processing on each sub-sample in the sub-sample group; adopting a simplified Laplacian pyramid structure to construct a generator, adopting a deep convolutional neural network structure and an integrated feature statistical mixed regularization mechanism to construct a discriminator; generating a random noise vector group matched with a target size, inputting the random noise vector group into the generator, and inputting an output array of the trained generator into the trained discriminator to determine whether the output array is true, and if so, generating a floating-point number array; and performing binarization processing and denoising on the floating-point number array based on a preset threshold to obtain a binarized rock model. The application solves the problems of low stability and low quality of the rock model generated by the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of three-dimensional model building, and in particular to a method, device and medium for building a three-dimensional rock model. Background Art

[0002] The physical and flow parameters of rocks are crucial for calculating reserves and developing development plans in the oil and gas industry. However, obtaining rock samples underground (especially in offshore oil and gas fields) is difficult and expensive, often resulting in only a small number of cores, blocks, or cuttings. Therefore, constructing 3D rock models based on a small number of 2D and 3D rock images for calculating their physical and flow parameters is of great significance for both production and scientific research. Currently, existing methods for constructing 3D rock models primarily include physical experiments and numerical reconstruction.

[0003] Physical experimental methods primarily rely on various experimental equipment, such as high-magnification optical microscopes, micrometer- and nanometer-scale X-ray computed tomography (CT scans), and 3D scanning electron microscopy. The main drawbacks of these methods are their high cost and time consumption, and the fact that each experimental method can only characterize a single scale, such as the micrometer or nanometer scale. Numerical reconstruction methods use different core images and algorithms to construct different types of rock models. Traditional numerical reconstruction methods include simulated annealing, sedimentation processes, and multi-point statistics. The main drawback of these methods is that the resulting 3D rock models are highly random and differ significantly from real rock samples. In recent years, various machine learning algorithms have also been used to construct 3D rock models, such as generative adversarial networks (GANs). This method uses a set of adversarial processes to learn the data distribution and generate a new model with characteristics similar to the real data. This framework consists of two main components: a generator and a discriminator. The overall process involves generating a new rock model through the generator, then using the discriminator to identify its authenticity. Through continuous feedback and adjustment from the discriminator, a rock model that closely resembles the real thing is ultimately formed, forcing the discriminator to identify the rock model as authentic. Overall, the generative adversarial network model significantly improves on previous methods in representing real structures, but it still struggles to represent structural information at different scales. Furthermore, these methods generate inconsistent image quality, indicating a lack of stability. Summary of the Invention

[0004] The present invention provides a method, device and medium for establishing a three-dimensional rock model, so as to solve the problem that the rock models generated by the existing methods have inconsistent quality and poor stability.

[0005] To achieve the above objectives, in a first aspect, the present invention provides a method for establishing a three-dimensional rock model, comprising:

[0006] Cutting the rock sample into a plurality of subsamples of a first three-dimensional spatial size, wherein the first three-dimensional spatial size is a subsample size sufficient to capture a characteristic structure of the rock sample through a two-point correlation function analysis;

[0007] Performing data enhancement processing of rotation and / or flipping on the plurality of subsamples of the first three-dimensional space size to obtain a subsample group;

[0008] Performing normalization on each subsample in the subsample group, and randomly dividing the normalized subsample group into a training set and a validation set;

[0009] A generator is constructed using a simplified Laplace pyramid structure, a discriminator is constructed using a deep convolutional neural network structure and an integrated feature statistics hybrid regularization mechanism, and the discriminator and the generator are trained based on the normalized subsample group to obtain the trained discriminator and the generator;

[0010] Generate a random noise vector group that matches the target size, input the random noise vector group into the trained generator, and input the output array of the trained generator into the trained discriminator. If the discriminant is true, a floating-point number array with a value range between [0, 1] is generated;

[0011] The floating point array is binarized based on a preset threshold value, and morphological operations are used to remove isolated areas for denoising, so as to obtain a binarized rock model.

[0012] To achieve the above objectives, in a second aspect, the present invention further relates to a device for establishing a three-dimensional rock model, comprising:

[0013] a sample cutting module, configured to cut the rock sample into a plurality of subsamples of a first three-dimensional spatial size, wherein the first three-dimensional spatial size is a subsample size sufficient to capture a characteristic structure of the rock sample as analyzed by a two-point correlation function;

[0014] an enhancement module, configured to perform data enhancement processing of rotating and / or flipping the plurality of subsamples of the first three-dimensional space size to obtain a subsample group;

[0015] A normalization module, configured to perform normalization processing on each subsample in the subsample group, and randomly divide the normalized subsample group into a training set and a validation set;

[0016] A training module is configured to construct a generator using a simplified Laplace pyramid structure, construct a discriminator using a deep convolutional neural network structure and an integrated feature statistics hybrid regularization mechanism, and train the discriminator and the generator based on the normalized subsample group to obtain the trained discriminator and the generator;

[0017] A floating-point array generation module is configured to generate a random noise vector group that matches the target size, input the noise into the trained generator, and input the output array of the trained generator into the trained discriminator. If the output array is judged as true, a floating-point number array with a value range between [0, 1] is generated;

[0018] The rock model acquisition module is used to perform binarization processing on the floating point array based on a preset threshold value, and use morphological operations to remove isolated areas for denoising, so as to obtain a binarized rock model.

[0019] To achieve the above objectives, in a third aspect, the present invention further relates to a computer-readable storage medium, in which instructions are stored, and when the instructions are run, the above method for establishing a three-dimensional rock model is executed.

[0020] The present invention relates to a method, device, and medium for establishing a three-dimensional rock model, which has the following beneficial effects compared to the prior art:

[0021] This method proposes an improved pyramid-structured generative adversarial network model that can generate high-quality 3D rock models that are more similar to the 3D structure of real rocks. At the same time, this method can effectively characterize rock structures at different scales. Furthermore, this method has good applicability, demonstrating stable, high-quality performance across different rock sample types. This is particularly useful for offshore rock, rock block, and rock chip samples with multi-scale features (micrometer or nanometer scale). A 3D rock model can be constructed based on a small number of 2D and 3D rock images, improving the accuracy of calculated rock physical and flow parameters.

[0022] Generator Construction: A pyramid structure was added to the traditional model to extract pore features of different scales and types. Discriminator Construction: A feature statistical hybrid regularization method was used to simulate the different pore spaces of different rock types, avoiding the traditional method of replicating a single pore structure. Loss Function Determination: The loss function of the traditional generative adversarial network model was changed to the Wasserstein generative adversarial network-Laplace loss function, enhancing the model's stability.

[0023] By adjusting the dimension of the input noise vector, this method can also generate models of larger sizes. For example, we successfully generated a centimeter-scale model of 22003 (approximately 10 billion voxels), providing a powerful tool for large-scale porous media research. This cross-scale generation capability demonstrates the superiority of the PWGAN (Pyramid Wasserstein generative adversarial networks) method in capturing and reproducing complex pore structures. In WGAN-GP (Wasserstein generative adversarial networks-Gradient Penalty), adding batch normalization to the discriminator can help improve the performance and stability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 The method flow of a method for establishing a three-dimensional rock model in embodiment 1 of the present invention is as follows Figure 1 ;

[0025] Figure 2 The method flow of a method for establishing a three-dimensional rock model in embodiment 1 of the present invention is as follows Figure 2 ;

[0026] Figure 3 This is a rock model rendering of a method for establishing a three-dimensional rock model in Example 1 of the present invention;

[0027] Figure 4 It is a structural schematic diagram of a device for establishing a three-dimensional rock model in embodiment 2 of the present invention. DETAILED DESCRIPTION

[0028] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.

[0029] Example 1

[0030] A method for building a three-dimensional rock model, see Figure 1-3 ,include:

[0031] S10: Cutting the rock sample into a plurality of sub-samples of a first three-dimensional spatial size, wherein the first three-dimensional spatial size is a sub-sample size sufficient to capture a characteristic structure of the rock sample through two-point correlation function analysis.

[0032] Among them, the subsample suitable for network training is determined by analyzing the two-point correlation function to be a subsample of the first three-dimensional spatial size that is sufficient to capture the characteristic structure of the rock sample, and multiple subsamples of the first three-dimensional spatial size are extracted from the rock sample, and the multiple subsamples are preferably overlapping with each other.

[0033] In one example, a 1200 3 A voxel-sized Berea sandstone sample with a voxel resolution of 2.0 μm was first cut into subsamples suitable for network training. Analysis of the two-point correlation function determined that a subsample size of 1283 was sufficient to capture the characteristic structure of the Berea sandstone. Using a sliding window method, a large number of overlapping 1283 subsamples were extracted from the original sample.

[0034] S20: Performing data enhancement processing of rotation and / or flipping on the plurality of subsamples of the first three-dimensional space size to obtain a subsample group, wherein the subsample group includes at least one thousand training samples.

[0035] In the above example, to further increase the amount and diversity of data, these subsamples were augmented with data, including rotations of 90°, 180°, and 270°, as well as flips along the x, y, and z axes. This series of operations ultimately resulted in thousands of training samples.

[0036] S30: performing normalization processing on each subsample in the subsample group, and randomly dividing the normalized subsample group into a training set and a validation set.

[0037] In this example, each subsample was normalized to map grayscale values ​​to the range [0, 1]. This step helps improve the stability and efficiency of network training. Finally, the entire dataset was randomly split into a training set (80%) and a validation set (20%). The validation set is used to monitor the model's generalization ability during training and prevent overfitting.

[0038] S40: A simplified Laplacian pyramid structure is used to construct a generator, a deep convolutional neural network structure and an integrated feature statistics hybrid regularization mechanism are used to construct a discriminator, and the discriminator and the generator are trained based on the normalized sub-sample group to obtain the trained discriminator and the generator.

[0039] Among them, a simplified Laplace pyramid structure is used to build the generator, including:

[0040] The simplified Laplacian pyramid structure adopted contains four sub-networks connected from top to bottom: G0 network, G1 network, G2 network and G3 network. This structure allows the network to gradually generate high-resolution images from low resolution and effectively capture multi-scale features.

[0041] The G0 network serves as a base layer, receives a random noise vector matching the target size as input, first expands the input to a first preset number of nodes through a fully connected layer, and then reshapes the three-dimensional tensor. Through four transposed convolution operations, the spatial dimension is doubled each time, and batch normalization and linear rectification functions are used as activation functions. The final output of the G0 network is a low-resolution image of a first preset size; each of the G1 network, the G2 network and the G3 network receives two inputs: the output of the previous layer and a new 100-dimensional random noise vector. The two inputs are merged through a connection layer and then pass through three transposed convolution layers, where each transposed convolution is followed by batch normalization and ReLU function activation. The G3 network finally outputs a three-dimensional image of the first three-dimensional spatial size.

[0042] In the above example, a 100-dimensional random noise vector is received as input. It first passes through a fully connected layer to expand the input to 4096 nodes and then reshapes it into a 4x4x16 three-dimensional tensor. It then undergoes four transposed convolutions, doubling the spatial dimension each time. Batch normalization and rectified linear unit (ReLU) activation functions are used to enhance feature extraction and nonlinear representation. The final output of the G0 network is a 163-degree low-resolution image. The G1, G2, and G3 networks have similar structures, and their task is to gradually upscale the output of the previous layer. Each network receives two inputs: the output of the previous layer and a new 100-dimensional random noise vector. These two inputs are combined through a concatenation layer and then passed through three transposed convolution layers. Each transposed convolution is followed by batch normalization and ReLU activation to maintain feature consistency and nonlinearity. This design allows the network to incorporate new random variations while upscaling the image, increasing the diversity of the generated results. Through this hierarchical structure, the G3 network ultimately outputs a 1283-dimensional 3D image during training, matching the original training sample size. This multi-scale generation method enables the network to simultaneously focus on large-scale structures and fine details, making it ideal for capturing the complex morphology of pore spaces.

[0043] Among them, a deep convolutional neural network structure and an integrated feature statistics hybrid regularization mechanism are used to build the discriminator, specifically including:

[0044] The discriminator adopts a deep convolutional neural network structure and integrates a feature statistical mixture regularization mechanism (FSM) to enhance the control of the diversity of generated samples.

[0045] The main body of the discriminator consists of five 3D convolutional layers, each followed by a ReLU activation function, which gradually reduces the dimensionality of the input image of the first three-dimensional space size and extracts features to output a single scalar representing the probability that the input image is a real sample through a fully connected layer;

[0046] The feature statistics mixing regularization mechanism is implemented after the second, third and fourth convolution layers respectively. Specifically, for each sample, the mean and standard deviation of its feature map are first calculated. Then, another sample in the batch is randomly selected and the feature statistics of the two samples are mixed. The mixing operation is implemented by adaptive instance normalization (AdaIN), and the formula is as follows: SM(x,y)=αx+(1-α)AdaIN(x,y), where x and y are the feature maps of the two samples, and α is a random number in the range of [0,1]. This mixing operation encourages the discriminator's prediction to remain unchanged to the style of the input image, thereby improving the diversity of generated samples.

[0047] We also added the FSMR loss term to the loss function:

[0048] LFSMR=E[(D(x)-DFSM(x,y))2]

[0049] Where D(x) is the original output and DFSM(x,y) is the output after feature mixing. This loss term further constrains the discriminator so that it does not rely too much on specific texture features.

[0050] The discriminator and the generator are trained separately, specifically including:

[0051] The discriminator is trained 5 times and the generator is trained once.

[0052] Training was performed on a high-performance workstation equipped with an NVIDIA Quadro RTX 5000 graphics card. A mini-batch training strategy with batch sizes of 16-32 was used, and the Adam optimizer was used for parameter updates, with β1 set to 0.5 and β2 set to 0.999. The learning rate was initially set to 0.0003, and a learning rate decay strategy was used, halving the learning rate every 200 epochs.

[0053] In the discriminator, the loss function adopts the Wasserstein generative adversarial network-Laplacian loss function, combined with the FSMR regularization term:

[0054]

[0055] Where L: represents the total loss function of the generative model. This is the optimization objective of the generator G and the discriminator D during training. minG{maxDL}: This is a typical minimax optimization problem in GANs. The generator G attempts to minimize the loss function L, while the discriminator D attempts to maximize it. The goal is to make the samples generated by the generator as close to the true sample distribution as possible, making it difficult for the discriminator to distinguish between generated and true samples. Ex~p(x)[·]: represents the expectation of the true data x under the data distribution p(x), and is often used to calculate the true part of the adversarial loss. This term is calculated by averaging a certain operation over all true data samples. Ez~q(z)[·]: represents the expectation of the latent variable z of the generative model under the prior distribution q(z), and is often used to calculate the generative part of the adversarial loss. This term represents the average of a certain operation on the generative model input (usually a latent vector sampled from a Gaussian or uniform distribution). D(x): The discriminator D's judgment on the input data x, which is often used to determine whether the data x comes from the true data distribution or the generated data distribution. The output of the discriminator is typically a scalar representing the probability that the input sample is real data. D(G(z)) is the result of the discriminator D on the generated data G(z), where G(z) is the sample generated by the generator G using the latent vector z as input. The discriminator's goal is to classify generated samples as fake data. This is the gradient of the discriminator D with respect to the input x^, and is usually used to calculate the gradient penalty term. The gradient penalty term is often used to improve the calculation of the Wasserstein distance, making the training of the generator and discriminator more stable. This is the Lipschitz penalty term, which is used to ensure that the discriminator satisfies the 1-Lipschitz condition. This condition is crucial for the training of Wasserstein GAN. Its purpose is to improve the calculation of the Wasserstein distance and avoid the problem of gradient vanishing or exploding by forcing the norm of the discriminator's gradient on the data distribution to be close to 1. The number 5 is the weight coefficient of this term, indicating its importance in the total loss. 10·LFSMR: This is the FSMR loss term, which may stand for "Feature-Space Matching Regularization" or other custom losses, used to further optimize the performance of the generator. This term is usually introduced based on specific application scenarios or domain knowledge to encourage the generator to generate samples that are more in line with the expected characteristics. The number 10 is the weight coefficient of this term, indicating its contribution to the total loss.

[0056] During training, we employed an asymmetric update strategy: for every five epochs the discriminator is trained, the generator is trained once. This strategy helps maintain the discriminator's discriminative power and prevents the generator from rapidly surpassing the discriminator. In the example above, a total of 800 epochs were trained, with model checkpoints saved every 50 epochs for easy inspection and subsequent analysis to select the optimal model.

[0057] During the training process, the generator loss, discriminator loss, and FSMR loss are continuously monitored through the loss function value calculated at each iteration. The model performance is evaluated on the validation set at set intervals, and the key parameters of the generated samples are calculated. The key parameters include at least porosity and permeability to ensure that the model is not only visually realistic but also physically consistent with the real samples. In the above example, hundreds of images are generated regularly and the model performance is evaluated based on the generated images.

[0058] During the training process, the binarized rock model and the real three-dimensional rock model output by the generator are marked and input into the discriminator for training and distinguished as real or virtual models, wherein the distinction between real and virtual models is determined based on the Wasserstein generative adversarial network-Lys penalty function.

[0059] S50: Generate a random noise vector group that matches the target size, input the random noise vector group into the trained generator, and input the output array of the trained generator into the trained discriminator. If the discriminant is true, a floating-point number array with a value range between [0, 1] is generated.

[0060] In the above example, for 300 3 To achieve the target size, we need to prepare a 100-dimensional random vector for the G0 network, and a 300x300x300-dimensional random noise tensor for each of the G1, G2, and G3 networks. These noise vectors and tensors all obey the standard normal distribution N(0,1). Next, we input the noise into the trained generator network. G0 first processes the 100-dimensional noise vector and outputs a small-sized base image. The G1 network then combines the output of the G0 network with the first 300x300x300 noise tensor to generate a larger intermediate result. G2 and G3 gradually increase the image size in a similar way, and finally G3 outputs 300 3 Size of three-dimensional image.

[0061] like Figure 3 As shown in the figure, Z is the noise vector; Xf = G (Z) is the function for establishing the virtual rock model; Xr is the real rock model, Figure 3The technical flow chart of this method is presented. By extracting real rock features layer by layer from a high-dimensional vector Z composed of random noise and performing training, a virtual 3D rock model is generated. Subsequently, the virtual and real 3D rock models are labeled and fed into a discriminator for training and classification as real or virtual. Model judgment is primarily based on error, using a Wasserstein generative adversarial network-Lys penalty function. Feature statistical mixing regularization is also incorporated into the model building process to account for the diversity of rock model structures. Each time a virtual rock model is identified, the model parameters are optimized to reduce error. After continuous training, the modeling process terminates when the discriminator identifies the resulting virtual rock model as a real rock model.

[0062] S60: performing binarization processing on the floating point array based on a preset threshold value, using morphological operations to remove isolated areas for denoising, so as to obtain a binarized rock model.

[0063] Specifically, we first use 0.5 as a threshold for binarization, treating values ​​less than 0.5 as pores (assigned a value of 1) and values ​​greater than or equal to 0.5 as rock matrix (assigned a value of 0). Then, we use morphological operations to remove isolated regions with less than 100 voxels to eliminate possible noise.

[0064] After S60, a testing step S70 is also included (not shown in the drawings):

[0065] Calculate the key parameters of the binarized rock model and the two-point correlation function to verify the structural similarity of the generated binarized rock model based on the key parameters, wherein the key parameters include at least one or more of porosity, permeability, specific surface area, average curvature and Euler characteristic number.

[0066] In the example above, a comprehensive evaluation of the generated model showed that the average porosity of the generated model was 0.0714, only 2% different from the 0.07 of the real Berea sandstone sample. Other parameters such as permeability and Euler characteristic also showed good consistency. In addition, we calculated the two-point correlation function to further verify the structural similarity of the generated model at multiple scales.

[0067] like Figure 3 As shown in the figure, the three-dimensional rock model established by the existing technical method is quite different from the real image in terms of pore size and morphology (black part of the image), while the three-dimensional rock model established based on this method can accurately represent the pore size and morphology in the real rock image.

[0068] It is worth noting that by adjusting the dimension of the input noise vector, this method can also generate models of larger sizes. For example, in another instance, we successfully generated a 22003 The centimeter-scale model (approximately 10 billion voxels) provides a powerful tool for studying large-scale porous media. This cross-scale generation capability demonstrates the superiority of the PWGAN method in capturing and reproducing complex pore structures. The generator's ability to control the generated image effects at different scales and the discriminator's ability to maintain the generated image effects at multiple scales make it possible to generate rocks with complex pore structures.

[0069] Example 2

[0070] like Figure 4 As shown, a device for establishing a three-dimensional rock model. The device for establishing a three-dimensional rock model in this embodiment can be an electronic device with a central processing unit, such as a personal computer, a host computer, a server, an intelligent terminal and other electronic devices. In this embodiment, a device for establishing a three-dimensional rock model includes: a sample cutting module 81, an enhancement module 82, a normalization module 83, a training module 84, a floating-point array generation module 85 and a rock model acquisition module 86.

[0071] The sample cutting module 81 cuts the rock sample into a plurality of sub-samples of a first three-dimensional space size, wherein the first three-dimensional space size is a sub-sample size sufficient to capture the characteristic structure of the rock sample through two-point correlation function analysis.

[0072] an enhancement module 82 configured to perform data enhancement processing of rotating and / or flipping the plurality of subsamples of the first three-dimensional space size to obtain a subsample group, wherein the subsample group includes at least one thousand training samples;

[0073] A normalization module 83 is configured to perform normalization processing on each subsample in the subsample group, and randomly divide the normalized subsample group into a training set and a validation set;

[0074] a training module 84 configured to construct a generator using a simplified Laplacian pyramid structure, construct a discriminator using a deep convolutional neural network structure and an integrated feature statistics hybrid regularization mechanism, and train the discriminator and the generator based on the normalized subsample group to obtain the trained discriminator and the generator;

[0075] The floating-point array generation module 85 is used to generate a random noise vector group that matches the target size, input the noise into the trained generator, and input the output array of the trained generator into the trained discriminator. If the discriminant is true, a floating-point number array with a value range between [0, 1] is generated;

[0076] The rock model acquisition module 86 is configured to perform binarization processing on the floating point array based on a preset threshold value, and use morphological operations to remove isolated areas for denoising, so as to obtain a binarized rock model.

[0077] In some embodiments, the training module 84 is specifically configured to:

[0078] Constructing a generator: A simplified Laplacian pyramid structure is adopted, which contains four sub-networks connected from top to bottom: G0 network, G1 network, G2 network and G3 network. The G0 network serves as the base layer and receives a random noise vector matching the target size as input. First, the input is expanded to a first preset number of nodes through a fully connected layer, and then the three-dimensional tensor is reshaped. Through four transposed convolution operations, the spatial dimension is doubled each time. At the same time, batch normalization and linear rectification functions are used as activation functions. The final output of the G0 network is a low-resolution image of a first preset size; each network of the G1 network, the G2 network and the G3 network receives two inputs: the output of the input previous layer and a new 100-dimensional random noise vector. The two inputs are merged through a connection layer and then pass through three transposed convolution layers, where each transposed convolution is followed by batch normalization and ReLU function activation. The G3 network finally outputs a three-dimensional image of the first three-dimensional spatial size;

[0079] Constructing the discriminator: The main body of the discriminator consists of five 3D convolutional layers, each followed by a ReLU activation function, which gradually reduces the dimensionality of the input image of the first three-dimensional space size and extracts features to output a single scalar through a fully connected layer to represent the probability that the input image is a real sample; the feature statistics mixing regularization mechanism is implemented after the second convolution layer, the third convolution layer, and the fourth convolution layer, respectively. Specifically, for each sample, the mean and standard deviation of its feature map are first calculated. Then, another sample in the batch is randomly selected and the feature statistics of the two samples are mixed. The mixing operation is implemented by adaptive instance normalization, as follows: SM(x,y)=αx+(1-α)AdaIN(x,y), where x and y are the feature maps of the two samples and α is a random number in the range [0,1]. The FSMR loss term is also added to the loss function: LFSMR=E[(D(x)-DFSM(x,y))2], where D(x) is the original output and DFSM(x,y) is the output after feature mixing;

[0080] Train the discriminator and the generator:

[0081] Train the discriminator 5 times and the generator once;

[0082] In the discriminator, the loss function adopts the Wasserstein generative adversarial network-Laplacian loss function, combined with the FSMR regularization term:

[0083]

[0084] in, is the Lipschitz penalty term, which is used to ensure that the discriminator satisfies the 1-Lipschitz condition. 10*LFSMR is the FSMR loss. The number 10 is the weight coefficient of the FSMR loss. L: represents the total loss function of the generative model. G is the generator, D is the discriminator, D(x) is the discriminant D’s judgment result on the input data x, Ex~p(x)[·]: represents the expectation of the real data x under the data distribution p(x), Ez~q(z)[·]: represents the expectation of the potential variable z of the generative model under the prior distribution q(z), D(G(z)): the discriminant D’s judgment result on the generated data G(z), G(z) is the sample generated by the generator G with the potential vector z as input. is the gradient of the discriminator D with respect to the input x^;

[0085] During the training process, the generator loss, discriminator loss, and FSMR loss are continuously monitored through the loss function value calculated at each iteration. The model performance is evaluated on the validation set at set intervals, and the key parameters of the generated samples are calculated, which include at least porosity and permeability.

[0086] During the training process, the binarized rock model and the real three-dimensional rock model output by the generator are marked and input into the discriminator for training and distinguished as real or virtual models, wherein the distinction between real and virtual models is determined based on the Wasserstein generative adversarial network-Lys penalty function.

[0087] Preferably, a verification module 87 (not shown in the drawings) is also included, which is used to: after obtaining the binarized rock model, calculate the key parameters of the binarized rock model and calculate the two-point correlation function, and verify the structural similarity of the generated binarized rock model based on the key parameters, wherein the key parameters include but are not limited to porosity, permeability, specific surface area, average curvature and Euler characteristic number.

[0088] The device for establishing a three-dimensional rock model in this embodiment has the same implementation process, method and effect as the method for establishing a three-dimensional rock model described in the first embodiment, and will not be described in detail here.

[0089] Example 3

[0090] The present invention relates to a computer-readable storage medium, which stores instructions. When the instructions are executed, a method for establishing a three-dimensional rock model is executed. The execution process and effect of the method are the same as those of the method for establishing a three-dimensional rock model described in Example 1, and will not be repeated here.

[0091] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0092] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for establishing a three-dimensional rock model, characterized in that: include: Cutting the rock sample into a plurality of subsamples of a first three-dimensional spatial size, wherein the first three-dimensional spatial size is a subsample size sufficient to capture a characteristic structure of the rock sample through a two-point correlation function analysis; Performing data enhancement processing of rotation and / or flipping on the plurality of subsamples of the first three-dimensional space size to obtain a subsample group; performing normalization processing on each subsample in the subsample group, and randomly dividing the normalized subsample group into a training set and a validation set; A generator is constructed using a simplified Laplace pyramid structure, a discriminator is constructed using a deep convolutional neural network structure and an integrated feature statistics hybrid regularization mechanism, and the discriminator and the generator are trained based on the normalized subsample group to obtain the trained discriminator and the generator. Among them, the loss function in the discriminator adopts the Wasserstein generative adversarial network-Laplacian loss function, combined with the FSMR regularization term: in, is the Lipschitz penalty term, which is used to ensure that the discriminator D satisfies the 1-Lipschitz condition, where 5 is the weight coefficient of the Lipschitz penalty term; 10×L FSMR is the FSMR loss, where the number 10 is the weight coefficient of the FSMR loss, L: represents the total loss function of the generative model, G is the generator, and D is the discriminator. The generator G tries to minimize L, and the discriminator D tries to maximize L; D(x) is the output of the discriminator D for the real data x, E x~p(x) [D(x)]: represents the expectation of D(x) of the real data x under the data distribution p(x), E z~q(z) [D(G(z))]: represents the expectation of D(G(z)) of the latent variable z under the prior distribution q(z), D(G(z)): the output of the discriminator D on the generated data G(z), G(z) is the sample generated by the generator G with the latent variable z as input, is the gradient of the discriminator D with respect to the input x^; is the second norm of the gradient; We also added the FSMR loss term to the loss function: L FSMR =E[(D(x)-D FSM (x,y)) 2 ] Among them, D FSM (x,y): The predicted output of the FSMR module for inputs x and y, where y is another sample randomly selected from the batch; E[(D(x)-DFSM(x,y)) 2 ] is the pair (D(x)-DFSM(x,y)) 2 The expectation under the joint distribution p(x,y); Generate a random noise vector group that matches the target size, input the random noise vector group into the trained generator, and input the output array of the trained generator into the trained discriminator. If the discriminant is true, a floating-point number array with a value range between [0, 1] is generated; The floating point array is binarized based on a preset threshold value, and morphological operations are used to remove isolated areas for denoising, so as to obtain a binarized rock model.

2. A method for establishing a three-dimensional rock model according to claim 1, characterized in that: The generator is constructed using a simplified Laplace pyramid structure, including: The simplified Laplacian pyramid structure adopted includes four sub-networks connected from top to bottom: G0 network, G1 network, G2 network and G3 network. The G0 network serves as the base layer and receives a random noise vector matching the target size as input. First, the input is expanded to a first preset number of nodes through a fully connected layer, and then the three-dimensional tensor is reshaped. Through four transposed convolution operations, the spatial dimension is doubled each time. At the same time, batch normalization and linear rectification functions are used as activation functions. The final output of the G0 network is a low-resolution image of a first preset size; each network of the G1 network, the G2 network and the G3 network receives two inputs: the output of the input previous layer and a new 100-dimensional random noise vector. The two inputs are merged through a connection layer and then pass through three transposed convolution layers, where each transposed convolution is followed by batch normalization and ReLU function activation. The G3 network finally outputs a three-dimensional image of the first three-dimensional spatial size.

3. The method for establishing a three-dimensional rock model according to claim 2, wherein: The discriminator is constructed by using a deep convolutional neural network structure and an integrated feature statistics hybrid regularization mechanism, specifically including: The main body of the discriminator consists of five 3D convolutional layers, each followed by a ReLU activation function, which gradually reduces the dimensionality of the input image of the first three-dimensional space size and extracts features to output a single scalar representing the probability that the input image is a real sample through a fully connected layer; The feature statistics mixing regularization mechanism is implemented after the second, third, and fourth convolution layers, respectively. Specifically, for each sample, the mean and standard deviation of its feature map are first calculated. Then, another sample in the batch is randomly selected, and the feature statistics of the two samples are mixed. The mixing operation is implemented through adaptive instance normalization, as follows: SM(x,y)=αx+(1-α)AdaIN(x,y), where x and y are the feature maps of the two samples, α is a random number in the range of [0,1], AdaIN(x,y) is the adaptive instance normalization function, and SM(x,y) is a function that mixes the feature statistics of the two samples x and y.

4. The method for establishing a three-dimensional rock model according to claim 1, wherein: The training of the discriminator and the generator specifically includes: Train the discriminator 5 times and the generator once; During the training process, the generator loss, discriminator loss, and FSMR loss are continuously monitored through the loss function value calculated at each iteration. The model performance is evaluated on the validation set at set intervals to calculate the key parameters of the generated samples, which include at least porosity and permeability. During the training process, the binarized rock model and the real three-dimensional rock model output by the generator are marked and input into the discriminator for training and distinguished as real or virtual models, wherein the distinction between real and virtual models is determined based on the Wasserstein generative adversarial network-Lys penalty function.

5. The method for establishing a three-dimensional rock model according to claim 1, wherein: After obtaining the binarized rock model, the method further includes: a testing step: Calculate the key parameters of the binarized rock model and calculate the two-point correlation function to verify the structural similarity of the generated binarized rock model based on the key parameters, wherein the key parameters include at least porosity, permeability, specific surface area, average curvature and Euler characteristic number.

6. A device for establishing a three-dimensional rock model, characterized in that: include: a sample cutting module, configured to cut the rock sample into a plurality of subsamples of a first three-dimensional spatial size, wherein the first three-dimensional spatial size is a subsample size sufficient to capture a characteristic structure of the rock sample as analyzed by a two-point correlation function; an enhancement module, configured to perform data enhancement processing of rotating and / or flipping the plurality of subsamples of the first three-dimensional space size to obtain a subsample group; A normalization module, configured to perform normalization processing on each subsample in the subsample group, and randomly divide the normalized subsample group into a training set and a validation set; A training module is used to construct a generator using a simplified Laplace pyramid structure, to construct a discriminator using a deep convolutional neural network structure and an integrated feature statistics hybrid regularization mechanism, and to train the discriminator and the generator based on the normalized subsample group to obtain the trained discriminator and the generator. Among them, the loss function in the discriminator adopts the Wasserstein generative adversarial network-Laplacian loss function, combined with the FSMR regularization term: in, is the Lipschitz penalty term, which is used to ensure that the discriminator D satisfies the 1-Lipschitz condition, where 5 is the weight coefficient of the Lipschitz penalty term; 10×L FSMR is the FSMR loss, where the number 10 is the weight coefficient of the FSMR loss, L: represents the total loss function of the generative model, G is the generator, and D is the discriminator. The generator G tries to minimize L, and the discriminator D tries to maximize L; D(x) is the output of the discriminator D for the real data x, E x~p(x) [D(x)]: represents the expectation of the real data x under the data distribution p(x), E z~q(z) [D(G(z))]: represents the expectation of D(G(z)) of the latent variable z under the prior distribution q(z), D(G(z)): the output of the discriminator D on the generated data G(z), G(z) is the sample generated by the generator G with the latent variable z as input, is the gradient of the discriminator D with respect to the input x^; is the two-norm of the gradient vector; We also added the FSMR loss term to the loss function: L FSMR =E[(D(x)-D FSM (x,y)) 2 ] Among them, D FSM (x,y): The predicted output of the FSMR module for inputs x and y, where y is another sample randomly selected from the batch; E[(D(x)-DFSM(x,y)) 2 ] is the pair (D(x)-DFSM(x,y)) 2 The expectation under the joint distribution p(x,y); A floating-point array generation module is configured to generate a random noise vector group that matches the target size, input the noise into the trained generator, and input the output array of the trained generator into the trained discriminator. If the output array is judged as true, a floating-point number array with a value range between [0, 1] is generated; The rock model acquisition module is used to perform binarization processing on the floating point array based on a preset threshold value, and use morphological operations to remove isolated areas for denoising, so as to obtain a binarized rock model.

7. The device for establishing a three-dimensional rock model according to claim 6, characterized in that: The training module is specifically used to: Constructing a generator: A simplified Laplacian pyramid structure is adopted, which contains four sub-networks connected from top to bottom: G0 network, G1 network, G2 network and G3 network. The G0 network serves as the base layer and receives a random noise vector matching the target size as input. First, the input is expanded to a first preset number of nodes through a fully connected layer, and then the three-dimensional tensor is reshaped. Through four transposed convolution operations, the spatial dimension is doubled each time. At the same time, batch normalization and linear rectification functions are used as activation functions. The final output of the G0 network is a low-resolution image of a first preset size; each network of the G1 network, the G2 network and the G3 network receives two inputs: the output of the input previous layer and a new 100-dimensional random noise vector. The two inputs are merged through a connection layer and then pass through three transposed convolution layers, where each transposed convolution is followed by batch normalization and ReLU function activation. The G3 network finally outputs a three-dimensional image of the first three-dimensional spatial size; Constructing the discriminator: The main body of the discriminator consists of five 3D convolutional layers, each followed by a ReLU activation function, which gradually reduces the dimensionality of the input image of the first three-dimensional space size and extracts features, so as to output a single scalar through a fully connected layer to represent the probability that the input image is a real sample; the feature statistics mixing regularization mechanism is implemented after the second convolution layer, the third convolution layer and the fourth convolution layer respectively. Specifically, for each sample, the mean and standard deviation of its feature map are first calculated, and then another sample in the batch is randomly selected, and the feature statistics of the two samples are mixed. The mixing operation is implemented by adaptive instance normalization, and the formula is as follows: SM(x,y)=αx+(1-α)AdaIN(x,y), where x and y are the feature maps of the two samples, α is a random number in the range of [0,1], AdaIN(x,y) is the adaptive instance normalization function, and SM(x,y) is a function that mixes the feature statistics of the two samples x and y; Train the discriminator and the generator: Train the discriminator 5 times and the generator once; During the training process, the generator loss, discriminator loss, and FSMR loss are continuously monitored through the loss function value calculated at each iteration. The model performance is evaluated on the validation set at set intervals to calculate the key parameters of the generated samples, which include at least porosity and permeability. During the training process, the binarized rock model and the real three-dimensional rock model output by the generator are marked and input into the discriminator for training and distinguished as real or virtual models, wherein the distinction between real and virtual models is determined based on the Wasserstein generative adversarial network-Lys penalty function.

8. The device for establishing a three-dimensional rock model according to claim 6, characterized in that: It also includes a verification module for calculating the key parameters of the binarized rock model and the two-point correlation function after obtaining the binarized rock model, and verifying the structural similarity of the generated binarized rock model based on the key parameters, wherein the key parameters include at least porosity, permeability, specific surface area, average curvature and Euler characteristic number.

9. A computer-readable storage medium, characterized in that: The storage medium stores instructions, which, when executed, execute a method for establishing a three-dimensional rock model according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Sedimentary rock reconstruction method and system

    CN103323575A