A method and system for fluid flow data compression and reconstruction
Patent Information
- Application Number
- CN202611189694.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-30
AI Technical Summary
这些方法在某些场景下提升了压缩效率,但多数仍然以单帧图像压缩或静态空间特征压缩为主,未充分利用流体序列的时间冗余和物理演化规律
[0050](1)本发明通过物理演化预测模块利用上一帧的重构帧预测当前帧流体场,使压缩对象由原始流体帧转化为预测残差,由于流体运动具有连续性和强时序相关性,预测残差的幅值和信息熵显著低于原始帧,从而大幅减少待编码数据量,有效降低流体仿真场景中海量时序数据的存储和传输成本;
Smart Images

Figure CN123019745A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically to a method and system for compressing and reconstructing fluid flow data. Background Technology
[0002] With the development of computational fluid dynamics (CFD), experimental fluid mechanics, high-resolution ocean circulation simulation, aerodynamic shape simulation, turbulence numerical simulation, and multiphysics coupled computation, the scale of fluid flow data is growing rapidly. This type of data typically exists in the form of two-dimensional or three-dimensional physical fields with continuous time steps. Each frame contains velocity, vorticity, density, pressure, temperature, energy, or other physical parameters, and most are stored in floating-point format. Large-scale fluid simulations often generate long-term, high-spatial-resolution, and multi-physical-variable data, leading to high costs for storage, transmission, archiving, remote collaborative analysis, and post-processing.
[0003] Unlike natural images or ordinary videos, fluid flow data possesses distinct scientific data attributes. On one hand, fluid fields exhibit strong spatial correlation and multi-scale structures, such as large-scale coherent structures, local vortex structures, high-frequency shear details, and boundary layer details. On the other hand, fluid fields are not random in time but are governed by continuum mechanics and partial differential equations, exhibiting significant evolutionary continuity between consecutive time steps. Therefore, fluid data compression not only requires achieving low bitrates and high reconstruction accuracy but also necessitates preserving, as much as possible, the physical and statistical characteristics meaningful for scientific analysis, such as gradients, spectra, energy spectra, vorticity, mass conservation, and velocity distribution.
[0004] Traditional compression methods such as JPEG, JPEG2000, and H.264 / H.265 are primarily designed for natural images or ordinary videos. JPEG typically relies on discrete cosine transform, quantization, and entropy coding; JPEG2000 typically relies on wavelet transform and embedded coding; traditional video compression frameworks usually include steps such as motion estimation, motion compensation, residual coding, and entropy coding. These methods can compress visual data, but their motion models and distortion metrics are mainly designed around human visual quality and are difficult to fully adapt to floating-point scientific flow field data.
[0005] In recent years, deep learning compression methods have significantly improved the rate-distortion performance of images and videos through modules such as autoencoders, super-prior entropy models, context models, Transformer-CNN hybrid structures, and vector quantization. Neural compression methods for fluid data have also begun to emerge, such as autoencoder-based fluid compression, vector quantization-based autoencoder-based fluid compression, and fluid data compression based on the Swing Transformer or attention mechanisms. While these methods have improved compression efficiency in certain scenarios, most still focus on single-frame image compression or static spatial feature compression, failing to fully utilize the temporal redundancy and physical evolution of fluid sequences.
[0006] Therefore, in the task of compressing fluid flow data in continuous time steps, there is a need for a compression method that can simultaneously utilize the prediction-residual concept in video compression, the nonlinear representation capability of neural networks, the physical evolution modeling capability of neural operators, and physical consistency constraints, so as to balance compression efficiency, reconstruction accuracy, temporal stability, and scientific fidelity at a high compression ratio. Summary of the Invention
[0007] To address the aforementioned issues, this invention proposes a fluid flow data compression and reconstruction method and system. By constructing a physical evolution prediction module, the compression object of fluid time series data is transformed from the original frame into the prediction residual to reduce the amount of information to be encoded. Furthermore, a multi-frame fusion module is used to correct the current frame using historical reconstructed frames to suppress error accumulation. Simultaneously, a joint loss function including spatial gradient consistency and spectral consistency is introduced for training, thereby achieving the goal of maintaining the physical fidelity and stability of the reconstructed flow field while reducing the bit rate.
[0008] On the one hand, a method for compressing and reconstructing fluid flow data includes:
[0009] S1, acquire a fluid flow data sequence of consecutive time steps, the fluid flow data sequence including the first frame and several subsequent frames;
[0010] S2, the first frame is directly encoded using an intra-frame compression method to obtain the reconstructed frame and write it into the decoded frame buffer;
[0011] S3, for each subsequent frame, retrieve the reconstructed frame of the previous frame from the decoded frame buffer, input it into the physical evolution prediction module, and generate the predicted fluid field of the current frame.
[0012] S4, calculate the difference between the predicted fluid field of the current frame and the current frame to obtain the time residual, and encode, quantize and entropy encode the time residual through the residual compression module to generate a compressed bitstream;
[0013] S5, the compressed bitstream is entropy decoded and residual decoded by the residual decoding module to obtain the reconstructed residual. The reconstructed residual is added to the predicted fluid field of the current frame to obtain the intermediate reconstructed fluid field.
[0014] S6, retrieve a preset number of reconstructed frames from the decoded frame buffer as historical reconstructed frames, input the intermediate reconstructed fluid field and historical reconstructed frames into the multi-frame fusion module for fusion correction, and output the reconstructed frame of the current frame;
[0015] S7 stores the reconstructed frame of the current frame into the decoded frame buffer for use in physical evolution prediction and multi-frame fusion of subsequent frames.
[0016] Furthermore, the physical evolution prediction module is a Fourier neural operator, including a lifting layer, a Fourier layer, and a projection layer;
[0017] The lifting layer is used to extract features from the input reconstructed frame and map them into high-dimensional features;
[0018] The Fourier layer is used to receive the high-dimensional features output by the lifting layer, transform the high-dimensional features output by the lifting layer to the frequency domain for learnable global spectral mixing, then restore them to the spatial domain through inverse Fourier transform, and output the processed high-dimensional features after point-based linear transformation and nonlinear activation.
[0019] The projection layer is used to map the high-dimensional features processed by the Fourier layer back to the predicted fluid field in the target physical channel dimension.
[0020] Furthermore, the residual compression module includes a residual master encoder, a super prior encoder, a quantizer, an entropy model, and an arithmetic encoder;
[0021] The residual master encoder is used to map time residuals into latent variables;
[0022] The super-prior encoder is used to map latent variables to super-latent variables;
[0023] The quantizer is used to quantize latent variables and super-latest variables to obtain quantized latent variables and super-latest variables;
[0024] The entropy model is used to estimate the probability distribution of the quantized latent variables based on the quantized super-latent variables;
[0025] The arithmetic encoder is used to perform arithmetic encoding on the quantized latent variables according to the probability distribution to generate a compressed bitstream.
[0026] Furthermore, in S5, the residual decoding module includes an arithmetic decoder, a super-prior decoder, and a residual master decoder;
[0027] The arithmetic decoder is used to perform arithmetic decoding on the compressed bitstream to obtain the quantized latent variables and the quantized superlatent variables.
[0028] The super-prior decoder is used to generate probability distribution parameters corresponding to the quantized latent variables based on the decoding results of the quantized latent variables and the super-latent variables;
[0029] The residual master decoder is used to recover and reconstruct the residuals based on the probability distribution parameters corresponding to the quantized latent variables.
[0030] Furthermore, the multi-frame fusion module includes a splicing unit, a feature extraction unit, and an output unit;
[0031] The splicing unit is used to splice the intermediate reconstructed fluid field with a preset number of historical reconstructed frames along the time dimension or channel dimension to obtain the spliced features.
[0032] The feature extraction unit is used to perform convolution, residual connection and frequency domain transformation on the spliced features to obtain fused features;
[0033] The output unit is used to map the fused features to the reconstructed frame of the current frame.
[0034] Furthermore, in the training step: a joint loss function including rate-distortion term and physical property preservation term is used to train the physical evolution prediction module, the residual compression module, and the multi-frame fusion module;
[0035] The joint loss function includes a bit rate term, a reconstruction distortion term, a spatial gradient consistency loss term, and a spectral consistency loss term; the spatial gradient consistency loss is used to constrain the spatial gradient difference between the reconstructed frame and the original frame, and the spectral consistency loss is used to constrain the frequency domain spectral difference between the reconstructed frame and the original frame.
[0036] Furthermore, the joint loss function The calculation formula is as follows:
[0037] ;
[0038] ;
[0039] ;
[0040] in, Represents the spatial gradient loss term; Represents the number of physical channels in the fluid field; and These represent the height and width of the fluid field space grid, respectively. Indicates the first In the original fluid field at the nth time step Data from one physical channel; Indicates the first In the final reconstructed fluid field at the nth time step Data from one physical channel; Indicates the first In the intermediate reconstructed fluid field at the nth time step Data from one physical channel; Represents the spectral loss term; Represents the spatial gradient operator; represents the Fast Fourier Transform; c represents the physical channel index.
[0041] On the other hand, a fluid flow data compression and reconstruction system includes:
[0042] The fluid data acquisition module is used to acquire a fluid flow data sequence of continuous time steps, the fluid flow data sequence including a first frame and several subsequent frames;
[0043] The first frame encoding module is used to directly encode the first frame using an intra-frame compression method to obtain the reconstructed frame and write it into the decoded frame buffer.
[0044] The current frame fluid field generation module is used to obtain the reconstructed frame of the previous frame from the decoded frame buffer for each subsequent frame, input the reconstructed frame of the previous frame into the physical evolution prediction module, and generate the predicted fluid field of the current frame.
[0045] The compression module is used to calculate the difference between the predicted fluid field of the current frame and the current frame to obtain the time residual. The time residual is then encoded, quantized and entropy encoded by the residual compression module to generate a compressed bitstream.
[0046] The reconstruction module is used to perform entropy decoding and residual decoding on the compressed bitstream through the residual decoding module to obtain the reconstruction residual. The reconstruction residual is then added to the predicted fluid field of the current frame to obtain the intermediate reconstructed fluid field.
[0047] The fusion module is used to obtain a preset number of reconstructed frames from the decoded frame buffer as historical reconstructed frames, input the intermediate reconstructed fluid field and historical reconstructed frames into the multi-frame fusion module for fusion correction, and output the reconstructed frame of the current frame.
[0048] The caching module is used to store the reconstructed frame of the current frame into the decoded frame cache for physical evolution prediction and multi-frame fusion of subsequent frames.
[0049] The present invention adopts the above technical solution and has the following beneficial effects:
[0050] (1) The present invention uses the physical evolution prediction module to predict the fluid field of the current frame by using the reconstructed frame of the previous frame, so that the compression object is transformed from the original fluid frame into the prediction residual. Since the fluid motion has continuity and strong temporal correlation, the amplitude and information entropy of the prediction residual are significantly lower than those of the original frame, thereby greatly reducing the amount of data to be encoded and effectively reducing the storage and transmission costs of massive temporal data in the fluid simulation scenario.
[0051] (2) The present invention uses Fourier neural operators as physical evolution prediction modules. It models the long-distance spatial dependence and multi-scale evolution characteristics of the fluid field through frequency domain global spectrum mixing. At the same time, it introduces spatial gradient consistency loss and spectral consistency loss during the training stage, so that the reconstruction results not only approach the original data in pixel-level error, but also maintain the consistency of physical statistical characteristics such as gradient and spectrum.
[0052] (3) The present invention uses a multi-frame fusion module to fuse and correct the intermediate reconstruction result of the current frame with multiple historical reconstruction frames, and uses a decoding frame buffer to achieve synchronization between the encoding and decoding ends, which effectively suppresses the accumulation of errors in long-term sequence compression, so that the reconstruction error will not continue to amplify with the increase of time step, and can still maintain stable reconstruction quality in long-term sequence compression tasks. Attached Figure Description
[0053] Figure 1 This is a flowchart of a fluid flow data compression and reconstruction method according to an embodiment of the present invention;
[0054] Figure 2 This is a schematic diagram of the overall framework of an embodiment of the present invention;
[0055] Figure 3 This is a schematic diagram of the physical evolution prediction module structure according to an embodiment of the present invention;
[0056] Figure 4 This is a schematic diagram of the residual compression module structure according to an embodiment of the present invention;
[0057] Figure 5 This is a schematic diagram of the multi-frame fusion module structure according to an embodiment of the present invention;
[0058] Figure 6 This is a system diagram of fluid flow data compression and reconstruction according to an embodiment of the present invention. Detailed Implementation
[0059] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0060] like Figure 1 and Figure 2 As shown, the present invention provides a method for compressing and reconstructing fluid flow data, comprising:
[0061] S1, acquire a fluid flow data sequence of continuous time steps, the fluid flow data sequence including the first frame and subsequent frames.
[0062] Specifically, in this embodiment, the fluid flow data to be compressed is assumed to be a physical field sequence of continuous time steps. ,in Let C represent the fluid field frame at time step t, where C represents the number of physical channels, and H and W represent the height and width of the spatial grid, respectively. Physical channels can be velocity components, vorticity, density, pressure, temperature, energy, sea surface velocity components, or other scalar / vector field components.
[0063] set up This represents the final reconstructed fluid field at the previous time step. This represents the predicted fluid field at the current time step obtained from the physical evolution prediction module. This represents the time residual between the current actual fluid field and the predicted fluid field. This represents the reconstructed residual obtained after compression and decoding. This represents the intermediate reconstructed fluid field obtained by adding the predicted fluid field and the reconstructed residual. This represents the final reconstructed fluid field obtained after multi-frame fusion correction.
[0064] Specifically, in this step, continuous time-step fluid flow data X={X_t}_(t=1)^T is acquired, and the data is processed by channel sorting, time sorting, spatial clipping or resampling, normalization / standardization, and training sample construction. For multi-parameter fluid data, viscosity coefficient, thermal diffusivity, Mach number, Reynolds number, spatial coordinates, or other physical parameters can be used as input conditions.
[0065] S2 uses intra-frame compression to directly encode the first frame, obtains the reconstructed frame, and writes it into the decoded frame buffer.
[0066] S3. For each subsequent frame, retrieve the reconstructed frame of the previous frame from the decoded frame buffer, input the reconstructed frame of the previous frame into the physical evolution prediction module, and generate the predicted fluid field of the current frame.
[0067] Specifically, the physical evolution prediction module is an adaptive Fourier neural operator, including a lifting layer, a Fourier layer, and a projection layer;
[0068] The lifting layer is used to extract features from the input reconstructed frame and map them into high-dimensional features;
[0069] The Fourier layer is used to receive the high-dimensional features output by the lifting layer, transform the high-dimensional features output by the lifting layer to the frequency domain for learnable global spectral mixing, then restore them to the spatial domain through inverse Fourier transform, and output the processed high-dimensional features after point-based linear transformation and nonlinear activation.
[0070] The projection layer is used to map the high-dimensional features processed by the Fourier layer back to the predicted fluid field in the target physical channel dimension.
[0071] S4 calculates the difference between the predicted fluid field of the current frame and the current frame as the time residual. The time residual is encoded, quantized and entropy encoded by the residual compression module to generate a compressed bitstream.
[0072] Specifically, such as Figure 3 As shown, the reconstructed fluid field from the previous time step... Or multiple historically reconstructed fluid field input physical evolution prediction modules Output the predicted fluid field at the current time step. ,in, Fourier neural operator (FNO) or adaptive Fourier neural operator (AFNO) is employed to model global correlations and multi-scale evolution characteristics in the frequency domain. Time residuals are computed based on the current real fluid field. With predicting fluid fields Calculate time residuals .because It has already expressed most of the predictable physical evolution information. The amplitude and information entropy are usually lower than those of the original frame. This is more suitable for compression. The temporal residual is encoded, quantized, and entropy-encoded. For example... Figure 4 As shown, the residual Input residual compression module. The residual compression module includes a main encoder, quantizer, super-prior encoder, entropy model, and arithmetic encoder. The main encoder will... Mapping to latent variables The super-prior encoder generates auxiliary latent variables. To estimate The probability distribution is determined; after quantizing the latent variables, a compressed bitstream is generated through an entropy model and arithmetic coding.
[0073] S5 performs entropy decoding and residual decoding on the compressed bitstream through the residual decoding module to obtain the reconstructed residual. The reconstructed residual is then added to the predicted fluid field of the current frame to obtain the intermediate reconstructed fluid field.
[0074] Specifically, the residual compression module includes a residual master encoder, a super prior encoder, a quantizer, an entropy model, and an arithmetic encoder;
[0075] The residual master encoder is used to map time residuals into latent variables;
[0076] The super-prior encoder is used to map latent variables to super-latent variables;
[0077] The quantizer is used to quantize latent variables and super-latest variables to obtain quantized latent variables and super-latest variables;
[0078] The entropy model is used to estimate the probability distribution of the quantized latent variables based on the quantized super-latent variables;
[0079] The arithmetic encoder is used to perform arithmetic encoding on the quantized latent variables according to the probability distribution to generate a compressed bitstream.
[0080] Specifically, the compressed bitstream is entropy decoded and residual decoded through a residual decoding module, which includes an arithmetic decoder, a super prior decoder, and a residual master decoder.
[0081] The arithmetic decoder is used to perform arithmetic decoding on the compressed bitstream to obtain the quantized latent variables and the quantized superlatent variables.
[0082] The super-prior decoder is used to recover the reconstructed residual based on the quantized latent variables and the decoding results of the super-latent variables;
[0083] The residual master decoder is used to recover the reconstructed residual based on the decoding result.
[0084] Specifically, the compressed bitstream is decoded to obtain the intermediate reconstructed flow field. At the encoding end's reconstruction loop and the decoding end, arithmetic decoding, a priori decoding, and master decoding are performed on the bitstream respectively to obtain the reconstruction residual. Adding the reconstructed residual to the predicted fluid field yields the intermediate reconstructed flow field. .
[0085] S6: Obtain a preset number of reconstructed frames from the decoded frame buffer as historical reconstructed frames, input the intermediate reconstructed fluid field and historical reconstructed frames into the multi-frame fusion module for fusion correction, and output the reconstructed frame of the current frame.
[0086] The multi-frame fusion module includes a stitching unit, a feature extraction unit, and an output unit;
[0087] The splicing unit is used to splice the intermediate reconstructed fluid field with a preset number of historical reconstructed frames along the time dimension or channel dimension to obtain the spliced features.
[0088] The feature extraction unit is used to perform convolution, residual connection and frequency domain transformation on the spliced features to obtain fused features;
[0089] The output unit is used to map the fused features to the reconstructed frame of the current frame.
[0090] Specifically, in this embodiment, the training step uses a joint loss function including a rate-distortion term and a physical property preservation term to train the physical evolution prediction module, the residual compression module, and the multi-frame fusion module;
[0091] The joint loss function includes a bit rate term, a reconstruction distortion term, a spatial gradient consistency loss term, and a spectral consistency loss term; the spatial gradient consistency loss is used to constrain the spatial gradient difference between the reconstructed frame and the original frame, and the spectral consistency loss is used to constrain the frequency domain spectral difference between the reconstructed frame and the original frame.
[0092] Specifically, in this embodiment, This represents the first [number] in the fluid flow data sequence. The current frame at each time step, where the initial frame is... Direct encoding, with subsequent frames used as the current frame at their respective time steps. In the prediction-residual compression process, the original frame actually refers to the current frame before compression and reconstruction. .
[0093] Specifically, the joint loss function The calculation formula is as follows:
[0094] ;
[0095] ;
[0096] ;
[0097] in, Represents the spatial gradient loss term; Represents the number of physical channels in the fluid field; and These represent the height and width of the fluid field space grid, respectively. Indicates the first In the original fluid field at time step n, the first Data from one physical channel; Indicates the first The final time step reconstructs the fluid field in the th time step. Data from one physical channel; Indicates the first In the intermediate reconstructed fluid field at the nth time step Data from one physical channel; This represents the spectrum consistency loss term; Represents the spatial gradient operator; represents the Fast Fourier Transform; c represents the physical channel index.
[0098] Specifically, model training and the actual compression and reconstruction of fluid data belong to two stages: First, the physical evolution prediction module, residual compression module, and multi-frame fusion module are trained using a staged training method; after training, the compression and reconstruction steps S1 to S7 are executed using the trained model parameters. Therefore, the training steps are set before the compression and reconstruction process of S1 to S7 and are not an intermediate step in the frame-by-frame compression and reconstruction process.
[0099] Specifically, such as Figure 5 As shown, during multi-frame fusion correction, the intermediate reconstructed flow field is... With one or more histories, the fluid field is ultimately reconstructed. Input multi-frame fusion module. The multi-frame fusion module extracts short-term historical information through stitching, convolution, residual blocks, AFNO blocks, attention, or other temporal fusion structures. Error correction and detail enhancement are performed to output the final reconstructed fluid field. .
[0100] Specifically, this invention supports the use of neural operators as a physical evolution prediction module. This module does not directly estimate pixel displacements or optical flow in natural videos, but instead learns an evolutionary mapping from historical fluid fields to the current fluid field. For the reconstructed fluid field of the previous time step... The physical evolution prediction module outputs the current predicted fluid field:
[0101] ;
[0102] This is a Fourier neural operator. The Fourier neural operator maps features to the frequency domain using a Fast Fourier Transform, performs learnable global convolution or spectral mixing in the frequency domain, and then returns to the spatial domain using an Inverse Fourier Transform. Its basic layer can be represented as:
[0103] ;
[0104] Among them, F and Let represent the Fourier transform and inverse Fourier transform, respectively; R represent the frequency-domain learnable complex kernel; W represent the point-based linear transform; and σ represent the nonlinear activation function. This structure can capture long-range spatial dependencies and global evolution patterns with low computational cost, making it suitable for predicting large-scale coherent structures and multi-scale motions in fluid fields.
[0105] Specifically, to enhance position awareness, spatial coordinates or physical parameters can be embedded and concatenated with the input fluid field along the channel dimension before being input into the prediction module. For example, for data with different viscosity coefficients, thermal diffusivity, or Mach numbers, these physical parameters can be injected into the prediction module through feature concatenation of fully connected layers or cross layers, enabling the model to adapt to different flow conditions.
[0106] Specifically, to improve the ability to represent the multi-scale spectral structure of fluid data, this invention introduces an adaptive Fourier neural operator block in the prediction module, residual compression module, or multi-frame fusion module. This module first maps spatial features to the frequency domain through a fast Fourier transform, then selectively mixes the spectral components through a frequency-adaptive multilayer perceptron or linear transform, and finally returns to the spatial domain through an inverse Fourier transform.
[0107] The adaptive Fourier neural operator block includes a frequency domain sparsity operation, employing a soft thresholding operator on the spectral coefficients x.
[0108] ;
[0109] in, This is a configurable or learnable threshold. This operation suppresses frequency domain noise and non-dominant frequency components, allowing the network to focus more on representative frequency structures within the fluid field. Subsequently, information interaction between different physical channels can be enhanced through 1×1 convolutions, channel mixing layers, or attention layers.
[0110] The aforementioned adaptive frequency domain feature modeling module can improve the compactness of residual latent variables and the spectral consistency of reconstruction results, and is especially suitable for fluid data containing multi-scale spatial structures such as turbulence and ocean flow fields.
[0111] Specifically, the residual compression module is used to compress time residuals. Compressed into a bitstream, and the residual is restored and reconstructed at the decoding end. In one implementation, the residual compression module employs an entropy modeling structure based on a priori regression, including a residual master encoder, a residual master decoder, a residual prior encoder, a residual prior decoder, a quantizer, a probability estimation module, an arithmetic encoder, and an arithmetic decoder. The master encoder will... Mapping to latent variables The prior encoder will Further mapping to overlatent variables During the training phase, additive uniform noise can be used to approximate quantization for backpropagation; during the inference phase, floor quantization is used to generate a deterministic bitstream. The entropy model estimates the probability distribution of the quantized latent variables based on the prior decoding results and performs arithmetic coding. The decoding end uses the same entropy model for arithmetic decoding and main decoding to obtain... Both the residual master encoder and the residual prior encoder can be equipped with convolutional layers, residual blocks, AFNO blocks, downsampling layers, or other frequency / spatial hybrid feature extraction units to improve the compression efficiency of the residual flow field.
[0112] Specifically, since prediction residual coding may lead to error accumulation in long sequences, this invention sets up a multi-frame fusion module to correct the current intermediate reconstructed flow field. This module utilizes the current intermediate reconstructed flow field. And history ultimately reconstructs the flow field Joint modeling can be performed using more or more historical frames.
[0113] In one implementation, Concatenated with multiple historical reconstructed frames along the time or channel dimension, and then sequentially fed into a convolutional layer, residual block, AFNO block, and output convolutional layer to obtain the final reconstructed fluid field. The multi-frame fusion module can utilize short-term historical context to repair local errors, enhance spatial continuity, and stabilize temporal evolution, thereby reducing error accumulation during long-term compression.
[0114] The number of historical frames used by the multi-frame fusion module can be adjusted according to the application scenario, such as using 1, 2, 3, 4 or more historical frames. This module can also be replaced by a 3D convolutional network, recurrent neural network, ConvLSTM, Transformer, attention fusion module, gated fusion module or other learnable temporal fusion structure.
[0115] S7 stores the reconstructed frame of the current frame into the decoded frame buffer for use in physical evolution prediction and multi-frame fusion of subsequent frames.
[0116] Specifically, the fluid field will be reconstructed in the updated decoding frame buffer. The data is stored in the decoded frame buffer for subsequent time steps of physical evolution prediction and multi-frame fusion. The encoder and decoder maintain the same buffer update method to ensure synchronization of the prediction process.
[0117] Specifically, during the training phase, a joint loss function consisting of a rate-distortion term and a physical property preservation term is used to perform phased training or end-to-end joint training on the physical evolution prediction module, the residual compression module, and the multi-frame fusion module.
[0118] Specifically, for the output compression and reconstruction results, the encoder outputs a compressed bitstream consisting of the initial frame bitstream, the residual bitstream of subsequent time steps, the necessary metadata, and the entropy model parameters; the decoder outputs a reconstructed fluid field sequence based on the compressed bitstream and the synchronous prediction / fusion process.
[0119] Specifically, to balance compression efficiency, reconstruction accuracy, and preservation of physical properties, this invention employs a joint loss function containing rate-distortion and physical property preservation terms. The total loss can be expressed as:
[0120] ;
[0121] Where R represents the expected bitrate estimated by the entropy model, and D represents the reconstruction distortion. This indicates that physical properties retain regularization terms. Used to control the trade-off between bit rate and distortion Used to control the weight of physical property preservation items.
[0122] Specifically, the distortion term simultaneously constrains both the intermediate reconstructed flow field and the final reconstructed flow field:
[0123] ;
[0124] Physical property preservation terms may include spatial gradient consistency loss and spectral consistency loss:
[0125] ;
[0126] ;
[0127] ;
[0128] in, Represents the spatial gradient operator. Let represent the Fast Fourier Transform, and c represent the physical channel index. Spatial gradient consistency loss is used to preserve local spatial variations, shear structures, and boundary details in the fluid field; spectral consistency loss is used to preserve multi-scale frequency domain structure and dominant frequency components.
[0129] Specifically, the training method can employ end-to-end joint training or phased training. In one implementation, the physical evolution prediction module is first trained separately to learn the fluid time evolution; secondly, the prediction module is frozen, and the residual compression module is trained to adapt to the prediction residual distribution; finally, the multi-frame fusion module is enabled to jointly fine-tune the prediction module, residual compression module, and multi-frame fusion module. Phased training can improve training stability and gradually introduce time dependence and compression constraints.
[0130] Specifically, different methods can be used. Multiple rate-distortion operating points can be trained to adapt to different compression ratio requirements; the model can be trained using methods such as cosine learning rate decay, Adam optimizer, random pruning, and sequence sampling.
[0131] Specifically, an experiment was conducted in this embodiment. The input data consisted of two-dimensional turbulence data or South China Sea surface current data, with each frame representing a fluid field containing two or more physical channels. First, the data was normalized, and a training sequence was constructed chronologically. For the first time step, intra-frame compression was used for direct encoding. For subsequent time steps, the final reconstruction result of the previous frame was input into the FNO prediction module to obtain the current predicted fluid field. Then, the residual between the current real fluid field and the predicted fluid field was calculated. This residual was input into a residual compression module containing an AFNO block and a super-prior entropy model to generate a residual bitstream. After the decoder recovered the residual, the predicted fluid field was added to the reconstructed residual to obtain an intermediate reconstructed flow field. This intermediate reconstructed flow field was then input into a multi-frame fusion module along with the first three historical reconstructed flow fields to output the final reconstructed fluid field. In this scenario, the model was trained using a joint objective function that included mean squared error, bit rate, spatial gradient consistency loss, and spectral consistency loss. Experimental results show that, compared with traditional learning-based image compression and existing fluid compression methods, this embodiment achieves higher PSNR, lower KL divergence, and more stable long sequence reconstruction errors at the same bit rate. For example, in South China Sea surface current data, it achieves a significant reduction in bit rate compared with some existing methods; in 100-frame long sequence reconstruction, the error growth is small, indicating that the method has good temporal stability.
[0132] Specifically, this method borrows the prediction-residual concept from video compression, but instead of using traditional modules based on visual motion estimation and motion compensation, it employs a physical evolution prediction module to predict the current fluid field based on one or more historically reconstructed fluid fields. The difference between the current real fluid field and the predicted fluid field is then used as a temporal residual, which is compressed and encoded only. At the decoding end, the physical evolution prediction module, synchronized with the encoding end, generates the current predicted fluid field. The decoded residual is then added back to the predicted fluid field to form an intermediate reconstruction result. Further multi-frame fusion correction using historical reconstructed frames yields the final reconstructed fluid field.
[0133] The core idea is to extract the part of the fluid sequence that can be explained by physical evolution prediction from the information to be encoded, so that the compressed bitstream mainly carries the residual information that the prediction cannot cover; at the same time, through frequency domain neural operator modules and physical property preservation loss, the model can better represent the global correlation, multi-scale spectral structure and key physical features in the fluid field.
[0134] Specifically, the technical problems solved by this invention include: how to reduce the amount of information that needs to be encoded by using the reconstructed fluid field from the previous moment or multiple historical moments to predict the current fluid field when compressing continuous time-step fluid data, instead of treating each frame as an independent image; how to replace the visual motion estimation / motion compensation module in ordinary video compression with a data-driven prediction module that conforms to the laws of fluid evolution, making the prediction process more suitable for the continuity, multi-scale, and global correlation of the fluid field; how to efficiently compress the temporal residuals formed by prediction errors, so that the compressed bitstream mainly represents the part that cannot be explained by the current moment relative to the physical evolution prediction; how to capture the multi-scale spectral features in the fluid data through the frequency domain modeling module, improving the compactness of the residual representation and the reconstruction quality; how to use historical reconstructed frames to perform multi-frame fusion correction on the current intermediate reconstruction results, so as to reduce the accumulation of errors in long-term sequence compression; and how to simultaneously consider bit rate, reconstruction distortion, spatial gradient consistency, and spectral consistency in the training objective, so that the compression result has both high rate-distortion performance and maintains the physical structure required for scientific analysis. It improves compression efficiency and reconstruction accuracy in the storage and transmission of continuous time-series physical field data, such as fluid simulation, ocean circulation, turbulence simulation, and experimental flow field imaging, and enhances the physical consistency and temporal stability of the reconstruction results.
[0135] Specifically, this invention employs a synchronous prediction-residual reconstruction process at both the encoding and decoding ends. For the first frame or keyframe, intra-frame compression can be used for direct encoding to obtain the initial reconstructed frame, which is then written to the decoding frame buffer. For subsequent time steps, both the encoding and decoding ends use the same historical reconstructed frames, the same physical evolution prediction module, and the same multi-frame fusion module. Therefore, the decoding end does not need to obtain the original current frame to generate the predicted flow field; it only needs to receive the residual bitstream to recover the current reconstructed flow field. The bitstream may include: the first frame compressed bitstream, the residual latent variable bitstreams for each time step, the super-prior bitstream, necessary model identifiers, normalized parameters, physical parameters, resolution information, channel information, and time step indexes, among other metadata. When model parameters are pre-deployed at both the encoding and decoding ends, there is no need to repeatedly transmit complete model parameters in the bitstream; when the model needs to be sent with the data, the model parameters or model version number can be used as additional information.
[0136] Finally, in this invention, the physical evolution prediction module is not limited to Fourier neural operators, but can also employ adaptive Fourier neural operators, DeepONet, convolutional neural networks, U-Net, ConvLSTM, Transformer, Swing Transformer, temporal attention networks, graph neural networks, neural PDE solvers, or other learnable temporal prediction models. The prediction input is not limited to the previous reconstructed frame, but can also include two or more historical reconstructed frames, historical residuals, physical parameters, spatial coordinates, boundary conditions, or external forcing terms. The prediction target is not limited to the complete current frame, but can also predict some physical channels or latent space features before reconstruction. The residual compression module is not limited to the super-prior autoencoder structure, but can also employ autoregressive entropy models, context entropy models, variational autoencoders, vector quantization autoencoders, hierarchical autoencoders, and Transformer encoding. The residual coding domain can be limited to the spatial domain, but can also be performed in the frequency domain, wavelet domain, latent space, or multi-scale feature domain. Quantization methods can include uniform quantization, non-uniform quantization, vector quantization, learnable quantization, soft-to-hard quantization, or error-bounded quantization. In the frequency domain modeling module, the adaptive Fourier neural operator block can be replaced with a regular Fourier layer, spectral convolution layer, wavelet transform layer, discrete cosine transform layer, graph convolution layer, multi-scale attention layer, or other global context modeling structures. Frequency domain sparsity can be achieved using soft thresholding, hard thresholding, Top-k frequency selection, learnable masks, bandgap attention, or other methods. Multi-scale frequency band weighting; the multi-frame fusion module can employ convolutional fusion, residual network fusion, 3D convolution, recurrent networks, ConvLSTM, Transformer, attention fusion, gated fusion, optical flow-assisted fusion, or frequency domain fusion, etc. The number of historical frames can be set to 1, 2, 3, 4, or more frames depending on the application, and a hybrid caching mechanism of key frames and non-key frames can also be used; in addition to spatial gradient consistency loss and spectral consistency loss, physical property preservation loss can also include vorticity loss, divergence constraint loss, energy spectrum loss, momentum conservation loss, mass conservation loss, pressure Poisson residual loss, etc. The loss methods include Navier-Stokes residual loss, boundary condition loss, statistical distribution loss, KL divergence loss, or downstream task consistency loss. Different loss terms can be weighted and combined according to data type and application scenario. This invention is not limited to two-dimensional fluid fields, but is also applicable to three-dimensional fluid fields, spatiotemporal volume data, cross-sectional flow fields, ocean surface velocity fields, meteorological fields, temperature fields, pollutant diffusion fields, combustion fields, multiphase flow fields, blood flow fields, aerospace aerodynamic fields, and other continuous time-step physical field data. It is not limited to simulation data, but can also be used for experimental measurement data, PIV image data, remote sensing inversion flow field data, and sensor-reconstructed flow field data.Training methods can include phased training, end-to-end training, pre-training followed by fine-tuning, multi-dataset joint training, training across physical parameter conditions, or online incremental training. Deployment methods can include local offline compression, in-situ compression during simulation, cloud compression, edge compression, or distributed compression.
[0137] In summary, this invention addresses the problems of insufficient utilization of time redundancy, insufficient modeling of physical evolution laws, insufficient preservation of physical characteristics of reconstruction results, and accumulation of long sequence errors in existing fluid flow data compression methods. It proposes a fluid flow data compression method and system that integrates physical evolution prediction and residual coding.
[0138] like Figure 6 As shown, this embodiment also discloses a fluid flow data compression and reconstruction system, including:
[0139] The fluid data acquisition module 61 is used to acquire a fluid flow data sequence of continuous time steps, the fluid flow data sequence including the first frame and subsequent frames;
[0140] The first frame encoding module 62 is used to directly encode the first frame using an intra-frame compression method to obtain a reconstructed frame and write it into the decoded frame buffer.
[0141] The current frame fluid field generation module 63 is used to obtain the reconstructed frame of the previous frame from the decoded frame buffer for each subsequent frame, input the reconstructed frame of the previous frame into the physical evolution prediction module, and generate the predicted fluid field of the current frame.
[0142] Compression module 64 is used to calculate the difference between the predicted fluid field of the current frame and the current frame as a time residual. The time residual is encoded, quantized and entropy encoded by the residual compression module to generate a compressed bitstream.
[0143] The reconstruction module 65 is used to perform entropy decoding and residual decoding on the compressed bitstream through the residual decoding module to obtain the reconstruction residual, and add the reconstruction residual to the predicted fluid field of the current frame to obtain the intermediate reconstruction fluid field.
[0144] The fusion module 66 is used to obtain a preset number of reconstructed frames from the decoded frame buffer as historical reconstructed frames, input the intermediate reconstructed fluid field and historical reconstructed frames into the multi-frame fusion module for fusion correction, and output the reconstructed frame of the current frame.
[0145] The caching module 67 is used to store the reconstructed frame of the current frame into the decoding frame cache for physical evolution prediction and multi-frame fusion of subsequent frames.
[0146] The specific implementation of a fluid flow data compression and reconstruction system and the same fluid flow data compression and reconstruction method will not be described again in this embodiment.
[0147] Although the invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art should understand that various changes in form and detail may be made to the invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which shall be within the scope of protection of the invention.
Claims
1. A method for compressing and reconstructing fluid flow data, characterized in that, Includes the following steps: S1, acquire a fluid flow data sequence of consecutive time steps, the fluid flow data sequence including the first frame and several subsequent frames; S2, the first frame is directly encoded using an intra-frame compression method to obtain the reconstructed frame and write it into the decoded frame buffer; S3, for each subsequent frame, retrieve the reconstructed frame of the previous frame from the decoded frame buffer, input it into the physical evolution prediction module, and generate the predicted fluid field of the current frame. S4, calculate the difference between the predicted fluid field of the current frame and the current frame to obtain the time residual, and encode, quantize and entropy encode the time residual through the residual compression module to generate a compressed bitstream; S5, the compressed bitstream is entropy decoded and residual decoded by the residual decoding module to obtain the reconstructed residual. The reconstructed residual is added to the predicted fluid field of the current frame to obtain the intermediate reconstructed fluid field. S6, retrieve a preset number of reconstructed frames from the decoded frame buffer as historical reconstructed frames, input the intermediate reconstructed fluid field and historical reconstructed frames into the multi-frame fusion module for fusion correction, and output the reconstructed frame of the current frame; S7 stores the reconstructed frame of the current frame into the decoded frame buffer for use in physical evolution prediction and multi-frame fusion of subsequent frames.
2. The fluid flow data compression and reconstruction method according to claim 1, characterized in that, In S3, the physical evolution prediction module is a Fourier neural operator, including a lifting layer, a Fourier layer, and a projection layer. The lifting layer is used to extract features from the input reconstructed frame and map them into high-dimensional features; The Fourier layer is used to receive the high-dimensional features output by the lifting layer, transform the high-dimensional features output by the lifting layer to the frequency domain for learnable global spectral mixing, and then restore them to the spatial domain through inverse Fourier transform. After point-based linear transformation and nonlinear activation, the processed high-dimensional features are output. The projection layer is used to map the high-dimensional features processed by the Fourier layer back to the predicted fluid field in the target physical channel dimension.
3. The fluid flow data compression and reconstruction method according to claim 1, characterized in that, In S4, the residual compression module includes a residual master encoder, a super prior encoder, a quantizer, an entropy model, and an arithmetic encoder; The residual master encoder is used to map time residuals into latent variables; The super-prior encoder is used to map latent variables to super-latent variables; The quantizer is used to quantize latent variables and super-latest variables to obtain quantized latent variables and super-latest variables; The entropy model is used to estimate the probability distribution of the quantized latent variables based on the quantized super-latent variables; The arithmetic encoder is used to perform arithmetic encoding on the quantized latent variables according to the probability distribution to generate a compressed bitstream.
4. The fluid flow data compression and reconstruction method according to claim 3, characterized in that, In S5, the residual decoding module includes an arithmetic decoder, a super prior decoder, and a residual master decoder; The arithmetic decoder is used to perform arithmetic decoding on the compressed bitstream to obtain the quantized latent variables and the quantized superlatent variables. The super-prior decoder is used to generate probability distribution parameters corresponding to the quantized latent variables based on the decoding results of the quantized latent variables and the super-latent variables; The residual master decoder is used to recover and reconstruct the residuals based on the probability distribution parameters corresponding to the quantized latent variables.
5. The fluid flow data compression and reconstruction method according to claim 1, characterized in that, In S6, the multi-frame fusion module includes a splicing unit, a feature extraction unit, and an output unit; The splicing unit is used to splice the intermediate reconstructed fluid field with a preset number of historical reconstructed frames along the time dimension or channel dimension to obtain the spliced features. The feature extraction unit is used to perform convolution, residual connection and frequency domain transformation on the spliced features to obtain fused features; The output unit is used to map the fused features to the reconstructed frame of the current frame.
6. The fluid flow data compression and reconstruction method according to claim 1, characterized in that, It also includes a training step: training the physical evolution prediction module, the residual compression module, and the multi-frame fusion module using a joint loss function that includes a rate-distortion term and a physical property preservation term; The joint loss function includes a bit rate term, a reconstruction distortion term, a spatial gradient consistency loss term, and a spectral consistency loss term; the spatial gradient consistency loss is used to constrain the spatial gradient difference between the reconstructed frame and the original frame, and the spectral consistency loss is used to constrain the frequency domain spectral difference between the reconstructed frame and the original frame.
7. The fluid flow data compression and reconstruction method according to claim 6, characterized in that, The joint loss function The calculation formula is as follows: ; ; ; in, Represents the spatial gradient loss term; Represents the number of physical channels in the fluid field; and These represent the height and width of the fluid field space grid, respectively. Indicates the first In the original fluid field at the nth time step Data from one physical channel; Indicates the first In the final reconstructed fluid field at the nth time step Data from one physical channel; Indicates the first In the intermediate reconstructed fluid field at the nth time step Data from one physical channel; Represents the spectral loss term; Represents the spatial gradient operator; represents the Fast Fourier Transform; c represents the physical channel index.
8. A fluid flow data compression and reconstruction system, characterized in that, include: The fluid data acquisition module is used to acquire a fluid flow data sequence of continuous time steps, the fluid flow data sequence including a first frame and several subsequent frames; The first frame encoding module is used to directly encode the first frame using an intra-frame compression method to obtain the reconstructed frame and write it into the decoded frame buffer. The current frame fluid field generation module is used to obtain the reconstructed frame of the previous frame from the decoded frame buffer for each subsequent frame, input the reconstructed frame of the previous frame into the physical evolution prediction module, and generate the predicted fluid field of the current frame. The compression module is used to calculate the difference between the predicted fluid field of the current frame and the current frame to obtain the time residual. The time residual is then encoded, quantized and entropy encoded by the residual compression module to generate a compressed bitstream. The reconstruction module is used to perform entropy decoding and residual decoding on the compressed bitstream through the residual decoding module to obtain the reconstruction residual. The reconstruction residual is then added to the predicted fluid field of the current frame to obtain the intermediate reconstructed fluid field. The fusion module is used to obtain a preset number of reconstructed frames from the decoded frame buffer as historical reconstructed frames, input the intermediate reconstructed fluid field and historical reconstructed frames into the multi-frame fusion module for fusion correction, and output the reconstructed frame of the current frame. The caching module is used to store the reconstructed frame of the current frame into the decoded frame cache for physical evolution prediction and multi-frame fusion of subsequent frames.