JP2015018497A - Multidimensional range retrieval device and multidimensional range retrieval method - Google Patents

Multidimensional range retrieval device and multidimensional range retrieval method Download PDF

Info

Publication number
JP2015018497A
JP2015018497A JP2013146656A JP2013146656A JP2015018497A JP 2015018497 A JP2015018497 A JP 2015018497A JP 2013146656 A JP2013146656 A JP 2013146656A JP 2013146656 A JP2013146656 A JP 2013146656A JP 2015018497 A JP2015018497 A JP 2015018497A
Authority
JP
Japan
Prior art keywords
prefix
bit
index key
bit string
section
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.)
Granted
Application number
JP2013146656A
Other languages
Japanese (ja)
Other versions
JP6155920B2 (en
Inventor
祥治 西村
Yoshiharu Nishimura
祥治 西村
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 JP2013146656A priority Critical patent/JP6155920B2/en
Publication of JP2015018497A publication Critical patent/JP2015018497A/en
Application granted granted Critical
Publication of JP6155920B2 publication Critical patent/JP6155920B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To increase the detection speed of a hit page at a time of multidimensional range retrieval.SOLUTION: A multidimensional range retrieval device includes: an acquisition unit for acquiring a starting end index key and a termination end index key representing the minimum point and the maximum point of a specific section on a space-filling curve; an extraction unit for extracting prefix data that can represent bit strings of index keys included in the specific section on the basis of each bit string of the starting end index key and the termination end index key; and a determination unit for determining overlap between a prefix section on the space-filling curve formed by the aggregation of index keys commonly having a prefix of prefix data extracted by the extraction unit and an inquiry section of multidimensional range retrieval.

Description

本発明は、多次元範囲検索におけるインデックス走査技術に関する。   The present invention relates to an index scanning technique in multidimensional range search.

データベースに対する或る範囲内のレコードを抽出する範囲検索は、基本的な問い合わせ処理の一つである。この範囲検索を効率的に実行するために、多くのインデックス構造が提案されている。Bツリーは、一次元の範囲検索に適したインデックス構造として知られている。Bツリーは、インデックスの値の範囲でレコード集合(データセット)を分割して、分割されたレコード集合を各ページに分散配置し、各ページによりカバーされるレコード範囲の起点又は終点を木構造で管理する。Bツリーによれば、或る範囲内のレコードが格納されているページを効率的に取得することができる。   Range search for extracting records within a certain range to the database is one of basic inquiry processes. Many index structures have been proposed to efficiently perform this range search. The B-tree is known as an index structure suitable for a one-dimensional range search. A B-tree divides a record set (data set) by the range of index values, distributes the divided record sets on each page, and uses a tree structure for the start or end of the record range covered by each page. to manage. According to the B-tree, pages in which records within a certain range are stored can be efficiently acquired.

Bツリーを拡張し、複数次元の範囲検索を効率的に実行するための多次元インデックス構造の一つとして、U(Universal)Bツリーが知られている。UBツリーは、空間充填曲線であるZカーブ(Z曲線)を用いて、多次元空間上の点を一次元上に写像し、その写像された点をインデックスキーとして、Bツリーに格納する手法である。多次元空間上の点を一次元上の点に写像するため、多次元空間上で連続する多次元の矩形領域は、一次元上では区間の集合として表現される。このため、多次元範囲検索は、Bツリー上の(一次元)範囲検索の集合として表現される。   A U (Universal) B-tree is known as one of multi-dimensional index structures for expanding a B-tree and efficiently executing a multi-dimensional range search. The UB tree is a method of mapping a point in a multidimensional space to one dimension using a Z curve (Z curve) which is a space filling curve, and storing the mapped point in the B tree as an index key. is there. In order to map a point in the multidimensional space to a point in the one dimensional space, a multidimensional rectangular region that is continuous in the multidimensional space is represented as a set of sections on the one dimension. For this reason, the multidimensional range search is expressed as a set of (one-dimensional) range searches on the B-tree.

しかしながら、単純に多次元範囲検索を一次元の範囲検索の集合に分解すると、一次元の範囲検索の数が膨大に膨れ上がることが知られている。そこで、下記非特許文献1は、多次元範囲検索を分解するのではなく、与えられた多次元範囲内にあるレコードが含まれているページ(以下、ヒットページと表記する)を効率的に見つけるアルゴリズムを提案している。   However, it is known that the number of one-dimensional range searches increases enormously when a multidimensional range search is simply decomposed into a set of one-dimensional range searches. Therefore, Non-Patent Document 1 below efficiently finds a page (hereinafter referred to as a hit page) that includes a record within a given multidimensional range, instead of decomposing the multidimensional range search. An algorithm is proposed.

下記非特許文献1は、ページがカバーする領域と検索範囲の重なり検査を効率的にするために、Zカーブのビット表現におけるビットパターンとZカーブの多次元空間におけるフラクタル形状との関係性を利用したアルゴリズムを提案している(下記非特許文献1の図11参照)。Zカーブは、各属性のビット列を交互に混ぜ合わせることでインデックスキーを生成する。下記非特許文献1の手法は、属性数がnの場合、Zカーブで生成されたビット列をnビットずつに区切る。nビット長の部分ビット列は、多次元空間上の超立方体に対応付けることができ、部分ビット列の区切り位置(何番目の区切りか)が、多次元空間上でのスケールを表し、その部分ビット列までのビットパターンが多次元空間上の位置を表す。   Non-Patent Document 1 below uses the relationship between the bit pattern in the Z-curve bit representation and the fractal shape in the multi-dimensional space of the Z curve in order to efficiently check the overlap of the area covered by the page and the search range. (See FIG. 11 of Non-Patent Document 1 below). The Z curve generates an index key by alternately mixing bit strings of respective attributes. In the method of Non-Patent Document 1 below, when the number of attributes is n, the bit string generated by the Z curve is divided into n bits. An n-bit-long partial bit string can be associated with a hypercube in a multidimensional space, and the position of the partial bit string (the number of delimiters) represents the scale in the multidimensional space. A bit pattern represents a position in a multidimensional space.

下記非特許文献1の手法は、Zカーブのこの性質を利用して、以下のようにして、ページがカバーする領域を超直方体の集合に分解する。ページの区間の開始点をα、終了点をβとする。まず、当該手法は、α及びβを含む最小の超立方体を見つける。当該手法は、α及びβをnビットずつ区切り、最上位側から最下位側の方向の順で、区切られた各部分ビット列が一致しているかどうかを検査する。この検査は、一致していない部分ビット列が見つかるまで繰り返される。ここで、j番目の区切り位置の部分ビット列が一致していないと仮定する。次に、当該手法は、上述のように見つけた超立方体内で、ページの区間に対応する領域と完全に重なる超直方体の集合を見つける。α及びβのi番目の区切りの長さnのビット列をα[i]及びβ[i]とする。α及びβそれぞれに関して、j番目の区切りから最後の区切りまでの各ビットパターンを観察し、各i番目の超立方体の中でページの区間に含まれる最大の超直方体を見つける。   The method of Non-Patent Document 1 below uses this property of the Z curve to decompose the area covered by the page into a set of super rectangular parallelepipeds as follows. The start point of the page section is α, and the end point is β. First, the technique finds the smallest hypercube containing α and β. In this method, α and β are separated by n bits, and it is checked whether or not the divided partial bit strings match in the order from the most significant side to the least significant side. This check is repeated until a partial bit string that does not match is found. Here, it is assumed that the partial bit strings at the j-th delimiter position do not match. Next, the method finds a set of super rectangular parallelepipeds that completely overlaps the area corresponding to the page section in the hyper cube found as described above. Let α [i] and β [i] be a bit string of length n in the i-th segment of α and β. For each of α and β, each bit pattern from the j-th segment to the last segment is observed, and the largest hypercube included in the page section is found in each i-th hypercube.

Tomas Skopal, etc., "A new range query algorithm for Universal B-trees", 2006/9, Figs.3 and 11, Algorithm 5 and 6, http://www.sciencedirect.com/science/article/pii/S0306437905000116Tomas Skopal, etc., "A new range query algorithm for Universal B-trees", 2006/9, Figs. 3 and 11, Algorithm 5 and 6, http://www.sciencedirect.com/science/article/pii/ S0306437905000116

上述の手法は、単純な空間充填曲線であるZカーブにしか適用できないという制約を持つ。これにより、インデックス設計の範囲が制約される。例えば、上述の手法は、各属性のビット長が異なっており、短いビット長の属性のビット列に対するゼロパディングを行うことなく、各属性のビット列を混合する空間充填曲線や、ビット列の混ぜ合わせ順に自由度がある空間充填曲線を用いることができない。属性数と同じビット長でインデックスキーが区切られてなる部分ビット列と、単純なZカーブのフラクタル形状との対応関係に基づいてアルゴリズムが設計されているからである。   The above-described method has a limitation that it can be applied only to a Z curve which is a simple space filling curve. This limits the range of index design. For example, the bit length of each attribute is different in the above-mentioned method, and the space filling curve that mixes the bit strings of each attribute or the bit string mixing order can be freely performed without performing zero padding for the bit string of the short bit length attribute. A space filling curve with a degree cannot be used. This is because the algorithm is designed based on the correspondence between the partial bit string in which the index key is divided by the same bit length as the number of attributes and the simple fractal shape of the Z curve.

これにより、範囲検索の指定内容やインデックス対象のデータセットの分布に応じたインデックス設計を行うことができないため、上述の手法では、範囲検索処理の効率を低下させてしまう可能性がある。   As a result, the index design according to the specified contents of the range search and the distribution of the data set to be indexed cannot be performed, and the above-described method may reduce the efficiency of the range search process.

本発明は、上述のような課題に鑑みてなされたものであり、多次元範囲検索時のヒットページの検出を高速化する技術を提供する。   The present invention has been made in view of the above-described problems, and provides a technique for speeding up the detection of hit pages during multidimensional range search.

本発明の各側面では、上述した課題を解決するために、それぞれ以下の構成を採用する。   Each aspect of the present invention employs the following configurations in order to solve the above-described problems.

第1の側面は、多次元範囲検索装置に関する。第1の側面に係る多次元範囲検索装置は、複数の属性からなるデータセットがマッピングされる多次元空間の一次元化に用いられる空間充填曲線上の特定区間の最小点及び最大点を表す始端インデックスキー及び終端インデックスキーを取得する取得部と、取得部により取得された始端インデックスキー及び終端インデックスキーの各ビット列に基づいて、上記特定区間に含まれるインデックスキーのビット列を表し得るプレフィックスデータを抽出する抽出部と、抽出部により抽出されたプレフィックスデータのプレフィックスを共通して有するインデックスキーの集合により形成される空間充填曲線上のプレフィックス区間と多次元範囲検索の問い合わせ区間との重複を判定する判定部とを有する。第1の側面で用いられる上記空間充填曲線は、プレフィックスデータと、プレフィックスデータにより示されるプレフィックスを共通して有する点の集合からなるプレフィックス区間とが一対一に対応し、プレフィックスデータのプレフィックスの長さとプレフィックス区間の大きさとが負の相関を持つ特性を有する。   The first aspect relates to a multidimensional range search device. A multidimensional range search apparatus according to a first aspect is a starting point representing a minimum point and a maximum point of a specific section on a space filling curve used for one-dimensionalization of a multidimensional space to which a data set having a plurality of attributes is mapped. An acquisition unit that acquires an index key and an end index key, and prefix data that can represent a bit string of an index key included in the specific section is extracted based on each bit string of the start index key and the end index key acquired by the acquisition unit To determine the overlap between the prefix section on the space-filling curve formed by a set of index keys having a common prefix of the prefix data extracted by the extraction section and the prefix data extracted by the extraction section and the query section of the multidimensional range search Part. The space filling curve used in the first aspect has a one-to-one correspondence between prefix data and a prefix section composed of a set of points having the prefix indicated by the prefix data in common, and the prefix length of the prefix data The prefix section has a negative correlation with the size of the prefix section.

第2の側面は、上記第1の側面と同様の特性を持つ空間充填曲線を用いる多次元範囲検索方法に関する。第2の側面に係る多次元範囲検索方法は、複数の属性からなるデータセットがマッピングされる多次元空間の一次元化に用いられる空間充填曲線上の特定区間の最小点及び最大点を表す始端インデックスキー及び終端インデックスキーを取得し、取得された始端インデックスキー及び終端インデックスキーの各ビット列に基づいて、上記特定区間に含まれるインデックスキーのビット列を表し得るプレフィックスデータを抽出し、抽出されたプレフィックスデータのプレフィックスを共通して有するインデックスキーの集合により形成される空間充填曲線上のプレフィックス区間と多次元範囲検索の問い合わせ区間との重複を判定することを含む。   The second aspect relates to a multidimensional range search method using a space filling curve having the same characteristics as the first aspect. The multidimensional range search method according to the second aspect includes a starting point representing a minimum point and a maximum point of a specific section on a space filling curve used for one-dimensionalization of a multidimensional space to which a data set having a plurality of attributes is mapped. An index key and an end index key are acquired, and based on the acquired start end index key and end index key bit string, prefix data that can represent a bit string of the index key included in the specific section is extracted, and the extracted prefix And determining whether a prefix section on a space filling curve formed by a set of index keys having a common data prefix and an inquiry section of a multidimensional range search are overlapped.

なお、本発明の他の側面としては、上記第2の側面の方法を少なくとも1つのコンピュータに実行させるプログラムであってもよいし、このようなプログラムを記録したコンピュータが読み取り可能な記録媒体であってもよい。この記録媒体は、非一時的な有形の媒体を含む。   Another aspect of the present invention may be a program that causes at least one computer to execute the method of the second aspect, or a computer-readable recording medium that records such a program. May be. This recording medium includes a non-transitory tangible medium.

上記各側面によれば、多次元範囲検索時のヒットページの検出を高速化する技術を提供することができる。   According to each aspect described above, it is possible to provide a technique for speeding up the detection of hit pages during multidimensional range search.

本発明の実施形態における多次元範囲検索装置(検索装置)のハードウェア構成例を概念的に示す図である。It is a figure which shows notionally the hardware structural example of the multidimensional range search device (search device) in embodiment of this invention. 第1実施形態における多次元範囲検索装置(検索装置)の処理構成例を概念的に示す図である。It is a figure which shows notionally the process structural example of the multidimensional range search device (search device) in 1st Embodiment. インデックス格納部の例を示す図である。It is a figure which shows the example of an index storage part. 上述の実施形態における多次元範囲検索装置(検索装置)の動作例を示すフローチャートである。It is a flowchart which shows the operation example of the multidimensional range search apparatus (search apparatus) in the above-mentioned embodiment. 実施例で利用される空間充填曲線及びプレフィックス区間を示す図である。It is a figure which shows the space filling curve and prefix area | region utilized in an Example. 実施例で用いられる空間充填曲線及インデックスキーを示す図である。It is a figure which shows the space filling curve and index key which are used in an Example. 実施例における特定区間に含まれるプレフィックスデータの抽出を概念的に示す図である。It is a figure which shows notionally the extraction of the prefix data contained in the specific area in an Example. 問い合わせ区間とプレフィックス区間との重複判定を概念的に示す図である。It is a figure which shows notionally the duplication determination of an inquiry area and a prefix area.

以下、本発明の実施の形態について説明する。なお、以下に挙げる実施形態は例示であり、本発明は以下の実施形態の構成に限定されない。   Embodiments of the present invention will be described below. In addition, embodiment mentioned below is an illustration and this invention is not limited to the structure of the following embodiment.

以下に挙げる本発明の実施の形態における多次元範囲検索装置は、多次元範囲検索のクエリを取得し、このクエリの問い合わせ区間(検索空間)と或る区間(特定区間)との重複を判定する。ここで、多次元範囲検索とは、複数の属性が条件に指定された範囲検索であり、指定される属性の数は複数であれば特に制限されない。   The multidimensional range search apparatus according to the embodiment of the present invention described below acquires a multidimensional range search query, and determines an overlap between a query section (search space) of this query and a certain section (specific section). . Here, the multidimensional range search is a range search in which a plurality of attributes are specified as conditions, and the number of specified attributes is not particularly limited as long as the number is specified.

〔装置構成〕
図1は、本発明の実施形態における多次元範囲検索装置(以降、単に検索装置と表記する)10のハードウェア構成例を概念的に示す図である。本実施形態における検索装置10は、いわゆるコンピュータであり、例えば、バス5で相互に接続される、CPU(Central Processing Unit)2、メモリ3、入出力インタフェース(I/F)4等を有する。メモリ3は、RAM(Random Access Memory)、ROM(Read Only Memory)、ハードディスク等である。
〔Device configuration〕
FIG. 1 is a diagram conceptually illustrating a hardware configuration example of a multidimensional range search apparatus (hereinafter simply referred to as a search apparatus) 10 according to an embodiment of the present invention. The search device 10 according to the present embodiment is a so-called computer, and includes, for example, a CPU (Central Processing Unit) 2, a memory 3, an input / output interface (I / F) 4, and the like that are connected to each other via a bus 5. The memory 3 is a RAM (Random Access Memory), a ROM (Read Only Memory), a hard disk, or the like.

入出力I/F4は、ネットワーク(図示せず)を介して他のコンピュータと通信を行う通信装置、可搬型記録媒体に対するアクセスを制御する装置、キーボード、マウス等のようなユーザ操作の入力を受け付ける入力装置、ディスプレイ装置やプリンタ等のようなユーザに情報を提供する出力装置等と接続可能である。但し、検索装置10のハードウェア構成は制限されない。   The input / output I / F 4 receives input of user operations such as a communication device that communicates with another computer via a network (not shown), a device that controls access to a portable recording medium, a keyboard, a mouse, and the like. It can be connected to an input device, an output device that provides information to the user, such as a display device or a printer. However, the hardware configuration of the search device 10 is not limited.

〔処理構成〕
図2は、第1実施形態における検索装置10の処理構成例を概念的に示す図である。第1実施形態における検索装置10は、取得部11、抽出部12、判定部13等を有する。これら各処理部は、例えば、CPU2によりメモリ3に格納されるプログラムが実行されることにより実現される。また、当該プログラムは、例えば、CD(Compact Disc)、メモリカード等のような可搬型記録媒体やネットワーク上の他のコンピュータから入出力I/F4を介してインストールされ、メモリ3に格納されてもよい。
[Processing configuration]
FIG. 2 is a diagram conceptually illustrating a processing configuration example of the search device 10 in the first embodiment. The search device 10 according to the first embodiment includes an acquisition unit 11, an extraction unit 12, a determination unit 13, and the like. Each of these processing units is realized, for example, by executing a program stored in the memory 3 by the CPU 2. Further, the program may be installed from a portable recording medium such as a CD (Compact Disc) or a memory card or another computer on the network via the input / output I / F 4 and stored in the memory 3. Good.

検索装置10で検索対象とされる、複数の属性からなるデータセットは、空間ベースの空間分割法により、各部分空間に含まれるデータ数が閾値以下となるまで空間的に分割され、分割されたデータセットが各部分空間と関連付けられたデータページへ分散配置されている。一方、当該データセットがマッピングされる多次元空間の各データ点は、当該多次元空間が空間充填曲線で一元化されることで生成される各多次元インデックスキー(以降、単に、インデックスキーと表記する)により索引付けされている。   A data set including a plurality of attributes to be searched by the search device 10 is spatially divided and divided by a space-based space division method until the number of data included in each partial space is equal to or less than a threshold value. Data sets are distributed over the data pages associated with each subspace. On the other hand, each data point of the multidimensional space to which the data set is mapped is represented by each multidimensional index key (hereinafter simply referred to as an index key) generated by unifying the multidimensional space with a space filling curve. ).

このようなインデックスキーとデータページとのマッピング情報は、図示されていないインデックス格納部に格納される。
図3は、インデックス格納部の例を示す図である。図3に示されるように、インデックス格納部は、インデックスデータ及びページ情報をそれぞれ含む複数のエントリを格納する。インデックス格納部は、検索装置10により実現されてもよいし、他の装置により実現されてもよい。
Such mapping information between the index key and the data page is stored in an index storage unit (not shown).
FIG. 3 is a diagram illustrating an example of the index storage unit. As shown in FIG. 3, the index storage unit stores a plurality of entries each including index data and page information. The index storage unit may be realized by the search device 10 or may be realized by another device.

インデックス格納部に格納されるインデックスデータは、上記多次元空間の或る部分空間の位置及び範囲を特定し得るデータ形式を持ち、対応する部分空間に含まれるインデックスキーの最長共通プレフィックスとワイルドカード文字との組み合わせで形成される。なお、対応する部分空間に含まれるインデックスキーが1つの場合、その部分空間を示すインデックスデータは、そのインデックスキーそのものとなる。インデックス格納部に格納されるページ情報は、同じエントリに含まれるインデックスデータにより示される部分空間と関連付けられたデータページの所在位置を示す。データページ自体は、検索装置に保持されてもよいし、他の装置に保持されていてもよい。   The index data stored in the index storage unit has a data format that can specify the position and range of a certain subspace of the multidimensional space, and the longest common prefix and wildcard character of the index key included in the corresponding subspace And in combination. When there is one index key included in the corresponding partial space, the index data indicating the partial space is the index key itself. The page information stored in the index storage unit indicates the location of the data page associated with the partial space indicated by the index data included in the same entry. The data page itself may be held in the search device or may be held in another device.

インデックス格納部に格納されるエントリは、図3に示されるように、インデックスデータの名前順にソートされている。即ち、インデックス格納部では、ページ情報は、インデックスデータの名前順にソートされている。また、インデックス格納部は、Bツリーのような周知の木構造で各エントリを格納してもよい。   The entries stored in the index storage unit are sorted in the order of the names of the index data as shown in FIG. That is, in the index storage unit, the page information is sorted in the order of the name of the index data. The index storage unit may store each entry with a well-known tree structure such as a B-tree.

本実施形態において、上記多次元空間の一次元化に用いられる空間充填曲線には、Z曲線、ヒルベルト曲線等のような周知の固定化されたものが利用されてもよいし、より汎用化されたものが利用されてもよい。汎用化された空間充填曲線は、例えば、各属性のビット列の並び順を変えず、各属性のビット列同士を任意の順序で混合することで、多次元空間を一次元化する。本実施形態で用いられる空間充填曲線は、プレフィックスデータと、そのプレフィックスデータのプレフィックスを共通して有するインデックスキーの集合により形成されるプレフィックス区間とが一対一に対応し、プレフィックスデータのプレフィックスの長さとプレフィックス区間の大きさとが負の相関を持つ特性を有するものであればよい。プレフィックスデータの説明は後述する。   In the present embodiment, a well-known fixed curve such as a Z curve, a Hilbert curve, or the like may be used as the space filling curve used for the one-dimensionalization of the multi-dimensional space, or a more generalized curve. May be used. For example, the generalized space filling curve makes the multidimensional space one-dimensional by mixing the bit strings of the respective attributes in an arbitrary order without changing the arrangement order of the bit strings of the respective attributes. The space-filling curve used in the present embodiment has a one-to-one correspondence between prefix data and a prefix section formed by a set of index keys having the prefix of the prefix data in common, and the prefix data prefix length and What is necessary is just to have the characteristic in which the magnitude | size of a prefix area has a negative correlation. The description of the prefix data will be described later.

取得部11は、上記多次元空間の一次元化に用いられる上記空間充填曲線上の特定区間の最小点及び最大点を表す始端インデックスキー及び終端インデックスキーを取得する。特定区間は、例えば、或るデータページに対応する当該空間充填曲線上の区間に設定される。このデータページは、インデックス格納部に格納されるページ情報で示される。この場合、始端インデックスキーは、そのデータページに対応するインデックスデータのワイルドカード文字を0に置き換えたものであり、かつ、当該特定区間の最小値である。終端インデックスキーは、そのインデックスデータのワイルドカード文字を1に置き換えたものであり、かつ、当該特定区間の最大値である。但し、当該特定区間は、データページに制限されず、任意の区間に設定されることもできる。   The acquisition unit 11 acquires a start index key and an end index key representing the minimum and maximum points of a specific section on the space filling curve used for one-dimensionalization of the multidimensional space. The specific section is set to a section on the space filling curve corresponding to a certain data page, for example. This data page is indicated by page information stored in the index storage unit. In this case, the start index key is obtained by replacing the wildcard character of the index data corresponding to the data page with 0, and is the minimum value of the specific section. The end index key is obtained by replacing the wildcard character of the index data with 1, and is the maximum value of the specific section. However, the specific section is not limited to the data page, and can be set to an arbitrary section.

取得部11は、始端インデックスキー及び終端インデックスキーを、可搬型記録媒体、他のコンピュータ等から入出力I/F4を経由して取得してもよいし、入力画面等に基づいて入力部をユーザが操作することにより入力された情報として取得してもよい。始端インデックスキー及び終端インデックスキーの取得方法は制限されない。   The acquisition unit 11 may acquire the start index key and the end index key from a portable recording medium, another computer, or the like via the input / output I / F 4, and the input unit may be used based on an input screen or the like. May be acquired as information input by operating. The method for obtaining the start index key and the end index key is not limited.

抽出部12は、取得部11により取得された始端インデックスキー及び終端インデックスキーの各ビット列に基づいて、当該特定区間に含まれるインデックスキーのビット列を表し得るプレフィックスデータを抽出する。プレフィックスデータとは、固定ビット長のビット列であり、プレフィックスのみから形成されるビット列、又は、プレフィックスと少なくとも1つのワイルドカード文字とから形成されるビット列である。プレフィックスとは、プレフィックスデータが表す空間充填曲線上の区間に含まれるインデックスキー間において、先頭ビットから連続して共通する部分ビット列である。ここでは、1つのワイルドカード文字も1ビットデータとして扱われる。例えば、始端インデックスキーが「000011」であり、終端インデックスキーが「000111」である場合、抽出部12は、「000011」及び「0001**」をプレフィックスデータとして抽出する。この例では、ワイルドカード文字には「*」が利用されている。但し、ワイルドカード文字は制限されない。   The extraction unit 12 extracts prefix data that can represent a bit string of an index key included in the specific section, based on each bit string of the start index key and the end index key acquired by the acquisition unit 11. The prefix data is a bit string having a fixed bit length and is a bit string formed only from the prefix or a bit string formed from the prefix and at least one wildcard character. A prefix is a partial bit string continuously common from the first bit between index keys included in a section on a space filling curve represented by prefix data. Here, one wildcard character is also treated as 1-bit data. For example, when the start index key is “000011” and the end index key is “000111”, the extraction unit 12 extracts “000011” and “0001 **” as prefix data. In this example, “*” is used as the wildcard character. However, wildcard characters are not limited.

このように、抽出部12により抽出されるプレフィックスデータは、データセットがマッピングされた多次元空間内における、少なくとも1つのインデックスキーを示す1つの部分空間に対応する。そして、本実施形態では、このプレフィックスデータが、そのプレフィックスデータのプレフィックスを共通して有するインデックスキーの集合により形成されるプレフィックス区間(部分空間)と一対一に対応し、プレフィックスデータのプレフィックスの長さとプレフィックス区間の大きさとが負の相関を持つような、空間充填曲線が利用される。ここで、プレフィックスデータのプレフィックスの長さとプレフィックス区間の大きさとが負の相関とは、プレフィックスの長さが長くなる程、そのプレフィックスデータに対応するプレフィックス区間が小さくなり、プレフィックスの長さが短くなる程、そのプレフィックスデータに対応するプレフィックス区間が大きくなる関係を意味する。   Thus, the prefix data extracted by the extraction unit 12 corresponds to one partial space indicating at least one index key in the multidimensional space to which the data set is mapped. In this embodiment, the prefix data has a one-to-one correspondence with a prefix section (partial space) formed by a set of index keys having the prefix of the prefix data in common, and the prefix length of the prefix data A space filling curve is used that has a negative correlation with the size of the prefix interval. Here, the negative correlation between the prefix length of the prefix data and the size of the prefix section means that the longer the prefix length, the smaller the prefix section corresponding to the prefix data and the shorter the prefix length. This means that the prefix section corresponding to the prefix data becomes larger.

抽出部12は、例えば、次のようにして、始端インデックスキー及び終端インデックスキーの各ビット列に基づいて、プレフィックスデータを抽出することができる。抽出部12は、データセットの属性数に依存しない所定ビット長で取り得る各ビットパターンについて、ビット反転及びワイルドカード文字への置換の少なくとも一方を含む置換ルールをそれぞれ持ち、始端インデックスキー及び終端インデックスキーにおける共通プレフィックス長を算出し、始端インデックスキー及び終端インデックスキーにおける共通プレフィックス長より下位の各対象ビット列を所定ビット長で区切ることで得られる部分ビット列のビットパターンに対応する置換ルールを用いて、プレフィックスデータを抽出する。ここでは、始端インデックスキー及び終端インデックスキーにおける、共通プレフィックス長より下位のビット列が対象ビット列と表記される。   For example, the extraction unit 12 can extract the prefix data based on the bit strings of the start index key and the end index key as follows. The extraction unit 12 has a replacement rule including at least one of bit inversion and replacement with a wildcard character for each bit pattern that can be taken with a predetermined bit length that does not depend on the number of attributes of the data set. Using the replacement rule corresponding to the bit pattern of the partial bit string obtained by calculating the common prefix length in the key and dividing each target bit string lower than the common prefix length in the start index key and the end index key by a predetermined bit length, Extract prefix data. Here, a bit string lower than the common prefix length in the start index key and the end index key is expressed as a target bit string.

抽出部12が持つ置換ルールは、本実施形態で利用される空間充填曲線及び所定ビット長に適応するように設定される。ここで、所定ビット長は、1ビット以上であれば、特に制限されない。例えば、所定ビット長を、コンピュータで効率的に処理できる長さ(例えば、64ビットや128ビット等)に設定することもできる。このようにすれば、置換ルールの適用処理を効率化することができ、結果として、プレフィックスデータの抽出処理を一層高速化することができる。   The replacement rule possessed by the extraction unit 12 is set so as to adapt to the space filling curve and the predetermined bit length used in the present embodiment. Here, the predetermined bit length is not particularly limited as long as it is 1 bit or more. For example, the predetermined bit length can be set to a length (for example, 64 bits or 128 bits) that can be efficiently processed by a computer. In this way, the replacement rule application process can be made more efficient, and as a result, the prefix data extraction process can be further accelerated.

判定部13は、抽出部12により抽出されたプレフィックスデータのプレフィックスを共通して有するインデックスキーの集合により形成される空間充填曲線上のプレフィックス区間と多次元範囲検索の問い合わせ区間との重複を判定する。ここで、プレフィックスデータによれば、プレフィックス区間の最大値及び最小値を簡単に取得することができる。ワイルドカード文字を全て1に置換すれば、プレフィックス区間の最大値が取得され、ワイルドカード文字を全て0に置換すれば、プレフィックス区間の最小値が取得され得る。また、多次元範囲検索の問い合わせ区間に関する情報は、判定部13により予め保持されていてもよいし、取得部11により始端インデックスキー及び終端インデックスキーと同様に取得されてもよい。判定部13は、例えば、プレフィックス区間の最大値及び最小値と、問い合わせ区間の最大値及び最小値とを比較することにより、容易に、両区間が重複するか否かを判定することができる。ここで、プレフィックス区間と問い合わせ区間との重複とは、両区間の少なくとも一部の重複を意味する。   The determination unit 13 determines the overlap between the prefix section on the space-filling curve formed by the set of index keys having the prefix of the prefix data extracted by the extraction section 12 and the query section for multidimensional range search. . Here, according to the prefix data, the maximum value and the minimum value of the prefix section can be easily obtained. If all the wildcard characters are replaced with 1, the maximum value of the prefix section can be acquired, and if all the wildcard characters are replaced with 0, the minimum value of the prefix section can be acquired. Further, the information regarding the inquiry section of the multidimensional range search may be held in advance by the determination unit 13, or may be acquired by the acquisition unit 11 in the same manner as the start index key and the end index key. The determination unit 13 can easily determine whether or not both sections overlap, for example, by comparing the maximum value and minimum value of the prefix section with the maximum value and minimum value of the inquiry section. Here, the overlap between the prefix section and the inquiry section means at least a part of overlap between both sections.

判定部13は、例えば、次のように重複判定を行うことができる。判定部13は、プレフィックス区間の最小点及び最大点を表す各インデックスキーから、プレフィックス区間のビット列の範囲を属性毎にそれぞれ抽出する。更に、判定部13は、問い合わせ区間の最小点及び最大点を表す各インデックスキーから、問い合わせ区間のビット列の範囲を属性毎にそれぞれ抽出する。そして、判定部13は、プレフィックス区間と問い合わせ区間とのビット列の範囲の重複を各属性についてそれぞれ判定することにより、プレフィックス区間と問い合わせ区間との重複を判定する。ここで、プレフィックス区間と問い合わせ区間とのビット列の範囲の重複とは、両区間の少なくとも一部の重複を意味する。判定部13は、プレフィックス区間のビット列の範囲と問い合わせ区間のビット列の範囲とが重複しない属性が1つでも検出された場合に、両区間が重複しないと判定し、それ以外、即ち、全ての属性において両区間のビット列の範囲が重複する場合に、両区間が重複すると判定することができる。   The determination part 13 can perform duplication determination as follows, for example. The determination unit 13 extracts the range of the bit string of the prefix section for each attribute from each index key representing the minimum point and the maximum point of the prefix section. Further, the determination unit 13 extracts the bit string range of the inquiry section for each attribute from each index key representing the minimum and maximum points of the inquiry section. And the determination part 13 determines duplication with a prefix area and an inquiry area by determining the duplication of the range of a bit string of a prefix area and an inquiry area about each attribute, respectively. Here, the overlapping of the bit string range between the prefix section and the inquiry section means at least a part of the overlapping of both sections. The determination unit 13 determines that both sections do not overlap when at least one attribute that does not overlap the bit string range of the prefix section and the bit string range of the query section is detected. Otherwise, that is, all attributes If the bit string ranges in both sections overlap, it can be determined that both sections overlap.

〔動作例〕
以下、本発明の実施の形態における多次元範囲検索方法について図4を用いて説明する。図4は、上述の実施形態における検索装置10の動作例を示すフローチャートである。以下の説明では、検索装置10が各工程の実行主体となるが、検索装置10に含まれる上述の各処理部や他の装置が実行主体となってもよい。
[Operation example]
Hereinafter, the multidimensional range search method according to the embodiment of the present invention will be described with reference to FIG. FIG. 4 is a flowchart showing an operation example of the search device 10 in the above-described embodiment. In the following description, the search device 10 is an execution subject of each process, but the above-described processing units and other devices included in the search device 10 may be an execution subject.

ここで、本実施形態における多次元範囲検索方法では、複数の属性からなるデータセットが、空間ベースの空間分割法により分割され、複数のデータページに分散配置されており、上述のインデックス格納部が存在することが前提となる。   Here, in the multidimensional range search method according to the present embodiment, a data set composed of a plurality of attributes is divided by a space-based space division method and is distributed and arranged in a plurality of data pages. It is assumed that it exists.

まず、検索装置10は、複数の属性からなるデータセットがマッピングされる多次元空間の一次元化に用いられる空間充填曲線上の特定区間の最小点及び最大点を表す始端インデックスキー及び終端インデックスキーを取得する(S41)。ここで、本実施形態における多次元範囲検索方法で用いられる空間充填曲線は、上述したとおりである。また、特定区間についても上述したとおりである。   First, the search device 10 uses a start index key and an end index key representing the minimum and maximum points of a specific section on a space filling curve used for one-dimensionalization of a multidimensional space to which a data set having a plurality of attributes is mapped. Is acquired (S41). Here, the space filling curve used in the multidimensional range search method in the present embodiment is as described above. The specific section is as described above.

検索装置10は、(S41)で取得された始端インデックスキー及び終端インデックスキーの各ビット列に基づいて、当該特定区間に含まれるインデックスキーのビット列を表し得るプレフィックスデータを抽出する(S42)。プレフィックスデータは、上述のとおりである。また、プレフィックスデータの抽出方法は、抽出部12の処理として上述した手法で実現され得る。   The search device 10 extracts prefix data that can represent the bit string of the index key included in the specific section based on the bit strings of the start index key and the end index key acquired in (S41) (S42). The prefix data is as described above. Also, the prefix data extraction method can be realized by the method described above as the processing of the extraction unit 12.

続いて、検索装置10は、(S42)で抽出されたプレフィックスデータのプレフィックスを共通して有するインデックスキーの集合により形成される空間充填曲線上のプレフィックス区間と、多次元範囲検索の問い合わせ区間との重複を判定する(S43)。この重複の判定方法は、判定部13の処理として上述した手法で実現され得る。   Subsequently, the search device 10 includes a prefix section on a space-filling curve formed by a set of index keys having the prefix of the prefix data extracted in (S42), and a query section for multidimensional range search. Duplication is determined (S43). This overlapping determination method can be realized by the method described above as the processing of the determination unit 13.

〔本実施形態の作用及び効果〕
上述したように本実施形態では、空間充填曲線上の特定区間の最小点及び最大点を表す始端インデックスキー及び終端インデックスキーの各ビット列に基づいて、その特定区間に含まれるインデックスキーのビット列を表し得るプレフィックスデータが抽出され、プレフィックスデータにより表わされるプレフィックス区間と多次元範囲検索の問い合わせ区間との重複が判定される。この重複の判定により、当該特定区間が問い合わせ区間と重複するか否かを判定することができる。
[Operation and effect of this embodiment]
As described above, in the present embodiment, based on the bit strings of the start index key and the end index key representing the minimum and maximum points of the specific section on the space filling curve, the bit string of the index key included in the specific section is represented. The obtained prefix data is extracted, and the overlap between the prefix section represented by the prefix data and the query section of the multidimensional range search is determined. Based on the determination of the overlap, it can be determined whether or not the specific section overlaps with the inquiry section.

また、本実施形態で用いられる空間充填曲線は、プレフィックスデータと、そのプレフィックスデータにより表わされるプレフィックス区間とが一対一に対応し、プレフィックスデータのプレフィックスの長さとプレフィックス区間の大きさとが負の相関を持つ特性を有するものであれば、その空間充填曲線自体は制限されない。即ち、周知の固定ルール化された空間充填曲線が利用されてもよいし、各属性のビット列の並び順を変えず、各属性のビット列同士を任意の順序で混合することで、多次元空間を一次元化する空間充填曲線が利用されてもよい。   Further, in the space filling curve used in this embodiment, the prefix data and the prefix section represented by the prefix data correspond one-to-one, and the prefix length of the prefix data and the size of the prefix section have a negative correlation. If it has the characteristic which has, the space filling curve itself will not be restrict | limited. That is, a well-filled rule-filled space-filling curve may be used, or by mixing the bit strings of each attribute in an arbitrary order without changing the arrangement order of the bit strings of each attribute, One-dimensional space filling curves may be used.

このように、本実施形態によれば、プレフィックスのみ、又は、プレフィックスと少なくとも1つのワイルドカード文字とから形成される、固定長のビット列であるプレフィックスデータを用いることで、問い合わせ区間と特定区間との重複を効率的に確認することができ、ひいては、多次元範囲検索時のヒットページの検出の高速化を実現することができる。   As described above, according to the present embodiment, by using prefix data that is a fixed-length bit string formed from only a prefix or a prefix and at least one wildcard character, an inquiry interval and a specific interval are Duplication can be confirmed efficiently, and as a result, the speed of hit page detection at the time of multidimensional range search can be increased.

更に、本実施形態によれば、上述のような特性を持つ空間充填曲線を利用するため、インデックス設計の制約、及び、データセットのページ分割手法の制約を大幅に緩和することができる。即ち、本実施形態では、Z曲線やヒルベルト曲線のようなビット列の混ぜ合わせ順が固定化された空間充填曲線のみでなく、汎用化された空間充填曲線を用いることができる。従って、本実施形態によれば、範囲検索の指定内容やインデックス対象のデータセットの分布に応じた最適なインデックス設計を行うことができるため、検索環境に依存した検索処理の効率低下を防ぐことができる。   Furthermore, according to the present embodiment, since the space filling curve having the above-described characteristics is used, the restrictions on the index design and the restrictions on the page division method of the data set can be greatly relaxed. That is, in this embodiment, not only a space filling curve in which the order of mixing bit strings such as a Z curve and a Hilbert curve is fixed, but also a generalized space filling curve can be used. Therefore, according to the present embodiment, it is possible to perform an optimal index design according to the specified content of the range search and the distribution of the data set to be indexed. it can.

また、本実施形態では、始端インデックスキー及び終端インデックスキーにおける共通プレフィックス長より下位の各対象ビット列を所定ビット長で区切ることで得られる部分ビット列のビットパターンに対応する置換ルールを用いて、プレフィックスデータが抽出される。この置換ルールは、その所定ビット長で取り得る各ビットパターンについての、ビット反転及びワイルドカード文字への置換の少なくとも一方を含むものである。このように、本実施形態によれば、始端インデックスキー及び終端インデックスキーに対するビット処理により効率的にプレフィックスデータを抽出することができる。   Further, in the present embodiment, the prefix data is used by using a replacement rule corresponding to the bit pattern of the partial bit string obtained by dividing each target bit string lower than the common prefix length in the start index key and the end index key by a predetermined bit length. Is extracted. This replacement rule includes at least one of bit inversion and replacement with a wild card character for each bit pattern that can be taken with the predetermined bit length. Thus, according to the present embodiment, prefix data can be efficiently extracted by bit processing on the start index key and the end index key.

また、上述のプレフィックスデータの抽出で用いられる所定ビット長は、データセットの属性数に依存しない値に設定可能である。従って、本実施形態によれば、属性数と等しいビット長のビット列を処理単位としなければならないといった制約も排除し、8ビット、16ビット、32ビットといったコンピュータ処理を効率化させ得る処理単位を自由に使うことができ、ひいては、範囲検索処理の効率を向上させることができる。   In addition, the predetermined bit length used in the above-described extraction of prefix data can be set to a value that does not depend on the number of attributes of the data set. Therefore, according to the present embodiment, the restriction that a bit string having a bit length equal to the number of attributes must be used as a processing unit is eliminated, and a processing unit that can make computer processing such as 8 bits, 16 bits, and 32 bits efficient can be freely performed. Therefore, the efficiency of the range search process can be improved.

[拡張例]
上述の実施形態において、次のようにすれば、更に効率的にプレフィックスデータを抽出することができる。
[Extended example]
In the above-described embodiment, the prefix data can be extracted more efficiently as follows.

抽出部12は、始端インデックスキーの対象ビット列を下位から上位に向かって走査し、かつ、終端インデックスキーの対象ビット列を上位から下位に向かって走査することにより、プレフィックスデータを順次抽出する。対象ビット列とは、上述したように、始端インデックスキーと終端インデックスキーとの共通プレフィックスより下位のビット列を意味する。判定部13は、抽出部12で抽出された順に、プレフィックスデータに対応するプレフィックス区間と問い合わせ区間との重複を判定し、検索部14は、判定部13により重複すると判定された順に、対応するページ情報を検索する。   The extraction unit 12 sequentially extracts the prefix data by scanning the target bit string of the start index key from the lower order to the upper order and scanning the target bit string of the end index key from the upper order to the lower order. As described above, the target bit string means a bit string lower than the common prefix of the start index key and the end index key. The determination unit 13 determines the overlap between the prefix section corresponding to the prefix data and the inquiry section in the order extracted by the extraction unit 12, and the search unit 14 selects the corresponding pages in the order determined by the determination unit 13 as overlapping. Search for information.

始端インデックスキーと終端インデックスキーとの共通プレフィックスによれば、当該特定区間を空間充填曲線上で始端インデックスキー側と終端インデックスキー側とに2分割する境界を表すことができる。そして、始端インデックスキーの対象ビット列を下位から上位に向かって走査してプレフィックスデータを抽出することは、当該特定区間の始端インデックスキーから上記境界までの区間から、始端インデックスキー側から上記境界に向かう方向にプレフィックス区間を徐々に切りだしていくことに相当する。また、当該対象ビット列の上記走査方向によれば、プレフィックス長の長いプレフィックスデータから順次抽出されるため、狭いプレフィックス区間から徐々に切り出される。   According to the common prefix of the start index key and the end index key, it is possible to represent a boundary that divides the specific section into two on the space filling curve: the start index key side and the end index key side. The prefix bit is extracted by scanning the target bit string of the start index key from the lower order to the upper order from the start index key to the boundary from the start index key of the specific section toward the boundary. This is equivalent to gradually cutting out the prefix section in the direction. Further, according to the scanning direction of the target bit string, since it is sequentially extracted from prefix data having a long prefix length, it is gradually cut out from a narrow prefix section.

一方で、終端インデックスキーの対象ビット列を上位から下位に向かって走査してプレフィックスデータを抽出することは、当該特定区間の終端インデックスキーから上記境界までの区間から、上記境界側から終端インデックスキーに向かう方向にプレフィックス区間を徐々に切りだしていくことに相当する。また、当該対象ビット列の上記走査方向によれば、プレフィックス長の短いプレフィックスデータから順次抽出されるため、広いプレフィックス区間から徐々に切り出される。   On the other hand, scanning the target bit string of the terminal index key from the upper side to the lower side to extract prefix data means that the section from the terminal index key of the specific section to the boundary is changed from the boundary side to the terminal index key. This is equivalent to gradually cutting out the prefix section in the direction to go. Further, according to the scanning direction of the target bit string, since it is sequentially extracted from prefix data having a short prefix length, it is gradually cut out from a wide prefix section.

このように、本実施形態は、Z曲線のようなフラクタル形状(超立方体)のみでなく、全辺の長さが同じとはならない超直方体(プレフィックス区間)を多次元空間から分解していく。従って、拡張例によれば、空間充填曲線上の昇順、即ち、インデック順に、プレフィックスデータを抽出することができ、インデックス順にソートされた状態でページ情報を抽出することができる。これにより、データページの格納位置がインデックス順に並ぶ場合に、データページへのアクセスを効率化することができる。   As described above, this embodiment decomposes not only a fractal shape (hypercube) such as a Z curve but also a hypercube (prefix section) whose lengths of all sides are not the same from a multidimensional space. Therefore, according to the extended example, the prefix data can be extracted in the ascending order on the space filling curve, that is, the index order, and the page information can be extracted in a state of being sorted in the index order. As a result, when the storage positions of the data pages are arranged in the index order, the access to the data pages can be made efficient.

以下に実施例を挙げ、上述の実施形態を更に詳細に説明する。本発明は以下の実施例から何ら限定を受けない。   Examples will be given below to describe the above-described embodiment in more detail. The present invention is not limited in any way by the following examples.

本実施例ではZ曲線を汎用化させた空間充填曲線が利用される。
図5は、実施例で利用される空間充填曲線及びプレフィックス区間を示す図である。本実施例では、図5に示されるように、属性ごとのビット列の混ぜ合わせ順序に自由度を持たせた空間充填曲線を用いる。この空間充填曲線で実現可能な1つの例として、Z曲線が存在する。本実施例では、データセットが2次元空間にマッピングされ、その2次元空間がその空間充填曲線で一次元化される。具体的には、空間充填曲線は、3ビットの長さを持つ2つの属性のビット列「x1,x2,x3」及び「y1,y2,y3」を「y1,x1,y2,y3,x2,x3」のように混ぜ合わせる。図5に示される矢印は、空間充填曲線により二次元空間が埋め尽くされる様を表している。
In this embodiment, a space filling curve obtained by generalizing the Z curve is used.
FIG. 5 is a diagram illustrating a space filling curve and a prefix section used in the embodiment. In this embodiment, as shown in FIG. 5, a space-filling curve is used in which the degree of mixing of bit strings for each attribute is given a degree of freedom. One example that can be realized with this space filling curve is the Z curve. In this embodiment, the data set is mapped to a two-dimensional space, and the two-dimensional space is made one-dimensional with the space filling curve. Specifically, the space filling curve includes two attribute bit strings “x1, x2, x3” and “y1, y2, y3” having a length of 3 bits as “y1, x1, y2, y3, x2, x3”. ”And mix. The arrows shown in FIG. 5 indicate that the two-dimensional space is filled with the space filling curve.

また、図5には、4つのプレフィックスデータと、各プレフィックスデータに対応するプレフィックス区間とが表されている。左上図では、プレフィックスデータ「0*****」に対応するプレフィックス区間が斜線(グレー背景)で示される。右上図では、プレフィックスデータ「00****」に対応するプレフィックス区間が斜線(グレー背景)で示される。左下図では、プレフィックスデータ「000***」に対応するプレフィックス区間が斜線(グレー背景)で示される。右下図では、プレフィックスデータ「0000**」に対応するプレフィックス区間が斜線(グレー背景)で示される。このように、本実施例の空間充填曲線は、プレフィックスデータと、そのプレフィックスデータにより示されるプレフィックス区間とが一対一に対応する。更に、プレフィックスデータのプレフィックスの長さ(0の数)とプレフィックス区間の大きさとが負の相関を示すことが分かる。即ち、プレフィックスの長さが長い程、プレフィックス区間が小さくなり、プレフィックスの長さが短い程、プレフィックス区間が大きくなっている。   FIG. 5 shows four prefix data and prefix sections corresponding to each prefix data. In the upper left figure, the prefix section corresponding to the prefix data “0 ******” is indicated by diagonal lines (gray background). In the upper right diagram, the prefix section corresponding to the prefix data “00 ***” is indicated by diagonal lines (gray background). In the lower left figure, the prefix section corresponding to the prefix data “000 ***” is indicated by diagonal lines (gray background). In the lower right diagram, the prefix section corresponding to the prefix data “0000 **” is indicated by diagonal lines (gray background). Thus, in the space filling curve of the present embodiment, the prefix data and the prefix section indicated by the prefix data correspond one-to-one. Furthermore, it can be seen that the prefix length (number of 0s) of the prefix data and the size of the prefix section show a negative correlation. That is, the longer the prefix length, the smaller the prefix interval, and the shorter the prefix length, the larger the prefix interval.

本実施例では、プレフィックスデータを形成するワイルドカード文字として「*」が利用される。これにより、「*」を0で置き換えたビット列が、そのプレフィックスデータに対応するプレフィックス区間の最小値を示し、「*」を1で置き換えたビット列が、そのプレフィックスデータに対応するプレフィックス区間の最大値を示す。   In the present embodiment, “*” is used as a wild card character forming prefix data. Thus, the bit string in which “*” is replaced with 0 indicates the minimum value of the prefix section corresponding to the prefix data, and the bit string in which “*” is replaced with 1 is the maximum value of the prefix section corresponding to the prefix data. Indicates.

本実施例では、或るデータページがカバーする区間が特定区間とされ、検索装置10は、この特定区間の始端インデックスキーα及び終端インデックスキーβを取得し、この特定区間と、多次元範囲検索の問い合わせ区間との重複を判定する。以降、始端インデックスキーα及び終端インデックスキーβの、最上位ビットからi番目のビット値はα[i]及びβ[i]と表記される。また、最上位ビットは、0番目のビットと表記される。   In the present embodiment, a section covered by a certain data page is set as a specific section, and the search apparatus 10 acquires the start index key α and the end index key β of the specific section, and acquires the specific section and the multidimensional range search. The overlap with the inquiry interval is determined. Hereinafter, the i-th bit value from the most significant bit of the start index key α and the end index key β is denoted as α [i] and β [i]. The most significant bit is expressed as the 0th bit.

本実施例における検索装置10は、始端インデックスキーαと終端インデックスキーβとの共通プレフィックスを検出し、共通プレフィックス長を算出する。共通プリフィックス長は、例えば、両ビット列の排他的論理和(XOR)で得られるビット列において、最上位から連続する0の数(number of leading zeroと呼ばれるビット演算)により、算出され得る。ここでは、共通プレフィックス長がkと表記される。   The search apparatus 10 according to the present embodiment detects a common prefix between the start index key α and the end index key β and calculates a common prefix length. The common prefix length can be calculated by, for example, the number of 0s consecutive from the most significant (bit operation called number of leading zero) in a bit string obtained by exclusive OR (XOR) of both bit strings. Here, the common prefix length is expressed as k.

検索装置10は、始端インデックスキーα及び終端インデックスキーβにおける(k+1)番目のビット以降の対象ビット列を所定ビット長(本実施例では1)ずつ区切り、各ビットデータに対応する置換ルールを用いて、プレフィックスデータを抽出する。本実施例では、最上位ビットは0番目とされており、共通プレフィックスの2ビット下位のビット以降のビット列が対象ビット列とされたが、共通プレフィックスの1ビット下位のビット以降のビット列(k番目のビットより下位のビットから形成されるビット列)を対象ビット列とし、置換ルールに、k番目のビットは何もしないことを含めるようにしてもよい。   The search device 10 divides the target bit string after the (k + 1) th bit in the start index key α and the end index key β by a predetermined bit length (1 in this embodiment), and uses a replacement rule corresponding to each bit data. Extract prefix data. In this embodiment, the most significant bit is 0th, and the bit string after the bit lower by 2 bits of the common prefix is the target bit string, but the bit string after the bit lower by 1 bit of the common prefix (kth bit) A bit string formed from bits lower than the bit) may be the target bit string, and the replacement rule may include that the kth bit does nothing.

本実施例では、検索装置10(抽出部12)は、始端インデックスキー及び終端インデックスキーの各対象ビット列の参照ビットが0の場合に、その参照ビットを1に変え、かつ、その参照ビットより下位のビットをワイルドカード文字に変え、その参照ビットが1の場合にビット置換を行わない第1の置換ルール、及び、その参照ビットが1の場合に、その参照ビットを0に変え、かつ、その参照ビットより下位のビットをワイルドカード文字に変え、その参照ビットが0の場合にビット置換を行わない第2の置換ルールを持つ。これにより、検索装置10(抽出部12)は、始端インデックスキーの対象ビット列には第1の置換ルールを適用し、終端インデックスキーの対象ビット列には第2の置換ルールを適用する。   In this embodiment, the search device 10 (extraction unit 12) changes the reference bit to 1 when the reference bit of each target bit string of the start index key and the end index key is 0, and is lower than the reference bit. The first replacement rule that does not perform bit substitution when the reference bit is 1, and the reference bit is changed to 0 when the reference bit is 1, and A bit lower than the reference bit is changed to a wild card character, and when the reference bit is 0, a second replacement rule is performed in which bit replacement is not performed. Accordingly, the search device 10 (extracting unit 12) applies the first replacement rule to the target bit string of the start index key and applies the second replacement rule to the target bit string of the end index key.

始端インデックスキー及び終端インデックスキーのビット長がnであり、変数mが(k+1)以上かつ(n−1)以下の正の整数とすれば、検索装置10は、次のようにプレフィックスデータを抽出する。検索装置10は、α[m]が0であれば、αのビット列において、α[m]を1に置換し、かつ、α[m+1]以降をワイルドカード文字「*」に置換することで、プレフィックスデータの1つを抽出する。更に、検索装置10は、β[m]が1であれば、αのビット列において、α[m]を0に置換し、かつ、α[m+1]以降をワイルドカード文字「*」に置換することで、プレフィックスデータの1つを抽出する。検索装置10は、αの対象ビット列を下位から上位に向けて1ビットずつ走査し、βの対象ビット列を上位から下位に向けて1ビットずつ走査すれば、上述の拡張例のように、インデックス順にソートされた状態で、プレフィックスデータを順次抽出するkとができる。   If the bit length of the start index key and the end index key is n, and the variable m is a positive integer not less than (k + 1) and not more than (n−1), the search device 10 extracts prefix data as follows: To do. When α [m] is 0, the search device 10 replaces α [m] with 1 in the bit string of α, and replaces α [m + 1] and subsequent characters with a wildcard character “*”. Extract one of the prefix data. Further, if β [m] is 1, the search device 10 replaces α [m] with 0 in the bit string of α, and replaces α [m + 1] and subsequent characters with the wild card character “*”. Thus, one of the prefix data is extracted. If the search apparatus 10 scans the target bit string of α one bit at a time from the lower order to the higher order and scans the target bit string of β one bit at a time from the higher order to the lower order, as in the above-described extended example, In the sorted state, prefix data can be extracted sequentially.

始端インデックスキーの対象ビット列に含まれる各ビットデータと特定区間との関係は、次のように説明され得る。その対象ビット列に含まれるビットが0の場合、そのビットを1に置換して得られるビット列により表わされるインデックスキーは、特定区間内に存在することが保障される。これは、対象ビット列に含まれるビットが0ということは、始端インデックスキーが小さい側に存在しているからである。よって、上記置換ルールでは、そのビットが0から1に置換され、そのビットより下位のビットがワイルドカード文字*に置換される。一方、その対象ビット列に含まれるビットが1の場合、そのビットを0に置換して得られるビット列により表わされるインデックスキーは、特定区間内に存在しないことのみが保障される。よって、上記置換ルールでは、そのビットの置換は行われない。   The relationship between each bit data included in the target bit string of the start index key and the specific section can be described as follows. When the bit included in the target bit string is 0, it is guaranteed that the index key represented by the bit string obtained by replacing the bit with 1 exists in the specific section. This is because the fact that the bit included in the target bit string is 0 exists on the side where the starting index key is smaller. Therefore, in the above replacement rule, the bit is replaced from 0 to 1, and the bits lower than the bit are replaced with the wildcard character *. On the other hand, when the bit included in the target bit string is 1, it is guaranteed only that the index key represented by the bit string obtained by replacing the bit with 0 does not exist in the specific section. Therefore, in the replacement rule, the bit is not replaced.

終端インデックスキーの対象ビット列に含まれる各ビットデータと特定区間との関係は、上記始端インデックスキーの場合の逆になる。即ち、その対象ビット列に含まれるビットが1の場合、そのビットを0に置換して得られるビット列により表わされるインデックスキーは、特定区間内に存在することが保障される。よって、上記置換ルールでは、そのビットが1から0に置換され、そのビットより下位のビットがワイルドカード文字*に置換される。一方、その対象ビット列に含まれるビットが0の場合、そのビットを1に置換して得られるビット列により表わされるインデックスキーは、特定区間内に存在しないことのみが保障される。よって、上記置換ルールでは、そのビットの置換は行われない。   The relationship between each bit data included in the target bit string of the end index key and the specific section is the reverse of that in the case of the start end index key. That is, when the bit included in the target bit string is 1, it is guaranteed that the index key represented by the bit string obtained by replacing the bit with 0 exists in the specific section. Therefore, in the above replacement rule, the bit is replaced from 1 to 0, and the bits lower than the bit are replaced with the wildcard character *. On the other hand, when the bit included in the target bit string is 0, it is only guaranteed that the index key represented by the bit string obtained by replacing the bit with 1 does not exist in the specific section. Therefore, in the replacement rule, the bit is not replaced.

検索装置10は、上述のように抽出されたプレフィックスデータに対応するプレフィックス区間と問い合わせ区間との重複を判定する。これにより、検索装置10は、少なくとも1つのプレフィックスデータに対応するプレフィックス区間が問い合わせ区間と重複すると判定した場合、或るデータページがカバーする区間(特定区間)が問い合わせ区間と重複すると判定することができる。   The search device 10 determines whether the prefix section corresponding to the prefix data extracted as described above and the inquiry section overlap. Thereby, when it is determined that the prefix section corresponding to at least one prefix data overlaps with the inquiry section, the search device 10 can determine that the section (specific section) covered by a certain data page overlaps with the inquiry section. it can.

以下、本実施例を図6、図7及び図8を用いて更に詳細に説明する。
図6は、本実施例で用いられる空間充填曲線及インデックスキーを示す図である。図6に示される空間充填曲線は、3ビットの長さを持つ2つの属性のビット列「a,b,c」及び「x,y,z」を「x,a,b,y,c,z」のように混ぜ合わせる。また、図6では、特定区間(或るデータページがカバーする区間)が、空間充填曲線上の実線で示されており、始端インデックスキー及び終端インデックスキーが円で囲まれて表記されている。始端インデックスキーは「000110」であり、終端インデックスキーは「101000」である。
Hereinafter, the present embodiment will be described in more detail with reference to FIGS.
FIG. 6 is a diagram showing a space filling curve and index keys used in the present embodiment. The space filling curve shown in FIG. 6 includes two attribute bit strings “a, b, c” and “x, y, z” having a length of 3 bits as “x, a, b, y, c, z”. ”And mix. In FIG. 6, a specific section (section covered by a certain data page) is indicated by a solid line on the space filling curve, and the start index key and the end index key are indicated by circles. The start index key is “000110” and the end index key is “101000”.

図7は、本実施例における特定区間に含まれるプレフィックスデータの抽出を概念的に示す図である。図7では、図6の多次元インデックス構造に対して、特定区間、始端インデックスキー、終端インデックスキー、各プレフィックス区間が明示されている。特定区間は、斜線(グレー背景)で示され、特定区間から抽出される各プレフィックス区間は、特定区間内の太線で囲まれた領域で示される。
図8は、問い合わせ区間とプレフィックス区間との重複判定を概念的に示す図である。図8では、図7の内容に対して、破線で示される問い合わせ区間が更に付加されている。
FIG. 7 is a diagram conceptually illustrating the extraction of prefix data included in a specific section in the present embodiment. In FIG. 7, specific sections, start index keys, end index keys, and prefix sections are clearly shown in the multidimensional index structure of FIG. The specific section is indicated by diagonal lines (gray background), and each prefix section extracted from the specific section is indicated by a region surrounded by a thick line in the specific section.
FIG. 8 is a diagram conceptually illustrating overlap determination between an inquiry section and a prefix section. In FIG. 8, an inquiry section indicated by a broken line is further added to the contents of FIG.

検索装置10は、始端インデックスキー「000110」及び終端インデックスキー「101000」を取得する。検索装置10は、それらの共通プレフィックス長が0(ゼロ)であるため、始端インデックスキー及び終端インデックスキーにおける1番目以降のビット列を対象ビット列「00110」及び「01000」とする。検索装置10は、始端インデックスキーαの対象ビット列「00110」を下位ビットから上位ビットに向けて1ビットずつ区分けし、終端インデックスキーβの対象ビット列「01000」を上位ビットから下位ビットに向けて1ビットずつ区分けする。検索装置10は、区分けされる各ビットに置換ルールをそれぞれ適用することにより、プレフィックスデータを抽出する。   The search device 10 acquires the start index key “000110” and the end index key “101000”. Since the common prefix length is 0 (zero), the search device 10 sets the first and subsequent bit strings in the start index key and the end index key as target bit strings “00110” and “01000”. The search device 10 classifies the target bit string “00110” of the start index key α by 1 bit from the lower bit to the upper bit, and sets the target bit string “01000” of the end index key β to 1 from the upper bit to the lower bit. Divide bit by bit. The search device 10 extracts prefix data by applying a replacement rule to each bit to be classified.

具体的には、検索装置10は、始端インデックスキーの対象ビット列「00110」から次のようにプレフィックスデータを抽出する。α[5]が0であるため、α[5]が1に置換されることで、プレフィックスデータ「000111」が抽出される。また、始端インデックスキー「000110」もプレフィックスデータとして抽出される。α[4]及びα[3]が1であるため、何もせず、α[2]が0であるため、α[2]が1に置換され、かつ、α[3]以降がワイルドカード文字「*」に置換されることで、プレフィックスデータ「001***」が抽出される。更に、α[1]が0であるため、α[1]が1に置換され、かつ、α[2]以降がワイルドカード文字「*」に置換されることで、プレフィックスデータ「01****」が抽出される。   Specifically, the search device 10 extracts prefix data from the target bit string “00110” of the starting index key as follows. Since α [5] is 0, by replacing α [5] with 1, prefix data “000111” is extracted. The starting index key “000110” is also extracted as prefix data. Since α [4] and α [3] are 1, nothing is done, and since α [2] is 0, α [2] is replaced with 1, and α [3] and subsequent characters are wildcard characters. By replacing with “*”, the prefix data “001 ***” is extracted. Furthermore, since α [1] is 0, α [1] is replaced with 1, and after α [2] is replaced with the wildcard character “*”, the prefix data “01 ***” * "Is extracted.

更に、検索装置10は、終端インデックスキーの対象ビット列「01000」から次のようにプレフィックスデータを抽出する。β[1]が0であるため、何もされず、β[2]が1であるため、β[2]が0に置換され、かつ、β[3]以降がワイルドカード文字「*」に置換されることで、プレフィックスデータ「100***」が抽出される。β[3]以降は0であるため、何もされない。最後に、終端インデックスキー「101000」そのものもプレフィックスデータとして抽出される。   Further, the search device 10 extracts prefix data from the target bit string “01000” of the terminal index key as follows. Since β [1] is 0, nothing is done, and since β [2] is 1, β [2] is replaced with 0, and β [3] and subsequent characters are replaced with the wildcard character “*”. By the replacement, prefix data “100 ***” is extracted. Since β [3] and thereafter are 0, nothing is done. Finally, the end index key “101000” itself is also extracted as prefix data.

但し、始端インデックスキー及び終端インデックスキーの最下位ビットを置換する場合には、始端インデックスキーそのもの及び終端インデックスキーそのものもプレフィックス区間に含まれるため、その最下位ビットはワイルドカード文字「*」に置換するようにしてもよい。このようにすれば、始端インデックスキーそのもの及び終端インデックスキーそのものを別途プレフィックスデータとして追加しなくてもよい。   However, when replacing the least significant bit of the start index key and the end index key, the start index key itself and the end index key itself are also included in the prefix section, so the least significant bit is replaced with the wildcard character “*”. You may make it do. In this way, it is not necessary to add the start index key itself and the end index key itself as prefix data.

このように、検索装置10は、始端インデックスキー及び終端インデックスキーの各ビット列を走査することにより、プレフィックスデータ「00011**」、「001***」、「01****」、「100***」及び「101000」を抽出することができる。抽出された各プレフィックスデータにより示される各プレフィックス区間は、図7に示されるとおりとなる。   In this way, the search device 10 scans each bit string of the start index key and the end index key, thereby performing prefix data “00011 ***”, “001 ***”, “01 ***”, “100”. *** "and" 101000 "can be extracted. Each prefix section indicated by each extracted prefix data is as shown in FIG.

検索装置10は、このように抽出された各プレフィックスデータにより示される各プレフィックス区間と、図8に示される問い合わせ区間との重複を判定する。プレフィックスデータ「00011*」のプレフィックス区間は、その最大値「000111」が問い合わせ区間の最小値「001110」よりも小さいため、問い合わせ区間と重複しない。   The search device 10 determines the overlap between each prefix section indicated by the prefix data extracted in this way and the inquiry section shown in FIG. Since the maximum value “000111” of the prefix data “00011 *” is smaller than the minimum value “001110” of the inquiry interval, the prefix interval does not overlap with the inquiry interval.

そこで、検索装置10は、プレフィックスデータ「001***」により示されるプレフィックス区間と問い合わせ区間との重複を次のように判定する。検索装置10は、プレフィックスデータ「001***」から最小値「001000」及び最大値「001111」を取得し、問い合わせ区間の最小値「001110」及び最大値「111001」を取得し、各属性のビット列をそれぞれ抽出する。プレフィックスデータからは、属性「a,b,c」に関し、最小値のビット列「010」及び最大値のビット列「011」が抽出され、属性「x,y,z」に関し、最小値のビット列「000」及び最大値のビット列「011」が抽出される。同様に、問い合わせ区間からは、属性「a,b,c」に関し最小値のビット列「011」及び最大値のビット列「110」が抽出され、属性「x,y,z」に関し最小値のビット列「010」及び最大値のビット列「101」が抽出される。これにより、検索装置10は、プレフィックス区間に関し、属性「a,b,c」のビット列の範囲「010」から「011」を抽出し、属性「x,y,z」のビット列の範囲「000」から「011」を抽出することができる。同様に、検索装置10は、問い合わせ区間に関し、属性「a,b,c」のビット列の範囲「011」から「110」を抽出し、属性「x,y,z」のビット列の範囲「010」から「101」を抽出することができる。検索装置10は、属性「x,y,z」も属性「a,b,c」もビット列の範囲が一部重複するため、プレフィックスデータ「001***」のプレフィックス区間と問い合わせ区間とが重複すると判定することができる。   Therefore, the search device 10 determines the overlap between the prefix section indicated by the prefix data “001 ***” and the inquiry section as follows. The search device 10 acquires the minimum value “001000” and the maximum value “001111” from the prefix data “001 ***”, acquires the minimum value “001110” and the maximum value “111001” of the inquiry section, and Each bit string is extracted. From the prefix data, the minimum value bit string “010” and the maximum value bit string “011” are extracted for the attribute “a, b, c”, and the minimum value bit string “000” is related to the attribute “x, y, z”. ”And the maximum value bit string“ 011 ”are extracted. Similarly, the minimum value bit string “011” and the maximum value bit string “110” for the attribute “a, b, c” are extracted from the inquiry section, and the minimum value bit string “110” for the attribute “x, y, z” is extracted. 010 ”and the maximum value bit string“ 101 ”are extracted. Accordingly, the search device 10 extracts “011” from the bit string range “010” of the attribute “a, b, c” regarding the prefix section, and the bit string range “000” of the attribute “x, y, z”. From this, “011” can be extracted. Similarly, the search device 10 extracts “110” from the bit string range “011” of the attribute “a, b, c” for the inquiry section, and the bit string range “010” of the attribute “x, y, z”. “101” can be extracted. In the search device 10, since the attribute “x, y, z” and the attribute “a, b, c” partially overlap the bit string range, the prefix section and the query section of the prefix data “001 ***” overlap. Then it can be determined.

プレフィックスデータ「01****」のプレフィックス区間についても同様に重複が判定される。検索装置10は、プレフィックスデータ「01****」から最小値「010000」及び最大値「011111」を取得し、問い合わせ区間の最小値「001110」及び最大値「111001」を取得し、各属性のビット列をそれぞれ抽出する。プレフィックスデータからは、属性「a,b,c」に関し、最小値のビット列「100」及び最大値のビット列「111」が抽出され、属性「x,y,z」に関し、最小値のビット列「000」及び最大値のビット列「011」が抽出される。同様に、問い合わせ区間からは、属性「a,b,c」に関し、最小値のビット列「011」及び最大値のビット列「110」が抽出され、属性「x,y,z」に関し、最小値のビット列「010」及び最大値のビット列「101」が抽出される。これにより、検索装置10は、プレフィックス区間に関し、属性「a,b,c」のビット列の範囲「100」から「111」を抽出し、属性「x,y,z」のビット列の範囲「000」から「011」を抽出することができる。同様に、検索装置10は、問い合わせ区間に関し、属性「a,b,c」のビット列の範囲「011」から「110」を抽出し、属性「x,y,z」のビット列の範囲「010」から「101」を抽出することができる。検索装置10は、属性「x,y,z」も属性「a,b,c」もビット列の範囲が一部重複するため、プレフィックスデータ「01****」のプレフィックス区間と問い合わせ区間とが重複すると判定することができる。   The duplication is similarly determined for the prefix section of the prefix data “01 ***”. The search device 10 acquires the minimum value “010000” and the maximum value “011111” from the prefix data “01 ***”, acquires the minimum value “001110” and the maximum value “111001” of the inquiry section, and sets each attribute. Are extracted respectively. From the prefix data, the minimum value bit string “100” and the maximum value bit string “111” are extracted for the attribute “a, b, c”, and the minimum value bit string “000” is related to the attribute “x, y, z”. ”And the maximum value bit string“ 011 ”are extracted. Similarly, the minimum value bit string “011” and the maximum value bit string “110” are extracted for the attribute “a, b, c” from the inquiry section, and the minimum value bit string “110” is extracted for the attribute “x, y, z”. The bit string “010” and the maximum value bit string “101” are extracted. Accordingly, the search device 10 extracts “111” from the bit string range “100” of the attribute “a, b, c” regarding the prefix section, and the bit string range “000” of the attribute “x, y, z”. From this, “011” can be extracted. Similarly, the search device 10 extracts “110” from the bit string range “011” of the attribute “a, b, c” for the inquiry section, and the bit string range “010” of the attribute “x, y, z”. “101” can be extracted. The search apparatus 10 determines that the prefix section and the inquiry section of the prefix data “01 ***” are different because the bit ranges of the attributes “x, y, z” and the attributes “a, b, c” partially overlap. It can be determined that they overlap.

プレフィックスデータ「100***」のプレフィックス区間についても同様に重複が判定される。検索装置10は、プレフィックスデータ「100***」から最小値「100000」及び最大値「100111」を取得し、問い合わせ区間の最小値「001110」及び最大値「111001」を取得し、各属性のビット列をそれぞれ抽出する。プレフィックスデータからは、属性「a,b,c」に関し、最小値のビット列「000」及び最大値のビット列「001」が抽出され、属性「x,y,z」に関し、最小値のビット列「100」及び最大値のビット列「111」が抽出される。問い合わせ区間からは、属性「a,b,c」に関し、最小値のビット列「011」及び最大値のビット列「110」が抽出され、属性「x,y,z」に関し、最小値のビット列「010」及び最大値のビット列「101」が抽出される。これにより、検索装置10は、プレフィックス区間に関し、属性「a,b,c」のビット列の範囲「000」から「001」を抽出し、属性「x,y,z」のビット列の範囲「100」から「111」を抽出することができる。同様に、検索装置10は、問い合わせ区間に関し、属性「a,b,c」のビット列の範囲「011」から「110」を抽出し、属性「x,y,z」のビット列の範囲「010」から「101」を抽出することができる。ここで、属性「a,b,c」において、両区間が重複しないため、検索装置10は、プレフィックスデータ「100***」のプレフィックス区間と問い合わせ区間とが重複しないと判定することができる。   The duplication is similarly determined for the prefix section of the prefix data “100 ***”. The search apparatus 10 acquires the minimum value “100000” and the maximum value “100111” from the prefix data “100 ***”, acquires the minimum value “001110” and the maximum value “111001” of the inquiry section, and Each bit string is extracted. From the prefix data, the minimum value bit string “000” and the maximum value bit string “001” are extracted for the attribute “a, b, c”, and the minimum value bit string “100” is extracted for the attribute “x, y, z”. ”And the maximum value bit string“ 111 ”are extracted. From the inquiry section, the bit string “011” having the minimum value and the bit string “110” having the maximum value are extracted with respect to the attribute “a, b, c”, and the bit string “010” having the minimum value is extracted with respect to the attribute “x, y, z”. ”And the maximum value bit string“ 101 ”are extracted. Accordingly, the search device 10 extracts “001” from the bit string range “000” of the attribute “a, b, c” regarding the prefix section, and the bit string range “100” of the attribute “x, y, z”. “111” can be extracted from Similarly, the search device 10 extracts “110” from the bit string range “011” of the attribute “a, b, c” for the inquiry section, and the bit string range “010” of the attribute “x, y, z”. “101” can be extracted. Here, in the attribute “a, b, c”, since both sections do not overlap, the search device 10 can determine that the prefix section of the prefix data “100 ***” and the inquiry section do not overlap.

また、上記例は、1ビットずつ走査する置換ルールが用いられたが、複数ビットずつ走査する置換ルールが用いられたとしても、上記例と同じプレフィックスデータを抽出することは可能である。例えば、コンピュータでの処理を効率化するために、sビットずつ走査する置換ルールを用いることができる。この場合、置換ルールは、sビットで取り得る全てのビットパターンの各々に対して、上述の置換ルールと同じ結果となるような、ビット反転及びワイルドカード文字への置換の少なくとも一方をそれぞれ含むように設定されればよい。例えば、2ビットずつのビット走査を行う場合には、参照ビット列の全ビットパターン「00」、「01」、「10」及び「11」についての置換ルールがそれぞれ設定される。具体的には、参照ビット列が「00」であれば、その参照ビット列を「01」に置換し、かつ、その参照ビット列よりも下位の各ビットを「*」に置換するパターンと、その参照ビット列を「1*」に置換し、かつ、その参照ビット列よりも下位の各ビットを「*」に置換するパターンとが実行される。参照ビット列が「01」であれば、その参照ビット列を「1*」に置換し、かつ、その参照ビット列よりも下位の各ビットを「*」に置換するパターンが実行される。参照ビット列が「10」であれば、その参照ビット列を「11」に置換し、かつ、その参照ビット列よりも下位の各ビットを「*」に置換するパターンが実行される。参照ビット列が「11」であれば、置換がなされない。   In the above example, a replacement rule that scans one bit at a time is used. Even if a replacement rule that scans a plurality of bits is used, the same prefix data as in the above example can be extracted. For example, a replacement rule that scans every s bits can be used in order to increase the efficiency of processing in a computer. In this case, the replacement rule includes at least one of bit inversion and replacement with a wildcard character so that each of all possible bit patterns of s bits has the same result as the above replacement rule. Should be set. For example, when bit scanning is performed every two bits, replacement rules for all bit patterns “00”, “01”, “10”, and “11” of the reference bit string are set. Specifically, if the reference bit string is “00”, the reference bit string is replaced with “01” and each lower bit of the reference bit string is replaced with “*”, and the reference bit string Is replaced with “1 *” and each bit lower than the reference bit string is replaced with “*”. If the reference bit string is “01”, a pattern is executed in which the reference bit string is replaced with “1 *” and each bit lower than the reference bit string is replaced with “*”. If the reference bit string is “10”, a pattern is executed in which the reference bit string is replaced with “11” and each lower bit of the reference bit string is replaced with “*”. If the reference bit string is “11”, no replacement is performed.

このように、本実施例によれば、或るデータページをカバーする特定区間における始端インデックスキー及び終端インデックスキーの各ビット列に対する簡単なビット演算により、特定区間に含まれるプレフィックス区間を効率的に抽出することができ、更には、各プレフィックス区間を表す各プレフィックスデータと問い合わせ区間とに関する重複も簡易なビット演算により効率的に判定することができる。   As described above, according to the present embodiment, the prefix section included in the specific section is efficiently extracted by simple bit operation on each bit string of the start index key and the end index key in the specific section covering a certain data page. Furthermore, the overlap between each prefix data representing each prefix section and the inquiry section can be efficiently determined by a simple bit operation.

また、上記実施例では、Z曲線を汎用化させた空間充填曲線が例示されたが、プレフィックスデータとプレフィックス区間との上述のような対応関係を持つ空間充填曲線であれば、ヒルベルト曲線やその派生曲線であっても同様の作用及び効果を得ることができる。この場合には、ヒルベルト曲線やその派生曲線に対応する置換ルールが設けられれば良い。   Further, in the above embodiment, the space filling curve obtained by generalizing the Z curve is exemplified. However, as long as the space filling curve has the above-described correspondence between the prefix data and the prefix section, the Hilbert curve or its derivative is used. Even if it is a curve, the same operation and effect can be obtained. In this case, a replacement rule corresponding to the Hilbert curve or its derivative curve may be provided.

なお、上述の説明で用いたフローチャートでは、複数の工程(処理)が順番に記載されているが、本実施形態で実行される工程の実行順序は、その記載の順番に制限されない。本実施形態では、図示される工程の順番を内容的に支障のない範囲で変更することができる。   In addition, in the flowchart used by the above-mentioned description, although several process (process) is described in order, the execution order of the process performed by this embodiment is not restrict | limited to the description order. In the present embodiment, the order of the illustrated steps can be changed within a range that does not hinder the contents.

2 CPU
3 メモリ
4 入出力I/F
10 多次元範囲検索装置(検索装置)
11 取得部
12 抽出部
13 判定部
14 検索部
2 CPU
3 Memory 4 Input / output I / F
10 Multidimensional range search device (search device)
DESCRIPTION OF SYMBOLS 11 Acquisition part 12 Extraction part 13 Judgment part 14 Search part

Claims (11)

複数の属性からなるデータセットがマッピングされる多次元空間の一次元化に用いられる空間充填曲線上の特定区間の最小点及び最大点を表す始端インデックスキー及び終端インデックスキーを取得する取得部と、
前記取得部により取得された始端インデックスキー及び終端インデックスキーの各ビット列に基づいて、前記特定区間に含まれるインデックスキーのビット列を表し得るプレフィックスデータを抽出する抽出部と、
前記抽出部により抽出されたプレフィックスデータのプレフィックスを共通して有するインデックスキーの集合により形成される前記空間充填曲線上のプレフィックス区間と多次元範囲検索の問い合わせ区間との重複を判定する判定部と、
を備え、
前記空間充填曲線は、前記プレフィックスデータと、前記プレフィックスデータにより示されるプレフィックスを共通して有する点の集合からなる前記プレフィックス区間とが一対一に対応し、該プレフィックスデータのプレフィックスの長さと該プレフィックス区間の大きさとが負の相関を持つ特性を有する、
多次元範囲検索装置。
An acquisition unit for acquiring a start index key and an end index key representing a minimum point and a maximum point of a specific section on a space filling curve used for one-dimensionalization of a multidimensional space to which a data set including a plurality of attributes is mapped;
An extraction unit that extracts prefix data that can represent a bit string of an index key included in the specific section based on each bit string of a start index key and an end index key acquired by the acquisition unit;
A determination unit for determining an overlap between a prefix interval on the space-filling curve formed by a set of index keys having the prefix of the prefix data extracted by the extraction unit and a query interval for multidimensional range search;
With
The space filling curve has a one-to-one correspondence between the prefix data and the prefix section composed of a set of points having the prefix indicated by the prefix data in common, and the prefix length of the prefix data and the prefix section Has a negative correlation with the size of
Multidimensional range search device.
前記空間充填曲線は、各属性のビット列の並び順を変えず、該各属性のビット列同士を任意の順序で混合することで、前記多次元空間を一次元化し、
前記抽出部は、前記属性の数に依存しない所定ビット長で取り得る各ビットパターンについて、ビット反転及びワイルドカード文字への置換の少なくとも一方を含む置換ルールをそれぞれ持ち、前記始端インデックスキー及び前記終端インデックスキーにおける共通プレフィックス長を算出し、前記始端インデックスキー及び前記終端インデックスキーにおける該共通プレフィックス長より下位の各対象ビット列を該所定ビット長で区切ることで得られる部分ビット列のビットパターンに対応する該置換ルールを用いて、前記プレフィックスデータを抽出する、
請求項1に記載の多次元範囲検索装置。
The space filling curve does not change the arrangement order of the bit strings of each attribute, and mixes the bit strings of each attribute in an arbitrary order, thereby making the multidimensional space one-dimensional,
The extraction unit has a replacement rule including at least one of bit inversion and wild card character replacement for each bit pattern that can be taken with a predetermined bit length independent of the number of attributes, and the start index key and the end Calculating a common prefix length in the index key, and corresponding to a bit pattern of a partial bit string obtained by dividing each target bit string lower than the common prefix length in the start index key and the end index key by the predetermined bit length Extracting the prefix data using a replacement rule;
The multidimensional range search apparatus according to claim 1.
前記抽出部は、前記始端インデックスキーの前記対象ビット列を下位から上位に向かって走査し、かつ、前記終端インデックスキーの前記対象ビット列を上位から下位に向かって走査することにより、前記プレフィックスデータを抽出する、
請求項2に記載の多次元範囲検索装置。
The extraction unit extracts the prefix data by scanning the target bit string of the start index key from lower to higher and scanning the target bit string of the end index key from higher to lower. To
The multidimensional range search apparatus according to claim 2.
前記抽出部は、前記始端インデックスキー及び前記終端インデックスキーの前記各対象ビット列の参照ビットが0の場合に、該参照ビットを1に変え、かつ、該参照ビットより下位のビットをワイルドカード文字に変え、該参照ビットが1の場合にビット置換を行わない第1の置換ルール、及び、該参照ビットが1の場合に、該参照ビットを0に変え、かつ、該参照ビットより下位のビットをワイルドカード文字に変え、該参照ビットが0の場合にビット置換を行わない第2の置換ルールを持ち、前記始端インデックスキーの前記対象ビット列には前記第1の置換ルールを適用し、前記終端インデックスキーの前記対象ビット列には前記第2の置換ルールを適用する、
請求項2又は3に記載の多次元範囲検索装置。
The extraction unit changes the reference bit to 1 when the reference bit of each target bit string of the start index key and the end index key is 0, and converts a bit lower than the reference bit to a wild card character. A first replacement rule that does not perform bit replacement when the reference bit is 1, and when the reference bit is 1, the reference bit is changed to 0, and a bit lower than the reference bit is changed A second replacement rule that does not perform bit replacement when the reference bit is 0 is used instead of the wild card character, the first replacement rule is applied to the target bit string of the start index key, and the end index Applying the second replacement rule to the target bit string of the key;
The multidimensional range search apparatus according to claim 2 or 3.
前記判定部は、
前記プレフィックス区間の最小点及び最大点を表す各インデックスキーから、前記プレフィックス区間のビット列の範囲を属性毎にそれぞれ抽出し、
前記問い合わせ区間の最小点及び最大点を表す各インデックスキーから、前記問い合わせ区間のビット列の範囲を属性毎にそれぞれ抽出し、
前記プレフィックス区間と前記問い合わせ区間とのビット列の範囲の重複を各属性についてそれぞれ判定することにより、前記プレフィックス区間と前記問い合わせ区間との重複を判定する、
請求項1から4に記載の多次元範囲検索装置。
The determination unit
From each index key representing the minimum point and the maximum point of the prefix section, the range of the bit string of the prefix section is extracted for each attribute,
From each index key representing the minimum point and the maximum point of the inquiry interval, the range of the bit string of the inquiry interval is extracted for each attribute,
Determining overlap between the prefix section and the inquiry section by determining each bit attribute range overlap between the prefix section and the inquiry section,
The multidimensional range search apparatus according to claim 1.
複数の属性からなるデータセットがマッピングされる多次元空間の一次元化に用いられる空間充填曲線上の特定区間の最小点及び最大点を表す始端インデックスキー及び終端インデックスキーを取得し、
前記取得された始端インデックスキー及び終端インデックスキーの各ビット列に基づいて、前記特定区間に含まれるインデックスキーのビット列を表し得るプレフィックスデータを抽出し、
前記抽出されたプレフィックスデータのプレフィックスを共通して有するインデックスキーの集合により形成される前記空間充填曲線上のプレフィックス区間と多次元範囲検索の問い合わせ区間との重複を判定する、
ことを含み、
前記空間充填曲線は、前記プレフィックスデータと、前記プレフィックスデータにより示されるプレフィックスを共通して有する点の集合からなる前記プレフィックス区間とが一対一に対応し、該プレフィックスデータのプレフィックスの長さと該プレフィックス区間の大きさとが負の相関を持つ特性を有する、
多次元範囲検索方法。
Obtaining a start index key and an end index key representing a minimum point and a maximum point of a specific section on a space-filling curve used for one-dimensionalization of a multidimensional space to which a data set having a plurality of attributes is mapped;
Extracting prefix data that can represent a bit string of an index key included in the specific section based on each bit string of the acquired start index key and end index key,
Determining an overlap between a prefix interval on the space-filling curve formed by a set of index keys having a common prefix of the extracted prefix data and a query interval for multidimensional range search;
Including
The space filling curve has a one-to-one correspondence between the prefix data and the prefix section composed of a set of points having the prefix indicated by the prefix data in common, and the prefix length of the prefix data and the prefix section Has a negative correlation with the size of
Multidimensional range search method.
前記空間充填曲線は、各属性のビット列の並び順を変えず、該各属性のビット列同士を任意の順序で混合することで、前記多次元空間を一次元化し、
前記プレフィックスデータの抽出は、前記始端インデックスキー及び前記終端インデックスキーにおける共通プレフィックス長を算出し、前記属性の数に依存しない所定ビット長で取り得る各ビットパターンに対し設けられる、ビット反転及びワイルドカード文字への置換の少なくとも一方を含む複数の置換ルールの中の、前記始端インデックスキー及び前記終端インデックスキーにおける該共通プレフィックス長より下位の各対象ビット列を該所定ビット長で区切ることで得られる部分ビット列のビットパターンに対応する置換ルールを用いて、前記プレフィックスデータを抽出する、
請求項6に記載の多次元範囲検索方法。
The space filling curve does not change the arrangement order of the bit strings of each attribute, and mixes the bit strings of each attribute in an arbitrary order, thereby making the multidimensional space one-dimensional,
The prefix data extraction calculates a common prefix length in the start index key and the end index key, and is provided for each bit pattern that can be taken with a predetermined bit length independent of the number of attributes. Partial bit string obtained by dividing each target bit string lower than the common prefix length in the start index key and the end index key by a predetermined bit length among a plurality of replacement rules including at least one of replacement with characters The prefix data is extracted using a replacement rule corresponding to the bit pattern of
The multidimensional range search method according to claim 6.
前記プレフィックスデータの抽出は、前記始端インデックスキーの前記対象ビット列を下位から上位に向かって走査し、かつ、前記終端インデックスキーの前記対象ビット列を上位から下位に向かって走査することにより、前記プレフィックスデータを抽出する、
請求項7に記載の多次元範囲検索方法。
The extraction of the prefix data is performed by scanning the target bit string of the start index key from lower to higher and scanning the target bit string of the end index key from higher to lower. Extract,
The multidimensional range search method according to claim 7.
前複数の置換ルールは、前記始端インデックスキー及び前記終端インデックスキーの前記各対象ビット列の参照ビットが0の場合に、該参照ビットを1に変え、かつ、該参照ビットより下位のビットをワイルドカード文字に変え、該参照ビットが1の場合にビット置換を行わない第1の置換ルール、及び、該参照ビットが1の場合に、該参照ビットを0に変え、かつ、該参照ビットより下位のビットをワイルドカード文字に変え、該参照ビットが0の場合にビット置換を行わない第2の置換ルールを含み、
前記プレフィックスデータの抽出は、前記始端インデックスキーの前記対象ビット列には前記第1の置換ルールを適用し、前記終端インデックスキーの前記対象ビット列には前記第2の置換ルールを適用する、
請求項6又は7に記載の多次元範囲検索方法。
The plurality of previous replacement rules change the reference bit to 1 when the reference bit of each target bit string of the start index key and the end index key is 0, and replace the bits lower than the reference bit with a wild card. A first replacement rule that does not perform bit substitution when the reference bit is 1, and when the reference bit is 1, the reference bit is changed to 0 and the lower order of the reference bit Including a second replacement rule that changes a bit to a wildcard character and does not perform bit replacement if the reference bit is 0;
In the extraction of the prefix data, the first replacement rule is applied to the target bit string of the start index key, and the second replacement rule is applied to the target bit string of the end index key.
The multidimensional range search method according to claim 6 or 7.
前記プレフィックス区間の最小点及び最大点を表す各インデックスキーから、前記プレフィックス区間のビット列の範囲を属性毎にそれぞれ抽出し、
前記問い合わせ区間の最小点及び最大点を表す各インデックスキーから、前記問い合わせ区間のビット列の範囲を属性毎にそれぞれ抽出し、
前記プレフィックス区間と前記問い合わせ区間とのビット列の範囲の重複を各属性についてそれぞれ判定する、
ことを更に含み、
前記重複の判定は、前記ビット列の範囲の重複の判定結果に基づいて、前記プレフィックス区間と前記問い合わせ区間との重複を判定する、
請求項6から9のいずれか1項に記載の多次元範囲検索方法。
From each index key representing the minimum point and the maximum point of the prefix section, the range of the bit string of the prefix section is extracted for each attribute,
From each index key representing the minimum point and the maximum point of the inquiry interval, the range of the bit string of the inquiry interval is extracted for each attribute,
Determining overlapping of bit string ranges between the prefix section and the inquiry section for each attribute,
Further including
The determination of duplication is based on a determination result of duplication of the bit string range, and determines duplication between the prefix section and the inquiry section.
The multidimensional range search method according to any one of claims 6 to 9.
請求項6から10のいずれか1項に記載の多次元範囲検索方法を少なくとも1つのコンピュータに実行させるプログラム。   A program that causes at least one computer to execute the multidimensional range search method according to any one of claims 6 to 10.
JP2013146656A 2013-07-12 2013-07-12 Multidimensional range search apparatus and multidimensional range search method Active JP6155920B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013146656A JP6155920B2 (en) 2013-07-12 2013-07-12 Multidimensional range search apparatus and multidimensional range search method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013146656A JP6155920B2 (en) 2013-07-12 2013-07-12 Multidimensional range search apparatus and multidimensional range search method

Publications (2)

Publication Number Publication Date
JP2015018497A true JP2015018497A (en) 2015-01-29
JP6155920B2 JP6155920B2 (en) 2017-07-05

Family

ID=52439412

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013146656A Active JP6155920B2 (en) 2013-07-12 2013-07-12 Multidimensional range search apparatus and multidimensional range search method

Country Status (1)

Country Link
JP (1) JP6155920B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023188029A1 (en) * 2022-03-29 2023-10-05 日本電気株式会社 Range determination device and range determination method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001209651A (en) * 2000-01-24 2001-08-03 Hitachi Ltd Method and device for retrieving multi-dimensional vector and recording medium having multi-dimensional vector retrieval program recorded thereon
US20030004938A1 (en) * 2001-05-15 2003-01-02 Lawder Jonathan Keir Method of storing and retrieving multi-dimensional data using the hilbert curve

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001209651A (en) * 2000-01-24 2001-08-03 Hitachi Ltd Method and device for retrieving multi-dimensional vector and recording medium having multi-dimensional vector retrieval program recorded thereon
US20030004938A1 (en) * 2001-05-15 2003-01-02 Lawder Jonathan Keir Method of storing and retrieving multi-dimensional data using the hilbert curve

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SHOJI NISHIMURA、外3名: "MD-HBase: A Scalable Multi-dimensional Data Infrastructure for Location Aware Services", MOBILE DATA MANAGEMENT(MDM), JPN6017006571, 9 June 2011 (2011-06-09), pages 7 - 16, XP055156634, ISSN: 0003548265, DOI: 10.1109/MDM.2011.41 *
西村 祥治、外1名: "一般化されたZ−Orderを用いた多次元索引の提案", 第5回データ工学と情報マネジメントに関するフォーラム (第11回日本データベース学会年次大会), JPN6017006574, 31 May 2013 (2013-05-31), JP, pages 1 - 8, ISSN: 0003548267 *
西村 祥治: "ビッグデータ処理を支える先進技術", NEC技報, vol. 第65巻,第2号, JPN6017006573, 1 September 2012 (2012-09-01), JP, pages 69 - 72, ISSN: 0003548266 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023188029A1 (en) * 2022-03-29 2023-10-05 日本電気株式会社 Range determination device and range determination method

Also Published As

Publication number Publication date
JP6155920B2 (en) 2017-07-05

Similar Documents

Publication Publication Date Title
JP6187478B2 (en) Index key generation device, index key generation method, and search method
CN107305586B (en) Index generation method, index generation device and search method
WO2018200294A1 (en) Parser for schema-free data exchange format
JP6167767B2 (en) Index generation device and search device
JP6065844B2 (en) Index scanning device and index scanning method
JP6428615B2 (en) Multidimensional range search apparatus and multidimensional range search method
CN106933824B (en) Method and device for determining document set similar to target document in multiple documents
US20220277139A1 (en) Computer-readable recording medium, encoding device, index generating device, search device, encoding method, index generating method, and search method
CN108170799A (en) A kind of Frequent episodes method for digging of mass data
JP6434162B2 (en) Data management system, data management method and program
JP2013149061A (en) Document similarity evaluation system, document similarity evaluation method, and computer program
JP6551131B2 (en) Index generation program, index generation device, index generation method, search program, search device and search method
JP6155920B2 (en) Multidimensional range search apparatus and multidimensional range search method
JP5812007B2 (en) Index creation device, data search device, index creation method, data search method, index creation program, and data search program
JPWO2018012413A1 (en) Similar data search device, similar data search method and recording medium
JP5867208B2 (en) Data model conversion program, data model conversion method, and data model conversion apparatus
JP6065001B2 (en) Data search device, data search method, and data search program
JP6512294B2 (en) Compression program, compression method and compression apparatus
JP5582358B2 (en) Document search system, document search method, and program
Sanchez et al. A multi-resolution approximation for time series
CN103853796B (en) data insertion method and device
JP5696132B2 (en) Adaptive reconstruction apparatus, method, and program according to partial tree structure
WO2016014050A1 (en) Proximity of data terms based on walsh-hadamard transforms
JP2017116981A (en) Structure data generator, searching device, structure data generating method, and structure data generating program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160603

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170222

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170228

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170419

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170522

R150 Certificate of patent or registration of utility model

Ref document number: 6155920

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150