JPWO2011105463A1 - Data compression apparatus, data compression method, and program storage medium - Google Patents
Data compression apparatus, data compression method, and program storage medium Download PDFInfo
- Publication number
- JPWO2011105463A1 JPWO2011105463A1 JP2012501836A JP2012501836A JPWO2011105463A1 JP WO2011105463 A1 JPWO2011105463 A1 JP WO2011105463A1 JP 2012501836 A JP2012501836 A JP 2012501836A JP 2012501836 A JP2012501836 A JP 2012501836A JP WO2011105463 A1 JPWO2011105463 A1 JP WO2011105463A1
- Authority
- JP
- Japan
- Prior art keywords
- data
- compression
- dictionary
- unit
- compressed
- 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.)
- Withdrawn
Links
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
- H03M7/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
- H03M7/40—Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
- H03M7/42—Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code using table look-up for the coding or decoding process, e.g. using read-only memory
Abstract
効率の良いデータ圧縮率を維持できるデータ圧縮装置等を提供する。データ圧縮装置600は、圧縮部601と、監視部602と、タイミング制御部603と、辞書生成部604とを有している。圧縮部601は、圧縮対象のデータを、予め与えられている辞書データに基づいて圧縮する機能を備えている。監視部602は、圧縮部601が前記データを圧縮する場合における前記辞書データの使用頻度を算出する機能を備えている。タイミング制御部603は、算出した前記使用頻度が予め設定された閾値よりも低下した場合に、前記辞書データを更新する指示を出す機能を備えている。辞書生成部604は、その指示を受けて、圧縮部102が圧縮したデータを利用して前記辞書データを新規に生成する機能を備えている。Provided is a data compression device or the like that can maintain an efficient data compression rate. The data compression apparatus 600 includes a compression unit 601, a monitoring unit 602, a timing control unit 603, and a dictionary generation unit 604. The compression unit 601 has a function of compressing data to be compressed based on dictionary data given in advance. The monitoring unit 602 has a function of calculating the use frequency of the dictionary data when the compression unit 601 compresses the data. The timing control unit 603 has a function of issuing an instruction to update the dictionary data when the calculated use frequency falls below a preset threshold value. In response to the instruction, the dictionary generation unit 604 has a function of newly generating the dictionary data using the data compressed by the compression unit 102.
Description
本発明は、データ圧縮装置、データ圧縮方法およびプログラム記憶媒体に関する。 The present invention relates to a data compression apparatus, a data compression method, and a program storage medium.
辞書式圧縮法を利用してデータを圧縮するデータ圧縮装置が、特開2001−044850号公報(特許文献1)に示されている。このデータ圧縮装置は、データを圧縮する際に、データ圧縮に利用する最適な辞書が生成されるまで辞書の更新を繰り返す。そして、このデータ圧縮装置は、最適な辞書が生成された段階でその辞書を用いてデータを圧縮する。
図24は、そのデータ圧縮装置の構成例を示すブロック図である。データ圧縮装置12は、辞書生成更新部13と、辞書保持部15と、辞書出力部16と、データ圧縮部17と、圧縮データ出力部18とを備えている。辞書生成更新部13は、圧縮する対象である全データ列11に基づいて辞書14を生成する機能と辞書14を更新する機能を有する。辞書保持部15は、辞書14を保持する機能を有する。辞書出力部16は、辞書14を出力する機能を有する。データ圧縮部17は、辞書14に基づいて全データ列11を圧縮する機能を有する。圧縮データ出力部18は、データ圧縮部17による圧縮データ19を出力する機能を有する。ここでの辞書14とは、全データ列11と登録番号との組合せを示すデータである。データ圧縮装置12は、その辞書14に基づいて全データ列11を登録番号に置き換えることでデータを圧縮する。
データ圧縮装置12は、全データ列11を登録番号に置き換える際に、頻出回数の多いデータを優先的に辞書14の登録番号に置き換えることにより、データ圧縮率を高めることができる。ただし、このようにして生成された辞書14は登録数が非常に多くなる場合がある。このため、データ圧縮装置12は、辞書14の中から使用頻度の低い登録データを削除することによって辞書の更新を行う。そして、データ圧縮装置12は、辞書14の登録数が所定数になった段階で辞書14が最適になったと判断する。データ圧縮装置12は、このようにして得られた辞書14に基づき全データ列11を圧縮することによって、データ圧縮率を高めている。Japanese Patent Laid-Open No. 2001-044850 (Patent Document 1) discloses a data compression apparatus that compresses data using a lexicographic compression method. When compressing data, this data compression apparatus repeats updating the dictionary until an optimal dictionary used for data compression is generated. And this data compression apparatus compresses data using the dictionary in the stage where the optimal dictionary was produced | generated.
FIG. 24 is a block diagram showing a configuration example of the data compression apparatus. The data compression apparatus 12 includes a dictionary generation /
The data compression device 12 can increase the data compression rate by preferentially replacing data with a large number of frequent occurrences with the registration number of the
しかしながら、データ圧縮装置12は、データが連続して入力している状態では辞書14の更新を行わない。このため、次のような場合に、データ圧縮装置12によるデータ圧縮率が低下する虞がある。例えば、データ圧縮装置12に、「A」、「B」、「C」を多く含む文字列のデータが入力している状態から、「A」、「B」、「C」を殆ど含まない文字列のデータが入力する状態に傾向が変わる場合がある。このような場合には、データ圧縮装置12は、傾向が変わる前は「A」、「B」、「C」を多く含んだ辞書14を用いてデータ圧縮を行う。しかし、入力データの傾向が変わって入力データに「A」、「B」、「C」が殆ど含まれなくなると、データ圧縮装置12が辞書14を使用する頻度が低下する。これにより、データ圧縮装置12によるデータ圧縮率が低下する。
本発明は上記課題を解決するためになされている。すなわち、本発明の主な目的は、効率の良いデータ圧縮を維持できるデータ圧縮装置、データ圧縮方法およびプログラム記憶媒体を提供することである。However, the data compression device 12 does not update the
The present invention has been made to solve the above problems. That is, a main object of the present invention is to provide a data compression apparatus, a data compression method, and a program storage medium that can maintain efficient data compression.
本発明のデータ圧縮装置は、
圧縮対象のデータを、予め与えられている辞書データに基づいて圧縮する圧縮手段と、
前記圧縮手段が前記データを圧縮する場合における前記辞書データの使用頻度を算出する監視手段と、
算出した前記使用頻度が予め設定された閾値よりも低下した場合に、前記辞書データを更新する指示を出すタイミング制御手段と、
前記指示を受けて、前記圧縮手段が圧縮したデータに基づいて前記辞書データを新規に生成する辞書生成手段と
を有する。
本発明のデータ圧縮方法は、
圧縮対象のデータを、予め与えられている辞書データに基づいて圧縮し、
前記データを圧縮する場合における前記辞書データの使用頻度を算出し、
算出した前記使用頻度が予め設定された閾値よりも低下した場合に、前記辞書データを更新する指示を出し、
前記指示を受けて、圧縮した前記データに基づいて前記辞書データを新規に生成する。
本発明のプログラム記憶媒体は、
圧縮対象のデータを、予め与えられている辞書データに基づいて圧縮する処理と、
前記データを圧縮する場合における前記辞書データの使用頻度を算出する処理と、
算出した前記使用頻度が予め設定された閾値よりも低下した場合に、前記辞書データを更新する指示を出す処理と、
前記指示を受けて、圧縮した前記データに基づいて前記辞書データを新規に生成する処理とをデータ圧縮装置に実行させるコンピュータプログラムを記憶している。
なお、本発明の上記した主な目的は、上記構成のデータ圧縮装置に対応するデータ圧縮方法によっても達成される。さらに、本発明の上記した主な目的は、上記データ圧縮装置およびデータ圧縮方法をコンピュータによって実現するコンピュータプログラムが格納されているプログラム記憶媒体によっても達成される。The data compression apparatus of the present invention
Compression means for compressing data to be compressed based on dictionary data given in advance;
Monitoring means for calculating the frequency of use of the dictionary data when the compression means compresses the data;
Timing control means for issuing an instruction to update the dictionary data when the calculated use frequency falls below a preset threshold;
In response to the instruction, the apparatus has dictionary generation means for newly generating the dictionary data based on the data compressed by the compression means.
The data compression method of the present invention includes:
Compress data to be compressed based on dictionary data given in advance,
Calculating the frequency of use of the dictionary data when compressing the data;
When the calculated usage frequency falls below a preset threshold value, an instruction to update the dictionary data is issued,
In response to the instruction, the dictionary data is newly generated based on the compressed data.
The program storage medium of the present invention includes:
A process of compressing data to be compressed based on dictionary data given in advance;
A process of calculating the use frequency of the dictionary data when compressing the data;
A process of issuing an instruction to update the dictionary data when the calculated use frequency falls below a preset threshold;
In response to the instruction, a computer program for causing the data compression apparatus to execute processing for newly generating the dictionary data based on the compressed data is stored.
The main object of the present invention is also achieved by a data compression method corresponding to the data compression apparatus having the above-described configuration. Furthermore, the main object of the present invention is also achieved by a program storage medium storing a computer program for realizing the data compression apparatus and the data compression method by a computer.
本発明によれば、効率の良いデータ圧縮を維持できる。 According to the present invention, efficient data compression can be maintained.
図1は、本発明に係る第1実施形態のデータ圧縮装置の構成を示すブロック図である。
図2は、辞書式圧縮法によるデータ圧縮の一例を説明する図である。
図3は、図2中のデータD001において、隣り合う2文字の出現回数をカウントした結果を表す図である。
図4は、図2中のデータD002において、隣り合う2文字の出現回数をカウントした結果を表す図である。
図5は、図2中のデータD003において、隣り合う2文字の出現回数をカウントした結果を表す図である。
図6は、辞書データの一例を示す図である。
図7Aは、圧縮に使用した辞書データとその使用回数とが対になったデータのイメージを表した図である。
図7Bは、圧縮したデータの総容量の一例を示す図である。
図8は、辞書データの使用頻度を示すデータの一例を表す図である。
図9Aは、圧縮データの一例を示す図である。
図9Bは、辞書データの一例を示す図である。
図10は、辞書式圧縮法で圧縮されたデータを展開する手法の一例を説明する図である。
図11は、図10に引き続き、辞書式圧縮法で圧縮されたデータを展開する手法の一例を説明する図である。
図12は、さらに引き続いて、辞書式圧縮法で圧縮されたデータを展開する手法の一例を説明する図である。
図13は、本発明に係る第1実施形態のデータ圧縮装置の動作例を示すフローチャートである。
図14は、本発明に係る第2実施形態のデータ圧縮装置の構成を示すブロック図である。
図15は、本発明に係る第2実施形態のデータ圧縮装置の動作例を示すフローチャートである。
図16は、本発明に係る第2実施形態のデータ圧縮装置を構成する調整部の具体的な動作例を示すフローチャートである。
図17は、本発明に係る第3実施形態のデータ圧縮装置の構成を示すブロック図である。
図18は、本発明に係る第3実施形態のデータ圧縮装置の動作例を示すフローチャートである。
図19は、本発明に係る第4実施形態のデータ圧縮装置の構成を示すブロック図である。
図20は、本発明に係る第4実施形態のデータ圧縮装置の動作例を示すフローチャートである。
図21は、本発明に係る第5実施形態のデータ圧縮装置の構成を示すブロック図である。
図22は、本発明に係る第5実施形態のデータ圧縮装置の動作例を示すフローチャートである。
図23は、その他の実施形態を説明する図である。
図24は、特許文献1に記載されているデータ圧縮装置の構成を示すブロック図である。FIG. 1 is a block diagram showing the configuration of the data compression apparatus according to the first embodiment of the present invention.
FIG. 2 is a diagram for explaining an example of data compression by the lexicographic compression method.
FIG. 3 is a diagram illustrating a result of counting the number of appearances of two adjacent characters in the data D001 in FIG.
FIG. 4 is a diagram showing the result of counting the number of appearances of two adjacent characters in the data D002 in FIG.
FIG. 5 is a diagram illustrating a result of counting the number of appearances of two adjacent characters in the data D003 in FIG.
FIG. 6 is a diagram illustrating an example of dictionary data.
FIG. 7A is a diagram showing an image of data in which dictionary data used for compression and the number of uses thereof are paired.
FIG. 7B is a diagram illustrating an example of the total capacity of compressed data.
FIG. 8 is a diagram illustrating an example of data indicating the usage frequency of dictionary data.
FIG. 9A is a diagram illustrating an example of compressed data.
FIG. 9B is a diagram illustrating an example of dictionary data.
FIG. 10 is a diagram for explaining an example of a technique for expanding data compressed by the lexicographic compression method.
FIG. 11 is a diagram for explaining an example of a technique for expanding data compressed by the lexicographic compression method following FIG.
FIG. 12 is a diagram for explaining an example of a technique for further expanding data compressed by the lexicographic compression method.
FIG. 13 is a flowchart showing an operation example of the data compression apparatus according to the first embodiment of the present invention.
FIG. 14 is a block diagram showing the configuration of the data compression apparatus according to the second embodiment of the present invention.
FIG. 15 is a flowchart showing an operation example of the data compression apparatus according to the second embodiment of the present invention.
FIG. 16 is a flowchart showing a specific operation example of the adjustment unit constituting the data compression apparatus according to the second embodiment of the present invention.
FIG. 17 is a block diagram showing the configuration of the data compression apparatus according to the third embodiment of the present invention.
FIG. 18 is a flowchart showing an operation example of the data compression apparatus according to the third embodiment of the present invention.
FIG. 19 is a block diagram showing the configuration of the data compression apparatus according to the fourth embodiment of the present invention.
FIG. 20 is a flowchart showing an operation example of the data compression apparatus according to the fourth embodiment of the present invention.
FIG. 21 is a block diagram showing the configuration of the data compression apparatus according to the fifth embodiment of the present invention.
FIG. 22 is a flowchart showing an operation example of the data compression apparatus according to the fifth embodiment of the present invention.
FIG. 23 is a diagram for explaining another embodiment.
FIG. 24 is a block diagram showing the configuration of the data compression device described in
以下、本発明に係る実施形態を図面を参照して説明する。
(第1実施形態)
図1は、本発明に係る第1実施形態のデータ圧縮装置(データ圧縮システム)の構成を示すブロック図である。このデータ圧縮装置100は、制御装置101と、第1記憶部103と、第2記憶部104と、第3記憶部108とを有する。第1記憶部103と、第2記憶部104と、第3記憶部108とは、記憶装置により構成される。その記憶装置は、データを格納(記憶)する記憶媒体(例えば、ハードディスク装置や、RAM(random access memory)など)を有する。この第1実施形態では、第1記憶部103は、後述する圧縮データを記憶する圧縮データ記憶部(圧縮データ記憶手段)として機能する。第2記憶部104は、後述する辞書データを記憶する辞書データ記憶部(辞書データ記憶手段)として機能する。第3記憶部108は、後述する展開データを記憶する展開データ記憶部(展開データ記憶手段)として機能する。
制御装置101は、例えばCPU(Central Processing Unit)を含むコンピュータである。当該制御装置101は、コンピュータが読み取り可能な記憶媒体に格納されている各種コンピュータプログラムを適宜に実行することによって、データ圧縮装置100の全体的な動作を司る。
この第1実施形態では、制御装置101は、データ発生部110により発生するデータを辞書式圧縮法により圧縮する機能を有する。さらに、制御装置101は、データを圧縮する際に参照する辞書データを生成する機能と辞書データを更新する機能を有する。すなわち、制御装置101は、コンピュータプログラムに従って動作することによって、次のような機能ブロックを実現する。その機能ブロックとは、圧縮部102と、監視部(辞書使用頻度監視手段)105と、タイミング制御部(辞書更新タイミング手段)106と、展開部(圧縮データ展開手段)107と、辞書生成部(辞書構築手段)109とを含む。なお、データ発生部110が発生するデータは、どのような種類のデータであってもよいが、ここでは、説明を分かり易くするために、文字列データとする。
圧縮部(圧縮手段)102は、第2記憶部104に記憶されている後述するような辞書データに基づいて、データを辞書式圧縮法により圧縮する機能(データ圧縮機能)を有する。その圧縮するデータとは、データ発生部110から入力するデータや、第3記憶部108に記憶されている後述するような展開データである。なお、辞書式圧縮法には、LZW(Lempel−Ziv and Welch)やLZ77(Lempel−Ziv 77)などの様々な種類がある。圧縮部102が採用する辞書式圧縮法の種類は、特に限定しなくてよい。ただし、第1実施形態では、説明を分かり易くするために、圧縮部102は、BPE(Byte Pair Encoding)法と呼ばれる辞書式圧縮法によりデータを圧縮することとする。
そのBPE法は、出現頻度が高い2バイトデータを1バイトデータに置き換えていくことを繰り返して対象データを圧縮するアルゴリズムである。図2は、BPE法によるデータ圧縮の一例を説明する図である。圧縮部102は、BPE法により次のようにデータを圧縮する。
例えば、第2記憶部104は、図6に示すような複数の辞書データを保持している。辞書データは、置き換え前の文字列と、当該文字列に対応する置き換え後の文字との関係を表すデータである。図6に示す辞書データの一つは、置き換え前の文字列「AB」と、当該文字列に対応する置き換え後の文字「G」との関係を表すデータである。図6に示す別の辞書データの一つは、置き換え前の文字列「DE」と、当該文字列に対応する置き換え後の文字「H」との関係を表すデータである。図6に示すさらに別の辞書データの一つは、置き換え前の文字列「GC」と、当該文字列に対応する置き換え後の文字「I」との関係を表すデータである。このような辞書データは、辞書生成部109によって後述のように生成される。
圧縮部102は、例えば、図2に示すような文字列であるデータD001が入力すると、第2記憶部104の辞書データを参照して、データD002のように圧縮する。すなわち、圧縮部102は、辞書データに基づき、データD001における隣り合う2文字「AB」を1文字「G」に置き換える。これにより、圧縮部102は、データD001を圧縮したデータD002を作成する。さらに、圧縮部102は、辞書データに基づき、データD002における隣り合う2文字「DE」を1文字「H」に置き換える。これにより、圧縮部102は、データD002を圧縮したデータD003を作成する。さらに、圧縮部102は、辞書データに基づき、データD003における隣り合う2文字「GC」を1文字「I」に置き換える。これにより、圧縮部102は、データD003を圧縮したデータD004を作成する。さらに、圧縮部102は、データD004に関しても上記同様に圧縮しようとする。しかし、データD004は、辞書データに対応する文字列「AB」、「DE」、「GC」の何れも有していない。このため、圧縮部102は、データD004を圧縮できない。このことから、圧縮部102は、データを圧縮する処理(データ圧縮処理)を終了する。
圧縮部102は、上記したようなデータ圧縮機能に加えて、さらに、最終的に得られたデータD004を第1記憶部103に書き込む機能を有する。なお、データ圧縮装置100が稼動を開始した以後の稼働初期では、第2記憶部104には辞書データが記憶されていない。このため、圧縮部102は圧縮動作を行わず、データ発生部110から入力したデータをそのまま第1記憶部103に書き込む。
さらに、圧縮部102は、後述するように、第2記憶部104に格納されている辞書データが新たな辞書データに置換された場合に、第3記憶部108に格納されている全ての展開データを、新規の辞書データに基づいて圧縮する機能を有する。さらに、圧縮部102は、第3記憶部108に記憶されている全ての展開データを圧縮し終えると、第3記憶部108に格納されている全ての展開データを削除する機能を有している。
さらに、圧縮部102は、データ圧縮処理における辞書データの使用状況に関するデータ(使用状況データ)と、そのデータ圧縮処理で処理した圧縮前のデータの総容量を示すデータ(総容量データ)を作成する機能を有する。さらに、圧縮部102は、それらデータを一時保持した後、当該データを監視部105に出力する機能を有する。
図7Aは、使用状況データの一例を示す。図7Bは、総容量データの一例を示す。図7Aの例では、使用状況データは、辞書データとその使用回数が対となったデータである。図7Aの使用状況データによれば、「AB」を「G」に置き換えるという辞書データは10回使用されている。また、「DE」を「H」に置き換えるという辞書データは20回使用されている。さらに、「GC」を「I」に置き換えるという辞書データは5回使用されている。
また、図7Bによれば、総容量データは153000Byteである。なお、圧縮部102から監視部105にデータを出力するタイミングは、圧縮部102がデータ発生部110から入力したデータを圧縮する毎であってもよいし、予め設定した時間間隔毎でもよい。
また、データ圧縮装置100が稼動を開始した以後の稼働初期では、圧縮部102は、前記の如くデータ圧縮処理を行わないため、データ発生部110から入力したデータの総容量だけを監視部105に出力する。
辞書生成部(辞書生成手段)109は、辞書データを生成する機能と、生成した辞書データを第2記憶部104に格納する機能とを有する。当該辞書生成部109が辞書データを生成する手順は、圧縮部102が採用している辞書式圧縮法の種類に応じて設定される。すなわち、この第1実施形態で採用している辞書式圧縮法の種類は、BPE法である。このため、辞書式生成部109は、BPE法に応じた手順によって、辞書データを生成する。
例えば、辞書式生成部109は、後述する展開部107から動作を開始する指示(動作指示)を受けた場合に、第3記憶部108に格納されている全てのデータに基づいて、辞書データを次のように生成する。なお、データ圧縮装置100が稼動を開始した以後の稼働初期では、後述するように、データ発生部110から入力したデータが、そのまま、圧縮部102と第1記憶部103と展開部107を介して、第3記憶部108に格納されている。
すなわち、辞書式生成部109は、まず、図2に示すような文字列である入力データD001中の隣り合う2文字(文字列)の出現回数をカウントする。データD001の場合には、隣り合う2文字として、最初に「AB」が現れる。これにより、辞書式生成部109は、「AB」のカウント値を“1”とする。次の隣り合う2文字は、「BD」である。これにより、辞書式生成部109は、「BD」のカウント値を“1”とする。次の隣り合う2文字は、「DA」である。これにより、辞書式生成部109は、「DA」のカウント値を“1”とする。さらに次の隣り合う2文字は、「AB」である。当該「AB」は既に現れているから、辞書式生成部109は、その「AB」のカウント値を“1”増加して“2”とする。以降、辞書式生成部109は、同様の処理(カウント処理)を繰り返す。
図3に示される表は、データD001中における隣り合う2文字の出現回数(カウント値)を示す表である。その出現回数(カウント値)は、辞書式生成部109が上記のような処理を行うことによって得た値である。図3に示す表に基づくと、データD001において、出現回数の最も多い隣り合う2文字は、「AB」であり、その「AB」の出現回数(カウント値)は4回である。
次に、辞書式生成部109は、上記のようなカウント処理により得られた結果に基づいて、出現回数の最も多い隣り合う2文字「AB」に対応する別の1文字(例えば「G」)を置換文字として設定する。その置換文字(置き換える文字)は、入力データD001に含まれていない文字である。それというのは、入力データD001に含まれている文字を置換文字として設定してしまうと、圧縮後のデータを元通りに復元できないからである。なお、置換文字は、数字や記号であってもよい。
そして、辞書式生成部109は、隣り合う2文字「AB」と、置換文字「G」とが対応しているデータを、辞書データとして、作成(生成)する。
さらに、辞書式生成部109は、入力データD001において、「AB」を置換文字「G」に置き換える。これにより、辞書式生成部109は、データD002を作成する。
次に、辞書式生成部109は、データD002に対しても、入力データD001と同様に、隣り合う2文字の出現回数をカウントする。これにより、辞書式生成部109は、図4に示されるような情報を得ることができる。図4に示す表は、データD002中における隣り合う2文字の出現回数(カウント値)を示す表である。図4に示す表に基づくと、データD002において、出現回数の最も多い隣り合う2文字は、「DE」であり、その「DE」の出現回数(カウント値)は3回である。このことから、辞書式生成部109は、前記同様に、出現回数の最も多い隣り合う2文字「DE」を置き換える置換文字(「H」)を設定する。これにより、辞書式生成部109は、隣り合う2文字「DE」と置換文字「H」が対応しているデータを、辞書データとして、作成する。また、辞書式生成部109は、データD002中の「DE」を置換文字「H」に置き換えることによって、データD003を作成する。
さらに、辞書式生成部109は、データD003に対しても、入力データD001等と同様に、隣り合う2文字(文字列)の出現回数をカウントする。図5に示す表は、データD003中における隣り合う2文字の出現回数(カウント値)を示す表である。図5に示す表に基づくと、データD003において、出現回数の最も多い隣り合う2文字は、「GC」であり、その「GC」の出現回数(カウント値)は2回である。このことから、辞書式生成部109は、前記同様に、出現回数の最も多い隣り合う2文字「GC」を置き換える置換文字(「I」)を設定する。これにより、辞書式生成部109は、隣り合う2文字「GC」と置換文字「I」が対応しているデータを、辞書データとして、作成する。また、辞書式生成部109は、データD003中の「GC」を置換文字「I」に置き換えることによって、データD004を作成する。
さらに、辞書式生成部109は、データD004に関しても、上記同様の処理を行う。すなわち、辞書式生成部109は、データD004に対しても、隣り合う2文字の出現回数をカウントする。この処理により、辞書式生成部109は、データD004において、隣り合う2文字の何れも1回しか出現しないことを検知する。これにより、辞書式生成部109は、上記したような隣り合う2文字の出現回数をカウントする処理、および、置換文字を設定する処理、つまり、辞書データを生成する処理を終了する。そして、辞書式生成部109は、生成した新規の辞書データ(図6参照)を第2記憶部104に格納する。なお、第2記憶部104に既に辞書データが格納されている場合には、辞書式生成部109は、その古い辞書データを削除してから、新規の辞書データを第2記憶部104に格納する。
さらに、辞書式生成部109は、新規の辞書データを第2記憶部104に格納し終えた以降に、新規の辞書データを第2記憶部104に格納したことを圧縮部102に通知する機能を有する。
監視部(監視手段)105は、圧縮部102から受け取った使用状況データおよび総容量データに基づき、辞書データの使用頻度を計算する機能を有する。例えば、監視部105は、次式(1)を利用して、辞書データの使用頻度を計算する。
使用頻度=(辞書データの使用回数)÷(データの総容量)・・・・・(1)
監視部105は、さらに、算出した使用頻度を示すデータ(使用頻度データ)を、タイミング制御部106に出力する機能を有する。図8は、監視部105がタイミング制御部106に出力する使用頻度データの一例を示す。図8に示されている使用頻度データは、辞書データと使用頻度との関係を示すデータである。
なお、データ圧縮装置100が稼動を開始した以後の稼働初期では、前述したように、圧縮部102が監視部105に出力するデータは、総容量データだけである。このため、監視部105は、辞書データの使用頻度の計算を行わず、総容量データをそのままタイミング制御部106に出力する。
タイミング制御部(タイミング制御手段)106は、監視部105から受け取る使用頻度データに基づいて、辞書データの使用頻度が低下していることを検知した場合に、展開部107に、動作を開始する指示を出力する機能を有している。具体的には、タイミング制御部106は、受け取った使用頻度データの使用頻度を合計した値(合計値)が、予め設定された閾値よりも小さくなった場合に、辞書データの使用頻度が低下したと判断し、展開部107に動作開始を指示する。なお、ここで用いる閾値を、ユーザーが適宜に設定できるようにしてもよい。
なお、データ圧縮装置100が稼動を開始した以後の稼働初期では、タイミング制御部106は、監視部105から、使用頻度データではなく、総容量データを受け取る。このような場合には、タイミング制御部106は、例えば、監視部105から受け取る総容量データの容量値が、予め設定された値以上であることを検知した場合に、展開部107に動作開始を指示する。あるいは、タイミング制御部106は、監視部105から総容量データを受け取った回数が予め設定した回数に達した場合に、展開部107に動作開始を指示してもよい。あるいは、タイミング制御部106は、監視部105から総容量データを最初に受け取ってから、予め設定された時間を経過した後に、展開部107に動作開始を指示してもよい。
展開部(展開手段)107は、タイミング制御部106から、動作を開始する指示を受け取った場合に、第1記憶部103に記憶されている圧縮データを展開する機能を有している。なお、展開部107が圧縮データを展開する手法は、圧縮部102が採用している圧縮法に応じた手法である。第1実施形態では、BPE法を用いているので、展開部107は、第2記憶部104に記憶されている辞書データに基づいて、次のように、データを展開する。
例えば、ここでは、展開部107は、図9Aに示すような圧縮データT012を、図9Bに示す辞書データを参照しながら展開(データ展開)するとする。なお、図9Aの圧縮データT012は図2のデータD004に対応する。また、図9Bの辞書データは図6の辞書データに対応する。図10〜図12は、データ展開の流れを説明する図である。
展開部107は、まず、適当な大きさのバッファ111(図10参照)を用意する。そして、展開部107は、そのバッファ111の先頭に圧縮データT012の先頭のデータ「G」を、図10に示すB001のように入力する。このバッファ111の先頭データ「G」は、辞書データを参照すると、「AB」に対応する。このため、展開部107は、バッファ111における「G」を、図10に示すB002のように、「AB」に置き換える。次に、バッファ111の先頭にあるデータ「A」に対応する2文字(文字列)は、辞書データに登録されていない。このような場合には、展開部107は、そのデータ「A」を、バッファ111から出力データとして取り出す。これにより、バッファ111の先頭のデータは図10に示すB003のように、「B」となる。また、出力データは、図10に示すT101のように「A」となる。
バッファ111の先頭にあるデータ「B」に対応する2文字(文字列)は、辞書データに登録されていない。このことから、展開部107は、上記同様に、バッファ111からデータ「B」を出力データとして取り出す。これにより、出力データは、図11に示すT102のように「AB」となる。
上記「B」の取り出しにより、バッファ111は空になる。これにより、展開部107は、圧縮データT012の2番目のデータ「D」を、図11に示すB004のようにバッファ111に入力する。そのデータ「D」に対応する2文字(文字列)は、辞書データに登録されていない。このことから、上記同様に、展開部107は、バッファ111からデータ「D」を出力データとして取り出す。これにより、出力データは、図11に示すT103のように「ABD」となる。
上記「D」の取り出しにより、バッファ111は、再び空になる。これにより、展開部107は、圧縮データT012の3番目のデータ「I」を、図11に示すB005のようにバッファ111に入力する。そのデータ「I」は、辞書データを参照すると「GC」に対応する。このため、展開部107は、バッファ111における「I」を、図11に示すB006のように、「GC」に置き換える。
さらに、展開部107は、上記同様に、バッファ111の先頭のデータ「G」を、辞書データに基づいて、図12に示すB007のように、データ「AB」に置き換える。これにより、バッファ111の先頭のデータは、データ「A」となる。このデータ「A」に対応する2文字(文字列)は、辞書データに登録されていない。このため、展開部107は、上記同様に、バッファ111からデータ「A」を出力データとして取り出す。これにより、出力データは、図12に示すT104のように「ABDA」となる。
データ「A」の取り出しにより、バッファ111の先頭のデータは図12に示すB008のように、データ「B」となる。このデータ「B」に対応する2文字(文字列)は、辞書データに登録されていない。このため、展開部107は、上記同様に、そのデータ「B」を、バッファ111から出力データとして取り出す。これにより、出力データは、図12に示すT105のように「ABDAB」となる。
データ「B」の取り出しにより、バッファ111の先頭のデータは図12に示すB009のようにデータ「C」となる。展開部107は、上記のような処理(動作)を繰り返して、データT012を展開する。つまり、バッファ111から取り出されたデータ(出力データ)が展開データである。
展開部107は、上記のように展開されたデータ(展開データ)を第3記憶部108に格納する機能を有する。さらに、展開部107は、第1記憶部103に記憶されている全ての圧縮データを展開し終えた以降に、第1記憶部103に記憶されている全ての圧縮データを削除する機能を備えている。さらに、展開部107は、第1記憶部103における圧縮データを削除し終え、かつ、展開データを第3記憶部108に格納し終えた以降に、辞書生成部109に、動作を開始する指示を出力する機能を有している。これにより、辞書生成部109は、前記の如く、その指示を受けて、第3記憶部108に記憶されている展開データを利用して、新規の辞書データを生成する。
なお、データ圧縮装置100が稼動を開始した以後の稼働初期において、前記の如く、第2記憶部104は辞書データを保持していない。また、辞書データが第2記憶部104に格納されなければ、圧縮部102は、データを圧縮する動作(処理)を行わない。この場合、第1記憶部103に記憶されているデータは、圧縮されていないデータ(非圧縮データ)である。さらに、展開部107は、辞書データが第2記憶部104に格納されなければ、データを展開することができない。このため、展開部107は、第1記憶部103に格納されている非圧縮データをそのまま第3記憶部108に移す機能を備えている。
この第1実施形態では、辞書生成部109が辞書データを生成する動作を開始したときに第3記憶部108に記憶されているデータは、データ圧縮装置100が稼働を開始した以後の稼働初期、あるいは、前回辞書データが生成された以降に記憶されたデータである。辞書生成部109は、そのようなデータを用いて、辞書データを生成するので、辞書データを生成した時点において、最もデータ圧縮率を高くできる辞書データを生成できる。
なお、実際は辞書データを生成する処理には時間がかかる。このため、辞書データを生成している間にもデータ発生部110からデータが入力する場合がある。この場合に、その入力したデータを、第2記憶部104に記憶されている古い辞書データに基づいて、圧縮部102が圧縮すると、次のような不都合が生じる。つまり、新規の辞書データを生成している間に古い辞書データに基づいて圧縮した圧縮データと、新規の辞書データを生成した後に当該新規の辞書データに基づいて圧縮した圧縮データとが整合しない。そこで、第1実施形態では、辞書データを生成している間には、圧縮部102は、データを圧縮しない構成となっている。具体的には、圧縮部102はバッファ(図示せず)を有する。また、圧縮部102は、辞書生成部109が動作している期間中には、データ発生部110から入力するデータを上記のバッファに蓄積しておく。そして、前記の如く、辞書生成部109が、生成した新規の辞書データを第2記憶部104に格納した以降に、圧縮部102はバッファに蓄積されているデータを、新たな辞書データを参照しながら圧縮する。
以下に、第1実施形態のデータ圧縮装置100の動作例(データ圧縮方法)を、図13のフローチャートを参照して説明する。図13のフローチャートは、データ圧縮装置100における制御装置(CPU)101が実行するコンピュータプログラムの処理手順を示す。そのコンピュータプログラムは、データ圧縮装置100が有するメモリやハードディスク等の記憶装置の記憶媒体(例えば、不揮発性の記憶媒体)に格納されている。また、当該コンピュータプログラムは、例えば、コンパクトディスク(CD)やメモリカード等の可搬タイプの記憶媒体に格納された後に、当該可搬タイプの記憶媒体からデータ圧縮装置100の記憶装置の記憶媒体に格納される場合がある。
まず、データ発生部110からデータが入力すると(ステップS010)、圧縮部102は、第2記憶部104に記憶されている辞書データに基づいて、入力したデータを圧縮する(ステップS020)。また、圧縮部102は、圧縮後のデータである圧縮データを第1記憶部103に格納する。続いて、監視部105は、圧縮部102から出力される使用状況データ(圧縮に使用した辞書データとその使用回数を示すデータ)、及び、総容量データ(データ発生部110から圧縮部102に入力したデータの総容量を示すデータ)に基づき、辞書使用頻度を計算する(ステップS030)。そして、監視部105は、その計算結果をタイミング制御部106に出力する。
次に、タイミング制御部106は、監視部105から入力した使用頻度を合計した値(合計値)が、設定された閾値以下に低下したか否かを判定する(ステップS040)。タイミング制御部106は、上記合計値が閾値以下でない場合には(ステップS040におけるNO)、何もしない。そして、データ圧縮装置100はステップS020以降の動作を繰り返す。一方、タイミング制御部106は、上記合計値が閾値以下である場合には(ステップS040におけるYES)、展開部107に動作開始を指示する。
これにより、展開部107は、第1記憶部103に記憶されている圧縮データを、第2記憶部104に記憶されている辞書データを参照しながら展開し、展開後のデータである展開データを第3記憶部108に格納する(ステップS050)。さらに続いて、展開部107は、第1記憶部103に記憶されている圧縮データを削除すると共に、辞書生成部109に動作開始を指示する。
これにより、辞書生成部109は、第3記憶部108に記憶されている展開データを、所定の種類の辞書式圧縮法(第1実施形態では、BPE法)に従って辞書データを生成する。そして、辞書生成部109は、その生成した新規の辞書データを第2記憶部104に格納(更新)する(ステップS060)。つまり、辞書生成部109は、新規の辞書データを生成する。そして、辞書生成部109は、第2記憶部104にそれまで記憶されていた古い辞書データを削除し、当該第2記憶部104に新規に生成した辞書データを格納する。また、辞書生成部109は、第2記憶部104に新規の辞書データを格納(更新)した後に、圧縮部102に向けて、展開データを圧縮する指示を出す。
これにより、圧縮部102は、第3記憶部108に記憶されている展開データを、第2記憶部104に記憶された新規の辞書データを参照しながら圧縮する(ステップS070)。そして、圧縮部102は、圧縮後のデータである圧縮データを第1記憶部103に格納する。その後、データ圧縮装置100は、前記ステップS020以降の動作を繰り返す。
なお、データ圧縮装置100が稼働初期(すなわち、第2記憶部104に辞書データが記憶されていない状態)である場合には、データ圧縮装置100は、次のように動作する。
例えば、圧縮部102は、データ発生部110からデータが入力すると、そのデータをそのまま第1記憶部103に格納すると共に、そのデータの総容量を示すデータ(総容量データ)を監視部105に出力する。監視部105は、その総容量データをそのまま、タイミング制御部106に出力する。タイミング制御部106は、データ発生部110から入力した総容量、あるいは、総容量データが入力した回数、あるいは、最初に総容量データが入力してからの経過時間等に基づいたタイミングで、展開部107に動作開始を指示する。これにより、展開部107は、第1記憶部103に記憶されているデータをそのまま第3記憶部108に格納する。そして、辞書生成部109が、第3記憶部108に格納されているデータを利用して辞書データを生成し、生成した新規の辞書データを第2記憶部104に格納する。その後、辞書生成部109は、圧縮部102に動作開始を指示する。これにより、圧縮部102は、第3記憶部108に格納されているデータを圧縮し、圧縮後のデータ(圧縮データ)を第1記憶部103に格納する。このような動作により、辞書データが生成され第2記憶部104に格納された以降には、データ圧縮装置100は、図13のフローチャートに示すような動作を繰り返す。
以上のように、この第1実施形態によれば、データ圧縮装置100は、監視部105と、タイミング制御部106を有している。その監視部105は、データ発生部110から入力したデータを圧縮部102が圧縮する場合に、第2記憶部104に格納されている辞書データを圧縮部102がどれくらい使用しているかを監視する。そして、タイミング制御部106は、監視部105の監視結果に基づいて、辞書データの使用頻度が低下してきた(換言すれば、第2記憶部104に格納されている辞書データの有効度が下がってきた)場合に、辞書生成部109に、新たな辞書データを生成する指示を出す。この指示を受けて辞書生成部109が生成する新規の辞書データは、第3記憶部108に蓄積されている全ての展開データに基づいたデータである。このため、新規の辞書データは、当該辞書データを生成した時点において最も使用頻度の高い(つまり、圧縮効果の高い)辞書データとなる。
上記のように、この第1実施形態のデータ圧縮装置100は、辞書データの使用頻度(有効度)が低下した場合に、有効度を高めた辞書データを生成でき、圧縮に使用する辞書データをその新規の辞書データに更新できる。これにより、データ発生部110から入力するデータの傾向が変化した場合に、データ圧縮装置100は、傾向が変化した以降のデータに基づいて新規の辞書データを生成し、当該新規の辞書データ基づいてデータを圧縮できる。このため、データ圧縮装置100は、データ発生部110から入力するデータの傾向が変化する場合にも、そのデータを常に効率良く圧縮できる。換言すれば、データ圧縮装置100は、効率の良い圧縮率を維持できる。
(第2実施形態)
以下に、本発明に係る第2実施形態を、図面を参照して説明する。
図14は、第2実施形態のデータ圧縮装置の構成を示すブロック図である。なお、この第2実施形態の説明において、第1実施形態と同様な構成部分には同一符号を付し、その重複説明を省略する。
第2実施形態のデータ圧縮装置(データ圧縮システム)200は、第1実施形態のデータ圧縮装置100の構成に加えて、さらに、リソース監視部(リソース監視手段)201と調整部(パラメータ調整手段)202を有している。また、データ圧縮装置200は、第1実施形態で示したタイミング制御部106に代えて、タイミング制御部(辞書更新タイミング制御手段)203を有している。
前述した第1実施形態のデータ圧縮装置100は、辞書データの使用頻度が低下した場合に辞書データを更新することによって、効率良い圧縮率を維持できる。これにより、データ圧縮装置100は、メモリやディスク等の記憶媒体(例えば、第3記憶部108等を構成している記憶媒体など)の使用量を抑えることができる。一方で、辞書データを更新(生成)する動作は、データ圧縮装置100の負荷が大きくなるので、頻繁に辞書データを更新することは望ましくない。このことから、メモリやディスクの容量に余裕がある場合には、圧縮率を高くすることよりも、データ圧縮装置100の負荷を下げることを優先した方が良い場合もある。
このことを考慮して、第2実施形態のデータ圧縮装置200は、前述したように、リソース監視部201と調整部202を有している。
リソース監視部201は、リソース(例えば、第3記憶部108等を構成する記憶媒体)の空き容量を監視(検知)し、監視結果を調整部202に出力する機能を有している。リソース監視部201が監視結果を調整部202に出力するタイミングは、例えば、予め定めた時間間隔毎である。
調整部(調整手段)202は、リソース監視部201から受け取った監視結果に基づき、タイミング制御部203で用いる閾値を調整する機能を有している。つまり、前記監視結果が、リソースの空き容量に余裕があることを示していれば、辞書データの有効度(使用頻度)が低くても直ぐにリソースを圧迫することはない。このことから、調整部202は、辞書データの更新頻度が低くなるように閾値を小さな値に調整する(設定する)。逆に、前記監視結果が、リソースの空き容量に余裕がないことを示していれば、辞書データの有効度が低くなると直ぐにリソースを圧迫してしまう。このことから、調整部202は、辞書データの更新頻度が高くなるように閾値を大きな値に調整する(設定する)。
より具体的には、例えば、調整部202は、リソースの空き容量(残り容量)が80%以上である場合には、閾値を「0.5」に調整する(設定する)。また、調整部202は、リソースの空き容量が80%未満、50%以上である場合には、閾値を「0.7」に調整する。さらに、調整部202は、リソースの空き容量が50%未満である場合には、閾値を「1.0」とする。このように、調整部202は、リソースの空き容量に応じて、閾値を段階的に設定してもよい。あるいは、調整部202は、リソースの空き容量に応じて、閾値を連続的に設定してもよい。なお、調整部202が閾値を設定する手法は、リソースの空き容量に応じて閾値を設定する手法であれば、どのような手法を採用してもよい。
タイミング制御部203は、上記のように設定される閾値を利用して、第1実施形態におけるタイミング制御部106と同様に、辞書データを更新するタイミングを決定する機能を有している。このタイミング制御部203は、調整部202により設定される閾値を利用する以外は、タイミング制御部106と同様の機能を有する。
この第2実施形態のデータ圧縮装置200は、上記のように、リソースの空き容量に応じて辞書データの更新タイミングを変更できる。これにより、リソースに余裕がある場合には、データ圧縮装置200は、辞書データを更新する回数(辞書更新回数)を減らすことができるため、当該装置の負荷を下げることができる。これに対して、リソースに余裕がない場合には、データ圧縮装置200は、辞書更新回数を増やすことができるため、リソースの使用量(消費)を抑えることができる。
次に、リソース監視部201と調整部202の動作例を、図15及び図16を参照して説明する。図15は、リソース監視部201と調整部202の動作例を示すフローチャートである。図16は、調整部202のさらに具体的な動作例を示すフローチャートである。なお、図15及び図16のフローチャートに示される動作は、図13のフローチャートに示される動作とは非同期に実行される。
図15と図16のフローチャートは、図13のフローチャートと同様に、データ圧縮装置200における制御装置(CPU)101が実行するコンピュータプログラムの処理手順を示す。そのコンピュータプログラムは、前記同様に、データ圧縮装置200が有するメモリやハードディスク等の記憶装置の記憶媒体(例えば、不揮発性の記憶媒体)に格納されている。また、当該コンピュータプログラムは、例えば、コンパクトディスク(CD)やメモリカード等の可搬タイプの記憶媒体に格納された後に、当該可搬タイプの記憶媒体からデータ圧縮装置200の記憶装置の記憶媒体に格納される場合がある。
リソース監視部201は、例えば、予め設定された時間間隔毎に、データ圧縮装置200が有するコンピュータのメモリやディスク等のリソースの空き容量を監視し、その監視結果を調整部202に出力する(図15のステップS110)。続いて、調整部202は、その監視結果に基づいて、リソースの空き容量が大きい場合には、タイミング制御部203が利用する閾値を小さな値に設定する。反対に、調整部202は、リソースの空き容量が小さい場合には、上記閾値を大きな値に設定する(ステップS120)。
ここで、上記閾値を設定する動作例を図16を参照して説明する。なお、図16に示すステップS110の動作は、図15に示すステップS110の動作と同様とする。
例えば、調整部202は、リソース監視部201から受け取った監視結果に基づいて、リソースの空き容量が80%以上であるか否かを判定する(ステップS121)。リソースの空き容量が80%以上である場合は、調整部202は、リソースの空き容量に余裕があると判断し、タイミング制御部203で利用する閾値を「0.5」に設定する(ステップS123)。
調整部202は、ステップS121において、リソースの空き容量が80%以上でないと判定した場合には、リソースの空き容量が50%以上であるか否かを判定する(ステップS122)。リソースの空き容量が50%以上である場合には、調整部202は、前記閾値を「0.7」に設定する(ステップS124)。
調整部202は、ステップS122において、リソースの空き容量が50%以上でないと判定した場合には、リソースの空き容量に余裕がないと判断し、前記閾値を「1.0」に設定する(ステップS125)。このように、第2実施形態では、調整部202は、リソースの空き容量に応じて前記閾値を調整する(設定する)。
なお、図16に示すフローチャート(動作例)は、前記閾値を調整する手法の一例を示しているだけであり、前記閾値を調整する手法は、上記した手法に限定されない。
例えば、閾値を調整する段階は、80%以上、80%未満50%以上、50%未満の3段階でなく、もっと多くの段階であってもよい。また、調整される閾値は、「0.5」、「0.7」、「1.0」に限定されない。
(第3実施形態)
以下に、本発明に係る第3実施形態を、図面を参照して説明する。
図17は、第3実施形態におけるデータ圧縮装置の構成を示すブロック図である。なお、第3実施形態の説明において、第1実施形態と同様な構成部分には同一符号を付し、その重複説明を省略する。
第3実施形態のデータ圧縮装置(データ圧縮システム)300は、第1実施形態のデータ圧縮装置100の構成に加えて、さらに、コスト見積もり部(辞書構築コスト見積もり手段)301と圧縮率見積り部(圧縮率見積もり手段)302を有している。また、当該データ圧縮装置300は、第1実施形態のデータ圧縮装置100におけるタイミング制御部106に代えて、後述するようなタイミング制御部(辞書更新タイミング制御手段)303を有している。
第2実施形態でも述べたように、第1実施形態のデータ圧縮装置100は、辞書データの使用頻度が低下した場合に辞書データを更新することによって、効率良い圧縮率を維持できる。これにより、データ圧縮装置100は、メモリやディスク等の記憶媒体の使用量を抑えることができる。一方で、辞書データを更新する動作は、データ圧縮装置100の負荷が大きくなるので、頻繁に辞書データを更新することは望ましくない。このことから、メモリやディスクの容量に余裕がある場合には、圧縮率を高くすることよりも、データ圧縮装置100の負荷を下げることを優先した方が良い場合もある。
このことを考慮して、第3実施形態のデータ圧縮装置300は、コスト見積もり部301と圧縮率見積もり部302を有している。そして、データ圧縮装置300は、第2実施形態とは異なる手法でもって、辞書データを更新するタイミングを変更する。
コスト見積り部(コスト見積り手段)301は、辞書データを新規に生成する際に要するコストを見積もる(推定する)機能を有する。すなわち、コスト見積もり部301は、タイミング制御部(タイミング制御手段)303から、動作を開始する指示を受けると、動作を開始する。その指示を受けるタイミングは、タイミング制御部303が、第1実施形態におけるタイミング制御部106と同様の動作によって辞書データの使用頻度が低下したと判断したタイミングである。コスト見積り部301は、第1記憶部103に記憶されている圧縮データのデータ量と、第2記憶部104に記憶されている辞書データのデータ量とに基づいて、辞書データを新規に生成する際に要するコストを見積もる。
第1実施形態で述べたように、辞書を生成するためには、まず、展開部107が、第1記憶部103に記憶されている圧縮データの全てについて、第2記憶部104に記憶されている辞書データを参照しながら展開して第3記憶部108に記憶する。続いて、辞書生成部109が、第3記憶部108に記憶されている展開データの全てについて隣り合う2文字の出現回数をカウントする動作(処理)と、一番カウント数が多かった隣り合う2文字を別の1文字で置き換える動作(処理)とを、繰り返す。このような動作は、データにおける隣り合う2文字の出現回数が全て1回になるまで行われる。このため、辞書を生成する際に要するコストは、第1記憶部103に記憶されているデータ量と、第2記憶部104に記憶されている辞書データのデータ量に比例したコストとなる。
このため、コスト見積り部301は、例えば、次式(2)を用いて、辞書データを生成する際に要するコストを算出する。
C=W1×D1+W2×D2・・・・・(2)
なお、式(2)において、Cは辞書データを生成する際に要するコストを示す。D1は第1記憶部103に記憶されている圧縮データのデータ量を示す。D2は第2記憶部104に記憶されている辞書データのデータ量を示す。さらに、W1とW2は重み定数を示す。これらW1とW2は、適宜な値に設定される。
コスト見積り部301は、前記コストCを算出し終わると、算出結果である前記コストCをタイミング制御部303に出力する。
なお、式(2)は前記コストを算出する算出式の一例である。コスト見積り部301は、第1記憶部103に記憶されている圧縮データのデータ量と、第2記憶部104に記憶されている辞書データのデータ量とを利用して、前記コストを算出する手法であれば、どのような手法を採用してもよい。
圧縮率見積り部302は、新規の辞書データに更新した以降の圧縮率を見積もる(推定する)機能を有している。すなわち、圧縮率見積り部302は、タイミング制御部303から、動作を開始する指示を受けると、動作を開始する。その指示を受けるタイミングは、タイミング制御部303が、前記同様に辞書データの使用頻度が低下したと判断したタイミングである。圧縮率見積り部302は、第1記憶部103に記憶されている圧縮データの一部を、第2記憶部104に記憶されている辞書データを用いて展開する。
その圧縮率見積り部302が展開するデータ量は、予め定めた固定のデータ量であってもよいし、あるいは、第1記憶部103に記憶されている全データ量の10%に相当するデータ量というような、第1記憶部103の全データ量に比例するデータ量であってもよい。
そして、圧縮率見積り部302は、展開したデータを用いて新たな辞書データを生成し、当該辞書データを生成する際に用いた展開データをその新規の辞書データを利用して圧縮する。そして、圧縮率見積り部302は、その圧縮したデータの圧縮率を算出する。ここでの圧縮率とは、圧縮前のデータ量に対して圧縮後のデータ量がどれぐらい小さくなっているかを示す指標である。例えば、圧縮前のデータ量が100MBであり、圧縮後のデータ量が50MBである場合には、圧縮率は50%となる。圧縮率見積り部302は、圧縮率を算出した後に、その圧縮率を示すデータを、タイミング制御部303に出力する。
この第3実施形態では、上記のように、圧縮率見積り部302は、第1記憶部103に記憶されているデータの全てではなく、一部のデータのみを展開している。さらに、圧縮率見積り部302は、その展開したデータに基づいて、辞書データを生成し、さらに、圧縮率を算出している(辞書データの評価を行っている)。これにより、圧縮率見積もり部302は、データ圧縮装置300に大きな負荷をかけず、圧縮効果(圧縮率)を見積もる(算出する)ことができる。
タイミング制御部303は、前記同様にして辞書データの使用頻度が低下したと判断した場合には、動作を開始する指示を、第1実施形態とは異なり、展開部107ではなく、コスト見積り部301及び圧縮率見積り部302に対して出力する。
また、タイミング制御部303は、コスト見積り部301により算出されたコストと、圧縮率見積り部302により算出された圧縮率とに基づいて、辞書データを更新(生成)するか否かを判断する。
その判断は、例えば、前記コストをスコア化したデータと、圧縮率をスコア化したデータとを用いて行うことができる。ここで、下式(3)は、上記コストをスコア化したデータを算出する数式である。また、式(4)は、上記圧縮率をスコア化したデータを算出する数式である。
S1=W3×C・・・・・(3)
S2=W4×R・・・・・(4)
式(3)において、S1はコストをスコア化したデータを示す。W3は重み定数を示す。Cは式(2)により算出されるコストを示す。また、式(4)において、S2は圧縮率をスコア化したデータを示す。W4は重み定数を示す。Rは圧縮率見積もり部302が算出した圧縮率を示す。なお、式(3)と式(4)を用いて前記スコア化したデータを算出する手法は、前記スコア化したデータを算出する手法の一例である。前記スコア化したデータを算出する手法は上記手法に限定されない。
タイミング制御部303は、データ(圧縮率をスコア化したデータ)S2の方が、データ(コストをスコア化したデータ)S1より大きな値である場合には、新規の辞書データを生成する(辞書データを更新する)タイミングであると判断する。
換言すれば、データ(コストをスコア化したデータ)S1がデータ(圧縮率をスコア化したデータ)S2よりも大きい値である場合は、新規に辞書データを生成する(辞書データを更新する)タイミングではない。これにより、データ圧縮装置300は、圧縮率が小さいにも拘わらず、辞書データを更新するという負荷の大きい動作(処理)を行わなくなる。このため、データ圧縮装置300は、当該装置の負荷を軽減し、無駄を省くことができる。
以下に、第3実施形態のデータ圧縮装置300の動作例を、図18のフローチャートを参照して説明する。なお、図18において、図13に示した動作と同様の動作を示す部分には図13と同一符号を付し、その重複説明を省略する。
図18のフローチャートは、図13のフローチャートと同様に、データ圧縮装置300における制御装置(CPU)101が実行するコンピュータプログラムの処理手順を示す。そのコンピュータプログラムは、前記同様に、データ圧縮装置300が有するメモリやハードディスク等の記憶装置の記憶媒体(例えば、不揮発性の記憶媒体)に格納されている。また、当該コンピュータプログラムは、例えば、コンパクトディスク(CD)やメモリカード等の可搬タイプの記憶媒体に格納された後に、当該可搬タイプの記憶媒体からデータ圧縮装置300の記憶装置の記憶媒体に格納される場合がある。
図18のステップS043において、タイミング制御部303は、監視部105から受け取った使用頻度の合計値が、設定された閾値以下に低下したか否かを判定する。そして、タイミング制御部303は、使用頻度の合計値が閾値以下でなければ(ステップS043のNO)、何もしない。そして、データ圧縮装置300はステップS020以降の動作を繰り返す。これに対して、タイミング制御部303は、使用頻度の合計値が閾値以下である場合には(ステップS043のYES)、コスト見積り部301及び圧縮率見積り部302に、それぞれ、動作を開始する指示を出す。
タイミング制御部303から指示を受けると、コスト見積り部301は前記コストを算出し、また、圧縮率見積り部302は前記圧縮率を算出する(ステップS210)。すなわち、ステップS210において、コスト見積り部301は、第1記憶部103に記憶されている圧縮データのデータ量と、第2記憶部104に記憶されている辞書データのデータ量とに基づいて、例えば式(2)式を利用して、コストCを見積る(算出する)。そして、コスト見積り部301は、そのコストCをタイミング制御部303に出力する。一方、圧縮率見積り部302は、第1記憶部103に記憶されている圧縮データの一部を、第2記憶部104に記憶されている辞書データを用いて展開する。そして、圧縮率見積り部302は、その展開されたデータを用いて新規の辞書データを生成し、さらにその新規の辞書データを利用して当該新規の辞書データを生成する際に利用した展開データを圧縮する。さらに、圧縮率見積り部302は、その圧縮したデータ(圧縮後のデータ)と、圧縮前のデータとを利用して、圧縮率(圧縮率=(圧縮後のデータ量)÷(圧縮前のデータ量))を算出する。そして、圧縮率見積り部302は、その算出した圧縮率をタイミング制御部303に出力する。
続いて、タイミング制御部303は、コスト見積り部301から受け取ったコストCを、式(3)を利用して、スコア化する。つまり、タイミング制御部303は、スコア化したデータS1を生成する。また、タイミング制御部303は、式(4)を利用して、圧縮率見積り部302から受け取った圧縮率Rをスコア化する。つまり、タイミング制御部303は、スコア化したデータS2を生成する。そして、タイミング制御部303は、データS1とデータS2を比較して、圧縮率の方がコストより大きいか否かを判定する(ステップS220)。タイミング制御部303は、圧縮率がコスト以下であるときには(ステップS220のNO)、何もしない。そして、データ圧縮装置300は、ステップS020以降の動作を繰り返す。一方、タイミング制御部303は、圧縮率がコストよりも大きい場合には(ステップS220のYES)、展開部107に動作を開始する指示を出す。そして、データ圧縮装置300は、前記したステップS050,S060,S070の動作を行った後に、ステップS020以降の動作を繰り返す。
この第3実施形態のデータ圧縮装置300は、上記のように辞書データを更新するタイミングを変更できるため、圧縮効果が小さいにも拘わらず、負荷の大きい動作(辞書データを更新する動作)を行うことがなくなる。これにより、データ圧縮装置300は、第1実施形態の効果に加えて、装置の負荷を軽減でき、かつ、無駄を省くことができるという効果が得られる。
(第4実施形態)
以下に、本発明に係る第4実施形態を、図面を参照して説明する。
図19は、第4実施形態のデータ圧縮装置の構成を示すブロック図である。なお、第4実施形態の説明において、第1実施形態と同様な構成部分には同一符号を付し、その重複説明を省略する。
第4実施形態のデータ圧縮装置(データ圧縮システム)400は、第1実施形態の構成に加えて、さらに、削除部(辞書データ削除手段)403を有する。また、データ圧縮装置400は、第1実施形態で示した展開部107に代えて、部分展開部(圧縮データ一部展開手段)402を有し、また、第1実施形態で示したタイミング制御部106に代えて、タイミング制御部(辞書更新タイミング制御手段)401を有する。
前述した第1実施形態のデータ圧縮装置100は、辞書データの使用頻度が低下してきた場合に辞書データを更新することによって、常に圧縮率の高い辞書データを有することができる。しかしながら、データ圧縮装置100は、辞書データを更新する際には、毎回、全ての辞書データを作り直し、第2記憶部104に格納されている辞書データを一新する。このために、次のような問題が発生する。つまり、辞書データ全体の使用頻度が下がってきていたとしても、一部の辞書データに関しては、使用頻度がそれほど下がっていない、もしくは使用頻度が上がっている場合もある。このような場合に、全ての辞書データを作り直すことは無駄である。また、辞書データを更新する動作は負荷が高い。これらのことを考慮すると、データ圧縮装置は、辞書データを更新するタイミングの度に、全ての辞書データを作り直すのではなく、一部の辞書データを作り直すだけで済む場合には、その一部の辞書データだけを作り直すことが好ましい。そのように、一部の辞書データだけを作り直す場合には、データ圧縮装置100は、負荷を軽減でき、かつ、辞書データを更新する処理速度を上げることができる。
そこで、第4実施形態のデータ圧縮装置400は、辞書データを更新するタイミングにおいて、使用頻度が予め定めた設定値以下に低下した辞書データのみを削除し、次に述べるように新規の辞書データを生成する。
例えば、タイミング制御部401は、前記同様に、辞書データを更新すると判断した場合に、部分展開部402に動作を開始する指示を出す。このとき、タイミング制御部401は、図8に示したような使用頻度データに基づき、使用頻度が設定値以下に低下した辞書データを抽出する。そして、タイミング制御部401は、その抽出した辞書データを部分展開部402と削除部403に出力する。なお、上記のように辞書データを抽出する際に用いる設定値は、固定値でもよいし、稼働中に任意に変更できるようにしておいてもよい。
部分展開部(部分展開手段)402は、第1記憶部103に記憶されている圧縮データの一部を展開する機能を有する。すなわち、部分展開部402は、タイミング制御部401から受け取った辞書データを用いて、第1記憶部103に記憶されている圧縮データを展開し、展開した展開データを第3記憶部108に格納する。なお、タイミング制御部401が部分展開部402に出力する辞書データは、基本的には第2記憶部104に記憶されている辞書データの全てではなく一部である。このため、部分展開部402は、第1記憶部103に記憶されている一部の圧縮データだけを展開することになる。
また、タイミング制御部401が部分展開部402に出力する辞書データは、前記の如く、使用頻度が低下している辞書データである。このため、部分展開部402は、第1記憶部103に記憶されている圧縮データのうち、圧縮率があまり高くない圧縮データだけを展開し、圧縮率が高い圧縮データは展開しない。
部分展開部402は、上記のような圧縮データを展開する動作(処理)を終えると、第1記憶部103に記憶されている圧縮データを全て削除する。また、部分展開部402は、展開したデータを第3記憶部108に格納し終えると、辞書生成部109に動作を開始する指示を出力する。
削除部(削除手段)403は、タイミング制御部401から受け取った辞書データに該当する辞書データを第2記憶部104から削除する機能を有する。
辞書生成部109は、部分展開部402から前記指示を受け取ると、第3記憶部108に記憶されている展開データに基づいて、前記同様に、辞書データを生成する。そして、辞書生成部109は、新規に生成した辞書データを、第2記憶部104に格納(追記)する。辞書生成部109における上記機能(動作)以外の機能は、第1実施形態と同様である。
上記のように、第4実施形態のデータ圧縮装置400は、使用頻度が低下している辞書データだけを削除し、一部の辞書データだけを更新できる。このため、データ圧縮装置400は、全ての辞書データを作り直す場合に比べて、装置の負荷を軽減でき、また、辞書データを更新する処理速度を上げることができる。
以下に、第4実施形態のデータ圧縮システム400の動作例(データ圧縮方法)を図20のフローチャートを参照して説明する。なお、図20において、図13に示した動作と同様の動作を示す部分には図13と同一符号を付し、その重複説明を省略する。
図20のフローチャートは、図13のフローチャートと同様に、データ圧縮装置400における制御装置(CPU)101が実行するコンピュータプログラムの処理手順を示す。そのコンピュータプログラムは、前記同様に、データ圧縮装置400が有するメモリやハードディスク等の記憶装置の記憶媒体(例えば、不揮発性の記憶媒体)に格納されている。また、当該コンピュータプログラムは、例えば、コンパクトディスク(CD)やメモリカード等の可搬タイプの記憶媒体に格納された後に、当該可搬タイプの記憶媒体からデータ圧縮装置400の記憶装置の記憶媒体に格納される場合がある。
図20のステップS045において、タイミング制御部401は、監視部105から受け取った使用頻度の合計値が、設定された閾値以下に低下したか否かを判定する。そして、タイミング制御部401は、使用頻度の合計値が閾値以下でなければ(ステップS045のNO)、何もしない。そして、データ圧縮装置400は、ステップS020以降の動作を繰り返す。一方、タイミング制御部401は、使用頻度の合計値が閾値以下のときには(ステップS045のYES)、監視部105から受け取った使用頻度データに基づき、使用頻度が設定値以下に低下した辞書データを抽出する。そして、タイミング制御部401は、部分展開部402に、その抽出した辞書データを出力すると共に、動作を開始する指示を出す。また、タイミング制御部401は、削除部403にも、抽出した辞書データを出力すると共に、動作を開始する指示を出す。
続いて、部分展開部402は、タイミング制御部401から前記指示を受け取ると、圧縮データの一部を展開する(ステップS310)。つまり、このステップS310では、部分展開部402は、第1記憶部103に記憶されている圧縮データのうち、使用頻度が設定値以下に低下した辞書データで圧縮されている圧縮データだけを、タイミング制御部401から受け取った辞書データを用いて展開する。そして、部分展開部402は、展開したデータを第3記憶部108に格納する。
また、ステップS310において、部分展開部402は、第1記憶部103に記憶されている圧縮データを展開し終えると、第1記憶部103に記憶されている圧縮データを全て削除する。また、部分展開部402は、展開したデータを第3記憶部108に格納し終えると、辞書生成部109に、動作を開始する指示を出す。
一方、削除部403は、タイミング制御部401から受け取った辞書データに該当するデータを第2記憶部104から削除する(ステップS320)。続いて、辞書生成部109は、辞書データを生成して第2記憶部104の辞書データを更新する(ステップS065)。このステップS065では、辞書生成部109は、第3記憶部108に記憶されている展開データに基づいて、辞書データを生成する。そして、辞書生成部109は、辞書データを生成し終えると、生成した新規の辞書データを第2記憶部104に格納(追記)する。
続いて、圧縮部102が、第3記憶部108に記憶されている展開データを圧縮する(ステップS075)。このステップS075では、圧縮部102は、新規に生成された辞書データを含む辞書データを参照しながら、展開データを圧縮する。圧縮部102は、圧縮したデータ(圧縮データ)を第1記憶部103に格納する。
以上のように、第4実施形態のデータ圧縮装置400は、全ての辞書データを作り直すのではなく、使用頻度が下がっている辞書データだけを削除し、辞書データを更新できる。このため、データ圧縮装置400は、全ての辞書データを1から作り直す場合に比べて、辞書データを生成する負荷を軽減でき、かつ、辞書データを更新する処理に要する時間を短縮できる(処理速度を上げることができる)という効果が得られる。
(第5実施形態)
以下に、本発明に係る第5実施形態を、図面を参照して説明する。
図21は、本発明に係る第5実施形態のデータ圧縮装置の構成を示すブロック図である。なお、第5実施形態の説明において、第1実施形態と同一構成部分には同一符号を付し、その重複説明を省略する。
第5実施形態のデータ圧縮装置(データ圧縮システム)500を構成する制御装置101は、圧縮部102と、切り替え部(圧縮アルゴリズム切り替え手段)501と、圧縮コスト見積り部(圧縮コスト見積り手段)502と、圧縮率見積り部(圧縮率見積り手段)503と、更新部(切り替え情報更新手段)504とを備える。
前述した各実施形態では、圧縮部102は、何れの場合にも、辞書式圧縮アルゴリズム(辞書式圧縮法)によりデータを圧縮している。これに対して、第5実施形態では、圧縮部102は、辞書式圧縮アルゴリズム以外の圧縮アルゴリズムでもデータを圧縮できる機能を備えている。また、圧縮部102は、辞書式圧縮アルゴリズム以外の圧縮アルゴリズムによりデータを圧縮している場合には、圧縮前のデータに対する圧縮後のデータの圧縮率を求める機能を備えている。
圧縮部102は、辞書式圧縮アルゴリズム以外の圧縮アルゴリズムによりデータを圧縮している場合には、総容量データ(データ発生部110から受け取ったデータの総容量を示すデータ)と、データ発生部110からデータを受け取ってからの経過時間を示すデータと、圧縮率を示すデータとを切り替え部501に出力する。なお、切り替え部501に出力する圧縮率は、圧縮部102が前回、切り替え部501に圧縮率を出力した以降にデータ発生部110から受け取ったデータを圧縮部102が圧縮した場合の圧縮率である。
圧縮部102は、辞書式圧縮アルゴリズムによりデータを圧縮している場合には、前述した使用状況データ(辞書データがどの程度使用されているかを示すデータ)と、総容量データ(データ発生部110から受け取ったデータの総容量を示すデータ)と、データ発生部110からデータを受け取ってからの経過時間を示すデータ(経過時間データ)とを、切り替え部501に出力する。
切り替え部(切り替え手段)501は、圧縮部102から受け取った各種データに基づいて、単位時間当たりのデータの流量を、例えば次式(5)を用いて計算する。
データの流量={(今回の入力データの総容量)−(前回の入力データの総容量)}÷{(今回の経過時間)−(前回の経過時間)}・・・・・(5)
切り替え部501は、上記のような計算を行うために、圧縮部102から受け取った総容量データと経過時間データを記憶しておく。そして、切り替え部501は、圧縮部102から新たに総容量データと経過時間データを受け取ると、古い総容量データと経過時間データを削除する。また、切り替え部501は、圧縮部102から初めて総容量データと経過時間データを受け取った場合には、データの流量を次式(6)を利用して計算する。
データの流量=(今回の入力データの総容量)÷(今回の経過時間)・・・・・(6)
そして、切り替え部501は、算出したデータの流量が、所定の閾値T1以下に低くなった場合、あるいは、閾値T1よりも大きい所定の閾値T2以上に高くなった場合には、圧縮コスト見積り部502と圧縮率見積り部503に、動作を開始する指示を出す。
圧縮コスト見積り部(圧縮コスト見積り手段)502は、データを圧縮する際に要するコストを見積もる(推定する)機能を有する。すなわち、圧縮コスト見積り部502は、切り替え部501から指示を受けると、動作を開始する。圧縮コスト見積り部502は、予め設定されている複数の圧縮アルゴリズムのそれぞれでもって、データを圧縮する。そして、圧縮コスト見積り部502は、そのデータを圧縮する処理に要する計算量(コスト)を算出する。具体的には、圧縮コスト見積り部502は、第1記憶部103に記憶されている圧縮データの一部を、第2記憶部104に記憶されている辞書データを利用して展開し、これにより、圧縮前のデータを生成する。なお、圧縮コスト見積り部502が展開するデータのデータ量は、第1記憶部103に記憶されている圧縮データ全体に対する予め設定した割合に対応するデータ量であってもよいし、予め定めた固定量であってもよい。
圧縮コスト見積り部502は、上記のように生成した圧縮前のデータに対して、予め設定されている複数の圧縮アルゴリズムのそれぞれについて、次式(7)を利用して、計算量ACを算出する。
AC=(圧縮対象のデータ量)÷(圧縮にかかった時間)・・・・・(7)
なお、式(7)において、「圧縮対象のデータ量」は、圧縮コスト見積り部502が上記のように展開して得られた圧縮前のデータのデータ量を示す。また、「圧縮にかかった時間」は、その圧縮対象のデータを圧縮するのに要する時間を示す。
そして、圧縮コスト見積り部502は、計算量ACを、例えば式(8)あるいは式(9)を利用して、スコア化し、スコア化したデータを、切り替え部501に出力する。
SA1=W11×AC1・・・・・(8)
SA2=W12×AC2・・・・・(9)
式(8)において、SA1は圧縮アルゴリズム1を利用してデータを圧縮した場合に要するコストをスコア化したデータ(圧縮コストスコア)を示す。W11は重み定数を示す。AC1は圧縮アルゴリズム1に対応する前記計算量ACを示す。式(9)において、SA2は圧縮アルゴリズム2を利用してデータを圧縮した場合に要するコストをスコア化したデータ(圧縮コストスコア)を示す。W12は重み定数を示す。AC2は圧縮アルゴリズム2に対応する前記計算量ACを示す。
なお、スコア化したデータを式(8)又は式(9)を利用して得る手法は、データをスコア化する手法の一例にすぎない。圧縮コスト見積り部502がデータをスコア化する手法は、計算量ACを用いて算出する手法であれば、特に限定されない。
圧縮率見積り部(圧縮率見積り手段)503は、新規の辞書データを生成した場合における圧縮率を見積もる(推定する)機能を有する。すなわち、圧縮率見積り部503は、切り替え部501から指示を受け取ると、動作を開始する。圧縮率見積り部503は、圧縮率を算出する。具体的には、例えば、圧縮率見積り部503は、圧縮コスト見積り部502と同様に、第1記憶部103に記憶されている圧縮データの一部を利用して、圧縮前のデータを生成する。そして、圧縮率見積り部503は、圧縮前のデータに対して、予め設定されている複数の圧縮アルゴリズムのそれぞれについて、圧縮前のデータ量に対して圧縮後のデータ量がどの程度小さくなっているかを示す指標である圧縮率を算出する。そして、圧縮率見積り部503は、その算出した圧縮率を例えば式(10)や式(11)を利用してスコア化し、スコア化したデータを切り替え部501に出力する。
SB1=W13×R1・・・・・(10)
SB2=W14×R2・・・・・(11)
式(10)において、SB1は圧縮アルゴリズム1を利用して圧縮したデータの圧縮率をスコア化したデータ(圧縮率スコア)を示す。W13は重み定数を示す。R1は圧縮アルゴリズム1に対応する前記圧縮率を示す。式(11)において、SB2は圧縮アルゴリズム2を利用して圧縮したデータの圧縮率をスコア化したデータ(圧縮率スコア)を示す。W14は重み定数を示す。R2は圧縮アルゴリズム1に対応する前記圧縮率を示す。
スコア化したデータを式(10)又は式(11)を利用して得る手法は、データをスコア化する手法の一例にすぎない。圧縮率見積り部503がデータをスコア化する手法は、圧縮率を用いて算出する手法であれば、特に限定されない。
切り替え部501は、圧縮コスト見積り部502と圧縮率見積り美503からそれぞれ受け取ったデータに基づいて、圧縮アルゴリズムを切り替えるか、あるいは、どの圧縮アルゴリズムに切り替えるかを判断する機能を有する。
具体的には、辞書データの使用頻度が低下してきていることに起因して圧縮率が低下している場合には、より圧縮率の高いアルゴリズムに切り替えることが必要である。この場合には、切り替え部501は、現在の圧縮率スコアよりも高い圧縮率スコア、および、現在の圧縮コストスコアよりも高い圧縮コストスコアを有する圧縮アルゴリズムを選択する。切り替え候補の圧縮アルゴリズムが複数ある場合には、切り替え部501は、例えば、次式(12)を利用して総合スコアを算出する。
SC1=W15×SA1+W16×SB1・・・・・(12)
式(12)において、SC1は圧縮アルゴリズム1に対応する総合スコアを示す。W15、W16は重み定数を示す。SA1は圧縮アルゴリズム1に対応する圧縮コストスコアを示す。SB1は圧縮アルゴリズム1に対応する圧縮率スコアを示す。重み定数W15、W16の値は予め設定される。当該重み定数W15、W16の値は、圧縮コスト(実施コスト)を重視するか、圧縮率を重視するかに応じて、適宜に調整される。つまり、圧縮率よりも圧縮コストを重視する場合には、重み定数W15は大きく設定される。これに対して、圧縮コストよりも圧縮率を重視する場合には、重み定数W16が大きく設定される。
一方、データの流量が閾値T1以下に低くなった場合には、データの流量が少なくなっているので、次のような圧縮アルゴリズムを採用することが好ましい。その圧縮アルゴリズムとは、圧縮に時間を要する高負荷な圧縮アルゴリズムであるが、圧縮率が高い圧縮アルゴリズムである。
切り替え部501は、そのような場合には、圧縮コストスコアが低くても、圧縮率スコアが高い圧縮アルゴリズムを選択する。具体的には、切り替え部501は、式(12)と同様の数式を利用して、各圧縮アルゴリズムについてそれぞれ総合スコアを算出する。なお、その数式における重み定数W16を大きく設定することによって、圧縮率スコアが圧縮コストスコアよりも重視される。
切り替え部501は、それら総合スコアを比較した結果に基づいて、どの圧縮アルゴリズムに切り替えるかを決定する。
また、データの流量が閾値T2以上に多くなった場合には、データの流量が大きくなっているので、次のような圧縮アルゴリズムを採用することが好ましい。その圧縮アルゴリズムとは、圧縮率が低くとも低負荷な圧縮アルゴリズムである。
そのような場合には、切り替え部501は、圧縮率スコアが低くても、圧縮コストスコアが高い圧縮アルゴリズムを選択する。具体的には、切り替え部501は、式(12)と同様の数式を利用して、各圧縮アルゴリズムについてそれぞれ総合スコアを算出する。なお、その数式における重み定数W15を大きく設定することによって、圧縮コストスコアが圧縮率スコアよりも重視される。
切り替え部501は、上記のように選択した圧縮アルゴリズムを、圧縮部102で使用している新たな圧縮アルゴリズムとして設定する。つまり、切り替え部501は、データを圧縮する際に利用する圧縮アルゴリズムを切り替える。また、切り替え部501は、更新部504に向けて、動作を開始する指示を出すと共に、切り替え後の圧縮アルゴリズムを示す情報を出力する。
更新部(更新手段)504は、切り替え部501から指示を受けると動作を開始する。更新部504は、第1記憶部103に記憶されているデータのどこからどこまでがどの圧縮アルゴリズムで圧縮されたデータであるかを示す情報を更新する。また、更新部504は、第2記憶部104に記憶されている辞書データのどこからどこまでがどの圧縮アルゴリズムで使用している辞書データであるのかという情報を更新する。
具体的には、更新部504が切り替え手段501から受け取った圧縮アルゴリズムの情報は、少なくとも圧縮アルゴリズム名の情報を含む。そして、更新部504は、第1記憶部103及び第2記憶部104のそれぞれに、どのデータがどの圧縮アルゴリズムに関連するデータであるのかが分かるように、圧縮アルゴリズムの情報を記憶(付加)する。
例えば、第1記憶部103に記憶されているデータは、以下のように、圧縮アルゴリズム毎に分類される。
[第1記憶部103]
圧縮アルゴリズムA
ABCABABC
DACEFDAS
AXMCALDA
圧縮アルゴリズムB
ANSKANCX
CIKADLAL
圧縮アルゴリズムC
DKLABNKC
ALKDKAJD
SLDKJALL
第2記憶部104に関しても同様である。
なお、圧縮部102が最初に採用する圧縮アルゴリズムは予め設定されている。また、この第5実施形態においては、圧縮部102は、データを圧縮する機能に加えて、辞書データを生成し、かつ、生成後の辞書データを第2記憶部104に登録する機能をも有する。
以下に、第5実施形態のデータ圧縮装置500の動作例(データ圧縮方法)を、図22のフローチャートを参照して説明する。なお、図22において、図18に示した動作と同様の動作を示す部分には図18と同一符号を付し、その重複説明を省略する。
図22のフローチャートは、図13のフローチャートと同様に、データ圧縮装置500における制御装置(CPU)101が実行するコンピュータプログラムの処理手順を示す。そのコンピュータプログラムは、前記同様に、データ圧縮装置500が有するメモリやハードディスク等の記憶装置の記憶媒体(例えば、不揮発性の記憶媒体)に格納されている。また、当該コンピュータプログラムは、例えば、コンパクトディスク(CD)やメモリカード等の可搬タイプの記憶媒体に格納された後に、当該可搬タイプの記憶媒体からデータ圧縮装置500の記憶装置の記憶媒体に格納される場合がある。
図22に示すステップS040において切り替え部501が辞書データの使用頻度が低下していないと判断した場合には、当該切り替え部501は、データの流量を計算する(ステップS410)。つまり、切り替え部501は、圧縮部102から受け取った総容量データおよび経過時間データに基づいて、前記式(6)を利用してデータ流量を算出する。そして、切り替え部501は、算出したデータ流量が閾値T1以下に低くなっているか、あるいは、データ流量が閾値T2以上に多くなっているかを判定する。これにより、切り替え部501は、データの流量が閾値T1以下もしくは閾値T2以上であると判断した場合には、圧縮コスト見積り部502と圧縮率見積り部503に動作を開始する指示を出す。
これにより、圧縮コスト見積り部502と圧縮率見積り部503が動作を開始する(ステップS420)。つまり、圧縮コスト見積り部502は、予め設定されている複数の圧縮アルゴリズムのそれぞれについて、前述したように、圧縮コストスコアを算出する。また、圧縮率見積り部503は、予め設定されている複数の圧縮アルゴリズムのそれぞれについて、前述したように、圧縮率スコアを算出する。
切り替え部501は、算出された圧縮コストスコアと圧縮率スコアに基づいて、圧縮アルゴリズムを切り替えるか否か(現在使用している圧縮アルゴリズムよりも適切な圧縮アルゴリズムが有るか否か)を判定する(ステップS430)。
切り替え部501は、圧縮アルゴリズムを切り替えると判定した場合には、前述したように、切り替え後の圧縮アルゴリズムを選択する。そして、切り替え部501は、データを圧縮する際に利用する圧縮アルゴリズムを、選択した圧縮アルゴリズムに切り替える(ステップS440)。また、切り替え部501は、第1記憶部103および第2記憶部104のそれぞれに、どのデータがどの圧縮アルゴリズムに関連するデータであるのかが分かるように、圧縮アルゴルリズムの情報を記憶(付加)する。
このように、第5実施形態によれば、切り替え部501は、データの流量が閾値T1以下である場合には、圧縮率を重視して、圧縮アルゴリズムを選択する。また、切り替え部501は、データの流量が閾値T2以上である場合には、圧縮コストを重視して、圧縮アルゴリズムを選択する。このように、切り替え部501は、圧縮コストと圧縮率に基づいて圧縮アルゴリズムを選択する。これにより、切り替え部501は、辞書式圧縮アルゴリズム以外の圧縮アルゴリズムをも含む複数の圧縮アルゴリズムの中から、有効度の高い圧縮アルゴリズムを選択できる。つまり、切り替え部501は、適切なタイミングで、有効度の高い圧縮アルゴリズムに切り替えることができる。このため、第5実施形態のデータ圧縮装置500は、効率の良いデータ圧縮を維持できる。
なお、本発明は上記した各実施形態に限定されるものではなく、様々な実施の形態を採り得る。例えば、データ圧縮装置は、図23に示すような構成を有していてもよい。すなわち、このデータ圧縮装置600は、圧縮部(圧縮手段)601と、監視部(監視手段)602と、タイミング制御部(タイミング制御手段)603と、辞書生成部(辞書生成手段)604とを有している。圧縮部601は、圧縮対象のデータを、予め与えられている辞書データに基づいて圧縮する機能を備えている。監視部602は、圧縮部601が前記データを圧縮する場合における前記辞書データの使用頻度を算出する機能を備えている。タイミング制御部603は、算出した前記使用頻度が予め設定された閾値よりも低下した場合に、前記辞書データを更新する指示を出す機能を備えている。辞書生成部604は、その指示を受けて、圧縮部102が圧縮したデータを利用して前記辞書データを新規に生成する機能を備えている。
このデータ圧縮装置600においても、前記各実施形態と同様に、効率の良いデータ圧縮率を維持できる。
以上、実施形態を参照して本願発明を説明したが、本願発明は上記実施形態に限定されるものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。
なお、この出願は、2010年2月23日に出願された日本出願の特願2010−036806を基礎とする優先権を主張し、その開示の全てをここに取り込む。
さらに、上記の実施形態の一部又は全部は、以下の付記のようにも記載されうるが、以下には限られない。
(付記1)
逐次的に入力される圧縮対象のデータを、辞書データ記憶手段に記憶されている辞書データを参照しながら圧縮して、圧縮データを出力する圧縮ステップと、
前記圧縮ステップで前記圧縮対象のデータを圧縮する際に参照する前記辞書データの使用頻度を計算する辞書使用頻度監視ステップと、
前記辞書使用頻度監視ステップによる前記使用頻度の計算結果が設定された閾値より低下したときに、辞書の更新を指示する辞書更新タイミング制御ステップと、
前記圧縮ステップで得られた前記圧縮データを、圧縮前のデータに展開するデータ展開ステップと、
前記辞書更新タイミング制御ステップによる前記辞書の更新の指示に従って、前記データ展開ステップで得られた前記圧縮前のデータから新たな辞書データを構築して、前記辞書データ記憶手段に記憶されていた辞書データを、構築した前記新たな辞書データに置き換える辞書構築ステップと
を含むデータ圧縮方法。
(付記2)
前記辞書使用頻度監視ステップは、前記圧縮ステップで前記圧縮対象のデータを圧縮する際に用いた前記辞書データと、その辞書データ毎の使用回数と、前記圧縮対象のデータの総量とを入力として受け、各辞書データ毎に前記使用回数を前記圧縮対象のデータの総量で除算して、前記使用頻度の計算結果を得る付記1記載のデータ圧縮方法。
(付記3)
前記辞書更新タイミング制御ステップは、前記辞書使用頻度監視ステップにより得られた全ての前記辞書データの使用頻度の計算結果の合計値が前記閾値よりも小さいときに、前記辞書の更新を指示する付記1又は2記載のデータ圧縮方法。
(付記4)
逐次的に入力される圧縮対象のデータを、辞書データ記憶手段に記憶されている辞書データを参照しながら圧縮して、圧縮データを出力する圧縮ステップと、
前記圧縮ステップで前記圧縮対象のデータを圧縮する際に参照する前記辞書データの使用頻度を計算する辞書使用頻度監視ステップと、
前記辞書使用頻度監視ステップによる前記使用頻度の計算結果が閾値より低下したときに、辞書の更新を指示する辞書更新タイミング制御ステップと、
前記圧縮ステップで得られる前記圧縮データを、圧縮前のデータに展開するデータ展開ステップと、
使用するリソースの空き容量を出力するリソース監視ステップと、
前記リソース監視ステップで出力される前記リソースの空き容量に応じて、前記辞書更新タイミング制御ステップで使用する前記閾値の値を可変設定するパラメータ調整ステップと、
前記辞書更新タイミング制御ステップによる前記辞書の更新の指示に従って、前記データ展開ステップで得られる前記圧縮前のデータから新たな辞書データを構築して、前記辞書データ記憶手段に記憶されていた辞書データを、構築した前記新たな辞書データに置き換える辞書構築ステップと
を含むデータ圧縮方法。
(付記5)
前記パラメータ調整ステップは、前記リソース監視ステップからの前記リソースの空き容量が大きいほど前記辞書更新タイミング制御ステップで使用する前記閾値を小さな値に可変設定し、前記リソースの空き容量が小さいほど前記閾値を大きな値に可変設定する付記4記載のデータ圧縮方法。
(付記6)
逐次的に入力される圧縮対象のデータを、辞書データ記憶手段に記憶されている辞書データを参照しながら圧縮して、圧縮データを出力する圧縮ステップと、
前記圧縮ステップで前記圧縮対象のデータを圧縮する際に参照する前記辞書データの使用頻度を計算する辞書使用頻度監視ステップと、
前記辞書使用頻度監視ステップによる前記使用頻度の計算結果が閾値より低下したときに、前記圧縮データのデータ量と前記辞書データ記憶手段に記憶されている前記辞書データのデータ量とに応じた辞書構築コストを見積る辞書構築コスト見積りステップと、
前記辞書使用頻度監視ステップによる前記使用頻度の計算結果が閾値より低下したときに、前記辞書データを更新した際の圧縮率を見積る圧縮率見積りステップと、
前記辞書コストと前記圧縮率とを比較し、その比較結果に応じて新たな辞書の構築を行うか否かを決定する辞書更新タイミング制御ステップと、
前記圧縮ステップから出力される前記圧縮データを、圧縮前のデータに展開するデータ展開ステップと、
前記辞書更新タイミング制御ステップにより前記新たな辞書を構築する決定がなされたときに、前記データ展開ステップで得られる前記圧縮前のデータから新たな辞書データを構築して、前記辞書データ記憶手段に記憶されていた辞書データを、構築した前記新たな辞書データに置き換える辞書構築ステップと
を含むデータ圧縮方法。
(付記7)
前記圧縮率見積りステップは、前記圧縮データの一部を前記辞書データ記憶手段に記憶されている前記辞書データを用いて展開した圧縮前のデータと、その圧縮前のデータを用いて構築した新たな辞書を用いて圧縮した圧縮後のデータとの比率を前記圧縮率として見積る付記6記載のデータ圧縮方法。
(付記8)
前記辞書更新タイミング制御ステップは、前記辞書コストをスコア化した第1の値と、前記圧縮率をスコア化した第2の値とを比較し、前記第2の値の方が前記第1の値よりも大きいときにのみ、前記新たな辞書の構築を行うことを決定する付記6又は7記載のデータ圧縮方法。
(付記9)
前記データ展開ステップは、
前記圧縮手段から出力される前記圧縮データを記憶する圧縮データ記憶ステップと、
前記辞書更新タイミング制御ステップによる前記辞書の更新の指示に従って、前記圧縮データ記憶ステップで記憶された前記圧縮データを、前記辞書データ記憶手段に記憶されている前記辞書データを参照しながら展開して圧縮前のデータである展開データを得る圧縮データ展開ステップと、
前記圧縮データ展開ステップにより得られた前記展開データを記憶する展開データ記憶ステップと
を備え、前記辞書構築ステップは、前記圧縮データ展開ステップにより前記圧縮データ記憶ステップで記憶された全ての前記圧縮データの展開終了により動作を開始し、前記展開データ記憶で記憶された前記圧縮前のデータである前記展開データに基づき、前記新たな辞書データを構築する付記1乃至8のうち、いずれか一項に記載のデータ圧縮方法。
(付記10)
逐次的に入力される圧縮対象のデータを、辞書データ記憶手段に記憶されている辞書データを参照しながら圧縮して、圧縮データを出力する圧縮ステップと、
前記圧縮ステップで前記圧縮対象のデータを圧縮する際に参照する前記辞書データの使用頻度を各辞書データ毎に計算する辞書使用頻度監視ステップと、
前記辞書使用頻度監視ステップにより計算された各辞書データ毎の前記使用頻度のうち、設定された閾値より低下している使用頻度に対応した辞書データを抽出して出力する辞書更新タイミング制御ステップと、
前記辞書更新タイミング制御ステップにより得られた前記辞書データを用いて、前記圧縮で得られる前記圧縮データの一部を、圧縮前のデータに展開するデータ一部展開ステップと、
前記辞書更新タイミング制御ステップにより得られた前記辞書データを、前記辞書データ記憶手段に記憶されている複数の辞書データの中から削除する辞書データ削除ステップと、
前記データ一部展開ステップから出力される一部の前記圧縮前のデータから新たな辞書データを構築して、この新たな辞書データを前記辞書データ記憶手段に追記する辞書構築ステップと
を含むデータ圧縮方法。
(付記11)
前記データ一部展開ステップは、
前記圧縮ステップで得られた前記圧縮データを記憶する圧縮データ記憶ステップと、
前記辞書更新タイミング制御ステップで得られた前記辞書データを用いて、前記圧縮データ記憶ステップで記憶された前記圧縮データの一部を展開して一部の圧縮前のデータを得る圧縮データ一部展開ステップと、
前記圧縮データ一部展開ステップにより得られた前記一部の圧縮前のデータを記憶する展開データ記憶ステップと
を備え、
前記辞書構築ステップは、前記圧縮データ一部展開ステップにより前記圧縮データ記憶ステップで記憶された前記圧縮データの一部の展開終了により動作を開始し、前記展開データ記憶ステップで記憶された前記一部の圧縮前のデータに基づき、前記新たな辞書データを構築する付記10記載のデータ圧縮方法。
(付記12)
逐次的に入力される圧縮対象のデータを、指定された圧縮アルゴリズムに従い圧縮して、圧縮データを出力する圧縮ステップと、
前記圧縮ステップによる圧縮前のデータに対して、予め設定されている複数の圧縮アルゴリズムのそれぞれにより圧縮して、圧縮前のデータ量と圧縮にかかった時間の比である圧縮コストを、前記複数の圧縮アルゴリズムのそれぞれについて見積る圧縮コスト見積りステップと、
前記圧縮ステップによる圧縮前のデータに対して、予め設定されている前記複数の圧縮アルゴリズムのそれぞれにより圧縮したときの圧縮率を算出する圧縮率見積りステップと、
前記圧縮ステップで前記圧縮対象のデータを圧縮する際に参照する辞書データの使用頻度が閾値より低下したときに、前記圧縮コスト見積りステップで得られた前記圧縮コストと前記圧縮率見積りステップで得られた前記圧縮率とに基づいて、前記複数の圧縮アルゴリズムのうち現在使用している圧縮アルゴリズムよりも圧縮率及び圧縮コストが高い圧縮アルゴリズムを前記圧縮ステップで用いる圧縮アルゴリズムに選択する圧縮アルゴリズム切り替えステップと
を含むデータ圧縮方法。
(付記13)
前記圧縮アルゴリズム切り替えステップは、前記圧縮ステップにより圧縮される前記圧縮対象のデータのデータ流量を算出し、そのデータ流量が第1の閾値以下、又は前記第1の閾値より大なる第2の閾値以上となったときに、前記圧縮コスト見積りステップで得られた前記圧縮コストと前記圧縮率見積りステップで得られた前記圧縮率とに基づいて、前記データ流量が前記第1の閾値以下のときには前記複数の圧縮アルゴリズムのうち現在使用している圧縮アルゴリズムよりも少なくとも前記圧縮率の高い圧縮アルゴリズムを前記圧縮ステップで用いる圧縮アルゴリズムに選択し、前記データ流量が前記第2の閾値以上のときには前記複数の圧縮アルゴリズムのうち現在使用している圧縮アルゴリズムよりも少なくとも前記圧縮コストの高い圧縮アルゴリズムを前記圧縮ステップで用いる圧縮アルゴリズムに選択する付記12記載のデータ圧縮方法。
(付記14)
圧縮のための辞書データを記憶する辞書データ記憶手段と、
逐次的に入力される圧縮対象のデータを、前記辞書データ記憶手段に記憶されている前記辞書データを参照しながら圧縮して、圧縮データを出力する圧縮手段と、
前記圧縮手段から出力される前記圧縮データを、圧縮前のデータに展開するデータ展開手段と、
前記圧縮手段が前記圧縮対象のデータを圧縮する際に参照する前記辞書データの使用頻度を計算する辞書使用頻度監視手段と、
前記辞書使用頻度監視手段による前記使用頻度の計算結果が設定された閾値より低下したときに、辞書の更新を指示する辞書更新タイミング制御手段と、
前記辞書更新タイミング制御手段から出力された前記辞書の更新の指示に従って、前記データ展開手段から出力される前記圧縮前のデータから新たな辞書データを構築して、前記辞書データ記憶手段に記憶されていた辞書データを、構築した前記新たな辞書データに置き換える辞書構築手段と
を有するデータ圧縮システム。
(付記15)
前記辞書使用頻度監視手段は、前記圧縮手段が前記圧縮対象のデータを圧縮する際に用いた前記辞書データと、その辞書データ毎の使用回数と、前記圧縮対象のデータの総量とを前記圧縮手段から入力として受け、各辞書データ毎に前記使用回数を前記圧縮対象のデータの総量で除算して、前記使用頻度の計算結果を得る付記14記載のデータ圧縮システム。
(付記16)
前記辞書更新タイミング制御手段は、前記辞書使用頻度監視手段から入力された全ての前記辞書データの使用頻度の計算結果の合計値が前記閾値よりも小さいときに、前記辞書の更新を指示する付記14又は15記載のデータ圧縮システム。
(付記17)
圧縮のための辞書データを記憶する辞書データ記憶手段と、
逐次的に入力される圧縮対象のデータを、前記辞書データ記憶手段に記憶されている前記辞書データを参照しながら圧縮して、圧縮データを出力する圧縮手段と、
前記圧縮手段から出力される前記圧縮データを、圧縮前のデータに展開するデータ展開手段と、
前記圧縮手段が前記圧縮対象のデータを圧縮する際に参照する前記辞書データの使用頻度を計算する辞書使用頻度監視手段と、
前記辞書使用頻度監視手段による前記使用頻度の計算結果が閾値より低下したときに、辞書の更新を指示する辞書更新タイミング制御手段と、
使用するリソースの空き容量を出力するリソース監視手段と、
前記リソース監視手段からの前記リソースの空き容量に応じて、前記辞書更新タイミング制御手段で使用する前記閾値の値を可変設定するパラメータ調整手段と、
前記辞書更新タイミング制御手段から出力された前記辞書の更新の指示に従って、前記データ展開手段から出力される前記圧縮前のデータから新たな辞書データを構築して、前記辞書データ記憶手段に記憶されていた辞書データを、構築した前記新たな辞書データに置き換える辞書構築手段と
を有するデータ圧縮システム。
(付記18)
前記パラメータ調整手段は、前記リソース監視手段からの前記リソースの空き容量が大きいほど前記辞書更新タイミング制御手段で使用する前記閾値を小さな値に可変設定し、前記リソースの空き容量が小さいほど前記閾値を大きな値に可変設定する付記17記載のデータ圧縮システム。
(付記19)
圧縮のための辞書データを記憶する辞書データ記憶手段と、
逐次的に入力される圧縮対象のデータを、前記辞書データ記憶手段に記憶されている前記辞書データを参照しながら圧縮して、圧縮データを出力する圧縮手段と、
前記圧縮手段から出力される前記圧縮データを、圧縮前のデータに展開するデータ展開手段と、
前記圧縮手段が前記圧縮対象のデータを圧縮する際に参照する前記辞書データの使用頻度を計算する辞書使用頻度監視手段と、
前記圧縮データのデータ量と前記辞書データ記憶手段に記憶されている前記辞書データのデータ量とに応じた辞書構築コストを見積もる辞書構築コスト見積り手段と、
前記辞書データを更新した際の圧縮率を見積もる圧縮率見積り手段と、
前記辞書使用頻度監視手段による前記使用頻度の計算結果が閾値より低下したときに、前記辞書構築コスト見積り手段及び前記圧縮率見積り手段のそれぞれに動作を指示することにより得られた、前記辞書構築コスト構築手段からの前記辞書コストと前記圧縮率見積り手段からの前記圧縮率とを比較し、その比較結果に応じて新たな辞書の構築を行うか否かを決定する辞書更新タイミング制御手段と、
前記辞書更新タイミング制御手段により前記新たな辞書を構築する決定がなされたときに、前記データ展開手段から出力される前記圧縮前のデータから新たな辞書データを構築して、前記辞書データ記憶手段に記憶されていた辞書データを、構築した前記新たな辞書データに置き換える辞書構築手段と
を有するデータ圧縮システム。
(付記20)
前記圧縮率見積り手段は、前記圧縮データの一部を前記辞書データ記憶手段に記憶されている前記辞書データを用いて展開した圧縮前のデータと、その圧縮前のデータを用いて構築した新たな辞書を用いて圧縮した圧縮後のデータとの比率を前記圧縮率として見積もる付記19記載のデータ圧縮システム。
(付記21)
前記辞書更新タイミング制御手段は、前記辞書構築コスト構築手段からの前記辞書コストをスコア化した第1の値と、前記圧縮率見積り手段からの前記圧縮率をスコア化した第2の値とを比較し、前記第2の値の方が前記第1の値よりも大きいときにのみ、前記新たな辞書の構築を行うことを決定する付記19又は20記載のデータ圧縮システム。
(付記22)
前記データ展開手段は、
前記圧縮手段から出力される前記圧縮データを記憶する圧縮データ記憶手段と、
前記辞書更新タイミング制御手段から出力された前記辞書の更新の指示に従って、前記圧縮データ記憶手段に記憶されている前記圧縮データを、前記辞書データ記憶手段に記憶されている前記辞書データを参照しながら展開して圧縮前のデータである展開データを得る圧縮データ展開手段と、
前記圧縮データ展開手段により得られた前記展開データを記憶する展開データ記憶手段と
を備え、前記辞書構築手段は、前記圧縮データ展開手段により前記圧縮データ記憶手段に記憶されている全ての前記圧縮データの展開終了により動作を開始し、前記展開データ記憶手段に記憶されている前記圧縮前のデータである前記展開データに基づき、前記新たな辞書データを構築する付記14乃至21のうち、いずれか一項記載のデータ圧縮システム。
(付記23)
圧縮のための複数の辞書データを記憶する辞書データ記憶手段と、
逐次的に入力される圧縮対象のデータを、前記辞書データ記憶手段に記憶されている前記辞書データを参照しながら圧縮して、圧縮データを出力する圧縮手段と、
前記圧縮手段が前記圧縮対象のデータを圧縮する際に参照する前記辞書データの使用頻度を各辞書データ毎に計算する辞書使用頻度監視手段と、
前記辞書使用頻度監視手段による各辞書データ毎の前記使用頻度のうち、設定された閾値より低下している使用頻度に対応した辞書データを抽出して出力する辞書更新タイミング制御手段と、
前記辞書更新タイミング制御手段から出力された前記辞書データを用いて、前記圧縮手段から出力される前記圧縮データの一部を、圧縮前のデータに展開するデータ一部展開手段と、
前記辞書更新タイミング制御手段から出力された前記辞書データを、前記辞書データ記憶手段に記憶されている複数の辞書データの中から削除する辞書データ削除手段と、
前記データ一部展開手段から出力される一部の前記圧縮前のデータから新たな辞書データを構築して、この新たな辞書データを前記辞書データ記憶手段に追記する辞書構築手段と
を有するデータ圧縮システム。
(付記24)
前記データ一部展開手段は、
前記圧縮手段から出力される前記圧縮データを記憶する圧縮データ記憶手段と、
前記辞書更新タイミング制御手段から出力された前記辞書データを用いて、前記圧縮データ記憶手段に記憶されている前記圧縮データの一部を展開して一部の圧縮前のデータを得る圧縮データ一部展開手段と、
前記圧縮データ一部展開手段により得られた前記一部の圧縮前のデータを記憶する展開データ記憶手段と
を備え、
前記辞書構築手段は、前記圧縮データ一部展開手段により前記圧縮データ記憶手段に記憶されている前記圧縮データの一部の展開終了により動作を開始し、前記展開データ記憶手段に記憶されている前記一部の圧縮前のデータに基づき、前記新たな辞書データを構築する付記23記載のデータ圧縮システム。
(付記25)
圧縮アルゴリズムが辞書式のときに用いられる辞書データを記憶する辞書データ記憶手段と、
逐次的に入力される圧縮対象のデータを、指定された圧縮アルゴリズムに従い圧縮して、圧縮データを出力する圧縮手段と、
前記圧縮手段の圧縮前のデータに対して、予め設定されている複数の圧縮アルゴリズムのそれぞれにより圧縮して、圧縮前のデータ量と圧縮にかかった時間の比である圧縮コストを、前記複数の圧縮アルゴリズムのそれぞれについて見積もる圧縮コスト見積り手段と、
前記圧縮手段の圧縮前のデータに対して、予め設定されている前記複数の圧縮アルゴリズムのそれぞれにより圧縮したときの圧縮率を算出する圧縮率見積り手段と、
前記圧縮手段が前記圧縮対象のデータを圧縮する際に参照する前記辞書データの使用頻度が閾値より低下したときに、前記圧縮コスト見積り手段と前記圧縮率見積り手段に動作を指示することにより得られた、前記圧縮コスト見積り手段からの前記圧縮コストと前記圧縮率見積り手段からの前記圧縮率とに基づいて、前記複数の圧縮アルゴリズムのうち現在使用している圧縮アルゴリズムよりも圧縮率及び圧縮コストが高い圧縮アルゴリズムを前記圧縮手段で用いる圧縮アルゴリズムに選択する圧縮アルゴリズム切り替え手段と
を有するデータ圧縮システム。
(付記26)
前記圧縮アルゴリズム切り替え手段は、前記圧縮手段に入力される前記圧縮対象のデータのデータ流量を算出し、そのデータ流量が第1の閾値以下、又は前記第1の閾値より大なる第2の閾値以上となったときに、前記圧縮コスト見積り手段と前記圧縮率見積り手段に動作を指示することにより得られた、前記圧縮コスト見積り手段からの前記圧縮コストと前記圧縮率見積り手段からの前記圧縮率とに基づいて、前記データ流量が前記第1の閾値以下のときには前記複数の圧縮アルゴリズムのうち現在使用している圧縮アルゴリズムよりも少なくとも前記圧縮率の高い圧縮アルゴリズムを前記圧縮手段で用いる圧縮アルゴリズムに選択し、前記データ流量が前記第2の閾値以上のときには前記複数の圧縮アルゴリズムのうち現在使用している圧縮アルゴリズムよりも少なくとも前記圧縮コストの高い圧縮アルゴリズムを前記圧縮手段で用いる圧縮アルゴリズムに選択する付記25記載のデータ圧縮システム。
(付記27)
データ圧縮を行うコンピュータに、
逐次的に入力される圧縮対象のデータを、辞書データ記憶手段に記憶されている辞書データを参照しながら圧縮して、圧縮データを出力する圧縮ステップと、
前記圧縮ステップで前記圧縮対象のデータを圧縮する際に参照する前記辞書データの使用頻度を計算する辞書使用頻度監視ステップと、
前記辞書使用頻度監視ステップによる前記使用頻度の計算結果が設定された閾値より低下したときに、辞書の更新を指示する辞書更新タイミング制御ステップと、
前記圧縮ステップで得られた前記圧縮データを、圧縮前のデータに展開するデータ展開ステップと、
前記辞書更新タイミング制御ステップによる前記辞書の更新の指示に従って、前記データ展開ステップで得られた前記圧縮前のデータから新たな辞書データを構築して、前記辞書データ記憶手段に記憶されていた辞書データを、構築した前記新たな辞書データに置き換える辞書構築ステップと
を実行させるデータ圧縮プログラムを記憶するコンピュータプログラム記憶媒体。
(付記28)
前記辞書使用頻度監視ステップは、前記圧縮ステップで前記圧縮対象のデータを圧縮する際に用いた前記辞書データと、その辞書データ毎の使用回数と、前記圧縮対象のデータの総量とを入力として受け、各辞書データ毎に前記使用回数を前記圧縮対象のデータの総量で除算して、前記使用頻度の計算結果を得る付記27記載のデータ圧縮プログラムを記憶するコンピュータプログラム記憶媒体。
(付記29)
前記辞書更新タイミング制御ステップは、前記辞書使用頻度監視ステップにより得られた全ての前記辞書データの使用頻度の計算結果の合計値が前記閾値よりも小さいときに、前記辞書の更新を指示する付記27又は28記載のデータ圧縮プログラムを記憶するコンピュータプログラム記憶媒体。
(付記30)
データ圧縮を行うコンピュータに、
逐次的に入力される圧縮対象のデータを、辞書データ記憶手段に記憶されている辞書データを参照しながら圧縮して、圧縮データを出力する圧縮ステップと、
前記圧縮ステップで前記圧縮対象のデータを圧縮する際に参照する前記辞書データの使用頻度を計算する辞書使用頻度監視ステップと、
前記辞書使用頻度監視ステップによる前記使用頻度の計算結果が閾値より低下したときに、辞書の更新を指示する辞書更新タイミング制御ステップと、
前記圧縮ステップで得られる前記圧縮データを、圧縮前のデータに展開するデータ展開ステップと、
使用するリソースの空き容量を出力するリソース監視ステップと、
前記リソース監視ステップで出力される前記リソースの空き容量に応じて、前記辞書更新タイミング制御ステップで使用する前記閾値の値を可変設定するパラメータ調整ステップと、
前記辞書更新タイミング制御ステップによる前記辞書の更新の指示に従って、前記データ展開ステップで得られる前記圧縮前のデータから新たな辞書データを構築して、前記辞書データ記憶手段に記憶されていた辞書データを、構築した前記新たな辞書データに置き換える辞書構築ステップと
を実行させるデータ圧縮プログラムを記憶するコンピュータプログラム記憶媒体。
(付記31)
前記パラメータ調整ステップは、前記リソース監視ステップからの前記リソースの空き容量が大きいほど前記辞書更新タイミング制御ステップで使用する前記閾値を小さな値に可変設定し、前記リソースの空き容量が小さいほど前記閾値を大きな値に可変設定する付記30記載のデータ圧縮プログラムを記憶するコンピュータプログラム記憶媒体。
(付記32)
データ圧縮を行うコンピュータに、
逐次的に入力される圧縮対象のデータを、辞書データ記憶手段に記憶されている辞書データを参照しながら圧縮して、圧縮データを出力する圧縮ステップと、
前記圧縮ステップで前記圧縮対象のデータを圧縮する際に参照する前記辞書データの使用頻度を計算する辞書使用頻度監視ステップと、
前記辞書使用頻度監視ステップによる前記使用頻度の計算結果が閾値より低下したときに、前記圧縮データのデータ量と前記辞書データ記憶手段に記憶されている前記辞書データのデータ量とに応じた辞書構築コストを見積る辞書構築コスト見積りステップと、
前記辞書使用頻度監視ステップによる前記使用頻度の計算結果が閾値より低下したときに、前記辞書データを更新した際の圧縮率を見積る圧縮率見積りステップと、
前記辞書コストと前記圧縮率とを比較し、その比較結果に応じて新たな辞書の構築を行うか否かを決定する辞書更新タイミング制御ステップと、
前記圧縮ステップから出力される前記圧縮データを、圧縮前のデータに展開するデータ展開ステップと、
前記辞書更新タイミング制御ステップにより前記新たな辞書を構築する決定がなされたときに、前記データ展開ステップで得られる前記圧縮前のデータから新たな辞書データを構築して、前記辞書データ記憶手段に記憶されていた辞書データを、構築した前記新たな辞書データに置き換える辞書構築ステップと
を実行させるデータ圧縮プログラムを記憶するコンピュータプログラム記憶媒体。
(付記33)
前記圧縮率見積りステップは、前記圧縮データの一部を前記辞書データ記憶手段に記憶されている前記辞書データを用いて展開した圧縮前のデータと、その圧縮前のデータを用いて構築した新たな辞書を用いて圧縮した圧縮後のデータとの比率を前記圧縮率として見積る付記32記載のデータ圧縮プログラムを記憶するコンピュータプログラム記憶媒体。
(付記34)
前記辞書更新タイミング制御ステップは、前記辞書コストをスコア化した第1の値と、前記圧縮率をスコア化した第2の値とを比較し、前記第2の値の方が前記第1の値よりも大きいときにのみ、前記新たな辞書の構築を行うことを決定する付記32又は33記載のデータ圧縮プログラムを記憶するコンピュータプログラム記憶媒体。
(付記35)
前記データ展開ステップは、
前記圧縮手段から出力される前記圧縮データを記憶する圧縮データ記憶ステップと、
前記辞書更新タイミング制御ステップによる前記辞書の更新の指示に従って、前記圧縮データ記憶ステップで記憶された前記圧縮データを、前記辞書データ記憶手段に記憶されている前記辞書データを参照しながら展開して圧縮前のデータである展開データを得る圧縮データ展開ステップと、
前記圧縮データ展開ステップにより得られた前記展開データを記憶する展開データ記憶ステップと
を備え、前記辞書構築ステップは、前記圧縮データ展開ステップにより前記圧縮データ記憶ステップで記憶された全ての前記圧縮データの展開終了により動作を開始し、前記展開データ記憶で記憶された前記圧縮前のデータである前記展開データに基づき、前記新たな辞書データを構築する付記27乃至34のうち、いずれか一項記載のデータ圧縮プログラムを記憶するコンピュータプログラム記憶媒体。
(付記36)
データ圧縮を行うコンピュータに、
逐次的に入力される圧縮対象のデータを、辞書データ記憶手段に記憶されている辞書データを参照しながら圧縮して、圧縮データを出力する圧縮ステップと、
前記圧縮ステップで前記圧縮対象のデータを圧縮する際に参照する前記辞書データの使用頻度を各辞書データ毎に計算する辞書使用頻度監視ステップと、
前記辞書使用頻度監視ステップにより計算された各辞書データ毎の前記使用頻度のうち、設定された閾値より低下している使用頻度に対応した辞書データを抽出して出力する辞書更新タイミング制御ステップと、
前記辞書更新タイミング制御ステップにより得られた前記辞書データを用いて、前記圧縮で得られる前記圧縮データの一部を、圧縮前のデータに展開するデータ一部展開ステップと、
前記辞書更新タイミング制御ステップにより得られた前記辞書データを、前記辞書データ記憶手段に記憶されている複数の辞書データの中から削除する辞書データ削除ステップと、
前記データ一部展開ステップから出力される一部の前記圧縮前のデータから新たな辞書データを構築して、この新たな辞書データを前記辞書データ記憶手段に追記する辞書構築ステップと
を実行させるデータ圧縮プログラムを記憶するコンピュータプログラム記憶媒体。
(付記37)
前記データ一部展開ステップは、
前記圧縮ステップで得られた前記圧縮データを記憶する圧縮データ記憶ステップと、
前記辞書更新タイミング制御ステップで得られた前記辞書データを用いて、前記圧縮データ記憶ステップで記憶された前記圧縮データの一部を展開して一部の圧縮前のデータを得る圧縮データ一部展開ステップと、
前記圧縮データ一部展開ステップにより得られた前記一部の圧縮前のデータを記憶する展開データ記憶ステップと
を備え、
前記辞書構築ステップは、前記圧縮データ一部展開ステップにより前記圧縮データ記憶ステップで記憶された前記圧縮データの一部の展開終了により動作を開始し、前記展開データ記憶ステップで記憶された前記一部の圧縮前のデータに基づき、前記新たな辞書データを構築する付記36記載のデータ圧縮プログラムを記憶するコンピュータプログラム記憶媒体。
(付記38)
データ圧縮を行うコンピュータに、
逐次的に入力される圧縮対象のデータを、指定された圧縮アルゴリズムに従い圧縮して、圧縮データを出力する圧縮ステップと、
前記圧縮ステップによる圧縮前のデータに対して、予め設定されている複数の圧縮アルゴリズムのそれぞれにより圧縮して、圧縮前のデータ量と圧縮にかかった時間の比である圧縮コストを、前記複数の圧縮アルゴリズムのそれぞれについて見積る圧縮コスト見積りステップと、
前記圧縮ステップによる圧縮前のデータに対して、予め設定されている前記複数の圧縮アルゴリズムのそれぞれにより圧縮したときの圧縮率を算出する圧縮率見積りステップと、
前記圧縮ステップで前記圧縮対象のデータを圧縮する際に参照する辞書データの使用頻度が閾値より低下したときに、前記圧縮コスト見積りステップで得られた前記圧縮コストと前記圧縮率見積りステップで得られた前記圧縮率とに基づいて、前記複数の圧縮アルゴリズムのうち現在使用している圧縮アルゴリズムよりも圧縮率及び圧縮コストが高い圧縮アルゴリズムを前記圧縮ステップで用いる圧縮アルゴリズムに選択する圧縮アルゴリズム切り替えステップと
を実行させるデータ圧縮プログラムを記憶するコンピュータプログラム記憶媒体。
(付記39)
前記圧縮アルゴリズム切り替えステップは、前記圧縮ステップにより圧縮される前記圧縮対象のデータのデータ流量を算出し、そのデータ流量が第1の閾値以下、又は前記第1の閾値より大なる第2の閾値以上となったときに、前記圧縮コスト見積りステップで得られた前記圧縮コストと前記圧縮率見積りステップで得られた前記圧縮率とに基づいて、前記データ流量が前記第1の閾値以下のときには前記複数の圧縮アルゴリズムのうち現在使用している圧縮アルゴリズムよりも少なくとも前記圧縮率の高い圧縮アルゴリズムを前記圧縮ステップで用いる圧縮アルゴリズムに選択し、前記データ流量が前記第2の閾値以上のときには前記複数の圧縮アルゴリズムのうち現在使用している圧縮アルゴリズムよりも少なくとも前記圧縮コストの高い圧縮アルゴリズムを前記圧縮ステップで用いる圧縮アルゴリズムに選択する付記38記載のデータ圧縮プログラムを記憶するコンピュータプログラム記憶媒体。Embodiments according to the present invention will be described below with reference to the drawings.
(First embodiment)
FIG. 1 is a block diagram showing a configuration of a data compression apparatus (data compression system) according to the first embodiment of the present invention. The
The
In the first embodiment, the
The compression unit (compression unit) 102 has a function (data compression function) for compressing data by a lexicographic compression method based on dictionary data as described later stored in the
The BPE method is an algorithm for compressing target data by repeatedly replacing 2-byte data with high appearance frequency with 1-byte data. FIG. 2 is a diagram for explaining an example of data compression by the BPE method. The
For example, the
For example, when data D001 which is a character string as shown in FIG. 2 is input, the
In addition to the data compression function as described above, the
Further, as will be described later, when the dictionary data stored in the
Further, the
FIG. 7A shows an example of usage status data. FIG. 7B shows an example of total capacity data. In the example of FIG. 7A, the usage status data is data in which dictionary data and the number of uses thereof are paired. According to the usage status data of FIG. 7A, dictionary data that replaces “AB” with “G” is used ten times. The dictionary data for replacing “DE” with “H” has been used 20 times. Furthermore, dictionary data for replacing “GC” with “I” is used five times.
Further, according to FIG. 7B, the total capacity data is 153000 bytes. Note that the timing at which data is output from the
In the initial operation after the
The dictionary generation unit (dictionary generation unit) 109 has a function of generating dictionary data and a function of storing the generated dictionary data in the
For example, when receiving an instruction to start an operation (an operation instruction) from the
That is, first, the
The table shown in FIG. 3 is a table showing the number of appearances (count value) of two adjacent characters in the data D001. The number of appearances (count value) is a value obtained by the
Next, the
The
Further, the
Next, the
Further, the
Further, the
Furthermore, the
The monitoring unit (monitoring unit) 105 has a function of calculating the usage frequency of the dictionary data based on the usage status data and the total capacity data received from the
Usage frequency = (Number of times dictionary data is used) ÷ (Total data capacity) (1)
The
In the initial operation after the operation of the
When the timing control unit (timing control unit) 106 detects that the use frequency of the dictionary data is decreasing based on the use frequency data received from the
In the initial operation after the operation of the
The expansion unit (expansion unit) 107 has a function of expanding the compressed data stored in the
For example, here, the
The
Two characters (character string) corresponding to the data “B” at the head of the
By taking out “B”, the
By taking out “D”, the
Further, the
By extracting the data “A”, the top data in the
By extracting the data “B”, the top data of the
The
Note that, as described above, the
In the first embodiment, the data stored in the
Actually, it takes time to generate the dictionary data. For this reason, data may be input from the
Hereinafter, an operation example (data compression method) of the
First, when data is input from the data generation unit 110 (step S010), the
Next, the
As a result, the
Thereby, the
Thereby, the
Note that when the
For example, when data is input from the
As described above, according to the first embodiment, the
As described above, the
(Second Embodiment)
A second embodiment according to the present invention will be described below with reference to the drawings.
FIG. 14 is a block diagram illustrating the configuration of the data compression apparatus according to the second embodiment. In the description of the second embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, and redundant description thereof is omitted.
In addition to the configuration of the
The
Considering this, the
The
The adjustment unit (adjustment unit) 202 has a function of adjusting the threshold used by the
More specifically, for example, the
The
As described above, the
Next, operation examples of the
15 and 16 show the processing procedure of the computer program executed by the control device (CPU) 101 in the
For example, the
Here, an operation example for setting the threshold value will be described with reference to FIG. The operation in step S110 shown in FIG. 16 is the same as the operation in step S110 shown in FIG.
For example, the
If the
If the
Note that the flowchart (example of operation) shown in FIG. 16 only shows an example of a method for adjusting the threshold value, and the method for adjusting the threshold value is not limited to the method described above.
For example, the step of adjusting the threshold value may be more steps than the three steps of 80% or more, less than 80%, 50% or more, and less than 50%. Further, the threshold value to be adjusted is not limited to “0.5”, “0.7”, and “1.0”.
(Third embodiment)
A third embodiment according to the present invention will be described below with reference to the drawings.
FIG. 17 is a block diagram showing the configuration of the data compression apparatus in the third embodiment. In the description of the third embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, and redundant description thereof is omitted.
In addition to the configuration of the
As described in the second embodiment, the
Considering this, the
The cost estimation unit (cost estimation means) 301 has a function of estimating (estimating) a cost required for newly generating dictionary data. That is, when the
As described in the first embodiment, in order to generate a dictionary, first, the
For this reason, the
C = W1 × D1 + W2 × D2 (2)
In Equation (2), C represents the cost required for generating dictionary data. D1 indicates the amount of compressed data stored in the
When the
Formula (2) is an example of a calculation formula for calculating the cost. The
The compression
The data amount developed by the compression
Then, the compression
In the third embodiment, as described above, the compression
Unlike the first embodiment, when the
In addition, the
The determination can be made using, for example, data obtained by scoring the cost and data obtained by scoring the compression rate. Here, the following expression (3) is an expression for calculating data obtained by scoring the cost. Expression (4) is an expression for calculating data obtained by scoring the compression ratio.
S1 = W3 × C (3)
S2 = W4 × R (4)
In Expression (3), S1 represents data obtained by scoring costs. W3 represents a weight constant. C represents the cost calculated by the equation (2). Moreover, in Formula (4), S2 shows the data which scored the compression rate. W4 represents a weight constant. R represents the compression rate calculated by the compression
The
In other words, when the data (data that scores the cost) S1 is larger than the data (data that scores the compression rate) S2, the timing for newly generating dictionary data (updating dictionary data) is not. As a result, the
Hereinafter, an operation example of the
The flowchart of FIG. 18 shows the processing procedure of the computer program executed by the control device (CPU) 101 in the
In step S043 in FIG. 18, the
When receiving an instruction from the
Subsequently, the
Since the
(Fourth embodiment)
A fourth embodiment according to the present invention will be described below with reference to the drawings.
FIG. 19 is a block diagram showing the configuration of the data compression apparatus according to the fourth embodiment. In the description of the fourth embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, and redundant description thereof is omitted.
The data compression apparatus (data compression system) 400 according to the fourth embodiment further includes a deletion unit (dictionary data deletion unit) 403 in addition to the configuration of the first embodiment. Further, the
The
Therefore, the
For example, as described above, when it is determined that the dictionary data is to be updated, the
The partial expansion unit (partial expansion means) 402 has a function of expanding a part of the compressed data stored in the
Further, the dictionary data output from the
When the
The deletion unit (deletion unit) 403 has a function of deleting dictionary data corresponding to the dictionary data received from the
When the
As described above, the
Hereinafter, an operation example (data compression method) of the
The flowchart of FIG. 20 shows the processing procedure of the computer program executed by the control device (CPU) 101 in the
In step S045 of FIG. 20, the
Subsequently, upon receiving the instruction from the
In step S <b> 310, when the
On the other hand, the
Subsequently, the
As described above, the
(Fifth embodiment)
The fifth embodiment according to the present invention will be described below with reference to the drawings.
FIG. 21 is a block diagram showing the configuration of the data compression apparatus according to the fifth embodiment of the present invention. Note that in the description of the fifth embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, and redundant description thereof is omitted.
The
In each of the above-described embodiments, the
When the data is compressed by a compression algorithm other than the lexicographic compression algorithm, the
When the data is compressed by the lexicographic compression algorithm, the
Based on various data received from the
Data flow rate = {(total capacity of current input data) − (total capacity of previous input data)} ÷ {(current elapsed time) − (previous elapsed time)} (5)
The
Data flow rate = (Total capacity of current input data) / (Current elapsed time) (6)
The
The compression cost estimation unit (compression cost estimation means) 502 has a function of estimating (estimating) a cost required for compressing data. That is, the compression cost estimation unit 502 starts operation when receiving an instruction from the
The compression cost estimation unit 502 calculates the calculation amount AC for each of a plurality of preset compression algorithms for the uncompressed data generated as described above, using the following equation (7). .
AC = (data amount to be compressed) ÷ (time taken for compression) (7)
In Expression (7), “data amount to be compressed” indicates the data amount of the data before compression obtained by the compression cost estimation unit 502 expanding as described above. The “time required for compression” indicates the time required to compress the data to be compressed.
Then, the compression cost estimating unit 502 scores the calculation amount AC using, for example, the equation (8) or the equation (9), and outputs the scored data to the
SA1 = W11 × AC1 (8)
SA2 = W12 × AC2 (9)
In Expression (8), SA1 indicates data (compression cost score) obtained by scoring the cost required when data is compressed using the
Note that the method of obtaining scored data using the formula (8) or the formula (9) is merely an example of a method for scoring data. The method for scoring data by the compression cost estimation unit 502 is not particularly limited as long as it is a method for calculating using the calculation amount AC.
The compression rate estimation unit (compression rate estimation means) 503 has a function of estimating (estimating) the compression rate when new dictionary data is generated. That is, when the compression
SB1 = W13 × R1 (10)
SB2 = W14 × R2 (11)
In Expression (10), SB1 represents data (compression ratio score) obtained by scoring the compression ratio of data compressed using the
The technique for obtaining scored data by using formula (10) or formula (11) is merely an example of a technique for scoring data. The method of scoring data by the compression
The
Specifically, when the compression rate is reduced due to a decrease in the use frequency of dictionary data, it is necessary to switch to an algorithm with a higher compression rate. In this case, the
SC1 = W15 × SA1 + W16 × SB1 (12)
In Expression (12), SC1 represents an overall score corresponding to the
On the other hand, when the data flow rate becomes lower than or equal to the threshold value T1, the data flow rate is reduced. Therefore, it is preferable to employ the following compression algorithm. The compression algorithm is a high-load compression algorithm that requires time for compression, but is a compression algorithm having a high compression rate.
In such a case, the
The
In addition, when the data flow rate exceeds the threshold value T2, the data flow rate is large, so it is preferable to employ the following compression algorithm. The compression algorithm is a low-load compression algorithm even if the compression rate is low.
In such a case, the
The
The update unit (update unit) 504 starts the operation when receiving an instruction from the
Specifically, the compression algorithm information received from the
For example, the data stored in the
[First storage unit 103]
Compression algorithm A
ABCABABC
DACEFDAS
AXMCALDA
Compression algorithm B
ANSKANX
CIKADLAL
Compression algorithm C
DKLABNKC
ALKDKAJD
SLDKJALL
The same applies to the
Note that a compression algorithm that is first employed by the
Hereinafter, an operation example (data compression method) of the
The flowchart of FIG. 22 shows the processing procedure of the computer program executed by the control device (CPU) 101 in the
When the
Thereby, the compression cost estimation unit 502 and the compression
The
If it is determined that the compression algorithm is to be switched, the
As described above, according to the fifth embodiment, the
In addition, this invention is not limited to each above-mentioned embodiment, Various embodiment can be taken. For example, the data compression apparatus may have a configuration as shown in FIG. That is, the
In this
While the present invention has been described with reference to the embodiments, the present invention is not limited to the above embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.
This application claims priority based on Japanese Patent Application No. 2010-036806 filed on Feb. 23, 2010, the entire disclosure of which is incorporated herein.
Further, a part or all of the above-described embodiment can be described as in the following supplementary notes, but is not limited thereto.
(Appendix 1)
A compression step of compressing sequentially input data to be compressed while referring to dictionary data stored in the dictionary data storage means, and outputting compressed data;
A dictionary usage frequency monitoring step of calculating a usage frequency of the dictionary data referred to when compressing the data to be compressed in the compression step;
A dictionary update timing control step for instructing updating of the dictionary when the calculation result of the use frequency by the dictionary use frequency monitoring step falls below a set threshold;
A data expansion step of expanding the compressed data obtained in the compression step into data before compression;
Dictionary data stored in the dictionary data storage means by constructing new dictionary data from the uncompressed data obtained in the data expansion step in accordance with the dictionary update instruction in the dictionary update timing control step A dictionary construction step for replacing the new dictionary data with
Data compression method.
(Appendix 2)
The dictionary usage frequency monitoring step receives as input the dictionary data used when the compression target data is compressed in the compression step, the number of times each dictionary data is used, and the total amount of the compression target data. The data compression method according to
(Appendix 3)
The dictionary update timing control step instructs the updating of the dictionary when the total value of the calculation results of the usage frequencies of all the dictionary data obtained by the dictionary usage frequency monitoring step is smaller than the threshold value. Or the data compression method of 2.
(Appendix 4)
A compression step of compressing sequentially input data to be compressed while referring to dictionary data stored in the dictionary data storage means, and outputting compressed data;
A dictionary usage frequency monitoring step of calculating a usage frequency of the dictionary data referred to when compressing the data to be compressed in the compression step;
A dictionary update timing control step for instructing to update the dictionary when the calculation result of the use frequency by the dictionary use frequency monitoring step falls below a threshold;
A data expansion step of expanding the compressed data obtained in the compression step into data before compression;
A resource monitoring step that outputs the free capacity of the resource to be used;
A parameter adjustment step for variably setting the threshold value used in the dictionary update timing control step according to the free capacity of the resource output in the resource monitoring step;
According to the dictionary update instruction in the dictionary update timing control step, new dictionary data is constructed from the uncompressed data obtained in the data expansion step, and the dictionary data stored in the dictionary data storage means is stored. A dictionary construction step for replacing the constructed new dictionary data with
Data compression method.
(Appendix 5)
In the parameter adjustment step, the threshold used in the dictionary update timing control step is variably set to a smaller value as the free capacity of the resource from the resource monitoring step is larger, and the threshold is decreased as the free capacity of the resource is smaller. The data compression method according to
(Appendix 6)
A compression step of compressing sequentially input data to be compressed while referring to dictionary data stored in the dictionary data storage means, and outputting compressed data;
A dictionary usage frequency monitoring step of calculating a usage frequency of the dictionary data referred to when compressing the data to be compressed in the compression step;
When the calculation result of the use frequency by the dictionary use frequency monitoring step falls below a threshold value, a dictionary is constructed according to the data amount of the compressed data and the data amount of the dictionary data stored in the dictionary data storage means A dictionary construction cost estimation step for estimating the cost;
A compression rate estimation step for estimating a compression rate when the dictionary data is updated when a calculation result of the usage frequency by the dictionary usage frequency monitoring step falls below a threshold;
A dictionary update timing control step of comparing the dictionary cost with the compression ratio and determining whether or not to construct a new dictionary according to the comparison result;
A data expansion step of expanding the compressed data output from the compression step into data before compression;
When the decision to construct the new dictionary is made by the dictionary update timing control step, new dictionary data is constructed from the uncompressed data obtained in the data expansion step and stored in the dictionary data storage means A dictionary construction step of replacing the created dictionary data with the constructed new dictionary data;
Data compression method.
(Appendix 7)
The compression rate estimation step includes a new data constructed using uncompressed data obtained by decompressing a part of the compressed data using the dictionary data stored in the dictionary data storage means, and the pre-compressed data. The data compression method according to appendix 6, wherein a ratio with the compressed data compressed using a dictionary is estimated as the compression ratio.
(Appendix 8)
The dictionary update timing control step compares the first value obtained by scoring the dictionary cost with the second value obtained by scoring the compression rate, and the second value is the first value. 8. The data compression method according to appendix 6 or 7, wherein it is decided to construct the new dictionary only when it is larger than.
(Appendix 9)
The data expansion step includes:
A compressed data storage step for storing the compressed data output from the compression means;
In accordance with an instruction to update the dictionary in the dictionary update timing control step, the compressed data stored in the compressed data storage step is expanded and compressed with reference to the dictionary data stored in the dictionary data storage means. A compressed data decompression step for obtaining decompressed data which is the previous data;
A decompressed data storage step for storing the decompressed data obtained by the compressed data decompressing step;
The dictionary construction step starts when the decompression of all the compressed data stored in the compressed data storage step by the compressed data decompression step is completed, and the pre-compression stored in the decompressed data storage The data compression method according to any one of
(Appendix 10)
A compression step of compressing sequentially input data to be compressed while referring to dictionary data stored in the dictionary data storage means, and outputting compressed data;
A dictionary usage frequency monitoring step of calculating, for each dictionary data, the usage frequency of the dictionary data referred to when compressing the data to be compressed in the compression step;
A dictionary update timing control step for extracting and outputting dictionary data corresponding to a use frequency that is lower than a set threshold among the use frequencies for each dictionary data calculated by the dictionary use frequency monitoring step;
A partial data expansion step of expanding a portion of the compressed data obtained by the compression into data before compression using the dictionary data obtained by the dictionary update timing control step;
A dictionary data deletion step of deleting the dictionary data obtained by the dictionary update timing control step from a plurality of dictionary data stored in the dictionary data storage means;
A dictionary construction step of constructing new dictionary data from a part of the uncompressed data output from the data partial expansion step, and adding the new dictionary data to the dictionary data storage means;
Data compression method.
(Appendix 11)
The partial data expansion step includes:
A compressed data storage step for storing the compressed data obtained in the compression step;
Using the dictionary data obtained in the dictionary update timing control step, a part of the compressed data stored in the compressed data storage step is expanded to obtain a part of the compressed data. Steps,
A decompressed data storage step for storing the partial uncompressed data obtained by the compressed data partial decompression step;
With
The dictionary construction step starts operation when the expansion of a part of the compressed data stored in the compressed data storage step in the compressed data partial expansion step is completed, and the part stored in the expanded data storage step The data compression method according to
(Appendix 12)
A compression step of compressing sequentially inputted data to be compressed in accordance with a designated compression algorithm and outputting compressed data;
The data before compression in the compression step is compressed by each of a plurality of preset compression algorithms, and the compression cost, which is the ratio of the amount of data before compression and the time taken for compression, A compression cost estimation step for estimating each of the compression algorithms;
A compression rate estimation step of calculating a compression rate when the data before compression by the compression step is compressed by each of the plurality of compression algorithms set in advance;
When the use frequency of dictionary data to be referred to when compressing the data to be compressed in the compression step is lower than a threshold value, the compression cost obtained in the compression cost estimation step and the compression rate estimation step are obtained. A compression algorithm switching step for selecting, based on the compression rate, a compression algorithm having a compression rate and a compression cost higher than a compression algorithm currently used among the plurality of compression algorithms as a compression algorithm used in the compression step;
Data compression method.
(Appendix 13)
The compression algorithm switching step calculates a data flow rate of the compression target data compressed by the compression step, and the data flow rate is equal to or lower than a first threshold value or equal to or higher than a second threshold value greater than the first threshold value. When the data flow rate is equal to or less than the first threshold, based on the compression cost obtained in the compression cost estimation step and the compression rate obtained in the compression rate estimation step, A compression algorithm having at least a higher compression ratio than the currently used compression algorithm is selected as a compression algorithm to be used in the compression step, and the plurality of compressions when the data flow rate is equal to or greater than the second threshold. Among the algorithms, the compression cost is at least higher than the compression algorithm currently used. Data compression method according to Note 12, wherein the selecting the compression algorithm to use compression algorithms in the compression step.
(Appendix 14)
Dictionary data storage means for storing dictionary data for compression;
Compression means for compressing sequentially inputted data to be compressed with reference to the dictionary data stored in the dictionary data storage means, and outputting compressed data;
Data expansion means for expanding the compressed data output from the compression means into data before compression;
Dictionary use frequency monitoring means for calculating the use frequency of the dictionary data referred to when the compression means compresses the data to be compressed;
Dictionary update timing control means for instructing updating of the dictionary when the calculation result of the use frequency by the dictionary use frequency monitoring means falls below a set threshold;
In accordance with the dictionary update instruction output from the dictionary update timing control means, new dictionary data is constructed from the uncompressed data output from the data expansion means and stored in the dictionary data storage means. Dictionary construction means for replacing the newly created dictionary data with the constructed new dictionary data;
A data compression system.
(Appendix 15)
The dictionary usage frequency monitoring means includes the compression means that stores the dictionary data used when the compression means compresses the compression target data, the number of times each dictionary data is used, and the total amount of the compression target data. 15. The data compression system according to
(Appendix 16)
The dictionary update timing control means instructs update of the dictionary when the total value of the calculation results of the usage frequencies of all the dictionary data input from the dictionary usage frequency monitoring means is smaller than the threshold value. Or 15. The data compression system according to 15.
(Appendix 17)
Dictionary data storage means for storing dictionary data for compression;
Compression means for compressing sequentially inputted data to be compressed with reference to the dictionary data stored in the dictionary data storage means, and outputting compressed data;
Data expansion means for expanding the compressed data output from the compression means into data before compression;
Dictionary use frequency monitoring means for calculating the use frequency of the dictionary data referred to when the compression means compresses the data to be compressed;
Dictionary update timing control means for instructing dictionary update when the use frequency calculation result by the dictionary use frequency monitoring means falls below a threshold;
Resource monitoring means for outputting the free capacity of the resource to be used;
Parameter adjustment means for variably setting the threshold value used in the dictionary update timing control means according to the free space of the resource from the resource monitoring means;
In accordance with the dictionary update instruction output from the dictionary update timing control means, new dictionary data is constructed from the uncompressed data output from the data expansion means and stored in the dictionary data storage means. Dictionary construction means for replacing the newly created dictionary data with the constructed new dictionary data;
A data compression system.
(Appendix 18)
The parameter adjustment means variably sets the threshold used by the dictionary update timing control means to a smaller value as the free capacity of the resource from the resource monitoring means is larger, and the threshold is set as the free capacity of the resource is smaller. The data compression system according to
(Appendix 19)
Dictionary data storage means for storing dictionary data for compression;
Compression means for compressing sequentially inputted data to be compressed with reference to the dictionary data stored in the dictionary data storage means, and outputting compressed data;
Data expansion means for expanding the compressed data output from the compression means into data before compression;
Dictionary use frequency monitoring means for calculating the use frequency of the dictionary data referred to when the compression means compresses the data to be compressed;
Dictionary construction cost estimating means for estimating a dictionary construction cost according to the data amount of the compressed data and the data amount of the dictionary data stored in the dictionary data storage means;
Compression rate estimating means for estimating a compression rate when the dictionary data is updated;
The dictionary construction cost obtained by instructing each of the dictionary construction cost estimation unit and the compression rate estimation unit when the calculation result of the usage frequency by the dictionary usage frequency monitoring unit falls below a threshold value. A dictionary update timing control unit that compares the dictionary cost from the construction unit with the compression rate from the compression rate estimation unit and determines whether or not to construct a new dictionary according to the comparison result;
When the decision to construct the new dictionary is made by the dictionary update timing control means, new dictionary data is constructed from the uncompressed data output from the data expansion means, and stored in the dictionary data storage means. Dictionary construction means for replacing stored dictionary data with the constructed new dictionary data;
A data compression system.
(Appendix 20)
The compression rate estimation means includes a new data constructed using uncompressed data obtained by decompressing a part of the compressed data using the dictionary data stored in the dictionary data storage means, and the data before the compression.
(Appendix 21)
The dictionary update timing control means compares the first value obtained by scoring the dictionary cost from the dictionary construction cost construction means and the second value obtained by scoring the compression ratio from the compression ratio estimation means. The data compression system according to
(Appendix 22)
The data expansion means is
Compressed data storage means for storing the compressed data output from the compression means;
In accordance with the dictionary update instruction output from the dictionary update timing control means, the compressed data stored in the compressed data storage means is referred to the dictionary data stored in the dictionary data storage means. Compressed data decompression means for decompressing and obtaining decompressed data that is data before compression;
Decompressed data storage means for storing the decompressed data obtained by the compressed data decompressing means;
And the dictionary construction means starts operation when the compressed data expansion means ends expansion of all the compressed data stored in the compressed data storage means, and is stored in the expanded data storage means. The data compression system according to any one of
(Appendix 23)
Dictionary data storage means for storing a plurality of dictionary data for compression;
Compression means for compressing sequentially inputted data to be compressed with reference to the dictionary data stored in the dictionary data storage means, and outputting compressed data;
Dictionary use frequency monitoring means for calculating the use frequency of the dictionary data referred to when the compression means compresses the data to be compressed for each dictionary data;
A dictionary update timing control means for extracting and outputting dictionary data corresponding to a use frequency that is lower than a set threshold value among the use frequencies for each dictionary data by the dictionary use frequency monitoring means;
Data partial expansion means for expanding a part of the compressed data output from the compression means into data before compression using the dictionary data output from the dictionary update timing control means;
Dictionary data deletion means for deleting the dictionary data output from the dictionary update timing control means from a plurality of dictionary data stored in the dictionary data storage means;
Dictionary construction means for constructing new dictionary data from a part of the uncompressed data output from the data partial expansion means, and adding the new dictionary data to the dictionary data storage means;
A data compression system.
(Appendix 24)
The data partial expansion means includes
Compressed data storage means for storing the compressed data output from the compression means;
Using the dictionary data output from the dictionary update timing control means, a part of the compressed data that expands a part of the compressed data stored in the compressed data storage means to obtain a part of the compressed data Deployment means;
Decompressed data storage means for storing the partial uncompressed data obtained by the compressed data partial decompression means;
With
The dictionary construction means starts its operation upon completion of expansion of a part of the compressed data stored in the compressed data storage means by the compressed data partial expansion means, and is stored in the expanded data storage means 24. The data compression system according to appendix 23, wherein the new dictionary data is constructed based on a part of the data before compression.
(Appendix 25)
Dictionary data storage means for storing dictionary data used when the compression algorithm is lexicographic;
Compression means for sequentially compressing data to be compressed according to a designated compression algorithm and outputting compressed data;
The data before compression of the compression means is compressed by each of a plurality of preset compression algorithms, and the compression cost, which is the ratio of the amount of data before compression and the time taken for compression, A compression cost estimation means for estimating each of the compression algorithms;
Compression ratio estimating means for calculating a compression ratio when the data before compression by the compression means is compressed by each of the plurality of compression algorithms set in advance;
Obtained by instructing the compression cost estimating means and the compression rate estimating means to operate when the use frequency of the dictionary data referred to when the compressing means compresses the data to be compressed falls below a threshold value. Further, based on the compression cost from the compression cost estimation unit and the compression rate from the compression rate estimation unit, the compression rate and the compression cost are higher than the compression algorithm currently used among the plurality of compression algorithms. Compression algorithm switching means for selecting a high compression algorithm as the compression algorithm used in the compression means;
A data compression system.
(Appendix 26)
The compression algorithm switching unit calculates a data flow rate of the compression target data input to the compression unit, and the data flow rate is equal to or lower than a first threshold value or higher than a second threshold value greater than the first threshold value. And the compression cost from the compression cost estimation unit and the compression rate from the compression rate estimation unit obtained by instructing the compression cost estimation unit and the compression rate estimation unit to operate. Based on the above, when the data flow rate is less than or equal to the first threshold, a compression algorithm having at least a higher compression rate than the currently used compression algorithm is selected as the compression algorithm to be used by the compression means, When the data flow rate is equal to or higher than the second threshold, the data compression flow is currently used among the plurality of compression algorithms. Data compression system according to Note 25, wherein selecting a compression algorithm used in the compression means at least higher compression algorithm of said compression cost than contraction algorithm.
(Appendix 27)
To the computer that performs data compression,
A compression step of compressing sequentially input data to be compressed while referring to dictionary data stored in the dictionary data storage means, and outputting compressed data;
A dictionary usage frequency monitoring step of calculating a usage frequency of the dictionary data referred to when compressing the data to be compressed in the compression step;
A dictionary update timing control step for instructing updating of the dictionary when the calculation result of the use frequency by the dictionary use frequency monitoring step falls below a set threshold;
A data expansion step of expanding the compressed data obtained in the compression step into data before compression;
Dictionary data stored in the dictionary data storage means by constructing new dictionary data from the uncompressed data obtained in the data expansion step in accordance with the dictionary update instruction in the dictionary update timing control step A dictionary construction step for replacing the new dictionary data with
A computer program storage medium for storing a data compression program for executing the program.
(Appendix 28)
The dictionary usage frequency monitoring step receives as input the dictionary data used when the compression target data is compressed in the compression step, the number of times each dictionary data is used, and the total amount of the compression target data. 28. A computer program storage medium for storing the data compression program according to appendix 27, wherein the number of uses is divided by the total amount of data to be compressed for each dictionary data to obtain the calculation result of the use frequency.
(Appendix 29)
The dictionary update timing control step instructs the updating of the dictionary when the total value of the calculation results of the usage frequencies of all the dictionary data obtained by the dictionary usage frequency monitoring step is smaller than the threshold value. Or a computer program storage medium for storing the data compression program according to 28.
(Appendix 30)
To the computer that performs data compression,
A compression step of compressing sequentially input data to be compressed while referring to dictionary data stored in the dictionary data storage means, and outputting compressed data;
A dictionary usage frequency monitoring step of calculating a usage frequency of the dictionary data referred to when compressing the data to be compressed in the compression step;
A dictionary update timing control step for instructing to update the dictionary when the calculation result of the use frequency by the dictionary use frequency monitoring step falls below a threshold;
A data expansion step of expanding the compressed data obtained in the compression step into data before compression;
A resource monitoring step that outputs the free capacity of the resource to be used;
A parameter adjustment step for variably setting the threshold value used in the dictionary update timing control step according to the free capacity of the resource output in the resource monitoring step;
According to the dictionary update instruction in the dictionary update timing control step, new dictionary data is constructed from the uncompressed data obtained in the data expansion step, and the dictionary data stored in the dictionary data storage means is stored. A dictionary construction step for replacing the constructed new dictionary data with
A computer program storage medium for storing a data compression program for executing the program.
(Appendix 31)
In the parameter adjustment step, the threshold used in the dictionary update timing control step is variably set to a smaller value as the free capacity of the resource from the resource monitoring step is larger, and the threshold is decreased as the free capacity of the resource is smaller. A computer program storage medium for storing the data compression program according to attachment 30 that is variably set to a large value.
(Appendix 32)
To the computer that performs data compression,
A compression step of compressing sequentially input data to be compressed while referring to dictionary data stored in the dictionary data storage means, and outputting compressed data;
A dictionary usage frequency monitoring step of calculating a usage frequency of the dictionary data referred to when compressing the data to be compressed in the compression step;
When the calculation result of the use frequency by the dictionary use frequency monitoring step falls below a threshold value, a dictionary is constructed according to the data amount of the compressed data and the data amount of the dictionary data stored in the dictionary data storage means A dictionary construction cost estimation step for estimating the cost;
A compression rate estimation step for estimating a compression rate when the dictionary data is updated when a calculation result of the usage frequency by the dictionary usage frequency monitoring step falls below a threshold;
A dictionary update timing control step of comparing the dictionary cost with the compression ratio and determining whether or not to construct a new dictionary according to the comparison result;
A data expansion step of expanding the compressed data output from the compression step into data before compression;
When the decision to construct the new dictionary is made by the dictionary update timing control step, new dictionary data is constructed from the uncompressed data obtained in the data expansion step and stored in the dictionary data storage means A dictionary construction step of replacing the created dictionary data with the constructed new dictionary data;
A computer program storage medium for storing a data compression program for executing the program.
(Appendix 33)
The compression rate estimation step includes a new data constructed using uncompressed data obtained by decompressing a part of the compressed data using the dictionary data stored in the dictionary data storage means, and the pre-compressed data. 33. A computer program storage medium for storing a data compression program according to supplementary note 32 for estimating a ratio of the compressed data compressed using a dictionary as the compression ratio.
(Appendix 34)
The dictionary update timing control step compares the first value obtained by scoring the dictionary cost with the second value obtained by scoring the compression rate, and the second value is the first value. 34. A computer program storage medium for storing the data compression program according to appendix 32 or 33, which determines that the new dictionary is to be constructed only when it is larger than.
(Appendix 35)
The data expansion step includes:
A compressed data storage step for storing the compressed data output from the compression means;
In accordance with an instruction to update the dictionary in the dictionary update timing control step, the compressed data stored in the compressed data storage step is expanded and compressed with reference to the dictionary data stored in the dictionary data storage means. A compressed data decompression step for obtaining decompressed data which is the previous data;
A decompressed data storage step for storing the decompressed data obtained by the compressed data decompressing step;
The dictionary construction step starts when the decompression of all the compressed data stored in the compressed data storage step by the compressed data decompression step is completed, and the pre-compression stored in the decompressed data storage 35. A computer program storage medium for storing the data compression program according to any one of supplementary notes 27 to 34 for constructing the new dictionary data based on the expanded data that is data.
(Appendix 36)
To the computer that performs data compression,
A compression step of compressing sequentially input data to be compressed while referring to dictionary data stored in the dictionary data storage means, and outputting compressed data;
A dictionary usage frequency monitoring step of calculating, for each dictionary data, the usage frequency of the dictionary data referred to when compressing the data to be compressed in the compression step;
A dictionary update timing control step for extracting and outputting dictionary data corresponding to a use frequency that is lower than a set threshold among the use frequencies for each dictionary data calculated by the dictionary use frequency monitoring step;
A partial data expansion step of expanding a portion of the compressed data obtained by the compression into data before compression using the dictionary data obtained by the dictionary update timing control step;
A dictionary data deletion step of deleting the dictionary data obtained by the dictionary update timing control step from a plurality of dictionary data stored in the dictionary data storage means;
A dictionary construction step of constructing new dictionary data from a part of the uncompressed data output from the data partial expansion step, and adding the new dictionary data to the dictionary data storage means;
A computer program storage medium for storing a data compression program for executing the program.
(Appendix 37)
The partial data expansion step includes:
A compressed data storage step for storing the compressed data obtained in the compression step;
Using the dictionary data obtained in the dictionary update timing control step, a part of the compressed data stored in the compressed data storage step is expanded to obtain a part of the compressed data. Steps,
A decompressed data storage step for storing the partial uncompressed data obtained by the compressed data partial decompression step;
With
The dictionary construction step starts operation when the expansion of a part of the compressed data stored in the compressed data storage step in the compressed data partial expansion step is completed, and the part stored in the expanded data storage step 37. A computer program storage medium for storing the data compression program according to appendix 36 for constructing the new dictionary data based on the data before compression.
(Appendix 38)
To the computer that performs data compression,
A compression step of compressing sequentially inputted data to be compressed in accordance with a designated compression algorithm and outputting compressed data;
The data before compression in the compression step is compressed by each of a plurality of preset compression algorithms, and the compression cost, which is the ratio of the amount of data before compression and the time taken for compression, A compression cost estimation step for estimating each of the compression algorithms;
A compression rate estimation step of calculating a compression rate when the data before compression by the compression step is compressed by each of the plurality of compression algorithms set in advance;
When the use frequency of dictionary data to be referred to when compressing the data to be compressed in the compression step is lower than a threshold value, the compression cost obtained in the compression cost estimation step and the compression rate estimation step are obtained. A compression algorithm switching step for selecting, based on the compression rate, a compression algorithm having a compression rate and a compression cost higher than a compression algorithm currently used among the plurality of compression algorithms as a compression algorithm used in the compression step;
A computer program storage medium for storing a data compression program for executing the program.
(Appendix 39)
The compression algorithm switching step calculates a data flow rate of the compression target data compressed by the compression step, and the data flow rate is equal to or lower than a first threshold value or equal to or higher than a second threshold value greater than the first threshold value. When the data flow rate is equal to or less than the first threshold, based on the compression cost obtained in the compression cost estimation step and the compression rate obtained in the compression rate estimation step, A compression algorithm having at least a higher compression ratio than the currently used compression algorithm is selected as a compression algorithm to be used in the compression step, and the plurality of compressions when the data flow rate is equal to or greater than the second threshold. Among the algorithms, the compression cost is at least higher than the compression algorithm currently used. Computer program storage medium for storing data compression program according to Note 38, wherein the selecting the compression algorithm to use compression algorithms in the compression step.
本発明は、サーバが出力するログデータやセンサが出力するデータ等の、逐次的に発生するデータを辞書式圧縮法によって圧縮する装置(システム)には有効である。 The present invention is effective for an apparatus (system) that compresses sequentially generated data such as log data output from a server or data output from a sensor by a lexicographic compression method.
100、200、300、400、500 データ圧縮装置
102 圧縮部
105 監視部
106,203,303,401 タイミング制御部
107 展開部
109 辞書生成部
201 リソース監視部
202 調整部
301 コスト見積り部
302,503 圧縮率見積り部
402 部分展開部
403 削除部
501 切り替え部
502 圧縮コスト見積り部
504 更新部100, 200, 300, 400, 500
Claims (9)
前記圧縮手段が前記データを圧縮する場合における前記辞書データの使用頻度を算出する監視手段と、
算出した前記使用頻度が予め設定された閾値よりも低下した場合に、前記辞書データを更新する指示を出すタイミング制御手段と、
前記指示を受けて、前記圧縮手段が圧縮したデータに基づいて前記辞書データを新規に生成する辞書生成手段と
を有するデータ圧縮装置。Compression means for compressing data to be compressed based on dictionary data given in advance;
Monitoring means for calculating the frequency of use of the dictionary data when the compression means compresses the data;
Timing control means for issuing an instruction to update the dictionary data when the calculated use frequency falls below a preset threshold;
A data compression apparatus comprising: a dictionary generation unit that receives the instruction and newly generates the dictionary data based on the data compressed by the compression unit.
前記辞書生成手段は、前記展開手段が展開したデータを利用して、前記辞書データを新規に生成する請求項1記載のデータ圧縮装置。Expansion means for expanding the data compressed by the compression means using the dictionary data;
The data compression apparatus according to claim 1, wherein the dictionary generation unit newly generates the dictionary data using data expanded by the expansion unit.
前記リソースの空き容量に応じて前記タイミング制御手段が使用する前記閾値を可変設定する調整手段と
を、さらに、有する請求項1又は請求項2又は請求項3記載のデータ圧縮装置。Resource monitoring means for detecting a free capacity of a resource for storing the data;
4. The data compression apparatus according to claim 1, further comprising an adjustment unit that variably sets the threshold value used by the timing control unit in accordance with an available capacity of the resource.
前記タイミング制御手段は、前記閾値に加えて、前記見積もり手段により推定された前記コストと前記圧縮率をも利用して、前記辞書データを更新する前記指示を出すか否かを判断する請求項1乃至請求項4の何れか一つに記載のデータ圧縮装置。Estimating means for estimating a cost required for newly generating the dictionary data and a compression ratio of the data compressed by the compression means based on the new dictionary data when the dictionary data is newly generated In addition, and
2. The timing control unit determines whether to issue the instruction to update the dictionary data by using the cost and the compression rate estimated by the estimation unit in addition to the threshold value. The data compression device according to any one of claims 4 to 4.
前記圧縮コストと前記圧縮率に基づいて、前記複数の圧縮アルゴリズムの中から切り替え後の圧縮アルゴリズムを選択する切り替え手段と
を、さらに、有する請求項1乃至請求項4の何れか一つに記載のデータ圧縮装置。For each of a plurality of preset compression algorithms, an estimation means for estimating a compression cost that is a ratio between the amount of data before compression and a time required for compression, and estimating a compression rate of the compressed data;
The switching unit according to any one of claims 1 to 4, further comprising switching means for selecting a compressed compression algorithm from among the plurality of compression algorithms based on the compression cost and the compression ratio. Data compression device.
前記辞書生成手段は、前記圧縮手段が圧縮した前記データの一部を利用して前記辞書データを新規に生成する請求項1乃至請求項6の何れか一つに記載のデータ圧縮装置。A deletion unit that deletes the dictionary data whose usage frequency is lower than a predetermined value from a storage unit that stores a plurality of the dictionary data;
7. The data compression apparatus according to claim 1, wherein the dictionary generation unit newly generates the dictionary data using a part of the data compressed by the compression unit.
前記データを圧縮する場合における前記辞書データの使用頻度を算出し、
算出した前記使用頻度が予め設定された閾値よりも低下した場合に、前記辞書データを更新する指示を出し、
前記指示を受けて、圧縮した前記データに基づいて前記辞書データを新規に生成するデータ圧縮方法。Compress data to be compressed based on dictionary data given in advance,
Calculating the frequency of use of the dictionary data when compressing the data;
When the calculated usage frequency falls below a preset threshold value, an instruction to update the dictionary data is issued,
A data compression method for receiving the instruction and newly generating the dictionary data based on the compressed data.
前記データを圧縮する場合における前記辞書データの使用頻度を算出する処理と、
算出した前記使用頻度が予め設定された閾値よりも低下した場合に、前記辞書データを更新する指示を出す処理と、
前記指示を受けて、圧縮した前記データに基づいて前記辞書データを新規に生成する処理とをデータ圧縮装置に実行させるコンピュータプログラムを記憶しているプログラム記憶媒体。A process of compressing data to be compressed based on dictionary data given in advance;
A process of calculating the use frequency of the dictionary data when compressing the data;
A process of issuing an instruction to update the dictionary data when the calculated use frequency falls below a preset threshold;
A program storage medium that stores a computer program that causes the data compression apparatus to execute a process of generating the dictionary data based on the compressed data in response to the instruction.
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010036806 | 2010-02-23 | ||
JP2010036806 | 2010-02-23 | ||
PCT/JP2011/054061 WO2011105463A1 (en) | 2010-02-23 | 2011-02-17 | Data compression device, data compression method and program storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
JPWO2011105463A1 true JPWO2011105463A1 (en) | 2013-06-20 |
Family
ID=44506864
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012501836A Withdrawn JPWO2011105463A1 (en) | 2010-02-23 | 2011-02-17 | Data compression apparatus, data compression method, and program storage medium |
Country Status (2)
Country | Link |
---|---|
JP (1) | JPWO2011105463A1 (en) |
WO (1) | WO2011105463A1 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8922414B2 (en) * | 2013-02-12 | 2014-12-30 | Cortica, Ltd. | Multi-layer system for symbol-space based compression of patterns |
JP6168595B2 (en) * | 2013-06-04 | 2017-07-26 | 国立大学法人 筑波大学 | Data compressor and data decompressor |
JP6873346B2 (en) * | 2019-02-28 | 2021-05-19 | 三菱電機株式会社 | Communication devices, communication systems, communication methods and communication programs |
US11122095B2 (en) | 2019-09-23 | 2021-09-14 | Netapp, Inc. | Methods for dictionary-based compression and devices thereof |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3053656B2 (en) * | 1991-02-26 | 2000-06-19 | 富士通株式会社 | Dictionary registration method in data compression |
JP3056268B2 (en) * | 1991-03-19 | 2000-06-26 | 富士通株式会社 | Dictionary registration method for data compression / decompression |
JP3058931B2 (en) * | 1991-04-01 | 2000-07-04 | 富士通株式会社 | Dictionary registration method for data compression / decompression |
JP2954749B2 (en) * | 1991-07-19 | 1999-09-27 | 富士通株式会社 | Data compression method |
JPH05298061A (en) * | 1992-04-22 | 1993-11-12 | Fujitsu Ltd | System and device for compressing and restoring data |
JPH08204581A (en) * | 1995-01-27 | 1996-08-09 | Toshiba Corp | Data compressing and restoring mechanism |
JPH08297564A (en) * | 1995-04-25 | 1996-11-12 | Fuji Xerox Co Ltd | Data compression device |
-
2011
- 2011-02-17 WO PCT/JP2011/054061 patent/WO2011105463A1/en active Application Filing
- 2011-02-17 JP JP2012501836A patent/JPWO2011105463A1/en not_active Withdrawn
Also Published As
Publication number | Publication date |
---|---|
WO2011105463A1 (en) | 2011-09-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9325345B2 (en) | Increasing speed of data compression | |
KR100894002B1 (en) | Device and data method for selective compression and decompression and data format for compressed data | |
WO2014147672A1 (en) | Compression device, compression method, dictionary generation device, dictionary generation method, expansion device, expansion method, expansion program, and information processing system | |
KR101074010B1 (en) | Block unit data compression and decompression method and apparatus thereof | |
WO2011105463A1 (en) | Data compression device, data compression method and program storage medium | |
JP5812188B2 (en) | Program, compressed data generation method, decompression method, information processing apparatus, and recording medium | |
JP2014183551A (en) | Data compression device, data compression method, data compression program, data decompression device, data decompression method, and data decompression program | |
KR20160077117A (en) | System and method for providing multi-user power saving codebook optimization | |
US20150161158A1 (en) | Method of compressing compression target data, method of decompressing data in file, and system | |
CN102270262A (en) | Method and device for compressing and decompressing analog waveform of integrated circuit | |
JP2005094652A (en) | Data compressing apparatus, data decompressing apparatus and data management apparatus | |
WO2014097359A1 (en) | Compression program, compression method, compression device and system | |
JP6835285B1 (en) | Data compression method, data compression device, data compression program, data decompression method, data decompression device and data decompression program | |
US20150248432A1 (en) | Method and system | |
EP3144926B1 (en) | Waveform data structure for musical instrument with scalable storage-frame length depending on tones . | |
JP2013101470A (en) | Database compression apparatus | |
JP6645013B2 (en) | Encoding program, encoding method, encoding device, and decompression method | |
US20190028571A1 (en) | Data transmission method and data transmission device | |
JP2016170750A (en) | Data management program, information processor and data management method | |
CN113377391B (en) | Method, device, equipment and medium for making and burning image file | |
Govinda et al. | Storage optimization in cloud environment using compression algorithm | |
WO2014030180A1 (en) | Storage program, storage method, storage device, decompression program, decompression method, and decompression device | |
US9496895B2 (en) | Compression method and decompression method | |
KR102195239B1 (en) | Method for data compression transmission considering bandwidth in hadoop cluster, recording medium and device for performing the method | |
JP2006065424A (en) | Data storage system, data storage device, similar file recording method to be used for the same and program therefor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20140513 |