Data quantification method and device, equipment, storage medium and program product

By independently optimizing the quantization center and interval, combined with adaptive nonlinear correction and distribution parameter guidance, the problem of large quantization error in existing quantization methods is solved, and efficient data compression and improved reconstruction quality are achieved with low complexity.

CN120658273APending Publication Date: 2025-09-16MIGU CO LTD +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510635456.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing quantization methods have the potential for decoupling independent optimization in the simultaneous optimization of the quantization center and the quantization interval, which has not been utilized, resulting in a significant increase in quantization error, especially in areas with complex data distribution or boundary areas, and limiting compression efficiency.

Method used

By independently calculating the quantization center and quantization interval, combined with adaptive nonlinear correction and distribution parameter guidance, the quantization center is optimized, and the distribution parameters are extracted using the main coding network and the super priori coding network to perform nonlinear adjustment of the quantization center, avoiding complex neural networks or iterative optimization.

Benefits of technology

It effectively reduces quantization error at low computational complexity, improves data compression efficiency and reconstruction quality, simplifies computational overhead, and improves coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658273A_ABST
    Figure CN120658273A_ABST
Patent Text Reader

Abstract

The invention discloses a data quantification method and device, equipment, a storage medium and a program product, and the method comprises the steps: firstly carrying out the coding of original data through a main coding network, obtaining an initial hidden variable, obtaining a distribution parameter of the initial hidden variable, calculating a quantification center according to the distribution parameter, the initial hidden variable and a preset parameter adjustment value, and carrying out the calculation of the quantification center; and finally, quantizing the initial hidden variable according to the quantization center and the quantization interval to obtain a reference hidden variable. By independently calculating the quantization center, mutual restriction of the quantization center and the quantization interval is avoided, better states can be achieved respectively, and quantization errors can be effectively reduced. Besides, by optimizing the decoupling quantization center and the quantization interval and combining self-adaptive nonlinear correction and distribution parameter guidance, limitation of a traditional method is broken through, quantization errors are effectively reduced under low calculation complexity, and compression efficiency and reconstruction quality of data are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a data quantization method, apparatus, device, storage medium and program product. Background Art

[0002] In the fields of signal processing and data compression, quantization techniques are widely used to reduce the space occupied by data storage and transmission. The quantization process maps continuous signals into discrete integer latent variables, thereby reducing the amount of data. However, this process introduces quantization errors, which are particularly significant near the boundaries of the quantization intervals. Common quantization methods in the prior art include uniform quantization and non-uniform quantization. Uniform quantization divides the signal range into multiple intervals, mapping the values ​​within each interval to the interval midpoint. Non-uniform quantization dynamically adjusts the interval size and quantization center based on the signal distribution characteristics to better adapt to the data distribution. However, existing quantization methods often rely on the simultaneous optimization of the quantization center and the quantization interval. This simultaneous optimization requires a tight coupling between the adjustment of the quantization center and the interval, ignoring the potential for decoupling and independent optimization. Mutual constraints may prevent each from achieving optimality, ultimately resulting in suboptimal solutions. This is particularly true in complex data distributions or boundary regions (such as signal values ​​near interval boundaries), where quantization errors can significantly increase. Summary of the Invention

[0003] The purpose of the embodiments of the present invention is to provide a data quantization method, apparatus, device, storage medium and program product, which can effectively reduce quantization error.

[0004] To achieve the above objectives, an embodiment of the present invention provides a data quantization method, comprising:

[0005] Use the main encoding network to encode the original data to obtain the initial latent variables;

[0006] Obtaining distribution parameters of the initial latent variables;

[0007] Calculating a quantization center according to the distribution parameter, the initial latent variable and a preset parameter adjustment value;

[0008] The initial latent variable is quantized according to the quantization center and the quantization interval to obtain a reference latent variable.

[0009] As an improvement to the above solution, obtaining the distribution parameters of the initial latent variables includes:

[0010] Performing a super-prior coding transformation on the initial latent variable using a super-prior coding network to obtain first super-prior information;

[0011] Performing entropy encoding and entropy decoding on the first super a priori information to obtain second super a priori information;

[0012] A super-prior decoding network is used to perform a super-prior decoding transformation on the second super-prior information to obtain distribution parameters of the initial latent variables.

[0013] As an improvement of the above solution, the distribution parameters include mean and variance.

[0014] As an improvement of the above solution, the parameter adjustment value includes a slope and an offset value, and the calculation of the quantization center according to the distribution parameter, the initial latent variable and the preset parameter adjustment value includes:

[0015] Uniformly quantizing the initial latent variables to obtain candidate parameters;

[0016] The candidate parameters are nonlinearly adjusted using a linear function and the offset value to obtain a quantization center; wherein the linear function is constructed according to the initial latent variable, the slope and the mean.

[0017] As an improvement to the above solution, after obtaining the distribution parameters of the initial latent variables, the method further includes:

[0018] A quantization interval is determined according to the variance.

[0019] As an improvement to the above solution, after obtaining the reference latent variable, the method further includes:

[0020] Entropy encoding is performed on the reference latent variable to obtain compressed data.

[0021] To achieve the above objectives, an embodiment of the present invention further provides a data quantization device, comprising:

[0022] An initial latent variable acquisition unit is used to encode the original data using the main encoding network to obtain the initial latent variables;

[0023] A distribution parameter acquisition unit, configured to acquire the distribution parameters of the initial latent variables;

[0024] A quantization center calculation unit, configured to calculate the quantization center based on the distribution parameter, the initial latent variable, and a preset parameter adjustment value;

[0025] The quantization unit is used to quantize the initial latent variable according to the quantization center and the quantization interval to obtain a reference latent variable.

[0026] To achieve the above objectives, an embodiment of the present invention further provides a data quantization device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the data quantization method as described in any of the above embodiments is implemented.

[0027] To achieve the above-mentioned purpose, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the data quantization method as described in any of the above-mentioned embodiments.

[0028] To achieve the above objectives, an embodiment of the present invention further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the data quantization method as described in any of the above embodiments.

[0029] Compared with the prior art, the data quantization method, device, equipment, storage medium and program product disclosed in the present invention can achieve a better state respectively by independently calculating the quantization center, avoiding the mutual restraint between the quantization center and the quantization interval, and can effectively reduce the quantization error. The optimization of the quantization center is completed only by relying on distribution parameters and parameter adjustment values, without the need for complex neural networks or iterative optimization, and the computational overhead is extremely low. In addition, by decoupling the optimization of the quantization center and the quantization interval, combining adaptive nonlinear correction and distribution parameter guidance, it breaks through the limitations of traditional methods, effectively reduces the quantization error at low computational complexity, and improves the compression efficiency and reconstruction quality of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a uniform quantization function image provided by the prior art;

[0031] Figure 2 This is a schematic diagram of the effect of adjusting the first quantization center on distortion provided by an embodiment of the present invention;

[0032] Figure 3 This is a schematic diagram of the effect of adjusting the second quantization center on distortion provided by an embodiment of the present invention;

[0033] Figure 4 is a flow chart of a data quantization method provided by an embodiment of the present invention;

[0034] Figure 5 is a flow chart of obtaining distribution parameters provided by an embodiment of the present invention;

[0035] Figure 6 1 is a schematic diagram of the quantized center offset provided by an embodiment of the present invention;

[0036] Figure 7 This is a structural block diagram of a data quantization device provided by an embodiment of the present invention;

[0037] Figure 8 This is a structural block diagram of a data quantization device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0038] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0039] The present invention is applied to an end-to-end coding system, which can be represented as a triple (F, Q, G), where F represents the forward transform, Q represents the quantizer, and G represents the causal entropy estimator. The encoder generates a bit stream through entropy coding, which is guided by the likelihood distribution G(Q(F(X))) of Q(F(X)). Correspondingly, the end-to-end decoding system can be symmetrically represented as (F′, dQ, G), where F′ and dQ represent the inverse transform and the dequantizer, respectively. Due to the causality of G, the decoder can reconstruct the bit string through entropy decoding under the same estimated distribution to obtain Y, and the reconstructed image is then obtained through F′(dQ(Y)).

[0040] The traditional uniform quantization operator Q is defined as a rounding operation that satisfies the following formula:

[0041] round:x→[x] (1);

[0042] Here, "round" represents the rounding operation and is the name of the mapping; the symbol "→" indicates the mapping relationship; x is the input continuous distributed signal (e.g., the continuous latent variable after the forward transform), and [x] is the nearest integer obtained by rounding x. This formula maps the input continuous distributed signal x to its nearest integer.

[0043] See also Figure 1 , Figure 1 It is a uniform quantization function image provided by the existing technology. Figure 1 The function graph of the uniform quantization operator Q is shown. The horizontal axis (X-axis) represents the continuously distributed signal x, which can be any real number and covers the range of values ​​of the original continuous data (such as the continuous latent variable of an image or video after forward transformation). The vertical axis (Y-axis) represents the discrete integer [x] after quantization. The reason for the staircase shape is that uniform quantization divides the continuous real number axis into intervals of equal width, and all x values ​​within each interval are mapped to the same integer. This staircase shape intuitively reflects the property of uniform quantization that "all values ​​in a continuous interval are mapped to a single discrete integer." Each step platform corresponds to a quantization interval, and the jump points correspond to the interval boundaries.

[0044] However, this quantization method cannot adapt to specific data distributions, resulting in limited compression efficiency. Specifically, the bit rate R is used to describe the average number of bits required for encoding. Based on information entropy theory, it reflects the impact of quantization interval division on coding efficiency, and the distortion D mainly depends on the optimization of the quantization center. The bit rate R and distortion D can be expressed as follows:

[0045] R=-∑ c∈C p c logp c (2);

[0046]

[0047] Wherein, c represents the quantization interval, c=1,2...C, C represents the set of quantization intervals, Indicates the quantization center corresponding to the quantization interval c; p c Indicates the probability corresponding to the quantization interval c, indicating that the signal x falls within The probability of being within is obtained by calculating the probability density function f(x) in The above integral is obtained; Q S (x) represents the quantized signal; d(x,Q S (x)) represents the original signal x and the quantized signal Q S (x) between the distortion metrics (such as mean square error, absolute error, etc.).

[0048] The probability p of each quantization interval is calculated by the above formula (3) c , and then use formula (2) to quantize the average uncertainty of the coding. The code rate R depends only on the division of the quantization interval, which is used to evaluate the compactness of the information representation in the coding process. Formula (4) is used for f(x)d(x,Q S (x)) is integrated to calculate the weighted average distortion and measure the error introduced by the quantization process. According to formula (4), the distortion D mainly depends on the optimization of the quantization center. The selection of the quantization center directly affects Q S (x), and then determine d(x,Q S (x)) is used to evaluate the impact of coding on signal quality.

[0049] The present invention takes into account that the non-uniform optimization of the quantization interval is relatively complex and may introduce significant computational complexity, so the present invention mainly focuses on low-complexity tuning of the quantization center. Figure 2 and Figure 3 The effect of adjusting the quantization center on the distortion is visualized, where the horizontal axis is the quantization center of the random pixel point, the vertical axis is the distortion of the overall image coding, A1 and B1 are the actual quantization centers, and A2 and B2 represent the theoretically optimal quantization centers.

[0050] against Figure 2 The horizontal axis ranges from -1.5 to -0.5, representing the quantization center value of a random pixel within a quantization interval. The vertical axis represents the distortion of the overall image encoding, with higher values ​​indicating greater distortion. The curve shows how the distortion changes with the quantization center, exhibiting convexity within the corresponding interval. A2, at the lowest point of the curve, represents the theoretically optimal quantization center that minimizes distortion. A1 is higher than A2, indicating that the distortion caused by the actual quantization center used is greater than the theoretical optimal value, indicating room for improvement.

[0051] against Figure 3 The horizontal axis ranges from -10.5 to -9.5, corresponding to another quantization interval. B2 is at the lowest point of the curve and is the theoretically optimal quantization center for this interval. B1 is higher than B2, indicating that the actual quantization center is not optimal, resulting in significant distortion.

[0052] It can be seen that within their respective intervals, the distortion function with respect to the quantization center is convex, A2 and B2 are located at the minimum of the convex function (theoretical optimum), while A1 and B1 represent quantization centers that have not been optimized in actual applications. Their positions are not fully optimized, resulting in distortion higher than the theoretical minimum, which intuitively reflects the necessity of optimizing the quantization center to reduce distortion. Based on this, an embodiment of the present invention provides a data quantization method based on optimizing the quantization center. This method does not require the introduction of a new neural network module, and almost does not increase the training computing power consumption and encoding and decoding complexity. It realizes nonlinear correction of the quantization center through a priori algorithm, thereby improving rate-distortion performance.

[0053] See also Figure 4 , Figure 4 : is a flow chart of a data quantization method provided by an embodiment of the present invention, the data quantization method comprising:

[0054] S1. Use the main encoding network to encode the original data to obtain the initial latent variables;

[0055] S2. Obtain the distribution parameters of the initial latent variables;

[0056] S3. Calculating a quantization center according to the distribution parameter, the initial latent variable, and a preset parameter adjustment value;

[0057] S4. quantize the initial latent variable according to the quantization center and the quantization interval to obtain a reference latent variable.

[0058] Exemplarily, the distribution parameters include mean and variance. The original data includes image sequences, video sequences and other data. The main coding network is used to encode the original data and convert the original data into initial latent variables in a high-dimensional feature space. This process extracts the core features of the data and lays the foundation for subsequent compression and processing. Then, the distribution parameters of the initial latent variables are obtained. The distribution parameters describe the mean and fluctuation range (variance) of the latent variables, providing a basis for adjusting the quantization center. The quantization center is calculated based on the distribution parameters, the initial latent variables and the preset parameter adjustment values. This process can optimize the quantization center, and then the initial latent variables are quantized based on the optimized quantization center and quantization interval to obtain reference latent variables, thereby completing the quantization process of the original data.

[0059] In an embodiment of the present invention, by independently calculating the quantization center, the mutual restraint between the quantization center and the quantization interval is avoided, and a more optimal state can be achieved respectively, which can effectively reduce the quantization error. In addition, by decoupling the optimization of the quantization center and the quantization interval, combined with adaptive nonlinear correction and distribution parameter guidance, the limitations of traditional methods are broken through, the quantization error is effectively reduced at low computational complexity, and the data compression efficiency and reconstruction quality are improved. In addition, existing non-uniform quantization methods usually rely on neural networks to generate quantization tuning parameters from spatiotemporal context and super-prior information, further increasing the computational cost. The present invention only relies on distribution parameters and parameter adjustment values ​​to complete the optimization of the quantization center, without the need for complex neural networks or iterative optimization, and the computational overhead is extremely low.

[0060] Specifically, in step S1, the main encoding network is used to encode the original data to obtain the initial latent variables.

[0061] Exemplarily, the input of the main coding network is raw data (such as an image pixel matrix or a video frame sequence), and the output is an initial latent variable, which is usually a low-resolution, low-dimensional feature map. Optionally, the main coding network usually includes a downsampling layer (such as convolution and pooling), focusing on feature extraction and dimensionality compression, and pursuing the high-fidelity reconstruction capability of the latent variables for the original data. For example, in image compression, the main coding network can adopt a residual network or a Transformer structure to gradually reduce the spatial resolution and increase the number of channels.

[0062] In an embodiment of the present invention, the main encoding network is used to reduce the dimension and condense the features of the original data, thereby removing redundancy and noise, and allowing subsequent processing to focus on key information.

[0063] Specifically, in step S2, see Figure 5 , Figure 5 is a flow chart of obtaining distribution parameters provided by an embodiment of the present invention, wherein obtaining the distribution parameters of the initial latent variables includes:

[0064] S21, using a super-prior coding network to perform a super-prior coding transformation on the initial latent variable to obtain first super-prior information;

[0065] S22. Perform entropy encoding and entropy decoding on the first super a priori information to obtain second super a priori information;

[0066] S23. Perform a super-prior decoding transformation on the second super-prior information using a super-prior decoding network to obtain distribution parameters of the initial latent variables.

[0067] Exemplarily, the input of the super-prior coding network is the initial latent variable output by the main coding network. After further encoding, it outputs super-prior information, providing prior knowledge for subsequent entropy coding. Optionally, the super-prior coding network is typically a lightweight network that focuses on statistical feature extraction and is used to model the distribution characteristics of latent variables. For example, it may include fully connected layers or small convolutional kernel networks, with latent variable features as input and probability distribution parameters such as mean and variance as output.

[0068] It should be noted that the main coding network and the super-prior coding network are two independent neural networks, serving "hidden variable generation" and "super-prior information extraction" respectively. The two differ in function, input and output, and network design, but together constitute a complete coding link for data compression.

[0069] Specifically, in step S21, the super-a priori coding network further processes the initial latent variables and extracts prior information such as their statistical characteristics and distribution patterns for subsequent prediction and quantitative optimization of the latent variable distribution.

[0070] Specifically, in step S22, first, entropy encoding of the first super-prior information is performed. For example, entropy coding (such as arithmetic coding or Huffman coding) is used to losslessly compress the first super-prior information to generate bitstream data. This process is intended to reduce the redundancy of the first super-prior information and reduce the transmission bandwidth requirement. Then, entropy decoding of the bitstream data is performed, and the super-prior information is restored using a corresponding entropy decoding algorithm (such as arithmetic decoding or Huffman decoding) to obtain the second super-prior information. At this time, the second super-prior information is still an intermediate representation and needs to be further decoded into distribution parameters.

[0071] Specifically, in step S23, a super-prior decoding network (symmetrical to the super-prior encoding network in step S21) is used to perform decoding transformation on the second super-prior information, and the distribution parameter prediction values ​​of the initial latent variables are input, including the mean μ and the variance σ, wherein the mean μ represents the central trend of the initial latent variable in each region, which is used to guide the offset direction of the quantization center; the variance σ represents the fluctuation range of the initial latent variable, which is used to adjust the width of the quantization interval or the quantization step (the larger the variance, the wider the interval).

[0072] In an embodiment of the present invention, a super-prior coding network is used to perform a super-prior coding transformation on the initial latent variables, which can deeply explore the statistical characteristics of the latent variables (such as probability distribution, correlation, etc.) and generate the first super-prior information. This information provides key prior knowledge for subsequent quantization and coding, so that the setting of the quantization center and interval is more in line with the actual distribution of the data, reducing the quantization error. The first super-prior information is entropy encoded and decoded so that the first super-prior information is represented in a more compact form (second super-prior information). This step reduces the amount of data with almost no loss of information and reduces storage or transmission overhead. The second super-prior information is transformed by the super-prior decoding network to accurately extract the distribution parameters of the initial latent variables, providing precise guidance for quantization and coding, playing a core role in reducing redundancy, optimizing quantization, adapting to data characteristics, etc., and ultimately improving the performance of the overall compression system.

[0073] Specifically, in step S3, the parameter adjustment value includes a slope and an offset value, and the calculation of the quantization center based on the distribution parameter, the initial latent variable and the preset parameter adjustment value includes: uniformly quantizing the initial latent variable to obtain candidate parameters; using a linear function and the offset value to nonlinearly adjust the candidate parameters to obtain a quantization center; wherein the linear function is constructed based on the initial latent variable, the slope and the mean.

[0074] Exemplarily, the process of step S3 can be represented by the following formula:

[0075] Q(x)=Round(x)-Sigmoid(α(x-μ))+β (5);

[0076] Among them, Q(x) is the quantization center, that is, the optimized quantization result; Round(x) is a uniform quantization function, which performs a rounding operation and maps the continuous initial latent variable x to the nearest integer, such as Round(2.3)=2, Round(2.6)=3. This integer represents the center of the uniform quantization interval (such as the center of the interval [1.5,2.5] is 2), that is, the candidate parameter (original quantization center); α is the slope, and in this embodiment of the present invention, α=0.1; β is the offset value, which adjusts the overall offset to make the corrected quantization result more reasonable. In this embodiment of the present invention, β=0.5; the input of the Sigmoid function is a linear function of the continuous signal, and the slope and intercept of the linear function can be adaptively adjusted. Round(x) is nonlinearly adjusted by Sigmoid(α(x-μ))+β. If x>μ, the original quantization center Round(x) will be reduced; if x<μ, the original quantization center Round(x) will be increased. The final Q(x) is the corrected quantization center, which is closer to the actual center of the data distribution and reduces the quantization error.

[0077] In the embodiment of the present invention, the above formula (5) plays the following role:

[0078] 1) A correction term is added before the latent variable quantization process, relying on the combination of an adaptive linear function and a sigmoid function to calculate the correction term. Before quantization, the correction term is calculated by combining α(x-μ) (an adaptive linear function) with a sigmoid function, adjusting the quantization center independently of the quantization interval, achieving decoupled optimization of the quantization center and quantization interval.

[0079] 2) In the adaptive linear function, the bias is taken as the negative mean of the latent variable to achieve normalization, and the slope can be adjusted adaptively to improve the algorithm's adaptability. Taking the bias as -μ normalizes x-μ around the mean μ, shifting the data distribution to be centered around zero, making it easier for the Sigmoid function to process. The slope α can be adjusted adaptively (e.g., dynamically adjusted for different data distributions), allowing the correction amplitude to flexibly adapt to data characteristics and enhancing the algorithm's ability to handle diverse data.

[0080] 3) Apply the above correction to the result after rounding quantization to improve the reconstruction quality without changing the bit rate. The bit rate R is determined by the quantization interval division. The correction only adjusts the quantization center and does not change the interval division, so the bit rate R remains unchanged. However, the quantization center is closer to the theoretical optimum (such as Figure 2 In the figure, A1 moves closer to A2), the distortion D is reduced, thereby improving the quality of the reconstructed image or video.

[0081] Specifically, before executing step S4, the method further includes: determining a quantization interval according to the variance.

[0082] For example, the variance σ is used to describe the distribution range of the latent variable and provides a basis for quantization interval division. When the variance is large, the quantization interval may be divided wider; otherwise, it will be narrower. This interval adjustment works together with the quantization center correction in formula (5) to improve the overall compression performance.

[0083] Specifically, in step S4, the initial latent variable is quantized according to the quantization center and the quantization interval to obtain a reference latent variable.

[0084] It should be noted that the process of quantizing data using the quantization center and the quantization interval can refer to the existing technology, and the present invention will not elaborate on this.

[0085] Furthermore, after executing step S4, the method further includes: performing entropy coding on the reference latent variable to obtain compressed data.

[0086] For example, the quantized reference latent variables are compressed using entropy coding (such as Huffman coding) to reduce data redundancy and form a compact bitstream representation for easy storage or transmission. The receiving end can input the compressed data into a decoding neural network to obtain decoded information (i.e., the original image, video sequence, etc.), completing the decoding process.

[0087] See also Figure 6 , Figure 6 : This is a schematic diagram of the quantization center offset provided by an embodiment of the present invention. Taking α=0.1, β=0.5, and μ=1 as an example, the corresponding quantization center offset function satisfies the following formula:

[0088]

[0089] The essence of this function is to transform Sigmoid(0.1(x-1)) to meet the transformation process: The range is (0,1). After subtracting 0.5, the range of the function becomes (-0.5, 0.5), forming a symmetrical S-shaped curve centered on X=1, and the value of y is between (-0.5, 0.5). When x=1, the curve passes through the origin; when x>1, z=0.1(x-1)>0; when x<1, z=0.1(x-1)<0. The correction term for the quantization center in formula (5) is -Sigmoid(0.1(x-1))+0.5, and Figure 6 In the equation y = Sigmoid(0.1(x-1)) + 0.5, the two are inverses of each other. This curve intuitively shows how the correction term changes: when x > μ = 1, y approaches 0.5, and the corresponding correction term -Sigmoid(0.1(x-1)) + 0.5 approaches -0.5, which means the quantization result is reduced by "-0.5"; when x < μ = 1, y approaches -0.5, and the corresponding correction term -Sigmoid(0.1(x-1)) + 0.5 approaches 0.5, which means the quantization result is increased by "0.5". Figure 6 By visualizing formula (5), we show how formula (5) uses a function that does not rely on neural networks to perform a nonlinear shift on the quantization center based on the relationship between x and the mean μ, achieving the effect of "reducing values ​​greater than μ and increasing values ​​less than μ", thereby optimizing the quantization effect and reducing distortion.

[0090] Furthermore, on the end-to-end video compression platform AVS-EEM, the model was fine-tuned using the first 16 sequences of the Bvidvc dataset, using the Adam optimizer with a learning rate set to 1e-7 (taking approximately two minutes). It was then tested on the AVS general test sequences, Pass B and Pass C. The results are shown in Table 1. The table compares the BD-rates of the Y, U, and V components for different datasets (Pass B and Pass C) using the Piecewise Cubic (reference latent variables quantized using the data quantization method of the present invention) and Cubic (latent variables obtained using traditional quantization methods). Lower BD-rates indicate better compression performance.

[0091] Table 1 Test result example

[0092]

[0093] The results show that the data quantization method proposed in this invention can effectively improve compression performance at a very low computational complexity, with zero network parameters added (the data quantization method does not introduce additional model weight models, the structure and scale remain unchanged, and will not become more complex due to the new method), zero network floating-point operations added (no increase in computational complexity, the amount of computation during model runtime is consistent with the original method), and 2 minutes of training time added (only a very short additional training time is required). Therefore, the data quantization method proposed in this invention achieves improved compression performance without changing the model complexity (no increase in parameters), increasing the computational burden (no increase in the number of floating-point operations), and paying only a very short additional training time.

[0094] Compared to existing technologies, this invention improves rate-distortion performance with virtually zero complexity, eliminating the need for a new neural network model. Furthermore, the data quantization method provided by this invention can be converted into a plug-and-play module that can be used within any existing end-to-end coding framework, offering high flexibility.

[0095] See also Figure 7 , Figure 7 is a structural block diagram of a data quantization device 100 provided in an embodiment of the present invention, wherein the data quantization device 100 includes:

[0096] An initial latent variable acquisition unit 11 is used to encode the original data using the main encoding network to obtain initial latent variables;

[0097] A distribution parameter acquisition unit 12, configured to acquire the distribution parameters of the initial latent variables;

[0098] A quantization center calculation unit 13, configured to calculate a quantization center according to the distribution parameter, the initial latent variable, and a preset parameter adjustment value;

[0099] The quantization unit 14 is configured to quantize the initial latent variable according to the quantization center and the quantization interval to obtain a reference latent variable.

[0100] Specifically, the distribution parameter acquisition unit 12 is specifically used to: use a super-prior coding network to perform a super-prior coding transformation on the initial latent variable to obtain first super-prior information; perform entropy coding and entropy decoding on the first super-prior information to obtain second super-prior information; use a super-prior decoding network to perform a super-prior decoding transformation on the second super-prior information to obtain the distribution parameters of the initial latent variable.

[0101] Specifically, the distribution parameters include mean and variance.

[0102] Specifically, the parameter adjustment value includes a slope and an offset value, and the quantization center calculation unit 13 is specifically used to: uniformly quantize the initial latent variable to obtain candidate parameters; use a linear function and the offset value to nonlinearly adjust the candidate parameters to obtain a quantization center; wherein the linear function is constructed based on the initial latent variable, the slope and the mean.

[0103] Specifically, the data quantization device 100 further includes:

[0104] The quantization interval determining unit is configured to determine the quantization interval according to the variance.

[0105] Specifically, the data quantization device 100 further includes:

[0106] The compression unit is used to perform entropy coding on the reference latent variable to obtain compressed data.

[0107] It is worth noting that the working process of each unit in the data quantization device 100 described in the embodiment of the present invention can refer to the working process of the data quantization method described in the above embodiment, and will not be repeated here.

[0108] See also Figure 8 , Figure 8 2 is a block diagram of a data quantization device 200 provided in an embodiment of the present invention. The data quantization device 200 includes a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. When the processor 21 executes the computer program, the steps of the aforementioned data quantization method embodiments, such as steps S1 to S4 and S21 to S23, are implemented.

[0109] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 22 and executed by the processor 21 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the data quantization device 200.

[0110] The data quantization device 200 may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will appreciate that the schematic diagram is merely an example of the data quantization device 200 and does not limit the data quantization device 200. The data quantization device 200 may include more or fewer components than shown, or may combine certain components or different components. For example, the data quantization device 200 may further include input and output devices, network access devices, buses, and the like.

[0111] The processor 21 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor. The processor 21 is the control center of the data quantization device 200 and connects various parts of the entire data quantization device 200 using various interfaces and lines.

[0112] The memory 22 can be used to store the computer programs and / or modules. The processor 21 implements the various functions of the data quantization device 200 by running or executing the computer programs and / or modules stored in the memory 22 and accessing the data stored in the memory 22. The memory 22 can mainly include a program storage area and a data storage area. The program storage area can store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area can store data generated based on the use of the mobile phone (such as audio data, a phone book, etc.). In addition, the memory 22 can include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0113] Wherein, if the module / unit integrated in the data quantization device 200 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor 21, it can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0114] Furthermore, the present invention also provides a computer program product, including a computer program / instruction, which implements the data quantization method as described in any of the above embodiments when executed by a processor.

[0115] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A data quantization method, characterized in that: include: Use the main encoding network to encode the original data to obtain the initial latent variables; Obtaining distribution parameters of the initial latent variables; Calculating a quantization center according to the distribution parameter, the initial latent variable and a preset parameter adjustment value; The initial latent variable is quantized according to the quantization center and the quantization interval to obtain a reference latent variable.

2. The data quantization method according to claim 1, wherein: The obtaining of the distribution parameters of the initial latent variables includes: Performing a super-prior coding transformation on the initial latent variable using a super-prior coding network to obtain first super-prior information; Performing entropy encoding and entropy decoding on the first super a priori information to obtain second super a priori information; A super-prior decoding network is used to perform a super-prior decoding transformation on the second super-prior information to obtain distribution parameters of the initial latent variables.

3. The data quantization method according to claim 1 or 2, characterized in that: The distribution parameters include mean and variance.

4. The data quantization method according to claim 3, wherein: The parameter adjustment value includes a slope and an offset value, and the calculating of the quantization center according to the distribution parameter, the initial latent variable and the preset parameter adjustment value includes: Uniformly quantizing the initial latent variables to obtain candidate parameters; The candidate parameters are nonlinearly adjusted using a linear function and the offset value to obtain a quantization center; wherein the linear function is constructed according to the initial latent variable, the slope and the mean.

5. The data quantization method according to claim 3, wherein: After obtaining the distribution parameters of the initial latent variables, the method further includes: A quantization interval is determined according to the variance.

6. The data quantization method according to claim 1, wherein: After obtaining the reference latent variable, the method further includes: Entropy encoding is performed on the reference latent variable to obtain compressed data.

7. A data quantization device, characterized in that: include: An initial latent variable acquisition unit is used to encode the original data using the main encoding network to obtain the initial latent variables; A distribution parameter acquisition unit, configured to acquire the distribution parameters of the initial latent variables; A quantization center calculation unit, configured to calculate the quantization center based on the distribution parameter, the initial latent variable, and a preset parameter adjustment value; The quantization unit is used to quantize the initial latent variable according to the quantization center and the quantization interval to obtain a reference latent variable.

8. A data quantization device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the data quantization method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the data quantization method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises a computer program / instruction, which implements the data quantization method according to any one of claims 1 to 6 when executed by a processor.