JP6984321B2 - Data generation program, data generation method and information processing equipment - Google Patents

Data generation program, data generation method and information processing equipment Download PDF

Info

Publication number
JP6984321B2
JP6984321B2 JP2017211127A JP2017211127A JP6984321B2 JP 6984321 B2 JP6984321 B2 JP 6984321B2 JP 2017211127 A JP2017211127 A JP 2017211127A JP 2017211127 A JP2017211127 A JP 2017211127A JP 6984321 B2 JP6984321 B2 JP 6984321B2
Authority
JP
Japan
Prior art keywords
bitmap
text data
inverted index
compression code
fixed
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.)
Active
Application number
JP2017211127A
Other languages
Japanese (ja)
Other versions
JP2019083477A (en
Inventor
正弘 片岡
貴博 大久保
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 JP2017211127A priority Critical patent/JP6984321B2/en
Priority to US16/171,099 priority patent/US10915559B2/en
Publication of JP2019083477A publication Critical patent/JP2019083477A/en
Application granted granted Critical
Publication of JP6984321B2 publication Critical patent/JP6984321B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • G06F16/313Selection or weighting of terms for indexing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/123Storage facilities

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明は、データ生成プログラム、データ生成方法および情報処理装置に関する。 The present invention relates to a data generation program, a data generation method, and an information processing apparatus.

データの圧縮や伸長において、LZ77やZIPなどでは、文字や最長一致文字列に対して短いビット長の符号を割り当てることで、符号化と復号化が行われる。また、Web検索では、単語に対応付けた転置インデックスを利用して、全文検索を高速化する技術が知られている。 In data compression and decompression, in LZ77, ZIP, etc., coding and decoding are performed by assigning a code having a short bit length to a character or the longest matching character string. Further, in Web search, a technique for speeding up full-text search by using an inverted index associated with a word is known.

一方、近年では、圧縮や伸長のために、単語に対して符号を割り当てることで、符号化と復号化を行い、かつ、検索の高速化のために、単語とその出現位置に対応付けた転置インデックスを生成し、内蔵する技術が知られている。 On the other hand, in recent years, by assigning a code to a word for compression or decompression, coding and decoding are performed, and in order to speed up the search, the word and its appearance position are associated with the translocation. The technology to generate and incorporate an index is known.

特開2016−046602号公報Japanese Unexamined Patent Publication No. 2016-406602

単語の出現順に対応付けられた圧縮符号を基に元データを復元することは容易ではある。しかしながら、インデックスが、単語の出現順では無く、単語コード(もしくは、単語を構成する文字コード)の順序で転置(並び替え)されているため、元のデータを復元することが困難である。 It is easy to restore the original data based on the compression codes associated in the order of appearance of the words. However, it is difficult to restore the original data because the index is transposed (rearranged) in the order of the word code (or the character code constituting the word) instead of the order of appearance of the word.

また、転置インデックスのサイズ増大を抑止するため、出現頻度の高い単語をインデックス対象より除外したり、転置インデックスの位置に関する情報の粒度を大きくしたりする等の処理が行われるため、転置インデックスを利用して元のデータを復元することはできない。 In addition, in order to suppress the increase in the size of the inverted index, processing such as excluding frequently occurring words from the index target and increasing the granularity of information regarding the position of the inverted index is performed, so the inverted index is used. And the original data cannot be restored.

一つの側面では、インデックスより元データを生成することができるデータ生成プログラム、データ生成方法および情報処理装置を提供することを目的とする。 One aspect is to provide a data generation program, a data generation method and an information processing apparatus capable of generating original data from an index.

第1の案では、データ生成プログラムは、コンピュータに、テキストデータより生成された、前記テキストデータに含まれる形態素それぞれを前記テキストデータにおける位置と対応づけたインデックスを参照する処理を実行させる。データ生成プログラムは、コンピュータに、前記テキストデータにおける位置の順で、前記インデックスで対応づけられた形態素を配置する処理を実行させる。 In the first plan, the data generation program causes a computer to execute a process of referring to an index generated from the text data, in which each morpheme contained in the text data is associated with a position in the text data. The data generation program causes a computer to execute a process of arranging morphemes associated with the index in the order of positions in the text data.

一実施形態によれば、インデックスより元データを生成することができる。 According to one embodiment, the original data can be generated from the index.

図1は、実施例1にかかる復元処理を説明する図である。FIG. 1 is a diagram illustrating a restoration process according to the first embodiment. 図2は、実施例1にかかる情報処理装置の機能構成を示す機能ブロック図である。FIG. 2 is a functional block diagram showing a functional configuration of the information processing apparatus according to the first embodiment. 図3は、ビットマップ型転置インデックスに関するサイズ縮小について説明する図である。FIG. 3 is a diagram illustrating size reduction related to a bitmap type inverted index. 図4は、静的辞書および動的辞書を説明する図である。FIG. 4 is a diagram illustrating a static dictionary and a dynamic dictionary. 図5は、ハッシュ化ビットマップ型転置インデックスの展開について説明する図である。FIG. 5 is a diagram illustrating expansion of a hashed bitmap type inverted index. 図6は、ハッシュ化ビットマップ型転置インデックスのAND演算について説明する図である。FIG. 6 is a diagram illustrating an AND operation of a hashed bitmap type inverted index. 図7は、圧縮符号の転置を説明する図である。FIG. 7 is a diagram illustrating the transposition of the compression code. 図8は、圧縮データの生成および元の文書データの復元を説明する図である。FIG. 8 is a diagram illustrating the generation of compressed data and the restoration of the original document data. 図9は、処理の流れを示すフローチャートである。FIG. 9 is a flowchart showing the flow of processing. 図10は、実施例1の情報処理装置のハードウェア構成を示す図である。FIG. 10 is a diagram showing a hardware configuration of the information processing apparatus of the first embodiment. 図11は、コンピュータで動作するプログラムの構成例を示す図である。FIG. 11 is a diagram showing a configuration example of a program running on a computer. 図12は、実施形態のシステムにおける装置の構成例を示す図である。FIG. 12 is a diagram showing a configuration example of the device in the system of the embodiment.

以下に、本願の開示するデータ生成プログラム、データ生成方法および情報処理装置の実施例を図面に基づいて詳細に説明する。なお、この実施例によりこの発明が限定されるものではない。また、各実施例は矛盾のない範囲内で適宜組み合わせることができる。 Hereinafter, examples of the data generation program, the data generation method, and the information processing apparatus disclosed in the present application will be described in detail with reference to the drawings. The present invention is not limited to this embodiment. In addition, each embodiment can be appropriately combined within a consistent range.

[全体構成]
まず、実施例1にかかる情報処理装置10(図2を参照)が実行する処理について説明する。図1は、実施例1にかかる復元処理を説明する図である。図1に示すように、情報処理装置10は、圧縮符号に対応するビットマップ型転置インデックス(以下では、単にビットマップまたはハッシュ化ビットマップなどと記載する場合がある)を取得し、このビットマップ型転置インデックスを用いた圧縮符号の転置バッファリング処理を実行して、転置用バッファに圧縮符号を配置する。その後、情報処理装置10は、静的辞書および動的辞書を用いて、転置用バッファに圧縮符号を、格納されている順で変換することで、元のテキストデータを復元する。
[overall structure]
First, a process executed by the information processing apparatus 10 (see FIG. 2) according to the first embodiment will be described. FIG. 1 is a diagram illustrating a restoration process according to the first embodiment. As shown in FIG. 1, the information processing apparatus 10 acquires a bitmap type translocation index corresponding to a compression code (hereinafter, may be simply referred to as a bitmap or a hashed bitmap), and this bitmap is used. The compression code is placed in the transfer buffer by executing the transfer buffering process of the compression code using the type transfer index. After that, the information processing apparatus 10 restores the original text data by converting the compression codes in the transposition buffer in the order in which they are stored, using a static dictionary and a dynamic dictionary.

ここで、ビットマップ型転置インデックスは、符号化対象の文章データから生成されたインデックスであり、文章データに登場する各単語に対応する圧縮符号と文書データにおける出現位置とを対応付けたインデックスである。また、静的辞書は、出現頻度の高い単語について、当該単語に予め割当てられた圧縮符号を記載する辞書であり、高頻度の単語と圧縮符号とを対応付けた表である。動的辞書は、出現頻度の低い単語について、当該単語に割当てられた圧縮符号を記載する辞書であり、低頻度の単語と圧縮符号とを対応付けた表である。すなわち、動的辞書は、文章データに登場する単語のうち、静的辞書に登録されていない各未登録単語に対して、文章データに登場したときに動的に割当てられる圧縮符号と未登録単語との対応付けを記憶する。また、転置用バッファは、3バイトの固定長で区切ったバッファであり、ビットマップ型転置インデックスと同じバイト数分の長さを有するバッファである。 Here, the bitmap type inverted index is an index generated from the text data to be encoded, and is an index in which the compression code corresponding to each word appearing in the text data and the appearance position in the document data are associated with each other. .. Further, the static dictionary is a dictionary in which a compression code assigned in advance to a word having a high frequency of appearance is described, and is a table in which a word having a high frequency and a compression code are associated with each other. The dynamic dictionary is a dictionary that describes the compression code assigned to a word with a low frequency of appearance, and is a table in which the word with a low frequency and the compression code are associated with each other. That is, the dynamic dictionary is a compression code and an unregistered word that are dynamically assigned to each unregistered word that is not registered in the static dictionary among the words that appear in the sentence data when they appear in the sentence data. Memorize the correspondence with. The transposition buffer is a buffer separated by a fixed length of 3 bytes, and has a length corresponding to the same number of bytes as the bitmap type inverted index.

このような状態において、情報処理装置10は、文書データに出現した単語1、単語2・・・単語nのそれぞれに対応する圧縮符号A、圧縮符号B・・・圧縮符号Nのそれぞれに対応する各ビットマップ型転置インデックスを取得する。続いて、情報処理装置10は、3バイトずつで区切った転置用バッファを用意する。 In such a state, the information processing apparatus 10 corresponds to each of the compression code A corresponding to each of the word 1, word 2 ... word n appearing in the document data, and the compression code B ... compression code N. Get each bitmap type inverted index. Subsequently, the information processing apparatus 10 prepares a transfer buffer divided by 3 bytes.

そして、情報処理装置10は、各単語の圧縮符号に対応する各ビットマップ型転置インデックスにしたがって、対象文章データにおける出現位置に対応する転置用バッファに、出現した単語の圧縮符号を転置する。例えば、情報処理装置10は、単語1(圧縮符号A)が1番目と3番目に出現し、単語2(圧縮符号B)が2番目に出現する場合、転置用バッファの1番目に圧縮符号Aを格納し、2番目に圧縮符号Bを格納し、3番目に圧縮符号Aを格納する。 Then, the information processing apparatus 10 transfers the compression code of the appearing word into the transfer buffer corresponding to the appearance position in the target sentence data according to each bitmap type inverted index corresponding to the compression code of each word. For example, in the information processing apparatus 10, when the word 1 (compression code A) appears first and third, and the word 2 (compression code B) appears second, the compression code A appears first in the transfer buffer. Is stored, the compression code B is stored second, and the compression code A is stored third.

その後、情報処理装置10は、静的辞書と動的辞書とを参照して、転置用バッファに格納される順で、格納される各圧縮符号を元の単語に変換する。上記例で説明すると、情報処理装置10は、転置バッファの1番目に格納される圧縮符号Aを単語1に変換し、2番目に格納される圧縮符号Bを単語2に変換し、3番目に格納される圧縮符号Aを単語1に変換し、これらを格納されている順で「単語1、単語2、単語1・・・」と配置することで、元の文章データを復元することができる。 After that, the information processing apparatus 10 refers to the static dictionary and the dynamic dictionary, and converts each stored compression code into the original word in the order of being stored in the transposition buffer. Explaining in the above example, the information processing apparatus 10 converts the first stored compression code A in the translocation buffer into the word 1, the second stored compression code B into the word 2, and the third. The original sentence data can be restored by converting the stored compression code A into word 1 and arranging them as "word 1, word 2, word 1 ..." in the order in which they are stored. ..

このように、情報処理装置10は、テキストデータである文書データ多より生成された、文書データに含まれる単語それぞれを文書データにおける位置と対応づけたインデックスを参照し、文書データにおける位置の順でインデックスで対応づけられた単語を配置する。したがって、情報処理装置10は、ビットマップ型転置インデックスから元データを生成することができる。なお、実施例では、単語の圧縮符号に対応するビットマップ型転置インデックスを例にして説明するが、これに限定されるものではなく、文書データから得られる形態素または単語そのものに対応するビットマップ型転置インデックスであっても、同様に処理することができる。なお、その場合は、転置バッファへの格納処理の前に、静的辞書や動的辞書を用いて形態素または単語を圧縮符号へ変換する。 In this way, the information processing apparatus 10 refers to the index in which each word included in the document data is associated with the position in the document data, which is generated from the document data number which is the text data, and in the order of the position in the document data. Place the words associated with the index. Therefore, the information processing apparatus 10 can generate the original data from the bitmap type inverted index. In the embodiment, the bitmap type inverted index corresponding to the compression code of the word will be described as an example, but the present invention is not limited to this, and the bitmap type corresponding to the morphology element obtained from the document data or the word itself is used. Even if it is an inverted index, it can be processed in the same manner. In that case, the morpheme or word is converted into a compression code using a static dictionary or a dynamic dictionary before the storage process in the transposed buffer.

[機能構成]
図2は、実施例1にかかる情報処理装置10の機能構成を示す機能ブロック図である。図2に示すように、情報処理装置10は、通信部11、記憶部12、制御部20を有する。
[Functional configuration]
FIG. 2 is a functional block diagram showing a functional configuration of the information processing apparatus 10 according to the first embodiment. As shown in FIG. 2, the information processing apparatus 10 includes a communication unit 11, a storage unit 12, and a control unit 20.

通信部11は、他の装置の間の通信を制御する処理部であり、例えばネットワークインタフェースカードなどである。例えば、通信部11は、他の情報処理装置10からビットマップ型転置インデックスなどを受信する。 The communication unit 11 is a processing unit that controls communication between other devices, such as a network interface card. For example, the communication unit 11 receives a bitmap type inverted index or the like from another information processing device 10.

記憶部12は、プログラムやデータを記憶する記憶装置の一例であり、例えばメモリやハードディスクなどである。この記憶部12は、転置インデックスDB13、静的辞書14、動的辞書15などを記憶する。 The storage unit 12 is an example of a storage device for storing programs and data, such as a memory and a hard disk. The storage unit 12 stores an inverted index DB 13, a static dictionary 14, a dynamic dictionary 15, and the like.

転置インデックスDB13は、符号化対象の文章データから生成されたインデックスであり、文章データに登場する各単語に対応する圧縮符号と文書データにおける出現位置とを対応付けた、オフセット付きのビットマップ型転置インデックスを記憶するデータベースである。 The inverted index DB 13 is an index generated from the text data to be encoded, and is a bitmap type translocation with an offset in which the compression code corresponding to each word appearing in the text data is associated with the appearance position in the document data. A database that stores indexes.

ここで、図3を用いて、オフセット付きのビットマップ型転置インデックスの生成例について説明する。図3は、ビットマップ型転置インデックスに関するサイズ縮小について説明する図である。なお、ここでは、ビットマップ型転置インデックスを生成する装置が、情報処理装置10とは異なるインデックス生成装置を例にして説明するが、情報処理装置10が生成することもできる。 Here, an example of generating a bitmap type inverted index with an offset will be described with reference to FIG. FIG. 3 is a diagram illustrating size reduction related to a bitmap type inverted index. Although the device for generating the bitmap type inverted index will be described here by taking an index generation device different from the information processing device 10 as an example, the information processing device 10 can also generate the device.

図3を用いて、オフセット付きのビットマップ型転置インデックスの生成例について説明する。図3に示すように、オフセット付きのビットマップ型転置インデックスの生成処理は、ビットマップ型インデックスのサイズ縮小を実現するために、ビットマップ型インデックスからハッシュ化インデックスを生成する。すなわち、ビットマップ型転置インデックスは、隣接した複数のハッシュ値(底)を基に、2次元(単語の軸とファイルの軸)にハッシュ化を適用したハッシュ化インデックスを生成する。 An example of generating a bitmap type inverted index with an offset will be described with reference to FIG. As shown in FIG. 3, the process of generating the offset bitmap type inverted index generates a hashed index from the bitmap type index in order to realize the size reduction of the bitmap type index. That is, the bitmap type inverted index generates a hashed index in which hashing is applied to two dimensions (word axis and file axis) based on a plurality of adjacent hash values (bottoms).

ここでいうビットマップ型インデックスとは、テキストデータに含まれる単語について、ファイルごとの存否をインデックス化したビットマップのことをいう。図3に示すように、ビットマップ型インデックスのX軸はオフセットを表し、ビットマップ型インデックスのY軸は単語IDを表す。すなわち、ビットマップ型インデックスは、単語IDが示す単語のあるファイルにおける存否を表す。一例として、ある単語IDに対応するビットマップbi1が示されている。ある単語IDが示す単語がファイルに存在する場合には、当該単語のファイルの存否として2進数の「1」が設定され、当該単語がファイルに存在しない場合には、当該単語のファイルの存否として2進数の「0」が設定される。 The bitmap type index referred to here is a bitmap that indexes the existence or nonexistence of each file for words contained in text data. As shown in FIG. 3, the X-axis of the bitmap type index represents an offset, and the Y-axis of the bitmap type index represents a word ID. That is, the bitmap type index indicates the existence or nonexistence of the word indicated by the word ID in a certain file. As an example, a bitmap bi1 corresponding to a certain word ID is shown. If the word indicated by a certain word ID exists in the file, the binary number "1" is set as the existence or nonexistence of the file of the word, and if the word does not exist in the file, the existence or nonexistence of the file of the word is set. The binary number "0" is set.

例えば、図3に示すように、インデックス生成装置は、単語IDに対応するビットマップそれぞれについてハッシュ関数を適用した複数のハッシュ化ビットマップを生成する。ここでは、インデックス生成装置は、32ビットレジスタを想定し、一例として29と31のハッシュ値(底)を基に、各ビットマップをハッシュ化する。具体的には、インデックス生成装置は、1つの底のハッシュ化ビットマップについて、単語IDに対応するビットマップの各ビットの位置を底で割った余りの位置に、当該ビットマップの各ビットの値を設定する。 For example, as shown in FIG. 3, the index generator generates a plurality of hashed bitmaps to which a hash function is applied to each of the bitmaps corresponding to the word ID. Here, the index generator assumes a 32-bit register and, as an example, hashes each bitmap based on the hash values (bottoms) of 29 and 31. Specifically, the index generator sets the value of each bit of the bitmap at the position of the remainder obtained by dividing the position of each bit of the bitmap corresponding to the word ID by the base for the hashed bitmap of one base. To set.

一例として、インデックス生成装置は、底29のハッシュ化ビットマップh11について、ビットマップbi1の各ビットの位置を底29で割った余りの位置に、ビットマップbi1の各ビットの値を設定する。ビットマップbi1の35ビット目の位置のビット値「1」は、ハッシュ化ビットマップh11の6ビット目に設定される。ビットマップbi1の42ビット目の位置のビット値「1」は、ハッシュ化ビットマップh11の13ビット目に設定される。インデックス生成装置は、底31のハッシュ化ビットマップh12について、ビットマップbi1の各ビットの位置を底31で割った余りの位置に、ビットマップbi1の各ビットの値を設定する。ビットマップbi1の35ビット目の位置のビット値「1」は、ハッシュ化ビットマップh12の4ビット目に設定される。ビットマップbi1の42ビット目の位置のビット値「1」は、ハッシュ化ビットマップh12の11ビット目に設定される。すなわち、インデックス生成装置は、ビットマップの0ビット目からの各ビットを順番にハッシュ化ビットマップの0ビット目から設定し、(底−1)ビット目まで設定する。そして、インデックス生成装置は、再度折り返してハッシュ化ビットマップの0ビット目から既にハッシュ化ビットマップに設定された値とOR演算した値を設定する。 As an example, the index generator sets the value of each bit of the bitmap bi1 at the position of the remainder obtained by dividing the position of each bit of the bitmap bi1 by the base 29 with respect to the hashed bitmap h11 of the base 29. The bit value "1" at the position of the 35th bit of the bitmap bi1 is set to the 6th bit of the hashed bitmap h11. The bit value "1" at the position of the 42nd bit of the bitmap bi1 is set to the 13th bit of the hashed bitmap h11. The index generator sets the value of each bit of the bitmap bi1 at the position of the remainder obtained by dividing the position of each bit of the bitmap bi1 by the base 31 for the hashed bitmap h12 of the base 31. The bit value "1" at the position of the 35th bit of the bitmap bi1 is set to the 4th bit of the hashed bitmap h12. The bit value "1" at the position of the 42nd bit of the bitmap bi1 is set to the 11th bit of the hashed bitmap h12. That is, the index generator sets each bit from the 0th bit of the bitmap in order from the 0th bit of the hashed bitmap, and sets up to the (bottom -1) bit. Then, the index generation device wraps around again and sets the value already set in the hashed bitmap and the value calculated by OR from the 0th bit of the hashed bitmap.

より詳細に説明すると、一例として、インデックスにビットマップ50が含まれるものとし、かかるビットマップ50をハッシュ化する場合について説明する。インデックス生成装置は、ビットマップ50から、底29のビットマップ50aと、底31のビットマップ50bを生成する。ビットマップ50aは、ビットマップ50に対して、オフセット29毎に区切りを設定し、設定した区切りを先頭とするフラグ「1」のオフセットを、ビットマップ50aのオフセット0〜28のフラグで表現する。 More specifically, as an example, it is assumed that the index includes the bitmap 50, and a case where the bitmap 50 is hashed will be described. The index generator generates a bitmap 50a at the bottom 29 and a bitmap 50b at the bottom 31 from the bitmap 50. The bitmap 50a sets a delimiter for each offset 29 with respect to the bitmap 50, and expresses the offset of the flag "1" starting from the set delimiter with the flags of the offsets 0 to 28 of the bitmap 50a.

インデックス生成装置は、ビットマップ50のオフセット0〜28までの情報を、ビットマップ50aにコピーする。インデックス生成装置は、ビットマップ50aの29以降のオフセットの情報を下記の様に処理する。 The index generator copies the information from the offsets 0 to 28 of the bitmap 50 to the bitmap 50a. The index generator processes the offset information of the bitmap 50a after 29 as follows.

ビットマップ50のオフセット「35」にフラグ「1」が立っている。オフセット「35」は、オフセット「28+7」であるため、インデックス生成装置は、ビットマップ50aのオフセット「6」に「(1)」を立てる。なお、オフセットの1番目を0としている。ビットマップ50のオフセット「42」にフラグ「1」が立っている。オフセット「42」は、オフセット「28+14」であるため、インデックス生成装置は、ビットマップ50aのオフセット「11」にフラグ「(1)」を立てる。 The flag "1" is set at the offset "35" of the bitmap 50. Since the offset "35" is the offset "28 + 7", the index generator sets "(1)" in the offset "6" of the bitmap 50a. The first offset is 0. The flag "1" is set at the offset "42" of the bitmap 50. Since the offset "42" is the offset "28 + 14", the index generator sets the flag "(1)" in the offset "11" of the bitmap 50a.

ビットマップ50bは、ビットマップ50に対して、オフセット31毎に区切りを設定し、設定した区切りを先頭とするフラグ「1」のオフセットを、ビットマップ50bのオフセット0〜30のフラグで表現する。 The bitmap 50b sets a delimiter for each offset 31 with respect to the bitmap 50, and expresses the offset of the flag "1" starting from the set delimiter with the flags of the offsets 0 to 30 of the bitmap 50b.

ビットマップ50のオフセット「35」にフラグ「1」が立っている。オフセット「35」は、オフセット「30+5」であるため、インデックス生成装置は、ビットマップ50bのオフセット「4」に「(1)」を立てる。なお、オフセットの1番目を0としている。ビットマップ50のオフセット「42」にフラグ「1」が立っている。オフセット「42」は、オフセット「30+12」であるため、インデックス生成装置は、ビットマップ50bのオフセット「12」にフラグ「(1)」を立てる。 The flag "1" is set at the offset "35" of the bitmap 50. Since the offset "35" is the offset "30 + 5", the index generator sets "(1)" in the offset "4" of the bitmap 50b. The first offset is 0. The flag "1" is set at the offset "42" of the bitmap 50. Since the offset "42" is the offset "30 + 12", the index generator sets the flag "(1)" in the offset "12" of the bitmap 50b.

インデックス生成装置は、上記処理を実行することで、ビットマップ50からビットマップ50a、50bを生成する。このビットマップ50a、50bが、ビットマップ50をハッシュ化した結果となる。ここでは、ビットマップ50の長さが0〜43である場合について説明したが、ビットマップ50の長さが43以上になる場合でも、ビットマップ50に設定されたフラグ「1」を、ビットマップ50aおよびビットマップ50bで表現することができる。 The index generator generates bitmaps 50a and 50b from the bitmap 50 by executing the above processing. The bitmaps 50a and 50b are the result of hashing the bitmap 50. Here, the case where the length of the bitmap 50 is 0 to 43 has been described, but even when the length of the bitmap 50 is 43 or more, the flag “1” set in the bitmap 50 is set to the bitmap. It can be represented by 50a and a bitmap 50b.

このようにして、インデックス生成装置は、各単語について、上述した手法により生成されたハッシュ化ビットマップを生成する。そして、転置インデックスDB13は、単語ごとのハッシュ化ビットマップを記憶する。ただし、上述したように、サイズ縮小されたものではなく、通常のサイズのビットマップ型転置インデックスを用いることもできる。また、サイズ縮小の手法は、公知の手法を採用することができる。 In this way, the index generator generates a hashed bitmap generated by the method described above for each word. Then, the inverted index DB 13 stores a hashed bitmap for each word. However, as described above, a bitmap type inverted index of a normal size can be used instead of being reduced in size. Further, as the size reduction method, a known method can be adopted.

図2に戻り、静的辞書14は、出現頻度の高い単語と、当該単語に予め割当てられた圧縮符号との対応付けを記憶するデータベースなどである。動的辞書15は、静的辞書14に登録されていない出現頻度の低い単語であって、符号化対象の文書データに登場した単語と、当該単語に割当てられた圧縮符号との対応付けを記憶するデータベースである。 Returning to FIG. 2, the static dictionary 14 is a database or the like that stores a correspondence between a word having a high frequency of appearance and a compression code assigned in advance to the word. The dynamic dictionary 15 is a word that is not registered in the static dictionary 14 and has a low frequency of appearance, and stores the correspondence between the word appearing in the document data to be encoded and the compression code assigned to the word. It is a database to be used.

図4は、静的辞書14および動的辞書15を説明する図である。図4に示す辞書は、静的辞書14および動的辞書15をあわせた辞書であり、圧縮符号とビットマップ型転置インデックスのY軸は、1対1に対応付けられている。図4に示す横軸の「0*h」から「9*h」までが静的辞書14に対応し、「A*h」から「F*h」までが動的辞書15に対応する。 FIG. 4 is a diagram illustrating a static dictionary 14 and a dynamic dictionary 15. The dictionary shown in FIG. 4 is a dictionary including a static dictionary 14 and a dynamic dictionary 15, and the compression code and the Y-axis of the bitmap type inverted index are associated with each other on a one-to-one basis. The horizontal axis "0 * h" to "9 * h" shown in FIG. 4 corresponds to the static dictionary 14, and "A * h" to "F * h" correspond to the dynamic dictionary 15.

図4の上部の横方向の項目は、最初の1バイト目を0〜Fの16進表記で示しており、「*」は、2バイト目を示している。例えば、「1*h」は、1バイト目が2進数表記で「00000001」であることを示す。左側の縦方向の項目は、2バイト目を0〜Fの16進表記で示しており、「*」は、1バイト目を示している。例えば、「*2h」は、2バイト目が2進数表記で「00000010」であることを示す。 In the horizontal item at the upper part of FIG. 4, the first byte is indicated by the hexadecimal notation of 0 to F, and “*” indicates the second byte. For example, "1 * h" indicates that the first byte is "00000001" in binary notation. In the vertical item on the left side, the second byte is indicated by the hexadecimal notation of 0 to F, and "*" indicates the first byte. For example, "* 2h" indicates that the second byte is "00000010" in binary notation.

「0*h」、「1*h」の符号については、1バイトの符号であり、各階層とも、共通の制御コードが対応付けられている。また、「2*h」〜「3*h」の符号については、1バイトの符号であり、高頻度に出現する単語の中でも特に頻度の高い超高頻度単語(英単語)が予め対応付けられており、「4*h」〜「5*h」の符号については、1バイトの符号であり、高頻度に出現する単語の中でも特に頻度の高い超高頻度単語(日本語)が予め対応付けられている。 The codes of "0 * h" and "1 * h" are 1-byte codes, and common control codes are associated with each layer. Further, the codes of "2 * h" to "3 * h" are 1-byte codes, and among the words that appear frequently, ultra-high frequency words (English words), which are particularly frequent, are associated in advance. The codes "4 * h" to "5 * h" are 1-byte codes, and are associated with ultra-high-frequency words (Japanese), which are particularly frequent among words that appear frequently. Has been done.

また、「6*h」〜「7*h」の符号については、2バイトの符号であり、高頻度に出現する単語(英単語)が予め対応付けられており、「8*h」〜「9*h」の符号については、2バイトの符号であり、高頻度に出現する単語(日本語)が予め対応付けられている。「A*h」〜「F*h」の符号については、2バイトまたは3バイトの符号であり、低頻度単語が出現した際に符号を動的に割り当てる。なお、「E*h」、「F*h」は、符号の不足に対応するため、3バイトの符号としている。 Further, the codes of "6 * h" to "7 * h" are 2-byte codes, and words (English words) that appear frequently are associated in advance, and "8 * h" to "8 * h" to " The code of "9 * h" is a 2-byte code, and a word (Japanese) that appears frequently is associated with the code in advance. The codes of "A * h" to "F * h" are 2-byte or 3-byte codes, and the codes are dynamically assigned when a low-frequency word appears. In addition, "E * h" and "F * h" are 3-byte codes in order to cope with the lack of codes.

制御部20は、情報処理装置10全体を司る処理部であり、例えばプロセッサなどである。制御部20は、取得部21と復元部22を実行する。なお、取得部21と復元部22は、プロセッサが有する電子回路の一例やプロセッサが実行するプロセスの一例である。 The control unit 20 is a processing unit that controls the entire information processing device 10, and is, for example, a processor. The control unit 20 executes the acquisition unit 21 and the restoration unit 22. The acquisition unit 21 and the restoration unit 22 are examples of electronic circuits included in the processor and examples of processes executed by the processor.

取得部21は、インデックス生成装置などの他のコンピュータから、オフセット付きのビットマップ型転置インデックスを取得する処理部である。具体的には、取得部21は、図3で説明した手法で生成された上記ビットマップ型転置インデックスを取得して、転置インデックスDB13に格納する。 The acquisition unit 21 is a processing unit that acquires a bitmap type inverted index with an offset from another computer such as an index generator. Specifically, the acquisition unit 21 acquires the bitmap type inverted index generated by the method described with reference to FIG. 3 and stores it in the inverted index DB 13.

復元部22は、転置処理部23と復元処理部24を有し、転置インデックスDB13に格納されるビットマップ型転置インデックスから、元の文書データの復元を実行する処理部である。具体的には、復元部22によって、ハッシュ化されているビットマップ型転置インデックスを復元した後、転置処理部23と復元処理部24を用いて、元の文書データの復元が実行される。 The restoration unit 22 has a transposition processing unit 23 and a restoration processing unit 24, and is a processing unit that restores the original document data from the bitmap type inverted index stored in the inverted index DB 13. Specifically, the restoration unit 22 restores the hashed bitmap type inverted index, and then the transfer processing unit 23 and the restoration processing unit 24 are used to restore the original document data.

ここで、図5と図6を用いて、ハッシュ化されているビットマップ型転置インデックスの復元について説明する。図5は、ハッシュ化ビットマップ型転置インデックスの展開について説明する図であり、図6は、ハッシュ化ビットマップ型転置インデックスのAND演算について説明する図である。ここでは一例として、ビットマップ50aとビットマップ50bとを基にして、ビットマップ50を復元する処理について説明する。ビットマップ50、50a、50bは、図3で説明したものに対応する。 Here, the restoration of the hashed bitmap type inverted index will be described with reference to FIGS. 5 and 6. FIG. 5 is a diagram for explaining the expansion of the hashed bitmap type inverted index, and FIG. 6 is a diagram for explaining the AND operation of the hashed bitmap type inverted index. Here, as an example, a process of restoring the bitmap 50 based on the bitmap 50a and the bitmap 50b will be described. Bitmaps 50, 50a, 50b correspond to those described in FIG.

図5に示すように、復元部22は、底29のビットマップ50aを基にして、ビットマップ51aを生成する。ビットマップ51aのオフセット0〜28のフラグの情報は、ビットマップ50aのオフセット0〜28のフラグの情報と同様となる。ビットマップ51aのオフセット29以降のフラグの情報は、ビットマップ50aのオフセット0〜28のフラグの情報の繰り返しとなる。 As shown in FIG. 5, the restoration unit 22 generates a bitmap 51a based on the bitmap 50a of the bottom 29. The information of the flags of offsets 0 to 28 of the bitmap 51a is the same as the information of the flags of the offsets 0 to 28 of the bitmap 50a. The information of the flags after the offset 29 of the bitmap 51a is the repetition of the information of the flags of the offsets 0 to 28 of the bitmap 50a.

同様に、復元部22は、底31のビットマップ50bを基にして、ビットマップ51bを生成する。ビットマップ51bのオフセット0〜30のフラグの情報は、ビットマップ50bのオフセット0〜30のフラグの情報と同様となる。ビットマップ51bのオフセット31以降のフラグの情報は、ビットマップ50bのオフセット0〜30のフラグの情報の繰り返しとなる。 Similarly, the restoration unit 22 generates a bitmap 51b based on the bitmap 50b at the bottom 31. The information of the flags of offsets 0 to 30 of the bitmap 51b is the same as the information of the flags of the offsets 0 to 30 of the bitmap 50b. The information of the flags after the offset 31 of the bitmap 51b is the repetition of the information of the flags of the offsets 0 to 30 of the bitmap 50b.

その後、図6に示すように、復元部22は、ビットマップ51aとビットマップ51bとのAND演算を実行することで、ビットマップ50を生成する。図6に示す例では、オフセット「0、5、11、18、25、35、42」において、ビットマップ51aおよびビットマップ51bのフラグが「1」となっている。このため、ビットマップ50のオフセット「0、5、11、18、25、35、42」のフラグが「1」となる。このビットマップ50が、復元されたビットマップとなる。復元部22は、他のビットマップについても同様の処理を繰り返し実行することで、各ビットマップを復元し、インデックスを生成する。 After that, as shown in FIG. 6, the restoration unit 22 generates the bitmap 50 by executing the AND operation between the bitmap 51a and the bitmap 51b. In the example shown in FIG. 6, at the offset “0, 5, 11, 18, 25, 35, 42”, the flags of the bitmap 51a and the bitmap 51b are “1”. Therefore, the flag of the offset "0, 5, 11, 18, 25, 35, 42" of the bitmap 50 becomes "1". This bitmap 50 becomes the restored bitmap. The restoration unit 22 restores each bitmap and generates an index by repeatedly executing the same processing for the other bitmaps.

転置処理部23は、該当の単語の圧縮符号を、ビットマップ型転置インデックスのビットマップをもとに、転置バッファに転置する処理部である。転置処理部23は、動的辞書15で管理される符号の最大バイト数である3バイトで区切った転置バッファをメモリ等に確保し、単語が出現した位置に対応する転置バッファに、該当単語の圧縮符号を格納する。 The transposition processing unit 23 is a processing unit that transposes the compression code of the corresponding word into the transposition buffer based on the bitmap of the bitmap type inverted index. The transfer processing unit 23 secures a transfer buffer divided by 3 bytes, which is the maximum number of bytes of the code managed by the dynamic dictionary 15, in a memory or the like, and sets the transfer buffer corresponding to the position where the word appears in the transfer buffer of the corresponding word. Stores the compression code.

図7は、圧縮符号の転置を説明する図である。図7に示すように、転置処理部23は、圧縮符号「20h」のオフセット(位置)が0と5に「1」が格納されているので、転置バッファの先頭である(0)と6番目である(5)に圧縮符号「20h」を格納する。なお、圧縮符号「20h」が格納された領域内で、使用されていない領域はNULLとなる。同様に、転置処理部23は、圧縮符号「A000h」のオフセット(位置)が1と6に「1」が格納されているので、転置バッファの2番目である(1)と7番目である(6)に圧縮符号「A000h」を格納する。なお、圧縮符号「A000h」が格納された領域内で、使用されていない領域はNULLとなる。 FIG. 7 is a diagram illustrating the transposition of the compression code. As shown in FIG. 7, in the transposition processing unit 23, since the offset (position) of the compression code “20h” is 0 and “1” is stored in 5, it is the head (0) and the sixth of the transposition buffer. The compression code "20h" is stored in (5). In the area where the compression code "20h" is stored, the unused area is NULL. Similarly, the transposition processing unit 23 is the second (1) and seventh of the transposition buffer because the offset (position) of the compression code “A000h” is stored in 1 and 6. The compression code "A000h" is stored in 6). In the area where the compression code "A000h" is stored, the unused area is NULL.

このようにして、転置処理部23は、各圧縮符号のビットマップ型転置インデックスに基づいて、3バイト区切りの転置バッファの先頭から順に、文書データ内の出現順で該当単語の圧縮符号を格納することができる。そして、転置処理部23は、圧縮符号が格納された転置バッファを復元処理部24に出力する。 In this way, the transposition processing unit 23 stores the compression codes of the corresponding words in the order of appearance in the document data in order from the beginning of the transpose buffer separated by 3 bytes based on the bitmap type inverted index of each compression code. be able to. Then, the transposition processing unit 23 outputs the transposition buffer in which the compression code is stored to the restoration processing unit 24.

復元処理部24は、圧縮符号が格納された転置バッファから、元の文書データを復元する処理部である。具体的には、復元処理部24は、転置バッファ内のNULLを削除して、圧縮符号だけを抽出した圧縮データを生成する。その後、復元処理部24は、各圧縮符号を、静的辞書14または動的辞書15を用いて元の単語に復元することで、文書データの復元を実行する。なお、圧縮データにNULLを挿入して、転置バッファの状態を復元することもできる。 The restoration processing unit 24 is a processing unit that restores the original document data from the transposition buffer in which the compression code is stored. Specifically, the restoration processing unit 24 deletes the NULL in the transposition buffer and generates compressed data obtained by extracting only the compression code. After that, the restoration processing unit 24 restores the document data by restoring each compression code to the original word using the static dictionary 14 or the dynamic dictionary 15. It is also possible to insert NULL into the compressed data to restore the state of the transposed buffer.

図8は、圧縮データの生成および元の文書データの復元を説明する図である。図8に示すように、復元処理部24は、転置バッファの先頭である(0)のバッファから順に(n)のバッファまで、「NULL」を削除して、圧縮符号「20h」、「A000h」、「「B000h」・・・を順に抽出する。そして、復元処理部24は、抽出した圧縮符号を連結させた圧縮データ「20h,A000h,B000h,・・・」を生成する。 FIG. 8 is a diagram illustrating the generation of compressed data and the restoration of the original document data. As shown in FIG. 8, the restoration processing unit 24 deletes "Null" from the buffer (0) at the beginning of the transposition buffer to the buffer (n) in order, and compresses the codes "20h" and "A000h". , "" B000h "... are extracted in order. Then, the restoration processing unit 24 generates compressed data "20h, A000h, B000h, ..." By concatenating the extracted compression codes.

その後、復元処理部24は、静的辞書14および動的辞書15を参照して、圧縮データ「20h,A000h,B000h,・・・」内の各圧縮符号に対応する単語を特定し、圧縮データを単語に変換した「単語1、単語2、単語3・・・」を生成する。そして、復元処理部24は、変換して得られた単語1、単語2、単語3・・を連結させて、元の文書データを復元する。 After that, the restoration processing unit 24 refers to the static dictionary 14 and the dynamic dictionary 15 to identify the word corresponding to each compression code in the compressed data "20h, A000h, B000h, ...", And the compressed data. Is converted into a word to generate "word 1, word 2, word 3 ...". Then, the restoration processing unit 24 restores the original document data by concatenating the word 1, the word 2, the word 3, and the result obtained by the conversion.

[処理の流れ]
図9は、処理の流れを示すフローチャートである。ここでは、静的辞書と動的辞書は、すでに記憶されているものとする。
[Processing flow]
FIG. 9 is a flowchart showing the flow of processing. Here, it is assumed that the static dictionary and the dynamic dictionary are already stored.

図9に示すように、情報処理装置10の取得部21は、処理開始時が指示されると(S101:Yes)、単語ごとのビットマップ型転置インデックスを取得する(S102)。ここで、復元部22は、各ビットマップ型転置インデックスがハッシュ化されてサイズ縮小されている場合は、元のサイズに復元する。 As shown in FIG. 9, when the acquisition unit 21 of the information processing apparatus 10 is instructed to start processing (S101: Yes), the acquisition unit 21 of the information processing apparatus 10 acquires a bitmap type inverted index for each word (S102). Here, if each bitmap type inverted index is hashed and reduced in size, the restoration unit 22 restores the original size.

続いて、転置処理部23は、圧縮符号の転置用バッファを確保する(S103)。そして、復元処理部24は、取得されたビットマップ型転置インデックスを1つ選択し(S104)、当該ビットマップ型転置インデックスに格納されている情報にしたがって、転置用バッファに圧縮符号を格納する(S105)。 Subsequently, the transposition processing unit 23 secures a transfer buffer for the compression code (S103). Then, the restoration processing unit 24 selects one acquired bitmap type inverted index (S104), and stores the compression code in the transfer buffer according to the information stored in the bitmap type inverted index (S104). S105).

ここで、転置処理部23は、未処理のビットマップ型転置インデックスが存在する場合(S106:Yes)、S104に戻って以降の処理を繰り返す。一方で、未処理のビットマップ型転置インデックスが存在しない場合(S106:No)、復元処理部24は、転置用バッファのNULLを削除して、圧縮データを生成する(S107)。 Here, when the unprocessed bitmap type inverted index exists (S106: Yes), the transposition processing unit 23 returns to S104 and repeats the subsequent processing. On the other hand, when there is no unprocessed bitmap type inverted index (S106: No), the restoration processing unit 24 deletes the NULL of the transposition buffer and generates compressed data (S107).

そして、復元処理部24は、各辞書を用いて、圧縮データ内の各圧縮符号を単語に復元し(S108)、復元された各単語を用いて、元の文書データを復元する(S109)。 Then, the restoration processing unit 24 restores each compression code in the compressed data into a word using each dictionary (S108), and restores the original document data using each restored word (S109).

[効果]
上述したように、情報処理装置10は、オフセット付きのビットマップ型転置インデックスをもとに、圧縮符号の転置と置換、およびテキストを復元する。具体的には、情報処理装置10は、オフセット付きのビットマップ型転置インデックスのビット列の1ビットと圧縮符号のバイト列の固定3バイトを対応付け、全単語の圧縮符号の転置を繰り返す。続いて、情報処理装置10は、各圧縮符号のNULLバイトをサプレスする。その後、情報処理装置10は、固定3バイトの圧縮符号のバイト列をもとに、静的辞書と動的辞書を用いて、テキスト(文書データ)を復元する。したがって、情報処理装置10は、オフセット付きのビットマップ型転置インデックスをもとに、圧縮符号を生成し、テキストを復元することができる。
[effect]
As described above, the information processing apparatus 10 transposes and replaces the compression code and restores the text based on the offset bitmap type inverted index. Specifically, the information processing apparatus 10 associates 1 bit of the bit string of the bit map type inverted index with an offset with 3 fixed bytes of the byte string of the compression code, and repeats the transfer of the compression code of all words. Subsequently, the information processing apparatus 10 suppresses the NULL bytes of each compression code. After that, the information processing apparatus 10 restores the text (document data) using a static dictionary and a dynamic dictionary based on the byte string of the fixed 3-byte compression code. Therefore, the information processing apparatus 10 can generate a compression code and restore the text based on the offset bitmap type inverted index.

さて、これまで本発明の実施例について説明したが、本発明は上述した実施例以外にも、種々の異なる形態にて実施されてよいものである。そこで、以下に異なる実施例を説明する。 By the way, although the examples of the present invention have been described so far, the present invention may be carried out in various different forms other than the above-mentioned examples. Therefore, different embodiments will be described below.

[システム]
上記文書中や図面中で示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。
[system]
Information including processing procedures, control procedures, specific names, various data and parameters shown in the above documents and drawings can be arbitrarily changed unless otherwise specified.

また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られない。つまり、その全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。さらに、各装置にて行なわれる各処理機能は、その全部または任意の一部が、CPUおよび当該CPUにて解析実行されるプログラムにて実現され、あるいは、ワイヤードロジックによるハードウェアとして実現され得る。 Further, each component of each of the illustrated devices is a functional concept, and does not necessarily have to be physically configured as shown in the figure. That is, the specific form of distribution / integration of each device is not limited to the one shown in the figure. That is, all or a part thereof can be functionally or physically distributed / integrated in any unit according to various loads, usage conditions, and the like. Further, each processing function performed by each device may be realized by a CPU and a program analyzed and executed by the CPU, or may be realized as hardware by wired logic.

[ハードウェア構成]
図10は、実施例1の情報処理装置10のハードウェア構成を示す図である。図10の例に示すように、コンピュータ400は、各種演算処理を実行するCPU401と、ユーザからのデータ入力を受け付ける入力装置402と、モニタ403とを有する。また、コンピュータ400は、記憶媒体からプログラム等を読み取る媒体読取装置404と、他の装置と接続するためのインターフェース装置405と、他の装置と無線により接続するための無線通信装置406とを有する。また、コンピュータ400は、各種情報を一時記憶するRAM407と、ハードディスク装置408とを有する。また、各装置401〜408は、バス409に接続される。
[Hardware configuration]
FIG. 10 is a diagram showing a hardware configuration of the information processing apparatus 10 of the first embodiment. As shown in the example of FIG. 10, the computer 400 has a CPU 401 that executes various arithmetic processes, an input device 402 that receives data input from a user, and a monitor 403. Further, the computer 400 has a medium reading device 404 for reading a program or the like from a storage medium, an interface device 405 for connecting to another device, and a wireless communication device 406 for wirelessly connecting to the other device. Further, the computer 400 has a RAM 407 that temporarily stores various information and a hard disk device 408. Further, each of the devices 401 to 408 is connected to the bus 409.

ハードディスク装置408には、例えば図2に示した取得部21と復元部22の各処理部と同様の機能を有する情報処理プログラムが記憶される。また、ハードディスク装置408には、情報処理プログラムを実現するための各種データが記憶される。 The hard disk device 408 stores, for example, an information processing program having the same functions as the processing units of the acquisition unit 21 and the restoration unit 22 shown in FIG. Further, various data for realizing the information processing program are stored in the hard disk device 408.

CPU401は、ハードディスク装置408に記憶された各プログラムを読み出して、RAM407に展開して実行することで各種の処理を行う。これらのプログラムは、コンピュータ400を、例えば図2に示した取得部21と復元部22として機能させることができる。 The CPU 401 reads each program stored in the hard disk device 408, expands it in the RAM 407, and executes it to perform various processes. These programs allow the computer 400 to function, for example, as the acquisition unit 21 and the restoration unit 22 shown in FIG.

なお、上記の情報処理プログラムは、必ずしもハードディスク装置408に記憶されている必要はない。例えば、コンピュータ400が読み取り可能な記憶媒体に記憶されたプログラムを、コンピュータ400が読み出して実行するようにしてもよい。コンピュータ400が読み取り可能な記憶媒体は、例えば、CD−ROMやDVDディスク、USB(Universal Serial Bus)メモリ等の可搬型記録媒体、フラッシュメモリ等の半導体メモリ、ハードディスクドライブ等が対応する。また、公衆回線、インターネット、LAN(Local Area Network)等に接続された装置にこのプログラムを記憶させておき、コンピュータ400がこれらからプログラムを読み出して実行するようにしてもよい。 The above information processing program does not necessarily have to be stored in the hard disk device 408. For example, the computer 400 may read and execute a program stored in a storage medium that can be read by the computer 400. The storage medium that can be read by the computer 400 corresponds to, for example, a CD-ROM, a DVD disk, a portable recording medium such as a USB (Universal Serial Bus) memory, a semiconductor memory such as a flash memory, a hard disk drive, or the like. Further, the program may be stored in a device connected to a public line, the Internet, a LAN (Local Area Network), or the like, and the computer 400 may read the program from these and execute the program.

図11は、コンピュータ400で動作するプログラムの構成例を示す図である。コンピュータ400において、図10に示すハードウェア群26(401〜409)の制御を行なうOS(オペレーティング・システム)27が動作する。OS27に従った手順でCPU401が動作して、ハードウェア群26の制御・管理が行なわれることにより、アプリケーションプログラム29やミドルウェア28に従った処理がハードウェア群26で実行される。さらに、コンピュータ400において、ミドルウェア28またはアプリケーションプログラム29が、RAM407に読み出されてCPU401により実行される。 FIG. 11 is a diagram showing a configuration example of a program running on the computer 400. In the computer 400, an OS (operating system) 27 that controls the hardware group 26 (401-409) shown in FIG. 10 operates. The CPU 401 operates according to the procedure according to the OS 27, and the hardware group 26 is controlled and managed, so that the processing according to the application program 29 and the middleware 28 is executed by the hardware group 26. Further, in the computer 400, the middleware 28 or the application program 29 is read into the RAM 407 and executed by the CPU 401.

CPU401により検索機能が呼び出された場合、ミドルウェア28またはアプリケーションプログラム29の少なくとも一部に基づく処理を行なうことで、(それらの処理をOS27に基づいてハードウェア群26を制御して)、取得部21と復元部22の機能が実現される。取得部21と復元部22の各機能は、それぞれアプリケーションプログラム29自体に含まれてもよいし、アプリケーションプログラム29に従って呼び出されることで実行されるミドルウェア28の一部であってもよい。 When the search function is called by the CPU 401, processing based on at least a part of the middleware 28 or the application program 29 is performed (these processing is controlled by the hardware group 26 based on the OS 27), and the acquisition unit 21 And the function of the restoration unit 22 is realized. Each function of the acquisition unit 21 and the restoration unit 22 may be included in the application program 29 itself, or may be a part of the middleware 28 executed by being called according to the application program 29.

図12は、実施形態のシステムにおける装置の構成例を示す図である。図12のシステムは、コンピュータ400a、コンピュータ400b、基地局30およびネットワーク40を含む。コンピュータ400aは、無線または有線の少なくとも一方により、コンピュータ400bと接続されたネットワーク40に接続している。 FIG. 12 is a diagram showing a configuration example of the device in the system of the embodiment. The system of FIG. 12 includes a computer 400a, a computer 400b, a base station 30, and a network 40. The computer 400a is connected to the network 40 connected to the computer 400b by at least one of wireless and wired.

10 情報処理装置
11 通信部
12 記憶部
13 転置インデックスDB
14 静的辞書
15 動的辞書
20 制御部
21 取得部
22 復元部
23 転置処理部
24 復元処理部
10 Information processing device 11 Communication unit 12 Storage unit 13 Inverted index DB
14 Static dictionary 15 Dynamic dictionary 20 Control unit 21 Acquisition unit 22 Restoration unit 23 Transpose processing unit 24 Restoration processing unit

Claims (5)

コンピュータに、
テキストデータに含まれる形態素ごとに、前記テキストデータにおける前記形態素の存否をインデックス化したビットマップ型転置インデックスから異なるハッシュ値を基に生成された、前記ビットマップ型転置インデックスのサイズを縮小した複数のハッシュ化ビットマップを用いて、前記ビットマップ型転置インデックスを復元し、
復元された前記形態素ごとの各ビットマップ型転置インデックスを参照し、
前記テキストデータにおける位置の順で、前記テキストデータに含まれる各形態素に、圧縮符号の最大バイト数で区切られた固定長領域を有する転置バッファの各固定長領域を割り当て、各固定長領域について、前記固定長領域の先頭から前記形態素を圧縮した圧縮符号を格納するとともに、前記固定長領域の未使用領域にNULLを格納する、
処理を実行させることを特徴とするデータ生成プログラム。
On the computer
A plurality of reduced sizes of the bitmap-type inverted index generated based on different hash values from the bitmap-type inverted index that indexes the existence or nonexistence of the form element in the text data for each morphology element included in the text data. Using the hashed bitmap, the bitmap type inverted index is restored.
Refer to each bitmap type inverted index for each restored morpheme,
In the order of position in the text data, each fixed-length region of the transfer buffer having a fixed-length region separated by the maximum number of bytes of the compression code is assigned to each morphology element included in the text data, and each fixed-length region is assigned. A compression code obtained by compressing the morphology element from the beginning of the fixed-length region is stored, and NUML is stored in an unused region of the fixed-length region.
A data generation program characterized by executing processing.
前記各ビットマップ型転置インデックスは、前記テキストデータに含まれる形態素それぞれを符号化した圧縮符号と、前記テキストデータにおける当該形態素を対応づけたインデックスであり、前記テキストデータにおける位置の順で、前記各ビットマップ型転置インデックスで対応づけられた前記圧縮符号を配置することを特徴とする請求項1に記載のデータ生成プログラム。 Each of the bitmap type inverted indexes is an index in which a compression code for encoding each of the morphological elements contained in the text data is associated with the morphological element in the text data, and each of the above is in the order of the position in the text data. The data generation program according to claim 1, wherein the compression code associated with the bitmap type inverted index is arranged. 前記テキストデータを復元する場合には、前記転置バッファ内のNULLを削除して各圧縮符号を抽出した圧縮データを生成し、前記圧縮データに含まれる前記各圧縮符号を、前記形態素と前記圧縮符号とを対応付けた辞書に基づき、圧縮前の形態素に復元することで、前記テキストデータを復元する処理を、前記コンピュータに実行させることを特徴とする請求項1または2に記載のデータ生成プログラム。 When restoring the text data, the NUML in the translocation buffer is deleted to generate compressed data obtained by extracting each compression code, and each compression code included in the compression data is used as the form element and the compression code. The data generation program according to claim 1 or 2, wherein the computer is made to execute a process of restoring the text data by restoring the morphology before compression based on a dictionary associated with the above. コンピュータが、
テキストデータに含まれる形態素ごとに、前記テキストデータにおける前記形態素の存否をインデックス化したビットマップ型転置インデックスから異なるハッシュ値を基に生成された、前記ビットマップ型転置インデックスのサイズを縮小した複数のハッシュ化ビットマップを用いて、前記ビットマップ型転置インデックスを復元し、
復元された前記形態素ごとの各ビットマップ型転置インデックスを参照し、
前記テキストデータにおける位置の順で、前記テキストデータに含まれる各形態素に、圧縮符号の最大バイト数で区切られた固定長領域を有する転置バッファの各固定長領域を割り当て、各固定長領域について、前記固定長領域の先頭から前記形態素を圧縮した圧縮符号を格納するとともに、前記固定長領域の未使用領域にNULLを格納する、
処理を実行することを特徴とするデータ生成方法。
The computer
A plurality of reduced sizes of the bitmap-type inverted index generated based on different hash values from the bitmap-type inverted index that indexes the existence or nonexistence of the form element in the text data for each morphology element included in the text data. Using the hashed bitmap, the bitmap type inverted index is restored.
Refer to each bitmap type inverted index for each restored morpheme,
In the order of position in the text data, each fixed-length region of the transfer buffer having a fixed-length region separated by the maximum number of bytes of the compression code is assigned to each morphology element included in the text data, and each fixed-length region is assigned. A compression code obtained by compressing the morphology element from the beginning of the fixed-length region is stored, and NUML is stored in an unused region of the fixed-length region.
A data generation method characterized by performing processing.
テキストデータに含まれる形態素ごとに、前記テキストデータにおける前記形態素の存否をインデックス化したビットマップ型転置インデックスから異なるハッシュ値を基に生成された、前記ビットマップ型転置インデックスのサイズを縮小した複数のハッシュ化ビットマップを用いて、前記ビットマップ型転置インデックスを復元し、
復元された前記形態素ごとの各ビットマップ型転置インデックスを参照し、
前記テキストデータにおける位置の順で、前記テキストデータに含まれる各形態素に、圧縮符号の最大バイト数で区切られた固定長領域を有する転置バッファの各固定長領域を割り当て、各固定長領域について、前記固定長領域の先頭から前記形態素を圧縮した圧縮符号を格納するとともに、前記固定長領域の未使用領域にNULLを格納する、
制御部を有することを特徴とする情報処理装置。
A plurality of reduced sizes of the bitmap-type inverted index generated based on different hash values from the bitmap-type inverted index that indexes the existence or nonexistence of the form element in the text data for each morphology element included in the text data. Using the hashed bitmap, the bitmap type inverted index is restored.
Refer to each bitmap type inverted index for each restored morpheme,
In the order of position in the text data, each fixed-length region of the transfer buffer having a fixed-length region separated by the maximum number of bytes of the compression code is assigned to each morphology element included in the text data, and each fixed-length region is assigned. A compression code obtained by compressing the morphology element from the beginning of the fixed-length region is stored, and NUML is stored in an unused region of the fixed-length region.
An information processing device characterized by having a control unit.
JP2017211127A 2017-10-31 2017-10-31 Data generation program, data generation method and information processing equipment Active JP6984321B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2017211127A JP6984321B2 (en) 2017-10-31 2017-10-31 Data generation program, data generation method and information processing equipment
US16/171,099 US10915559B2 (en) 2017-10-31 2018-10-25 Data generation method, information processing device, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017211127A JP6984321B2 (en) 2017-10-31 2017-10-31 Data generation program, data generation method and information processing equipment

Publications (2)

Publication Number Publication Date
JP2019083477A JP2019083477A (en) 2019-05-30
JP6984321B2 true JP6984321B2 (en) 2021-12-17

Family

ID=66243925

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017211127A Active JP6984321B2 (en) 2017-10-31 2017-10-31 Data generation program, data generation method and information processing equipment

Country Status (2)

Country Link
US (1) US10915559B2 (en)
JP (1) JP6984321B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2019459693B2 (en) * 2019-08-01 2023-04-13 Fujitsu Limited Control method, control program, and information processing device

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0546358A (en) * 1991-07-15 1993-02-26 Sharp Corp Compressing method for text data
JP2729424B2 (en) * 1991-10-31 1998-03-18 シャープ株式会社 Text compression device and automatic text compression dictionary construction device
JP2693914B2 (en) * 1994-08-30 1997-12-24 北海道日本電気ソフトウェア株式会社 Search system
JPH08180066A (en) * 1994-12-26 1996-07-12 Toshiba Corp Index preparation method, document retrieval method and document retrieval device
TW543311B (en) * 2000-11-16 2003-07-21 Ericsson Telefon Ab L M Static information knowledge used with binary compression methods
JP3740376B2 (en) * 2001-03-05 2006-02-01 日本電信電話株式会社 Computer screen image encoding method, execution program thereof, and recording medium recording the execution program
JP2005251115A (en) * 2004-03-08 2005-09-15 Shogakukan Inc System and method of associative retrieval
JP2010211688A (en) * 2009-03-12 2010-09-24 Canon Inc Document editing apparatus, data processing method and program
JP5601116B2 (en) * 2010-09-17 2014-10-08 カシオ計算機株式会社 Transposed index generation method and generation apparatus for N-gram search, search method and search apparatus using the inverted index, and computer program
KR101636902B1 (en) * 2012-08-23 2016-07-06 에스케이텔레콤 주식회사 Method for detecting a grammatical error and apparatus thereof
JP6476647B2 (en) 2014-08-20 2019-03-06 富士通株式会社 Compression program, compression apparatus, compression method, decompression program, decompression apparatus, and decompression method
JP6679874B2 (en) * 2015-10-09 2020-04-15 富士通株式会社 Encoding program, encoding device, encoding method, decoding program, decoding device, and decoding method
JP6720664B2 (en) * 2016-04-18 2020-07-08 富士通株式会社 Index generation program, index generation device, index generation method, search program, search device, and search method

Also Published As

Publication number Publication date
JP2019083477A (en) 2019-05-30
US20190130022A1 (en) 2019-05-02
US10915559B2 (en) 2021-02-09

Similar Documents

Publication Publication Date Title
JP6319740B2 (en) Method for speeding up data compression, computer for speeding up data compression, and computer program therefor
US9425821B2 (en) Converting device and converting method
JP3778087B2 (en) Data encoding apparatus and data decoding apparatus
US9509333B2 (en) Compression device, compression method, decompression device, decompression method, information processing system, and recording medium
US9973206B2 (en) Computer-readable recording medium, encoding device, encoding method, decoding device, and decoding method
JP2016139309A (en) Character data conversion program, character data conversion device and character data conversion method
JP2018521537A (en) Improved compressed caching in virtual memory systems
JP6984321B2 (en) Data generation program, data generation method and information processing equipment
US9965448B2 (en) Encoding method and information processing device
JP6645013B2 (en) Encoding program, encoding method, encoding device, and decompression method
US20150248432A1 (en) Method and system
JP7006462B2 (en) Data generation program, data generation method and information processing equipment
US9479195B2 (en) Non-transitory computer-readable recording medium, compression method, decompression method, compression device, and decompression device
JP3267504B2 (en) Data compression device and data decompression device
JP6907948B2 (en) File generation program, file generation method and file generation device
JP6931442B2 (en) Coding program, index generator, search program, coding device, index generator, search device, coding method, index generation method and search method
JP2016170750A (en) Data management program, information processor and data management method
JP6135788B2 (en) Compression program, compression method, compression device, decompression program, decompression method, decompression device, and data transfer system
JP2013214159A (en) Log management method, log management system, and information processing apparatus
JP2016134808A (en) Data compression program, data decompression program, data compression device, and data decompression device
JP6476618B2 (en) Decompression method, decompression program and decompression device
JP6512294B2 (en) Compression program, compression method and compression apparatus
US20160210304A1 (en) Computer-readable recording medium, information processing apparatus, and conversion process method
US11593311B2 (en) Compression system with longest match processing for generating compressed data
Ong et al. Compressing Chinese text files using an adaptive Huffman coding scheme and a static dictionary of character pairs

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200807

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210728

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210810

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211008

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: 20211026

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20211108

R150 Certificate of patent or registration of utility model

Ref document number: 6984321

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150