Encoding device, encoding method, and encoding program

The encoding device parallelizes the acquisition and concatenation of codeword candidates using multiple codebooks, addressing the inefficiencies of existing methods by reducing processing time and optimizing resource utilization.

WO2025173103A1PCT designated stage Publication Date: 2025-08-21NT T INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/004957
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-02-14
Publication Date
2025-08-21

AI Technical Summary

Technical Problem

Existing lossless compression methods using multiple codebooks cannot be processed in parallel, leading to increased processing time due to the need for tracing codebook switching and determining the appropriate codebook for each input symbol.

Method used

An encoding device that utilizes a recording unit, candidate acquisition unit, and selection unit to acquire codeword candidates for multiple symbols in parallel using multiple codebooks, and a concatenation unit to concatenate these candidates efficiently, reducing processing time.

Benefits of technology

The proposed solution allows for parallel processing of codeword candidates across multiple symbols, significantly reducing the time required to obtain a codeword sequence while efficiently utilizing computational resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024004957_21082025_PF_FP_ABST
    Figure JP2024004957_21082025_PF_FP_ABST
Patent Text Reader

Abstract

This encoding device receives an input of a symbol string, and outputs a codeword sequence by using a codebook in which symbols are associated with codewords. The encoding device comprises a recording unit, a candidate acquisition unit, and a selection unit. The recording unit records a plurality of codebooks and a rule for switching codebooks to be used. The candidate acquisition unit uses a portion or all of the plurality of codebooks to acquire codeword candidates by parallel-processing symbols included in the symbol string. The selection unit selects a codeword from among the candidate codewords on the basis of the rule.
Need to check novelty before this filing date? Find Prior Art

Description

Encoding device, encoding method, and encoding program

[0001] The present invention relates to an encoding device, an encoding method, and an encoding program for losslessly compressing and encoding digital signals or digital data.

[0002] This paper focuses on lossless compression coding of finite-precision digital signals and data, such as audio signals, image signals, time series signals obtained from brightness sensors, acceleration sensors, and seismometers, as well as character strings and word sequences. When designing lossless coding rules, the rules governing which codewords are output for which inputs are expressed in the form of a code tree or codebook. For example, given inputs a, b, and c, converting them into codewords consisting of 0s and 1s and wanting to minimize the expected code length, it is effective to design a codebook such as (a, 1), (b, 01), (c, 00) by assigning the shortest codeword to the input with the highest occurrence probability among a, b, and c. This design method, therefore, makes it impossible to assign codewords to a single input with precision less than one bit. Therefore, even if the occurrence probability of input a is high, the expected code length cannot be shortened beyond the rule exemplified above. Therefore, a method is known in which codewords are assigned to multiple sets of inputs, with a codeword length that best suits the input distribution. For example, if the occurrence probability of input a is extremely high, then by assigning code words to patterns of input length 2 such as (aa, 1), (ab, 011), (ac, 010), (ba, 0011), (ca, 0010), (bb, 00011), (bc, 00010), (cb, 000011), and (cc, 000010), a 1-bit code word can be assigned to input aa, making it possible to keep the length of the code word per input less than 1 bit.

[0003] The longer the input length prepared in the codebook, the finer the bit length assignment becomes, but the size of the codebook becomes exponentially larger. For example, if a codeword is assigned to a combination of inputs a, b, and c with an input length of 7, it is necessary to store codeword assignments for approximately 2,000 patterns, which is 3 to the power of 7. Therefore, conventional methods provide multiple codebooks with an input length of 1, and switch the codebook used to encode the next input depending on the context of which input pattern was encoded, thereby enabling finer bit assignment while keeping the codebook small.

[0004] R. Sugiura, Y. Kamamoto, N. Harada and T. Moriya, "Optimal Golomb-Rice Code Extension for Lossless Coding of Low-Entropy Exponentially Distributed Sources," in IEEE Transactions on Information Theory, vol. 64, no. 4, pp. 3153-3161, April 2018.

[0005] On the other hand, when encoding is performed using a single code tree or codebook, the encoding process can be parallelized. When an input symbol string is given, encoding is performed by checking it against the codebook for each predetermined input length. Therefore, performing encoding for each predetermined input length in parallel can speed up the encoding process. For example, as shown in Figure 1, for an input symbol string x_0 x_1...x_(L-1), the corresponding codeword is repeatedly obtained from the codebook one by one starting from symbol x_0 and output. However, as shown in Figure 2, M codewords for M symbols are obtained simultaneously using a parallel processing unit M, and then they are output in an array, thereby reducing the processing time required to obtain the codewords. Note that while Figure 2 shows M as an integer equal to or greater than 2, Figure 1 shows the case where M = 1. M can take any integer value equal to or greater than 1.

[0006] Although prior art can construct codes with higher compression efficiency than codes represented by a single codebook, it has a problem in that it cannot be processed in parallel as with a single codebook. This is because when multiple codebooks are used, in order to determine which codebook each input symbol should be coded using, it is necessary to code previous symbols and trace the codebook switching. Furthermore, even when a single codebook is used, it is desirable to reduce processing time by performing more efficient parallel processing. Therefore, an object of the present invention is to reduce the processing time required to obtain a codeword sequence for an input symbol string.

[0007] A first encoding device of the present invention receives a symbol string as input and outputs a codeword sequence using a codebook in which symbols correspond to codewords. The encoding device includes a recording unit, a candidate acquisition unit, and a selection unit. The recording unit records multiple codebooks and rules for switching between codebooks to be used. The candidate acquisition unit acquires codeword candidates for symbols included in the symbol string by parallel processing using some or all of the multiple codebooks. The selection unit selects a codeword from the codeword candidates based on the rules.

[0008] A second encoding device of the present invention also receives a symbol string as input and outputs a codeword sequence using a codebook in which symbols and codewords are associated with each other. The encoding device includes a candidate acquisition unit and a concatenation unit. The candidate acquisition unit acquires codeword candidates for multiple symbols through parallel processing. The concatenation unit concatenates codeword candidates for adjacent symbols acquired by the candidate acquisition unit and outputs the concatenation.

[0009] According to the encoding device of the present invention, code word candidates for a plurality of symbols are obtained by parallel processing, so that the processing time required to obtain a code word sequence for an input symbol string can be reduced.

[0010] 1 is a diagram showing a processing flow of an encoding process in which corresponding codewords are repeatedly obtained from a codebook one by one in order starting from symbol x_0 and output. FIG. 2 is a diagram showing a processing flow of an encoding process in which codewords for a plurality of symbols are obtained simultaneously and then arranged and output. FIG. 3 is a diagram showing an example of the functional configuration of an encoding device of Example 1. FIG. 4 is a diagram showing an example of a processing flow of an encoding device of Example 1. FIG. 5 is a diagram showing an example of a codebook. FIG. 6 is a diagram showing an example of another codebook. FIG. 7 is a diagram showing the processing of the candidate acquisition unit 110 in a case where codebooks that may be used based on the immediately preceding symbol are limited. FIG. 8 is a diagram showing the processing of the candidate acquisition unit 110 in a case where the codebooks that may be used for the immediately preceding symbol are limited based on the immediately preceding symbol. FIG. 9 is a diagram showing the processing of the candidate acquisition unit 110 in a case where the codebooks that may be used for the immediately following symbol are not recorded in association as candidate acquisition codebooks. FIG. 10 is a diagram showing an example of the functional configuration of an encoding device of Example 2. FIG. 11 is a diagram showing an example of a processing flow of an encoding device of Example 2. FIG. 12 is a diagram showing an example of a processing flow of the candidate acquisition unit 110 and a concatenation unit 250 of an encoding device 200. FIG. 13 is a diagram showing an example of the functional configuration of a computer.

[0011] Hereinafter, the embodiments of the present invention will be described in detail. Components having the same functions are assigned the same numbers, and duplicate explanations will be omitted. In this specification and drawings, "_" indicates that the following character is a subscript, and "^" indicates that the following character is a superscript. In other words, "x_n" means "x n " has the same meaning as "k^(j)" (j) ", "k^(j)_n" is the same as "k (j) n ". The following description will be focused on the case where the encoding rule is expressed by a codebook, but there is no difference in the encoding and decoding process even when a code tree is used.

[0012] FIG. 3 shows an example of the functional configuration of an encoding device according to the first embodiment. FIG. 4 shows an example of a processing flow of the encoding device 100. The encoding device 100 receives a symbol string as input and outputs a codeword sequence using a codebook in which symbols are associated with codewords. The encoding device 100 includes a recording unit 190, a candidate acquisition unit 110, and a selection unit 120. The encoding device 100 may also include an encoding unit 140 and a codebook setting unit 130. The recording unit 190 records a plurality of codebooks and a rule for switching between the codebooks to be used. The number of codebooks is K. In the first embodiment, K is an integer equal to or greater than 2.

[0013] The encoding device 100 starts processing from n=0 (S101). The candidate acquisition unit 110 acquires codeword candidates for symbols included in a symbol string by parallel processing using some or all of multiple codebooks (S110). The candidate acquisition unit 110 may perform parallel processing on multiple symbols at once. In this case, the candidate acquisition unit 110 acquires codeword candidates for a predetermined number of symbols, two or more, by parallel processing. For example, as shown in FIG. 4, the codebooks T 0 Using the symbol x n Candidate codeword for (0) n and the next codebook number k (0) n (S110 n,0 ), codebook T 1 Using the symbol x n Candidate codeword for (1) n and the next codebook number k (1) n (S110 n,1 ), ... codebook T K-1 Using the symbol x n Candidate codeword for (K-1) n and the next codebook number k (K-1) n (S110 n,K-1 ). Furthermore, the symbol x n+1 , ..., x n+M-1 Similarly, the code word candidate c (0) n+1 , ..., c (K-1) n+1 , c (0) n+2 , ..., c (K-1) n+2 , ..., c (0) n+M-1 , ..., c (K-1) n+M-1 Here, M is an integer of 1 or more.

[0014] In addition, when the codebook to be used is determined when n=0 or n=M, the symbol x nIn this case, the candidate acquisition unit 110 only needs to perform processing using a codebook that is determined to be used. k Using only the symbol x n Candidate codeword for (k) n and the next codebook number k (k) n The selector 120, which will be described later, selects the code word candidate c (k) n codeword c n where k is an integer between 0 and K-1. If the encoding unit 140 is provided, the encoding unit 140 may select the codebook T k Using the symbol x n codeword c for n and the next codebook number k n The encoding unit 140 obtains the codeword c n If the output is "0", the process of the selection unit 120 described later is not necessary.

[0015] The selection unit 120 selects a code word from among the code word candidates based on a rule (S120). The selection unit 120 may select a code word for each of a predetermined number (M) of symbols. As shown in FIG. 4, the selection unit 120 selects a code word from among the code word candidates based on a rule (S120). n , c n+1 , ..., c n+M-1 If the encoding of the input symbol string is not completed (S180), the encoding device 100 repeats the processes of the candidate acquisition unit 110 and the selection unit 120 for the next M symbols (S103).

[0016] According to the encoding device 100, code word candidates for a plurality of symbols are obtained through parallel processing, and therefore the processing time required to obtain a code word sequence for an input symbol string can be reduced.

[0017] Here, we will explain the terminology. <Codebook> The encoding device and decoding device switch between two codebooks in which multiple pairs (symbols, codewords) are recorded. When used for encoding without parallel processing, the codebook currently in use is used to obtain a codeword corresponding to the input symbol. After that, the codebook is switched according to a predetermined rule, and encoding continues. When used for decoding, the codeword recorded in the codebook currently in use that matches the beginning of the input codeword sequence for the longest period is selected, and that part is decoded into the corresponding symbol. After that, the codebook is switched according to a predetermined rule, and decoding continues.

[0018] An example of a codebook is shown in Figure 5. The codebook switching can be performed according to any rule that can be reproduced in both the encoding device and the decoding device. In the example of Figure 5, 0 Then 00000,00001, T 1 If it is 1, 01000, 01001), the corresponding symbol (T 0 Then c, d, T 1 Then, after encoding / decoding a, c, d), 0 ・A codeword that is the beginning of another codeword in the codebook (T 0 If λ, 00, T 1 If it is 01) the corresponding symbol (T 0 Then a, b, T 1 Then, after encoding / decoding b), 1 where λ is a code word of length 0, which is the prefix of all words.

[0019] Another example of a codebook is shown in Figure 6. The codebook in Figure 6 is used to encode a symbol string, which is a string of symbols {a, b, c}, into a codeword, which is a string of codes {0, 1}. 0 , T 1 , T 2 , T 3 , T 4 In Fig. 5, λ represents a codeword of length 0. Note that the codeword λ can be the prefix of any codeword. 0 The mode {'λ'} is stored in the codebook T 1The mode {'011', '10'} is stored in the codebook T 2 The mode {'0', '10'} is stored in the codebook T 3 The mode {'0', '100'} is stored in the codebook T 4 The modes {'01', '1'} are assigned to the codebook T 0 outputs the code word λ for the symbol a and then uses the codebook T 1 Then, the code word 0 is output for the symbol b, and the codebook to be used next is T 2 Then, the code word 11 is output for the symbol c, and the codebook to be used next is T 0 A mode is a set of code words assigned to each codebook. It is preferable that a mode satisfies prefix conditions.

[0020] <Encoder> An encoder stores a codebook. It receives a sequence of digital signals or digital data and outputs a sequence of corresponding code words. The inputs are, for example, quantized and converted to finite-precision numerical values. Examples include: - Time-series signals obtained from audio signals, image signals, brightness sensors, acceleration sensors, and seismometers; - A sequence of spectral values ​​obtained by performing discrete Fourier transforms, discrete cosine transforms, or modified discrete cosine transforms on the above signals; - Linear prediction coefficients, line spectral pairs (LSPs), immittance spectral pairs (ISPs), and partial autocorrelation coefficients (PARCOR coefficients) obtained by linear predictive analysis of the above signals; and - A sequence of features obtained by inputting the above signals into a neural network. The inputs can be letters such as a, b, and c, or words. Below, these inputs are collectively referred to as symbols. The encoder encodes the input symbol sequence as follows: Note that any codebook can be used initially, but the codebook used must be shared with the decoder.

[0021] In the code of FIG. 5, an example of encoding abc with M=3 is shown. 0 If so, the code word is λ and the destination is T 1 To, T 1 If so, the code word is 1 and the destination is T 0 b is T 0 If so, the code word is 00 and the destination is T1 To, T 1 Then the code word is 01 and the destination is T 1 c is T 0 Then the code word is 00000 and the destination is T 0 To, T 1 Then the code word is 01000 and the destination is T 0 Therefore, we obtain c^(0)_0 =λ, c^(1)_0 =1, c^(0)_1 =00, c^(1)_1= 01, c^(0)_2= 00000, c^(1)_2 =01000, k^(0)_0= 1, k^(1)_0= 0, k^(0)_1= k^(1)_1= 1, k^(0)_2= k^(1)_2= 0. The initial codebook is T 0 Since the number is fixed at , the code word c^(0)_0 is selected as the output of the encoding device, and for the next code word, c^( k^(0)_0)_1 = c^(1)_1 is selected based on the destination k^(0)_0. Similarly, for the next code word, the destination number is followed and c^( k^(1)_1)_2 = c^(1)_2 is selected. As a result, c^(0)_0 c^(1)_1 c^(1)_2 = 0101000 is obtained.

[0022] By obtaining codewords corresponding to multiple codebooks in parallel as codeword candidates for each input symbol, it is possible to perform encoding using multiple codebooks while reducing the processing time required to obtain codewords and codebook destinations from the codebooks. The parallel processing of this embodiment is particularly effective when the codebooks are large and it takes a long processing time to obtain codewords.

[0023] The decoding device is the same as the conventional one. Based on the current codebook, the decoding device selects the longest matching codeword from the beginning of the input codeword sequence, decodes it into the corresponding symbol, and switches the codebook according to the above-mentioned rule.

[0024] [Variation 1] The candidate acquisition unit 110 of the encoding device 100 in Example 1 is premised on acquiring codeword candidates using all of the multiple codebooks recorded in the recording unit 190. However, it is not necessary to acquire codeword candidates using all of the codebooks. For example, it is possible to calculate in advance the probability of which codebook is likely to be switched to using the distribution of occurrence probabilities expected for an input symbol string, and acquire codeword candidates only for codebooks with a high probability. In this case, when a codeword candidate corresponding to a codebook to be switched to during codeword selection has not been acquired, a codeword is acquired each time. When switching to a codebook for which no codeword candidate has been acquired is infrequent, it is possible to improve processing speed while saving computational resources such as CPU, GPU, and FPGA circuits.

[0025] Specifically, if the properties of an input symbol string are known in advance, the probability of use for each codebook is predicted in advance, and a predetermined portion of codebooks with a high probability of use is selected. Then, the candidate acquisition unit 110 acquires codeword candidates using the predetermined portion of codebooks (S110). The selection unit 120 selects a codeword from the codeword candidates based on a rule. However, if there are no codeword candidates using a rule-based codebook, the selection unit 120 acquires a codeword using a rule-based codebook (S120).

[0026] Furthermore, a predetermined part of the codebook may be dynamically changed according to the properties of the input symbol string. In this case, the encoding device 100 may also include a codebook setting unit 130. The codebook setting unit 130 predicts a codebook that is likely to be used from the input symbol string and sets it as a candidate acquired codebook. The candidate acquisition unit 110 acquires codeword candidates using the candidate acquired codebook (S110). The selection unit 120 selects a codeword from the codeword candidates based on a rule. However, if there is no codeword candidate using the rule-based codebook, the selection unit 120 acquires a codeword using the rule-based codebook (S120).

[0027] [Variation 2] When multiple codebooks are used, computational resources can be saved by using multiple symbols in the input symbol string in each processing unit for obtaining codeword candidates. The range of possible codebook switching rules is narrowed depending on the context of the symbol string. For example, in the codebook of Figure 5, the symbol x to be coded is n+1 The codebook used to encode the symbol x n If c, then T 0 Or T 4 This is x n No matter which codebook is used to encode, the link destination is T 0 Or T 4 In the case of the second modification, a codebook that is unlikely to be used is not used, so it is not assumed that there are no codeword candidates using a rule-based codebook when selection is made by selection unit 120.

[0028] Fig. 7 is a diagram showing the processing of the candidate acquisition unit 110 when the codebooks that may be used are limited based on the immediately preceding symbol. In this case, the recording unit 190 records, for each symbol, the codebooks that may be used for the immediately following symbol as candidate acquisition codebooks in association with each other. The candidate acquisition unit 110 acquires codeword candidates using the candidate acquisition codebook associated with the symbol immediately preceding the symbol to be processed (S110). This makes it possible to reduce the processing time while saving calculation resources. Note that K(x n ) is the symbol x n In addition, j is an integer between 0 and K.

[0029] 7 will be described. In the candidate acquisition unit 110 of FIG. 7, the n-th symbol x n The n+M-1th symbol x n+M-1 The codeword candidates up to the n-1th symbol x are obtained. n―1 Since the code word of has already been obtained, the nth symbol x n The codebook T used for k_n-1 is determined, so the codebook T k_n-1 The symbol x in n codeword c for (k_n-1) nand the next codebook number k (k_n-1) n (S110 n,k_n-1 ). The n+1th symbol x n+1 For n The set of codebooks that can be used next is K(x n ) to find the codeword candidate c (j) n+1 and the next codebook number k (j) n+1 (S110 n+1,j In this way, codeword candidates are obtained using the candidate acquisition codebook associated with the symbol immediately preceding the symbol to be processed.

[0030] Furthermore, by considering more contexts, it is possible to reduce the number of codebooks from which codeword candidates should be obtained. n+1 A set of codebook numbers K(x n+1 8 is a diagram showing the process of the candidate acquisition unit 110 when the symbols up to two previous symbols are taken into consideration. In this example, the symbol x n+2 For the symbol x up to two n , x n+1 Considering the context of n+1 |K(x n )) to obtain the codeword. This makes it possible to further reduce the number of processing units to be parallelized. n+1 |K(x n )) is the input symbol x n , x n+1 It is sufficient to obtain and record in advance for each possible value of . Specifically, the recording unit 190 associates with each sequence of a predetermined number of symbols a codebook that may be used for the immediately following symbol as a candidate acquisition codebook and records them. The candidate acquisition unit 110 acquires codeword candidates using the candidate acquisition codebook associated with the sequence of the predetermined number of symbols immediately preceding the symbol to be processed (S110). This makes it possible to reduce processing time while saving computational resources.

[0031] 8 will be described. In the candidate acquisition unit 110 of FIG. 8, the n-th symbol x n The n+M-1th symbol x n+M-1 The codeword candidates up to the n-1th symbol x are obtained. n―1 Since the code word of has already been obtained, the nth symbol x n The codebook T used for k_n-1 is determined, so the codebook T k_n-1 The symbol x in n codeword c for (k_n-1) n and the next codebook number k (k_n-1) n (S110 n,k_n-1 ). The n+1th symbol x n+1 For the n-1th symbol x n―1 The codebook number used to encode n-1 Therefore, H = {k n-1}. Therefore, j∈K(x n |{k n-1}) j Using (j) n+1 and the next codebook number k (j) n+1 (S110 n+1,j ). The n+2th symbol x n+2 For j∈K(x n |K(x n )) j Using (j) n+2 and the next codebook number k (j) n+2 (S110 n+2,j In this way, a codeword candidate is obtained using a candidate acquisition codebook associated with the string of the predetermined number of symbols immediately preceding the symbol to be processed.

[0032] In the explanation using Figures 7 and 8, the recording unit 190 previously recorded a codebook that may be used for the immediately following symbol as a candidate codebook. Figure 9 illustrates the process of the candidate acquisition unit when a codebook that may be used for the immediately following symbol is not previously recorded as a candidate codebook. In the process illustrated in Figure 9, for every other input symbol, codeword candidates and a destination codebook are first acquired from all codebooks, and then, based on the acquired destination codebook number, a combination of codebook numbers to which the codebook can be switched is obtained to acquire codeword candidates for the remaining input. In other words, for the symbol following a symbol for which codeword candidates have been acquired using all of the multiple codebooks, the candidate acquisition unit 110 acquires codeword candidates using a codebook that may be used based on a rule, and for the symbol following that, codeword candidates are acquired using all of the multiple codebooks (S110). This eliminates the need to acquire codeword candidates from all codebooks for all inputs, thereby saving computational resources and shortening processing time.

[0033] 9 will be described. In the candidate acquisition unit 110 in FIG. n The n+M-1th symbol x n+M-1 The codeword candidates up to the n-1th symbol x are obtained. n―1 Since the code word of has already been obtained, the nth symbol x n The codebook T used for k_n-1 is determined, so the codebook T k_n-1 The symbol x in n codeword c for (k_n-1) n and the next codebook number k (k_n-1) n (S110 n,k_n-1 ). The n+1th symbol x n+1 For all codebooks T 0 ,…,T K-1 Using (j) n+1 and the next codebook number k (j) n+1 (S110 n+1,j ). The n+2th symbol x n+2 For n+1The set of codebooks that can be used next is K(x n+1 ) to find the codeword candidate c (j) n+2 and the next codebook number k (j) n+2 (S110 n+2,j ). The n+3th symbol x n+3 For all codebooks T 0 ,…,T K-1 Using (j) n+3 and the next codebook number k (j) n+3 (S110 n+3,j ). The n+4th symbol x n+4 For n+3 The set of codebooks that can be used next is K(x n+3 ) to find the codeword candidate c (j) n+4 and the next codebook number k (j) n+4 (S110 n+4,j In this way, for the symbol next to the symbol for which code word candidates have been obtained using all of the multiple codebooks, code word candidates are obtained using a codebook that may be used based on a rule, and for the symbol after that, code word candidates are obtained using all of the multiple codebooks.

[0034] FIG. 10 shows an example of the functional configuration of an encoding device according to a second embodiment. FIG. 11 shows an example of a processing flow of the encoding device 200. FIG. 12 shows an example of a processing flow of the candidate acquisition unit 110 and the concatenation unit 250 of the encoding device 200. The encoding device 200 receives a symbol string as input and outputs a codeword sequence using a codebook in which symbols and codewords are associated. The encoding device 200 includes a recording unit 190, a candidate acquisition unit 110 or an encoding unit 240, and a concatenation unit 250. The encoding device 200 may also include a selection unit 220 and a codebook setting unit 130. The recording unit 190 includes one or more codebooks, and if two or more codebooks are included, it also records a rule for switching the codebook to be used. If the recording unit 190 includes two or more codebooks, the encoding device 200 also includes a selection unit 220. In the second embodiment, K is an integer equal to or greater than 1. In other words, it should be noted that K shown in FIGS. 11 and 12 may be equal to 1.

[0035] The encoding device 200 starts processing from n=0 (S101). When K=1, it is sufficient to include an encoding unit 240. The encoding unit 240 then encodes multiple symbols included in a symbol string by parallel processing and outputs each codeword. For example, when the encoding unit 240 encodes the nth to (n+2)th symbols x n , x n+1 , x n+2 are encoded in parallel to produce codeword c n , c n+1 , c n+2 In the case where the candidate acquisition unit 110 is provided, the candidate acquisition unit 110 acquires candidates for each code word by parallel processing for a plurality of symbols included in the symbol string. For example, the candidate acquisition unit 110 acquires candidates for the nth to (n+2)th symbols x n , x n+1 , x n+2 are encoded in parallel to obtain candidate code words c (0) n , c (0) n+1 , c (0) n+2 is output (S110).

[0036] The concatenation unit 250 concatenates code words, code word candidates, concatenated code words, or concatenated code word candidates that are adjacent in output order in parallel with the output of other concatenated code words or other concatenated code word candidates (S250). For example, when K=1, the concatenation unit 250 concatenates the code word c of the (n+1)th symbol. n+1 and the codeword c of the n+2th symbol n+2 Alternatively, the concatenation unit 250 concatenates the code word candidate c (0) n+1 and the code word candidate c for the n+2th symbol (0) n+2 The process of the concatenation unit 250 is to concatenate the codeword c n The output order is determined by the order of the input symbols, and is maintained even when code words or code word candidates are concatenated. "Adjacent" means that the order in which code words or code word candidates should be output is adjacent, even after they are concatenated.

[0037] In the above example, processing for three symbols is shown, but when the encoding unit 240 or the candidate acquisition unit 110 is processing the n-th symbol, the candidate acquisition unit 110 may perform parallel processing to acquire codeword candidates c for the n+1th to n+6th symbols. (0) n+1 , c (0) n+2 , c (0) n+3 , c (0) n+4 , c (0) n+5 , c (0) n+6 Then, the concatenation unit 250 may obtain the code word candidate c for the (n+1)th symbol by parallel processing (S110). (0) n+1 and the code word candidate c for the n+2th symbol (0) n+2 Concatenation with the code word candidate c for the n+3th symbol (0) n+3 and the code word candidate c for the n+4th symbol (0) n+4 Concatenation with the code word candidate c for the n+5th symbol (0) n+5and the code word candidate c for the n+6th symbol (0) n+6 and a code word candidate c (0) n+3:n+4 and a code word candidate c obtained by concatenating the code word candidate for the (n+5)th symbol and the code word candidate for the (n+6)th symbol. (0) n+5:n+6 (S250) In this way, by performing parallel processing to the extent possible, the time required for encoding can be reduced.

[0038] Next, the case where K≧2 will be described. When K≧2, the candidate acquisition unit 110 is provided. Furthermore, the encoding device 200 is provided with the candidate acquisition unit 110 and the selection unit 220. The recording unit 190 records a plurality of codebooks and a rule for switching between the codebooks to be used. The encoding device 200 starts processing from n=0 (S101). The candidate acquisition unit 110 acquires codeword candidates by parallel processing using some or all of the codebooks for a group of symbols (S110). When parallel processing is performed using all of the K codebooks for a group of M symbols, the codeword candidate c (0) n , ..., c (K-1) n , c (0) n+1 , ..., c (K-1) n+1 , ..., c (0) n+M-1 , ..., c (K-1) n+M-1 and the next codebook number k (0) n , ..., k (K-1) n , k (0) n+1 , ..., k (K-1) n+1 , ..., k (0) n+M-1 , ..., k (K-1) n+M-1 Ask for.

[0039] In addition, when the codebook to be used is determined when n=0 or n=M, the symbol x nIn this case, the candidate acquisition unit 110 only needs to perform processing using a codebook that is determined to be used. k Using only the symbol x n Candidate codeword for (k) n and the next codebook number k (k) n If the encoding unit 240 is provided, the encoding unit 240 may acquire the codebook T k Using the symbol x n codeword c for n and the next codebook number k n Just obtain the following.

[0040] The concatenation unit 250 concatenates code word candidates based on the rules (S250). The processing in the candidate acquisition unit 110 and the concatenation unit 250 will be described with reference to FIG. 12. The candidate acquisition unit 110 concatenates the n-th symbol x n The n+M-1th symbol x n+M-1 The codeword candidates up to the n-1th symbol x are obtained. n―1 Since the code word of has already been obtained, the nth symbol x n The codebook T used for k_n-1 is determined, so the codebook T k_n-1 The symbol x in n codeword c for (k_n-1) n and the next codebook number k (k_n-1) n (S110 n,k_n-1 If the encoding unit 240 is provided, this process may be performed by the encoding unit 240 (S240).

[0041] n+1th symbol x n+1 For all codebooks T 0 ,…,T K-1 Using (j) n+1 and the next codebook number k (j) n+1 (S110 n+1,j ). The n+2th symbol x n+1 For all codebooks T 0 ,…,T K-1Using (j) n+2 and the next codebook number k (j) n+2 (S110 n+2,j ). The code word candidate c in the concatenation unit 250 (j) n+1 and code word candidate c (j) n+2 When concatenating with the next codebook number k (j) n+1 Since is known, the code word candidate c (j) n+1 and code word candidate c(k^(j)_n+1) n+2 and the concatenated code word candidate c (j) n+1:n+2 (S250 n+1:n+2,j Similarly, the concatenated codeword candidate c (j) n+3:n+4 Candidate codeword c concatenated with (j) n+5:n+6 (S250 n+3:n+4,j , S250 n+5:n+6,j ). And c (j) n+3:n+4 and C (j) n+5:n+6 Concatenated c (j) n+5:n+6 (S250 n+3:n+6,j ). In this way, it is possible to obtain the concatenated code word candidates.

[0042] The selection unit 220 selects a code word from the candidate code words concatenated by the concatenation unit based on a rule, and n , c n+1 , ..., c n+M-1 (S220). If the encoding of the input symbol string is not completed (S180), the encoding device 200 repeats the processing of the candidate acquisition unit 110 and the selection unit 120 for the next M symbols (S103).

[0043] When outputting codewords (e.g., writing them to a recording medium, etc.) sequentially from the beginning, the processing time required to obtain a codeword sequence can be shortened by utilizing remaining computational resources to concatenate subsequent codewords. Furthermore, when writing codewords to a recording medium, etc., writing long codeword sequences less frequently is more efficient than writing short codeword sequences more frequently. According to the encoding device 200, codewords or codeword candidates are concatenated by parallel processing, thereby enabling efficient use of remaining computational resources, and writing concatenated codewords to a recording medium, etc., can also be performed efficiently. Therefore, the encoding device 200 can shorten the processing time required to obtain a codeword sequence for an input symbol string. Furthermore, even when multiple codebooks are used, processing for multiple symbols can be performed in parallel, thereby shortening the processing time required to obtain a codeword sequence for an input symbol string.

[0044] Note that the modified examples 1 and 2 shown in the embodiment 1 can also be used in the embodiment 2. The modified examples will be described below.

[0045] [Variation 1] The candidate acquisition unit 110 of the encoding device 200 of Example 2 is premised on acquiring codeword candidates using all of the multiple codebooks recorded in the recording unit 190. However, it is not necessary to acquire codeword candidates using all of the codebooks. For example, it is possible to calculate in advance the probability of which codebook is likely to be switched to using the distribution of occurrence probabilities expected for an input symbol string, and acquire codeword candidates only for codebooks with a high probability. In this case, when a codeword candidate corresponding to a codebook to be switched to during codeword selection has not been acquired, the concatenation unit 250 acquires a codeword each time. When switching to a codebook for which no codeword candidate has been acquired occurs infrequently, it is possible to improve processing speed while saving computational resources such as CPU, GPU, and FPGA circuits.

[0046] Specifically, if the properties of the input symbol string are known in advance, the probability of use for each codebook is predicted in advance, and a predetermined portion of codebooks with a high probability of use is selected. Then, the candidate acquisition unit 110 acquires codeword candidates using the predetermined portion of codebooks (S110). If there are no codeword candidates using the rule-based codebook, the concatenation unit 250 acquires codeword candidates using the rule-based codebook and concatenates the codeword candidates together (S250).

[0047] Furthermore, a predetermined part of the codebook may be dynamically changed according to the properties of the input symbol string. In this case, the encoding device 200 may also include a codebook setting unit 130. The codebook setting unit 130 predicts a codebook that is likely to be used from the input symbol string and sets it as a candidate acquired codebook. The candidate acquisition unit 110 acquires codeword candidates using the candidate acquired codebook (S110). The concatenation unit 250 concatenates codeword candidates based on rules. However, if there are no codeword candidates using the rule-based codebook, the concatenation unit 250 acquires codeword candidates using the rule-based codebook and concatenates the codeword candidates (S250).

[0048] [Modification 2] Modification 2 is the same as Example 1 described using Figures 7 to 9, so only the main points will be described. When multiple codebooks are used, computational resources can be saved by performing processing using multiple symbols from the input symbol string in each processing unit that obtains codeword candidates. The range of possible codebook switching rules is narrowed depending on the context of the symbol string.

[0049] For example, the recording unit 190 associates each symbol with a codebook that may be used for the symbol immediately following it and records it as a candidate acquisition codebook. The candidate acquisition unit 110 acquires codeword candidates using the candidate acquisition codebook associated with the symbol immediately preceding the symbol being processed (S110). This makes it possible to reduce processing time while saving computational resources.

[0050] Furthermore, by considering more contexts, the number of codebooks from which codeword candidates must be obtained can be reduced. For example, the recording unit 190 associates a codebook that may be used for the immediately following symbol with each sequence of a predetermined number of symbols and records it as a candidate acquisition codebook. The candidate acquisition unit 110 can acquire codeword candidates using the candidate acquisition codebook associated with the sequence of the predetermined number of symbols immediately preceding the symbol to be processed (S110). This allows for a reduction in processing time while saving computational resources.

[0051] The candidate acquiring unit 110 may acquire code word candidates for a symbol next to a symbol for which code word candidates have been acquired using all of the multiple codebooks, using a codebook that may be used based on a rule, and may acquire code word candidates for the symbol next thereafter using all of the multiple codebooks (S110). This eliminates the need to acquire code word candidates for all inputs using all of the codebooks, making it possible to save computational resources and shorten processing time.

[0052] The invention according to the second embodiment is described below. <Supplementary Item 1> A coding device that receives a symbol string as input and outputs a codeword sequence using a codebook in which symbols correspond to codewords, the coding device comprising: a coding unit or a candidate acquisition unit; and a concatenation unit, wherein the coding unit acquires each codeword for a plurality of symbols included in the symbol string by parallel processing, or the candidate acquisition unit acquires each codeword candidate for a plurality of symbols included in the symbol string by parallel processing, and the concatenation unit concatenates codewords, codeword candidates, concatenated codewords, or concatenated codeword candidates that are adjacent in output order, in parallel with output of other concatenated codewords or other concatenated codeword candidates.

[0053] <Supplementary Item 2> A coding device that receives a symbol string as input and outputs a codeword sequence using a codebook in which symbols and codewords are associated with each other, the coding device having a coding unit or a candidate acquisition unit, and a concatenation unit, wherein n is an integer greater than or equal to 1, the coding unit acquires each codeword for the nth to n+2th symbols included in the symbol string by parallel processing, or the candidate acquisition unit acquires each codeword candidate for the nth to n+2th symbols included in the symbol string by parallel processing, and the concatenation unit concatenates the codeword for the n+1th symbol and the codeword for the n+2th symbol, or concatenates the codeword candidate for the n+1th symbol and the codeword candidate for the n+2th symbol.

[0054] <Supplementary Item 3> A coding device that receives a symbol string as input and outputs a codeword sequence using a codebook in which symbols and codewords are associated with each other, wherein n is an integer equal to or greater than 1, comprising: a candidate acquisition unit that acquires codeword candidates for the (n+1)th to (n+6)th symbols by parallel processing; and a concatenation unit that executes, by parallel processing, concatenation of the codeword candidate for the (n+1)th symbol with the codeword candidate for the (n+2)th symbol, concatenation of the codeword candidate for the (n+3)th symbol with the codeword candidate for the (n+4)th symbol, and concatenation of the codeword candidate for the (n+5)th symbol with the codeword candidate for the (n+6)th symbol, and further concatenation of the codeword candidate obtained by concatenating the codeword candidate for the (n+3)th symbol with the codeword candidate for the (n+4)th symbol and the codeword candidate for the (n+5)th symbol with the codeword candidate for the (n+6)th symbol.

[0055] <Supplementary Item 4> The encoding device according to any one of Supplementary Items 1 to 3, comprising: a plurality of codebooks; a recording unit that records rules for switching between codebooks to be used; a candidate acquisition unit; and a selection unit, wherein the candidate acquisition unit acquires codeword candidates by parallel processing using some or all of the plurality of codebooks; the concatenation unit concatenates the codeword candidates together based on the rules; and the selection unit selects a codeword from the codeword candidates concatenated by the concatenation unit based on the rules.

[0056] <Supplementary Item 5> The encoding device according to Supplementary Item 4, wherein the candidate acquisition unit acquires codeword candidates using a predetermined part of a codebook, and when there are no codeword candidates using the rule-based codebook, the concatenation unit acquires codeword candidates using the rule-based codebook and concatenates the codeword candidates together.

[0057] <Supplementary Item 6> The encoding device according to Supplementary Item 4, further comprising a codebook setting unit that predicts a codebook that is likely to be used from an input symbol string and sets it as a candidate acquisition codebook, wherein the candidate acquisition unit acquires codeword candidates using the candidate acquisition codebook, and when there are no codeword candidates using the rule-based codebook, the concatenation unit acquires codeword candidates using the rule-based codebook and concatenates the codeword candidates together.

[0058] <Supplementary Item 7> The encoding device according to Supplementary Item 4, wherein the recording unit records, for each symbol, a codebook that may be used for the immediately following symbol in association with the codebook as a candidate acquisition codebook, and the candidate acquisition unit acquires codeword candidates using the candidate acquisition codebook associated with the symbol immediately preceding the symbol to be processed.

[0059] <Supplementary Item 8> The encoding device according to Supplementary Item 4, wherein the recording unit records, for each string of a predetermined number of symbols, a codebook that may be used for the immediately following symbol in association with the string as a candidate acquisition codebook, and the candidate acquisition unit acquires codeword candidates using the candidate acquisition codebook associated with the string of the predetermined number of symbols immediately before the symbol to be processed.

[0060] <Supplementary Item 9> The encoding device according to Supplementary Item 4, wherein the candidate acquisition unit acquires a code word candidate using a codebook that may be used based on the rule for a symbol following a symbol for which a code word candidate has been acquired using all of the plurality of codebooks, and acquires a code word candidate using all of the plurality of codebooks for the symbol following that.

[0061] <Supplementary Item 10> An encoding method in which an encoding device receives a symbol string as input, and outputs a codeword sequence using a codebook in which symbols correspond to codewords, the encoding method comprising: obtaining each codeword or obtaining each codeword candidate by parallel processing for a plurality of symbols included in the symbol string; and concatenating adjacent obtained codewords or codeword candidates for output.

[0062] <Supplementary Item 11> An encoding method in which an encoding device receives a symbol string as input, and outputs a codeword sequence using a codebook in which symbols and codewords are associated with each other, wherein n is an integer equal to or greater than 1, and obtains each codeword or each codeword candidate by parallel processing for the nth to (n+2)th symbols included in the symbol string, and concatenates the codeword for the (n+1)th symbol and the codeword for the (n+2)th symbol, or concatenates the codeword candidate for the (n+1)th symbol and the codeword candidate for the (n+2)th symbol.

[0063] <Supplementary Item 12> An encoding method in which an encoding device receives a symbol string as input and outputs a codeword sequence using a codebook in which symbols and codewords are associated with each other, wherein n is an integer equal to or greater than 1, obtains codeword candidates for the (n+1)th to (n+6)th symbols by parallel processing, performs by parallel processing a concatenation of the codeword candidate for the (n+1)th symbol and a codeword candidate for the (n+2)th symbol, a concatenation of the codeword candidate for the (n+3)th symbol and a codeword candidate for the (n+4)th symbol, and a concatenation of the codeword candidate for the (n+5)th symbol and a codeword candidate for the (n+6)th symbol, and concatenates a codeword candidate obtained by concatenating the codeword candidate for the (n+3)th symbol and the codeword candidate for the (n+4)th symbol with a codeword candidate obtained by concatenating the codeword candidate for the (n+5)th symbol and the codeword candidate for the (n+6)th symbol.

[0064] <Supplementary Item 13> An encoding program for causing a computer to function as the encoding device according to any one of Supplementary Items 1 to 3.

[0065] [Processor, Program, Recording Medium] The functions performed by the components described herein may be implemented in circuitry or processing circuitry, including general-purpose processors, application-specific processors, integrated circuits, ASICs (Application Specific Integrated Circuits), a CPU (a Central Processing Unit), conventional circuits, and / or combinations thereof, programmed to perform the described functions. A processor includes transistors and other circuits and is considered to be circuitry or processing circuitry. A processor may also be a programmed processor that executes a program stored in a memory.

[0066] In this specification, a circuitry, unit, or means is hardware that is programmed to realize or performs the described functions, which may be any hardware disclosed herein or any hardware known to be programmed to realize or perform the described functions.

[0067] If the hardware is a processor considered to be a type of circuitry, the circuitry, means, or unit is a combination of the hardware and software used to configure the hardware and / or processor.

[0068] The various processes described above can be implemented by loading a program that executes each step of the above method into the recording unit 2020 of the computer 2000 shown in Figure 13, and operating the control unit 2010, input unit 2030, output unit 2040, display unit 2050, etc.

[0069] The program describing the processing contents can be recorded on a computer-readable recording medium, which may be, for example, a magnetic recording device, an optical disk, a magneto-optical recording medium, a semiconductor memory, or any other suitable recording medium.

[0070] The program may be distributed by, for example, selling, transferring, lending, etc. portable recording media such as DVDs and CD-ROMs on which the program is recorded. Furthermore, the program may be stored in a storage device of a server computer, and then transferred from the server computer to other computers via a network, thereby distributing the program.

[0071] A computer that executes such a program may first temporarily store the program recorded on a portable recording medium or transferred from a server computer in its own storage device. Then, when executing a process, the computer reads the program stored on its own recording medium and executes the process in accordance with the read program. Alternatively, the computer may read the program directly from a portable recording medium and execute the process in accordance with the program. Furthermore, the computer may execute the process in accordance with the program each time a program is transferred from a server computer to the computer. Alternatively, the server computer may not transfer the program to the computer, but may instead execute the process through a so-called ASP (Application Service Provider) service, which realizes the processing function by issuing an execution instruction and obtaining the results. Furthermore, the server computer may execute the process at the terminal using a so-called SaaS (Software as a Service) service, which allows users to use part of a server computer along with the program. In this embodiment, the program includes information used for processing by an electronic computer that is equivalent to a program (such as data that is not a direct instruction to a computer but has properties that dictate computer processing).

[0072] Furthermore, in this embodiment, the device is configured by executing a predetermined program on a computer, but at least a part of the processing contents may be realized by hardware.

[0073] 100, 200 Encoding device 110 Candidate acquisition unit 120, 220 Selection unit 130 Codebook setting unit 140, 240 Encoding unit 190 Recording unit 250 Concatenation unit

Claims

1. A coding device that receives a symbol string as input and outputs a codeword sequence using a codebook in which symbols correspond to codewords, comprising: a recording unit that records multiple codebooks and rules for switching between codebooks; a candidate acquisition unit that acquires codeword candidates for symbols included in the symbol string by parallel processing using some or all of the multiple codebooks; and a selection unit that selects a codeword from the codeword candidates based on the rules.

2. An encoding device according to claim 1, wherein the candidate acquisition unit acquires code word candidates for a predetermined number of symbols, two or more, through parallel processing, and the selection unit selects a code word for each of the predetermined number of symbols from the code word candidates.

3. An encoding device according to claim 1 or 2, wherein the candidate acquisition unit acquires codeword candidates using a predetermined part of the codebook, and the selection unit acquires codewords using the codebook based on the rules when there are no codeword candidates using the codebook based on the rules.

4. An encoding device according to claim 1 or 2, further comprising a codebook setting unit that predicts a codebook that is likely to be used from an input symbol string and sets it as a candidate acquisition codebook, wherein the candidate acquisition unit acquires codeword candidates using the candidate acquisition codebook, and the selection unit acquires a codeword using the codebook based on the rules when there are no codeword candidates using the codebook based on the rules.

5. An encoding device according to claim 1 or 2, wherein the recording unit records, for each symbol, a codebook that may be used for the symbol immediately following it as a candidate acquisition codebook, and the candidate acquisition unit acquires codeword candidates using the candidate acquisition codebook associated with the symbol immediately preceding the symbol being processed.

6. An encoding device according to claim 1 or 2, wherein the recording unit records, for each sequence of a predetermined number of symbols, a codebook that may be used for the immediately following symbol in association with the sequence as a candidate acquisition codebook, and the candidate acquisition unit acquires codeword candidates using the candidate acquisition codebook associated with the sequence of the predetermined number of symbols immediately preceding the symbol to be processed.

7. An encoding device according to claim 1 or 2, wherein the candidate acquisition unit acquires a code word candidate for a symbol following a symbol for which a code word candidate has been obtained using all of the plurality of codebooks, using a codebook that may be used based on the rule, and acquires a code word candidate for the symbol following that using all of the plurality of codebooks.

8. A coding method in which a coding device receives a symbol string as input and outputs a codeword sequence using a codebook in which symbols and codewords are associated, wherein the coding device pre-records multiple codebooks and rules for switching between codebooks to be used, obtains codeword candidates for symbols included in the symbol string by parallel processing using some or all of the multiple codebooks, and selects a codeword from the codeword candidates based on the rules.

9. An encoding program for causing a computer to function as the encoding device according to claim 1 or 2.

Citation Information

Patent Citations

  • Data compression device and data restoring device

    WO2008078390A1