Method and device for reconstructing latent variable diffusion three-dimensional physical model and identification method
By performing dimensionality reduction and noise addition processing on the three-dimensional fluid simulation data, combined with the reconstruction method of the variational autoencoder, the problem of insufficient accuracy of the reconstruction of the three-dimensional physical model of latent variable diffusion in the prior art is solved, and more efficient three-dimensional fluid attribute simulation is achieved.
Patent Information
- Application Number
- CN202510096042.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-27
AI Technical Summary
In the prior art, when reconstructing three-dimensional fluid simulation data through deep learning, there is interference in the decoder reconstruction sampling process of the variational autoencoder, resulting in a deviation between the reconstruction results and the actual results, reducing the accuracy of the reconstruction of the three-dimensional physical model of latent variable diffusion.
By obtaining the simulation data set of three-dimensional fluid, dimensionality reduction processing is performed to generate initial latent variables, determining the noise amount to simulate the perturbation when collecting the initial latent variables, and reconstructing the target latent variables with the trained variational autoencoder to compensate for interference in the decoder reconstruction sampling process.
The accuracy of the reconstruction of the three-dimensional physical model of latent variable diffusion is improved, and the computational efficiency of the three-dimensional fluid attribute simulation is enhanced.
Smart Images

Figure CN120046530A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer graphics fluid simulation, and particularly relates to a method, device and recognition method for reconstructing a latent variable diffusion three-dimensional physical model. Background Art
[0002] The properties of fluids change over time and with external conditions. For example, the temperature property of a fluid changes over time and also changes with external conditions (such as pressure). Through traditional computational fluid dynamics simulation software, the properties of fluids can be simulated. The specific simulation process includes: discretization (dividing the fluid domain into triangles or tetrahedrons, called meshes or mesh elements, and the fluid properties such as velocity and temperature on these mesh elements are calculated and recorded), specifying boundary conditions, determining the fluid dynamics equations, selecting a solver (the computational fluid dynamics simulation software uses the solver to solve the discretized equations), and an iterative process that finally reaches the convergence condition to obtain the final simulation result. For three-dimensional fluid simulation, this process often requires huge computational resources and a long iterative process.
[0003] By reconstructing three-dimensional fluid simulation data through deep learning, using the encoder of the variational autoencoder to encode the three-dimensional fluid simulation data, reducing the high-dimensional three-dimensional fluid simulation data to a lower-dimensional latent variable, training and learning using the latent variable in the lower dimension, and then reconstructing the properties of the three-dimensional fluid at the target time by the decoder of the variational autoencoder, the computational efficiency of three-dimensional fluid property simulation can be improved.
[0004] However, in the prior art, when reconstructing three-dimensional fluid simulation data through deep learning, due to the interference in the sampling process of the decoder reconstruction of the variational autoencoder, if overly relying on the accuracy of the latent variable obtained after encoding by the variational autoencoder, it is easy to cause a deviation between the reconstruction result and the actual result, reducing the accuracy of the latent variable diffusion three-dimensional physical model reconstruction. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method and device for reconstructing a latent variable diffusion three-dimensional physical model to compensate for the interference existing in the sampling process of the decoder reconstruction of the variational autoencoder, thereby improving the accuracy of the latent variable diffusion three-dimensional physical model reconstruction, aiming at the above deficiencies existing in the prior art.
[0006] In a first aspect, the present invention provides a method for reconstructing a latent variable diffusion three-dimensional physical model, including:
[0007] S1. Obtain a simulation data set of three-dimensional fluid; the simulation data set includes various simulation data distributed according to a time series and corresponding to each time point in the time series, and the simulation data is simulation information with a first number of dimensions;
[0008] S2. Perform dimensionality reduction on the simulation data corresponding to each time point in the time series, reduce the simulation information of the first number of dimensions of each simulation data corresponding to each time point to an initial latent variable of the second number of dimensions in the latent space, and use the initial latent variable to train a variational autoencoder; the second number of dimensions is less than the first number of dimensions;
[0009] S3. Determine the amount of noise added corresponding to each time point based on the initial latent variable corresponding to each time point to simulate the perturbation received when collecting the initial latent variable;
[0010] S4. Based on the amount of noise added corresponding to each time point, generate a target latent variable at a target time point and under a target conditional variable according to the initial latent variable of the second number of dimensions;
[0011] S5. Use the trained variational autoencoder to reconstruct the target latent variable to obtain the target state of the three-dimensional fluid with the simulation information of the first number of dimensions at the target time point and under the target conditional variable.
[0012] In some embodiments, step S2 specifically includes:
[0013] S21. Reduce the simulation information of the first number of dimensions of each time point to a first latent variable that conforms to a normal distribution and has the second number of dimensions in the latent space;
[0014] S22. Obtain the residual gradient information of the second number of dimensions, and sum the first latent variable and the residual gradient information to generate an initial latent variable;
[0015] S23. Use the initial latent variable to train a variational autoencoder for reconstructing the target latent variable.
[0016] In some embodiments, step S23 specifically includes:
[0017] Use the initial latent variable and the loss function of the variational autoencoder, that is, the following formulas (1) and (2), to train the variational autoencoder:
[0018]
[0019] where L con is a reconstruction loss that constrains the similarity between the reconstruction result and the input image, I inp represents the simulation information of the first number of dimensions of the three-dimensional fluid, I decRepresents the target state of the three-dimensional fluid decoded by the variational autoencoder, L min Is the minimization loss function of the constrained Gaussian noise for the original image. N is the number of time points in the time series, and σ i Is the logarithmic variance at each time point, and σ i Is zero, and m i Is the mean at each time point.
[0020] In some embodiments, step S3 specifically includes: randomly adding a third noise variable based on the initial latent variable corresponding to each time point to generate target training simulation data, and training a 3D conditional U-Net structure using the target training simulation data to determine the amount of added noise corresponding to each time point to simulate the perturbation received when collecting the initial latent variable; specifically including:
[0021] S31. Randomly obtain the corresponding number of third noise variables as the number of time points in the time series, and add each third noise variable to the initial latent variable corresponding to each time point to generate target training simulation data;
[0022] S32. Train a 3D conditional U-Net structure according to the target training simulation data;
[0023] S33. Use the trained 3D conditional U-Net structure to determine the added noise variable corresponding to each time point.
[0024] In some embodiments, step S32 specifically includes
[0025] Train a 3D conditional U-Net structure according to the following formula (3), that is, the model loss definition of the 3D conditional U-Net structure,
[0026]
[0027] where t is the time point corresponding to the added third noise variable, and L t Is the mean square error between the predicted added noise amount at time point t and the true third noise variable at the corresponding time point, and x 0 Is the initial latent variable at t = 0, and ∈ t Is the third noise variable added at time point t of the third noise variable, and x t Is the initial latent variable corresponding to time point t, and ∈ θ Is the predicted added noise amount at the corresponding time point t.
[0028] In some embodiments, step S33 specifically includes:
[0029] S331. Concatenate each time point corresponding to the third noise variable with the conditional variable, and add and fuse it with the initial latent variable to obtain the first feature representation;
[0030] S332. Perform multiple downsamplings on the first feature representation to obtain shallow feature representations and deep feature representations with different reduced sizes respectively;
[0031] S333. Fuse the shallow feature representation and the deep feature representation through a skip connection layer to obtain a second feature representation;
[0032] S334. According to the model loss definition, predict the noise added to the second feature representation, and determine the amount of noise added to the target latent variable at the corresponding target time point and target conditional variable at this time point.
[0033] In some embodiments, step S4 specifically includes:
[0034] S41. Obtain the target time point and the target conditional variable corresponding to each time point;
[0035] S42. Based on the amount of noise added corresponding to each time point determined, through circularly calling the model for forward inference, gradually eliminate the noise added to the initial latent variable at this time point, and determine the target latent variable at the target time point and the target conditional variable.
[0036] In a second aspect, the present invention further provides a latent variable diffusion three-dimensional physical model reconstruction device, including:
[0037] An acquisition module, configured to acquire a simulation data set of a three-dimensional fluid; the simulation data set includes various simulation data distributed according to a time series and corresponding to each time point in the time series, and the simulation data is simulation information with a first quantity dimension;
[0038] A dimensionality reduction module, connected to the acquisition module, configured to perform dimensionality reduction processing on the simulation data of each simulation data corresponding to each time point in the time series, reduce the simulation information with the first quantity dimension at each time point to an initial latent variable with a second quantity dimension in the latent space, and train a variational autoencoder using the initial latent variable; the second quantity dimension is smaller than the first quantity dimension;
[0039] A processing module, connected to the dimensionality reduction module, configured to determine the amount of noise added corresponding to each time point based on the initial latent variable corresponding to each time point to simulate the disturbance received when acquiring the initial latent variable;
[0040] A generation module, connected to the processing module, configured to generate a target latent variable at the target time point and the target conditional variable based on the amount of noise added corresponding to each time point and according to the initial latent variable with the second quantity dimension;
[0041] A reconstruction module, connected to the generation module, is configured to reconstruct the target latent variable by using a trained variational autoencoder to obtain the target state of the three-dimensional fluid of the simulation information in the first number of dimensions at the target time point and under the target conditional variables.
[0042] In some embodiments, the processing module is further configured to randomly add a third noise variable based on the initial latent variable corresponding to each time point to generate target training simulation data, and use the target training simulation data to train a 3D conditional U-Net structure to determine the amount of added noise corresponding to each time point to simulate the perturbation received when collecting the initial latent variable, which includes:
[0043] A noise addition unit, configured to obtain a number of third noise variables corresponding to the number of time points in the time series, and add each third noise variable to the initial latent variable corresponding to each time point to generate target training simulation data;
[0044] A first training unit, connected to the noise addition unit, is configured to train a 3D conditional U-Net structure according to the target training simulation data;
[0045] A first determination unit, connected to the first training unit, is configured to use the trained 3D conditional U-Net structure to determine the noise variable added corresponding to each time point.
[0046] In some embodiments, the first training unit is further configured to train the 3D conditional U-Net structure according to the following formula (3), that is, the model loss definition of the 3D conditional U-Net structure,
[0047]
[0048] where t is the time point corresponding to the added third noise variable, L t is the mean square error between the predicted noise addition amount at time point t and the true third noise variable corresponding to the time point, x 0 is the initial latent variable at t = 0, ∈ t is the third noise variable added at time point t of the third noise variable, x t is the initial latent variable corresponding to time point t, ∈ θ is the predicted noise addition amount corresponding to time point t.
[0049] In a third aspect, the present invention further provides a method for identifying a target state, including:
[0050] According to the latent variable diffusion three-dimensional physical model reconstruction method described in any one of the above, obtain the target state of the three-dimensional fluid of the simulation information in the first number of dimensions at the target time point and under the target conditional variables;
[0051] Identify the target state of the three-dimensional fluid to determine whether the target state meets the corresponding state requirements.
[0052] The latent variable diffusion three-dimensional physical model reconstruction method of the present invention can simulate the perturbations received when collecting the initial latent variables and compensate for the perturbations through the acquisition of the simulation data set of the three-dimensional fluid, the dimensionality reduction processing of the simulation data at each time point, and the determination of the noise addition amount corresponding to each time point. Thus, the target latent variables of the more accurate initial latent variables at the target time point and under the target conditional variables can be determined, and finally the target state of the three-dimensional fluid of the more accurate simulation information in the first quantity dimension at the target time point and under the target conditional variables can be reconstructed. In this way, the accuracy of the latent variable diffusion three-dimensional physical model reconstruction is improved, and the computational efficiency of the three-dimensional fluid property simulation can be further improved. Brief Description of the Drawings
[0053] Figure 1 It is a flowchart of a latent variable diffusion three-dimensional physical model reconstruction method provided by an embodiment of the present invention;
[0054] Figure 2 It is a flowchart of an application embodiment of a latent variable diffusion three-dimensional physical model reconstruction method provided by an embodiment of the present invention;
[0055] Figure 3 It is a schematic structural diagram of a variational autoencoder provided by an embodiment of the present invention;
[0056] Figure 4 It is a schematic structural diagram of a PDE residual gradient encoding module provided by an embodiment of the present invention;
[0057] Figure 5 It is a schematic structural diagram of a 3D conditional U-Net provided by an embodiment of the present invention;
[0058] Figure 6 It is a schematic structural diagram of a GFB module provided by an embodiment of the present invention;
[0059] Figure 7 It is a schematic diagram of the change process of the data image of a latent variable diffusion three-dimensional physical model reconstruction method provided by an embodiment of the present invention;
[0060] Figure 8 It is a structural diagram of a latent variable diffusion three-dimensional physical model reconstruction device provided by an embodiment of the present invention. Detailed Embodiments
[0061] To enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be further described in detail below with reference to the drawings and embodiments.
[0062] Embodiment 1:
[0063] As shown Figure 1 in the figure, this embodiment provides a method for reconstructing a latent variable diffusion three-dimensional physical model, including steps S1 to S4:
[0064] Step S1. Obtain a simulation data set of a three-dimensional fluid; the simulation data set includes various simulation data distributed according to a time series and corresponding to each time point in the time series, and the simulation data is simulation information with a first quantity dimension.
[0065] Here, the simulation data set can be a set formed by the simulation results obtained through computational fluid dynamics simulation software. In some embodiments, the simulation data set can also include the reconstruction results after reconstructing the three-dimensional fluid simulation data through deep learning.
[0066] A fluid refers to an object whose property distribution changes with time (and external conditions). The properties of the object can be the temperature distribution, pressure distribution, or other properties of the object. The object can be a liquid, a solid, or a gas.
[0067] The time series distribution refers to a series of data points, and each data point is arranged in chronological order. Among them, the time interval between two adjacent time points can be the same or different.
[0068] The simulation information can be the fluid properties that change with time (and external conditions). For example, it can be the temperature distribution information, pressure distribution information, or other property information of the object.
[0069] Three-dimensional means that the simulation data is distributed in three dimensions. Specifically, the simulation data includes data in three directions: height (h), width (w), and depth (d).
[0070] The height, width, and depth of the simulation data can be used to characterize the size of the three-dimensional data. It can be understood that the simulation data can be divided into multiple grids through the height, width, and depth of the simulation data, and the first quantity dimension is the number of grids divided by the simulation information at each time point.
[0071] In some other embodiments, the simulation data also includes a condition variable representing external conditions, such as the temperature outside the fluid or the pressure outside the fluid, etc. Here, for different reconstruction purposes, other types of external conditions can also be included, which are not limited in this application.
[0072] As shown in Table 1, the simulation data corresponding to each time point includes the time point in the time series (unit: second, for example, the time point is 3s), the conditional variable (for example, temperature, unit: degree Celsius, for example, the temperature is 40°C), the size of the three-dimensional data of the boundary of the simulation image to be generated (for example, h×w×d is 64×64×64), and the size of the three-dimensional data of the three-dimensional simulation image data information (for example, h×w×d is 64×64×64).
[0073] It should also be noted that, for the above example, the first quantity dimension of the simulation data is: 64×64×64 = 262144, and the simulation data has a relatively high dimension.
[0074] Table 1
[0075]
[0076] It should also be noted that as Figures 3 to 5 , the latent variable diffusion three-dimensional physical model of deep learning in this embodiment mainly consists of four parts, including: a three-dimensional variational autoencoder (Variational Autoencoder, VAE, as Figure 3 shown), a partial differential equation (Partial Differential Equations, PDE) residual gradient encoding layer (as Figure 4 shown), a 3D conditional U-Net (as Figure 5 shown), and a linear conditional encoding layer.
[0077] Step S2. Perform dimensionality reduction processing on the simulation data corresponding to each time point in the time series, reduce the simulation information of the first quantity dimension of each simulation data corresponding to each time point to the initial latent variable of the second quantity dimension in the latent space, and use the initial latent variable to train the variational autoencoder; the second quantity dimension is smaller than the first quantity dimension.
[0078] Here, performing dimensionality reduction processing on the simulation data corresponding to each time point in the time series, for example, can be achieved through the encoding process of the variational autoencoder.
[0079] The latent space is a low-dimensional and continuous vector space. For example, the reduced low-dimensional latent space [m 1 , m 2 , m 3 , …, m d , where d is the depth of the reduced latent space, and m i is a two-dimensional vector for each layer along the depth direction, and the two-dimensional vector m iThe height and width are the height h and width w of the latent space, where the height h, width w, and depth d are all arbitrary integers greater than or equal to 1. For example, if the height h and width w after dimensionality reduction are both 16 and d is 10, then the amount of data (the second quantity dimension) in the latent space after dimensionality reduction is 16×16×10. It can be understood that from the high-dimensional data of the original input (64×64×64 = 262144), through the variational autoencoder, it is reduced to low-dimensional data (16×16×10 = 2560). The amount of data is reduced from 262144 to 2560, which can reduce the amount of data required for subsequent training and greatly improve the efficiency of reconstructing three-dimensional fluid property simulation data.
[0080] It should also be noted that the determination of the height, width, and depth of the second quantity dimension can be comprehensively determined according to the computing power of the variational autoencoder and the requirements for computing efficiency.
[0081] In some embodiments, step S2 specifically includes steps S21 to S23:
[0082] Step S21. Dimensionality-reduce the simulation information of the first quantity dimension at each time point to the first latent variable that conforms to the normal distribution in the second quantity dimension of the latent space.
[0083] Here, the latent distribution in the latent space conforms to the normal distribution. Specifically, as Figure 3 shown, where the input is the simulation result obtained from the computational fluid dynamics simulation software, and after being dimensionally reduced by the VAE Encoder to the low-dimensional latent space [m 1 、m 2 、m 3 ( Figure 3 shown as the depth of the latent space being 3. In some other embodiments, after being dimensionally reduced by the VAE Encoder to the low-dimensional latent space [m 1 、m 2 、m 3 、…、m d , where d is the depth of the latent space after dimensionality reduction, which is an arbitrary integer greater than or equal to 1. For example, it is 10), and at the same time, a latent code [σ 1 、σ 2 、σ 3 (correspondingly, when the depth is d, the latent code is [σ 1 、σ 2 、σ 3 、…、σ d ) is output to control the degree of noise interference, [e 1 、e 2 、e 3 (correspondingly, when the depth is d, the noise randomly sampled from the Gaussian distribution [e1 , e 2 , e 3 , …, e d ) is the noise (Gaussian noise) randomly sampled from a normal distribution. The exp operation is to ensure that the assigned weights are positive. Finally, the original encoding ([m 1 , m 2 , m 3 ) is added to the noise encoding to obtain the latent target latent encoding [c 1 , c 2 , c 3 of the VAE. (Correspondingly, when the depth is d, the latent target latent encoding is [c 1 , c 2 , c 3 , …, c d ). This latent target latent encoding is used for subsequent further noise addition and denoising operations. The reason for the above operations is to ensure the diversity of generation through the model (latent variable diffusion three-dimensional physical model), rather than being limited to the dataset. Through this operation, the latent variables can satisfy the distribution of the dataset, thereby generating more diverse predicted images and further improving the generalization performance of the model.
[0084] Step S22. Obtain the residual gradient information of the second number of dimensions, and sum the first latent variable and the residual gradient information to generate an initial latent variable.
[0085] Here, the residual gradient information is used to further improve the correlation between the output simulation image of the latent variable diffusion three-dimensional physical model and the input conditions. During implementation, by introducing the PDE residual gradient encoding module into the network (latent variable diffusion three-dimensional physical model), the network can obtain more conditional guidance and further improve the authenticity of the reconstruction result.
[0086] Step S23. Use the initial latent variable to train a variational autoencoder for reconstructing the target latent variable.
[0087] Here, during the training process, the decoding process of the variational autoencoder (such as the VAEDecoder shown in Figure 3 , the decoder in the variational autoencoder) is trained using the initial latent variable. During the test phase, the trained variational autoencoder is used to reconstruct the target latent variable, and the target state of the three-dimensional fluid of the first number of dimensions of the simulation information at the target time point and the target conditional variable can be obtained.
[0088] In this embodiment, by generating the first latent variable and the initial latent variable that are reduced to the second number of dimensions in the latent space and conform to the normal distribution, and training the decoding process of the variational autoencoder, a VAE model for reconstructing the target latent variable can be obtained, so as to provide support for subsequent reconstructing and predicting the target state of the three-dimensional fluid at the target time point and the target conditional variable.
[0089] In some embodiments, step S23 specifically includes:
[0090] Using the initial latent variable and the loss function of the variational autoencoder, that is, the loss functions of the following formulas (1) and (2) of the variational autoencoder, to train the decoding process of the variational autoencoder:
[0091]
[0092] where L con is the reconstruction loss that constrains the similarity between the reconstruction result and the input image, I inp represents the simulation information of the first number of dimensions of the three-dimensional fluid, I dec represents the target state of the three-dimensional fluid decoded by the variational autoencoder, L min is the minimization loss function that constrains the Gaussian noise on the original image, N is the number of time points in the time series, σ i is the logarithmic variance at each time point, σ i is zero, and m i is the mean at each time point.
[0093] Here, the L min loss is used to constrain the influence degree of the Gaussian noise on the original image (the original three-dimensional simulation real data). Because of the existence of the reconstruction loss, the model (VAE) will try its best to ensure the quality of the generated image. So the model (VAE) is more inclined to assign a smaller weight to the noise (Gaussian noise). In this way, only by assigning [σ 1 , σ 2 , σ 3 to negative infinity can it be achieved, but this is a situation we don't want to see. Therefore, this loss is to limit the occurrence of this extreme situation. When σ i is assigned to 0, the weight of the noise (Gaussian noise) can obtain the minimum value, which limits the occurrence of the above situation.
[0094] In this embodiment, through the limitation of the loss function, on the premise of ensuring the similarity between the reconstruction result and the input image, a more appropriate influence degree of the Gaussian noise on the original image can be obtained.
[0095] Step S3. Determine the noise addition amount corresponding to each time point based on the initial latent variable corresponding to each time point, so as to simulate the disturbance received when collecting the initial latent variable.
[0096] Here, the noise addition amount characterizes the disturbance received when the decoder of the variational autoencoder collects the initial latent variable.
[0097] In some embodiments, step S3 specifically includes randomly adding a third noise variable based on the initial latent variable corresponding to each time point to generate target training simulation data, and using the target training simulation data to train the 3D conditional U-Net structure, and determining the noise addition amount corresponding to each time point to simulate the disturbance received when collecting the initial latent variable; specifically, it includes:
[0098] Steps S31 to S33:
[0099] Step S31. Randomly obtain a number of third noise variables corresponding to the number of time points in the time series, and add each third noise variable to the initial latent variable corresponding to each time point to generate target training simulation data.
[0100] Here, the third noise variable is a noise randomly initialized to conform to a normal distribution to simulate the disturbance received during sampling.
[0101] The number of time points in the time series is the number of samples in the simulation dataset.
[0102] Adding each third noise variable to the initial latent variable corresponding to each time point, that is, adding the third noise variable to the latent target latent encoding [c 1 、c 2 、c 3 of the VAE to generate target training simulation data.
[0103] Step S32. Train the 3D conditional U-Net structure according to the target training simulation data;
[0104] In some embodiments, step S32 specifically includes
[0105] Training the 3D conditional U-Net structure according to the following formula (3), that is, the model loss definition of the 3D conditional U-Net structure,
[0106]
[0107] where t is the time point corresponding to the added third noise variable, L t is the mean square error between the predicted noise addition amount at time point t and the true third noise variable at the corresponding time point, x 0 is the initial latent variable at t = 0, ∈ tThe third noise variable added at time point t of the third noise variable, x t The initial latent variable corresponding to time point t, ∈ θ The amount of added noise predicted for the corresponding time point t.
[0108] In this embodiment, by defining the model loss of the 3D conditional U-Net structure, the 3D conditional U-Net structure can be trained to guide the 3D conditional U-Net structure to adjust its parameters in the correct direction to minimize the difference between the prediction result and the true noise variable.
[0109] Step S33. Use the trained 3D conditional U-Net structure to determine the noise variable to be added corresponding to each time point.
[0110] In some embodiments, step S33 specifically includes steps S331 to S334:
[0111] Step S331. Concatenate each time point corresponding to the third noise variable with the conditional variable, and add and fuse them with the initial latent variable to obtain the first feature representation.
[0112] Here, concatenating each time point with the conditional variable is achieved by using a multi-layer MLP to concatenate each time point and the conditional variable. Specifically, the multi-layer MLP first divides each time point and each conditional variable into a second number of dimensions, and then adds and fuses the divided time points and conditional variables with the initial latent variable to obtain the first feature representation.
[0113] Step S332. Perform multiple downsamplings on the first feature representation to obtain shallow feature representations and deep feature representations with different reduced sizes respectively.
[0114] Here, performing one downsampling on the first feature representation reduces the size of the first feature representation once. Performing multiple downsamplings on the first feature representation successively forms shallow feature representations and deep feature representations with different reduced sizes.
[0115] As Figure 5 shown, perform multiple downsamplings on the first feature representation through the SelfAttentionDown (self-attention downsampling) module to obtain shallow feature representations and deep feature representations with different reduced sizes respectively.
[0116] Step S333. Fuse the shallow feature representation and the deep feature representation through a skip connection layer to obtain the second feature representation.
[0117] Here, the shallow feature representation and the deep feature representation are the feature representations corresponding to two adjacent downsamplings. Among them, compared with the shallow feature representation, the deep feature representation has one more reduction in the size of the first feature representation.
[0118] As Figure 5 shown, during implementation, by connecting the Guided Feature Block with Skip Connections (GFB), multi-scale shallow fine-grained features and deep coarse-grained features are fused, thereby further improving the prediction effect of the network.
[0119] Step S334. According to the model loss definition of the 3D conditional U-Net structure, predict the noise added to the second feature representation, and determine the amount of noise added to the target latent variable at the corresponding target time point and target conditional variable at this time point.
[0120] Here, according to the model loss definition of the above 3D conditional U-Net structure, predict the noise added to the second feature representation to minimize the difference between the amount of noise added to the target latent variable at the corresponding target time point and target conditional variable at this time point and the true noise variable.
[0121] In this embodiment, through the obtaining of the first feature representation, the obtaining of the thousand-layer feature representations and deep feature representations after different reduction sizes, the obtaining of the second feature representation, and the determination of the amount of noise added to the target latent variable at the corresponding target time point and target conditional variable at this time point, the noise interference suffered by the simulated reconstruction sampling process can be simulated, providing support for obtaining the target latent variable at the corresponding target time point and target conditional variable more accurately.
[0122] Step S4. Based on the determined amount of noise added corresponding to each time point, generate the target latent variable at the target time point and target conditional variable from the initial latent variable of the second quantity dimension.
[0123] In some embodiments, step S4 specifically includes steps S41 to S42:
[0124] Step S41. Obtain the target time point and target conditional variable corresponding to each time point;
[0125] Step S42. Based on the determined amount of noise added corresponding to each time point, gradually eliminate the amount of noise added in the initial latent variable at this time point by circularly calling the model for forward inference, and determine the target latent variable at the target time point and target conditional variable.
[0126] Here, the loop - calling model refers to calling the same model multiple times in a loop, and each call is based on the result of the previous call. When applying the loop - calling model to a generative model, it is necessary to call the model in a loop at multiple time points, and the current state will be updated at each time point. Among them, the generative model can be a diffusion model (Denoising Diffusion Probabilistic Models, DDPM), and its generation process usually starts from noise, gradually denoises, and finally generates the required samples.
[0127] The loop - calling model will make multiple loop calls, and the number of loop calls can be 1000 times.
[0128] In this embodiment, by obtaining the target time point corresponding to each time point, the target conditional variable, and determining the target latent variable at the target time point and under the target conditional variable, the noise interference suffered in the sampling process of the variational auto - encoder can be eliminated, so as to determine a more reasonable target latent variable at the target time point and under the target conditional variable.
[0129] Step S5. Use the trained variational auto - encoder to reconstruct the target latent variable to obtain the target state of the three - dimensional fluid of the simulation information in the first - quantity dimension at the target time point and under the target conditional variable.
[0130] In some embodiments, by inputting an original simulation image (for example, the temperature distribution image of the three - dimensional fluid at t = 0), and inputting the corresponding time point (for example, t = 20s) and conditional variable (for example, the pressure is 1MPa at t = 20s), the simulation image at the corresponding moment (that is, the three - dimensional fluid distribution image at t = 20s) can be generated.
[0131] In some embodiments, the latent - variable diffusion three - dimensional physical model trained in this embodiment can also be used to predict objects whose properties change with time and external conditions. For example, the temperature distribution of a light bulb changes with time and external conditions (such as ambient temperature). According to the trained latent - variable diffusion three - dimensional physical model and the initial temperature distribution map of the light bulb (for example, t = 0), the target temperature distribution map of the light bulb at the target time point (for example, t = 5s) and under the target external conditions (for example, T = 40°C) can also be predicted.
[0132] Figure 7Schematic diagram of the change process of the data image of a latent variable diffusion three-dimensional physical model reconstruction method provided by an embodiment of the present invention, where (a) is the three-dimensional data after randomly adding a third noise variable to the initial latent variable (at t = 0), (b) is the three-dimensional latent variable after denoising the temperature of the light bulb at the target time point t = 5s and under the target condition variable (T = 40°C), (c) is the target temperature distribution map of the light bulb at the target time point t = 5s and under the target condition variable (T = 40°C), and (d) is the simulation result (at t = 5s) obtained by computational fluid dynamics simulation software. It can be Figure 7 seen that the target temperature distribution map obtained after reconstruction is basically close to the simulation result obtained by computational fluid dynamics simulation software. The present embodiment provides a latent variable diffusion three-dimensional physical model, which can compensate for the interference existing in the sampling process reconstructed by the decoder of the variational autoencoder, and thus can improve the accuracy of the latent variable diffusion three-dimensional physical model reconstruction.
[0133] In this embodiment, by obtaining the simulation dataset of the three-dimensional fluid model, reducing the dimension of the simulation data at each time point, and determining the amount of added noise corresponding to each time point, the perturbation received when collecting the initial latent variable can be simulated and compensated. Thus, the target latent variable of the more accurate initial latent variable at the target time point and under the target condition variable can be determined, and finally the target state of the three-dimensional fluid of the more accurate simulation information of the first quantity dimension at the target time point and under the target condition variable can be reconstructed. In this way, the accuracy of the latent variable diffusion three-dimensional physical model reconstruction is improved, and the computational efficiency of the three-dimensional fluid property simulation can be further improved.
[0134] Embodiment 2:
[0135] The following combines specific application embodiments to illustrate the specific implementation process of the above method.
[0136] Aiming at the problems in the prior art such as the long iterative solution process, the large deviation between the simulation result and the real structure, and the large number of parameters of the high-dimensional 3D simulation model. As Figure 2 shown, the present embodiment provides a latent variable diffusion three-dimensional physical model reconstruction method, which includes:
[0137] Step 10. The simulation software generates the original conditions and data and performs preprocessing.
[0138] Here, it is necessary to use computational fluid dynamics simulation software to simulate the training data required for the latent variable diffusion three-dimensional physical model. As shown in Table 1, the training data mainly consists of a time stamp sequence (time series), a condition variable (the condition variable corresponding to the time point, such as temperature), a boundary condition (in units of grid dimension), and the corresponding three-dimensional simulation result (in units of grid dimension).
[0139] Each training data is composed of such a data structure.
[0140] After generating the data, preprocessing such as normalizing the data is performed, and then the data set is divided into a training set and a test set in a nine-to-one ratio. The specific inputs of the latent variable diffusion three-dimensional physical model are the original three-dimensional simulation real data and conditional variables such as timestamps. The latent variable diffusion three-dimensional physical model mainly consists of four parts, namely, a 3D conditional U-Net, a linear conditional encoding layer, a partial differential equation (PDE) residual gradient encoding layer, and a three-dimensional variational autoencoder (VAE).
[0141] Step 20. The three-dimensional real simulation data is used as the first part of the input.
[0142] Step 21. The three-dimensional simulation data enters the pre-trained VAE network to achieve data dimensionality reduction.
[0143] Specifically, the VAE is used to compress (encode) the original high-dimensional three-dimensional data into a latent space, which should satisfy the distribution of the input data. After decoding these latent space variables, the generated data can correspond to the mean and variance of the target distribution. The data dimensionality reduction by the VAE is used as the main input of the model. The specific structure of the VAE is as Figure 3 shown.
[0144] As Figure 3 shown, where the input is the original three-dimensional simulation real data, and after being reduced in dimensionality by the VAE Encoder to a low-dimensional latent space [m 1 、m 2 、m 3 ( Figure 3 shown as the depth of the latent space is 3. In some other embodiments, after being reduced in dimensionality by the VAE Encoder to a low-dimensional latent space [m 1 、m 2 、m 3 、…、m d , where d is the depth of the latent space after dimensionality reduction, which is any integer greater than or equal to 1. For example, it is 10), and at the same time, a latent encoding [σ 1 、σ 2 、σ 3 (correspondingly, when the depth is d, the latent encoding is [σ 1 、σ 2 、σ 3 、…、σ d ) is output to control the degree of noise interference, and [e 1 、e 2 、e 3(Accordingly, at depth d, the noise [e 1 、e 2 、e 3 、…、e d ) randomly sampled from the Gaussian distribution is Gaussian noise. The exp operation is to ensure that the assigned weights are positive. Finally, adding the original encoding ([m 1 、m 2 、m 3 ) to the noise encoding gives the latent target latent encoding [c 1 、c 2 、c 3 of the VAE (Accordingly, at depth d, the latent target latent encoding is [c 1 、c 2 、c 3 、…、c d ). This latent target latent encoding is used for subsequent further noise addition and denoising operations. The reason for the above operations is that it is hoped that the model (latent variable diffusion three-dimensional physical model) can ensure the diversity of generation, not just limited to the dataset. Through this operation, the latent variables can satisfy the distribution of the dataset, thereby generating more diverse predicted images and further improving the generalization performance of the model.
[0145] During the model training process, first, such a VAE network needs to be pre-trained, and the latent variables (latent target latent encoding) of the trained VAE network are used for subsequent further operations. Through this operation, while retaining most of the useful information of the input image, the dimension of the input image can be greatly reduced, thus achieving the effect of reducing the computational resources of (subsequent 3D conditional U-Net, linear conditional encoding layer, PDE residual gradient encoding layer). The loss function of the VAE consists of two parts, as shown in Formulas 1 and 2:
[0146]
[0147] Among them, L con is the reconstruction loss, which is used to constrain the similarity between the reconstruction result and the input image. I inp represents the input three-dimensional image (original three-dimensional simulation real data), and I dec represents the three-dimensional reconstructed image decoded by the model (VAE). N is the number of input samples (the number of timestamps in the timestamp sequence).
[0148] The L min loss is used to constrain the influence degree of Gaussian noise on the original image (original three-dimensional simulation real data). Because of the existence of the reconstruction loss, the model will try its best to ensure the quality of the generated images. So the model (VAE) tends to assign smaller weights to the noise (Gaussian noise). Thus, only [σ1 , σ 2 , σ 3 can be assigned negative infinity, but this is a situation we don't want to see. So this loss is to limit the occurrence of such extreme situations. When σ i is assigned 0, the weight of the noise (Gaussian noise) can obtain the minimum value, which limits the occurrence of the above situation.
[0149] The above two parts together constitute the loss function of the three-dimensional variational autoencoder.
[0150] Step 22. Randomly sample time steps (the number of samples) for the data after dimensionality reduction and add noise.
[0151] Here, after obtaining the three-dimensional latent variables of the input data through the three-dimensional variational autoencoder, the degree of noise addition for the number of input images is randomly initialized through a sampler (a structure that performs the noise addition and denoising process, i.e., the Denoising Diffusion Probabilistic Model (DDPM)). A noise that conforms to a normal distribution is randomly initialized and added to the latent target latent encoding [c 1 , c 2 , c 3 of the VAE, and a noise addition operation is performed on the three-dimensional latent variables. The three-dimensional latent image after noise addition will be used as part of the input to the 3D conditional U-Net.
[0152] It should also be noted that sampling time steps to add noise, that is, sampling the number of timestamps in the timestamp sequence. That is, during the noise addition process of the sampler, the noise added to all images at each time step is the same. Ultimately, the degree of noise applied to each image is actually controlled by the number of these time steps. By adding noise and denoising through the sampler, it is possible to prevent the latent variable diffusion three-dimensional physical model from overly relying on the accuracy of the latent variables generated by the existing VAE, and improve the robustness of the latent variable diffusion three-dimensional physical model.
[0153] Step 30. The conditional variable and the timestamp are used as the second part of the input to the model (3D conditional U-Net).
[0154] Step 31. Establish a multi-layer MLP (Multi-Layer Perceptron) to encode the boundary conditions.
[0155] Here, the other part of the input to the U-Net denoising network is obtained by abstracting the timestamp sequence and the conditional variable in the simulation software (computational fluid dynamics simulation software) through a linear conditional encoding layer (MLP).
[0156] So far, we have obtained the two parts of the input to the U-Net denoising network.
[0157] In some embodiments, the method further includes:
[0158] Step 40. Establish a PDE residual gradient encoding layer to obtain residual gradient guiding conditions.
[0159] Since it is necessary to further improve the correlation between the output simulation image of the latent variable diffusion three-dimensional physical model and the input conditions (that is, to obtain the three-dimensional simulation image we hope for according to the input conditions), a PDE residual gradient encoding module is introduced into the network (latent variable diffusion three-dimensional physical model) to help the network obtain more conditional guidance. The specific structure of this residual gradient encoding module is as Figure 4 shown.
[0160] As Figure 4 shown, where F is the Fourier transform, and the corresponding F -1 is the inverse Fourier transform, R represents a multi-layer perceptron for filtering high-frequency components, W is a linear abstraction layer, and σ is an activation function layer. We input the data after dimensionality reduction into this residual gradient encoding module, and this module will encode the corresponding input gradient information into the original DDPM (that is, use the output of this module as another part of the conditions for the DDPM model). The purpose of doing this is to introduce physical information so that the generated data better conforms to the constraint conditions of the PDE.
[0161] So far, through the above process, we have obtained the compressed and noisy latent three-dimensional data, input condition data, and PDE residual constraint conditions.
[0162] Step 50. Establish a latent conditional U-Net denoising network to fuse data and conditions in each layer.
[0163] Here, the noisy three-dimensional data and the corresponding conditions are input into the 3D conditional U-Net for denoising.
[0164] The input of the 3D conditional U-Net network is the noisy three-dimensional latent simulation image. The structure of the 3D conditional U-Net is as Figure 5 shown. Among them, the DoubleConvDown (double convolutional downsampling) module consists of 2 3D convolutional layers (for feature extraction), a group normalization layer (to prevent overfitting and improve the learning efficiency of the network), a Gaussian Error Linear Unit (GELU) activation function (to enable the network to learn non-linear features), and a downsampling layer. This module is mainly used to extract features from the input data and downsample the input data. In the downsampling layer, the time stamp corresponding to the noise and the input conditions are concatenated and added to the features for fusion.
[0165] The SelfAttentionDown module is mainly composed of a SelfAttention module and a downsampling module. In the SelfAttention module, the network performs multi-head attention operations on the feature map after fusing conditional and temporal information to capture long-term dependencies in the feature map and select important regions in the feature map. After the multi-head attention, a Feed forward operation is performed to upsample and downsample the features to further capture the relationships between different features. This structure is similar to the encoder structure of the standard transformer. The downsampling layer is still used to further fuse temporal and conditional information and downsample the feature map.
[0166] The subsequent several SelfAttentionDown modules have the same function as this module, which is to fuse temporal and conditional information and perform multiple two-fold downsamplings on the feature map.
[0167] The BottleBlock (bottleneck module) is a bottleneck layer with the same structure as the DoubleConv layer, which is used to further extract features from the highly abstract feature map after multiple downsamplings. This module does not contain a downsampling operation.
[0168] The structure of the SelfAttentionUp module is similar to the previous SelfAttentionDown module, consisting of a SelfAttention module and an upsampling module, which is used to perform conditional fusion and upsampling operations on the highly abstract deep feature map. After passing through such a module, the feature map is upsampled multiple times by a factor of 2, so that the feature map is gradually upsampled to meet the input dimension of the model.
[0169] The skip connection layer (Guided Feature Block with Skip Connections, GFB) is used to fuse multi-scale shallow fine-grained features and deep coarse-grained features, thereby further improving the prediction effect of the network. The GFB module is as Figure 6 shown.
[0170] such as Figure 6As shown, first, the size of the high-level feature map (i.e., the deep feature map) is adjusted using a convolutional layer and bilinear interpolation (CBS) to match the size of the low-level feature map. Second, the two feature maps are divided into three groups along the channel dimension, and one group of the low-level features is concatenated with one group of the high-level features to obtain three groups of fused features. Then, dilated convolutions with different dilation rates (d = 1, 2, 5) are used for different groups to extract information at different scales. Finally, the three groups are concatenated along the channel dimension, and a 1×1 convolutional layer is used to achieve the interaction between features at different scales, thereby obtaining the final output feature map (Cat refers to the abbreviation of "concatenation", that is, the operation of feature map concatenation. In deep learning, "cat" usually means concatenating two or more feature maps along a certain dimension (usually the channel dimension) to merge the information of these feature maps.).
[0171] Finally, the shallow and deep feature information fused by this GFB module enters the final convolutional layer to adjust the dimension, thereby outputting the final predicted noise.
[0172] Step 60. Establish a reconstruction and smoothing loss function to constrain the denoising result.
[0173] Since the prediction target of the above 3D conditional U-Net is the noise corresponding to the 3D latent variable, the main prediction index of the model is the noise variable added at the corresponding timestamp. Therefore, the loss of the model is the L1 (mean absolute error) or L2 (mean square error) loss between the predicted noise and the true noise at the corresponding timestamp. The L2 loss is used in the present invention, as shown in Equation 3:
[0174]
[0175] where the range of t is determined by the range of the timestamp of adding noise, x 0 is the latent three-dimensional variable before adding noise, ∈ t is the noise added at the corresponding timestamp t, x t is the noise-added latent three-dimensional variable corresponding to the moment t, ∈ θ is the amount of noise added predicted by the model at the corresponding moment t. By constraining ∈ t and ∈ θ to train our 3D conditional U-Net.
[0176] Step 70. Use the VAE network to decode the trained latent variable to obtain the simulation result.
[0177] Through the learning process of the above network, the model can learn how to predict the noise variables corresponding to the time stamps from the three-dimensional latent variables after adding noise. During model inference, we only need to randomly initialize a three-dimensional latent variable that satisfies the normal distribution, input the corresponding conditional variables, and then gradually remove the noise from the three-dimensional latent variables after adding noise by repeatedly calling the forward inference process of the model (in this invention, the forward inference process is called 1000 times), so as to obtain the final denoised three-dimensional latent variable that meets the input conditions.
[0178] After obtaining the latent variable, we only need to call the pre-trained VAE decoder module to upsample the three-dimensional latent variable to obtain the final three-dimensional simulation image.
[0179] In this embodiment, compared with the above deep learning algorithms, the network of this embodiment can more fully integrate various conditional information. Through the cross-attention of each layer of the U-Net network and the multi-scale GFB module of the fusion layer, the network in this embodiment can fully integrate time, variable, and boundary information, so as to generate more qualified prediction results.
[0180] Secondly, without other designs, only by inputting the corresponding time stamps and conditional variables, the simulation images corresponding to the corresponding moments can be generated.
[0181] In addition, in order to further improve the prediction accuracy of the network, a PDE residual gradient network is proposed to give the network additional guiding information. Compared with other deep learning methods, this module can give the network more guiding information without other additional costs, so as to improve the prediction effect.
[0182] In addition, for high-resolution three-dimensional simulation images, previous deep learning methods often need to geometrically increase the computing resources, while the model in this embodiment can perform the noise addition and denoising processes in the latent space through the VAE module, thus greatly reducing the training consumption.
[0183] Embodiment 3:
[0184] As Figure 8 shown, the present invention also provides a latent variable diffusion three-dimensional physical model reconstruction device. The device 100 includes:
[0185] An acquisition module 11, which is configured to acquire a simulation data set of three-dimensional fluids; the simulation data set includes each simulation data distributed according to a time series and corresponding to each time point in the time series, and the simulation data is simulation information with a first quantity dimension;
[0186] The dimensionality reduction module 12, connected to the acquisition module 11, is configured to perform dimensionality reduction on the simulation data of each simulation data corresponding to each time point in the time series, reduce the simulation information of the first number of dimensions at each time point to the initial latent variables of the second number of dimensions in the latent space, and train a variational autoencoder using the initial latent variables; the second number of dimensions is less than the first number of dimensions;
[0187] The processing module 13, connected to the dimensionality reduction module 12, is configured to determine the amount of noise added corresponding to each time point based on the initial latent variables corresponding to each time point, so as to simulate the perturbation received when collecting the initial latent variables;
[0188] The generation module 14, connected to the processing module 13, is configured to generate target latent variables at the target time point and under the target conditional variables based on the amount of noise added corresponding to each time point and the initial latent variables of the second number of dimensions;
[0189] The reconstruction module 15, connected to the generation module 14, is configured to reconstruct the target latent variables using the trained variational autoencoder to obtain the target state of the three-dimensional fluid of the simulation information of the first number of dimensions at the target time point and under the target conditional variables.
[0190] In some embodiments, the dimensionality reduction module 12 includes:
[0191] The dimensionality reduction unit is configured to reduce the simulation information of the first number of dimensions at each time point to the first latent variables of the second number of dimensions in the latent space and conforming to the normal distribution;
[0192] The summation unit, connected to the dimensionality reduction unit, is configured to obtain the residual gradient information of the second number of dimensions, and sum the first latent variables and the residual gradient information to generate the initial latent variables;
[0193] The training unit, connected to the summation unit, is configured to train the variational autoencoder using the initial latent variables for reconstructing the target latent variables.
[0194] In some embodiments, the training unit is further configured to train the decoding process of the variational autoencoder using the initial latent variables and the loss function of the variational autoencoder, that is, the loss functions of the following formulas (1) and (2):
[0195]
[0196] where L con is the reconstruction loss that constrains the similarity between the reconstruction result and the input image, I inp represents the simulation information of the first number of dimensions of the three-dimensional fluid, I decRepresents the target state of the three-dimensional fluid decoded by the variational autoencoder, L min Is the minimization loss function for the constrained Gaussian noise with respect to the original image. N is the number of time points in the time series, and σ i Is the log variance at each time point, and σ i Is zero, and m i Is the mean at each time point.
[0197] In some embodiments, the processing module 13 is further configured to randomly add a third noise variable based on the initial latent variable corresponding to each time point to generate target training simulation data, and use the target training simulation data to train the 3D conditional U-Net structure to determine the amount of added noise corresponding to each time point to simulate the perturbation received when collecting the initial latent variable, which includes:
[0198] The noise adding unit is configured to obtain a number of third noise variables corresponding to the number of time points in the time series, and add each third noise variable to the initial latent variable corresponding to each time point to generate target training simulation data;
[0199] The first training unit, connected to the noise adding unit, is configured to train the 3D conditional U-Net structure according to the target training simulation data;
[0200] The first determining unit, connected to the first training unit, is configured to use the trained 3D conditional U-Net structure to determine the noise variable added corresponding to each time point.
[0201] In some embodiments, the first training unit is further configured to train the 3D conditional U-Net structure according to the following formula (3), that is, the model loss definition of the 3D conditional U-Net structure,
[0202]
[0203] where t is the time point corresponding to the added third noise variable, and L t Is the mean square error between the predicted added noise amount at time point t and the true third noise variable at the corresponding time point, x 0 Is the initial latent variable at t = 0, ∈ t Is the third noise variable added at time point t of the third noise variable, x t Is the initial latent variable corresponding to the corresponding time point t, ∈ θ Is the predicted added noise amount at the corresponding time point t.
[0204] In some embodiments, the first determining unit is further configured to splice each time point corresponding to the third noise variable and the conditional variable, and add and fuse them with the initial latent variable to obtain the first feature representation;
[0205] Perform multiple downsamplings on the first feature representation to obtain shallow feature representations and deep feature representations with different reduced sizes respectively;
[0206] Fuse the shallow feature representation and the deep feature representation through a skip connection layer to obtain a second feature representation;
[0207] According to the model loss definition of the 3D conditional U-Net structure, predict the noise added to the second feature representation, and determine the amount of noise added to the target latent variable at the corresponding target time point and target conditional variable at this time point.
[0208] In some embodiments, the generation module is further configured to obtain the target time point and the target conditional variable corresponding to each time point;
[0209] Based on the determined amount of noise added to each time point, gradually eliminate the noise added to the initial latent variable at this time point by cyclically calling the model for forward inference, and determine the target latent variable at the target time point and target conditional variable.
[0210] It should be noted that this embodiment is the corresponding device for the latent variable diffusion three-dimensional physical model reconstruction method in Embodiment 1 above. Using this device can implement the method in Embodiment 1. The specific implementation manner can refer to the description in the latent variable diffusion three-dimensional physical model reconstruction method, and will not be elaborated here.
[0211] Embodiment 4:
[0212] The present invention also provides a method for identifying a target state, including:
[0213] According to the latent variable diffusion three-dimensional physical model reconstruction method described in Embodiment 1 or Embodiment 2, obtain the target state of the three-dimensional fluid of the simulation information in the first quantity dimension at the target time point and target conditional variable;
[0214] Identify the target state of the three-dimensional fluid to determine whether the target state meets the corresponding state requirements.
[0215] In this embodiment, by obtaining the target state of the three-dimensional fluid of the simulation information in the first quantity dimension at the target time point and target conditional variable, the interference existing in the sampling process of the reconstruction of the decoder of the variational autoencoder can be compensated, so as to facilitate more accurately identifying the features in the target state and more accurately determining whether the target state meets the corresponding state requirements.
[0216] It is understandable that the above embodiments are merely exemplary embodiments adopted to illustrate the principles of the present invention. However, the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also regarded as the protection scope of the present invention.
Claims
1. A latent variable diffusion three-dimensional physical model reconstruction method, characterized in that: include: S1. Acquire a simulation data set of a three-dimensional fluid; the simulation data set includes various simulation data distributed in a time series and corresponding to each time point in the time series, and the simulation data is simulation information having a first quantity dimension; S2. Performing dimensionality reduction processing on the simulation data corresponding to each time point in the time series, reducing the simulation information of the first number dimension of each simulation data corresponding to each time point to the initial latent variable of the second number dimension in the latent space, and training the variational autoencoder using the initial latent variable; the second number dimension is smaller than the first number dimension; S3. Determine the noise amount corresponding to each time point based on the initial latent variable corresponding to each time point to simulate the disturbance received when collecting the initial latent variable; S4. Based on the noise amount corresponding to each time point, and according to the initial latent variable of the second quantity dimension, generate a target latent variable under the target time point and target condition variable; S5. Use the trained variational autoencoder to reconstruct the target latent variables and obtain the target state of the three-dimensional fluid under the target time point and target conditional variables of the simulation information of the first quantitative dimension.
2. The latent variable diffusion three-dimensional physical model reconstruction method according to claim 1, characterized in that: Step S2 specifically includes: S21. reducing the simulation information of the first quantity dimension at each time point to a first latent variable of the second quantity dimension in the latent space and conforming to the normal distribution; S22. Obtaining residual gradient information of a second quantity dimension, and summing the first latent variable with the residual gradient information to generate an initial latent variable; S23. Using the initial latent variables to train a variational autoencoder for reconstructing the target latent variables.
3. The method for reconstructing a latent variable diffusion three-dimensional physical model according to claim 2, characterized in that: Step S23 specifically includes: The variational autoencoder is trained using the initial latent variables and the loss function of the variational autoencoder, i.e., the following formulas (1) and (2): Among them, L con is the reconstruction loss that constrains the similarity between the reconstruction result and the input image, I inp Represents the simulation information of the first dimension of the three-dimensional fluid, I dec represents the target state of the three-dimensional fluid decoded by the variational autoencoder, L min To constrain the Gaussian noise to minimize the loss function of the original image, N is the number of time points in the time series, σ i is the logarithmic variance at each time point, σ i is zero, m i is the mean value at each time point.
4. The latent variable diffusion three-dimensional physical model reconstruction method according to claim 1, characterized in that: Step S3 specifically includes: randomly adding a third noise variable based on the initial latent variable corresponding to each time point to generate target training simulation data, and using the target training simulation data to train the 3D conditional U-Net structure to determine the amount of noise added corresponding to each time point to simulate the disturbance when collecting the initial latent variable; it specifically includes: S31. randomly obtain a number of third noise variables corresponding to the number of time points in the time series, and add each third noise variable to the initial latent variable corresponding to each time point to generate target training simulation data; S32. training a 3D conditional U-Net structure according to the target training simulation data; S33. Use the trained 3D conditional U-Net structure to determine the noise variable added at each time point.
5. The method for reconstructing a latent variable diffusion three-dimensional physical model according to claim 4, characterized in that: Step S32 specifically includes: According to the following formula (3), i.e., the model loss definition of the 3D conditional U-Net structure, the 3D conditional U-Net structure is trained. Among them, t is the time point corresponding to the added third noise variable, L t is the mean square error between the predicted noise amount at time point t and the actual third noise variable at the corresponding time point, x0 is the initial latent variable at time t = 0, ∈ t The third noise variable added at time point t, x t is the initial latent variable corresponding to time point t, ∈ θ is the amount of noise added predicted at the corresponding time point t.
6. The latent variable diffusion three-dimensional physical model reconstruction method according to claim 5, characterized in that: Step S33 specifically includes: S331. concatenate each time point and conditional variable corresponding to the third noise variable, and add and fuse them with the initial latent variable to obtain a first feature representation; S332. Downsample the first feature representation multiple times to obtain shallow feature representations and deep feature representations after different reduction sizes; S333. Fusing the shallow feature representation and the deep feature representation through a skip connection layer to obtain a second feature representation; S334. According to the model loss definition of the 3D conditional U-Net structure, the noise added in the second feature representation is predicted to determine the amount of noise added to the target latent variable under the target time point and the target conditional variable corresponding to the time point.
7. The method for reconstructing a latent variable diffusion three-dimensional physical model according to any one of claims 1 to 6, characterized in that: Step S4 specifically includes: S41. Obtaining the target time point and target condition variable corresponding to each time point; S42. Based on the noise amount corresponding to each time point determined, the model is called forward for reasoning in a loop to gradually eliminate the noise amount in the initial latent variable at the time point, and the target latent variable at the target time point and the target conditional variable is determined.
8. A latent variable diffusion three-dimensional physical model reconstruction device, characterized in that: include: An acquisition module, configured to acquire a simulation data set of a three-dimensional fluid; the simulation data set includes various simulation data distributed in a time series and corresponding to each time point in the time series, and the simulation data is simulation information having a first quantity dimension; a dimensionality reduction module, connected to the acquisition module, configured to perform dimensionality reduction processing on the simulation data of each simulation data corresponding to each time point in the time series, reduce the simulation information of a first number dimension at each time point to an initial latent variable of a second number dimension in the latent space, and train the variational autoencoder using the initial latent variable; the second number dimension is smaller than the first number dimension; A processing module connected to the dimensionality reduction module, which is configured to determine the noise amount corresponding to each time point based on the initial latent variables corresponding to each time point, so as to simulate the disturbance when the initial latent variables are collected; A generating module connected to the processing module, configured to generate a target latent variable at a target time point and a target conditional variable based on the noise amount corresponding to each time point and the initial latent variable of the second quantity dimension; The reconstruction module is connected to the generation module, and is configured to use the trained variational autoencoder to reconstruct the target latent variables to obtain the target state of the three-dimensional fluid under the target time point and target conditional variables of the simulation information of the first quantitative dimension.
9. The latent variable diffusion three-dimensional physical model reconstruction device according to claim 8, characterized in that: The processing module is also used to randomly add a third noise variable based on the initial latent variable corresponding to each time point to generate target training simulation data, and use the target training simulation data to train the 3D conditional U-Net structure to determine the amount of noise added corresponding to each time point to simulate the disturbance when collecting the initial latent variable, which includes: A noise adding unit is configured to obtain a number of third noise variables corresponding to the number of time points in the time series, and add each third noise variable to an initial latent variable corresponding to each time point to generate target training simulation data; A first training unit, connected to the noise adding unit, is configured to train a 3D conditional U-Net structure according to target training simulation data; The first determination unit is connected to the first training unit, and is configured to use the trained 3D conditional U-Net structure to determine the noise variable added corresponding to each time point.
10. The latent variable diffusion three-dimensional physical model reconstruction device according to claim 9, characterized in that: The first training unit is also used to train the 3D conditional U-Net structure according to the following formula (3), i.e., the model loss definition of the 3D conditional U-Net structure, Among them, t is the time point corresponding to the added third noise variable, L t is the mean square error between the predicted noise amount at time point t and the actual third noise variable at the corresponding time point, x0 is the initial latent variable at time t = 0, ∈ t The third noise variable added at time point t, x t is the initial latent variable corresponding to time point t, ∈ θ is the amount of noise added predicted at the corresponding time point t.
11. A method for identifying a target state, characterized in that: include: According to the latent variable diffusion three-dimensional physical model reconstruction method according to any one of claims 1 to 8, the target state of the three-dimensional fluid under the target time point and target condition variable of the simulation information of the first quantity dimension is obtained; The target state of the three-dimensional fluid is identified to determine whether the target state meets the corresponding state requirement.
Citation Information
Cited By
Tunnel rock mass moisture content prediction method based on multi-scale residual denoising network
CN120910426A