JP3601416B2 - Information retrieval method and device - Google Patents

Information retrieval method and device Download PDF

Info

Publication number
JP3601416B2
JP3601416B2 JP2000177389A JP2000177389A JP3601416B2 JP 3601416 B2 JP3601416 B2 JP 3601416B2 JP 2000177389 A JP2000177389 A JP 2000177389A JP 2000177389 A JP2000177389 A JP 2000177389A JP 3601416 B2 JP3601416 B2 JP 3601416B2
Authority
JP
Japan
Prior art keywords
node
storage area
stored
data
link
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2000177389A
Other languages
Japanese (ja)
Other versions
JP2001357070A (en
Inventor
忠功 細谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2000177389A priority Critical patent/JP3601416B2/en
Publication of JP2001357070A publication Critical patent/JP2001357070A/en
Application granted granted Critical
Publication of JP3601416B2 publication Critical patent/JP3601416B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は、2分探索木の1種であるパトリシアツリーを用いた情報検索に用いて好適な情報検索方法及び装置に関する。
【0002】
【従来の技術】
情報検索システムは、所定の形式で蓄積した大量の情報の中から、目的とする情報を探し出すためのシステムである。情報検索システムで用いられる検索方式の1つにパトリシアツリー方式と呼ばれるものがある。パトリシア(Patricia,“Practical Algorithm To Retrieve Information Code In Alphanumeric”)ツリーは良く知られた2分探索木の1種であり、パトリシアツリー方式の情報検索システムでは、あらかじめパトリシアツリーによって各情報のインデックスを作成しておき、このインデックスを検索することによって該当する情報が抽出される。例えば、パトリシアツリー方式の全文検索システムでは、各文書内の全ての位置の文字を始点とする半無限部分文字列が文字コード順に並べ替えられてインデックスが作成され、検索キーの文字列がどの半無限部分文字列と一致するかを判定することで検索が行われる。この際、実際の検索処理では文字列はビット列として扱われる。
【0003】
図7を参照してパトリシアツリー方式による情報検索方法の一例を説明する。図7はパトリシアツリーの一例を示す図であり、この場合、パトリシアツリーはルートN0およびノードN1〜N7と、各ノードにおいて比較されるビット位置の値“0”と“1”に対応する各1対のリンク(あるいはエッジ)L1,L2,L3,L4,…,L16を有して形成されている。この場合、各ノードN1,N2,N3,…,N7には、各4ビットのデータ“0000”,“0010”,“0100”,…,“0111”が検索キーとして登録されている。例えば、検索対象のデータが“0010”である場合、ルートN0では次のノードとして検索対象データ“0010”の最も左側のビット値“0”に対応するリンクL1でつながれているノードN1が選択される。ノードN1では、データ“0010”の左から2番目のビット値“0”に対応するリンクL2でつながれているノードN2が選択される。ノードN2では、左から3番目のビット値“1”に対応するリンクL6でつながれているノードN5が選択される。そして、ノードN5では、左から4番目のビット値“0”に対応するリンクL11でつながれているノードN2が再び選択されて、ノードN2に対応する値が探索結果として抽出される。図7に示すように、パトリシアツリー方式では、各ノードに検索キーを置くことで、検索中の検索キー全体の比較を、実質1回におさめることができるようになっている。
【0004】
【発明が解決しようとする課題】
しかしながら、上述したような従来技術には次のような問題点があった。第1の問題点は、各ノードに下位ノードへのリンクポインタを必ず2つ持つということである。その理由は、2分木を形成するため検索キーのある部分のビット値“0”、“1”それぞれに対応するノードをリンクする必要があるためである。第2の問題点は、検索終了を判定するために同時に複数のノードの情報を参照する必要があるということである。その理由は、パトリシアでは当該ノードから次のノードへのリンクが上向きになった場合に検索成功となるが、リンク先の次ノードの検索キーの検査位置と当該ノードの検索キーの検査位置を比較するため、当該ノードの情報を保存しておく必要があるためである。これらの問題点はパトリシアツリーを構成する際のメモリ使用量の増大、および複数のノードの情報へアクセスするための処理手順の増加という影響を及ぼす。
【0005】
本発明は、上記の問題点を考慮してなされたものであって、従来に比べ、処理手順を減少させてノード検索の高速化を図るとともに、メモリ使用量を低減することができる情報検索方法及び装置を提供することを目的とする。
【0006】
【課題を解決するための手段】
上記課題を解決するため、請求項1記載の発明は、2分探索木を用いた情報検索方法において、各ノードに対応するデータの記憶領域を、キーを示すデータを格納する第1の記憶領域と、1つの他のノードへのリンクポインタを格納する第2の記憶領域と、第2の記憶領域に格納したリンクポインタのリンク方向を示すデータを格納する第3の記憶領域と、第1の記憶領域に格納したデータの中の検査対象となるデータの位置を示すデータを格納する第4の記憶領域とから構成し、前記各ノードに対応するデータのうち、共通のノードを上位のノードとする1対の下位ノードに対応する1組のデータを連続した記憶領域に格納し、各ノードについて検索処理を行う際に、第3の記憶領域に格納されている値が第1の所定の値である場合、第2の記憶領域に格納されているリンクポインタが示すノードが検索対象となるノードであると判定し、第3の記憶領域に格納されている値が第1の所定の値と異なる第2の所定の値である場合、第1の記憶領域中のデータの第4の記憶領域中のデータで指定される位置のデータと、第2の記憶領域に格納されているリンクポインタとに基づいて次に処理を行う下位ノードへのリンクポインタを決定することを特徴とする。請求項2記載の発明は、各ノードについて検索処理を行う際に、前記第3の記憶領域に格納されている値が前記第1の所定の値である場合で、前記第2の記憶領域にリンクポインタが格納されていないときは、検索失敗であると判定することを特徴とする。
【0007】
請求項3記載の発明は、次に処理を行う下位ノードへのリンクポインタを決定する際に、前記第1の記憶領域中のデータの前記第4の記憶領域中のデータで指定される位置のデータが第3の所定の値である場合に第2の記憶領域に格納されているリンクポインタを下位ノードへのリンクポインタとし、前記第1の記憶領域中のデータの前記第4の記憶領域中のデータで指定される位置のデータが第3の所定の値と異なる第4の所定の値である場合に第2の記憶領域に格納されているリンクポインタに予め決められた第5の所定の値を加えた値を下位ノードへのリンクポインタとすることを特徴とする。請求項4記載の発明は、前記各ノードに対応するデータの記憶領域が、さらに各ノード固有情報へのポインタを格納する第5の記憶領域を有し、前記第3の記憶領域に格納されている値が前記第1の所定の値であって、かつ前記第1の記憶領域にキーを示すデータを格納するノードに対応する第5の記憶領域にノード固有情報へのポインタが格納されていることを特徴とする。請求項5記載の発明は、さらに、前記第3の記憶領域に格納されている値が前記第2の所定の値であって、かつ前記第2の記憶領域に、前記第1の記憶領域にキーを示すデータを格納されているノードに対応するリンクポインタが格納されているノードに対応する前記第5の記憶領域に、リンク先ノードと同一のノード固有情報へのポインタが格納されていることを特徴とする。
【0008】
請求項6記載の発明は、2分探索木を用いた情報検索装置において、キーを示すデータを格納する第1の記憶領域と、1つの他のノードへのリンクポインタを格納する第2の記憶領域と、第2の記憶領域に格納したリンクポインタのリンク方向を示すデータを格納する第3の記憶領域と、第1の記憶領域に格納したデータの中の検査対象となるデータの位置を示すデータを格納する第4の記憶領域とから構成された各ノードに対応するデータの記憶領域を有するものであって、かつ 前記各ノードに対応するデータのうち、共通のノードを上位のノードとする1対の下位ノードに対応する1組のデータを連続した記憶領域に格納する記憶手段と、各ノードについて検索処理を行う際に、第3の記憶領域に格納されている値が第1の所定の値である場合、第2の記憶領域に格納されているリンクポインタが示すノードが検索対象となるノードであると判定する手段と、第3の記憶領域に格納されている値が第1の所定の値と異なる第2の所定の値である場合、第1の記憶領域中のデータの第4の記憶領域中のデータで指定される位置のデータと、第2の記憶領域に格納されているリンクポインタとに基づいて次に処理を行う下位ノードへのリンクポインタを決定する手段とを備えることを特徴とする。
【0009】
【発明の実施の形態】
以下、図面を参照して本発明の実施の形態について説明する。図1は、本実施の形態におけるパトリシアツリーのノードの構造を示す説明図である。図1を参照すると、本発明ではパトリシアツリーのノード2aは検索キー2a1、リンクポインタ2a2、リンク方向ビット2a3、キー検査位置2a4、ノード(エントリ)固有情報へのポインタ2a5を含んでいる。また、他の各ノード2b1,2b2も、同様に、検索キー2b11,2b21、リンクポインタ2b12,2b22、リンク方向ビット2b13,2b23、キー検査位置2b14,2b24、ノード固有情報へのポインタ2b15,2b25をそれぞれ含んでいる。パトリシアツリーはまた、定数としてノード長29を所定の記憶領域に保持する。
【0010】
検索キー2a1,2b11,2b21はそれぞれパトリシアツリーを構成する検索キーとして使用される。リンクポインタ2a2,2b12,2b22はそれぞれ上位ノードまたは下位ノードへのポインタを格納する。リンク方向ビット2a3,2b13,2b23はそれぞれリンクポインタ2a2,2b12,2b22に格納されたポインタの性質を規定し、リンク方向ビット2a3,2b13,2b23が“0”の場合はリンクポインタ2a2,2b12,2b22がNULLまたは上位ノードの先頭ポインタを格納し、リンク方向ビット2a3,2b13,2b23が“1”の場合はリンクポインタ2a2,2b12,2b22が左下位ノードの先頭ポインタを格納する。図1に示す例では、ノード2aは、検索キー2a1としてパトリシアツリーを構成する検索キーを保持し、リンクポインタ2a2として左下位ノード2b1へのポインタを格納している。この場合リンク方向ビット2a3には“1”が格納されている。
【0011】
キー検査位置2a4,2b14,2b24はそれぞれパトリシアツリーの各ノードにおける検索対象28の中の左側を起点とした検査位置(ビット位置)を格納する。ノード固有情報へのポインタ2a5,2b1,2b2はそれぞれ検索成功で終了した後の処理で使用する管理情報へのポインタを格納する。ノード固有情報へのポインタ2a5,2b1,2b2が検索処理の途中で参照されることはない。本実施の形態では、root(ルート)ノードを除き各ノードは図1の左下位ノード2b1と右下位ノード2b2のように常に2つのノードが記憶領域中で連続した領域を占めるように配置される。したがって、左下位ノード2b1へのポインタを格納しているリンクポインタ2a2に、ノード長29を加えることで、右下位ノード2b2のポインタの値を得ることができる。検索対象28は検索キー2a1,2b11,2b21と同一の大きさで検索の対象となる値を格納する。ここでは、各データがビット列として扱われている。ノード長29はノード2a,2b1,2b2の長さ(データ長)を格納する。ただし、2つのノードの配置の仕方は上記のものに限定されず、例えば、右下位ノードと左下位ノードの位置を入れ替えたり、リンクポインタの値を右下位ノードに対応するものとしてそこからノード長を減じることで左下位ノードに対応する値を得るようにしてもよい。
【0012】
次に図2に示すノード2aに関する検索動作について図4に示すフローチャートを参照して説明する。本実施の形態における検索処理は、所定の記憶装置を備えたCPU(中央処理装置)によって実行される。検索対象、各ノード、およびノード長のデータは、検索処理の際、その記憶装置内に格納される。また、CPUによって実行されるプログラムは、コンピュータ読み取り可能な記録媒体あるいは通信回線を介して頒布することが可能である。図2の構成において、検索対象28とノード2aについての検索動作は、まずノード2aのリンク方向ビット2a3を調べることから開始される(図4のステップS1)。リンク方向ビット2a3が“0”の場合は次にリンクポインタ2a2を調べる(ステップS6)。リンク方向ビット2a3が“0”の場合でリンクポインタ2a2がNULLのときは該当するノードが存在しないことになるので検索失敗となり検索動作を終了する。リンク方向ビット2a3が“0”の場合でリンクポインタ2a2がNULL以外のときはそのポインタの指すノードが検索対象28と一致する検索キーを持つノードなので、リンクポインタ2a2の指すノード(この場合図示していない上位のノード)の内容を読み込んで(ステップS7)、ノード固有情報へのポインタの指すノード固有情報を得て(ステップS8)検索成功となり検索動作を終了する。
【0013】
一方、図4において、ステップS1でリンク方向ビット2a3が“1”の場合は検索続行となる。検索対象28の左側を起点としたキー検査位置2a4の示す位置の値を調べる(ステップS2,S3)。検査対象28の中のキー検査位置2a4の示す位置の値が“1”ならば、パトリシアツリーの右下位ノードをたどる事を意味するので、リンクポインタ2a2にノード長29を加えた値をポインタとして、そのポインタの指す内容を右下位ノードの内容として新しく読み込む(ステップS4)。検索対象28のキー検査位置2a4の示す位置の値が“0”ならばパトリシアツリーの左下位ノードをたどる事を意味するので、リンクポインタ2a2の指す内容を左下位ノードの内容として読み込む(ステップS5)。ステップS1からステップS5までの検索動作をリンク方向ビット2a3,2b13,2b23,…が“0”になるまで繰り返す。
【0014】
次に、図2と図3に示すパトリシアツリー表現、及び図4のフローチャートを参照して本実施の形態の動作について具体例を示して詳細に説明する。この例では、パトリシアツリーのうち、3つの下位ノードが図2、図3のように構成されているものとする。図2は各ノードの持つ値と相互の位置関係、図3はそのパトリシアツリー表現である。また図1の検索対象28に対応する検査対象30のキーには“00110”が、図1のノード長29に対応するノード長31には各ノードのノード長が設定されている。図2に示すノード3a1およびノード3a2は図示していない上位のノードからリンクされた左下位および右下位のノードである。ただしノード3a2は図3では図示を省略している。
【0015】
図2において、ノード3a1では、検索キー3a11にデータ“00100”が、リンクポインタ3a12にノード3b1へのポインタ(図2および図3のリンクL1)が、リンク方向ビット3a13に“1”が、キー検索位置3a14に“3”が、そして、ノード固有情報へのポインタ3a15にノード固有情報4aへのポインタが、それぞれ格納されている。ノード3b1では、リンクポインタ3b12にNULLが、リンク方向ビット3b13に“0”がそれぞれ格納されている。ノード3b2では、検索キー3b21にデータ“00110”が、リンクポインタ3b22にノード3c1へのポインタ(リンクL2)が、リンク方向ビット3b23に“1”が、キー検索位置3b24に“4”が、そして、ノード固有情報へのポインタ3b25にノード固有情報4aへのポインタが、それぞれ格納されている。
【0016】
ノード3c1では、リンクポインタ3c12にノード3a1へのポインタ(リンクL3)が、リンク方向ビット3c13に“0”が、それぞれ格納されている。ノード3c2では、検索キー3b21にデータ“00111”が、リンクポインタ3c22にノード3d1へのポインタ(リンクL4)が、リンク方向ビット3c23に“1”が、キー検索位置3c24に“5”が、そして、ノード固有情報へのポインタ3c25にノード固有情報4cへのポインタが、それぞれ格納されている。ノード3d1では、リンクポインタ3d12にノード3b2へのポインタ(リンクL6)が、リンク方向ビット3d13に“0”が、それぞれ格納されている。ノード3d2では、リンクポインタ3d22にノード3c2へのポインタ(リンクL5)が、リンク方向ビット3d23に“0”が、それぞれ格納されている。
【0017】
次に、図4に示すフローチャートを参照して、図2および図3に示すノードに関する検索動作について説明する。今、与えられた検索対象30“00110”についてノード3a1との比較を行うとする。この場合、まずリンク方向ビット3a13を調べる(ステップS1)。この値は“1”なので検索続行となる。下位ノードをたどるため、次にキー検索位置3a14を調べると値が“3”なので、検索対象30の左から3番目の値を調べる(ステップS2、S3)。すると値は“1”なので、右下位ノード3b2をたどるために、リンクポインタ3a12にノード長31の値を加えた値を次のノードへのポインタとして内容を読み込み、新しいノードとしてノード3b2を得る(ステップS5)。
【0018】
次にリンク方向ビット3b23を調べ(ステップS1)、値が“1”なので検索続行となる。キー検索位置3b24の値が“4”なので、検索対象30の左から4番目の値を調べる(ステップS2、S3)。すると値は“1”なので、右下位ノード3c2をたどるためにリンクポインタ3b22にノード長31の値を加えた値を次のノードへのポインタとして内容を読み込み、新しいノードとしてノード3c2を得る(ステップS5)。
【0019】
以下同様に検索対象30とキー検査位置3c24から左下位ノード3d1を得るが、このノードのリンク方向ビット3d13を調べると(ステップS1)値が“0”なので次にリンクポインタ3d12を調べる(ステップS6)。すると値はNULLではないのでリンクポインタ3d12の指すノード3b2が検索対象ノードとなり、ノード3b2の内容を読み込む(ステップS7)。最後にノード固有情報へのポインタ3b25の指すノード固有情報を得て(ステップS8)検索を終了する。
【0020】
次に、本発明の他の実施の形態について図5および図6を参照して詳細に説明する。図5を参照すると、本実施の形態は、上記実施の形態と比較して、リンク方向ビットが“1”であって、検索キーを持っているノード3a1、3b2、3c2がそれぞれノード固有情報4a,4b,4cへのポインタ3a15、3b25、3c25を持つとともに、他のノードへのリンクポインタ3a12,3b22,3c22を持つ点では一致しているものの、リンク方向ビットが“0”であって、検索キーを持っているノード3a1、3b2、3c2をリンク先とするノード3c1,3d1,3d2もそれぞれリンク先のノード3a1、3b2、3c2と同じノード固有情報4a,4b,4cを指すポインタ3c15,3d15,3d25を有する点で異なっている。
【0021】
図5と図6のフローチャートを参照して本実施の形態の全体の動作について詳細に説明する。図6のステップS1〜S5で示される本実施の形態における動作は、図2〜図4で示された上記の実施の形態のステップS1〜S5と同一のため、説明は省略する。図6に示すフローチャートは、図5に示すフローチャートのステップS7の処理を省略したものである。図2に示された実施の形態では、リンク方向ビットが“0”でかつリンクポインタがNULLでない場合はさらにリンクポインタの指す検索対象ノードを読み込んだ後にノード固有情報を得ていた。本実施の形態ではリンク方向ビットが“0”でかつリンクポインタがNULLでないノードにもノード固有情報へのポインタを設定する。
【0022】
次に、具体例を用いて説明する。図5に示すフローにおいて図2と同様に検索対象30のキー“00110”について検索処理を行っていくと、ノード3d1を得たところでリンク方向ビット3d13が“0”となるなので、リンクポインタ3d12を調べる(図6のステップS1、S6)。するとリンクポインタ3d12の値はNULLでないのでノード3d1は検索対象ノードを指すリンクポインタを持つことになる。そこで、検索対象ノードと同じ値をもつノード固有情報へのポインタ3d15の指すノード固有情報4bを読み込んで(ステップS7)検索成功となる。
【0023】
本実施の形態は、リンク方向ビットが“0”でかつリンクポインタがNULLでないノードが、リンクポインタが示すノードと同一のノード固有情報へのポインタを持つよう構成する必要があるが、検索成功時のノード読み込み処理を1ステップ減らせるため、より高速に検索処理が行えるという新たな効果を有する。
【0024】
以上説明したように、本発明によれば、2分探索木の1種であるパトリシアツリーにおいて従来に比べノード検索を高速に行える構成を提供できる。本発明についてその特徴をまとめると以下のようになる。図1において、本発明ではパトリシアツリーを構成するノード2aについて、通常の2分木では2つ必要となる下位ノードへのリンクポインタを1つだけリンクポインタ2a2として持たせる。リンクポインタ2a2は左方向の下位ノードのポインタであり、かつノード長28を加えて右方向の下位ノードのポインタとしても解釈される。リンク先の選択は、検索キー2a1の中の、左を起点としたキー検査位置2a4の示す値によって区別される。
【0025】
検索処理においては、まずリンクポインタ2a2を調べ、NULLならば検索失敗となり処理を終了する。NULL以外ならば次にリンク方向ビット2a3を調べ、“0”ならばそのポインタの示すノードが検索対象となるノードであり検索成功となる。“1”ならば検索を続行し、検索対象28の中のキー検査位置2a4の示す位置の値とリンクポインタ2a3の組み合わせにより次の下位ノードへのポインタを決定する。このように当該ノード以外の記憶領域の参照、およびノードの内容の退避処理などを行うことなく当該ノード上の情報だけでパトリシアツリー検索の続行/成功/失敗を判定することができるため、メモリ読み込み時間の短縮および複数記憶領域の使用に伴う処理手順の削減によりノード検索を高速に行うことを可能にする。
【0026】
【発明の効果】
本発明による第1の効果は、パトリシアツリーにおいてノード検索が高速に行えることにある。その理由は、各ノードでリンク方向ビットを持つことにより該ノード上の情報のみで検索続行/成功/失敗が判定できるためである。第2の効果は、パトリシアツリーを構成する際のメモリ使用量が低減できることにある。その理由は、左右下位ノードが常に連続した記憶領域を占めるよう構成されるため、ノード長情報を独立して保持しておくことにより各ノードに左右下位ノードへのポインタを1つだけ持てばよいためである。
【図面の簡単な説明】
【図1】本発明の情報検索方法におけるパトリシアツリーのノードの構造例を示す説明図。
【図2】本発明の一実施の形態による各ノードの持つ値と相互の位置関係を示す説明図。
【図3】図2に示す各ノードをパトリシアツリー表現で示す説明図。
【図4】本発明の一実施の形態における情報検索の動作を示すフローチャート。
【図5】図2に示す各ノードの構成の変形例を示す説明図。
【図6】図6に示すノードの構成を用いた情報検索の動作を示すフローチャート。
【図7】従来の情報検索方法におけるパトリシアツリーのノードの構造例を示す説明図。
【符号の説明】
2a,2b1,2b2,3a1,3a2,3b1,3b2,3c1,3c2,3d1,3d2…ノード
2a1,2b11,2b21,3a11,3b21,3c21…検索キー
2a2,2b12,2b22,3a12,3b22,3c12,3c22,3d12,3d22…リンクポインタ
2a3,2b13,2b23,3a13,3b13,3b23,3c13,3c23,3d13,3d23…リンク方向ビット
2a4,2b14,2b24,3a14,3b24,3c24…キー検査位置
2a5,2b15,2b25,3a15,3b25,3c25…ノード固有情報へのポインタ
28,30…検索対象
29,31…ノード長
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an information search method and apparatus suitable for information search using a Patricia tree, which is one type of a binary search tree.
[0002]
[Prior art]
The information retrieval system is a system for searching for a target information from a large amount of information accumulated in a predetermined format. One of the search methods used in the information search system is a so-called Patricia tree method. The Patricia (Patricia, "Practical Algorithm To Retrieve Information Code In Alphanumeric") tree is one of the well-known binary search trees. In a Patricia tree information retrieval system, an index of each information is created in advance by the Patricia tree. In addition, the corresponding information is extracted by searching this index. For example, in a Patricia tree-based full-text search system, an index is created by rearranging a semi-infinite partial character string starting from characters at all positions in each document in character code order, and the search key character string is The search is performed by determining whether the character string matches the infinite substring. At this time, in the actual search processing, the character string is treated as a bit string.
[0003]
An example of an information search method using the Patricia tree method will be described with reference to FIG. FIG. 7 is a diagram showing an example of the Patricia tree. In this case, the Patricia tree has a root N0, nodes N1 to N7, and 1s corresponding to the bit position values "0" and "1" to be compared at each node. The link (or edge) L1, L2, L3, L4,..., L16 is formed. In this case, 4-bit data “0000”, “0010”, “0100”,..., “0111” are registered as search keys in the nodes N1, N2, N3,. For example, when the data to be searched is “0010”, the node N1 connected by the link L1 corresponding to the leftmost bit value “0” of the data to be searched “0010” is selected as the next node in the root N0. You. At the node N1, a node N2 connected by a link L2 corresponding to the second bit value “0” from the left of the data “0010” is selected. At the node N2, the node N5 connected by the link L6 corresponding to the third bit value "1" from the left is selected. Then, at the node N5, the node N2 connected by the link L11 corresponding to the fourth bit value “0” from the left is selected again, and the value corresponding to the node N2 is extracted as a search result. As shown in FIG. 7, in the Patricia tree method, by placing a search key at each node, comparison of the entire search key during the search can be substantially reduced to one time.
[0004]
[Problems to be solved by the invention]
However, the above-described related art has the following problems. The first problem is that each node always has two link pointers to lower nodes. The reason is that it is necessary to link nodes corresponding to bit values “0” and “1” of a certain portion of the search key in order to form a binary tree. The second problem is that it is necessary to refer to information of a plurality of nodes at the same time to determine the end of the search. The reason is that in Patricia, the search is successful when the link from the node to the next node is upward, but the search position of the search key of the next node of the link destination is compared with the test position of the search key of the node. This is because it is necessary to save the information of the node. These problems have an effect of increasing the amount of memory used when constructing the Patricia tree and increasing the number of processing procedures for accessing information of a plurality of nodes.
[0005]
The present invention has been made in consideration of the above-described problems, and an information search method capable of reducing the number of processing steps and speeding up a node search and reducing the memory usage compared to the related art. And an apparatus.
[0006]
[Means for Solving the Problems]
In order to solve the above problem, the invention according to claim 1 is an information search method using a binary search tree, wherein a storage area for data corresponding to each node is replaced with a first storage area for storing data indicating a key. A second storage area for storing a link pointer to one other node; a third storage area for storing data indicating a link direction of the link pointer stored in the second storage area; And a fourth storage area for storing data indicating the position of the data to be inspected in the data stored in the storage area, and among the data corresponding to the respective nodes, a common node is defined as an upper node. A set of data corresponding to a pair of lower nodes is stored in a continuous storage area, and when a search process is performed for each node, the value stored in the third storage area is changed to a first predetermined value. If the second It is determined that the node indicated by the link pointer stored in the storage area is the node to be searched, and the value stored in the third storage area is a second predetermined value different from the first predetermined value , The next processing is performed based on the data at the position specified by the data in the fourth storage area of the data in the first storage area and the link pointer stored in the second storage area. A link pointer to a lower node to be performed is determined. According to a second aspect of the present invention, when a search process is performed for each node, the value stored in the third storage area is the first predetermined value. When the link pointer is not stored, it is determined that the search has failed.
[0007]
According to a third aspect of the present invention, when determining a link pointer to a lower node to be processed next, the position of the data specified by the data in the fourth storage area of the data in the first storage area is determined. When the data has a third predetermined value, the link pointer stored in the second storage area is used as a link pointer to a lower node, and the data in the first storage area is stored in the fourth storage area. When the data at the position specified by the data is a fourth predetermined value different from the third predetermined value, a predetermined fifth predetermined value is stored in the link pointer stored in the second storage area. A value obtained by adding the value is used as a link pointer to a lower node. According to a fourth aspect of the present invention, the data storage area corresponding to each of the nodes further has a fifth storage area for storing a pointer to each node unique information, and is stored in the third storage area. The stored value is the first predetermined value, and the pointer to the node unique information is stored in the fifth storage area corresponding to the node storing the data indicating the key in the first storage area. It is characterized by the following. According to a fifth aspect of the present invention, the value stored in the third storage area is the second predetermined value, and the value stored in the second storage area is stored in the first storage area. A pointer to the same node unique information as the link destination node is stored in the fifth storage area corresponding to the node storing the link pointer corresponding to the node storing the data indicating the key. It is characterized by.
[0008]
According to a sixth aspect of the present invention, in the information retrieval apparatus using a binary search tree, a first storage area for storing data indicating a key and a second storage for storing a link pointer to one other node. An area, a third storage area for storing data indicating the link direction of the link pointer stored in the second storage area, and a position of data to be inspected in the data stored in the first storage area. And a fourth storage area for storing data. The fourth storage area has a data storage area corresponding to each node, and among the data corresponding to each node, a common node is set as an upper node. A storage unit for storing a set of data corresponding to a pair of lower nodes in a continuous storage area, and a value stored in a third storage area when a search process is performed for each node. Is the value of Means for determining that the node indicated by the link pointer stored in the second storage area is a node to be searched, and that the value stored in the third storage area is a first predetermined value. If the second predetermined value is different from the data in the first storage area, the data at the position specified by the data in the fourth storage area and the link pointer stored in the second storage area Means for determining a link pointer to a lower node to be processed next based on
[0009]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is an explanatory diagram showing the structure of the nodes of the Patricia tree in the present embodiment. Referring to FIG. 1, in the present invention, a node 2a of the Patricia tree includes a search key 2a1, a link pointer 2a2, a link direction bit 2a3, a key check position 2a4, and a pointer 2a5 to node (entry) unique information. Similarly, the other nodes 2b1 and 2b2 also store the search keys 2b11 and 2b21, the link pointers 2b12 and 2b22, the link direction bits 2b13 and 2b23, the key inspection positions 2b14 and 2b24, and the pointers 2b15 and 2b25 to the node-specific information. Include each. The Patricia tree also holds the node length 29 as a constant in a predetermined storage area.
[0010]
The search keys 2a1, 2b11, and 2b21 are used as search keys constituting a Patricia tree, respectively. The link pointers 2a2, 2b12, and 2b22 store pointers to upper nodes or lower nodes, respectively. The link direction bits 2a3, 2b13, 2b23 define the properties of the pointers stored in the link pointers 2a2, 2b12, 2b22, respectively. When the link direction bits 2a3, 2b13, 2b23 are "0", the link pointers 2a2, 2b12, 2b22 Stores NULL or the head pointer of the upper node, and when the link direction bits 2a3, 2b13, 2b23 are "1", the link pointers 2a2, 2b12, 2b22 store the head pointer of the lower left node. In the example shown in FIG. 1, the node 2a holds a search key constituting a Patricia tree as the search key 2a1, and stores a pointer to the lower left node 2b1 as the link pointer 2a2. In this case, "1" is stored in the link direction bit 2a3.
[0011]
The key inspection positions 2a4, 2b14, and 2b24 store inspection positions (bit positions) starting from the left side in the search target 28 in each node of the Patricia tree. The pointers 2a5, 2b1, and 2b2 to the node-specific information respectively store pointers to management information used in processing after the search is completed successfully. The pointers 2a5, 2b1, and 2b2 to the node unique information are not referred to during the search processing. In the present embodiment, each node except for a root (root) node is arranged such that two nodes always occupy a continuous area in the storage area like the lower left node 2b1 and the lower right node 2b2 in FIG. . Therefore, by adding the node length 29 to the link pointer 2a2 storing the pointer to the lower left node 2b1, the value of the pointer of the lower right node 2b2 can be obtained. The search target 28 stores a value to be searched with the same size as the search keys 2a1, 2b11, and 2b21. Here, each data is treated as a bit string. The node length 29 stores the length (data length) of the nodes 2a, 2b1, and 2b2. However, the method of arranging the two nodes is not limited to the above. For example, the positions of the lower right node and the lower left node are interchanged, and the value of the link pointer corresponds to the lower right node. May be obtained to obtain a value corresponding to the lower left node.
[0012]
Next, a search operation related to the node 2a shown in FIG. 2 will be described with reference to a flowchart shown in FIG. The search processing according to the present embodiment is executed by a CPU (central processing unit) having a predetermined storage device. The data of the search target, each node, and the node length are stored in the storage device during the search processing. Further, the program executed by the CPU can be distributed via a computer-readable recording medium or a communication line. In the configuration of FIG. 2, the search operation for the search target 28 and the node 2a starts by first examining the link direction bit 2a3 of the node 2a (step S1 in FIG. 4). If the link direction bit 2a3 is "0", the link pointer 2a2 is checked next (step S6). If the link direction bit 2a3 is "0" and the link pointer 2a2 is NULL, the corresponding node does not exist, and the search fails and the search operation ends. If the link direction bit 2a3 is "0" and the link pointer 2a2 is other than NULL, the node pointed to by the pointer is a node having a search key that matches the search target 28, and therefore the node pointed to by the link pointer 2a2 (in this case, shown in FIG. The contents of the upper-level node that has not been read are read (step S7), and node-specific information pointed to by the pointer to the node-specific information is obtained (step S8).
[0013]
On the other hand, in FIG. 4, if the link direction bit 2a3 is "1" in step S1, the search is continued. The value of the position indicated by the key inspection position 2a4 starting from the left side of the search target 28 is checked (steps S2 and S3). If the value of the position indicated by the key inspection position 2a4 in the inspection target 28 is "1", it means that the right lower node of the Patricia tree is to be traced. Therefore, a value obtained by adding the node length 29 to the link pointer 2a2 is used as the pointer. Then, the content pointed to by the pointer is newly read as the content of the lower right node (step S4). If the value of the position indicated by the key inspection position 2a4 of the search target 28 is "0", it means that the left lower node of the Patricia tree is to be traced, so that the content pointed to by the link pointer 2a2 is read as the content of the lower left node (step S5). ). The search operation from step S1 to step S5 is repeated until the link direction bits 2a3, 2b13, 2b23,... Become "0".
[0014]
Next, referring to the Patricia tree representation shown in FIGS. 2 and 3 and the flowchart of FIG. 4, the operation of the present embodiment will be described in detail with a specific example. In this example, it is assumed that three lower nodes in the Patricia tree are configured as shown in FIGS. FIG. 2 is a diagram showing a value of each node and a mutual positional relationship, and FIG. 3 is a Patricia tree representation thereof. The key of the inspection target 30 corresponding to the search target 28 in FIG. 1 is set to “00110”, and the node length 31 corresponding to the node length 29 in FIG. 1 is set to the node length of each node. Nodes 3a1 and 3a2 shown in FIG. 2 are lower left and lower right nodes linked from an upper node (not shown). However, the illustration of the node 3a2 is omitted in FIG.
[0015]
2, in the node 3a1, the search key 3a11 contains data "00100", the link pointer 3a12 contains the pointer to the node 3b1 (link L1 in FIGS. 2 and 3), and the link direction bit 3a13 contains "1". “3” is stored in the search position 3a14, and a pointer to the node unique information 4a is stored in the pointer 3a15 to the node unique information. In the node 3b1, NULL is stored in the link pointer 3b12, and "0" is stored in the link direction bit 3b13. In the node 3b2, the data “00110” is stored in the search key 3b21, the pointer (link L2) to the node 3c1 is stored in the link pointer 3b22, “1” is stored in the link direction bit 3b23, “4” is stored in the key search position 3b24, and , A pointer to the node unique information 4a is stored in the pointer 3b25 to the node unique information.
[0016]
In the node 3c1, a pointer (link L3) to the node 3a1 is stored in the link pointer 3c12, and “0” is stored in the link direction bit 3c13. In the node 3c2, the data “00111” is stored in the search key 3b21, the pointer (link L4) to the node 3d1 is stored in the link pointer 3c22, “1” is stored in the link direction bit 3c23, “5” is stored in the key search position 3c24, and , The pointer to the node unique information 4c is stored in the pointer 3c25 to the node unique information. In the node 3d1, a pointer (link L6) to the node 3b2 is stored in the link pointer 3d12, and “0” is stored in the link direction bit 3d13. In the node 3d2, a pointer (link L5) to the node 3c2 is stored in the link pointer 3d22, and “0” is stored in the link direction bit 3d23.
[0017]
Next, a search operation regarding the nodes shown in FIGS. 2 and 3 will be described with reference to a flowchart shown in FIG. Now, it is assumed that the given search target 30 “00110” is compared with the node 3a1. In this case, first, the link direction bit 3a13 is checked (step S1). Since this value is "1", the search is continued. When the key search position 3a14 is examined next to follow the lower node, the value is "3", so the third value from the left of the search target 30 is examined (steps S2 and S3). Then, since the value is "1", in order to follow the lower right node 3b2, the content is read as the pointer to the next node with the value obtained by adding the value of the node length 31 to the link pointer 3a12, and the node 3b2 is obtained as a new node ( Step S5).
[0018]
Next, the link direction bit 3b23 is checked (step S1). Since the value is "1", the search is continued. Since the value of the key search position 3b24 is "4", the fourth value from the left of the search target 30 is checked (steps S2 and S3). Then, since the value is "1", the content is read as a pointer to the next node by adding the value of the node length 31 to the link pointer 3b22 in order to follow the lower right node 3c2, and the node 3c2 is obtained as a new node (step S5).
[0019]
Similarly, the lower left node 3d1 is obtained from the search target 30 and the key inspection position 3c24. When the link direction bit 3d13 of this node is examined (step S1), the value is "0", and the link pointer 3d12 is examined next (step S6). ). Then, since the value is not NULL, the node 3b2 indicated by the link pointer 3d12 becomes the search target node, and the contents of the node 3b2 are read (step S7). Finally, the node specific information pointed to by the pointer 3b25 to the node specific information is obtained (step S8), and the search ends.
[0020]
Next, another embodiment of the present invention will be described in detail with reference to FIGS. Referring to FIG. 5, the present embodiment is different from the above embodiment in that the nodes 3a1, 3b2, and 3c2 whose link direction bit is “1” and that has a search key are respectively node unique information 4a. , 4b, 4c, and the link pointers 3a12, 3b22, 3c22 to other nodes, but the link direction bit is "0", and Nodes 3c1, 3d1, and 3d2 that have links to nodes 3a1, 3b2, and 3c2 that have keys are also pointers 3c15, 3d15 that point to the same node-specific information 4a, 4b, and 4c as nodes 3a1, 3b2, and 3c2 that are links. It differs in having 3d25.
[0021]
The overall operation of the present embodiment will be described in detail with reference to the flowcharts of FIGS. The operation in this embodiment shown in steps S1 to S5 in FIG. 6 is the same as the operation in steps S1 to S5 in the above embodiment shown in FIGS. The flowchart shown in FIG. 6 is obtained by omitting the processing in step S7 of the flowchart shown in FIG. In the embodiment shown in FIG. 2, when the link direction bit is “0” and the link pointer is not NULL, the node specific information is obtained after further reading the search target node indicated by the link pointer. In the present embodiment, a pointer to node-specific information is set for a node whose link direction bit is “0” and whose link pointer is not NULL.
[0022]
Next, a description will be given using a specific example. In the flow shown in FIG. 5, when the search process is performed for the key “00110” of the search target 30 in the same manner as in FIG. 2, when the node 3d1 is obtained, the link direction bit 3d13 becomes “0”. Check (steps S1 and S6 in FIG. 6). Then, since the value of the link pointer 3d12 is not NULL, the node 3d1 has a link pointer pointing to the search target node. Then, the node unique information 4b pointed to by the pointer 3d15 to the node unique information having the same value as the search target node is read (step S7), and the search is successful.
[0023]
In the present embodiment, it is necessary to configure a node in which the link direction bit is “0” and the link pointer is not NULL so that the node has the same pointer to the node specific information as the node indicated by the link pointer. Since the node reading process can be reduced by one step, there is a new effect that the search process can be performed at higher speed.
[0024]
As described above, according to the present invention, it is possible to provide a configuration in which a node search can be performed at higher speed in a Patricia tree, which is one type of a binary search tree, as compared with the related art. The features of the present invention are summarized as follows. In FIG. 1, in the present invention, for a node 2a constituting a Patricia tree, only one link pointer to a lower node required in a normal binary tree is provided as a link pointer 2a2. The link pointer 2a2 is a pointer of the lower node in the left direction, and is also interpreted as a pointer of the lower node in the right direction by adding the node length 28. The selection of the link destination is distinguished by the value indicated by the key inspection position 2a4 starting from the left in the search key 2a1.
[0025]
In the search processing, the link pointer 2a2 is checked first, and if NULL, the search fails and the processing ends. If it is other than NULL, the link direction bit 2a3 is checked next. If "0", the node indicated by the pointer is the node to be searched, and the search is successful. If "1", the search is continued, and a pointer to the next lower node is determined by a combination of the value of the position indicated by the key check position 2a4 in the search target 28 and the link pointer 2a3. As described above, the continuation / success / failure of the Patricia tree search can be determined only by the information on the node without referring to the storage area other than the node and saving the contents of the node. The node search can be performed at high speed by reducing the time and the number of processing procedures associated with the use of a plurality of storage areas.
[0026]
【The invention's effect】
A first effect of the present invention is that a node search can be performed at high speed in a Patricia tree. The reason is that each node has a link direction bit so that search continuation / success / failure can be determined only by information on the node. A second effect is that the amount of memory used when configuring a Patricia tree can be reduced. The reason is that the left and right lower nodes are always configured to occupy a continuous storage area, so that each node only needs to have one pointer to the left and right lower nodes by holding the node length information independently. That's why.
[Brief description of the drawings]
FIG. 1 is an explanatory diagram showing an example of the structure of a node of a Patricia tree in the information search method of the present invention.
FIG. 2 is an explanatory diagram showing values of each node and a mutual positional relationship according to the embodiment of the present invention;
FIG. 3 is an explanatory diagram showing each node shown in FIG. 2 in a Patricia tree expression.
FIG. 4 is a flowchart showing an information search operation according to an embodiment of the present invention.
FIG. 5 is an explanatory diagram showing a modification of the configuration of each node shown in FIG. 2;
FIG. 6 is a flowchart showing an information retrieval operation using the node configuration shown in FIG. 6;
FIG. 7 is an explanatory diagram showing an example of the structure of a node of a Patricia tree in a conventional information search method.
[Explanation of symbols]
2a, 2b1, 2b2, 3a1, 3a2, 3b1, 3b2, 3c1, 3c2, 3d1, 3d2... Nodes 2a1, 2b11, 2b21, 3a11, 3b21, 3c21. , 3d12, 3d22... Link pointers 2a3, 2b13, 2b23, 3a13, 3b13, 3b23, 3c13, 3c23, 3d13, 3d23... Link direction bits 2a4, 2b14, 2b24, 3a14, 3b24, 3c24. , 3a15, 3b25, 3c25... Pointers 28, 30... To be searched 29, 31... Node length

Claims (6)

2分探索木を用いた情報検索方法において、
各ノードに対応するデータの記憶領域を、キーを示すデータを格納する第1の記憶領域と、1つの他のノードへのリンクポインタを格納する第2の記憶領域と、第2の記憶領域に格納したリンクポインタのリンク方向を示すデータを格納する第3の記憶領域と、第1の記憶領域に格納したデータの中の検査対象となるデータの位置を示すデータを格納する第4の記憶領域とから構成し、
前記各ノードに対応するデータのうち、共通のノードを上位のノードとする1対の下位ノードに対応する1組のデータを連続した記憶領域に格納し、
各ノードについて検索処理を行う際に、
第3の記憶領域に格納されている値が第1の所定の値である場合、第2の記憶領域に格納されているリンクポインタが示すノードが検索対象となるノードであると判定し、
第3の記憶領域に格納されている値が第1の所定の値と異なる第2の所定の値である場合、第1の記憶領域中のデータの第4の記憶領域中のデータで指定される位置のデータと、第2の記憶領域に格納されているリンクポインタとに基づいて次に処理を行う下位ノードへのリンクポインタを決定する
ことを特徴とする情報検索方法。
In an information search method using a binary search tree,
A storage area for data corresponding to each node is stored in a first storage area for storing data indicating a key, a second storage area for storing a link pointer to one other node, and a second storage area. A third storage area for storing data indicating the link direction of the stored link pointer, and a fourth storage area for storing data indicating the position of data to be inspected in the data stored in the first storage area Consisting of
A set of data corresponding to a pair of lower nodes having a common node as an upper node among data corresponding to the respective nodes is stored in a continuous storage area,
When performing search processing for each node,
When the value stored in the third storage area is the first predetermined value, it is determined that the node indicated by the link pointer stored in the second storage area is a node to be searched,
When the value stored in the third storage area is a second predetermined value different from the first predetermined value, the data in the first storage area is designated by the data in the fourth storage area. An information retrieval method which determines a link pointer to a lower node to be processed next, based on data at a position to be processed and a link pointer stored in a second storage area.
各ノードについて検索処理を行う際に、前記第3の記憶領域に格納されている値が前記第1の所定の値である場合で、前記第2の記憶領域にリンクポインタが格納されていないときは、検索失敗であると判定することを特徴とする請求項1記載の情報検索方法。When the search processing is performed for each node, the value stored in the third storage area is the first predetermined value, and the link pointer is not stored in the second storage area 2. The information search method according to claim 1, wherein it is determined that the search has failed. 次に処理を行う下位ノードへのリンクポインタを決定する際に、前記第1の記憶領域中のデータの前記第4の記憶領域中のデータで指定される位置のデータが第3の所定の値である場合に第2の記憶領域に格納されているリンクポインタを下位ノードへのリンクポインタとし、前記第1の記憶領域中のデータの前記第4の記憶領域中のデータで指定される位置のデータが第3の所定の値と異なる第4の所定の値である場合に第2の記憶領域に格納されているリンクポインタに予め決められた第5の所定の値を加えた値を下位ノードへのリンクポインタとする
ことを特徴とする請求項1又は2記載の情報検索方法。
When determining the link pointer to the lower node to be processed next, the data at the position specified by the data in the fourth storage area of the data in the first storage area is a third predetermined value. In this case, the link pointer stored in the second storage area is used as the link pointer to the lower node, and the data in the first storage area is located at the position specified by the data in the fourth storage area. When the data is a fourth predetermined value different from the third predetermined value, a value obtained by adding a predetermined fifth predetermined value to the link pointer stored in the second storage area is set to the lower node. 3. The information retrieval method according to claim 1, wherein a link pointer to the information is used.
前記各ノードに対応するデータの記憶領域が、さらに各ノード固有情報へのポインタを格納する第5の記憶領域を有し、
前記第3の記憶領域に格納されている値が前記第1の所定の値であって、かつ前記第1の記憶領域にキーを示すデータを格納するノードに対応する第5の記憶領域にノード固有情報へのポインタが格納されていることを特徴とする請求項1〜3のいずれか1項に記載の情報検索方法。
The data storage area corresponding to each of the nodes further has a fifth storage area for storing a pointer to each node-specific information,
A value stored in the third storage area is the first predetermined value, and a node is stored in a fifth storage area corresponding to a node storing data indicating a key in the first storage area. 4. The information search method according to claim 1, wherein a pointer to unique information is stored.
さらに、前記第3の記憶領域に格納されている値が前記第2の所定の値であって、かつ前記第2の記憶領域に、前記第1の記憶領域にキーを示すデータを格納されているノードに対応するリンクポインタが格納されているノードに対応する前記第5の記憶領域に、リンク先ノードと同一のノード固有情報へのポインタが格納されていることを特徴とする請求項4記載の情報検索方法。Further, the value stored in the third storage area is the second predetermined value, and data indicating a key is stored in the first storage area in the second storage area. 5. The pointer to the same node unique information as the link destination node is stored in the fifth storage area corresponding to the node storing the link pointer corresponding to the current node. Information retrieval method. 2分探索木を用いた情報検索装置において、
キーを示すデータを格納する第1の記憶領域と、1つの他のノードへのリンクポインタを格納する第2の記憶領域と、第2の記憶領域に格納したリンクポインタのリンク方向を示すデータを格納する第3の記憶領域と、第1の記憶領域に格納したデータの中の検査対象となるデータの位置を示すデータを格納する第4の記憶領域とから構成された各ノードに対応するデータの記憶領域を有するものであって、かつ 前記各ノードに対応するデータのうち、共通のノードを上位のノードとする1対の下位ノードに対応する1組のデータを連続した記憶領域に格納する記憶手段と、
各ノードについて検索処理を行う際に、
第3の記憶領域に格納されている値が第1の所定の値である場合、第2の記憶領域に格納されているリンクポインタが示すノードが検索対象となるノードであると判定する手段と、
第3の記憶領域に格納されている値が第1の所定の値と異なる第2の所定の値である場合、第1の記憶領域中のデータの第4の記憶領域中のデータで指定される位置のデータと、第2の記憶領域に格納されているリンクポインタとに基づいて次に処理を行う下位ノードへのリンクポインタを決定する手段と
を備えることを特徴とする情報検索装置。
In an information search device using a binary search tree,
A first storage area for storing data indicating a key, a second storage area for storing a link pointer to one other node, and data indicating a link direction of the link pointer stored in the second storage area. Data corresponding to each node composed of a third storage area for storing and a fourth storage area for storing data indicating the position of the data to be inspected in the data stored in the first storage area And a set of data corresponding to a pair of lower nodes having a common node as an upper node among data corresponding to the respective nodes is stored in a continuous storage area. Storage means;
When performing search processing for each node,
Means for determining , when the value stored in the third storage area is a first predetermined value, a node indicated by the link pointer stored in the second storage area to be a node to be searched; ,
When the value stored in the third storage area is a second predetermined value different from the first predetermined value, the data in the first storage area is designated by the data in the fourth storage area. An information retrieving apparatus comprising: means for determining a link pointer to a lower node to be processed next, based on data at a position to be processed and a link pointer stored in a second storage area.
JP2000177389A 2000-06-13 2000-06-13 Information retrieval method and device Expired - Fee Related JP3601416B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000177389A JP3601416B2 (en) 2000-06-13 2000-06-13 Information retrieval method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000177389A JP3601416B2 (en) 2000-06-13 2000-06-13 Information retrieval method and device

Publications (2)

Publication Number Publication Date
JP2001357070A JP2001357070A (en) 2001-12-26
JP3601416B2 true JP3601416B2 (en) 2004-12-15

Family

ID=18678995

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000177389A Expired - Fee Related JP3601416B2 (en) 2000-06-13 2000-06-13 Information retrieval method and device

Country Status (1)

Country Link
JP (1) JP3601416B2 (en)

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3691018B2 (en) * 2002-01-31 2005-08-31 日本電信電話株式会社 Longest match search circuit and method, program, and recording medium
US6961733B2 (en) * 2003-03-10 2005-11-01 Unisys Corporation System and method for storing and accessing data in an interlocking trees datastore
CA2518797A1 (en) * 2003-03-10 2004-09-23 Unisys Corporation System and method for storing and accessing data in an interlocking trees datastore
KR100777081B1 (en) 2006-06-19 2007-11-16 부산대학교 산학협력단 Method and system for browsing information of lattice structure over web environment
JP4271214B2 (en) * 2006-07-07 2009-06-03 株式会社エスグランツ Bit string search device, search method and program
US8150856B2 (en) 2006-07-07 2012-04-03 S. Grants Co., Ltd. Bit string searching apparatus, searching method, and program
JP4271227B2 (en) * 2006-10-30 2009-06-03 株式会社エスグランツ Bit string search device, search method and program
JP4379894B2 (en) 2006-11-28 2009-12-09 株式会社エスグランツ Method and program for splitting / joining coupled node tree
JP4402120B2 (en) * 2007-01-24 2010-01-20 株式会社エスグランツ Bit string search device, search method and program
JP4514768B2 (en) * 2007-04-19 2010-07-28 株式会社エスグランツ Coupled node tree save / restore apparatus, save / restore method, and program
JP4514771B2 (en) 2007-05-18 2010-07-28 株式会社エスグランツ Coupled node tree longest match / shortest match search device, search method and program
EP2149845B1 (en) 2007-04-19 2013-06-12 Kousokuya, Inc. Coupled node tree backup/restore apparatus, backup/restore method, and program
JP4439013B2 (en) 2007-04-25 2010-03-24 株式会社エスグランツ Bit string search method and search program
JP4527753B2 (en) 2007-07-03 2010-08-18 株式会社エスグランツ Bit string search device, search method and program
WO2009034689A1 (en) * 2007-09-14 2009-03-19 S.Grants Co., Ltd. Bit string search device, search method, and program
JP4502223B2 (en) * 2007-12-05 2010-07-14 株式会社エスグランツ Bit string merge sort apparatus, method, and program
JP4498409B2 (en) * 2007-12-28 2010-07-07 株式会社エスグランツ Database index key update method and program
JP4567754B2 (en) 2008-01-17 2010-10-20 株式会社エスグランツ Bit string search device, search method and program
JP2009251840A (en) * 2008-04-04 2009-10-29 S Grants Co Ltd Bit sequence search device, search method, and program
JP4514810B2 (en) * 2008-05-18 2010-07-28 株式会社エスグランツ Bit string search device, search method and program
JP4813575B2 (en) * 2009-01-30 2011-11-09 株式会社エスグランツ Bit string search device
JP5912714B2 (en) * 2012-03-21 2016-04-27 任天堂株式会社 Data structure, data structure generation method, information processing apparatus, information processing system, and information processing program
JP6016215B2 (en) 2013-12-20 2016-10-26 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Method, apparatus, and computer program for performing merge sorting of records having a trie tree structure with high efficiency

Also Published As

Publication number Publication date
JP2001357070A (en) 2001-12-26

Similar Documents

Publication Publication Date Title
JP3601416B2 (en) Information retrieval method and device
US8073874B2 (en) Bit string searching apparatus, searching method, and program
US6185569B1 (en) Linked data structure integrity verification system which verifies actual node information with expected node information stored in a table
US8224861B2 (en) Coupled node tree splitting/conjoining method and program
JP3771271B2 (en) Apparatus and method for storing and retrieving ordered collections of keys in a compact zero complete tree
US8190591B2 (en) Bit string searching apparatus, searching method, and program
EP3113036B1 (en) Data matching method and apparatus and computer storage medium
EP1434147A2 (en) Method for increasing average storage capacity in a bit-mapped tree-based storage
US8214405B2 (en) Longest-match/shortest-match search apparatus, search method, and program
JPH06103497B2 (en) Record search method and database system
CA2519179C (en) A computer implemented compact 0-complete tree dynamic storage structure and method of processing stored data
US7130859B2 (en) Data structure for search
US8250089B2 (en) Bit string search apparatus, search method, and program
US8166043B2 (en) Bit strings search apparatus, search method, and program
JPH0869476A (en) Retrieval system
US8195667B2 (en) Bit string search apparatus, search method, and program
JP5041003B2 (en) Search device and search method
JP2560610B2 (en) Data processing device
Grossi A fast VLSI solution for approximate string matching
CN115801020A (en) Definite finite state automaton compression method, matching method, device and medium
CN115422426A (en) Dictionary data indexing method and device, electronic equipment and storage medium
JPS61150032A (en) Data string retrieval method
JP2003296368A (en) Device and method for retrieving database, and storage medium and program
JP2002149702A (en) Method and device for retrieving tree-structure information
JPS63128426A (en) Retrieving system for character string of variable length

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040601

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040729

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040831

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040913

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071001

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081001

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091001

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101001

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees