Method and device for establishing three-dimensional rock model and medium

By simplifying the generative adversarial network method combining Laplace pyramid structure and deep convolutional neural network, a high-quality three-dimensional rock model was constructed, solving the problems of different models and poor stability in the existing technology, and achieving different Effective characterization and accuracy of scale structures are improved.

CN119251403AActive Publication Date: 2025-01-03IROCK TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

The existing three-dimensional rock model construction methods generate different models, are not stable, it is difficult to characterize structural information at different scales, and it is very different from real rock samples.

Method used

The generator is constructed by a simplified Laplace pyramid structure, combining deep convolutional neural networks and integrated feature statistics hybrid regularization mechanisms to build a discriminator, and through data augmentation and feature statistics hybrid regularization, use Wasserstein to generate an adversarial network-La Plath loss function generates a high-quality three-dimensional rock model that is more similar to the real rock structure.

Benefits of technology

The generated three-dimensional rock model has improved quality and can effectively characterize rock structures at different scales, with high stability and accuracy. It is suitable for marine multi-scale rock samples, improving the calculation accuracy of rock physical parameters and flow parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251403A_ABST
    Figure CN119251403A_ABST
Patent Text Reader

Abstract

The invention relates to a method and device for establishing a three-dimensional rock model.The method for establishing the three-dimensional rock model.The method comprises the steps that a rock sample is cut into a plurality of sub-samples of the first three-dimensional space size; performing data enhancement processing on the plurality of sub-samples of the first three-dimensional space size to obtain a sub-sample group; performing normalization processing on each sub-sample in the sub-sample group; constructing a generator by adopting a simplified Laplacian pyramid structure, and constructing a discriminator by adopting a deep convolutional neural network structure and an integrated feature statistical hybrid regularization mechanism; generating a random noise vector group matched with a target size, inputting the random noise vector group into a generator, inputting an output array of the trained generator into a trained discriminator, and judging that the output array is true, so as to generate a floating-point number array; and carrying out binarization processing and de-noising on the floating-point number array based on a preset threshold value to obtain a binarized rock model. According to the method, the problems of low stability and low quality of the rock model generated in the prior art are solved.
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 parameters and flow parameters of rocks are important parameters for calculating oil and gas reserves and formulating oil and gas development plans in the oil and gas industry. However, due to the difficulty and high cost of obtaining rock samples underground (especially offshore oil and gas fields), there are often only a small number of core, rock block or rock cutting samples. Therefore, building a three-dimensional rock model based on a small number of two-dimensional and three-dimensional rock images for calculating the physical parameters and flow parameters of rocks has important production and scientific research significance. At present, the existing three-dimensional rock model construction methods mainly include physical experimental methods and numerical reconstruction methods.

[0003] The physical experimental method mainly relies on different experimental equipment, such as high-magnification optical microscopes, micrometer- and nanometer-scale X-ray computed tomography (CT scans), and three-dimensional scanning electron microscope imaging. The main problems of this type of method are high cost and time-consuming, and different experimental methods can only characterize a single scale, such as micrometer or nanometer scale. The numerical reconstruction rule is to use different core images and different algorithms to construct different types of rock models. Traditional numerical reconstruction methods mainly include simulated annealing, sedimentation process method, and multi-point statistical method. The main problem of these methods is that the constructed three-dimensional rock models are highly random and have great differences from real rock samples. In recent years, different machine learning algorithms have also been used to construct three-dimensional rock models, such as the generative adversarial network model method (GAN). This method learns data distribution through a set of adversarial processes to generate new models with similar real data features. The framework mainly consists of two parts: generator and discriminator. The overall process is to generate a new rock model through the generator, and then use the discriminator to identify the authenticity. Through the continuous feedback and adjustment of the discriminator, a rock model that is very close to the real one is finally formed, so that the discriminator recognizes the rock model as real. Overall, the generative adversarial network model method has greatly improved the representation of real structures compared with previous methods, but it is still difficult to represent structural information of different scales. At the same time, the image quality generated by these methods is different, that is, the stability is not strong. 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 model generated by the existing method has different quality and weak 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 sub-samples of a first three-dimensional space size, wherein the first three-dimensional space size is a sub-sample 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 sub-samples of the first three-dimensional space size to obtain a sub-sample group;

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

[0009] A generator is constructed by adopting a simplified Laplace pyramid structure, a discriminator is constructed by adopting 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 sub-sample 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 output array is true, a floating point 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 object, in a second aspect, the present invention also relates to a device for establishing a three-dimensional rock model, comprising:

[0013] A sample cutting module, used for cutting 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 a characteristic structure of the rock sample through a two-point correlation function analysis;

[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, used for performing normalization processing on each sub-sample in the sub-sample group, and randomly dividing the normalized sub-sample group into a training set and a validation set;

[0016] A training module, 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 a normalized sub-sample group to obtain the trained discriminator and the generator;

[0017] A floating-point array generation module is used to generate a random noise vector group matching 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 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 number 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 also 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 with the prior art:

[0021] This method proposes an improved pyramid structure generative adversarial network model, which can generate a three-dimensional rock model with better quality, that is, it is more similar to the three-dimensional structure of the real rock. At the same time, this method can effectively characterize the rock structure of different scales. In addition, this method has good applicability and has stable and high-quality performance in different types of rock samples. Especially for offshore rocks, rock blocks and rock cuttings samples with multi-scale characteristics (micrometer or nanometer scale), a three-dimensional rock model can be constructed based on a small number of two-dimensional and three-dimensional rock images to improve the accuracy of calculating the physical parameters and flow parameters of the rock.

[0022] Generator establishment: A pyramid structure is added to the traditional model to extract pore features of different scales and types. Discriminator establishment: A feature statistical mixed regularization method is used to simulate different pore spaces of different types of rocks, avoiding the traditional method of only replicating a single pore structure. Loss function determination: The loss function of the traditional generative adversarial network model is changed to the Wasserstein generative adversarial networks-Laplace loss function, which enhances the stability of the model.

[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 (about 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 A method flow chart of a method for establishing a three-dimensional rock model in Embodiment 1 of the present invention Figure 1 ;

[0025] Figure 2 A method flow chart of a method for establishing a three-dimensional rock model in Embodiment 1 of the present invention Figure 2 ;

[0026] Figure 3 This is a rock model effect diagram of a method for establishing a three-dimensional rock model in Embodiment 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 in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0029] Embodiment 1

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

[0031] S10: Cut 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 a characteristic structure of the rock sample through two-point correlation function analysis.

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

[0033] In one example, a 1200 3 Voxel-sized Berea Sandstone sample with a voxel resolution of 2.0 μm. First, this large sample was 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 multiple sub-samples of the first three-dimensional space size to obtain a sub-sample group, wherein the sub-sample group includes at least one thousand training samples.

[0035] In the above example, in order 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 generated thousands of training samples.

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

[0037] In this embodiment, each subsample is normalized to map the grayscale value to the range of [0,1]. This step helps to improve the stability and efficiency of network training. Finally, the entire data set is randomly divided into a training set (80%) and a validation set (20%). The validation set is used to monitor the generalization ability of the model during the training process to 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, then reshapes the three-dimensional tensor, and doubles the spatial dimension each time through four transposed convolution operations, while using batch normalization and linear rectification functions as activation functions, and 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, wherein each transposed convolution is followed by batch normalization and ReLU function activation, and 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 expands the input to 4096 nodes through a fully connected layer and then reshapes it into a 4x4x16 three-dimensional tensor. Subsequently, four transposed convolution operations are performed to double the spatial dimension each time, while batch normalization and linear rectification function (ReLU function) are used as activation functions to enhance feature extraction capabilities and nonlinear expression. The final output of the G0 network is a 163 low-resolution image. The structures of the G1 network, the G2 network, and the G3 network are similar, and their task is to gradually amplify 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. The two inputs are merged through a connection layer and then passed through three transposed convolution layers. Each transposed convolution is followed by batch normalization and ReLU function activation to maintain feature consistency and nonlinearity. This design allows the network to incorporate new random changes while amplifying the image, increasing the diversity of the generated results. Through this hierarchical structure, the G3 network finally outputs a 1283-dimensional 3D image during training, matching the size of the original training samples. This multi-scale generation method enables the network to focus on both large-scale structures and fine details at the same time, which is very suitable 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 construct the discriminator, including:

[0044] The discriminator adopts a deep convolutional neural network structure and integrates a feature statistical mixture regularization mechanism (FSM) to enhance the control over 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 dimension 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;

[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 through 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] The training process was conducted on a high-performance workstation equipped with an NVIDIA Quadro RTX 5000 graphics card. A small batch training strategy with a batch size of 16-32 was adopted, and the Adam optimizer was used for parameter update, 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 to halve 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 GAN. The generator G tries to minimize the loss function L, while the discriminator D tries to maximize it. The goal is to make the samples generated by the generator as close to the real sample distribution as possible, making it difficult for the discriminator to distinguish between the generated samples and the real samples. Ex~p(x)[·]: represents the expectation of the real data x under the data distribution p(x), which is usually used to calculate the real part of the adversarial loss. This term is calculated by averaging a certain operation over all real data samples. Ez~q(z)[·]: represents the expectation of the latent variable z of the generative model under the prior distribution q(z), which is usually used to calculate the generated part of the adversarial loss. This term represents the average of a certain operation on the input of the generative model (usually a latent vector sampled from a Gaussian distribution or a uniform distribution). D(x): The discriminator D's judgment result on the input data x, which is usually used to determine whether the data x comes from the real data distribution or the generated data distribution. The output of the discriminator is usually a scalar, indicating the probability that the input sample is real data. D(G(z)): The discriminator D discriminates the generated data G(z), where G(z) is the sample generated by the generator G with the latent vector z as input. The goal of the discriminator is to judge the generated sample as fake data. This is the gradient of the discriminator D with respect to the input x^, which 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 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 expected features. The number 10 is the weight coefficient of this term, indicating its contribution to the total loss.

[0056] During the training process, we adopted an asymmetric update strategy: every time the discriminator is trained 5 times, the generator is trained once. This strategy helps to maintain the discriminator's ability to distinguish and prevent the generator from surpassing the discriminator too quickly. In the above example, a total of 800 epochs were trained, and a model checkpoint was saved every 50 epochs for easy detection, so as to facilitate subsequent analysis and selection of the best 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 binary 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-Lie 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 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 the G1 network, the G2 network, and the G3 network. 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. Then, the G1 network 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 of establishing the virtual rock model; Xr is the real rock model, Figure 3The technical flow chart of the method is shown. By extracting the characteristics of real rocks layer by layer from the high-dimensional vector Z composed of random noise and training them, a virtual three-dimensional rock model is obtained. Subsequently, the virtual three-dimensional rock model and the real three-dimensional rock model are marked and input into the discriminator for training and distinguishing them as real or virtual models. The judgment of the model is mainly based on the error, that is, the Wasserstein generative adversarial network-Lys penalty function. At the same time, feature statistical mixing regularization is added in the process of model establishment to reflect the diversity of rock model structure. Each time it is judged as a virtual rock model, the model parameters will be optimized to reduce the error. After continuous training, when the virtual rock model finally generated is identified as a real rock model by the discriminator, the modeling process is terminated.

[0062] S60: Binarizing the floating point number array based on a preset threshold value, removing isolated areas using morphological operations to remove noise, and obtaining a binary rock model.

[0063] Specifically, first, 0.5 can be used as a threshold for binarization, and values ​​less than 0.5 are regarded as pores (assigned to 1), and values ​​greater than or equal to 0.5 are regarded as rock matrix (assigned to 0). Then, morphological operations are used to remove isolated areas 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 above example, a comprehensive evaluation of the generated model shows that the average porosity of the generated model is 0.0714, which is only 2% different from the 0.07 of the real Berea sandstone sample. Other parameters such as permeability and Euler characteristic also show good consistency. In addition, we also 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, 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 the present method can accurately characterize 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 example, we successfully generated a 22003 The centimeter-scale model (about 10 billion voxels) provides a powerful tool for large-scale porous media research. This cross-scale generation capability demonstrates the superiority of the PWGAN method in capturing and reproducing complex pore structures. The generator that can control the generation effect of images of different sizes and the discriminator that maintains the image generation effect at multiple scales make it possible to generate rocks with complex pore structures.

[0069] Embodiment 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: including: 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, configured to perform normalization processing on each sub-sample in the sub-sample group, and randomly divide the normalized sub-sample group into a training set and a validation set;

[0074] A training module 84 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 sub-sample 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 matching 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 true, a floating point array with a value range between [0, 1] is generated;

[0076] The rock model acquisition module 86 is used to perform binarization processing on the floating point number array based on a preset threshold value, and use morphological operations to remove isolated areas for noise removal, so as to obtain a binary 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 includes four sub-networks connected from top to bottom: G0 network, G1 network, G2 network and G3 network. 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 passed through three transposed convolution layers, wherein each transposed convolution is followed by batch normalization and ReLU function activation, and the G3 network finally outputs a three-dimensional image of the first three-dimensional space size;

[0079] Constructing the discriminator: The main body of the discriminator consists of five 3D convolutional layers, each of which is followed by a ReLU activation function, which gradually reduces the dimension 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, and α is a random number in the range of [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 result of the input data x by the discriminator D, 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 latent variable z of the generative model under the prior distribution q(z), D(G(z)): the discriminant result of the generated data G(z) by the discriminator D, G(z) is the sample generated by the generator G with the latent 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 binary 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-Lie 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] Embodiment 3

[0090] The present invention relates to a computer-readable storage medium, in which instructions are stored. When the instructions are executed, a method for establishing a three-dimensional rock model is implemented. The process method and effect of the implementation at runtime are the same as 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 article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including 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 specification 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 sub-samples of a first three-dimensional space size, wherein the first three-dimensional space size is a sub-sample 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 sub-samples of the first three-dimensional space size to obtain a sub-sample group; Performing normalization processing on each sub-sample in the sub-sample group, and randomly dividing the normalized sub-sample group into a training set and a validation set; A generator is constructed by adopting a simplified Laplace pyramid structure, a discriminator is constructed by adopting 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 sub-sample group to obtain the trained discriminator and the generator; 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 output array is true, a floating point 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 in sequence: G0 network, G1 network, G2 network and G3 network. The G0 network serves as a 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, 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 passed through three transposed convolution layers, wherein each transposed convolution is followed by batch normalization and ReLU function activation, and the G3 network finally outputs a three-dimensional image of the first three-dimensional space size.

3. A method for establishing a three-dimensional rock model according to claim 2, characterized in that: The discriminator is constructed by using a deep convolutional neural network structure and an integrated feature statistics hybrid regularization mechanism, which specifically includes: The main body of the discriminator consists of five 3D convolutional layers, each followed by a ReLU activation function, which gradually reduces the dimension 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, 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, 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]. We also added the FSMR loss term 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.

4. A method for establishing a three-dimensional rock model according to claim 1, characterized in that: The separately training the discriminator and the generator specifically includes: Train the discriminator 5 times and the generator once; In the discriminator, the loss function 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 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 result of the input data x by the discriminator D, 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 latent variable z of the generative model under the prior distribution q(z), D(G(z)): the discriminant result of the generated data G(z) by the discriminator D, G(z) is the sample generated by the generator G with the latent vector z as input, is the gradient of the discriminator D with respect to the input x^; During the training process, the generator loss, the discriminator loss, and the 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, wherein the key parameters include at least porosity and permeability; During the training process, the binary 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-Lie penalty function.

5. A method for establishing a three-dimensional rock model according to claim 1, characterized in that: After the binary rock model is obtained, the following further includes: a testing step: 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 but are not limited to 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, used for cutting 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 a characteristic structure of the rock sample through a two-point correlation function analysis; 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, used for performing normalization processing on each sub-sample in the sub-sample group, and randomly dividing the normalized sub-sample group into a training set and a validation set; A training module, 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 a normalized sub-sample group to obtain the trained discriminator and the generator; A floating-point array generation module is used to generate a random noise vector group matching 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 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 number 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 for: Constructing a generator: A simplified Laplacian pyramid structure is adopted, which includes four sub-networks connected from top to bottom: G0 network, G1 network, G2 network and G3 network. 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 passed through three transposed convolution layers, wherein each transposed convolution is followed by batch normalization and ReLU function activation, and the G3 network finally outputs a three-dimensional image of the first three-dimensional space size; Constructing the discriminator: The main body of the discriminator consists of five 3D convolutional layers, each of which is followed by a ReLU activation function, which gradually reduces the dimension 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, and α is a random number in the range of [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; Train the discriminator and the generator: Train the discriminator 5 times and the generator once; In the discriminator, the loss function 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 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 result of the input data x by the discriminator D, 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 latent variable z of the generative model under the prior distribution q(z), D(G(z)): the discriminant result of the generated data G(z) by the discriminator D, G(z) is the sample generated by the generator G with the latent vector z as input, is the gradient of the discriminator D with respect to the input x^; During the training process, the generator loss, the discriminator loss, and the 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, wherein the key parameters include at least porosity and permeability; During the training process, the binary 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-Lie 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, which is used to calculate the key parameters of the binarized rock model and the two-point correlation function after obtaining the binarized rock model, 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.

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 as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Sedimentary rock reconstruction method and system

    CN103323575A

  • GAN data enhanced chain transmission bearing fault diagnosis method

    CN118427610A

Cited By

  • Rock core three-dimensional reconstruction method based on KAN convolutional network

    CN119722958A

  • Method and system for evaluating output power of detonating cord

    CN121391849A