Coding and decoding method and device, equipment, storage medium and program product

By determining the information content of base layer and enhancement layer features in image encoding, and combining entropy model and quantization step size, the problem of poor image reconstruction quality under varying network bandwidth is solved, achieving more efficient image compression and reconstruction.

CN121967693APending Publication Date: 2026-05-01HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-10-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing image encoding and decoding methods struggle to adapt dynamically to changes in network bandwidth, resulting in poor image reconstruction quality.

Method used

By determining the basic layer features and enhancement layer features of the target image, they are encoded into the bitstream in descending order of information content. In scalable coding, enhancement features with high information content are sent first. By combining the entropy model and quantization step size, consistency between the encoder and decoder is ensured.

Benefits of technology

While ensuring that the transmitted bitstream is compatible with the actual bandwidth, it effectively improves the image reconstruction quality, reduces data quantization errors, and improves compression efficiency and reconstruction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121967693A_ABST
    Figure CN121967693A_ABST
Patent Text Reader

Abstract

The invention discloses a coding and decoding method and device, equipment, a storage medium and a program product, and belongs to the field of image compression. The method comprises the following steps: determining a basic layer feature and an enhancement layer feature of a target image; based on the basic features of the plurality of channels, determining the information amount of the enhanced features of the plurality of channels through an entropy model; compiling the basic features of the plurality of channels into a code stream; and compiling the enhanced features of the plurality of channels into a code stream according to the sequence of the information amounts from large to small based on the information amounts of the enhanced features of the plurality of channels. Through the coding method provided by the invention, it can be ensured that the enhanced feature with a large amount of information is preferentially sent to the decoding end, so that the image quality of the reconstructed image is effectively improved while it is ensured that the sent code stream adapts to the actual bandwidth.
Need to check novelty before this filing date? Find Prior Art

Description

Encoding and decoding methods, apparatus, equipment, storage media and program products Technical Field

[0001] This application relates to the field of image compression, and in particular to an encoding / decoding method, apparatus, device, storage medium, and program product. Background Technology

[0002] Image compression includes image encoding and decoding. It can utilize characteristics such as spatial redundancy, visual redundancy, and statistical redundancy to represent the original image with fewer bits, either lossily or without loss, thereby achieving efficient image transmission and storage. This plays an important role in the current media era where the types and amounts of images are increasing.

[0003] Image compression is essentially a trade-off between bitrate and distortion; that is, to maximize the reconstructed image quality within a given bitrate constraint. However, different network bandwidths can affect image transmission and reconstruction results. Therefore, there is an urgent need for an encoding and decoding method that can dynamically adapt to changes in network bandwidth for flexible transmission and decoding while improving image quality. Summary of the Invention

[0004] This application provides an encoding / decoding method, apparatus, device, storage medium, and computer program that can improve image reconstruction quality while adapting to changes in network bandwidth. The technical solution is as follows:

[0005] In a first aspect, an encoding method is provided, the method comprising: determining basic layer features and enhancement layer features of a target image, wherein the enhancement layer features include enhancement features of multiple channels, and the basic layer features include basic features of the multiple channels; determining the information content of the enhancement features of the multiple channels based on the basic features of the multiple channels using an entropy model; encoding the basic features of the multiple channels into a bitstream; and encoding the enhancement features of the multiple channels into the bitstream in descending order of information content based on the information content of the enhancement features of the multiple channels.

[0006] When encoding enhanced features, the encoding end of this application encodes the enhanced features of multiple channels into the bitstream in descending order of information content. This ensures that enhanced features with higher information content are prioritized for encoding into the bitstream. In scalable coding, part or all of the encoded bitstream can be sent to the decoding end based on the real-time bandwidth. Features encoded earlier are more likely to be sent to the decoding end. Therefore, the encoding method provided in this application ensures that enhanced features with higher information content are prioritized for sending to the decoding end, thereby effectively improving the image quality of the reconstructed image while ensuring that the transmitted bitstream is adapted to the actual bandwidth.

[0007] Furthermore, based on the above description, in scalable coding, both the encoder and decoder can obtain the basic layer features, while whether the decoder can obtain all the enhancement layer features depends on the actual bandwidth. That is, the decoder may not receive the enhancement layer features. In this application, when determining the information content of the enhancement features of multiple channels, it does not rely on the enhancement layer features, but determines the information content of the enhancement features of multiple channels based on the basic features of multiple channels, so as to ensure that both the encoder and decoder can obtain the information content of the enhancement features of multiple channels based only on the basic layer features.

[0008] It should be noted that the target image includes Q channels, where Q is a positive integer (e.g., the target image includes red, green, and blue channels). In this case, the number of channels for the intermediate features of the target image may or may not be equal to Q. Intermediate features refer to the features generated after transforming the target image during the encoding process. In this application, intermediate features include image features of the target image, quantization layer features, base layer features, enhancement layer features, etc. Each of the image features, quantization layer features, enhancement layer features, and base layer features of the target image includes multiple channels, and these multiple channels correspond one-to-one.

[0009] The encoding method provided in this application is implemented by an encoding end. In some cases, the encoding end deploys an entropy model, i.e., the encoding end includes an entropy model; in other cases, the entropy model may be deployed outside the encoding end, i.e., the encoding end does not include an entropy model. This application does not limit this. Regardless of whether the encoding end includes an entropy model or not, the encoding end can determine the information content of the enhanced features of multiple channels through the entropy model.

[0010] In one possible implementation, the amount of information is characterized by information entropy.

[0011] It's important to note that higher information entropy indicates a larger amount of information, fewer patterns, and greater uncertainty, making it more difficult to compress. In image compression, image features, syntactic element values ​​of the bitstream, and other elements involved all constitute information. When the information entropy of image features is high, it indicates a large amount of information and greater uncertainty, reflecting a more complex image content. Conversely, when the information entropy of image features is low, it indicates a smaller amount of information and less uncertainty, reflecting a simpler image content.

[0012] In one possible implementation, determining the basic layer features and enhancement layer features of the target image includes: quantizing the image features of the target image according to a first quantization step size to obtain quantization layer features, wherein the first quantization step size is determined based on the target bit rate; determining the basic layer features based on a second quantization step size and the quantization layer features, such that the feature values ​​of the basic layer features have N possible values, and the average of the N possible values ​​is the target value; and determining the enhancement layer features based on the second quantization step size, the quantization layer features, and the basic layer features.

[0013] In one possible implementation, the target bitrate is the upper limit of the bitrate of the stream.

[0014] In one possible implementation, based on the second quantization step size and the first quantization feature point, the feature value of the basic feature point corresponding to the first quantization feature point is determined, so that the feature value of the basic feature point corresponding to the first quantization feature point has N possible values, and the average of the N values ​​is the target value.

[0015] It should be noted that the target value is determined based on the mean of the probability distributions corresponding to the second quantization step size and the first quantization feature point.

[0016] In one possible implementation, the second quantization step size is an even number, the quantization layer features include the quantization features of the multiple channels, the quantization features of each of the multiple channels include multiple quantization feature points, the basic features of each of the multiple channels include multiple basic feature points, and the multiple quantization feature points of the same channel correspond one-to-one with the multiple basic feature points.

[0017] If the eigenvalue of the first quantized feature point is not equal to the mean of the probability distribution corresponding to the first quantized feature point, then the eigenvalue of the basic feature point corresponding to the first quantized feature point is determined based on the eigenvalue of the first quantized feature point and the second quantization step size; if the eigenvalue of the first quantized feature point is equal to the mean of the probability distribution corresponding to the first quantized feature point, then the mean of the first quantized feature point is determined to be the eigenvalue of the basic feature point corresponding to the first quantized feature point; wherein, the first quantized feature point is any one of the multiple quantized feature points included in the first channel, and the first channel is any one of the multiple channels.

[0018] In the entropy coding process of image compression, the probability of elements (i.e., feature points) in the feature map is typically estimated using an entropy model, and then entropy coding is performed based on the probability distribution corresponding to each feature point. If the entropy model uses a Gaussian distribution mathematical model, the output of the entropy model is the mean and variance (or standard deviation) of the probability distribution corresponding to each feature point. Therefore, in this application, the feature points correspond to the mean and variance (or standard deviation) of the probability distribution, and correspondingly, the aforementioned first quantized feature point corresponds to the mean of the probability distribution.

[0019] In one possible implementation, determining the feature value of the basic feature point corresponding to the first quantized feature point based on the feature value of the first quantized feature point and the second quantization step size includes: if the feature value of the first quantized feature point is greater than the mean of the probability distribution corresponding to the first quantized feature point, then adding the feature value of the first quantized feature point to a first value and dividing by the second quantization step size to obtain a first quantized value, and rounding the first quantized value down to obtain the feature value of the basic feature point corresponding to the first quantized feature point; if the feature value of the first quantized feature point is less than the mean of the probability distribution corresponding to the first quantized feature point, then subtracting the first value from the feature value of the first quantized feature point and dividing by the second quantization step size to obtain a second quantized value, and rounding the second quantized value up to obtain the feature value of the basic feature point corresponding to the first quantized feature point.

[0020] In one possible implementation, the second quantization step size is 2.

[0021] Since the smaller the quantization step size, the less information is lost when the original data is mapped to discrete values, this application can determine the basic layer features and quantization layer features through a finer-grained second quantization step size, thereby reducing the quantization error of the data and further improving the reconstruction quality of the image.

[0022] In one possible implementation, the enhancement features of each channel in multiple channels include multiple enhancement feature points, and multiple quantization feature points and multiple basic feature points in the same channel correspond one-to-one with multiple enhancement feature points; the step of determining the enhancement layer feature based on the second quantization step size, the quantization layer feature, and the basic layer feature includes: determining the product of the second quantization step size and the feature value of the basic feature point corresponding to the first quantization feature point to obtain the second value corresponding to the basic feature point corresponding to the first quantization feature point; subtracting the second value of the basic feature point corresponding to the first quantization feature point from the feature value of the first quantization feature point to obtain the feature value of the enhancement feature point corresponding to the first quantization feature point.

[0023] In one possible implementation, before determining the basic layer features based on the second quantization step size and the quantization layer features, the method further includes: correcting the feature value of the first quantization feature point based on the mean of the probability distribution corresponding to the first quantization feature point, so that the mean of the probability distribution corresponding to the first quantization feature point after correction is a fixed value; the first quantization feature point is any one of the multiple quantization feature points included in the first channel, and the first channel is any one of the multiple channels.

[0024] In one possible implementation, determining the information content of the enhanced features of the multiple channels based on the basic features of the multiple channels using an entropy model includes: quantizing the image features of the target image according to a first quantization step size to obtain the quantized features of the multiple channels, where the first quantization step size is determined based on the target bit rate; dequantizing the basic features of the multiple channels based on a second quantization step size to obtain the dequantized features of the multiple channels; inputting the dequantized features and the quantized features of the multiple channels into the entropy model to obtain the probability distribution of the multiple channels output by the entropy model; and determining the information content of the enhanced features of the multiple channels based on the second quantization step size and the probability distribution of the multiple channels.

[0025] Since whether the decoding end can obtain all the enhancement layer features depends on the actual bandwidth, this application does not rely on the enhancement layer features when determining the probability distribution of multiple channels. Instead, it uses the dequantized basic layer features as the context of the entropy model to ensure consistency between the encoding and decoding ends.

[0026] In one possible implementation, the step of dequantizing the basic features of the plurality of channels based on the second quantization step size to obtain the dequantized features of the plurality of channels includes: dequantizing the basic features of the plurality of channels based on the second quantization step size and the probability distribution corresponding to the basic features of the plurality of channels to obtain the dequantized features of the plurality of channels.

[0027] When performing dequantization, this application can combine the probability distributions corresponding to the basic features of multiple channels to obtain the dequantization features of multiple channels. Compared with the scheme of directly multiplying the second quantization step size with the basic layer features, since the probability distribution can describe the distribution of the feature values ​​of the basic layer features, this application can more accurately recover the feature values ​​and effectively improve the accuracy of dequantization by combining the probability distributions corresponding to the basic features of multiple channels for dequantization.

[0028] In one possible implementation, the second quantization step size is an odd number. The step of dequantizing the basic features of the multiple channels based on the second quantization step size and the probability distribution corresponding to the basic features of the multiple channels to obtain the dequantized features of the multiple channels includes: if the feature value of the first basic feature point is greater than the second value, multiplying the feature value of the first basic feature point by the second quantization step size and then subtracting the third value to obtain the feature value of the dequantized feature point corresponding to the first basic feature point; if the feature value of the first basic feature point is less than the second value, multiplying the feature value of the first basic feature point by the second quantization step size and then adding the third value to obtain the feature value of the dequantized feature point corresponding to the first basic feature point; if the feature value of the first basic feature point is equal to the second value, the second value is determined to be the feature value of the dequantized feature point corresponding to the first basic feature point; wherein, the first basic feature point is any one of the multiple basic feature points included in the first channel, the first channel is any one of the multiple channels, the second value is the mean of the probability distribution corresponding to the first basic feature point, and the third value is obtained by subtracting one from the second quantization step size and then dividing by 2.

[0029] In one possible implementation, the second quantization step size is an even number; the step of dequantizing the basic features of the multiple channels based on the second quantization step size and the probability distribution corresponding to the basic features of the multiple channels to obtain the dequantized features of the multiple channels includes: multiplying the feature value of the first basic feature point by the second quantization step size to obtain the feature value of the dequantized feature point corresponding to the first basic feature point, wherein the first basic feature point is any one of the multiple basic feature points included in the first channel, and the first channel is any one of the multiple channels.

[0030] In one possible implementation, the entropy model includes a first model, a second model, and a third model. The step of inputting the inverse quantization features and quantization features of the multiple channels into the entropy model to obtain the probability distribution of the multiple channels output by the entropy model includes: inputting the quantization features of the multiple channels into the first model to obtain residual information of the probability distribution of the multiple channels output by the first model; for the first channel among the multiple channels, determining the residual information of the probability distribution of the first channel output by the first model as the probability distribution of the first channel output by the entropy model; inputting the inverse quantization features of at least one channel preceding the second channel and the mean of the at least one channel into the second model to obtain the predicted probability distribution of the second channel output by the second model, where the second channel is any channel among the multiple channels other than the first channel; and inputting the predicted probability distribution of the second channel and the residual information of the probability distribution into the third model to obtain the probability distribution of the second channel output by the third model.

[0031] In the case where the entropy model includes a first model, a second model, and a third model, for a channel other than the first one (i.e., the second channel) among multiple channels, this application can use the inverse quantization features and mean of the channels preceding the second channel as context to obtain the predicted probability distribution of the second channel. In this way, the statistical regularity in the data can be better captured, thereby obtaining a more accurate probability distribution corresponding to the feature value and effectively improving the generalization ability of the entropy model.

[0032] In one possible implementation, the entropy model includes a first model, a second model, and a third model. The step of inputting the inverse quantization features and quantization features of the multiple channels into the entropy model to obtain the probability distribution of the multiple channels output by the entropy model includes: inputting the quantization features of the multiple channels into the first model to obtain residual information of the probability distribution of the multiple channels output by the first model; for the first position in the first channel among the multiple channels, determining the residual information of the probability distribution of the first position output by the first model as the probability distribution of the first position output by the entropy model; inputting the inverse quantization feature points of at least one position before the first position and the mean of the at least one position into the second model to obtain the predicted probability distribution of the first position output by the second model, where the first position is any position in the multiple channels other than the first position in the first channel; and inputting the predicted probability distribution of the first position and the residual information of the probability distribution into the third model to obtain the probability distribution of the first position output by the third model.

[0033] In the case where the entropy model includes the first model, the second model, and the third model, for any position other than the first position of the first channel (i.e., the first position), this application can use the inverse quantization features and mean of the positions before the first position as context to obtain the predicted probability distribution of the first position. In this way, the statistical regularity in the data can be better captured, thereby obtaining a more accurate probability distribution corresponding to the feature value and effectively improving the generalization ability of the entropy model.

[0034] In one possible implementation, the encoding end can also encode the residual information of the probability distribution of the multiple channels output by the first model into the bitstream.

[0035] This application can encode the residual information of the probability distribution into the bitstream. Compared with the scheme of directly encode the probability distribution of multiple channels into the bitstream, this application can effectively reduce the redundancy in the original data and improve the compression efficiency by encoding the residual information.

[0036] In one possible implementation, the probability distribution of the plurality of channels includes the mean of the quantization features of the plurality of channels and the standard deviation of the basic features of the plurality of channels; determining the information content of the enhanced features of the plurality of channels based on the second quantization step size and the probability distribution of the plurality of channels includes: determining the mean of the basic features of the plurality of channels based on the mean of the quantization features of the plurality of channels and the second quantization step size; and determining the information content of the enhanced features of the plurality of channels based on the basic features of the plurality of channels, and the mean and standard deviation of the basic features of the plurality of channels.

[0037] In one possible implementation, the enhanced features of multiple channels are encoded into the bitstream based on the information content of the enhanced features of multiple channels, in descending order of information content. This includes: determining the information content of each channel based on the information content of multiple enhanced feature points in each channel; and encoding the enhanced features of multiple channels into the bitstream in descending order of information content.

[0038] In one possible implementation, the enhanced features of multiple channels are encoded into the bitstream, including: encoding the feature values ​​corresponding to the multiple enhanced feature points of the first channel into the bitstream in descending order of the information content of the multiple enhanced feature points of the first channel, wherein the first channel is any one of the multiple channels.

[0039] Secondly, a decoding method is provided, the method comprising: obtaining basic layer features of a reconstructed target image based on a bitstream, the basic layer features of the reconstructed image including basic features of multiple channels; determining the information content of enhancement layer features of the target image based on the basic features of the reconstructed image of multiple channels using an entropy model, the information content of the enhancement layer features including the information content of the enhancement features of the multiple channels; parsing the reconstructed enhancement layer features from the bitstream based on the information content of the enhancement features of the multiple channels, in descending order of information content, the reconstructed enhancement layer features including part or all of the reconstructed enhancement features of the multiple channels; and reconstructing the target image based on the reconstructed enhancement layer features and the reconstructed basic layer features.

[0040] Since whether the decoding end can obtain all the enhancement layer features depends on the actual bandwidth, the decoding power of this application does not depend on the enhancement layer features when determining the information content of the enhancement features of multiple channels. Instead, it determines the information content of the enhancement features of multiple channels based on the basic features of multiple channels, thereby ensuring that the decoding end can obtain the information content of the enhancement features of multiple channels, and finally parses the reconstructed enhancement layer features from the bitstream based on the information content of the enhancement features of multiple channels.

[0041] In one possible implementation, the process of obtaining the basic layer features of the target image reconstruction based on the bitstream includes: decoding the bitstream to obtain the basic layer features of the target image reconstruction.

[0042] The decoding method provided in this application is executed by a decoding end. In some cases, the decoding end deploys an entropy model, meaning the decoding end includes an entropy model; in other cases, the entropy model may be deployed outside the decoding end, meaning the decoding end does not include an entropy model. This application does not impose any limitations on this. Regardless of whether the decoding end includes an entropy model or not, the decoding end can determine the information content of the enhanced features of multiple channels through the entropy model.

[0043] The reconstruction residual information of the probability distribution of multiple channels is obtained by decoding from the bitstream; based on the reconstruction residual information of the probability distribution of multiple channels, the basic layer features of the target image reconstruction are obtained by decoding from the bitstream through an entropy model.

[0044] In one possible implementation, the reconstructed residual information of the probability distribution of multiple channels includes the mean residual corresponding to the quantization features of multiple channels and the standard deviation residual (or variance residual) corresponding to the basic features of multiple channels. For ease of description, the following will use the example of the reconstructed residual information of the probability distribution of multiple channels including the mean residual corresponding to the quantization features of multiple channels and the standard deviation residual corresponding to the basic features of multiple channels.

[0045] Based on the probability distribution of multiple channels, the reconstruction residual information is used to decode the basic layer features of the target image from the bitstream through an entropy model. There are several ways to achieve this, and two of them will be introduced below.

[0046] The first implementation uses an entropy model that includes a second model and a third model. In this case, for the first channel among multiple channels, the mean residual corresponding to the quantization feature of the first channel is determined as the mean of the quantization feature corresponding to the first channel, and the standard deviation residual corresponding to the basic feature of the first channel is determined as the standard deviation of the basic feature corresponding to the first channel. For each basic feature point corresponding to a quantization feature point in the first channel, the mean of the quantization feature point is divided by the second quantization step size and then rounded to the nearest integer to determine the mean of the basic feature point. Based on the variance of the mean of the basic feature point, the feature value of the basic feature point is obtained from the bitstream.

[0047] Based on the second quantization step size, the reconstructed basic features of at least one channel preceding the first channel are dequantized to obtain the dequantized features of at least one channel. The first channel is any channel other than the first channel among multiple channels. The dequantized features of at least one channel and the mean corresponding to the quantized features of the at least one channel are input into the second model to obtain the predicted mean corresponding to the quantized features of the first channel and the predicted standard deviation corresponding to the basic features of the first channel. The predicted mean, the mean residual, the predicted standard deviation, and the standard deviation residual of the basic features of the first channel are input into the third model to obtain the mean and standard deviation of the quantized features of the first channel. For each basic feature point corresponding to a quantized feature point in the first channel, the mean of the quantized feature point is divided by the second quantization step size and rounded to determine the mean of the basic feature point. Based on the variance of the mean of the basic feature point, the feature value of the basic feature point is obtained from the bitstream through entropy decoding.

[0048] The second implementation uses an entropy model that includes a second model and a third model. Each channel in the multiple channels has multiple basic feature points, and each channel's quantization feature also includes multiple quantization feature points. There is a one-to-one correspondence between the multiple basic feature points and the multiple quantization feature points within the same channel. In this case, for the first position in the first channel, the mean residual of the quantization feature points at the first position is determined as the mean of the quantization feature points at that position, and the standard deviation residual of the basic feature points at the first position is determined as the standard deviation of the basic feature points at that position. The mean of the quantization feature points at the first position is divided by the second quantization step size and rounded to determine the mean of the basic feature points at that first position (or the sum of the mean of the quantization feature points at the first position divided by the second quantization step size and rounded to a fixed value is determined as the mean of the basic feature points at that first position). Based on the mean and variance of the basic feature points at that first position (i.e., the mean and variance of the probability distribution corresponding to the basic feature points at the first position), entropy decoding is used to obtain the feature values ​​of the basic feature points at that first position from the bitstream.

[0049] Based on the second quantization step size, the feature values ​​of the basic feature points at at least one position before the first position are dequantized to obtain the feature values ​​of the dequantized feature points at at least one position. The first position is any position in multiple channels other than the first position in the first channel. The feature values ​​of the dequantized feature points at at least one position and the mean of the quantized feature points at at least one position are input into the second model to obtain the predicted mean of the quantized feature points at the first position and the predicted standard deviation of the basic feature points at the first position. The predicted mean of the quantized feature points at the first position, the mean residual of the quantized feature points at the first position, the predicted standard deviation of the basic feature points at the first position, and the standard deviation residual of the basic feature points at the first position are input into the third model to obtain the mean of the quantized feature points at the first position and the standard deviation of the basic feature points at the first position. The mean of the quantized feature points at the first position is determined by dividing the mean of the quantized feature points at the first position by the second quantization step size and then rounding it off. Alternatively, the mean of the quantized feature points at the first position is determined by dividing the mean of the quantized feature points at the first position by the second quantization step size and then rounding it off, and then summing the sum with a fixed value. Based on the mean and variance of the basic feature points at the first position (i.e., the mean and variance of the probability distribution corresponding to the basic feature points at the first position), the feature values ​​of the basic feature points at the first position are obtained from the bitstream.

[0050] There are several ways to input the reconstructed residual information of the probability distribution of multiple channels into the entropy model to obtain the probability distribution of multiple channels output by the entropy model. The following will introduce two of these methods.

[0051] In implementation method 1, the entropy model includes a second model and a third model. In this case, for the first channel among multiple channels, the reconstruction residual information of the probability distribution of the first channel is determined as the probability distribution of the first channel output by the entropy model. Based on the second quantization step size, the reconstruction basic features of at least one channel before the first channel are dequantized to obtain the dequantized features of at least one channel. The first channel is any channel other than the first channel among multiple channels. The dequantized features of at least one channel and the mean of at least one channel are input into the second model to obtain the predicted probability distribution of the first channel output by the second model. The predicted probability distribution of the first channel and the reconstruction residual information of the probability distribution are input into the third model to obtain the probability distribution of the first channel output by the third model.

[0052] In one possible implementation, the reconstructed residual information of the probability distribution of multiple channels includes the mean residual corresponding to the quantization features of multiple channels and the standard deviation residual corresponding to the basic features of multiple channels. The probability distribution of multiple channels includes the mean corresponding to the quantization features of multiple channels and the standard deviation corresponding to the basic features of multiple channels. For the first channel among multiple channels, the mean residual corresponding to the quantization features of the first channel is determined as the mean corresponding to the quantization features of the first channel output by the entropy model; the standard deviation residual corresponding to the basic features of the first channel is determined as the standard deviation corresponding to the basic features of the first channel output by the entropy model. The inverse quantization features of at least one channel preceding the first channel and the mean of the quantization features of at least one channel are input into the second model to obtain the predicted mean corresponding to the quantization features of the first channel and the predicted standard deviation corresponding to the basic features of the first channel output by the second model. The predicted mean corresponding to the quantization features of the first channel, the mean residual corresponding to the quantization features of the first channel, the predicted standard deviation corresponding to the basic features of the first channel, and the standard deviation residual corresponding to the basic features of the first channel are input into the third model to obtain the mean corresponding to the quantization features of the first channel and the standard deviation corresponding to the basic features of the second channel output by the third model.

[0053] Implementation Method 2: The entropy model includes a second model and a third model. Each channel in the multiple channels has multiple basic feature points, and each channel's quantization feature also includes multiple quantization feature points. There is a one-to-one correspondence between the multiple basic feature points and the multiple quantization feature points of the same channel. In this case, for the first position in the first channel, the reconstruction residual information of the probability distribution of the first position is determined as the probability distribution of the first position output by the entropy model. Based on the second quantization step size, the feature values ​​of the basic feature points of at least one position preceding the first position are dequantized to obtain the feature values ​​of the dequantized feature points of at least one position. The feature values ​​of the dequantized feature points of at least one position and the mean of at least one position are input into the second model to obtain the predicted probability distribution of the first position output by the second model. The predicted probability distribution of the first position and the reconstruction residual information of the probability distribution are input into the third model to obtain the probability distribution of the first position output by the third model. The first position is any position in the multiple channels other than the first position.

[0054] In one possible implementation, the reconstructed residual information of the probability distribution of multiple channels includes the mean residual corresponding to the quantization features of multiple channels and the standard deviation residual corresponding to the basic features of multiple channels. The probability distribution of multiple channels includes the mean corresponding to the quantization features of multiple channels and the standard deviation corresponding to the basic features of multiple channels. In this case, for the first position of the first channel among multiple channels, the mean residual of the quantization feature point of the first position is determined as the mean of the quantization feature point of the first position output by the entropy model; the standard deviation residual of the basic feature point of the first position is determined as the standard deviation of the basic feature point of the first position output by the entropy model; the inverse quantization feature points of at least one position before the first position and the mean of the quantization feature points of at least one position are input into the second model to obtain the predicted mean of the quantization feature point of the first position and the predicted standard deviation of the basic feature point of the first position output by the second model. The predicted mean of the quantization feature point of the first position, the mean residual of the quantization feature point of the first position, the predicted standard deviation of the basic feature point of the first position, and the standard deviation residual of the basic feature point of the first position are input into the third model to obtain the mean of the quantization feature point of the first position and the standard deviation of the basic feature point of the first position output by the third model.

[0055] In one possible implementation, information content is characterized by information entropy.

[0056] It's important to note that higher information entropy indicates a larger amount of information, fewer patterns, and greater uncertainty, making it more difficult to compress. In image compression, image features, syntactic element values ​​of the bitstream, and other elements involved all constitute information. When the information entropy of image features is high, it indicates a large amount of information and greater uncertainty, reflecting a more complex image content. Conversely, when the information entropy of image features is low, it indicates a smaller amount of information and less uncertainty, reflecting a simpler image content.

[0057] In one possible implementation, the process of determining the information content of the enhanced features of multiple channels based on the basic features of multiple channels and the mean and standard deviation corresponding to the basic features of multiple channels includes: determining the probability distribution corresponding to the first basic feature point based on the mean and standard deviation corresponding to the first basic feature point; determining the probability of the feature value of the first basic feature point in the probability distribution corresponding to the first basic feature point based on the probability distribution corresponding to the first basic feature point; determining the information entropy of the first basic feature point based on the probability of the feature value of the first basic feature point in the probability distribution corresponding to the first basic feature point; and determining the information entropy of the first basic feature as the information entropy of the enhanced feature point corresponding to the first basic feature.

[0058] In one possible implementation, the enhancement features of each channel in the multiple channels include multiple enhancement feature points, and the information content of the enhancement features of each channel in the multiple channels includes the information content of the multiple enhancement feature points of each channel. In this case, the decoding end determines the information content of each channel in the multiple channels based on the information content of the multiple enhancement feature points of each channel in the multiple channels. The reconstructed enhancement layer features are obtained from the bitstream according to the order of the information content of each channel in the multiple channels from large to small.

[0059] The encoding order of each channel in the enhancement layer feature is determined according to the order of information content of each channel in the multiple channels from largest to smallest. Based on this encoding order, the correspondence between the multiple channels included in the enhancement layer feature and the multiple channels included in the basic layer feature is determined. Based on the correspondence between the multiple channels included in the enhancement layer feature and the multiple channels included in the basic layer feature, the reconstructed enhancement layer feature is obtained from the bitstream.

[0060] Because the encoding end encodes the basic layer features by sequentially assembling the basic features of multiple channels into the bitstream according to a prescribed order, while the encoding end encodes the enhancement layer features by assembling them into the bitstream in descending order of information content from multiple channels, and the probability distribution used for entropy encoding of enhancement feature points is the same as the probability distribution of the corresponding basic feature points, during decoding, it is necessary to determine the information content of each channel in the multiple channels, re-establish the correspondence between the multiple channels included in the enhancement layer features and the multiple channels included in the basic layer features, and then parse the reconstructed enhancement layer features from the bitstream according to the probability distribution of the basic layer features.

[0061] In one possible implementation, the reconstructed enhancement features of each channel in multiple channels include multiple enhancement feature points, the reconstructed basic features of each channel in multiple channels include multiple basic feature points, the multiple basic feature points and multiple enhancement feature points of the same channel correspond one-to-one, the reconstructed enhancement layer features include a portion of the reconstructed enhancement features of multiple channels, the portion of the reconstructed enhancement features of multiple channels means that at least one channel in the multiple channels includes a target enhancement feature point, and the target enhancement feature point is an enhancement feature point without feature values.

[0062] In one possible implementation, the target image is reconstructed based on the reconstructed enhancement layer features and the reconstructed base layer features, including: determining a portion of the reconstructed quantization layer features based on a portion of the reconstructed enhancement features from multiple channels, the reconstructed base layer features, and a second quantization step size, wherein the quantization layer features include quantization features from multiple channels; dequantizing the feature values ​​of the base feature points corresponding to the target enhancement feature points in multiple channels based on the probability distribution of the second quantization step size and the base layer features, to obtain another portion of the reconstructed quantization layer features; and reconstructing the target image based on a first quantization step size, a portion of the reconstructed quantization layer features, and the other portion of the reconstructed quantization layer features, wherein the first quantization step size is determined based on the target bit rate.

[0063] Thirdly, a decoding method is provided, the method comprising: obtaining basic layer features of a reconstructed target image based on a bitstream; performing inverse quantization on the reconstructed basic layer features based on a second quantization step size and the probability distribution corresponding to the basic layer features to obtain reconstructed quantized layer features; and reconstructing the target image based on a first quantization step size and the reconstructed quantized layer features.

[0064] When the enhancement layer features are not received at the decoding end, this application can dequantize the reconstructed basic layer features by combining the probability distribution corresponding to the basic layer features. Considering the probability distribution of the basic layer features during dequantization can enable the prediction / derivation of the enhancement layer features, so that the dequantization result contains both basic layer features and enhancement layer features. The prior art directly multiplies the second quantization step size with the basic layer features, which lacks the enhancement layer features. Compared with the prior art, this application can predict the unreceived enhancement layer features by combining the probability distribution corresponding to the basic layer features for dequantization, making the reconstructed image obtained by decoding more accurate.

[0065] Fourthly, an encoding apparatus is provided, which has the function of implementing the encoding method behavior described in the first aspect above. The encoding apparatus includes at least one module for implementing the encoding method provided in the first aspect above.

[0066] Fifthly, a decoding apparatus is provided, which has the function of implementing the decoding method behavior described in the second aspect above. The decoding apparatus includes at least one module for implementing the decoding method provided in the second aspect above.

[0067] Sixthly, a decoding apparatus is provided, which has the function of implementing the decoding method behavior described in the third aspect above. The decoding apparatus includes at least one module for implementing the decoding method provided in the third aspect above.

[0068] In a seventh aspect, an encoding device is provided, the encoding device comprising: a processor coupled to a memory for storing programs or instructions, wherein when the programs or instructions are executed by the processor, the encoding device performs the encoding method described in the first aspect.

[0069] Eighthly, a decoding device is provided, the decoding device comprising: a processor coupled to a memory for storing programs or instructions, wherein when the program or instructions are executed by the processor, the decoding device performs the decoding method described in the second aspect above, or performs the decoding method described in the third aspect above.

[0070] Ninthly, a coding and decoding system is provided, the coding and decoding system including the encoding device described in the seventh aspect and / or the decoding device described in the eighth aspect.

[0071] In a tenth aspect, a computer-readable storage medium is provided, including program code that, when executed on a computer, causes the computer to perform the method described in the first aspect.

[0072] Eleventhly, a computer-readable storage medium is provided, including program code that, when executed on a computer, causes the computer to perform the method described in the second aspect above.

[0073] In a twelfth aspect, a computer-readable storage medium is provided, including program code that, when executed on a computer, causes the computer to perform the method described in the third aspect above.

[0074] In a thirteenth aspect, a computer program product is provided, including instructions that, when executed on a computer, cause the computer to perform the method described in the first aspect.

[0075] In a fourteenth aspect, a computer program product is provided, including instructions that, when executed on a computer, cause the computer to perform the method described in the second aspect above.

[0076] In a fifteenth aspect, a computer program product is provided, including instructions that, when executed on a computer, cause the computer to perform the method described in the third aspect above.

[0077] In a sixteenth aspect, a computer-readable storage medium is provided, on which a bitstream obtained by the method described in the first aspect above and executed by one or more processors is stored.

[0078] In a seventeenth aspect, a device for storing a bitstream is provided, comprising at least one storage medium and a communication interface; the communication interface is used to receive or transmit the bitstream; the at least one storage medium is used to store the bitstream; the bitstream is encoded by an encoder according to the encoding method described in the first aspect above.

[0079] Eighteenthly, a method for storing a bitstream is provided, comprising: receiving the bitstream through a communication interface; storing the bitstream in one or more storage media, wherein the bitstream is encoded by an encoder according to the encoding method described in the first aspect above.

[0080] In a nineteenth aspect, a system for distributing a bitstream is provided, comprising at least one storage medium and a video streaming device; the at least one storage medium is used to store the bitstream, which is encoded by an encoder according to the encoding method described in the first aspect above;

[0081] The video streaming device is configured to, in response to a request from the decoder, send the target bitstream in the at least one storage medium to the decoder.

[0082] In a twentieth aspect, a method for distributing a bitstream is provided, comprising: receiving a first request; in response to the first request, selecting a target bitstream from at least one storage medium; and sending the target bitstream to a destination device; wherein the at least one storage medium is used to store the bitstream, the bitstream being encoded by an encoder according to the encoding method described in the first aspect above.

[0083] In a twenty-first aspect, a system for processing bitstreams is provided, comprising an image source device, an encoder device, one or more storage media, and a destination device; the image source device is used to provide image data; the encoder device is used to acquire the image data from the image source device through an interface and encode the image data to obtain one or more bitstreams, the bitstreams being encoded by the encoder according to the encoding method described in the first aspect; the encoder device is used to store the one or more bitstreams in one or more storage media; or, the encoder device is used to encapsulate the one or more bitstreams to obtain a transmission bitstream; the encoder device is used to transmit the transmission bitstream to the destination device via a communication link or communication network; the destination device is used to decapsulate the transmission bitstream to obtain the one or more bitstreams; and the destination device is used to decode the one or more bitstreams to obtain decoded data.

[0084] The technical effects achieved by aspects four through twenty-one are similar to those achieved by the corresponding technical means in aspects one, two, and three, and will not be repeated here. Attached Figure Description

[0085] Figure 1 is a schematic diagram of an encoding end and a decoding end provided in an embodiment of this application;

[0086] Figure 2 is a schematic diagram of an implementation environment provided in an embodiment of this application;

[0087] Figure 3 is a schematic diagram of another implementation environment provided in the embodiments of this application;

[0088] Figure 4 is a flowchart of an encoding method provided in an embodiment of this application;

[0089] Figure 5 is a schematic diagram of the probability distribution corresponding to a quantized feature point 1 provided in an embodiment of this application;

[0090] Figure 6 is a schematic diagram of the probability distribution corresponding to another quantized feature point 1 provided in an embodiment of this application;

[0091] Figure 7 is a flowchart of another encoding method provided in an embodiment of this application;

[0092] Figure 8 is a flowchart of a decoding method provided in an embodiment of this application;

[0093] Figure 9 is a flowchart of another decoding method provided in an embodiment of this application;

[0094] Figure 10 is a flowchart of another decoding method provided in an embodiment of this application;

[0095] Figure 11 is a schematic diagram of an encoding device provided in an embodiment of this application;

[0096] Figure 12 is a schematic diagram of a decoding device provided in an embodiment of this application;

[0097] Figure 13 is a schematic diagram of a decoding device provided in an embodiment of this application;

[0098] Figure 14 is a schematic diagram of the structure of a decoding device provided in an embodiment of this application. Detailed Implementation

[0099] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0100] To facilitate understanding, before providing a detailed explanation of the encoding and decoding methods provided in the embodiments of this application, the terms, application scenarios, and implementation environments involved in the embodiments of this application will be introduced first.

[0101] First, the terms used in the embodiments of this application will be introduced.

[0102] Information entropy: Information entropy is used to measure the amount of information in a source. The larger the information entropy of a source, the greater the amount of information in the source.

[0103] Bitrate: In image compression, bitrate refers to the encoding length required to encode a unit of pixel. The higher the bitrate, the better the image reconstruction quality.

[0104] Quantization: This refers to transforming a continuous signal into a discrete signal. In image compression, it means converting continuous features into discrete features. In entropy coding, it typically transforms the probability values ​​of a probability distribution from continuous values ​​to discrete values.

[0105] Scalable coding: In scalable coding, the image bitstream is divided into a base layer and an enhancement layer. The entire base layer bitstream must be sent to the decoder and cannot be further divided. The base layer bitstream is the minimum bitstream length corresponding to the image. For the enhancement layer bitstream, depending on the network conditions, the enhancement layer bitstream may not be sent, or some or all of the enhancement layer bitstream may be sent to the decoder.

[0106] The application scenarios involved in the embodiments of this application will be introduced next.

[0107] Image compression includes image encoding and decoding. It can utilize characteristics such as spatial redundancy, visual redundancy, and statistical redundancy to represent the original image with fewer bits, either lossily or without loss, thereby achieving efficient image transmission and storage. This plays an important role in the current media era where the types and amounts of images are increasing.

[0108] Image compression is essentially a trade-off between bitrate and distortion; that is, maximizing the reconstructed image quality within a given bitrate constraint. Currently, scalable coding is commonly used for image compression. In this method, the encoding end includes an encoding module and a transmission module. The encoding module determines the basic layer features and enhancement layer features of the target image, first encoding the basic layer features into the bitstream, and then encoding the enhancement layer features. Since the basic layer features include basic features from multiple channels, and the enhancement layer features include enhancement features from multiple channels, both basic and enhancement layer features are encoded into the bitstream in the same channel order. For example, if there are five channels (channels 1-5), the basic features of these five channels are encoded into the bitstream in the order of channels 1 to 5 when encoding the basic layer features; similarly, the enhancement layer features are encoded into the bitstream in the same order.

[0109] In some cases, the basic features of each channel in multiple channels include multiple basic feature points, and the enhanced features of each channel in multiple channels also include multiple basic feature points. For any one of the basic features of multiple channels, the relevant technology can encode multiple basic feature points of that basic feature into the bitstream according to the positional order of the various basic feature points. Similarly, for any one of the enhanced features of multiple channels, multiple basic feature points of the enhanced feature can be encoded into the bitstream according to the positional order of the various enhanced feature points. For ease of description, the bitstream encoded by the encoding module will be referred to as the total bitstream. The total bitstream includes the basic bitstream and the enhanced bitstream. The basic bitstream is the bitstream corresponding to the encoding of the basic layer features in the total bitstream, and the enhanced bitstream is the bitstream corresponding to the encoding of the enhanced layer features in the total bitstream.

[0110] After obtaining the bitstream, the sending module can send part or all of the bitstream to the decoding end according to the actual bandwidth. For example, please refer to Figure 1, which is a schematic diagram of an encoding end and a decoding end provided in an embodiment of this application. The sending module can send bitstreams with different bitrates to the corresponding terminals according to their actual bandwidth. For example, a bitstream with a bitrate of 1 kilo bits per second (kbps) can be sent to a mobile phone, a bitstream with a bitrate of 2 kbps can be sent to a laptop computer, and a bitstream with a bitrate of 4 kbps can be sent to a desktop computer.

[0111] In one possible implementation, the decoding end includes a decoding module and a receiving module. The receiving module can receive part or all of the bitstream sent by the sending module, and then the decoding module can decode the received bitstream to obtain the reconstructed target image.

[0112] For example, with ample network bandwidth, the sending module can send the total bitstream to the decoding end. With limited network bandwidth, for the basic bitstream, the sending module can send it to the decoding end; for the enhancement layer bitstream, the sending module can, depending on the actual bandwidth, either not send the enhancement layer bitstream, or send part or all of it to the decoding end. In other words, whether the decoding end can obtain all the enhancement layer features depends on the actual bandwidth. For instance, if the actual bandwidth is 1 million bits per second (Mbps), and the maximum bitrate that this bandwidth can handle is 1024 kbps, and the basic bitstream bitrate is also 1024 kbps, then the sending module will only send the basic bitstream to the decoding end, without sending the enhancement layer bitstream. If the actual bandwidth is 10 Mbps, and the maximum bitrate that this bandwidth can handle is 10240 kbps, and the basic bitstream bitrate is also 8240 kbps, then the sending module can send the basic bitstream to the decoding end and then send the enhancement layer bitstream point by point in a sequential manner until the bitrate of the sent bitstream reaches 10240 kbps.

[0113] However, the relevant technologies encode features into the bitstream in a fixed order. This may result in enhancement features that have little effect on improving the quality of the reconstructed image being encoded into the bitstream first, while enhancement features that have a greater effect on improving the quality of the reconstructed image are encoded into the bitstream later. This makes it less likely that enhancement features that have a greater effect on improving the quality of the reconstructed image will be sent to the decoding end, ultimately leading to poor quality of the reconstructed image under poor network conditions.

[0114] Based on this, embodiments of this application provide an encoding and decoding method. When encoding enhanced features, the encoding end can encode the enhanced features of multiple channels into the bitstream in descending order of information content. This ensures that enhanced features with large information content are prioritized for encoding into the bitstream. In scalable encoding, part or all of the bitstream obtained by the above encoding can be sent to the decoding end according to the real-time bandwidth. Features encoded into the bitstream earlier are more likely to be sent to the decoding end. Therefore, the method provided by embodiments of this application can ensure that enhanced features with large information content are prioritized for sending to the decoding end, thereby effectively improving the image quality of the reconstructed image while ensuring that the sent bitstream is adapted to the actual bandwidth. Furthermore, since both the encoder and decoder can obtain the basic layer features in scalable coding, while the decoder can obtain all the enhancement layer features, this means that the decoder may not receive the enhancement layer features. Therefore, in this embodiment, the information content of the enhancement features of multiple channels is determined based on the basic features of multiple channels, rather than relying on the enhancement layer features. This ensures that both the encoder and decoder can obtain the information content of the enhancement features of multiple channels based solely on the basic layer features, thereby ensuring consistency between the encoder and decoder.

[0115] The implementation environment involved in the embodiments of this application will be described next.

[0116] Please refer to Figure 2, which is a schematic diagram of an implementation environment provided in an embodiment of this application. This implementation environment includes a source device 10, a destination device 20, a link 30, and a storage device 40. The source device 10 can generate encoded video, i.e., a bitstream. Therefore, the source device 10 can also be referred to as an encoding device or encoding end. The destination device 20 can decode the bitstream generated by the source device 10. Therefore, the destination device 20 can also be referred to as a decoding device or decoding end. The link 30 can receive the encoded video generated by the source device 10 and can transmit the encoded video to the destination device 20. The storage device 40 can receive the encoded video generated by the source device 10 and can store the encoded video. Under these conditions, the destination device 20 can directly obtain the encoded video from the storage device 40. Alternatively, the storage device 40 can correspond to a file server or another intermediate storage device that can store the encoded video generated by the source device 10. Under these conditions, the destination device 20 can stream or download the encoded video stored in the storage device 40.

[0117] Both source device 10 and destination device 20 may include one or more processors and memory coupled to the one or more processors. This memory may include random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or any other media that can be used to store desired program code in the form of computer-accessible instructions or data structures. For example, both source device 10 and destination device 20 may include mobile phones, smartphones, personal digital assistants (PDAs), wearable devices, pocket PCs (PPCs), tablets, smart car systems, smart TVs, smart speakers, desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, handsets such as so-called "smart" phones, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, or the like.

[0118] Link 30 may include one or more media or devices capable of transmitting encoded video from source device 10 to destination device 20. In one possible implementation, link 30 may include one or more communication media enabling source device 10 to directly transmit encoded video to destination device 20 in real time. In this embodiment, source device 10 may modulate the encoded video based on a communication standard, such as a wireless communication protocol, and transmit the modulated video to destination device 20. The one or more communication media may include wireless and / or wired communication media, such as radio frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, such as a local area network, wide area network, or global network (e.g., the Internet). The one or more communication media may include routers, switches, base stations, or other devices facilitating communication from source device 10 to destination device 20, etc., which are not specifically limited in this embodiment.

[0119] In one possible implementation, storage device 40 can store the received encoded video sent by source device 10, and destination device 20 can directly retrieve the encoded video from storage device 40. Under such conditions, storage device 40 can include any of a variety of distributed or locally accessed data storage media, such as hard disk drives, Blu-ray discs, digital versatile discs (DVDs), compact disc read-only memory (CD-ROMs), flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing bitstreams.

[0120] In one possible implementation, storage device 40 may correspond to a file server or another intermediate storage device that can store the bitstream generated by source device 10, and destination device 20 may stream or download the images stored on storage device 40. The file server can be any type of server capable of storing encoded video and sending it to destination device 20. In one possible implementation, the file server may include a web server, a file transfer protocol (FTP) server, a network attached storage (NAS) device, or a local disk drive, etc. Destination device 20 can acquire the encoded images via any standard data connection (including an Internet connection). Any standard data connection may include a wireless channel (e.g., Wi-Fi connection), a wired connection (e.g., digital subscriber line (DSL), cable modem, etc.), or a combination of both suitable for acquiring encoded video stored on a file server. The transmission of encoded video from storage device 40 may be streaming, downloading, or a combination of both.

[0121] The implementation environment shown in Figure 2 is only one possible implementation method, and the technology of this application embodiment can be applied not only to the source device 10 that can encode images and the destination device 20 that can decode encoded video shown in Figure 2, but also to other devices that can encode video and decode bitstream. This application embodiment does not specifically limit this.

[0122] In the implementation environment shown in Figure 2, source device 10 includes a data source 120, an encoder 100, and an output interface 140. In some embodiments, output interface 140 may include a modem / demodulator and / or a transmitter, wherein the transmitter may also be referred to as a transmitter. Data source 120 may include a video capture device (e.g., a camera, etc.), an archive containing previously captured video, a feed interface for receiving video from a video content provider, and / or a computer graphics system for generating video, or a combination of these sources of video.

[0123] Data source 120 can send video to encoder 100, which can encode the received video from data source 120 to obtain encoded video. The encoder can then send the encoded video to an output interface. In some embodiments, source device 10 directly sends the encoded video to destination device 20 via output interface 140. In other embodiments, the encoded video can also be stored on storage device 40 for later retrieval by destination device 20 for decoding and / or display.

[0124] In the implementation environment shown in Figure 2, the destination device 20 includes an input interface 240, a decoder 200, and a display device 220. In some embodiments, the input interface 240 includes a receiver and / or a modem. The input interface 240 may receive encoded video via link 30 and / or from storage device 40, and then send it to the decoder 200, which may decode the received encoded video to obtain decoded video. The decoder may send the decoded video to the display device 220. The display device 220 may be integrated with the destination device 20 or may be external to the destination device 20. Generally, the display device 220 displays the decoded video. The display device 220 may be any type of display device, for example, a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or other types of display devices.

[0125] Although not shown in Figure 2, in some respects, encoder 100 and decoder 200 may be integrated with each other and may include appropriate multiplexer-demultiplexer (MUX-DEMUX) units or other hardware and software for encoding both audio and video in a common data stream or separate data streams. In some embodiments, the MUX-DEMUX unit may conform to the ITU H.223 multiplexer protocol, or other protocols such as User Datagram Protocol (UDP), if applicable.

[0126] Encoder 100 and decoder 200 may each be any of the following circuits: one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof. If the techniques of the embodiments of this application are implemented in part in software, the apparatus may store instructions for software in a suitable non-volatile computer-readable storage medium, and the instructions may be executed in hardware using one or more processors to implement the techniques of the embodiments of this application. Any of the foregoing (including hardware, software, combinations of hardware and software, etc.) may be considered as one or more processors. Each of encoder 100 and decoder 200 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder / decoder (encoder-decoder) in the respective apparatus.

[0127] In this application embodiment, encoder 100 may be generally referred to as an apparatus that “signals” or “sends” certain information to, for example, decoder 200. The terms “signals” or “sends” may generally refer to the transmission of syntax elements and / or other data for decoding compressed video. This transmission may occur in real-time or near real-time. Alternatively, this communication may occur after a period of time, for example, during encoding when syntax elements are stored in a computer-readable storage medium in a encoded bitstream, and the decoding apparatus may then retrieve the syntax elements at any time after they have been stored in this medium.

[0128] It should be noted that the encoding and decoding methods provided in this application embodiment can be applied to various scenarios. In various scenarios, the images being encoded and decoded can be images included in image files or images included in video files. Referring to the implementation environment shown in Figure 2, encoder 100 is equivalent to the aforementioned encoding module, and decoder 200 is equivalent to the aforementioned decoding module. Any encoding method described below can be executed by encoder 100 in source device 10. Any decoding method described below can be executed by decoder 200 in destination device 20. In some embodiments, output interface 140 is equivalent to the aforementioned sending module, and input interface 240 is equivalent to the aforementioned receiving module.

[0129] Figure 3 is a schematic diagram of another implementation environment provided by an embodiment of this application. This implementation environment includes an encoding end and a decoding end. The encoding end includes an AI encoding module, an entropy estimation module, an entropy encoding module, and a file saving module. The decoding end includes a file loading module, an entropy estimation module, an entropy decoding module, and an AI decoding module.

[0130] During compression, the encoding end acquires the image to be compressed, such as video or photographs captured by a camera. Then, the AI ​​encoding module transforms the image / video data into features with lower redundancy. Next, the entropy estimation module determines the probability distribution corresponding to each feature. Based on the probability distribution, the entropy encoding module performs entropy encoding on the features to be encoded, further reducing the amount of data transmitted during image compression, thus obtaining a bitstream file. The file saving module saves this bitstream file to obtain the compressed image file. The compressed file is input to the decoding end. The decoding end loads the compressed file through the file loading module, determines the probability distribution corresponding to each feature through the entropy estimation module, and decodes the bitstream through the entropy decoding module based on the probability distribution. Finally, the AI ​​decoding module performs an inverse transformation on the data output from the entropy decoding to obtain the reconstructed image.

[0131] In some embodiments, the AI ​​encoding unit and AI decoding unit modules typically include nonlinear transformation units, exhibiting nonlinear characteristics. The entropy estimation module deploys an entropy model, which can determine the probability distribution corresponding to the feature to be encoded.

[0132] In one possible implementation, the data processing of the AI ​​encoding module, entropy estimation module, and AI decoding module is implemented on an embedded neural network processing unit (NPU) to improve data processing efficiency, while processes such as entropy encoding, file saving, and file loading are implemented on a central processing unit (CPU).

[0133] In one possible implementation, the encoding end and the decoding end are a single device, or they are two independent devices. If the encoding end and the decoding end are a single device, this device can compress images using the encoding method provided in this application embodiment, and it can also decompress images using the decoding method provided in this application embodiment. If the encoding end and the decoding end are two independent devices, the encoding method provided in this application embodiment can be applied to the encoding end of these two devices, and the decoding method provided in this application embodiment can be applied to the decoding end of these two devices. That is, for a single device, the device has both image compression and image decompression functions, or the device has either image compression or image decompression functions.

[0134] Figure 4 is a flowchart of an encoding method provided in an embodiment of this application. This method is applied to the encoding end. Referring to Figure 4, the method includes the following steps.

[0135] Step 401: Determine the basic layer features and enhancement layer features of the target image. The enhancement layer features include enhancement features of multiple channels, and the basic layer features include basic features of multiple channels.

[0136] It should be noted that the target image includes Q channels, where Q is a positive integer (e.g., the target image includes three channels: red, green, and blue). In this case, the number of channels in the intermediate features of the target image may or may not be equal to Q. Intermediate features refer to the features generated after transforming the target image during the encoding process. In the embodiments of this application, the intermediate features include the aforementioned basic layer features and enhancement layer features, and the multiple channels included in the basic layer features correspond one-to-one with the multiple channels included in the basic layer.

[0137] Understandably, basic layer features are used to reconstruct the basic image content of the target image, while enhancement layer features are used to enhance and supplement the basic image content.

[0138] The following steps (1)-(3) will be used to describe in detail the process of determining the basic layer features and enhancement layer features of the target image.

[0139] Step (1): Quantize the image features of the target image according to the first quantization step size to obtain the quantization layer features. The first quantization step size is determined based on the target bit rate.

[0140] In some embodiments, the image features of the target image include image features from multiple channels, and the quantization layer features include quantization features from multiple channels. The multiple channels included in the image features correspond one-to-one with the multiple channels included in the quantization layer features. Each channel's image features include multiple image feature points, and each channel's quantization features include multiple quantization feature points. Furthermore, multiple image feature points in the same channel correspond one-to-one with multiple quantization feature points. In this case, the encoder can divide the feature value of the target image feature point by the first quantization step size and then round it off to determine the feature value of the quantization feature point corresponding to the target image feature point. The target image feature point is any one of the multiple image feature points included in the first channel, and the first channel is any one of the multiple channels.

[0141] In one possible implementation, the target bitrate is the upper limit of the bitrate of the stream.

[0142] In some embodiments, before the encoder quantizes the image features of the target image according to the first quantization step size to obtain the quantization layer features, the encoder can determine the target bit rate and determine the first quantization step size based on the target bit rate.

[0143] In some embodiments, the decoding end can send a target bitrate to the encoding end to indicate that the bitrate of the bitstream sent by the encoding end does not exceed the target bitrate, and then the encoding end can receive the target bitrate sent by the decoding end.

[0144] In some embodiments, the encoder stores a correspondence between bitrate and quantization step size. In this case, the encoder can determine the quantization step size corresponding to the target bitrate from the correspondence between bitrate and quantization step size based on the target bitrate, so as to obtain the first quantization step size.

[0145] In some embodiments, before quantizing the image features of the target image according to the first quantization step size, the encoding end can also determine the image features of the target image based on the target image. For example, the target image can be input into the encoding network to obtain the image features of the target image output by the encoding network. Of course, the image features of the target image can also be determined in other ways, which are not limited in this application embodiment.

[0146] It is understandable that the target image, the image features of the target image, and the quantization layer features mentioned above all correspond one-to-one with each other.

[0147] Step (2): Based on the second quantization step size and quantization layer features, determine the basic layer features so that the feature values ​​of the basic layer features have N possible values, and the average of the N possible values ​​is the target value.

[0148] In one possible implementation, based on the second quantization step size and the first quantization feature point, the feature value of the basic feature point corresponding to the first quantization feature point is determined, so that the feature value of the basic feature point corresponding to the first quantization feature point has N possible values, and the average of the N values ​​is the target value. The first quantization feature point is any one of the multiple quantization feature points included in the first channel, and the first channel is any one of the multiple channels.

[0149] In one possible implementation, the target value is determined based on the second quantization step size and the mean of the probability distributions corresponding to the first quantization feature points. For example, the target value is determined by dividing the mean of the probability distribution corresponding to the first quantization feature point by the second quantization step size and then rounding it off. Therefore, the average value of the feature values ​​of each basic feature point (i.e., the target value) is related to the mean of the probability distribution corresponding to the corresponding quantization feature point. Thus, there is a one-to-one correspondence between the target value and the quantization feature points. The feature values ​​of different basic feature points may be the same or different, depending on the result of calculating the mean of the probability distribution corresponding to the corresponding quantization feature point and the second quantization step size. This application does not limit this specific approach.

[0150] It should be noted that in the entropy coding process of image compression, the probability of elements (i.e., feature points) in the feature map is usually estimated using an entropy model, and then entropy coding is performed based on the probability distribution corresponding to each feature point. If the entropy model uses a Gaussian distribution mathematical model for modeling, the output of the entropy model is the mean and variance (or mean and standard deviation) of the probability distribution corresponding to each feature point. Therefore, in the embodiments of this application, the feature points correspond to the mean and variance (or mean and standard deviation) of the probability distribution, and correspondingly, the aforementioned first quantized feature point corresponds to the mean of the probability distribution.

[0151] In one possible implementation, the quantization layer features include quantization features of multiple channels, each channel's quantization features include multiple quantization feature points, each channel's basic features include multiple basic feature points, and the multiple quantization feature points of the same channel correspond one-to-one with the multiple basic feature points.

[0152] In some embodiments, the second quantization step size can be either odd or even. In different cases, the implementation methods for determining the feature values ​​of the basic feature points corresponding to the first quantization feature points based on the second quantization step size and the first quantization feature points are different, which will be introduced separately below.

[0153] When the second quantization step size is even, if the eigenvalue of the first quantization feature point is not equal to the mean of the probability distribution corresponding to the first quantization feature point, then the eigenvalue of the basic feature point corresponding to the first quantization feature point is determined based on the eigenvalue of the first quantization feature point and the second quantization step size; if the eigenvalue of the first quantization feature point is equal to the mean of the probability distribution corresponding to the first quantization feature point, then the mean of the probability distribution corresponding to the first quantization feature point is determined to be the eigenvalue of the basic feature point corresponding to the first quantization feature point.

[0154] If the eigenvalue of the first quantized feature point is greater than the mean of the probability distribution corresponding to the first quantized feature point, then the eigenvalue of the first quantized feature point is added to the first value and then divided by the second quantization step size to obtain the first quantized value. The first quantized value is then rounded down to obtain the eigenvalue of the basic feature point corresponding to the first quantized feature point. If the eigenvalue of the first quantized feature point is less than the mean of the probability distribution corresponding to the first quantized feature point, then the first value is subtracted from the eigenvalue of the first quantized feature point and then divided by the second quantization step size to obtain the second quantized value. The second quantized value is then rounded up to obtain the eigenvalue of the basic feature point corresponding to the first quantized feature point.

[0155] In one possible implementation, the eigenvalues ​​of the basic eigenpoints corresponding to the first quantized eigenpoints can be determined based on the following formula (1).

[0156]

[0157] 其中, In the above formula (1), N 为 Non-negative integers, k is the second quantization step size, floor() means rounding down the value in parentheses, cell() means rounding up the value in parentheses, y represents the eigenvalue of the basic eigenvalue corresponding to the first quantization eigenvalue, x represents the eigenvalue of the first quantization eigenvalue, M represents the first value, and A represents the mean of the probability distribution corresponding to the first quantization eigenvalue.

[0158] In one possible implementation, the eigenvalues ​​of the basic eigenpoints corresponding to the first quantized eigenpoints can be determined based on the following formula (2).

[0159]

[0160] In the above formula (2), N is a non-negative integer, k is the second quantization step size, floor() means rounding down the value in the parentheses, cell() means rounding up the value in the parentheses, y means the eigenvalue of the basic eigenvalue corresponding to the first quantization eigenvalue, x means the eigenvalue of the first quantization eigenvalue, M means the first value, and A means the mean of the probability distribution corresponding to the first quantization eigenvalue.

[0161] For example, the first value can be 0.5, the mean of the probability distribution corresponding to the first quantized feature point can be 0, and N can be equal to 1. In this case, the feature value of the basic feature point corresponding to the first quantized feature point can be determined by the following formula (3).

[0162]

[0163] In the above formula (3), k is the second quantization step size, floor() means rounding down the value in parentheses, cell() means rounding up the value in parentheses, y means the feature value of the basic feature point corresponding to the first quantization feature point, and x means the feature value of the first quantization feature point.

[0164] In one possible implementation, the eigenvalues ​​of the basic eigenpoints corresponding to the first quantized eigenpoints can be determined based on the following formula (4).

[0165]

[0166] In the above formula (4), N is a non-negative integer, k is the second quantization step size, round() means rounding down the value in parentheses, y represents the feature value of the basic feature point corresponding to the first quantization feature point, x represents the feature value of the first quantization feature point, M represents the first value, and A represents the mean of the probability distribution corresponding to the first quantization feature point.

[0167] For example, the second quantization step size is 2.

[0168] Since the smaller the quantization step size, the less information is lost when the original data is mapped to discrete values, the embodiments of this application can determine the basic layer features and quantization layer features through a finer-grained second quantization step size, thereby reducing the quantization error of the data and further improving the reconstruction quality of the image.

[0169] When the second quantization step size is odd, the feature value of the first quantization feature point is divided by the second quantization step size and then rounded to determine the feature value of the basic feature point corresponding to the first quantization feature point.

[0170] In some embodiments, before determining the basic layer features based on the second quantization step size and quantization layer features, the encoding end can also correct the feature value of the first quantization feature point based on the mean of the probability distribution corresponding to the first quantization feature point, so that the mean of the probability distribution corresponding to the first quantization feature point after correction is a fixed value. The first quantization feature point is any one of the multiple quantization feature points included in the first channel, and the first channel is any one of the multiple channels.

[0171] The value obtained by subtracting the mean of the probability distribution corresponding to the first quantized feature point from the feature value of the first quantized feature point is added to a fixed value to obtain the corrected feature value of the first quantized feature point.

[0172] In some embodiments, the mean of the probability distribution corresponding to the corrected first quantized feature point is a fixed value that can be 0. In this case, the feature value of the corrected first quantized feature point can be obtained by subtracting the mean of the probability distribution corresponding to the first quantized feature point from the feature value of the first quantized feature point.

[0173] When the mean of the probability distribution corresponding to each feature point in the quantization layer is 0, it can be guaranteed that the mean of the subsequently determined basic layer features is also 0, thereby simplifying the calculation steps and improving the encoding and decoding efficiency.

[0174] Step (3): Determine the enhancement layer features based on the second quantization step size, quantization layer features, and basic layer features.

[0175] In one possible implementation, the enhancement features of each channel in multiple channels include multiple enhancement feature points. Multiple quantization feature points, multiple basic feature points, and multiple enhancement feature points in the same channel correspond one-to-one. In this case, the product of the second quantization step size and the feature value of the basic feature point corresponding to the first quantization feature point can be determined to obtain the second value of the basic feature point corresponding to the first quantization feature point. The feature value of the enhancement feature point corresponding to the first quantization feature point is obtained by subtracting the second value of the basic feature point corresponding to the first quantization feature point from the feature value of the first quantization feature point.

[0176] In some embodiments, if the second quantization step size is odd, then for any basic feature point of any channel, the enhanced feature point corresponding to that basic feature point has F possible values, where F is equal to the second quantization step size.

[0177] For example, please refer to Figure 5. Figure 5 is a schematic diagram of the probability distribution corresponding to a quantized feature point 1 provided in an embodiment of this application. The mean of the probability distribution corresponding to the quantized feature point 1 is 0. When the second quantization step size is 3, it is not difficult to see from Figure 5 that there are 3 possible values ​​for the enhanced feature point corresponding to the basic feature point.

[0178] If the second quantization step size is even, and the eigenvalue of the basic feature point is not the mean of the probability distribution corresponding to the quantized feature point of the basic feature point, then the enhanced feature point corresponding to the basic feature point has F possible values, where F is equal to the second quantization step size.

[0179] For example, please refer to Figure 6. Figure 6 is a schematic diagram of the probability distribution corresponding to another quantized feature point 1 provided in an embodiment of this application. The mean of the probability distribution corresponding to the quantized feature point 1 is 0. When the second quantization step size is 2, it is not difficult to see from Figure 6 that when the feature value of the basic feature point is the mean of the probability distribution corresponding to the quantized feature point of the basic feature point, there are 3 possible values ​​for the enhanced feature point corresponding to the basic feature point; when the feature value of the basic feature point is not the mean of the probability distribution corresponding to the quantized feature point of the basic feature point, there are 2 possible values ​​for the enhanced feature point corresponding to the basic feature point.

[0180] Step 402: Based on the basic features of multiple channels, determine the information content of the enhanced features of multiple channels through an entropy model.

[0181] The encoding method provided in this application is executed by an encoding end. In some embodiments, the encoding end deploys an entropy model, i.e., the encoding end includes an entropy model; in other embodiments, the entropy model may be deployed outside the encoding end, i.e., the encoding end does not include an entropy model. This application does not limit this. Regardless of whether the encoding end includes an entropy model or not, the encoding end can determine the information content of the enhanced features of multiple channels through the entropy model.

[0182] In some embodiments, the image features of the target image are quantized according to a first quantization step size to obtain quantized features of multiple channels; based on a second quantization step size, the basic features of multiple channels are dequantized to obtain dequantized features of multiple channels; the dequantized features of multiple channels and the quantized features of multiple channels are input into an entropy model to obtain the probability distribution of multiple channels output by the entropy model; based on the second quantization step size and the probability distribution of multiple channels, the information content of the enhanced features of multiple channels is determined.

[0183] Since whether the decoding end can obtain all the enhancement layer features depends on the actual bandwidth, the embodiments of this application do not rely on the enhancement layer features when determining the probability distribution of multiple channels. Instead, they use the dequantized basic layer features as the context of the entropy model to ensure the consistency between the encoding and decoding ends.

[0184] The method of quantizing the image features of the target image according to the first quantization step size to obtain the quantized features of multiple channels is the same as the method of quantizing the image features of the target image according to the first quantization step size to obtain the quantization layer features in step 401. For details, please refer to the relevant explanation above. It will not be elaborated here.

[0185] In some embodiments, the process of dequantizing the basic features of multiple channels based on the second quantization step size to obtain the dequantized features of multiple channels includes: dequantizing the basic features of multiple channels based on the second quantization step size and the probability distribution corresponding to the basic features of multiple channels to obtain the dequantized features of multiple channels.

[0186] In the inverse quantization process of this application, the probability distribution corresponding to the basic features of multiple channels is combined with the basic features of multiple channels to obtain the inverse quantization features of multiple channels. Compared with the scheme of directly multiplying the second quantization step size with the basic layer features, since the probability distribution can describe the distribution of the feature values ​​of the basic layer features, the inverse quantization process of this application combining the probability distribution corresponding to the basic features of multiple channels can more accurately recover the feature values ​​and effectively improve the accuracy of inverse quantization.

[0187] In some embodiments, the second quantization step size can be either odd or even. Under different circumstances, the implementation methods of dequantizing the basic features of multiple channels based on the second quantization step size to obtain the dequantized features of multiple channels are different, which will be introduced separately below.

[0188] When the second quantization step size is odd, if the eigenvalue of the first basic feature point is greater than the second value, the eigenvalue of the first basic feature point is multiplied by the second quantization step size and then subtracted from the third value to obtain the eigenvalue of the inverse quantized feature point corresponding to the first basic feature point; if the eigenvalue of the first basic feature point is less than the second value, the eigenvalue of the first basic feature point is multiplied by the second quantization step size and then added to the third value to obtain the eigenvalue of the inverse quantized feature point corresponding to the first basic feature point; if the eigenvalue of the first basic feature point is equal to the second value, the second value is determined to be the eigenvalue of the inverse quantized feature point corresponding to the first basic feature point; wherein, the first basic feature point is any one of the multiple basic feature points included in the first channel, the first channel is any one of the multiple channels, the second value is the mean of the probability distribution corresponding to the first basic feature point, and the third value is obtained by subtracting one from the second quantization step size and then dividing by 2.

[0189] When the second quantization step size is even, the eigenvalue of the first basic feature point is multiplied by the second quantization step size to obtain the eigenvalue of the inverse quantized feature point corresponding to the first basic feature point. The first basic feature point is any one of the multiple basic feature points included in the first channel, and the first channel is any one of the multiple channels.

[0190] There are several ways to input the inverse quantization features and quantization features of multiple channels into the entropy model to obtain the probability distribution of multiple channels output by the entropy model. The following will introduce three of these methods.

[0191] In the first implementation, the entropy model includes a first model, a second model, and a third model. In this case, the quantization features of multiple channels are input into the first model to obtain the residual information of the probability distributions of the multiple channels output by the first model. For the first channel among the multiple channels, the residual information of the probability distribution of the first channel output by the first model is used as the probability distribution of the first channel output by the entropy model. The inverse quantization features of at least one channel preceding the second channel and the mean of at least one channel are input into the second model to obtain the predicted probability distribution of the second channel output by the second model. The second channel is any channel among the multiple channels except the first channel. The predicted probability distribution of the second channel and the residual information of the probability distribution are input into the third model to obtain the probability distribution of the second channel output by the third model.

[0192] In the case where the entropy model includes a first model, a second model, and a third model, for a channel other than the first one (i.e., the second channel) among multiple channels, this application can use the inverse quantization features and mean of the channels preceding the second channel as context to obtain the predicted probability distribution of the second channel. In other words, the embodiments of this application can use the basic layer features as the channel context of the entropy model, thereby better capturing the statistical regularity in the data and obtaining a more accurate probability distribution corresponding to the feature value, effectively improving the generalization ability of the entropy model.

[0193] In some embodiments, the residual information of the probability distribution of multiple channels includes the mean residual corresponding to the quantization features of multiple channels and the standard deviation residual corresponding to the basic features of multiple channels. The probability distribution of multiple channels includes the mean corresponding to the quantization features of multiple channels and the standard deviation corresponding to the basic features of multiple channels. In this case, the quantization features of multiple channels are input into the first model to obtain the mean residual corresponding to the quantization features of multiple channels output by the first model and the standard deviation residual corresponding to the basic features of multiple channels. For the first channel among the multiple channels, the mean residual corresponding to the quantization features of the first channel output by the first model is determined as the mean corresponding to the quantization features of the first channel output by the entropy model; the standard deviation residual corresponding to the basic features of the first channel output by the first model is determined as the standard deviation corresponding to the basic features of the first channel output by the entropy model. The inverse quantization features of at least one channel preceding the second channel and the mean of the quantization features of at least one channel are input into the second model to obtain the predicted mean of the quantization features of the second channel and the predicted standard deviation of the basic features of the second channel output by the second model. The second channel is any channel other than the first channel among multiple channels. The predicted mean of the quantization features of the second channel, the mean residual of the quantization features of the second channel, the predicted standard deviation of the basic features of the second channel, and the standard deviation residual of the basic features of the second channel are input into the third model to obtain the mean of the quantization features of the second channel and the standard deviation of the basic features of the second channel output by the third model.

[0194] The second implementation involves an entropy model comprising a first model, a second model, and a third model. In this case, the quantization features of multiple channels are input into the first model to obtain the residual information of the probability distribution of multiple channels output by the first model. For the first position in the first channel among multiple channels, the residual information of the probability distribution of the first position output by the first model is used as the probability distribution of the first position output by the entropy model. The inverse quantization feature points of at least one position before the first position and the mean of at least one position are input into the second model to obtain the predicted probability distribution of the first position output by the second model. The first position is any position in multiple channels other than the first position in the first channel. The predicted probability distribution of the first position and the residual information of the probability distribution are input into the third model to obtain the probability distribution of the first position output by the third model.

[0195] In the case where the entropy model includes a first model, a second model, and a third model, for any position other than the first position of the first channel (i.e., the first position) in multiple channels, the embodiments of this application can use the inverse quantization features and mean of the positions before the first position as context to obtain the predicted probability distribution of the first position. In other words, the embodiments of this application can use the basic layer features as the spatial context of the entropy model, thus better capturing the statistical regularity in the data and obtaining a more accurate probability distribution corresponding to the feature value, effectively improving the generalization ability of the entropy model.

[0196] In some embodiments, the residual information of the probability distribution of multiple channels includes the mean residual corresponding to the quantization features of multiple channels and the standard deviation residual corresponding to the basic features of multiple channels. The probability distribution of multiple channels includes the mean corresponding to the quantization features of multiple channels and the standard deviation corresponding to the basic features of multiple channels. In this scenario, the quantization features of multiple channels are input into the first model to obtain the mean residuals of the quantization features of multiple channels output by the first model, and the standard deviation residuals of the basic features of multiple channels. For the first position in the first channel among multiple channels, the mean residual of the quantization feature point of the first position output by the first model is determined as the mean of the quantization feature point of the first position output by the entropy model. The standard deviation residual of the basic feature point of the first position output by the first model is determined as the standard deviation of the basic feature point of the first position output by the entropy model. The inverse quantization feature points of at least one position before the first position and the mean of the quantization feature points of at least one position are input into the second model to obtain the predicted mean of the quantization feature point of the first position and the predicted standard deviation of the basic feature point of the first position output by the second model. The first position is any position in multiple channels other than the first position in the first channel. The predicted mean of the quantization feature point of the first position, the mean residual of the quantization feature point of the first position, the predicted standard deviation of the basic feature point of the first position, and the standard deviation residual of the basic feature point of the first position are input into the third model to obtain the mean of the quantization feature point of the first position and the standard deviation of the basic feature point of the first position output by the third model.

[0197] The third implementation involves an entropy model comprising a first model, a second model, a third model, a fourth model, and a fifth model. In this case, the quantization features of multiple channels are input into the first model to obtain the residual information of the probability distributions of the multiple channels output by the first model. For the first channel among the multiple channels, the residual information of the probability distribution of the first channel output by the first model is used as the first probability distribution of the first channel output by the entropy model. The inverse quantization features of at least one channel preceding the second channel and the mean of at least one channel are input into the second model to obtain the predicted probability distribution of the second channel output by the second model. The second channel is any channel among the multiple channels except the first channel. The predicted probability distribution of the second channel and the residual information of the probability distribution are input into the third model to obtain the first probability distribution of the second channel output by the third model. Finally, multiple channels are obtained. The model calculates the probability distribution of a channel, the first probability distribution corresponding to each channel, and the second probability distribution of a channel. For the first position in the first channel, the residual information of the probability distribution of the first position output by the first model is used as the second probability distribution of the first position output by the entropy model. The model inputs the inverse quantization feature points of at least one position before the first position and the mean of at least one position into the second model to obtain the predicted probability distribution of the first position output by the second model. The first position is any position in the multiple channels other than the first position in the first channel. The model inputs the predicted probability distribution of the first position and the residual information of the probability distribution into the third model to obtain the second probability distribution of the first position output by the third model. Finally, the model obtains the second probability distribution corresponding to each channel in the multiple channels. Based on the first and second probability distributions of each channel in the multiple channels, the probability distribution of each channel is determined.

[0198] In some embodiments, any one of the first probability distribution and the second probability distribution of each of the multiple channels can be determined as the probability distribution of that channel. In other embodiments, the average of the first probability distribution of each of the multiple channels and the second probability distribution of the second channel can be determined as the probability distribution of that channel. Of course, in practical applications, the probability distribution of each channel can also be determined based on the first probability distribution and the second probability distribution of each of the multiple channels in other ways, and this application embodiment does not limit this.

[0199] It should be noted that, since the embodiments of this application can use the basic layer features as the channel context and / or spatial context of the entropy model, the above-mentioned entropy model can also be called a context-based entropy model.

[0200] It should be noted that if, before determining the basic layer features based on the second quantization step size and quantization layer features, the encoder corrects the feature value of the first quantization feature point based on the mean of the probability distribution corresponding to the first quantization feature point, so that the mean of the probability distribution corresponding to the first quantization feature point after correction is a fixed value, then the mean of the quantization feature in the first, second, and third implementations mentioned above is the mean of the quantization feature before correction. It should also be noted that the mean at at least one position is the mean of the quantization feature point at at least one position, and the mean at at least one channel is the mean of the quantization feature corresponding to at least one channel. Similarly, if, before determining the basic layer features based on the second quantization step size and quantization layer features, the encoder corrects the feature value of the first quantization feature point based on the mean of the probability distribution corresponding to the first quantization feature point, then the mean of the quantization feature point at at least one position is the mean of the quantization feature point at at least one position before correction, and the mean of at least one channel is the mean of the quantization feature corresponding to at least one channel before correction.

[0201] In some embodiments, determining the information content of the enhanced features of multiple channels based on the second quantization step size and the probability distribution of multiple channels includes: determining the mean of the basic features of multiple channels based on the mean of the quantization features of multiple channels and the second quantization step size; and determining the information content of the enhanced features of multiple channels based on the basic features of multiple channels, and the mean and standard deviation of the basic features of multiple channels.

[0202] It is understandable that, since the quantization features of each channel in multiple channels include multiple quantization feature points, the mean of the quantization feature of each channel includes the mean of the probability distributions corresponding to the multiple quantization feature points included in the corresponding channel; similarly, the basic features of each channel in multiple channels include multiple basic feature points, therefore, the mean and standard deviation (or variance) of the basic features of each channel include the mean and standard deviation (or variance) of the probability distributions corresponding to the multiple basic feature points included in the corresponding channel.

[0203] The mean of the probability distribution corresponding to the first quantization feature point is divided by the second quantization step size and then rounded to the nearest integer. This value is determined as the mean of the probability distribution corresponding to the basic feature point of the first quantization feature point. The first quantization feature point is any one of the multiple quantization feature points included in the first channel, and the first channel is any one of the multiple channels.

[0204] In some embodiments, information content is characterized by information entropy.

[0205] It's important to note that higher information entropy indicates a larger amount of information, fewer patterns, and greater uncertainty, making it more difficult to compress. In image compression, image features, syntactic element values ​​of the bitstream, and other elements involved all constitute information. When the information entropy of image features is high, it indicates a large amount of information and greater uncertainty, reflecting a more complex image content. Conversely, when the information entropy of image features is low, it indicates a smaller amount of information and less uncertainty, reflecting a simpler image content.

[0206] In some embodiments, the process of determining the information content of the enhanced features of multiple channels based on the basic features of multiple channels and the mean and standard deviation corresponding to the basic features of multiple channels includes: determining the probability distribution corresponding to the first basic feature point based on the mean and standard deviation corresponding to the first basic feature point; determining the probability of the feature value of the first basic feature point in the probability distribution corresponding to the first basic feature point based on the probability distribution corresponding to the first basic feature point; determining the information entropy of the first basic feature point based on the probability of the feature value of the first basic feature point in the probability distribution corresponding to the first basic feature point; and determining the information entropy of the first basic feature as the information entropy of the enhanced feature point corresponding to the first basic feature.

[0207] For example, the information entropy of the first basic feature point can be determined by the following formula (5) based on the probability corresponding to the eigenvalue of the first basic feature point in the probability distribution corresponding to the first basic feature point.

[0208] Y = -log2P(x) (5)

[0209] In the above formula (5), Y represents the information entropy of the first basic feature point, x represents the feature value of the first basic feature point, and P(x) represents the probability of the feature value of the first basic feature point in the probability distribution corresponding to the first basic feature point.

[0210] Step 403: Encode the basic characteristics of multiple channels into the bitstream.

[0211] In some embodiments, the basic characteristics of multiple channels are encoded into the bitstream based on the mean and standard deviation corresponding to the basic characteristics of multiple channels.

[0212] In one possible implementation, the encoder can also encode the residual information of the probability distribution of multiple channels output by the first model into the bitstream.

[0213] The embodiments of this application can encode the residual information of the probability distribution into the bitstream. Compared with the scheme of directly encoding the probability distribution of multiple channels into the bitstream, the embodiments of this application can effectively reduce redundancy in the original data and improve compression efficiency by encoding the residual information.

[0214] It should be noted that the mean residual corresponding to the quantization feature of a channel includes the mean residual of the probability distribution corresponding to the multiple quantization feature points included in the channel. Similarly, the standard deviation residual (or variance residual) corresponding to the basic feature of a channel includes the standard deviation residual (or variance residual) of the probability distribution corresponding to the multiple basic feature points included in the channel.

[0215] In some embodiments, the basic features of multiple channels can be encoded into the bitstream using entropy coding based on the mean and standard deviation corresponding to the basic features of multiple channels.

[0216] Step 404: Based on the information content of the enhanced features of multiple channels, encode the enhanced features of multiple channels into the bitstream in descending order of information content.

[0217] In some embodiments, the enhancement features of each channel in the multiple channels include multiple enhancement feature points, and the information content of the enhancement features of each channel in the multiple channels includes the information content of the multiple enhancement feature points of each channel. In this case, the encoder can determine the information content of each channel in the multiple channels based on the information content of the multiple enhancement feature points of each channel in the multiple channels; and encode the enhancement features of the multiple channels into the bitstream in the order of the information content of each channel from large to small.

[0218] In some embodiments, the amount of information is characterized by information entropy. For each of the multiple channels, the average, mode, or median of the information entropy of the multiple enhanced feature points of that channel can be determined as the information entropy of that channel. Alternatively, the minimum or maximum value of the information entropy of the multiple enhanced feature points of that channel can be determined as the information entropy of that channel. This application does not limit this.

[0219] In one possible implementation, the process of encoding the enhanced features of multiple channels into the bitstream includes: encoding the feature values ​​corresponding to the multiple enhanced feature points of the first channel into the bitstream in descending order of the information content of the multiple enhanced feature points of the first channel, wherein the first channel is any one of the multiple channels.

[0220] For each of the multiple channels, in addition to encoding the multiple enhanced feature points into the bitstream according to the order of the amount of information of the multiple enhanced feature points in the channel, the multiple enhanced feature points can also be encoded into the bitstream directly according to the order of their positions. This application embodiment does not limit this.

[0221] In other words, the order in which the enhanced features of multiple channels are incorporated into the bitstream is determined by the amount of information in each channel. For the multiple enhanced feature points included in each channel, the multiple enhanced feature points included in that channel can also be incorporated into the bitstream according to the amount of information, or directly according to the order in which the multiple enhanced feature points are located in the channel.

[0222] In some embodiments, for any basic feature point corresponding to any enhanced feature point in any channel among multiple channels, the feature value of the enhanced feature point corresponding to the basic feature point is encoded into the bitstream through entropy coding based on the mean and standard deviation of the basic feature point.

[0223] The encoding method provided in this application embodiment will be described again next with reference to Figure 7. Please refer to Figure 7, which is a flowchart of another encoding method provided in this application embodiment. The target image obtains image features through an encoding network. The image features of the target image are quantized according to the first quantization step size to obtain quantization layer features (i.e., first quantization in Figure 7). Based on the second quantization step size and the quantization layer features, the basic layer features are determined. Based on the second quantization step size, the quantization layer features, and the basic layer features, the enhancement layer features (i.e., second quantization in Figure 7) are determined. Then, based on the second quantization step size, the basic features of multiple channels are dequantized to obtain dequantized features of multiple channels. The dequantized features of multiple channels and the quantized features of multiple channels are input into the entropy model. The basic layer features are used as the channel context and / or spatial context of the entropy model to obtain the entropy model. The mean of the quantization features of multiple channels in the output is the sum of the standard deviations of the basic features of multiple channels. Based on the mean of the quantization features of multiple channels and the second quantization step size, the mean of the basic features of multiple channels is determined. For the basic features of multiple channels, based on the mean and standard deviation of the basic features of multiple channels, the basic features of multiple channels are encoded into the bitstream through entropy coding. For the enhanced features of multiple channels, based on the basic features of multiple channels and the mean and standard deviation of the basic features of multiple channels, the information content of the enhanced features of multiple channels is determined, and the enhanced features of multiple channels are encoded into the bitstream through entropy coding in descending order of information content.

[0224] In this embodiment, the encoding end can encode the enhanced features of multiple channels into the bitstream in descending order of information content. This ensures that enhanced features with high information content are prioritized for encoding into the bitstream. In scalable coding, part or all of the encoded bitstream can be sent to the decoding end based on the real-time bandwidth. Features encoded earlier are more likely to be sent to the decoding end. Therefore, the method provided in this embodiment ensures that enhanced features with high information content are prioritized for sending to the decoding end, thereby effectively improving the image quality of the reconstructed image while ensuring that the transmitted bitstream is adapted to the actual bandwidth.

[0225] Furthermore, since both the encoder and decoder can obtain the basic layer features in scalable coding, while the decoder can obtain all the enhancement layer features, this means that the decoder may not receive the enhancement layer features. Therefore, in this embodiment, the information content of the enhancement features of multiple channels is determined based on the basic features of multiple channels, rather than relying on the enhancement layer features. This ensures that both the encoder and decoder can obtain the information content of the enhancement features of multiple channels based solely on the basic layer features, thereby ensuring consistency between the encoder and decoder.

[0226] Figure 8 is a flowchart of a decoding method provided in an embodiment of this application. This method is applied at the decoding end. Referring to Figure 8, the method includes the following steps.

[0227] Step 801: Obtain the basic layer features of the target image reconstruction based on the bitstream. The basic layer features of the reconstruction include the basic reconstruction features of multiple channels.

[0228] In some embodiments, the process of obtaining the basic layer features of the target image reconstruction based on the bitstream includes: decoding the basic layer features of the target image reconstruction from the bitstream.

[0229] The process of decoding the target image from the bitstream to obtain the basic layer features of the reconstruction includes: decoding the reconstruction residual information of the probability distribution of multiple channels from the bitstream; and decoding the target image from the bitstream based on the reconstruction residual information of the probability distribution of multiple channels through an entropy model to obtain the basic layer features of the reconstruction.

[0230] In some embodiments, the reconstructed residual information of the probability distribution of multiple channels includes the mean residual corresponding to the quantization features of multiple channels and the standard deviation residual (or variance residual) corresponding to the basic features of multiple channels. For ease of description, the following description will take the reconstructed residual information of the probability distribution of multiple channels, which includes the mean residual corresponding to the quantization features of multiple channels and the standard deviation residual corresponding to the basic features of multiple channels, as an example.

[0231] It should be noted that the mean residual corresponding to the quantization feature of a channel includes the mean residual of the probability distributions corresponding to the multiple quantization feature points included in that channel. Similarly, the standard deviation residual corresponding to the basic feature of a channel includes the standard deviation residual of the probability distributions corresponding to the multiple basic feature points included in that channel. For ease of description, the standard deviation of the probability distribution corresponding to a feature point will be referred to as the standard deviation of the feature point, the mean of the probability distribution corresponding to a feature point will be referred to as the mean of the feature point, the standard deviation residual of the probability distribution corresponding to a feature point will be referred to as the standard deviation residual of the feature point, and the mean residual of the probability distribution corresponding to a feature point will be referred to as the mean residual of the feature point.

[0232] Based on the probability distribution of multiple channels, the reconstruction residual information is used to decode the basic layer features of the target image from the bitstream through an entropy model. There are several ways to achieve this, and two of them will be introduced below.

[0233] The first implementation uses an entropy model that includes a second model and a third model. In this case, for the first channel among multiple channels, the mean residual corresponding to the quantization feature of the first channel is determined as the mean of the quantization feature corresponding to the first channel, and the standard deviation residual corresponding to the basic feature of the first channel is determined as the standard deviation of the basic feature corresponding to the first channel. For each basic feature point corresponding to a quantization feature point in the first channel, the mean of the quantization feature point is divided by the second quantization step size and then rounded to the nearest integer to determine the mean of the basic feature point. Based on the variance of the mean of the basic feature point, the feature value of the basic feature point is obtained from the bitstream.

[0234] Based on the second quantization step size, the reconstructed basic features of at least one channel preceding the first channel are dequantized to obtain the dequantized features of at least one channel. The first channel is any channel other than the first channel among multiple channels. The dequantized features of at least one channel and the mean corresponding to the quantized features of the at least one channel are input into the second model to obtain the predicted mean corresponding to the quantized features of the first channel and the predicted standard deviation corresponding to the basic features of the first channel. The predicted mean, the mean residual, the predicted standard deviation, and the standard deviation residual of the basic features of the first channel are input into the third model to obtain the mean and standard deviation of the quantized features of the first channel. For each basic feature point corresponding to a quantized feature point in the first channel, the mean of the quantized feature point is divided by the second quantization step size and rounded to determine the mean of the basic feature point. Based on the variance of the mean of the basic feature point, the feature value of the basic feature point is obtained from the bitstream through entropy decoding.

[0235] The detailed implementation of dequantizing the basic features of at least one channel before the first channel based on the second quantization step size to obtain the dequantized features of at least one channel is similar to the implementation of dequantizing the basic features of multiple channels based on the second quantization step size to obtain the dequantized features of multiple channels in the encoding end. For details, please refer to the relevant description in the embodiments of this application, which will not be repeated here.

[0236] The second implementation uses an entropy model that includes a second model and a third model. Each channel in the multiple channels has multiple basic feature points, and each channel's quantization feature also includes multiple quantization feature points. There is a one-to-one correspondence between the multiple basic feature points and the multiple quantization feature points within the same channel. In this case, for the first position in the first channel, the mean residual of the quantization feature points at the first position is determined as the mean of the quantization feature points at that position, and the standard deviation residual of the basic feature points at the first position is determined as the standard deviation of the basic feature points at that position. The mean of the quantization feature points at the first position is divided by the second quantization step size and rounded to determine the mean of the basic feature points at that first position (or the sum of the mean of the quantization feature points at the first position divided by the second quantization step size and rounded to a fixed value is determined as the mean of the basic feature points at that first position). Based on the mean and variance of the basic feature points at that first position (i.e., the mean and variance of the probability distribution corresponding to the basic feature points at the first position), entropy decoding is used to obtain the feature values ​​of the basic feature points at that first position from the bitstream. Based on the second quantization step size, the feature values ​​of the basic feature points at at least one position before the first position are dequantized to obtain the feature values ​​of the dequantized feature points at at least one position. The first position is any position in multiple channels other than the first position in the first channel. The feature values ​​of the dequantized feature points at at least one position and the mean of the quantized feature points at at least one position are input into the second model to obtain the predicted mean of the quantized feature points at the first position and the predicted standard deviation of the basic feature points at the first position. The predicted mean of the quantized feature points at the first position, the mean residual of the quantized feature points at the first position, the predicted standard deviation of the basic feature points at the first position, and the standard deviation residual of the basic feature points at the first position are input into the third model to obtain the mean of the quantized feature points at the first position and the standard deviation of the basic feature points at the first position. The mean of the quantized feature points at the first position is determined by dividing the mean of the quantized feature points at the first position by the second quantization step size and then rounding it off. Alternatively, the mean of the quantized feature points at the first position is determined by dividing the mean of the quantized feature points at the first position by the second quantization step size and then rounding it off, and then summing the sum with a fixed value. Based on the mean and variance of the basic feature points at the first position (i.e., the mean and variance of the probability distribution corresponding to the basic feature points at the first position), the feature values ​​of the basic feature points at the first position are obtained from the bitstream.

[0237] The detailed implementation of dequantizing the feature values ​​of at least one basic feature point before the first position based on the second quantization step size to obtain the feature values ​​of the dequantized feature point at at least one position is similar to the implementation of dequantizing the basic features of multiple channels based on the second quantization step size to obtain the dequantized features of multiple channels in the encoding end. For details, please refer to the relevant description in the embodiments of this application, which will not be repeated here.

[0238] It should be noted that if the encoder, before determining the basic layer features based on the second quantization step size and quantization layer features, corrects the feature value of the first quantization feature point based on the mean of the probability distribution corresponding to the first quantization feature point so that the mean of the probability distribution corresponding to the first quantization feature point after correction is a fixed value, then the decoder executes the steps of dividing the mean of the quantization feature point at the first position by the second quantization step size and rounding it off, and summing the result with the fixed value to determine the mean of the basic feature point at the first position, and dividing the mean of the quantization feature point at the first position by the second quantization step size and rounding it off, and summing the result with the fixed value to determine the mean of the basic feature point at the first position.

[0239] It should be noted that if, before determining the basic layer features based on the second quantization step size and quantization layer features, the encoder corrects the feature value of the first quantization feature point based on the mean of the probability distribution corresponding to the first quantization feature point so that the mean of the probability distribution corresponding to the first quantization feature point after correction is a fixed value, then the mean of the quantization feature points in the first and second implementation methods mentioned above is the mean of the quantization feature points before correction.

[0240] In some embodiments, the basic layer features of the target image reconstruction can be obtained by either of the two methods described above. Alternatively, the first basic layer features of the target image reconstruction can be obtained by the first method, and the second basic layer features of the target image reconstruction can be obtained by the second method. Based on the first and second basic layer features of the reconstruction, the basic layer features of the target image reconstruction are determined.

[0241] In one possible implementation, for any position in any channel among multiple channels, either a first feature value or a second feature value is determined as the feature value at that position in the basic layer features of the reconstructed target image. The first feature value is the feature value of the basic feature point at that position in the first basic layer features, and the second feature value is the feature value of the basic feature point at that position in the second basic layer features. In another possible implementation, the average, maximum, or minimum value of the first and second feature values ​​can also be determined as the feature value at that position in the basic layer features of the reconstructed target image. This application does not limit this implementation.

[0242] Step 802: Based on the reconstruction of basic features from multiple channels, determine the information content of the enhancement layer features of the target image using an entropy model. The information content of the enhancement layer features includes the information content of the enhancement features from multiple channels.

[0243] The decoding method provided in this application is executed by a decoding end. In some cases, the decoding end deploys an entropy model, meaning the decoding end includes an entropy model; in other cases, the entropy model may be deployed outside the decoding end, meaning the decoding end does not include an entropy model. This application does not limit this. Regardless of whether the decoding end includes an entropy model or not, the decoding end can determine the amount of information of the enhanced features of multiple channels through the entropy model.

[0244] In some embodiments, the reconstruction residual information of the probability distribution of multiple channels is obtained based on the bitstream, and the reconstruction residual information of the probability distribution of multiple channels is input into the entropy model to obtain the probability distribution of multiple channels output by the entropy model; based on the second quantization step size and the probability distribution of multiple channels, the information content of the enhanced features of multiple channels is determined.

[0245] There are several ways to input the reconstructed residual information of the probability distribution of multiple channels into the entropy model to obtain the probability distribution of multiple channels output by the entropy model. The following will introduce two of these methods.

[0246] In implementation method 1, the entropy model includes a second model and a third model. In this case, for the first channel among multiple channels, the reconstruction residual information of the probability distribution of the first channel is determined as the probability distribution of the first channel output by the entropy model. Based on the second quantization step size, the reconstruction basic features of at least one channel before the first channel are dequantized to obtain the dequantized features of at least one channel. The first channel is any channel other than the first channel among multiple channels. The dequantized features of at least one channel and the mean of at least one channel are input into the second model to obtain the predicted probability distribution of the first channel output by the second model. The predicted probability distribution of the first channel and the reconstruction residual information of the probability distribution are input into the third model to obtain the probability distribution of the first channel output by the third model.

[0247] In some embodiments, the reconstructed residual information of the probability distribution of multiple channels includes the mean residual corresponding to the quantization features of multiple channels and the standard deviation residual corresponding to the basic features of multiple channels. The probability distribution of multiple channels includes the mean corresponding to the quantization features of multiple channels and the standard deviation corresponding to the basic features of multiple channels. For the first channel among multiple channels, the mean residual corresponding to the quantization features of the first channel is determined as the mean corresponding to the quantization features of the first channel output by the entropy model; the standard deviation residual corresponding to the basic features of the first channel is determined as the standard deviation corresponding to the basic features of the first channel output by the entropy model. The inverse quantization features of at least one channel preceding the first channel and the mean of the quantization features of at least one channel are input into the second model to obtain the predicted mean corresponding to the quantization features of the first channel and the predicted standard deviation corresponding to the basic features of the first channel output by the second model. The predicted mean corresponding to the quantization features of the first channel, the mean residual corresponding to the quantization features of the first channel, the predicted standard deviation corresponding to the basic features of the first channel, and the standard deviation residual corresponding to the basic features of the first channel are input into the third model to obtain the mean corresponding to the quantization features of the first channel and the standard deviation corresponding to the basic features of the second channel output by the third model.

[0248] The detailed implementation of dequantizing the basic features of at least one channel before the first channel based on the second quantization step size to obtain the dequantized features of at least one channel is similar to the implementation of dequantizing the basic features of multiple channels based on the second quantization step size to obtain the dequantized features of multiple channels in the encoding end. For details, please refer to the relevant description in the embodiments of this application, which will not be repeated here.

[0249] Implementation Method 2: The entropy model includes a second model and a third model. Each channel in the multiple channels has multiple basic feature points, and each channel's quantization feature also includes multiple quantization feature points. There is a one-to-one correspondence between the multiple basic feature points and the multiple quantization feature points of the same channel. In this case, for the first position in the first channel, the reconstruction residual information of the probability distribution of the first position is determined as the probability distribution of the first position output by the entropy model. Based on the second quantization step size, the feature values ​​of the basic feature points of at least one position preceding the first position are dequantized to obtain the feature values ​​of the dequantized feature points of at least one position. The feature values ​​of the dequantized feature points of at least one position and the mean of at least one position are input into the second model to obtain the predicted probability distribution of the first position output by the second model. The predicted probability distribution of the first position and the reconstruction residual information of the probability distribution are input into the third model to obtain the probability distribution of the first position output by the third model. The first position is any position in the multiple channels other than the first position.

[0250] In some embodiments, the reconstructed residual information of the probability distribution of multiple channels includes the mean residual corresponding to the quantization features of multiple channels and the standard deviation residual corresponding to the basic features of multiple channels. The probability distribution of multiple channels includes the mean corresponding to the quantization features of multiple channels and the standard deviation corresponding to the basic features of multiple channels. In this case, for the first position of the first channel among multiple channels, the mean residual of the quantization feature point of the first position is determined as the mean of the quantization feature point of the first position output by the entropy model; the standard deviation residual of the basic feature point of the first position is determined as the standard deviation of the basic feature point of the first position output by the entropy model; the inverse quantization feature points of at least one position before the first position and the mean of the quantization feature points of at least one position are input into the second model to obtain the predicted mean of the quantization feature point of the first position and the predicted standard deviation of the basic feature point of the first position output by the second model; the predicted mean of the quantization feature point of the first position, the mean residual of the quantization feature point of the first position, the predicted standard deviation of the basic feature point of the first position and the standard deviation residual of the basic feature point of the first position are input into the third model to obtain the mean of the quantization feature point of the first position and the standard deviation of the basic feature point of the first position output by the third model.

[0251] The detailed implementation of dequantizing the feature values ​​of at least one basic feature point before the first position based on the second quantization step size to obtain the feature values ​​of the dequantized feature point at at least one position is similar to the implementation of dequantizing the basic features of multiple channels based on the second quantization step size to obtain the dequantized features of multiple channels in the encoding end. For details, please refer to the relevant description in the embodiments of this application, which will not be repeated here.

[0252] In some embodiments, the probability distribution of multiple channels can be obtained by either of the two methods described above. Alternatively, the first probability distribution of multiple channels can be obtained by the first method, and the second probability distribution of multiple channels can be obtained by the second method. Based on the first and second probability distributions, the probability distribution of multiple channels can be determined.

[0253] In one possible implementation, for any position on any channel among multiple channels, any one of the first probability distribution and the second probability distribution corresponding to that position is determined as the probability distribution corresponding to that position. In another possible implementation, the average, maximum, or minimum value of the first probability distribution and the second probability distribution corresponding to that position can also be used to determine the probability distribution corresponding to that position; this application does not limit this approach.

[0254] In one possible implementation, the probability distribution of multiple channels includes the mean of the quantized features of the multiple channels and the standard deviation (or variance) of the basic features of the multiple channels.

[0255] It should be noted that if, before determining the basic layer features based on the second quantization step size and quantization layer features, the encoder corrects the feature value of the first quantization feature point based on the mean of the probability distribution corresponding to the first quantization feature point, so that the mean of the probability distribution corresponding to the first quantization feature point after correction is a fixed value, then the mean of the quantization features in the first and second implementations mentioned above is the mean of the quantization features before correction. It should also be noted that the mean at at least one position is the mean of the quantization feature point at at least one position, and the mean at at least one channel is the mean of the quantization features corresponding to at least one channel. Similarly, if, before determining the basic layer features based on the second quantization step size and quantization layer features, the encoder corrects the feature value of the first quantization feature point based on the mean of the probability distribution corresponding to the first quantization feature point, then the mean of the quantization feature point at at least one position is the mean of the quantization feature point at at least one position before correction, and the mean of at least one channel is the mean of the quantization features corresponding to at least one channel before correction.

[0256] In some embodiments, determining the information content of the enhanced features of multiple channels based on the second quantization step size and the probability distribution of multiple channels includes: determining the mean of the basic features of multiple channels based on the mean of the quantization features of multiple channels and the second quantization step size; and determining the information content of the enhanced features of multiple channels based on the basic features of multiple channels, and the mean and standard deviation of the basic features of multiple channels.

[0257] It is understandable that, since the quantization features of each channel in multiple channels include multiple quantization feature points, the mean of the quantization feature of each channel includes the mean of the probability distributions corresponding to the multiple quantization feature points included in the corresponding channel; similarly, the basic features of each channel in multiple channels include multiple basic feature points, therefore, the mean and standard deviation (or variance) of the basic features of each channel include the mean and standard deviation (or variance) of the probability distributions corresponding to the multiple basic feature points included in the corresponding channel.

[0258] The mean of the probability distribution corresponding to the first quantization feature point is divided by the second quantization step size and then rounded to the nearest integer. This value is determined as the mean of the probability distribution corresponding to the basic feature point of the first quantization feature point. The first quantization feature point is any one of the multiple quantization feature points included in the first channel, and the first channel is any one of the multiple channels.

[0259] In some embodiments, information content is characterized by information entropy.

[0260] It's important to note that higher information entropy indicates a larger amount of information, fewer patterns, and greater uncertainty, making it more difficult to compress. In image compression, image features, syntactic element values ​​of the bitstream, and other elements involved all constitute information. When the information entropy of image features is high, it indicates a large amount of information and greater uncertainty, reflecting a more complex image content. Conversely, when the information entropy of image features is low, it indicates a smaller amount of information and less uncertainty, reflecting a simpler image content.

[0261] In some embodiments, the process of determining the information content of the enhanced features of multiple channels based on the basic features of multiple channels and the mean and standard deviation corresponding to the basic features of multiple channels includes: determining the probability distribution corresponding to the first basic feature point based on the mean and standard deviation corresponding to the first basic feature point; determining the probability of the feature value of the first basic feature point in the probability distribution corresponding to the first basic feature point based on the probability distribution corresponding to the first basic feature point; determining the information entropy of the first basic feature point based on the probability of the feature value of the first basic feature point in the probability distribution corresponding to the first basic feature point; and determining the information entropy of the first basic feature as the information entropy of the enhanced feature point corresponding to the first basic feature.

[0262] For a detailed explanation of how to determine the information entropy of the first basic feature point based on the probability of its eigenvalue in the probability distribution corresponding to that first basic feature point, please refer to the relevant content on the encoding side; it will not be elaborated here.

[0263] Step 803: Based on the information content of the enhancement features of multiple channels, the reconstructed enhancement layer features are parsed from the bitstream in descending order of information content. The reconstructed enhancement layer features include part or all of the reconstructed enhancement features of multiple channels.

[0264] In some embodiments, the enhancement features of each channel in the multiple channels include multiple enhancement feature points, and the information content of the enhancement features of each channel in the multiple channels includes the information content of the multiple enhancement feature points of each channel. In this case, the decoding end determines the information content of each channel in the multiple channels based on the information content of the multiple enhancement feature points of each channel in the multiple channels. The reconstructed enhancement layer features are parsed from the bitstream in descending order of the information content of each channel in the multiple channels.

[0265] The encoding order of each channel in the enhancement layer feature is determined according to the order of information content of each channel in the multiple channels from largest to smallest. Based on this encoding order, the correspondence between the multiple channels included in the enhancement layer feature and the multiple channels included in the basic layer feature is determined. Based on the correspondence between the multiple channels included in the enhancement layer feature and the multiple channels included in the basic layer feature, the reconstructed enhancement layer feature is obtained from the bitstream.

[0266] Because the encoding end encodes the basic layer features by sequentially assembling the basic features of multiple channels into the bitstream according to a prescribed order, while the encoding end encodes the enhancement layer features by assembling them into the bitstream in descending order of information content from multiple channels, and the probability distribution used for entropy encoding of enhancement feature points is the same as the probability distribution of the corresponding basic feature points, during decoding, it is necessary to determine the information content of each channel in the multiple channels, re-establish the correspondence between the multiple channels included in the enhancement layer features and the multiple channels included in the basic layer features, and then parse the reconstructed enhancement layer features from the bitstream according to the probability distribution of the basic layer features.

[0267] In some embodiments, the amount of information is characterized by information entropy. For each of the multiple channels, the average, mode, or median of the information entropy of the multiple enhanced feature points of that channel can be determined as the information entropy of that channel. Alternatively, the minimum or maximum value of the information entropy of the multiple enhanced feature points of that channel can be determined as the information entropy of that channel. This application does not limit this.

[0268] In one possible implementation, reconstructing enhancement layer features is obtained by parsing from the bitstream, including: parsing part or all of the multiple enhancement feature points of the first channel from the bitstream in descending order of information content of the multiple enhancement feature points of the first channel, wherein the first channel is any one of the multiple channels contained in the bitstream.

[0269] Based on the information content of multiple enhanced feature points in the first channel from largest to smallest, the encoding order of each feature point in each channel of the enhancement layer feature is determined. Based on this encoding order, the correspondence between multiple basic feature points in the first channel and multiple enhanced feature points in the first channel is determined. The reconstructed enhancement layer feature is obtained by parsing the code stream.

[0270] Because the encoder encodes the multiple basic feature points included in each channel in a predetermined order (such as positional order) into the bitstream, while the encoder encodes the multiple enhanced feature points in each channel in descending order of information content, and the probability distribution used for entropy encoding of enhanced feature points is the same as the probability distribution of the corresponding basic feature points, during decoding, for any one of the multiple channels, it is necessary to determine the information content of the multiple enhanced feature points of that channel, re-establish the correspondence between the multiple enhanced feature points of that channel and the multiple basic feature points included in that channel, and then parse the multiple enhanced feature points of that channel from the bitstream according to the probability distribution corresponding to the distribution of the multiple basic feature points of that channel.

[0271] For each of the multiple channels, in addition to parsing the multiple enhanced feature points from the bitstream according to the order of their information content, the multiple enhanced feature points can also be parsed directly from the bitstream according to their position. The specific order of sampling and decoding depends on the encoding order used by the encoding end.

[0272] In some embodiments, for any basic feature point corresponding to any enhanced feature point in any channel among multiple channels, the feature value of the enhanced feature point corresponding to the basic feature point is parsed from the bitstream by entropy decoding based on the mean and standard deviation of the basic feature point.

[0273] It should be noted that the above-mentioned parsing of the bitstream according to the information content of multiple enhancement feature points of the first channel from largest to smallest is for the purpose of analyzing the multiple enhancement feature points of the first channel of the enhancement layer.

[0274] Step 804: Reconstruct the target image based on the reconstructed enhancement layer features and the reconstructed basic layer features.

[0275] In some embodiments, the reconstruction enhancement features of each channel in the multiple channels include multiple enhancement feature points, the reconstruction basic features of each channel in the multiple channels include multiple basic feature points, the multiple basic feature points and multiple enhancement feature points of the same channel correspond one-to-one, the reconstruction enhancement layer features include a portion of the reconstruction enhancement features of the multiple channels, the portion of the reconstruction enhancement features of the multiple channels means that at least one channel in the multiple channels includes a target enhancement feature point, and the target enhancement feature point is an enhancement feature point without feature values.

[0276] In one possible implementation, the target image is reconstructed based on the reconstructed enhancement layer features and the reconstructed base layer features, including: determining a portion of the reconstructed quantization layer features based on a portion of the reconstructed enhancement features from multiple channels, the reconstructed base layer features, and a second quantization step size, wherein the quantization layer features include quantization features from multiple channels; dequantizing the feature values ​​of the base feature points corresponding to the target enhancement feature points in multiple channels based on the probability distribution of the second quantization step size and the base layer features, to obtain another portion of the reconstructed quantization layer features; and reconstructing the target image based on a first quantization step size, a portion of the reconstructed quantization layer features, and the other portion of the reconstructed quantization layer features, wherein the first quantization step size is determined based on the target bit rate.

[0277] For a detailed implementation of determining a portion of the reconstructed quantization layer features based on multiple channels' reconstruction enhancement features, the basic layer features of the reconstruction, and the second quantization step size, please refer to relevant technologies; this application's embodiments will not elaborate on this.

[0278] In some embodiments, the second quantization step size can be either odd or even. Under different circumstances, the implementation methods of dequantizing the feature values ​​of the basic feature points corresponding to the target enhancement feature points in multiple channels to obtain another part of the reconstructed quantization layer features are different, and will be introduced separately below.

[0279] When the second quantization step size is odd, for the first basic feature point corresponding to the first enhanced feature point, if the eigenvalue of the first basic feature point is greater than the first value, the eigenvalue of the first basic feature point is multiplied by the second quantization step size and then subtracted from the second value to obtain the eigenvalue of the quantized feature point corresponding to the first enhanced feature point; if the eigenvalue of the first basic feature point is less than the first value, the eigenvalue of the first basic feature point is multiplied by the second quantization step size and then added to the second value to obtain the eigenvalue of the quantized feature point corresponding to the first enhanced feature point; if the eigenvalue of the first basic feature point is equal to the first value, the first value is determined to be the eigenvalue of the quantized feature point corresponding to the first enhanced feature point; wherein, the first enhanced feature point is any one of the target enhanced feature points included in the second channel, the second channel is any one of at least one channel, the first value is the mean of the probability distribution corresponding to the first basic feature point, and the second value is obtained by subtracting one from the second quantization step size and then dividing by 2.

[0280] In some embodiments, if the encoder does not correct the feature value of the first quantized feature point based on the mean of the probability distribution corresponding to the first quantized feature point before determining the basic layer features based on the second quantization step size and quantization layer features, so that the mean of the probability distribution corresponding to the first quantized feature point after correction is a fixed value, then the decoder can determine the mean of the probability distribution corresponding to the first basic feature point by dividing the mean of the quantized feature points corresponding to the first basic feature point by the second quantization step size and then rounding the result. If the encoder corrects the feature value of the first quantized feature point based on the mean of the probability distribution corresponding to the first quantized feature point before determining the basic layer features based on the second quantization step size and quantization layer features, so that the mean of the probability distribution corresponding to the first quantized feature point after correction is a fixed value, then the decoder can subtract the fixed value from the mean of the quantized feature points corresponding to the first basic feature point, divide the subtracted value by the second quantization step size, and then round the result to obtain the mean of the probability distribution corresponding to the first basic feature point. The mean of the quantized feature points corresponding to the first basic feature point is the mean of the quantized feature points before correction.

[0281] When the second quantization step size is even, the feature value of the basic feature point corresponding to the first enhanced feature point is multiplied by the second quantization step size to obtain the feature value of the quantized feature point corresponding to the first enhanced feature point. The first enhanced feature point is any one of the target enhanced feature points included in the second channel, and the second channel is any one of at least one channel.

[0282] In some embodiments, the reconstructed enhancement layer features include all the reconstructed enhancement features of multiple channels. In this case, the reconstructed quantization layer features can be determined based on all the reconstructed enhancement features of multiple channels, the basic reconstructed layer features, and the second quantization step size, in accordance with relevant technologies.

[0283] In some embodiments, the reconstructed quantization layer features include the reconstructed quantization features of multiple channels. In this case, based on a first quantization step size, a portion of the reconstructed quantization layer features, and another portion of the reconstructed quantization layer features (i.e., all of the reconstructed quantization layer features), reconstructing the target image includes: dequantizing the reconstructed quantization features of each channel according to the first quantization step size and a relevant algorithm to obtain the image features of the reconstructed target image; and determining the reconstructed target image based on the image features of the reconstructed target image.

[0284] It should be noted that if, before determining the basic layer features based on the second quantization step size and quantization layer features, the encoder corrects the feature value of the first quantization feature point based on the mean of the probability distribution corresponding to the first quantization feature point so that the mean of the probability distribution corresponding to the first quantization feature point after correction is a fixed value, then before determining the reconstructed target image based on the image features of the reconstructed target image, the decoder also needs to restore the image features of the reconstructed target image. That is, for any image feature point in the image features of the target image, the feature value of the image feature point is added to the mean of the probability distribution corresponding to the quantization feature point of the image feature point after subtracting the fixed value from the feature value of the image feature point, in order to obtain the feature value of the restored image feature point.

[0285] It should be noted that, when the fixed value can be 0, the feature value of the image feature point can be directly added to the mean of the probability distribution of the corresponding quantized feature point to obtain the feature value of the restored image feature point.

[0286] The decoding method provided in this application embodiment will be described again next with reference to Figure 9. Please refer to Figure 9, which is a flowchart of another decoding method provided in this application embodiment. The reconstruction residual information of the probability distribution of multiple channels is obtained by decoding from the bitstream; based on the reconstruction residual information of the probability distribution of multiple channels, the basic layer features of the reconstructed target image are obtained by decoding from the bitstream through an entropy model. The reconstruction residual information of the probability distribution of multiple channels obtained from the bitstream is input into the entropy model to obtain the probability distribution of multiple channels output by the entropy model; based on the second quantization step size and the probability distribution of multiple channels, the information content of the enhancement features of multiple channels is determined. Based on the information content of the enhancement features of multiple channels, the reconstructed enhancement layer features are parsed from the bitstream in descending order of information content; based on the reconstructed enhancement layer features and the reconstructed basic layer features, the target image is reconstructed through a decoding network.

[0287] Since whether the decoding end can obtain all the enhancement layer features depends on the actual bandwidth, the decoding end in this application does not rely on the enhancement layer features when determining the information content of the enhancement features of multiple channels. Instead, it determines the information content of the enhancement features of multiple channels based on the basic features of multiple channels, thereby ensuring that the decoding end can obtain the information content of the enhancement features of multiple channels, and finally parses the reconstructed enhancement layer features from the bitstream based on the information content of the enhancement features of multiple channels.

[0288] Figure 10 is a flowchart of another decoding method provided in an embodiment of this application, which is applied to the decoding end. Referring to Figure 10, the method includes the following steps.

[0289] Step 1001: Obtain the basic layer features for reconstructing the target image based on the bitstream. For detailed implementation process, please refer to the corresponding content in the above-described decoding end embodiment; it will not be repeated here.

[0290] Step 1002: Based on the second quantization step size and the probability distribution corresponding to the basic layer features, the reconstructed basic layer features are dequantized to obtain the reconstructed quantized layer features.

[0291] In some embodiments, the second quantization step size can be either odd or even. Under different circumstances, the reconstructed basic layer features are dequantized based on the second quantization step size and the probability distribution corresponding to the basic layer features, resulting in different implementation methods for obtaining the reconstructed quantized layer features. These will be described separately below.

[0292] When the second quantization step size is odd, if the eigenvalue of the first basic feature point is greater than the first value, the eigenvalue of the first basic feature point is multiplied by the second quantization step size and then subtracted from the second value to obtain the eigenvalue of the quantized feature point corresponding to the first basic feature point; if the eigenvalue of the first basic feature point is less than the first value, the eigenvalue of the first basic feature point is multiplied by the second quantization step size and then added to the second value to obtain the eigenvalue of the quantized feature point corresponding to the first basic feature point; if the eigenvalue of the first basic feature point is equal to the first value, the first value is determined to be the eigenvalue of the quantized feature point corresponding to the first basic feature point; wherein, the first basic feature point is any one of the multiple basic feature points included in the second channel, the second channel is any one of at least one channel, the first value is the mean of the probability distribution corresponding to the first basic feature point, and the second value is obtained by subtracting one from the second quantization step size and then dividing by 2.

[0293] In some embodiments, if the encoder does not correct the feature value of the first quantized feature point based on the mean of the probability distribution corresponding to the first quantized feature point before determining the basic layer features based on the second quantization step size and quantization layer features, so that the mean of the probability distribution corresponding to the first quantized feature point after correction is a fixed value, then the decoder can determine the mean of the probability distribution corresponding to the first basic feature point by dividing the mean of the quantized feature points corresponding to the first basic feature point by the second quantization step size and then rounding the result. If the encoder corrects the feature value of the first quantized feature point based on the mean of the probability distribution corresponding to the first quantized feature point before determining the basic layer features based on the second quantization step size and quantization layer features, so that the mean of the probability distribution corresponding to the first quantized feature point after correction is a fixed value, then the decoder can subtract the fixed value from the mean of the quantized feature points corresponding to the first basic feature point, divide the subtracted value by the second quantization step size, and then round the result to obtain the mean of the probability distribution corresponding to the first basic feature point. The mean of the quantized feature points corresponding to the first basic feature point is the mean of the quantized feature points before correction.

[0294] When the second quantization step size is even, the eigenvalue of the first basic feature point is multiplied by the second quantization step size to obtain the eigenvalue of the quantized feature point corresponding to the first basic feature point. The first basic feature point is any one of the multiple basic feature points included in the second channel, and the second channel is any one of at least one channel.

[0295] Step 1003: Reconstruct the target image based on the first quantization step size and the reconstructed quantization layer features.

[0296] In some embodiments, the reconstructed quantization layer features include reconstructed quantization features of multiple channels. In this case, the reconstructed quantization features of each channel are dequantized according to a first quantization step size and a relevant algorithm to obtain the image features of the reconstructed target image. Based on the image features of the reconstructed target image, the reconstructed target image is determined according to a relevant algorithm.

[0297] It should be noted that if, before determining the basic layer features based on the second quantization step size and quantization layer features, the encoder corrects the feature value of the first quantization feature point based on the mean of the probability distribution corresponding to the first quantization feature point so that the mean of the probability distribution corresponding to the first quantization feature point after correction is a fixed value, then before determining the reconstructed target image based on the image features of the reconstructed target image, the decoder also needs to restore the image features of the reconstructed target image. That is, for any image feature point in the image features of the target image, the feature value of the image feature point is added to the mean of the probability distribution corresponding to the quantization feature point of the image feature point after subtracting the fixed value from the feature value of the image feature point, in order to obtain the feature value of the restored image feature point.

[0298] It should be noted that, when the fixed value can be 0, the feature value of the image feature point can be directly added to the mean of the probability distribution of the corresponding quantized feature point to obtain the feature value of the restored image feature point.

[0299] In the absence of enhancement layer features received at the decoding end, this embodiment of the application can dequantize the reconstructed basic layer features by combining the probability distribution corresponding to the basic layer features. Considering the probability distribution of the basic layer features during dequantization can enable the prediction / derivation of enhancement layer features, so that the dequantization result includes both basic layer features and enhancement layer features. The prior art directly multiplies the second quantization step size with the basic layer features, missing the enhancement layer features. Compared with the prior art, this embodiment of the application can predict the unreceived enhancement layer features by combining the probability distribution corresponding to the basic layer features during dequantization, making the reconstructed image obtained by decoding more accurate.

[0300] Figure 11 is a schematic diagram of an encoding device provided in an embodiment of this application. The encoding device can be implemented by software, hardware, or a combination of both as part or all of the above-mentioned encoding end. Referring to Figure 11, the device includes: a first determining module 1101, a second determining module 1102, a first encoding module 1103, and a second encoding module 1104.

[0301] The first determining module 1101 is used to determine the basic layer features and enhancement layer features of the target image. The enhancement layer features include enhancement features of multiple channels, and the basic layer features include basic features of multiple channels. For detailed implementation processes, please refer to the corresponding contents in the above embodiments, which will not be repeated here.

[0302] The second determining module 1102 is used to determine the information content of the enhanced features of multiple channels based on the basic features of multiple channels using an entropy model. For detailed implementation details, please refer to the corresponding content in the above embodiments; they will not be repeated here.

[0303] The first encoding module 1103 is used to encode the basic features of multiple channels into the bitstream. For detailed implementation process, please refer to the corresponding content in the above embodiments; it will not be repeated here.

[0304] The second encoding module 1104 is used to encode the enhanced features of multiple channels into the bitstream based on the information content of the enhanced features of multiple channels, in descending order of information content. For detailed implementation processes, please refer to the corresponding contents in the above embodiments, which will not be repeated here.

[0305] In one possible implementation, information content is characterized by information entropy.

[0306] In one possible implementation, the first determining module 1101 is specifically used for:

[0307] The image features of the target image are quantized according to the first quantization step size to obtain the quantization layer features. The first quantization step size is determined based on the target bit rate.

[0308] Based on the second quantization step size and quantization layer features, the basic layer features are determined such that the feature values ​​of the basic layer features have N possible values, and the average of the N possible values ​​is the target value.

[0309] Based on the second quantization step size, quantization layer features, and basic layer features, the enhancement layer features are determined.

[0310] In one possible implementation, the second quantization step size is even, the quantization layer features include quantization features of multiple channels, the quantization features of each channel in the multiple channels include multiple quantization feature points, the basic features of each channel in the multiple channels include multiple basic feature points, and the multiple quantization feature points of the same channel correspond one-to-one with the multiple basic feature points.

[0311] In one possible implementation, the first determining module 1101 is specifically used for:

[0312] If the eigenvalue of the first quantized feature point is not equal to the mean of the probability distribution corresponding to the first quantized feature point, then the eigenvalue of the basic feature point corresponding to the first quantized feature point is determined based on the eigenvalue of the first quantized feature point and the second quantization step size.

[0313] If the eigenvalue of the first quantized feature point is equal to the mean of the probability distribution corresponding to the first quantized feature point, then the mean of the probability distribution corresponding to the first quantized feature point is determined to be the eigenvalue of the basic feature point corresponding to the first quantized feature point.

[0314] Wherein, the first quantization feature point is any one of the multiple quantization feature points included in the first channel, and the first channel is any one of the multiple channels.

[0315] In one possible implementation, the first determining module 1101 is specifically used for:

[0316] If the eigenvalue of the first quantized feature point is greater than the mean of the probability distribution corresponding to the first quantized feature point, then add the eigenvalue of the first quantized feature point to the first value and divide it by the second quantization step size to obtain the first quantized value. Round the first quantized value down to obtain the eigenvalue of the basic feature point corresponding to the first quantized feature point.

[0317] If the eigenvalue of the first quantized feature point is less than the mean of the probability distribution corresponding to the first quantized feature point, then subtract the first value from the eigenvalue of the first quantized feature point and divide by the second quantization step size to obtain the second quantized value. Round the second quantized value up to obtain the eigenvalue of the basic feature point corresponding to the first quantized feature point.

[0318] In one possible implementation, the second quantization step size is 2.

[0319] In one possible implementation, the device further includes:

[0320] The correction module is used to correct the feature value of the first quantized feature point based on the mean of the probability distribution corresponding to the first quantized feature point, so that the mean of the probability distribution corresponding to the first quantized feature point after correction is a fixed value; the first quantized feature point is any one of the multiple quantized feature points included in the first channel, and the first channel is any one of the multiple channels.

[0321] In one possible implementation, the second determining module 1102 is specifically used for:

[0322] The image features of the target image are quantized according to the first quantization step size to obtain the quantized features of multiple channels. The first quantization step size is determined based on the target bit rate.

[0323] Based on the second quantization step size, the basic features of multiple channels are dequantized to obtain the dequantized features of multiple channels;

[0324] The inverse quantization features and quantization features of multiple channels are input into the entropy model to obtain the probability distribution of multiple channels output by the entropy model.

[0325] Based on the second quantization step size and the probability distribution of multiple channels, the information content of the enhanced features of multiple channels is determined.

[0326] In one possible implementation, the second determining module 1102 is specifically used for:

[0327] Based on the second quantization step size and the probability distribution corresponding to the basic features of multiple channels, the basic features of multiple channels are dequantized to obtain the dequantized features of multiple channels.

[0328] In one possible implementation, the second quantization step size is an odd number;

[0329] The second determining module 1102 is specifically used for, including:

[0330] If the eigenvalue of the first basic feature point is greater than the second value, multiply the eigenvalue of the first basic feature point by the second quantization step size and then subtract the third value to obtain the eigenvalue of the inverse quantization feature point corresponding to the first basic feature point.

[0331] If the eigenvalue of the first basic feature point is less than the second value, multiply the eigenvalue of the first basic feature point by the second quantization step size and then add it to the third value to obtain the eigenvalue of the inverse quantization feature point corresponding to the first basic feature point.

[0332] If the eigenvalue of the first basic feature point is equal to the second value, then the second value is determined to be the eigenvalue of the inverse quantized feature point corresponding to the first basic feature point.

[0333] Wherein, the first basic feature point is any one of the multiple basic feature points included in the first channel, the first channel is any one of the multiple channels, the second value is the mean of the probability distribution corresponding to the first basic feature point, and the third value is obtained by subtracting one from the second quantization step size and then dividing by 2.

[0334] In one possible implementation, the second quantization step size is an even number;

[0335] The second determining module 1102 is specifically used for:

[0336] Multiply the eigenvalue of the first basic feature point by the second quantization step size to obtain the eigenvalue of the inverse quantization feature point corresponding to the first basic feature point. The first basic feature point is any one of the multiple basic feature points included in the first channel, and the first channel is any one of the multiple channels.

[0337] In one possible implementation, the entropy model includes a first model, a second model, and a third model; the second determining module 1102 is specifically used for:

[0338] The quantization features of multiple channels are input into the first model to obtain the residual information of the probability distribution of multiple channels output by the first model.

[0339] For the first channel among multiple channels, the residual information of the probability distribution of the first channel output by the first model is determined as the probability distribution of the first channel output by the entropy model;

[0340] The inverse quantization features of at least one channel preceding the second channel and the mean of at least one channel are input into the second model to obtain the predicted probability distribution of the second channel output by the second model. The second channel is any one of the multiple channels except the first channel.

[0341] The predicted probability distribution and residual information of the second channel are input into the third model to obtain the probability distribution of the second channel output by the third model.

[0342] In one possible implementation, the entropy model includes a first model, a second model, and a third model;

[0343] The second determining module 1102 is specifically used for:

[0344] The quantization features of multiple channels are input into the first model to obtain the residual information of the probability distribution of multiple channels output by the first model.

[0345] For the first position in the first channel among multiple channels, the residual information of the probability distribution of the first position output by the first model is used as the probability distribution of the first position output by the entropy model.

[0346] The inverse quantized feature points of at least one position before the first position and the mean of at least one position are input into the second model to obtain the predicted probability distribution of the first position output by the second model. The first position is any position in multiple channels except the first position in the first channel.

[0347] The predicted probability distribution of the first position and the residual information of the probability distribution are input into the third model to obtain the probability distribution of the first position output by the third model.

[0348] In one possible implementation, the device further includes:

[0349] The third encoding module is used to encode the residual information of the probability distribution of multiple channels output by the first model into the bitstream.

[0350] In one possible implementation, the probability distribution of multiple channels includes the mean of the quantized features of the multiple channels and the standard deviation of the basic features of the multiple channels.

[0351] The second determining module 1102 is specifically used for:

[0352] The mean value corresponding to the basic characteristics of multiple channels is determined based on the mean value and the second quantization step size of the quantization characteristics of multiple channels.

[0353] Based on the basic features of multiple channels, and the mean and standard deviation of the basic features of multiple channels, the information content of the enhanced features of multiple channels is determined.

[0354] In this embodiment, the encoding end can encode the enhanced features of multiple channels into the bitstream in descending order of information content. This ensures that enhanced features with high information content are prioritized for encoding into the bitstream. In scalable coding, part or all of the encoded bitstream can be sent to the decoding end based on the real-time bandwidth. Features encoded earlier are more likely to be sent to the decoding end. Therefore, the method provided in this embodiment ensures that enhanced features with high information content are prioritized for sending to the decoding end, thereby effectively improving the image quality of the reconstructed image while ensuring that the transmitted bitstream is adapted to the actual bandwidth.

[0355] Furthermore, since both the encoder and decoder can obtain the basic layer features in scalable coding, while the decoder can obtain all the enhancement layer features, this means that the decoder may not receive the enhancement layer features. Therefore, in this embodiment, the information content of the enhancement features of multiple channels is determined based on the basic features of multiple channels, rather than relying on the enhancement layer features. This ensures that both the encoder and decoder can obtain the information content of the enhancement features of multiple channels based solely on the basic layer features, thereby ensuring consistency between the encoder and decoder.

[0356] It should be noted that the encoding device provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the encoding device and encoding method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0357] Figure 12 is a schematic diagram of a decoding device provided in an embodiment of this application. The decoding device can be implemented by software, hardware, or a combination of both as part or all of the above-mentioned decoding end. Referring to Figure 12, the device includes: a first parsing module 1201, a determining module 1202, a second parsing module 1203, and a reconstruction module 1204.

[0358] The first parsing module 1201 is used to obtain the basic layer features of the reconstructed target image based on the bitstream. The basic layer features of the reconstruction include the basic features of multiple channels. For detailed implementation process, please refer to the corresponding content in the above embodiments, which will not be repeated here.

[0359] The determination module 1202 is used to determine the information content of the enhancement layer features of the target image based on the reconstructed basic features of multiple channels, and to determine the information content of the enhancement layer features through an entropy model. The information content of the enhancement layer features includes the information content of the enhancement features of multiple channels. For detailed implementation process, please refer to the corresponding content in the above embodiments, which will not be repeated here.

[0360] The second parsing module 1203 is used to parse the reconstructed enhancement layer features from the bitstream based on the information content of the enhancement features of multiple channels, in descending order of information content. The reconstructed enhancement layer features include part or all of the reconstructed enhancement features of multiple channels. For detailed implementation process, please refer to the corresponding content in the above embodiments, which will not be repeated here.

[0361] The reconstruction module 1204 is used to reconstruct the target image based on the reconstructed enhancement layer features and the reconstructed basic layer features. For detailed implementation details, please refer to the corresponding contents in the above embodiments; they will not be repeated here.

[0362] In one possible implementation, information content is characterized by information entropy.

[0363] In one possible implementation, the first determining module 1202 is specifically used for:

[0364] Reconstructed residual information based on the probability distribution of multiple channels obtained from the bitstream;

[0365] The reconstructed residual information of the probability distributions of multiple channels is input into the entropy model to obtain the probability distributions of multiple channels output by the entropy model.

[0366] Based on the second quantization step size and the probability distribution of multiple channels, the information content of the enhanced features of multiple channels is determined.

[0367] In one possible implementation, the entropy model includes a second model and a third model;

[0368] The first determining module 1202 is specifically used for:

[0369] For the first channel among multiple channels, the reconstruction residual information of the probability distribution of the first channel is determined as the probability distribution of the first channel output by the entropy model;

[0370] Based on the second quantization step size, the reconstructed basic features of at least one channel before the first channel are dequantized to obtain the dequantized features of at least one channel. The first channel is any channel other than the first channel among multiple channels. The dequantized features of at least one channel and the mean of at least one channel are input into the second model to obtain the predicted probability distribution of the first channel output by the second model. The predicted probability distribution of the first channel and the reconstruction residual information of the probability distribution are input into the third model to obtain the probability distribution of the first channel output by the third model.

[0371] In one possible implementation, the basic features of each channel in the multiple channels include multiple basic feature points, and the quantization features of each channel in the multiple channels include multiple quantization feature points. The multiple basic feature points and multiple quantization feature points of the same channel correspond one-to-one.

[0372] In one possible implementation, the entropy model includes a second model and a third model;

[0373] The first determining module 1202 is specifically used for:

[0374] For the first position in the first channel among multiple channels, the reconstruction residual information of the probability distribution of the first position is determined as the probability distribution of the first position output by the entropy model;

[0375] Based on the second quantization step size, the feature values ​​of the basic feature points at least one position before the first position are dequantized to obtain the feature values ​​of the dequantized feature points at at least one position; the feature values ​​of the dequantized feature points at at least one position and the mean of at least one position are input into the second model to obtain the predicted probability distribution of the first position output by the second model; the predicted probability distribution of the first position and the reconstruction residual information of the probability distribution are input into the third model to obtain the probability distribution of the first position output by the third model, where the first position is any position in multiple channels except the first position in the first channel.

[0376] In one possible implementation, the reconstructed enhancement features of each channel in multiple channels include multiple enhancement feature points, the reconstructed basic features of each channel in multiple channels include multiple basic feature points, the multiple basic feature points and multiple enhancement feature points of the same channel correspond one-to-one, the reconstructed enhancement layer features include a portion of the reconstructed enhancement features of multiple channels, the portion of the reconstructed enhancement features of multiple channels means that at least one channel in the multiple channels includes a target enhancement feature point, and the target enhancement feature point is an enhancement feature point without feature values.

[0377] In one possible implementation, the reconstruction module 1204 is specifically used for:

[0378] Based on the reconstruction enhancement features of multiple channels, the basic layer features of reconstruction, and the second quantization step size, a portion of the quantization layer features of reconstruction is determined, which includes the quantization features of multiple channels.

[0379] Based on the second quantization step size and the probability distribution of the basic layer features, the feature values ​​of the basic feature points corresponding to the target enhancement feature points in multiple channels are dequantized to obtain another part of the reconstructed quantization layer features.

[0380] The target image is reconstructed based on a first quantization step size, a portion of the reconstructed quantization layer features, and another portion of the reconstructed quantization layer features. The first quantization step size is determined based on the target bit rate.

[0381] In one possible implementation, the second quantization step size is an odd number;

[0382] Reconstruction module 1204 is specifically used for:

[0383] For the first basic feature point corresponding to the first enhanced feature point, if the feature value of the first basic feature point is greater than the first value, the feature value of the first basic feature point is multiplied by the second quantization step size and then the second value is subtracted to obtain the feature value of the quantized feature point corresponding to the first enhanced feature point.

[0384] If the eigenvalue of the first basic feature point is less than the first value, multiply the eigenvalue of the first basic feature point by the second quantization step size and then add it to the second value to obtain the eigenvalue of the quantized feature point corresponding to the first enhanced feature point.

[0385] If the eigenvalue of the first basic feature point is equal to the first value, the first value is determined to be the eigenvalue of the quantized feature point corresponding to the first enhanced feature point.

[0386] Wherein, the first enhanced feature point is any one of the target enhanced feature points included in the second channel, the second channel is any one of at least one channel, the first value is the mean of the probability distribution corresponding to the first basic feature point, and the second value is obtained by subtracting one from the second quantization step size and then dividing by 2.

[0387] In one possible implementation, the second quantization step size is an even number;

[0388] Reconstruction module 1204 is specifically used for:

[0389] Multiply the feature value of the basic feature point corresponding to the first enhanced feature point by the second quantization step size to obtain the feature value of the quantized feature point corresponding to the first enhanced feature point. The first enhanced feature point is any one of the target enhanced feature points included in the second channel, and the second channel is any one of at least one channel.

[0390] Since whether the decoding end can obtain all the enhancement layer features depends on the actual bandwidth, the decoding power of this application does not depend on the enhancement layer features when determining the information content of the enhancement features of multiple channels. Instead, it determines the information content of the enhancement features of multiple channels based on the basic features of multiple channels, thereby ensuring that the decoding end can obtain the information content of the enhancement features of multiple channels, and finally parses the reconstructed enhancement layer features from the bitstream based on the information content of the enhancement features of multiple channels.

[0391] It should be noted that the decoding device provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the decoding device and decoding method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0392] Figure 13 is a schematic diagram of a decoding device provided in an embodiment of this application. The decoding device can be implemented by software, hardware, or a combination of both as part or all of the decoding end. Referring to Figure 13, the device includes: a parsing module 1301, an inverse quantization module 1302, and a reconstruction module 1303.

[0393] The parsing module 1301 is used to obtain the basic layer features for reconstructing the target image based on the bitstream. For detailed implementation details, please refer to the corresponding content in the above embodiments; they will not be repeated here.

[0394] The inverse quantization module 1302 is used to inverse quantize the reconstructed basic layer features based on the second quantization step size and the probability distribution corresponding to the basic layer features, to obtain the reconstructed quantized layer features. For detailed implementation process, please refer to the corresponding content in the above embodiments, which will not be repeated here.

[0395] The reconstruction module 1303 is used to reconstruct the target image based on the first quantization step size and the reconstructed quantization layer features. For detailed implementation details, please refer to the corresponding contents in the above embodiments; they will not be repeated here.

[0396] In the absence of enhancement layer features received at the decoding end, this embodiment of the application can dequantize the reconstructed basic layer features by combining the probability distribution corresponding to the basic layer features. Considering the probability distribution of the basic layer features during dequantization can enable the prediction / derivation of enhancement layer features, so that the dequantization result includes both basic layer features and enhancement layer features. The prior art directly multiplies the second quantization step size with the basic layer features, missing the enhancement layer features. Compared with the prior art, this embodiment of the application can predict the unreceived enhancement layer features by combining the probability distribution corresponding to the basic layer features during dequantization, making the reconstructed image obtained by decoding more accurate.

[0397] It should be noted that the decoding device provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the decoding device and decoding method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0398] This application embodiment also provides an encoding device, the encoding device including: a processor, the processor being coupled to a memory, the memory being used to store programs or instructions, and when the program or instructions are executed by the processor, the encoding device performs the above-described encoding method.

[0399] This application embodiment also provides a decoding device, the decoding device including: a processor, the processor being coupled to a memory, the memory being used to store programs or instructions, and when the program or instructions are executed by the processor, the decoding device performs the above-described decoding method.

[0400] This application embodiment also provides a decoding device, which can be the above-described encoding device or decoding device, or the source device 10 or destination device 20 shown in FIG2. That is, the decoding device can be used to implement the encoding method or decoding method provided in this application embodiment.

[0401] Please refer to Figure 14, which is a schematic diagram of a decoding device 1400 provided in an embodiment of this application. The decoding device 1400 includes an input port 1410 and a receiver unit (Rx) 1420 for receiving data; a processor, logic unit, or central processing unit (CPU) 1430 for processing data; a transmitter unit (Tx) 1440 and an output port 1450 for transmitting data; and a memory 1460 for storing data. The decoding device 1400 may also include optical-to-electrical (OE) components and electro-optical (EO) components coupled to the input port 1410, receiver unit 1420, transmitter unit 1440, and output port 1450 for the input or output of optical or electrical signals.

[0402] Processor 1430 is implemented in both hardware and software. Processor 1430 can be implemented as one or more CPU chips, cores (e.g., as a multi-core processor), field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), and digital signal processors (DSPs). Processor 1430 communicates with input port 1410, receiver unit 1420, transmitter unit 1440, output port 1450, and memory 1460. Processor 1430 includes a decoding module 1470. Decoding module 1470 implements the embodiments disclosed above. For example, decoding module 1470 performs, processes, prepares, or provides various encoding and decoding functions. Therefore, including decoding module 1470 provides a substantial improvement to the functionality of decoding device 1400 and enables transitions of decoding device 1400 to different states. Alternatively, decoding module 1470 can be implemented with instructions stored in memory 1460 and executed by processor 1430.

[0403] The decoding device 1400 may also include an input and / or output (I / O) device 1480 for sending data to and from the user. The I / O device 1480 may include output devices such as a monitor displaying images, a speaker outputting audio data, etc. The I / O device 1480 may also include input devices such as a keyboard, mouse, trackball, etc., and / or corresponding interfaces for interacting with the aforementioned output devices.

[0404] Memory 1460 includes one or more disk drives, tape drives, and solid-state drives, and can be used as an overflow data storage device to store programs when an executor is selected, as well as instructions and data read during program execution. Memory 1460 can be volatile and / or non-volatile, and can be read-only memory (ROM), random access memory (RAM), ternary content-addressable memory (TCAM), and / or static random-access memory (SRAM).

[0405] This application also provides an encoding / decoding system, which includes the encoding device and / or the decoding device.

[0406] This application also provides a computer-readable storage medium storing a computer program that, when run on a computer or processor, causes the computer or processor to execute the above-described encoding method or the above-described decoding method.

[0407] This application also provides a computer program product comprising computer instructions that, when executed by a computer or processor, cause the steps of the above-described encoding method or the steps of the above-described decoding method to be executed.

[0408] This application also provides a computer-readable storage medium storing a bitstream obtained according to the above-described encoding method.

[0409] This application also provides a device for storing a bitstream, including at least one storage medium and a communication interface; the communication interface is used to receive or send the bitstream; the at least one storage medium is used to store the bitstream; the bitstream is encoded by an encoder according to the above-described encoding method.

[0410] This application also provides a method for storing a bitstream, comprising: receiving a bitstream through a communication interface; storing the bitstream in one or more storage media, wherein the bitstream is encoded by an encoder according to the above-described encoding method.

[0411] This application also provides a system for distributing bitstreams, including at least one storage medium and a video streaming device; the at least one storage medium is used to store the bitstream, which is encoded by an encoder according to the above-described encoding method; the video streaming device is used to send the bitstream in the at least one storage medium to the decoder in response to a request from the decoder.

[0412] This application embodiment also provides a method for distributing a bitstream, comprising: receiving a first request; in response to the first request, selecting a bitstream from at least one storage medium; sending the bitstream to a destination device; wherein the at least one storage medium is used to store the bitstream, and the bitstream is encoded by an encoder according to the above-described encoding method.

[0413] This application also provides a system for processing bitstreams, including an image source device, an encoder, one or more storage media, and a destination device; the image source device is used to provide image data; the encoder is used to acquire the image data from the image source device through an interface and encode the image data to obtain one or more bitstreams, wherein the bitstreams are encoded by the encoder according to the above-described encoding method; the encoder is used to store the one or more bitstreams in one or more storage media; or the encoder is used to encapsulate the one or more bitstreams to obtain a transmission bitstream; the encoder is used to transmit the transmission bitstream to the destination device through a communication link or communication network; the destination device is used to decapsulate the transmission bitstream to obtain the one or more bitstreams; the destination device is used to decode the one or more bitstreams to obtain decoded data.

[0414] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital versatile disc (DVD)), or a semiconductor medium (e.g., solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiments of this application can be a non-volatile storage medium; in other words, it can be a non-transient storage medium.

[0415] It should be understood that "multiple" as mentioned herein refers to two or more. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. In addition, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first," "second," etc., are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and the terms "first," "second," etc., do not necessarily imply that they are different.

[0416] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the target images involved in the embodiments of this application were all obtained under full authorization.

[0417] The above descriptions are embodiments provided in this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. An encoding method, characterized in that, The method includes: determining basic layer features and enhancement layer features of a target image, wherein the enhancement layer features include enhancement features of multiple channels, and the basic layer features include basic features of the multiple channels; determining the information content of the enhancement features of the multiple channels based on the basic features of the multiple channels using an entropy model; encoding the basic features of the multiple channels into a bitstream; and encoding the enhancement features of the multiple channels into the bitstream in descending order of information content based on the information content of the enhancement features of the multiple channels.

2. The method as described in claim 1, characterized in that, The amount of information is characterized by information entropy.

3. The method as described in claim 1 or 2, characterized in that, The determination of the basic layer features and enhancement layer features of the target image includes: quantizing the image features of the target image according to a first quantization step size to obtain quantization layer features, wherein the first quantization step size is determined based on the target bit rate; determining the basic layer features based on a second quantization step size and the quantization layer features, such that the feature values ​​of the basic layer features have N possible values, and the average of the N possible values ​​is the target value; and determining the enhancement layer features based on the second quantization step size, the quantization layer features, and the basic layer features.

4. The method as described in claim 3, characterized in that, The second quantization step size is an even number, the quantization layer features include the quantization features of the multiple channels, the quantization features of each of the multiple channels include multiple quantization feature points, the basic features of each of the multiple channels include multiple basic feature points, and the multiple quantization feature points of the same channel correspond one-to-one with the multiple basic feature points.

5. The method as described in claim 4, characterized in that, The step of determining the basic layer features based on the second quantization step size and the quantization layer features includes: if the feature value of the first quantization feature point is not equal to the mean of the probability distribution corresponding to the first quantization feature point, then based on the feature value of the first quantization feature point and the second quantization step size, determining the feature value of the basic feature point corresponding to the first quantization feature point; if the feature value of the first quantization feature point is equal to the mean of the probability distribution corresponding to the first quantization feature point, then determining the mean of the probability distribution corresponding to the first quantization feature point as the feature value of the basic feature point corresponding to the first quantization feature point; wherein, the first quantization feature point is any one of the multiple quantization feature points included in the first channel, and the first channel is any one of the multiple channels.

6. The method as described in claim 5, characterized in that, The step of determining the feature value of the basic feature point corresponding to the first quantized feature point based on the feature value of the first quantized feature point and the second quantization step size includes: if the feature value of the first quantized feature point is greater than the mean of the probability distribution corresponding to the first quantized feature point, then the feature value of the first quantized feature point is added to a first value and then divided by the second quantization step size to obtain a first quantized value, and the first quantized value is rounded down to obtain the feature value of the basic feature point corresponding to the first quantized feature point; if the feature value of the first quantized feature point is less than the mean of the probability distribution corresponding to the first quantized feature point, then the feature value of the first quantized feature point is subtracted from the first value and then divided by the second quantization step size to obtain a second quantized value, and the second quantized value is rounded up to obtain the feature value of the basic feature point corresponding to the first quantized feature point.

7. The method according to any one of claims 4-6, characterized in that, The second quantization step size is 2.

8. The method according to any one of claims 3-7, characterized in that, Before determining the basic layer features based on the second quantization step size and the quantization layer features, the method further includes: correcting the feature value of the first quantization feature point based on the mean of the probability distribution corresponding to the first quantization feature point, so that the mean of the probability distribution corresponding to the first quantization feature point after correction is a fixed value; the first quantization feature point is any one of the multiple quantization feature points included in the first channel, and the first channel is any one of the multiple channels.

9. The method according to any one of claims 1-8, characterized in that, The step of determining the information content of the enhanced features of the multiple channels based on the basic features of the multiple channels using an entropy model includes: quantizing the image features of the target image according to a first quantization step size to obtain the quantized features of the multiple channels, wherein the first quantization step size is determined based on the target bit rate; dequantizing the basic features of the multiple channels based on a second quantization step size to obtain the dequantized features of the multiple channels; inputting the dequantized features and the quantized features of the multiple channels into the entropy model to obtain the probability distribution of the multiple channels output by the entropy model; and determining the information content of the enhanced features of the multiple channels based on the second quantization step size and the probability distribution of the multiple channels.

10. The method as described in claim 9, characterized in that, The step of dequantizing the basic features of the multiple channels based on the second quantization step size to obtain the dequantized features of the multiple channels includes: dequantizing the basic features of the multiple channels based on the second quantization step size and the probability distribution corresponding to the basic features of the multiple channels to obtain the dequantized features of the multiple channels.

11. The method as described in claim 10, characterized in that, The second quantization step size is an odd number; the step of dequantizing the basic features of the multiple channels based on the second quantization step size and the probability distribution corresponding to the basic features of the multiple channels to obtain the dequantized features of the multiple channels includes: if the feature value of the first basic feature point is greater than the second value, multiply the feature value of the first basic feature point by the second quantization step size and then subtract the third value to obtain the feature value of the dequantized feature point corresponding to the first basic feature point; if the feature value of the first basic feature point is less than the second value, multiply the feature value of the first basic feature point by the second quantization step size and then add the third value to obtain the feature value of the dequantized feature point corresponding to the first basic feature point; if the feature value of the first basic feature point is equal to the second value, the second value is determined to be the feature value of the dequantized feature point corresponding to the first basic feature point; wherein, the first basic feature point is any one of the multiple basic feature points included in the first channel, the first channel is any one of the multiple channels, the second value is the mean of the probability distribution corresponding to the first basic feature point, and the third value is obtained by subtracting one from the second quantization step size and then dividing by 2.

12. The method as described in claim 10, characterized in that, The second quantization step size is an even number; the step of dequantizing the basic features of the multiple channels based on the second quantization step size and the probability distribution corresponding to the basic features of the multiple channels to obtain the dequantized features of the multiple channels includes: multiplying the feature value of the first basic feature point by the second quantization step size to obtain the feature value of the dequantized feature point corresponding to the first basic feature point, wherein the first basic feature point is any one of the multiple basic feature points included in the first channel, and the first channel is any one of the multiple channels.

13. The method according to any one of claims 8-12, characterized in that, The entropy model includes a first model, a second model, and a third model. The step of inputting the inverse quantization features and quantization features of the multiple channels into the entropy model to obtain the probability distribution of the multiple channels output by the entropy model includes: inputting the quantization features of the multiple channels into the first model to obtain residual information of the probability distribution of the multiple channels output by the first model; for the first channel among the multiple channels, determining the residual information of the probability distribution of the first channel output by the first model as the probability distribution of the first channel output by the entropy model; inputting the inverse quantization features of at least one channel preceding the second channel and the mean of the at least one channel into the second model to obtain the predicted probability distribution of the second channel output by the second model, where the second channel is any channel among the multiple channels except the first channel; and inputting the predicted probability distribution of the second channel and the residual information of the probability distribution into the third model to obtain the probability distribution of the second channel output by the third model.

14. The method according to any one of claims 8-12, characterized in that, The entropy model includes a first model, a second model, and a third model. The step of inputting the inverse quantization features and quantization features of the multiple channels into the entropy model to obtain the probability distribution of the multiple channels output by the entropy model includes: inputting the quantization features of the multiple channels into the first model to obtain residual information of the probability distribution of the multiple channels output by the first model; for the first position in the first channel among the multiple channels, determining the residual information of the probability distribution of the first position output by the first model as the probability distribution of the first position output by the entropy model; inputting the inverse quantization feature points of at least one position before the first position and the mean of the at least one position into the second model to obtain the predicted probability distribution of the first position output by the second model, where the first position is any position in the multiple channels other than the first position in the first channel; and inputting the predicted probability distribution of the first position and the residual information of the probability distribution into the third model to obtain the probability distribution of the first position output by the third model.

15. The method according to any one of claims 13-14, characterized in that, The method further includes: incorporating the residual information of the probability distribution of the multiple channels output by the first model into the bitstream.

16. The method according to any one of claims 9-15, characterized in that, The probability distribution of the multiple channels includes the mean of the quantized features of the multiple channels and the standard deviation of the basic features of the multiple channels; The step of determining the information content of the enhanced features of the multiple channels based on the second quantization step size and the probability distribution of the multiple channels includes: determining the mean value corresponding to the basic features of the multiple channels based on the mean value corresponding to the quantization features of the multiple channels and the second quantization step size; Based on the basic characteristics of the multiple channels, and the mean and standard deviation of the basic characteristics of the multiple channels, the information content of the enhanced features of the multiple channels is determined.

17. A decoding method, characterized in that, The method includes: obtaining basic layer features of a reconstructed target image based on a bitstream, wherein the basic layer features include basic reconstructed features of multiple channels; determining the information content of enhancement layer features of the target image using an entropy model based on the basic reconstructed features of the multiple channels, wherein the information content of the enhancement layer features includes the information content of the enhancement features of the multiple channels; parsing the reconstructed enhancement layer features from the bitstream according to the information content of the enhancement features of the multiple channels in descending order of information content, wherein the reconstructed enhancement layer features include part or all of the reconstructed enhancement features of the multiple channels; and reconstructing the target image based on the reconstructed enhancement layer features and the reconstructed basic layer features.

18. The method as described in claim 17, characterized in that, The amount of information is characterized by information entropy.

19. The method as described in claim 17 or 18, characterized in that, The step of determining the information content of the enhancement layer features of the target image based on the reconstruction basic features of the multiple channels and using an entropy model includes: obtaining reconstruction residual information of the probability distribution of the multiple channels based on the bitstream; inputting the reconstruction residual information of the probability distribution of the multiple channels into the entropy model to obtain the probability distribution of the multiple channels output by the entropy model; and determining the information content of the enhancement features of the multiple channels based on the second quantization step size and the probability distribution of the multiple channels.

20. The method as described in claim 19, characterized in that, The entropy model includes a second model and a third model. The step of inputting the reconstructed residual information of the probability distributions of the multiple channels into the entropy model to obtain the probability distributions of the multiple channels output by the entropy model includes: for the first channel among the multiple channels, determining the reconstructed residual information of the probability distribution of the first channel as the probability distribution of the first channel output by the entropy model; based on the second quantization step size, dequantizing the reconstructed basic features of at least one channel preceding the first channel to obtain the dequantized features of the at least one channel, where the first channel is any channel among the multiple channels other than the first channel; inputting the dequantized features of the at least one channel and the mean of the at least one channel into the second model to obtain the predicted probability distribution of the first channel output by the second model; and inputting the predicted probability distribution of the first channel and the reconstructed residual information of the probability distribution into the third model to obtain the probability distribution of the first channel output by the third model.

21. The method as described in claim 19, characterized in that, The basic features of each of the multiple channels include multiple basic feature points, and the quantization features of each of the multiple channels include multiple quantization feature points. The multiple basic feature points and multiple quantization feature points of the same channel correspond one-to-one.

22. The method as described in claim 21, characterized in that, The entropy model includes a second model and a third model. The step of inputting the reconstructed residual information of the probability distributions of the multiple channels into the entropy model to obtain the probability distributions of the multiple channels output by the entropy model includes: for the first position in the first channel among the multiple channels, determining the reconstructed residual information of the probability distribution of the first position as the probability distribution of the first position output by the entropy model; based on the second quantization step size, dequantizing the feature values ​​of the basic feature points of at least one position preceding the first position to obtain the feature values ​​of the dequantized feature points of the at least one position; inputting the feature values ​​of the dequantized feature points of the at least one position and the mean of the at least one position into the second model to obtain the predicted probability distribution of the first position output by the second model; inputting the predicted probability distribution of the first position and the reconstructed residual information of the probability distribution into the third model to obtain the probability distribution of the first position output by the third model, where the first position is any position in the multiple channels other than the first position in the first channel.

23. The method according to any one of claims 17-22, characterized in that, The reconstruction enhancement features of each of the multiple channels include multiple enhancement feature points, and the reconstruction basic features of each of the multiple channels include multiple basic feature points. The multiple basic feature points and multiple enhancement feature points of the same channel correspond one-to-one. The reconstruction enhancement layer features include a portion of the reconstruction enhancement features of the multiple channels. The portion of the reconstruction enhancement features of the multiple channels means that at least one of the multiple channels includes a target enhancement feature point, which is an enhancement feature point without feature values.

24. The method as described in claim 23, characterized in that, The process of reconstructing the target image based on the reconstructed enhancement layer features and the reconstructed basic layer features includes: determining a portion of the reconstructed quantization layer features based on a portion of the reconstructed enhancement features of the multiple channels, the reconstructed basic layer features, and a second quantization step size, wherein the quantization layer features include the quantization features of the multiple channels; dequantizing the feature values ​​of the basic feature points corresponding to the target enhancement feature points in the multiple channels based on the probability distribution of the second quantization step size and the basic layer features to obtain another portion of the reconstructed quantization layer features; and reconstructing the target image based on a first quantization step size, a portion of the reconstructed quantization layer features, and the other portion of the reconstructed quantization layer features, wherein the first quantization step size is determined based on the target bitrate.

25. The method as described in claim 24, characterized in that, The second quantization step size is an odd number; the step of dequantizing the feature values ​​of the basic feature points corresponding to the target enhanced feature points in the multiple channels based on the second quantization step size and the probability distribution of the basic layer features to obtain another part of the reconstructed quantized layer features includes: for the first basic feature point corresponding to the first enhanced feature point, if the feature value of the first basic feature point is greater than a first value, multiply the feature value of the first basic feature point by the second quantization step size and then subtract the second value to obtain the feature value of the quantized feature point corresponding to the first enhanced feature point; if the feature value of the first basic feature point is less than the first value, multiply the feature value of the first basic feature point by the second quantization step size and then add it to the second value to obtain the feature value of the quantized feature point corresponding to the first enhanced feature point; if the feature value of the first basic feature point is equal to the first value, the first value is determined to be the feature value of the quantized feature point corresponding to the first enhanced feature point; wherein, the first enhanced feature point is any one of the target enhanced feature points included in the second channel, the second channel is any one of the at least one channels, the first value is the mean of the probability distribution corresponding to the first basic feature point, and the second value is obtained by subtracting one from the second quantization step size and then dividing by 2.

26. The method as described in claim 24, characterized in that, The second quantization step size is an even number; the step of dequantizing the feature values ​​of the basic feature points corresponding to the target enhanced feature points in the plurality of channels based on the second quantization step size and the probability distribution of the basic layer features to obtain another part of the reconstructed quantization layer features includes: multiplying the feature value of the basic feature point corresponding to the first enhanced feature point by the second quantization step size to obtain the feature value of the quantized feature point corresponding to the first enhanced feature point, wherein the first enhanced feature point is any one of the target enhanced feature points included in the second channel, and the second channel is any one of the at least one channel.

27. A decoding method, characterized in that, The method includes: obtaining basic layer features of the target image based on the bitstream; performing inverse quantization on the reconstructed basic layer features based on a second quantization step size and the probability distribution corresponding to the basic layer features to obtain reconstructed quantized layer features; and reconstructing the target image based on a first quantization step size and the reconstructed quantized layer features.

28. An encoding device, characterized in that, The apparatus includes: a first determining module for determining basic layer features and enhancement layer features of a target image, wherein the enhancement layer features include enhancement features of multiple channels, and the basic layer features include basic features of the multiple channels; a second determining module for determining the information content of the enhancement features of the multiple channels based on the basic features of the multiple channels using an entropy model; a first encoding module for encoding the basic features of the multiple channels into a bitstream; and a second encoding module for encoding the enhancement features of the multiple channels into the bitstream in descending order of information content based on the information content of the enhancement features of the multiple channels.

29. A decoding device, characterized in that, The apparatus includes: a first parsing module, used to obtain basic layer features of the reconstructed target image based on the bitstream, the basic layer features of the reconstructed image including basic reconstructed features of multiple channels; a determining module, used to determine the information content of the enhancement layer features of the target image based on the basic reconstructed features of the multiple channels using an entropy model, the information content of the enhancement layer features including the information content of the enhancement features of the multiple channels; a second parsing module, used to parse the reconstructed enhancement layer features from the bitstream based on the information content of the enhancement features of the multiple channels, in descending order of information content, the reconstructed enhancement layer features including part or all of the reconstructed enhancement features of the multiple channels; and a reconstruction module, used to reconstruct the target image based on the reconstructed enhancement layer features and the reconstructed basic layer features.

30. A decoding device, characterized in that, The apparatus includes: a parsing module for obtaining basic layer features of the reconstructed target image based on the bitstream; an inverse quantization module for inverse quantizing the reconstructed basic layer features based on a second quantization step size and the probability distribution corresponding to the basic layer features to obtain reconstructed quantized layer features; and a reconstruction module for reconstructing the target image based on a first quantization step size and the reconstructed quantized layer features.

31. A decoding device, characterized in that, include: A processor coupled to a memory for storing programs or instructions that, when executed by the processor, cause the decoding device to perform the method as described in any one of claims 17 to 26, or to perform the method as described in claim 27.

32. An encoding device, characterized in that, include: A processor coupled to a memory for storing programs or instructions that, when executed by the processor, cause the encoding device to perform the method as described in any one of claims 1 to 16.

33. A codec system, characterized in that, The encoding / decoding system includes the decoding device as described in claim 31, and / or the encoding device as described in claim 32.

34. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed on a computer or processor, causes the computer or processor to perform the method as claimed in any one of claims 1 to 16, or the method as claimed in any one of claims 17 to 26, or the method as claimed in claim 27.

35. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a computer or processor, cause the steps of the method as claimed in any one of claims 1 to 16 to be performed, or the steps of the method as claimed in any one of claims 17 to 26 to be performed, or the steps of the method as claimed in claim 27 to be performed.

36. A device for storing bitstreams, characterized in that, It includes at least one storage medium and a communication interface; the communication interface is used to receive or send a bitstream; the at least one storage medium is used to store the bitstream; the bitstream is an encoder. Encoded according to any one of the encoding methods in claims 1 to 16.

37. A method for storing a bitstream, characterized in that, include: Receive the bitstream through the communication interface; The bitstream is stored in one or more storage media, and the bitstream is an encoder. Encoded according to any one of the encoding methods in claims 1 to 16.

38. A system for distributing bitstreams, characterized in that, It includes at least one storage medium and a video streaming device; the at least one storage medium is used to store a bitstream, the bitstream being an encoder. The video streaming device is configured to transmit the target bitstream in the at least one storage medium to the decoder in response to a request from the decoder. The video streaming device is encoded according to any one of the encoding methods of claims 1 to 16.

39. A method for distributing a bitstream, characterized in that, include: Receive the first request; In response to the first request, a target bitstream is selected from at least one storage medium; Send the target bitstream to the destination device; The at least one storage medium is used to store a bitstream, which is an encoder. Encoded according to any one of the encoding methods in claims 1 to 16.

40. A system for processing bitstreams, characterized in that, The device includes an image source device, an encoder device, one or more storage media, and a destination device; the image source device is used to provide image data; the encoder device is used to acquire the image data from the image source device through an interface, and encode the image data to obtain one or more bitstreams, wherein the bitstreams are encoded by the encoder according to any one of the encoding methods in claims 1 to 16; the encoder device is used to store the one or more bitstreams into one or more storage media. Alternatively, the encoder device is used to encapsulate the one or more bitstreams to obtain a transmission bitstream; the encoder device is used to transmit the transmission bitstream to the destination device via a communication link or communication network. The destination device is used to decapsulate the transmitted code stream to obtain the one or more code streams; The target device is used to decode the one or more bitstreams to obtain decoded data.