JP3708809B2 - Recording medium on which multidimensional spatial data structure is recorded, multidimensional spatial data update method, multidimensional spatial data search method, and recording medium on which program for executing the method is recorded - Google Patents

Recording medium on which multidimensional spatial data structure is recorded, multidimensional spatial data update method, multidimensional spatial data search method, and recording medium on which program for executing the method is recorded Download PDF

Info

Publication number
JP3708809B2
JP3708809B2 JP2000261508A JP2000261508A JP3708809B2 JP 3708809 B2 JP3708809 B2 JP 3708809B2 JP 2000261508 A JP2000261508 A JP 2000261508A JP 2000261508 A JP2000261508 A JP 2000261508A JP 3708809 B2 JP3708809 B2 JP 3708809B2
Authority
JP
Japan
Prior art keywords
node
data
enclosing rectangle
recording medium
stored
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 - Lifetime
Application number
JP2000261508A
Other languages
Japanese (ja)
Other versions
JP2002073390A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2000261508A priority Critical patent/JP3708809B2/en
Publication of JP2002073390A publication Critical patent/JP2002073390A/en
Application granted granted Critical
Publication of JP3708809B2 publication Critical patent/JP3708809B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は、データベースに格納される多次元空間データの探索技術に関し、特に多次元空間データ構造を記録した記録媒体、多次元空間データ更新方法、多次元空間データ探索方法および前記方法を実施するプログラムを記録した記録媒体に関する。
【0002】
【従来の技術】
従来の空間アクセス法の中で、高次元空間の探索に有用な手法としてR−treeとその派生手法がある(以下、R−treeファミリーと呼ぶ)。R−treeファミリーには、R−tree,R*−tree,Hilbert R−tree,SS−tree,SR−treeなどがあり、いずれもデータオブジェクトは最小包囲領域、つまり最小包囲矩形(MBR;Minimum Bounding Rectangle)もしくは最小包囲球(MBS;Minimum Bounding Sphere)に梱包され、更に階層構 造をなしている。
【0003】
SR−treeは、図7に示すように、MBRとMBSを用いる木構造である。探索においては、問い合わせ点とMBRとの距離、問い合わせ点とMBSとの距離を計算し、距離の長い方をエントリと問い合わせ点との距離とする。MBRとMBSを探索に用いることにより、枝刈り処理の効率化を図っている。
【0004】
MBRの位置座標の符号化を用いた手法としてVR−tree(特願2000−8056)がある。仮想包囲矩形(VBR;Virtual Bounding Rectangle)によってMBRは近似され、相対セル(relative cell)によってデータオブジェ クトは近似され、VBRと相対セルは部分空間符号により表現される。
【0005】
図8は、部分空間符号を計算する方法について簡単に例示したものである。n次元空間内のi次元座標において、包囲矩形Aが座標値として(3,19)を、そして包囲矩形Bが同様に座標値として(6,8)を占めている。このとき、長さlの符号を用いて、Aのi次元座標範囲を2lの部分区間に等分割することに より、Bの始点をそれが存在する部分区間によって近似的に表現することができる。これは、Bの終点についても同様である。例えば、長さ3の符号を用いて、Aの領域を8つの部分区間に分割した場合、BはAの始点から数えて前から2番目と3番目の部分区間を占めていることになる。それゆえ、i次元座標におけるBの領域は8元符号(1,2)、もしくは2進符号では(001,010)のように近似的に表現することが可能である。この場合、2進符号において必要な符号長は、Bの始点、終点それぞれに3であるため、次元あたり合計6となる。
【0006】
VR−treeでは、2種類の木構造索引を構築する。絶対的位置表現を用いる木構造である実部分、部分空間符号に基づいた相対的位置表現を用いる木構造である仮想部分によって成り立っている。図9に索引構造の例を示す。図9(a)において、全体空間をRとする。MBR M1,M2はRに包含されており、 V1,V2は各々Rに基づいて、M1とM2を近似している。V1,V2は各々RにおけるM1のVBR、RにおけるM2のVBRである。また同様に、図9(b)において、V3,V4は各々V1におけるM3のVBR、V1におけるM4のVBRである。更に図9(c)に示すように、データオブジェクトP1,P2はM3に包含されている。C1,C2は各々V3に基づいてP1とP2を近似している。C1,C2は各々V3におけるP1の相対セル、V3におけるP2の相対セルである。図9(a),(b),(c)に示したMBR,VBR、データオブジェクト、相対セルは、図9(d)のように構成される。実部分のノードにはMBRとデータオブジェクトが格納され、仮想部分のノードにはVBRあるいは相対セルの部分空間符号が格納される。仮想部分のノードと実部分のノードは1対1の関係を保つ。
【0007】
【発明が解決しようとする課題】
上述した従来のVR−treeは、次に示すような問題がある。
【0008】
データオブジェクトが索引へ新たに挿入する場合、もしくは削除する場合、索引の更新処理が発生する。VR−treeでは実部分のみならず、仮想部分についても更新する必要があるため、従来手法より多くの更新コストが発生する。実用においては、更新が頻繁に発生するケースも考えられるため、更新コストを低減化することが望まれる。
【0009】
具体的に、VR−treeにおける更新処理の概要、多くの更新コストが発生する理由について説明する。実部分におけるMBRの修正処理は上向きに伝播するが、仮想部分における部分空間符号の修正は下向きに伝播する。実部分においてMBRやデータオブジェクトが更新されると、対応するVBRや相対セルの符号についても更新する。更に、更新した符号のエントリを頂点として、その配下に位置するすべてのノードにアクセスし、ノードが保有する部分空間符号を検査する必要がある。そして、必要があれば更新する。手順は以下の通りである。
【0010】
(1)更新したMBRに対応するVBRの符号、もしくは更新したデータオブジェクトに対応する相対セルの符号を更新するため、仮想部分において根ノードから下位ノードに向かってVBRを計算していく。
【0011】
(2)更新したMBRやデータオブジェクトに対応する符号を計算し、更新する。
【0012】
(3)更新したエントリを頂点とする配下の部分木内のすべてのノードにアクセスし、ノードに格納されている符号を検査し、必要があれば更新する。
【0013】
(3)において記述されているように、VR−treeでは、部分空間符号に修正を必要としないノードに達しても終了せず、引き続き下位ノードへ処理を伝播させ、部分木内のすべてのノードにアクセスする。何故なら、部分空間符号は相対的位置を用いているためにVBRには幾分かの誤差が含まれており、現ノードにおいて更新の必要が無い場合でも下位ノードでは修正を必要とする可能性があるためである。図10を用いてこの理由について説明する。図9において矩形A,B,Cを各々全体空間、子ノードのMBR、孫ノードのMBRとする。また、Vbを基数4のAにおけるBのVBRとし、Vcを基数4のVbにおけるCのV BRとする。データオブジェクトの挿入により、図9(a)から図9(b)のように矩形Aのみがx軸方向に拡張したとする。このとき、Bのサイズに変動はないが、Aの拡張によってVbは拡張する。そして、サイズに変動のないCに関し ては、Vbのサイズ変動によりCのVBR Vcは縮小する。この場合、Vbの部分空間符号に修正の必要はないが、Vcの部分空間符号には修正が必要である。
【0014】
VR−treeは上述のように付加的な更新コストを必要とする。木構造の上部のレベルのMBRが変更された場合、特に多くのコストを必要とする。
【0015】
本発明は、上記に鑑みてなされたもので、その目的とするところは、少ない時間でオブジェクトを検索でき、高い探索性能を有する多次元空間データ構造を記録した記録媒体、多次元空間データ更新方法、多次元空間データ探索方法および前記方法を実施するプログラムを記録した記録媒体を提供することにある。
【0016】
【課題を解決するための手段】
上記目的を達成するため、請求項1記載の本発明の多次元空間データ構造を記録した記録媒体は、データベースに格納されるマルチメディアデータを組織する多次元空間データ構造を記録した記録媒体であって、前記多次元空間データ構造が、仮想包囲矩形と重心とを格納する根ノードと、この根ノードに対して子ノードとしてリンクし、最小包囲矩形を近似する仮想包囲矩形、最小包囲矩形、および配下のデータオブジェクトの重心とを格納する中間ノードと、この中間ノードに子ノードとしてリンクし、データオブジェクトを近似する相対セルと最小包囲矩形とを格納するリーフノードの3種類のノードを有する索引ノードと前記リーフノードに1対1の関係でリンクし、データオブジェクトを格納するデータノードとから構成されることを要旨とする。
【0017】
請求項1記載の本発明にあっては、データノードにデータオブジェクトを格納し、リーフノードにデータオブジェクトを近似する相対セルと最小包囲矩形を格納し、中間ノードに最小包囲矩形を近似する仮想包囲矩形、最小包囲矩形、配下のデータオブジェクトの重心を格納し、根ノードに仮想包囲矩形と重心を格納するように構成した多次元空間データ構造を記録媒体に記録しているため、該記録媒体を用いて、データベースに格納されるマルチメディアデータを組織する多次元空間データ構造の流通性を高めることができる。
【0018】
また、請求項2記載の本発明の多次元空間データ更新方法は、請求項1記載の記録媒体に記録される多次元空間データ構造における多次元空間データ更新方法であって、データノードに格納されているデータオブジェクトと当該データノードの親ノードに格納されている最小包囲矩形から相対セルの部分空間符号を計算し、根ノード以外の索引ノードに格納されている最小包囲矩形と当該索引ノードの親ノードに格納されている最小包囲矩形から仮想包囲矩形の部分空間符号を計算することを要旨とする。
【0019】
請求項2記載の本発明にあっては、データノードに格納されているデータオブジェクトと親ノードに格納されている最小包囲矩形から相対セルの部分空間符号を計算し、根ノード以外の索引ノードに格納されている最小包囲矩形と親ノードに格納されている最小包囲矩形から仮想包囲矩形の部分空間符号を計算することでデータオブジェクトの挿入や削減に伴う索引の更新を低コストで実施する
【0020】
更に、請求項3記載の本発明の多次元空間データ探索方法は、請求項1記載の記録媒体に記録される多次元空間データ構造における多次元空間データ探索方法であって、根ノードおよび中間ノードでは最小包囲矩形と部分空間符号から仮想包囲矩形を計算し、リーフノードでは最小包囲矩形と部分空間符号から相対セルを計算し、データノードのアクセスにおいてデータオブジェクトを取得することを要旨とする。
【0021】
請求項3記載の本発明にあっては、根ノードおよび中間ノードでは最小包囲矩形と部分空間符号から仮想包囲矩形を計算し、リーフノードでは最小包囲矩形と部分空間符号から相対セルを計算し、データノードのアクセスにおいてデータオブジェクトを取得することで短時間でオブジェクトを検出することが可能となり、高い探索性能を実現する。
【0022】
請求項4記載の本発明の多次元空間データ更新プログラムを記録した記録媒体は、請求項1記載の記録媒体に記録される多次元空間データ構造における多次元空間データ更新方法をコンピュータに実行させるプログラムを記録した記録媒体であって、データノードに格納されているデータオブジェクトと当該データノードの親ノードに格納されている最小包囲矩形から相対セルの部分空間符号を計算し、根ノード以外の索引ノードに格納されている最小包囲矩形と当該索引ノードの親ノードに格納されている最小包囲矩形から仮想包囲矩形の部分空間符号を計算することを要旨とする。
【0023】
請求項4記載の本発明にあっては、データノードに格納されているデータオブジェクトと親ノードに格納されている最小包囲矩形から相対セルの部分空間符号を計算し、根ノード以外の索引ノードに格納されている最小包囲矩形と親ノードに格納されている最小包囲矩形から仮想包囲矩形の部分空間符号を計算する多次元空間データのデータ更新プログラムを記録媒体に記録しているため、該記録媒体を用いて、データオブジェクトの挿入や削減に伴う索引の更新を低コストで実施する多次元空間データ更新プログラムの流通性を高めることができる。
【0024】
また、請求項5記載の本発明の多次元空間データ探索プログラムを記録した記録媒体は、請求項1記載の記録媒体に記録される多次元空間データ構造における多次元空間データ探索方法をコンピュータに実行させるプログラムを記録した記録媒体であって、根ノードおよび中間ノードでは最小包囲矩形と部分空間符号から仮想包囲矩形を計算し、リーフノードでは最小包囲矩形と部分空間符号から相対セルを計算し、データノードのアクセスにおいてデータオブジェクトを取得することを要旨とする。
【0025】
請求項5記載の本発明にあっては、根ノードおよび中間ノードでは最小包囲矩形と部分空間符号から仮想包囲矩形を計算し、リーフノードでは最小包囲矩形と部分空間符号から相対セルを計算し、データノードのアクセスにおいてデータオブジェクトを取得する多次元空間データ探索プログラムを記録媒体に記録しているため、該記録媒体を用いて、短時間でオブジェクトを検出し、高い探索性能を実現する多次元空間データ探索プログラムの流通性を高めることができる。
【0026】
【発明の実施の形態】
以下、図面を用いて本発明の実施の形態を説明する。本発明では、上述したVR−treeが有する問題から鑑みて、(1)更新処理では、親ノードのVBRではなく、親ノードのMBRから部分空間符号を計算し、(2)探索処理では、少ないページアクセスでMBRと部分空間符号のデータを取得するという特質を有するデータ構造およびアルゴリズムを有する新たな索引手法であるVR−treeを改良したA−tree(Approximation Tree)を提案している。
【0027】
このA−treeでは、上位のノードのMBRから相対的にVBRや相対セルの部分空間符号を計算する。また、部分空間符号と親ノードのMBRを同一のノードに格納する。
【0028】
図1は、このA−treeの構造の一例を示す図である。図1(a)において、全体空間をRとする。MBR M1,M2はRに包含されており、MBR M3,M4はM1に包含されている。更にデータオブジェクトP1,P2はM3に包含されている。この構造において、V1,V2,V3,V4は各々RにおけるM1のVBR、RにおけるM2のVBR、M1におけるM3のVBR、M1におけるM4のVBRである。また、C1,C2は各々M3におけるP1の相対セル、M3におけるP2の相対セルである。MBR、VBR、データオブジェクト、相対セルは図1(b)のように格納され、木構造が作られる。
【0029】
図1(b)に示すように、A−treeのノードは索引ノード(index node)とデータノード(data node)に分類できる。根ノード以外の索引ノードは1つ のMBR(Mとする)、子ノードに関するMBR(もしくはデータオブジェクト)を近似するVBR(もしくは相対セル)の部分空間符号を保有している。Mは子ノードに格納されているMBR(もしくはデータオブジェクト)を包含するMBRである。根ノードではMBRは格納しない。根ノードでは全体空間から子ノードのVBRを計算することができる。A−treeを構築するとき、あるノードに格納されている子のVBR(もしくは相対セル)の符号は、子のMBR(もしくはデータオブジェクト)と同じノードに格納されている親のMBRから計算される。根ノードにおいては、子のVBRの符号は、子のMBRと全体空間から計算される。
【0030】
A−treeでは索引ノードは、リーフノード、中間ノード、根ノードに分類される。
【0031】
1.データノード
データノードはエントリ、(P1 ,o1),(P2 ,o2),…,(Pm ,om)を含んでいる。ここで、Pi(i=1,2,…,m)はデータオブジェクトの空間ベクトルであり、oi(i=1,2,…,m)はオブジェクト記述レコード へのポインタである。エントリ数mは最大値と最小値によって制限されている。
【0032】
2.リーフノード
リーフノードはデータノードと1対1の関係があり、データノードN((P1 ,o1),(P2 ,o2),…,(Pm ,om))と対応するリーフノードは、 i)P1 ,P2 ,…,PmのMBRであるM、ii)ポインタN、iii)エントリのリストsc(V1),sc(V2),…,sc(Vm)から構成される。ここで、 ViはMにおけるPi(i=1,2,…,m)の相対セルであり、SC(Vi)は Viの部分空間符号である。
【0033】
3.中間ノード
根ノードとリーフノードを除く索引ノードが中間ノードであり、i)子ノードのMBRを包含するMBR M、ii)エントリ(ptr,sc(V),w,Pcentroid)のリストから構成される。ここで、ptrは子ノードCへのポインタ 、VはCに格納されているMBRを近似するVBR、wはCを頂点とする部分木内のデータオブジェクトの総数、Pcentroidはその部分木内のすべてのデータオブジェクトの重心である。
【0034】
wとPcentroidは、データオブジェクトの挿入と削除の際に用いられる。探索アルゴリズムではM,ptr,sc(V)のみが用いられるため、実装においては、ptrとsc(V)のデータを同じページに格納する。
【0035】
4.根ノード
根ノードはエントリ(ptr,sc(V),w,Pcentroid)のリストから構成される。
【0036】
次に、上述したA−treeの更新アルゴリズムについて説明する。A−treeの更新アルゴリズムは、SR−treeに基づいている。データオブジェクトの挿入もしくは削除から始まり、中間ノードにおけるMBRと重心の調整処理は上位ノードに伝播する。A−treeとSR−treeの違いは、A−treeアルゴリズムがVBRや相対セルの計算を必要とすることである。具体的にA−tree構造は以下のように更新される。
【0037】
(1)Nをデータノード、MをNのMBRとする。そのとき、MはNの親ノードに格納されている。Nにおいてデータオブジェクトの挿入もしくは削除が発生した場合、Mを調整し、Nに格納されているすべてのデータオブジェクトの重心を計算し、更新する。
【0038】
(2)Mが変化しなかった場合、挿入オブジェクトを近似する相対セルの符号をMから計算し、更新する。さもなければ、Nの親ノードに格納されているすべての符号を更新する。
【0039】
(3)Nを根ノードを除く索引ノードの1つであるとし、MをNのMBRとする。そのとき、MはNの親ノードに格納されている。データオブジェクトの挿入もしくは削除がNを頂点とする部分木内で発生した場合、Nの親ノードに蓄積されているすべての重心点を更新する。更に、挿入もしくは削除が、子のMBRを変更させた場合はMを調整する。
【0040】
(4)Mが変化しなかった場合、更新したMBRを近似するVBRの符号をMから計算する。そして更新する。さもなければ、Nの親ノードに格納されているすべてのVBRの符号を更新する。
【0041】
次に、図2に示すフローチャートを参照して、上述したA−treeを用いて近傍探索アルゴリズムについて説明する。この探索アルゴリズムは、VR−treeに準じている。相違点は、VR−treeがVBRや相対セルの座標値を親ノードのVBRから計算するのに対して、A−treeでは親ノードのMBRから計算することである。
【0042】
図2に示す探索アルゴリズムでは、木構造を幅優先で探索する。現ノードのMBRと子ノードの部分空間符号を基にして、根ノードと中間ノードでは子ノードのVBRを計算し、リーフノードでは子ノードの相対セルを計算する。そして、データノードに到達すると、オブジェクトの位置情報を収集し、候補オブジェクトとする。
【0043】
図2においては、まずキューの先頭に根ノードを設定し(ステップS11)、ステップS13〜S39のループ1の処理をキューが空きになるまで繰り返し実行する。このループ1では、まずノードへのポインタをNに設定し、このポインタNでキューの先頭データを指定し、問い合わせ点から最も近いノードに関するデータとしてキューから取り出すとともに、ポインタNで示されるノード内のエントリ番号をeに設定する(ステップS15)。それから、このポインタNで指し示されているノードがデータノードか索引ノードかを判定する(ステップS17)。
【0044】
Nで指し示されているノードがデータノードである場合、データノードは複数ページを占めているため、指し示されているエントリ、すなわちデータオブジェクトに関するページにのみアクセスする。具体的には、Nで指し示されているノード内に格納されているe番目のエントリをEとし、このエントリEであるデータオブジェクトと問い合わせ点との距離を計算して、この計算した値をDとする(ステップS19)。
【0045】
この計算した距離Dを第1リストのk近傍距離と比較し、距離Dが第1リストのk近傍距離以下であるか否かをチェックする(ステップS21)。距離Dが小さい場合には、この計算した距離DとデータオブジェクトEを最近傍の候補として第1リストに格納しソートする(ステップS23)。それから、第1リストによるキューのフィルタリングを行う(ステップS25)。このフィルタリングでは、第1リストに格納されている候補のデータオブジェクトを用いて、キューの中でアクセスする必要のないデータを削除する。
【0046】
それから、キューの先頭データを削除して、キュー内のデータを前詰めし(ステップS27)、以上の処理をキューが空きになるまでループ1として繰り返し行う。
【0047】
また、上記ステップS17の判定において、Nによって示されるノードが索引ノードである場合には、ステップS31に進み、ここでNで示されるノードに格納されているエントリの数をentとして設定するとともに、Nの仮想包囲矩形MBRをRに設定する。それから、Nで示されるノードがリーフノードであるか否かを判定する(ステップS33)。
【0048】
Nで示されるノードがリーフノードでなく、中間ノードまたは根ノードである場合には、図3に示す処理Aが実行され(ステップS35)、リーフノードである場合には、図4に示す処理Bが実行される(ステップS37)。
【0049】
図3に示す処理Aでは、まずパラメータiが0に設定され(ステップS51)、以下に続くステップS53からS65までのループ2で示す処理をパラメータiが前記エントリ数ent以上になるまで繰り返し実行する。ループ2では、まず前記パラメータiを+1インクリメントし(ステップS55)、ノードNにおいてi番目のエントリとして格納されている部分空間符号と親ノードの矩形Rから子ノードのVBR(仮想包囲矩形)Vを計算する(ステップS57)。そして、この計算したVと問い合わせ点との最小距離Dを算出し(ステップS59)、この距離Dを第1、第2リストのk近傍距離と比較し、距離Dが第1リストのk近傍距離以下であり、かつ第2リストのk近傍距離以下であるか否かを判定する(ステップS61)。
【0050】
この判定の結果、距離Dが第1リストのk近傍距離以下であり、かつ第2リストのk近傍距離以下である場合に限り、ノードNのi番目のエントリに格納されている子ポインタ、距離Dをキューに格納する(ステップS63)。以上のループ2の処理をノードに格納されている全エントリに対して行い、ループ2が終了すると、キューの先頭データを削除して、データを前詰めし、キュー内のデータを距離の昇順にソートし(ステップS67)、図3の処理Aから図2に示すステップS39に戻って、ループ1の処理をキューが空きになるまで繰り返し行う。
【0051】
次に、図4に示す処理Bでは、まずパラメータiが0に設定され(ステップS81)、以下に続くステップS83からS101までのループ3で示す処理をパラメータiが前記エントリ数ent以上になるまで繰り返し実行する。ループ3では、まず前記パラメータiを+1インクリメントし(ステップS85)、ノードNにおいてi番目のエントリとして格納している部分空間符号と現ノードの矩形Rから子ノードの相対セルCを計算する(ステップS87)。そして、この計算した相対セルCと問い合わせ点との最小距離Dを算出し(ステップS89)、この距離Dを第1、第2リストのk近傍距離と比較し、距離Dが第1リストのk近傍距離以下であり、かつ第2リストのk近傍距離以下であるか否かを判定する(ステップS90)。
【0052】
この判定の結果、距離Dが第1リストのk近傍距離以下であり、かつ第2リストのk近傍距離以下である場合、ノードNのi番目のエントリに格納されている子ポインタ、エントリ番号i、距離Dをキューに格納しソートする(ステップS91)。
【0053】
次に、前記計算した相対セルCと問い合わせ点との最大距離であるDmaxを計 算する(ステップS93)。この計算した最大距離Dmaxが第2リストのk近傍 距離未満であるか否かを判定し(ステップS95)、最大距離Dmaxが第2リス トのk近傍距離未満である場合には、最大距離Dmaxを第2リストに格納し、ソ ートする(ステップS97)。それから、第2リストを用いて、キューのフィルタリングを行う(ステップS99)。このフィルタリングでは、第2リストに格納されている候補オブジェクトを用いて、キューの中でアクセスする必要のないデータを削除し、これによりキューのデータ量を削減する。以上のループ3の処理をノードに格納されている全エントリに対して行い、ループ2が終了すると、キューの先頭データを削除して、データを前詰めし、キュー内のデータを距離の昇順にソートし(ステップS67)、図4の処理Bから図2に示すステップS39に戻って、ループ1の処理をキューが空きになるまで繰り返し行う。
【0054】
このようにしてループ1の処理をキューが空きになるまで繰り返し実行し、ループ1の処理が終了すると、第1リストに格納されている候補オブジェクトを最終的な近傍オブジェクトとして出力する(ステップS41)。
【0055】
上述した多次元空間データ更新処理および多次元空間データ探索処理は、図5(a)に示すようにCPU1、メモリ3、I/O5、入力手段7、表示手段9、外部記憶手段11からなる計算機のメモリ3または外部記憶手段11に記憶された多次元空間データ更新プログラムおよび多次元空間データ探索プログラムをCPU1で実行することにより達成される。
【0056】
更に詳しくは、図5(a)に示す計算機は、前記多次元空間データ更新プログラムおよび多次元空間データ探索プログラムおよびCPU1によりソフトウェア機能として構成される図5(b)に示すように索引更新処理部21および探索処理部23を有し、索引更新処理部21がメモリ3内に構成される索引記憶部25にアクセスして索引記憶部25の内部に格納されている索引を更新し、また探索処理部23が索引記憶部25にアクセスしながら探索を実施するようになっている。
【0057】
ここで、探索アルゴリズムを例として、図1(a)を用いて説明する。Rの矩形位置とV1とV2の部分空間符号によって、V1とV2を求め、VBRと問い合わせ点との距離を計算し、キューに格納する。V1が枝刈り対象にならなかった場合、同様にM1の位置とV3とV4の部分空間符号によってV3とV4を求め、VBRと問い合わせ点との距離を計算する。計算によって求めた距離をキューに格納する。V3が枝刈り対象にならなかった場合、M3の位置とC1とC2の部分空間符号によって、C1とC2を計算する。計算によって求めた相対セルと問い合わせ点との距離をキューに格納する。また、問い合わせ点とC1間の最大距離、および問い合わせ点とC2間の最大距離は第2リストに格納され、キューのフィルタリングが行われる。そして、C1が枝刈り対象にならなかった場合、P1にアクセスする。
【0058】
次に、本発明の多次元空間データ探索方法による探索時間を調査した実験結果について図6を参照して説明する。この実験における本発明に対する比較対象として既存手法のSR−tree,VA−Fileを用いた。このSR−tree,VA−Fileは、高次元空間探索において優れた手法である。実験条件として、オブジェクトデータは画像の色相ヒストグラムに基づく点データを用い、データ集合サイズは100,000件、探索数は20である。空間次元数は4次元から64次元まで変化させた。ディスクページは8KB(8192byte)を基にした。
【0059】
図6(a)からわかるように、A−treeは、探索コストに関して全次元数においてVA−FileおよびSR−treeよりも優れている。具体的には、100,000件、64次元の場合において、VA−Fileに対して77.7%のディスクアクセスの削減を達成し、またSR−treeに対して77.3%のディスクアクセスの削減を達成している。VR−treeとは同等の性能を示している。
【0060】
また、図6(b)からわかるように、索引の更新コストについては、VR−treeよりもコストを低減している。具体的には、100,000件、64次元の場合において、VR−treeに対して68.2%のディスクアクセスの削減を達成している。
【0061】
なお、上記実施形態の空間探索方法および索引更新方法の処理手順をプログラムとして記録媒体に記録して、この記録媒体をコンピュータシステムに組み込むとともに、該記録媒体に記録されたプログラムをコンピュータシステムにダウンロードまたはインストールし、該プログラムでコンピュータシステムを作動させることにより、空間探索方法および索引更新方法を実施するシステムとして機能させることができることは勿論であり、このような記録媒体を用いることにより、その流通性を高めることができるものである。
【0062】
【発明の効果】
以上説明したように、本発明によれば、高次元空間探索において少ない時間でオブジェクトを検出することが可能となり、高い探索性能を実現することができる。また、データオブジェクトの挿入や削減に伴う索引の更新を低コストで実施することができる。更に、本発明は多次元空間データとして表現することができる画像、映像、音声、文書等を対象とする広範囲な情報検索に適用することが可能である。
【図面の簡単な説明】
【図1】本発明の一実施形態に係る多次元空間データ構造であるA−treeの構造の一例を示す図である。
【図2】本発明の他の実施形態に係る多次元空間データ探索方法の作用を示すフローチャートである。
【図3】図2に示すフローチャートにおけるステップS35の処理Aの手順を示すフローチャートである。
【図4】図2に示すフローチャートにおけるステップS37の処理Bの手順を示すフローチャートである。
【図5】本発明の実施形態である多次元空間データ更新処理および多次元空間データ探索処理を実施するシステム構成を示す図である。
【図6】本発明の多次元空間データ探索方法による探索時間を調査した実験結果を従来技術と比較して示すグラフである。
【図7】従来技術におけるSR−treeの構造を示す図である。
【図8】従来技術における部分空間符号の計算方法を示す図である。
【図9】従来技術におけるVR−treeの構造を示す図である。
【図10】従来技術におけるVR−treeの更新処理を説明するための図である。
【符号の説明】
1 CPU
3 メモリ
11 外部記憶手段
21 索引更新処理部
23 探索処理部
25 探索記憶部
C1,C2 相対セル
M1,M2,M3,M4 MBR(最小包囲矩形)
P1,P2 データオブジェクト
V1,V2,V3,V4 VBR(仮想包囲矩形)
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a search technique for multidimensional spatial data stored in a database, and in particular, a recording medium recording a multidimensional spatial data structure, a multidimensional spatial data update method, a multidimensional spatial data search method, and a program for executing the method The present invention relates to a recording medium that records
[0002]
[Prior art]
Among conventional spatial access methods, R-tree and its derivatives are useful methods for searching a high-dimensional space (hereinafter referred to as R-tree family). The R-tree family includes R-tree, R*There are -tree, Hilbert R-tree, SS-tree, SR-tree, etc., and the data object is a minimum enclosing area, that is, a minimum enclosing rectangle (MBR) or a minimum enclosing sphere (MBS). In addition, it has a hierarchical structure.
[0003]
SR-tree has a tree structure using MBR and MBS as shown in FIG. In the search, the distance between the inquiry point and the MBR and the distance between the inquiry point and the MBS are calculated, and the longer distance is set as the distance between the entry and the inquiry point. By using MBR and MBS for search, the pruning process is made more efficient.
[0004]
There is a VR-tree (Japanese Patent Application No. 2000-8056) as a method using the encoding of MBR position coordinates. The MBR is approximated by a virtual bounding rectangle (VBR), the data object is approximated by a relative cell, and the VBR and the relative cell are expressed by a subspace code.
[0005]
FIG. 8 is a simple illustration of a method for calculating a subspace code. In the i-dimensional coordinates in the n-dimensional space, the surrounding rectangle A occupies (3, 19) as a coordinate value, and the surrounding rectangle B similarly occupies (6, 8) as a coordinate value. At this time, the i-dimensional coordinate range of A is set to 2 using a code of length l.lIs equally divided into partial sections, the starting point of B can be approximately represented by the partial section in which it exists. The same applies to the end point of B. For example, if a region A is divided into eight partial sections using a code having a length of 3, B occupies the second and third partial sections from the beginning counted from the start point of A. Therefore, the region B in i-dimensional coordinates can be expressed approximately as an 8-ary code (1, 2) or a binary code (001, 010). In this case, since the code length required for the binary code is 3 for each of the start point and the end point of B, there are a total of 6 per dimension.
[0006]
In VR-tree, two types of tree structure indexes are constructed. It consists of a real part which is a tree structure using absolute position representation and a virtual part which is a tree structure using relative position expression based on subspace codes. FIG. 9 shows an example of the index structure. In FIG. 9A, the entire space is R. MBR M1 and M2 are included in R, and V1 and V2 approximate M1 and M2 based on R, respectively. V1 and V2 are V1 of M1 in R and VBR of M2 in R, respectively. Similarly, in FIG. 9B, V3 and V4 are V3 of M3 in V1 and VBR of M4 in V1, respectively. Further, as shown in FIG. 9C, the data objects P1 and P2 are included in M3. C1 and C2 approximate P1 and P2 based on V3, respectively. C1 and C2 are P1 relative cells in V3 and P2 relative cells in V3, respectively. The MBR, VBR, data object, and relative cell shown in FIGS. 9A, 9B, and 9C are configured as shown in FIG. MBR and data object are stored in the real part node, and VBR or relative space code of the relative cell is stored in the virtual part node. The virtual part node and the real part node maintain a one-to-one relationship.
[0007]
[Problems to be solved by the invention]
The conventional VR-tree described above has the following problems.
[0008]
When a data object is newly inserted into the index or deleted, an index update process occurs. In VR-tree, it is necessary to update not only the real part but also the virtual part. Therefore, more update costs are generated than in the conventional method. In practical use, there are cases where updates frequently occur, so it is desirable to reduce the update cost.
[0009]
Specifically, the outline of the update process in VR-tree and the reason why a lot of update costs occur will be described. While the MBR correction process in the real part propagates upward, the modification of the subspace code in the virtual part propagates downward. When the MBR or data object is updated in the real part, the corresponding VBR or relative cell code is also updated. Furthermore, it is necessary to access all nodes located under the updated code entry as a vertex and check the subspace code held by the node. And update if necessary. The procedure is as follows.
[0010]
(1) In order to update the code of the VBR corresponding to the updated MBR or the code of the relative cell corresponding to the updated data object, the VBR is calculated from the root node toward the lower node in the virtual part.
[0011]
(2) The code corresponding to the updated MBR or data object is calculated and updated.
[0012]
(3) Access all the nodes in the subtree under the updated entry, check the codes stored in the nodes, and update if necessary.
[0013]
As described in (3), in VR-tree, even if a node that does not require modification of the subspace code is reached, the process does not end, but the process is continuously propagated to the lower nodes, and is transmitted to all nodes in the subtree. to access. This is because the subspace code uses a relative position, so the VBR contains some error, and even if there is no need to update at the current node, it may need to be modified at the lower node. Because there is. The reason for this will be described with reference to FIG. In FIG. 9, rectangles A, B, and C are respectively defined as the entire space, the child node MBR, and the grandchild node MBR. Also, VbIs VBR of B in radix 4 A, and VcRadix 4bIt is assumed that V BR of C in FIG. Assume that only the rectangle A is expanded in the x-axis direction as shown in FIGS. 9A to 9B by inserting the data object. At this time, there is no change in the size of B.bExpands. And for C with no variation in size, VbVBR V of C due to size variation ofcShrinks. In this case, VbThere is no need to modify the subspace code ofcThis subspace code needs to be modified.
[0014]
VR-tree requires additional update costs as described above. If the MBR at the upper level of the tree structure is changed, a particularly high cost is required.
[0015]
The present invention has been made in view of the above, and an object of the present invention is to provide a recording medium on which a multidimensional spatial data structure that can search for an object in a short time and has high search performance is recorded, and a multidimensional spatial data update method Another object of the present invention is to provide a multidimensional spatial data search method and a recording medium on which a program for executing the method is recorded.
[0016]
[Means for Solving the Problems]
  In order to achieve the above object, a recording medium recording the multidimensional spatial data structure of the present invention according to claim 1 is a multidimensional space for organizing multimedia data stored in a database.Recording medium on which data structure is recordedBecauseThe multidimensional spatial data structure includes a root node that stores a virtual enclosing rectangle and a centroid, andLink as a child node to the root nodeStores the virtual enclosing rectangle that approximates the minimum enclosing rectangle, the minimum enclosing rectangle, and the centroid of the underlying data objectAn intermediate node,Linked to this intermediate node as a child node, three types of leaf nodes that store relative cells approximating the data object and a minimum enclosing rectangleAn index node with nodes and,Link to the leaf nodes in a one-to-one relationshipStore data objectsConsists of data nodes andBeThis is the gist.
[0017]
  According to the first aspect of the present invention, a data object is stored in a data node, a relative cell and a minimum enclosing rectangle that approximate the data object are stored in a leaf node, and a virtual enclosing that approximates a minimum enclosing rectangle in an intermediate node Since the multidimensional spatial data structure configured to store the rectangle, the minimum enclosing rectangle, and the center of gravity of the subordinate data object and store the virtual enclosing rectangle and the center of gravity in the root node is recorded on the recording medium, the recording medium make use of,Multidimensional spatial data structure that organizes multimedia data stored in a databaseCan improve the distribution of
[0018]
  Further, the multidimensional spatial data update method of the present invention described in claim 2 is the method described in claim 1.Recorded on a recording mediumMultidimensional spatial data structureA multidimensional spatial data update method in whichThe data object stored in the data nodeOf the data nodeCalculate the subspace code of the relative cell from the minimum enclosing rectangle stored in the parent node, and the minimum enclosing rectangle stored in the index node other than the root node and the minimum enclosing rectangle stored in the parent node of the index node The main point is to calculate the subspace code of the virtual enclosing rectangle from the above.
[0019]
  In the present invention, the subspace code of the relative cell is calculated from the data object stored in the data node and the minimum enclosing rectangle stored in the parent node, and the index node other than the root node is calculated. Calculate the subspace code of the virtual enclosing rectangle from the stored minimum enclosing rectangle and the minimum enclosing rectangle stored in the parent nodeTo update the index associated with data object insertion and reduction at low cost.
[0020]
  Furthermore, the multidimensional spatial data search method of the present invention as set forth in claim 3 is the method according to claim 1.Recorded on a recording mediumMultidimensional spatial data structureA multidimensional spatial data search method in whichIn the root node and the intermediate node, the virtual enclosing rectangle is calculated from the minimum enclosing rectangle and the subspace code, and in the leaf node, the relative cell is calculated from the minimum enclosing rectangle and the subspace code, and the data object is obtained by accessing the data node. The gist.
[0021]
  In the present invention described in claim 3, the root node and the intermediate node calculate a virtual enclosing rectangle from the minimum enclosing rectangle and the subspace code, and the leaf node calculates a relative cell from the minimum enclosing rectangle and the subspace code, Get data object in data node accessThis makes it possible to detect an object in a short time and realize high search performance.
[0022]
  A recording medium on which the multidimensional spatial data update program of the present invention described in claim 4 is recorded comprises:Recorded on a recording mediumMultidimensional spatial data structureA recording medium recording a program for causing a computer to execute the multidimensional spatial data update method in the computer,The data object stored in the data nodeOf the data nodeCalculate the subspace code of the relative cell from the minimum enclosing rectangle stored in the parent node, and the minimum enclosing rectangle stored in the index node other than the root nodeOf the index nodeThe gist is to calculate the subspace code of the virtual enclosing rectangle from the minimum enclosing rectangle stored in the parent node.
[0023]
  In the present invention described in claim 4, the subspace code of the relative cell is calculated from the data object stored in the data node and the minimum enclosing rectangle stored in the parent node, and the index node other than the root node is calculated. Since a data update program for multidimensional spatial data for calculating a subspace code of a virtual enclosing rectangle from the stored minimum enclosing rectangle and the minimum enclosing rectangle stored in the parent node is recorded on the recording medium, the recording medium Using,Multi-dimensional spatial data update program that performs index update at low cost due to insertion and reduction of data objectsCan improve the distribution of
[0024]
  A recording medium on which the multidimensional spatial data search program of the present invention is recorded.Recorded on a recording mediumMultidimensional spatial data structureA recording medium on which a program for causing a computer to execute the multidimensional spatial data search method is recorded,In the root node and the intermediate node, the virtual enclosing rectangle is calculated from the minimum enclosing rectangle and the subspace code, and in the leaf node, the relative cell is calculated from the minimum enclosing rectangle and the subspace code, and the data object is obtained by accessing the data node. The gist.
[0025]
  In the present invention of claim 5, the root and intermediate nodes calculate a virtual enclosing rectangle from the minimum enclosing rectangle and the subspace code, and the leaf node calculates a relative cell from the minimum enclosing rectangle and the subspace code, Since a multidimensional spatial data search program for acquiring a data object in data node access is recorded on a recording medium, the recording medium is used,Multidimensional spatial data search program that detects objects in a short time and realizes high search performanceCan improve the distribution of
[0026]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the present invention, in view of the problems of the VR-tree described above, (1) the update process calculates a subspace code from the parent node's MBR instead of the parent node's VBR, and (2) the search process has few An A-tree (Approximation Tree) improved from VR-tree, which is a new indexing technique having a data structure and algorithm having characteristics of acquiring MBR and subspace code data by page access, has been proposed.
[0027]
In this A-tree, the VBR and relative cell subspace code are calculated relative to the MBR of the upper node. Also, the subspace code and the MBR of the parent node are stored in the same node.
[0028]
FIG. 1 is a diagram showing an example of the structure of this A-tree. In FIG. 1A, the entire space is R. MBR M1 and M2 are included in R, and MBR M3 and M4 are included in M1. Further, the data objects P1 and P2 are included in M3. In this structure, V1, V2, V3, and V4 are M1's VBR in R, M2's VBR in R, M3's VBR in M1, and M4's VBR in M1. C1 and C2 are P1 relative cells in M3 and P2 relative cells in M3, respectively. The MBR, VBR, data object, and relative cell are stored as shown in FIG. 1B, and a tree structure is created.
[0029]
As shown in FIG. 1B, the A-tree nodes can be classified into an index node and a data node. The index nodes other than the root node have one MBR (M) and a VBR (or relative cell) subspace code approximating the MBR (or data object) related to the child node. M is an MBR including the MBR (or data object) stored in the child node. MBR is not stored in the root node. The root node can calculate the VBR of the child node from the entire space. When building an A-tree, the sign of the child's VBR (or relative cell) stored in a node is calculated from the parent's MBR stored in the same node as the child MBR (or data object). . At the root node, the sign of the child VBR is calculated from the child MBR and the entire space.
[0030]
In A-tree, index nodes are classified into leaf nodes, intermediate nodes, and root nodes.
[0031]
1. Data node
Data node is entry, (P1, O1), (P2, O2), ..., (Pm, Om) Is included. Where Pi(I = 1, 2,..., M) is a space vector of the data object, and oi(I = 1, 2,..., M) is a pointer to the object description record. The number of entries m is limited by the maximum value and the minimum value.
[0032]
2. Leaf node
Leaf nodes have a one-to-one relationship with data nodes, and data nodes N ((P1, O1), (P2, O2), ..., (Pm, Om)) And the corresponding leaf node i) P1, P2, ..., PmM, ii) pointer N, iii) list of entries sc (V1), Sc (V2), ..., sc (Vm). Where ViIs P in Mi(I = 1, 2,..., M) relative cell, SC (Vi) Is ViIs a subspace code.
[0033]
3. Intermediate node
The index node excluding the root node and leaf node is an intermediate node, and i) MBR M including the MBR of the child node, ii) entry (ptr, sc (V), w, P)centroid) List. Here, ptr is a pointer to the child node C, V is a VBR approximating the MBR stored in C, w is the total number of data objects in the subtree having C as a vertex, PcentroidIs the centroid of all data objects in the subtree.
[0034]
w and PcentroidIs used when inserting and deleting data objects. Since only M, ptr, and sc (V) are used in the search algorithm, ptr and sc (V) data are stored in the same page in the implementation.
[0035]
4). Root node
The root node is an entry (ptr, sc (V), w, Pcentroid) List.
[0036]
Next, the above-described A-tree update algorithm will be described. The update algorithm for A-tree is based on SR-tree. Starting from the insertion or deletion of the data object, the MBR and centroid adjustment processing at the intermediate node is propagated to the upper node. The difference between A-tree and SR-tree is that the A-tree algorithm requires calculation of VBR and relative cells. Specifically, the A-tree structure is updated as follows.
[0037]
(1) Let N be a data node and M be an MBR of N. At that time, M is stored in the parent node of N. When a data object is inserted or deleted in N, M is adjusted, and the centroids of all data objects stored in N are calculated and updated.
[0038]
(2) If M does not change, the sign of the relative cell approximating the insertion object is calculated from M and updated. Otherwise, update all codes stored in the N parent nodes.
[0039]
(3) Let N be one of the index nodes excluding the root node, and let M be the MBR of N. At that time, M is stored in the parent node of N. When insertion or deletion of a data object occurs in a subtree having N as a vertex, all barycentric points accumulated in N parent nodes are updated. Further, if the insertion or deletion changes the child MBR, M is adjusted.
[0040]
(4) If M does not change, the code of VBR that approximates the updated MBR is calculated from M. And update. Otherwise, it updates the sign of all VBRs stored in the N parent node.
[0041]
Next, a neighborhood search algorithm will be described using the above-described A-tree with reference to the flowchart shown in FIG. This search algorithm is based on VR-tree. The difference is that VR-tree calculates the VBR and relative cell coordinate values from the parent node's VBR, whereas A-tree calculates it from the parent node's MBR.
[0042]
In the search algorithm shown in FIG. 2, a tree structure is searched with width priority. Based on the MBR of the current node and the subspace code of the child node, the VBR of the child node is calculated at the root node and the intermediate node, and the relative cell of the child node is calculated at the leaf node. When the data node is reached, the position information of the object is collected and set as a candidate object.
[0043]
In FIG. 2, first, a root node is set at the head of the queue (step S11), and the processing of loop 1 of steps S13 to S39 is repeatedly executed until the queue becomes empty. In this loop 1, first, the pointer to the node is set to N, the head data of the queue is designated by this pointer N, taken out from the queue as the data related to the node closest to the inquiry point, and in the node indicated by the pointer N The entry number is set to e (step S15). Then, it is determined whether the node indicated by the pointer N is a data node or an index node (step S17).
[0044]
If the node pointed to by N is a data node, the data node occupies multiple pages, so only the entry that is pointed to, ie the page for the data object, is accessed. Specifically, the e-th entry stored in the node pointed to by N is set as E, the distance between the data object that is the entry E and the inquiry point is calculated, and the calculated value is D (step S19).
[0045]
This calculated distance D is compared with the k vicinity distance of the first list, and it is checked whether or not the distance D is equal to or less than the k vicinity distance of the first list (step S21). If the distance D is small, the calculated distance D and the data object E are stored in the first list as the nearest candidate and sorted (step S23). Then, the queue is filtered by the first list (step S25). In this filtering, data that does not need to be accessed in the queue is deleted using candidate data objects stored in the first list.
[0046]
Then, the head data of the queue is deleted, the data in the queue is prepended (step S27), and the above processing is repeated as loop 1 until the queue becomes empty.
[0047]
If the node indicated by N is an index node in the determination at step S17, the process proceeds to step S31, where the number of entries stored in the node indicated by N is set as ent, Set N virtual bounding rectangle MBR to R. Then, it is determined whether or not the node indicated by N is a leaf node (step S33).
[0048]
If the node indicated by N is not a leaf node but an intermediate node or root node, the process A shown in FIG. 3 is executed (step S35), and if it is a leaf node, the process B shown in FIG. Is executed (step S37).
[0049]
In process A shown in FIG. 3, first, parameter i is set to 0 (step S51), and the process shown in loop 2 from step S53 to S65 is repeated until parameter i is equal to or greater than the number of entries ent. . In loop 2, first, the parameter i is incremented by +1 (step S55), and the VBR (virtual enclosing rectangle) V of the child node is obtained from the subspace code stored as the i-th entry in the node N and the parent node rectangle R. Calculate (step S57). Then, the minimum distance D between the calculated V and the inquiry point is calculated (step S59), the distance D is compared with the k neighborhood distances of the first and second lists, and the distance D is the k neighborhood distance of the first list. It is determined whether or not it is less than or equal to the k vicinity distance of the second list (step S61).
[0050]
As a result of this determination, the child pointer and distance stored in the i-th entry of the node N only when the distance D is less than or equal to the k neighborhood distance of the first list and less than or equal to the k neighborhood distance of the second list D is stored in the queue (step S63). The above loop 2 processing is performed on all entries stored in the node, and when loop 2 ends, the head data in the queue is deleted, the data is left-justified, and the data in the queue is sorted in ascending order of distance. Sorting is performed (step S67), the process returns from step A in FIG. 3 to step S39 shown in FIG. 2, and loop 1 is repeated until the queue becomes empty.
[0051]
Next, in the process B shown in FIG. 4, first, the parameter i is set to 0 (step S81), and the process shown in the loop 3 from the steps S83 to S101 that follow is performed until the parameter i reaches the entry number ent or more. Run repeatedly. In loop 3, first, the parameter i is incremented by +1 (step S85), and the relative cell C of the child node is calculated from the subspace code stored as the i-th entry in the node N and the rectangle R of the current node (step S85). S87). Then, the minimum distance D between the calculated relative cell C and the inquiry point is calculated (step S89), and this distance D is compared with the k-neighbor distances in the first and second lists, and the distance D is k in the first list. It is determined whether or not the distance is less than or equal to the neighborhood distance and less than or equal to the distance k near the second list (step S90).
[0052]
If the result of this determination is that the distance D is less than or equal to the k neighborhood distance of the first list and less than or equal to the k neighborhood distance of the second list, the child pointer stored in the i th entry of the node N, entry number i The distance D is stored in the queue and sorted (step S91).
[0053]
Next, Dmax which is the maximum distance between the calculated relative cell C and the inquiry point is calculated (step S93). It is determined whether or not the calculated maximum distance Dmax is less than the k vicinity distance of the second list (step S95). If the maximum distance Dmax is less than the k vicinity distance of the second list, the maximum distance Dmax is determined. Are stored in the second list and sorted (step S97). Then, queue filtering is performed using the second list (step S99). In this filtering, the candidate objects stored in the second list are used to delete data that does not need to be accessed in the queue, thereby reducing the amount of data in the queue. The above loop 3 processing is performed for all entries stored in the node, and when loop 2 ends, the head data in the queue is deleted, the data is left-justified, and the data in the queue is sorted in ascending order of distance. Sorting is performed (step S67), the process returns from step B in FIG. 4 to step S39 shown in FIG. 2, and loop 1 is repeated until the queue becomes empty.
[0054]
In this way, the process of loop 1 is repeatedly executed until the queue becomes empty, and when the process of loop 1 is completed, the candidate objects stored in the first list are output as final neighborhood objects (step S41). .
[0055]
The multidimensional spatial data update process and multidimensional spatial data search process described above are performed by a computer comprising a CPU 1, a memory 3, an I / O 5, an input means 7, a display means 9, and an external storage means 11, as shown in FIG. The CPU 3 executes the multidimensional spatial data update program and the multidimensional spatial data search program stored in the memory 3 or the external storage unit 11.
[0056]
More specifically, the computer shown in FIG. 5A includes an index update processing unit as shown in FIG. 5B configured as a software function by the multidimensional spatial data update program, the multidimensional spatial data search program, and the CPU 1. 21 and the search processing unit 23, the index update processing unit 21 accesses the index storage unit 25 configured in the memory 3, updates the index stored in the index storage unit 25, and performs search processing. The unit 23 performs a search while accessing the index storage unit 25.
[0057]
Here, a search algorithm will be described as an example with reference to FIG. V1 and V2 are obtained from the rectangular position of R and the subspace codes of V1 and V2, and the distance between VBR and the inquiry point is calculated and stored in the queue. When V1 is not a target for pruning, V3 and V4 are similarly obtained from the position of M1 and the subspace codes of V3 and V4, and the distance between VBR and the inquiry point is calculated. The distance obtained by calculation is stored in the queue. When V3 is not a target for pruning, C1 and C2 are calculated based on the position of M3 and the subspace codes of C1 and C2. The distance between the relative cell obtained by calculation and the inquiry point is stored in the queue. The maximum distance between the inquiry point and C1, and the maximum distance between the inquiry point and C2 are stored in the second list, and the queue is filtered. If C1 is not a pruning target, P1 is accessed.
[0058]
Next, the experimental result of investigating the search time by the multidimensional spatial data search method of the present invention will be described with reference to FIG. The SR-tree and VA-File of the existing method were used as comparison targets for the present invention in this experiment. This SR-tree, VA-File is an excellent technique in high-dimensional space search. As experimental conditions, the object data is point data based on the hue histogram of the image, the data set size is 100,000, and the number of searches is 20. The number of spatial dimensions was changed from 4 dimensions to 64 dimensions. The disk page was based on 8KB (8192 bytes).
[0059]
As can be seen from FIG. 6A, A-tree is superior to VA-File and SR-tree in terms of search cost in all dimensions. Specifically, in the case of 100,000 cases and 64 dimensions, a disk access reduction of 77.7% was achieved for VA-File, and 77.3% of disk access was achieved for SR-tree. Reduction has been achieved. VR-tree shows equivalent performance.
[0060]
Further, as can be seen from FIG. 6B, the index update cost is lower than that of VR-tree. Specifically, in the case of 100,000 cases and 64 dimensions, the disk access reduction of 68.2% is achieved with respect to the VR-tree.
[0061]
The processing procedures of the space search method and index update method of the above embodiment are recorded as a program on a recording medium, and the recording medium is incorporated into a computer system, and the program recorded on the recording medium is downloaded to the computer system. Of course, by installing and operating the computer system with the program, it can function as a system for performing the space search method and the index update method. It can be raised.
[0062]
【The invention's effect】
As described above, according to the present invention, an object can be detected in a short time in a high-dimensional space search, and high search performance can be realized. In addition, it is possible to update the index associated with insertion and reduction of data objects at a low cost. Furthermore, the present invention can be applied to a wide range of information retrieval for images, videos, sounds, documents, etc. that can be expressed as multidimensional spatial data.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating an example of a structure of an A-tree that is a multidimensional spatial data structure according to an embodiment of the present invention.
FIG. 2 is a flowchart illustrating an operation of a multidimensional spatial data search method according to another embodiment of the present invention.
FIG. 3 is a flowchart showing a procedure of processing A in step S35 in the flowchart shown in FIG. 2;
4 is a flowchart showing a procedure of a process B in step S37 in the flowchart shown in FIG.
FIG. 5 is a diagram showing a system configuration for performing multidimensional spatial data update processing and multidimensional spatial data search processing according to an embodiment of the present invention.
FIG. 6 is a graph showing an experimental result obtained by investigating a search time according to the multidimensional spatial data search method of the present invention in comparison with the prior art.
FIG. 7 is a diagram showing the structure of SR-tree in the prior art.
FIG. 8 is a diagram illustrating a subspace code calculation method in the prior art.
FIG. 9 is a diagram showing a VR-tree structure in the prior art.
FIG. 10 is a diagram for explaining VR-tree update processing in the prior art;
[Explanation of symbols]
1 CPU
3 memory
11 External storage means
21 Index update processing section
23 Search processing section
25 Search storage unit
C1, C2 relative cell
M1, M2, M3, M4 MBR (minimum enclosure rectangle)
P1, P2 data objects
V1, V2, V3, V4 VBR (virtual enclosing rectangle)

Claims (5)

データベースに格納されるマルチメディアデータを組織する多次元空間データ構造を記録した記録媒体であって、
前記多次元空間データ構造が、
仮想包囲矩形と重心とを格納する根ノードと、この根ノードに対して子ノードとしてリンクし、最小包囲矩形を近似する仮想包囲矩形、最小包囲矩形、および配下のデータオブジェクトの重心とを格納する中間ノードと、この中間ノードに子ノードとしてリンクし、データオブジェクトを近似する相対セルと最小包囲矩形とを格納するリーフノードの3種類のノードを有する索引ノードと
前記リーフノードに1対1の関係でリンクし、データオブジェクトを格納するデータノードと
から構成されることを特徴とする多次元空間データ構造を記録した記録媒体。
A recording medium recording a multidimensional spatial data structure that organizes multimedia data stored in a database,
The multidimensional spatial data structure is
The root node that stores the virtual enclosing rectangle and the center of gravity, and the virtual enclosing rectangle that approximates the minimum enclosing rectangle, the minimum enclosing rectangle, and the center of gravity of the subordinate data object are stored. An index node having three types of nodes : an intermediate node and a leaf node linked to the intermediate node as a child node and storing a relative cell approximating the data object and a minimum enclosing rectangle ;
The link in a one-to-one relationship to the leaf node, recording medium recording a multi-dimensional space data structure, characterized in that it is composed of a data node which stores the data objects.
請求項1記載の記録媒体に記録される多次元空間データ構造における多次元空間データ更新方法であって、
データノードに格納されているデータオブジェクトと当該データノードの親ノードに格納されている最小包囲矩形から相対セルの部分空間符号を計算し、根ノード以外の索引ノードに格納されている最小包囲矩形と当該索引ノードの親ノードに格納されている最小包囲矩形から仮想包囲矩形の部分空間符号を計算することを特徴とする多次元空間データ更新方法。
A multi-dimensional spatial data update method definitive multidimensional spatial data structure recorded on a recording medium according to claim 1,
Calculate the subspace code of the relative cell from the data object stored in the data node and the minimum enclosing rectangle stored in the parent node of the data node, and the minimum enclosing rectangle stored in the index node other than the root node A multidimensional spatial data update method, comprising: calculating a subspace code of a virtual enclosing rectangle from a minimum enclosing rectangle stored in a parent node of the index node .
請求項1記載の記録媒体に記録される多次元空間データ構造における多次元空間データ探索方法であって、
根ノードおよび中間ノードでは最小包囲矩形と部分空間符号から仮想包囲矩形を計算し、リーフノードでは最小包囲矩形と部分空間符号から相対セルを計算し、データノードのアクセスにおいてデータオブジェクトを取得することを特徴とする多次元空間データ探索方法。
A multi-dimensional space data search method definitive multidimensional spatial data structure recorded on a recording medium according to claim 1,
In the root node and the intermediate node, the virtual enclosing rectangle is calculated from the minimum enclosing rectangle and the subspace code, and in the leaf node, the relative cell is calculated from the minimum enclosing rectangle and the subspace code, and the data object is obtained by accessing the data node. A characteristic multidimensional spatial data search method.
請求項1記載の記録媒体に記録される多次元空間データ構造における多次元空間データ更新方法をコンピュータに実行させるプログラムを記録した記録媒体であって、
データノードに格納されているデータオブジェクトと当該データノードの親ノードに格納されている最小包囲矩形から相対セルの部分空間符号を計算し、根ノード以外の索引ノードに格納されている最小包囲矩形と当該索引ノードの親ノードに格納されている最小包囲矩形から仮想包囲矩形の部分空間符号を計算することを特徴とする多次元空間データ更新プログラムを記録した記録媒体。
A recording medium recording a program for executing a multi-dimensional space data updating method definitive multidimensional spatial data structure recorded on a recording medium according to claim 1, wherein the computer,
Calculate the subspace code of the relative cell from the data object stored in the data node and the minimum enclosing rectangle stored in the parent node of the data node, and the minimum enclosing rectangle stored in the index node other than the root node A recording medium on which a multidimensional spatial data update program is recorded, wherein a subspace code of a virtual enclosing rectangle is calculated from a minimum enclosing rectangle stored in a parent node of the index node .
請求項1記載の記録媒体に記録される多次元空間データ構造における多次元空間データ探索方法をコンピュータに実行させるプログラムを記録した記録媒体であって、
根ノードおよび中間ノードでは最小包囲矩形と部分空間符号から仮想包囲矩形を計算し、リーフノードでは最小包囲矩形と部分空間符号から相対セルを計算し、データノードのアクセスにおいてデータオブジェクトを取得することを特徴とする多次元空間データ探索プログラムを記録した記録媒体。
A recording medium recording a program for executing a multi-dimensional space data search method definitive multidimensional spatial data structure recorded on a recording medium according to claim 1, wherein the computer,
In the root node and the intermediate node, the virtual enclosing rectangle is calculated from the minimum enclosing rectangle and the subspace code, and in the leaf node, the relative cell is calculated from the minimum enclosing rectangle and the subspace code, and the data object is obtained by accessing the data node. A recording medium on which a characteristic multidimensional spatial data search program is recorded.
JP2000261508A 2000-08-30 2000-08-30 Recording medium on which multidimensional spatial data structure is recorded, multidimensional spatial data update method, multidimensional spatial data search method, and recording medium on which program for executing the method is recorded Expired - Lifetime JP3708809B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000261508A JP3708809B2 (en) 2000-08-30 2000-08-30 Recording medium on which multidimensional spatial data structure is recorded, multidimensional spatial data update method, multidimensional spatial data search method, and recording medium on which program for executing the method is recorded

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000261508A JP3708809B2 (en) 2000-08-30 2000-08-30 Recording medium on which multidimensional spatial data structure is recorded, multidimensional spatial data update method, multidimensional spatial data search method, and recording medium on which program for executing the method is recorded

Publications (2)

Publication Number Publication Date
JP2002073390A JP2002073390A (en) 2002-03-12
JP3708809B2 true JP3708809B2 (en) 2005-10-19

Family

ID=18749337

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000261508A Expired - Lifetime JP3708809B2 (en) 2000-08-30 2000-08-30 Recording medium on which multidimensional spatial data structure is recorded, multidimensional spatial data update method, multidimensional spatial data search method, and recording medium on which program for executing the method is recorded

Country Status (1)

Country Link
JP (1) JP3708809B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008504737A (en) * 2004-06-23 2008-02-14 クゥアルコム・インコーポレイテッド Efficient classification of network packets
JPWO2006059629A1 (en) * 2004-11-30 2008-06-05 ヒューレット−パッカード デベロップメント カンパニー エル.ピー. Area information management device/method/program
JP5333815B2 (en) * 2008-02-19 2013-11-06 株式会社日立製作所 k nearest neighbor search method, k nearest neighbor search program, and k nearest neighbor search device
JP5678790B2 (en) * 2011-05-02 2015-03-04 富士通株式会社 Index management method, index management program, and index management apparatus

Also Published As

Publication number Publication date
JP2002073390A (en) 2002-03-12

Similar Documents

Publication Publication Date Title
US8161004B2 (en) XML sub-document versioning method in XML databases using record storages
US5664179A (en) Modified skip list database structure and method for access
US10102253B2 (en) Minimizing index maintenance costs for database storage regions using hybrid zone maps and indices
KR100656528B1 (en) Dynamic Update Cube and Hybrid Queries Search Method for Range-Sum Queries
US7272607B2 (en) System and method for processing a hierarchical data tree
JP6183376B2 (en) Index generation apparatus and method, search apparatus, and search method
US20010042059A1 (en) Inventory managing method for automatic inventory retrieval and apparatus thereof
CN109522271B (en) Batch insertion and deletion method and device for B + tree nodes
JP2008225575A (en) Computer load estimation system and method
Yang et al. Pase: Postgresql ultra-high-dimensional approximate nearest neighbor search extension
CN112395288B (en) R-tree index merging and updating method, device and medium based on Hilbert curve
GB2381895A (en) Retrieval system using distance index
JP3708809B2 (en) Recording medium on which multidimensional spatial data structure is recorded, multidimensional spatial data update method, multidimensional spatial data search method, and recording medium on which program for executing the method is recorded
JP5790755B2 (en) Database management apparatus and database management method
CN117131050B (en) Spatial index method based on magnetic disk and oriented to workload and query sensitivity
KR100924370B1 (en) Method and Apparatus of continuous skyline queries using cell state and Recording medium using this
KR100859710B1 (en) The method for searching, saving, deleting data using of data structures, SKIP CLOUDS
KR100667741B1 (en) Indexing method of feature vector data space
Mediano et al. V-Trees-A Storage Method for Long Vector Data
JPH06215037A (en) Automatic updating device for index
JP3542732B2 (en) Multidimensional spatial data structure, method for updating and searching for multidimensional spatial data, recording medium recording the multidimensional spatial data structure, and recording medium recording a program for implementing the method
JP2001195425A (en) Recording medium with multidimensional spatial data structure recorded thereon, methods for searching for and updating multidimensional spatial data and recording medium with program performing methods recorded thereon
JP6273892B2 (en) Data search device, program, and data search system
JP2000357168A (en) Method for generating minimum bounding area of multidimensional space retrieval, method for minimum bounding sphere encoding, structure, updating method, and searching method for multidimensional space data, and program implementing the methods
KR100902010B1 (en) Effcient similarity search method for content based multimedia retrieval with relevance feedback

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050425

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050524

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050711

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: 20050802

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050804

R150 Certificate of patent or registration of utility model

Ref document number: 3708809

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20080812

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090812

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090812

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100812

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100812

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110812

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120812

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130812

Year of fee payment: 8

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

EXPY Cancellation because of completion of term