WO2023202149A1 - 有限状态熵编码的状态选择方法、系统、存储介质及设备 - Google Patents
有限状态熵编码的状态选择方法、系统、存储介质及设备 Download PDFInfo
- Publication number
- WO2023202149A1 WO2023202149A1 PCT/CN2022/142929 CN2022142929W WO2023202149A1 WO 2023202149 A1 WO2023202149 A1 WO 2023202149A1 CN 2022142929 W CN2022142929 W CN 2022142929W WO 2023202149 A1 WO2023202149 A1 WO 2023202149A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- state
- symbol
- code table
- bit width
- finite state
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
- H03M7/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
- H03M7/40—Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
- H03M7/42—Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code using table look-up for the coding or decoding process, e.g. using read-only memory
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/91—Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present application relates to the field of data encoding and decoding technology, and in particular to a state selection method, system, non-volatile computer-readable storage medium and computer equipment for finite state entropy coding.
- Lossless data compression reduces the amount of data to reduce storage space and improve transmission, storage and processing efficiency without losing useful information.
- Lossless data compression is generally achieved through two methods: one is an algorithm that implements compression through a dictionary, including the LZ series algorithm, which can achieve the search function of repeated data; the other is a compression algorithm based on a statistical model.
- Such as Huffman code Huffman coding, a common variable length code
- arithmetic coding etc.
- the core idea of this type of algorithm is to allocate code length according to the frequency of symbol occurrence. The greater the symbol frequency, the shorter the code length.
- Huffman coding is simple and efficient and can generate the best codeword for a single data symbol. However, it does not always generate the most efficient codeword for a given set of symbols. Arithmetic coding can solve this pain point of Huffman coding, but the arithmetic coding algorithm is complex to implement, and the coding efficiency is very low (roughly 1/10 of Huffman coding), which cannot be used in the field of data compression. Because of this, in recent years, many scholars have been looking for a new algorithm with "compression rate close to arithmetic coding and coding efficiency close to Huffman coding".
- FSE Finite State Entropy, Finite State Entropy
- Finite State Entropy is an entropy coding scheme that combines the advantages of Huffman coding and arithmetic coding.
- a new data compression algorithm Zstandard (zstd) is also launched based on FSE. It is a hybrid compression algorithm composed of LZ77 encoding, Huffman encoding and FSE, and has better compression performance.
- FSE coding essentially uses state encoding symbols, that is, converts the encoding of symbols into the encoding of states.
- FSE encodes a symbol sequence it needs to select the state of the next symbol based on the state of the previous symbol.
- the basis for selection is: the state of the previous symbol must be within the coverage range (State_range) of the state of the next symbol. .
- a symbol has a high probability of appearing, and there will be multiple states corresponding to the symbol.
- FSE encodes the symbol it needs to select one from all its corresponding states.
- This application provides a state selection method for finite state entropy coding, which includes the following steps:
- the corresponding search bit width is obtained based on its normalized probability, and the index value corresponding to each state of each symbol is obtained based on the search bit width, and each symbol is generated based on each state and the corresponding index value.
- the selected index value of the current symbol is obtained based on the state of the previous symbol and the search bit width of the current symbol, and the selected index value is searched in the truth table of the current symbol
- the corresponding state is used as the state of the current symbol for finite state entropy coding.
- obtaining the index value corresponding to each state of each symbol based on the search bit width includes:
- the code table length of the finite state entropy code table is obtained based on the normalized probabilities of multiple symbols, and the code table bit width of the finite state entropy code table is obtained based on the code table length;
- the index value corresponding to each state is obtained based on the baseline state value of the baseline position of the state area, the search bit width, and the code table bit width.
- the step for each state of each symbol, before the step of obtaining the index value corresponding to each state based on the baseline state value of the baseline position of the state area, the search bit width, and the code table bit width, the step also includes:
- the step for each state of each symbol, before the step of obtaining the index value corresponding to each state based on the baseline state value of the baseline position of the state area, the search bit width, and the code table bit width, the step also includes:
- the length value of the state region of each symbol is determined.
- the step of determining the length of the state region of each symbol based on the normalized probabilities corresponding to multiple symbols includes:
- the length value of the state region of the corresponding symbol is set to a unique value
- the length value of the state region of the corresponding symbol is set to two values.
- obtaining the index value corresponding to each state based on the baseline state value of the baseline position of the state area, the search bit width, and the code table bit width includes:
- obtaining the selected index value of the current symbol based on the state of the previous symbol and the search bit width of the current symbol includes:
- obtaining the corresponding search bit width based on its normalized probability includes:
- a finite state entropy code table is generated based on multiple symbols and corresponding normalized probabilities, and the finite state entropy code table contains several states of each symbol including:
- the code table length of the finite state entropy code table is obtained based on the normalized probability of multiple symbols
- a finite state entropy code table is generated based on several states of each symbol.
- the step of obtaining the code table length of the finite state entropy code table based on the normalized probabilities of multiple symbols includes:
- obtaining the normalized probabilities of multiple symbols based on the symbol sequence includes:
- the normalized probability of each symbol is obtained based on its frequency of occurrence.
- the step further includes:
- the same normalized probability is identified with a different identification.
- a symbol sequence is obtained, and the normalized probabilities of multiple symbols are obtained based on the symbol sequence, and a finite state entropy code table is generated based on the multiple symbols and corresponding normalized probabilities, and the finite state entropy code
- the table contains several status steps for each symbol and also includes:
- the normalized probabilities of the plurality of symbols are respectively obtained based on the symbol sequence.
- the preset symbols include: original text segment length literal_length, repeat length match_length, and offset distance offset.
- a symbol sequence is obtained, and the normalized probabilities of multiple symbols are obtained based on the symbol sequence, and a finite state entropy code table is generated based on the multiple symbols and corresponding normalized probabilities, and the finite state entropy code
- the table contains several status steps for each symbol, including:
- the states are assigned to multiple symbols in sequence.
- the state allocation step is performed on multiple symbols in sequence, including:
- the states are allocated to multiple symbols in reverse order of states.
- Another aspect or aspects of the present application also provide a state selection system with finite state entropy coding, including:
- a finite state entropy code table generation module configured to obtain a symbol sequence, obtain the normalized probabilities of multiple symbols based on the symbol sequence, and generate a finite state entropy code table based on the multiple symbols and corresponding normalized probabilities, And the finite state entropy code table contains several states of each symbol;
- the truth table generation module is configured to obtain the corresponding search bit width based on its normalized probability for each symbol, and obtain the index value corresponding to each state of each symbol based on the search bit width, and based on each state and the corresponding index value to generate a truth table for each symbol;
- a state selection module configured to, in response to performing finite state entropy coding based on the finite state entropy code table, obtain the selected index value of the current symbol based on the state of the previous symbol and the search bit width of the current symbol, and obtain the selected index value of the current symbol based on the true value of the current symbol The state corresponding to the selected index value is searched in the table to use it as the state of the current symbol for finite state entropy coding.
- the truth table generation module includes:
- the length and bit width acquisition submodule is used to obtain the code table length of the finite state entropy code table based on the normalized probability of multiple symbols, and obtain the code table bit width of the finite state entropy code table based on the code table length;
- the index value acquisition submodule is used for each state of each symbol to obtain the index value corresponding to each state based on the baseline state value of the baseline position of the state area, the search bit width, and the code table bit width.
- a non-volatile computer-readable storage medium stores computer-readable instructions.
- the computer-readable instructions are processed by at least one processor. When executed, at least one processor is caused to execute the steps of any of the above methods.
- a computer device including
- At least one memory stores computer-readable instructions. When the computer-readable instructions are executed by at least one processor, the at least one processor executes any of the above methods.
- Figure 1 is a schematic diagram of a state selection method for finite state entropy coding provided according to an embodiment of the present application
- Figure 2 is a schematic diagram of a state selection system for finite state entropy coding provided according to an embodiment of the present application
- Figure 3 is a schematic diagram of a non-volatile computer-readable storage medium that implements a state selection method for finite state entropy coding according to an embodiment of the present application;
- FIG. 4 is a schematic diagram of the hardware structure of a computer device that performs a state selection method of finite state entropy coding according to an embodiment of the present application.
- Figure 1 shows a schematic diagram of an embodiment of the state selection method for finite state entropy coding provided by this application. As shown in Figure 1, the embodiment of this application includes the following steps:
- Step S10 Obtain the symbol sequence, obtain the normalized probabilities of multiple symbols based on the symbol sequence, and generate a finite state entropy code table based on the multiple symbols and the corresponding normalized probabilities, and the finite state entropy code table contains each several states of a symbol;
- Step S20 For each symbol, obtain the corresponding search bit width based on its normalized probability, obtain the index value corresponding to each state of each symbol based on the search bit width, and generate based on each state and the corresponding index value.
- truth table for each symbol For each symbol, obtain the corresponding search bit width based on its normalized probability, obtain the index value corresponding to each state of each symbol based on the search bit width, and generate based on each state and the corresponding index value.
- Step S30 In response to performing finite state entropy coding based on the finite state entropy code table, obtain the selected index value of the current symbol based on the state of the previous symbol and the search bit width of the current symbol, and search for the selected index value in the truth table of the current symbol. Select the state corresponding to the index value to use it as the state of the current symbol for finite state entropy coding.
- the embodiment of the present application constructs a finite state entropy code table, and for each symbol in the finite state entropy code table, obtains the corresponding search bit width based on its normalized probability, and obtains each symbol of each symbol based on the search bit width.
- the index value corresponding to the state, and a truth table of each symbol is generated based on each state and the corresponding index value to assist in finite state entropy encoding to select a state from several states for each symbol to encode; when selecting a state , the selected index value of the current symbol is obtained based on the state of the previous symbol and the search bit width of the current symbol, and the state corresponding to the selected index value is found in the truth table of the current symbol to use it as the current symbol's
- the state is used for finite state entropy encoding, thereby forming a state search method that is adapted to the clock cycle of the hardware circuit, and compared with the existing sequential search method, the efficiency of state search and selection is greatly improved.
- the solution of this application is suitable for hardware implementation and can improve the state search process when finite state entropy encodes data, thereby accelerating the overall rate of finite state entropy encoding.
- obtaining the index value corresponding to each state of each symbol based on the search bit width includes: obtaining the code table length of the finite state entropy code table based on the normalized probability of multiple symbols, and obtaining the code table length based on the code table length.
- the code table bit width of the finite state entropy code table; for each state of each symbol, the index value corresponding to each state is obtained based on the baseline state value of the baseline position of the state area, the search bit width, and the code table bit width.
- obtaining the index value corresponding to each state based on the baseline state value of the baseline position of the state area, the search bit width, and the code table bit width includes: calculating the code table bit width The difference with the search bit width of each symbol is the first number of movement bits; perform a right shift operation on the baseline state value of each state of each symbol based on the first number of movement bits to obtain the index value corresponding to each state. .
- obtaining the selected index value of the current symbol based on the status of the previous symbol and the search bit width of the current symbol includes: calculating the difference between the code table bit width and the search bit width of the current symbol, and obtaining the second shift bit number; perform a right shift operation on the value of the previous symbol's state based on the second shift digit to obtain the selected index value of the current symbol.
- obtaining the corresponding search bit width based on its normalized probability includes: constructing a logarithmic function based on the normalized probability of each symbol and the base 2, solving the logarithmic function, and obtaining each The search bit width corresponding to symbols.
- generating a finite state entropy code table based on multiple symbols and corresponding normalized probabilities, and the finite state entropy code table includes several states of each symbol includes: obtaining a finite state entropy code table based on the normalized probabilities of multiple symbols.
- obtaining the normalized probabilities of multiple symbols based on the symbol sequence includes: obtaining the occurrence frequency of the multiple symbols based on the symbol sequence; obtaining the normalized probability of each symbol based on the occurrence frequency of each symbol. Probability.
- the symbols of the Zstandard (fast real-time compression algorithm) protocol refer to the output symbols of the source data that have been searched and checked by the LZ77 algorithm.
- literals use Huffman (Huffman) coding
- FSE Finite State Entropy, finite state entropy
- three FSE code tables finite state entropy code tables
- the code table length of the FSE code table is an integer power of 2, and each state corresponds to a symbol.
- the number of states corresponding to each symbol in the FSE code table is related to the normalized probability of the symbol, so the frequency of the symbol needs to be normalized (Normalize) to generate a probability table.
- the normalization calculation formula is roughly as follows:
- the normalized probability of a symbol is related to the proportion of its frequency of occurrence to the total number.
- the normalization algorithm needs to meet the following two principles: (1) The sum of normalized probabilities must be equal to Table_size (code table length); (2) As long as a certain symbol appears, the normalized probability is at least 1.
- norm(s 2 ) Due to the requirements of normalization principle (2), the value of norm(s 2 ) needs to be set to 1.
- the normalized probability of the s2 situation is marked with "-1", and the situation of s1 is marked with "1".
- FSE code table is a tool for FSE encoding and decoding. It is the cornerstone of FSE encoding.
- the FSE code table has three characteristics: the length of the FSE code table is an integer power of 2; each state in the FSE code table corresponds to a symbol; the number of states corresponding to each symbol is equal to the normalized probability.
- each state in the FSE code table also corresponds to a state area (State-range).
- the description method of State-range is (Baseline, number-bits).
- the State of each state -range is used to describe the state value range of the next symbol [Baseline, Baseline+(1 ⁇ number-bits)].
- ⁇ represents the right shift operation. The right shift operation is to move a binary bit operand to the right according to the specified number of moving digits. The shifted bits are discarded. The empty bits shifted out on the left are either filled with 0 or the sign bit. This Depends on different machines.
- the length value of State-range must be an integer power of 2 (integer is number-bits).
- the length of the State-range of all states of the same symbol may be 1-2.
- the length of State_range has two values:
- the number of state numbers with Number-bits value 3 is 2, that is, [43, 44].
- the baseline of State(43) is 0, the baseline of State(44) is 8(0+8), the baseline of State(0) is 16(8+8), and the baseline of State(1) is 32(16+16), the baseline of State(22) is 48(32+16).
- FSE is a unified encoding of the entire symbol sequence (Sequences). It can be considered that the entire symbol sequence is finally encoded to generate a codeword.
- FSE coding implements entropy coding of symbols in the form of coding states, and builds a link relationship between adjacent symbols in the symbol sequence through the state of the FSE code table.
- the state of s3 selects state[43] corresponding to the State-range (0-7) of State[1].
- the encoding bit width of s2 is the number-bits of state[43]: 3, and the encoding value It is 1 (1-0, 0 is the baseline of State[43]).
- the state of the first symbol determines the state of the second symbol, and the encoded codeword of the first symbol is determined by the range of the second state;
- the state of the second symbol determines the state of the third symbol, and the encoded codeword of the second symbol is determined by the range of the third state;
- the state of the penultimate symbol determines the state of the last symbol, and the encoding codeword of the penultimate symbol is determined by the range of the last one;
- the state of the previous symbol determines the state of the next symbol, but the state encoding content (code length, codeword) of the previous symbol is determined by the latter symbol.
- the state of each symbol in the entire symbol sequence depends on the state of the previous symbol.
- the entire encoding process is interlocked and flows serially step by step. From a process perspective, it is difficult to implement FSE encoding of symbol sequences in parallel.
- FSE When FSE encodes a symbol sequence, it needs to select the state of the next symbol based on the state of the previous symbol.
- the basis for selection is: the previous state must be within the coverage of the next state (State_range). .
- the maximum number of searches for a specific symbol s is determined by its normalized frequency (norm[s]), but for the complete set of symbols, the maximum number of searches for each symbol will also be different.
- the other status allocation orders are: 0, 13, 10, 7, 4, 1, 14, 11, 8, 5, 2, 12, 9, 6, 3;
- the second step is the construction of the truth table used to find the state:
- the search bit width of the symbol is calculated based on the normalization result.
- the calculation formula is as follows:
- search_bits ceil(log 2 norm[s] )
- the search bit width of each symbol is as follows in Table 5:
- Symbol a The search bit width is 0; a has only one state 0.
- Symbol b The search bit width is 0; b only has one state 15.
- Symbol c The search bit width is 1; b corresponds to the two states 10 and 13; the length of the truth table is 2; the index value corresponding to the state state[10] is calculated:
- the value corresponding to the index value "0" in the truth table is 10;
- Symbol d The search bit width is 1; b corresponds to two states 4 and 7; the length of the truth table is 2;
- search bit width is 2; b corresponds to 3 states 2, 5, 12; truth table length is 4;
- search bit width is 2; b corresponds to 3 states 3, 6, 9; truth table length is 4;
- FSE encodes data uses states to encode symbols, that is, each symbol is marked with a state. Since the number of states corresponding to a symbol is not unique, when encoding a symbol, you need to choose one of all the states corresponding to the symbol. Which state to choose needs to be determined by using the previous state (the state selected by the previous symbol). .
- State prev the previous symbol selection state is State prev and the next symbol symbol next state is State next .
- State prev must be within the state area corresponding to State next :
- the conventional method requires traversing all states corresponding to the next symbol next and selecting a state that satisfies the above formula.
- the constructed truth table is used to quickly find the status.
- the usage method is as follows:
- a only corresponds to one state 0, that is, the encoding state of the first symbol is 0;
- FIG. 2 shows a schematic diagram of an embodiment of the limited state entropy coding state selection system provided by this application.
- a state selection system for finite state entropy coding includes: a finite state entropy code table generation module 10, configured to obtain a symbol sequence, and obtain the normalized probabilities of multiple symbols based on the symbol sequence, And generate a finite state entropy code table based on multiple symbols and corresponding normalized probabilities, and the finite state entropy code table contains several states of each symbol; the truth table generation module 20 is configured to, for each symbol, based on its The normalized probability is used to obtain the corresponding search bit width, and the index value corresponding to each state of each symbol is obtained based on the search bit width, and the truth table of each symbol is generated based on each state and the corresponding index value; and the state The selection module 30 is configured to, in response to performing fi
- Figure 3 shows a non-volatile state selection method for implementing finite state entropy coding provided by the embodiment of the present application.
- One or more aspects of the embodiment of the present application also provide a computer device, including a memory 402 and a processor 401 as shown in Figure 4.
- Computer readable instructions are stored in the memory 402, and the computer readable instructions are When executed, the processor 401 implements the method of any of the above embodiments.
- FIG. 4 it is a schematic diagram of the hardware structure of one or more embodiments of a computer device that performs the state selection method of finite state entropy coding provided by this application.
- the computer equipment includes a processor 401 and a memory 402, and may also include: an input device 403 and an output device 404.
- the processor 401, the memory 402, the input device 403 and the output device 404 can be connected through a bus or other means. In Figure 4, connection through a bus is taken as an example.
- the input device 403 may receive inputted numeric or character information and generate key signal inputs related to user settings and function control of the finite state entropy encoded state selection system.
- the output device 404 may include a display device such as a display screen.
- the memory 402 can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the state selection of finite state entropy coding in the embodiment of the present application.
- the memory 402 may include a storage program area and a storage data area, wherein the storage program area may store an operating system and an application program required for at least one function; the storage data area may store data created using the state selection method of finite state entropy coding. wait.
- memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device.
- memory 402 optionally includes memory located remotely relative to processor 401, and these remote memories may be connected to local modules through a network. Examples of the above-mentioned networks include but are not limited to the Internet, intranets, local area networks, mobile communication networks and combinations thereof.
- the processor 401 executes various functional applications and data processing of the server by running non-volatile software programs, instructions and modules stored in the memory 402, that is, implementing the state selection method of finite state entropy coding in the above method embodiment.
- non-volatile computer-readable storage medium may be a volatile memory or a non-volatile memory, or may include both a volatile memory and a non-volatile memory.
- non-volatile memory may include read-only memory (Read-OnlyMemory, ROM), programmable ROM (Programmable Read Only Memory, PROM), electrically programmable ROM (Electrically Erasable Programmable Read Only Memory, EPROM), electrically erasable programmable ROM (EEPROM) or flash memory.
- Volatile memory may include Random Access Memory (RAM), which may act as external cache memory.
- RAM can be obtained in various forms, such as synchronous RAM (DRAM), dynamic RAM (Dynamic Random Access Memory, DRAM), synchronous DRAM (Synchronous Dynamic Random-access Memory, SDRAM), double data rate SDRAM (Double Data Rate SDRAM, DDR SDRAM), enhanced SDRAM (Enhanced Synchronous DRAM, ESDRAM), synchronous link DRAM (Sync Link DRAM, SLDRAM), and direct Rambus RAM (Direct Rambus RAM, DRRAM).
- DRAM synchronous RAM
- DRAM dynamic RAM
- SDRAM Synchronous Dynamic Random-access Memory
- SDRAM double data rate SDRAM
- Double Data Rate SDRAM Double Data Rate SDRAM
- ESDRAM Enhanced Synchronous DRAM
- SLDRAM synchronous link DRAM
- Direct Rambus RAM Direct Rambus RAM
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
| state_order | 0 | 1 | 2 | 3 | 4 |
| State | 0 | 1 | 22 | 43 | 44 |
| Number_bit | 4 | 4 | 4 | 3 | 3 |
| Base_line | 16 | 32 | 48 | 0 | 8 |
| State_range | 16-31 | 3-247 | 48-63 | 0-7 | 8-15 |
| a | b | c | d | e | f | g |
| 9 | 5 | 16 | 17 | 32 | 24 | 24 |
| a | b | c | d | e | f | g |
| 1 | -1 | 2 | 2 | 4 | 3 | 3 |
| state | symbol | baselin | bit | range |
| 0 | a | 0 | 4 | 0-15 |
| 1 | e | 0 | 2 | 0-3 |
| 2 | f | 8 | 3 | 8-15 |
| 3 | g | 8 | 3 | 8-15 |
| 4 | d | 0 | 3 | 0-7 |
| 5 | f | 0 | 2 | 0-3 |
| 6 | g | 0 | 2 | 0-3 |
| 7 | d | 8 | 3 | 8-15 |
| 8 | e | 4 | 2 | 4-7 |
| 9 | g | 4 | 2 | 4-7 |
| 10 | c | 0 | 3 | 0-7 |
| 11 | e | 8 | 2 | 8-11 |
| 12 | f | 4 | 2 | 4-7 |
| 13 | c | 8 | 3 | 8-15 |
| 14 | e | 12 | 2 | 12-15 |
| 15 | b | 0 | 4 | 0-15 |
| 符号 | a | b | c | d | e | f | g |
| 归一化频率(norm) | 1 | -1 | 2 | 2 | 4 | 3 | 3 |
| 搜索位宽(search_bits) | 0 | 0 | 1 | 1 | 2 | 2 | 2 |
| 索引 | 0 | 1 |
| 映射状态 | 10 | 13 |
| 索引 | 0 | 1 |
| 映射状态 | 4 | 7 |
| 索引 | 0 | 1 | 2 | 3 |
| 映射状态 | 1 | 8 | 11 | 14 |
| 索引 | 0 | 1 | 2 | 3 |
| 映射状态 | 5 | 12 | 2 | 2 |
| 索引 | 0 | 1 | 2 | 3 |
| 映射状态 | 6 | 9 | 3 | 3 |
| 符号 | a | f | g | e | g | e | d | g | e | g | f | e | c | e | b |
| 状态 | 0 | 5 | 9 | 11 | 3 | 1 | 4 | 6 | 8 | 3 | 5 | 8 | 13 | 14 | 15 |
Claims (20)
- 一种有限状态熵编码的状态选择方法,其特征在于,包括以下步骤:获取符号序列,并基于所述符号序列分别得到其中多个符号的归一化概率,并基于所述多个符号及相应的归一化概率生成有限状态熵码表,且所述有限状态熵码表包含每个符号的若干状态;针对所述每个符号,基于其归一化概率得到对应的搜索位宽,并基于所述搜索位宽得到所述每个符号的每个状态对应的索引值,并基于所述每个状态及对应的索引值生成所述每个符号的真值表;以及响应于基于所述有限状态熵码表进行有限状态熵编码,基于上一个符号的状态以及当前符号的搜索位宽得到所述当前符号的被选索引值,并在所述当前符号的真值表中查找所述被选索引值所对应的状态,以将其作为所述当前符号的用于有限状态熵编码的状态。
- 根据权利要求1所述的方法,其特征在于,基于所述搜索位宽得到所述每个符号的每个状态对应的索引值包括:基于所述多个符号的归一化概率得到所述有限状态熵码表的码表长度,并基于所述码表长度得到所述有限状态熵码表的码表位宽;以及针对所述每个符号的每个状态,基于其状态区域的基线位置的基线状态值、所述搜索位宽以及所述码表位宽得到所述每个状态对应的索引值。
- 根据权利要求2所述的方法,其特征在于,所述针对所述每个符号的每个状态,基于其状态区域的基线位置的基线状态值、所述搜索位宽以及所述码表位宽得到所述每个状态对应的索引值步骤之前,还包括:获取所述每个符号的每个状态的状态取值范围;以及根据所述状态取值范围设置对应的状态区域。
- 根据权利要求2所述的方法,其特征在于,所述针对所述每个符号的每个状态,基于其状态区域的基线位置的基线状态值、所述搜索位宽以及所述码表位宽得到所述每个状态对应的索引值步骤之前,还包括:依次根据所述多个符号对应的归一化概率,确定所述每个符号的状态区域的长度取值。
- 根据权利要求4所述的方法,其特征在于,所述依次根据所述多个符号对应的归一化概率,确定所述每个符号的状态区域的长度取值步骤,包括:依次确定所述每个符号对应的归一化概率是否为预设值;响应于所述归一化概率为预设值,将对应的符号的状态区域的长度取值设置为唯一取值;或响应于所述归一化概率不为预设值,将对应的符号的状态区域的长度取值设置为两个取值。
- 根据权利要求2所述的方法,其特征在于,针对所述每个符号的每个状态,基于其状态区域的基线位置的基线状态值、所述搜索位宽以及所述码表位宽得到所述每个状态对应的索引值包 括:计算所述码表位宽与所述每个符号的所述搜索位宽的差值,得到第一移动位数;以及基于所述第一移动位数对所述每个符号的每个状态的基线状态值进行右移运算,得到所述每个状态对应的索引值。
- 根据权利要求2所述的方法,其特征在于,基于上一个符号的状态以及当前符号的搜索位宽得到所述当前符号的被选索引值包括:计算所述码表位宽与所述当前符号的搜索位宽的差值,得到第二移动位数;以及基于所述第二移动位数对所述上一个符号的状态的值进行右移运算,得到所述当前符号的被选索引值。
- 根据权利要求1或2任意一项所述的方法,其特征在于,针对所述每个符号,基于其归一化概率得到对应的搜索位宽包括:基于所述每个符号的归一化概率以及底数2构造对数函数,对所述对数函数求解,得到所述每个符号对应的搜索位宽。
- 根据权利要求1或2任意一项所述的方法,其特征在于,基于所述多个符号及相应的归一化概率生成有限状态熵码表,且所述有限状态熵码表包含每个符号的若干状态包括:基于所述多个符号的归一化概率得到所述有限状态熵码表的码表长度;基于所述码表长度得到所述有限状态熵码表中的所有状态;将所述每个符号的归一化概率的值作为相应的状态数目;基于所述所有状态和所述每个符号的状态数目得到所述每个符号的若干状态;以及基于所述每个符号的若干状态生成所述有限状态熵码表。
- 根据权利要求9所述的方法,其特征在于,所述基于所述多个符号的归一化概率得到所述有限状态熵码表的码表长度步骤,包括:获取所述多个符号的归一化概率的总和;以及根据所述总和获取所述有限状态熵码表的码表长度。
- 根据权利要求1或2任意一项所述的方法,其特征在于,基于所述符号序列分别得到其中多个符号的归一化概率包括:基于所述符号序列分别得到其中多个符号的出现频率;以及基于每个符号的出现频率得到所述每个符号的归一化概率。
- 根据权利要求11所述的方法,其特征在于,所述基于每个符号的出现频率得到所述每个符号的归一化概率步骤之后,还包括:确定所述多个符号中是否存在相同的归一化概率;以及响应于存在相同的归一化概率,采用不同的标识对相同的归一化概率进行标识。
- 根据权利要求1或2任意一项所述的方法,其特征在于,所述获取符号序列,并基于所述符号序列分别得到其中多个符号的归一化概率,并基于所述多个符号及相应的归一化概率生成有 限状态熵码表,且所述有限状态熵码表包含每个符号的若干状态步骤之前,还包括:确定所述符号序列是否为预设符号;以及响应于所述符号序列为预设符号,则基于所述符号序列分别得到其中多个符号的归一化概率。
- 根据权利要求13所述的方法,其特征在于,所述预设符号包括:原文节段长度literal_length,重复长度match_length,和偏移距离offset。
- 根据权利要求1或2任意一项所述的方法,其特征在于,所述获取符号序列,并基于所述符号序列分别得到其中多个符号的归一化概率,并基于所述多个符号及相应的归一化概率生成有限状态熵码表,且所述有限状态熵码表包含每个符号的若干状态步骤,包括:根据所述有限状态熵码表的码表长度和所述归一化概率,依次对所述多个符号进行状态分配。
- 根据权利要求15所述的方法,其特征在于,所述根据所述有限状态熵码表的码表长度和所述归一化概率,依次对所述多个符号进行状态分配步骤,包括:根据所述有限状态熵码表的码表长度和所述归一化概率,采用状态倒序对所述多个符号进行状态分配。
- 一种有限状态熵编码的状态选择系统,其特征在于,包括:有限状态熵码表生成模块,配置用于获取符号序列,并基于所述符号序列分别得到其中多个符号的归一化概率,并基于所述多个符号及相应的归一化概率生成有限状态熵码表,且所述有限状态熵码表包含每个符号的若干状态;真值表生成模块,配置用于针对所述每个符号,基于其归一化概率得到对应的搜索位宽,并基于所述搜索位宽得到所述每个符号的每个状态对应的索引值,并基于所述每个状态及对应的索引值生成所述每个符号的真值表;以及状态选择模块,配置用于响应于基于所述有限状态熵码表进行有限状态熵编码,基于上一个符号的状态以及当前符号的搜索位宽得到所述当前符号的被选索引值,并在所述当前符号的真值表中查找所述被选索引值所对应的状态,以将其作为所述当前符号的用于有限状态熵编码的状态。
- 根据权利要求17所述的系统,其特征在于,所述真值表生成模块包括:长度和位宽获取子模块,用于基于所述多个符号的归一化概率得到所述有限状态熵码表的码表长度,并基于所述码表长度得到所述有限状态熵码表的码表位宽;以及索引值获取子模块,用于针对所述每个符号的每个状态,基于其状态区域的基线位置的基线状态值、所述搜索位宽以及所述码表位宽得到所述每个状态对应的索引值。
- 一种非易失性计算机可读存储介质,其特征在于,所述非易失性计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被至少一个处理器执行时,使得所述至少一个处理器执行如权利要求1-16任意一项所述方法的步骤。
- 一种计算机设备,包括存储器和处理器,其特征在于,包括:至少一个处理器;以及至少一个存储器,所述至少一个存储器存储有计算机可读指令,所述计算机可读指令被所述至少一个处理器执行时,使得所述至少一个处理器执行时执行如权利要求1-16任意一项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210413401.4 | 2022-04-20 | ||
| CN202210413401.4A CN114513210B (zh) | 2022-04-20 | 2022-04-20 | 有限状态熵编码的状态选择方法、系统、存储介质及设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023202149A1 true WO2023202149A1 (zh) | 2023-10-26 |
Family
ID=81555037
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/142929 Ceased WO2023202149A1 (zh) | 2022-04-20 | 2022-12-28 | 有限状态熵编码的状态选择方法、系统、存储介质及设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN114513210B (zh) |
| WO (1) | WO2023202149A1 (zh) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114513210B (zh) * | 2022-04-20 | 2022-08-02 | 苏州浪潮智能科技有限公司 | 有限状态熵编码的状态选择方法、系统、存储介质及设备 |
| CN115441878A (zh) * | 2022-08-05 | 2022-12-06 | 海飞科(南京)信息技术有限公司 | 针对文本压缩的fse码表快速建立方法 |
| CN115425986B (zh) * | 2022-08-23 | 2026-03-27 | 山东云海国创云计算装备产业创新中心有限公司 | 一种基于熵编码的编解码方法、系统、存储介质及设备 |
| CN115765755A (zh) * | 2022-09-27 | 2023-03-07 | 山东云海国创云计算装备产业创新中心有限公司 | 一种基于有限域乘法的ans编解码方法、设备及介质 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020037059A1 (en) * | 2000-08-18 | 2002-03-28 | Texas Instruments Incorporated | Joint equalization and decoding using a search-based decoding algorithm |
| CN113261285A (zh) * | 2019-09-24 | 2021-08-13 | Oppo广东移动通信有限公司 | 编码方法、解码方法、编码器、解码器以及存储介质 |
| CN114039607A (zh) * | 2021-11-09 | 2022-02-11 | 山东云海国创云计算装备产业创新中心有限公司 | 一种多字符的有限熵编码方法、装置、设备及可读介质 |
| CN114301468A (zh) * | 2021-12-23 | 2022-04-08 | 山东云海国创云计算装备产业创新中心有限公司 | 一种fse编码方法、装置、设备及存储介质 |
| CN114513210A (zh) * | 2022-04-20 | 2022-05-17 | 苏州浪潮智能科技有限公司 | 有限状态熵编码的状态选择方法、系统、存储介质及设备 |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113572479B (zh) * | 2021-09-22 | 2021-12-21 | 苏州浪潮智能科技有限公司 | 一种有限状态熵编码表的生成方法及系统 |
-
2022
- 2022-04-20 CN CN202210413401.4A patent/CN114513210B/zh active Active
- 2022-12-28 WO PCT/CN2022/142929 patent/WO2023202149A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020037059A1 (en) * | 2000-08-18 | 2002-03-28 | Texas Instruments Incorporated | Joint equalization and decoding using a search-based decoding algorithm |
| CN113261285A (zh) * | 2019-09-24 | 2021-08-13 | Oppo广东移动通信有限公司 | 编码方法、解码方法、编码器、解码器以及存储介质 |
| CN114039607A (zh) * | 2021-11-09 | 2022-02-11 | 山东云海国创云计算装备产业创新中心有限公司 | 一种多字符的有限熵编码方法、装置、设备及可读介质 |
| CN114301468A (zh) * | 2021-12-23 | 2022-04-08 | 山东云海国创云计算装备产业创新中心有限公司 | 一种fse编码方法、装置、设备及存储介质 |
| CN114513210A (zh) * | 2022-04-20 | 2022-05-17 | 苏州浪潮智能科技有限公司 | 有限状态熵编码的状态选择方法、系统、存储介质及设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114513210B (zh) | 2022-08-02 |
| CN114513210A (zh) | 2022-05-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2023202149A1 (zh) | 有限状态熵编码的状态选择方法、系统、存储介质及设备 | |
| CN104283568B (zh) | 一种基于部分霍夫曼树的数据压缩编码方法 | |
| CN114301468B (zh) | 一种fse编码方法、装置、设备及存储介质 | |
| WO2023045204A1 (zh) | 一种有限状态熵编码表的生成方法、系统、介质及设备 | |
| IL294187B1 (en) | Methods and systems for data compression | |
| CN112182021B (zh) | 一种用户数据查询方法、装置和系统 | |
| CN109767282A (zh) | 智能化商品筛选方法及装置、电子设备 | |
| CN108391129A (zh) | 数据编码方法及装置 | |
| CN104636377B (zh) | 数据压缩方法及设备 | |
| CN108988988B (zh) | 一种基于准循环矩阵两级查找表的rcm编码器和编码方法 | |
| CN108829930B (zh) | 三维数字化工艺设计mbd模型的轻量化方法 | |
| CN105099654A (zh) | 基于耦合自触发元胞自动机加解密方法 | |
| CN115314121B (zh) | 量子通信方法、装置及电子设备 | |
| CN104765790B (zh) | 一种数据查询的方法和装置 | |
| US20130222159A1 (en) | Entropy method of binary-ternary lossless data coding | |
| CN113919289B (zh) | 比特币钱包地址字符串的编码方法及地址编号表生成方法 | |
| CN104679775A (zh) | 一种基于Huffman表的数据处理方法 | |
| WO2023169007A1 (zh) | 点云预测处理方法、装置、计算机、存储介质 | |
| CN119496516B (zh) | 纠错加密融合的动态编码构造及低复杂度编码方法和装置 | |
| CN113811019A (zh) | 一种终端身份标识与IPv6地址映射方法及装置 | |
| Li et al. | Efficient Algorithms for Optimal 4‐Bit Reversible Logic System Synthesis | |
| Zhang et al. | Distributed Fog Computing Based on Improved LT codes for Deep Learning in Web of Things | |
| CN104915370B (zh) | 基于禁忌搜索的分片复制码最优冗余率编码矩阵构造方法 | |
| CN120528436A (zh) | 一种Huffman编码方法、编码装置、芯片及存储介质 | |
| CN112911314B (zh) | 一种熵编码器的编码方法及熵编码器 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22938367 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22938367 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 12.03.2025) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22938367 Country of ref document: EP Kind code of ref document: A1 |



