Encoding device, decoding device, and data structure

By employing multiple codebooks or analytic trees with unique codability and prefix conditions, the method addresses inefficiencies in lossless compression coding, achieving improved compression efficiency and data representation.

WO2026053398A1PCT designated stage Publication Date: 2026-03-12NT T INC
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2026-03-12

AI Technical Summary

Technical Problem

Existing lossless compression coding technologies face challenges in improving compression efficiency due to strict constraints on codeword assignment, leading to inefficient use of codewords and reduced performance when symbol probabilities vary.

Method used

The use of multiple codebooks or analytic trees with specific conditions, including unique codability and prefix conditions, allows for flexible codeword assignment based on symbol distributions, enhancing compression efficiency.

Benefits of technology

This approach enables higher compression efficiency by optimizing codeword allocation according to symbol probabilities, ensuring unique encoding and decoding while maintaining data integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024032149_12032026_PF_FP_ABST
    Figure JP2024032149_12032026_PF_FP_ABST
Patent Text Reader

Abstract

This encoding device receives an input symbol string to be encoded, and outputs an output codeword corresponding to the input symbol string. A code book Tk (k=0, 1, ..., K-1) included in a plurality of code books {Tk}k=0 K-1 (where K is an integer of 2 or more) to be used for encoding includes information indicating a correspondence relationship between the symbol string and a codeword having a predetermined length and a code book switching rule, satisfies the condition that, with respect to the code book Tk (k=0, 1, ..., K-1), an encoded prefix set and an input prefix set in the code book Tk are equal, and satisfies the condition that a family of the encoded prefix sets in the plurality of code books {Tk}k=0 K-1 depends on the distribution of the symbol strings input thereto and a uniquely dichotomous condition.
Need to check novelty before this filing date? Find Prior Art

Description

Encoding device, decoding device, data structure

[0001] The present invention relates to a technique for lossless compression coding of finite-precision digital signals or digital data.

[0002] Currently, technologies have been developed for lossless compression coding of finite-precision digital signals and digital data, such as audio signals, image signals, time series signals obtained from various sensors such as brightness sensors, acceleration sensors, and seismometers, character strings, and word strings. Some lossless compression coding technologies output codewords of a fixed length corresponding to an input symbol string. This has the advantage that codewords can be decoded at fixed lengths, making it easier to handle data when performing calculations, searches, and other processing using the codewords as they are without decoding.

[0003] When designing lossless compression coding technology, the rules that determine which codewords are output for which symbol strings (hereafter referred to as encoding rules) are expressed using parse trees or codebooks. For example, in the case of an encoding rule that outputs a 3-bit codeword for a symbol string consisting of a combination of three symbols a, b, and c, it is desirable to assign a symbol string to each of the eight codewords that can be expressed with 3 bits and maximize the expected length of the symbol string encoded with 3 bits for a randomly given symbol string. To achieve this, it is effective to design an encoding rule that assigns 3-bit codewords to symbol strings that contain as many symbols as possible that have a high occurrence probability among the symbols a, b, and c. Figure 1 shows examples of parse trees and codebooks. Figure 1(A) is a parse tree that represents an encoding rule that is effective when the occurrence probability of symbol a is high, and the codebook in Figure 1(B) is equivalent to the parse tree in Figure 1(A). In the parse tree in Figure 1(A), the 3-bit codewords are assigned to the terminal nodes, or leaves, and the individual symbols that make up the symbol string are assigned to the edges. A code with good compression efficiency can be constructed by ensuring that any symbol string can be uniquely encoded. To construct such a code, each node, as in the parse tree in Figure 1(A), must either have no child nodes (i.e., be a leaf), or have as many child nodes as there are symbol types (in this example, three: a, b, and c).

[0004] However, the above-mentioned constraints on nodes are strict, and codes with constant codeword lengths tend to have difficulty improving compression efficiency. For example, in the example of Figure 1, assume that the occurrence probability of symbol a is much higher than that of symbols b and c. In this case, to increase the expected value of the length of the symbol string that can be encoded, it is efficient to assign a codeword to the symbol string aaa, which is a string of symbols a, but in order to satisfy the above constraints, it is necessary to assign a codeword to the symbol string aab and aac even if the occurrence probability of the symbol strings aab and aac is not very high. If the occurrence probability of the symbol strings ba and ca is higher than the occurrence probability of the symbol strings aab and aac, the word length relative to the occurrence probability may be shorter. As a result, the limited codewords are wasted, and compression efficiency decreases.

[0005] Therefore, the technology in Non-Patent Document 1 relaxes the above constraints by using multiple analytic trees. Figure 2 shows examples of analytic trees and codebooks. Figure 2(A) is an analytic tree equivalent to Figure 1(A), and the codebook in Figure 2(B) is equivalent to the analytic tree in Figure 2(A). The analytic tree in Figure 2(A) represents one encoding rule with two analytic trees T0 and T1. In analytic trees T0 and T1, codewords are assigned to nodes other than leaves. By defining an analytic tree switching rule such that when a codeword assigned to a node other than a leaf is output, the next symbol string is encoded using analytic tree T1, and when a codeword assigned to a leaf is output, the next symbol string is encoded using analytic tree T0, compression efficiency is improved while ensuring that any input symbol string can be uniquely encoded. In the analytic tree in Figure 2(A), codewords are assigned to nodes other than leaves, so the node does not need to have child nodes equal to the number of symbol types. Therefore, as can be seen from FIG. 2, it is not necessary to assign code words to the symbol strings aab and aac, and instead it is possible to assign code words to the symbol strings ba and ca.

[0006] H. Yamamoto, H. Yokoo, “Average-Sense Optimality and Competitive Optimality for Almost Instantaneous VF Codes,” in IEEE Transactions on Information Theory, vol.47, no.6, pp.2174-2184, Sep. 2001.

[0007] The technology of Non-Patent Document 1 can construct codes with higher compression efficiency than conventional codes expressed using a single codebook or analytic tree. However, the technology of Non-Patent Document 1 can only express a limited number of codes that can be expressed using multiple codebooks or analytic trees. In other words, there is a problem in that it is not possible to construct codes with higher compression efficiency that can be expressed using multiple codebooks or analytic trees.

[0008] Therefore, an object of the present invention is to provide an encoding / decoding technique using a plurality of codebooks or analytic trees that can represent codes with higher compression efficiency.

[0009] One aspect of the present invention is a coding device that receives a symbol string to be coded (hereinafter referred to as an input symbol string) as input and outputs a codeword (hereinafter referred to as an output codeword) corresponding to the input symbol string, the coding device including: k} k=0 K-1 (where K is an integer of 2 or more) to obtain a codeword corresponding to a symbol string constituting the input symbol string, and to output a codeword obtained by concatenating the obtained codewords as the output codeword; k (k=0, 1, ..., K-1) contains information indicating the correspondence between a symbol string and a codeword of a predetermined length and the codebook switching rule. k The set of coded prefixes is expressed as codebook T k The codebook T is a set of all symbols that can be used as prefixes of a symbol string that can be coded when coding is started from k When the coding is started from the codebook that first uses the input prefix set of kis the set of all possible prefixes of a string of symbols that can be coded using the codebook T k For (k=0, 1,…, K-1), the codebook T k The set of coded prefixes of the codebook {T k} k=0 K-1 The set of coded prefixes of k} k=0 K-1 All codebooks T included in k Let the set be a set whose elements are the coded prefix sets of the multiple codebooks {T k} k=0 K-1 The coded prefix family satisfies the following conditions: (1) it depends on the distribution of the input symbol string; and (2) it includes a set consisting of all symbols, and for any set included in the coded prefix family, a unique partition of the set can be constructed by selecting two sets from the coded prefix family or a set whose elements are all single-symbol sets.

[0010] One aspect of the present invention is a decoding device that receives a codeword to be decoded (hereinafter referred to as an input codeword) as input and outputs a symbol string corresponding to the input codeword (hereinafter referred to as an output symbol string), the decoding device including: k} k=0 K-1 (where K is an integer greater than or equal to 2, k} k=0 K-1 a decoding unit that obtains symbol strings corresponding to codewords that constitute the input codeword using a plurality of codebooks (T are a plurality of codebooks used in the encoding process of the input codeword), and outputs a symbol string obtained by concatenating the obtained symbol strings as the output symbol string; k (k=0, 1, ..., K-1) contains information indicating the correspondence between a symbol string and a codeword of a predetermined length and the codebook switching rule. k The set of coded prefixes is expressed as codebook T k The codebook T is a set of all symbols that can be used as prefixes of a symbol string that can be coded when coding is started from kWhen the coding is started from the codebook that first uses the input prefix set of k is the set of all possible prefixes of a string of symbols that can be coded using the codebook T k For (k=0, 1,…, K-1), the codebook T k The set of coded prefixes of the codebook {T k} k=0 K-1 The set of coded prefixes of k} k=0 K-1 All codebooks T included in k Let the set be a set whose elements are the coded prefix sets of the multiple codebooks {T k} k=0 K-1 The coded prefix family satisfies the following conditions: (1) it depends on the distribution of the input symbol string; and (2) it includes a set consisting of all symbols, and for any set included in the coded prefix family, a unique partition of the set can be constructed by selecting two sets from the coded prefix family or a set whose elements are all single-symbol sets.

[0011] According to the present invention, by using a plurality of codebooks or analytic trees that satisfy predetermined conditions, it is possible to realize codes with higher compression efficiency.

[0012] 1 is a diagram showing an example of an analytic tree and a codebook. FIG. 2 is a diagram showing an example of an analytic tree and a codebook. FIG. 3 is a diagram showing an example of a codebook. FIG. 4 is a block diagram showing the configuration of an encoding device 100. FIG. 5 is a flowchart showing the operation of the encoding device 100. FIG. 6 is a block diagram showing the configuration of a decoding device 200. FIG. 7 is a flowchart showing the operation of the decoding device 200. FIG. 8 is a diagram showing an example of a codebook. FIG. 9 is a diagram showing an example of a codebook. FIG. 10 is a diagram showing an example of a codebook. FIG. 11 is a diagram showing an example of a correspondence table. FIG. 12 is a diagram showing an example of a codebook. FIG. 13 is a diagram showing an example of a correspondence table. FIG. 14 is a diagram showing an example of a codebook. FIG. 15 is a diagram showing an example of an inductive construction process of a codebook. FIG. 16 is a diagram showing an example of a set of coded prefixes that satisfy the unique bisection condition. FIG. 17 is a diagram showing an example of a code tree and a codebook. FIG. 18 is a diagram showing an example of the functional configuration of a computer that realizes each device in an embodiment of the present invention.

[0013] Hereinafter, an embodiment of the present invention will be described in detail. Note that components having the same functions are given the same numbers and redundant explanations will be omitted.

[0014] Before describing each embodiment, the notation used in this specification will be explained.

[0015] ^ (caret) represents a superscript, e.g., x y^z Yes z is a superscript to x, and x y^z Yes z is a subscript to x. Also, _ (underscore) represents a subscript. For example, x y_z Yes z is a superscript to x, and x y_z Yes z is a subscript to x.

[0016] The superscripts "^" and "~" such as ^x and ~x for a certain letter x should be written directly above the "x", but due to restrictions on the notation in the specification, they are written as ^x and ~x.

[0017] <Technical Background> In encoding / decoding according to an embodiment of the present invention, multiple codebooks with predetermined structures are used to express coding rules that satisfy the condition that coding can be performed uniquely (hereinafter referred to as the unique codability condition). Note that analytic trees may be used instead of codebooks, and this does not result in any difference in the encoding procedure / decoding procedure.

[0018] <<1: Codebook / Analysis Tree>> First, a mode, a concept necessary for explaining the codebook in the first embodiment, will be described. A set of symbol strings for a codebook is defined as a mode. A mode is assigned to each of multiple codebooks used for encoding / decoding. Since the modes assigned to a codebook are defined as a set of symbol strings, it is assumed that there is no duplication of symbol strings included in a mode. It is preferable that the mode satisfy a prefix condition. Here, the prefix condition is a condition that, for any symbol string included in a set whose elements are symbol strings, the symbol string does not become the prefix of any other symbol string included in the set. For example, if there are two codebooks, codebook T0 and codebook T1, the modes assigned to codebook T0 and the modes assigned to codebook T1 can be defined as {aab, abc, aca} and {ac, ba}, respectively.

[0019] The codebook in the first embodiment is composed of a triplet consisting of an input symbol string, an output codeword of a predetermined length, and the next codebook to be used (hereinafter referred to as the link destination). FIG. 3 shows an example of a codebook. The codebook in FIG. 3 is used to encode a symbol string of symbols {a, b, c} into a codeword of codes {0, 1}, and consists of five codebooks: T0, T1, T2, T3, and T4. Note that the length of the output codeword in the codebooks T0, T1, T2, T3, and T4 is 2. In FIG. 3, ε represents a symbol string of length 0. Note that the symbol string ε can be the prefix of any symbol string. The mode {ε} is assigned to the codebook T0, and the mode {a, b} is assigned to the codebook T1. Furthermore, the codebook T0 outputs codeword 00 for the symbol string a, and the next codebook to be used is T1. The codebook T0 outputs codeword 01 for the symbol string ε, and the next codebook to be used is T2.

[0020] Next, we will explain the conditions required for a codebook so that encoding / decoding in the first embodiment satisfies the unique codability condition. To this end, we will define the concept of an expansion symbol string. A symbol string is an expansion symbol string of a codebook when it is obtained by concatenating a symbol string included in the codebook with a symbol string that is an element of a mode assigned to the next codebook to be used and that corresponds to the symbol string. Here, a symbol string included in a codebook refers to a symbol string that is an element of a triplet that constitutes the codebook. For example, the expanded symbol strings of codebook T2 in FIG. 3 are the symbol string aca obtained by concatenating the symbol string aca with the symbol string ε that is an element of the mode {ε} assigned to the codebook T0 to be used next and that corresponds to the symbol string aca, the symbol string baa obtained by concatenating the symbol string baa with the symbol string ε that is an element of the mode {ε} assigned to the codebook T0 to be used next and that corresponds to the symbol string baa, the symbol strings acb and acc obtained by concatenating the symbol string ac with the symbol strings b and c that are elements of the mode {b, c} assigned to the codebook T3 to be used next and that corresponds to the symbol string ac, and the symbol strings bab and bac obtained by concatenating the symbol string ba with the symbol strings b and c that are elements of the mode {b, c} assigned to the codebook T3 to be used next and that corresponds to the symbol string ba.

[0021] The following two conditions are required for the codebook in order for encoding / decoding to satisfy the unique codability condition.

[0022] (1) For any codebook included in a plurality of codebooks, a set consisting of all expansion symbol strings of the codebook satisfies the prefix condition.

[0023] (2) For any codebook included in a plurality of codebooks, the expansion symbol string of the codebook starts with any symbol string included in the mode assigned to the codebook.

[0024] Even if the multiple codebooks used for encoding / decoding do not satisfy the unique codability condition, a codeword encoded using the multiple codebooks can be decoded into a unique symbol string. However, from the viewpoint of compression efficiency, it is preferable that the multiple codebooks used for encoding / decoding satisfy the unique codability condition.

[0025] As mentioned above, the coding rules can also be expressed using analytic trees. Figure 4 shows an example of an analytic tree, and the analytic tree in Figure 4 is equivalent to the codebook in Figure 3. The above explanation of the codebook also applies to analytic trees, simply by replacing the word "codebook" with "analytic tree." By doing so, the following explanation of the analytic tree can be obtained:

[0026] A set of symbol strings for a parse tree is defined as a mode. A mode is assigned to each of the multiple parse trees used for encoding / decoding.

[0027] The analytic tree is composed of a triplet of an input symbol string, an output codeword of a predetermined length, and the next analytic tree to be used (hereinafter referred to as a link destination).

[0028] A symbol string is an expansion symbol string of an analytic tree if it is obtained by concatenating a symbol string included in the analytic tree with a symbol string that is an element of a mode assigned to the next analytic tree corresponding to the symbol string. Here, the symbol string included in the analytic tree refers to a symbol string that is an element of a triple that constitutes the analytic tree.

[0029] The following two conditions are required for the parse tree in order for encoding / decoding to satisfy the unique codability condition.

[0030] (1) For any analytic tree included in a plurality of analytic trees, the set consisting of all the expansion symbol strings of the analytic tree satisfies the prefix condition.

[0031] (2) For any analytic tree included in a plurality of analytic trees, the expanded symbol string of the analytic tree starts with any symbol string included in the mode assigned to the analytic tree.

[0032] <<2: Encoding Procedure / Decoding Procedure>> First, the encoding procedure in the first embodiment will be described. The encoding procedure in the first embodiment takes a symbol string to be encoded (hereinafter referred to as an input symbol string) as input, and encodes the symbol string from a plurality of codebooks {T k} k=0 K-1(where K is an integer equal to or greater than 2) to obtain code words corresponding to the symbol strings that make up the input symbol string, and then output a code word (hereinafter referred to as the output code word) obtained by concatenating all the obtained code words. k} k=0 K-1 In the process of obtaining a code word corresponding to a symbol string constituting an input symbol string using

[0000] , if there is a symbol string (hereinafter referred to as symbol string σ) included in the current codebook that matches the prefix of the current symbol string, and if there is a symbol string included in the mode assigned to the codebook to be used next that matches the prefix of the symbol string obtained by excluding the prefix that matches the symbol string σ from the current symbol string, the code word corresponding to the symbol string σ is obtained, the codebook to be used next that corresponds to the symbol string σ is set as the current codebook, and the symbol string obtained by excluding the prefix that matches the symbol string σ from the current symbol string is set as the current symbol string, and this process is repeated until the length of the current symbol string becomes 0. Here, the current symbol string refers to the symbol string that is currently being encoded, and the current symbol string at the time when encoding starts refers to the input symbol string.

[0033] More specifically, the encoding procedure in the first embodiment comprises the following three processes.

[0034] (1) A predetermined codebook T k is used as the current codebook to start encoding. Here, k is an arbitrary integer between 0 and K-1, for example, k=0. Also, the input symbol string is used as the current symbol string.

[0035] (2) Using the current codebook, the current symbol string is compared with the symbol string contained in the current codebook. If there is a symbol string (hereinafter referred to as symbol string σ) contained in the current codebook that matches the prefix of the current symbol string, and if there is a symbol string contained in the mode assigned to the codebook to be used next that matches the prefix of the symbol string obtained by excluding the prefix that matches the symbol string σ from the current symbol string, the codeword corresponding to the symbol string σ is obtained, the codebook to be used next that corresponds to the symbol string σ is set as the current codebook, and the symbol string obtained by excluding the prefix that matches the symbol string σ from the current symbol string is set as the current symbol string.

[0036] (3) If the length of the current symbol string obtained by process (2) is 0, the code word obtained by concatenating all the code words obtained by process (2) is output as the output code word, and the encoding process ends; otherwise, return to process (2).

[0037] Next, a decoding procedure in the first embodiment will be described. The decoding procedure in the first embodiment involves inputting a codeword to be decoded (hereinafter referred to as an input codeword) and decoding the codeword from a plurality of codebooks {T k} k=0 K-1 (However, if multiple codebooks {T k} k=0 K-1 is the codebook used in the encoding procedure) to obtain symbol strings corresponding to the codewords that make up the input codeword, and then output a symbol string (hereinafter referred to as the output symbol string) obtained by concatenating all the obtained symbol strings. k} k=0 K-1 In the process of obtaining a symbol string corresponding to a codeword constituting an input codeword using [mathematical formula - see original document], a symbol string corresponding to a codeword (hereinafter referred to as codeword w) included in the current codebook that matches the prefix of the current codeword is obtained, the codebook to be used next that corresponds to codeword w is set as the current codebook, and the codeword obtained by removing the prefix that matches codeword w from the current codeword is set as the current codeword. This process is repeated until the length of the current codeword becomes 0. Here, the current codeword is the codeword currently being decoded, and the current codeword at the start of decoding is the input codeword.

[0038] More specifically, the decoding procedure in the first embodiment comprises the following three processes.

[0039] (1) A predetermined codebook T k is set as the current codebook and decoding begins. Here, k is the codebook number used when the encoding process of the input codeword began. Also, the input codeword is set as the current codeword.

[0040] (2) Using the current codebook, compare the current codeword with the codewords contained in the codebook. Obtain a symbol string corresponding to the codeword contained in the current codebook (hereinafter referred to as codeword w) that matches the prefix of the current codeword, and set the codebook to be used next that corresponds to codeword w as the current codebook. Also set the codeword obtained by removing the prefix that matches codeword w from the current codeword as the current codeword.

[0041] (3) If the length of the current codeword obtained by process (2) is 0, the symbol string obtained by concatenating all symbol strings obtained by process (2) is output as the output symbol string, and the decoding process ends; otherwise, return to process (2).

[0042] The encoding procedure / decoding procedure using the above codebook can also be converted to an encoding procedure / decoding procedure using an analytic tree by simply replacing the word "codebook" with "analytic tree."

[0043] <<3: Example of Encoding / Decoding>> Here, as an example of encoding / decoding, encoding / decoding of the symbol string accba when using the codebook in Fig. 3 will be described. First, encoding will be described. Here, it is assumed that codebook T0 is used as the current codebook at the start of the encoding process. The input is the symbol string accba to be encoded, and the symbol string accba is set as the current symbol string.

[0044] (1) Using the current codebook T0, the current symbol string accba is compared with the symbol strings contained in the codebook T0. The symbol string a is included in the current codebook T0 and matches the prefix of the current symbol string accba. However, there is no symbol string included in the mode assigned to the codebook T1 to be used next that matches the prefix of the symbol string ccba obtained by excluding the prefix that matches the symbol string a from the current symbol string accba. Therefore, the symbol string a is not coded as the codeword 00. Next, there is a symbol string ε as a symbol string included in the current codebook T0 that matches the prefix of the current symbol string accba, and there is also a symbol string ac as a symbol string included in the mode assigned to the codebook T2 to be used next that matches the prefix of the symbol string accba obtained by excluding the prefix that matches the symbol string ε from the current symbol string accba. Therefore, the symbol string ε is encoded as codeword 01, the codebook T2 to be used next that corresponds to the symbol string ε is set as the current codebook, and the symbol string accba obtained by excluding the prefix that matches the symbol string ε from the current symbol string accba is set as the current symbol string.

[0045] (2) Using the current codebook T2, the current symbol string accba is compared with the symbol strings contained in the codebook T2. There is a symbol string ac as a symbol string contained in the current codebook T2 that matches the prefix of the current symbol string accba, and there is also a symbol string c as a symbol string contained in the mode assigned to the codebook T3 to be used next that matches the prefix of the symbol string cba obtained by excluding the prefix that matches the symbol string ac from the current symbol string accba. Therefore, the symbol string ac is encoded into codeword 10, the codebook T3 to be used next that corresponds to the symbol string ac is set as the current codebook, and the symbol string cba obtained by excluding the prefix that matches the symbol string ac from the current symbol string accba is set as the current symbol string.

[0046] (3) Using the current codebook T3, the current symbol string cba is compared with the codewords contained in that codebook T3. There is a symbol string ε as a symbol string contained in the current codebook T3 that matches the prefix of the current symbol string cba, but there is no symbol string contained in the mode assigned to the codebook T4 to be used next that matches the prefix of the symbol string cba obtained by excluding the prefix that matches the symbol string ε from the current symbol string cba; therefore, the symbol string ε is not encoded into codeword 10. Next, there is a symbol string c as a symbol string contained in the current codebook T3 that matches the prefix of the current symbol string cba, and there is a symbol string b as a symbol string contained in the mode assigned to the codebook T3 to be used next that matches the prefix of the symbol string ba obtained by excluding the prefix that matches the symbol string c from the current symbol string cba; therefore, the symbol string c is encoded into codeword 11, the codebook T3 to be used next that corresponds to the symbol string c is set as the current codebook, and the symbol string ba obtained by excluding the prefix that matches the symbol string c from the current symbol string cba is set as the current codeword.

[0047] (4) Using the current codebook T3, the current symbol string ba is compared with the symbol strings contained in the codebook T3. There is a symbol string ba as a symbol string contained in the current codebook T3 that matches the prefix of the current symbol string ba, and there is also a symbol string ε as a symbol string contained in the mode assigned to the codebook T0 to be used next that matches the prefix of the symbol string ε obtained by excluding the prefixes that match the symbol string ba from the current symbol string ba. Therefore, the symbol string ba is encoded as codeword 00, the codebook T0 to be used next that corresponds to the symbol string ba is set as the current codebook, and the symbol string ε obtained by excluding the prefixes that match the symbol string ba from the current symbol string ba is set as the current symbol string.

[0048] (5) Since the current symbol string ε is a symbol string of length 0, the code word 01101100 is output.

[0049] Next, decoding will be explained. At the start of the decoding process, the codebook T0 used at the start of the encoding process is set as the current codebook. The input is the codeword 01101100 to be decoded, and the codeword 01101100 is set as the current codeword. Also, λ represents a codeword of length 0.

[0050] (1) For the first two bits of codeword 01 of the current codeword 01101100, obtain a symbol string ε as a symbol string corresponding to codeword 01 using the current codebook T0, and use the codebook T2 to be used next that corresponds to codeword 01 as the current codebook. Also, use the codeword 101100, obtained by removing the first two bits of codeword 01 from the current codeword 01101100, as the current codeword.

[0051] (2) For the first two bits of the current codeword 101100, codeword 10, a symbol string ac is obtained as a symbol string corresponding to codeword 10 using the current codebook T2, and the next codebook T3 to be used corresponding to codeword 10 is set as the current codebook. Codeword 1100, obtained by removing the first two bits of codeword 10 from the current codeword 101100, is set as the current codeword.

[0052] (3) For the first two bits of codeword 11 of the current codeword 1100, obtain symbol string c as the symbol string corresponding to codeword 11 using the current codebook T3, and use the codebook T3 to be used next that corresponds to codeword 11 as the current codebook. Also, use codeword 00, which is the current codeword 1100 minus the first two bits of codeword 11, as the current codeword.

[0053] (4) For the first two bits of the current codeword 00, obtain the symbol string ba as the symbol string corresponding to the codeword 00 using the current codebook T3, and use the codebook T0 to be used next that corresponds to the codeword 00 as the current codebook. Also, use the codeword λ obtained by removing the first two bits of the codeword 00 from the current codeword 00 as the current codeword.

[0054] (5) Since the current codeword λ is a codeword of length 0, the symbol string εaccba, that is, the symbol string accba, is output.

[0055] (Variation 1) In the above explanation, the conditions for multiple codebooks to enable unique encoding were shown, but as long as unique decoding is possible, a code is sufficient even if it cannot be uniquely encoded. Here, encoding / decoding using multiple codebooks that cannot enable unique encoding will be explained.

[0056] The codebook in the first modification of the first embodiment also consists of a triplet of an input symbol string, an output codeword of a predetermined length, and a codebook to be used next (hereinafter referred to as a link destination), and a mode is assigned to each triplet. However, the codebook in the first modification of the first embodiment differs from the codebook in the first embodiment in that, among the conditions required for a codebook to satisfy the unique codability condition for encoding / decoding, the codebook satisfies condition (2) but does not satisfy condition (1).

[0057] The codebook in Modification 1 of the first embodiment will be described below using an example. FIG. 5 is a diagram showing an example of a codebook. FIG. 5 shows a codebook in Modification 1 of the first embodiment. Like the codebook in FIG. 3, this codebook is used to encode a symbol string that is a string of symbols {a, b, c} into a codeword that is a string of codes {0, 1}, and consists of five codebooks: T0, T1, T2, T3, and T4. However, codebook T0 differs from the codebook in FIG. 3 only in that the link destination for symbol string ε in codebook T0 is T1. The set of all expanded symbol strings in codebook T0 is {aa, ab, a, b, bb, bc, c}, and element a is, for example, the prefix of element aa, so condition (1) is not satisfied. On the other hand, all expanded symbol strings in codebook T0 start with symbol string ε included in mode {ε} assigned to codebook T0, so condition (2) is satisfied.

[0058] In the encoding procedure in Variation 1 of the first embodiment, there may be a plurality of symbol strings σ that satisfy the condition in (2) of the encoding procedure in the first embodiment, that is, "there exists a symbol string (hereinafter referred to as symbol string σ) included in the current codebook that matches the prefix of the current symbol string, and there exists a symbol string included in the mode assigned to the codebook to be used next that matches the prefix of the symbol string obtained by excluding the prefix that matches the symbol string σ from the current symbol string." Therefore, in the encoding procedure in Variation 1 of the first embodiment, it is preferable to select any one of the symbol strings σ that satisfy the above condition in (2), and then perform a process of obtaining a codeword and a process of determining the current codebook and the current symbol string. Meanwhile, the decoding procedure may be the same as that of the first embodiment.

[0059] First Embodiment An encoding device 100 according to this embodiment receives as input a symbol string to be encoded (hereinafter referred to as an input symbol string) and outputs a codeword corresponding to the input symbol string (hereinafter referred to as an output codeword). A decoding device 200 according to this embodiment receives as input a codeword to be decoded (hereinafter referred to as an input codeword) and outputs a symbol string corresponding to the input codeword (hereinafter referred to as an output symbol string).

[0060] Here, a codeword is a string formed by lining up two codes {0, 1}. As explained in the <Technical Background>, a code string of length 0 is represented as λ. A symbol is an element of a set consisting of a finite number of elements, and may be text consisting of letters or words, such as a, b, and c, which are elements of the alphabet set {a, b, c}. A symbol string is a string formed by lining up symbols, and for example, abbaa is a symbol string of length 5 for two symbols {a, b}. As explained in the <Technical Background>, a symbol string of length 0 is represented as ε. The following series, which are quantized to finite precision, can be used as symbol strings:

[0061] (1) Time series signals obtained from various sensors such as audio signals, image signals, brightness sensors, acceleration sensors, and seismometers. (2) A series of spectral values ​​obtained by performing discrete Fourier transform, discrete cosine transform, modified discrete cosine transform, etc. on the signal in (1). (3) A series of linear prediction coefficients, line spectral pairs (LSPs), immittance spectral pairs (ISPs), and partial autocorrelation coefficients (PARCOR coefficients) obtained by linear prediction analysis of the signal in (1). (4) A series of features obtained by inputting the signal in (1) into a neural network. In other words, the symbol string is a series of finite-precision digital signals or digital data.

[0062] The encoding device 100 and the decoding device 200 use a plurality of codebooks or parse trees {T k} k=0 K-1 (where K is an integer greater than or equal to 2) is a data structure with the following characteristics:

[0063] (1) Codebook or parse tree T k (k=0, 1, ..., K-1) consists of a triplet of a symbol string, a codeword of a predetermined length, and the codebook or parse tree to be used next, and is assigned a mode, which is a set of symbol strings.

[0064] (2) Codebook or parse tree T k The set of all expanded symbol sequences (k=0, 1,…, K-1) satisfies the prefix condition, and the codebook or parse tree T k The expanded symbol string (k=0, 1, . . . , K-1) satisfies the condition that any symbol string included in the mode assigned to the codebook or parse tree begins with the word.

[0065] As explained in the Technical Background, multiple codebooks or parse trees {T k} k=0 K-1 satisfies conditions (1) and (2), multiple codebooks or parse trees {T k} k=0 K-1 satisfies the unique codability condition. However, if multiple codebooks or parse trees {T k} k=0 K-1 is sufficient as a code if it satisfies condition (2).

[0066] <<Encoding Device 100>> The encoding device 100 will be described below with reference to Figs. 6 and 7. Fig. 6 is a block diagram showing the configuration of the encoding device 100. Fig. 7 is a flowchart showing the operation of the encoding device 100. As shown in Fig. 6, the encoding device 100 includes an encoding unit 110 and a recording unit 190. The recording unit 190 is a component that appropriately records information necessary for the processing of the encoding device 100. The recording unit 190 stores, for example, a plurality of codebooks or parse trees {T k} k=0 K-1 Keep a record of the following.

[0067] The operation of the encoding device 100 will be described with reference to FIG.

[0068] In S110, the encoding unit 110 generates a plurality of codebooks or parse trees {T k} k=0K-1 The encoding unit 110 obtains a code word corresponding to the symbol string that constitutes the input symbol string using the above-mentioned arithmetic operations, and outputs the code word obtained by concatenating the obtained code words as the output code word. The encoding unit 110 executes an encoding process consisting of the following three processes.

[0069] (1) Codebook or parse tree T k (where k is an integer between 0 and K-1) as the current codebook or analytic tree, and the input symbol string is the current symbol string. (2) Using the current codebook or analytic tree, the current symbol string is compared with the symbol strings contained in the codebook or analytic tree, and if there is a symbol string contained in the current codebook or analytic tree (hereinafter referred to as symbol string σ) that matches the prefix of the current symbol string, and if there is a symbol string contained in the mode assigned to the codebook or analytic tree to be used next that matches the prefix of the symbol string obtained by excluding the prefix that matches the symbol string σ from the current symbol string, the codeword corresponding to the symbol string σ is obtained, and the codebook or analytic tree to be used next that corresponds to the symbol string σ is set as the current codebook or analytic tree, and the symbol string obtained by excluding the prefix that matches the symbol string σ from the current symbol string is set as the current symbol string. (3) If the length of the current symbol string obtained by the process (2) is 0, the codeword obtained by concatenating all the codewords obtained by the process (2) is output as the output codeword, and the encoding process is terminated; otherwise, the process returns to the process (2). Here, the mode can be said to be a set assigned in the encoding process to confirm whether it is correct to use the next codebook or analytic tree corresponding to the symbol string contained in the codebook or analytic tree as the current codebook or analytic tree to encode the next current codeword.

[0070] <<Decoding Device 200>> The decoding device 200 will be described below with reference to Figs. 8 and 9. Fig. 8 is a block diagram showing the configuration of the decoding device 200. Fig. 9 is a flowchart showing the operation of the decoding device 200. As shown in Fig. 8, the decoding device 200 includes a decoding unit 210 and a recording unit 290. The recording unit 290 is a component that appropriately records information necessary for the processing of the decoding device 200. The recording unit 290 stores, for example, a plurality of codebooks or parse trees {T k} k=0 K-1(However, {T k} k=0 K-1 The input codeword is encoded using a plurality of codebooks or parse trees.

[0071] The operation of the decoding device 200 will be described with reference to FIG.

[0072] In S210, the decoding unit 210 generates a plurality of codebooks or parse trees {T k} k=0 K-1 The decoding unit 210 obtains symbol strings corresponding to the code words that make up the input code word using the above, and outputs the symbol string obtained by concatenating the obtained symbol strings as an output symbol string. The decoding unit 210 executes a decoding process consisting of the following three processes.

[0073] (1) Codebook or parse tree T k (where k is the codebook or analytic tree number used when the encoding process for the input codeword was started) as the current codebook or analytic tree, and the input codeword as the current codeword. (2) Using the current codebook or analytic tree, compare the current codeword with the codewords contained in the codebook or analytic tree, obtain a symbol string corresponding to a codeword contained in the current codebook or analytic tree that matches the prefix of the current codeword (hereinafter referred to as codeword w), set the codebook or analytic tree to be used next corresponding to codeword w as the current codebook or analytic tree, and set the codeword obtained by removing the prefix matching codeword w from the current codeword as the current codeword. (3) If the length of the current codeword obtained by process (2) is zero, output the symbol string obtained by concatenating all symbol strings obtained by process (2) as the output symbol string, and end the decoding process. Otherwise, return to process (2). According to an embodiment of the present invention, by using multiple codebooks or analytic trees with a predetermined structure, it is possible to realize codes with higher compression efficiency. Furthermore, by making multiple codebooks or analytic trees satisfy predetermined conditions, it is possible to easily design codes that can be uniquely encoded.

[0074] In the first embodiment, the concept of a mode was introduced, and encoding / decoding using a plurality of codebooks, each of which is assigned a mode, was described. However, it is possible to configure a codebook equivalent to the codebook in the first embodiment without specifying the modes assigned to the codebooks. Furthermore, it is possible to configure a codebook equivalent to the codebook in the first embodiment not only without specifying the modes assigned to the codebooks, but also without including the codebook to be used next as a component of the codebook. By using a codebook configured in this manner, it is possible in some cases to reduce the memory required for processing and improve the processing speed compared to when the codebook in the first embodiment is used.

[0075] The technical background of encoding / decoding in the second embodiment will be described below.

[0076] <Technical Background> <<1: Codebook>> First, several concepts necessary for explaining the codebook in the second embodiment will be defined.

[0077] A string σ and a set of strings S={σ0, σ1, …, σ N-1} (where N is an integer equal to or greater than 1), the set of symbol strings σ+S is the set of symbol strings obtained by concatenating the symbol string σ and the symbol strings that are elements of the set of symbol strings S. Therefore, σ+S={σσ0, σσ1, …, σσ N-1}.

[0078] Let Sym be a set of symbols, P and Q be integers greater than or equal to 0 such that P≦Q, and let σ=s0s1…s be a string of P symbols. P-1 (However, s i Extending a symbol string consisting of Q symbols (i=0, 1, …, P-1) (where i=0, 1, …, P-1) is a symbol included in the symbol set Sym) means concatenating a symbol string consisting of any QP symbols to the symbol string σ. Also, the set of symbol strings T obtained by extending a symbol string consisting of P symbols σ to a symbol string consisting of Q symbols is defined as the set of all symbol strings obtained by extending a symbol string consisting of P symbols σ to a symbol string consisting of Q symbols. Therefore, T={s0s1…s P-1 s P s P+1 …s Q-1| s i (i=P, P+1, …, Q-1) represents any symbol included in the set of symbols Sym}. In other words, the set T is |Sym| Q-P Furthermore, P n (n=0, …, N-1, N is an integer equal to or greater than 1), Q is P n Let Q be an integer greater than or equal to 0, and let the set of symbol strings {σ0, …, σ N-1} (where σ n (n=0, …, N-1) is P n A set of symbol strings T' obtained by extending the symbol string consisting of Q symbols from the symbol string consisting of Q symbols is called P n A string σ consisting of symbols n Let T be a set of strings consisting of Q symbols. n (n=0, …, N-1). For example, if the set of symbols is Sym={a, b, c}, then the set of symbol strings {ε} expanded to two-symbol strings is {aa, ab, ac, ba, bb, bc, ca, cb, cc}. Also, the set of symbol strings {a, b, ca} expanded to two-symbol strings is {aa, ab, ac, ba, bb, bc, ca}, the union of {aa, ab, ac}, {ba, bb, bc}, and {ca}.

[0079] The codebook in the second embodiment is composed of a triplet consisting of a set of symbol strings beginning with an input symbol string (hereinafter referred to as an input set), an output codeword of a predetermined length, and a codebook to be used next (hereinafter referred to as a link destination). Unlike the codebook in the first embodiment, no mode is assigned to the codebook.

[0080] The codebooks in the second embodiment will be described below using examples. Fig. 10 is a diagram showing an example of a codebook. Fig. 10 shows a codebook in the second embodiment, which is equivalent to the codebook in Fig. 3, i.e., which shows the same encoding rules. The codebook in Fig. 10 is used to encode a symbol string that is a string of symbols {a, b, c} into a codeword that is a string of codes {0, 1}, and consists of five codebooks: T0, T1, T2, T3, and T4.

[0081] An input set, which is a component of a codebook in the second embodiment, is generated using the symbol strings, which are the component of the codebook in the first embodiment, and the modes assigned to the codebook to be used next. An example will be described using codebook T0. In FIG. 3, the mode assigned to the codebook T1 to be used next, corresponding to symbol string a, is {a, b}. Here, the longest symbol string among the symbol strings included in the modes assigned to codebooks T0, T1, T2, T3, and T4, contains two symbols. Furthermore, the set of symbol strings obtained by expanding the set of symbol strings {a, b} to a string consisting of two symbols is {aa, ab, ac, ba, bb, bc}. Therefore, the input set corresponding to symbol string a is defined as a+{aa, ab, ac, ba, bb, bc}={aaa, aab, aac, aba, abb, abc} (see FIG. 10). Similarly, in Fig. 3, the mode assigned to the next codebook T2 corresponding to the symbol string ε is {ac, ba}, and the set of symbol strings obtained by extending the set of symbol strings {ac, ba} to two symbols is {ac, ba}, so the input set corresponding to the symbol string ε is set to ε+{ac, ba}={ac, ba} (see Fig. 10). Also, in Fig. 3, the mode assigned to the next codebook T3 corresponding to the symbol string b is {b, c}, and the set of symbol strings obtained by extending the set of symbol strings {b, c} to two symbols is {ba, bb, bc, ca, cb, cc}, so the input set corresponding to the symbol string b is set to b+{ba, bb, bc, ca, cb, cc}={bba, bbb, bbc, bca, bcb, bcc} (see Fig. 10).

[0082] In encoding / decoding, prefixes and suffixes of the symbol strings that are elements of the input set are treated differently. In the following, to distinguish them from the general terms prefix and suffix, the prefixes and suffixes of the symbol strings that are elements of the input set will be referred to as predetermined prefixes and predetermined suffixes, respectively, and will be defined as follows:

[0083] For a symbol string that is an element of the input set, the predetermined prefix and predetermined suffix are respectively the longest prefix common to all elements of the input set, and the symbol string minus the predetermined prefix of the symbol string.

[0084] The predetermined prefix of a symbol string that is an element of the input set does not have to be the longest prefix common to all elements of the input set, but can be any length among prefixes common to all elements of the input set. In this case, the predetermined prefix and predetermined suffix of a symbol string that is an element of the input set are defined as follows:

[0085] For a symbol string that is an element of an input set, the predetermined prefix and predetermined suffix are respectively a prefix common to all elements of the input set and the symbol string obtained by removing the predetermined prefix of the symbol string.

[0086] As can be seen from the above definition, the predetermined prefixes of symbol strings that are elements of an input set are always the same, so one predetermined prefix is ​​determined for each input set. On the other hand, the predetermined endings of symbol strings that are elements of an input set are not always the same, so one or more predetermined endings are determined for each input set. Therefore, the predetermined prefixes of symbol strings that are elements of an input set are called the predetermined prefixes of the input set, and the set of predetermined endings of symbol strings that are elements of the input set is called the set of predetermined endings of the input set.

[0087] In the following examples in the Technical Background, a given prefix of a symbol string that is an element of an input set will be described as the longest prefix common to all elements of the input set.

[0088] An example will be described using codebook T0. In Fig. 10, the longest prefix common to all elements of the input set {aaa, aab, aac, aba, abb, abc} is a. Therefore, the predetermined prefix for the input set {aaa, aab, aac, aba, abb, abc} is a, and the predetermined set of suffixes is {aa, ab, ac, ba, bb, bc}. Similarly, in Fig. 10, the longest prefix common to all elements of the input set {ac, ba} is ε, so the predetermined prefix for the input set {ac, ba} is ε, and the predetermined set of suffixes is {ac, ba}. In addition, in FIG. 10, the longest prefix common to all elements of the input set {bba, bbb, bbc, bca, bcb, bcc} is b, so the predetermined prefix of the input set {bba, bbb, bbc, bca, bcb, bcc} is b, and the predetermined suffix set is {ba, bb, bc, ca, cb, cc}.

[0089] As can be seen from the above explanation, in the example of Fig. 10, the last two symbols of a symbol string that is an element of the input set become the predetermined suffix of the symbol string. Therefore, the predetermined suffix set of the input set corresponding to a certain codeword corresponds to the mode of the codebook to be used next that corresponds to the codeword in the first embodiment. In other words, it can be seen that by using the input set, it is not necessary to specify the mode.

[0090] The method for determining the predetermined prefix and suffix for the symbol strings that are elements of the input set is shared between the encoding side and the decoding side.

[0091] Furthermore, the following two conditions are required for the codebook in order for encoding / decoding to satisfy the unique codability condition.

[0092] (1) For any codebook included in a plurality of codebooks, the union of the input sets of the codebooks satisfies the prefix condition.

[0093] (2) For any codebook included in the plurality of codebooks, a symbol string included in the input set of the next codebook to be used, which corresponds to a codeword of the codebook, has a predetermined suffix at the beginning of one of the symbol strings included in the input set corresponding to the codeword.

[0094] Here, the input set of a codebook refers to all input sets contained in that codebook. For example, the input set of codebook T0 is {aaa, aab, aac, aba, abb, abc}, {ac, ba}, {bba, bbb, bbc, bca, bcb, bcc}, {caa, cab, cac, cba, cbb, cbc, cca, ccb, ​​ccc}. Furthermore, the codebook to be used after a codebook refers to all codebooks to be used next contained in that codebook. For example, the codebook to be used after codebook T0 is T1, T2, T3, and T0.

[0095] The above conditions (1) and (2) correspond to the conditions (1) and (2) of the unique encoding possibility condition in the first embodiment. Therefore, in the second embodiment, as in the first modification of the first embodiment, multiple codebooks may satisfy the condition (2) but not the condition (1).

[0096] (Modification 1) The codebook in the second embodiment can be expressed more simply, as will be explained below.

[0097] The codebook in the first modification of the second embodiment is also composed of a triplet consisting of a set of symbol strings beginning with an input symbol string (hereinafter referred to as an input set), an output codeword of a predetermined length, and a codebook to be used next (hereinafter referred to as a link destination). However, the codebook in the first modification of the second embodiment differs from the codebook in the second embodiment in the way the input set is represented.

[0098] The codebooks in Modification 1 of the second embodiment will be described below using examples. Fig. 11 is a diagram showing an example of a codebook. Fig. 11 shows a codebook in Modification 1 of the second embodiment, and this codebook is equivalent to the codebooks in Fig. 3 and Fig. 10, i.e., it shows the same encoding rules. The codebook in Fig. 11 is used to encode a symbol string that is a string of symbols {a, b, c} into a codeword that is a string of codes {0, 1}, and consists of five codebooks: T0, T1, T2, T3, and T4.

[0099] The input set, which is a component of a codebook in Variation 1 of the second embodiment, is generated using the symbol strings, which are component of the codebook in the first embodiment, and the modes assigned to the codebook to be used next. An example will be described using codebook T0. In FIG. 3, the mode assigned to the codebook T1 to be used next, corresponding to symbol string a, is {a, b}. Therefore, the input set corresponding to symbol string a is set as a+{a, b}={aa, ab} (see FIG. 11). Similarly, in FIG. 3, the mode assigned to the codebook T2 to be used next, corresponding to symbol string ε, is set as {ac, ba}, so the input set corresponding to symbol string ε is set as ε+{ac, ba}={ac, ba} (see FIG. 11). Furthermore, in FIG. 3, the mode assigned to the codebook T3 to be used next, corresponding to symbol string b, is set as {b, c}, so the input set corresponding to symbol string b is set as b+{b, c}={bb, bc} (see FIG. 11).

[0100] The definitions of the predetermined prefixes and suffixes for the symbol strings that are elements of the input set are the same as above.

[0101] An example will be taken of codebook T0. In Fig. 11, the longest prefix common to all elements of input set {aa, ab} is a. Therefore, the predetermined prefix for input set {aa, ab} is a, and the predetermined set of suffixes is {a, b}. Similarly, in Fig. 11, the longest prefix common to all elements of input set {ac, ba} is ε, so the predetermined prefix for input set {ac, ba} is ε, and the predetermined set of suffixes is {ac, ba}. Also, in Fig. 11, the longest prefix common to all elements of input set {bb, bc} is b, so the predetermined prefix for input set {bb, bc} is b, and the predetermined set of suffixes is {b, c}.

[0102] As can be seen from the above explanation, the predetermined suffix set of the input set corresponding to a certain codeword coincides with the mode of the codebook to be used next corresponding to the codeword in the first embodiment. In other words, by using the input set, it is not necessary to specify the mode.

[0103] The conditions required for the codebook to satisfy the unique coding possibility condition for encoding / decoding are the same as those mentioned above.

[0104] (Variation 2) In the second embodiment and its variation 1, the codebooks are described as being configured as triplet sets, but the predetermined suffix set of the input set corresponding to a certain codeword corresponds to or coincides with the mode of the next codebook to be used corresponding to that codeword in the first embodiment. Therefore, when the modes assigned to codebooks differ among multiple codebooks, the codebooks can be configured as doublet sets by expressing them using a correspondence table consisting of pairs of the predetermined suffix set of the input set and the next codebook to be used. Note that a function can also be used instead of the correspondence table.

[0105] The codebook in the second modification of the second embodiment is composed of a set of symbol strings (hereinafter referred to as an input set) that starts with an input symbol string, and a pair of output codewords of a predetermined length. The codebook in the second modification of the second embodiment is used together with a correspondence table (hereinafter referred to as a transition correspondence table) that consists of pairs of a predetermined suffix set of the input set and the codebook to be used next, or a function (hereinafter referred to as a transition function) that receives the predetermined suffix set of the input set as input and outputs the codebook to be used next.

[0106] The codebook in Modification 2 of the second embodiment will be described below using an example. Fig. 12 and Fig. 13 are diagrams showing an example of a codebook and an example of a correspondence table, respectively. Fig. 12 shows a codebook in Modification 2 of the second embodiment, which is a codebook configured from pairs of input sets and codewords, which are components of the codebook in Fig. 10. Fig. 13 shows a correspondence table used together with the codebook in Fig. 12.

[0107] Fig. 14 and Fig. 15 are diagrams showing an example of a codebook and an example of a correspondence table, respectively. Fig. 14 shows a codebook in Modification 2 of the second embodiment, which is a codebook configured from pairs of input sets and codewords, which are components of the codebook in Fig. 11. Fig. 15 shows a correspondence table used together with the codebook in Fig. 14.

[0108] The coding rules can also be expressed using analytic trees. Therefore, the above explanation of the codebook also applies to analytic trees, simply by replacing the word "codebook" with "analytic tree."

[0109] <<2: Encoding Procedure / Decoding Procedure>> First, the encoding procedure in the second embodiment will be described. The encoding procedure in the second embodiment takes a symbol string to be encoded (hereinafter referred to as an input symbol string) as input, and encodes the symbol string from a plurality of codebooks {T k} k=0 K-1 (where K is an integer equal to or greater than 2) to obtain code words corresponding to the symbol strings that make up the input symbol string, and then output a code word (hereinafter referred to as the output code word) obtained by concatenating all the obtained code words. k} k=0 K-1 In the process of obtaining a code word corresponding to a symbol string constituting an input symbol string using

[0000] , if there is a symbol string (hereinafter referred to as symbol string σ) included in the input set of the current codebook that matches the prefix of the current symbol string, a code word corresponding to the input set including that symbol string σ is obtained, the codebook to be used next that corresponds to the input set including that symbol string σ is set as the current codebook, and a symbol string obtained by excluding from the current symbol string any prefix that matches the predetermined prefix of any symbol string included in the input set including that symbol string σ is set as the current symbol string, and this process is repeated until the length of the current symbol string becomes 0. Here, the current symbol string refers to the symbol string currently being encoded, and the current symbol string at the time encoding starts refers to the input symbol string.

[0110] More specifically, the encoding procedure in the second embodiment comprises the following three processes.

[0111] (1) A predetermined codebook T k is used as the current codebook to start encoding. Here, k is an arbitrary integer between 0 and K-1, for example, k=0. Also, the input symbol string is used as the current symbol string.

[0112] (2) Using the current codebook, the current symbol string is compared with the symbol strings contained in the input set of the codebook. If there is a symbol string (hereinafter referred to as symbol string σ) contained in the input set of the current codebook that matches the prefix of the current symbol string, a codeword corresponding to the input set including the symbol string σ is obtained, the codebook to be used next corresponding to the input set including the symbol string σ is set as the current codebook, and the symbol string obtained by removing from the current symbol string any prefix that matches the predetermined prefix of any symbol string contained in the input set including the symbol string σ is set as the current symbol string. Note that, when there is no symbol string in the input set of the current codebook that matches the prefix of the current symbol string because the length of the current symbol string is shorter than the length of the symbol string included in the input set of the current codebook, and there is a symbol string (hereinafter referred to as symbol string σ) included in the input set of the current codebook that matches the prefix of a symbol string obtained by concatenating an arbitrary symbol string to the current symbol string, a codeword corresponding to the input set including that symbol string σ is obtained, and the codebook to be used next that corresponds to the input set including that symbol string σ is set as the current codebook, and the symbol string obtained by excluding a predetermined prefix of the input set that includes that symbol string σ from the current symbol string is set as the current symbol string.

[0113] (3) If the length of the current symbol string obtained by process (2) is 0, the code word obtained by concatenating all the code words obtained by process (2) is output as the output code word, and the encoding process ends; otherwise, return to process (2).

[0114] The encoding procedure in the second modification of the second embodiment differs from the encoding procedure in the second embodiment in the process (2). Specifically, it is as follows.

[0115] (2) Using the current codebook, the current symbol string is compared with the symbol string included in the input set of the current codebook. If there is a symbol string (hereinafter referred to as symbol string σ) included in the input set of the current codebook that matches the prefix of the current symbol string, a codeword corresponding to the input set including the symbol string σ is obtained, and a transition correspondence table or a transition function is used to obtain the codebook to be used next that corresponds to the predetermined suffix set of the input set including the symbol string σ, and this codebook is set as the current codebook. The symbol string obtained by removing the prefix that matches the predetermined prefix of the input set including the symbol string σ from the current symbol string is set as the current symbol string. Note that, because the length of the current symbol string is shorter than the length of the symbol string included in the input set of the current codebook, there is no symbol string included in the input set of the current codebook that matches the prefix of the current symbol string. However, if there is a symbol string included in the input set of the current codebook (hereinafter referred to as symbol string σ) that matches the prefix of a symbol string obtained by concatenating an arbitrary symbol string to the current symbol string, a codeword corresponding to the input set including this symbol string σ is obtained, and a codebook to be used next that corresponds to a predetermined suffix set of the input set including this symbol string σ is obtained using a transition correspondence table or a transition function. This codebook is designated as the current codebook, and the symbol string obtained by excluding the predetermined prefix of the input set including this symbol string σ from the current symbol string is designated as the current symbol string.

[0116] In addition, instead of executing the process from the introductory part of process (2) in the encoding procedure in the second embodiment or its variant 2, the following processes (1) and (3) may be executed instead of the processes (1) and (3) above.

[0117] (1) A predetermined codebook T k is used as the current codebook and encoding is started. Here, k is an arbitrary integer between 0 and K-1 inclusive, for example, k = 0. Also, in the process of repeatedly executing process (2), the current symbol string is a symbol string obtained by concatenating an arbitrary symbol string of sufficient length to the input symbol string so that the length of the current symbol string does not become shorter than the length of the symbol string included in the input set of the current codebook.

[0118] (3) If the length of the current symbol string obtained by process (2) is equal to the length of the symbol string concatenated in process (1), the code word obtained by concatenating all the code words obtained by process (2) is output as the output code word, and the encoding process is terminated; otherwise, return to process (2).

[0119] Next, a decoding procedure in the second embodiment will be described. The decoding procedure in the second embodiment involves inputting a codeword to be decoded (hereinafter referred to as an input codeword) and decoding the codewords from a plurality of codebooks {T k} k=0 K-1 (However, if multiple codebooks {T k} k=0 K-1 is the codebook used in the encoding procedure) to obtain symbol strings corresponding to the codewords that make up the input codeword, and then output a symbol string (hereinafter referred to as the output symbol string) obtained by concatenating all the obtained symbol strings. k} k=0 K-1 In the process of obtaining a symbol string corresponding to a codeword constituting an input codeword using

[0000] , a symbol string that is a predetermined prefix of an arbitrary symbol string included in the input set corresponding to a codeword included in the current codebook (hereinafter referred to as codeword w) that matches the prefix of the current codeword is obtained, the codebook to be used next that corresponds to codeword w is set as the current codebook, and the codeword obtained by removing the prefix that matches codeword w from the current codeword is set as the current codeword. This process is repeated until the length of the current codeword becomes 0. Here, the current codeword is the codeword that is currently being decoded, and the current codeword at the start of decoding is the input codeword.

[0120] More specifically, the decoding procedure in the second embodiment comprises the following three processes.

[0121] (1) A predetermined codebook T k is set as the current codebook and decoding begins. Here, k is the codebook number used when the encoding process of the input codeword began. Also, the input codeword is set as the current codeword.

[0122] (2) Using the current codebook, the current codeword is compared with the codewords contained in the codebook. A symbol string that is a predetermined prefix of an arbitrary symbol string contained in the input set corresponding to a codeword contained in the current codebook (hereinafter referred to as codeword w) that matches the prefix of the current codeword is obtained, and the codebook to be used next that corresponds to codeword w is set as the current codebook. The codeword obtained by removing the prefix that matches codeword w from the current codeword is set as the current codeword.

[0123] (3) If the length of the current codeword obtained by process (2) is 0, the symbol string obtained by concatenating all symbol strings obtained by process (2) is output as the output symbol string, and the decoding process ends; otherwise, return to process (2).

[0124] The decoding procedure in the second modification of the second embodiment differs from the decoding procedure in the second embodiment in the process (2). Specifically, the process is as follows.

[0125] (2) Using the current codebook, compare the current codeword with the codewords contained in the codebook. Obtain a symbol string that is a predetermined prefix of an arbitrary symbol string contained in the input set corresponding to a codeword contained in the current codebook (hereinafter referred to as codeword w) that matches the prefix of the current codeword. Obtain a codebook to be used next that corresponds to a predetermined suffix set in the input set corresponding to codeword w using a transition correspondence table or transition function. Set this codebook as the current codebook, and set the codeword obtained by removing the prefix that matches codeword w from the current codeword as the current codeword.

[0126] The encoding procedure / decoding procedure using the above codebook can also be converted to an encoding procedure / decoding procedure using an analytic tree by simply replacing the word "codebook" with "analytic tree."

[0127] <<3: Example of Encoding / Decoding>> Here, as an example of encoding / decoding, encoding / decoding of the symbol string accba when using the codebook of Fig. 10 or Fig. 11 will be described. First, the case when the codebook of Fig. 10 is used will be described.

[0128] <<<3-1: Encoding / Decoding Using the Codebook of Fig. 10 >>> First, encoding will be described. Here, it is assumed that at the start of the encoding process, codebook T0 is used as the current codebook. The input is the symbol string accba to be encoded, and the symbol string accba is set as the current symbol string.

[0129] (1) Using the current codebook T0, the current symbol string accba is compared with the symbol strings included in the input set of the codebook T0. Since the symbol string ac is included in the input set of the current codebook T0 and matches the prefix of the current symbol string accba, the codeword 01 corresponding to the input set {ac, ba} including the symbol string ac is obtained, the codebook T2 to be used next corresponding to the input set {ac, ba} including the symbol string ac is set as the current codebook, and the symbol string accba obtained by removing the predetermined prefix ε of the input set {ac, ba} including the symbol string ac from the current symbol string accba is set as the current symbol string.

[0130] (2) Using the current codebook T2, the current symbol string accba is compared with the symbol strings included in the input set of the codebook T2. Since the symbol string accb is included in the input set of the current codebook T2 and matches the prefix of the current symbol string accba, a codeword 10 corresponding to the input set {acba, acbb, acbc, acca, accb, accc} including the symbol string accb is obtained, and the codebook T3 to be used next, which corresponds to the input set {acba, acbb, acbc, acca, accb, accc} including the symbol string accb, is set as the current codebook. The symbol string cba obtained by removing the predetermined prefix ac of the input set {acba, acbb, acbc, acca, accb, accc} including the symbol string accb from the current symbol string accba is set as the current symbol string.

[0131] (3) Using the current codebook T3, the current symbol string cba is compared with the codewords included in the input set of the codebook T3. Since the symbol string cba is included in the input set of the current codebook T3 and matches the prefix of the current symbol string cba, a codeword 11 corresponding to the input set {cba, cbb, cbc, cca, ccb, ​​ccc} including the symbol string cba is obtained, and the codebook T3 to be used next that corresponds to the input set {cba, cbb, cbc, cca, ccb, ​​ccc} including the symbol string cba is set as the current codebook. The symbol string ba obtained by removing the predetermined prefix c of the input set {cba, cbb, cbc, cca, ccb, ​​ccc} including the symbol string cba from the current symbol string cba is set as the current codeword.

[0132] (4) Using the current codebook T3, the current symbol string ba is compared with the symbol strings included in the input set of the codebook T3. There is no symbol string included in the input set of the current codebook T3 that matches the prefix of the current symbol string ba. Therefore, the symbol string baaa obtained by concatenating the symbol string aa with the current symbol string ba is set as a tentative current symbol string, and the tentative current symbol string baaa is compared with the symbol strings included in the input set of the codebook T3. Since the input set of the current codebook T3 contains a symbol string baaa that matches the prefix of the tentative current symbol string baaa, a codeword 00 corresponding to the input set {baaa, baab, baac, baba, babb, babc, baca, bacb, bacc} containing the symbol string baaa is obtained, and the codebook T0 to be used next that corresponds to the input set {baaa, baab, baac, baba, babb, babc, baca, bacb, bacc} containing the symbol string baaa is set as the current codebook. A symbol string ε obtained by removing the predetermined prefix ba of the input set {baaa, baab, baac, baba, babb, babc, baca, bacb, bacc} containing the symbol string baaa from the current symbol string ba is set as the current codeword.

[0133] (5) Since the current symbol string ε is a symbol string of length 0, the code word 01101100 is output.

[0134] Next, decoding will be explained. At the start of the decoding process, the codebook T0 used at the start of the encoding process is set as the current codebook. The input is the codeword 01101100 to be decoded, and the codeword 01101100 is set as the current codeword. Also, λ represents a codeword of length 0.

[0135] (1) For the first two-bit codeword 01 of the current codeword 01101100, the current codebook T0 is used to obtain a symbol string ε, which is a predetermined prefix of the input set {ac, ba} corresponding to the codeword 01, and the codebook T2 to be used next, which corresponds to the codeword 01, is set as the current codebook. The codeword 101100, obtained by removing the first two-bit codeword 01 from the current codeword 01101100, is set as the current codeword.

[0136] (2) For the first two-bit codeword 10 of the current codeword 101100, the current codebook T2 is used to obtain a symbol string ac, which is a predetermined prefix of the input set {acba, acbb, acbc, acca, accb, accc} corresponding to the codeword 10, and the codebook T3 to be used next, which corresponds to the codeword 10, is set as the current codebook. The codeword 1100, obtained by removing the first two-bit codeword 10 from the current codeword 101100, is set as the current codeword.

[0137] (3) For the first two-bit codeword 11 of the current codeword 1100, use the current codebook T3 to obtain a symbol string c, which is a predetermined prefix of the input set {cba, cbb, cbc, cca, ccb, ​​ccc} corresponding to the codeword 11, and set the next codebook T3 to be used corresponding to the codeword 11 as the current codebook. Also set the codeword 00, which is the current codeword 1100 minus the first two-bit codeword 11, as the current codeword.

[0138] (4) For the initial 2-bit codeword 00 of the current codeword 00, the current codebook T3 is used to obtain a symbol string ba, which is a predetermined prefix of the input set {baaa, baab, baac, baba, babb, babc, baca, bacb, bacc} corresponding to the codeword 00, and the codebook T0 to be used next, which corresponds to the codeword 00, is set as the current codebook. The codeword λ obtained by removing the initial 2-bit codeword 00 from the current codeword 00 is set as the current codeword.

[0139] (5) Since the current codeword λ is a codeword of length 0, the symbol string εaccba, that is, the symbol string accba, is output.

[0140] Next, a case where the codebook of FIG. 11 is used will be described.

[0141] <<<3-2: Encoding / Decoding When the Codebook of Fig. 11 is Used>>> First, encoding will be described. Here, it is assumed that at the start of the encoding process, codebook T0 is used as the current codebook. The input is the symbol string accba to be encoded, and the symbol string accba is set as the current symbol string.

[0142] (1) Using the current codebook T0, the current symbol string accba is compared with the symbol strings included in the input set of the codebook T0. Since the symbol string ac is included in the input set of the current codebook T0 and matches the prefix of the current symbol string accba, the codeword 01 corresponding to the input set {ac, ba} including the symbol string ac is obtained, the codebook T2 to be used next corresponding to the input set {ac, ba} including the symbol string ac is set as the current codebook, and the symbol string accba obtained by removing the predetermined prefix ε of the input set {ac, ba} including the symbol string ac from the current symbol string accba is set as the current symbol string.

[0143] (2) Using the current codebook T2, the current symbol string accba is compared with the symbol strings included in the input set of the codebook T2. Since the symbol string acc is included in the input set of the current codebook T2 and matches the prefix of the current symbol string accba, codeword 10 corresponding to the input set {acb, acc} including the symbol string acc is obtained, the codebook T3 to be used next corresponding to the input set {acb, acc} including the symbol string acc is set as the current codebook, and the symbol string cba obtained by removing the predetermined prefix ac of the input set {acb, acc} including the symbol string acc from the current symbol string accba is set as the current symbol string.

[0144] (3) Using the current codebook T3, the current symbol string cba is compared with the codewords contained in the input set of the codebook T3. Since the symbol string cb is included in the input set of the current codebook T3 and matches the prefix of the current symbol string cba, a codeword 11 corresponding to the input set {cb, cc} containing the symbol string cb is obtained, the codebook T3 to be used next corresponding to the input set {cb, cc} containing the symbol string cb is set as the current codebook, and the symbol string ba obtained by removing the predetermined prefix c of the input set {cb, cc} containing the symbol string cb from the current symbol string cba is set as the current codeword.

[0145] (4) Using the current codebook T3, the current symbol string ba is compared with the symbol strings included in the input set of the codebook T3. Since the symbol string ba is included in the input set of the current codebook T3 and matches the prefix of the current symbol string ba, the codeword 00 corresponding to the input set {ba} including the symbol string ba is obtained, the codebook T0 to be used next corresponding to the input set {ba} including the symbol string ba is set as the current codebook, and the symbol string ε obtained by removing the predetermined prefix ba of the input set {ba} including the symbol string ba from the current symbol string ba is set as the current codeword.

[0146] (5) Since the current symbol string ε is a symbol string of length 0, the code word 01101100 is output.

[0147] Next, decoding will be explained. At the start of the decoding process, the codebook T0 used at the start of the encoding process is set as the current codebook. The input is the codeword 01101100 to be decoded, and the codeword 01101100 is set as the current codeword. Also, λ represents a codeword of length 0.

[0148] (1) For the first two-bit codeword 01 of the current codeword 01101100, the current codebook T0 is used to obtain a symbol string ε, which is a predetermined prefix of the input set {ac, ba} corresponding to the codeword 01, and the codebook T2 to be used next, which corresponds to the codeword 01, is set as the current codebook. The codeword 101100, obtained by removing the first two-bit codeword 01 from the current codeword 01101100, is set as the current codeword.

[0149] (2) For the first two bits of the current codeword 101100, the current codebook T2 is used to obtain the symbol string ac, which is a predetermined prefix of the input set {acb, acc} corresponding to the codeword 10, and the codebook T3 to be used next, which corresponds to the codeword 10, is set as the current codebook. The codeword 1100, obtained by removing the first two bits of the codeword 10 from the current codeword 101100, is set as the current codeword.

[0150] (3) For the first two-bit codeword 11 of the current codeword 1100, use the current codebook T3 to obtain a symbol string c, which is a predetermined prefix of the input set {cb, cc} corresponding to the codeword 11, and set the next codebook T3 corresponding to the codeword 11 to be used as the current codebook. Also, set the codeword 00 obtained by removing the first two-bit codeword 11 from the current codeword 1100 as the current codeword.

[0151] (4) For the first two bits of the current codeword 00, obtain a symbol string ba, which is a predetermined prefix of the input set {ba} corresponding to the codeword 00, using the current codebook T3. Then, the codebook T0 to be used next, which corresponds to the codeword 00, is set as the current codebook. The codeword λ obtained by removing the first two bits of the codeword 00 from the current codeword 00 is set as the current codeword.

[0152] (5) Since the current codeword λ is a codeword of length 0, the symbol string εaccba, that is, the symbol string accba, is output.

[0153] Second Embodiment An encoding device 100 according to this embodiment receives as input a symbol string to be encoded (hereinafter referred to as an input symbol string) and outputs a codeword corresponding to the input symbol string (hereinafter referred to as an output codeword). A decoding device 200 according to this embodiment receives as input a codeword to be decoded (hereinafter referred to as an input codeword) and outputs a symbol string corresponding to the input codeword (hereinafter referred to as an output symbol string).

[0154] The encoding device 100 and the decoding device 200 use a plurality of codebooks or parse trees {T k} k=0 K-1 (where K is an integer greater than or equal to 2) is a data structure with the following characteristics:

[0155] (1) Codebook or parse tree T k (k=0, 1, ..., K-1) consists of at least two pairs of a set of symbol strings (hereinafter referred to as an input set) beginning with a symbol string for obtaining a corresponding code word of a predetermined length, and the code word of the predetermined length.

[0156] Here, the predetermined prefix and predetermined suffix of a symbol string that is an element of an input set are respectively a prefix common to all elements of the input set, and the symbol string minus the predetermined prefix of the symbol string.

[0157] (2) Codebook or parse tree T k The union of the input set (k=0, 1,…, K-1) satisfies the prefix condition, and the codebook or parse tree T k The symbol string included in the input set of the codebook or parse tree to be used next corresponding to the codeword (k=0, 1, ..., K-1) satisfies the condition that it has at its beginning a predetermined ending of any symbol string included in the input set corresponding to the codeword.

[0158] Codebook or parse tree T k (k=0, 1, ..., K-1) may be composed of a triplet of an input set, a codeword of a predetermined length, and the codebook or parse tree to be used next, or may be composed of two pairs of an input set and a codeword of a predetermined length. In the second configuration, the codebook or parse tree T k (k=0, 1, ..., K-1) is used together with a correspondence table (hereinafter referred to as a transition correspondence table) consisting of a set of predetermined suffixes of an input set of a codebook or analytic tree and a pair of the codebook or analytic tree to be used next. Note that instead of the transition correspondence table, a function (hereinafter referred to as a transition function) may be used that takes as input a predetermined suffixes of an input set of a codebook or analytic tree and outputs the codebook or analytic tree to be used next.

[0159] As explained in the technical background, multiple codebooks or parse trees {T k} k=0 K-1 satisfies conditions (1) and (2), multiple codebooks or parse trees {T k} k=0 K-1satisfies the unique codability condition. However, if multiple codebooks or parse trees {T k} k=0 K-1 is sufficient as a code if it satisfies condition (2).

[0160] <<Encoding Device 100>> The encoding device 100 will be described below with reference to Figs. 6 and 7. Fig. 6 is a block diagram showing the configuration of the encoding device 100. Fig. 7 is a flowchart showing the operation of the encoding device 100. As shown in Fig. 6, the encoding device 100 includes an encoding unit 110 and a recording unit 190. The recording unit 190 is a component that appropriately records information necessary for the processing of the encoding device 100. The recording unit 190 stores, for example, a plurality of codebooks or parse trees {T k} k=0 K-1 Keep a record of the following.

[0161] The operation of the encoding device 100 will be described with reference to FIG.

[0162] In S110, the encoding unit 110 generates a plurality of codebooks or parse trees {T k} k=0 K-1 The codeword corresponding to the symbol string that constitutes the input symbol string is obtained using the above, and the codeword obtained by concatenating the codewords is output as the output codeword.

[0163] Codebook or parse tree T k The processing of the encoding unit 110 will be described in detail according to the differences in the configuration.

[0164] (1) Codebook or parse tree T k When (k=0, 1, ..., K-1) consists of a triplet of an input set, a codeword of a predetermined length, and a codebook or parse tree to be used next, the encoding unit 110 executes an encoding process consisting of the following three steps:

[0165] (1-1) Codebook or analytic tree T k(where k is an integer between 0 and K-1) as the current codebook or analytic tree, and the input symbol string as the current symbol string. (1-2) Using the current codebook or analytic tree, the current symbol string is compared with the symbol strings contained in the input set of the codebook or analytic tree. If there is a symbol string (hereafter referred to as symbol string σ) contained in the input set of the current codebook or analytic tree that matches the prefix of the current symbol string, a codeword corresponding to the input set including that symbol string σ is obtained, and the codebook or analytic tree to be used next corresponding to the input set including that symbol string σ is set as the current codebook or analytic tree. The symbol string obtained by removing from the current symbol string any prefix that matches the predetermined prefix of any symbol string contained in the input set including that symbol string σ is set as the current symbol string (however, if the length of the current symbol string is longer than the length of the input set of the current codebook or analytic tree, (1-3) If there is no symbol string included in the input set of the current codebook or analytic tree that matches the prefix of the current symbol string because the length of the symbol string is shorter than the length of the symbol string included in the set, and if there is a symbol string included in the input set of the current codebook or analytic tree that matches the prefix of the symbol string obtained by concatenating an arbitrary symbol string to the current symbol string (hereinafter referred to as symbol string σ), a codeword corresponding to the input set including the symbol string σ is obtained, and the codebook or analytic tree to be used next that corresponds to the input set including the symbol string σ is set as the current codebook or analytic tree, and the symbol string obtained by excluding the predetermined prefix of the arbitrary symbol string included in the input set including the symbol string σ from the current symbol string is set as the current symbol string. (1-3) If the length of the current symbol string obtained by the process in (1-2) is 0, the codeword obtained by concatenating all the codewords obtained by the process in (1-2) is output as the output codeword, and the encoding process is terminated, but otherwise the process returns to the process in (1-2). (2) Codebook or analytic tree T k When (k=0, 1, ..., K-1) consists of two sets of an input set and a codeword of a predetermined length, the encoding unit 110 executes the encoding process consisting of the following three processes. The transition correspondence table and transition functions are recorded in the recording unit 190.

[0166] (2-1) Codebook or analytic tree T k(where k is an integer between 0 and K-1) as the current codebook or analytic tree, and the input symbol string as the current symbol string. (2-2) Using the current codebook or analytic tree, compare the current symbol string with the symbol strings included in the input set of the codebook or analytic tree, and if there is a symbol string included in the input set of the current codebook or analytic tree (hereinafter referred to as symbol string σ) that matches the prefix of the current symbol string, obtain a codeword corresponding to the input set including that symbol string σ, and use a transition correspondence table or transition function to obtain the codebook or analytic tree to be used next that corresponds to the predetermined suffix set of the input set including that symbol string σ, and set that codebook or analytic tree as the current codebook or analytic tree, and set the symbol string obtained by excluding from the current symbol string any prefix that matches the predetermined prefix of any symbol string included in the input set including that symbol string σ as the current symbol string (however, if the length of the current symbol string is longer than the length of the input (2-3) If there is no symbol string included in the input set of the current codebook or analytic tree that matches the prefix of the current symbol string because the length of the symbol string is shorter than the length of the symbol string included in the set, and if there is a symbol string included in the input set of the current codebook or analytic tree that matches the prefix of a symbol string obtained by concatenating an arbitrary symbol string to the current symbol string (hereinafter referred to as symbol string σ), obtain a codeword corresponding to the input set that includes this symbol string σ, obtain a codebook or analytic tree to be used next that corresponds to a predetermined suffix set of the input set that includes this symbol string σ using a transition correspondence table or a transition function, set this codebook or analytic tree as the current codebook or analytic tree, and set a symbol string obtained by excluding the predetermined prefix of an arbitrary symbol string included in the input set that includes this symbol string σ from the current symbol string as the current symbol string. (2-3) If the length of the current symbol string obtained by the process in (2-2) is 0, output a codeword obtained by concatenating all codewords obtained by the process in (2-2) as an output codeword, and end the encoding process, but otherwise return to the process in (2-2). <<Decoding Device 200>> Hereinafter, the decoding device 200 will be described with reference to FIGS. 8 and 9. Fig. 8 is a block diagram showing the configuration of the decoding device 200. Fig. 9 is a flowchart showing the operation of the decoding device 200. As shown in Fig. 8, the decoding device 200 includes a decoding unit 210 and a recording unit 290. The recording unit 290 is a component that appropriately records information necessary for the processing of the decoding device 200.The recording unit 290 stores, for example, a plurality of codebooks or parse trees {T. k} k=0 K-1 (However, {T k} k=0 K-1 The input codeword is encoded using a plurality of codebooks or parse trees.

[0167] The operation of the decoding device 200 will be described with reference to FIG.

[0168] In S210, the decoding unit 210 generates a plurality of codebooks or parse trees {T k} k=0 K-1 The symbol strings corresponding to the code words that make up the input code word are obtained using the above, and the symbol strings obtained by concatenating the obtained symbol strings are output as the output symbol string.

[0169] Codebook or parse tree T k The processing of the decoding unit 210 will be described in detail according to the differences in the configuration.

[0170] (1) Codebook or parse tree T k When (k=0, 1, ..., K-1) is composed of a triplet of an input set, a codeword of a predetermined length, and the codebook or parse tree to be used next, the decoding unit 210 executes a decoding process consisting of the following three steps:

[0171] (1-1) Codebook or analytic tree T k(where k is the number of the codebook or analytic tree used when the encoding process of the input codeword started) as the current codebook or analytic tree, and the input codeword as the current codeword. (1-2) Using the current codebook or analytic tree, compare the current codeword with the codeword contained in the codebook or analytic tree, obtain a symbol string that is a predetermined prefix of an arbitrary symbol string contained in the input set corresponding to the codeword contained in the current codebook or analytic tree (hereinafter referred to as codeword w) that matches the prefix of the current codeword, and set the codebook or analytic tree to be used next corresponding to the codeword w as the current codebook or analytic tree, and set the codeword obtained by removing the prefix that matches the codeword w from the current codeword as the current codeword. (1-3) If the length of the current codeword obtained by the process in (1-2) is 0, output the symbol string obtained by concatenating all the symbol strings obtained by the process in (1-2) as the output symbol string, and end the decoding process, but otherwise return to the process in (1-2). (2) Codebook or analytic tree T k When (k=0, 1, ..., K-1) consists of two sets of an input set and a codeword of a predetermined length, the decoding unit 210 executes the decoding process consisting of the following three processes. The transition correspondence table and transition functions are recorded in the recording unit 290.

[0172] (2-1) Codebook or analytic tree T k(where k is the codebook or analytic tree number used when the encoding process of the input codeword started) as the current codebook or analytic tree, and the input codeword as the current codeword. (2-2) Using the current codebook or analytic tree, compare the current codeword with the codewords contained in the codebook or analytic tree, obtain a symbol string that is a predetermined prefix of an arbitrary symbol string contained in the input set corresponding to the codeword contained in the current codebook or analytic tree (hereinafter referred to as codeword w) that matches the prefix of the current codeword, obtain the codebook or analytic tree to be used next that corresponds to the predetermined suffix set of the input set corresponding to codeword w using a transition correspondence table or transition function, set the codebook or analytic tree to be used next as the current codebook or analytic tree, and set the codeword obtained by removing the prefix that matches codeword w from the current codeword as the current codeword. (2-3) If the length of the current codeword obtained by the process (2-2) is 0, a symbol string obtained by concatenating all symbol strings obtained by the process (2-2) is output as an output symbol string, and the decoding process ends; otherwise, the process returns to the process (2-2). Note that encoding / decoding may be performed by combining the encoding device / decoding device of the first embodiment with the encoding device / decoding device of the second embodiment. For example, encoding may be performed by the encoding device of the first embodiment, and decoding may be performed by the decoding device of the second embodiment. During encoding, there may be cases where the current symbol string is shorter than the symbol string to be compared. In this case, encoding may be performed using a symbol string obtained by concatenating an arbitrary symbol string to the current symbol string.

[0173] The encoding / decoding of this embodiment can be summarized as follows.

[0174] [1] A coding device that receives a symbol string to be coded (hereinafter referred to as an input symbol string) as input and outputs a codeword (hereinafter referred to as an output codeword) corresponding to the input symbol string, comprising: a plurality of codebooks or parse trees {T k} k=0 K-1 (where K is an integer of 2 or more) to obtain a codeword corresponding to a symbol string constituting the input symbol string, and to output a codeword obtained by concatenating the obtained codewords as the output codeword; k(k=0, 1, ..., K-1) is composed of at least two pairs of a set of symbol strings (hereinafter referred to as an input set) whose prefix is ​​a symbol string for obtaining a corresponding code word of a predetermined length, and the code word of the predetermined length, and the predetermined prefix and predetermined suffix of the symbol string that is an element of the input set are respectively a prefix common to all elements of the input set, and the symbol string obtained by removing the predetermined prefix of the symbol string from the symbol string, and the codebook or parse tree T k A coding device that satisfies the condition that a symbol string included in the input set of the next codebook or analytic tree to be used corresponding to the code word has a predetermined ending at the beginning of any symbol string included in the input set corresponding to the code word.

[0175] [2] The encoding device of [1], k (k=0, 1, ..., K-1) is composed of a triplet of an input set, a codeword of a predetermined length, and a codebook or analytic tree to be used next, and the encoding unit performs the following steps: (1) Selecting a codebook or analytic tree T k(where k is an integer between 0 and K-1) as the current codebook or analytic tree, and the input symbol string is set as the current symbol string; (2) using the current codebook or analytic tree, compare the current symbol string with the symbol strings included in the input set of the codebook or analytic tree, and if there is a symbol string included in the input set of the current codebook or analytic tree (hereinafter referred to as symbol string σ) that matches a prefix of the current symbol string, obtain a codeword corresponding to the input set including that symbol string σ, set the codebook or analytic tree to be used next corresponding to the input set including that symbol string σ as the current codebook or analytic tree, and set the symbol string obtained by removing from the current symbol string any prefix that matches a predetermined prefix of any symbol string included in the input set including that symbol string σ as the current symbol string (however, if the length of the current symbol string is shorter than the length of the symbol string included in the input set of the current codebook or analytic tree, the prefix of the current symbol string may be omitted). a codeword corresponding to the input set including the symbol string σ, and the codebook or analytic tree to be used next corresponding to the input set including the symbol string σ is set as the current codebook or analytic tree, and a symbol string obtained by excluding a predetermined prefix of an arbitrary symbol string included in the input set including the symbol string σ is set as the current symbol string; and (3) if the length of the current symbol string obtained by the process in (2) is 0, outputting a codeword obtained by concatenating all the codewords obtained by the process in (2) as the output codeword, and terminating the encoding process, while otherwise returning to the process in (2).

[0176] [3] A decoding device that receives a codeword to be decoded (hereinafter referred to as an input codeword) as input and outputs a symbol string corresponding to the input codeword (hereinafter referred to as an output symbol string), comprising: a plurality of codebooks or parse trees {T k} k=0 K-1 (where K is an integer greater than or equal to 2, k} k=0 K-1a decoding unit that obtains a symbol string corresponding to a codeword that constitutes the input codeword using a plurality of codebooks or analytic trees used in the encoding process of the input codeword, and outputs the symbol string obtained by concatenating the obtained symbol strings as the output symbol string; k (k=0, 1, ..., K-1) is composed of at least two pairs of a set of symbol strings (hereinafter referred to as an input set) whose prefix is ​​a symbol string for obtaining a corresponding code word of a predetermined length, and the code word of the predetermined length, and the predetermined prefix and predetermined suffix of the symbol string that is an element of the input set are respectively a prefix common to all elements of the input set, and the symbol string obtained by removing the predetermined prefix of the symbol string from the symbol string, and the codebook or parse tree T k A decoding device in which a symbol string included in an input set of a codebook or analytic tree to be used next corresponding to a code word satisfies the condition that the symbol string has a predetermined ending at the beginning of any symbol string included in the input set corresponding to the code word.

[0177] [4] The decoding device of [3], wherein the codebook or parse tree T k (k=0, 1, ..., K-1) is composed of a triplet of an input set, a codeword of a predetermined length, and a codebook or parse tree to be used next, and the decoding unit performs the following steps: (1) Determining the codebook or parse tree T k(where k is the number of the codebook or analytic tree used when starting the encoding process of the input codeword) as the current codebook or analytic tree, and the input codeword as the current codeword; (2) using the current codebook or analytic tree, comparing the current codeword with the codeword contained in the codebook or analytic tree, obtaining a symbol string that is a predetermined prefix of an arbitrary symbol string contained in the input set corresponding to a codeword contained in the current codebook or analytic tree (hereinafter referred to as codeword w) that matches a prefix of the current codeword, and setting the codebook or analytic tree to be used next that corresponds to codeword w as the current codebook or analytic tree, and setting the codeword obtained by removing the prefix that matches codeword w from the current codeword as the current codeword; and (3) if the length of the current codeword obtained by the process in (2) is 0, outputting the symbol string obtained by concatenating all the symbol strings obtained by the process in (2) as the output symbol string, and terminating the decoding process, while otherwise returning to the process in (2).

[0178] [5] A coding method in which a coding device receives a symbol string to be coded (hereinafter referred to as an input symbol string) as input and outputs a codeword (hereinafter referred to as an output codeword) corresponding to the input symbol string, the method comprising: k} k=0 K-1 (where K is an integer of 2 or more) to obtain a codeword corresponding to a symbol string constituting the input symbol string, and outputting the codeword obtained by concatenating the obtained codewords as the output codeword; k (k=0, 1, ..., K-1) is composed of at least two pairs of a set of symbol strings (hereinafter referred to as an input set) whose prefix is ​​a symbol string for obtaining a corresponding code word of a predetermined length, and the code word of the predetermined length, and the predetermined prefix and predetermined suffix of the symbol string that is an element of the input set are respectively a prefix common to all elements of the input set, and the symbol string obtained by removing the predetermined prefix of the symbol string from the symbol string, and the codebook or parse tree T kA coding method in which a symbol string included in the input set of the next codebook or parse tree to be used corresponding to the code word satisfies the condition that the symbol string has a predetermined ending at the beginning of any symbol string included in the input set corresponding to the code word.

[0179] [6] A decoding method in which a decoding device receives a codeword to be decoded (hereinafter referred to as an input codeword) as input and outputs a symbol string corresponding to the input codeword (hereinafter referred to as an output symbol string), the decoding device k} k=0 K-1 (where K is an integer greater than or equal to 2, k} k=0 K-1 a decoding step of obtaining a symbol string corresponding to a codeword constituting the input codeword using a plurality of codebooks or analytic trees used in the encoding process of the input codeword, and outputting the symbol string obtained by concatenating the obtained symbol strings as the output symbol string, k (k=0, 1, ..., K-1) is composed of at least two pairs of a set of symbol strings (hereinafter referred to as an input set) whose prefix is ​​a symbol string for obtaining a corresponding code word of a predetermined length, and the code word of the predetermined length, and the predetermined prefix and predetermined suffix of the symbol string that is an element of the input set are respectively a prefix common to all elements of the input set, and the symbol string obtained by removing the predetermined prefix of the symbol string from the symbol string, and the codebook or parse tree T k A decoding method in which a symbol string included in the input set of the next codebook or parse tree to be used corresponding to the codeword satisfies the condition that the symbol string has a predetermined ending at the beginning of any symbol string included in the input set corresponding to the codeword.

[0180] [7] Multiple codebooks or parse trees {T k} k=0 K-1 (where K is an integer equal to or greater than 2), and k(k=0, 1, ..., K-1) is composed of at least two pairs of a set of symbol strings (hereinafter referred to as an input set) whose prefix is ​​a symbol string for obtaining a corresponding code word of a predetermined length, and the code word of the predetermined length, and the predetermined prefix and predetermined suffix of the symbol string that is an element of the input set are respectively a prefix common to all elements of the input set, and the symbol string obtained by removing the predetermined prefix of the symbol string from the symbol string, and the codebook or parse tree T k A data structure in which a symbol string included in the input set of the next codebook or parse tree to be used corresponding to the code word satisfies the condition that the symbol string has a predetermined ending at the beginning of any symbol string included in the input set corresponding to the code word.

[0181] [8] A program for causing a computer to function as either the encoding device of [1] or [2] or the decoding device of [3] or [4].

[0182] According to the embodiments of the present invention, it is possible to realize codes with higher compression efficiency by using multiple codebooks or analytic trees with a predetermined structure. Furthermore, by making the multiple codebooks or analytic trees satisfy predetermined conditions, it is possible to easily design codes that can be uniquely encoded.

[0183] In the first embodiment, the concept of a mode was introduced, and encoding / decoding using a plurality of codebooks, each of which is assigned a mode, was described. More specifically, in the first embodiment, k} k=0 K-1 is a data structure that has the following characteristics: (1) Codebook T k (k=0, 1,..., K-1) is composed of a triplet of a symbol string, a codeword, and a link destination, and a mode is assigned to it. (2) Codebook T k The expanded symbol string (k=0, 1, . . . , K-1) satisfies the condition that any symbol string included in the mode assigned to the codebook is used as the beginning of the word.

[0184] Here, the codebook T k It can be said that the triplet constituting the formula indicates the correspondence between the symbol string and the codeword and the codebook switching rule.

[0185] As can be seen from the second embodiment and its modifications, the mode of feature (1) can express the same encoding rule without explicitly using it, and the expression method is arbitrary. On the other hand, as for the condition of feature (2), a condition equivalent to the condition can be derived.

[0186] The technical background of encoding / decoding in the third embodiment will be described below. Specifically, a condition equivalent to the condition of feature (2) above will be described, and a method for constructing multiple codebooks that satisfy this condition will be described.

[0187] <Technical Background> <<1: Functional Features of Codebooks>> Here, a condition equivalent to the condition of feature (2) above will be described. Therefore, as in the first embodiment, each codebook included in the multiple codebooks is assumed to be composed of a triplet of a symbol string, a codeword, and a link destination, and to be assigned a mode. FIG. 16 is a diagram showing an example of a codebook. The codebook in FIG. 16 is used to encode a symbol string that is a string of symbols {a, b, c, d} into a codeword that is a string of codes {0, 1, 2, 3, 4, 5, 6}, and is composed of three codebooks, T0, T1, and T2. The length of the codeword output from codebooks T0, T1, and T2 is 1. Mode {ε} is assigned to codebook T0, mode {a, b} to codebook T1, and mode {c, d} to codebook T2. Note that in the example of FIG. 16, the codewords are expressed in septenary, not binary.

[0188] In the following, for simplicity, it is assumed that a mode includes only symbol strings of length 1 at most. The codebook in Figure 16 is such an example.

[0189] To demonstrate a condition equivalent to the condition of feature (2) above, the encoding prefix set and input prefix set are defined as follows for codebooks included in multiple codebooks: (1) Encodable prefix set: For a codebook included in multiple codebooks, a set consisting of all symbols that can be used as prefixes of a symbol string that can be encoded when encoding starts from that codebook. (2) Input prefix set: For a codebook included in multiple codebooks, a set consisting of all symbols that can be used as prefixes of a symbol string that can be encoded using that codebook when encoding starts from the codebook used first.

[0190] In the example of Figure 16, when encoding starts from codebook T1, the symbol strings that can be coded are the symbol strings contained in codebook T1, that is, symbol strings that start with aa, ab, ac, ad, or b, so the coding prefix set of codebook T1 is {a, b}. On the other hand, when the initially used codebook is T0 and encoding starts from codebook T0, in order to use codebook T1 by switching from codebook T0, the symbol string d must be followed by the symbol string a or b, the symbol string aa or b must be followed by the symbol string a or b, and the symbol string ca must be followed by the symbol string a or b, so that the symbol string that can be coded using codebook T1 always starts with a or b, which are elements of the mode assigned to codebook T1. Therefore, the input prefix set of codebook T1 is {a, b}.

[0191] In the example of Figure 16, the coded prefix set and the input prefix set for codebook T1 are the same set, but in general the coded prefix set and the input prefix set will be different sets. Figure 17 is a diagram showing an example of a codebook. Figure 17 differs from Figure 16 only in that the symbol string b included in codebook T1 is replaced with symbol string c. In the example of Figure 17, the coded prefix set for codebook T1 is {a, c}, but because there are no changes to the codebook switching rule and the mode assigned to codebook T1, which are the conditions for switching to codebook T1, the input prefix set for codebook T1 remains {a, b}, and the coded prefix set and the input prefix set for codebook T1 will be different sets.

[0192] For a codebook contained in multiple codebooks, the set of coded prefixes defined above corresponds to a mode. Note that the mode being {ε} is equivalent to the mode being the set of all symbols ({a, b, c, d} in the example of Figure 16).

[0193] For multiple codebooks that express coding rules that can encode any symbol string, the condition of feature (2) above is equivalent to the condition that the coding prefix set of each codebook matches the input prefix set. This is because if there is a symbol that is an element of the input prefix set but not an element of the coding prefix set, a symbol string starting with that symbol cannot be coded, and if there is a symbol that is an element of the coding prefix set but not an element of the input prefix set, a codeword corresponding to a symbol string starting with that symbol will not be used in coding and will be wasted.

[0194] In other words, when expressing coding rules using multiple codebooks, it is preferable from the viewpoint of compression efficiency to design the correspondence between symbol strings and codewords and the codebook switching rules so that the set of coded prefixes matches the set of input prefixes for any codebook.

[0195] <<2: Inductive Codebook Construction Method>> Here, a method for constructing a plurality of codebooks in which the encoding prefix set of each codebook matches the input prefix set will be described.

[0196] A set whose elements are the coded prefix sets of all codebooks included in multiple codebooks is defined as a coded prefix family for multiple codebooks. Furthermore, if a coded prefix family for multiple codebooks satisfies the following two conditions, the coded prefix family is said to satisfy the bipartite condition: (1) The coded prefix family for multiple codebooks includes a set consisting of all symbols. (2) For any set included in the coded prefix family, a partition of the set can be constructed by selecting two sets from the coded prefix family or a set whose elements are all single-symbol sets (hereinafter referred to as the single-symbol family).

[0197] Here, multiple sets are a partition of set A means that the intersection of any two sets from the multiple sets is the empty set, and the union of the multiple sets is set A. Also, a single-symbol set is a set of symbols with one element. The coded prefix set family S={{a, b, c, d}, {a, b}, {c, d}} for the codebook of Figure 16 satisfies the bipartitability condition. This is because {a, b, c, d}, an element of set family S, can be partitioned by {a, b}, an element of S, and {c, d}, an element of S, and {a, b}, an element of S, can be partitioned by the single-symbol set {a} and the single-symbol set {b}, and {c, d}, an element of S, can be partitioned by the single-symbol set {c} and the single-symbol set {d}.

[0198] If a partition can be uniquely constructed for any set included in the family of coded prefixes, the family of coded prefixes for multiple codebooks is said to satisfy the unique bisection condition. The family of coded prefixes S for the codebook in Figure 16 also satisfies the unique bisection condition.

[0199] When the family of coded prefix sets for multiple codebooks satisfies the bisection condition, it is possible to easily construct multiple codebooks in which the coded prefix set of each codebook matches the input prefix set. Hereinafter, an inductive construction method utilizing the bisection condition will be described as an example of a method for constructing multiple codebooks in which the coded prefix set of each codebook matches the input prefix set. Hereinafter, the number of codewords contained in a codebook is referred to as the codebook size. In the inductive construction method, a larger codebook is constructed by concatenating previously constructed codebooks with smaller sizes. In the following example, as in FIG. 16 , the codewords contained in the codebook are represented using single-digit integers. However, any representation can be used as long as it can represent the same number of codewords contained in the codebook. Therefore, it goes without saying that the codewords contained in the codebook may be represented using binary notation.

[0200] Multiple codebooks {T k (W)} k=0 K-1 (W is the codebook T k By inductively constructing the size of the codebook {T k} k=0 K-1 where multiple codebooks {T k} k=0 K-1 The number K of codebooks {T k} k=0 K-1 The set of coded prefixes for T is determined in advance so as to satisfy the bisection condition. k The set of coded prefixes is expressed as codebook T k (W) as the mode of multiple codebooks {T k (W)} k=0 K-1 Therefore, the codebook T k (1), T k (2), …(k=0, 1, …, K-1) have the same mode.

[0201] (1) When W=1, the codebook T k(1) (k=0, 1, ..., K-1) is constructed as follows: Symbol string ε and link destination T k By arbitrarily assigning one codeword to each set in (1), the codebook T k (1) (2) When W>1, the codebook T k (W)(k=0, 1,…, K-1) is the codebook T k (W1) and codebook T k (W2) (where W = W1 + W2) is used to construct the codebook T in accordance with the following three cases: k (W) mode is a multiple codebook {T k} k=0 K-1 If a partition can be constructed by elements A1 and A2 of the coding prefix set for k1 (W1) and the codebook T whose modes are set A2 k2 (W2) is used. Codebook T k1 The pair of symbol strings and link destinations included in (W1), codebook T k2 By arbitrarily assigning a total of W different code words to pairs of symbol strings and link destinations included in (W2), the codebook T k (W) is constructed, where the codebook T k1 Link destination T included in (W1) k (W1) to T k (W), and codebook T k2 Links included in (W2) k (W2) to T k (W) is substituted. (2-2) Codebook T k (W) mode is a multiple codebook {T k} k=0 K-1 If a partition can be constructed by the element A1 of the coding prefix set family for the codebook T whose mode is set A1 and the single symbol set {α}, k1 (W1) and a codebook T whose mode is the set of all symbols. k2 (W2) is used. Codebook T k1 The pair of symbol strings and link destinations included in (W1), codebook T k2By arbitrarily assigning a total of W different code words to pairs of symbol strings and link destinations included in (W2), the codebook T k (W) is constructed, where the codebook T k2 The symbol strings included in (W2) are replaced with symbol strings in which the symbol α is added to the beginning of the symbol string. k1 Link destination T included in (W1) k (W1) to T k (W), and codebook T k2 Links included in (W2) k (W2) to T k (W) is substituted. (2-3) Codebook T k If the modes of (W) can be partitioned by the single symbol set {α}, {β}, then the codebook T whose modes are the set of all symbols k1 (W1) and a codebook T whose mode is the set of all symbols. k2 (W2) is used. Codebook T k1 The pair of symbol strings and link destinations included in (W1), codebook T k2 By arbitrarily assigning a total of W different code words to pairs of symbol strings and link destinations included in (W2), the codebook T k (W) is constructed, where the codebook T k1 The symbol string included in (W1) is a symbol string obtained by adding the symbol α to the beginning of the symbol string, and the codebook T k2 The symbol strings included in (W2) are replaced with symbol strings in which the symbol β is added to the beginning of the symbol string. k1 Link destination T included in (W1) k (W1) to T k (W), and codebook T k2 Links included in (W2) k (W2) to T k (W) (3) Codebook T k (W) (k=0, 1,…, K-1) is the size of the codebook T k Repeat step (2) until the size reaches (k=0, 1, ..., K-1).

[0202] The inductive construction method will be described with reference to Figure 18. Figure 18 shows an example of the inductive construction process of a codebook, specifically the process of inductively constructing codebooks T0, T1, and T2. The coded prefix sets of codebooks T0, T1, and T2 are assumed to be {a, b, c, d}, {a, b}, and {c, d}, respectively. Therefore, the coded prefix set families for codebooks T0, T1, and T2 satisfy the bipartiteability condition. Furthermore, the coded prefix sets of codebooks T0, T1, and T2 are assumed to be the modes of codebooks T0(W), T1(W), and T2(W), respectively. Note that, as mentioned above, using {a, b, c, d} as the mode is equivalent to using {ε} as the mode.

[0203] The codebooks T0(1), T1(1), and T2(1) are uniquely determined except for the codeword assigned in step (1) (see FIG. 18(A)).

[0204] The codebooks T0(2), T1(2), and T2(2) can be determined by procedure (2) as follows (see Figures 18(A) and 18(B)). For codebook T0(2), the division of mode {a, b, c, d} can be configured as {a, b} and {c, d}, so the pairs of symbol strings and link destinations included in codebook T1(1) with mode {a, b} and the pairs of symbol strings and link destinations included in codebook T2(1) with mode {c, d} are aligned, two codewords 0 and 1 are assigned, and link destinations T1(1) and T2(1) are replaced with T1(2) and T2(2), respectively. For codebook T1(2), since the division of mode {a, b} can be configured as {a}, {b}, the combination of the symbol string and link destination included in codebook T0(1) with mode {a, b, c, d} and the combination of the symbol string and link destination included in codebook T0(1) with mode {a, b, c, d} are arranged, two codewords 0 and 1 are assigned, the symbol string ε included in codebook T0(1) is replaced with the symbol string a obtained by adding the symbol a to the beginning of the symbol string ε, the symbol string ε included in codebook T0(1) is replaced with the symbol string b obtained by adding the symbol b to the beginning of the symbol string ε, and the link destinations T0(1) and T0(1) are replaced with T0(2) and T0(2), respectively. Codebook T2(2) is also configured in the same way as codebook T1(2).

[0205] The codebooks T0(3), T1(3), and T2(3) can also be determined by procedure (2) (see Figures 18(A), 18(B), and 18(C)). Codebook T0(3) is constructed using codebooks T1(2) and T2(1). Codebook T1(3) is constructed using codebooks T0(2) and T0(1), and codebook T2(3) is constructed using codebooks T0(1) and T0(2). Note that codebook T0(3) may also be constructed using codebooks T1(1) and T2(2), and the selection of codebooks in procedure (2) is arbitrary. Therefore, by selecting a codebook in procedure (2) so as to increase the expected value of the symbol string length that can be coded for each codebook, it is possible to improve compression efficiency.

[0206] The inductive construction method described above makes it possible to construct a codebook while ensuring that the set of coded prefixes matches the set of input prefixes. This will be explained using the example of Figure 18. Codebook T0(3) is constructed using codebooks T1(2) and T2(1). Here, assuming that the set of coded prefixes in codebook T1(2) matches mode {a, b} and the set of coded prefixes in codebook T2(1) matches mode {c, d}, codebook T1(2) can encode any symbol string starting with a or b, and codebook T2(1) can encode any symbol string starting with c or d. Therefore, codebook T0(3), obtained by arranging the symbol strings contained in codebook T1(2) and the symbol strings contained in codebook T2(1), can encode any symbol string starting with {a, b, c, d}. Therefore, the set of coded prefixes in codebook T0(3) matches mode {a, b, c, d}. Codebook T1(3) is constructed by arranging a symbol string obtained by adding a to the beginning of the symbol string contained in codebook T0(2) and a symbol string obtained by adding b to the beginning of the symbol string contained in codebook T0(1). Here, assuming that the coded prefix set of codebook T0(2) matches the mode {a, b, c, d} and the coded prefix set of codebook T0(1) matches the mode {a, b, c, d}, codebooks T0(2) and T0(1) can encode any symbol string starting with a, b, c, or d. Therefore, codebook T1(3), obtained by arranging the symbol string obtained by adding a to the beginning of the symbol string contained in codebook T0(2) and the symbol string obtained by adding b to the beginning of the symbol string contained in codebook T0(1), can encode any symbol string starting with {a, b}. Therefore, the coded prefix set of codebook T1(3) matches the mode {a, b}. Similarly, the set of coded prefixes in codebook T2(3) coincides with the mode {c, d}. Therefore, when W>1, codebook T k (W1) and codebook T k (W2) (where W = W1 + W2) , the coding prefix set and the mode are assumed to match. kIt can be seen that the coded prefix set and the mode also match for (W). Furthermore, it is obvious that the coded prefix set and the mode match for a codebook of size 1. Therefore, the coded prefix set and the mode match for codebooks of any size. On the other hand, by using a coding procedure that uses a mode, the input prefix set of the codebook matches the mode. From the above, it can be seen that the above inductive construction method can obtain multiple codebooks that can encode any symbol string in such a way that the coded prefix set and the input prefix set match for each codebook.

[0207] <<3: Method for Constructing a Family of Encoded Prefixes>> In the above explanation of the inductive construction method, the discussion has proceeded on the assumption that the family of encoded prefixes is determined in advance to satisfy the bisection condition. Here, we will explain a method for constructing a family of encoded prefixes that satisfies the bisection condition.

[0208] In general, it is preferable to determine the family of coding prefixes for multiple codebooks depending on the distribution of the input. Here, the distribution of the input may be obtained by statistically analyzing the input symbol string, or by inputting parameters specifying the distribution into the encoding device or the decoding device. If the family of coding prefixes satisfies the unique dichotomization condition, it becomes easy to construct a family of coding prefixes depending on the distribution of the input. The construction method will be described below.

[0209] A coded prefix family that satisfies the unique dichotomization condition can be represented by a single binary tree. FIG. 19 shows an example of a coded prefix family that satisfies the unique dichotomization condition. As can be seen from FIG. 19, different symbols are assigned to the leaves (nodes without children) of the binary tree, and coded prefix sets, which are elements of the coded prefix family, correspond to the internal nodes (nodes with children). Specifically, for any internal node, the set whose elements are the symbols assigned to the leaves below that internal node represents the coded prefix set corresponding to that internal node. The binary tree in FIG. 19(A) has three internal nodes, and represents the coded prefix family {{a, b, c, d}, {a, b}, {c, d}}. The binary tree in FIG. 19(B) represents the coded prefix family {{a, b, c, d}, {b, c, d}, {b, c}}.

[0210] By using the property of the unique dichotomization condition, it is possible to design a family of coding prefixes appropriate for an input distribution based on the design of a code tree. Here, a code tree is a binary tree that represents a coding rule. Figure 20 shows an example of a code tree and a codebook. As shown in Figure 20(A), 0 or 1 is assigned to each branch of the code tree, and symbols are assigned to the leaves. A codeword corresponding to a symbol is a concatenation of the codes assigned to the branches traversed when tracing the code tree from the root (a node with no parent) to the leaf to which the symbol is assigned. Therefore, the code tree in Figure 20(A) is equivalent to the codebook in Figure 20(B).

[0211] By regarding the code tree as a binary tree representing the set of coded prefixes, it is possible to construct a set of coded prefixes that depends on the input distribution. Specifically, it is as follows: (1) A code tree with high compression efficiency is found for the input distribution. (2) The set of coded prefixes is determined using the code tree in (1).

[0212] The principle of the above construction method is explained below. In a coding rule represented by a code tree, each bit of a codeword can be interpreted as limiting the possible symbols to be decoded. For example, in Figure 20(A), before any codeword is read, all we know is that the symbol to be decoded is one of {a, b, c, d}. If the first bit is 0, then by transitioning along the first branch of the code tree assigned with 0, the symbol to be decoded is narrowed down to one of {a, b}. Conversely, if the first bit is 1, the symbol to be decoded is narrowed down to one of {c, d}. Furthermore, if a code has high compression efficiency for the input distribution, the probability of occurrence of 0 or 1 for each bit will be close. This is because a bias in the probability of occurrence of 0 or 1 indicates that redundancy remains in the codeword. In other words, to avoid bias in the probability of occurrence of the first bit, which determines whether the possible symbols to be decoded are {a, b} or {c, d}, the probability of occurrence of a or b must be close to the probability of occurrence of c or d. In other words, if the code tree in FIG. 20(A) expresses a coding rule with high compression efficiency for a given distribution, the two branches extending from the root corresponding to the possibility of symbols to be decoded {a, b, c, d} are equivalent to dividing the symbols into {a, b} and {c, d}, which have nearly equal occurrence probabilities.

[0213] On the other hand, in a codebook like that shown in Figure 18(C), designing the symbol strings and link destinations so that the occurrence probabilities of codewords 0, 1, and 2 are equal reduces codeword redundancy and improves compression efficiency. For example, when comparing codewords 0 and 1 in codebook T1(3), the corresponding symbol string is a in both cases, but the link destinations are different. This means that codeword 0 indicates that symbol string a is followed by one of the symbols {a, b}, which are the modes of link destination T1(3), while codeword 1 indicates that symbol string a is followed by one of the symbols {c, d}, which are the modes of link destination T2(3). In other words, codewords 0 and 1 can be said to divide all symbols {a, b, c, d} that can follow symbol string a into the possibilities of {a, b} and {c, d}. Therefore, to equalize the occurrence probabilities of codewords 0 and 1, the occurrence probabilities of a or b and c or d must be similar.

[0214] Therefore, when a coding prefix set, which is an element of a coding prefix set family represented by a code tree, is used as a mode, the occurrence probabilities of code words obtained from multiple codebooks can be made more uniform by reducing the redundancy of the occurrence probabilities of code words in the code tree. Therefore, by determining a code tree appropriate for the input distribution and determining a coding prefix set family based on the code tree, and then constructing multiple codebooks, it is possible to obtain codes with higher compression efficiency.

[0215] As can be seen from steps (1) and (2), the above construction method determines the coded prefix family after constructing a code tree. However, it is also possible to determine the coded prefix family without constructing a code tree. For example, the coded prefix family may be determined using the following method based on the construction method of Huffman codes: (1) Set A is the set consisting of all symbols, and the coded prefix family is the empty set. (2) Determine the two elements of set A with the lowest probability of occurrence, determined by the input distribution. (3) Remove the two elements obtained in (2) from set A, and add the union of these two elements (i.e., the set containing these two elements) to both set A and the coded prefix family. (4) If the number of elements in set A is 1, output the coded prefix family and terminate. Otherwise, return to (2).

[0216] Alternatively, for example, a plurality of code trees may be prepared in advance, and the code tree that provides the highest compression efficiency for the input distribution may be selected, and a coded prefix set family may be constructed from the selected code tree.

[0217] Regardless of the method used to determine the coded prefix set family, it is preferable that the coded prefix set family, which depends on the input distribution, satisfies the unique bisection condition.

[0218] <Third Embodiment> An encoding device 100 in this embodiment receives as input a symbol string to be encoded (hereinafter referred to as an input symbol string) and outputs a codeword corresponding to the input symbol string (hereinafter referred to as an output codeword). Also, a decoding device 200 in this embodiment receives as input a codeword to be decoded (hereinafter referred to as an input codeword) and outputs a symbol string corresponding to the input codeword (hereinafter referred to as an output symbol string).

[0219] The encoding device 100 and the decoding device 200 use a plurality of codebooks {T k} k=0 K-1 (where K is an integer greater than or equal to 2) is a data structure with the following characteristics:

[0220] (1) Codebook T k (k=0, 1, ..., K-1) contains information indicating the correspondence between a symbol string and a codeword of a predetermined length and the codebook switching rule. k The set of coded prefixes is expressed as codebook T k The codebook T is a set of all symbols that can be used as prefixes of a symbol string that can be coded when coding is started from k When the coding is started from the codebook that first uses the input prefix set of k is the set of all possible prefixes of a string of symbols that can be coded using the codebook T k For (k=0, 1,…, K-1), the codebook T k (3) The condition that the set of coded prefixes of the codebook {T k} k=0 K-1 The set of coded prefixes ofk} k=0 K-1 All codebooks T included in k Let the set be a set whose elements are the coded prefix sets of the multiple codebooks {T k} k=0 K-1 The coded prefix family satisfies the following conditions (1) it depends on the distribution of the input symbol string, and (2) it contains a set consisting of all symbols, and for any set included in the coded prefix family, a unique division of the set can be constructed by selecting two sets from the coded prefix family or a set whose elements are all single symbol sets (unique bisection condition).

[0221] <<Encoding Device 100>> The encoding device 100 will be described below with reference to Figs. 6 and 7. Fig. 6 is a block diagram showing the configuration of the encoding device 100. Fig. 7 is a flowchart showing the operation of the encoding device 100. As shown in Fig. 6, the encoding device 100 includes an encoding unit 110 and a recording unit 190. The recording unit 190 is a component that appropriately records information required for the processing of the encoding device 100. The recording unit 190 stores, for example, a plurality of codebooks {T k} k=0 K-1 Keep a record of the following.

[0222] The operation of the encoding device 100 will be described with reference to FIG.

[0223] In S110, the encoding unit 110 selects a plurality of codebooks {T k} k=0 K-1 The codeword corresponding to the symbol string that constitutes the input symbol string is obtained using the above, and the codeword obtained by concatenating the codewords is output as the output codeword.

[0224] <<Decoding Device 200>> The decoding device 200 will be described below with reference to Figs. 8 and 9. Fig. 8 is a block diagram showing the configuration of the decoding device 200. Fig. 9 is a flowchart showing the operation of the decoding device 200. As shown in Fig. 8, the decoding device 200 includes a decoding unit 210 and a recording unit 290. The recording unit 290 is a component that appropriately records information required for processing by the decoding device 200. The recording unit 290 stores, for example, a plurality of codebooks {Tk} k=0 K-1 (However, {T k} k=0 K-1 are the multiple codebooks used in the encoding process of the input codeword).

[0225] The operation of the decoding device 200 will be described with reference to FIG.

[0226] In S210, the decoding unit 210 decodes a plurality of codebooks {T k} k=0 K-1 The symbol strings corresponding to the code words that make up the input code word are obtained using the above, and the symbol strings obtained by concatenating the obtained symbol strings are output as the output symbol string.

[0227] According to the embodiment of the present invention, it is possible to realize codes with higher compression efficiency by using a plurality of codebooks that satisfy predetermined conditions.

[0228] <Additional Notes> 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), CPUs (Central Processing Units), 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.

[0229] 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.

[0230] 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.

[0231] 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 21, and operating the control unit 2010, input unit 2030, output unit 2040, display unit 2050, etc.

[0232] 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.

[0233] 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.

[0234] 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 in its storage device 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 the 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).

[0235] 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.

[0236] The present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the spirit of the present invention. Furthermore, the processes described in the above embodiments may not only be executed in chronological order according to the order described, but may also be executed in parallel or individually depending on the processing capacity of the device that executes the processes or as needed.

Claims

1. A coding device that receives an input of a symbol string to be coded (hereinafter referred to as an input symbol string) and outputs a codeword corresponding to the input symbol string (hereinafter referred to as an output codeword), Multiple codebooks {T k } k=0 K-1 (where K is an integer of 2 or more) to obtain a code word corresponding to a symbol string constituting the input symbol string, and to output a code word obtained by concatenating the obtained code words as the output code word, codebook T k (k=0, 1, ..., K-1) contains information indicating the correspondence between symbol strings and codewords of a predetermined length and the codebook switching rule, codebook T k The set of coded prefixes is expressed as codebook T k A codebook T is a set of all symbols that can be used as prefixes of a symbol string that can be coded when coding is started from k When the coding is started from the codebook that first uses the input prefix set of k is the set of all possible prefixes for strings that can be encoded using codebook T k For (k=0, 1,…, K-1), the codebook T k The encoded prefix set and the input prefix set satisfy the condition that they are equal, Multiple codebooks {T k } k=0 K-1 The set of coded prefixes of k } k=0 K-1 All codebooks T included in k Let the set of coded prefixes of Multiple codebooks {T k } k=0 K-1 The coded prefix family satisfies the following conditions: (1) it depends on the distribution of the input symbol string; and (2) it includes a set consisting of all symbols, and for any set included in the coded prefix family, a partition of the set can be uniquely constructed by selecting two sets from the coded prefix family or a set whose elements are all single symbol sets. Encoding device.   A decoding device that receives a codeword to be decoded (hereinafter referred to as an input codeword) as input and outputs a symbol string corresponding to the input codeword (hereinafter referred to as an output symbol string), Multiple codebooks {T k } k=0 K-1 (where K is an integer greater than or equal to 2, k } k=0 K-1 a decoding unit that obtains symbol strings corresponding to codewords that constitute the input codeword using a plurality of codebooks (each of which is a plurality of codebooks used in encoding the input codeword), and outputs a symbol string obtained by concatenating the obtained symbol strings as the output symbol string; codebook T k (k=0, 1, ..., K-1) contains information indicating the correspondence between symbol strings and codewords of a predetermined length and the codebook switching rule, codebook T k The set of coded prefixes is expressed as codebook T k A codebook T is a set of all symbols that can be used as prefixes of a symbol string that can be coded when coding is started from k When the coding is started from the codebook that first uses the input prefix set of k is the set of all possible prefixes for strings that can be encoded using codebook T k For (k=0, 1,…, K-1), the codebook T k The encoded prefix set and the input prefix set satisfy the condition that they are equal, Multiple codebooks {T k } k=0 K-1 The set of coded prefixes of k } k=0 K-1 All codebooks T included in k Let the set of coded prefixes of Multiple codebooks {T k } k=0 K-1 The coded prefix family satisfies the following conditions: (1) it depends on the distribution of the input symbol string; and (2) it includes a set consisting of all symbols, and for any set included in the coded prefix family, a partition of the set can be uniquely constructed by selecting two sets from the coded prefix family or a set whose elements are all single symbol sets. Decryption device. Multiple codebooks {T k } k=0 K-1 (where K is an integer greater than or equal to 2), codebook T k (k=0, 1, ..., K-1) contains information indicating the correspondence between symbol strings and codewords of a predetermined length and the codebook switching rule, codebook T k The set of coded prefixes is expressed as codebook T k A codebook T is a set of all symbols that can be used as prefixes of a symbol string that can be coded when coding is started from k When the coding is started from the codebook that first uses the input prefix set of k is the set of all possible prefixes for strings that can be encoded using codebook T k For (k=0, 1,…, K-1), the codebook T k The encoded prefix set and the input prefix set satisfy the condition that they are equal, Multiple codebooks {T k } k=0 K-1 The set of coded prefixes of k } k=0 K-1 All codebooks T included in k Let the set of coded prefixes of Multiple codebooks {T k } k=0 K-1 The coded prefix family satisfies the following conditions: (1) it depends on the distribution of the input symbol string; and (2) it includes a set consisting of all symbols, and for any set included in the coded prefix family, a partition of the set can be uniquely constructed by selecting two sets from the coded prefix family or a set whose elements are all single symbol sets. Data structure.

Citation Information

Patent Citations

  • Coder, decoder, code conversion table generating method, coding method and decoding method

    JP2001086513A