JPH04286072A - High speed retrieval system for table - Google Patents

High speed retrieval system for table

Info

Publication number
JPH04286072A
JPH04286072A JP3074333A JP7433391A JPH04286072A JP H04286072 A JPH04286072 A JP H04286072A JP 3074333 A JP3074333 A JP 3074333A JP 7433391 A JP7433391 A JP 7433391A JP H04286072 A JPH04286072 A JP H04286072A
Authority
JP
Japan
Prior art keywords
hash
determining means
value
determining
determination means
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
JP3074333A
Other languages
Japanese (ja)
Inventor
Takeshi Deguchi
毅 出口
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP3074333A priority Critical patent/JPH04286072A/en
Publication of JPH04286072A publication Critical patent/JPH04286072A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To supply a high speed retrieval system for table, which can retrieve the small number of table retrieval times, when the number of tables to be retrieved becomes considerably large. CONSTITUTION:A hash 1 decision means 14 deciding a hash value, a hash 2 decision means 15 deciding the hash value different from that of the hash 1 decision means 14, and a table reconstitution means 12 reconstructing a table group 2 are provided. When there are many equal value chains for the table of a constitution element unit from a hash table, the different hash table is newly pointed from the above hash table and the table of said constitution element unit is incorporated to the table reconstitution means with a value decided in the above hash 2 decision means 15 from the different hash table.

Description

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

【0001】0001

【産業上の利用分野】本発明は、大規模コンピュータシ
ステムにおける、テーブルの高速検索方式に属する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a high-speed search method for tables in large-scale computer systems.

【0002】0002

【従来の技術】従来この種の高速テーブル検索方式は、
おもに以下に述べる2つの方式があった。それは、ハッ
シュテーブルを用いてテーブルを検索する方式と、構成
要素名称を昇順(または降順)に並べてバイナリーサー
チを行う方式とであった。
[Prior Art] Conventionally, this type of high-speed table search method was
There were mainly two methods described below. Two methods were used: a method of searching a table using a hash table, and a method of performing a binary search by arranging component names in ascending (or descending) order.

【0003】0003

【発明が解決しようとする課題】上述した従来の高速テ
ーブル検索方式は、構成要素数が非常に多くなった場合
(例えば、数万以上)に、ハッシュ方式の時は、ハッシ
ュテーブルの大きさが数百〜数千の要素数に対応できて
いても、平均の同値チェイン数は10〜100以上の値
となるため平均10回以上のテーブル検索数が必要とな
るか、またはバイナリーサーチ方式の時は、2分割で検
索して行くため、平均十数回のテーブル検索が必要とな
るかであり、テーブルをすぐに検索できない、という欠
点がある。
[Problems to be Solved by the Invention] In the conventional high-speed table search method described above, when the number of constituent elements becomes very large (for example, tens of thousands or more), when using the hash method, the size of the hash table becomes large. Even if it is possible to handle hundreds to thousands of elements, the average number of equivalent chains is 10 to 100 or more, so an average of 10 or more table searches is required, or when using the binary search method. Since the search is performed in two parts, it is necessary to search the table more than ten times on average, and the problem is that the table cannot be searched immediately.

【0004】0004

【課題を解決するための手段】本発明の端末アドレス決
定手段は、構成要素単位のテーブルがハッシュテーブル
よりポイントされているテーブル群において、ハッシュ
値を返却するハッシュ1決定手段と、前記ハッシュ1決
定手段と異なるハッシュ値を返却するハッシュ2決定手
段と、前記ハッシュテーブルから前記ハッシュ1決定手
段にて決定した値で前記構成要素単位のテーブルをポイ
ントするように組み込むテーブル作成手段と、必要に応
じて前記ハッシュテーブルからの前記構成要素単位のテ
ーブルへの同値チェインが多い場合、前記ハッシュテー
ブルから新たに別のハッシュテーブルをポイントし、前
記別のハッシュテーブルから前記ハッシュ2決定手段に
て決定した値で前記構成要素単位のテーブルをポイント
するように組み込むテーブル再構成手段と、前記ハッシ
ュ1決定手段と前記ハッシュ2決定手段とを用いて目的
の構成要素単位のテーブルを検索するテーブル検索手段
とを設け、検索対象のテーブルを少ないテーブル検索回
数で検索できることを特徴とする。
[Means for Solving the Problems] The terminal address determining means of the present invention includes a hash 1 determining means for returning a hash value in a table group in which a hash table points to a table for each component, and a hash 1 determining means for returning a hash value. hash 2 determining means for returning a hash value different from the means; table creating means for incorporating the hash table into a table for each component so as to point to the value determined by the hash 1 determining means from the hash table; If there are many equivalence chains from the hash table to the component-based table, point the hash table to another new hash table, and use the value determined by the hash 2 determining means from the other hash table. a table reconfiguration means for incorporating the table in units of constituent elements so as to point to the table; and a table search means for searching for a target table in units of constituent elements using the hash 1 determining means and the hash 2 determining means; A feature is that a table to be searched can be searched with a small number of table searches.

【0005】[0005]

【実施例】次に、本発明について図面を参照して説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be explained with reference to the drawings.

【0006】図1は、本発明の1実施例を示すブロック
図であり、後述するテーブル群2を作成するテーブル作
成手段11と、テーブル群2を再構成するテーブル再構
成手段12と、テーブル群2を検索するテーブル検索手
段13と、ハッシュ値を決定するハッシュ1決定手段1
4と、ハッシュ1決定手段14と異なるハッシュ値を決
定するハッシュ2決定手段15と、テーブル群2とから
構成されている。図2は、本発明のテーブル群2の内容
であり、ルートテーブル21、ルートテーブル21より
ハッシュ1決定手段14にて決定したハッシュ値で振り
分けられるハッシュテーブル22、ハッシュテーブル2
2よりハッシュテーブル決定手段15にて決定されたハ
ッシュ値で振り分けられているサブハッシュテーブル2
3、個々の構成要素単位の情報を保持しているリソース
テーブル24、リソーステーブル25、リソーステーブ
ル26、リソーステーブル27とから構成されている。
FIG. 1 is a block diagram showing one embodiment of the present invention, which includes table creation means 11 for creating table group 2 to be described later, table reconfiguration means 12 for reconfiguring table group 2, and table group 2. table search means 13 for searching 2, and hash 1 determining means 1 for determining the hash value.
4, hash 2 determining means 15 which determines a hash value different from hash 1 determining means 14, and table group 2. FIG. 2 shows the contents of the table group 2 of the present invention, including a route table 21, a hash table 22, and a hash table 2 sorted by hash values determined by the hash 1 determining means 14 from the route table 21.
2, the sub-hash table 2 is sorted by the hash value determined by the hash table determining means 15.
3. It is composed of a resource table 24, a resource table 25, a resource table 26, and a resource table 27 that hold information for each component.

【0007】本発明の特徴は、図において、テーブル再
構成手段12、ハッシュ2決定手段15、サブハッシュ
テーブル23を設けたことにある。
The feature of the present invention is that, as shown in the figure, table reconfiguration means 12, hash 2 determination means 15, and subhash table 23 are provided.

【0008】次に、本実施例の動作について、以下に説
明する。
Next, the operation of this embodiment will be explained below.

【0009】個々のテーブルは、テーブルの先頭に、ど
の種類のテーブルであるかという、識別子を持っている
。これにより、ポインタで指されるテーブルが、リソー
ステーブルか、ハッシュテーブル/サブハッシュテーブ
ルか、という区別が容易につく構造となっている。
[0009] Each table has an identifier at the top of the table indicating what type of table it is. This structure provides a structure in which it is easy to distinguish whether the table pointed to by the pointer is a resource table or a hash table/subhash table.

【0010】テーブル作成手段11が、構成要素単位の
テーブルを新規にテーブル群2に登録する場合、ルート
テーブル21からのポインタで指されるハッシュテーブ
ル22のアドレスを得る。ハッシュテーブル22のハッ
シュ値は、ハッシュ1決定手段14にて決定された値で
振り分けられる。
When the table creation means 11 newly registers a table for each component in the table group 2, it obtains the address of the hash table 22 pointed to by the pointer from the route table 21. The hash values in the hash table 22 are distributed according to the values determined by the hash 1 determining means 14.

【0011】リソーステーブル27を新規に登録しよう
と、ハッシュ1決定手段14にてハッシュ値を求めると
、エントリー2であったとする。この時、エントリー2
には、既にリソーステーブル26がチェインされていた
場合、リソーステーブル27は、リソーステーブル26
内の同値チェイン用ポインタより、ポイントされる。
Assume that when the hash value is determined by the hash 1 determination means 14 in order to newly register the resource table 27, the hash value is entry 2. At this time, entry 2
If the resource table 26 is already chained in the resource table 26, the resource table 27 is
Pointed to by the equivalence chain pointer inside.

【0012】次に、リソーステーブル25を新規に登録
しようと、ハッシュ1決定手段14にてハッシュ値を求
めると、エントリー1であったとする。この時、エント
リー1には、既にリソーステーブル24をはじめとして
同値チェインが多い場合、テーブル作成手段11は、同
値チェインの最後のテーブルにリソーステーブル25を
チェインして、テーブル再構成手段12にエントリー1
の値を渡す。
Next, when attempting to newly register the resource table 25, it is assumed that when the hash value is determined by the hash 1 determining means 14, entry 1 is found. At this time, if the entry 1 already has many equivalence chains including the resource table 24, the table creation means 11 chains the resource table 25 to the last table of the equivalence chain, and adds the entry 1 to the table reconfiguration means 12.
Pass the value of

【0013】テーブル再構成手段12は、ここで、ハッ
シュテーブル22と異なるサブハッシュテーブル23を
確保し、エントリー1の指し示す先を、このサブハッシ
ュテーブル23となるよう、ハッシュテーブル22を変
更する。そして、今までエントリー1より指されていた
リソーステーブルを、同値チェインをたどりながら順次
、ハッシュ2決定手段15を用いて得られたハッシュ値
に従って、サブハッシュテーブル23より、ポイントす
るように変更する。
The table reconfiguration means 12 now secures a subhash table 23 different from the hash table 22, and changes the hash table 22 so that the subhash table 23 is pointed to by the entry 1. Then, the resource table previously pointed to by entry 1 is changed to point to the subhash table 23 in accordance with the hash value obtained using the hash 2 determining means 15 while tracing the equivalence chain.

【0014】ここで、ハッシュテーブル22では、同値
チェインであったりリソーステーブル24とリソーステ
ーブル25は、今度は、ハッシュ関数が異なるため、サ
ブハッシュテーブルのエントリー1はリソーステーブル
24に、エントリー2はリソーステーブル25に、とい
う風に、テーブルの同値チェインが解消される。
[0014] Here, in the hash table 22, there is an equivalence chain, and the resource tables 24 and 25 have different hash functions, so entry 1 of the sub-hash table is in the resource table 24, and entry 2 is in the resource table 24. Table 25, and so on, the table equivalence chain is resolved.

【0015】これらのテーブルを検索するテーブル検索
手段13は、各テーブルに付与されているテーブル識別
子を判断しながら、目的のリソーステーブルを検索する
The table search means 13 for searching these tables searches for a target resource table while determining the table identifier assigned to each table.

【0016】たとえば、リソーステーブル25を検索し
たい場合、ハッシュ1決定手段14にて得られたエント
リー1より、ハッシュテーブル22からサブハッシュテ
ーブル23に到達する。ここで、サブハッシュテーブル
23の識別子が、サブハッシュテーブルを示しているた
め、テーブル検索手段13は、当テーブルがサブハッシ
ュテーブルだと認識し、ハッシュ1決定手段14と異な
るハッシュ値を返却するハッシュ2決定手段15を用い
て、サブハッシュテーブルのエントリー2を得る。
For example, when it is desired to search the resource table 25, the subhash table 23 is reached from the hash table 22 using the entry 1 obtained by the hash 1 determining means 14. Here, since the identifier of the subhash table 23 indicates a subhash table, the table search means 13 recognizes that this table is a subhash table, and returns a hash value different from that of the hash 1 determination means 14. 2 determination means 15 is used to obtain entry 2 of the subhash table.

【0017】そして、このエントリーの先にポイントさ
れるリソーステーブル25に到達することができる。
[0017] Then, the resource table 25 pointed to by this entry can be reached.

【0018】このように、本実施例によれば、ハッシュ
テーブルの同値チェインが多く存在しても、サブハッシ
ュテーブルを用いることで、それまでの同値チェインを
たどること無く、リソーステーブルの検索が短時間・短
期アクセス回数で行うことが可能になる。
As described above, according to this embodiment, even if there are many equivalence chains of hash tables, by using a subhash table, searching for a resource table can be shortened without tracing previous equivalence chains. This can be done within a short period of time and the number of accesses.

【0019】また、ハッシュテーブルの同値チェインが
存在しない場合は、テーブル再構成手段12がない事と
、テーブル作成手段11は最初からハッシュテーブル2
2にサブハッシュテーブル23をポイントするようにテ
ーブル群2を作成する事とが異なるだけで、他は変わら
ない。
Furthermore, if there is no equivalence chain of the hash table, there is no table reconfiguration means 12, and the table creation means 11 hash table 2 from the beginning.
The only difference is that table group 2 is created so that subhash table 23 is pointed to subhash table 2.

【0020】[0020]

【発明の効果】以上説明したように本発明は、構成要素
数が非常に多くなった場合(例えば、数万以上)に、ハ
ッシュテーブルを2段階で使用することで、サブハッシ
ュテーブルにて同値チェインがなければ2回のテーブル
検索で、検索すべきテーブルが見つかるため、コンピュ
ータのテーブル検索のためのオーバーヘッドを大幅に削
減する効果がある。
[Effect of the Invention] As explained above, the present invention uses a hash table in two stages when the number of constituent elements becomes very large (for example, tens of thousands or more). If there is no chain, the table to be searched can be found with two table searches, which has the effect of significantly reducing the overhead of computer table searches.

【0021】[0021]

【図面の詳細な説明】[Detailed explanation of drawings]

【0022】[0022]

【図1】本発明の実施例のブロック図である。FIG. 1 is a block diagram of an embodiment of the invention.

【0023】[0023]

【図2】図1におけるテーブル群2の内容の例を示す図
である。
FIG. 2 is a diagram showing an example of the contents of table group 2 in FIG. 1;

【0024】[0024]

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

11  テーブル作成手段 12  テーブル再構成手段 13  テーブル検索手段 14  ハッシュ1決定手段 15  ハッシュ2決定手段 2  テーブル群 21  ルートテーブル 22  ハッシュテーブル 23  サブハッシュテーブル 11 Table creation means 12 Table reconfiguration means 13 Table search means 14 Hash 1 determining means 15 Hash 2 determining means 2 Table group 21 Route table 22 Hash table 23 Subhash table

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  構成要素単位のテーブルがハッシュテ
ーブルよりポイントされているテーブル群において、ハ
ッシュ値を返却するハッシュ1決定手段と、前記ハッシ
ュ1決定手段と異なるハッシュ値を返却するハッシュ2
決定手段と、前記ハッシュテーブルから前記ハッシュ1
決定手段にて決定した値で別のハッシュテーブルをポイ
ントし、前記別のハッシュテーブルから前記ハッシュ2
決定手段にて決定した値で前記構成要素単位のテーブル
をポイントするように組み込むテーブル作成手段と、前
記ハッシュ1決定手段と前記ハッシュ2決定手段とを用
いて目的の構成要素単位のテーブルを検索するテーブル
検索手段とを設け、検索対象のテーブルを少ないテーブ
ル検索回数で検索できることを特徴とするテーブル高速
検索方式。
1. A hash 1 determining means for returning a hash value in a table group in which a hash table points to a table for each constituent element, and a hash 2 determining means for returning a hash value different from the hash 1 determining means.
determining means, and determining the hash 1 from the hash table.
The value determined by the determining means points to another hash table, and the hash 2 is retrieved from the another hash table.
Searching for a target table for each component using a table creation means that points to the table for each component with the value determined by the determination means, and the hash 1 determination means and the hash 2 determination means. A high-speed table search method is provided with a table search means, and is characterized in that a table to be searched can be searched with a small number of table searches.
【請求項2】  構成要素単位のテーブルがハッシュテ
ーブルよりポイントされているテーブル群において、ハ
ッシュ値を返却するハッシュ1決定手段と、前記ハッシ
ュ1決定手段と異なるハッシュ値を返却するハッシュ2
決定手段と、前記ハッシュテーブルから前記ハッシュ1
決定手段にて決定した値で前記構成要素単位のテーブル
をポイントするように組み込むテーブル作成手段と、前
記ハッシュテーブルからの前記構成要素単位のテーブル
への同値チェインが多い場合、前記ハッシュテーブルか
ら新たに別のハッシュテーブルをポイントし、前記別の
ハッシュテーブルから前記ハッシュ2決定手段にて決定
した値で前記構成要素単位のテーブルをポイントするよ
うに組み込むテーブル再構成手段と、前記ハッシュ1決
定手段と前記ハッシュ2決定手段とを用いて目的の構成
要素単位のテーブルを検索するテーブル検索手段とを設
け、検索対象のテーブルを少ないテーブル検索回数で検
索できることを特徴とするテーブル高速検索方式。
2. Hash 1 determining means for returning a hash value, and hash 2 determining means for returning a hash value different from the hash 1 determining means in a table group in which a hash table points to a table for each constituent element.
determining means, and determining the hash 1 from the hash table.
A table creation means that incorporates the value determined by the determination means to point to the table for each component, and when there are many equivalence chains from the hash table to the table for each component, table reconfiguration means that points to another hash table and incorporates a value determined by the hash 2 determination means from the other hash table to the table for each constituent element, the hash 1 determination means; 1. A high-speed table search method, characterized in that a table search means for searching a target table in units of constituent elements using a hash 2 determination means is provided, and a table to be searched can be searched with a small number of table searches.
JP3074333A 1991-03-15 1991-03-15 High speed retrieval system for table Pending JPH04286072A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3074333A JPH04286072A (en) 1991-03-15 1991-03-15 High speed retrieval system for table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3074333A JPH04286072A (en) 1991-03-15 1991-03-15 High speed retrieval system for table

Publications (1)

Publication Number Publication Date
JPH04286072A true JPH04286072A (en) 1992-10-12

Family

ID=13544091

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3074333A Pending JPH04286072A (en) 1991-03-15 1991-03-15 High speed retrieval system for table

Country Status (1)

Country Link
JP (1) JPH04286072A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011215765A (en) * 2010-03-31 2011-10-27 Nec Corp Table configuration method, data access method, computer program, table configuration device, and data processing apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011215765A (en) * 2010-03-31 2011-10-27 Nec Corp Table configuration method, data access method, computer program, table configuration device, and data processing apparatus

Similar Documents

Publication Publication Date Title
EP0304302A2 (en) Data retrieval system
US20030130981A1 (en) Enhanced multiway radix tree and related methods
CN102867049A (en) Chinese PINYIN quick word segmentation method based on word search tree
CN114491199A (en) Data retrieval method, device and system
JP2003224581A (en) Longest match retrieval circuit, its method, its program, and recording medium
JPH04286072A (en) High speed retrieval system for table
JPH03174653A (en) Method and device for control of key word
JPH0644309A (en) Data base managing system
JPH04153764A (en) System for increasing processing speed of decentralized cpu
JPH0696124A (en) Information retrieving device
JPH10240741A (en) Managing method for tree structure type data
JPH09330322A (en) Data retrieval device
JP3824091B2 (en) Relational database system
JPH09305455A (en) Group integrating method for decentralized database
JP2889319B2 (en) Graphic drawing device
JPH0916223A (en) System for sorting sequence program
JPH0667968A (en) Data management system in object direction
JPH06103028A (en) Data sort processing system
JPH04186424A (en) Data list display system
JPH04155521A (en) Sorting processing system
JPH02270029A (en) Extracting system for patch information using patch area
JPH052607A (en) High speed search system by tree structure data structure
JPH03216730A (en) Electronic computer
JPH03216729A (en) Elctronic computer
JPH0199131A (en) System for registering and searching symbol table