JPH0731686B2 - Data sorter - Google Patents

Data sorter

Info

Publication number
JPH0731686B2
JPH0731686B2 JP60294874A JP29487485A JPH0731686B2 JP H0731686 B2 JPH0731686 B2 JP H0731686B2 JP 60294874 A JP60294874 A JP 60294874A JP 29487485 A JP29487485 A JP 29487485A JP H0731686 B2 JPH0731686 B2 JP H0731686B2
Authority
JP
Japan
Prior art keywords
key
data
hashing
buffer
variable
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
Application number
JP60294874A
Other languages
Japanese (ja)
Other versions
JPS62154139A (en
Inventor
敏夫 中村
正 北村
英昭 武田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP60294874A priority Critical patent/JPH0731686B2/en
Publication of JPS62154139A publication Critical patent/JPS62154139A/en
Publication of JPH0731686B2 publication Critical patent/JPH0731686B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデータ選別装置に係り、詳しくは、2つの可変
長データ群相互にキーとして指定された可変長のアトリ
ビュート(属性)内容の一致している可能性のあるデー
タを選別するデータ選別装置に関する。
Description: TECHNICAL FIELD The present invention relates to a data selection device, and more specifically, to matching of variable-length attribute contents designated as a key between two variable-length data groups. The present invention relates to a data selection device that selects data that may be present.

〔従来の技術〕[Conventional technology]

情報処理システムによるデータ管理の分野において、2
つのデータ群(データは可変長(の中から相互にキーと
して指定されたアトリビュート内容の一致するデータを
取り出して結合する場合、結合処理に要する処理時間が
大きいため、あらかじめ各々のデータ群から結合可能性
の無いデータを除去し、結合処理時間を短縮させるデー
タ選別操作がしばしば行われる。この種のデータ選別装
置には、ハッシング回路とビットアレイの組を使用する
のが一般的である。なお、従来のこの種の装置は、例え
ばLEECH(D.R.McGregor,R.H.Thomson,W.N.Dawson:High
Performance Hardware for Database Systems,in Syste
ms for Large Data Bases,pp.103−116,North-Holland,
1976)などのシステムで用いられている。
2 in the field of data management by information processing systems
It is possible to combine each data group in advance because the processing time required for the combination processing is long when the data with matching attribute contents designated as keys from each other is extracted from one data group (the data is variable length). A data selection operation is often performed to eliminate irrelevant data and reduce the join processing time.It is common to use a pair of hashing circuit and bit array for this kind of data selection device. Conventional devices of this type are, for example, LEECH (DRMcGregor, RHThomson, WNDawson: High
Performance Hardware for Database Systems, in Syste
ms for Large Data Bases, pp.103−116, North-Holland,
1976) and other systems.

こゝで、第2図により、従来のハッシング回路とビット
アレイの組を使用したデータ選別装置の基本的な操作手
順を説明する。第2図中、1,2はデータ群、5は適切に
定められたハッシュ関数をもつハッシング回路、7はビ
ットアレイ、10は選別されたデータ群、301はデータ群
1のキー内容をハッシング回路5に入力してハッシング
を行い、ビットアレイ7のハッシング値を番地とするビ
ット位置を“1"にする操作(セット処理を呼ぶことにす
る)、302はデータ群2のキー内容をハッシング回路5
に入力してハッシングを行い、ビットアレイ7のハッシ
ング値を番地とするビット位置が“1"である(これをHI
Tとしたと表現する)データのみを選別する操作(リフ
ァ処理と呼ぶことにする)を示す。
Here, a basic operation procedure of the conventional data selection device using the set of the hashing circuit and the bit array will be described with reference to FIG. In FIG. 2, 1 and 2 are a data group, 5 is a hashing circuit having an appropriately defined hash function, 7 is a bit array, 10 is a sorted data group, and 301 is a hashing circuit for the key contents of the data group 1. 5, the hashing operation is performed by inputting the data to the 5th row, and the bit position having the hashing value of the bit array 7 as an address is set to "1" (set processing is called).
Hashing is performed by inputting to the bit array 7, and the bit position whose address is the hashing value of the bit array 7 is “1” (this is HI
An operation of selecting only data (expressed as T) (referred to as referrer processing) is shown.

まず、ビットアレイ7の全てのビットを“0"に初期設定
する。次に、例えばデータ群2を選別する場合、操作30
1によりビットアレイ7に“1"を設定して後に、操作302
によりデータ群2のキー内容をハッシングして、ビット
アレイ7のハッシング値を番地とするビット位置が“0"
であるデータについては不必要なデータとして除去し、
“1"であるデータは必要なデータとして選び出す(これ
を選別処理と称する)。
First, all bits of the bit array 7 are initialized to "0". Next, for example, when selecting the data group 2, operation 30
After setting “1” to the bit array 7 by 1, the operation 302
The key contents of the data group 2 are hashed, and the bit position with the hashing value of the bit array 7 as the address is "0".
The data that is is removed as unnecessary data,
The data that is "1" is selected as necessary data (this is referred to as selection processing).

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

第2図に示すような従来のデータ選別装置においては、
固定長のアトリビュートを扱っており、可変長のアトリ
ビュートを扱うものはなかった。このため、ソフトウェ
アにより、可変長データからキーとして指定された可変
長のアトリビュートをデータ中から抽出して固定長化す
る処理、即ち、キー抽出処理を行う必要があった。この
ため、キー抽出処理時間が大きく、全体としてデータ選
別処理時間が大きくなるという問題があった。
In the conventional data selection device as shown in FIG. 2,
It deals with fixed-length attributes and none with variable-length attributes. Therefore, it is necessary for the software to perform a process of extracting a variable-length attribute designated as a key from the variable-length data from the data to fix it, that is, a key extracting process. Therefore, there is a problem that the key extraction processing time is long and the data selection processing time is long as a whole.

本発明の目的は、従来扱われていなかった可変長のアト
リビュートから構成される可変長データをもつ2つのデ
ータ群について、キーとして指定されたアトリビュート
内容が相互に一致する可能性があるデータを選別できる
ようにして、選別処理時間を短縮することにある。
An object of the present invention is to select, from two data groups having variable-length data composed of variable-length attributes, which has not been conventionally handled, data whose attribute contents designated as a key may match each other. The purpose is to shorten the sorting processing time.

〔問題点を解決するための手段及び作用〕[Means and Actions for Solving Problems]

本発明は、各々独立した一定容量のバッファ4面と、可
変長データからキーとして指定された可変長アトリビュ
ートの内容を抽出するキー抽出装置、アトリビュート内
容を適当なハッシュ関数によりハッシングするハッシン
グ回路とビットアレイとの組からなるハッシング装置、
選別後のアトリビュート内容を出力するキー送出装置、
バッファの“0"クリア処理を行うバッファクリア装置、
及び制御装置を備え、制御装置の指示により、キー抽
出、ハッシング、キー送出、バッファクリアの4つの処
理を順次パイプライン的に動作させながら、可変長アト
リビュートから構成される可変長データをもつ2つのデ
ータ群相互に、キーとして指定された可変長のアトリビ
ュート内容が一致する可能性があるデータを選別するも
のである。
The present invention has four independent buffers each having a fixed capacity, a key extraction device for extracting the contents of a variable length attribute designated as a key from variable length data, a hashing circuit and a bit for hashing the attribute contents by an appropriate hash function. A hashing device consisting of a set with an array,
A key sending device that outputs the attribute contents after selection,
A buffer clear device that clears the buffer "0",
And a control device, and in accordance with an instruction from the control device, four processes of key extraction, hashing, key transmission, and buffer clear are sequentially operated in a pipeline manner, and two data having variable length data composed of variable length attributes are provided. This is to select data in which the variable-length attribute contents designated as a key may match each other in the data group.

〔実施例〕〔Example〕

第1図に本発明によるデータ選別装置の一実施例を示
す。第3図は本実施例で用いる入力データ(以下、この
データのことをタプルと呼ぶ)の形式で、可変長型式を
サポートするため、ダブルのレングス(ll)、タプルID
(TID)、アトリビュートiのレングス(li)とバリュ
ー(vi)のペア(lvペアと呼ぶ)、アトリビュートiの
タプル内相対アドレス(oi:オフセット)の構成をと
る。
FIG. 1 shows an embodiment of a data selection device according to the present invention. FIG. 3 shows a format of input data (hereinafter, this data is referred to as a tuple) used in this embodiment. In order to support a variable length type, a double length (ll) and a tuple ID are used.
(TID), a pair of a length (l i ) and a value (v i ) of the attribute i (called a l v pair), and a relative address (o i : offset) in the tuple of the attribute i.

第1図の構成は以下の通りである。11,12,13,14は各々
独立した一定容量(例えば、128バイト程度)のバッフ
ァである。1バッファには1タプル中のキーとして指定
された1つあるいは複数のアトリビュートのレングス
(l)およびバリュー(v)のペア(lvペア)および該
タプルのアドレス(TAD:データ入力端子の先に接続され
ているのがメモリとすれば、メモリ内の格納アドレス)
を格納する。17は可変長タプルからキーとして指定され
た可変長のアトリビュートの内容を抽出するキー抽出装
置であり、可変長タプルはデータ入力端子16から与えら
れる。18はビットアレイ7と適当なハッシュ関数により
ハッシングするハッシング回路5に組からなるハッシン
グ装置である。19は選別後のキーをデータ出力端子25に
出力するキー送出装置である。20はバッファクリア装置
で、電源投入時にはバッファ11,12,13,14の全てを初期
“0"クリアするが、通常は接続されているバッファ1面
の全てのバイトを“O"クリアする。バッファ11,12,13,1
4とキー抽出装置17、ハッシング装置18、キー送出装置1
9、バッファクリア装置20との間の接続は、接続切替回
路15により相互に切替えられる。
The configuration of FIG. 1 is as follows. Reference numerals 11, 12, 13, and 14 are independent buffers having a fixed capacity (for example, about 128 bytes). 1 length of one or more attributes in the buffer specified as a key in one tuple (l) and value (v) of the pair (l v pair) and the address of the tuple (TAD: the previous data input terminal If the connected memory is the memory, the storage address in the memory)
To store. Reference numeral 17 is a key extraction device for extracting the contents of a variable length attribute designated as a key from the variable length tuple, and the variable length tuple is given from the data input terminal 16. A hashing device 18 is composed of a bit array 7 and a hashing circuit 5 that performs hashing by an appropriate hash function. Reference numeral 19 is a key sending device for outputting the selected keys to the data output terminal 25. Reference numeral 20 is a buffer clear device, which initially clears all of the buffers 11, 12, 13, and 14 to "0" when the power is turned on, but normally clears all bytes of the connected buffer 1 side to "O". Buffer 11,12,13,1
4 and key extraction device 17, hashing device 18, key sending device 1
9. The connection with the buffer clear device 20 is switched by the connection switching circuit 15.

21は装置全体を制御する制御装置である。キー抽出装置
17、ハッシング装置18、キー送出装置19にはそれぞれセ
ット処理あるいはクリア処理を行うための制御レジスタ
22,23,24があり、セット処理あるいはクリア処理に先立
ち制御装置21により値が設定される。
Reference numeral 21 is a control device for controlling the entire device. Key extractor
17, the hashing device 18, and the key sending device 19 are control registers for performing set processing or clear processing, respectively.
There are 22, 23 and 24, and the value is set by the control device 21 prior to the set processing or the clear processing.

制御装置21とキー抽出装置17の間の接続線は制御信号線
101、アドレスバス線102、データバス線103、リード/
ライト制御線104からなる。制御信号線101には1タプル
分の処理開始信号(START)101−01、1タプル分の処理
正常終了信号(END)101−02、データ群の全タプル終了
信号(ENPTY)101−03等がある。アドレスバス線102は
制御レジスタ等を指示するために十分なアドレスビット
幅を有する。データバス線103は制御レジスタ等を指示
するために十分なデータビット幅を有する。リード/ラ
イト制御線104は制御レジスタ等へのデータのリード/
ライトを行うために必要である。なお、START信号とEND
信号のような対になっている信号はハンドシェイクで行
う。
The connection line between the control device 21 and the key extraction device 17 is a control signal line.
101, address bus line 102, data bus line 103, read /
It consists of a write control line 104. On the control signal line 101, a processing start signal (START) 101-01 for one tuple, a processing normal end signal (END) 101-02 for one tuple, an all tuple end signal (ENPTY) 101-03 for the data group, etc. is there. The address bus line 102 has an address bit width sufficient to indicate a control register or the like. The data bus line 103 has a data bit width sufficient to indicate a control register or the like. The read / write control line 104 is used to read / write data to / from a control register or the like.
It is necessary to write. In addition, START signal and END
Handshaking is done for paired signals such as signals.

制御装置21とハッシング装置18の間の接続線は制御信号
線111、アドレスバス線112、データバス線113、リード
/ライト制御線104よりなる。制御信号線111には、STAR
T信号111−01、END信号111−02、及びハッシングを行
い、ビットアレイ7のハッシング値を番地とするビット
位置が“1"であることを示すHIT信号111−03等がある。
Connection lines between the control device 21 and the hashing device 18 are composed of a control signal line 111, an address bus line 112, a data bus line 113, and a read / write control line 104. The control signal line 111 has a STAR
There are a T signal 111-01, an END signal 111-02, and a HIT signal 111-03 which indicates that the bit position where the hashing value of the bit array 7 is "1" is "1".

制御装置21とキー送出装置19との間の接続線は制御信号
線121、アドレスバス線122、データバス線123、リード
/ライト制御線124からなる。制御信号線121にはSTART
信号121−01とEND信号121−02がある。
Connection lines between the control device 21 and the key sending device 19 are composed of a control signal line 121, an address bus line 122, a data bus line 123, and a read / write control line 124. Start on control signal line 121
There are signals 121-01 and END signals 121-02.

制御装置21とバッファクリア装置20との間の接続線131
はSTART信号とEND信号であり、制御装置21と接続切替回
路15との間の接続線135はバッファの接続関係を1シフ
トするための指示信号である。
Connection line 131 between the control device 21 and the buffer clear device 20
Is a START signal and an END signal, and the connection line 135 between the control device 21 and the connection switching circuit 15 is an instruction signal for shifting the connection relationship of the buffer by one.

キー抽出装置17、ハッシング装置18、キー送出装置19、
バッファクリア装置20と接続切替回路15との間の接続線
は、アドレスバス線142,152,162,172、データバス線14
3,153,163,173、リード/ライト制御線144,154,164,174
等である。接続切替回路15と各バッファ11,12,13,14と
の間の接続線も同じであり、アドレスバス線182,192,20
2,212、データバス線183,193,203,213、リード/ライト
制御線184,194,204,214等である。
A key extracting device 17, a hashing device 18, a key sending device 19,
The connection lines between the buffer clear device 20 and the connection switching circuit 15 are the address bus lines 142, 152, 162, 172 and the data bus line 14
3,153,163,173, read / write control lines 144,154,164,174
Etc. The connection lines between the connection switching circuit 15 and the respective buffers 11, 12, 13, 14 are also the same, and the address bus lines 182, 192, 20
2, 212, data bus lines 183, 193, 203, 213, read / write control lines 184, 194, 204, 214 and the like.

まず、全体の制御手順についてデータ群2の選別の場合
で説明する。装置全体を制御する制御装置21により、次
の手順を行う。
First, the entire control procedure will be described in the case of selecting the data group 2. The following procedure is performed by the control device 21 that controls the entire device.

(1)ビットアレイ7およびバッファ11,12,13,14の初
期設定 (2)データ群1のセット処理のための制御レジスタの
設定 (3)セット処理 (4)データ群2のリファ処理のための制御レジスタの
設定 (5)リファ処理 次に順を追って、これらの処理について詳細に説明す
る。
(1) Initial setting of bit array 7 and buffers 11, 12, 13, 14 (2) Setting of control register for set processing of data group 1 (3) Set processing (4) For reference processing of data group 2 (5) Referrer Processing Next, these processings will be described in detail in order.

(1)ビットアレイおよびバッファのクリア 制御装置21の指示により、ハッシング装置18にあるビッ
トアレイ7およびバッファ11,12,13,14を“0"クリアす
る。
(1) Clearing the bit array and buffer The bit array 7 and the buffers 11, 12, 13, and 14 in the hashing device 18 are cleared to "0" according to an instruction from the control device 21.

(2)セット処理のための制御レジスタの設定データ群
1の情報として、 データ群1の先頭アドレス(MEMADR) データ群1の有効データ長(MEMLNG) キーとして指定されたアリビュート数(ATTNO) オフセットトータル長(OFSTOTAL) キーに対するオフセット列先頭からのオフセット値
(OFSLOCi) ハッシングのために必要となるキーについてキャラ
クタ/バイナリ等の属性 TAD(ATTSPECi)のライト・アドレス、ライトレン
グス(TADWADR,TADWLNG) 等を制御装置21の指示により各制御レジスタ22,23,24に
設定する。設定の方法は、一般的なメモリ・アクセスの
方法と同じで、アドレスバス線102,112,122、データバ
ス線103,113,123、リード/ライト制御線104,114,124を
用いて制御レジスタ22,23,24にライトすればよい。な
お、セット処理ではキー送出装置19を起動しないので、
制御レジスタ24には設定しなくてもよい。
(2) As information of the setting data group 1 of the control register for set processing, the start address of the data group 1 (MEMADR) The effective data length of the data group 1 (MEMLNG) The number of aributes specified as the key (ATTNO) Total offset Long (OFSTOTAL) Offset value for the offset key from the beginning of the column (OFSLOCi) Control the write address and write length (TADWADR, TADWLNG) of the attribute TAD (ATTSPECi) such as character / binary for the key required for hashing It is set in each control register 22, 23, 24 according to an instruction from the device 21. The setting method is the same as the general memory access method, and the address bus lines 102, 112, 122, the data bus lines 103, 113, 123, and the read / write control lines 104, 114, 124 may be used to write to the control registers 22, 23, 24. Since the key sending device 19 is not activated in the setting process,
It does not have to be set in the control register 24.

(3)セット処理 第4図にセット処理におけるタイムチャートの例を示
す。t0の時刻では、最初に入力するデータ群1の最初の
タプル(タプルl)に対し、キー抽出装置17のみを起動
する(START信号101−01をアサートする)。次に、キー
抽出装置17の処理が終了すれば(END信号101−02をアサ
ートする)、接続切替回路15を起動し(SHIFT信号135を
アサートする)、接続切替を行う。
(3) Set Process FIG. 4 shows an example of a time chart in the set process. At time t 0 , only the key extracting device 17 is activated (asserts the START signal 101-01) for the first tuple (tuple 1) of the data group 1 that is input first. Next, when the processing of the key extracting device 17 is completed (END signal 101-02 is asserted), the connection switching circuit 15 is activated (SHIFT signal 135 is asserted), and connection switching is performed.

t1の時刻では、タプル1に対してはハッシング装置18
を、次のタプル(タプル2)に対してはキー抽出装置17
を起動する(START信号101−01および111−01をアサー
トする)。次に、キー抽出装置17およびハッシング装置
18の処理が終了すれば(END信号101−02および111−02
をアサートする)、接続切替回路15を起動し(SHIFT信
号135をアサートする)、接続切替を行う。
At time t 1, the hashing device 18 for tuple 1
For the next tuple (tuple 2)
(Start signals 101-01 and 111-01 are asserted). Next, the key extraction device 17 and the hashing device
When the processing of 18 is completed (END signals 101-02 and 111-02
Is asserted), the connection switching circuit 15 is activated (the SHIFT signal 135 is asserted), and connection switching is performed.

t2の時刻では、タプル1に対してはセット処理であるの
で、キー送出装置19を起動せず(セット処理では、全て
のタプルについてキー送出装置19は起動しない)、タプ
ル2に対してはハッシング装置18を、タプル3に対して
はキー抽出装置17を起動する(START信号101−01および
111−01をアサートする)。次に、キー抽出装置17およ
びハッシング装置18の処理が終了すれば(END信号101−
02および111−02をアサートする)、接続切替回路15を
起動し(SHIFT信号135をアサートする)、接続切替を行
う。
In time t 2, since for the tuple 1 is set processing, without starting the key delivery device 19 (a set processing, the key delivery device 19 does not start for all tuples), for the tuple 2 The hashing device 18 and the key extraction device 17 for the tuple 3 are activated (START signal 101-01 and
111-01 is asserted). Next, when the processing of the key extraction device 17 and the hashing device 18 is completed (END signal 101-
02 and 111-02 are asserted), the connection switching circuit 15 is activated (the SHIFT signal 135 is asserted), and connection switching is performed.

t3の時刻では、タプル1に対してはバッファクリア装置
20を起動し(START信号131−01をアサートする)、タプ
ル2に対してはキー送出装置19を起動せず、タプル3に
対してはハッシング装置18を(START信号111−01をアサ
ートする)、タプル4に対してはキー抽出装置17を(ST
ART信号101−01をアサートする)各々起動する。次に、
キー抽出装置17、ハッシング装置18およびバッファクリ
ア装置20の処理が終了すれば(END信号101−02、111−0
2および131−02をアサートする)、接続切替回路15を起
動し(SHIFT形成135をアサートする)、接続切替を行
う。
At time t 3 , buffer clear device for tuple 1
20 is activated (the START signal 131-01 is asserted), the key sending device 19 is not activated for the tuple 2, and the hashing device 18 is asserted for the tuple 3 (the START signal 111-01 is asserted). , The key extraction device 17 for the tuple 4 (ST
Assert ART signal 101-01) Activate each. next,
When the processes of the key extracting device 17, the hashing device 18, and the buffer clearing device 20 are completed (END signals 101-02, 111-0
2 and 131-02 are asserted), the connection switching circuit 15 is activated (SHIFT formation 135 is asserted), and connection switching is performed.

以上の処理を繰り返すべく、バッファのある1面に対
し、キー抽出処理、ハッシング処理、バッファクリア処
理(但し、セット処理では、キー送出処理を行わない)
を順次行うように接続切替を行う。データ群1の全ての
タプルについてセット処理が終了すれば、ENPTY信号101
−03をアサートする。
In order to repeat the above processing, key extraction processing, hashing processing, and buffer clear processing are performed on one side with a buffer (however, key sending processing is not performed in the set processing).
The connection is switched so that the steps are sequentially performed. When the setting process is completed for all tuples in data group 1, ENPTY signal 101
Assert −03.

(4)リファ処理のための制御レジスタの設定 (2)の場合と同様に、データ群2の情報を各制御レジ
スタ22,23,24に設定する。
(4) Setting of control register for referrer processing As in the case of (2), the information of the data group 2 is set in each control register 22, 23, 24.

(5)リファ処理 リファ処理はセット処理と同様に行う。リファ処理がセ
ット処理と異なる点は、ハッシング装置18によりHIT信
号111−03がアサートされている場合(HITした場合)
は、キー送出装置17を起動して、該タプルをデータ出力
端子25から出力するが、HIT信号111−03がネゲートされ
ている場合(HITしない場合)は、キー送出装置19を起
動しないという点である。第5図にリファ処理における
タイムチャートの例を示す。t0の時刻では、最初に入力
するデータ群2の最初のタプル(タプル1)に対し、キ
ー抽出装置17のみを起動する(START信号101−01をアサ
ートする)。次に、キー抽出装置17の処理が終了すれば
(END信号101−02をアサートする)、接続切替回路15を
起動し(SHIFT信号135をアサートする)、接続切替を行
う。
(5) Referrer processing The referrer processing is performed in the same manner as the set processing. The referrer process is different from the set process when the HIT signal 111-03 is asserted by the hashing device 18 (when HIT is performed).
Activates the key sending device 17 and outputs the tuple from the data output terminal 25, but does not activate the key sending device 19 when the HIT signal 111-03 is negated (when not HIT). Is. FIG. 5 shows an example of a time chart in the referrer process. At time t 0 , only the key extraction device 17 is activated (asserts the START signal 101-01) for the first tuple (tuple 1) of the data group 2 that is input first. Next, when the processing of the key extracting device 17 is completed (END signal 101-02 is asserted), the connection switching circuit 15 is activated (SHIFT signal 135 is asserted), and connection switching is performed.

t1の時刻では、タプル1に対してはハッシング装置18
を、次のタプル(タプル2)に対してはキー抽出装置17
を起動する(START信号101−01及び111−01をアサート
する)。次にキー抽出装置17およびハッシング装置18の
処理が終了すれば(END信号101−02および111−02をア
サートする)、接続切替回路15を起動し(SHIFT信号135
をアサートする)、接続切替を行う。
At time t 1, the hashing device 18 for tuple 1
For the next tuple (tuple 2)
(Start signals 101-01 and 111-01 are asserted). Next, when the processing of the key extraction device 17 and the hashing device 18 is completed (END signals 101-02 and 111-02 are asserted), the connection switching circuit 15 is activated (SHIFT signal 135
, And switch the connection.

ここで、ハッシング装置18の処理は、ハッシングを行
い、ビットアレイ7のハッシング値を番地とするビット
位置が“1"である場合は、ヒットするということでHIT
信号111−03をアサートし、また、“0"である場合は、H
IT信号111−03をネゲートすることである。
Here, the processing of the hashing device 18 performs hashing, and if the bit position whose address is the hashing value of the bit array 7 is “1”, it means that a hit occurs.
If signal 111-03 is asserted, and if it is "0", H
To negate the IT signal 111-03.

第5図の例では、 ・タプル1については、HIT信号をアサート ・タプル2については、HIT信号をアサート ・タプル3については、HIT信号をネゲート ・タプル4については、HIT信号をネゲート となり、以降のタプルについても同様な処理となる。In the example of Fig. 5, ・ Associate the HIT signal for tuple 1 ・ Assert the HIT signal for tuple 2 ・ Negate the HIT signal for tuple 3 ・ Negate the HIT signal for tuple 4, and so on The same process is performed for the tuples of.

t2の時刻では、タプル1に対してはHIT信号111−03がア
サートされているので、キー送出装置19を起動して、デ
ータ出力端子25に、該当キーを送出する。タプル(タプ
ル2)に対してはハッシング装置18を、タプル3に対し
てはキー抽出装置17を起動する(START信号101−01及び
111−01をアサートする)。次に、キー抽出装置17およ
びハッシング装置18およびキー送出装置19の処理が終了
すれば(END信号101−02および111−02をアサートす
る)、接続切替回路15を起動し(SHIFT信号135をアサー
トする)、接続切替を行う。
Since the HIT signal 111-03 is asserted for the tuple 1 at time t 2 , the key sending device 19 is activated to send the corresponding key to the data output terminal 25. The hashing device 18 is activated for the tuple (tuple 2), and the key extraction device 17 is activated for the tuple 3 (START signal 101-01 and
111-01 is asserted). Next, when the processes of the key extraction device 17, the hashing device 18, and the key transmission device 19 are completed (END signals 101-02 and 111-02 are asserted), the connection switching circuit 15 is activated (the SHIFT signal 135 is asserted). Yes), switch connection.

t3の時刻では、タプル1に対しては該当バッファをクリ
アするバッファクリア装置20を起動する(START信号130
−01をアサートする)。タプル2に対しては、HIT信号1
11−03がアサートされているから(ハッシング装置18の
処理で、ハッシングを行い、ビットアレイ7のハッシン
グ値を番地とするビット位置が“1"であることを示
す)、キー送出装置19を起動して、データ出力端子25
に、該当キーを送出する。タプル3に対しては、ハッシ
ング装置18を(START信号111−01をアサートする)、タ
プル4に対してはキー抽出装置17を(START信号101−01
をアサートする)各々起動する。次に、キー抽出装置1
7、ハッシング装置18、キー送出装置19およびバッファ
クリア装置20の処理が終了すれば(END信号101−02、11
1−02および131−02をアサートする)、接続切替回路15
を起動し(SHIFT信号135をアサートする)、接続切替を
行う。
At time t 3 , the buffer clearing device 20 that clears the corresponding buffer is activated for tuple 1 (START signal 130
Assert -01). HIT signal 1 for tuple 2
Since 11-03 is asserted (in the processing of the hashing device 18, the hashing is performed and the bit position whose address is the hashing value of the bit array 7 is "1"), the key sending device 19 is activated. Then, the data output terminal 25
Then, the corresponding key is sent to. For tuple 3, the hashing device 18 (asserts START signal 111-01) and for tuple 4 the key extraction device 17 (START signal 101-01).
Assert each). Next, the key extraction device 1
7. When the processes of the hashing device 18, the key sending device 19, and the buffer clearing device 20 are completed (END signals 101-02, 11
1-02 and 131-02 are asserted), connection switching circuit 15
Is activated (asserts the SHIFT signal 135) to switch the connection.

なお、タプル3,4に対しては、HIT信号111−03がネゲー
トされている(ハッシング装置18で、ハッシングし、ビ
ットアレイ7のハッシング値を番地とするビット位置が
“0"であること)から、各々時刻t4,t5において、ヒッ
トしないということで、キー送出装置19は起動されな
い。
The HIT signals 111-03 are negated with respect to the tuples 3 and 4 (hashing is performed by the hashing device 18, and the bit position whose address is the hashing value of the bit array 7 is "0"). from, in each time t 4, t 5, that it does not hit, the key delivery device 19 is not activated.

データ群2の全てのタプルについてリファ処理が終了す
れば、ENPTY信号101−03をアサートし、データ群2の選
別処理が終了する。
When the referrer processing is completed for all tuples of the data group 2, the ENPTY signal 101-03 is asserted, and the selection processing of the data group 2 is completed.

以上述べた制御手順により、キーとして指定された可変
長のアトリビュート内容の一致する可能性のあるデータ
(タプル)を選別することが可能となる。
With the control procedure described above, it is possible to select data (tuples) that may have matching variable-length attribute contents designated as a key.

こゝでは、データ群2のみの選別処理について説明した
が、データ群1、データ群2を同時に選別したい場合に
は、本装置を2台備えることにより、一方の装置にはデ
ータ群1のセット処理、接いてデータ群2のリファ処理
を、もう一方の装置にはデータ群2のセット処理、続い
てデータ群1のリファ処理を行うように制御すれば可能
となる。
This section describes the sorting process for only the data group 2. However, if you want to sort the data groups 1 and 2 at the same time, by equipping one of these devices, you can set the data group 1 in one device. It is possible to perform the processing, the contact processing for the reference of the data group 2, the other apparatus for the setting processing of the data group 2, and the subsequent processing for the data group 1.

次に、キー抽出装置17、ハッシング装置18、キー送出装
置19、接続切替回路15の各動作について説明する。
Next, operations of the key extracting device 17, the hashing device 18, the key sending device 19, and the connection switching circuit 15 will be described.

第6図はキー抽出装置17の処理を説明する図である。本
例は、入力データ(タプル)はアトリビュートが4つ
(A1,A2,A3,A4)ある場合で、オフセットはそのうち
A1およびA2に付けられている。また、キーとして、アト
リビュートA1,A2がA1,A2の順で指定された場合であ
る。キー抽出装置17では、各アトリビュートの最大長を
あらかじめ渡されているものとし、アトリビュートは固
定長化している。なお、A1とA2を固定長化しないで、A1
とA2を連続してバッファの中に格納するようにしてもよ
い。
FIG. 6 is a diagram for explaining the processing of the key extracting device 17. In this example, the input data (tuple) has four attributes (A 1 , A 2 , A 3 , A 4 ), and the offset is one of them.
Attached to A 1 and A 2 . This is also the case when the attributes A 1 and A 2 are designated as keys in the order of A 1 and A 2 . In the key extracting device 17, the maximum length of each attribute is given in advance, and the attributes are fixed length. In addition, A 1 and A 2 are not fixed length, A 1
And A 2 may be consecutively stored in the buffer.

キー抽出装置17の処理の結果として、A1,A2のlvペアと
計算したTADをバッファにライトする。
As a result of the processing of a key extractor 17, writes the TAD and the calculated l v pair A 1, A 2 in the buffer.

キー抽出処理の詳細なアルゴリズムを第7図に示す。デ
ータ入力端子16の先に接続されているのがメモリとする
と、メモリ内のデータ群の先頭アドレスMEMADRからタプ
ルが格納しているものとし、最終アドレスはMEMADR+ME
MLNGとなっている。途中のアドレスでタプルが無くなっ
ている場合の終了判定(データ群の終りの判定)はll=
0で行うものとしているが、これに限定されることな
く、データ群の格納領域(例えば、先頭アドレスと最
終アドレス)、データ群の終りの指定があればよい。
The detailed algorithm of the key extraction process is shown in FIG. If a memory is connected to the end of the data input terminal 16, tuples are stored from the first address MEMADR of the data group in the memory, and the last address is MEMADR + ME.
It is MLNG. Ll = is the end judgment (judgment of the end of the data group) when tuples are lost in the middle addresses
However, the present invention is not limited to this, and the storage area of the data group (for example, the start address and the final address) and the end of the data group may be designated.

次に、ハッシング装置18の処理を説明する。ハッシング
装置18は、キーとして指定さたアトリビュートのバリュ
ーを1バイトすつ内蔵しているハッシング関数によりハ
ッシング処理を行う。セット処理では、ハッシングし
て、該ハッシングを番地とするビット位置を“1"にセッ
トする。一方、リファ処理では、ハッシングして、該ハ
ッシング値を番地とするビット位置が“1"であれば、HI
T信号111−03をアサートするが、“0"であれば、HIT信
号111−03はネゲートされたまゝである。
Next, the processing of the hashing device 18 will be described. The hashing device 18 performs a hashing process by using a hashing function that stores one byte of the value of the attribute designated as the key. In the setting process, hashing is performed and the bit position having the address as the hashing is set to "1". On the other hand, in the referr processing, if hashing is performed and the bit position whose address is the hashing value is “1”, HI
The T signal 111-03 is asserted, but if it is "0", the HIT signal 111-03 remains negated.

次に、キー送出装置19の処理を説明する。これはHIT信
号111−03をアサートした該タプルのキーとして指定さ
れたアトリビュートA1,A2のlvペアおよびTADをデータ
出力端子25に出力するものである。
Next, the processing of the key sending device 19 will be described. This is to output a l v pairs and TAD of the specified attribute A 1, A 2 as the key of the tuple asserts the HIT signal 111-03 to the data output terminal 25.

第8図は接続切替回路15による接続切替の様子を示す図
である。接続切替回路15は、4面のバッファ11,12,13,1
4とキー抽出装置17、ハッシング装置18、キー送出装置1
9、バッファクリア装置20の4つの装置との接続を切替
えるものであり、バッファの各々は、4つの装置のうち
のどれか1つと接続されている。これらの接続切替はSH
IFT信号135のアサートにより行い、第4図あるいは第5
図に示すように、順次キー抽出装置17、ハッシング装置
18、キー送出装置19、バッファクリア装置20を起動す
る。
FIG. 8 is a diagram showing a state of connection switching by the connection switching circuit 15. The connection switching circuit 15 is a four-sided buffer 11, 12, 13, 1.
4 and key extraction device 17, hashing device 18, key sending device 1
9. The connection between the buffer clear device 20 and four devices is switched, and each of the buffers is connected to any one of the four devices. These connection switching is SH
This is performed by asserting the IFT signal 135, and then, as shown in FIG.
As shown in the figure, sequential key extraction device 17, hashing device
18. The key sending device 19 and the buffer clearing device 20 are activated.

〔発明の効果〕〔The invention's effect〕

以上説明したように、本発明は各々独立した一定容量の
バッファ4面と、制御装置、キー抽出装置、ハッシング
装置、キー送出装置、バッファクリア装置、接続切替回
路を備え、キー抽出装置、ハッシング装置、キー送出装
置、バッファクリア装置を順次パイプライン的に動作さ
せながら、可変長アトリビュートから構成される可変長
データをもつ2つのデータ群相互にキーとして指定され
た可変長アトリビュートの内容が一致する可能性のある
データを選別するものであるため、従来装置に比べて、
可変長のアトリビュートを扱えると同時に、ソフトウェ
アにより可変長のキーを抽出しなければならないような
従来装置に比べて、選別処理に要する時間を短縮できる
という利点がある。
As described above, the present invention includes four independent buffers each having a fixed capacity, a control device, a key extracting device, a hashing device, a key sending device, a buffer clearing device, and a connection switching circuit. , The key sending device and the buffer clearing device are sequentially operated in a pipeline manner, and the contents of the variable length attribute specified as a key can be matched with each other in two data groups having variable length data composed of variable length attributes. Since it is intended to select data with a certain nature, compared to conventional devices,
There is an advantage that a variable length attribute can be handled and at the same time, a time required for a selection process can be shortened as compared with a conventional device in which a variable length key must be extracted by software.

【図面の簡単な説明】[Brief description of drawings]

第1図は本発明によるデータ選別装置の一実施例を示す
図、第2図は従来のデータ選別装置の操作手順の説明
図、第3図は本実施例で用いる入力データ形式を示す
図、第4図は本実施例におけるセット処理のタイムチャ
ート、第5図は本実施例におけるリファ処理のタイムチ
ャート、第6図は本実施例におけるキー抽出装置の処理
の説明図、第7図は本実施例におけるキー抽出装置の詳
細なアルゴリズムを示す図、第8図は本実施例における
接続切替回路による接続切替の様子を示す図である。 5…ハッシング回路、7…ビットアレイ、11,12,13,14
…バッファ、15…接続切替回路、16…データ入力端子、
17…キー抽出装置、18…ハッシング装置、19…キー送出
装置、20…バッファクリア装置、21…制御装置、22,23,
24…制御レジスタ、25…データ出力端子。
FIG. 1 is a diagram showing an embodiment of a data selection device according to the present invention, FIG. 2 is an explanatory diagram of an operation procedure of a conventional data selection device, and FIG. 3 is a diagram showing an input data format used in this embodiment. FIG. 4 is a time chart of the set process in this embodiment, FIG. 5 is a time chart of the referrer process in this embodiment, FIG. 6 is an explanatory diagram of the process of the key extraction device in this embodiment, and FIG. FIG. 8 is a diagram showing a detailed algorithm of the key extracting device in the embodiment, and FIG. 8 is a diagram showing a state of connection switching by the connection switching circuit in this embodiment. 5 ... Hashing circuit, 7 ... Bit array, 11, 12, 13, 14
… Buffer, 15… Connection switching circuit, 16… Data input terminal,
17 ... Key extracting device, 18 ... Hashing device, 19 ... Key sending device, 20 ... Buffer clearing device, 21 ... Control device, 22,23,
24 ... Control register, 25 ... Data output terminal.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】可変長のアトリビュートから構成される可
変長データをもつ2つのデータ群相互のキーとして指定
された可変長のアトリビュートの内容の一致する可能性
のあるデータを選別する装置において、各々独立した一
定容量の4面のバッファと、可変長データからキーとし
て指定された可変長アトリビュートの内容を抽出するキ
ー抽出装置と、アトリビュート内容を適当なハッシュ関
数によるハッシングするハッシング回路とビットアレイ
との組からなるハッシング装置と、選別後のアトリビュ
ート内容を出力するキー送出装置と、バッファのクリア
処理を行うバッファクリア装置と、前記4面のバッファ
とキー抽出装置、ハッシング装置、キー送出装置、バッ
ファクリア装置との間の接続を切換える接続切替回路
と、前記各装置及び接続切替回路の制御を行う制御装置
とを備え、制御装置の指示により、キー抽出、ハッシン
グ、キー送出、バッファクリアの4つの処理を順次パイ
プライン的に動作させながら、前記2つのデータ群相互
にキーとして指定された可変長のアトリビュート内容が
一致する可能性のあるデータを選別することを特徴とす
るデータ選別装置。
1. An apparatus for selecting data in which contents of variable-length attributes designated as keys of two data groups having variable-length data composed of variable-length attributes may match each other. An independent fixed-capacity four-sided buffer, a key extraction device that extracts the contents of a variable-length attribute designated as a key from variable-length data, a hashing circuit that hashes the attribute contents with an appropriate hash function, and a bit array. A hashing device consisting of a set, a key sending device for outputting the attribute contents after selection, a buffer clearing device for clearing the buffer, a buffer and a key extracting device for the four sides, a hashing device, a key sending device, and a buffer clearing device. A connection switching circuit for switching a connection with a device, the devices and And a controller for controlling the continuous switching circuit, and in accordance with an instruction from the controller, the four processes of key extraction, hashing, key transmission, and buffer clear are sequentially operated in a pipeline manner, and the two data groups are mutually operated. A data selection device for selecting data having a possibility of matching variable-length attribute contents designated as a key.
JP60294874A 1985-12-27 1985-12-27 Data sorter Expired - Fee Related JPH0731686B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60294874A JPH0731686B2 (en) 1985-12-27 1985-12-27 Data sorter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60294874A JPH0731686B2 (en) 1985-12-27 1985-12-27 Data sorter

Publications (2)

Publication Number Publication Date
JPS62154139A JPS62154139A (en) 1987-07-09
JPH0731686B2 true JPH0731686B2 (en) 1995-04-10

Family

ID=17813364

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60294874A Expired - Fee Related JPH0731686B2 (en) 1985-12-27 1985-12-27 Data sorter

Country Status (1)

Country Link
JP (1) JPH0731686B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3747525B2 (en) * 1996-08-28 2006-02-22 株式会社日立製作所 Parallel database system search method
CN109766479B (en) * 2019-01-24 2020-06-09 北京三快在线科技有限公司 Data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
JPS62154139A (en) 1987-07-09

Similar Documents

Publication Publication Date Title
JP3303225B2 (en) Data compression device using Lempel-Ziv type algorithm
JPH0728624A (en) Device and method for sorting
JP4044586B2 (en) Method and system for performing Boolean operations on bit strings using maximum bit slices
JPH0731686B2 (en) Data sorter
JPH024026B2 (en)
JPH0650478B2 (en) Data compression storage system
JPH07101460B2 (en) Code detector
JPH07120264B2 (en) Sort processing device
JP3038234B2 (en) Dictionary search method for data compression equipment
JPS5816819B2 (en) Data compression method
JPH023225B2 (en)
JP3320767B2 (en) Data processing apparatus and control method thereof
JPH0419570B2 (en)
JPS63172335A (en) Sorting processor
JPH04332035A (en) Data compressing device
JPH04245375A (en) Control system of symbol string collating device
JPH0535468A (en) Arithmetic unit
JPH06204884A (en) Data restoration circuit
JPH0750488B2 (en) Information gathering device
JPH0496868A (en) Dictionary retrieving system
JPS6234231A (en) File data processor
JPS5886635A (en) Data processor
JPH0437455B2 (en)
JPH05307515A (en) Data transfer equipment
JPS6354826A (en) Compressed data expanding device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees