JP3319391B2 - High-speed data alignment device - Google Patents
High-speed data alignment deviceInfo
- Publication number
- JP3319391B2 JP3319391B2 JP15640598A JP15640598A JP3319391B2 JP 3319391 B2 JP3319391 B2 JP 3319391B2 JP 15640598 A JP15640598 A JP 15640598A JP 15640598 A JP15640598 A JP 15640598A JP 3319391 B2 JP3319391 B2 JP 3319391B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- distribution
- distribution table
- status
- speed data
- 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.)
- Expired - Fee Related
Links
- 238000010586 diagram Methods 0.000 description 5
- 238000011835 investigation Methods 0.000 description 5
- 238000010606 normalization Methods 0.000 description 5
- 238000007405 data analysis Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 238000000034 method Methods 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Description
【0001】[0001]
【発明の属する技術分野】本発明は、データの分布状況
を予め調べておくことによって適切なデータをクイック
ソートのための基準値とし、高速にデータを整列する高
速データ整列装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a high-speed data sorting apparatus which sorts data at a high speed by examining a distribution state of data in advance and setting appropriate data as a reference value for quick sorting.
【0002】[0002]
【従来の技術】クイックソートは、高速なソートとして
広く一般的に使用されている方法である。クイックソー
トでは、あるデータを境(本発明においては、基準値と
呼ぶ)として、それより大きいデータと、そうでないも
のとに2分割していくことから、その基準値の選定によ
って整列のスピードが大きく影響を受ける。基準値は、
できるだけデータの中央値である方が無駄な比較や移動
が減り、整列が高速になる。2. Description of the Related Art Quick sorting is a method that is widely and generally used as high-speed sorting. In the quick sort, certain data is used as a boundary (referred to as a reference value in the present invention), and data is divided into larger data and non-larger data. Significantly affected. The reference value is
Use of the median value of the data as much as possible reduces unnecessary comparisons and movements, and speeds up alignment.
【0003】[0003]
【発明が解決しようとする課題】しかしながら、従来技
術では、単純にデータ数の半分の順位にあるデータを基
準値としていたため、データの並びによっては、その高
速性が発揮できないという問題点があった。また、基準
値を正確に算出しようとすると、データの分布状況を把
握するためにデータ数に依存したメモリが必要となり、
ソート自身の為に必要なメモリ資源を使用してしまい、
却ってソート時間が遅くなるという問題があった。However, in the prior art, since data having a rank of half the number of data is simply used as a reference value, there is a problem that high speed cannot be exhibited depending on the arrangement of data. Was. Also, when trying to calculate the reference value accurately, a memory that depends on the number of data is needed to understand the distribution state of the data,
Uses the memory resources needed for the sort itself,
On the contrary, there was a problem that the sorting time was delayed.
【0004】この発明は上述した事情に鑑みてなされた
もので、大まかな精度でデータの分布状況を保持するこ
とによって、クイックソートを効率よく実行して高速に
整列を行うことができ、また、整列以外にもデータの分
析に役立てることができる高速データ整列装置を提供す
ることを目的とする。[0004] The present invention has been made in view of the above-described circumstances. By maintaining the distribution state of data with rough accuracy, quick sorting can be executed efficiently to perform high-speed sorting. It is an object of the present invention to provide a high-speed data alignment device that can be used for data analysis other than alignment.
【0005】[0005]
【課題を解決するための手段】上述した問題点を解決す
るために、請求項1記載の発明では、データ数の半分の
順位にあるデータを基準値として並び替えを行う高速デ
ータ整列装置において、データの分布状況を調べるデー
タ分布状況調査手段と、前記データ分布状況調査手段に
よるデータ分布状況に基づいてクイックソートを行うク
イックソート手段とを具備することを特徴とする。According to the first aspect of the present invention, there is provided a high-speed data sorting apparatus for rearranging data having a rank which is half the number of data as a reference value. It is characterized by comprising a data distribution status investigating means for examining a data distribution status, and quick sorting means for performing a quick sort based on the data distribution status by the data distribution status investigating means.
【0006】また、請求項2記載の発明では、請求項1
記載の高速データ整列装置において、前記データ分布状
況調査手段は、データの分布状況を把握するための分布
テーブルを作成する分布テーブル作成手段と、前記分布
テーブル作成手段により作成された分布テーブルにデー
タを登録する分布テーブル登録手段とを具備することを
特徴とする。Further, according to the invention described in claim 2, according to claim 1,
In the high-speed data alignment device described above, the data distribution status investigation unit includes a distribution table generation unit that generates a distribution table for grasping a data distribution status, and stores data in the distribution table generated by the distribution table generation unit. And a distribution table registering means for registering.
【0007】また、請求項3記載の発明では、請求項1
記載の高速データ整列装置において、前記データ分布状
況調査手段は、さらに、分布テーブルのスケール外のデ
ータを登録するために分布テーブルの圧縮を行うための
分布テーブル正規化手段を具備することを特徴とする。[0007] According to the third aspect of the present invention, the first aspect of the present invention.
In the high-speed data sorting device described above, the data distribution status investigating means further includes a distribution table normalizing means for compressing the distribution table in order to register data outside the scale of the distribution table. I do.
【0008】この発明では、データ分布状況調査手段に
よりデータの分布状況を調べ、クイックソート手段によ
って、該データ分布状況に基づいてクイックソートを行
う。したがって、クイックソートを効率よく実行して高
速に整列を行うことが可能となる。また、使用するメモ
リ量を抑えた上で適度な精度で分布状況を保持すること
ができるため、分布テーブルを利用することにより整列
以外にもデータの分析に役立てることが可能となる。In the present invention, the data distribution status is checked by the data distribution status checking means, and quick sorting is performed by the quick sorting means based on the data distribution status. Therefore, it is possible to perform quick sorting efficiently and perform high-speed sorting. In addition, since the distribution status can be held with appropriate accuracy while suppressing the amount of memory to be used, it is possible to use the distribution table for data analysis other than alignment.
【0009】[0009]
【発明の実施の形態】以下、図面を用いて本発明の実施
の形態を説明する。 A.実施形態の構成 図1は、本発明の実施形態による全体の構成を示すブロ
ック図である。図において、入力装置1は、磁気ディス
ク等からなり、ソート対象となるデータを1レコードず
つ読み込み、データ処理装置2に渡す。データ処理装置
2は、データを処理するCPU等からなり、記憶媒体4
に記憶されたプログラムの制御により、上記入力装置1
から与えられたデータをキーの順序に基づいて昇順/或
いは降順に整列し、出力装置3へ出力する。記憶媒体4
は、データ処理装置2を用いて入力装置1より得たデー
タを整列するための制御プログラムが格納された磁気デ
ィスクやCD−ROM等からなる。出力装置3は、デー
タ処理装置2による整列結果を出力するディスプレイ装
置等からなる。Embodiments of the present invention will be described below with reference to the drawings. A. Configuration of Embodiment FIG. 1 is a block diagram showing an overall configuration according to an embodiment of the present invention. In the figure, an input device 1 is composed of a magnetic disk or the like, reads data to be sorted one record at a time, and transfers it to a data processing device 2. The data processing device 2 includes a CPU or the like that processes data,
The input device 1 is controlled by a program stored in the
Are arranged in ascending or descending order based on the order of the keys, and output to the output device 3. Storage medium 4
Is composed of a magnetic disk, a CD-ROM, or the like in which a control program for aligning data obtained from the input device 1 using the data processing device 2 is stored. The output device 3 includes a display device or the like that outputs the alignment result by the data processing device 2.
【0010】上記データ処理装置2は、データの分布状
況を調べるデータ分布状況調査手段21と、データ分布
状況を元に高速にクイックソートを行うクイックソート
手段22とから構成されている。データ分布状況調査手
段21は、データの分布状況を把握するための分布テー
ブルを作成する分布テーブル作成手段211と、分布テ
ーブルにデータを登録する分布テーブル登録手段212
と、分布テーブルのスケール外のデータを登録するため
に分布テーブルの圧縮を行うための分布テーブル正規化
手段213とから構成されている。The data processing apparatus 2 comprises a data distribution status examination means 21 for examining the distribution status of data, and a quick sort means 22 for performing a quick sort based on the data distribution status. The data distribution status investigation unit 21 includes a distribution table generation unit 211 that generates a distribution table for grasping the distribution status of data, and a distribution table registration unit 212 that registers data in the distribution table.
And distribution table normalizing means 213 for compressing the distribution table to register data outside the scale of the distribution table.
【0011】ここで、図2は、上記分布テーブルの構成
例を示す概念図である。分布テーブルとは、ソートのキ
ーとなる値とレコ−ド件数とからなる2次元配列であ
り、各値を、そのデータ処理装置2上で扱える最高精度
の実数で表現したものである。概念的には、図2に示す
ように、ソートのキーとなる値を横軸に、レコ−ド件数
を縦軸とする2次元の実数グラフとみなすことができ
る。FIG. 2 is a conceptual diagram showing a configuration example of the distribution table. The distribution table is a two-dimensional array composed of values serving as sorting keys and the number of records, and each value is represented by a real number with the highest precision that can be handled on the data processing device 2. Conceptually, as shown in FIG. 2, it can be regarded as a two-dimensional real number graph in which a value serving as a sort key is set on the horizontal axis and the number of records is set on the vertical axis.
【0012】上述したデータ処理装置2では、以下に示
すように高速に整列を行う。まず、データは、データ分
布状況調査手段21に渡される。データ分布状況調査手
段21は、最初のデータを得た時に分布テーブル作成手
段211によって分布テーブルを作成し、以後データを
読み込む毎に分布テーブル登録手段212によって該当
データを分布テーブルに登録していく。In the data processing device 2 described above, alignment is performed at high speed as described below. First, the data is passed to the data distribution status investigation unit 21. The data distribution status investigation means 21 creates a distribution table by the distribution table creation means 211 when the first data is obtained, and thereafter registers the data in the distribution table by the distribution table registration means 212 every time data is read.
【0013】なお、該当テーブルの各軸の範囲(以後ス
ケールと呼ぶ)を越えたデータであるため登録できない
場合には、分布テーブル正規化手段213を呼び出し、
分布テーブルを縦軸/横軸方向に圧縮することによって
スケールを広げ、該当データを登録する。全てのデータ
を分布テーブルに登録することで、分布テーブルは、デ
ータ全体の大まかな分布状況を表すようになる。最後
に、クイックソート手段22は、分布テーブルを元に効
率よくクイックソートを行う為の中間値を算出し、これ
によって、従来の装置に比べて高速に整列を行うことが
可能となる。If the data cannot be registered because the data exceeds the range of each axis (hereinafter referred to as scale) of the corresponding table, the distribution table normalizing means 213 is called,
By compressing the distribution table in the vertical / horizontal direction, the scale is expanded and the corresponding data is registered. By registering all the data in the distribution table, the distribution table shows a rough distribution state of the entire data. Lastly, the quick sorting means 22 calculates an intermediate value for efficiently performing quick sorting based on the distribution table, thereby making it possible to perform sorting at a higher speed than in a conventional apparatus.
【0014】B.実施例の動作 次に、図1および図3、図4、図5を参照して本実施例
の動作について詳細に説明する。まず、記憶媒体4から
制御プログラムがデータ処理装置2に読み込まれ、デー
タ処理装置2の初期化等が行われる。次に、入力装置1
は、ソートするべきデータを1レコード読み込み(ステ
ップA1)、データ分布状況調査手段21に渡す。これ
が最初のデータである時、分布テーブル作成手段211
は、ダイアログボックスによる対話的な手段、あるいは
初期値に従って縦軸および横軸のスケールと各軸の刻み
幅とを決定し、分布テーブルを作成する(ステップA2
〜A4)。B. Next, the operation of this embodiment will be described in detail with reference to FIG. 1, FIG. 3, FIG. 4, and FIG. First, the control program is read from the storage medium 4 to the data processing device 2, and the data processing device 2 is initialized. Next, the input device 1
Reads one record of data to be sorted (step A1) and passes the data to the data distribution status examination means 21. When this is the first data, the distribution table creating means 211
Determines the scales of the vertical and horizontal axes and the step size of each axis according to an interactive means using a dialog box or initial values, and creates a distribution table (step A2).
~ A4).
【0015】ここで、分布テーブルは、前述したよう
に、2次元の実数配列として表現されるものとする。各
データは、分析テーブル登録手段212によって分析テ
ーブル1に登録される(ステップA7)。なお、キーの
値が実数である場合等、各軸の値と一致しないデータ
は、より近い値に近似された上で登録される。また、ス
ケールを越えるデータを登録する場合には、分布テーブ
ル正規化手段213により、分布テーブルの正規化が行
われる(ステップA5〜A6)。Here, it is assumed that the distribution table is represented as a two-dimensional real number array as described above. Each data is registered in the analysis table 1 by the analysis table registration means 212 (step A7). Data that does not match the value of each axis, such as when the key value is a real number, is registered after being approximated to a closer value. When data exceeding the scale is registered, the distribution table is normalized by the distribution table normalizing means 213 (steps A5 to A6).
【0016】正規化は、スケールを越えた軸方向に分布
テーブルを圧縮することで行われる(ステップB1〜B
4)。すなわち、圧縮前の分布テールを図5(a)とす
ると、データがキー値を超えている場合には、図5
(b)に示すように、分布テーブルを横方向に圧縮し
(ステップB2)、件数を超えていれば、図5(c)に
示すように、分布テーブルを縦方向に圧縮する(ステッ
プB4)。圧縮率は、予め決定された固定値とする。そ
して、分布テーブル登録手段212により該当データが
分布テーブルに登録される(ステップA7)。登録は、
分布テーブルが正規化された後では、該当データにも同
様な正規化を施した上で行われるものとする。The normalization is performed by compressing the distribution table in the axial direction beyond the scale (steps B1 to B).
4). That is, assuming that the distribution tail before compression is shown in FIG. 5A, if the data exceeds the key value,
As shown in FIG. 5B, the distribution table is compressed in the horizontal direction (step B2). If the number of records exceeds the number, the distribution table is compressed in the vertical direction as shown in FIG. 5C (step B4). . The compression ratio is a fixed value determined in advance. Then, the corresponding data is registered in the distribution table by the distribution table registration means 212 (step A7). Registration is
After the distribution table is normalized, the data is also subjected to the same normalization.
【0017】次に、クイックソート手段22が分布テー
ブルに基づいて中間値を算出し、その値を基準値とし
て、クイックソートを随時実行し(ステップA8〜A1
0)、最後に出力装置3に対して整列結果を出力する
(ステップA11)。Next, the quick sort means 22 calculates an intermediate value based on the distribution table, and executes quick sort as needed using the value as a reference value (steps A8 to A1).
0), and finally output the alignment result to the output device 3 (step A11).
【0018】[0018]
【発明の効果】以上説明したように、本発明によれば、
データの分布状況を利用するようにしたので、クイック
ソートを効率よく実行して高速に整列を行うことができ
るという利点が得られる。また、使用するメモリ量を抑
えた上で適度な精度で分布状況を保持することができる
ため、分布テーブルを利用することにより整列以外にも
データの分析に役立てることができるという利点が得ら
れる。As described above, according to the present invention,
Since the data distribution state is used, there is an advantage that quick sorting can be executed efficiently and sorting can be performed at high speed. In addition, since the distribution state can be held with appropriate accuracy while suppressing the amount of memory used, there is an advantage that the use of the distribution table can be used for data analysis other than alignment.
【図1】 本発明の実施形態による全体の構成を示すブ
ロック図である。FIG. 1 is a block diagram showing an overall configuration according to an embodiment of the present invention.
【図2】 分布テーブルの構成例を示す概念図である。FIG. 2 is a conceptual diagram illustrating a configuration example of a distribution table.
【図3】 本実施形態の動作を説明するためのフローチ
ャートである。FIG. 3 is a flowchart for explaining the operation of the present embodiment.
【図4】 正規化の動作を説明するためのフローチャー
トである。FIG. 4 is a flowchart illustrating an operation of normalization.
【図5】 分布テーブルの正規化を説明するための概念
図である。FIG. 5 is a conceptual diagram illustrating normalization of a distribution table.
1 入力装置 2 データ処理装置 3 出力装置 4 記憶媒体 21 データ分布状況調査手段 22 クイックソート手段 211 分布テーブル作成手段 212 分布テーブル登録手段 213 分布テーブル正規化手段 REFERENCE SIGNS LIST 1 input device 2 data processing device 3 output device 4 storage medium 21 data distribution status investigation means 22 quick sort means 211 distribution table creation means 212 distribution table registration means 213 distribution table normalization means
Claims (3)
準値として並び替えを行う高速データ整列装置におい
て、 データの分布状況を調べるデータ分布状況調査手段と、 前記データ分布状況調査手段によるデータ分布状況に基
づいてクイックソートを行うクイックソート手段とを具
備することを特徴とする高速データ整列装置。1. A high-speed data sorting apparatus that sorts data having a rank of half the number of data as a reference value, wherein: a data distribution status investigating means for examining a data distribution status; A high-speed data sorting apparatus, comprising: a quick sort unit that performs a quick sort based on a situation.
する分布テーブル作成手段と、 前記分布テーブル作成手段により作成された分布テーブ
ルにデータを登録する分布テーブル登録手段とを具備す
ることを特徴とする請求項1記載の高速データ整列装
置。2. The data distribution status investigating means includes: a distribution table generating means for generating a distribution table for grasping a data distribution status; and a distribution registering data in the distribution table generated by the distribution table generating means. 2. The high-speed data sorting apparatus according to claim 1, further comprising a table registration unit.
に、 分布テーブルのスケール外のデータを登録するために分
布テーブルの圧縮を行うための分布テーブル正規化手段
を具備することを特徴とする請求項1記載の高速データ
整列装置。3. The data distribution status investigating means further comprises a distribution table normalizing means for compressing the distribution table to register data outside the scale of the distribution table. 2. The high-speed data alignment device according to 1.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP15640598A JP3319391B2 (en) | 1998-06-04 | 1998-06-04 | High-speed data alignment device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP15640598A JP3319391B2 (en) | 1998-06-04 | 1998-06-04 | High-speed data alignment device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH11353155A JPH11353155A (en) | 1999-12-24 |
| JP3319391B2 true JP3319391B2 (en) | 2002-08-26 |
Family
ID=15627033
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP15640598A Expired - Fee Related JP3319391B2 (en) | 1998-06-04 | 1998-06-04 | High-speed data alignment device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3319391B2 (en) |
-
1998
- 1998-06-04 JP JP15640598A patent/JP3319391B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH11353155A (en) | 1999-12-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109598287B (en) | Appearance flaw detection method for resisting network sample generation based on deep convolution generation | |
| US4167728A (en) | Automatic image processor | |
| US4514826A (en) | Relational algebra engine | |
| US10698697B2 (en) | Adaptive routing to avoid non-repairable memory and logic defects on automata processor | |
| US20020183993A1 (en) | Analysis method using finite element method, program causing computer to execute same, and system for same | |
| JP3319391B2 (en) | High-speed data alignment device | |
| CN110766168A (en) | Data processing method, terminal, device and storage medium | |
| US20050033566A1 (en) | Natural language processing method | |
| CN114942396A (en) | A new energy power generation component quality detection method and device | |
| GB2286706A (en) | Object recognition process | |
| US7606692B2 (en) | Gate-level netlist reduction for simulating target modules of a design | |
| JPH05225290A (en) | Shape correction system by three dimensional parametric function | |
| JPH06265598A (en) | Test specification generating system | |
| CN100427960C (en) | A method of checking chip pins | |
| US5233328A (en) | Method for processing compacted data | |
| JPH05120065A (en) | Testing and verifying method for computer program | |
| US6581194B1 (en) | Method for reducing simulation overhead for external models | |
| JPH0394325A (en) | data processing equipment | |
| JPS62121532A (en) | Data search method | |
| CN118277281A (en) | Performance test system based on computer frame design | |
| JPH04178784A (en) | Feature selection method and appearance inspection method using the same | |
| JPH0782074B2 (en) | Logic verification device | |
| JPH01234931A (en) | Relational database projection processing method | |
| JPH07152524A (en) | Change processing system for graphics data | |
| Strock | Hardware Compressor Reduces Computer Loading |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20020521 |
|
| LAPS | Cancellation because of no payment of annual fees |