JPH02227735A - Name table retrieving device - Google Patents

Name table retrieving device

Info

Publication number
JPH02227735A
JPH02227735A JP1048217A JP4821789A JPH02227735A JP H02227735 A JPH02227735 A JP H02227735A JP 1048217 A JP1048217 A JP 1048217A JP 4821789 A JP4821789 A JP 4821789A JP H02227735 A JPH02227735 A JP H02227735A
Authority
JP
Japan
Prior art keywords
name
hash
labels
name table
chain
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
JP1048217A
Other languages
Japanese (ja)
Inventor
Yuichi Iijima
祐一 飯島
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 JP1048217A priority Critical patent/JPH02227735A/en
Publication of JPH02227735A publication Critical patent/JPH02227735A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To shorten the searching time of labels despite the increase of labels by storing a chain of labels stored in a name table and having the same hash value into a hash table of the name table in a Mr. B-tree structure. CONSTITUTION:A label register means 12 takes labels one by one out of a definition work file 11 storing the labels at random and stores a chain of labels stored in a name table 13 and having the same hash value into a hash table of the name table 13 in a Mr. B-tree structure. At the same time, a name table retrieving means 15 searches the labels chained in the Mr. B-tree structure out of the hash table based on the labels stored in a reference work file 14. Thus it is possible to define the time required for retrieving as the value propor tional to log(m/n), where (n) and (m) mean the hash width and the number of component elements, respectively. As a result, the label retrieving time is shortened despite the increase of labels.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は情報処理における言語処理系のネームテーブル
の管理に利用する。本発明は言語処理系のネームテーブ
ルの探索に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention is used for managing a name table of a language processing system in information processing. The present invention relates to searching name tables in language processing systems.

〔冬既要〕[Winter required]

本発明は連鎖ハツシュ法を用いたネームチーフル上への
名標の登録およびその探索を行うネームテーブル探索装
置において、 同一のハツシュ値をもつネームテーブルの名標の連鎖を
3氏木構造で格納し、3氏木構造で連鎖されている名標
を探索することにより、格納される名標が増加しても名
標探索に要する時間を少なくできるようにしたものであ
る。
The present invention is a name table search device that uses the chain hash method to register names on a name title and searches for them, in which a chain of names in a name table having the same hash value is stored in a three-name tree structure. However, by searching for name marks that are chained in a three-family tree structure, the time required for name name search can be reduced even if the number of stored name names increases.

〔従来の技術〕[Conventional technology]

従来、この種のネームテーブル探索は、名標から一意に
決まるハッンユ関数を用いて有限の大きさを持つハツシ
ュテーブルから同一のハッンユ関数を持つ名標を連鎖さ
せる連鎖ハツシュ法が用いられていた。
Conventionally, this type of name table search has used a chained hash method that uses a Hatch function that is uniquely determined from a name name to chain names with the same Hatch function from a hash table with a finite size. .

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述した従来の連鎖ハツシュ法は、理想的なハツシュ関
数を想定したときでもハツシュ値の幅をn、構成要素の
数をmとすると探索に必要な時間のオーダーはm/nに
比例する値となるために名標の数が多くなると探索効率
が著しく低下する欠点がある。
In the conventional chain hash method described above, even when an ideal hash function is assumed, where the width of the hash value is n and the number of constituent elements is m, the order of time required for search is proportional to m/n. Therefore, as the number of landmarks increases, the search efficiency decreases significantly.

本発明はこのような欠点を除去するもので、名標が増加
しても探索に要する時間を少なくすることができる装置
を提供することを目的とする。
The present invention aims to eliminate such drawbacks, and aims to provide an apparatus that can reduce the time required for searching even when the number of landmarks increases.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、名標が順不同に格納された定義ワークファイ
ルから名標を取り出し、連鎖ハツシュ法を用いたネーム
テーブルに含まれるハツシュテーブル上に登録する名標
登録手段と、参照すべき名標が格納された参照ワークフ
ァイルの名標にしたがい前記ネームテーブルに登録され
た名標を探索するネームテーブル探索手段とを備えたネ
ームテーブル探索装置において、前記名標登録手段に、
同一のハツシュ値を持つ前記ネームテーブルの名標の連
鎖を前記ハツシュテーブルに8氏木構造で格納する手段
を含み、前記ネームテーブル探索手段に、前記ハツシュ
テーブルから8氏木構造で連鎖されている名標を探索す
る手段を含むことを特徴とする。
The present invention provides name mark registration means for extracting name marks from a definition work file in which name marks are stored in random order and registering the name marks on a hash table included in a name table using a chain hash method, and name marks to be referenced. and a name table search device for searching for a name registered in the name table according to the name of a reference work file in which the name is stored, the name table search device comprising:
comprising means for storing a chain of names in the name table having the same hash value in an 8-tree structure in the hash table; The invention is characterized in that it includes means for searching for famous landmarks.

ここで8氏木構造とは、データの変動とともに、索引を
動的に保守し、いつでも相応のデータ呼出し効率と記憶
空間利用率とを保証する編成であり、データベース応用
に好んで取り上げられ、VSAM(Virtual S
torage Access Method)の基本概
念としても知られる。(情報処理ハンドブック:情報処
理学会編参照) 〔作用〕 名標登録手段が定義ワークファイルから名標を取り出し
、ネームテーブル上のハツシュテーブルに同一のハツシ
ュ値をもつネームテーブルの名標の連鎖を8氏木構造で
格納する。ネームテーブル探索手段が参照ワークファイ
ルに格納されている名標にしたがってハツシュテーブル
から8氏木構造で連鎖されている名標を探索する。
Here, the 8-tree structure is an organization that dynamically maintains indexes as data changes and guarantees appropriate data retrieval efficiency and storage space utilization at any time, and is preferred for database applications. (Virtual S
It is also known as the basic concept of storage access method. (Refer to Information Processing Handbook: Edited by Information Processing Society of Japan) [Operation] The name registration means extracts the name from the definition work file and creates a chain of names in the name table with the same hash value in the hash table on the name table. Stored in an 8-person tree structure. A name table search means searches the hash table for name names chained in an eight-name tree structure according to the name names stored in the reference work file.

これにより、格納される名標が増加しても名標探索に要
する時間を短縮することができる。
Thereby, even if the number of stored names increases, the time required to search for the name can be shortened.

〔実施例〕〔Example〕

次に、本発明実施例を図面に基づいて説明する。 Next, embodiments of the present invention will be described based on the drawings.

第1図は本発明実施例の構成を示すブロック図、第2図
は本発明実施例ネームテーブル13の連鎖の例を示す図
である。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention, and FIG. 2 is a diagram showing an example of a chain of name tables 13 according to the embodiment of the present invention.

本発明実施例は、名標が順不同に格納された定義ワーク
ファイル11から名標を取り出し、連鎖ハツシュ法を用
いたネームテーブル13に含まれるハツシュテーブル2
1上に登録する名標登録手段12と、参照すべき名標が
格納された参照ワークファイル14の名標にしたがいネ
ームテーブル13に登録された名標を探索するネームテ
ーブル探索手段15とを備え、本発明の特徴として、名
標登録手段12に、同一のハツシュ値を持つネームテー
ブル13の名標の連鎖をハツシュテーブル21に8氏木
構造で格納する手段を含み、ネームテーブル探索手段1
5に、ハツシュテーブル21から8氏木構造で連鎖され
ている名標を探索する手段を含む。
The embodiment of the present invention extracts name marks from a definition work file 11 in which name marks are stored in random order, and stores them in a hash table 2 included in a name table 13 using a chain hash method.
1, and a name table search means 15 for searching for a name registered in the name table 13 according to the name in a reference work file 14 in which names to be referred to are stored. As a feature of the present invention, the name registration means 12 includes means for storing a chain of names in the name table 13 having the same hash value in the hash table 21 in an 8-family tree structure, and the name table search means 1
5 includes a means for searching the hash table 21 for names that are chained in an eight-family tree structure.

次に、このように構成された本発明実施例の動作につい
て説明する。
Next, the operation of the embodiment of the present invention configured as described above will be explained.

定義ワークファイル11の中には名標が順不同に格納さ
れており、ネームテーブルへの名標登録手段12は定義
ワークファイル11の中から一つずつ名標を取り出しネ
ームテーブル13に登録する。
Name tags are stored in the definition work file 11 in random order, and the name table registration means 12 takes out the name tags one by one from the definition work file 11 and registers them in the name table 13.

第2図は本発明実施例のネームテーブル13を示す図で
ある。ハツシュテーブル21は名標からバッジμ関数(
0からnまでの値を取る)によってハツシュ値n1を得
てnlに対応するエントリから連鎖するためのオリジン
ポインタの配列で名標を格納する。構成要素がひとつも
連鎖されていないときNULLの値をとる。
FIG. 2 is a diagram showing the name table 13 according to the embodiment of the present invention. The hash table 21 is based on the badge μ function (
(takes a value from 0 to n) to obtain a hash value n1, and store the name name in an array of origin pointers for chaining from the entry corresponding to nl. It takes a NULL value when no constituent elements are chained.

ネームテーブル13の各構成要素はハツシュテーブル2
1から構成要素の1エントリ22の形(ただしに=1の
場合)で連鎖されており、それぞれの名標の左隣のポイ
ンタはその名標より小さいかまたは等しい名標を持つ構
成要素を指し、右隣のポインタはその名標より大きい名
標を持つ構成要素を指す。
Each component of the name table 13 is a hash table 2.
1 to 22 components (in the case of = 1), the pointer to the left of each name points to a component with a name smaller than or equal to that name. , the pointer to the right points to a component with a name larger than that name.

また、指すものが無いときはNULLとなる。Also, if there is nothing to point to, the value is NULL.

この形式のネームテーブル13に名標ABC<BCD<
BCE<BCG<BDE<CDE<DEF<EAB<E
FG<FGH<FGJが連鎖された(これらが同じハツ
シュ値を持つようなハツシュ関数を使っていると仮定す
る)例が連鎖の例23〜30である。
In the name table 13 of this format, the name name ABC<BCD<
BCE<BCG<BDE<CDE<DEF<EAB<E
Chain examples 23 to 30 are examples in which FG<FGH<FGJ are chained (assuming that they use a hash function that has the same hash value).

ネームテーブル13への名標登録手段12は第3図に示
す処理によって第2図に示すネームテーブル13へ名標
を登録する。第3図では定義ワークファイル11から読
み込んだ名標からハツシュテーブル21の位置n1を決
定しB成木の要素として登録する処理を全て名標に対し
て繰り返す。
The name name registration means 12 in the name table 13 registers the name name in the name table 13 shown in FIG. 2 by the process shown in FIG. In FIG. 3, the process of determining the position n1 of the hash table 21 from the name tag read from the definition work file 11 and registering it as an element of the B mature tree is repeated for all the name tags.

すなわち、定義ワークファイル11から名標を1件読み
込み(ステップ302)、終了か否かを判定しくステッ
プ303)、終了でなければ名標よりハツシュ値n1を
計算しくステップ304)、ハツシュテーブル21のn
lに名標をB成木の節の要素として登録しくステップ3
05)、すべての名標に対して繰り返し、ステップ30
3の判定が終了であればその処理を終了する(ステップ
306)。ネームテーブルの探索手段15はB成木を用
いて参照ワークファイル14中の名標で第4図に示すよ
うにネームテーブル13を探索する。第4図は参照ワー
クファイル14から名標を取り出してそのハツシュ値を
決定しハツシュテーブル21上の連鎖の開始ポインタか
らB成木を探索する手順を示したものである。
That is, one name tag is read from the definition work file 11 (step 302), it is determined whether it is finished or not (step 303), if it is not finished, the hash value n1 is calculated from the name name (step 304), and the hash table 21 n of
Step 3: Register the name tag in l as an element of the node of B mature tree.
05), repeat for all name tags, step 30
If the determination in step 3 is completed, the process ends (step 306). The name table search means 15 uses the B mature tree to search the name table 13 for the names in the reference work file 14 as shown in FIG. FIG. 4 shows a procedure for extracting a landmark from the reference work file 14, determining its hash value, and searching for a B mature tree from the chain start point on the hash table 21.

すなわち、参照ワークファイル14から参照名標を読み
込みくステップ402)、終了か否かを判定しくステッ
プ403)、終了でなければ名標からハツシュ値n2を
決定する(ステップ4θ4)。次いでハツシュテーブル
のハツシュ値n2がNULLであるか否かを判断しくス
テップ405)、NULLであれば未定義エラーとして
処理を戻しくステップ410)、NULLでなければハ
ツシュテーブルのハツシュ値n2を指すB成木を探索し
くステップ407)、見つかったか否かを判定しくステ
ップ408)、見つからなければ未定義エラーしとて処
理を戻しくステップ410)、見つかれば二重に定義さ
れていないかを判断しくステップ409)、二重定義の
ときには多重定義エラーとして処理を戻しくステップ4
12)、二重定義されていなければ探索結果として見つ
かった名標を処理する(ステップ411)。この手順を
参照名標読み込みが終了するまで繰り返しステ・ツブ4
03で終了と判定されたときに処理を終了する(ステッ
プ406)。
That is, step 402) reads a reference name from the reference work file 14, it is determined whether or not it is finished (step 403), and if it is not finished, a hash value n2 is determined from the name (step 4θ4). Next, it is determined whether the hash value n2 of the hash table is NULL or not (step 405), and if it is NULL, the process is returned as an undefined error (step 410); if it is not NULL, the hash value n2 of the hash table is Search for the B mature tree pointed to (step 407), determine whether it is found or not (step 408), if not found, issue an undefined error and return the process step 410), if found, check to see if it has been defined twice. If there is a double definition, return the process as a multiple definition error (Step 4)
12) If there is no double definition, the name name found as a search result is processed (step 411). Repeat this procedure until the reference name reading is completed.
When it is determined in step 03 that the process has ended, the process ends (step 406).

〔発明の効果〕 以上説明したように本発明によれば、連鎖ノ飄、ソシュ
法の連鎖を3氏木構造にすることにより、/’%ッシュ
の幅をn構成要素の数をmとすると探索に必要な時間を
log(m/n)に比例する値にすることができ、従来
の連鎖ハツシュ法を用いたネームテーブルの探索に比べ
て名標が増加したときの探索に要する時間を少なくする
ことができる効果がある。
[Effects of the Invention] As explained above, according to the present invention, by forming the chain of the chain chain and the Sosch method into a three-tree structure, the width of the /'% chain is n, where m is the number of constituent elements. The time required for searching can be set to a value proportional to log(m/n), which reduces the time required for searching when the number of names increases compared to searching a name table using the conventional chain hash method. There is an effect that can be done.

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

第1図は本発明実施例の構成を示すプロ・ツク図。 第2図は本発明実施例のネームテーブルの形式第3図は
本発明実施例の名標登録手段の処理の流れを示す流れ図
。 第4図は本発明実施例のネームテーブル探索手段の処理
の流れを示す流れ図。 11・・・定義ワークファイル、12・・・名標登録手
段、13・・・ネームテーブル、14・・・参照ワーク
ファイル、15・・・ネームテーブル探索手段。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. FIG. 2 is a format of a name table according to an embodiment of the present invention. FIG. 3 is a flowchart showing the processing flow of the name registration means according to an embodiment of the present invention. FIG. 4 is a flowchart showing the processing flow of the name table search means according to the embodiment of the present invention. 11... Definition work file, 12... Name mark registration means, 13... Name table, 14... Reference work file, 15... Name table search means.

Claims (1)

【特許請求の範囲】 1、名標が順不同に格納された定義ワークファイルから
名標を取り出し、連鎖ハッシュ法を用いたネームテーブ
ルに含まれるハッシュテーブル上に登録する名標登録手
段と、 参照すべき名標が格納された参照ワークファイルの名標
にしたがい前記ネームテーブルに登録された名標を探索
するネームテーブル探索手段とを備えたネームテーブル
探索装置において、前記名標登録手段に、同一のハッシ
ュ値を持つ前記ネームテーブルの名標の連鎖を前記ハッ
シュテーブルにB氏木構造で格納する手段を含み、前記
ネームテーブル探索手段に、前記ハッシュテーブルから
B氏木構造で連鎖されている名標を探索する手段を含む ことを特徴とするネームテーブル探索装置。
[Claims] 1. Name name registration means for extracting name names from a definition work file in which name names are stored in random order and registering them on a hash table included in a name table using a chain hash method; a name table search device for searching for a name registered in the name table according to a name in a reference work file in which a name to be registered is stored; a means for storing a chain of names in the name table having a hash value in a B-tree structure in the hash table; A name table search device comprising means for searching.
JP1048217A 1989-02-28 1989-02-28 Name table retrieving device Pending JPH02227735A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1048217A JPH02227735A (en) 1989-02-28 1989-02-28 Name table retrieving device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1048217A JPH02227735A (en) 1989-02-28 1989-02-28 Name table retrieving device

Publications (1)

Publication Number Publication Date
JPH02227735A true JPH02227735A (en) 1990-09-10

Family

ID=12797246

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1048217A Pending JPH02227735A (en) 1989-02-28 1989-02-28 Name table retrieving device

Country Status (1)

Country Link
JP (1) JPH02227735A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1040255A (en) * 1996-07-29 1998-02-13 Nec Software Ltd Hash table control device
US7633886B2 (en) 2003-12-31 2009-12-15 University Of Florida Research Foundation, Inc. System and methods for packet filtering
JP2012230493A (en) * 2011-04-25 2012-11-22 Toshiba Corp Retrieval device, retrieval method, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1040255A (en) * 1996-07-29 1998-02-13 Nec Software Ltd Hash table control device
US7633886B2 (en) 2003-12-31 2009-12-15 University Of Florida Research Foundation, Inc. System and methods for packet filtering
JP2012230493A (en) * 2011-04-25 2012-11-22 Toshiba Corp Retrieval device, retrieval method, and program

Similar Documents

Publication Publication Date Title
US5781896A (en) Method and system for efficiently performing database table aggregation using an aggregation index
US11106646B2 (en) Systems, methods, and data structures for high-speed searching or filtering of large datasets
US7185277B1 (en) Method and apparatus for merging electronic documents containing markup language
US20040083117A1 (en) Method for fast searching and analyzing inter-relations between patents from a patent database
US7792866B2 (en) Method and system for querying structured documents stored in their native format in a database
CN100357952C (en) Binary data access method
CN111242751B (en) Express order updating method, device, equipment and storage medium
JPH02227735A (en) Name table retrieving device
JP2000099540A (en) Multi-dimensional database managing method
CN116303625A (en) Data query method and device, storage medium and electronic equipment
KR890016474A (en) Database object analysis method and system
GB1062999A (en) Data storage and retrieval system
CN113886399A (en) Index database updating method and device and index database-based retrieval method and device
CN107861956B (en) Method and device for inquiring data record of bayonet passing vehicle
JPH06103307A (en) Retrieval speeding-up method for structured data base
JPH04257062A (en) Data processor using hash queue
CN117235120A (en) Hypergraph data storage and query method and device with time sequence characteristics
JPH0381830A (en) Device for searching name table
JPS60252949A (en) Information retrieving method
CN116521734A (en) Data query method, device, medium and equipment
CN112699253A (en) Source code positioning method, system, medium and device
CN115658634A (en) Method for quickly positioning problems according to log information
JPH03245233A (en) Label retrieving system
CN110059153A (en) A kind of method for interchanging data for real-time data processing system
JPH07104867B2 (en) Relational database system