An encoding method, a decoding method, a device, a medium, and a computing device

CN116708844BActive Publication Date: 2026-09-18ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310746353.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-21
Publication Date
2026-09-18
Estimated Expiration
2043-06-21

AI Technical Summary

Technical Problem

[0003]在编码(或解码)过程中,需要使用由自回归模型和熵编码(或解码)器组成的编码(或解码)单元对原始数据对应的隐空间进行编码(或解码),而由于自回归模型的计算复杂度与熵编码器的计算复杂度差异较大,因此导致编码(或解码)单元的执行效率比较低,编解码速度比较慢

Benefits of technology

[0027]The above technical solution can significantly reduce the computational complexity of the autoregressive model (the computational complexity of the lookup method is significantly lower than that of real-time computation). The computational complexity of the autoregressive model is consistent with that of the first entropy encoder (or first entropy decoder), thereby making the computational efficiency of the first encoding unit (or first decoding unit) composed of the autoregressive model and the first entropy encoder (or first entropy decoder) higher, thus improving the encoding and decoding speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116708844B_ABST
    Figure CN116708844B_ABST
Patent Text Reader

Abstract

The embodiments disclosed in the specification provide an encoding method, a decoding method, a device, a medium and a computing device. The way in which the autoregressive model predicts the hidden layer variable is adjusted. Instead of calculating the prediction probability distribution of the hidden layer variable in real time, the autoregressive model obtains the prediction probability distribution of the hidden layer variable by looking up a table. The table queried by the autoregressive model is a prediction probability distribution table constructed in advance. The prediction probability distribution table includes C n prediction probability distributions, C is the number of hidden layer variable categories, and n is the Markov order used by the autoregressive model to determine the hidden layer variable. That is, since the hidden layer variable category is limited, all possible prediction probability distributions of the hidden layer variable can be exhausted in advance to form a prediction probability distribution table. By querying the prediction probability distribution table, the autoregressive model can obtain the prediction probability distribution of the current hidden layer variable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of data compression technology in several embodiments, and in particular to an encoding method, decoding method, apparatus, medium and computing device. Background Technology

[0002] To reduce network transmission pressure, the original data (such as the original image) can be compressed (i.e. encoded) at the encoding end to obtain a bitstream, which is then transmitted to the decoding end for decoding to obtain the original data.

[0003] During the encoding (or decoding) process, an encoding (or decoding) unit consisting of an autoregressive model and an entropy encoder (or decoder) is needed to encode (or decode) the latent space corresponding to the original data. However, due to the significant difference between the computational complexity of the autoregressive model and the entropy encoder, the execution efficiency of the encoding (or decoding) unit is relatively low, resulting in a slow encoding and decoding speed. Summary of the Invention

[0004] According to a first aspect of several embodiments of this specification, an encoding method is proposed, wherein a predicted probability distribution table associated with an autoregressive model is pre-constructed, the predicted probability distribution table including C n A predicted probability distribution, where C is the number of categories of hidden layer variables, and n is the Markov order used by the autoregressive model to determine the hidden layer variables. The method includes:

[0005] The original data to be encoded is input into the self-encoding and decoding model for self-encoding, and the output is a latent space, wherein the latent space includes several hidden layer variables; and the latent space is input into the self-encoding and decoding model for self-decoding, and the output is the predicted data corresponding to the original data.

[0006] The latent space is input into the first encoding unit, and the first bitstream is output; wherein, the first encoding unit includes the autoregressive model and the first entropy encoder, and the autoregressive model obtains the predicted probability distribution of each latent layer variable by querying the predicted probability distribution table;

[0007] The original data and the predicted data are input into the second encoding unit, and a second bitstream is output; wherein, the second encoding unit includes a second entropy encoder;

[0008] The first bitstream and the second bitstream are transmitted to the decoding end.

[0009] According to a second aspect of several embodiments of this specification, a decoding method is proposed, wherein a predicted probability distribution table associated with an autoregressive model is pre-constructed, the predicted probability distribution table including C nA predicted probability distribution, where C is the number of categories of hidden layer variables, and n is the Markov order used by the autoregressive model to determine the hidden layer variables. The method includes:

[0010] Obtain the first and second bitstreams;

[0011] The first bitstream is input into the first decoding unit, and the hidden space corresponding to the original data is output; wherein, the first decoding unit includes the autoregressive model and the first entropy decoder, and the autoregressive model obtains the predicted probability distribution of each hidden layer variable by querying the predicted probability distribution table;

[0012] The latent space is input into the self-encoding and decoding model for self-decoding, and the predicted data corresponding to the original data is output.

[0013] The second bitstream and the predicted data are input into the second decoding unit, and the original data is output; wherein, the second decoding unit includes a second entropy decoder.

[0014] According to a third aspect of several embodiments of this specification, an encoding device is provided, wherein a prediction probability distribution table associated with an autoregressive model is pre-constructed, the prediction probability distribution table including C n A predicted probability distribution, where C is the number of categories of hidden layer variables, and n is the Markov order used by the autoregressive model to determine the hidden layer variables. The device includes:

[0015] The self-encoding / decoding module is used to input the original data to be encoded into the self-encoding / decoding model for self-encoding and output a latent space, wherein the latent space includes several hidden layer variables; and to input the latent space into the self-encoding / decoding model for self-decoding and output the predicted data corresponding to the original data.

[0016] The first entropy encoding module is used to input the latent space into the first encoding unit and output the first bitstream; wherein, the first encoding unit includes the autoregressive model and the first entropy encoder, and the autoregressive model obtains the predicted probability distribution of each latent layer variable by querying the predicted probability distribution table;

[0017] The second entropy encoding module is used to input the original data and the predicted data into the second encoding unit and output the second bitstream; wherein, the second encoding unit includes a second entropy encoder;

[0018] The transmission module transmits the first bitstream and the second bitstream to the decoding end.

[0019] According to a fourth aspect of several embodiments of this specification, a decoding apparatus is provided, wherein a prediction probability distribution table associated with an autoregressive model is pre-constructed, the prediction probability distribution table including Cn A predicted probability distribution, where C is the number of categories of hidden layer variables, and n is the Markov order used by the autoregressive model to determine the hidden layer variables. The device includes:

[0020] The acquisition module acquires the first and second bitstreams;

[0021] The first entropy decoding module is used to input the first bitstream into the first decoding unit and output the latent space corresponding to the original data; wherein, the first decoding unit includes the autoregressive model and the first entropy decoder, and the autoregressive model obtains the predicted probability distribution of each latent layer variable by querying the predicted probability distribution table;

[0022] The self-encoding and decoding module is used to input the latent space into the self-encoding and decoding model for self-decoding and output the predicted data corresponding to the original data.

[0023] The second entropy decoding module is used to input the second bitstream and the predicted data into the second decoding unit and output the original data; wherein, the second decoding unit includes a second entropy decoder.

[0024] According to a fifth aspect of several embodiments of this specification, a computing device is provided, including a memory and a processor; the memory is configured to store computer instructions executable on the processor, and the processor is configured to implement the method of the first or second aspect when executing the computer instructions.

[0025] According to a sixth aspect of several embodiments of this specification, a computer-readable storage medium is provided that stores a computer program, which, when executed by a processor, implements the method described in the first or second aspect.

[0026] In the technical solution provided in this disclosure, the method by which the autoregressive model predicts hidden layer variables during the encoding and decoding process is adjusted. The autoregressive model no longer calculates the predicted probability distribution of the hidden layer variables in real time; instead, it obtains the predicted probability distribution of the hidden layer variables by looking up a table. The table consulted by the autoregressive model is a pre-constructed predicted probability distribution table, which includes C... n There are 3 predicted probability distributions, where C is the number of categories of hidden layer variables, and n is the Markov order used by the autoregressive model to determine the hidden layer variables. In other words, since the number of categories of hidden layer variables is finite, all possible predicted probability distributions of the hidden layer variables can be pre-exhaustive, forming a predicted probability distribution table. The autoregressive model can obtain the predicted probability distribution of the currently targeted hidden layer variable by querying this table.

[0027] The above technical solution can significantly reduce the computational complexity of the autoregressive model (the computational complexity of the lookup method is significantly lower than that of real-time computation). The computational complexity of the autoregressive model is consistent with that of the first entropy encoder (or first entropy decoder), thereby making the computational efficiency of the first encoding unit (or first decoding unit) composed of the autoregressive model and the first entropy encoder (or first entropy decoder) higher, thus improving the encoding and decoding speed. Attached Figure Description

[0028] Figure 1 An exemplary diagram of the encoding process at the encoding end is provided.

[0029] Figure 2 An exemplary diagram of the decoding process at the decoding end is provided.

[0030] Figure 3 An exemplary flowchart of an encoding method is provided.

[0031] Figure 4 An exemplary flowchart of a decoding method is provided.

[0032] Figure 5 This is a schematic diagram of the structure of a computing device provided in this disclosure.

[0033] In the accompanying drawings, identical or corresponding reference numerals denote identical or corresponding parts. Any number of elements in the drawings is for illustrative purposes only and not for limitation, and any naming is for distinction only and has no limiting meaning. Detailed Implementation

[0034] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0035] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.

[0036] Current data (e.g., image) compression methods increasingly employ deep neural network models in their encoding and decoding processes. These deep neural network models primarily include self-encoding / decoding models and autoregressive models.

[0037] An autoencoder, also known as a self-encoder, is an unsupervised learning model. Based on backpropagation and optimization methods (such as gradient descent), it uses the input data itself as supervision to guide the neural network in learning a mapping relationship, thereby obtaining a reconstructed output. An autoencoder consists of two main parts: an autoencoder model and a self-decoder model. The autoencoder model plays two main roles at the encoding end: firstly, it encodes the original data to obtain the latent space; secondly, it decodes the latent space to obtain the predicted data corresponding to the original data. At the decoding end, the autoencoder model primarily decodes the latent space to obtain the predicted data corresponding to the original data.

[0038] The latent space mentioned above is a feature representation of compressed data. The purpose of the latent space is to learn data features and simplify their representation in order to find patterns. The latent space includes multiple hidden layer variables.

[0039] Figure 1 An exemplary diagram of the encoding process at the encoding end is provided. At the encoding end, on one hand, the latent space needs to be input into the self-encoding / decoding model for self-decoding, outputting the predicted data corresponding to the original data. Then, the original data and predicted data are input into an encoding unit (called the second encoding unit), which includes an entropy encoder (called the second entropy encoder), outputting the second bitstream. On the other hand, the latent space needs to be input into an encoding unit (called the first encoding unit), which consists of an autoregressive model and an entropy encoder (called the first entropy encoder), outputting the first bitstream. The first and second bitstreams need to be transmitted to the decoding end, where the decoding end reconstructs the original data through a series of decoding-related operations.

[0040] Figure 2 An exemplary diagram of the decoding process at the decoding end is provided. At the decoding end, on one hand, the first bitstream needs to be input into the first decoding unit (including an autoregressive model and a first entropy decoder), which outputs the latent space corresponding to the original data. Then, the latent space is input into the auto-decoding model for self-decoding, outputting the predicted data corresponding to the original data. On the other hand, the second bitstream and the predicted data need to be input into the second decoding unit (including a second entropy decoder), which outputs the reconstructed original data.

[0041] It should be noted that self-encoding and decoding models can perform operations such as data transformation, prediction, and quantization, which helps improve the data compression ratio. A common example of a self-encoding and decoding model is the deterministic autoencoder (DA). While such autoencoders can achieve high data compression ratios, they suffer from gradient vanishing due to quantization operations, and the correlation between variables in the latent space can reduce the compression ratio. To reduce the correlation between latent layer variables and maintain the compression ratio, an autoregressive model needs to be introduced during the encoding and decoding process. The autoregressive model and the first entropy encoder form the first encoding unit, which performs entropy encoding on the latent space to obtain the first bitstream; the autoregressive model and the first entropy decoder form the first decoding unit, which performs entropy decoding on the first bitstream to obtain the latent space.

[0042] However, in the first encoding unit and the first decoding unit, the computational complexity of the autoregressive model differs significantly from that of the entropy encoder. This results in relatively low computational efficiency of the first encoding unit, which in turn leads to a relatively slow encoding and decoding speed.

[0043] Taking the first encoding unit as an example, the autoregressive model processes each hidden layer variable in the latent space sequentially. For each hidden layer variable, the autoregressive model calculates its predicted probability distribution. Then, the first entropy encoder performs entropy encoding on the hidden layer variable itself and its predicted probability distribution. If the computational complexity of the autoregressive model is significantly higher than that of the first entropy encoder, it means that the execution pace of the first entropy encoder will be slowed down by the execution pace of the autoregressive model, resulting in lower overall execution efficiency and slower encoding speed for the first encoding unit.

[0044] Taking the first decoding unit as an example, the autoregressive model processes each hidden layer variable in the latent space sequentially. The first bitstream is input to the autoregressive model, which calculates the encoding of the predicted probability distribution for each hidden layer variable in the latent space. Then, the first entropy decoder performs entropy decoding on the encoding of the predicted probability distribution of the hidden layer variable to obtain the hidden layer variable. If the computational complexity of the autoregressive model is significantly higher than that of the first entropy decoder, it means that the execution pace of the first entropy decoder will be slowed down by the execution pace of the autoregressive model, resulting in lower overall execution efficiency and slower decoding speed for the first encoding unit.

[0045] To address the aforementioned issues, we consider reducing the computational complexity of the autoregressive model when determining the hidden layer variables, ensuring that the computational complexity of the autoregressive model is consistent with that of the first entropy encoder (and the first entropy decoder). This prevents the execution rhythm of the first entropy encoder (and the first entropy decoder) from being hampered by the execution rhythm of the autoregressive model, thus guaranteeing the execution efficiency of the first encoding unit and the first decoding unit and improving the encoding and decoding speed.

[0046] Specifically, this disclosure provides an encoding / decoding scheme that achieves faster encoding and decoding speeds while maintaining a high data compression rate. The method by which the autoregressive model predicts hidden layer variables during the encoding / decoding process is adjusted. Instead of calculating the predicted probability distribution of hidden layer variables in real time, the autoregressive model obtains the predicted probability distribution of hidden layer variables by looking up a table. The table consulted by the autoregressive model is a pre-constructed predicted probability distribution table, which includes C... n There are 3 predicted probability distributions, where C is the number of categories of hidden layer variables, and n is the Markov order used by the autoregressive model to determine the hidden layer variables. In other words, since the number of categories of hidden layer variables is finite, all possible predicted probability distributions of the hidden layer variables can be pre-exhaustive, forming a predicted probability distribution table. The autoregressive model can obtain the predicted probability distribution of the currently targeted hidden layer variable by querying this table.

[0047] The above technical solution can significantly reduce the computational complexity of the autoregressive model (the computational complexity of the lookup method is significantly lower than that of real-time computation). The computational complexity of the autoregressive model is consistent with that of the first entropy encoder (or first entropy decoder), thereby making the computational efficiency of the first encoding unit (or first decoding unit) composed of the autoregressive model and the first entropy encoder (or first entropy decoder) higher, thus improving the encoding and decoding speed.

[0048] The technical solutions provided in this disclosure are described in detail below with reference to the accompanying drawings.

[0049] Figure 3 An exemplary flowchart of an encoding method is provided, including the following steps:

[0050] S300: Input the original data to be encoded into the self-encoding and decoding model for self-encoding, output the latent space, and input the latent space into the self-encoding and decoding model for self-decoding, output the predicted data corresponding to the original data.

[0051] Figure 3 The method shown is applied to the encoding end. It should be noted that the latent space includes several hidden layer variables. A prediction probability distribution table associated with the autoregressive model can be pre-constructed, and this prediction probability distribution table includes C... nThere are 1 predicted probability distribution, where C is the number of categories of hidden layer variables, and n is the Markov order used by the autoregressive model to determine the hidden layer variables.

[0052] It is easy to understand that since the input of the autoregressive model is the latent space variable, and the number of categories of the discretized latent space variable is finite, it is possible to exhaust all possible prediction probability distributions for each category of the latent space variable, thus forming a prediction probability distribution table.

[0053] The autoregressive model is based on the Markov principle and determines the predicted probability distribution of the current hidden layer variable based on the first n hidden layer variables.

[0054] For the case of a first-order Markov model, a first-class prior probability parameter matrix consisting of C C-dimensional vectors can be pre-constructed, where each C-dimensional vector represents a predicted probability distribution; based on the first-class prior probability parameter matrix, a predicted probability distribution table associated with the autoregressive model is obtained.

[0055] For the second-order Markov model, two second-type prior probability parameter matrices, each containing C L-dimensional vectors, can be pre-constructed. These two matrices are then aggregated to obtain a third-type prior probability parameter matrix containing C² C-dimensional vectors, where each C-dimensional vector represents a predicted probability distribution. Based on this third-type prior probability parameter matrix, a predicted probability distribution table associated with the autoregressive model is obtained. The aggregation algorithm can employ simple summation, tensor analysis, multilayer perceptron, etc. The relationship between L and C is not limited.

[0056] S302: Input the hidden space into the first coding unit and output the first bit stream.

[0057] The first encoding unit includes the autoregressive model and the first entropy encoder. The key point here is that, regardless of whether it's during the training or application phase of the encoding / decoding model (mainly the self-encoding / decoding model and the autoregressive model), the autoregressive model obtains the predicted probability distribution of each hidden layer variable by querying the predicted probability distribution table, rather than performing real-time calculations to obtain the predicted probability distribution of each hidden variable.

[0058] Specifically, an autoregressive model can determine the position of the predicted probability distribution of the current hidden layer variable in the predicted probability distribution table based on the true values ​​of the first n hidden layer variables, and then read the corresponding predicted probability distribution from this position. Typically, the relationship between the true values ​​of the first n hidden layer variables for each current hidden layer variable and the position of the predicted probability distribution of that current hidden layer variable in the predicted probability distribution table is pre-defined.

[0059] S304: Input the original data and the predicted data into the second encoding unit and output the second code stream.

[0060] The second coding unit typically includes only the second entropy encoder. It should be noted that the first and second entropy encoders can be different entropy encoders using the same algorithm.

[0061] S306: Transmit the first bitstream and the second bitstream to the decoding end.

[0062] Furthermore, the quantization operator in the self-encoded decoding model is used to discretize the hidden layer variables in the latent space. However, this can easily lead to difficulties in model training because the derivative cannot be passed when the hidden layer variables are discrete.

[0063] To address the aforementioned issues, a new self-coding / decoding method can be developed by combining the advantages of the two existing self-coding / decoding methods (VQVAE and Relaxed VQVAE), forming a new self-coding / decoding model. This new model uses the VQVAE quantization operator, but when differentiating the quantization result, it employs the Relaxed VQVAE differentiation method (introducing a discrete distribution sampling process).

[0064] Specifically, the quantization operators in the self-encoding / decoding model include:

[0065] y = hardmax(-D(I(x))); where hardmax represents quantization calculation and D(I(x)) represents the distance between the codebook and the hidden layer variables.

[0066] The methods for finding the derivative of y include: Here, GS represents the Gumbel Softmax sampling process.

[0067] In this way, we can achieve fast codebook optimization (VQVAE's codebook optimization is relatively slow) while avoiding the problem of inaccurate prediction results caused by RelaxedVQVAE.

[0068] The loss function used in the training process of the encoding and decoding model is the same as the loss function used in the embodiment using VQVAE as the self-encoding and decoding model, but the quantization operator is the new quantization operator mentioned above.

[0069] In this way, by optimizing the self-encoding and decoding model, the accuracy of the predicted data obtained from the original data obtained by self-decoding the self-encoding and decoding model can be improved, thereby increasing the compression rate.

[0070] Figure 4 An exemplary flowchart of a decoding method is provided, including the following steps:

[0071] S400: Acquire the first bitstream and the second bitstream.

[0072] Figure 4 The method shown can be applied to the decoding end.

[0073] S402: Input the first bitstream into the first decoding unit and output the hidden space corresponding to the original data.

[0074] The first decoding unit includes the autoregressive model and the first entropy decoder. The autoregressive model obtains the predicted probability distribution of each hidden layer variable by querying the predicted probability distribution table.

[0075] S404: Input the latent space into the self-encoding and decoding model for self-decoding, and output the predicted data corresponding to the original data.

[0076] S406: Input the second bitstream and the predicted data into the second decoding unit, and output the original data.

[0077] The second decoding unit includes a second entropy decoder.

[0078] The decoding-related operations performed by the decoding end can be regarded as the inverse operations of the encoding-related operations performed by the encoding end. Therefore, the relevant explanations can be found in the previous description of encoding-related operations, and will not be repeated here.

[0079] This disclosure also provides an encoding apparatus in which a predicted probability distribution table associated with an autoregressive model is pre-constructed, the predicted probability distribution table including C n A predicted probability distribution, where C is the number of categories of hidden layer variables, and n is the Markov order used by the autoregressive model to determine the hidden layer variables. The device includes:

[0080] The self-encoding / decoding module is used to input the original data to be encoded into the self-encoding / decoding model for self-encoding and output a latent space, wherein the latent space includes several hidden layer variables; and to input the latent space into the self-encoding / decoding model for self-decoding and output the predicted data corresponding to the original data.

[0081] The first entropy encoding module is used to input the latent space into the first encoding unit and output the first bitstream; wherein, the first encoding unit includes the autoregressive model and the first entropy encoder, and the autoregressive model obtains the predicted probability distribution of each latent layer variable by querying the predicted probability distribution table;

[0082] The second entropy encoding module is used to input the original data and the predicted data into the second encoding unit and output the second bitstream; wherein, the second encoding unit includes a second entropy encoder;

[0083] The transmission module transmits the first bitstream and the second bitstream to the decoding end.

[0084] This disclosure also provides a decoding apparatus, wherein a predicted probability distribution table associated with an autoregressive model is pre-constructed, the predicted probability distribution table including C n A predicted probability distribution, where C is the number of categories of hidden layer variables, and n is the Markov order used by the autoregressive model to determine the hidden layer variables. The device includes:

[0085] The acquisition module acquires the first and second bitstreams;

[0086] The first entropy decoding module is used to input the first bitstream into the first decoding unit and output the latent space corresponding to the original data; wherein, the first decoding unit includes the autoregressive model and the first entropy decoder, and the autoregressive model obtains the predicted probability distribution of each latent layer variable by querying the predicted probability distribution table;

[0087] The self-encoding and decoding module is used to input the latent space into the self-encoding and decoding model for self-decoding and output the predicted data corresponding to the original data.

[0088] The second entropy decoding module is used to input the second bitstream and the predicted data into the second decoding unit and output the original data; wherein, the second decoding unit includes a second entropy decoder.

[0089] This disclosure also provides a computer program product that executes the methods of embodiments of this disclosure during runtime.

[0090] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods of embodiments of this disclosure.

[0091] This disclosure also provides a computing device, including a memory and a processor; the memory is used to store computer instructions that can be executed on the processor, and the processor is used to implement the methods of the embodiments of this disclosure when executing the computer instructions.

[0092] Figure 5 This is a schematic diagram of the structure of a computing device provided in this disclosure. The computing device 15 may include, but is not limited to, a processor 151, a memory 152, and a bus 153 connecting different system components (including the memory 152 and the processor 151).

[0093] The memory 152 stores computer instructions that can be executed by the processor 151, enabling the processor 151 to perform the methods of any embodiment of this disclosure. The memory 152 may include a random access memory (RAM) 1521, a cache memory 1522, and / or a read-only memory (ROM) 1523. The memory 152 may also include a program tool 1525 having a set of program modules 1524, including but not limited to: an operating system, one or more application programs, other program modules, and program data. One or more combinations of these program modules may include an implementation of a network environment.

[0094] Bus 153 may include, for example, a data bus, an address bus, and a control bus. The computing device 15 can also communicate with external devices 155 via I / O interface 154, such as a keyboard or a Bluetooth device. The computing device 150 can also communicate with one or more networks via network adapter 156, such as a local area network (LAN), a wide area network (WAN), or a public network. As shown, network adapter 156 can also communicate with other modules of the computing device 15 via bus 153.

[0095] Furthermore, although the operations of the methods disclosed herein are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0096] While the spirit and principles of this disclosure have been described with reference to several specific embodiments, it should be understood that this disclosure is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for convenience of expression. This disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

[0097] The methods described in the above embodiments can be implemented by a computer chip or physical entity, or by a product with a certain function. A typical implementing device is a computer. Specifically, the computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0098] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing this specification, the functions of each module can be implemented in one or more software and / or hardware.

[0099] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0100] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0101] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0102] The terminology used in the various embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to limit the various embodiments of this specification. The singular forms “a,” “described,” and “the” as used in the various embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0103] It should be understood that although the terms first, second, third, etc., may be used to describe various information in various embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of various embodiments of this specification, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0104] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the method embodiments are basically similar to the method embodiments and are therefore described simply; relevant parts can be referred to the descriptions of the method embodiments. The method embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. When implementing the embodiments of this specification, the functions of each module can be implemented in one or more software and / or hardware. Alternatively, some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0105] The above description is merely a preferred embodiment of the various embodiments of this specification and is not intended to limit the various embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the various embodiments of this specification should be included within the protection scope of the various embodiments of this specification.

Claims

1. An encoding method, wherein, A prediction probability distribution table associated with the autoregressive model is pre-constructed, the prediction probability distribution table including C n There are 1 predicted probability distribution, C is the number of categories of hidden layer variables, and n is the Markov order used by the autoregressive model to determine the predicted probability distribution of the hidden layer variables. The method includes: The original data to be encoded is input into the self-encoding and decoding model for self-encoding, and the output is a latent space, wherein the latent space includes several hidden layer variables; and the latent space is input into the self-encoding and decoding model for self-decoding, and the output is the predicted data corresponding to the original data. The latent space is input into the first encoding unit, and the first bitstream is output; wherein, the first encoding unit includes the autoregressive model and the first entropy encoder, and the autoregressive model obtains the predicted probability distribution of each latent layer variable by querying the predicted probability distribution table; The original data and the predicted data are input into the second encoding unit, and a second bitstream is output; wherein, the second encoding unit includes a second entropy encoder; The first bitstream and the second bitstream are transmitted to the decoding end.

2. The method as described in claim 1, wherein, The raw data is an image.

3. The method as described in claim 1, wherein when n is 1, a prediction probability distribution table associated with the autoregressive model is pre-constructed, comprising: A first-class prior probability parameter matrix consisting of C C-dimensional vectors is preconstructed, where each C-dimensional vector represents a predicted probability distribution; Based on the first type of prior probability parameter matrix, a predicted probability distribution table associated with the autoregressive model is obtained.

4. The method as described in claim 1, wherein when n is 2, a prediction probability distribution table associated with the autoregressive model is pre-constructed, comprising: Two prior probability parameter matrices of the second type, each consisting of C L-dimensional vectors, are preconstructed. Aggregating these two second-type prior probability parameter matrices yields C 2 The third type of prior probability parameter matrix of C-dimensional vectors, where each C-dimensional vector represents a predicted probability distribution; Based on the third type of prior probability parameter matrix, a predicted probability distribution table associated with the autoregressive model is obtained.

5. The method as described in claim 1, wherein, The quantization operators in the self-written decoding model include: y = hardmax(-D(I(x))); where hardmax represents quantization calculation, and D(I(x)) represents the distance between the codebook and the hidden layer variables; The methods for finding the derivative of y include: Here, GS represents the Gumbel Softmax sampling process.

6. A decoding method, wherein, A prediction probability distribution table associated with the autoregressive model is pre-constructed, the prediction probability distribution table including C n A predicted probability distribution, where C is the number of categories of hidden layer variables, and n is the Markov order used by the autoregressive model to determine the hidden layer variables. The method includes: Obtain the first and second bitstreams; The first bitstream is input into the first decoding unit, and the hidden space corresponding to the original data is output; wherein, the first decoding unit includes the autoregressive model and the first entropy decoder, and the autoregressive model obtains the predicted probability distribution of each hidden layer variable by querying the predicted probability distribution table; The latent space is input into the self-encoding and decoding model for self-decoding, and the predicted data corresponding to the original data is output. The second bitstream and the predicted data are input into the second decoding unit, and the original data is output; wherein, the second decoding unit includes a second entropy decoder.

7. An encoding device, wherein, A prediction probability distribution table associated with the autoregressive model is pre-constructed, the prediction probability distribution table including C n A predicted probability distribution, where C is the number of categories of hidden layer variables, and n is the Markov order used by the autoregressive model to determine the hidden layer variables. The device includes: The self-encoding / decoding module is used to input the original data to be encoded into the self-encoding / decoding model for self-encoding and output a latent space, wherein the latent space includes several hidden layer variables; and to input the latent space into the self-encoding / decoding model for self-decoding and output the predicted data corresponding to the original data. The first entropy encoding module is used to input the latent space into the first encoding unit and output the first bitstream; wherein, the first encoding unit includes the autoregressive model and the first entropy encoder, and the autoregressive model obtains the predicted probability distribution of each latent layer variable by querying the predicted probability distribution table; The second entropy encoding module is used to input the original data and the predicted data into the second encoding unit and output the second bitstream; wherein, the second encoding unit includes a second entropy encoder; The transmission module transmits the first bitstream and the second bitstream to the decoding end.

8. A decoding device, wherein, A prediction probability distribution table associated with the autoregressive model is pre-constructed, the prediction probability distribution table including C n A predicted probability distribution, where C is the number of categories of hidden layer variables, and n is the Markov order used by the autoregressive model to determine the hidden layer variables. The device includes: The acquisition module acquires the first and second bitstreams; The first entropy decoding module is used to input the first bitstream into the first decoding unit and output the latent space corresponding to the original data; wherein, the first decoding unit includes the autoregressive model and the first entropy decoder, and the autoregressive model obtains the predicted probability distribution of each latent layer variable by querying the predicted probability distribution table; The self-encoding and decoding module is used to input the latent space into the self-encoding and decoding model for self-decoding and output the predicted data corresponding to the original data. The second entropy decoding module is used to input the second bitstream and the predicted data into the second decoding unit and output the original data; wherein, the second decoding unit includes a second entropy decoder.

9. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method of any one of claims 1-6.

10. A computing device, comprising a memory and a processor; the memory being configured to store computer instructions executable on the processor, the processor being configured to implement the method of any one of claims 1-6 when executing the computer instructions.

Citation Information

Patent Citations

  • Video entropy code as well as entropy coding method, device and medium

    CN102238387A

  • Image coding method, image decompression method and device

    CN115022637A