JPH03164866A - Hash encoding circuit - Google Patents

Hash encoding circuit

Info

Publication number
JPH03164866A
JPH03164866A JP1302142A JP30214289A JPH03164866A JP H03164866 A JPH03164866 A JP H03164866A JP 1302142 A JP1302142 A JP 1302142A JP 30214289 A JP30214289 A JP 30214289A JP H03164866 A JPH03164866 A JP H03164866A
Authority
JP
Japan
Prior art keywords
hash
data
hash address
bit
key
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.)
Pending
Application number
JP1302142A
Other languages
Japanese (ja)
Inventor
Hirotsuyo Kobayashi
大剛 小林
Yoshiharu Iwamoto
岩本 義晴
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.)
Hitachi Microcomputer System Ltd
Hitachi Ltd
Original Assignee
Hitachi Ltd
Hitachi Microcomputer Engineering 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 Hitachi Ltd, Hitachi Microcomputer Engineering Ltd filed Critical Hitachi Ltd
Priority to JP1302142A priority Critical patent/JPH03164866A/en
Publication of JPH03164866A publication Critical patent/JPH03164866A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To adopt a hash encoding circuit even to the address starting method of a collision treatment by providing a first table to output a hash address by an input key, a second table to output the hash address by the input key and the number of times of collision, and selecting mechanism for an output hash address. CONSTITUTION:When hash address data, which are outputted by the first table 3 according to the input key, executes collision in the search of a hash table, the second table 6 outputs the new hash address data by inputting the key and the number of times for collision. Further, the selecting mechanism of the first and second tables 3 and 6 issues an instruction to select the second table 6. Accordingly, the new hash address can be obtained. As long as the collision is generated, the number of times of collision is counted and inputted by a series of these operations. Thus, the second table 6 can output the new hash address data.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は情報処理システムにおけるデータベース管理シ
ステム等に用いられるハツシュ符号化回路に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a hash encoding circuit used in a database management system or the like in an information processing system.

〔従来の技術〕[Conventional technology]

従来のハツシュ回路は、特−開開63−136223号
公報に記載のように入力される全てのキーに対して予め
ランダム性のよいハツシュ番地を計し、これを保持させ
たテーブルを設け、入力された。キーをアドレスとして
該テーブルの内容を読み出し。
In the conventional hash circuit, as described in Japanese Patent Laid-open No. 63-136223, hash addresses with good randomness are calculated in advance for all input keys, and a table holding the numbers is provided. It was done. Read the contents of the table using the key as an address.

このデータをハツシュ番地とするように構成されていた
It was configured to use this data as the hash address.

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

上記従来技術は計算機プログラムでの予約語や情報処理
システムでの限定された語の入力だけが期待される場合
などの予め定まっているデータに関しては、データ索引
用のキーに縮約するときにランダムな数値となるように
考慮することができるため有効なハツシュ番地を生成す
ることができるが、しかし変数名や関数名およびリスト
などの使用者が任意に選択する予め定まっていないデー
タに関しては配慮がされておらず、生成されたハツシュ
番地がハツシュ表上で衝突する場合が起りうるという問
題があり、このための衝突の処理法には連鎖法しか適用
できないという問題があった。
In the above conventional technology, for predetermined data such as when only reserved words in a computer program or limited words in an information processing system are expected to be input, randomization is performed when condensing to a key for data indexing. It is possible to generate a valid hash address because it is possible to take into consideration the numerical value, but consideration must be given to data that is not predetermined and that is arbitrarily selected by the user, such as variable names, function names, and lists. There is a problem in that the generated hash addresses may collide on the hash table, and that only the chain method can be applied as a method for dealing with such collisions.

本発明の目的はハツシュ表上で衝突が生じている限り新
たなハツシュ番地を生成するとともに。
The purpose of the present invention is to generate a new hash address as long as a collision occurs on the hash table.

入カキ−に対応するハツシュ番地と新たに生成したハツ
シュ番地との選択機構を儲えることにより。
By creating a selection mechanism between the hash address corresponding to the input key and the newly generated hash address.

衝突の処理法である開番地法にも適用できるハツシュ符
号化回路を提供することにある。
An object of the present invention is to provide a hash encoding circuit that can also be applied to the open address method, which is a collision processing method.

〔課題を解決するための手段〕[Means to solve the problem]

上記目的を達成するために1本発明によるハツシュ符号
化回路は、入力されたキーを入力値としてハツシュ番地
を出力する第1のテーブルと、上記キーとハツシュ番地
の衝突回数を入力値として新たなハツシュ番地を出力す
る第2のテーブルと。
To achieve the above object, a hash encoding circuit according to the present invention includes a first table that outputs a hash address using an input key as an input value, and a first table that outputs a hash address using an input key as an input value, and a new table that outputs a hash address using the number of collisions between the key and the hash address as an input value. and a second table that outputs hash addresses.

第1のテーブルの出力値と第2のテーブルの出力値との
選択機構とを設け、最初のキー人力時には第1のテーブ
ルの出力値を選択してハツシュ番地として出力し、ハツ
シュ表の探索により衝突が発生した場合には本ハツシュ
符号化回路に衝突回数を与えるとともに、第2のテーブ
ルの出力値を選択してハツシュ番地を出力することがで
き、ハツシュ表上で衝突が生じている限り新たなハツシ
ュ番地を生成することができるようにしたものである。
A selection mechanism is provided between the output value of the first table and the output value of the second table, and when the first key is entered manually, the output value of the first table is selected and output as a hash address, and by searching the hash table, When a collision occurs, the number of collisions is given to this hashish encoding circuit, and the output value of the second table can be selected to output the hashish address.As long as a collision occurs on the hashish table, a new This makes it possible to generate a hash address.

〔作用〕[Effect]

上記ハツシュ符号化回路は、入力されたキーによって第
1のテーブルが出力したハツシュ番地がハツシュ表の探
索により衝突が発生した場合には、上記キーと衝突回数
を入力することにより第2のテーブルが新たなハツシュ
番地を出力し、さらに第1のテーブルの出力値と第2の
テーブルの出力値との選択機構に対して第2のテーブル
の出力値を選択するように指示することにより新たなハ
ツシュ番地が出力されるように動作し、それによって衝
突が生じている限り衝突回数を計数して入力することで
第2のテーブルが新たなハツシュ番地を出力しつづけ、
また第1のテーブルのハツシュ関数と第2のテーブルの
ハツシュ関数には別々のアルゴリズムを採用するかある
いは発見的手法によって、第1種および第2種クラスタ
の発生を独立した2つのテーブルという特性を生かして
抑制することができる。
The hashish encoding circuit generates a second table by inputting the key and the number of collisions when a collision occurs in the hashish address outputted from the first table by the inputted key. A new hash address is output, and a new hash address is output by instructing the selection mechanism between the output value of the first table and the output value of the second table to select the output value of the second table. As long as a collision occurs, the second table continues to output new hash addresses by counting and inputting the number of collisions.
In addition, separate algorithms are used for the hash function of the first table and the hash function of the second table, or by using a heuristic method, the generation of type 1 and type 2 clusters is determined based on the characteristics of two independent tables. It can be harnessed and suppressed.

〔実施例〕〔Example〕

以下に本発明の一実施例を第1図ないし第6図により説
明する。
An embodiment of the present invention will be described below with reference to FIGS. 1 to 6.

第1図は本発明によるハツシュ符号化回路の一実施例を
示すブロック図である。第1図において、1はキーレジ
スタ、2はビット・シャツフル回路、3は第1のテーブ
ル、4はビット・シャツフル回路、5はセレクタ回路、
6は第2のテーブル、7はハツシュ番地レジスタ、10
はキーデータ、11は中間キーデータ、12はハツシュ
番地データ、13は衝突回数データ、14は中間キーデ
ータ、15はハツシュ番地データ、16は選択(1号、
17はハツシュ番地データである。
FIG. 1 is a block diagram showing an embodiment of a hash encoding circuit according to the present invention. In FIG. 1, 1 is a key register, 2 is a bit shirtful circuit, 3 is a first table, 4 is a bit shirtful circuit, 5 is a selector circuit,
6 is the second table, 7 is the hash address register, 10
is key data, 11 is intermediate key data, 12 is hash address data, 13 is collision number data, 14 is intermediate key data, 15 is hash address data, 16 is selection (No. 1,
17 is hash address data.

このハツシング処理されるmビットのキーはキーレジス
タ1へ入力されて一時記憶され、このキーレジスタ1の
出力のキーデータ10はビット・シャツフル回路2,4
に出力できるように接続される。ビット・シャツフル回
路2は入力されたmビットのキーデータ10をある一定
幅たとえば第1図ではLSBからQピット幅に切り取り
、これらの切り取られた各部分を数値としである定めら
れた演算側に従って演算することによりΩビットのデー
タに縮約する回路で、このΩビットに縮約されたデータ
は中間キーデータ11として第1のテーブル3に出力で
きるように接続される。
This hashed m-bit key is input to the key register 1 and temporarily stored, and the key data 10 output from the key register 1 is stored in the bit shirtful circuits 2 and 4.
connected so that it can be output to. The bit shirtful circuit 2 cuts the inputted m-bit key data 10 to a certain width, for example, from the LSB to the Q pit width in FIG. This circuit reduces the data to Ω bits by calculating according to the following, and is connected so that the data reduced to Ω bits can be outputted to the first table 3 as intermediate key data 11.

第1のテニブル3は入力される中間キーデータ11の全
ての値に対してランダム性のよいXビットのハツシュ番
地を計算して予め格納されているもので、いま中間キー
データ11が入力されると中間キーに対応する内容が読
み出されてキーレジスタ1のキーデータ10に対応する
Xビットのハツシュ番地かえられる。このXビットのデ
ータはハツシュ番地データ12としてセレクタ回路5に
出力できるように接続される。
The first tenible 3 is stored in advance by calculating a hash address of X bits with good randomness for all values of the input intermediate key data 11, and the intermediate key data 11 is now input. The contents corresponding to the intermediate key are read out, and the hash address of the X bits corresponding to the key data 10 of the key register 1 is changed. This X-bit data is connected so that it can be output to the selector circuit 5 as hash address data 12.

またピッ1−・シャツフル回路4はmビットのキーデー
タ1oとハツシュ表の探索により発生したXビットの衝
突回数データ13とを入力として、これを混合すること
によりΩビットのデータに縮約する回路で、この縮約法
については上記ビット・シャツフル回路2と同様であり
、このΩビットのデータは中間キーデータ14として第
2のテーブル6に出力できるように接続される。
In addition, the Pi1-shirtful circuit 4 inputs the m-bit key data 1o and the X-bit collision count data 13 generated by searching the hash table, and mixes them to reduce the data to Ω-bit data. This reduction method is the same as the bit shirtful circuit 2 described above, and the Ω bit data is connected so as to be outputted to the second table 6 as intermediate key data 14.

第2のテーブル6は入力される中間キーデータ14の全
ての値に対してランダム性がよくて第1のテーブル3の
ハツシュ番地系列とは異なった系列をもつXビットのハ
ツシュ番地が予め計算されて格納されているもので、い
ま中間キーデータ14が入力されると中間キーに対応す
る内容が読み出されてハツシュ番地衝突時の新しいハツ
シュ番地かえられる。このXビットのデータはハツシュ
番地データはハツシュ番地データ15としてセレクタ回
路5に出力できるように接続される。
The second table 6 has good randomness for all values of the input intermediate key data 14, and X-bit hash addresses having a series different from the hash address series of the first table 3 are calculated in advance. If the intermediate key data 14 is now input, the contents corresponding to the intermediate key are read out and a new hash address is changed in the event of a hash address collision. This X-bit data is connected so that the hash address data can be output to the selector circuit 5 as hash address data 15.

セレクタ回路5はハツシュ番地データ12とハツシュ番
地データ15との選択出力回路で、ハツシュ番地データ
の選択信号16によって選択動作が行なわれる。セレク
タ回路16により選択されたXビットのデータはハツシ
ュ番地データ17としてXビットのハツシュ番地レジス
タ17に出力されるように接続されており、このハツシ
ュ番地レジスタ17にハツシュ番地データを一時記憶す
ることにより、ハツシュ番地として出力できるようにな
っている。
The selector circuit 5 is a selection output circuit for hash address data 12 and hash address data 15, and a selection operation is performed by a selection signal 16 of the hash address data. The X-bit data selected by the selector circuit 16 is connected to be outputted to the X-bit hash address register 17 as hash address data 17, and by temporarily storing the hash address data in this hash address register 17, , can be output as a hash address.

なお、キーレジスタ1およびハツシュ番地レジスタ7の
制・御と、ハツシュ表の探索による衝突回数データ13
および選択信号16の入力設定とは、上位制御回路(図
示せず)からの指示によるものであり、また本発明では
上位制御回路の構成については規定しない。
In addition, the number of collisions data 13 is obtained by controlling the key register 1 and the hash address register 7 and by searching the hash table.
The input setting of the selection signal 16 is based on an instruction from a higher-level control circuit (not shown), and the present invention does not specify the configuration of the higher-level control circuit.

つぎに第1図の動作について、具体的な数値および演算
法を下記のように設定し、第2図ないし第6図により説
明する。
Next, the operation shown in FIG. 1 will be explained with reference to FIGS. 2 to 6, with specific numerical values and calculation methods set as follows.

1、キーはJISコードで表わされる2文字とする(m
=16)。
1. The key shall be two characters expressed in JIS code (m
=16).

2、ハツシュ表の大きさ=2′″は′7′とする。2. The size of the hash table = 2'' is '7'.

すなわちテーブル3,6およびセレクタ回路5が出力す
るハツシュ番地データ12,15゜17のビット幅:X
は3ビツトでj Ol〜′6′の数値を取る(x=3)
That is, the bit width of the hash address data 12, 15°17 output by the tables 3, 6 and the selector circuit 5:
is 3 bits and takes the value jOl~'6' (x=3)
.

3、ビット・シャツフル回路2は入力される16ビツト
のキーをLSBから5ビツトの幅に区切るとともに、各
切片について排他的論理和をとり、5ビツトの中間コー
ド(中間キーデータ)11に縮約することとする(m=
5)。
3. The bit shirtful circuit 2 divides the input 16-bit key into 5-bit widths starting from the LSB, performs an exclusive OR on each section, and compresses it into a 5-bit intermediate code (intermediate key data) 11. (m=
5).

4、ビット・シャツフル回路4は入力される16ビツト
のキーを上位とし、3ビツトの衝突回数データ13を下
位とした19ビツトのデータを、LSI3から5ピッ1
−の幅に区切るとともに、各切片について排他的論理和
をとり、5ビツトの中間コード(中間キーデータ)14
に縮約することとする。
4. The bit shirtful circuit 4 outputs the 19-bit data from the LSI 3, with the input 16-bit key as the upper-order and the 3-bit collision count data 13 as the lower-order.
-, and performs an exclusive OR on each section to create a 5-bit intermediate code (intermediate key data) 14
This can be reduced to .

5、テーブル3のハツシュ関数: b+(K)は除算法
を適用し1次式でハツシュ番地データが計算され保持さ
れていることとする。
5. Hash function of Table 3: It is assumed that b+(K) hash address data calculated and held using a linear equation by applying the division method.

ho(K) =K mod7 (Kは中間キーデータ11) 6、テーブル4のハツシュ関数:h□(K)は乗算法を
適用し1次式でハツシュ番地データが計算・され保持さ
れていることとする。
ho(K) = K mod 7 (K is intermediate key data 11) 6. Hash function in Table 4: h□(K) applies the multiplication method and hash address data is calculated and retained using a linear formula. shall be.

hz (K) = [7X (KX 2) ](Kは中
間キーデータ14,2は黄金分割比の逆数:2=(匹−
−1)/2゜ ′[]′はガウス記号、  ’()’ は小数部分の抽出記号) 上記の構成において、下記の3組のキーがキーの生起順
に格納要求が出されるケースを想定する。
hz (K) = [7X (KX 2)] (K is intermediate key data 14, 2 is the reciprocal of the golden section ratio: 2 = (fish -
-1)/2゜'[]' is a Gauss symbol, '()' is a symbol for extracting the decimal part) In the above configuration, assume a case where a request is made to store the following three sets of keys in the order of occurrence of the keys. .

1、“DO+ 2、’ED’ 3、’IF’ まずキー:  ’Do’ がキーレジスタ1に一時記憶
されるとともに、ビット・シャツフル回路2へ送られて
中間キーデータ11が出力される。第2図はビット・シ
ャツフル回路2の中間キーデータの演算過程を示す説明
図である。第2図において、第2図aに示すビット・シ
ャツフル回路2に送られたキー:  ’Do’は、第2
図すに示すようなJISコードのビット構成で表わされ
る。ビット・シャツフル回路2では第2図Cに示すよう
にこれを5ビット単位に区切るとともに、第2図dに示
すようにこれら5ビツトの各切片間で排他的論理和をと
って10進値で′3o′が得られ中間キーデータ11と
して出力される。
1, “DO+” 2, “ED” 3, “IF” First, the key: “Do” is temporarily stored in the key register 1, and is sent to the bit shirtful circuit 2, where intermediate key data 11 is output. Fig. 2 is an explanatory diagram showing the calculation process of intermediate key data in the bit/shirtful circuit 2. In Fig. 2, the key sent to the bit/shirtful circuit 2 shown in Fig. 2a is 'Do'. is the second
It is represented by the bit configuration of the JIS code as shown in the figure. In the bit shirtful circuit 2, as shown in Figure 2C, this is divided into 5-bit units, and as shown in Figure 2D, exclusive OR is performed between each section of these 5 bits to obtain a decimal value. '3o' is obtained and output as intermediate key data 11.

ここで得られた中間キーデータ11:  ’30’はテ
ーブル3に送られる。第3図はテーブル3のハツシュ番
地データの保存状態および索引状態を示す説明図である
。テーブル3は第3図に示すように構成され、第3図a
に示すように中間キーデータ11:  ’30’ にて
索引することにより、数値′2″が得られハツシュ番地
データ12として出力される。このテーブル3で得られ
たハツシュ番地データ12:  ’2’はセレクタ回路
5およびハツシュ番地レジスタ7を経由して上位制御回
路に送られ、さらに第6図aに示すように上位制御回路
にてハツシュ表が探索されて、キー:  ’Do’がハ
ツシュ番地′2″に格納される。第6図はハツシュ表の
記憶状態を示す説明図である。
The intermediate key data 11: '30' obtained here is sent to table 3. FIG. 3 is an explanatory diagram showing the storage state and index state of hash address data in table 3. The table 3 is configured as shown in FIG.
As shown in Table 3, by indexing using intermediate key data 11: '30', the numerical value '2'' is obtained and output as hash address data 12. Hash address data 12 obtained from this table 3: '2' is sent to the upper control circuit via the selector circuit 5 and the hash address register 7, and the hash table is searched in the upper control circuit as shown in FIG. 2". FIG. 6 is an explanatory diagram showing the storage state of the hash table.

つぎにキー:  ’ED’ が入力されると、同様にし
てビット・シャツフル回路2により中間キーデータ11
:  ’31’ が得られ、これにより第3図すに示す
ようにテーブルから数値′3′がハツシュ番地データ1
2として出力され、第6図すに示すように上位制御回路
にてハツシュ表のハツシュ番地′3′にキー:  ’E
D’が格納される。
Next, when the key 'ED' is input, the intermediate key data 11 is generated by the bit shirtful circuit 2 in the same way.
: '31' is obtained, and as a result, the number '3' is obtained from the table as shown in Figure 3.
2, and as shown in Figure 6, the upper control circuit sets the key: 'E' to hash address '3' in the hash table.
D' is stored.

つぎにキー:’IF’ が入力されると、ビット・シャ
ツフル回路2により中間キーデータ11:′30′が得
られ、これによりテーブル3から数値′2′がハツシュ
番地データ12として出力さ、れるが、第6図に示すよ
うに上位制御回路にてハツシュ表を探索するとハツシュ
番地′2′には既にキー:  ’Do’ が詰っている
(衝突が生じた)ことが検出される。これにより上位制
御回路は衝突回数データ13として数値′1′をビット
・シャツフル回路4に入力するとともに、ハツシュ番地
データの選択信号16を指示してセレクタ回路5がテー
ブル6のハツシュ番地データ15をハツシュ番地データ
17として選択出力す7るように制御する。
Next, when the key: 'IF' is input, the intermediate key data 11: '30' is obtained by the bit shirt full circuit 2, and the numerical value '2' is output from the table 3 as the hash address data 12. However, as shown in FIG. 6, when the hash table is searched by the upper control circuit, it is detected that the key: 'Do' is already filled in the hash address '2' (a collision has occurred). As a result, the upper control circuit inputs the numerical value '1' to the bit shirtful circuit 4 as the number of collisions data 13, and also instructs the hash address data selection signal 16 so that the selector circuit 5 selects the hash address data 15 of the table 6. It is controlled to selectively output as hash address data 17.

このときビット・シャツフル回路4から中間キーデータ
14が次のように出力される。第4図はビット・シャツ
フル回路4の中間キーデータの演算過程を示す説明図で
ある。第4図において、第4図aに示すビット・シャツ
フル回路4に送られた衝突回数データ13:  ’1’
 と先に入力されているキー:  ’IF’ は第4図
すに示すようなビット構成で表わされる。ビット・シャ
ツフル回路4では第4図Cに示すようにこれを5ビット
単位に区切るとともに、第4図dに示すようにこれら5
ビツトの各切片間で排他的論理和をとって10進値で2
2′が得られ中間キーデータ14として出力される。
At this time, intermediate key data 14 is output from the bit shirtful circuit 4 as follows. FIG. 4 is an explanatory diagram showing the calculation process of intermediate key data of the bit shirtful circuit 4. In FIG. 4, collision count data 13 sent to the bit shirtful circuit 4 shown in FIG. 4a: '1'
The key previously input: 'IF' is represented by a bit configuration as shown in Figure 4. In the bit shirtful circuit 4, this is divided into 5-bit units as shown in FIG. 4C, and these 5 bits are divided as shown in FIG. 4D.
Take the exclusive OR between each intercept of bits and get 2 in decimal value.
2' is obtained and output as intermediate key data 14.

ここで得られた中間キーデータ14:  ’22’はテ
ーブル6に送られる。第5図はテーブル6のハツシュ番
地データの保存状態および索引状態を示す説明図である
。テーブル6は第5図に示すように構成され、第5図a
に示すように中間キーデータ14:  ’22’ にて
索引することにより、数値′4′が得られハツシュ番地
データ15として出力される。このテーブル6で得られ
たハツシュ番地データ15:’4’はセレクタ回路5お
よびハツシュ番地ンジスタ7を経由して上位制御回路に
送られ、さらに第6図Cに示すように上位制御回路にて
ハツシュ表が探索されて、キー:  ’IF’がハツシ
ュ番地′4′に格納される。
The intermediate key data 14: '22' obtained here is sent to table 6. FIG. 5 is an explanatory diagram showing the storage state and index state of hash address data in table 6. The table 6 is configured as shown in FIG.
As shown in the figure, by indexing using the intermediate key data 14: '22', the numerical value '4' is obtained and output as the hash address data 15. The hash address data 15:'4' obtained from this table 6 is sent to the upper control circuit via the selector circuit 5 and the hash address register 7, and is further sent to the upper control circuit as shown in FIG. 6C. The table is searched and the key: 'IF' is stored at hash address '4'.

本実施例によれば、入力されたキーによって第1のテー
ブル3が出力したハツシュ番地データがハツシュ表の探
索にて衝突が発生した場合においても、上記キーと衝突
回数を入力することによって第2のテーブル6が新たな
ハツシュ番地データを出力し、さらに第1のテーブル3
と第2のテーブル6との選択機構が第2のテーブル6を
選択するように指示することにより新たなハツシュ番地
が得られ、これら一連の動作によって衝突が生じている
限り衝突回数を計数して入力することにより第2のテー
ブル6が新たなハツシュ番地データを出力することがで
きる。
According to this embodiment, even if a collision occurs in the hash address data output by the first table 3 due to the input key, the second table 3 can be retrieved by inputting the key and the number of collisions. The table 6 outputs new hash address data, and the first table 3
A new hash address is obtained by instructing the selection mechanism of and second table 6 to select the second table 6, and as long as a collision occurs due to these series of operations, the number of collisions is counted. By inputting the data, the second table 6 can output new hash address data.

なお第1図の一実施例の動作にていては第1図に具体的
な数値および演算法を一義的に設定して第2図ないし第
6図により説明したが、二九に限らず本ハツシュ符号化
回路が利用されるターゲットに最適な数値および演算法
で構成できることは口うまでもない。
In the operation of the embodiment shown in Fig. 1, specific numerical values and calculation methods are set uniquely in Fig. 1 and explained using Figs. 2 to 6. It goes without saying that the hashish encoding circuit can be configured with numerical values and arithmetic methods that are optimal for the target to be used.

(発明の効果〕 本発明によれば、入カキ−によりハツシュ番地を出力す
る第1のテーブルと、入カキ−と衝突回数値によりハツ
シュ番地を出力する第2のテーブルとの2種類の独立し
たテーブルを設けるとともに、出力ハツシュ番地の選択
機構を設けることにより、ハツシュ番地の衝突が続く限
り新たなハツシュ番地を出力することができるので、衝
突処理法の開番地法にも適用が可能となる効果がある。
(Effects of the Invention) According to the present invention, there are two types of independent tables: a first table that outputs a hash address based on an input key, and a second table that outputs a hash address based on an input key and a collision count value. By providing a table and an output hash address selection mechanism, a new hash address can be output as long as a hash address conflict continues, which has the effect of being applicable to the open address method of the collision handling method. There is.

またハツシュ番地の生成が独立したビット・シャツフル
回路による中間キーの生成と、さらには独立したテーブ
ルの索引によってなされるので。
Furthermore, the hash address is generated by generating an intermediate key using an independent bit/shirtful circuit and by indexing an independent table.

ハツシュ関数を別々のアルゴリズムにすることは言うま
でもなく1発見的手法などによってテーブルを構築する
ことができ、これらの手段によって第1種および第2ク
ラスタの発生を抑止する効果もある。
Needless to say, a table can be constructed by using a heuristic method or the like, as well as using different algorithms for hash functions, and these methods have the effect of suppressing the occurrence of type 1 and type 2 clusters.

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

第1図は本発明によるハツシュ符号化回路の一実施例を
示すブロック図、第2図は第1図のビット・シャツフル
回路2の中間キーデータの演算過程を示す説明図、第3
図は第1図のテーブル3のハツシュ番地データの保存状
態および索引状態を示す説明図、第4図は第1図のビッ
ト・シャツフル回路4の中間キーデータの演算過程を示
す説明図、第5図は第1図のテーブル6のハツシュ番地
データの保存状態および索引状態を示す説明図。 第6図は第1図のハツシュ表の記憶状態を示す説明図で
ある。 1・・・キーレジスタ、 2・・・ビット・シャツフル回路、 3・・・第1のテーブル。 4・・・ビット・シャツフル回路、 5・・・セレクタ回路、 6・・・第2のテーブル。 7・・・ハツシュ番地レジスタ。 13・・・衝突回数データ、 16・・・選択信号。 纂 図 纂 図 d 栴 仝 図 口I■エコ (22−−10達未現) 第
FIG. 1 is a block diagram showing an embodiment of the hash encoding circuit according to the present invention, FIG. 2 is an explanatory diagram showing the calculation process of intermediate key data of the bit shirtful circuit 2 of FIG.
4 is an explanatory diagram showing the storage state and index state of hash address data in table 3 in FIG. 1, FIG. FIG. 5 is an explanatory diagram showing the storage state and index state of hash address data in table 6 of FIG. 1. FIG. 6 is an explanatory diagram showing the storage state of the hash table of FIG. 1. 1...Key register, 2...Bit shirtful circuit, 3...First table. 4... Bit shirtful circuit, 5... Selector circuit, 6... Second table. 7... Hatshu address register. 13...Collision number data, 16...Selection signal. Compilation Map Compilation Map d 栴仝口I ■Eco (22--10 Not Existed) No.

Claims (1)

【特許請求の範囲】[Claims] 1、入力されるキーに対応するハッシュ番地を保持する
第1のテーブルと、上記入力されるキーおよびハッシュ
表探索により衝突が発生した場合に入力される衝突回数
値に対応するハッシュ番地を保持する第2のテーブルと
、上記第1のテーブルの読出し内容と第2のテーブルの
読出し内容とを選択して出力する手段とを具備すること
を特徴とするハッシュ符号化回路。
1. A first table that holds hash addresses corresponding to input keys, and a hash address that corresponds to the input key and the collision count value that is input when a collision occurs due to the hash table search. A hash encoding circuit comprising: a second table; and means for selecting and outputting the read contents of the first table and the read contents of the second table.
JP1302142A 1989-11-22 1989-11-22 Hash encoding circuit Pending JPH03164866A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1302142A JPH03164866A (en) 1989-11-22 1989-11-22 Hash encoding circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1302142A JPH03164866A (en) 1989-11-22 1989-11-22 Hash encoding circuit

Publications (1)

Publication Number Publication Date
JPH03164866A true JPH03164866A (en) 1991-07-16

Family

ID=17905414

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1302142A Pending JPH03164866A (en) 1989-11-22 1989-11-22 Hash encoding circuit

Country Status (1)

Country Link
JP (1) JPH03164866A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7409542B2 (en) * 2001-09-26 2008-08-05 Intel Corporation Security association management through the use of lookup tables

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7409542B2 (en) * 2001-09-26 2008-08-05 Intel Corporation Security association management through the use of lookup tables

Similar Documents

Publication Publication Date Title
US5199073A (en) Key hashing in data processors
EP0158530B1 (en) Nonrestoring divider
JPH02190928A (en) Divider
Davida et al. Fast parallel arithmetic via modular representation
JPH03164866A (en) Hash encoding circuit
US3223831A (en) Binary division apparatus
US4173789A (en) Multiplication control system
JPH08202533A (en) Division processor
KR100195719B1 (en) A divider
EP0208238A2 (en) High speed residue calculating apparatus
US7685221B1 (en) Efficient remainder calculation for even divisors
JP3251311B2 (en) Sorting method for data representing numerical values
JPH0471228B2 (en)
JP3074910B2 (en) Division device
JP2708625B2 (en) Homogeneous hashing processing method
JP3539077B2 (en) Division method by parallel operation method
JP2003060617A (en) Code generator
SU1688239A1 (en) Device for division of decimal numbers
JPH0370252B2 (en)
JPS6126135A (en) Conversion circuit of floating point data
JPH06180640A (en) Device and method for division
JPS5880724A (en) Timing device
JPH06110661A (en) Divider
JP2001243051A (en) Divider
JPS63231621A (en) Arithmetic processing unit