A large model-based digital hybrid coding method
By employing a large-model-based digital hybrid coding method that combines diffusion modeling, neural network coding, and adaptive entropy coding, the efficiency and adaptability issues of traditional coding techniques in complex data processing are resolved, achieving efficient and flexible data compression and transmission.
Patent Information
- Application Number
- CN202510208727.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2045-02-25
AI Technical Summary
Existing data compression technologies are inefficient when dealing with complex and variable data, have poor adaptability to different channel environments, and are difficult to optimize in terms of coding complexity, making them unsuitable for coding high-dimensional, multimodal data.
A large-model-based digital hybrid coding method is adopted, which combines diffusion model, neural network coding, adaptive entropy coding and A3C optimization strategy. Through multi-layer feature learning and dynamic adjustment of coding parameters, it adapts to different channel environments and data characteristics, and uses knowledge distillation technology to extract a lightweight coding model.
It achieves efficient and flexible data compression, improves coding quality and adaptability, reduces computing resource consumption, is suitable for efficient transmission of multimodal data, and enhances the stability and flexibility of data transmission.
Smart Images

Figure CN120124682B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of digital coding, and particularly relates to a digital hybrid coding method based on a large model. BACKGROUND
[0002] With the advent of the digital era, data transmission and storage are facing increasing demands, especially in the processing of high-quality audio and video, images, text and other multimedia data. How to efficiently compress and encode has become a key problem. Traditional data compression techniques such as Huffman coding, arithmetic coding, discrete cosine transform (DCT), discrete wavelet transform (DWT) are widely used in image, audio and video coding. These methods reduce the storage and transmission cost of data by effectively reducing redundant information. However, with the increasing diversity of data types and the complexity of transmission environment, traditional coding techniques often face the following problems when dealing with large-scale data: insufficient compression efficiency, poor adaptability to different channel environments, difficulty in optimizing the complexity of the coding process, and limited performance of algorithms in the face of higher-dimensional and more complex feature data.
[0003] Firstly, traditional transform-based coding (such as DCT, DWT) techniques can achieve data compression to some extent, but their effectiveness depends on pre-set feature extraction rules and fixed transformation models. These transformation methods often perform well under fixed data types and feature structures, but they are not suitable for complex and variable data (such as multi-modal data or data from different sensors). Especially for high-dimensional data with complex spatio-temporal dependencies, traditional feature extraction methods and compression strategies are difficult to achieve ideal compression results. In addition, traditional coding techniques usually ignore the context information of data and have poor adaptability to different channel environments, so they often need complex manual adjustments according to specific channels and data characteristics in practical applications.
[0004] Secondly, neural network-based coding methods have shown excellent performance in various data compression tasks in recent years. Deep learning models can handle complex data distributions and feature structures by automatically learning feature representations. However, these models often face problems such as large-scale training data, high computational resource consumption, and poor adaptability to different application scenarios when applied to data coding. Although some deep learning-based coding methods have achieved some success, they still mostly rely on fixed coding architectures and are difficult to dynamically optimize according to different channel environments, data types and actual application scenarios.
[0005] Furthermore, existing adaptive entropy coding methods, although they have played a certain role in improving coding efficiency, still have certain deficiencies in processing complex data. Traditional entropy coding methods (such as Huffman coding, arithmetic coding, etc.) have certain advantages in compression efficiency, but when faced with high-dimensional, multi-class data, their effectiveness is often limited. Adaptive entropy coding can optimize compression rate by adjusting probability distribution, but this method usually requires a large amount of calculation and memory overhead, and in practical applications, it is often difficult to adapt to real-time changes under different channel conditions. Especially for complex data streams or applications in uncertain environments, these traditional entropy coding methods are difficult to achieve efficient, real-time and adaptive adjustment.
[0006] In addition, some existing transform coding methods (such as DCT, DWT, etc.) can effectively decompose signals, but their flexibility and adaptability are poor, and it is difficult to dynamically optimize according to different channel environments. Traditional transform coding is often processed in a fixed domain, and cannot adaptively select the most suitable coding strategy according to real-time channel environment and data characteristics. Transform coding methods usually cannot well cope with the changing channel conditions in modern communication networks, resulting in limited compression efficiency and transmission effect.
[0007] Therefore, how to provide a digital hybrid coding method based on large models is a problem that those skilled in the art need to solve. SUMMARY
[0008] An object of the present application is to provide a digital hybrid coding method based on large models. The present application can efficiently process complex data and significantly improve data compression efficiency and coding quality through multi-layer feature learning, neural network coding, adaptive entropy coding and A3C optimization strategy. By dynamically adjusting the coding parameters, it adapts to different channel environments and data characteristics, providing a more optimized compression scheme. At the same time, the diffusion model and knowledge distillation technology are used to extract lightweight coding models, achieving high efficiency, flexibility and adaptability in complex application scenarios, and bringing significant performance improvement for data transmission and storage.
[0009] According to the digital hybrid coding method based on large models of the embodiment of the present application, the following steps are included:
[0010] S1, pre-processing the data to be coded, normalizing and extracting features according to the data type, and generating pre-processed data;
[0011] S2, using a diffusion model driven feature learning method to encode the pre-processed data, and using latent variables to represent global relationships and optimal representations, generating feature encoded data;
[0012] S3, neural network encoding is performed on the feature encoding data, an end-to-end neural network encoding structure is adopted to perform optimal compression representation, and a variable bit rate quantization method is used to dynamically adjust the encoding bit number, and neural network encoding data is generated;
[0013] S4, adaptive entropy encoding is performed on the neural network encoding data, a context-aware probability modeling method is adopted to predict the prior probability distribution of the data block, a normalized flow entropy encoding method is used for probability density transformation, and entropy encoding data is generated;
[0014] S5, discrete transform encoding is performed on the entropy encoding data, based on a dynamic domain conversion method, a suitable transform method is selected according to the data characteristics, including discrete cosine transform, discrete wavelet transform or fast Fourier transform, and a hierarchical sub-block quantization method is used to perform hierarchical quantization for different frequency components, and transform encoding data is generated;
[0015] S6, the code length allocation and entropy encoding parameters of the transform encoding data are optimized based on A3C, the entropy encoding parameters are dynamically adjusted according to different channel environments, and a lightweight encoding model is extracted from the diffusion model by using a knowledge distillation method, and finally optimized encoding data is generated.
[0016] Optionally, the S2 specifically includes:
[0017] S21, feature decomposition is performed on the preprocessed data, a multi-scale feature extraction method is adopted, the data is divided into multiple levels, different scale feature representations are constructed, and a data block set {X i} is generated, wherein X i represents the i-th data block;
[0018] S22, diffusion modeling is performed on the data block set {X i}, a forward diffusion process is adopted to construct the probability evolution path of the data block, and the data is gradually evolved into a standard Gaussian distribution:
[0019]
[0020] wherein, represents the state of the i-th data block at the t-th time step of the diffusion process, represents the state of the i-th data block at the t-1-th time step of the diffusion process, α t represents the attenuation coefficient at the t-th time step, ∈ t represents a random Gaussian noise, and N(0,I) represents a standard normal distribution with zero mean and unit variance;
[0021] S23, a reverse diffusion process is performed on the diffusion modeled data, a denoising network is used to estimate the noise term, and the reverse derivation is performed on multiple time steps to obtain the denoised data representation:
[0022]
[0023] wherein, denotes the noise term estimated by the denoising network;
[0024] S24, based on the denoised data representation, performing latent variable mapping to learn the latent variable representation of the data using a variational autoencoder:
[0025] Z i = μ i + σ i · ∈, ∈ ~ N(0, I);
[0026] wherein, Z i denotes the latent variable representation of the ith data block, μ i denotes the mean corresponding to the ith data block, σ i denotes the standard deviation corresponding to the ith data block, and ∈ denotes a random variable subject to the standard normal distribution N(0, I);
[0027] S25, performing global relationship modeling on the latent variable representation to calculate the global relationship between data blocks using a Transformer structure, and constructing a self-attention weight matrix:
[0028]
[0029] wherein, A ij denotes the attention weight between the ith data block and the jth data block, softmax denotes a normalization function, Q i denotes the query vector of the ith data block, K j denotes the key vector of the jth data block, and d denotes the feature dimension;
[0030] S26, based on the global relationship modeling result, extracting an optimal representation, and using a feedforward neural network to fuse the self-attention feature to generate feature encoding data.
[0031] Optionally, the S3 specifically comprises:
[0032] S31, performing feature transformation on the feature encoding data, mapping to a multi-scale feature space using a high-dimensional nonlinear projection method to construct an input data set {F i}, wherein F i denotes the ith feature encoding data block, and generating a high-dimensional feature representation {H i} using an adaptive feature enhancement technique, wherein H i denotes the high-dimensional feature representation of the ith feature encoding data block.
[0033] S32, using an end-to-end neural network coding structure to perform deep compression representation on the high-dimensional feature representation {H i}, dynamically adjusting feature weights using a variable channel depth convolutional network, and calculating the compressed representation {C i} through a high-order nonlinear mapping function:
[0034] C i =σ(W3·Swish(W2·ReLU(W1H i +b1)+b2)+b3);
[0035] where C i represents the compressed representation of the i-th feature encoding data block, σ represents the activation function, W1, W2 and W3 represent the mapping weight matrix, b1, b2 and b3 represent the bias term, ReLU represents the rectified linear unit activation function, and Swish represents the differentiable activation function;
[0036] S33, performing variable bit rate quantization processing on the compressed representation {C i}, using a non-uniform logarithmic scale quantization method to generate quantized encoding data {Q i}, where Q i represents the i-th feature quantized encoding data:
[0037]
[0038] where Q(C i ) represents the i-th feature encoding data block, β represents the non-uniform quantization scale parameter, max(|C i |) represents the maximum value of the i-th feature encoding data block; sign(·) represents the sign function: when C i is positive, sign(C i ) = 1; when C i is negative, sign(C i ) = -1; when C i is zero, sign(C i ) = 0;
[0039] S34, calculating the information redundancy between different data blocks based on the cross-modal contrast learning method, using a hierarchical contrast loss function to optimize data compression representation, and generating neural network encoding data:
[0040]
[0041] where L contrastive represents the cross-modal feature contrast loss, N represents the total number of feature encoding data blocks, exp represents the exponential function, S(Q i , Q j) represents the i-th feature quantization encoding data Q i similarity measure between the j-th feature quantization encoding data Q j i similarity measure between the i-th feature quantization encoding data Q k i similarity measure between the k-th feature quantization encoding data Q k , τ represents a temperature parameter; I(y i =y j ) represents an indicator function, I(y i =y j ) = 1 when y i =y j , and I(y i ≠y j ) = 0 when y i ≠y j .
[0042] Optionally, the S4 specifically comprises:
[0043] S41, dividing the neural network encoding data into a plurality of neural network encoding data blocks and assigning indexes, recording context information for each neural network encoding data block, including encoding results of adjacent neural network encoding data blocks and global statistical features;
[0044] S42, based on the context-aware probability modeling method, predicting the prior probability of each neural network encoding data block, using a self-attention mechanism to consider local and global dependencies, and generating a probability distribution model of the neural network encoding data block;
[0045] S43, performing a normalization flow entropy encoding conversion on the probability distribution model, selecting a reversible and differentiable flow model to map the data distribution, so that the data tends to be uniformly distributed;
[0046] S44, based on the normalization flow conversion result, combining the context prediction information of the neural network encoding data block, and adaptively allocating code length through bit rate regulation or entropy threshold adjustment, so that the encoding length used by high-frequency neural network encoding data blocks is greater than the encoding length used by low-frequency neural network encoding data blocks;
[0047] S45, performing entropy encoding processing on the neural network encoding data block after adaptive allocation of code length, using arithmetic coding to generate a compressed bit stream, and performing correlation verification;
[0048] S46, outputting the compressed bit stream after correlation verification as entropy encoding data.
[0049] Optionally, the S5 specifically comprises:
[0050] S51, feature analysis is performed on the entropy encoded data, time domain variation characteristics and spectral energy distribution of the entropy encoded data block are calculated;
[0051] S52, based on the feature analysis result of the entropy encoded data block, a dynamic domain conversion method is used, discrete cosine transform, discrete wavelet transform or fast Fourier transform is selected according to the characteristics of the entropy encoded data, and the entropy encoded data block is transformed to obtain a transformed entropy encoded data block;
[0052] S53, frequency decomposition is performed on the transformed entropy encoded data block, a plurality of sub-frequency bands are divided based on spectral energy density, signal energy of each sub-frequency band is calculated, and the optimal decomposition scale is determined based on local gradient variation analysis;
[0053] S54, the transform coefficients of different sub-frequency bands are non-uniformly quantized by transform domain gradient constraint:
[0054]
[0055] Wherein, E i,j represents the quantization value of the jth frequency component in the ith entropy encoded data block, C i,j represents the transform coefficient, Δ i,j represents the adaptive quantization step, round(·) represents the rounding operation, A i,j represents the attention weight of the jth frequency component in the ith entropy encoded data block, γ represents the gradient regulation coefficient, represents the local gradient of the transform coefficient along the frequency axis;
[0056] S55, transform domain reorganization is performed on the non-uniformly quantized entropy encoded data block to generate transform coded data.
[0057] Optionally, the S6 specifically includes:
[0058] S61, the A3C algorithm is used to optimize the code length allocation of the transform coded data, the state space and action space are constructed, and the optimal code length allocation strategy is calculated through the policy network and the value function:
[0059]
[0060] Wherein, θ represents the parameter set of the policy network, ξ represents the learning rate, N1 represents the total number of transform coded data blocks, s i represents the state of the ith transform coded data block, π θ (s i ) represents the probability distribution of selecting action in state s θ i represents the parameter gradient, A i denotes the advantage estimate value, V θ (s i ) denotes the expected total reward obtained by taking the current policy in state s i , denotes the update operation;
[0061] S62, the code length allocation optimized according to the A3C algorithm is used for dynamically adjusting the entropy coding parameters of the transform coded data block, the entropy coding algorithm is adaptively configured based on different channel environments, and the optimization target is to maximize the coding efficiency;
[0062] S63, a lightweight coding model is extracted from the diffusion model by using a knowledge distillation method, and the knowledge of the complex model is migrated to the student model through a teacher-student model training strategy:
[0063]
[0064] Wherein, L KD denotes the knowledge distillation loss function, G i denotes the i-th transform coded data block, P teacher (G i ) denotes the probability distribution of the teacher model, P student (G i ) denotes the probability distribution of the student model, D KL (·||·) denotes the Kullback-Leibler divergence, which is used to measure the difference between the teacher model and the student model;
[0065] S64, based on the lightweight coding model, the code length and the entropy coding parameters of the transform coded data block are dynamically adjusted in combination with the change of the channel environment, and finally optimized coding data is generated.
[0066] The beneficial effects of the present application are:
[0067] Firstly, by combining the diffusion model, neural network coding, entropy coding and transform coding, the present application can realize more efficient compression in the process of large-scale data transmission. The diffusion model can effectively represent and reduce the dimension of data by learning the potential structure of the data, thereby reducing redundant information and improving the compression rate. At the same time, the neural network coding can automatically extract the features of complex data, avoiding the limitations of the artificially set feature extraction rules in traditional coding methods, making the coding process more intelligent and adaptive. Compared with traditional transform and entropy coding based technologies, the hybrid coding method of the present application can better adapt to different types of input data, improving the adaptability and accuracy of data compression.
[0068] Secondly, the application introduces a reinforcement learning optimization strategy during the encoding process, which can dynamically adjust the encoding strategy under changing channel environments and data characteristics. This innovative design enables the application to adaptively optimize according to the actual application scenario, greatly improving the flexibility and real-time performance of the encoding. Existing traditional encoding methods often rely on fixed rules and models, lacking the ability to adapt to environmental changes. However, the application uses reinforcement learning optimization, which not only evaluates the data transmission effect in real time, but also adjusts the compression algorithm and encoding process under different channel conditions, ensuring optimal encoding results in various network environments. This adaptive optimization mechanism not only improves the stability of data transmission, but also effectively addresses network fluctuations and transmission delays, ensuring efficient compression and transmission of data.
[0069] Furthermore, the hybrid encoding method of the application has high computational efficiency. Compared with traditional deep learning encoding methods, although deep learning technology performs well in feature extraction and compression, its high computational complexity and high demand for computing resources pose certain bottlenecks in practical applications. However, the application introduces knowledge distillation and other technologies, ensuring efficient training of the model while reducing the consumption of computing resources. By using distributed computing and hierarchical optimization strategies, the application enables the model to maintain efficient compression effects while achieving real-time encoding and decoding at a lower computational cost, especially suitable for large-scale data transmission and real-time communication scenarios.
[0070] In addition, the digital hybrid encoding method of the application has strong multi-modal adaptability. Traditional encoding techniques are usually optimized for a single data type, but with the rise of the Internet of Things, intelligent sensors, and big data applications, the emergence of multi-modal data has brought greater challenges to encoding. Based on the multi-modal data compression method of the application, input from different sensors and different data sources can be processed simultaneously, whether it is audio and video data, image data, or sensor data from different devices, all of which can be efficiently compressed and transmitted through a unified encoding framework. This multi-modal adaptability not only improves the flexibility of the system, but also reduces the transmission compatibility problems between different data types, making the encoding method suitable for a wider range of applications, including smart homes, Internet of Vehicles, medical health, and other fields.
[0071] Finally, thanks to the advanced algorithm and optimization strategy adopted by the present application, the data compression efficiency is significantly improved, and a higher compression ratio is achieved in practical applications. By combining neural networks, transform coding and entropy coding technologies, the present application can greatly reduce the demand for data storage and transmission while ensuring data quality and integrity, reducing storage costs and transmission bandwidth consumption. This advantage is particularly important in the field of big data transmission and real-time communication, which can effectively improve data processing speed, reduce transmission delay, and improve the performance and response capability of the overall system. BRIEF DESCRIPTION OF DRAWINGS
[0072] The accompanying drawings are included to provide a further understanding of the present application, and constitute a part of the specification, illustrate the present application and explain the principles of the present application, and do not constitute a limitation of the present application. In the drawings:
[0073] Figure 1 A flowchart of the overall process of a digital hybrid coding method based on a large model is proposed for the present application. DETAILED DESCRIPTION
[0074] The present application will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams that only schematically illustrate the basic structure of the present application, and therefore only show the components related to the present application.
[0075] Reference Figure 1 A digital hybrid coding method based on a large model, comprising the following steps:
[0076] S1, pre-processing the data to be coded, normalizing and feature extraction according to the data type, and generating pre-processed data;
[0077] S2, using a diffusion model driven feature learning method to encode the pre-processed data, and using latent variable representation to extract global relationships and optimal representation, generating feature encoded data;
[0078] S3, neural network encoding of the feature encoded data, using an end-to-end neural network encoding structure for optimal compression representation, and dynamically adjusting the number of encoding bits based on a variable bit rate quantization method, generating neural network encoded data;
[0079] S4, adaptive entropy coding of the neural network encoded data, using a context-aware probability modeling method to predict the prior probability distribution of the data block, and based on a normalized flow entropy coding method for probability density transformation, generating entropy coded data;
[0080] S5, performing discrete transform coding on the entropy coded data, selecting a suitable transform method according to data characteristics based on a dynamic domain conversion method, including discrete cosine transform, discrete wavelet transform or fast Fourier transform, and performing hierarchical sub-block quantization on different frequency components to generate transform coded data;
[0081] S6, optimizing the code length allocation and entropy coding parameters of the transform coded data based on A3C, dynamically adjusting the entropy coding parameters according to different channel environments, and extracting a lightweight coding model from the diffusion model using a knowledge distillation method to generate final optimized coded data.
[0082] In this embodiment, S2 specifically includes:
[0083] S21, performing feature decomposition on the preprocessed data, using a multi-scale feature extraction method to divide the data into multiple levels, constructing feature representations of different scales, and generating a data block set {X i} where X i represents the i-th data block;
[0084] S22, diffusion modeling on the data block set {X i}, using a forward diffusion process to construct the probability evolution path of the data block, so that the data gradually evolves into a standard Gaussian distribution:
[0085]
[0086] where, represents the state of the i-th data block at the t-th time step of the diffusion process, represents the state of the i-th data block at the t-1-th time step of the diffusion process, α t represents the attenuation coefficient at the t-th time step, ∈ t represents a random Gaussian noise, and N(0, I) represents a standard normal distribution with zero mean and unit variance;
[0087] S23, performing a reverse diffusion process on the diffusion modeled data, estimating the noise term using a denoising network, and performing reverse deduction over multiple time steps to obtain a denoised data representation:
[0088]
[0089] where, represents the noise term estimated by the denoising network;
[0090] S24, latent variable mapping based on the denoised data representation, using a variational autoencoder to learn the latent variable representation of the data:
[0091] Z i = μi +σ i ·∈,∈~N(0,I);
[0092] Among them, Z i μ represents the latent variable representation of the i-th data block. i σ represents the mean of the i-th data block. i Let represent the standard deviation corresponding to the i-th data block, and let ∈ represent a random variable that follows a standard normal distribution N(0,I).
[0093] S25. Perform global relationship modeling on the latent variable representation, use the Transformer structure to calculate the global relationship between data blocks, and construct the self-attention weight matrix:
[0094]
[0095] Among them, A ij The attention weights between the i-th and j-th data blocks are represented by Q, where softmax represents the normalization function. i K represents the query vector for the i-th data block. j Let d represent the key vector of the j-th data block, and d represent the feature dimension.
[0096] S26. Based on the global relationship modeling results, extract the optimal representation, and use a feedforward neural network to fuse self-attention features to generate feature-encoded data.
[0097] In this embodiment, S3 specifically includes:
[0098] S31. Perform feature transformation on the feature-encoded data, and map it to a multi-scale feature space using a high-dimensional nonlinear projection method to construct the input dataset {F}. i}, where F i Let {H} represent the i-th feature-encoded data block, and use adaptive feature enhancement techniques to generate a high-dimensional feature representation. i}, where H i This represents the high-dimensional feature representation of the i-th feature-encoded data block;
[0099] S32. An end-to-end neural network encoding structure is used to represent the high-dimensional feature {H}. i} A deep compression representation is performed, utilizing a variable-channel depthwise convolutional network to dynamically adjust feature weights, and calculating the compressed representation {C} through a high-order nonlinear mapping function. i}:
[0100] C i =σ(W3·Swish(W2·ReLU(W1H)) i +b1)+b2)+b3);
[0101] Among them, C i σ represents the compressed representation of the i-th feature-encoded data block, W1, W2, and W3 represent the mapping weight matrices, b1, b2, and b3 represent the bias terms, ReLU represents the modified linear unit activation function, and Swish represents the differentiable activation function.
[0102] S33, regarding the compressed representation {C i Variable bit rate quantization is performed using a non-uniform logarithmic scaling quantization method to generate quantized encoded data {Q}. i}, where Q i This represents the quantized encoded data of the i-th feature:
[0103]
[0104] Among them, Q(C) i ) represents the quantization value of the i-th feature-coded data block, β represents the non-uniform quantization scale parameter, and max(|C i |) represents the maximum value of the i-th feature-coded data block; sign(·) represents the sign function: when C i When it is a positive number, sign(C) i ) = 1; when C i When it is negative, sign(C) i ) = -1; when C i When it is zero, sign(C) i ) = 0;
[0105] S34. Based on the cross-modal contrastive learning method, calculate the information redundancy between different data blocks, and use the hierarchical contrastive loss function to optimize the data compression representation, generating neural network encoded data:
[0106]
[0107] Among them, L contrastive S(Q) represents the cross-modal feature contrast loss, N represents the total number of feature-encoded data blocks, exp represents the exponential function, and S(Q) represents the cross-modal feature contrast loss. i Q j ) represents the quantized encoded data Q of the i-th feature. i Quantize and encode the data Q with the j-th feature j The similarity measure between them, S(Q) i Q k ) represents the quantized encoded data Q of the i-th feature. i Quantize and encode the data Q with the kth feature k The similarity measure between them, τ represents the temperature parameter; I(y i =y j ) represents an indicator function, when y i=y j I(y i =y j )=1 i ≠y j I(y i =y j )=0。
[0108] In this embodiment, the S4 specifically includes:
[0109] S41, the neural network encoding data is divided into several neural network encoding data blocks and is assigned an index, and context information is recorded for each neural network encoding data block, including the encoding results of adjacent neural network encoding data blocks and global statistical features;
[0110] S42, based on the context-aware probability modeling method, the prior probability of each neural network encoding data block is predicted, and a self-attention mechanism is used to consider the local and global dependency relationship to generate a probability distribution model of the neural network encoding data block;
[0111] S43, the probability distribution model is subjected to a normalization flow entropy encoding conversion, a reversible and differentiable flow model is selected to map the data distribution, so that the data tends to be uniformly distributed;
[0112] S44, based on the normalization flow conversion result, the context prediction information of the neural network encoding data block is combined, and the code length is adaptively allocated in a bit rate regulation or entropy threshold adjustment manner, so that the encoding length used by the high-frequency neural network encoding data block is greater than the encoding length used by the low-frequency neural network encoding data block;
[0113] S45, the neural network encoding data block after adaptive allocation of the code length is subjected to entropy encoding processing, arithmetic encoding is used to generate a compressed bit stream, and correlation verification is performed;
[0114] S46, the compressed bit stream after the correlation verification is correct is output as the entropy encoding data.
[0115] In this embodiment, the S5 specifically includes:
[0116] S51, the entropy encoding data is subjected to feature analysis, and the time domain variation characteristics and the spectral energy distribution of the entropy encoding data block are calculated;
[0117] S52, based on the feature analysis result of the entropy encoding data block, a dynamic domain conversion method is used, discrete cosine transform, discrete wavelet transform or fast Fourier transform is selected according to the characteristics of the entropy encoding data, and the entropy encoding data block is subjected to conversion to obtain a converted entropy encoding data block;
[0118] S53, frequency decomposition is performed on the transformed entropy encoded data block, a plurality of sub-frequency bands are divided based on spectral energy density, signal energy of each sub-frequency band is calculated, and an optimal decomposition scale is determined based on local gradient change analysis;
[0119] S54, non-uniform quantization is performed on the transform coefficients of different sub-frequency bands by transform domain gradient constraint:
[0120]
[0121] wherein E i,j represents the quantized value of the jth frequency component in the ith entropy encoded data block, C i,j represents the transform coefficient, Δ i,j represents the adaptive quantization step, round(·) represents the rounding operation, A i,j represents the attention weight of the jth frequency component in the ith entropy encoded data block, and γ represents the gradient regulation coefficient, represents the local gradient of the transform coefficient along the frequency axis.
[0122] S55, transform domain reorganization is performed on the non-uniformly quantized entropy encoded data block to generate transform coded data.
[0123] In the embodiment, the S6 specifically includes:
[0124] S61, the A3C algorithm is used to optimize the code length allocation of the transform coded data, a state space and an action space are constructed, and an optimal code length allocation strategy is calculated through a policy network and a value function:
[0125]
[0126] wherein θ represents a parameter set of the policy network, ξ represents a learning rate, N1 represents the total number of transform coded data blocks, s i represents the state of the ith transform coded data block, π θ (s i ) represents the policy network π θ selects the probability distribution of the action under the state s i represents the parameter gradient, A i represents the advantage estimate value, V θ (s i ) represents the expected total reward obtained by taking the current strategy under the state s i
[0127] S62, the entropy encoding parameters of the transform coded data block are dynamically adjusted according to the code length allocation optimized by the A3C algorithm, the entropy encoding algorithm is adaptively configured based on different channel environments, and the optimization goal is to maximize the encoding efficiency;
[0128] S63, a light coding model is extracted from the diffusion model by using a knowledge distillation method, and the knowledge of the complex model is migrated to the student model through a teacher-student model training strategy:
[0129]
[0130] wherein L KD represents the knowledge distillation loss function, G i represents the i-th transformed coding data block, P teacher (G i ) represents the probability distribution of the teacher model, P student (G i ) represents the probability distribution of the student model, D KL (·||·) represents the Kullback-Leibler divergence, which is used to measure the difference between the teacher model and the student model;
[0131] S64, based on the light coding model, the code length and entropy coding parameters of the transformed coding data block are dynamically adjusted according to the change of the channel environment, and the final optimized coding data is generated.
[0132] Embodiment 1:
[0133] In order to verify the feasibility of the application in implementation, the application is applied to a smart city data transmission system based on Internet of Things (IoT) environment. The system involves a large number of different types of sensors, collecting multi-modal data including temperature, humidity, air pressure, video monitoring, audio monitoring, etc. The data is transmitted to the data center for processing through wireless network. Due to the complexity and largeness of these data transmission, traditional coding and compression methods often face problems such as low compression rate, large data transmission delay, and unstable compression efficiency when the channel environment changes. Therefore, an efficient and adaptive coding scheme is needed to optimize data transmission.
[0134] In this embodiment, a digital hybrid coding method based on large model is used to encode the sensor data in smart city. This method fully utilizes the advantages of diffusion model, neural network coding, entropy coding and transform coding, and combines the optimization strategy of reinforcement learning to dynamically adjust the coding parameters according to the real-time change of the channel environment, in order to improve the data compression efficiency and ensure the integrity and recoverability of the data under unstable network conditions.
[0135] Specifically, the data collected by the sensor nodes, including signals from temperature sensors, humidity sensors, air quality monitors, and video surveillance cameras, are first preprocessed. The preprocessing steps include data normalization, noise removal, and feature extraction. For example, video data is first converted to color space, audio data is standardized, and sensor data is normalized and denoised. The preprocessed data is then input into the diffusion model for feature learning and encoding. Through the diffusion process, the data gradually evolves into a standard Gaussian distribution, making it easier to compress and encode later.
[0136] Next, the preprocessed data is compressed and represented using neural network encoding, and the number of bits is dynamically adjusted based on the variable bit rate quantization method. In this way, the compression efficiency is significantly improved. During the encoding process, the neural network adjusts the encoding strategy adaptively according to different data types and channel conditions, ensuring that each data block is encoded at the best bit rate when transmitted.
[0137] In addition, in the adaptive entropy encoding stage, the context-aware probability modeling method is used to predict the prior probability distribution of the data block, and the probability density of the data block is transformed through normalized flow entropy encoding. This process effectively removes redundant data during encoding, improving compression efficiency. At the same time, multiple entropy encoding methods such as Huffman encoding and arithmetic encoding are combined in the entropy encoding process to ensure optimal compression results under different data types.
[0138] The transform encoding stage uses a dynamic domain conversion method based on data characteristics. According to the frequency characteristics of different sensor data, appropriate transform methods (such as discrete cosine transform, discrete wavelet transform, or fast Fourier transform) are selected. This transformation can better separate the low-frequency and high-frequency components of the signal, providing favorable conditions for subsequent quantization and compression. In the transformed data, a hierarchical sub-block quantization method is used to quantize the high-frequency components more and the low-frequency components accurately, effectively balancing the compression rate and data quality.
[0139] Finally, based on the A3C algorithm-optimized code length allocation and entropy encoding parameters, the transformed encoding data is further optimized. According to different channel environments, the encoding parameters are dynamically adjusted, and a lightweight encoding model is extracted from the diffusion model through knowledge distillation to reduce computational resource consumption, ensuring that the encoding can efficiently run on resource-constrained devices.
[0140] Through the above methods, the final encoded data not only has high compression rate, but also can automatically optimize according to the changes in network conditions and transmission environment, providing an efficient, stable, and adaptive encoding scheme for data transmission in smart cities.
[0141] To verify the effect of the present application, we conducted experimental data collection and comparison, and the data collection site was a data center in a smart city. The performance of the present application method and the traditional method in various scenarios was compared in the experiment.
[0142] The experimental results show that the present application method is significantly better than the traditional encoding method in terms of data compression rate, transmission delay, and robustness in changing channel environment. The specific experimental data is shown in the following table:
[0143] Table 1 Performance comparison table of different encoding methods in smart city data transmission system
[0144]
[0145] By analyzing the data in the above table 1, first of all, from the data compression rate, the compression rate of the present application method reaches 58.7%, which is 16.2 percentage points higher than the traditional compression method. The compression rate of the traditional compression method is 42.5%, while the compression rates of the adaptive entropy encoding method and the compression method based on neural network are 50.3% and 53.2% respectively. This result shows that the present application method has obvious advantages in improving the compression rate, which can effectively reduce the bandwidth required during data transmission and save network resources.
[0146] Secondly, encoding time and decoding time are another key factor affecting data transmission efficiency. According to the experimental data, the encoding time of the present application method is only 0.9 seconds, and the decoding time is 0.8 seconds, both of which are the shortest. In contrast, the encoding time of the traditional compression method is 1.2 seconds, and the decoding time is 1.0 seconds. The encoding and decoding times of the adaptive entropy encoding method and the compression method based on neural network are also longer, especially when dealing with complex data, the calculation overhead of the traditional method and other methods is larger. The time optimization of the present application method benefits from its efficient encoding structure and reinforcement learning optimization strategy, thereby reducing the time delay of data processing and improving the real-time response capability of the system.
[0147] In terms of transmission delay, the present application method performs well, with a transmission delay of 150 milliseconds, which is 25% lower than the 200 milliseconds of the traditional compression method. This shows that the present application method can reduce the transmission delay of data in the network while ensuring high compression rate, thereby improving the performance of the overall system. The delays of the adaptive entropy encoding method and the compression method based on neural network are 180 milliseconds and 170 milliseconds respectively, which are better than the traditional method, but still not as good as the present application method.
[0148] In terms of bit error rate, the bit error rate of the method of the present application is 0.8%, which is significantly lower than the 5.8% of the traditional compression method, and much lower than the other two methods (adaptive entropy coding method is 3.1%, and the compression method based on neural network is 2.3%). This shows that the method of the present application can better maintain the accuracy and reliability of data in the process of signal transmission, especially in complex channel conditions, it can effectively reduce data loss and errors, and ensure the integrity of data.
[0149] Finally, from the perspective of channel adaptability, the method of the present application performs best in all test methods and is rated as excellent. It can dynamically adjust the encoding strategy according to different channel environments, ensuring stable performance under various network conditions. In contrast, the channel adaptability of the traditional compression method is poor and is easily affected by network fluctuations, while the adaptive entropy coding method and the compression method based on neural network perform well, but still cannot compare with the adaptive ability of the method of the present application.
[0150] Overall, the method of the present application performs well in various key performance indicators, especially in compression rate, encoding efficiency, transmission delay, bit error rate and channel adaptability, which are all superior to the prior art. Through this method, the data transmission system of smart city can realize efficient, low-delay and robust compression and transmission, which is suitable for various data transmission requirements in practical applications.
[0151] The above is only the preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any skilled person in the art can make equivalent replacement or change according to the technical solution and the inventive concept of the present application within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A large model-based digital hybrid coding method, characterized by, The method comprises the following steps: S1, preprocessing the to-be-encoded data, normalizing and extracting features according to the data type, and generating preprocessed data; S2, using a diffusion model driven feature learning method to encode the preprocessed data, and using a latent variable representation to extract global relationships and optimal representations, to generate feature encoded data; S3, neural network encoding of the feature encoded data, optimal compression representation using an end-to-end neural network encoding structure, and dynamic adjustment of the encoding bit number based on a variable bit rate quantization method, to generate neural network encoded data; S4, adaptive entropy encoding of the neural network encoded data, using a context-aware probability modeling method to predict the prior probability distribution of the data block, and using a normalized flow entropy encoding method to perform probability density transformation, to generate entropy encoded data; S5, discrete transform encoding of the entropy encoded data, based on a dynamic domain conversion method, selecting an appropriate transform method according to the data characteristics, including discrete cosine transform, discrete wavelet transform or fast Fourier transform, and using a hierarchical sub-block quantization method to perform hierarchical quantization for different frequency components, to generate transform encoded data; S6, optimizing the code length allocation and entropy encoding parameters of the transform encoded data based on A3C, dynamically adjusting the entropy encoding parameters according to different channel environments, and using a knowledge distillation method to extract a lightweight encoding model from the diffusion model, to generate the final optimized encoded data.
2. The large model-based digital hybrid coding method of claim 1, wherein, The S2 specifically comprises: S21, performing feature decomposition on the preprocessed data, using a multi-scale feature extraction method to divide the data into multiple levels, constructing feature representations of different scales, and generating a data block set {X i}, wherein X i represents the i th data block; S22, spread modeling is performed on the data block set {X i} to construct a probability evolution path of the data block by using a forward spread process, so that the data gradually evolves into a standard Gaussian distribution: wherein, denotes the state of the i-th data block at the t-th time step of the diffusion process, denotes the state of the i-th data block at the t-1-th time step of the diffusion process, a t denotes the decay coefficient at the t-th time step, e t denotes a random Gaussian noise, N(0, I) denotes a standard normal distribution with zero mean and unit variance; S23, performing a reverse diffusion process on the diffusion modeled data, using a denoising network to estimate the noise term, and performing reverse deduction at multiple time steps to obtain a denoised data representation: wherein, denotes the noise term of the denoising network estimate; S24, mapping the latent variable based on the denoised data representation, using a variational autoencoder to learn the latent variable representation of the data: Z i = μ i + σ i · ∈, ∈ ~ N(0, I); where Z i represents the latent variable representation of the i-th data block, μ i represents the mean corresponding to the i-th data block, σ i represents the standard deviation corresponding to the i-th data block, and ∈ represents a random variable following a standard normal distribution N(0, I). S25, modeling the global relationship of the latent variable representation, using a Transformer structure to calculate the global relationship between data blocks, and constructing a self-attention weight matrix: wherein A ij denotes the attention weight between the ith data block and the jth data block, softmax denotes a normalization function, Q i denotes the query vector of the ith data block, K j denotes the key vector of the jth data block, and d denotes a feature dimension. S26, extracting optimal representations based on the global relationship modeling results, using a feedforward neural network to fuse self-attention features, to generate feature encoded data.
3. The large model-based digital hybrid coding method of claim 1, wherein, The S3 specifically comprises: S31, feature transformation is performed on the feature coding data, a high-dimensional nonlinear projection method is used to map to a multi-scale feature space, and an input data set {F i} is constructed, where F i represents the i-th feature coding data block, and an adaptive feature enhancement technology is used to generate a high-dimensional feature representation {H i}, wherein H i represents the high-dimensional feature representation of the i-th feature coding data block; S32, using an end-to-end neural network coding structure to perform deep compression representation on the high-dimensional feature representation {H i}, dynamically adjusting feature weights by using a variable channel depth convolutional network, and calculating the compression representation {C i} by using a high-order nonlinear mapping function: C i = σ(W3 · Swish(W2 · ReLU(W1 H i + b1) + b2) + b3); where C i denotes the compressed representation of the i-th feature encoding data block, σ denotes an activation function, W1, W2, and W3 denote mapping weight matrices, b1, b2, and b3 denote bias terms, ReLU denotes a rectified linear unit activation function, and Swish denotes a differentiable activation function. S33, variable bit rate quantization processing is performed on the compressed representation {C i}, a non-uniform logarithmic scale quantization method is used to generate quantized encoded data {Q i}, wherein Q i represents the i-th feature quantized encoded data: wherein Q(C i ) denotes a quantized value of the i-th feature encoding data block, β denotes a non-uniform quantization scale parameter, max(|C i |) denotes a maximum value of the i-th feature encoding data block; sign(·) denotes a sign function: sign(C i ) = 1 when C i is positive; sign(C i ) = -1 when C i is negative; and sign(C i ) = 0 when C i is zero. S34, calculating the information redundancy between different data blocks based on a cross-modal contrast learning method, using a hierarchical contrast loss function to optimize data compression representation, to generate neural network encoded data: wherein, L contrastive represents the cross-modal feature contrast loss, N represents the total number of feature encoding data blocks, exp represents the exponential function, S(Q i ,Q j ) represents the similarity measure between the i-th feature quantization encoding data Q i and the j-th feature quantization encoding data Q j , S(Q i ,Q k ) represents the similarity measure between the i-th feature quantization encoding data Q i and the k-th feature quantization encoding data Q k , τ represents the temperature parameter; I(y i =y j ) represents the indicator function, when y i =y j , I(y i =y j ) = 1, when y i ≠y j , I(y i =y j ) = 0.
4. The large model-based digital hybrid coding method of claim 1, wherein, The S4 specifically comprises: S41, dividing the neural network encoded data into several neural network encoded data blocks and assigning indexes, recording the context information of each neural network encoded data block, including the encoding results of adjacent neural network encoded data blocks and global statistical features; S42, predicting the prior probability of each neural network encoded data block based on a context-aware probability modeling method, using a self-attention mechanism to consider local and global dependencies, to generate a probability distribution model of the neural network encoded data block; S43, performing normalized flow entropy encoding conversion on the probability distribution model, selecting a reversible and differentiable flow model to map the data distribution, so that the data tends to be uniformly distributed; S44, based on the normalized flow conversion result, the context prediction information of the neural network coding data block is combined, the code length is adaptively allocated in the way of bit rate regulation or entropy threshold adjustment, so that the coding length used by the high-frequency neural network coding data block is greater than the coding length used by the low-frequency neural network coding data block; S45, the neural network coding data block after adaptive allocation of code length is subjected to entropy coding processing, arithmetic coding is adopted to generate compressed bit stream, and association verification is carried out; S46, the compressed bit stream after association verification without error is output as entropy coding data.
5. The large model-based digital hybrid coding method of claim 1, wherein, The S5 specifically comprises: S51, the entropy coding data is subjected to feature analysis, and the time domain variation characteristics and spectral energy distribution of the entropy coding data block are calculated; S52, based on the feature analysis result of the entropy coding data block, a dynamic domain conversion method is adopted, discrete cosine transform, discrete wavelet transform or fast Fourier transform is selected according to the characteristics of the entropy coding data, and the transformed entropy coding data block is obtained by executing transform on the entropy coding data block; S53, the transformed entropy coding data block is subjected to frequency decomposition, a plurality of sub-frequency bands are divided based on spectral energy density, the signal energy of each sub-frequency band is calculated, and the optimal decomposition scale is determined based on local gradient variation analysis; S54, the transform coefficients of different sub-frequency bands are non-uniformly quantized by transform domain gradient constraint: wherein E i,j denotes the quantized value of the jth frequency component in the ith entropy coded data block, C i,j denotes the transform coefficient, Δ i,j denotes the adaptive quantization step size, round(·) denotes the rounding operation, A i,j denotes the attention weight of the jth frequency component in the ith entropy coded data block, γ denotes the gradient regulation coefficient, denotes the local gradient of the transform coefficient along the frequency axis; S55, the transformed entropy coding data block after non-uniform quantization is subjected to transform domain reorganization to generate transform coding data.
6. The large model-based digital hybrid coding method of claim 1, wherein, The S6 specifically comprises: S61, the A3C algorithm is adopted to optimize the code length allocation of the transform coding data, the state space and action space are constructed, and the optimal code length allocation strategy is calculated through the policy network and value function: wherein θ denotes a parameter set of the policy network, ξ denotes a learning rate, N1 denotes a total number of transform coded data blocks, s i denotes a state of the i-th transform coded data block, π θ (s i ) denotes a policy network π θ selecting a probability distribution of actions in the state s i denotes a parameter gradient, A i denotes an advantage estimate, V θ (s i ) denotes an expected total reward obtained by taking the current policy in the state s i denotes an update operation; S62, according to the code length allocation after A3C algorithm optimization, the entropy coding parameters of the transform coding data block are dynamically adjusted, the entropy coding algorithm is adaptively configured based on different channel environments, and the optimization goal is to maximize the coding efficiency; S63, a lightweight coding model is extracted from the diffusion model by using the knowledge distillation method, and the knowledge of the complex model is migrated to the student model through the teacher-student model training strategy: wherein L KD represents the knowledge distillation loss function, G i represents the i-th transformed encoded data block, P teacher (G i ) represents the probability distribution of the teacher model, P student (G i ) represents the probability distribution of the student model, D KL (·||·) represents the Kullback-Leibler divergence used to measure the difference between the teacher model and the student model; S64, based on the lightweight coding model, the code length and entropy coding parameters of the transform coding data block are dynamically adjusted according to the change of channel environment to generate the final optimized coding data.
Citation Information
Patent Citations
Video coding intra-frame code rate control method based on deep reinforcement learning
CN111294595A
Video compression method and system based on variational auto-encoder improved entropy model
CN119011851A