Digital core construction method and system integrating multi-source experiments and variational diffusion model
By integrating multi-source experiments and variational diffusion models, Perlin noise and neural network technology are used to solve the problems of low efficiency and high cost of 3D digital core construction, achieve fast and efficient 3D digital core reconstruction, and improve the efficiency of oil and gas exploration and development. and accuracy.
Patent Information
- Application Number
- CN202410129638.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-30
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-01-30
AI Technical Summary
Existing three-dimensional digital core construction methods are inefficient and costly, making it difficult to quickly and accurately reflect the microscopic pore structure of underground reservoirs, limiting the efficiency of oil and gas exploration and development and resource utilization.
Integrate multi-source experiments and variational diffusion models, use Perlin noise to generate random three-dimensional digital core samples, and train through autoencoders and neural network models to generate three-dimensional digital cores consistent with experimental data to achieve fast and efficient reconstruction.
The reconstruction of three-dimensional digital cores is completed in seconds, which reduces costs, improves calculation efficiency and stability, enhances the generalization ability and practicality of digital cores, and accurately reflects the flow characteristics of underground reservoirs.
Smart Images

Figure CN117974896B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-dimensional digital core construction, and more specifically, to a digital core construction method and system integrating multi-source experiments and variational diffusion models. Background Art
[0002] In the exploration and development of oil and gas fields, core samples are important actual samples of underground reservoirs, providing key information such as reservoir type, pore structure and oil and gas content; however, coring is costly and core samples cannot be reused in many experiments. Therefore, digital core technology, which digitizes core samples and creates virtual core models, has developed rapidly in the fields of petroleum and mining in recent years. This technology can perform multiple analyses and experiments without destroying the actual core, thereby improving efficiency, reducing costs, and reducing resource waste; the construction of three-dimensional digital cores is the basis of digital core experiments. Accurate three-dimensional digital cores can reflect the microscopic pore structure of real reservoirs, making digital core simulations have practical application value.
[0003] At present, the main methods for constructing three-dimensional digital cores include physical experimental methods and numerical reconstruction methods. Among them, the physical experimental method relies on CT scanning or electron microscopy to obtain high-resolution core images, but the construction cost is relatively high. The numerical reconstruction method uses mathematical modeling and model parameter adjustment to generate a digital core model that is verified with actual core experimental data to ensure its accuracy, but the traditional numerical reconstruction method is less efficient. Summary of the invention
[0004] The purpose of the present invention is to provide a digital core construction method and system that integrates multi-source experiments and variational diffusion models, combines multi-source core experimental data with a generative deep learning algorithm, and forms a reconstruction method that can quickly and efficiently generate three-dimensional digital cores that conform to experimental data. This method provides a more powerful, efficient and accurate means for the reconstruction of three-dimensional digital cores, helps to deeply understand the characteristics of underground reservoirs, optimize exploration and development decisions, reduce costs, and at the same time improve resource utilization efficiency, which has important practical significance for the oil and gas industry and geological science research.
[0005] The above technical objectives of the present invention are achieved through the following technical solutions:
[0006] In a first aspect, the present application provides a digital core construction method integrating multi-source experiments and variational diffusion models, comprising the following steps:
[0007] Perlin noise is used to randomly generate multiple random three-dimensional digital core samples of preset sizes;
[0008] Inputting a plurality of random three-dimensional digital core samples into a preset first autoencoder, and training the first autoencoder based on a stochastic gradient descent algorithm until the loss function of the first autoencoder reaches convergence, thereby obtaining a digital core autoencoder corresponding to the first autoencoder and completed in training;
[0009] Acquire geometric parameters of any one or more samples from a plurality of random three-dimensional digital core samples, perform microscopic seepage simulation processing on the corresponding random three-dimensional digital core samples based on the geometric parameters, and obtain simulation results;
[0010] Based on the simulation results, core sample parameters corresponding to any one or more samples are obtained, geometric parameters and corresponding core sample parameters are fitted into sample multi-source data feature vectors in a preset order, and multiple sample inflow sections corresponding to random three-dimensional digital core samples are intercepted;
[0011] Based on the digital core autoencoder, an initial model based on a neural network is constructed, and the sample multi-source data feature vector and the sample inflow section are input into the initial model for processing to obtain a variational diffusion model that corresponds to the initial model and is trained.
[0012] The target multi-source data feature vector and target inflow cross section of the original digital core are determined, and the target multi-source data feature vector and target inflow cross section are input into the variational diffusion model for processing to obtain the target three-dimensional digital core corresponding to the original digital core.
[0013] The beneficial effects of the present invention are as follows: in the present scheme, firstly, a plurality of random three-dimensional digital core samples are generated by Perlin noise, and then the preset first autoencoder is trained by using the random three-dimensional digital core samples to obtain a digital core autoencoder; secondly, the initial model is trained by using the random three-dimensional digital core samples to obtain a variational diffusion model corresponding to the initial model and trained; finally, the target multi-source data feature vector and the target inflow section of the original digital core are input by using the variational diffusion model, so as to generate a target three-dimensional digital core corresponding to the original digital core; a large number of three-dimensional digital core samples are generated based on Perlin noise, so as to establish an autoencoder to obtain a low-dimensional latent variable space representation, effectively reducing the model complexity and enhancing the computational efficiency and stability; on the basis of the original digital core, a large number of digital core-multi-source experimental data sample libraries are obtained at low cost by numerical simulation, and then the digital core is reconstructed by using the variational diffusion model based on the multi-source experimental data, so that the reconstruction of the three-dimensional digital core can be completed within seconds, replacing the traditional three-dimensional digital core construction method, greatly improving the efficiency and reducing the cost.
[0014] In this scheme, a large number of randomly generated digital cores are used as samples to obtain a robust digital core autoencoder (Encoder-Decoder), and the feature space of the autoencoder is used as the latent variable space of the variational diffusion model; and by utilizing microscopic seepage simulation, a large number of experimental data samples are obtained quickly and inexpensively, and a large-scale three-dimensional digital core-multi-source experimental result data set is constructed; at the same time, the cross-sections randomly obtained from the three-dimensional digital core are used as constraints for the inversion of the digital core, which not only effectively expands the sample data scale, but also further improves the generalization ability and practicality of digital core reconstruction. In addition, the reconstructed digital core is based on multi-source experimental data, including various parameters such as rock geology, geometry, and physics as constraints, which can more accurately reflect the real flow characteristics of the underground reservoir.
[0015] Based on the above technical solution, the present invention can also be improved as follows.
[0016] Furthermore, the above method also includes:
[0017] Perform microscopic seepage simulation processing on the target three-dimensional digital core to obtain multi-source experimental data of the target three-dimensional digital core, compare the multi-source experimental data of the target three-dimensional digital core with the multi-source experimental data of the original digital core, and obtain a comparison result;
[0018] If the comparison result meets the preset conditions, the target three-dimensional digital core is determined as a qualified target three-dimensional digital core; if the comparison result does not meet the preset conditions, a new target three-dimensional digital core is regenerated based on the variational diffusion model until the new target three-dimensional digital core meets the preset conditions.
[0019] Furthermore, the initial model includes a digital core autoencoder and a learning layer, and the learning layer includes a vector linear layer, a cross-section linear layer, a time step linear layer and a neural network module; wherein the variational diffusion model is trained in the following manner:
[0020] The random three-dimensional digital core samples are sequentially input into the encoder of the digital core autoencoder according to the preset time step length for processing, so as to obtain the random three-dimensional digital core samples at each time step and arrange them as the first latent variable of the target tensor;
[0021] Input the sample multi-source data feature vector into the vector linear layer for processing to obtain the data vector arranged as the first tensor;
[0022] The sample inflow section is input into the section linear layer for processing, and the section vector arranged as the first tensor is obtained;
[0023] The time vectors at each time step are obtained through the time step linear layer and arranged as the first tensor;
[0024] Connect the first latent variable with the time vector, data vector and cross-section vector corresponding to the time step in the channel direction to obtain the first vector arranged as the second tensor;
[0025] The first vector is input into a neural network module for processing to obtain a second vector arranged as a target tensor, wherein the second vector arranged as a target tensor represents a noise estimate of the first latent variable;
[0026] Calculate the mean square error between the noise estimate and the true noise value, perform backpropagation according to the preset error function, and update the network parameters of the learning layer;
[0027] The learning layer after updating the network parameters is iterated according to the above steps until the preset error function reaches convergence, and the learning layer and the digital core autoencoder at which the preset error function reaches convergence are determined as the variational diffusion model that has completed training.
[0028] Furthermore, the above-mentioned target three-dimensional digital core is obtained by the following method:
[0029] Based on the original digital core and the preset time step length, the corresponding latent variable noise value at each time step is obtained by using the trained learning layer;
[0030] The target latent variables arranged as the target tensor are calculated using the latent variable noise values;
[0031] The target latent variable is input into the decoder in the digital core autoencoder for processing, and filtered according to the preset first condition to obtain the target three-dimensional digital core.
[0032] Furthermore, the above-mentioned use of Perlin noise to randomly generate multiple random three-dimensional digital core samples of preset sizes is specifically as follows:
[0033] The parameter frequency, amplitude and frequency fold of Perlin noise are randomly selected within a preset range, and the generated matrix is filtered according to the first condition to obtain multiple random three-dimensional digital core samples.
[0034] Furthermore, the objective function of the above target latent variable is expressed by the first formula, which is:
[0035] Where: α t =1-β t , β t =0.02-2×10 -5 t;
[0036] In the formula, Z0 represents the target latent variable, Z1 represents the latent variable when the time step is 1, Represents the hidden variable noise value when the time step is 1.
[0037] In a second aspect, the present application provides a digital core construction system integrating multi-source experiments and variational diffusion models, which is applied to the digital core construction method integrating multi-source experiments and variational diffusion models in any one of the first aspects, including:
[0038] The first module is used to randomly generate multiple random three-dimensional digital core samples of preset sizes using Perlin noise;
[0039] The second module is used to input a plurality of random three-dimensional digital core samples into a preset first autoencoder, and train the first autoencoder based on a stochastic gradient descent algorithm until the loss function of the first autoencoder reaches convergence, thereby obtaining a digital core autoencoder corresponding to the first autoencoder and completed with training;
[0040] The third module is used to obtain geometric parameters of any one or more samples from a plurality of random three-dimensional digital core samples, perform microscopic seepage simulation processing on the corresponding random three-dimensional digital core samples based on the geometric parameters, and obtain simulation results;
[0041] The fourth module is used to obtain core sample parameters corresponding to any one or more samples based on the simulation results, fit the geometric parameters and the corresponding core sample parameters into the sample multi-source data feature vector according to a preset order, and intercept multiple sample inflow sections corresponding to the random three-dimensional digital core samples;
[0042] The fifth module is used to construct an initial model based on a neural network based on the digital core autoencoder, and input the sample multi-source data feature vector and the sample inflow section into the initial model for processing to obtain a variational diffusion model that corresponds to the initial model and is trained;
[0043] The sixth module is used to determine the target multi-source data feature vector and target inflow section of the original digital core, input the target multi-source data feature vector and target inflow section into the variational diffusion model for processing, and obtain the target three-dimensional digital core corresponding to the original digital core.
[0044] Furthermore, the above system also includes:
[0045] The seventh module is used to perform microscopic seepage simulation processing on the target three-dimensional digital core to obtain multi-source experimental data of the target three-dimensional digital core, compare the multi-source experimental data of the target three-dimensional digital core with the multi-source experimental data of the original digital core, and obtain a comparison result;
[0046] The eighth module is used to determine the target three-dimensional digital core as a qualified target three-dimensional digital core if the comparison result meets the preset conditions; if the comparison result does not meet the preset conditions, regenerate a new target three-dimensional digital core based on the variational diffusion model until the new target three-dimensional digital core meets the preset conditions.
[0047] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the methods in the first aspect when executing the computer program.
[0048] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute any one of the methods in the first aspect.
[0049] Compared with the prior art, the present invention has at least the following beneficial effects:
[0050] In the present application, firstly, a plurality of random three-dimensional digital core samples are generated by Perlin noise, and then the preset first autoencoder is trained by using the random three-dimensional digital core samples to obtain a digital core autoencoder; secondly, the initial model is trained by using the random three-dimensional digital core samples to obtain a variational diffusion model corresponding to the initial model and trained; finally, the target multi-source data feature vector and the target inflow section of the original digital core are input by using the variational diffusion model, so as to generate a target three-dimensional digital core corresponding to the original digital core; a large number of three-dimensional digital core samples are generated based on Perlin noise, so as to establish an autoencoder to obtain a low-dimensional latent variable space representation, which effectively reduces the model complexity and enhances the computational efficiency and stability; on the basis of the original digital core, a large number of digital core-multi-source experimental data sample libraries are obtained at low cost through numerical simulation, and then the digital core is reconstructed through the variational diffusion model based on the multi-source experimental data, which can complete the reconstruction of the three-dimensional digital core in seconds, replacing the traditional three-dimensional digital core construction method, greatly improving efficiency and reducing costs.
[0051] In the present application, a large number of randomly generated digital cores are used as samples to obtain a robust digital core autoencoder (Encoder-Decoder), and the feature space of the autoencoder is used as the hidden variable space of the variational diffusion model; and by utilizing microscopic seepage simulation, a large number of experimental data samples are obtained quickly and inexpensively, and a large-scale three-dimensional digital core-multi-source experimental result data set is constructed; at the same time, the cross-sections randomly obtained from the three-dimensional digital core are used as constraints for inverting the digital core, which not only effectively expands the sample data scale, but also further improves the generalization ability and practicality of digital core reconstruction, and the reconstructed digital core is based on multi-source experimental data, including various parameters such as rock geology, geometry, and physics as constraints, which can more accurately reflect the real flow characteristics of the underground reservoir. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:
[0053] Figure 1 A schematic diagram of a random three-dimensional digital core sample generated in an embodiment of the present invention;
[0054] Figure 2 Schematic diagram of a digital core autoencoder according to an embodiment of the present invention;
[0055] Figure 3 Schematic diagram of two-phase microscopic seepage in microscopic seepage simulation in an embodiment of the present invention;
[0056] Figure 4 Schematic diagram of digital core relative permeability and pore throat distribution in an embodiment of the present invention;
[0057] Figure 5 It is a schematic diagram of the sample inflow section or the target inflow section obtained in the X, Y, and Z directions in an embodiment of the present invention;
[0058] Figure 6 is a schematic diagram of a variational diffusion model in an embodiment of the present invention;
[0059] Figure 7 A schematic diagram of a target three-dimensional digital core reconstructed using a variational diffusion model in an embodiment of the present invention;
[0060] Figure 8 It is a schematic diagram of the permeability, porosity, average roar radius, and pore-throat ratio error of the target three-dimensional digital core in an embodiment of the present invention;
[0061] Fig. 9 Schematic diagram of pore throat distribution and phase permeability curve error of target three-dimensional digital core in an embodiment of the present invention;
[0062] Fig.10 A method flow chart of a construction method in an embodiment of the present invention;
[0063] Fig.11 It is a connection diagram of a system constructed in an embodiment of the present invention. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0065] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0066] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0067] In the description of the embodiments of the present invention, "plurality" means at least 2.
[0068] Embodiment 1:
[0069] This embodiment provides a digital core construction method that integrates multi-source experiments and variational diffusion models. Fig.10 As shown, the following steps are included:
[0070] S1, using Perlin noise to randomly generate multiple random three-dimensional digital core samples of preset size.
[0071] Among them, Perlin noise can be used to generate random three-dimensional digital core samples of size (256, 256, 256). In order to achieve sufficient diversity, the parameter frequency, amplitude and frequency doubling of Perlin noise are also randomized in a certain range, and the generated matrix is filtered with a threshold of 0.5 to obtain a three-dimensional matrix with each element value of 0 or 1; Figure 1 As shown, Figure 1 To generate 10 million random three-dimensional digital core samples of size (256, 256, 256).
[0072] Optionally, the above-mentioned random generation of multiple random three-dimensional digital core samples of preset sizes using Perlin noise is specifically as follows:
[0073] The parameter frequency, amplitude and frequency fold of Perlin noise are randomly selected within a preset range, and the generated matrix is filtered according to the first condition to obtain multiple random three-dimensional digital core samples; wherein the first condition is that the threshold value is 0.5.
[0074] S2, inputting a plurality of random three-dimensional digital core samples into a preset first autoencoder, and training the first autoencoder based on a stochastic gradient descent algorithm until the loss function of the first autoencoder converges, thereby obtaining a digital core autoencoder corresponding to the first autoencoder and trained.
[0075] Among them, an Encoder-Decoder based on two-dimensional convolution is constructed, and an autoencoder is constructed based on convolutional and deconvolutional neural networks. The encoder part is denoted by E and the decoder part is denoted by D. Its purpose is to represent the (256, 256, 256) data as a 4096-dimensional (16, 16, 16) tensor, such as Figure 2 As shown; specifically, the Encoder part transforms the input matrix of (256, 256, 256) into a latent variable of (16, 16, 16), and the Decoder part transforms the input matrix of (16, 16, 16) into (256, 256, 256). The loss function can be defined as a logarithmic loss function. The obtained random three-dimensional digital core samples are input into the Encoder-Decoder for forward calculation and back propagation. The training is performed using the stochastic gradient descent algorithm and repeated enough times until the loss function converges.
[0076] S3, obtaining geometric parameters of any one or more samples from a plurality of random three-dimensional digital core samples, performing microscopic seepage simulation processing on the corresponding random three-dimensional digital core samples based on the geometric parameters, and obtaining simulation results.
[0077] Among them, for any sample V in the randomly generated random three-dimensional digital core sample, its geometric parameters are obtained, and microscopic seepage simulation is performed, such as Figure 3 As shown; Based on the simulation results, the porosity, permeability, mercury injection curve, and phase permeability curve (such as Figure 4 ), the geometric parameters and these points and sequence data are uniformly expressed as a multi-source experimental result vector S in a fixed order, and any inflow section I of the digital core is intercepted (such as Figure 5 The goal is to construct a three-dimensional digital core V as the input and output.
[0078] S4, based on the simulation results, core sample parameters corresponding to any one or more samples are obtained, geometric parameters and corresponding core sample parameters are fitted into sample multi-source data feature vectors in a preset order, and multiple sample inflow sections corresponding to random three-dimensional digital core samples are intercepted.
[0079] Specifically, the side length of any sample in the random three-dimensional digital core sample can be set to 51.2 mm, and the faces perpendicular to the x-axis of the six faces of the cube with a side length of 51.2 mm are set as the inflow and outflow constant pressure boundaries (Dirichlet boundary conditions), and the remaining faces are set as closed conditions. The Lattice Bolzmann and finite volume methods are used to study single-phase and two-phase flows, respectively, and obtain spatiotemporal data such as flow velocity, pressure, and saturation field, such as Figure 3 As shown in the figure; the former mainly obtains absolute permeability, mercury injection curve, pore throat distribution curve, and the latter mainly obtains relative permeability curve and other data, such as Figure 4 As shown; then the obtained point and sequence data (point data and curve data) are assembled into a multi-source experimental data vector S in a fixed order, that is, the sample multi-source data feature vector.
[0080] S5, based on the digital core autoencoder, builds an initial model based on a neural network, and inputs the sample multi-source data feature vector and the sample inflow section into the initial model for processing, and obtains a variational diffusion model that corresponds to the initial model and is trained.
[0081] Optionally, the initial model includes a digital core autoencoder and a learning layer, the learning layer includes a vector linear layer, a cross-section linear layer, a time step linear layer and a neural network module; wherein the variational diffusion model is trained in the following manner:
[0082] The random three-dimensional digital core samples are sequentially input into the encoder of the digital core autoencoder according to the preset time step length for processing, and the random three-dimensional digital core samples are obtained at each time step and arranged as the first latent variable of the target tensor.
[0083] The sample multi-source data feature vector is input into the vector linear layer for processing to obtain the data vector arranged as the first tensor.
[0084] The sample flow section is input into the section linear layer for processing to obtain the section vector arranged as the first tensor.
[0085] The time vectors at each time step are obtained through the time step linear layer and arranged as the first tensor.
[0086] The first latent variable is connected with the time vector, data vector and cross-section vector corresponding to the time step in the channel direction to obtain the first vector arranged as the second tensor.
[0087] The first vector is input into a neural network module for processing to obtain a second vector arranged as a target tensor, where the second vector arranged as a target tensor represents a noise estimate of the first latent variable.
[0088] Calculate the mean square error between the noise estimate and the true noise value, perform backpropagation according to the preset error function, and update the network parameters of the learning layer.
[0089] The learning layer after updating the network parameters is iterated according to the above steps until the preset error function reaches convergence, and the learning layer and the digital core autoencoder at which the preset error function reaches convergence are determined as the variational diffusion model that has completed training.
[0090] Among them, according to the dimension of time step embedding and the dimension of sample multi-source data feature vector, a learnable linear layer L is established respectively. T_embed(time-step linear layer) and L S_embed (Vector linear layer), convert both conditional vectors into 16*16=256 dimensions; construct a learnable convolutional layer L I_embed (cross-section linear layer) so that the image condition matrix I is transformed into (16, 16); specifically, a UNet with attention neural network module can be constructed based on the Resnet backbone and the Attention mechanism, which can transform the second tensor of size (19, 16, 16) into a target tensor (16, 16, 16).
[0091] Specifically, the training process of the above initial model can be expressed as:
[0092] 1. For a given time length T, T = {1, 2, ..., 1000}, perform the forward diffusion process: input the (256, 256, 256) digital core V into the trained encoder E, convert it into a (16, 16, 16) latent variable Z0, and for a given T, calculate the noise-added in, represents the standard normal distribution; α t =1-β t , β t =0.02-2×10 -5 t.
[0093] 2. Randomly select a cross section perpendicular to the X, Y, and Z axes of the current digital core sample, that is, a two-dimensional Boolean matrix (256, 256), denoted as I; for a given time length T, perform the following steps:
[0094] 1) Use time step embedding to get the embedding of the current T and input it into L T_embed Layer, obtain a vector T_embed of length 256, and arrange it into a (16, 16) tensor.
[0095] 2) Input the multi-source data results into L S_embed , obtain a vector S_embed of length 256 and arrange it into a (16, 16) tensor.
[0096] 3) Input the core interface slice I into L I_embed , get the (16, 16) tensor I_embed.
[0097] 4) The hidden variable Z of the current time step t Connect with T_embed, S_embed, and I_embed in the channel direction to obtain a (19, 16, 16) tensor.
[0098] 5) Input the tensor calculated in 4) into Unet with Attention to obtain a tensor of size (16, 16, 16), which is the latent variable noise estimate
[0099] 6) Calculate the latent variable noise estimate and the true value N T =Z T -MSE (mean square error) of Z0.
[0100] 7) According to the error function, back propagation is performed to update the neural network parameters, that is, the learning layer after the network parameters are updated is iterated according to the above steps until the preset error function converges, and the learning layer and the digital core autoencoder at which the preset error function converges are determined as the trained variational diffusion model.
[0101] The schematic diagram of the variational diffusion model can be found in Figure 6 ,exist Figure 6 In this example, E represents the encoder, Z0 is a hidden variable, and Z T Represents the first latent variable after adding noise The three types of vector data are then input into the corresponding layers in the learning layer for processing, namely: the sample inflow section is input into the section linear layer, the sample multi-source data feature vector is input into the vector linear layer, and the first latent variable obtains the time vector through the time step linear layer; the output in the learning layer is then connected according to the channel direction, then the second tensor is (19, 16, 16), and the target tensor is (16, 16, 16); finally, when the variational diffusion model is used to reconstruct the core, the final latent variable is input into the decoder D, and the reconstructed three-dimensional core is obtained through the decoder D.
[0102] S6, determining the target multi-source data feature vector and the target inflow cross section of the original digital core, inputting the target multi-source data feature vector and the target inflow cross section into the variational diffusion model for processing, and obtaining the target three-dimensional digital core corresponding to the original digital core.
[0103] Optionally, based on the original digital core and the preset time step length, the corresponding latent variable noise value at each time step is obtained by using the trained learning layer.
[0104] The target latent variables arranged as the target tensor are calculated using the latent variable noise values.
[0105] The target latent variable is input into the decoder in the digital core autoencoder for processing, and filtered according to the preset first condition to obtain the target three-dimensional digital core.
[0106] Among them, given the core cross-section image I (target inflow cross-section) and the multi-source data S vector (target multi-source data feature vector), the corresponding three-dimensional digital core is generated. The specific steps are as follows:
[0107] 1. Given a larger time length T (such as 1000), generate a target tensor of the same size as the hidden variable, that is, a random Gaussian noise of (16, 16, 16), denoted as Z T .
[0108] 2. Perform the reverse diffusion process, starting from t = T until t = 1, repeating the following steps:
[0109] 1) Use time step embedding to get the embedding of the current t and input it into L T_embed Layer, obtain a vector T_embed of length 256, and arrange it into a (16,16) tensor.
[0110] 2) Input the multi-source data S vector into L S_embed , obtain a vector S_embed of length 256 and arrange it into a (16,16) tensor.
[0111] 3) Input I of size (256,256) into L I_embed , get the (16,16) tensor I_embed.
[0112] 4) The hidden variable Z of the current time step t Connect with T_embed, S_embed, and I_embed in the channel direction to obtain a tensor of (19, 16, 16); it can be seen that this is consistent with the training process of the initial model mentioned above. In actual use, the three-dimensional digital core is reconstructed according to the training order.
[0113] 5) Input the tensor calculated in 4) into Unet with Attention to obtain a tensor of size (16,16,16), which is the hidden variable noise estimate corresponding to the current time step t
[0114] 6) Calculation Set t=t-1 and calculate the final hidden variable Z0 is input into the decoder D and filtered by a threshold of 0.5 to finally obtain a three-dimensional digital core.
[0115] Optionally, the objective function of the above target latent variable is expressed by a first formula, which is:
[0116] Where: αt =1-β t , β t =0.02-2×10 -5 t;
[0117] In the formula, Z0 represents the target latent variable, Z1 represents the latent variable when the time step is 1, Represents the hidden variable noise value when the time step is 1.
[0118] Optionally, the above method further includes:
[0119] Microscopic seepage simulation processing is performed on the target three-dimensional digital core to obtain multi-source experimental data of the target three-dimensional digital core, and the multi-source experimental data of the target three-dimensional digital core is compared with the multi-source experimental data of the original digital core to obtain a comparison result.
[0120] If the comparison result meets the preset conditions, the target three-dimensional digital core is determined as a qualified target three-dimensional digital core; if the comparison result does not meet the preset conditions, a new target three-dimensional digital core is regenerated based on the variational diffusion model until the new target three-dimensional digital core meets the preset conditions.
[0121] The schematic diagram of the target three-dimensional digital core obtained by using the variational diffusion model can be found in Figure 7 , by comparing the multi-source experimental data of the target 3D digital core with the multi-source experimental data of the original digital core, it can be seen whether the requirements are met, see Figure 8 and Fig. 9 After fluid simulation of the target three-dimensional digital core, the corresponding multi-source experimental data is obtained. Figure 8 and Fig. 9 It shows that the multi-source experimental data of the target three-dimensional digital core are highly consistent with the multi-source experimental data of the original digital core, which means that the three-dimensional digital core reconstructed by the variational diffusion model is statistically similar to the original digital core in terms of geological, physical, geometric and other parameters affecting underground flow characteristics, and can be used as an approximate substitute for the original digital core.
[0122] Embodiment 2:
[0123] This embodiment provides a digital core construction system integrating multi-source experiments and variational diffusion models, which is applied to the digital core construction method integrating multi-source experiments and variational diffusion models in any one of Embodiment 1, such as Fig.11 As shown, including:
[0124] The first module is used to randomly generate multiple random three-dimensional digital core samples of preset sizes using Perlin noise.
[0125] The second module is used to input multiple random three-dimensional digital core samples into a preset first autoencoder, and train the first autoencoder based on a stochastic gradient descent algorithm until the loss function of the first autoencoder converges, thereby obtaining a digital core autoencoder corresponding to the first autoencoder and completed with training.
[0126] The third module is used to obtain the geometric parameters of any one or more samples from a plurality of random three-dimensional digital core samples, perform microscopic seepage simulation processing on the corresponding random three-dimensional digital core samples based on the geometric parameters, and obtain simulation results.
[0127] The fourth module is used to obtain the core sample parameters corresponding to any one or more samples based on the simulation results, fit the geometric parameters and the corresponding core sample parameters into the sample multi-source data feature vector in a preset order, and intercept multiple sample inflow sections corresponding to the random three-dimensional digital core samples.
[0128] The fifth module is used to build an initial model based on a neural network based on the digital core autoencoder, and input the sample multi-source data feature vector and the sample inflow section into the initial model for processing to obtain a variational diffusion model that corresponds to the initial model and is trained.
[0129] The sixth module is used to determine the target multi-source data feature vector and target inflow section of the original digital core, input the target multi-source data feature vector and target inflow section into the variational diffusion model for processing, and obtain the target three-dimensional digital core corresponding to the original digital core.
[0130] Optionally, the above system further includes:
[0131] The seventh module is used to perform microscopic seepage simulation processing on the target three-dimensional digital core to obtain multi-source experimental data of the target three-dimensional digital core, compare the multi-source experimental data of the target three-dimensional digital core with the multi-source experimental data of the original digital core, and obtain comparison results.
[0132] The eighth module is used to determine the target three-dimensional digital core as a qualified target three-dimensional digital core if the comparison result meets the preset conditions. If the comparison result does not meet the preset conditions, a new target three-dimensional digital core is regenerated based on the variational diffusion model until the new target three-dimensional digital core meets the preset conditions.
[0133] Embodiment 3:
[0134] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any method in Embodiment 1 is implemented.
[0135] Embodiment 4:
[0136] This embodiment provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute any method in Embodiment 1.
[0137] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A digital core construction method integrating multi-source experiments and variational diffusion model, characterized in that: The following steps are involved: Perlin noise is used to randomly generate multiple random three-dimensional digital core samples of preset sizes; Inputting a plurality of the random three-dimensional digital core samples into a preset first autoencoder, and training the first autoencoder based on a stochastic gradient descent algorithm until a loss function of the first autoencoder reaches convergence, thereby obtaining a digital core autoencoder corresponding to the first autoencoder and completed in training; Acquire geometric parameters of any one or more samples from the plurality of random three-dimensional digital core samples, perform microscopic seepage simulation processing on the corresponding random three-dimensional digital core samples based on the geometric parameters, and obtain simulation results; Based on the simulation results, core sample parameters corresponding to any one or more samples are obtained, the geometric parameters and the corresponding core sample parameters are fitted into a sample multi-source data feature vector in a preset order, and a plurality of sample inflow sections corresponding to the random three-dimensional digital core samples are intercepted; Based on the digital core autoencoder, an initial model based on a neural network is constructed, and the sample multi-source data feature vector and the sample inflow section are input into the initial model for processing to obtain a variational diffusion model that corresponds to the initial model and is trained; Determine a target multi-source data feature vector and a target inflow cross section of the original digital core, input the target multi-source data feature vector and the target inflow cross section into the variational diffusion model for processing, and obtain a target three-dimensional digital core corresponding to the original digital core; The initial model includes a digital core autoencoder and a learning layer, wherein the learning layer includes a vector linear layer, a cross-section linear layer, a time step linear layer and a neural network module; wherein the variational diffusion model is trained in the following manner: The random three-dimensional digital core samples are sequentially input into the encoder of the digital core autoencoder according to the preset time step length for processing, so as to obtain the random three-dimensional digital core samples at each time step and arrange them into the first latent variable of the target tensor; Input the sample multi-source data feature vector into the vector linear layer for processing to obtain the data vector arranged as the first tensor; Inputting the sample inflow section into the section linear layer for processing to obtain the section vector arranged as a first tensor; Obtaining a time vector at each time step and arranging it into a first tensor through the time step linear layer; Connecting the first latent variable with the time vector, the data vector and the cross-section vector corresponding to the time step in the channel direction to obtain a first vector arranged as a second tensor; Inputting the first vector into the neural network module for processing to obtain a second vector arranged as a target tensor, wherein the second vector arranged as a target tensor represents a noise estimate of the first latent variable; Calculate the mean square error between the noise estimate and the true noise value, perform backpropagation according to the preset error function, and update the network parameters of the learning layer; Iterating the above steps based on the learning layer after updating the network parameters until the preset error function reaches convergence, and determining the learning layer where the preset error function reaches convergence and the digital core autoencoder as the variational diffusion model that has completed training; The target three-dimensional digital core is obtained by the following method: Based on the original digital core and the preset time step length, the corresponding latent variable noise estimation value at each time step is obtained by using the trained learning layer; Calculating the target latent variables arranged as target tensors using the latent variable noise estimates; The target latent variable is input into the decoder in the digital core autoencoder for processing, and filtered according to the preset first condition to obtain the target three-dimensional digital core.
2. The digital core construction method integrating multi-source experiments and variational diffusion model according to claim 1 is characterized in that: The method further comprises: Performing microscopic seepage simulation processing on the target three-dimensional digital core to obtain multi-source experimental data of the target three-dimensional digital core, comparing the multi-source experimental data of the target three-dimensional digital core with the multi-source experimental data of the original digital core, and obtaining a comparison result; If the comparison result meets the preset conditions, the target three-dimensional digital core is determined as a qualified target three-dimensional digital core; if the comparison result does not meet the preset conditions, a new target three-dimensional digital core is regenerated based on the variational diffusion model until the new target three-dimensional digital core meets the preset conditions.
3. The digital core construction method integrating multi-source experiments and variational diffusion model according to claim 1 is characterized in that: Perlin noise is used to randomly generate multiple random three-dimensional digital core samples of preset sizes, specifically: The parameter frequency, amplitude and frequency fold of Perlin noise are randomly selected within a preset range, and the generated matrix is filtered according to the first condition to obtain multiple random three-dimensional digital core samples.
4. A digital core construction system integrating multi-source experiments and variational diffusion models, applied to a digital core construction method integrating multi-source experiments and variational diffusion models as described in any one of claims 1 to 3, characterized in that: include: The first module is used to randomly generate multiple random three-dimensional digital core samples of preset sizes using Perlin noise; The second module is used to input the plurality of random three-dimensional digital core samples into a preset first autoencoder, and train the first autoencoder based on a stochastic gradient descent algorithm until the loss function of the first autoencoder converges, thereby obtaining a digital core autoencoder corresponding to the first autoencoder and completed with training; The third module is used to obtain geometric parameters of any one or more samples from the plurality of random three-dimensional digital core samples, perform microscopic seepage simulation processing on the corresponding random three-dimensional digital core samples based on the geometric parameters, and obtain simulation results; The fourth module is used to obtain core sample parameters corresponding to any one or more samples based on the simulation results, fit the geometric parameters and the corresponding core sample parameters into sample multi-source data feature vectors according to a preset order, and intercept multiple sample inflow sections corresponding to the random three-dimensional digital core samples; The fifth module is used to construct an initial model based on a neural network based on the digital core autoencoder, and input the sample multi-source data feature vector and the sample inflow section into the initial model for processing to obtain a variational diffusion model corresponding to the initial model and trained; the initial model includes a digital core autoencoder and a learning layer, and the learning layer includes a vector linear layer, a section linear layer, a time step linear layer and a neural network module; wherein the variational diffusion model is trained in the following manner: The random three-dimensional digital core samples are sequentially input into the encoder of the digital core autoencoder according to the preset time step length for processing, so as to obtain the random three-dimensional digital core samples at each time step and arrange them into the first latent variable of the target tensor; Input the sample multi-source data feature vector into the vector linear layer for processing to obtain the data vector arranged as the first tensor; Inputting the sample inflow section into the section linear layer for processing to obtain the section vector arranged as a first tensor; Obtaining a time vector at each time step and arranging it into a first tensor through the time step linear layer; Connecting the first latent variable with the time vector, the data vector and the cross-section vector corresponding to the time step in the channel direction to obtain a first vector arranged as a second tensor; Inputting the first vector into the neural network module for processing to obtain a second vector arranged as a target tensor, wherein the second vector arranged as a target tensor represents a noise estimate of the first latent variable; Calculate the mean square error between the noise estimate and the true noise value, perform backpropagation according to the preset error function, and update the network parameters of the learning layer; Iterating the above steps based on the learning layer after updating the network parameters until the preset error function reaches convergence, and determining the learning layer where the preset error function reaches convergence and the digital core autoencoder as the variational diffusion model that has completed training; The sixth module is used to determine the target multi-source data feature vector and target inflow cross section of the original digital core, input the target multi-source data feature vector and target inflow cross section into the variational diffusion model for processing, and obtain the target three-dimensional digital core corresponding to the original digital core, and the target three-dimensional digital core is obtained by: Based on the original digital core and the preset time step length, the corresponding latent variable noise estimation value at each time step is obtained by using the trained learning layer; Calculating the target latent variables arranged as target tensors using the latent variable noise estimates; The target latent variable is input into the decoder in the digital core autoencoder for processing, and filtered according to the preset first condition to obtain the target three-dimensional digital core.
5. The digital core construction system integrating multi-source experiments and variational diffusion model according to claim 4 is characterized in that: The system further comprises: The seventh module is used to perform microscopic seepage simulation processing on the target three-dimensional digital core to obtain multi-source experimental data of the target three-dimensional digital core, compare the multi-source experimental data of the target three-dimensional digital core with the multi-source experimental data of the original digital core, and obtain a comparison result; The eighth module is used to determine the target three-dimensional digital core as a qualified target three-dimensional digital core if the comparison result meets the preset conditions; if the comparison result does not meet the preset conditions, regenerate a new target three-dimensional digital core based on the variational diffusion model until the new target three-dimensional digital core meets the preset conditions.
6. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the method according to any one of claims 1 to 3 is implemented when the processor executes the computer program.
7. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which enable a computer to execute the method of any one of claims 1-3.
