JP2005129071A - Data compression/decompression apparatus and method - Google Patents

Data compression/decompression apparatus and method Download PDF

Info

Publication number
JP2005129071A
JP2005129071A JP2004320948A JP2004320948A JP2005129071A JP 2005129071 A JP2005129071 A JP 2005129071A JP 2004320948 A JP2004320948 A JP 2004320948A JP 2004320948 A JP2004320948 A JP 2004320948A JP 2005129071 A JP2005129071 A JP 2005129071A
Authority
JP
Japan
Prior art keywords
document
data
word appearance
bits
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2004320948A
Other languages
Japanese (ja)
Other versions
JP3898717B2 (en
Inventor
Nobuyuki Igata
伸之 井形
Isao Nanba
功 難波
Kunio Matsui
くにお 松井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2004320948A priority Critical patent/JP3898717B2/en
Publication of JP2005129071A publication Critical patent/JP2005129071A/en
Application granted granted Critical
Publication of JP3898717B2 publication Critical patent/JP3898717B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To raise the rate of an index creation process and to suppress the size of indices, without lowering the rate of a decoding process for data. <P>SOLUTION: A compressing means is provided to roughen the granularity of numerical data to be used within an index for information retrieval to compress the numerical data, and a storage means is provided to store the compressed data. A decompression means is provided to restore the numerical data, and to return the granularity of the restored numerical data. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、任意のデータを符号化して圧縮するデータ圧縮装置およびその方法と、圧縮されたデータを復元するデータ復元装置およびその方法に関する。   The present invention relates to a data compression apparatus and method for encoding and compressing arbitrary data, and a data decompression apparatus and method for restoring compressed data.

全文検索装置やランキング検索装置等の情報検索装置においては、検索に用いるインデックスの作成速度を高め、かつ、そのサイズを抑えることが重要である。ここで、全文検索装置とは、文書DB(データベース)内の文書の全文を対象として、ユーザにより指定された文字列(キーワード)の存在する文書を検索する装置を指し、ランキング検索装置とは、指定された文字列に対し、関連度の高い文書を検索する装置を指す。   In an information search device such as a full-text search device or a ranking search device, it is important to increase the creation speed of an index used for search and to suppress its size. Here, the full-text search device refers to a device that searches for a document in which a character string (keyword) specified by a user exists for the full text of a document in a document DB (database). A device that retrieves documents with a high degree of relevance for a specified character string.

このような情報検索装置におけるインデックスとは、検索対象となるキーに対して、文書番号、文書内単語出現頻度、文書内単語出現位置等の情報が付加されたデータ構造である。例えば、キーワード「犬」とそれを含む文書の[文書番号,文書内単語出現頻度]の組は、図38のように表される。   An index in such an information search apparatus is a data structure in which information such as a document number, a word appearance frequency in a document, and a word appearance position in a document is added to a key to be searched. For example, a set of [document number, word appearance frequency in document] of a keyword “dog” and a document including the keyword “dog” is represented as shown in FIG.

図38のインデックスは、「犬」というキーは、文書番号1の文書に1回、文書番号2の文書に1回、文書番号3の文書に2回、文書番号25の文書に3回出現していることを表している。   In the index of FIG. 38, the key “dog” appears once for the document number 1 document, once for the document number 2 document, twice for the document number 3 document, and three times for the document number 25 document. It represents that.

この例において、仮に1つの数値データを32bit(4byte)で表すとすると、キー「犬」に対するインデックスは8つの数値を含むので、これを表すのに256bit(=32bit*8)の領域が必要となる。Gbyte単位の文書に対して、この方法による文書番号のみの格納領域の試算を行ってみると、図39に示すように、原文のサイズに対して非常に巨大なものになる。そこで、インデックスサイズを圧縮する必要が生じる。   In this example, if one piece of numerical data is represented by 32 bits (4 bytes), the index for the key “dog” includes eight numerical values, and therefore an area of 256 bits (= 32 bits * 8) is required to represent this. Become. If a trial calculation of the storage area of only the document number by this method is performed for a document in Gbyte units, as shown in FIG. 39, it becomes very large with respect to the size of the original text. Therefore, it is necessary to compress the index size.

インデックスサイズの圧縮の基本は、1つの数値を決まったビット数(通常、32bit)で表すのではなく、できるだけ少ないビット数で表すことである。後述するように、既存の符号化手法は、小さな数値を少ないビット数で表し、大きな数値を大きなビット数で表すようになっている。   The basic principle of index size compression is not to express one numerical value with a fixed number of bits (usually 32 bits) but to represent it with as few bits as possible. As will be described later, existing encoding methods represent small numerical values with a small number of bits and large numerical values with a large number of bits.

そこで、インデックスサイズ圧縮の第一段階として、インデックス内に含まれる数値をできるだけ小さくすることが考えられる。これは、文書番号および文書内単語出現位置のそれぞれについて、連続する2つのデータの差分を取ることにより実現される。文書番号および文書内単語出現位置は、数値の小さいものから大きいものへと順に並んでいるため、各数値間の差分をとることにより、表現される数値を小さくすることができる。   Therefore, as a first stage of index size compression, it is conceivable to make the numerical value included in the index as small as possible. This is realized by taking a difference between two continuous data for each of the document number and the word appearance position in the document. Since the document number and the word appearance position in the document are arranged in order from the smallest numerical value to the largest numerical value, the numerical value expressed can be reduced by taking the difference between the numerical values.

例えば、図38のインデックスに対して、各文書番号間の差分を取ると、図40のようになる。図40の最初のデータ[1,1]の文書番号“1”は、実際の文書番号そのものを表しており、2番目のデータ[1,1]の文書番号“1”は、最初のデータの文書番号“1”と2番目のデータの実際の文書番号“2”との差分値を表している。ここで、実際の文書番号とは、図38に示された、差分をとる前の文書番号を指す。   For example, FIG. 40 shows the difference between the document numbers with respect to the index shown in FIG. 40, the document number “1” of the first data [1,1] represents the actual document number itself, and the document number “1” of the second data [1,1] This represents a difference value between the document number “1” and the actual document number “2” of the second data. Here, the actual document number refers to the document number before taking the difference, as shown in FIG.

また、3番目のデータ[1,2]の文書番号“1”は、2番目のデータの実際の文書番号“2”と3番目のデータの実際の文書番号“3”との差分値を表しており、4番目のデータ[22,3]の文書番号“22”は、3番目のデータの実際の文書番号“3”と4番目のデータの実際の文書番号“25”との差分値を表している。   The document number “1” of the third data [1, 2] represents a difference value between the actual document number “2” of the second data and the actual document number “3” of the third data. The document number “22” of the fourth data [22, 3] is a difference value between the actual document number “3” of the third data and the actual document number “25” of the fourth data. Represents.

このような数値データに対する符号化手法としては、8bit block(8BB)符号化、4bit block(4BB)符号化、Unary coding、γ−coding、δ−coding等が知られている。これらの符号化手法のいずれにおいても、小さな数値は少ないbit数で表され、大きな数値は大きなbit数で表される。   As encoding methods for such numerical data, 8-bit block (8BB) encoding, 4-bit block (4BB) encoding, Unary coding, γ-coding, δ-coding, and the like are known. In any of these encoding methods, a small numerical value is represented by a small number of bits, and a large numerical value is represented by a large number of bits.

まず、8bit block符号化とは、8bit(1byte)から成る各ブロックの中の最初の1ビット(top bit)を継続フラグとし、そのフラグが立っていれば、後続する次のブロックが存在するとみなす方法である。いくつかの数値の例を以下に挙げる。

表す数 bit
1 00000001
2 00000010
3 00000011
128 10000001 00000000
129 10000001 00000001

ここで、数値1、2、3の場合は、後続するブロックが存在しないので先頭のビットは0となっており、数値128、129の場合は、2番目のブロックが存在するので先頭のビットが1となっている。この方法では、1ワード(32bit)で表現される数値を表す符号の最小のビット数は8bit、最大のビット数は40bitとなる。
First, in 8-bit block coding, the first 1 bit (top bit) in each block consisting of 8 bits (1 byte) is set as a continuation flag, and if the flag is set, it is considered that the next block following is present. Is the method. Some numerical examples are given below.

Number to represent
100000001
200000010
3 00000011
128 10000001 00000000
129 10000001 00000001

Here, in the case of numerical values 1, 2, and 3, since the following block does not exist, the first bit is 0, and in the case of numerical values 128 and 129, the second block exists, so the first bit is It is 1. In this method, the minimum bit number of a code representing a numerical value represented by one word (32 bits) is 8 bits, and the maximum bit number is 40 bits.

また、4bit block符号化とは、4bitから成る各ブロックの中の最初の1ビットを継続フラグとし、そのフラグが立っていれば、後続する次のブロックが存在するとみなす方法である。いくつかの数値の例を以下に挙げる。

表す数 bit
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1001 0000
9 1001 0001
128 1010 1000 0000
129 1010 1000 0001

ここで、数値1、2、3、4、5、6、7の場合は、後続するブロックが存在しないので先頭のビットは0となっており、数値8、9の場合は、2番目のブロックが存在するので先頭のビットが1となっている。また、数値128、129の場合は、3番目のブロックが存在するので、1番目および2番目のブロックの先頭のビットが1となっている。この方法では、1ワードで表現される数値を表す符号の最小のビット数は4bit、最大ビット数は44bitとなる。
The 4-bit block coding is a method in which the first 1 bit in each block consisting of 4 bits is used as a continuation flag, and if the flag is set, it is considered that there is a subsequent next block. Some numerical examples are given below.

Number to represent
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1001 0000
9 1001 0001
128 1010 1000 0000
129 1010 1000 0001

Here, in the case of numerical values 1, 2, 3, 4, 5, 6, 7, there is no subsequent block, so the first bit is 0, and in the case of numerical values 8, 9, the second block Is present, the leading bit is 1. In the case of numerical values 128 and 129, since the third block exists, the first bit of the first and second blocks is 1. In this method, the minimum number of bits of a code representing a numerical value expressed by one word is 4 bits, and the maximum number of bits is 44 bits.

また、Unary codingとは、数nを、n−1個の1の連続+0で表す方法である。これは、主として、後述するγ−codingおよびδ−codingの説明に用いられる。いくつかの数値の例を以下に挙げる。

表す数 bit
1 0
2 10
3 110
4 1110
5 11110
6 111110
128 11111・・・127個の1の連続・・・0
129 11111・・・128個の1の連続・・・0

この方法では、1ワードで表現される数値を表す符号の最小のビット数は1bit、最大のビット数は4294967295(232−1)となる。
Further, Unary coding is a method of expressing the number n by n−1 consecutive 1s +0. This is mainly used for the explanation of γ-coding and δ-coding described later. Some numerical examples are given below.

Number to represent
1 0
2 10
3 110
4 1110
5 11110
6 111110
128 11111 ... 127 1 sequence of 1 ... 0
129 11111 ... 128 ones in succession ... 0

In this method, the minimum bit number of a code representing a numerical value expressed by one word is 1 bit, and the maximum bit number is 4294967295 (2 32 −1).

また、γ−codingでは、数xの符号を、prefix部とsuffix部に分けて表す。ここで、log2 xの値以下の整数のうち最大のものをI1(x)=

Figure 2005129071
と書くことにすると、prefix部は、数(1+I1(x))をUnary codingで表すことで得られ、suffix部は、値(x−2I1(x) )をI1(x)bit分の2進数で表すことで得られる。いくつかの数値の例を以下に挙げる。

表す数 prefix部 suffix部
1 0 なし
(1+0ビットで0を表す) (0ビットで1−20 を表す)
2 10 0
(1+1ビットで1を表す) (1ビットで2−21 を表す)
3 10 1
(1+1ビットで1を表す) (1ビットで3−21 を表す)
4 110 00
(1+2ビットで2を表す) (2ビットで4−22 を表す)
5 110 01
(1+2ビットで2を表す) (2ビットで5−22 を表す)
6 110 10
(1+2ビットで2を表す) (2ビットで6−22 を表す)
7 110 11
(1+2ビットで2を表す) (2ビットで7−22 を表す)
8 1110 000
(1+3ビットで3を表す) (3ビットで8−23 を表す)
9 1110 001
(1+3ビットで3を表す) (3ビットで9−23 を表す)
10 1110 010
(1+3ビットで3を表す) (3ビットで10−23 を表す)
128 11111110 0000000
(1+7ビットで7を表す) (7ビットで128−27 を表す)
129 11111110 0000001
(1+7ビットで7を表す) (7ビットで129−27 を表す)

例えば、数値129の場合は、prefix部の符号‘11111110’は8ビットであり、7つの連続する“1”を含んでいる。これは、I(129)=7、すなわち、数値129のsuffix部が7ビットであることを表している。そして、suffix部‘0000001’は、7ビットで129−27 を表している。この方法では、1ワードで表現される数値を表す符号の最小のビット数は1bit、最大のビット数は63bit(=1+31+31bit)となる。 Further, in γ-coding, the code of the number x is divided into a prefix part and a suffix part. Here, the largest integer less than or equal to log 2 x is I1 (x) =
Figure 2005129071
The prefix part is obtained by expressing the number (1 + I1 (x)) by Unary coding, and the suffix part is a value (x−2 I1 (x) ) that is 2 for I1 (x) bits. It is obtained by expressing in decimal. Some numerical examples are given below.

Number to represent Prefix part Suffix part 1 0 None
(Representing a 0 1 + 0 bit) (representing 1-2 0 0 bits)
2 10 0
(1 + 1 bit represents 1) (1 bit represents 2-2 1 )
3 10 1
(1 + 1 represents 1) (1 bit represents 3-2 1 )
4 110 00
(1 + 2 bits represent 2) (2 bits represent 4-2 2 )
5 110 01
(1 + 2 bits represent 2) (2 bits represent 5-2 2 )
6 110 10
(1 + 2 bits represent 2) (2 bits represent 6-2 2 )
7 110 11
(1 + 2 bits represent 2) (2 bits represent 7-2 2 )
8 1110 000
(Representing the 3 1 + 3 bits) (representing 8-2 3 3 bits)
9 1110 001
(Representing the 3 1 + 3 bits) (representing 9-2 3 3 bits)
10 1110 010
(Representing the 3 1 + 3 bits) (representing 10-2 3 3 bits)
128 11111110 0000000
(1 + 7 bits represent 7) (7 bits represent 128-2 7 )
129 11111110 0000001
(1 + 7 bits represent 7) (7 bits represent 129-2 7 )

For example, in the case of the numerical value 129, the code '11111110' of the prefix part is 8 bits and includes seven consecutive “1”. This indicates that I (129) = 7, that is, the suffix part of the numerical value 129 is 7 bits. The suffix part '0000001' represents 129-27 with 7 bits. In this method, the minimum bit number of a code representing a numerical value represented by one word is 1 bit, and the maximum bit number is 63 bits (= 1 + 31 + 31 bits).

δ−codingでも、γ−codingと同様に、数xの符号を、prefix部とsuffix部に分けて表す。prefix部は、数(1+I1(x))をγ−codingで表すことで得られ、suffix部は、γ−codingと同様に、値(x−2I1(x) )をI1(x)bit分の2進数で表すことで得られる。いくつかの数値の例を以下に挙げる。

表す数 prefix部 suffix部
1 0 なし
(1のγcoding) (0ビットで1−20 を表す)
2 100 0
(2のγcoding) (1ビットで2−21 を表す)
3 100 1
(2のγcoding) (1ビットで3−21 を表す)
4 101 00
(3のγcoding) (2ビットで4−22 を表す)
5 101 01
(3のγcoding) (2ビットで5−22 を表す)
6 101 10
(3のγcoding) (2ビットで6−22 を表す)
7 101 11
(3のγcoding) (2ビットで7−22 を表す)
8 11000 000
(4のγcoding) (3ビットで8−23 を表す)
9 11000 001
(4のγcoding) (3ビットで9−23 を表す)
10 11000 010
(4のγcoding) (3ビットで10−23 を表す)
128 1110000 0000000
(8のγcoding) (7ビットで128−27 を表す)
129 1110000 0000001
(8のγcoding) (7ビットで129−27 を表す)

この方法では、1ワードで表現される数値を表す符号の最小のビット数は1bit、最大のビット数は42bit(=(5+1+5)+31bit)となる。
In δ-coding, as in γ-coding, the sign of number x is divided into a prefix portion and a suffix portion. The prefix part is obtained by expressing the number (1 + I1 (x)) by γ-coding, and the suffix part converts the value (x-2 I1 (x) ) by I1 (x) bits in the same way as γ-coding. It is obtained by expressing it in binary number. Some numerical examples are given below.

Number to represent Prefix part Suffix part 1 0 None
(1 Ganmacoding) (representing 1-2 0 0 bits)
2 100 0
(Γcoding of 2) (1 bit represents 2-2 1 )
3 100 1
(Γcoding of 2) (3-2 1 is represented by 1 bit)
4 101 00
(3 gamma coding) (2 bits represent 4-2 2 )
5 101 01
(3 gamma coding) (2 bits represent 5-2 2 )
6 101 10
(3 gamma coding) (2 bits represent 6-2 2 )
7 101 11
(3 Ganmacoding) (representing 7-2 2 2 bits)
8 11,000,000
(4 Ganmacoding) (representing 8-2 3 3 bits)
9 11000 001
(4 Ganmacoding) (representing 9-2 3 3 bits)
10 11000 010
(4 Ganmacoding) (representative of 10-2 3 3 bits)
128 1110,000 0000000
(8 Ganmacoding of) (representing 128-2 7 7 bits)
129 1110000 0000001
(8 Ganmacoding of) (representing 129-2 7 7 bits)

In this method, the minimum bit number of a code representing a numerical value represented by one word is 1 bit, and the maximum bit number is 42 bits (= (5 + 1 + 5) +31 bits).

しかしながら、上述した従来の符号化手法には、次のような問題がある。
例えば、これらの符号化手法を用いて図40のインデックス構造を表現した場合に、必要となるbit数は図41に示すようになる。図41においては、符号化前の元データのみ10進数の値で記述され、符号化後のインデックス構造は、元データを表現するのに必要なビット数を用いて記述されている。図41を見ると、圧縮を行わない32bit符号化が最も多くのビット数を必要とし、δ−codingが最も少ないビット数で記述できることが分かる。
However, the conventional encoding method described above has the following problems.
For example, when the index structure of FIG. 40 is expressed using these encoding methods, the required number of bits is as shown in FIG. In FIG. 41, only the original data before encoding is described with a decimal value, and the index structure after encoding is described using the number of bits necessary for expressing the original data. Referring to FIG. 41, it can be seen that 32-bit encoding without compression requires the largest number of bits, and δ-coding can be described with the smallest number of bits.

一般に、8bit block符号化、4bit block符号化のようなブロック系の符号化手法では、どんなに小さな数値でも、必ず1ブロック分のビット数を必要とする。ところが、図40のように、差分値を用いたインデックス構造においては、“1”や“2”のような小さな数値がデータの大部分を占めるため、インデックスサイズがあまり小さくならないという問題がある。また、各ブロックの先頭に継続フラグを付加していく処理が必要なため、インデックス作成処理に時間がかかるという問題もある。   In general, in block-type encoding methods such as 8-bit block encoding and 4-bit block encoding, the number of bits for one block is always required regardless of a small numerical value. However, as shown in FIG. 40, in the index structure using difference values, there is a problem that the index size is not so small because small numerical values such as “1” and “2” occupy most of the data. In addition, since it is necessary to add a continuation flag to the head of each block, there is a problem that it takes time to create an index.

これに対して、Unary coding、γ−coding、δ−codingのようなビット系の符号化手法では、“1”や“2”のような小さな数値をブロック系よりも小さなビット数で表すことができる。しかし、数値が大きくなるにつれて、ブロック系よりもはるかにビット数が多くなる傾向にあるため、必ずしもインデックスサイズが小さくなるという保証はない。また、アルゴリズムが複雑なため、インデックス作成処理および復号化処理ともに、処理時間が長くなるという問題もある。   On the other hand, in a bit-based encoding method such as Unary coding, γ-coding, and δ-coding, a small numerical value such as “1” or “2” may be expressed by a smaller number of bits than in the block system. it can. However, as the numerical value increases, the number of bits tends to be much larger than that of the block system, so there is no guarantee that the index size will be reduced. Further, since the algorithm is complicated, there is a problem that both the index creation process and the decryption process take a long processing time.

本発明の課題は、数値データの復号化処理の速度を落とさずに、インデックス作成処理を高速化し、インデックスのサイズを抑えることのできるデータ圧縮装置およびその方法と、データ復元装置およびその方法を提供することである。   An object of the present invention is to provide a data compression apparatus and method, and a data restoration apparatus and method that can increase the speed of index creation processing and reduce the size of the index without reducing the speed of the decoding process of numerical data. It is to be.

図1は、本発明のデータ圧縮装置およびデータ復元装置の原理図である。図1のデータ圧縮装置は圧縮手段1と格納手段2を備え、データ復元装置は格納手段2と復元手段3を備える。   FIG. 1 is a principle diagram of a data compression apparatus and data restoration apparatus according to the present invention. The data compression apparatus of FIG. 1 includes compression means 1 and storage means 2, and the data decompression apparatus includes storage means 2 and decompression means 3.

圧縮手段1は、与えられたデータ4をブロック単位で圧縮し、圧縮されたデータ5の先頭部分に、そのデータ5の長さを表す継続フラグ情報を生成する。
格納手段2は、圧縮されたデータ5を格納する。
The compression unit 1 compresses the given data 4 in units of blocks, and generates continuation flag information indicating the length of the data 5 at the head portion of the compressed data 5.
The storage means 2 stores the compressed data 5.

復元手段3は、ブロック単位で圧縮されたデータ5の先頭部分の継続フラグ情報に基づいて、そのデータ5の長さを決定し、元のデータ4を復元する。
元のデータ4がバイナリのビットパターンである場合、一般に、それが表す数値が大きいほど圧縮率は低下し、小さいほど圧縮率は向上する。圧縮手段1は、元のデータ4の値に応じて圧縮されたデータ5のブロック長を決定し、対応する継続フラグ情報を生成する。そして、その継続フラグ情報をデータ5の先頭部分に格納し、それに続いてデータ4を表すデータを格納する。
The restoring means 3 determines the length of the data 5 based on the continuation flag information at the head portion of the data 5 compressed in units of blocks, and restores the original data 4.
When the original data 4 is a binary bit pattern, generally, the larger the numerical value it represents, the lower the compression ratio, and the smaller, the higher the compression ratio. The compression means 1 determines the block length of the compressed data 5 according to the value of the original data 4, and generates corresponding continuation flag information. Then, the continuation flag information is stored in the head portion of the data 5, and subsequently, data representing the data 4 is stored.

数値が比較的小さければ、データ5はデータ4より短いビットパターンで表される。また、継続フラグ情報は、データ5から継続フラグ情報を除いた残りの部分のブロック長を表すようにしてもよい。   If the numerical value is relatively small, the data 5 is represented by a bit pattern shorter than the data 4. Further, the continuation flag information may represent the block length of the remaining part of the data 5 excluding the continuation flag information.

このような圧縮処理によれば、従来のブロック系の符号化のように、各ブロックの先頭に1つずつ継続フラグを付加していく必要がなく、継続フラグ情報の作成処理を1回で済ませることができる。したがって、データ5の作成処理が高速化され、これを用いてインデックス作成処理を高速化することができる。   According to such compression processing, it is not necessary to add a continuation flag one by one at the head of each block as in conventional block coding, and the continuation flag information creation processing can be completed only once. be able to. Therefore, the creation process of the data 5 is speeded up, and the index creation process can be speeded up using this process.

また、データ4の値に応じてデータ5の先頭ブロックの長さを変えることができ、小さな数値の場合にこれを短くすることで、データ5の圧縮率が向上する。インデックス内で用いられる数値データには、1や2のような小さな値が多数現れるため、これはインデックスサイズの削減につながる。   In addition, the length of the leading block of data 5 can be changed according to the value of data 4, and the compression rate of data 5 is improved by shortening this in the case of a small numerical value. Numerous small values such as 1 and 2 appear in the numerical data used in the index, which leads to a reduction in index size.

復元手段3は、圧縮されたデータ5の先頭部分から継続フラグ情報を取り出し、それを元にデータ5のブロック長を決定する。次に、その長さから継続フラグ情報のブロック長を差し引いて、データ5の残りの部分のブロック長を求め、残りのデータを取り出す。そして、取り出したデータから元のデータ4を生成する。継続フラグ情報が残りのデータのブロック長を表す場合は、それをそのまま用いて残りのデータを取り出すことができる。   The decompressing means 3 extracts the continuation flag information from the head portion of the compressed data 5 and determines the block length of the data 5 based on it. Next, the block length of the remaining portion of the data 5 is obtained by subtracting the block length of the continuation flag information from the length, and the remaining data is extracted. Then, original data 4 is generated from the extracted data. If the continuation flag information represents the block length of the remaining data, it can be used as it is to extract the remaining data.

このような復元処理によれば、従来のブロック系の復号化のように、各ブロックの先頭から継続フラグを1つずつ取り出す必要がなく、継続フラグ情報の取り出しを1回で済ませることができる。したがって、比較的大きな数値の場合には、データ4の作成処理が高速化される。   According to such a restoration process, it is not necessary to extract one continuation flag from the head of each block as in conventional block decoding, and continuation flag information can be extracted once. Therefore, in the case of a relatively large numerical value, the data 4 creation process is accelerated.

さらに、従来のビット系の符号化と比較して、圧縮処理および復元処理がより簡単であり、処理時間が短くて済む。また、大きな数値の圧縮率はより高くなると考えられる。
本発明の別のデータ圧縮装置およびデータ復元装置において、圧縮手段1は、情報検索のためのインデックス内で用いられる数値データの粒度を粗くして、数値データを圧縮し、格納手段2は、圧縮されたデータを格納する。復元手段3は、数値データを復元し、復元された数値データの粒度を元に戻す。
Furthermore, the compression process and the decompression process are simpler and the processing time is shorter than the conventional bit encoding. Moreover, it is thought that the compression rate of a big numerical value becomes higher.
In another data compression apparatus and data decompression apparatus of the present invention, the compression means 1 compresses numerical data by coarsening the granularity of numerical data used in the index for information retrieval, and the storage means 2 compresses the numerical data. Stored data. The restoring means 3 restores the numerical data, and restores the granularity of the restored numerical data.

例えば、図1の圧縮手段1と復元手段3は、後述する図2のCPU16(中央処理装置)とメインメモリ19に対応し、格納手段2はメインメモリ19または磁気ディスク装置11に対応する。   For example, the compression unit 1 and the decompression unit 3 in FIG. 1 correspond to a CPU 16 (central processing unit) and a main memory 19 in FIG. 2 to be described later, and the storage unit 2 corresponds to the main memory 19 or the magnetic disk device 11.

本発明によれば、数値データの復号化処理の速度を落とさずに、インデックス作成処理を高速化することができ、また、インデックスの圧縮率を高めることができる。
特に、4BB改符号化により、インデックス作成に要する時間を短縮することができ、B24符号化および84BB符号化により、それほど符号化/復号化の処理速度を落とすことなく、インデックスの圧縮率を高めることができる。また、Per符号化により、情報の精度は多少落ちるものの、インデックスの圧縮率を高めることができる。
According to the present invention, the index creation process can be speeded up without reducing the speed of the numerical data decoding process, and the index compression rate can be increased.
In particular, the time required for index creation can be shortened by 4BB re-encoding, and the index compression rate can be increased without significantly reducing the encoding / decoding processing speed by B24 encoding and 84BB encoding. Can do. In addition, although the accuracy of information is slightly reduced by Per encoding, the index compression rate can be increased.

以下、図面を参照しながら、本発明の実施の形態を詳細に説明する。
本発明においては、新たな符号化方法として、4bit block(4BB)改符号化、84bit block(84BB)符号化、およびB24(block24)符号化の3種類のブロック系符号化方法を提案する。まず、これらの符号化の概要を、それぞれ説明することにする。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
In the present invention, as a new encoding method, three types of block encoding methods are proposed: 4-bit block (4BB) re-encoding, 84-bit block (84BB) encoding, and B24 (block24) encoding. First, the outline of these encodings will be described respectively.

4BB改符号化は、基本的には、上述の4BB符号化を改良したものである。通常の4BB符号化では、4bitのうちtop 1bitを継続フラグ‘1’とし、そのフラグが存在していたら次の4bitも数が存在するとみなす。これに対し、4BB改符号は、すべての継続フラグをまとめて先頭に持つ構造とする。そして、最初に現れる0より後のビットパターンを数値部分とみなす。いくつかの数値の例を以下に挙げる。

表す数 bit
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000 1000
9 1000 1001
128 1100 1000 0000
129 1100 1000 0001

ここで、数値1、2、3、4、5、6、7の場合は、後続するブロックが存在しないので先頭のビットは0となっており、数値8、9の場合は、2番目のブロックが存在するので、1番目のブロックの先頭のビットが1となっている。また、数値128、129の場合は、3番目のブロックも存在するので、1番目のブロックの1番目および2番目のビットが1となっている。継続フラグに続く数値のビットパターンのLSB(least significant bit )は、いずれの場合も最後のブロックの右端に来るようになっている。
The 4BB reformed encoding is basically an improvement of the above-mentioned 4BB encoding. In normal 4BB encoding, top 1 bit of 4 bits is set as a continuation flag '1', and if the flag exists, it is considered that the next 4 bits also have a number. On the other hand, the 4BB reform code has a structure in which all continuation flags are put together at the head. Then, the bit pattern after 0 appearing first is regarded as a numerical part. Some numerical examples are given below.

Number to represent
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000 1000
9 1000 1001
128 1100 1000 0000
129 1100 1000 0001

Here, in the case of numerical values 1, 2, 3, 4, 5, 6, 7, there is no subsequent block, so the first bit is 0, and in the case of numerical values 8, 9, the second block Therefore, the first bit of the first block is 1. In the case of numerical values 128 and 129, the third block also exists, and therefore the first and second bits of the first block are 1. The LSB (least significant bit) of the numerical bit pattern following the continuation flag is arranged at the right end of the last block in any case.

この方法では、1ワードで表現される数値を表す符号の最小のビット数は4bit、最大ビット数は44bitとなり、圧縮効率自体は4BB符号化と等価である。しかしながら、符号化処理におけるステップ数が4BB符号化よりも少なくなる。このため、大規模データベース(DB)に対してインデックスを作成するような場合には、かなりの高速化が期待できる。   In this method, the minimum bit number of a code representing a numerical value expressed by one word is 4 bits and the maximum bit number is 44 bits, and the compression efficiency itself is equivalent to 4BB encoding. However, the number of steps in the encoding process is smaller than that in 4BB encoding. For this reason, when an index is created for a large-scale database (DB), a considerable increase in speed can be expected.

また、復号化に関しては、4BB符号化では、1つ1つ継続フラグを判定しながらループ処理を繰り返し、4BB改符号化では、継続フラグを先に復号化してから、まとめて数値を求めることになる。このような違いはあるが、復号化の処理速度は、符号化と比べると、両者の間でそれほど変化はない。ただし、数値が大きくなった場合には、4BB符号より4BB改符号のほうが速くなる。   As for decoding, in 4BB encoding, loop processing is repeated while determining each continuation flag, and in 4BB re-encoding, the continuation flag is decoded first and then a numerical value is obtained collectively. Become. Although there is such a difference, the decoding processing speed does not change so much between the two compared with the encoding. However, when the numerical value is increased, the 4BB code is faster than the 4BB code.

次に、4BB改符号化と類似する84BB符号化について説明する。4BB改符号化のブロック長は、どんな数値に対しても4bit一定であるのに対し、84BB符号化では、初めの1blockだけを8bit、継続フラグによって後ろに続く各ブロックを4bitとする。この方法では、127以下の数値は1bitの0と7bitの数値のビットパターンで表され、128以上の数値はいくつかの継続フラグと数値のビットパターンで表現される。いくつかの数値の例を以下に挙げる。

表す数 bit
1 00000001
2 00000010
3 00000011
4 00000100
5 00000101
6 00000110
7 00000111
8 00001000
9 00001001
127 01111111
128 10001000 0000
129 10001000 0001

ここで、数値1、2、3、4、5、6、7、8、9、127の場合は、後続するブロックが存在しないので先頭のビットは0となっており、数値128、129の場合は、2番目のブロックが存在するので、1番目のブロックの先頭のビットが1となっている。この方法では、1ワードで表現される数値を表す符号の最小のビット数は8bit、最大のビット数は44bitとなる。
Next, 84BB encoding similar to 4BB reformed encoding will be described. The block length of 4BB re-encoding is fixed to 4 bits for any numerical value, whereas in 84BB encoding, only the first 1 block is 8 bits and each subsequent block is 4 bits by the continuation flag. In this method, a numerical value of 127 or less is represented by a 1-bit 0 and 7-bit numerical bit pattern, and a numerical value of 128 or more is represented by several continuation flags and a numerical bit pattern. Some numerical examples are given below.

Number to represent
100000001
200000010
3 00000011
400000100
500000101
600000100
700000111
800001000
9 000001001
127 01111111
128 10001000 0000
129 10001000 0001

Here, in the case of numerical values 1, 2, 3, 4, 5, 6, 7, 8, 9, 127, there is no subsequent block, so the first bit is 0, and in the case of numerical values 128, 129. Since the second block exists, the first bit of the first block is 1. In this method, the minimum bit number of a code representing a numerical value expressed by one word is 8 bits, and the maximum bit number is 44 bits.

例えば、インデックスにおいて文書内単語出現位置として扱われる数値は、文書番号(差分値)や文書内単語出現頻度と比較して、かなり大きな値になる。このため、差分値を用いたとしても、通常の数値データ符号化方法ではうまく圧縮することができない。   For example, the numerical value treated as the word appearance position in the document in the index is a considerably large value compared with the document number (difference value) and the word appearance frequency in the document. For this reason, even if the difference value is used, the normal numerical data encoding method cannot be compressed well.

84BB符号化は、4BB符号化や4BB改符号化と比較した場合、最初の8bitで、1bit分だけ大きな数値まで表現することができる。これにより、中くらいの大きさの数値を、他の符号化よりも少ないビット数で表すことができ、文書内単語出現位置の符号化に適しているといえる。   84BB encoding can express a numerical value larger by 1 bit in the first 8 bits when compared with 4BB encoding or 4BB re-encoding. As a result, a medium numerical value can be expressed with a smaller number of bits than other encodings, and it can be said that it is suitable for encoding a word appearance position in a document.

次に、B24符号化とは、数値1、2を2bitで符号化し、数値3〜6を4bitで符号化し、数値7以上を4BB改符号化で符号化する方法である。数値1、2は、初めの1bitを継続フラグ‘0’とする2bit符号で表し、数値3〜6は、初めの2bitを継続フラグ‘10’とする4bit符号で表す。それらより大きい数値の符号化は、4BB改符号化の処理と同様になる。   Next, B24 encoding is a method in which the numerical values 1 and 2 are encoded with 2 bits, the numerical values 3 to 6 are encoded with 4 bits, and the numerical value 7 or more is encoded with 4BB modified encoding. Numerical values 1 and 2 are represented by a 2-bit code in which the first 1 bit is a continuation flag '0', and numerical values 3 to 6 are represented by a 4-bit code in which the first 2 bits are a continuation flag '10'. The encoding of numerical values larger than those is the same as the 4BB re-encoding process.

ただし、4BB改符号化では、継続フラグの後に続く数値にはそのままの値が用いられるのに対し、B24符号化では、数値1、2の場合には1を減じた値が用いられ、数値3〜6の場合には3を減じた値が用いられ、7以上の場合には7を減じた値が用いられる。また、継続フラグは、4BB改符号より1bit多くなる。いくつかの数値の例を以下に挙げる。

表す数 bit
1 00
2 01
3 1000
4 1001
5 1010
6 1011
7 1100 0000
8 1100 0001
9 1100 0010
39 1110 0010 0000
40 1110 0010 0001

ここで、数値1、2の場合は、先頭のビットは0となっており、その次のビットは元の数値から1を減じた値を表している。また、数値3、4、5、6の場合は、先頭の2ビットが10となっており、その次の2ビットは元の数値から3を減じた値を表している。
However, in the 4BB modified encoding, a value as it is is used as the numerical value following the continuation flag, whereas in the B24 encoding, a value obtained by subtracting 1 is used in the case of the numerical values 1 and 2, and the numerical value 3 In the case of ˜6, a value obtained by subtracting 3 is used. In the case of 7 or more, a value obtained by subtracting 7 is used. Further, the continuation flag is 1 bit more than the 4BB code change. Some numerical examples are given below.

Number to represent
100
2 01
3 1000
4 1001
5 1010
6 1011
7 1100 0000
8 1100 0001
9 1100 0010
39 1110 0010 0000
40 1110 0010 0001

Here, in the case of numerical values 1 and 2, the first bit is 0, and the next bit represents a value obtained by subtracting 1 from the original numerical value. In the case of numerical values 3, 4, 5, and 6, the first 2 bits are 10, and the next 2 bits represent a value obtained by subtracting 3 from the original numerical value.

また、数値7、8、9の場合は、2番目のブロックが存在するので、先頭の2ビットは11となっており、2番目のブロックは元の数値から7を減じた値を表している。また、数値39、40の場合は、3番目のブロックも存在するので、先頭の3ビットが111となっており、2番目および3番目のブロックは元の数値から7を減じた値を表している。   In the case of numerical values 7, 8, and 9, since the second block exists, the first 2 bits are 11, and the second block represents a value obtained by subtracting 7 from the original numerical value. . In the case of numerical values 39 and 40, since the third block also exists, the first 3 bits are 111, and the second and third blocks represent values obtained by subtracting 7 from the original numerical values. Yes.

この方法では、1ワードで表現される数値を表す符号の最小のビット数は2bit、最大のビット数は44bitとなり、数値1および2を表した場合に、4BB改符号化よりも2ビット節約することができる。通常のDBでは、文書内単語出現頻度のほとんどの数値が1もしくは2となるため、これらの数値を2bitで表すことで、4BB符号化および4BB改符号化よりも、実際のインデックスの圧縮率が高くなることが期待される。   In this method, the minimum number of bits of a code representing a numerical value expressed by one word is 2 bits, and the maximum number of bits is 44 bits. When the numerical values 1 and 2 are expressed, 2 bits are saved as compared with 4BB re-encoding. be able to. In ordinary DBs, most numerical values of the word appearance frequency in the document are 1 or 2, and these numerical values are represented by 2 bits, so that the actual index compression rate is higher than that of 4BB encoding and 4BB re-encoding. Expected to be higher.

また、符号化処理自体も、4BB改符号化と比較して、それほど処理速度は低下しない。さらに、符号化する数値のほとんどが1もしくは2ならば、ステップ数は4BB改符号化よりも少なくなるため、より高速である。復号化の処理速度に関しても、符号化と同様である。   Also, the processing speed of the encoding process itself is not so much lower than that of the 4BB reformed encoding. Furthermore, if most of the numerical values to be encoded are 1 or 2, the number of steps is smaller than that of 4BB re-encoding, which is faster. The processing speed of decoding is the same as that of encoding.

図2は、上述した符号化方法に基づくデータ圧縮装置/復元装置を含む情報検索装置の構成図である。図2の情報検索装置は、ソフトウェアを搭載した情報処理装置(コンピュータ)により実現され、磁気ディスク装置11、フロッピーディスク駆動装置(FDD)12、プリンタ14、ディスプレイ15、CPU(中央処理装置)16、キーボード17、ポインティング・デバイス18、メインメモリ19、およびネットワーク接続装置31を備え、それらの各装置はバス20により互いに結合されている。   FIG. 2 is a configuration diagram of an information search apparatus including a data compression apparatus / decompression apparatus based on the above-described encoding method. 2 is realized by an information processing device (computer) loaded with software, and includes a magnetic disk device 11, a floppy disk drive (FDD) 12, a printer 14, a display 15, a CPU (central processing unit) 16, A keyboard 17, a pointing device 18, a main memory 19, and a network connection device 31 are provided, and these devices are coupled to each other by a bus 20.

磁気ディスク装置11には、文書DB21とインデックス22が格納される。磁気ディスク装置11の代わりに、光ディスク装置、光磁気ディスク装置等を用いてもよい。
CPU16は、メインメモリ19に格納されたプログラムを用いて、情報検索に必要な処理を実現する。メモリ19は、例えばROM(read only memory)、RAM(random access memory)等を含む。メモリ19には、インデックス作成プログラム23、検索エンジン(検索プログラム)24、文書表示プログラム25等が保持され、ワーク領域26が設けられる。
The magnetic disk device 11 stores a document DB 21 and an index 22. Instead of the magnetic disk device 11, an optical disk device, a magneto-optical disk device, or the like may be used.
The CPU 16 implements processing necessary for information retrieval using a program stored in the main memory 19. The memory 19 includes, for example, a ROM (read only memory), a RAM (random access memory), and the like. The memory 19 holds an index creation program 23, a search engine (search program) 24, a document display program 25, and the like, and a work area 26 is provided.

インデックス作成プログラム23は、文書DB21からインデックス22を作成して、磁気ディスク装置11に格納する。このプログラム23は、4BB改符号化、84BB符号化、あるいはB24符号化等に基づくデータ圧縮処理を含んでいる。   The index creation program 23 creates an index 22 from the document DB 21 and stores it in the magnetic disk device 11. The program 23 includes data compression processing based on 4BB reformed encoding, 84BB encoding, B24 encoding, or the like.

検索エンジン24は、インデックス22を用いて、文書DB21の文書を検索する。全文検索装置の場合には、ユーザが指定した単語列を含む文書を検索し、ランキング検索装置の場合には、ユーザが指定した単語列に対して関連度の高い文書を検索する。この検索エンジン24は、4BB改符号化、84BB符号化、あるいはB24符号化等に基づくデータ復元処理(復号化処理)を含んでいる。 文書表示プログラム25は、検索結果から指定された文書を切り出し、それをユーザに表示する。ワーク領域26は、これらのプログラム23、24、25が処理に使用する領域である。   The search engine 24 uses the index 22 to search for documents in the document DB 21. In the case of a full-text search device, a document including a word string specified by the user is searched. In the case of a ranking search device, a document having a high degree of relevance is searched for the word string specified by the user. The search engine 24 includes data restoration processing (decoding processing) based on 4BB reformed encoding, 84BB encoding, B24 encoding, or the like. The document display program 25 cuts out a designated document from the search result and displays it to the user. The work area 26 is an area used by these programs 23, 24, and 25 for processing.

また、キーボード17およびポインティング・デバイス18は、ユーザからの要求や指示の入力に用いられ、プリンタ14およびディスプレイ15は、ユーザへの問い合せや処理結果等の出力に用いられる。   The keyboard 17 and the pointing device 18 are used for inputting requests and instructions from the user, and the printer 14 and the display 15 are used for outputting inquiries to the user and processing results.

FDD12は、フロッピーディスク13を駆動し、その記憶内容にアクセスする。フロッピーディスク13に、必要なデータやプログラム23、24、25等を格納しておき、必要に応じて、それらをメモリ19にロードして使用することができる。また、フロッピーディスク13以外にも、メモリカード、CD−ROM(compact disk read only memory )、光ディスク、光磁気ディスク等の任意のコンピュータ読み取り可能な記録媒体を使用することができる。   The FDD 12 drives the floppy disk 13 and accesses the stored contents. Necessary data and programs 23, 24, 25, etc. are stored in the floppy disk 13 and can be loaded into the memory 19 and used as necessary. In addition to the floppy disk 13, any computer-readable recording medium such as a memory card, a CD-ROM (compact disk read only memory), an optical disk, or a magneto-optical disk can be used.

ネットワーク接続装置31は、LAN(local area network)等の任意の通信ネットワークに接続され、通信に伴うデータ変換等を行う。情報検索装置は、ネットワーク接続装置31を介して、外部の情報提供者の装置32(データベース等)と通信する。これにより、必要に応じて、上述のプログラムとデータを装置32からネットワークを介して受け取り、それらをメモリ19にロードして使用することができる。   The network connection device 31 is connected to an arbitrary communication network such as a local area network (LAN) and performs data conversion associated with communication. The information retrieval apparatus communicates with an external information provider apparatus 32 (database or the like) via the network connection apparatus 31. As a result, the above-described program and data can be received from the device 32 via the network and used by loading them into the memory 19 as necessary.

次に、図3から図20までを参照しながら、本発明のデータ圧縮装置/復元装置で用いる4BB改符号化、84BB符号化、およびB24符号化について、より具体的に説明する。   Next, with reference to FIG. 3 to FIG. 20, the 4BB encoding, 84BB encoding, and B24 encoding used in the data compression / decompression apparatus of the present invention will be described more specifically.

図3から図20において、変数Valueは、元データのビットパターンを表し、変数Bitbufは、符号化されたビットパターンを表す。また、‘:=’は、右辺の値を左辺の値へ代入する操作を表し、‘bitcopy(第1引数,第2引数)’は、第2引数のビットパターンを第1引数の先頭にコピーする操作を表す。   3 to 20, a variable Value represents a bit pattern of original data, and a variable Bitbuf represents an encoded bit pattern. ': =' Represents an operation of assigning the value on the right side to the value on the left side, and 'bitcopy (first argument, second argument)' copies the bit pattern of the second argument to the beginning of the first argument. Represents the operation to be performed.

また、‘bitcat(第1引数,第2引数)’は、第2引数のビットパターンを第1引数の後に追加する操作を表し、‘read(第1引数,第2引数)’は、第1引数から第2引数の個数分のビットパターンを読み取って数値にする操作を表す。その他の記述については、C言語もしくは数学記号と同様である。   'Bitcat (first argument, second argument)' represents an operation of adding a bit pattern of the second argument after the first argument, and 'read (first argument, second argument)' is the first Represents an operation of reading bit patterns as many as the number of second arguments from an argument and converting them into numerical values. Other descriptions are the same as in C language or mathematical symbols.

比較のため、最初に、4BB符号化処理および4BB復号化処理の実現例を説明することにする。図3は、4BB符号化処理のフローチャートである。処理が開始されると、情報検索装置は、まず、i=11とおいて(ステップS1)、8ビットの1次バッファCode[i]を用意し、Valueのビットパターンの下位3ビットをCode[i]の後半に入れる(ステップS2)。ここで、‘Value & 0x7’は、Valueと0x7=‘0111’の論理積を表している。   For comparison, first, an implementation example of the 4BB encoding process and the 4BB decoding process will be described. FIG. 3 is a flowchart of the 4BB encoding process. When the processing is started, the information search apparatus first sets i = 11 (step S1), prepares an 8-bit primary buffer Code [i], and sets the lower 3 bits of the Value bit pattern to Code [i ] In the latter half (step S2). Here, “Value & 0x7” represents a logical product of Value and 0x7 = “0111”.

次に、Valueを3ビット右にシフトし(ステップS3)、Valueの値を0と比較する(ステップS4)。Valueが0より大きい場合、iを1だけデクリメントし(ステップS5)、シフト後のValueの下位3ビットの前にフラグの値1を付加して、Code[i]の後半に入れる(ステップS6)。ここで、‘0x8 | (Value & 0x7)’は、0x8=‘1000’とValueの下位3ビットとの論理和を表している。そして、Valueを3ビット右にシフトし(ステップS7)、ステップS4以降の処理を繰り返す。   Next, the value is shifted to the right by 3 bits (step S3), and the value of the value is compared with 0 (step S4). If Value is greater than 0, i is decremented by 1 (step S5), the flag value 1 is added before the lower 3 bits of the shifted value, and it is placed in the latter half of Code [i] (step S6). . Here, “0x8 | (Value & 0x7)” represents a logical sum of 0x8 = “1000” and the lower 3 bits of the Value. Then, the value is shifted to the right by 3 bits (step S7), and the processing after step S4 is repeated.

ステップS4において、Valueの値が0になると、次に、iと12を比較する(ステップS8)。iが12より小さければ、Code[i]の後半に格納された4ビットのデータを、Bitbufの空領域の先頭部分にコピーして(ステップS9)。iを1だけインクリメントする(ステップS10)。   When the value of Value becomes 0 in step S4, i and 12 are then compared (step S8). If i is smaller than 12, the 4-bit data stored in the second half of Code [i] is copied to the leading part of the empty area of Bitbuf (step S9). i is incremented by 1 (step S10).

そして、ステップS8以降の処理を繰り返し、ステップS8においてiが12に達すると、処理を終了する。このような符号化処理のプログラムコード(C言語で記述)は、例えば、図4に示すようになる。   And the process after step S8 is repeated and a process will be complete | finished when i reaches 12 in step S8. The program code for such an encoding process (described in C language) is, for example, as shown in FIG.

図5は、4BB復号化処理のフローチャートである。処理が開始されると、情報検索装置は、まず、Bitbufの初めの4ビットをValueに読み込み(ステップS11)、その値を0x7と比較する(ステップS12)。Valueが0x7以下の場合は、先頭のフラグが0であり、後続ブロックが存在しないことを意味するので、そのまま処理を終了する。   FIG. 5 is a flowchart of the 4BB decoding process. When the processing is started, the information retrieval apparatus first reads the first 4 bits of Bitbuf into Value (step S11) and compares the value with 0x7 (step S12). When the value is 0x7 or less, the leading flag is 0, which means that there is no subsequent block, so the processing is terminated as it is.

Valueが0x7より大きければ、先頭のフラグが1であり、後続ブロックが存在することを意味する。そこで、Valueのビットパターンの下位3ビットのみを改めてValueとし(ステップS13)、Bitbuf内の次の4ビットを変数tempに読み込む(ステップS14)。   If Value is larger than 0x7, it means that the leading flag is 1 and there is a subsequent block. Therefore, only the lower 3 bits of the Value bit pattern are changed to Value (Step S13), and the next 4 bits in Bitbuf are read into the variable temp (Step S14).

次に、Valueを3ビット左にシフトして、tempの下位3ビットを加算する(ステップS15)。これにより、tempから先頭のフラグを除いた残りの部分がValueに付加される。そして、tempの値を0x7と比較する(ステップS16)。   Next, the value is shifted 3 bits to the left, and the lower 3 bits of temp are added (step S15). As a result, the remaining part excluding the leading flag from temp is added to Value. Then, the value of temp is compared with 0x7 (step S16).

tempが0x7より大きければステップS14以降の処理を繰り返し、tempが0x7以下であれば処理を終了する。終了時のValueのビットパターンは、Bitbufに対応する元データを表している。このような復号化処理のプログラムコード(C言語で記述)は、例えば、図6に示すようになる。図6において、get xbits(Bitbuf)は、Bitbufからxビット分のビットパターンを読み出す関数を表す。 If temp is greater than 0x7, the process from step S14 is repeated, and if temp is less than or equal to 0x7, the process ends. The bit pattern of Value at the end represents the original data corresponding to Bitbuf. The program code (description in C language) for such decryption processing is as shown in FIG. 6, for example. In FIG. 6, get xbits (Bitbuf) represents a function for reading a bit pattern for x bits from Bitbuf.

次に、4BB改符号化処理および4BB改復号化処理を説明する。図7は、4BB改符号化処理のフローチャートである。処理が開始されると、情報検索装置は、まず、I2(Value)=

Figure 2005129071
を求め、I2(Value)+1を継続フラグFlagの値とする(ステップS21)。ここで、I2(x)=
Figure 2005129071
は、log8 xの値以下の整数のうち最大のものを表す。
次に、FlagをUnaryコードに変換してBitbufに入れ(ステップS22)、それに続いてValueを入れて(ステップS23)、処理を終了する。 Next, 4BB re-encoding processing and 4BB re-decoding processing will be described. FIG. 7 is a flowchart of the 4BB re-encoding process. When the process is started, the information retrieval apparatus firstly has I2 (Value) =
Figure 2005129071
And I2 (Value) +1 is set as the value of the continuation flag Flag (step S21). Where I2 (x) =
Figure 2005129071
Represents the largest integer less than or equal to the value of log 8 x.
Next, the Flag is converted into an Unary code and put into Bitbuf (step S22), followed by Value (step S23), and the process is terminated.

図7を図3と比較すると、4BB改符号化処理のステップ数は、4BB符号化処理のそれよりはるかに少ないことが分かる。4BB改符号化では、継続フラグを元データのビットパターンの前に付加するだけなので、このようにステップ数が少なくて済み、高速な処理が実現される。また、継続フラグの値が小さければ、そのUnaryコードは容易に求められる。   Comparing FIG. 7 with FIG. 3, it can be seen that the number of steps of the 4BB recoding process is much smaller than that of the 4BB coding process. In the 4BB re-encoding, since the continuation flag is only added before the bit pattern of the original data, the number of steps is reduced in this way, and high-speed processing is realized. If the value of the continuation flag is small, the Unary code can be easily obtained.

4BB改符号化処理のプログラムコード(C言語で記述)は、例えば、図8に示すようになる。図8においては、実際にI2(Value)を計算する代わりに、if−else ifで代用している。これは、Valueの値の範囲と、それに対応するI2(Value)の値の範囲とが、あらかじめ分かっているためである。また、set xbits(Bitbuf,X)は、Xからxビット分のビットパターンを読み出してBitbufに書き込む関数を表す。 The program code (described in C language) for the 4BB re-encoding process is as shown in FIG. 8, for example. In FIG. 8, if-else if is used instead of actually calculating I2 (Value). This is because the range of the value of Value and the range of the value of I2 (Value) corresponding thereto are known in advance. Set xbits (Bitbuf, X) represents a function of reading a bit pattern of x bits from X and writing it into Bitbuf.

例えば、十進法で21という数値は以下の手順により符号化され、対応する符号‘10010101’が得られる。
1.I2(21)+1=2であるため、継続フラグは2となる(ステップS21)。
For example, the decimal number 21 is encoded by the following procedure, and the corresponding code '10010101' is obtained.
1. Since I2 (21) + 1 = 2, the continuation flag is 2 (step S21).

2.継続フラグ2をUnaryコード‘10’でBitbufに入れる(ステップS22)。
3.継続フラグに続いて、Value=21のビットパターン‘010101’をBitbufに入れる(ステップS23)。
2. The continuation flag 2 is put in Bitbuf with an Unary code “10” (step S22).
3. Following the continuation flag, a bit pattern “010101” of Value = 21 is entered in Bitbuf (step S23).

また、十進法で300という数値は以下の手順により符号化され、対応する符号‘110100101100’が得られる。
1.I2(300)+1=3であるため、継続フラグは3となる(ステップS21)。
Also, the decimal value of 300 is encoded by the following procedure to obtain the corresponding code '110100101100'.
1. Since I2 (300) + 1 = 3, the continuation flag is 3 (step S21).

2.継続フラグ3をUnaryコード‘110’でBitbufに入れる(ステップS22)。
3.継続フラグに続いて、Value=300のビットパターン‘100101100’をBitbufに入れる(ステップS23)。
2. The continuation flag 3 is put in Bitbuf with an Unary code “110” (step S22).
3. Following the continuation flag, the bit pattern '100101100' of Value = 300 is entered in Bitbuf (step S23).

次に、図9は、4BB改復号化処理のフローチャートである。処理が開始されると、情報検索装置は、まず、継続フラグのビット数を表す変数CFlagを0とおき(ステップS31)、Bitbufの初めの4ビットを変数Flagに読み込み(ステップS32)、その値を0x8と比較する(ステップS33)。   Next, FIG. 9 is a flowchart of 4BB re-decoding processing. When the processing is started, the information search apparatus first sets a variable CFflag indicating the number of bits of the continuation flag to 0 (step S31), reads the first 4 bits of Bitbuf into the variable Flag (step S32), and sets the value. Is compared with 0x8 (step S33).

Flagが0x8より小さい場合は、先頭のビットが0であり、後続するブロックが存在しないことを意味する。そこで、FlagをValueに代入して(ステップS34)、処理を終了する。   When Flag is smaller than 0x8, it means that the first bit is 0 and there is no subsequent block. Therefore, Flag is substituted for Value (step S34), and the process is terminated.

Flagが0x8以上であれば、先頭のビットが1であり、後続ブロックが1つ以上存在することを意味する。そこで、最初の後続ブロックが継続フラグに対応するかどうかを調べるために、Flagと0xf=‘1111’を比較する(ステップS35)。   If Flag is 0x8 or more, it means that the first bit is 1 and there are one or more subsequent blocks. Therefore, in order to check whether or not the first subsequent block corresponds to the continuation flag, Flag is compared with 0xf = '1111' (step S35).

Flagが0xfであれば、さらに継続フラグのブロックが続くことが分かる。そこで、CFlagに4を加算し、Bitbuf内の次の4ビットをFlagに読み込む(ステップS36)。そして、ステップS35以降の処理を繰り返す。   If Flag is 0xf, it can be seen that a block of continuation flags continues. Therefore, 4 is added to CFflag, and the next 4 bits in Bitbuf are read into Flag (step S36). And the process after step S35 is repeated.

Flagが0xfより小さければ、そのビットパターンは0を含んでおり、継続フラグが途切れることが分かる。そこで、Flagの中で最初に0が現れた位置の順位をCFlagに加算する。また、その位置より下のビットにマスクを掛けてそれらのビットを抽出し、Maskに代入する(ステップS37)。   If Flag is smaller than 0xf, it is understood that the bit pattern includes 0 and the continuation flag is interrupted. Therefore, the rank of the position where 0 first appears in the flag is added to CFflag. Further, the bits below the position are masked to extract those bits and substituted into Mask (step S37).

次に、今までにBitbufより読み込んだビット数をCFlagの4倍から減算した値をReadBitとする(ステップS38)。CFlagを4倍することで、Bitbufに含まれるデータの全ビット数が得られ、それから読み込み済みのビット数を差し引くことで、残りのデータの全ビット数が得られる。   Next, a value obtained by subtracting the number of bits read from Bitbuf so far from four times CFlag is defined as ReadBit (step S38). By multiplying CFlag by four, the total number of bits of data included in Bitbuf is obtained, and by subtracting the number of bits already read from it, the total number of bits of the remaining data is obtained.

次に、MaskをReadBitのビット数だけ左にシフトしてValueに代入し、Bitbufから、ReadBitのビット数だけの残りのデータを読み込んで、それをValueに加算し、処理を終了する。これにより、継続フラグの部分を除いた元データのビットパターンが、Valueとして得られる。   Next, Mask is shifted to the left by the number of bits of ReadBit and assigned to Value, the remaining data of the number of bits of ReadBit is read from Bitbuf, added to Value, and the process is terminated. Thereby, the bit pattern of the original data excluding the continuation flag portion is obtained as Value.

図9を図5と比較すると、4BB改復号化処理のステップ数は、4BB復号化処理のそれより少し多いことが分かる。しかし、図5および図9のループ内の処理において、4BB復号化の場合は、継続フラグとデータ部分を同時に読み込むのに対して、4BB改復号化の場合は、継続フラグ部分のみ読み込めばよい。このため、1ブロックまたは2ブロック程度の符号を復号化する場合は、4BB改復号化の処理速度は4BB復号化処理とそれほど変わらないが、大きなブロックの復号化では4BB改復号化の方がはるかに速くなる。   Comparing FIG. 9 with FIG. 5, it can be seen that the number of steps of the 4BB decoding process is slightly larger than that of the 4BB decoding process. However, in the processing in the loop of FIGS. 5 and 9, in the case of 4BB decoding, the continuation flag and the data part are read simultaneously, whereas in the case of 4BB re-decoding, only the continuation flag part needs to be read. For this reason, when decoding a code of about 1 block or 2 blocks, the processing speed of 4BB decoding is not so different from that of 4BB decoding processing, but 4BB decoding is much more effective when decoding large blocks. Get faster.

4BB改復号化処理のプログラムコード(C言語で記述)は、例えば、図10に示すようになる。図10においては、実際にCFlagおよびReadBitの値を計算する代わりに、if−else ifで代用している。これは、Valueの値の範囲と、それに対応するReadBitの値の範囲とが、あらかじめ分かっているためである。また、変数Valueを変数Flagの代わりに用いており、変数Maskの代わりに、Valueとマスク用ビットパターンの論理積を用いている。   The program code (described in C language) of the 4BB re-decoding process is as shown in FIG. 10, for example. In FIG. 10, if-else if is used instead of actually calculating the values of CFlag and ReadBit. This is because the value value range and the corresponding ReadBit value range are known in advance. Further, the variable Value is used instead of the variable Flag, and the logical product of the Value and the mask bit pattern is used instead of the variable Mask.

例えば、上述の符号‘10010101’は以下の手順により復号化され、対応する数値21が得られる。
1.初めの4ビット‘1001’を読み込む(ステップS32)。
For example, the above-mentioned code “10010101” is decoded by the following procedure, and the corresponding numerical value 21 is obtained.
1. The first 4 bits “1001” are read (step S32).

2.継続フラグは‘10’であり、これは上の2ビットに相当するため、下の2ビットにマスクを掛け、Mask=‘1001’&0x3=‘0001’を得る(ステップS37)。また、ReadBit=2×4−4=4となるので、‘0001’を4ビット左へシフトし、Valueに代入する(ステップS38)。これにより、Value=‘10000’=16となる。   2. Since the continuation flag is “10”, which corresponds to the upper 2 bits, the lower 2 bits are masked to obtain Mask = “1001” & 0x3 = “0001” (step S37). Since ReadBit = 2 × 4−4 = 4, “0001” is shifted to the left by 4 bits and substituted into Value (step S38). As a result, Value = '10000' = 16.

3.次の4ビット(ReadBitのビット数)である‘0101’=5を読み込み、Valueに加算する(ステップS38)。こうして、Value=16+5=21となる。   3. The next 4 bits (the number of bits of ReadBit) “0101” = 5 are read and added to Value (step S38). Thus, Value = 16 + 5 = 21.

また、上述の符号‘110100101100’は以下の手順により復号化され、対応する数値300が得られる。
1.初めの4ビット‘1101’を読み込む(ステップS32)。
Further, the above-described code “110100101100” is decoded by the following procedure, and the corresponding numerical value 300 is obtained.
1. The first 4 bits “1101” are read (step S32).

2.継続フラグは‘110’であり、これは上の3ビットに相当するため、下の1ビットにマスクを掛け、Mask=‘1101’&0x1=‘0001’を得る(ステップS37)。また、ReadBit=3×4−4=8となるので、‘0001’を8ビット左へシフトし、Valueに代入する(ステップS38)。これにより、Value=‘100000000’=256となる。   2. Since the continuation flag is “110”, which corresponds to the upper 3 bits, the lower 1 bit is masked to obtain Mask = “1101” & 0x1 = “0001” (step S37). Since ReadBit = 3 × 4−4 = 8, “0001” is shifted to the left by 8 bits and substituted into Value (step S38). As a result, Value = '100000000' = 256.

3.次の8ビット(ReadBitのビット数)である‘00101100’=44を読み込み、Valueに加算する(ステップS38)。こうして、Value=256+44=300となる。   3. Next, '00101100' = 44, which is 8 bits (the number of bits of ReadBit), is read and added to Value (step S38). Thus, Value = 256 + 44 = 300.

次に、84BB符号化処理および84BB復号化処理を説明する。図11は、84BB符号化処理のフローチャートである。処理が開始されると、情報検索装置は、まず、Valueの値を128と比較する(ステップS41)。そして、Valueが128より小さければ、それをBitbufにコピーして(ステップS42)、処理を終了する。   Next, 84BB encoding processing and 84BB decoding processing will be described. FIG. 11 is a flowchart of the 84BB encoding process. When the process is started, the information search device first compares the value of Value with 128 (step S41). If Value is smaller than 128, it is copied to Bitbuf (step S42), and the process is terminated.

Valueが128以上であれば、上述のI2(x)を用いてI2(Value)を求め、それを継続フラグFlagの値とする(ステップS43)。次に、FlagをUnaryコードに変換してBitbufに入れ(ステップS44)、それに続いてValueを入れて(ステップS45)、処理を終了する。   If Value is 128 or more, I2 (Value) is obtained using I2 (x) described above, and is set as the value of the continuation flag Flag (step S43). Next, the Flag is converted into an Unary code and put in Bitbuf (step S44), followed by Value (step S45), and the process ends.

図11を図7と比較すると、84BB符号化処理では、4BB改符号化処理より条件判定が1つ増えるだけなので、その処理速度は4BB改符号化とほとんど変わらない。
また、84BB符号化処理のプログラムコード(C言語で記述)は、例えば、図12に示すようになる。図12においては、4BB改符号化と同様に、実際にI2(Value)を計算する代わりに、if−else ifで代用している。
Comparing FIG. 11 with FIG. 7, in the 84BB encoding process, only one condition determination is added to the 4BB modified encoding process, so the processing speed is almost the same as the 4BB modified encoding.
Further, the program code of 84BB encoding processing (described in C language) is, for example, as shown in FIG. In FIG. 12, if-else if is used instead of actually calculating I2 (Value) as in the case of 4BB re-encoding.

例えば、上述の300という数値は以下の手順により符号化され、対応する符号‘100100101100’が得られる。
1.I2(300)=2であるため、継続フラグは2となる(ステップS43)。
For example, the above numerical value of 300 is encoded by the following procedure, and the corresponding code '100100101100' is obtained.
1. Since I2 (300) = 2, the continuation flag is 2 (step S43).

2.継続フラグ2をUnaryコード‘10’でBitbufに入れる(ステップS44)。
3.継続フラグに続いて、Value=300のビットパターン‘0100101100’をBitbufに入れる(ステップS45)。
2. The continuation flag 2 is put in Bitbuf with an Unary code “10” (step S44).
3. Following the continuation flag, a bit pattern “0100101100” of Value = 300 is entered in Bitbuf (step S45).

次に、図13は、84BB復号化処理のフローチャートである。処理が開始されると、情報検索装置は、まず、Bitbufの初めの8ビットを変数Flagに読み込み(ステップS51)、その値を128と比較する(ステップS52)。Flagが128より小さい場合は、先頭のビットが0であり、後続するブロックが存在しないことを意味する。そこで、FlagをValueに代入して(ステップS53)、処理を終了する。   Next, FIG. 13 is a flowchart of the 84BB decoding process. When the process is started, the information retrieval apparatus first reads the first 8 bits of Bitbuf into a variable Flag (step S51) and compares the value with 128 (step S52). When Flag is smaller than 128, the first bit is 0, which means that there is no subsequent block. Therefore, Flag is substituted for Value (step S53), and the process is terminated.

Flagが128以上の場合は、先頭のビットが1であり、後続ブロックが1つ以上存在することを意味する。そこで、継続フラグのビット数を表す変数CFlagを0とおき(ステップS54)、最初の後続ブロックが継続フラグに対応するかどうかを調べるために、Flagの値を0xff=‘11111111’と比較する(ステップS54a)。   When the flag is 128 or more, it means that the first bit is 1 and one or more subsequent blocks exist. Therefore, the variable CFflag representing the number of bits of the continuation flag is set to 0 (step S54), and the value of Flag is compared with 0xff = '11111111' in order to check whether or not the first subsequent block corresponds to the continuation flag ( Step S54a).

Flagが0xffであれば、さらに継続フラグのブロックが続くことが分かる。そこで、CFlagに8を加算し(ステップS54b)、Bitbuf内の次の4ビットをFlagに読み込む(ステップS54c)。そして、読み込んだブロックの次のブロックが継続フラグに対応するかどうかを調べるために、Flagの値を0xf=‘1111’と比較する(ステップS55)。   If Flag is 0xff, it can be seen that a block of continuation flags continues. Therefore, 8 is added to CFflag (step S54b), and the next 4 bits in Bitbuf are read into Flag (step S54c). Then, in order to check whether or not the block next to the read block corresponds to the continuation flag, the value of Flag is compared with 0xf = '1111' (step S55).

Flagが0xfであれば、さらに継続フラグのブロックが続くことが分かる。そこで、CFlagに4を加算し、Bitbuf内の次の4ビットをFlagに読み込む(ステップS56)。そして、ステップS55以降の処理を繰り返す。   If Flag is 0xf, it can be seen that a block of continuation flags continues. Therefore, 4 is added to CFflag, and the next 4 bits in Bitbuf are read into Flag (step S56). And the process after step S55 is repeated.

ステップS54aでFlagが0xffより小さいとき、および、ステップS55でFlagが0xfより小さいときは、そのビットパターンは0を含んでおり、継続フラグが途切れることが分かる。そこで、Flagの中で最初に0が現れた位置の順位をCFlagに加算する。また、その位置より下のビットにマスクを掛けてそれらのビットを抽出し、Maskに代入する(ステップS57)。   When the flag is smaller than 0xff in step S54a and when the flag is smaller than 0xf in step S55, the bit pattern includes 0, and it can be seen that the continuation flag is interrupted. Therefore, the rank of the position where 0 first appears in the flag is added to CFflag. Further, the bits below the position are masked to extract those bits and substituted into Mask (step S57).

次に、今までにBitbufより読み込んだビット数を(CFlag+1)の4倍から減算した値をReadBitとする(ステップS58)。次に、MaskをReadBitのビット数だけ左にシフトしてValueに代入し、Bitbufから、ReadBitのビット数だけの残りのデータを読み込んで、それをValueに加算し、処理を終了する。これにより、継続フラグの部分を除いた元データのビットパターンが、Valueとして得られる。   Next, a value obtained by subtracting the number of bits read from Bitbuf so far from four times (CFlag + 1) is defined as ReadBit (step S58). Next, Mask is shifted to the left by the number of bits of ReadBit and assigned to Value, the remaining data of the number of bits of ReadBit is read from Bitbuf, added to Value, and the process is terminated. Thereby, the bit pattern of the original data excluding the continuation flag portion is obtained as Value.

このような84BB復号化処理のプログラムコード(C言語で記述)は、例えば、図14に示すようになる。図14においては、4BB改復号化と同様に、実際にCFlagおよびReadBitの値を計算する代わりに、if−else ifで代用している。また、変数Valueを変数Flagの代わりに用いており、変数Maskの代わりに、Valueとマスク用ビットパターンの論理積を用いている。   The program code for such 84BB decoding processing (described in C language) is, for example, as shown in FIG. In FIG. 14, if-else if is used instead of actually calculating the values of CFlag and ReadBit, as in the case of 4BB re-decoding. Further, the variable Value is used instead of the variable Flag, and the logical product of the Value and the mask bit pattern is used instead of the variable Mask.

例えば、上述の符号‘100100101100’は以下の手順により復号化され、対応する数値300が得られる。
1.初めの8ビット‘10010010’を読み込む(ステップS51)。
For example, the above-mentioned code “100100101100” is decoded by the following procedure, and the corresponding numerical value 300 is obtained.
1. The first 8-bit '10010010' is read (step S51).

2.継続フラグは‘10’であり、これは上の2ビットに相当するため、下の6ビットにマスクを掛け、Mask=‘10010010’&0x3f=‘00010010’を得る(ステップS57)。また、ReadBit=(2+1)×4−8=4となるので、‘00010010’を4ビット左へシフトし、Valueに代入する(ステップS58)。これにより、Value=‘100100000’=288となる。   2. Since the continuation flag is “10”, which corresponds to the upper 2 bits, the lower 6 bits are masked to obtain Mask = “10010010” & 0x3f = “00010010” (step S57). Since ReadBit = (2 + 1) × 4−8 = 4, “00010010” is shifted to the left by 4 bits and assigned to Value (step S58). As a result, Value = '100100000' = 288.

3.次の4ビット(ReadBitのビット数)である‘1100’=12を読み込み、Valueに加算する(ステップS58)。こうして、Value=288+12=300となる。   3. The next 4 bits (the number of bits of ReadBit) “1100” = 12 are read and added to Value (step S58). Thus, Value = 288 + 12 = 300.

次に、B24符号化処理およびB24復号化処理を説明する。図15は、B24符号化処理のフローチャートである。処理が開始されると、情報検索装置は、まず、Valueを1と比較する(ステップS61)。Value=1の場合は、ビットパターン‘00’をBitbufに入れて(ステップS62)、処理を終了する。   Next, the B24 encoding process and the B24 decoding process will be described. FIG. 15 is a flowchart of the B24 encoding process. When the process is started, the information search device first compares Value with 1 (step S61). If Value = 1, the bit pattern “00” is entered in Bitbuf (step S62), and the process ends.

Valueが1でなければ、次に、それを2と比較する(ステップS63)。Value=2の場合は、ビットパターン‘01’をBitbufに入れて(ステップS64)、処理を終了する。   If Value is not 1, it is then compared with 2 (step S63). In the case of Value = 2, the bit pattern “01” is put in Bitbuf (step S64), and the process is terminated.

Valueが2でなければ、次に、それを7と比較する(ステップS65)。Valueが7より小さければ、ビットパターン‘10’を継続フラグとしてBitbufに入れ、その後に(Value−3)のビットパターンを入れて(ステップS66)、処理を終了する。   If Value is not 2, it is then compared with 7 (step S65). If Value is smaller than 7, the bit pattern “10” is set as a continuation flag in Bitbuf, followed by (Value-3) bit pattern (Step S66), and the process ends.

Valueが7以上であれば、ここで、上述のI2(x)を用いてI2(Value)を求め、I2(Value)+2を変数Flagに代入する(ステップS67)。そして、FlagをUnaryコードに変換してBitbufに入れ、それに続いて(Value−7)のビットパターンを入れて、処理を終了する。   If Value is 7 or more, here, I2 (Value) is obtained using I2 (x) described above, and I2 (Value) +2 is substituted into variable Flag (step S67). Then, the Flag is converted into an Unary code and put in Bitbuf, followed by the (Value-7) bit pattern, and the process is terminated.

図15を図7と比較すると、Valueが1または2であれば、B24符号化処理のステップ数は4BB改符号化処理のそれよりも少なくなり、処理速度はより速くなる。また、図15のステップS67の処理は、図7のステップS21、S22、S23の処理に対応している。したがって、Valueが7以上であっても、4BB改符号化処理と比較して条件判定が3つ追加されているだけなので、処理速度はそれほど低下しない。Valueが3〜6の場合も同様である。   Comparing FIG. 15 with FIG. 7, if Value is 1 or 2, the number of steps of the B24 encoding process is smaller than that of the 4BB re-encoding process, and the processing speed becomes faster. Further, the process in step S67 in FIG. 15 corresponds to the processes in steps S21, S22, and S23 in FIG. Therefore, even if the value is 7 or more, the processing speed does not decrease so much because only three condition determinations are added compared to the 4BB re-encoding process. The same applies when Value is 3-6.

B24符号化処理のプログラムコード(C言語で記述)は、例えば、図16に示すようになる。図16においては、上述の4BB改符号化と同様に、実際にI2(Value)を計算する代わりに、if−else ifで代用している。 例えば、上述の21という数値は以下の手順により符号化され、対応する符号‘11001110’が得られる。   The program code for B24 encoding processing (described in C language) is as shown in FIG. 16, for example. In FIG. 16, if-else if is used instead of actually calculating I2 (Value), as in the above-described 4BB re-encoding. For example, the numerical value 21 described above is encoded by the following procedure, and the corresponding code '11001110' is obtained.

1.I2(21)+2=3であるため、継続フラグは3となる(ステップS67)。
2.継続フラグ3をUnaryコード‘110’でBitbufに入れる(ステップS67)。
1. Since I2 (21) + 2 = 3, the continuation flag is 3 (step S67).
2. The continuation flag 3 is put in Bitbuf with an Unary code “110” (step S67).

3.継続フラグに続いて、Value−7=21−7=14のビットパターン‘01110’をBitbufに入れる(ステップS67)。
次に、図17は、B24復号化処理のフローチャートである。処理が開始されると、情報検索装置は、まず、Bitbufの初めの2ビットを変数Flagに読み込み(ステップS71)、その値を1と比較する(ステップS72)。
3. Following the continuation flag, a bit pattern '01110' of Value-7 = 21-7 = 14 is entered in Bitbuf (step S67).
Next, FIG. 17 is a flowchart of the B24 decoding process. When the process is started, the information retrieval apparatus first reads the first 2 bits of Bitbuf into a variable Flag (step S71) and compares the value with 1 (step S72).

Flagが1以下の場合は、先頭のビットが0であり、後続するビットパターンが存在しないことを意味する。そこで、(Flag+1)のビットパターンをValueに代入して(ステップS73)、処理を終了する。   When Flag is 1 or less, it means that the first bit is 0 and there is no subsequent bit pattern. Therefore, the bit pattern of (Flag + 1) is substituted for Value (step S73), and the process ends.

Flagが1より大きければ、先頭のビットが1であり、後続するビットパターンが存在することを意味する。そこで、次に、その値を2と比較する(ステップS74)。
Flagが2であれば、後続するビットパターンは2ビットであることを意味する。そこで、Bitbufの残りの2ビットを変数Valueに読み込み、3を加算して(ステップS75)、処理を終了する。
If Flag is larger than 1, it means that the first bit is 1 and there is a subsequent bit pattern. Therefore, next, the value is compared with 2 (step S74).
If Flag is 2, it means that the subsequent bit pattern is 2 bits. Therefore, the remaining 2 bits of Bitbuf are read into the variable Value, 3 is added (step S75), and the process ends.

Flagが2より大きければ、それは‘11’であり、後続する1つ以上のブロックが存在することを意味する。そこで、Flag=‘11’を2ビット左へシフトし、Bitbufの次の2ビットの値を読み込んで、Flagに加算する(ステップS76)。そして、継続フラグのビット数を表す変数CFlagを0とおき、最初の後続ブロックが継続フラグに対応するかどうかを調べるために、Flagと0xf=‘1111’を比較する(ステップS78)。   If Flag is greater than 2, it is '11', meaning that there are one or more subsequent blocks. Therefore, Flag = '11 'is shifted to the left by 2 bits, the value of the next 2 bits of Bitbuf is read, and added to Flag (step S76). Then, a variable CFflag representing the number of bits of the continuation flag is set to 0, and Flag is compared with 0xf = '1111' to check whether the first subsequent block corresponds to the continuation flag (step S78).

Flagが0xfであれば、さらに継続フラグのブロックが続くことが分かる。そこで、CFlagに4を加算し、Bitbuf内の次の4ビットをFlagに読み込む(ステップS79)。そして、ステップS78以降の処理を繰り返す。   If Flag is 0xf, it can be seen that a block of continuation flags continues. Therefore, 4 is added to CFflag, and the next 4 bits in Bitbuf are read into Flag (step S79). And the process after step S78 is repeated.

Flagが0xfより小さければ、そのビットパターンは0を含んでおり、継続フラグが途切れることが分かる。そこで、Flagの中で最初に0が現れた位置の順位をCFlagに加算する。また、その位置より下のビットにマスクを掛けてそれらのビットを抽出し、Maskに代入する(ステップS80)。   If Flag is smaller than 0xf, it is understood that the bit pattern includes 0 and the continuation flag is interrupted. Therefore, the rank of the position where 0 first appears in the flag is added to CFflag. Further, the bits below the position are masked to extract those bits and substituted into Mask (step S80).

次に、今までにBitbufより読み込んだビット数を(CFlag−1)の4倍から減算した値をReadBitとする(ステップS81)。そして、MaskをReadBitのビット数だけ左にシフトしてValueに代入し、Bitbufから、ReadBitのビット数だけの残りのデータを読み込んで、それをValueに加算する。これにより、符号から継続フラグの部分を除いたビットパターンが、Valueとして得られる。元データを得るために、Valueにさらに7を加算して、処理を終了する。   Next, a value obtained by subtracting the number of bits read from Bitbuf so far from four times (CFlag-1) is defined as ReadBit (step S81). Then, Mask is shifted to the left by the number of bits of ReadBit and assigned to Value, and the remaining data of the number of bits of ReadBit is read from Bitbuf and added to Value. As a result, a bit pattern obtained by removing the continuation flag portion from the code is obtained as Value. In order to obtain original data, 7 is further added to Value, and the process is terminated.

図17を図9と比較すると、B24復号化処理では4BB改復号化処理よりも条件判定が1つ多いが、処理速度はそれほど低下しない。
B24復号化処理のプログラムコード(C言語で記述)は、例えば、図18に示すようになる。図18においては、上述の4BB改復号化と同様に、実際にCFlagおよびReadBitの値を計算する代わりに、if−else ifで代用している。また、変数Valueを変数Flagの代わりに用いており、変数Maskの代わりに、Valueとマスク用ビット列の論理積を用いている。
When FIG. 17 is compared with FIG. 9, the B24 decoding process has one more condition determination than the 4BB re-decoding process, but the processing speed does not decrease so much.
The program code (described in C language) of the B24 decoding process is as shown in FIG. 18, for example. In FIG. 18, if-else if is used instead of actually calculating the values of CFlag and ReadBit, as in the above-described 4BB decoding. The variable Value is used instead of the variable Flag, and the logical product of the Value and the mask bit string is used instead of the variable Mask.

例えば、上述の符号‘11001110’は以下の手順により復号化され、対応する数値21が得られる。
1.初めの2ビット‘11’をFlagに読み込む(ステップS71)。
For example, the above-mentioned code “11001110” is decoded by the following procedure, and the corresponding numerical value 21 is obtained.
1. The first 2 bits '11' are read into the flag (step S71).

2.読み込んだ値は3であるため、Flagを2ビット左にシフトして、さらに次の2ビット‘00’を読み込み(ステップS76)、継続フラグを確認する(ステップS78)。ここで、継続フラグが‘110’であることが分かる。   2. Since the read value is 3, the flag is shifted to the left by 2 bits, the next 2 bits '00' is read (step S76), and the continuation flag is confirmed (step S78). Here, it can be seen that the continuation flag is '110'.

3.継続フラグが3ビット目で途切れているので、継続フラグに続く残りの1ビットにマスクを掛け、Mask=‘1100’&0x1=‘0000’を得る。また、ReadBit=(3−1)×4−4=4となるので、‘0000’を4ビット左へシフトし、Valueに代入する(ステップS81)。   3. Since the continuation flag is interrupted at the third bit, the remaining 1 bit following the continuation flag is masked to obtain Mask = '1100' & 0x1 = '0000'. Since ReadBit = (3-1) × 4−4 = 4, “0000” is shifted to the left by 4 bits and assigned to Value (step S81).

4.次の4ビット(ReadBitのビット数)である‘1110’=14を読み込み、Valueに加算して、さらに7を加算する(ステップS81)。こうして、Value=14+7=21となる。   4). The next 4 bits (the number of bits of ReadBit), “1110” = 14, is read, added to Value, and further 7 is added (step S81). Thus, Value = 14 + 7 = 21.

以上説明した4BB改符号化、84BB符号化、およびB24符号化に必要な各ビット数を、4BB符号化、γ−coding、およびδ−codingに必要な各ビット数と比較すると、図19に示すようになる。   FIG. 19 shows a comparison of the number of bits necessary for 4BB coding, 84BB coding, and B24 coding described above with the number of bits necessary for 4BB coding, γ-coding, and δ-coding. It becomes like this.

図19において、ほとんどの符号化方法が小さい数値を少ないビット数、大きい数値を多いビット数で表していることが分かる。ある数値列が与えられた時にどの符号化が最も圧縮率が高くなるかは、その数値列中においてどの範囲の数値が多く出現しているかによって大きく異なる。   In FIG. 19, it can be seen that most encoding methods represent small numerical values with a small number of bits and large numerical values with a large number of bits. Which encoding has the highest compression rate when a certain numerical sequence is given differs greatly depending on which range of numerical values appears in the numerical sequence.

例えば、1、2のみが多く出現する数値列に対しては、B24符号化が最も圧縮率が高いと予想され、また、512付近の値が多く出現するような数値列に対しては、84BB符号化が最も圧縮率が高いと期待できる。   For example, B24 encoding is expected to have the highest compression rate for numeric sequences in which only 1 and 2 appear frequently, and 84BB for numeric sequences in which values near 512 appear frequently. Encoding can be expected to have the highest compression rate.

また、32ビットで表現できる最大数である4294967295を各方法で符号化すると、得られる符号のビットパターンとビット数は図20に示すようになる。
ところで、インデックスに用いられる文書内単語出現位置は、必ずしも小さな数値とは限らず、差分情報を活用したとしてもかなり大きな数値となることが多い。このような大きな数値を扱った場合には、いずれの符号化方法を用いても圧縮効率は上がらない。
In addition, when 4294967295, which is the maximum number that can be expressed in 32 bits, is encoded by each method, the bit pattern and the number of bits of the obtained code are as shown in FIG.
By the way, the word appearance position in the document used for the index is not necessarily a small numerical value, and even if the difference information is used, it is often a considerably large numerical value. When such a large numerical value is handled, the compression efficiency does not increase regardless of which encoding method is used.

そこで、本発明では、本来の文書内単語出現位置等の数値データを適当な整数値で除算することにより、情報の粒度を粗くし、より小さな中間数値に変換することにする。小さな数値であれば、図19から分かるように、いずれの符号化方法を用いても圧縮効率が良くなる。このような変換を用いた符号化をPer符号化と呼び、特に、除算の分母をnとする場合をPer(n)符号化と呼ぶことにする。   Therefore, in the present invention, by dividing numerical data such as the original word appearance position in the document by an appropriate integer value, the granularity of information is coarsened and converted to a smaller intermediate numerical value. If the numerical value is small, as can be seen from FIG. 19, the compression efficiency is improved regardless of which encoding method is used. Encoding using such conversion is called Per encoding, and in particular, a case where the denominator of division is n is called Per (n) encoding.

図21は、Per符号化処理のフローチャートである。処理が開始されると、情報検索装置は、まず、元データを変数numに読み込み(ステップS91)、それをあらかじめ決められた分母値Perで除算する(ステップS92)。   FIG. 21 is a flowchart of the Per encoding process. When the process is started, the information retrieval apparatus first reads the original data into a variable num (step S91) and divides it by a predetermined denominator value Per (step S92).

除算に用いるPerの値は、高速に実行できるシフト命令が利用可能な値から選択することが望ましい。例えば、2、4、8、16、32、64等の値がPerとして用いられる。ここでは、得られた商の少数点以下の端数は切り捨て、その整数部分を中間数値とし、それを改めてnumに代入する。   The value of Per used for division is preferably selected from values that can be used for a shift instruction that can be executed at high speed. For example, values such as 2, 4, 8, 16, 32, and 64 are used as Per. Here, the fractions below the decimal point of the obtained quotient are rounded down, the integer part is set as an intermediate value, and it is substituted for num again.

次に、numの値を符号化して(ステップS93)、処理を終了する。ステップS93では、任意の符号化方法を用いることができる。ただし、例えばB24符号化のように、0を表現できない符号化方法を用いる場合には、ステップS92で得られたnumが0のとき、それに1を加算してから符号化するものとする。   Next, the value of num is encoded (step S93), and the process ends. In step S93, an arbitrary encoding method can be used. However, when an encoding method that cannot represent 0, such as B24 encoding, is used, when num obtained in step S92 is 0, 1 is added to the encoding, and then encoding is performed.

ここで、ステップS93における符号化方法としてB24符号化を用いた場合の例を説明する。ここでは、分母値を2とするPer(2)符号化により、上述の21という数値は以下の手順により符号化され、対応する符号‘11000011’が得られる。   Here, an example in which B24 encoding is used as the encoding method in step S93 will be described. Here, by the Per (2) encoding with the denominator value of 2, the above-described numerical value of 21 is encoded by the following procedure, and the corresponding code '11000011' is obtained.

1.21を2で除算し、商の小数点以下は切り捨てる。これにより、num=10となる(ステップS92)。
2.I2(10)+2=3であるため、継続フラグは3となる(図15、ステップS67)。
Divide 1.21 by 2 and round off the fractional part of the quotient. As a result, num = 10 (step S92).
2. Since I2 (10) + 2 = 3, the continuation flag is 3 (FIG. 15, step S67).

3.継続フラグ3をUnaryコード‘110’でBitbufに入れる(ステップS67)。
4.継続フラグに続いて、Value−7=10−7=3のビットパターン‘00011’をBitbufに入れる(ステップS67)。
3. The continuation flag 3 is put in Bitbuf with an Unary code “110” (step S67).
4). Following the continuation flag, a bit pattern “00011” of Value-7 = 10−7 = 3 is entered in Bitbuf (step S67).

次に、図22は、Per復号化処理のフローチャートである。処理が開始されると、情報検索装置は、まず、Per符号を復号化し、得られた数値を変数numに読み込む(ステップS102)。ただし、ステップS102では、図21のステップS93で用いた符号化方法に対応する復号化方法を用いる。次に、numに上述の分母値Perを乗算し(ステップS103)、その結果を呼び出し元のプログラムへ返して(ステップS104)、処理を終了する。   Next, FIG. 22 is a flowchart of the Per decoding process. When the process is started, the information search apparatus first decodes the Per code and reads the obtained numerical value into the variable num (step S102). However, in step S102, a decoding method corresponding to the encoding method used in step S93 in FIG. 21 is used. Next, num is multiplied by the above denominator value Per (step S103), the result is returned to the calling program (step S104), and the process is terminated.

一般に、Per復号化により得られる数値データは、必ずしも元データと一致するとは限らない。例えば、上述の数値21に対応する符号‘11000011’をB24復号化処理により復号化すると、数値10が得られる(ステップS102)。しかし、この数値にPer=2を乗算すると、num=20となり(ステップS103)、元の数値には戻らない。したがって、Per符号化は、文書内単語出現位置のように、元データのおおよその値が再現されればよい場合に有効である。   In general, numerical data obtained by Per decoding does not always match the original data. For example, when the code “11000011” corresponding to the above-described numerical value 21 is decoded by the B24 decoding process, the numerical value 10 is obtained (step S102). However, when this value is multiplied by Per = 2, num = 20 is obtained (step S103), and the original value is not restored. Therefore, Per encoding is effective when the approximate value of the original data only needs to be reproduced, such as the word appearance position in the document.

インデックスの圧縮に用いられる各符号化方法は、いずれも小さな数値を少ないビットで、大きな数値を多くのビットで表すようになっている。Per符号化によれば、大きな数値を小さな数値に変換してから符号化するので、それだけ圧縮の効果が期待できる。   Each encoding method used for compression of the index is such that a small numerical value is represented by a small number of bits and a large numerical value is represented by a large number of bits. According to Per coding, encoding is performed after converting a large numerical value to a small numerical value, so that the compression effect can be expected.

ところで、文書内単語出現位置の情報を含めたインデックス構造は、[文書番号,文書内単語出現頻度,文書内単語出現位置領域数,文書内単語出現位置,・・・,]のようになる。ここで、文書内単語出現位置領域数には、後続する文書内単語出現位置のデータ領域の大きさが記述される。   By the way, the index structure including the information on the word appearance position in the document is as follows: [document number, word appearance frequency in the document, number of word appearance position areas in the document, word appearance position in the document,. Here, the number of word appearance position areas in the document describes the size of the data area of the subsequent word appearance position in the document.

文書番号の情報は、該当する文書番号と前の組の文書番号との差分で表すことができ、文書内単語出現位置の情報も、同一文書内における該当する位置と前の文書内単語出現位置との差分で表すことができる。しかし、文書内単語出現頻度や文書内単語出現位置領域数は、数値の小さいものから大きいものの順に並んでいないので、差分値を取ることはできない。   The document number information can be represented by the difference between the corresponding document number and the previous set of document numbers, and the word occurrence position information in the document is also the corresponding position in the same document and the previous word occurrence position in the document. And can be represented by the difference. However, since the word appearance frequency in the document and the number of word appearance position areas in the document are not arranged in order from the smallest value to the largest value, a difference value cannot be taken.

通常の情報検索装置では、文書内単語出現位置領域数はビット単位で記述される。しかし、本発明の符号化方法では、最小のブロックのビット数が2ビットまたは4ビットであることから、文書内単語出現位置領域数を最小ブロック単位で記述することができる。   In a normal information retrieval apparatus, the number of word appearance position areas in a document is described in bit units. However, in the encoding method of the present invention, the number of bits of the minimum block is 2 bits or 4 bits, so the number of word appearance position areas in the document can be described in units of minimum blocks.

例えば、あるキーの出現位置の情報を表現するのに200bit必要だったとすると、ビット単位では200という数値で表現されるのに対して、2ビット単位では100という数値で表現され、4ビット単位では50という数値で表現される。文書内単語出現位置領域数も他の数値とともに符号化されるため、より小さい数値で表現することによって、インデックスサイズの圧縮率の向上が期待できる。   For example, if 200 bits are required to express the information of the appearance position of a certain key, it is expressed by a numerical value of 200 in bit units, whereas it is expressed by a numerical value of 100 in 2-bit units, and in 4-bit units. It is expressed by a numerical value of 50. Since the number of word appearance position areas in the document is also encoded together with other numerical values, an improvement in the index size compression rate can be expected by expressing it with a smaller numerical value.

また、文書内単語出現位置領域数として文書内単語出現頻度を代用した場合のインデックス構造は、[文書番号,文書内単語出現頻度,文書内単語出現位置,・・・,]のようになる。ここで、文書内単語出現頻度は、後続する文書内単語出現位置の個数を表す。   In addition, the index structure when the word appearance frequency in the document is substituted as the number of word appearance position areas in the document is [document number, word appearance frequency in document, word appearance position in document,...]. Here, the word appearance frequency in the document represents the number of subsequent word appearance positions in the document.

ただし、この場合、次の組の文書番号を取り出すためには、文書内単語出現頻度の後の文書内単語出現位置をすべて復号化しなければならない。これに対して、文書内単語出現位置領域数を付加した場合には、文書内単語出現位置を復号化する必要はなく、その領域数から計算されるビット数だけ離れた場所にアクセスすればよい。   However, in this case, in order to extract the next set of document numbers, all the word appearance positions in the document after the word appearance frequency in the document must be decoded. On the other hand, when the number of word appearance positions in the document is added, it is not necessary to decode the word appearance position in the document, and it is only necessary to access a place separated by the number of bits calculated from the number of areas. .

次に、図23から図37までを参照しながら、上述の各符号化方法を組み合わせて用いたインデックス構造の例を説明する。インデックスの構造は、その用途に応じて、以下の5つの構成を取るものとする。   Next, an example of an index structure using a combination of the above encoding methods will be described with reference to FIGS. The structure of the index is assumed to have the following five configurations depending on the application.

第1のインデックス構造:[文書番号]
第2のインデックス構造:[文書番号,文書内単語出現頻度]
第3のインデックス構造:[文書番号,文書内単語出現頻度,文書内単語出現位置,・・・,]
第4のインデックス構造:[文書番号,文書内単語出現位置領域数,文書内単語出現位置,・・・,]
第5のインデックス構造:[文書番号,文書内単語出現頻度,文書内単語出現位置領域数,文書内単語出現位置,・・・,]
例えば、図40のインデックス構造を第5のインデックス構造を用いて書き直すと、図23に示すように表現される。ここで、‘?’の位置には、文書内単語出現位置領域数が書き込まれる。以下に示す例では、元データとして図23の数値を用いており、それらは10進数で表されている。
First index structure: [document number]
Second index structure: [document number, word appearance frequency in document]
Third index structure: [document number, word appearance frequency in document, word appearance position in document,...]
Fourth index structure: [document number, number of word appearance positions in document, word appearance position in document,...]
Fifth index structure: [document number, word appearance frequency in document, number of word appearance positions in document, word appearance position in document,...]
For example, when the index structure of FIG. 40 is rewritten using the fifth index structure, it is expressed as shown in FIG. here,'? The number of word appearance position areas in the document is written at the position '. In the example shown below, the numerical values of FIG. 23 are used as the original data, and they are expressed in decimal numbers.

図24は、第1のインデックス構造を用いた場合の4BB改符号およびB24符号のビットパターンと、それぞれの符号の総ビット数を示している。第1のインデックス構造は文書番号のみであるので、Per符号化は用いられない。   FIG. 24 shows the bit patterns of the 4BB modified code and the B24 code when the first index structure is used, and the total number of bits of each code. Since the first index structure is only the document number, Per encoding is not used.

図25は、第2のインデックス構造を用いた場合の符号のビットパターンと総ビット数を示している。ここでは、Per(2)符号化を、文書内単語出現頻度のみに適用し、(文書内単語出現頻度/2)の整数部分を符号化している。ただし、その整数部分が0となる場合は代わりに数値1を符号化している。   FIG. 25 shows the bit pattern of the code and the total number of bits when the second index structure is used. Here, Per (2) encoding is applied only to the word appearance frequency in the document, and the integer part of (word appearance frequency / 2 in the document) is encoded. However, when the integer part is 0, the numerical value 1 is encoded instead.

また、文書番号と文書内単語出現頻度を符号化する際、上述の各符号化方法の様々な組合せが考えられる。ここでは、以下の6通りの組合せについて、符号化の結果が示されている。   Further, when encoding the document number and the word appearance frequency in the document, various combinations of the above encoding methods can be considered. Here, encoding results are shown for the following six combinations.

1.文書番号:4BB改、文書内単語出現頻度:4BB改(図25、組合せ1)
2.文書番号:4BB改、文書内単語出現頻度:4BB改+Per(2)(図25、組合せ2)
3.文書番号:4BB改、文書内単語出現頻度:B24+Per(2)(図25、組合せ3)
4.文書番号:B24、文書内単語出現頻度:4BB改(図25、組合せ4) 5.文書番号:B24、文書内単語出現頻度:4BB改+Per(2)(図25、組合せ5)
6.文書番号:B24、文書内単語出現頻度:B24+Per(2)(図25、組合せ6)
図26、27、28は、第3のインデックス構造を用いた場合の符号のビットパターンと総ビット数を示している。ここでは、Per(16)符号化を、文書内単語出現位置のみに適用し、(文書内単語出現頻度/16)の整数部分を符号化している。ただし、その整数部分が0となる場合は代わりに数値1を符号化している。
1. Document number: 4BB break, word appearance frequency in document: 4BB break (FIG. 25, combination 1)
2. Document number: 4BB revision, word appearance frequency in document: 4BB revision + Per (2) (FIG. 25, combination 2)
3. Document number: 4BB revision, word appearance frequency in document: B24 + Per (2) (FIG. 25, combination 3)
4). Document number: B24, word appearance frequency in document: 4BB modification (FIG. 25, combination 4) Document number: B24, word appearance frequency in document: 4BB Kai + Per (2) (FIG. 25, combination 5)
6). Document number: B24, word appearance frequency in document: B24 + Per (2) (FIG. 25, combination 6)
FIGS. 26, 27, and 28 show the bit pattern of the code and the total number of bits when the third index structure is used. Here, Per (16) encoding is applied only to the word appearance position in the document, and the integer part of (word appearance frequency in document / 16) is encoded. However, when the integer part is 0, the numerical value 1 is encoded instead.

第3のインデックス構造の場合には、文書内単語出現位置の個数が文書内単語出現頻度となるため、文書内単語出現頻度のみにPer符号化を適用することはできない。そこで、以下の24通りの組合せについて、符号化の結果が示されている。   In the case of the third index structure, since the number of word appearance positions in the document becomes the word appearance frequency in the document, Per encoding cannot be applied only to the word appearance frequency in the document. Therefore, the encoding results are shown for the following 24 combinations.

1.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置:4BB改(図26、組合せ1)
2.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置:4BB改+Per(16)(図26、組合せ2)
3.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置:B24(図26、組合せ3)
4.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置:B24+Per(16)(図26、組合せ4)
5.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置:4BB改(図26、組合せ5)
6.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置:4BB改+Per(16)(図26、組合せ6)
7.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置:B24(図26、組合せ7)
8.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置:B24+Per(16)(図26、組合せ8)
9.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置:4BB改(図27、組合せ9)
10.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置:4BB改+Per(16)(図27、組合せ10)
11.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置:B24(図27、組合せ11)
12.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置:B24+Per(16)(図27、組合せ12)
13.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置:4BB改(図27、組合せ13)
14.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置:4BB改+Per(16)(図27、組合せ14)
15.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置:B24(図27、組合せ15)
16.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置:B24+Per(16)(図27、組合せ16)
17.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置:84BB(図28、組合せ17)
18.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置:84BB+Per(16)(図28、組合せ18)
19.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置:84BB(図28、組合せ19)
20.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置:84BB+Per(16)(図28、組合せ20)
21.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置:84BB(図28、組合せ21)
22.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置:84BB+Per(16)(図28、組合せ22)
23.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置:84BB(図28、組合せ23)
24.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置:84BB+Per(16)(図28、組合せ24)
図29、30、31は、第4のインデックス構造を用いた場合の符号のビットパターンと総ビット数を示している。ここでは、Per(16)符号化を、文書内単語出現位置のみに適用し、(文書内単語出現頻度/16)の整数部分を符号化している。ただし、その整数部分が0となる場合は代わりに数値1を符号化している。
1. Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position in document: 4BB break (FIG. 26, combination 1)
2. Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position in document: 4BB break + Per (16) (FIG. 26, combination 2)
3. Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position in document: B24 (FIG. 26, combination 3)
4). Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position in document: B24 + Per (16) (FIG. 26, combination 4)
5). Document number: 4BB break, word appearance frequency in document: B24, word appearance position in document: 4BB break (FIG. 26, combination 5)
6). Document number: 4BB revision, word appearance frequency in document: B24, word appearance position in document: 4BB revision + Per (16) (FIG. 26, combination 6)
7). Document number: 4BB revision, word appearance frequency in document: B24, word appearance position in document: B24 (FIG. 26, combination 7)
8). Document number: 4BB revision, word appearance frequency in document: B24, word appearance position in document: B24 + Per (16) (FIG. 26, combination 8)
9. Document number: B24, word occurrence frequency in document: 4BB break, word appearance position in document: 4BB break (FIG. 27, combination 9)
10. Document number: B24, word occurrence frequency in document: 4BB break, word occurrence position in document: 4BB break + Per (16) (FIG. 27, combination 10)
11. Document number: B24, word appearance frequency in document: 4BB revision, word appearance position in document: B24 (FIG. 27, combination 11)
12 Document number: B24, word appearance frequency in document: 4BB revision, word appearance position in document: B24 + Per (16) (FIG. 27, combination 12)
13. Document number: B24, word appearance frequency in document: B24, word appearance position in document: 4BB modification (FIG. 27, combination 13)
14 Document number: B24, in-document word appearance frequency: B24, in-document word appearance position: 4BB Kai + Per (16) (FIG. 27, combination 14)
15. Document number: B24, in-document word appearance frequency: B24, in-document word appearance position: B24 (FIG. 27, combination 15)
16. Document number: B24, in-document word appearance frequency: B24, in-document word appearance position: B24 + Per (16) (FIG. 27, combination 16)
17. Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position in document: 84BB (FIG. 28, combination 17)
18. Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position in document: 84BB + Per (16) (FIG. 28, combination 18)
19. Document number: 4BB revision, word appearance frequency in document: B24, word appearance position in document: 84BB (FIG. 28, combination 19)
20. Document number: 4BB revision, word appearance frequency in document: B24, word appearance position in document: 84BB + Per (16) (FIG. 28, combination 20)
21. Document number: B24, word appearance frequency in document: 4BB revision, word appearance position in document: 84BB (FIG. 28, combination 21)
22. Document number: B24, word appearance frequency in document: 4BB revision, word appearance position in document: 84BB + Per (16) (FIG. 28, combination 22)
23. Document number: B24, word appearance frequency in document: B24, word appearance position in document: 84BB (FIG. 28, combination 23)
24. Document number: B24, word appearance frequency in document: B24, word appearance position in document: 84BB + Per (16) (FIG. 28, combination 24)
29, 30, and 31 show the bit pattern of the code and the total number of bits when the fourth index structure is used. Here, Per (16) encoding is applied only to the word appearance position in the document, and the integer part of (word appearance frequency in document / 16) is encoded. However, when the integer part is 0, the numerical value 1 is encoded instead.

文書内単語出現位置を4BB改符号化で符号化した場合には、文書内単語出現位置領域数の単位は4ビットとなり、B24符号化で符号化した場合には、文書内単語出現位置領域数の単位は2ビットとなる。コード系のコラムの()内のビット数は、この単位ブロックの大きさを表し、各ビットパターンの右側の()内の数値は、そのビットパターンに対応する十進数を表す。ここでは、以下の24通りの組合せについて、符号化の結果が示されている。   When the word appearance position in the document is encoded by 4BB re-encoding, the unit of the word appearance position area number in the document is 4 bits, and when it is encoded by B24 encoding, the number of word appearance position areas in the document The unit of is 2 bits. The number of bits in parentheses in the column of the code system represents the size of this unit block, and the numerical value in parentheses on the right side of each bit pattern represents a decimal number corresponding to the bit pattern. Here, encoding results are shown for the following 24 combinations.

1.文書番号:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:4BB改(図29、組合せ1)
2.文書番号:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:4BB改+Per(16)(図29、組合せ2)
3.文書番号:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:B24(図29、組合せ3)
4.文書番号:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:B24+Per(16)(図29、組合せ4)
5.文書番号:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:4BB改(図29、組合せ5)
6.文書番号:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:4BB改+Per(16)(図29、組合せ6)
7.文書番号:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:B24(図29、組合せ7)
8.文書番号:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:B24+Per(16)(図29、組合せ8)
9.文書番号:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:4BB改(図30、組合せ9)
10.文書番号:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:4BB改+Per(16)(図30、組合せ10)
11.文書番号:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:B24(図30、組合せ11)
12.文書番号:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:B24+Per(16)(図30、組合せ12)
13.文書番号:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:4BB改(図30、組合せ13)
14.文書番号:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:4BB改+Per(16)(図30、組合せ14)
15.文書番号:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:B24(図30、組合せ15)
16.文書番号:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:B24+Per(16)(図30、組合せ16)
17.文書番号:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:84BB(図31、組合せ17)
18.文書番号:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:84BB+Per(16)(図31、組合せ18)
19.文書番号:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:84BB(図31、組合せ19)
20.文書番号:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:84BB+Per(16)(図31、組合せ20)
21.文書番号:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:84BB(図31、組合せ21)
22.文書番号:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:84BB+Per(16)(図31、組合せ22)
23.文書番号:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:84BB(図31、組合せ23)
24.文書番号:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:84BB+Per(16)(図31、組合せ24)
図32、33、34、35、36、37は、第5のインデックス構造を用いた場合の符号のビットパターンと総ビット数を示している。ここでは、Per(16)符号化を、文書内単語出現位置のみに適用し、(文書内単語出現頻度/16)の整数部分を符号化している。ただし、その整数部分が0となる場合は代わりに数値1を符号化している。
1. Document number: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: 4BB break (FIG. 29, combination 1)
2. Document number: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: 4BB break + Per (16) (FIG. 29, combination 2)
3. Document number: 4BB revision, word appearance position area number in document: 4BB revision, word appearance position in document: B24 (FIG. 29, combination 3)
4). Document number: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: B24 + Per (16) (FIG. 29, combination 4)
5). Document number: 4BB break, word appearance position area number in document: B24, word appearance position in document: 4BB break (FIG. 29, combination 5)
6). Document number: 4BB revision, word appearance position area number in document: B24, word appearance position in document: 4BB revision + Per (16) (FIG. 29, combination 6)
7). Document number: 4BB revision, number of word appearance positions in document: B24, word appearance position in document: B24 (FIG. 29, combination 7)
8). Document number: 4BB reform, word appearance position area number in document: B24, word appearance position in document: B24 + Per (16) (FIG. 29, combination 8)
9. Document number: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: 4BB break (FIG. 30, combination 9)
10. Document number: B24, word appearance position area number in document: 4BB revision, word appearance position in document: 4BB revision + Per (16) (FIG. 30, combination 10)
11. Document number: B24, word appearance position area number in document: 4BB revision, word appearance position in document: B24 (FIG. 30, combination 11)
12 Document number: B24, word appearance position area number in document: 4BB revision, word appearance position in document: B24 + Per (16) (FIG. 30, combination 12)
13. Document number: B24, word appearance position area number in document: B24, word appearance position in document: 4BB modified (FIG. 30, combination 13)
14 Document number: B24, word appearance position area number in document: B24, word appearance position in document: 4BB Kai + Per (16) (FIG. 30, combination 14)
15. Document number: B24, word appearance position area number in document: B24, word appearance position in document: B24 (FIG. 30, combination 15)
16. Document number: B24, word appearance position area number in document: B24, word appearance position in document: B24 + Per (16) (FIG. 30, combination 16)
17. Document number: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: 84BB (FIG. 31, combination 17)
18. Document number: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: 84BB + Per (16) (FIG. 31, combination 18)
19. Document number: 4BB reform, word appearance position area number in document: B24, word appearance position in document: 84BB (FIG. 31, combination 19)
20. Document number: 4BB break, word appearance position area number in document: B24, word appearance position in document: 84BB + Per (16) (FIG. 31, combination 20)
21. Document number: B24, word appearance position area number in document: 4BB revision, word appearance position in document: 84BB (FIG. 31, combination 21)
22. Document number: B24, word appearance position area number in document: 4BB revision, word appearance position in document: 84BB + Per (16) (FIG. 31, combination 22)
23. Document number: B24, word appearance position area number in document: B24, word appearance position in document: 84BB (FIG. 31, combination 23)
24. Document number: B24, word appearance position area number in document: B24, word appearance position in document: 84BB + Per (16) (FIG. 31, combination 24)
32, 33, 34, 35, 36, and 37 show the bit pattern of the code and the total number of bits when the fifth index structure is used. Here, Per (16) encoding is applied only to the word appearance position in the document, and the integer part of (word appearance frequency in document / 16) is encoded. However, when the integer part is 0, the numerical value 1 is encoded instead.

コード系のコラムの()内のビット数は、文書内単語出現位置領域数の単位の大きさを表し、各ビットパターンの右側の()内の数値は、そのビットパターンに対応する十進数を表す。ここでは、以下の48通りの組合せについて、符号化の結果が示されている。   The number of bits in parentheses in the code system column indicates the unit size of the word appearance position area number in the document, and the numerical value in parentheses on the right side of each bit pattern indicates the decimal number corresponding to the bit pattern. Represent. Here, the encoding results are shown for the following 48 combinations.

1.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:4BB改(図32、組合せ1)
2.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:4BB改+Per(16)(図32、組合せ2)
3.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:B24(図32、組合せ3)
4.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:B24+Per(16)(図32、組合せ4)
5.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:4BB改(図32、組合せ5)
6.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:4BB改+Per(16)(図32、組合せ6)
7.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:B24(図32、組合せ7)
8.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:B24+Per(16)(図32、組合せ8)
9.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:4BB改(図33、組合せ9)
10.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:4BB改+Per(16)(図33、組合せ10)
11.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:B24(図33、組合せ11)
12.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:B24+Per(16)(図33、組合せ12)
13.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:4BB改(図33、組合せ13)
14.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:4BB改+Per(16)(図33、組合せ14)
15.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:B24(図33、組合せ15)
16.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:B24+Per(16)(図33、組合せ16)
17.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:4BB改(図34、組合せ17)
18.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:4BB改+Per(16)(図34、組合せ18)
19.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:B24(図34、組合せ19)
20.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:B24+Per(16)(図34、組合せ20)
21.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:4BB改(図34、組合せ21)
22.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:4BB改+Per(16)(図34、組合せ22)
23.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:B24(図34、組合せ23)
24.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:B24+Per(16)(図34、組合せ24)
25.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:4BB改(図35、組合せ25)
26.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:4BB改+Per(16)(図35、組合せ26)
27.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:B24(図35、組合せ27)
28.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:B24+Per(16)(図35、組合せ28)
29.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:4BB改(図35、組合せ29)
30.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:4BB改+Per(16)(図35、組合せ30)
31.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:B24(図35、組合せ31)
32.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:B24+Per(16)(図35、組合せ32)
33.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:84BB(図36、組合せ33) 34.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:84BB+Per(16)(図36、組合せ34)
35.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:84BB(図36、組合せ35)
36.文書番号:4BB改、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:84BB+Per(16)(図36、組合せ36)
37.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:84BB(図36、組合せ37)
38.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:84BB+Per(16)(図36、組合せ38)
39.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:84BB(図36、組合せ39)
40.文書番号:4BB改、文書内単語出現頻度:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:84BB+Per(16)(図36、組合せ40)
41.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:84BB(図37、組合せ41)
42.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:4BB改、文書内単語出現位置:84BB+Per(16)(図37、組合せ42)
43.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:84BB(図37、組合せ43)
44.文書番号:B24、文書内単語出現頻度:4BB改、文書内単語出現位置領域数:B24、文書内単語出現位置:84BB+Per(16)(図37、組合せ44)
45.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:84BB(図37、組合せ45)
46.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置領域数:4BB改、文書内単語出現位置:84BB+Per(16)(図37、組合せ46)
47.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:84BB(図37、組合せ47)
48.文書番号:B24、文書内単語出現頻度:B24、文書内単語出現位置領域数:B24、文書内単語出現位置:84BB+Per(16)(図37、組合せ48)
以上説明した実施形態においては、本発明のデータ圧縮/復元装置を情報検索装置に適用しているが、このデータ圧縮/復元装置は、検索用インデックスのみに限らず、任意のデータの圧縮/復元に用いることができる。
1. Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: 4BB break (FIG. 32, combination 1)
2. Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: 4BB break + Per (16) (FIG. 32, combination 2)
3. Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position number in document: 4BB break, word appearance position in document: B24 (FIG. 32, combination 3)
4). Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: B24 + Per (16) (FIG. 32, combination 4)
5). Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position area number in document: B24, word appearance position in document: 4BB break (FIG. 32, combination 5)
6). Document number: 4BB revision, word appearance frequency in document: 4BB revision, word appearance position area number in document: B24, word appearance position in document: 4BB revision + Per (16) (FIG. 32, combination 6)
7). Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position area number in document: B24, word appearance position in document: B24 (FIG. 32, combination 7)
8). Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position area number in document: B24, word appearance position in document: B24 + Per (16) (FIG. 32, combination 8)
9. Document number: 4BB break, word appearance frequency in document: B24, word appearance position area number in document: 4BB break, word appearance position in document: 4BB break (FIG. 33, combination 9)
10. Document number: 4BB break, word appearance frequency in document: B24, word appearance position area number in document: 4BB break, word appearance position in document: 4BB break + Per (16) (FIG. 33, combination 10)
11. Document number: 4BB revision, word appearance frequency in document: B24, word appearance position area number in document: 4BB revision, word appearance position in document: B24 (FIG. 33, combination 11)
12 Document number: 4BB revision, word appearance frequency in document: B24, word appearance position area number in document: 4BB revision, word appearance position in document: B24 + Per (16) (FIG. 33, combination 12)
13. Document number: 4BB revision, word appearance frequency in document: B24, word appearance position area number in document: B24, word appearance position in document: 4BB revision (FIG. 33, combination 13)
14 Document number: 4BB revision, word appearance frequency in document: B24, word appearance position area number in document: B24, word appearance position in document: 4BB revision + Per (16) (FIG. 33, combination 14)
15. Document number: 4BB revision, word appearance frequency in document: B24, word appearance position area number in document: B24, word appearance position in document: B24 (FIG. 33, combination 15)
16. Document number: 4BB revision, in-document word appearance frequency: B24, in-document word appearance position area number: B24, in-document word appearance position: B24 + Per (16) (FIG. 33, combination 16)
17. Document number: B24, word appearance frequency in document: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: 4BB break (FIG. 34, combination 17)
18. Document number: B24, in-document word appearance frequency: 4BB break, in-document word appearance position area number: 4BB break, in-document word appearance position: 4BB break + Per (16) (FIG. 34, combination 18)
19. Document number: B24, word appearance frequency in document: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: B24 (FIG. 34, combination 19)
20. Document number: B24, word occurrence frequency in document: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: B24 + Per (16) (FIG. 34, combination 20)
21. Document number: B24, in-document word appearance frequency: 4BB break, in-document word appearance position area number: B24, in-document word appearance position: 4BB break (FIG. 34, combination 21)
22. Document number: B24, in-document word appearance frequency: 4BB revision, in-document word appearance position area number: B24, in-document word appearance position: 4BB revision + Per (16) (FIG. 34, combination 22)
23. Document number: B24, in-document word appearance frequency: 4BB revision, in-document word appearance position area number: B24, in-document word appearance position: B24 (FIG. 34, combination 23)
24. Document number: B24, in-document word appearance frequency: 4BB break, in-document word appearance position area number: B24, in-document word appearance position: B24 + Per (16) (FIG. 34, combination 24)
25. Document number: B24, in-document word appearance frequency: B24, in-document word appearance position number of areas: 4BB break, in-document word appearance position: 4BB break (FIG. 35, combination 25)
26. Document number: B24, in-document word appearance frequency: B24, in-document word appearance position area number: 4BB revision, in-document word appearance position: 4BB revision + Per (16) (FIG. 35, combination 26)
27. Document number: B24, in-document word appearance frequency: B24, in-document word appearance position area number: 4BB revision, in-document word appearance position: B24 (FIG. 35, combination 27)
28. Document number: B24, in-document word appearance frequency: B24, in-document word appearance position area number: 4BB reform, in-document word appearance position: B24 + Per (16) (FIG. 35, combination 28)
29. Document number: B24, in-document word appearance frequency: B24, in-document word appearance position area number: B24, in-document word appearance position: 4BB modified (FIG. 35, combination 29)
30. Document number: B24, in-document word appearance frequency: B24, in-document word appearance position area number: B24, in-document word appearance position: 4BB Kai + Per (16) (FIG. 35, combination 30)
31. Document number: B24, in-document word appearance frequency: B24, in-document word appearance position area number: B24, in-document word appearance position: B24 (FIG. 35, combination 31)
32. Document number: B24, in-document word appearance frequency: B24, in-document word appearance position area number: B24, in-document word appearance position: B24 + Per (16) (FIG. 35, combination 32)
33. Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: 84BB (FIG. 36, combination 33) 34. Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: 84BB + Per (16) (FIG. 36, combination 34)
35. Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position area number in document: B24, word appearance position in document: 84BB (FIG. 36, combination 35)
36. Document number: 4BB break, word appearance frequency in document: 4BB break, word appearance position area number in document: B24, word appearance position in document: 84BB + Per (16) (FIG. 36, combination 36)
37. Document number: 4BB revision, word appearance frequency in document: B24, word appearance position area number in document: 4BB revision, word appearance position in document: 84BB (FIG. 36, combination 37)
38. Document number: 4BB revision, word appearance frequency in document: B24, word appearance position area number in document: 4BB revision, word appearance position in document: 84BB + Per (16) (FIG. 36, combination 38)
39. Document number: 4BB revision, in-document word appearance frequency: B24, in-document word appearance position area number: B24, in-document word appearance position: 84BB (FIG. 36, combination 39)
40. Document number: 4BB revision, word appearance frequency in document: B24, word appearance position area number in document: B24, word appearance position in document: 84BB + Per (16) (FIG. 36, combination 40)
41. Document number: B24, word occurrence frequency in document: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: 84BB (FIG. 37, combination 41)
42. Document number: B24, word occurrence frequency in document: 4BB break, word appearance position area number in document: 4BB break, word appearance position in document: 84BB + Per (16) (FIG. 37, combination 42)
43. Document number: B24, in-document word appearance frequency: 4BB revision, in-document word appearance position area number: B24, in-document word appearance position: 84BB (FIG. 37, combination 43)
44. Document number: B24, in-document word appearance frequency: 4BB break, in-document word appearance position area number: B24, in-document word appearance position: 84BB + Per (16) (FIG. 37, combination 44)
45. Document number: B24, in-document word appearance frequency: B24, in-document word appearance position area number: 4BB revision, in-document word appearance position: 84BB (FIG. 37, combination 45)
46. Document number: B24, in-document word appearance frequency: B24, in-document word appearance position area number: 4BB revision, in-document word appearance position: 84BB + Per (16) (FIG. 37, combination 46)
47. Document number: B24, in-document word appearance frequency: B24, in-document word appearance position area number: B24, in-document word appearance position: 84BB (FIG. 37, combination 47)
48. Document number: B24, in-document word appearance frequency: B24, in-document word appearance position area number: B24, in-document word appearance position: 84BB + Per (16) (FIG. 37, combination 48)
In the embodiment described above, the data compression / decompression apparatus of the present invention is applied to an information search apparatus. However, this data compression / decompression apparatus is not limited to a search index, and compresses / decompresses arbitrary data. Can be used.

本発明のデータ圧縮/復元装置の原理図である。It is a principle figure of the data compression / decompression apparatus of this invention. 情報検索装置の構成図である。It is a block diagram of an information search device. 4BB符号化処理のフローチャートである。It is a flowchart of a 4BB encoding process. 4BB符号化のプログラムを示す図である。It is a figure which shows the program of 4BB encoding. 4BB復号化処理のフローチャートである。It is a flowchart of a 4BB decoding process. 4BB復号化のプログラムを示す図である。It is a figure which shows the program of 4BB decoding. 4BB改符号化処理のフローチャートである。It is a flowchart of 4BB re-encoding process. 4BB改符号化のプログラムを示す図である。It is a figure which shows the program of 4BB re-encoding. 4BB改復号化処理のフローチャートである。It is a flowchart of 4BB re-decoding processing. 4BB改復号化のプログラムを示す図である。It is a figure which shows the program of 4BB re-decoding. 84BB符号化処理のフローチャートである。It is a flowchart of an 84BB encoding process. 84BB符号化のプログラムを示す図である。It is a figure which shows the program of 84BB encoding. 84BB復号化処理のフローチャートである。It is a flowchart of a 84BB decoding process. 84BB復号化のプログラムを示す図である。It is a figure which shows the program of 84BB decoding. B24符号化処理のフローチャートである。It is a flowchart of a B24 encoding process. B24符号化のプログラムを示す図である。It is a figure which shows the program of B24 encoding. B24復号化処理のフローチャートである。It is a flowchart of a B24 decoding process. B24復号化のプログラムを示す図である。It is a figure which shows the program of B24 decoding. 数値表現に必要なビット数を示す図である。It is a figure which shows the number of bits required for numerical expression. 32bit最大数の符号化例を示す図である。It is a figure which shows the example of encoding of 32-bit maximum number. Per符号化処理のフローチャートである。It is a flowchart of a Per encoding process. Per復号化処理のフローチャートである。It is a flowchart of a Per decoding process. 第5のインデックス構造の例を示す図である。It is a figure which shows the example of a 5th index structure. 第1のインデックス構造のビットパターンを示す図である。It is a figure which shows the bit pattern of a 1st index structure. 第2のインデックス構造のビットパターンを示す図である。It is a figure which shows the bit pattern of a 2nd index structure. 第3のインデックス構造のビットパターンを示す図(その1)である。It is a figure (the 1) which shows the bit pattern of a 3rd index structure. 第3のインデックス構造のビットパターンを示す図(その2)である。It is FIG. (2) which shows the bit pattern of a 3rd index structure. 第3のインデックス構造のビットパターンを示す図(その3)である。It is FIG. (3) which shows the bit pattern of a 3rd index structure. 第4のインデックス構造のビットパターンを示す図(その1)である。It is a figure (the 1) which shows the bit pattern of a 4th index structure. 第4のインデックス構造のビットパターンを示す図(その2)である。It is FIG. (2) which shows the bit pattern of a 4th index structure. 第4のインデックス構造のビットパターンを示す図(その3)である。It is FIG. (3) which shows the bit pattern of a 4th index structure. 第5のインデックス構造のビットパターンを示す図(その1)である。It is a figure (the 1) which shows the bit pattern of a 5th index structure. 第5のインデックス構造のビットパターンを示す図(その2)である。It is a figure (the 2) which shows the bit pattern of a 5th index structure. 第5のインデックス構造のビットパターンを示す図(その3)である。It is FIG. (3) which shows the bit pattern of a 5th index structure. 第5のインデックス構造のビットパターンを示す図(その4)である。It is FIG. (4) which shows the bit pattern of a 5th index structure. 第5のインデックス構造のビットパターンを示す図(その5)である。It is FIG. (5) which shows the bit pattern of a 5th index structure. 第5のインデックス構造のビットパターンを示す図(その6)である。It is FIG. (6) which shows the bit pattern of a 5th index structure. キーとインデックス構造を示す図である。It is a figure which shows a key and an index structure. 圧縮のされていないインデックスのサイズを示す図である。It is a figure which shows the size of the index which is not compressed. 差分を用いたインデックス構造を示す図である。It is a figure which shows the index structure using a difference. 差分値の符号化例を示す図である。It is a figure which shows the example of an encoding of a difference value.

符号の説明Explanation of symbols

1 圧縮手段
2 格納手段
3 復元手段
4 元のデータ
5 圧縮されたデータ
11 磁気ディスク装置
12 フロッピーディスク駆動装置
13 フロッピーディスク
14 プリンタ
15 ディスプレイ
16 CPU
17 キーボード
18 ポインティング・デバイス
19 メインメモリ
20 バス
21 文書データベース
22 インデックス
23 インデックス作成プログラム
24 検索エンジン
25 文書表示プログラム
26 ワーク領域
31 ネットワーク接続装置
32 外部の装置
DESCRIPTION OF SYMBOLS 1 Compression means 2 Storage means 3 Restoration means 4 Original data 5 Compressed data 11 Magnetic disk apparatus 12 Floppy disk drive apparatus 13 Floppy disk 14 Printer 15 Display 16 CPU
17 Keyboard 18 Pointing device 19 Main memory 20 Bus 21 Document database 22 Index 23 Index creation program 24 Search engine 25 Document display program 26 Work area 31 Network connection device 32 External device

Claims (12)

情報検索のためのインデックス内で用いられる数値データの粒度を粗くして、該数値データを圧縮する圧縮手段と、
圧縮されたデータを格納する格納手段と
を備えることを特徴とするデータ圧縮装置。
Compression means for reducing the granularity of numerical data used in an index for information retrieval and compressing the numerical data;
A data compression apparatus comprising storage means for storing compressed data.
前記圧縮手段は、前記数値データを、より小さな数値を表す中間数値データに変換して、圧縮することを特徴とする請求項1記載のデータ圧縮装置。   The data compression apparatus according to claim 1, wherein the compression means converts the numerical data into intermediate numerical data representing a smaller numerical value and compresses the intermediate numerical data. 前記圧縮手段は、情報検索のためのインデックス内で用いられる文書内単語出現頻度データと文書内単語出現位置データのうち、少なくとも1つ以上の数値データを圧縮することを特徴とする請求項1記載のデータ圧縮装置。   2. The compression means compresses at least one or more numerical data among the word appearance frequency data in the document and the word appearance position data in the document used in the index for information retrieval. Data compression device. 前記圧縮手段は、粒度の粗くなった中間数値データを、4ビットをブロックの単位として圧縮し、前記圧縮されたデータの先頭部分に、該圧縮されたデータのブロック長を表す継続フラグ情報を生成することを特徴とする請求項1記載のデータ圧縮装置。   The compression means compresses the intermediate numerical data with coarse granularity in units of 4 bits, and generates continuation flag information indicating the block length of the compressed data at the head of the compressed data. The data compression apparatus according to claim 1, wherein: 前記圧縮手段は、粒度の粗くなった中間数値データが2以下の数値を表すとき、該中間数値データを2ビットのブロックで表し、該中間数値データが3以上の数値を表すとき、該中間数値データを、4ビットをブロックの単位として圧縮することを特徴とする請求項1記載のデータ圧縮装置。   The compression means represents the intermediate numerical data in a 2-bit block when the intermediate numerical data with coarse granularity represents a numerical value of 2 or less, and the intermediate numerical data when the intermediate numerical data represents a numerical value of 3 or more 2. The data compression apparatus according to claim 1, wherein the data is compressed in units of 4 bits. 前記圧縮手段は、3以上6以下の数値データが与えられたとき、与えられた数値データを、2ビットの継続フラグ情報と2ビットのビットパターンで表すことを特徴とする請求項5記載のデータ圧縮装置。   6. The data according to claim 5, wherein when the numerical data of 3 to 6 is given, the compression means represents the given numerical data with 2-bit continuation flag information and a 2-bit bit pattern. Compression device. 情報検索のためのインデックス内で用いられる数値データの粒度を粗くし、圧縮して格納する格納手段と、
前記数値データを復元し、復元された数値データの粒度を元に戻す復元手段とを備えることを特徴とするデータ復元装置。
Storage means for coarsening the numerical data used in the index for information retrieval, storing the compressed data,
A data restoration device comprising: restoration means for restoring the numeric data and restoring the granularity of the restored numeric data.
情報検索のためのインデックス内で用いられる数値データの粒度を粗くし、圧縮して格納する格納手段と、
前記数値データを復元し、復元された数値データの粒度を元に戻す復元手段と、
復元された元のデータを用いてデータベースを検索する検索手段と
を備えることを特徴とする情報検索装置。
Storage means for coarsening the numerical data used in the index for information retrieval, storing the compressed data,
Restoring means for restoring the numerical data and restoring the granularity of the restored numerical data;
An information search apparatus comprising: search means for searching a database using the restored original data.
コンピュータのためのプログラムを記録した記録媒体であって、
情報検索のためのインデックス内で用いられる数値データの粒度を粗くして、該数値データを圧縮する機能を前記コンピュータに実現させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体。
A recording medium recording a program for a computer,
A computer-readable recording medium storing a program for causing the computer to realize a function of reducing the granularity of numerical data used in an index for information retrieval and compressing the numerical data.
コンピュータのためのプログラムを記録した記録媒体であって、
情報検索のためのインデックス内で用いられる数値データの粒度を粗くして圧縮したデータを復元し、復元された数値データの粒度を元に戻す機能を前記コンピュータに実現させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体。
A recording medium recording a program for a computer,
A computer having recorded thereon a program for causing the computer to realize a function of restoring compressed data by coarsening the granularity of numerical data used in an index for information retrieval and restoring the granularity of the restored numerical data A readable recording medium.
情報検索のためのインデックス内で用いられる数値データの粒度を粗くして、
該数値データを圧縮する
ことを特徴とするデータ圧縮方法。
By coarsening the granularity of numerical data used in the index for information retrieval,
A data compression method comprising compressing the numerical data.
情報検索のためのインデックス内で用いられる数値データの粒度を粗くして圧縮したデータを復元し、
復元された数値データの粒度を元に戻す
ことを特徴とするデータ復元方法。
Restore the compressed data by coarsening the granularity of numerical data used in the index for information retrieval,
A data restoration method characterized by restoring the granularity of the restored numerical data.
JP2004320948A 1997-02-28 2004-11-04 Data compression / decompression apparatus and data compression / decompression method Expired - Lifetime JP3898717B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004320948A JP3898717B2 (en) 1997-02-28 2004-11-04 Data compression / decompression apparatus and data compression / decompression method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP4542497 1997-02-28
JP2004320948A JP3898717B2 (en) 1997-02-28 2004-11-04 Data compression / decompression apparatus and data compression / decompression method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP01177198A Division JP3708318B2 (en) 1997-02-28 1998-01-23 Data compression / decompression apparatus and data compression / decompression method

Publications (2)

Publication Number Publication Date
JP2005129071A true JP2005129071A (en) 2005-05-19
JP3898717B2 JP3898717B2 (en) 2007-03-28

Family

ID=34655284

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004320948A Expired - Lifetime JP3898717B2 (en) 1997-02-28 2004-11-04 Data compression / decompression apparatus and data compression / decompression method

Country Status (1)

Country Link
JP (1) JP3898717B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008140357A (en) * 2006-11-08 2008-06-19 Hitachi Ltd Device and method for constructing inverted indexes and searching method
JP2011523152A (en) * 2008-06-13 2011-08-04 マイクロソフト コーポレーション Search index format optimization
US8321485B2 (en) 2006-11-08 2012-11-27 Hitachi, Ltd. Device and method for constructing inverted indexes

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008140357A (en) * 2006-11-08 2008-06-19 Hitachi Ltd Device and method for constructing inverted indexes and searching method
US8321485B2 (en) 2006-11-08 2012-11-27 Hitachi, Ltd. Device and method for constructing inverted indexes
JP2011523152A (en) * 2008-06-13 2011-08-04 マイクロソフト コーポレーション Search index format optimization
US8914380B2 (en) 2008-06-13 2014-12-16 Microsoft Corporation Search index format optimizations

Also Published As

Publication number Publication date
JP3898717B2 (en) 2007-03-28

Similar Documents

Publication Publication Date Title
KR100894002B1 (en) Device and data method for selective compression and decompression and data format for compressed data
TW312771B (en)
US5325091A (en) Text-compression technique using frequency-ordered array of word-number mappers
US6563438B2 (en) Encoding and decoding apparatus with matching length means for symbol strings
JP3778087B2 (en) Data encoding apparatus and data decoding apparatus
JP4261779B2 (en) Data compression apparatus and method
JP3305190B2 (en) Data compression device and data decompression device
WO2002097674A2 (en) Efficient collation element structure for handling large numbers of characters
US6304676B1 (en) Apparatus and method for successively refined competitive compression with redundant decompression
US6057790A (en) Apparatus and method for data compression/expansion using block-based coding with top flag
US5815096A (en) Method for compressing sequential data into compression symbols using double-indirect indexing into a dictionary data structure
KR100495593B1 (en) File processing method, data processing device, and storage medium
Rahman et al. A novel lossless coding technique for image compression
JP3898717B2 (en) Data compression / decompression apparatus and data compression / decompression method
JP3708318B2 (en) Data compression / decompression apparatus and data compression / decompression method
Chung et al. Level-compressed Huffman decoding
JP2005137015A (en) Data compressing-restoring device and its method
JP3199292B2 (en) Run-length extraction method, Huffman code conversion method, and MH coding processing method in Huffman code coding
JP2005004560A (en) Method for creating inverted file
JP3083329B2 (en) Data compression / decompression method
JP3442105B2 (en) Data compression and decompression methods
WO2013132590A1 (en) Program, information processing apparatus, and data generating method
JP2005175926A (en) Decoder and decoding method
JPH06178124A (en) Image data compression and elongation device
JPH07334344A (en) Data coding device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060328

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060517

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060815

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061016

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20061116

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20061219

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061221

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110105

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110105

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120105

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130105

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130105

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140105

Year of fee payment: 7

EXPY Cancellation because of completion of term