JPH04358266A - Data retrieving system applying hash method - Google Patents

Data retrieving system applying hash method

Info

Publication number
JPH04358266A
JPH04358266A JP3132960A JP13296091A JPH04358266A JP H04358266 A JPH04358266 A JP H04358266A JP 3132960 A JP3132960 A JP 3132960A JP 13296091 A JP13296091 A JP 13296091A JP H04358266 A JPH04358266 A JP H04358266A
Authority
JP
Japan
Prior art keywords
search
data
subgroup
memory
address
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
Application number
JP3132960A
Other languages
Japanese (ja)
Inventor
Toshiharu Ueda
上田 敏晴
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP3132960A priority Critical patent/JPH04358266A/en
Publication of JPH04358266A publication Critical patent/JPH04358266A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To eliminate the deviation of the retrieving time caused by the deviation of the number of data retrieved in a subgroup in 8 data retrieving system applying a hash method. CONSTITUTION:The retrieval data (normal retrieval data) in number of pieces almost equal to the key value of the data retrieved in the subgroups sorted by the hash arithmetic are stored in a retrieval memory 4b1 for each subgroup. Meanwhile the remaining retrieval date (overflowed retrieval data) included in each subgroup are stored in an auxiliary retrieval memory 4b2 for each subgroup. Then both memories 4b1 end 4b2 are actuated in parallel with each other to retrieve the data. In such a constitution, a part of the data (overflowed retrieval data) is retrieved by the memory 4b2 in parallel to the memory 4b1 for the subgroup having a large number of retrieval date. Thus the date retrieving time is shortened.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、ハッシュ法を用いたハ
ードウェアによるデータ検索方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a hardware data retrieval method using a hash method.

【0002】0002

【従来の技術】従来、大量の数値表現されたデータから
なるデータグループの中から1つのデータ要素を検索す
る場合に使用される手法の1つにハッシュ法がある。下
記にその概要を述べる。まず、数値表現され、数値表現
でだぶりのないN個のデータxi(1≦i≦N)からな
るグループAと同じく数値表現された一つのデータyが
ある。ここでキーデータyと同じ数値表現をもつデータ
xiがグループA内に存在するか否かを検索することを
考える。
2. Description of the Related Art Conventionally, a hash method is one of the methods used to search for one data element from a data group consisting of a large amount of numerically expressed data. The outline is described below. First, there is one piece of data y, which is expressed numerically and is similarly expressed as group A, which is composed of N pieces of data xi (1≦i≦N) with no overlap in numerical expression. Now, consider searching whether data xi having the same numerical expression as key data y exists in group A.

【0003】この時あらかじめデータAのN個のデータ
xiをある一定の規則に基づき複数個のサブグループに
分類しておく。データxiは数値表現されているため、
上記の分類規則をここでは数値演算結果とする。例えば
、分類規則を定数K(1≦K)でデータxiを余算した
剰余Rxで分類すると、剰余Rxは0からK−1の値を
とるため、データグループAはK個のサブグループzj
(1≦j≦K)に分類できる。
At this time, N pieces of data xi of data A are classified in advance into a plurality of subgroups based on a certain rule. Since the data xi is expressed numerically,
The above classification rules are used here as numerical calculation results. For example, if the classification rule is classified by the remainder Rx obtained by adding data xi with a constant K (1≦K), the remainder Rx takes a value from 0 to K-1, so data group A is divided into K subgroups zz
It can be classified into (1≦j≦K).

【0004】ここで、目的の検索処理を行うには、まず
、キーデータyに対しても、上記分類規則と同じ数値演
算、すなわち定数Kによる余算を行い剰余Ryを得る。 当然、Ryも0からK−1の間でK通りの値を得る。そ
して、K個のサブグループzj内の1つのサブグループ
をj=Ryで特定し、そのサブグループzi(i=Ry
)内の全要素とキーデータの数値表現を比較し、一致す
る要素があればグループA内にキーデータyと同じ数値
表現を持つデータxiが存在することになり、一致する
要素がなければグループA内にキーデータyと同じ数値
表現をもつデータxiは存在しないと判定することがで
きる。
[0004] In order to perform the desired retrieval process, first, the same numerical operation as in the above-mentioned classification rule is performed on the key data y, that is, a remainder calculation using a constant K is performed to obtain a remainder Ry. Naturally, Ry also obtains K values between 0 and K-1. Then, one subgroup among the K subgroups zz is specified by j=Ry, and that subgroup zi(i=Ry
) and the numerical representation of the key data, and if there is a matching element, it means that there is data xi with the same numerical representation as the key data y in group A, and if there is no matching element, the group It can be determined that there is no data xi in A that has the same numerical expression as the key data y.

【0005】以上の検索手法をハッシュ法と言い、デー
タ検索処理が1つのサブグループzj(j=Ry)内に
特定されるため、グループA内の全要素xiに対して単
純検索を行う方法に比べ、格段に高速な検索処理が可能
となる。図2は上記の検索処理をハードウェアで実現す
る従来のデータ検索方式の構成を示すブロック図である
。以下、従来のデータ検索方式の構成を説明する。
[0005] The above search method is called a hash method, and since the data search process is specified within one subgroup zz (j=Ry), it is a method for performing a simple search on all elements xi in group A. Compared to this, much faster search processing is possible. FIG. 2 is a block diagram showing the configuration of a conventional data search method that implements the above search processing using hardware. The configuration of the conventional data search method will be explained below.

【0006】検索メモリ4aは全検索データ格納してお
くのに充分なアドレス空間をもつメモリであり、その1
語は検索データx1とフラグf1を格納する二つのフィ
ールドからなる。全検索データはあらかじめ1つの分類
規則に基づきサブグループに分類され、サブグループ単
位に検索メモリ4a内に配置格納されている。図におけ
るサブグループz1はその内の1つである。フラグf1
はサブグループz1の最後の語のみ論理”1”が設定さ
れ、他の語における論理値は”0”に設定されている。 つまり、フラグf1が論理値=”1”をもつ語はサブグ
ループz1の最終語であることを示す。
The search memory 4a is a memory with sufficient address space to store all search data, and
A word consists of two fields storing search data x1 and flag f1. All search data is classified in advance into subgroups based on one classification rule, and arranged and stored in the search memory 4a in units of subgroups. Subgroup z1 in the figure is one of them. flag f1
is set to logic "1" only in the last word of subgroup z1, and the logic values in other words are set to "0". In other words, the word whose flag f1 has a logical value of "1" indicates that it is the final word of the subgroup z1.

【0007】演算器1aは検索メモリ4aでの検索デー
タの分類規則と同一規則による分類機能をもつ演算器で
あり、入力である外部回路から入力されるキーデータy
1から分類データo1を生成し、アドレス変換器2aへ
入力する。アドレス変換器2aは分類データo1から検
索メモリ4a内の1つのサブグループz1の先頭番地を
示すサブグループアドレスp1を生成し、アドレスカウ
ンタ3aへ出力する。サブグループアドレスp1と分類
データo1は1対1に対応する。なお、アドレス変換器
2aは分類データo1によりアドレスが指定され、指定
されたアドレスに対応してサブグループアドレスp1が
あらかじめ書込まれたメモリにより構成されている。
The computing unit 1a is a computing unit that has a classification function according to the same rules as the classification rules for the search data in the search memory 4a, and the key data y inputted from an external circuit as an input.
1 to generate classification data o1 and input it to the address converter 2a. The address converter 2a generates a subgroup address p1 indicating the starting address of one subgroup z1 in the search memory 4a from the classification data o1, and outputs it to the address counter 3a. There is a one-to-one correspondence between the subgroup address p1 and the classification data o1. The address converter 2a is constituted by a memory in which an address is specified by the classification data o1 and a subgroup address p1 is written in advance in correspondence to the specified address.

【0008】アドレスカウンタ3aは制御回路6aから
入力されるロード信号l1の指示でサブグループアドレ
スp1を取込み、検索メモリアドレスa1として検索メ
モリ4aへ出力する。また、制御回路6aから入力され
るカウント信号e1の指示により、検索メモリアドレス
a1をカウントアップ、つまり+1する機能を有する。 検索メモリ4aの出力データである検索データx1は比
較器5aに入力される。  比較器5aには、同時に演
算器1aに入力されているのと同一のキーデータy1が
入力されている。比較器5aは検索データx1とキーデ
ータy1とを比較して一致信号c1を生成し、制御回路
6aへ出力する。一致信号c1は検索データx1とキー
データy1とが一致すれば、論理値”1”、そうでなけ
れば論理値”0”をとる。
[0008] Address counter 3a takes in subgroup address p1 under the instruction of load signal l1 inputted from control circuit 6a, and outputs it to search memory 4a as search memory address a1. It also has a function of counting up the search memory address a1, that is, incrementing it by 1, in accordance with the instruction of the count signal e1 inputted from the control circuit 6a. Search data x1, which is the output data of search memory 4a, is input to comparator 5a. The same key data y1 that is simultaneously input to the arithmetic unit 1a is input to the comparator 5a. Comparator 5a compares search data x1 and key data y1, generates a match signal c1, and outputs it to control circuit 6a. The match signal c1 takes a logic value of "1" if the search data x1 and the key data y1 match, and takes a logic value of "0" otherwise.

【0009】制御回路6aは一致信号c1とフラグf1
の状態を監視することにより、検索メモリ4aを用いた
検索処理を行い、その結果をヒット信号h1及び検索終
了信号s1として出力する。検索終了信号s1は検索処
理中は論理値”0”、検索処理完了時は論理値”1”と
なる。ヒット信号h1は検索終了信号が論理値”1”の
時のみ意味を持ち、その論理値”1”は検索メモリ4a
の中にキーデータy1と同一値をもつ検索データが存在
することを、論理値”0”はその逆を示す。また、制御
回路6aは外部回路から入力される起動信号g1の論理
値が”0”から”1”への遷移を起こすことを検出する
ことで検索処理を開始する。
The control circuit 6a receives the coincidence signal c1 and the flag f1.
By monitoring the state of , search processing using the search memory 4a is performed, and the results are output as a hit signal h1 and a search end signal s1. The search end signal s1 has a logical value of "0" during the search process, and has a logical value of "1" when the search process is completed. The hit signal h1 has meaning only when the search end signal has a logical value of "1", and the logical value of "1" is the search memory 4a.
A logical value of "0" indicates that there is search data having the same value as the key data y1, and vice versa. Further, the control circuit 6a starts the search process by detecting that the logical value of the activation signal g1 inputted from the external circuit changes from "0" to "1".

【0010】以下、前記従来のデータ検索方式の動作を
説明する。まず、外部回路はキーデータy1を演算器1
aに入力し、起動信号g1の論理値に対し、”0”から
”1”の遷移を与える。制御回路6aは起動信号g1の
上記遷移を検出すると、検索終了信号s1を論理値”0
”とすると同時にロード信号l1によりアドレスカウン
タ3aにサブグループアドレスp1をロードするよう指
示を与える。
The operation of the conventional data retrieval method will be explained below. First, the external circuit inputs the key data y1 to the arithmetic unit 1.
a and gives a transition from "0" to "1" to the logical value of the activation signal g1. When the control circuit 6a detects the above transition of the activation signal g1, the control circuit 6a sets the search end signal s1 to a logical value of "0".
'', and at the same time, the load signal l1 instructs the address counter 3a to load the subgroup address p1.

【0011】アドレスカウンタ3aはサブグループアド
レスp1を取り込み、検索メモリアドレスa1として検
索メモリ4aへ出力するが、このとき検索メモリアドレ
スa1の値は検索メモリ4aの中の一つのサブグループ
z1の先頭番地を示すことになる。検索メモリ4aは検
索メモリアドレスa1で指定された1語を読出し、検索
データx1を比較器5aへ、フラグf1を制御回路6a
へ引き渡す。
The address counter 3a takes in the subgroup address p1 and outputs it to the search memory 4a as a search memory address a1. At this time, the value of the search memory address a1 is the starting address of one subgroup z1 in the search memory 4a. will be shown. The search memory 4a reads one word specified by the search memory address a1, sends the search data x1 to the comparator 5a, and sends the flag f1 to the control circuit 6a.
hand over to.

【0012】比較器5aは検索データx1とキーデータ
y1との一致/不一致を検査し、一致信号c1として制
御回路6aへ出力する。ここで、制御回路6aは以下の
処理を行う。まず、一致信号c1=論理値”0”で、な
おかつ、フラグf1=論理値”0”であれば、サブグル
ープz1の次の検索データを検索するため、カウント信
号e1でアドレスカウンタ3aへ検索メモリアドレスa
1をカウントアップする指示を出す。カウントアップさ
れた検索メモリアドレスa1が検索メモリへ与えられ、
次の一語が読み出される。以下同様の動作を繰り返し、
サブグループz1内のすべての検索データとキーデータ
y1を比較していく。サブグループ内のすべての検索デ
ータとの比較処理が完了したことはフラグf1=論理値
”1”で検出することができる。
The comparator 5a checks the match/mismatch between the search data x1 and the key data y1 and outputs it as a match signal c1 to the control circuit 6a. Here, the control circuit 6a performs the following processing. First, if the match signal c1 = logical value "0" and the flag f1 = logical value "0", the search memory is sent to the address counter 3a using the count signal e1 in order to search for the next search data of subgroup z1. address a
Give instructions to count up by 1. The counted up search memory address a1 is given to the search memory,
The next word is read out. Repeat the same operation below,
All search data in subgroup z1 and key data y1 are compared. Completion of the comparison process with all search data in the subgroup can be detected by flag f1=logical value "1".

【0013】そして、フラグf1=論理値”1”を検出
するまで、上記比較動作を繰り返しても一致信号c1=
論理値”1”を検出できない場合は、特定したサブグル
ープz1内にキーデータy1と一致する検索データが存
在しないことになり、ヒット信号h1=論理値”0”と
して検索終了信号s1を論理値”1”とし、外部回路に
通知する。
Even if the above comparison operation is repeated until the flag f1=logic value "1" is detected, the coincidence signal c1=
If the logical value "1" cannot be detected, it means that there is no search data that matches the key data y1 in the specified subgroup z1, and the search end signal s1 is set to the logical value with the hit signal h1 = logical value "0". Set to "1" and notify the external circuit.

【0014】また、フラグf1=論理値”1”を検出す
る以前に一致信号c1=”1”を検出すれば、サブグル
ープz1内にキーデータy1と一致する検索データが存
在することが判明したことになり、その時、すべて検索
処理は完了となり、ヒット信号h1,検索終了信号s1
共論理値”1”として外部回路に通知する。
[0014] Furthermore, if the match signal c1="1" is detected before the flag f1="1" is detected, it is found that search data matching the key data y1 exists in the subgroup z1. At that time, all search processing is completed, and a hit signal h1 and a search end signal s1 are output.
Notify the external circuit as a common logic value "1".

【0015】[0015]

【発明が解決しようとする課題】しかしながら、ハッシ
ュ法は検索データに演算(ハッシュ演算)を行い、その
結果が一種の関数となることを利用して、検索データを
サブグループに分類するため、1つのサブグループに分
類される検索データ数には偏りが生じてしまう。そのた
め、図2に示した従来のデータ検索方式では検索時間に
偏りがでてしまう。
[Problem to be Solved by the Invention] However, the hashing method performs an operation (hash operation) on the search data and uses the fact that the result becomes a kind of function to classify the search data into subgroups. This results in bias in the number of search data classified into one subgroup. Therefore, in the conventional data search method shown in FIG. 2, the search time becomes uneven.

【0016】図3はハッシュ法を使って検索グループを
8種のサブグループに分類した場合のサブグループ中の
検索データ数の偏りを示す説明図であり、横軸にサブグ
ループ番号、縦軸に各サブグループ内の検索データ数を
とり、グラフ化したものである。図3の検索データを図
2に示した従来のデータ検索方式で検索した場合、サブ
グループ番号5を除いてR回以下で検索終了となるが、
サブグループ番号5の検索では、他のサブグループに比
べ検索時間が長くかかり、検索性能が低下する。
FIG. 3 is an explanatory diagram showing the bias in the number of search data in subgroups when a search group is classified into eight types of subgroups using the hash method. The number of search data in each subgroup is calculated and graphed. If the search data in FIG. 3 is searched using the conventional data search method shown in FIG. 2, the search will be completed in R times or less, except for subgroup number 5.
Searching for subgroup number 5 takes longer than searching for other subgroups, resulting in lower search performance.

【0017】このようなサブグループ内の検索データ数
の偏りは、ハッシュ演算にその検索データを均一に分類
できる演算、又は演算定数を用いることで、ある程度は
緩和できるが、完全に偏りをなくすことはできない。本
発明は、以上述べた検索データをハッシュ演算により、
サブグループへ分類した場合に生ずるサブグループ内検
索データ数の偏りによる検索時間の偏りを解消し、高速
な検索処理が可能なデータ検索方式を提供することを目
的とする。
Such bias in the number of search data within a subgroup can be alleviated to some extent by using an operation that can uniformly classify the search data or a calculation constant in the hash operation, but it is impossible to completely eliminate the bias. I can't. The present invention uses the above-mentioned search data by hash calculation.
It is an object of the present invention to provide a data search method that eliminates bias in search time due to bias in the number of search data within subgroups that occurs when classifying into subgroups, and enables high-speed search processing.

【0018】[0018]

【課題を解決するための手段】前記問題点を解決するた
めに、本発明はハッシュ法を用いたデータ検索方式にお
いて、ハッシュ演算によりサブグループに分類された検
索データ中、各サブグループ内の少なくとも一部の検索
データをサブグループ単位に格納した検索メモリと、各
サブグループ内の残りの検索データをサブグループ単位
に格納した1つ以上の補助検索メモリとを備え、検索メ
モリ及び補助検索メモリを並列動作させてデータ検索を
行うように構成した。
[Means for Solving the Problems] In order to solve the above-mentioned problems, the present invention provides a data retrieval method using a hash method, in which at least one of the search data classified into subgroups by a hash operation is selected. It is equipped with a search memory that stores some search data in subgroup units, and one or more auxiliary search memories that store the remaining search data in each subgroup in subgroup units. It was configured to operate in parallel and perform data searches.

【0019】[0019]

【作用】本発明によれば、以上のようにデータ検索方式
を構成したので、検索メモリには、各サブグループ内の
少なくとも一部、例えば、各サブグループ内の検索デー
タ数の代表値にほぼ等しい数のデータ(ノーマル検索デ
ータ)を格納し、補助検索メモリには、各サブグループ
内の残りの検索データ(例えば、あふれ検索データ)を
格納する。そして、検索メモリ及び補助検索メモリを並
列動作させて検索を行う。
[Operation] According to the present invention, since the data search method is configured as described above, the search memory stores at least part of each subgroup, for example, approximately the representative value of the number of search data in each subgroup. An equal number of data (normal search data) is stored, and the remaining search data (for example, overflow search data) in each subgroup is stored in the auxiliary search memory. Then, the search is performed by operating the search memory and the auxiliary search memory in parallel.

【0020】[0020]

【実施例】以下、本発明の実施例について図面を参照し
ながら詳細に説明する。図1は本発明の実施例によるデ
ータ検索方式の構成を示すブロック図である。以下、本
発明の実施例によるデータ検索方式の構成を説明する。 検索メモリ4b1,補助検索メモリ4b2は図3の検索
メモリ4aと同一の機能を有するが、以下の点で異なる
。まず、検索メモリ4b1にはサブグループ内の検索が
R回以下で終了する検索データ部分、すなわち、図3の
ノーマル検索データNDを格納する。そして、補助検索
メモリ4b2にはサブグループ内の検索をR回以上実行
しないと終了しない検索データ部分、すなわち図3のあ
ふれ検索データOFDを格納する。ここで、「R」は、
ハッシュ法により分類された各サブグループ内のデータ
数の代表値(統計的に集中している値)にほぼ等しく設
定する。検索メモリ4b1内のサブグループz2aの分
類規制とその配置方法は検索メモリ4aと同一であるが
、図3のサブグループ番号5のようなR回以上の検索を
要するサブグループは、ノーマル検索データND部分を
検索メモリ4b1へあふれ検索データOFDを補助検索
メモリ4b2へ格納する。補助検索メモリ4b2内サブ
グループz2bの分類規則、配置方法は検索メモリ4b
1と同一である。検索メモリ4b1,補助検索メモリ4
b2の語構成は図2の検索メモリ4aと同一であり、フ
ラグf2a,フラグf2bの意味も同一である。
Embodiments Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing the configuration of a data search method according to an embodiment of the present invention. The configuration of a data search method according to an embodiment of the present invention will be described below. Search memory 4b1 and auxiliary search memory 4b2 have the same functions as search memory 4a in FIG. 3, but differ in the following points. First, the search memory 4b1 stores the search data portion in which the search within the subgroup is completed in R times or less, that is, the normal search data ND shown in FIG. 3. Then, the auxiliary search memory 4b2 stores the search data portion that does not end unless the search within the subgroup is executed R times or more, that is, the overflow search data OFD shown in FIG. 3. Here, "R" is
Set approximately equal to the representative value (statistically concentrated value) of the number of data in each subgroup classified by the hash method. The classification regulation and arrangement method of subgroup z2a in search memory 4b1 are the same as in search memory 4a, but subgroups that require more than R searches, such as subgroup number 5 in FIG. 3, are stored in normal search data ND. The portion overflows to the search memory 4b1 and the search data OFD is stored in the auxiliary search memory 4b2. The classification rules and arrangement method of the subgroup z2b in the auxiliary search memory 4b2 are as per the search memory 4b.
Same as 1. Search memory 4b1, auxiliary search memory 4
The word structure of b2 is the same as that of the search memory 4a in FIG. 2, and the meanings of flags f2a and f2b are also the same.

【0021】キーデータy2は演算器1bと比較器5b
1,比較器5b2に入力されている。演算器1bは図2
の演算器1aと、比較器5b1,比較器5b2は図2の
比較器5aと同一機能である。演算器1bは分類データ
o2を出力し、アドレス変換器2b1,アドレス変換器
2b2へ引き渡す。アドレス変換器2b1は図2のアド
レス変換器2aと同一機能であり、検索メモリサブグル
ープアドレスp2aをアドレスカウンタ3b1へ入力す
る。また、アドレス変換器2b2は分類データo2を補
助検索メモリ4b2内のサブグループz2bの先頭アド
レスである補助検索メモリサブグループアドレスp2b
へ変換し、アドレスカウンタ3b2へ入力すると共に、
補助検索が必要か否かを示すゲート信号wをアンドゲー
ト8とアンドゲート9へ出力する。これはハッシュ法で
分類したサブグループが常にあふれ検索データOFDを
持つとは限らないためである。ここで、ゲート信号wは
論理値”1”で補助検索が必要であることを示し、”0
”で補助検索不要を示す。なお、アドレス変換器2b2
はアドレス変換器2b1と同様、メモリにより構成され
るが、分類データo2に指定されるアドレスにはサブグ
ループアドレスp2bと共に補助検索の要否を示すデー
タが書き込まれている。
The key data y2 is the arithmetic unit 1b and the comparator 5b.
1, is input to the comparator 5b2. Arithmetic unit 1b is shown in Figure 2.
The arithmetic unit 1a, comparator 5b1, and comparator 5b2 have the same functions as the comparator 5a in FIG. Arithmetic unit 1b outputs classification data o2 and delivers it to address converter 2b1 and address converter 2b2. Address converter 2b1 has the same function as address converter 2a in FIG. 2, and inputs search memory subgroup address p2a to address counter 3b1. Further, the address converter 2b2 converts the classified data o2 into an auxiliary search memory subgroup address p2b which is the start address of the subgroup z2b in the auxiliary search memory 4b2.
and input it to the address counter 3b2, and
A gate signal w indicating whether auxiliary search is necessary is output to AND gate 8 and AND gate 9. This is because subgroups classified using the hash method do not always have overflow search data OFD. Here, the gate signal w has a logic value of "1" indicating that auxiliary search is necessary, and a logic value of "0".
” indicates that the auxiliary search is not required. Note that the address converter 2b2
is constituted by a memory like the address converter 2b1, but data indicating whether or not an auxiliary search is necessary is written in the address designated by the classification data o2 together with the subgroup address p2b.

【0022】アドレスカウンタ3b1は、制御回路6b
から入力されるロード信号l2の指示で検索メモリサブ
グループアドレスp2aを取込み、検索メモリアドレス
a2aとして検索メモリ4b1へ出力する。また、制御
回路6bから入力されるカウント信号e2の指示により
、検索メモリアドレスa2aをカウントアップする。 同様に、アドレスカウンタ3b2は、ロード信号l2の
指示で補助検索メモリサブグループアドレスp2bを取
込み、検索メモリアドレスa2bとして補助検索メモリ
4b2へ出力し、かつ、カウント信号e2の指示により
、補助検索メモリアドレスa2bをカウントアップする
Address counter 3b1 is connected to control circuit 6b.
The search memory subgroup address p2a is taken in by the load signal l2 inputted from the search memory subgroup address p2a and outputted to the search memory 4b1 as the search memory address a2a. Further, the search memory address a2a is counted up according to the instruction of the count signal e2 inputted from the control circuit 6b. Similarly, the address counter 3b2 takes in the auxiliary search memory subgroup address p2b as instructed by the load signal l2, outputs it to the auxiliary search memory 4b2 as a search memory address a2b, and also receives the auxiliary search memory address p2b as instructed by the count signal e2. Count up a2b.

【0023】ノーマル検索データx2a,フラグf2a
は検索メモリ4b1からの読出し出力であり、比較器5
b1,制御回路6bへ入力される。同様に補助検索メモ
リ4b2からの読出し出力であるあふれ検索データx2
bは、比較器5b2へ入力され、フラグf2bはアンド
ゲート9でゲート信号wと論理積がとられた後、フラグ
f2となり、制御回路6bへ引き渡される。
[0023] Normal search data x2a, flag f2a
is the readout output from the search memory 4b1, and the comparator 5
b1, is input to the control circuit 6b. Similarly, overflow search data x2 is read output from the auxiliary search memory 4b2.
b is input to the comparator 5b2, and the flag f2b is logically ANDed with the gate signal w by the AND gate 9, and then becomes the flag f2, which is passed to the control circuit 6b.

【0024】比較器5b1の出力である検索メモリ一致
信号c2aはオアゲート7に入力される。比較器5b2
の出力である補助検索メモリ一致信号c2bはアンドゲ
ート8へ入力され、ゲート信号wと論理積がとられた後
オアゲート7に入力され、一致信号c2aと論理和がと
られる。オアゲートの出力であり一致信号c2は制御回
路6aへ引き渡される。
The search memory match signal c2a, which is the output of the comparator 5b1, is input to the OR gate 7. Comparator 5b2
The auxiliary search memory match signal c2b, which is the output of the auxiliary search memory match signal c2b, is input to the AND gate 8, and after being ANDed with the gate signal w, it is input to the OR gate 7, and ORed with the match signal c2a. The coincidence signal c2, which is the output of the OR gate, is delivered to the control circuit 6a.

【0025】制御回路6bは図2の構成例と同様に、ロ
ード信号l2とカウント信号e2を制御しながら一致信
号C2,フラグf2a,フラグf2の状態を監視し、検
索メモリ4b1,補助検索メモリ4b2内のサブグルー
プz2a,サブグループz2b内を並列に検索する。制
御回路6bの出力であるヒット信号h2,検索終了信号
s2,入力である起動信号g2は、それぞれ図2のヒッ
ト信号h1,検索終了信号s1,起動信号g1と同一機
能を有する。
Similar to the configuration example of FIG. 2, the control circuit 6b monitors the states of the match signal C2, the flag f2a, and the flag f2 while controlling the load signal l2 and the count signal e2, and controls the search memory 4b1 and the auxiliary search memory 4b2. The subgroup z2a and subgroup z2b within the subgroup z2a and z2b are searched in parallel. The hit signal h2, the search end signal s2, and the start signal g2 that are the input of the control circuit 6b have the same functions as the hit signal h1, the search end signal s1, and the start signal g1 in FIG. 2, respectively.

【0026】以下、本発明の実施例によるデータ検索方
式の動作を説明する。まず外部回路はキーデータy2設
定し、起動信号g2の論理値に対し”0”から”1”の
遷移を与える。制御回路6bは起動信号g2の上記遷移
を検出すると、検索終了信号s2を論理値”0”とする
と同時にロード信号l2によりアドレスカウンタ3b1
,アドレスカウンタ3b2に検索メモリサブグループア
ドレスp2a,補助検索サブグループアドレスp2bを
ロードするよう指示を与える。
The operation of the data search method according to the embodiment of the present invention will be explained below. First, the external circuit sets key data y2 and gives a transition from "0" to "1" to the logical value of the activation signal g2. When the control circuit 6b detects the above-mentioned transition of the start signal g2, it sets the search end signal s2 to the logical value "0" and simultaneously controls the address counter 3b1 by the load signal l2.
, instructs the address counter 3b2 to load the search memory subgroup address p2a and the auxiliary search subgroup address p2b.

【0027】アドレスカウンタ3b1は検索メモリサブ
グループアドレスp2aを取り込み、検索メモリアドレ
スa2aとし検索メモリ4b1へ出力するが、この時の
検索メモリアドレスa2aの値は検索メモリ4b1の中
の一つのサブグループz2aの先頭アドレスとなる。同
様にアドレスカウンタ3b2の出力である補助検索メモ
リアドレスa2bは補助検索メモリ4b2の中の一つの
サブグループz2bの先頭アドレスとなるが、サブグル
ープz2aに図5のあふれ検索データOFD部分が存在
しない場合は、ゲート信号wに論理値”0”が出力され
、補助検索メモリ4b2での検索結果である補助検索メ
モリ一致信号c2bは無効化される。
The address counter 3b1 takes in the search memory subgroup address p2a and outputs it to the search memory 4b1 as a search memory address a2a, but the value of the search memory address a2a at this time is one subgroup z2a in the search memory 4b1. This is the first address. Similarly, the auxiliary search memory address a2b, which is the output of the address counter 3b2, becomes the start address of one subgroup z2b in the auxiliary search memory 4b2, but if the overflow search data OFD portion of FIG. 5 does not exist in the subgroup z2a, , a logic value "0" is output to the gate signal w, and the auxiliary search memory match signal c2b, which is the search result in the auxiliary search memory 4b2, is invalidated.

【0028】検索メモリ4b1は検索メモリアドレスa
2aでアドレスされた1語を読出し、ノーマル検索デー
タx2aを比較器5b1へフラグf2aを制御回路6b
へ入力する。同様に補助検索メモリ4b2も補助検索メ
モリアドレスa2bでアドレスされた1語を読出してあ
ふれ検索データx2b,フラグf2aをそれぞれ比較器
5b2へ引き渡す。
The search memory 4b1 has a search memory address a.
2a is read, normal search data x2a is sent to the comparator 5b1, and the flag f2a is sent to the control circuit 6b.
Enter. Similarly, the auxiliary search memory 4b2 reads out one word addressed by the auxiliary search memory address a2b, and transfers overflow search data x2b and flag f2a to the comparator 5b2.

【0029】比較器5b2の出力c2bはアンドゲート
8,オアゲート7でゲート信号w,検索メモリ一致信号
c2aと論理演算された後、一致信号c2として制御回
路6bへ入力される。フラグf2bもアンドゲート9で
ゲート信号wと論理演算後、f2として制御回路6aへ
入力される。ここで、制御回路6bは以下の処理を行う
The output c2b of the comparator 5b2 is logically operated on the gate signal w and the search memory match signal c2a by an AND gate 8 and an OR gate 7, and is then inputted to the control circuit 6b as a match signal c2. After the flag f2b is also subjected to a logical operation with the gate signal w by the AND gate 9, it is inputted as f2 to the control circuit 6a. Here, the control circuit 6b performs the following processing.

【0030】フラグf2a又はf2の論理値”1”を検
出する前に、一致信号c2の論理値”1”を検出した場
合はサブグループz2a,サブグループz2bの内のど
ちらかにキーデータy2と一致する検索データ、又は補
助検索データが存在することになり、図2の構成例と同
じくヒット信号h2=論理値”1”と検索終了信号s2
=論理値”1”を使って外部回路に通知する。
If the logical value "1" of the coincidence signal c2 is detected before the logical value "1" of the flag f2a or f2 is detected, the key data y2 and Matching search data or auxiliary search data exists, and the hit signal h2 = logical value "1" and search end signal s2 are generated as in the configuration example of FIG.
=Notify the external circuit using the logical value "1".

【0031】一致信号c2を検出する前にフラグf2a
のみの論理値”1”を検出した場合は、すなわち、サブ
グループz2a内にはデータがなく、サブグループz2
bの検索が終了していない場合は、カウント信号e2に
より補助検索メモリ4b2の補助検索メモリアドレスa
2bをカウントアップし、フラグf2の論理値”1”を
検出するまで検索処理を繰り返す。なお、この時、カウ
ント信号e2は検索メモリ4b1にも出力されるので、
検索メモリ4b1の出力であるフラグf2aを監視対称
から外す。そして、フラグf2の論理値”1”を検出し
ても一致信号c2を検出できない場合は、サブグループ
z2b内にもデータがなかったことになるので、図2の
構成例と同じくヒット信号h2=論理値”0”と検索終
了信号s2=論理値”1”を使って外部回路に通知する
。一方、フラグf2の論理値”1”を検出する以前に一
致信号c2を検出した場合は、サブグループz2b内に
データが存在することが判明したので、ヒット信号h2
=論理値”1”と検索終了信号s2=論理値”1”を使
って外部回路に通知する。
[0031] Before detecting the coincidence signal c2, the flag f2a is
If a logical value of "1" is detected, that is, there is no data in subgroup z2a, and subgroup z2a is
If the search for b has not been completed, the count signal e2 causes the auxiliary search memory address a of the auxiliary search memory 4b2 to be
2b is counted up and the search process is repeated until the logical value "1" of the flag f2 is detected. Note that at this time, the count signal e2 is also output to the search memory 4b1, so
The flag f2a, which is the output of the search memory 4b1, is removed from the monitoring target. If the match signal c2 cannot be detected even if the logical value "1" of the flag f2 is detected, it means that there is no data in the subgroup z2b, so the hit signal h2= The external circuit is notified using the logic value "0" and the search end signal s2=logic value "1". On the other hand, if the match signal c2 is detected before the logical value "1" of the flag f2 is detected, it is found that data exists in the subgroup z2b, so the hit signal h2 is detected.
= logical value "1" and search end signal s2 = logical value "1" to notify the external circuit.

【0032】逆に、一致信号c2を検出する前にフラグ
f2のみの論理値”1”を検出した場合は、フラグf2
を監視対称から外し、フラグf2aが論理値”1”とな
るまで検索処理を行う。この場合も、検索結果は図2の
構成例と同じく、ヒット信号h2,検索終了信号s2の
2信号を用いて外部回路へ通知する。なお、図1におい
ては、検索メモリ4b1と補助検索メモリ4b2を別の
メモリとして示してあるが、単一のメモリに検索メモリ
エリアと補助検索メモリエリアを設けるように構成して
もよい。アドレス変換器2b1及び2b2についても同
様である。
On the other hand, if the logical value "1" of only the flag f2 is detected before detecting the coincidence signal c2, the flag f2
is removed from the monitoring target, and search processing is performed until the flag f2a becomes the logical value "1". In this case as well, the search result is notified to the external circuit using two signals, the hit signal h2 and the search end signal s2, as in the configuration example of FIG. Although the search memory 4b1 and the auxiliary search memory 4b2 are shown as separate memories in FIG. 1, the search memory area and the auxiliary search memory area may be provided in a single memory. The same applies to address converters 2b1 and 2b2.

【0033】また、外部回路に対して検索ヒット時の検
索メモリアドレスa2a及び補助検索メモリアドレスa
2bを出力するように構成し、外部回路において、図1
と同様に構成され、かつ、図1において検索するデータ
と関連するデータを検索する他の回路(例えば、図1に
おいて電話番号を検索し、他の回路においてその氏名を
検索する)に前記アドレスを出力すれば、同時に関連す
るデータの検索を終了させることができる。
Furthermore, the search memory address a2a and the auxiliary search memory address a at the time of a search hit are sent to the external circuit.
2b, and in the external circuit,
The address is sent to another circuit that is configured similarly to the above and that searches for data related to the data searched in FIG. 1 (for example, searches for a telephone number in FIG. 1 and searches for the name in another circuit). By outputting the data, the search for related data can be completed at the same time.

【0034】なお、本発明は上記実施例に限定されるも
のではなく、本発明の趣旨に基づき種々の変形が可能で
あり、それらを本発明の範囲から排除するものではない
Note that the present invention is not limited to the above-mentioned embodiments, and various modifications can be made based on the spirit of the present invention, and these are not excluded from the scope of the present invention.

【0035】[0035]

【発明の効果】以上詳細に説明したように、本発明によ
れば、以下に記載の効果を奏する。 (1)あふれ検索データ数≦Rの条件下で必ずR回以内
の検索で検索結果の判定ができると同時に検索手段を2
面有するため、検索スピードが最高2倍となる。 (2)一般的には、ハッシュ法で検索データを分類した
サブグループでは、あふれ検索データ数はノーマル検索
データ数の平均値よりかなり小さい値をとるため、補助
検索メモリ4b2の容量は検索メモリ4b1に比べて少
量で良い。したがって、その容量に余裕があれば、サブ
グループ内のデータを検索メモリ4b1と補助検索メモ
リ4b2へ適当な割合で分配する(例えば、図5におい
て、各サブグループの検索データを検索回数がR′回(
R′<R)を越える部分を補助検索メモリに格納する)
ことより並列検索が可能となり、検索スピードの向上が
図れる。 (3)補助検索メモリ4b2とその検索手段を2面以上
設けて並列検索を行うことにより更に検索スピードの向
上が図れる。
[Effects of the Invention] As explained in detail above, according to the present invention, the following effects can be achieved. (1) Under the condition that the number of overflow search data ≦ R, the search result can be determined by searching within R times and at the same time, the search method can be set to 2.
Search speed can be up to twice as fast. (2) Generally, in subgroups in which search data is classified using the hash method, the number of overflow search data takes a value much smaller than the average value of the number of normal search data, so the capacity of the auxiliary search memory 4b2 is smaller than the capacity of the search memory 4b1. A small amount is sufficient compared to . Therefore, if there is enough capacity, the data in the subgroup is distributed to the search memory 4b1 and the auxiliary search memory 4b2 at an appropriate ratio (for example, in FIG. 5, the search data of each subgroup is times(
Store the part exceeding R′<R) in the auxiliary search memory)
This makes it possible to perform parallel searches and improve search speed. (3) Search speed can be further improved by providing two or more auxiliary search memories 4b2 and their search means to perform parallel searches.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】本発明の実施例によるデータ検索方式の構成を
示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a data search method according to an embodiment of the present invention.

【図2】従来のデータ検索方式の構成を示すブロック図
である。
FIG. 2 is a block diagram showing the configuration of a conventional data search method.

【図3】ハッシュ法によるサブグループ中の検索データ
数の偏りを示す説明図である。
FIG. 3 is an explanatory diagram showing the bias in the number of search data in subgroups using the hash method.

【符号の説明】[Explanation of symbols]

1b      演算器 2b1,2b2    アドレス変換器3b1,3b2
    アドレスカウンタ4b1    検索メモリ 4b2    補助検索メモリ 5b1,5b2    比較器 6b      制御回路 7        オアゲート 8,9    アンドゲート
1b Arithmetic unit 2b1, 2b2 Address converter 3b1, 3b2
Address counter 4b1 Search memory 4b2 Auxiliary search memory 5b1, 5b2 Comparator 6b Control circuit 7 OR gates 8, 9 AND gate

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】  ハッシュ法を用いたデータ検索方式に
おいて、(a)ハッシュ演算によりサブグループに分類
された検索データ中、各サブグループ内の少なくとも一
部の検索データをサブグループ単位に格納した検索メモ
リと、(b)前記各サブグループ内の残りの検索データ
をサブグループ単位に格納した1つ以上の補助検索メモ
リとを備え、前記検索メモリ及び補助検索メモリを並列
動作させてデータ検索を行うことを特徴とするハッシュ
法を用いたデータ検索方式。
Claim 1: In a data search method using a hash method, (a) a search in which at least some search data in each subgroup is stored in subgroup units among search data classified into subgroups by a hash operation; and (b) one or more auxiliary search memories storing the remaining search data in each subgroup in units of subgroups, and performs data searches by operating the search memory and the auxiliary search memory in parallel. A data retrieval method using the hash method, which is characterized by the following.
【請求項2】  検索メモリには、各サブグループ内の
検索データ数の代表値にほぼ等しい数のデータを格納し
たことを特徴とする請求項1記載のハッシュ法を用いた
データ検索方式。
2. The data search method using a hashing method according to claim 1, wherein the search memory stores a number of data approximately equal to a representative value of the number of search data in each subgroup.
【請求項3】  各サブグループ毎に検索メモリに格納
するデータ数と補助検索メモリに格納するデータ数を設
定することを特徴とする請求項1記載のハッシュ法を用
いたデータ検索方式。
3. The data search method using a hashing method according to claim 1, wherein the number of data to be stored in the search memory and the number of data to be stored in the auxiliary search memory are set for each subgroup.
JP3132960A 1991-06-04 1991-06-04 Data retrieving system applying hash method Withdrawn JPH04358266A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3132960A JPH04358266A (en) 1991-06-04 1991-06-04 Data retrieving system applying hash method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3132960A JPH04358266A (en) 1991-06-04 1991-06-04 Data retrieving system applying hash method

Publications (1)

Publication Number Publication Date
JPH04358266A true JPH04358266A (en) 1992-12-11

Family

ID=15093527

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3132960A Withdrawn JPH04358266A (en) 1991-06-04 1991-06-04 Data retrieving system applying hash method

Country Status (1)

Country Link
JP (1) JPH04358266A (en)

Similar Documents

Publication Publication Date Title
JPH0973793A (en) Associative storage
JP3175322B2 (en) Automatic logic generation method
US5319347A (en) Parallelized magnitude comparator for comparing a binary number to a fixed value
US5327569A (en) Data driven type processor including a generation management system
JPH04358266A (en) Data retrieving system applying hash method
US5357235A (en) Parallelized magnitude comparator
JPH0512337A (en) Data retrieval system using hash method
US5161230A (en) Multifield identification circuit and related method of operation
US5542080A (en) Method for controlling execution of data driven type information processor
US6614676B2 (en) Content-addressable memory device
JP2735255B2 (en) Hatching treatment method
JPH05282362A (en) Data retrieving circuit
JPH0743942B2 (en) Compound associative memory
JPS59123048A (en) Sorting processor
JP2959497B2 (en) Data processing device and data processing method
JP2798109B2 (en) Arithmetic device, storage device, and computer system for fuzzy set processing
JPH07253918A (en) Decentralized data base access system
JPH01226026A (en) Retrieving circuit
JPH04342027A (en) Inference processor
Zoteva et al. Generalized Nets with Limited Number of Token Splitting Allowed
JPS63111528A (en) Data retrieving system
JPS60196844A (en) Retrieving device of information
JPS6116327A (en) Data processor
JPH05307571A (en) Information retrieval system
JPH04182736A (en) Interference system

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19980903