JP5776403B2 - Region search method, region search program, and information processing apparatus - Google Patents

Region search method, region search program, and information processing apparatus Download PDF

Info

Publication number
JP5776403B2
JP5776403B2 JP2011160299A JP2011160299A JP5776403B2 JP 5776403 B2 JP5776403 B2 JP 5776403B2 JP 2011160299 A JP2011160299 A JP 2011160299A JP 2011160299 A JP2011160299 A JP 2011160299A JP 5776403 B2 JP5776403 B2 JP 5776403B2
Authority
JP
Japan
Prior art keywords
area
search
overlapping
node
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2011160299A
Other languages
Japanese (ja)
Other versions
JP2013025591A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2011160299A priority Critical patent/JP5776403B2/en
Publication of JP2013025591A publication Critical patent/JP2013025591A/en
Application granted granted Critical
Publication of JP5776403B2 publication Critical patent/JP5776403B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、領域検索方法などに関する。   The present invention relates to a region search method and the like.

従来、空間内に存在する大量のデータから条件に合ったデータを高速に検索するために、インデックスを用いたデータ管理が利用される。インデックスを用いたデータ管理方式には、一次元のデータを検索する場合に用いられるB−Tree(Bツリー)を利用した方式や多次元データを検索する場合に用いられるR−Tree(Rツリー)を利用した方式がある。   Conventionally, data management using an index is used in order to retrieve data meeting a condition from a large amount of data existing in a space at high speed. Data management methods using indexes include a method using B-Tree (B-tree) used when searching one-dimensional data and an R-Tree (R-tree) used when searching multidimensional data. There is a method using.

例えば、Rツリーを利用したデータ管理について、図25を参照して説明する。図25は、Rツリーで管理するデータと矩形領域の例を示す図である。図25に示すように、R0は、子ノードR1〜R4の矩形領域を全て含む矩形領域であり、R1は、R5〜R8の矩形領域を全て含む矩形領域である。また、最下段のR5〜R11は葉ノードであり、内部にデータを含む矩形領域である。すなわち、R0はR1のインデックス情報となり、R1は、R5のインデックス情報となっている。   For example, data management using an R-tree will be described with reference to FIG. FIG. 25 is a diagram illustrating an example of data managed by the R-tree and a rectangular area. As shown in FIG. 25, R0 is a rectangular area including all the rectangular areas of the child nodes R1 to R4, and R1 is a rectangular area including all of the rectangular areas R5 to R8. Further, R5 to R11 in the lowermost stage are leaf nodes, which are rectangular areas including data therein. That is, R0 is index information of R1, and R1 is index information of R5.

条件に合ったデータを検索するために、かかるインデックス情報を用いて該当範囲を検索(「範囲検索」という。)していく場合、ルートノードであるR0の4つの子ノードR1〜R4から検索範囲が重なるノードを選択する。重なる部分を持つノードは再帰的に検索範囲が重なるノードを選択し、最終的に葉ノードの中から検索範囲内にあるデータを選択する。   In order to search for data that meets the conditions, when searching for the corresponding range using this index information (referred to as “range search”), the search range from the four child nodes R1 to R4 of R0 that is the root node. Select the nodes that overlap. A node having overlapping portions recursively selects a node having overlapping search ranges, and finally selects data within the search range from leaf nodes.

かかる範囲検索の手法として、広い領域に複数のより狭い領域が含まれるというように階層化された領域に関する座標情報とGPS装置により測定された現在の位置とから、現在の位置が階層化された領域の何れに属するかを検索判定する技術が特許文献1に開示されている。   As a method of such range search, the current position is hierarchized from the coordinate information on the hierarchized area such that a plurality of narrow areas are included in a wide area and the current position measured by the GPS device. Patent Document 1 discloses a technique for performing a search determination as to which region belongs.

特開2000−249564号公報JP 2000-249564 A

しかしながら、インデックスを用いた従来の範囲検索では、検索時間を要してしまうという問題があった。すなわち、Rツリーを利用したデータ管理方式では、検索操作を実行する都度、ルートノードから検索を開始するので、常時logNオーダの検索回数が必要となり、検索時間を要してしまう。   However, the conventional range search using an index has a problem of requiring a search time. That is, in the data management method using the R-tree, every time a search operation is executed, the search is started from the root node, so that the number of times of logN order search is always required, and search time is required.

階層化された領域に関する座標情報を用いて範囲検索する場合であっても、現在の位置が測定される都度、測定される現在の位置に関する検索判定を、広い領域から順番に開始するので、検索時間を要してしまうことには変わりがない。   Even when a range search is performed using coordinate information related to the hierarchized area, search determination related to the current position to be measured is started in order from a wide area every time the current position is measured. There is no change in taking time.

開示の技術は、インデックスを用いた範囲検索の検索時間を高速化することができることを目的とする。   It is an object of the disclosed technique to speed up the search time for a range search using an index.

1つの側面では、領域検索方法は、領域を探索する際に用いられるインデックス情報であって複数の領域を含む領域情報とともに前記領域を管理するインデックス情報をツリー構造で表したインデックスツリーを用いて、所定の位置を含む領域を検索し、該位置を含む領域を検索できた場合、複数の領域のそれぞれについて領域と重複する重複領域の情報を記憶した記憶部に基づいて、検索できた領域の重複領域の中から該位置を含む領域を検索し、検索できた領域の情報を出力することを含む。   In one aspect, the region search method uses index tree that is index information used when searching for a region, and includes index information for managing the region together with region information including a plurality of regions, in a tree structure. When an area including a predetermined position is searched and an area including the position can be searched, the overlapping of the areas that can be searched based on the storage unit that stores information on the overlapping areas that overlap the areas for each of the plurality of areas This includes retrieving an area including the position from the area and outputting information on the retrieved area.

本願の開示する領域検索方法の一つの態様によれば、インデックスを用いた範囲検索の検索時間を高速化することができる。   According to one aspect of the region search method disclosed in the present application, it is possible to speed up the search time for a range search using an index.

図1は、実施例1に係る領域検索サーバの構成を示す機能ブロック図である。FIG. 1 is a functional block diagram illustrating the configuration of the area search server according to the first embodiment. 図2は、領域インデックスDBに記憶される情報の例を示す図である。FIG. 2 is a diagram illustrating an example of information stored in the region index DB. 図3は、領域インデックスDBに記憶されるルートノードの情報の例を示す図である。FIG. 3 is a diagram illustrating an example of root node information stored in the region index DB. 図4は、領域インデックスDBに記憶される中間ノードの情報の例を示す図である。FIG. 4 is a diagram illustrating an example of intermediate node information stored in the region index DB. 図5は、領域インデックスDBに記憶される葉ノードの情報の例を示す図である。FIG. 5 is a diagram illustrating an example of leaf node information stored in the region index DB. 図6は、領域データDBのデータ構造の一例を示す図である。FIG. 6 is a diagram illustrating an example of the data structure of the area data DB. 図7は、領域検索要求の内容の一例を示す図である。FIG. 7 is a diagram showing an example of the contents of the area search request. 図8は、領域検索応答の内容の一例を示す図である。FIG. 8 is a diagram illustrating an example of the contents of the region search response. 図9Aは、検索に係るリクエスト受付処理の手順を示すフローチャートである。FIG. 9A is a flowchart illustrating a procedure of request reception processing related to search. 図9Bは、実施例1に係る検索処理の手順を示すフローチャートである。FIG. 9B is a flowchart illustrating the search processing procedure according to the first embodiment. 図10は、実施例1に係る領域データ追加処理の手順を示すフローチャート(1)である。FIG. 10 is a flowchart (1) illustrating the procedure of the area data adding process according to the first embodiment. 図11は、実施例1に係る領域データ追加処理の手順を示すフローチャート(2)である。FIG. 11 is a flowchart (2) illustrating the procedure of the area data adding process according to the first embodiment. 図12は、重複領域設定処理の手順を示すフローチャートである。FIG. 12 is a flowchart showing the procedure of the overlapping area setting process. 図13は、重複領域設定の具体例を示す図である。FIG. 13 is a diagram illustrating a specific example of the overlapping area setting. 図14は、重複領域設定処理の変形例の処理手順を示すフローチャートである。FIG. 14 is a flowchart illustrating a processing procedure of a modified example of the overlapping area setting process. 図15は、実施例2に係る領域検索サーバの構成を示す機能ブロック図である。FIG. 15 is a functional block diagram illustrating the configuration of the area search server according to the second embodiment. 図16は、前回位置DBのデータ構造の一例を示す図である。FIG. 16 is a diagram illustrating an example of the data structure of the previous position DB. 図17は、実施例2に係る検索処理の手順を示すフローチャート(1)である。FIG. 17 is a flowchart (1) illustrating a procedure of search processing according to the second embodiment. 図18は、実施例2に係る検索処理の手順を示すフローチャート(2)である。FIG. 18 is a flowchart (2) illustrating the procedure of the search process according to the second embodiment. 図19は、実施例2に係る検索処理の手順を示すフローチャート(3)である。FIG. 19 is a flowchart (3) illustrating a procedure of search processing according to the second embodiment. 図20は、実施例2に係る検索処理の変形例の処理手順を示すフローチャート(1)である。FIG. 20 is a flowchart (1) illustrating a processing procedure of a modification of the search processing according to the second embodiment. 図21は、実施例2に係る検索処理の変形例の処理手順を示すフローチャート(2)である。FIG. 21 is a flowchart (2) illustrating the processing procedure of a modification of the search processing according to the second embodiment. 図22は、最深ノードの具体例を説明する図である。FIG. 22 is a diagram illustrating a specific example of the deepest node. 図23は、検索回数の比較結果を説明する図である。FIG. 23 is a diagram for explaining a comparison result of the number of searches. 図24は、領域検索プログラムを実行するコンピュータの一例を示す図である。FIG. 24 is a diagram illustrating an example of a computer that executes an area search program. 図25は、Rツリーで管理するデータと矩形領域の例を示す図である。FIG. 25 is a diagram illustrating an example of data managed by the R-tree and a rectangular area.

以下に、本願の開示する領域検索方法、領域検索プログラムおよび情報処理装置の実施例を図面に基づいて詳細に説明する。なお、実施例によりこの発明が限定されるものではない。   Hereinafter, embodiments of a region search method, a region search program, and an information processing device disclosed in the present application will be described in detail with reference to the drawings. The present invention is not limited to the embodiments.

[領域検索サーバ]
図1は、実施例1に係る領域検索サーバの構成を示す機能ブロック図である。図1に示すように、領域検索サーバ1は、通信インタフェースと11と、記憶部12と、制御部13とを有する。
[Area Search Server]
FIG. 1 is a functional block diagram illustrating the configuration of the area search server according to the first embodiment. As illustrated in FIG. 1, the area search server 1 includes a communication interface 11, a storage unit 12, and a control unit 13.

通信インタフェース11は、各端末装置との間で通信を確立して、各端末装置から領域検索要求を受信したり、各端末装置に領域検索応答を送信したりするインタフェースである。ここで、領域検索要求とは、端末装置の位置情報がいずれの領域に含まれるかを検索する要求である。位置情報は、例えば端末装置が存在する緯度、経度の情報であるが、空間内の範囲を示す情報であっても良い。そして、領域検索要求は、例えば端末装置の位置情報や端末装置が持つセンサーの識別IDを含む内容となる。領域検索応答とは、領域検索要求に対応する応答であり、検索結果を含む内容となる。なお、通信インタフェース11は、例えば、LANやインターネット等と接続するネットワークインタフェースカードや、無線アンテナを有する無線通信部等である。   The communication interface 11 is an interface that establishes communication with each terminal device, receives a region search request from each terminal device, and transmits a region search response to each terminal device. Here, the area search request is a request for searching in which area the position information of the terminal device is included. The position information is, for example, latitude and longitude information where the terminal device exists, but may be information indicating a range in space. The area search request includes, for example, the location information of the terminal device and the sensor identification ID of the terminal device. The area search response is a response corresponding to the area search request and includes the search result. The communication interface 11 is, for example, a network interface card connected to a LAN or the Internet, a wireless communication unit having a wireless antenna, or the like.

記憶部12は、制御部13が実行するプログラム等を記憶するとともに、領域インデックスDB121と領域データDB122とを有する。なお、記憶部12は、例えば、RAM(Random Access Memory)、フラッシュメモリ(flash memory)等の半導体メモリ素子、または、ハードディスク、光ディスク等の記憶装置である。   The storage unit 12 stores a program executed by the control unit 13 and includes a region index DB 121 and a region data DB 122. The storage unit 12 is, for example, a semiconductor memory device such as a RAM (Random Access Memory) or a flash memory, or a storage device such as a hard disk or an optical disk.

領域インデックスDB121は、空間内に存在する大量の領域から条件に合った領域を高速に検索するための索引情報である。例えば、領域インデックスDB121は、どの領域がどこにあるのかを示したインデックスをRツリーで保持する。   The area index DB 121 is index information for quickly searching an area that meets a condition from a large number of areas existing in the space. For example, the area index DB 121 holds an index indicating which area is located in the R tree.

ここで、領域インデックスDB121に記憶される情報の例を、図2を参照して説明する。図2は、領域インデックスDBに記憶される情報の例を示す図である。図2に示すように、領域インデックスDB121は、ルートノード、中間ノードおよび葉ノードのいずれかを示す領域データで形成されるRツリーを記憶する。ルートノードは、Rツリーに1つ存在する頂点の領域データである。また、葉ノードは、Rツリーの最底辺のノードであり、自らは子ノードを含まず、検索対象となる多次元の領域データを1つ以上持つ。それ以外の木の中間に存在するノードは、中間ノードであり、それぞれ子ノードを1つ以上持つ。   Here, an example of information stored in the area index DB 121 will be described with reference to FIG. FIG. 2 is a diagram illustrating an example of information stored in the region index DB. As shown in FIG. 2, the region index DB 121 stores an R-tree formed by region data indicating any one of a root node, an intermediate node, and a leaf node. A root node is area data of a vertex existing in the R tree. The leaf node is a node at the bottom of the R-tree, and does not include a child node, and has one or more multidimensional area data to be searched. Nodes existing in the middle of other trees are intermediate nodes, each having one or more child nodes.

図2の例では、ルートノードがR1であり、R1の子ノード且つ中間ノードがR10、R11である。R1がR10、R11の矩形領域を全て含む矩形領域となっている。中間ノードR10の子ノードである葉ノードがR100、R101である。R10がR100、R101の矩形領域を全て含む矩形領域となっている。中間ノードR11の子ノードである葉ノードがR110、R111である。R11がR110、R111の矩形領域を全て含む矩形領域となっている。そして、葉ノードであるR100は、検索対象となる領域データ1、2、3を持っている。葉ノードであるR101は、検索対象となる領域データ4、5を持っている。葉ノードであるR110は、検索対象となる領域データ6、7を持っている。葉ノードであるR111は、検索対象となる領域データ8、9を持っている。なお、領域データ1〜9とは、例えば領域データを識別可能な領域ID(IDentification)としても良い。   In the example of FIG. 2, the root node is R1, and the child nodes and intermediate nodes of R1 are R10 and R11. R1 is a rectangular area including all of the rectangular areas R10 and R11. Leaf nodes that are child nodes of the intermediate node R10 are R100 and R101. R10 is a rectangular area including all the rectangular areas of R100 and R101. Leaf nodes that are child nodes of the intermediate node R11 are R110 and R111. R11 is a rectangular area including all the rectangular areas of R110 and R111. The leaf node R100 has region data 1, 2, and 3 to be searched. The leaf node R101 has area data 4 and 5 to be searched. The leaf node R110 has area data 6 and 7 to be searched. The leaf node R111 has area data 8 and 9 to be searched. The region data 1 to 9 may be region IDs (IDentification) that can identify the region data, for example.

領域インデックスDB121は、Rツリーの実体としてルート、中間、葉の各ノードの情報を記憶する。図3は、領域インデックスDBに記憶されるルートノードの情報の例を示す図である。図3に示すように、領域インデックスDB121は、ルートノードR1の情報として、「ノード種別、矩形領域、子ノードリスト」を記憶する。「ノード種別」は、ノードがルート、中間、葉のいずれかであるかを示す情報である。「矩形領域」は、子ノードの担当領域を全て含む最小外接矩形の情報である。最小外接矩形とは、子ノードの領域を全て含む最小の矩形領域をいう。「子ノードリスト」は、当該ノードの子ノードへのリンクポインタのリストである。   The area index DB 121 stores information on root, intermediate, and leaf nodes as R-tree entities. FIG. 3 is a diagram illustrating an example of root node information stored in the region index DB. As illustrated in FIG. 3, the region index DB 121 stores “node type, rectangular region, child node list” as information of the root node R1. “Node type” is information indicating whether a node is a root, an intermediate, or a leaf. The “rectangular area” is information of a minimum circumscribed rectangle including all the areas in charge of child nodes. The minimum circumscribed rectangle is a minimum rectangular area including all child node areas. The “child node list” is a list of link pointers to child nodes of the node.

図3の例では、ルートノードR1は、x、yの2次元データを管理し、「x1=35.5、y1=139.0」が担当領域の最小点であり、「x2=35.9、y2=139.5」が担当領域の最大点であることを示す。すなわち、R1が担当する領域は、両点を頂点として各次元軸に直交した4直線で作られる領域である。また、R1は、子ノード「R10、R11」へのポインタのリストを記憶する。   In the example of FIG. 3, the root node R1 manages two-dimensional data of x and y, “x1 = 35.5, y1 = 139.0” is the minimum point of the assigned area, and “x2 = 35.9 , Y2 = 139.5 ”indicates the maximum point of the assigned area. That is, the region in charge of R1 is a region formed by four straight lines that are perpendicular to each dimension axis with both points as vertices. Also, R1 stores a list of pointers to child nodes “R10, R11”.

図4は、領域インデックスDBに記憶される中間ノードの情報の例を示す図である。図4に示すように、領域インデックスDB121は、中間ノードの情報として、「ノード種別、矩形領域、子ノードリスト」を記憶する。ここで記憶される「ノード種別」、「矩形領域」、「子ノードリスト」は、図3と同様であるので詳細な説明は省略する。領域インデックスDB121は、R10、R11について、図4の情報を記憶する。   FIG. 4 is a diagram illustrating an example of intermediate node information stored in the region index DB. As illustrated in FIG. 4, the region index DB 121 stores “node type, rectangular region, child node list” as intermediate node information. The “node type”, “rectangular area”, and “child node list” stored here are the same as those in FIG. The area index DB 121 stores information of FIG. 4 for R10 and R11.

図4の場合、中間ノードR10は、x、yの2次元データを管理し、「x1=35.5、y1=139.2」が担当領域の最小点であり、「x2=35.7、y2=139.3」が担当領域の最大点であることを示す。すなわち、中間ノードR10が担当する領域は、両点を頂点として各次元軸に直交した4直線で作られる領域である。また、R10は、子ノード「R100、R101」へのポインタのリストを記憶する。   In the case of FIG. 4, the intermediate node R10 manages two-dimensional data of x and y, “x1 = 35.5, y1 = 139.2” is the minimum point of the assigned area, and “x2 = 35.7, “y2 = 139.3” indicates the maximum point of the assigned area. In other words, the region handled by the intermediate node R10 is a region formed by four straight lines that are perpendicular to each dimension axis with both points serving as vertices. In addition, R10 stores a list of pointers to child nodes “R100, R101”.

図5は、領域インデックスDBに記憶される葉ノードの情報の例を示す図である。図5に示すように、領域インデックスDB121は、葉ノードの情報として、「ノード種別、矩形領域、データリスト」を記憶する。ここで記憶される「ノード種別」、「矩形領域」は、図3と同様であるので詳細な説明は省略する。「データリスト」は、管理する多次元の領域データである。領域インデックスDB121は、R100、R101、R110、R111について、図5の情報を記憶する。   FIG. 5 is a diagram illustrating an example of leaf node information stored in the region index DB. As illustrated in FIG. 5, the region index DB 121 stores “node type, rectangular region, data list” as leaf node information. The “node type” and “rectangular area” stored here are the same as those in FIG. 3 and will not be described in detail. The “data list” is multidimensional area data to be managed. The area index DB 121 stores the information in FIG. 5 for R100, R101, R110, and R111.

図5の場合、葉ノードR100は、x、yの2次元データを管理し、「x1=35.5、y1=139.2」が担当領域の最小点であり、「x2=35.6、y2=139.3」が担当領域の最大点であることを示す。すなわち、葉ノードR100が担当する領域は、両点を頂点として各次元軸に直交した4直線で作られる領域である。また、R100は、領域データ「D1、D2、D3、D4」へのポインタのリストを記憶する。領域データへのポインタの一例として、領域データを識別する領域IDが用いられる。各領域データの実体は、領域データDB122に格納されている。   In the case of FIG. 5, the leaf node R100 manages two-dimensional data of x and y, “x1 = 35.5, y1 = 139.2” is the minimum point of the assigned area, and “x2 = 35.6, “y2 = 139.3” indicates the maximum point of the assigned area. That is, the area in which the leaf node R100 is in charge is an area formed by four straight lines orthogonal to each dimension axis with both points serving as vertices. The R100 stores a list of pointers to the area data “D1, D2, D3, D4”. As an example of a pointer to the area data, an area ID for identifying the area data is used. The substance of each area data is stored in the area data DB 122.

図1に戻って、領域データDB122は、複数の領域データを管理するとともに、複数の領域データのそれぞれについて、領域データの領域と重複する他の領域の領域データを管理する。   Returning to FIG. 1, the area data DB 122 manages a plurality of area data and also manages area data of other areas overlapping with the area data area for each of the plurality of area data.

ここで、領域データDB122のデータ構造の一例を、図6を参照して説明する。図6は、領域データDBのデータ構造の一例を示す図である。図6に示すように、領域データDB122は、領域ID122a毎に、データ名122b、領域情報122cおよび重複領域122dを対応付けて記憶する。領域ID122aは、領域データを一意に識別可能なIDを示す。データ名122bは、領域IDで示される領域データのデータ名を示す。領域情報122cは、領域IDで示される領域データの実体である具体的な範囲を示す。重複領域122dは、領域IDで示される領域データと重複する他の領域データの領域IDを示す。例えば、領域ID122aが「00001」である場合、データ名122bとして「A商店X店舗近辺」、領域情報122cとして「円領域:緯度35.491、経度139.650、半径100m」と記憶している。そして、領域ID122aが「00001」である場合の重複領域122dとして「00034」の領域IDを記憶している。   Here, an example of the data structure of the area data DB 122 will be described with reference to FIG. FIG. 6 is a diagram illustrating an example of the data structure of the area data DB. As shown in FIG. 6, the area data DB 122 stores a data name 122b, area information 122c, and an overlapping area 122d in association with each area ID 122a. The area ID 122a indicates an ID that can uniquely identify area data. The data name 122b indicates the data name of the area data indicated by the area ID. The area information 122c indicates a specific range that is the substance of the area data indicated by the area ID. The overlapping area 122d indicates the area ID of other area data that overlaps the area data indicated by the area ID. For example, when the area ID 122a is “00001”, the data name 122b is stored as “A store near X store”, and the area information 122c is stored as “circle area: latitude 35.491, longitude 139.650, radius 100 m”. . The area ID “00034” is stored as the overlapping area 122d when the area ID 122a is “00001”.

図1に戻って、制御部13は、リクエスト受付部131、レスポンス転送部132、ツリー検索部133、重複データ検索部134および重複領域設定部135を有する。制御部13は、例えば、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)等の集積回路またはCPU(Central Processing Unit)やMPU(Micro Processing Unit)等の電子回路である。   Returning to FIG. 1, the control unit 13 includes a request reception unit 131, a response transfer unit 132, a tree search unit 133, an overlap data search unit 134, and an overlap region setting unit 135. The control unit 13 is, for example, an integrated circuit such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array) or an electronic circuit such as a CPU (Central Processing Unit) or an MPU (Micro Processing Unit).

リクエスト受付部131は、通信インタフェース11によって受信された検索リクエストを受け付ける。レスポンス転送部132は、検索リクエストに対応する領域検索応答を通信インタフェース11に転送する。   The request reception unit 131 receives a search request received by the communication interface 11. The response transfer unit 132 transfers the area search response corresponding to the search request to the communication interface 11.

ツリー検索部133は、領域インデックスDB121を用いて、所定の位置情報を含む領域を検索する。例えば、ツリー検索部133は、リクエスト受付部131によって受け付けられた領域検索要求の中から位置情報を取り出す。そして、ツリー検索部133は、ルートノードから子ノードへトップダウンに辿り順番にノードを選択し、選択したノードの子ノードに、取り出した位置情報を含むものがあるか否かを、領域インデックスDB121を用いて判定する。一例として、ツリー検索部133は、領域インデックスDB121を用いて、選択したノードの子ノードリストを読み出し、さらに、読み出した子ノードリストに含まれるそれぞれの子ノードの矩形領域を読み出す。そして、ツリー検索部133は、読み出したそれぞれの子ノードの矩形領域に、取り出した位置情報を含むものがあるか否かを判定する。   The tree search unit 133 uses the region index DB 121 to search for a region including predetermined position information. For example, the tree search unit 133 extracts position information from the area search request received by the request reception unit 131. Then, the tree search unit 133 traverses from the root node to the child node in a top-down manner, selects the nodes in order, and determines whether there is a child node of the selected node that includes the extracted position information. Determine using. As an example, the tree search unit 133 reads the child node list of the selected node using the region index DB 121, and further reads the rectangular region of each child node included in the read child node list. Then, the tree search unit 133 determines whether or not the read rectangular area of each child node includes the extracted position information.

また、ツリー検索部133は、取り出した位置情報を含む子ノードを選択候補ノードとして追加する。そして、ツリー検索部133は、選択候補ノードとして追加されたノードを1つずつ選択し、選択したノードが葉ノードであれば、葉ノードにある領域データの内、取り出した位置情報を含むものがあるか否かを、領域インデックスDB121を用いて判定する。一例として、ツリー検索部133は、領域インデックスDB121を用いて、葉ノードであるノードのデータリストを読み出し、読み出したデータリストに含まれる領域データへのポインタを取り出す。ここでは、領域データを領域IDとすると、ツリー検索部133は、領域データDB122に記憶された領域情報122cを用いて、領域IDに対応する領域情報122cに、取り出した位置情報を含むものがあるか否かを判定する。そして、ツリー検索部133は、領域IDに対応する領域情報122cに、取り出した位置情報を含むものが1つでもあれば、いずれか1つの領域情報122cの領域IDを検索結果に追加し、領域インデックスDB121を用いた検索を終了する。なお、ツリー検索部133は、位置情報を含む領域情報が複数ある場合には、重複領域の数が最も小さい領域情報を選択することが望ましい。これは、後述する重複データ検索部134が、さらに位置情報を含む領域を、選択した領域情報の重複領域から検索することとなるので、検索対象となる重複領域の数を減らすためである。   In addition, the tree search unit 133 adds a child node including the extracted position information as a selection candidate node. Then, the tree search unit 133 selects the nodes added as selection candidate nodes one by one, and if the selected node is a leaf node, the tree search unit 133 includes the extracted location information in the region data in the leaf node. It is determined using the region index DB 121 whether or not there is. As an example, the tree search unit 133 uses the region index DB 121 to read a data list of nodes that are leaf nodes, and extracts a pointer to the region data included in the read data list. Here, assuming that the area data is an area ID, the tree search unit 133 uses the area information 122c stored in the area data DB 122 to include the extracted position information in the area information 122c corresponding to the area ID. It is determined whether or not. Then, if there is at least one area information 122c including the extracted position information in the area information 122c corresponding to the area ID, the tree search unit 133 adds the area ID of any one of the area information 122c to the search result. The search using the index DB 121 is terminated. In addition, when there are a plurality of pieces of region information including position information, the tree search unit 133 desirably selects region information having the smallest number of overlapping regions. This is for the purpose of reducing the number of overlapping areas to be searched because the overlapping data searching unit 134 described later searches for an area further including position information from the overlapping area of the selected area information.

重複データ検索部134は、ツリー検索部133によって位置情報を含む領域情報を検索できた場合、領域データDB122に記憶された重複領域に基づいて、検索できた領域情報に対応する重複領域の中から位置情報を含む領域情報を検索する。例えば、重複データ検索部134は、ツリー検索部133によって追加された検索結果から領域IDを取り出す。そして、重複データ検索部134は、領域データDB122に記憶された重複領域122dに基づいて、取り出した領域IDの領域情報と重複する重複領域の領域IDを読み出す。そして、重複データ検索部134は、該当する重複領域の領域IDを1つずつ選択し、選択した領域IDの重複領域が位置情報を含むか否かを判定する。そして、重複データ検索部134は、位置情報を含む重複領域の領域IDを検索結果に追加する。   When the tree search unit 133 can search the area information including the position information, the duplicate data search unit 134 can select from the overlap areas corresponding to the searched area information based on the overlap area stored in the area data DB 122. Search area information including position information. For example, the duplicate data search unit 134 extracts the area ID from the search result added by the tree search unit 133. Then, based on the overlapping area 122d stored in the area data DB 122, the overlapping data search unit 134 reads the area ID of the overlapping area that overlaps the area information of the extracted area ID. Then, the duplicate data search unit 134 selects area IDs of the corresponding overlap areas one by one, and determines whether or not the overlap area of the selected area ID includes position information. And the duplication data search part 134 adds area ID of the duplication area | region containing position information to a search result.

重複領域設定部135は、領域データDB122の重複領域を設定する。なお、重複領域設定部135は、領域インデックスDB121に新たな領域を追加する際に、その追加領域を領域データDB122に追加すると共に、その追加領域と重複する重複領域を設定するようにすれば良い。例えば、重複領域設定部135は、ルートノードから子ノードに向かって順番にノードを選択し、選択したノードの子ノードに、追加領域を含むものがあるか否かを、領域インデックスDB121を用いて判定する。一例として、重複領域設定部135は、領域インデックスDB121を用いて、選択したノードの子ノードリストを読み出し、さらに、読み出した子ノードリストに含まれるそれぞれの子ノードの矩形領域を読み出す。そして、重複領域設定部135は、読み出したそれぞれの子ノードの矩形領域に追加領域を含むものがあるか否かを判定する。   The overlapping area setting unit 135 sets an overlapping area in the area data DB 122. When adding a new area to the area index DB 121, the overlapping area setting unit 135 may add the added area to the area data DB 122 and set an overlapping area that overlaps the added area. . For example, the overlapping area setting unit 135 selects nodes in order from the root node toward the child node, and uses the area index DB 121 to determine whether or not there is an additional area among the child nodes of the selected node. judge. As an example, the overlapping area setting unit 135 reads the child node list of the selected node using the area index DB 121, and further reads the rectangular area of each child node included in the read child node list. Then, the overlapping area setting unit 135 determines whether there is an area including an additional area in the read rectangular area of each child node.

また、重複領域設定部135は、追加領域を含む子ノードを選択候補ノードとして追加する。そして、重複領域設定部135は、選択候補ノードとして追加されたノードを1つずつ選択し、選択したノードが葉ノードであれば、葉ノードにある領域データの内、追加領域と重複する部分がある領域データを重複領域として選択する。そして、重複領域設定部135は、重複領域として選択した領域データを、領域データDB122の追加領域に対応する重複領域122dに追加する。さらに、重複領域設定部135は、追加領域を、重複領域として選択した領域データに対応する重複領域122dに追加する。   In addition, the overlapping area setting unit 135 adds a child node including the additional area as a selection candidate node. Then, the overlapping area setting unit 135 selects the nodes added as selection candidate nodes one by one, and if the selected node is a leaf node, a part overlapping with the additional area in the area data in the leaf node is displayed. A certain area data is selected as an overlapping area. Then, the overlapping area setting unit 135 adds the area data selected as the overlapping area to the overlapping area 122d corresponding to the additional area of the area data DB 122. Furthermore, the overlapping area setting unit 135 adds the additional area to the overlapping area 122d corresponding to the area data selected as the overlapping area.

[領域検索要求のデータの一例]
次に、リクエスト受付部131が通信インタフェース11を介して受け付ける領域検索要求の内容について、図7を参照して説明する。図7は、領域検索要求の内容の一例を示す図である。図7に示すように、領域検索要求には、センサーを識別するセンサーIDと、緯度および経度とを含む。緯度および経度は、位置情報の一例である。図7の例では、センサーIDとして「Sensor000X」、緯度として「35.4134」、経度として「139.6252」と設定している。なお、領域検索要求には、センサーIDを含むものとしたが、これに限定されず、領域検索を要求する端末装置の装置IDであっても良いし、領域検索を要求する携帯電話の携帯電話番号であっても良い。
[Example of area search request data]
Next, the contents of the area search request received by the request receiving unit 131 via the communication interface 11 will be described with reference to FIG. FIG. 7 is a diagram showing an example of the contents of the area search request. As shown in FIG. 7, the area search request includes a sensor ID for identifying the sensor, and a latitude and longitude. Latitude and longitude are examples of position information. In the example of FIG. 7, “Sensor000X” is set as the sensor ID, “35.4134” is set as the latitude, and “139.6252” is set as the longitude. The area search request includes the sensor ID. However, the present invention is not limited to this, and may be the device ID of the terminal device that requests the area search, or the mobile phone of the mobile phone that requests the area search. It may be a number.

[領域検索応答のデータの一例]
次に、レスポンス転送部132が通信インタフェース11を介して出力する領域検索応答の内容について、図8を参照して説明する。図8は、領域検索応答の内容の一例を示す図である。図8に示すように、領域検索応答は、領域検索の結果を示す領域情報のリストであり、領域情報に対応する領域IDと領域名とを含む。図8の例では、領域IDとして「00001」、領域名として「A商店X店舗周辺」と設定している。また、領域IDとして「00034」、領域名として「レストランC周辺」と設定している。なお、領域情報のリストには、領域IDと領域名とを含むものとしたが、これに限定されず、領域の位置、大きさや形状等を含むものとしても良い。
[Example of area search response data]
Next, the contents of the area search response output by the response transfer unit 132 via the communication interface 11 will be described with reference to FIG. FIG. 8 is a diagram illustrating an example of the contents of the region search response. As shown in FIG. 8, the area search response is a list of area information indicating the result of area search, and includes an area ID and an area name corresponding to the area information. In the example of FIG. 8, “00001” is set as the area ID, and “A store X store vicinity” is set as the area name. In addition, “00034” is set as the area ID and “Restaurant C neighborhood” is set as the area name. The region information list includes the region ID and the region name, but is not limited thereto, and may include the region position, size, shape, and the like.

[リクエスト受付処理の手順]
次に、検索に係るリクエスト受付処理の手順について、図9Aを参照して説明する。図9Aは、検索に係るリクエスト受付処理の手順を示すフローチャートである。
[Request reception processing procedure]
Next, the procedure of the request reception process related to the search will be described with reference to FIG. 9A. FIG. 9A is a flowchart illustrating a procedure of request reception processing related to search.

まず、リクエスト受付部131は、領域検索要求を受け付けたか否かを判定する(S10A)。そして、領域検索要求を受け付けていないと判定した場合(ステップS10A;No)、リクエスト受付部131は、領域検索要求を受け付けるまで、判定処理を繰り返す。一方、領域検索要求を受け付けたと判定した場合(ステップS10A;Yes)、リクエスト受付部131は、検索処理を実行する(ステップS10B)。   First, the request reception unit 131 determines whether an area search request has been received (S10A). If it is determined that the area search request has not been received (step S10A; No), the request reception unit 131 repeats the determination process until the area search request is received. On the other hand, when it determines with having received the area | region search request | requirement (step S10A; Yes), the request reception part 131 performs a search process (step S10B).

そして、リクエスト受付部131は、リクエスト受付処理を終了したか否かを判定する(ステップS10C)。リクエスト受付処理を終了していないと判定した場合(ステップS10C;No)、リクエスト受付部131は、ステップS10Aに移行する。一方、リクエスト受付処理を終了したと判定した場合(ステップS10C;Yes)、リクエスト受付部131は、処処理を終了する。   Then, the request reception unit 131 determines whether or not the request reception process has ended (step S10C). If it is determined that the request reception process has not been completed (step S10C; No), the request reception unit 131 proceeds to step S10A. On the other hand, if it is determined that the request reception process has been completed (step S10C; Yes), the request reception unit 131 ends the process.

[検索処理の手順]
次に、図9AのステップS10Bに示した検索処理について、図9Bを参照して説明する。図9Bは、実施例1に係る検索処理の手順を示すフローチャートである。なお、図9Bの例では、領域検索要求に含まれる位置情報を検索座標として説明する。
[Search process steps]
Next, the search process shown in step S10B of FIG. 9A will be described with reference to FIG. 9B. FIG. 9B is a flowchart illustrating the search processing procedure according to the first embodiment. In the example of FIG. 9B, the position information included in the area search request will be described as search coordinates.

リクエスト受付部131によって領域検索要求が受け付けられると、ツリー検索部133は、領域インデックスDB121に基づいて、ルートノードを選択する(ステップS11)。そして、ツリー検索部133は、選択した選択ノードが葉ノードであるか否かを判定する(ステップS12)。   When the area search request is received by the request reception unit 131, the tree search unit 133 selects a root node based on the area index DB 121 (step S11). Then, the tree search unit 133 determines whether or not the selected node selected is a leaf node (step S12).

選択ノードが葉ノードでないと判定した場合(ステップS12;No)、ツリー検索部133は、選択ノードの子ノードに検索座標を含むものがあるか否かを、領域インデックスDB121を用いて判定する(ステップS13)。一例として、ツリー検索部133は、領域インデックスDB121に基づいて、選択ノードの子ノードリストを読み出し、読み出した子ノードリストに含まれるそれぞれの子ノードの矩形領域を読み出す。そして、ツリー検索部133は、読み出したそれぞれの子ノードの矩形領域に、検索座標を含むものがあるか否かを判定する。   If it is determined that the selected node is not a leaf node (step S12; No), the tree search unit 133 determines whether or not there is a child node of the selected node that includes the search coordinates using the region index DB 121 ( Step S13). As an example, the tree search unit 133 reads the child node list of the selected node based on the region index DB 121, and reads the rectangular region of each child node included in the read child node list. Then, the tree search unit 133 determines whether or not the read rectangular area of each child node includes a search coordinate.

選択ノードの子ノードに検索座標を含むものがあると判定した場合(ステップS13;Yes)、ツリー検索部133は、検索座標を含む子ノードを選択候補ノードに追加し(ステップS14)、ステップS15に移行する。一方、選択ノードの子ノードに検索座標を含むものがないと判定した場合(ステップS13;No)、ツリー検索部133は、ステップS15に移行する。   When it is determined that there is a child node of the selected node that includes the search coordinate (step S13; Yes), the tree search unit 133 adds the child node including the search coordinate to the selection candidate node (step S14), and step S15. Migrate to On the other hand, when it is determined that no child node of the selected node includes the search coordinate (step S13; No), the tree search unit 133 proceeds to step S15.

続いて、ツリー検索部133は、全ての選択候補ノードの検索を終えたか否かを判定する(ステップS15)。全ての選択候補ノードの検索を終えていないと判定した場合(ステップS15;No)、ツリー検索部133は、選択候補ノード内の1つの未検索ノードを選択し(ステップS16)、ステップS12に移行する。   Subsequently, the tree search unit 133 determines whether or not all selection candidate nodes have been searched (step S15). When it is determined that the search of all selection candidate nodes has not been completed (step S15; No), the tree search unit 133 selects one unsearched node in the selection candidate nodes (step S16), and proceeds to step S12. To do.

ステップS12では、選択ノードが葉ノードであると判定した場合(ステップS12;Yes)、ツリー検索部133は、選択した葉ノードが持つ領域データの内、検索座標を含むものがあるか否かを判定する(ステップS17)。一例として、ツリー検索部133は、領域インデックスDB121に基づいて、葉ノードであるノードのデータリストを読み出し、読み出したデータリストに含まれる領域データへのポインタ、例えば領域IDを取り出す。そして、ツリー検索部133は、領域データDB122に基づいて、取り出した領域IDに対応する領域情報122cに検索座標を含むものがあるか否かを判定する。   In step S12, when it is determined that the selected node is a leaf node (step S12; Yes), the tree search unit 133 determines whether there is a region including the search coordinates in the area data of the selected leaf node. Determination is made (step S17). As an example, the tree search unit 133 reads a data list of nodes that are leaf nodes based on the region index DB 121, and extracts a pointer to the region data included in the read data list, for example, a region ID. Then, based on the area data DB 122, the tree search unit 133 determines whether there is an area information 122c corresponding to the extracted area ID that includes the search coordinates.

選択した葉ノードが持つ領域データの内、検索座標を含むものがないと判定した場合(ステップS17;No)、ツリー検索部133は、次の選択候補ノードを検索すべく、ステップS15に移行する。   If it is determined that none of the area data held by the selected leaf node includes the search coordinates (step S17; No), the tree search unit 133 proceeds to step S15 to search for the next selection candidate node. .

一方、選択した葉ノードが持つ領域データの内、検索座標を含むものがあると判定した場合(ステップS17;Yes)、ツリー検索部133は、該当領域データの内、重複領域の数が最小の領域データを検索結果に追加する(ステップS18)。一例として、ツリー検索部133は、領域データDB122に記憶された重複領域122dに基づいて、重複領域の数が最小の領域データ(領域ID)を検索結果に追加する。ここで、領域インデックスDB121を用いた検索を終了する。   On the other hand, when it is determined that there is a search coordinate included in the area data of the selected leaf node (step S17; Yes), the tree search unit 133 has the smallest number of overlapping areas in the corresponding area data. The area data is added to the search result (step S18). As an example, the tree search unit 133 adds region data (region ID) having the smallest number of overlapping regions to the search result based on the overlapping region 122d stored in the region data DB 122. Here, the search using the region index DB 121 is terminated.

続いて、重複データ検索部134は、領域データDB122の重複領域122dに基づいて、検索結果に追加した領域データの重複領域から未判定のものを読み出し、読み出した重複領域を1つ選択する(ステップS19)。そして、重複データ検索部134は、選択した重複領域が検索座標を含むか否かを判定する(ステップS20)。選択した重複領域が検索座標を含むと判定した場合(ステップS20;Yes)、重複データ検索部134は、含むと判定した重複領域の領域IDを検索結果に追加し(ステップS21)、ステップS22に移行する。   Subsequently, based on the overlapping region 122d of the region data DB 122, the overlapping data search unit 134 reads an undetermined one from the overlapping regions of the region data added to the search result, and selects one read overlapping region (step) S19). Then, the duplicate data search unit 134 determines whether or not the selected overlap area includes the search coordinates (step S20). When it is determined that the selected overlapping area includes the search coordinates (step S20; Yes), the overlapping data search unit 134 adds the area ID of the overlapping area determined to include (step S21) to step S22. Transition.

一方、選択した重複領域が検索座標を含まないと判定した場合(ステップS20;No)、重複データ検索部134は、全重複領域の判定を終えていない場合(ステップS22;No)、次の重複領域を判定すべく、ステップS19に移行する。一方、重複データ検索部134は、全重複領域の判定を終えた場合(ステップS22;Yes)、作成した検索結果を問合せ側へ返答すべく、レスポンス転送部132に出力する(ステップS23)。その後、レスポンス転送部132は、検索結果を領域検索応答として領域検索要求の問合せ側へ送信する。   On the other hand, if it is determined that the selected overlapping area does not include the search coordinates (step S20; No), the overlapping data search unit 134 determines that the entire overlapping area has not been determined (step S22; No), and the next overlap. To determine the area, the process proceeds to step S19. On the other hand, the duplicate data search unit 134 outputs the created search result to the response transfer unit 132 in order to return the created search result to the inquiry side (step S23) when the determination of all the overlapping regions is completed (step S22; Yes). Thereafter, the response transfer unit 132 transmits the search result as an area search response to the inquiry side of the area search request.

ステップS15では、全ての選択候補ノードの検索を終えていると判定した場合(ステップS15;Yes)、ツリー検索部133は、選択ノードに検索座標を含むものがないので、検索結果無しとして問合せ側へ返答すべく、レスポンス転送部132に出力する(ステップS24)。その後、レスポンス転送部132は、検索結果を領域検索応答として領域検索要求の問合せ側へ送信する。   In step S15, when it is determined that the search of all selection candidate nodes has been completed (step S15; Yes), the tree search unit 133 determines that there is no search result in the selected node, so the inquiry side Is output to the response transfer unit 132 (step S24). Thereafter, the response transfer unit 132 transmits the search result as an area search response to the inquiry side of the area search request.

[領域データ追加処理の手順]
次に、実施例1に係る領域データ追加処理の手順について、図10、図11を参照して説明する。図10、図11は、実施例1に係る領域データ追加処理の手順を示すフローチャートである。
[Procedure for adding area data]
Next, the procedure of region data addition processing according to the first embodiment will be described with reference to FIGS. 10 and 11 are flowcharts illustrating the procedure of the area data adding process according to the first embodiment.

まず、重複領域設定部135は、領域インデックスDB121に基づいて、ルートノードを選択する(ステップS31)。そして、重複領域設定部135は、選択した選択ノードが葉ノードであるか否かを判定する(ステップS32)。   First, the overlapping area setting unit 135 selects a root node based on the area index DB 121 (step S31). Then, the overlapping area setting unit 135 determines whether or not the selected node selected is a leaf node (step S32).

選択ノードが葉ノードでないと判定した場合(ステップS32;No)、重複領域設定部135は、領域インデックスDB121に基づいて、選択ノードの子ノードに追加領域を包含するものがあるか否かを判定する(ステップS33)。一例として、重複領域設定部135は、領域インデックスDB121に基づいて、選択ノードの子ノードリストを読み出し、読み出した子ノードリストに含まれるそれぞれの子ノードの矩形領域を読み出す。そして、ツリー検索部133は、読み出したそれぞれの子ノードの矩形領域に、追加領域を包含する矩形領域があるか否かを判定する。   When it is determined that the selected node is not a leaf node (step S32; No), the overlapping area setting unit 135 determines whether there is a child node of the selected node that includes an additional area based on the area index DB 121. (Step S33). As an example, the overlapping area setting unit 135 reads the child node list of the selected node based on the area index DB 121, and reads the rectangular area of each child node included in the read child node list. Then, the tree search unit 133 determines whether or not there is a rectangular area including the additional area in the read rectangular area of each child node.

追加領域を包含するものがあると判定した場合(ステップS33;Yes)、重複領域設定部135は、追加領域を包含する子ノードの内、矩形領域の面積が最小のものを選択ノードとする(ステップS34)。そして、重複領域設定部135は、ステップS32に移行する。   If it is determined that there is an additional region included (step S33; Yes), the overlapping region setting unit 135 selects a child node including the additional region having the smallest rectangular area as a selection node ( Step S34). Then, the overlapping area setting unit 135 proceeds to step S32.

一方、追加領域を包含するものがないと判定した場合(ステップS33;No)、重複領域設定部135は、追加領域を含めると拡大量が最小になる子ノードを選択ノードとする(ステップS35)。そして、重複領域設定部135は、ステップS32に移行する。   On the other hand, when it is determined that there is no object including the additional area (step S33; No), the overlapping area setting unit 135 selects a child node whose amount of enlargement is minimum when the additional area is included (step S35). . Then, the overlapping area setting unit 135 proceeds to step S32.

ステップS32では、選択ノードが葉ノードであると判定した場合(ステップS32;Yes)、重複領域設定部135は、ステップS41に移行する。   If it is determined in step S32 that the selected node is a leaf node (step S32; Yes), the overlapping area setting unit 135 proceeds to step S41.

続いて、重複領域設定部135は、選択した葉ノードに追加領域の領域データを追加する(ステップS41)。一例として、重複領域設定部135は、領域インデックスDB121の該当する葉ノードのデータリストに、追加領域の領域データへのポインタ、例えば領域IDを追加する。そして、重複領域設定部135は、重複領域設定処理を実行する(ステップS42)。   Subsequently, the overlapping area setting unit 135 adds area data of the additional area to the selected leaf node (step S41). As an example, the overlapping area setting unit 135 adds a pointer to area data of the additional area, for example, an area ID, to the data list of the corresponding leaf node in the area index DB 121. Then, the overlapping area setting unit 135 executes an overlapping area setting process (step S42).

ここで、選択した葉ノードの持つ領域データ数が上限を超える場合がある。この場合には、重複領域設定部135は、以下の処理を行う。重複領域設定部135は、選択した葉ノードの持つ領域データ数が上限を超えるか否かを判定する(ステップS43)。領域データ数が上限を超える場合(ステップS43;Yes)、重複領域設定部135は、葉ノードの矩形領域を分割する場合に、分割結果の矩形領域の大きさの和が最小となるように葉ノードを2分割し、親ノードに追加する(ステップS44)。一方、領域データ数が上限を超えない場合(ステップS43;No)、重複領域設定部135は、領域データ追加処理を終了する。   Here, the number of area data of the selected leaf node may exceed the upper limit. In this case, the overlapping area setting unit 135 performs the following processing. The overlapping area setting unit 135 determines whether or not the number of area data held by the selected leaf node exceeds the upper limit (step S43). When the number of area data exceeds the upper limit (step S43; Yes), the overlapping area setting unit 135 leaves the sum of the sizes of the rectangular areas as a result of division when the rectangular area of the leaf node is divided. The node is divided into two and added to the parent node (step S44). On the other hand, when the number of area data does not exceed the upper limit (step S43; No), the overlapping area setting unit 135 ends the area data adding process.

さらに、追加する親ノードの持つ子ノード数が上限を超える場合がある。この場合には、重複領域設定部135は、以下の処理を行う。重複領域設定部135は、追加する親ノードの持つ子ノード数が上限を超えるか否かを判定する(ステップS45)。追加する親ノードの持つ子ノード数が上限を超える場合(ステップS45;Yes)、重複領域設定部135は、追加する親ノードがルートノードであるか否かを判定する(ステップS46)。一方、追加する親ノードの持つ子ノード数が上限を超えない場合(ステップS45;No)、重複領域設定部135は、領域データ追加処理を終了する。   Furthermore, the number of child nodes of the parent node to be added may exceed the upper limit. In this case, the overlapping area setting unit 135 performs the following processing. The overlapping area setting unit 135 determines whether or not the number of child nodes of the parent node to be added exceeds the upper limit (step S45). When the number of child nodes of the parent node to be added exceeds the upper limit (step S45; Yes), the overlapping area setting unit 135 determines whether or not the parent node to be added is a root node (step S46). On the other hand, when the number of child nodes of the parent node to be added does not exceed the upper limit (step S45; No), the overlapping area setting unit 135 ends the area data adding process.

追加する親ノードがルートノードでないと判定した場合(ステップS46;No)、重複領域設定部135は、分割結果の矩形領域の大きさの和が最小となるようにノードを分割する。そして、重複領域設定部135は、分割後の増加したノードを分割元のノードの親ノードに追加する(ステップS47)。そして、重複領域設定部135は、ステップS45に移行する。   When it is determined that the parent node to be added is not the root node (step S46; No), the overlapping area setting unit 135 divides the node so that the sum of the sizes of the rectangular areas obtained as a result of the division is minimized. Then, the overlapping area setting unit 135 adds the increased node after the division to the parent node of the node that is the division source (step S47). Then, the overlapping area setting unit 135 proceeds to step S45.

一方、追加する親ノードがルートノードであると判定した場合(ステップS46;Yes)、重複領域設定部135は、現在のルートノードを分割し、現在のルートノードの上に新ルートノードを作成する(ステップS48)。そして、重複領域設定部135は、領域データ追加処理を終了する。   On the other hand, when it is determined that the parent node to be added is the root node (step S46; Yes), the overlapping area setting unit 135 divides the current root node and creates a new root node on the current root node. (Step S48). Then, the overlapping area setting unit 135 ends the area data adding process.

[重複領域設定処理の手順]
次に、図11のステップS42に示した重複領域設定処理について、図12を参照して説明する。図12は、重複領域設定処理の手順を示すフローチャートである。
[Overlapping area setting procedure]
Next, the overlapping area setting process shown in step S42 of FIG. 11 will be described with reference to FIG. FIG. 12 is a flowchart showing the procedure of the overlapping area setting process.

重複領域設定部135は、領域インデックスDB121に基づいて、ルートノードを選択する(ステップS51)。そして、重複領域設定部135は、選択した選択ノードが葉ノードであるか否かを判定する(ステップS52)。   The overlapping area setting unit 135 selects a root node based on the area index DB 121 (step S51). Then, the overlapping area setting unit 135 determines whether or not the selected node selected is a leaf node (step S52).

選択ノードが葉ノードであると判定した場合(ステップS52;Yes)、重複領域設定部135は、選択ノードにある領域データの内、追加領域と重なる領域データの領域を重複領域として選択する(ステップS53)。一例として、重複領域設定部135は、領域インデックスDB121に基づいて、選択ノードのデータリストを読み出し、読み出したデータリストに含まれる領域データへのポインタ、例えば領域IDを取り出す。そして、重複領域設定部135は、領域データDB122に基づいて、取り出した領域IDの内、追加領域と重なる部分がある領域IDを重複領域として選択する。そして、重複領域設定部135は、ステップS56に移行する。   When it is determined that the selected node is a leaf node (step S52; Yes), the overlapping area setting unit 135 selects, as the overlapping area, an area of the area data that overlaps the additional area from among the area data in the selected node (step S52). S53). As an example, the overlapping area setting unit 135 reads the data list of the selected node based on the area index DB 121, and extracts a pointer to area data included in the read data list, for example, an area ID. Then, based on the area data DB 122, the overlapping area setting unit 135 selects, as an overlapping area, an area ID that has a portion that overlaps the additional area among the extracted area IDs. Then, the overlapping area setting unit 135 proceeds to step S56.

一方、選択ノードが葉ノードでないと判定した場合(ステップS52;No)、重複領域設定部135は、領域インデックスDB121に基づいて、選択ノードの子ノードに追加領域と重なるものがあるか否かを判定する(ステップS54)。選択ノードの子ノードに追加領域と重なるものがあると判定した場合(ステップS54;Yes)、重複領域設定部135は、重なった子ノードを選択候補ノードに加え(ステップS55)、ステップS56に移行する。また、選択ノードの子ノードに追加領域と重なるものがないと判定した場合(ステップS54;No)、重複領域設定部135は、ステップS56に移行する。   On the other hand, when it is determined that the selected node is not a leaf node (step S52; No), the overlapping area setting unit 135 determines whether there is an overlapping area with the additional area among the child nodes of the selected node based on the area index DB 121. Determination is made (step S54). When it is determined that there is an overlapping area in the child node of the selected node (step S54; Yes), the overlapping area setting unit 135 adds the overlapping child node to the selection candidate node (step S55), and proceeds to step S56. To do. On the other hand, when it is determined that no child node of the selected node overlaps the additional area (step S54; No), the overlapping area setting unit 135 proceeds to step S56.

続いて、重複領域設定部135は、全ての選択候補ノードの検索を終えたか否かを判定する(ステップS56)。全ての選択候補ノードの検索を終えていないと判定した場合(ステップS56;No)、重複領域設定部135は、選択候補ノード内の1つの未検索ノードを選択し(ステップS57)、ステップS52に移行する。   Subsequently, the overlapping area setting unit 135 determines whether or not all the selection candidate nodes have been searched (step S56). When it is determined that the search of all selection candidate nodes has not been completed (step S56; No), the overlapping area setting unit 135 selects one unsearched node in the selection candidate nodes (step S57), and the process proceeds to step S52. Transition.

一方、全ての選択候補ノードの検索を終えたと判定した場合(ステップS56;Yes)、重複領域設定部135は、選択済みの重複領域を追加領域の重複領域に追加する(ステップS58)。一例として、重複領域設定部135は、重複領域として選択した領域データを、領域データDB122の追加領域に対応する重複領域122dに追加する。   On the other hand, when it is determined that all the selection candidate nodes have been searched (step S56; Yes), the overlapping area setting unit 135 adds the selected overlapping area to the overlapping area of the additional area (step S58). As an example, the overlapping area setting unit 135 adds the area data selected as the overlapping area to the overlapping area 122 d corresponding to the additional area of the area data DB 122.

さらに、重複領域設定部135は、追加領域を各選択済みの重複領域に重複領域として追加する(ステップS59)。一例として、重複領域設定部135は、追加領域を、領域データDB122の重複領域として選択した各領域データに対応する重複領域122dに追加する。そして、重複領域設定部135は、重複領域設定処理を終了する。   Further, the overlapping area setting unit 135 adds an additional area as an overlapping area to each selected overlapping area (step S59). As an example, the overlapping area setting unit 135 adds the additional area to the overlapping area 122 d corresponding to each area data selected as the overlapping area of the area data DB 122. Then, the overlapping area setting unit 135 ends the overlapping area setting process.

[重複領域設定の具体例]
ここで、重複領域設定の具体例を、図13を参照して説明する。図13は、重複領域設定の具体例を示す図である。なお、図13の例では、選択した葉ノードのデータリストには、領域データとして領域ID「00001」と「00002」とが設定されているものとする。また、追加領域を、領域IDとして「00034」、データ名として「レストランC周辺」、領域情報として「円領域:緯度35.492、緯度139.650、半径100m」とする。
[Specific example of overlapping area setting]
Here, a specific example of overlapping area setting will be described with reference to FIG. FIG. 13 is a diagram illustrating a specific example of the overlapping area setting. In the example of FIG. 13, it is assumed that region IDs “00001” and “00002” are set as region data in the data list of the selected leaf node. Further, the additional area is “00034” as the area ID, “Restaurant C neighborhood” as the data name, and “Circle area: latitude 35.492, latitude 139.650, radius 100 m” as the area information.

重複領域設定部135は、選択した葉ノードにある領域データの内、追加領域と重なる領域データの領域を重複領域として選択する。ここでは、重複領域設定部135は、葉ノードにある領域データとしての領域ID「00001」について、領域に重なる部分があるので、重複領域として選択する。また、重複領域設定部135は、葉ノードにある領域データとしての領域ID「00002」について、領域に重なる部分がないので、重複領域として選択しない。   The overlapping area setting unit 135 selects, as the overlapping area, the area of the area data that overlaps the additional area among the area data in the selected leaf node. Here, since there is a portion that overlaps the region, the overlapping region setting unit 135 selects the overlapping region as the region ID “00001” as the region data in the leaf node. Further, the overlapping area setting unit 135 does not select the overlapping area because there is no overlapping area with respect to the area ID “00002” as the area data in the leaf node.

そして、重複領域設定部135は、重複領域として選択した領域IDを、領域データDB122の追加領域の重複領域の欄に追加する。ここでは、重複領域設定部135は、領域ID「00001」を、領域データDB122の領域ID「00034」に対応する重複領域R1に追加する。   Then, the overlapping area setting unit 135 adds the area ID selected as the overlapping area to the overlapping area column of the additional area of the area data DB 122. Here, the overlapping area setting unit 135 adds the area ID “00001” to the overlapping area R1 corresponding to the area ID “00034” of the area data DB 122.

さらに、重複領域設定部135は、追加領域の領域IDを、領域データDB122の各重複領域の重複領域の欄に追加する。ここでは、重複領域設定部135は、追加領域の領域ID「00034」を、領域データDB122の重複領域の領域ID「00001」に対応する重複領域R2に追加する。   Furthermore, the overlapping area setting unit 135 adds the area ID of the additional area to the overlapping area column of each overlapping area in the area data DB 122. Here, the overlapping area setting unit 135 adds the area ID “00034” of the additional area to the overlapping area R2 corresponding to the area ID “00001” of the overlapping area of the area data DB 122.

このようにして、重複領域設定部135は、追加領域と、追加領域と重複する各重複領域とを、領域データDB122の重複領域の欄に相互に追加するようにした。しかしながら、追加領域が例えば都心から半径10kmの領域のような広い領域であるような場合、追加領域と重複する重複領域の数が極端に多くなることがある。かかる場合には、重複領域設定部135は、追加領域の重複領域の欄に重複領域を追加しないようにして、検索中にその領域が検索結果になった場合にはインデックスDB検索を継続しても良い。重複領域の欄に追加する重複領域の数が極端に多くなると、重複データ検索部134による検索処理に時間を要するからである。   In this way, the overlapping area setting unit 135 adds the additional area and each overlapping area overlapping with the additional area to the overlapping area column of the area data DB 122. However, when the additional region is a wide region such as a region having a radius of 10 km from the city center, the number of overlapping regions overlapping with the additional region may be extremely large. In such a case, the overlapping area setting unit 135 does not add the overlapping area to the overlapping area column of the additional area, and continues the index DB search when the area becomes a search result during the search. Also good. This is because if the number of overlapping areas to be added to the overlapping area column is extremely large, the search processing by the overlapping data search unit 134 takes time.

そこで、重複領域設定部135の処理の変形例として、追加領域と重複する重複領域の数が所定の数以上の場合には、追加領域の重複領域の欄に重複領域を追加しない処理について説明する。なお、所定の数とは、例えば「200」であったり、インデックスツリーの子ノード数の上限値の10倍の数であったり、全領域データ数の0.1%の数であったりするが、これに限定されず、検索処理に遅延をきたさない重複領域の数であれば良い。   Therefore, as a modification of the process of the overlap area setting unit 135, a process for not adding an overlap area to the overlap area column of the add area when the number of overlap areas overlapping with the add area is a predetermined number or more will be described. . The predetermined number is, for example, “200”, 10 times the upper limit of the number of child nodes of the index tree, or 0.1% of the total area data number. However, the number of overlapping regions is not limited to this, and any number of overlapping regions that do not cause a delay in search processing may be used.

[重複領域設定処理の変形例の手順]
図14は、重複領域設定処理の変形例の手順を示すフローチャートである。なお、図12に示す重複領域設定部135の処理と同一の処理S51〜S59については同一符号を示すことで、その重複する処理の説明については省略する。図14に示す重複領域設定部135の処理が図12に示す重複領域設定部135の処理と異なるところは、S61を追加した点にある。
[Procedure of modified example of overlapping area setting process]
FIG. 14 is a flowchart illustrating the procedure of a modified example of the overlapping area setting process. Note that the same processes S51 to S59 as those of the overlapping area setting unit 135 shown in FIG. 12 are denoted by the same reference numerals, and the description of the overlapping processes is omitted. The processing of the overlapping area setting unit 135 shown in FIG. 14 is different from the processing of the overlapping area setting unit 135 shown in FIG. 12 in that S61 is added.

重複領域設定部135は、全ての選択候補ノードの検索を終えたか否かを判定し、全ての選択候補ノードの検索を終えたと判定した場合(ステップS56;Yes)、追加領域と重複する重複領域の数が所定の数以上であるか否かを判定する(ステップS61)。追加領域と重複する重複領域の数が所定の数以上でない場合(ステップS61;No)、重複領域設定部135は、選択済みの重複領域を追加領域の重複領域に追加する(ステップS58)。続いて、重複領域設定部135は、追加領域を各選択済みの重複領域に重複領域として追加する(ステップS59)。   The overlapping area setting unit 135 determines whether or not the search for all selection candidate nodes has been completed, and determines that the search for all selection candidate nodes has been completed (step S56; Yes), the overlapping area overlapping with the additional area It is determined whether the number is equal to or greater than a predetermined number (step S61). If the number of overlapping areas overlapping with the additional area is not equal to or greater than the predetermined number (step S61; No), the overlapping area setting unit 135 adds the selected overlapping area to the overlapping area of the additional area (step S58). Subsequently, the overlapping area setting unit 135 adds an additional area as an overlapping area to each selected overlapping area (step S59).

一方、追加領域と重複する重複領域の数が所定の数以上である場合(ステップS61;Yes)、重複領域設定部135は、選択済みの重複領域を追加領域の重複領域に追加せず、重複領域には特殊値である「重複数過大」と記録する(ステップS62)。そして、重複領域設定部135は、追加領域を各選択済みの重複領域に重複領域として追加する(ステップS59)。   On the other hand, when the number of overlapping areas overlapping with the additional area is equal to or greater than the predetermined number (step S61; Yes), the overlapping area setting unit 135 does not add the selected overlapping area to the overlapping area of the additional area, and overlaps. A special value “overlapping multiple” is recorded in the area (step S62). Then, the overlapping area setting unit 135 adds an additional area as an overlapping area to each selected overlapping area (step S59).

なお、かかる重複領域設定処理によって重複領域に「重複数過大」と記録された領域データ(領域ID)が追加される場合がある。かかる場合に、検索処理が、この領域データを検索結果に追加した場合であっても、この領域データを使わないで領域インデックスDB121を用いた検索を継続するようにする。具体的には、図9Bの検索処理のステップS18では、ツリー検索部133は、該当領域データの内、重複領域の数が最小の領域データを検索結果に追加する。一例として、ツリー検索部133は、領域データDB122に記憶された重複領域122dに基づいて、重複領域の数が最小の領域データ(領域ID)を検索結果に追加する。ここで、ツリー検索部133は、検索結果に「重複数過大」と記録された領域データしかない場合には、この領域データを使わないで領域インデックスDB121を用いた検索を継続すべく、ステップS15に移行すれば良い。   Note that there may be a case where area data (area ID) recorded as “overlapping multiple multiples” is added to the overlapping area by the overlapping area setting process. In this case, even if the search processing adds this area data to the search result, the search using the area index DB 121 is continued without using this area data. Specifically, in step S18 of the search process of FIG. 9B, the tree search unit 133 adds area data having the smallest number of overlapping areas among the corresponding area data to the search result. As an example, the tree search unit 133 adds region data (region ID) having the smallest number of overlapping regions to the search result based on the overlapping region 122d stored in the region data DB 122. Here, if there is only area data recorded as “overlapping multiple” in the search result, the tree search unit 133 does not use this area data, and continues the search using the area index DB 121 in step S15. You should move to.

[実施例1の効果]
上記実施例1によれば、領域検索サーバ1は、領域を探索する際に用いられるインデックス情報であって複数の領域を含む領域情報とともに前記領域を管理するインデックス情報を領域インデックスDB121として記憶部12に記憶する。そして、領域検索サーバ1は、領域インデックスDB121に記憶されたインデックス情報をツリー構造で表したインデックスツリーを用いて、所定の位置を含む領域を検索する。そして、領域検索サーバ1は、該位置を含む領域を検索できた場合、領域データDB122に記憶された重複領域に基づいて、検索できた領域の重複領域の中から該位置を含む領域を検索する。そして、領域検索サーバ1は、検索できた領域の情報を出力する。かかる構成によれば、領域検索サーバ1は、インデックスツリーを用いて、所定の位置を含む領域を検索できた場合、インデックスツリーを用いた検索を終了し、検索できた領域の重複領域を用いた検索に移行することとした。このため、領域検索サーバ1は、インデックスツリーを用いて所定の位置を含む領域を1個検索できれば、検索できた領域の重複領域の中から該位置を含む領域を検索すれば良いので、該位置を含む領域検索の検索時間を高速化できる。
[Effect of Example 1]
According to the first embodiment, the area search server 1 uses the index information used when searching for an area and includes the area information including a plurality of areas as index information for managing the area as the area index DB 121. To remember. Then, the area search server 1 searches for an area including a predetermined position using an index tree that represents the index information stored in the area index DB 121 in a tree structure. Then, when the area search server 1 can search the area including the position, the area search server 1 searches for the area including the position from the overlapping areas of the areas that can be searched based on the overlapping area stored in the area data DB 122. . Then, the area search server 1 outputs information on the area that can be searched. According to such a configuration, the area search server 1 ends the search using the index tree when the area including the predetermined position can be searched using the index tree, and uses the overlapping area of the searched areas. We decided to move to search. For this reason, if the area search server 1 can search for one area including a predetermined position using the index tree, the area search server 1 may search for an area including the position from among the overlapping areas of the searched areas. The search time of area search including can be increased.

ところで、実施例1に係る領域検索サーバ1では、インデックスツリーを用いて問合せ位置を含む領域を検索し、当該領域を検索できた場合、検索できた領域と重複する重複領域を検索対象として検索する場合を説明した。しかしながら、領域検索サーバ1は、これに限定されず、検索できた領域を次回の検索に活かすべく、前回検索できた領域として記録するようにしても良い。そこで、実施例2では、検索できた領域を前回検索できた領域として記録する領域検索サーバ2について説明する。   By the way, in the area search server 1 according to the first embodiment, an area including a query position is searched using an index tree, and when the area can be searched, an overlapping area overlapping with the searched area is searched as a search target. Explained the case. However, the area search server 1 is not limited to this, and the area that has been searched may be recorded as the area that has been searched the last time in order to be used for the next search. Therefore, in the second embodiment, an area search server 2 that records an area that can be searched as an area that was previously searched will be described.

[実施例2に係る領域検索サーバの構成]
図15は、実施例2に係る領域検索サーバの構成を示す機能ブロック図である。なお、図1に示す領域検索サーバ1と同一の構成については同一符号を示すことで、その重複する構成および動作の説明については省略する。実施例1と実施例2とが異なるところは、記憶部12に前回位置DB201を追加した点にある。また、実施例1と実施例2とが異なるところは、制御部13に前回領域検索部202と前回領域記録部203とを追加した点にある。
[Configuration of Area Search Server According to Second Embodiment]
FIG. 15 is a functional block diagram illustrating the configuration of the area search server according to the second embodiment. The same components as those of the area search server 1 shown in FIG. 1 are indicated by the same reference numerals, and the description of the overlapping components and operations is omitted. The difference between the first embodiment and the second embodiment is that the previous position DB 201 is added to the storage unit 12. The difference between the first embodiment and the second embodiment is that a previous area search unit 202 and a previous area recording unit 203 are added to the control unit 13.

前回位置DB201は、前回領域検索要求があったときに検索できた位置情報を当該要求元に対応付けて管理する。ここで、前回位置DB201のデータ構造の一例を、図16を参照して説明する。図16は、前回位置DB201のデータ構造の一例を示す図である。図16に示すように、前回位置DB201は、センサーID201a毎に、前回検索領域201bを対応付けて記憶する。センサーID201aは、領域検索要求の要求元のセンサーの識別IDを示す。前回検索領域201bは、前回領域検索要求があったときに検索できた領域情報を示す。例えば前回検索領域201bには、検索できた場合に検索できた領域の領域IDが記憶され、検索できなかった場合に「未検出」が記憶される。例えば、センサーID201aが「Sensor0001」である場合、前回検索領域201bとして「未検出」と記憶している。また、センサーID201aが「Sensor0002」である場合、前回検索領域201bとして「領域ID00034」と記憶している。   The previous position DB 201 manages position information that can be searched when a previous area search request is made in association with the request source. Here, an example of the data structure of the previous position DB 201 will be described with reference to FIG. FIG. 16 is a diagram illustrating an example of the data structure of the previous position DB 201. As shown in FIG. 16, the previous position DB 201 stores the previous search area 201b in association with each sensor ID 201a. The sensor ID 201a indicates the identification ID of the sensor that has requested the area search request. The previous search area 201b indicates area information that can be searched when a previous area search request is made. For example, in the previous search area 201b, the area ID of the area that can be searched when the search is successful is stored, and “undetected” is stored when the search is not possible. For example, when the sensor ID 201a is “Sensor0001”, “undetected” is stored as the previous search area 201b. Further, when the sensor ID 201a is “Sensor0002”, “region ID00034” is stored as the previous search region 201b.

図15に戻って、前回領域検索部202は、前回領域検索した際に検索できた領域を用いて、所定の位置情報を含む領域を検索する。例えば、前回領域検索部202は、リクエスト受付部131によって受け付けられた領域検索要求の中からセンサーIDおよび位置情報を取り出す。そして、前回領域検索部202は、取り出したセンサーIDの前回検索領域を前回位置DB201に記憶しているか否かを判定する。そして、前回領域検索部202は、センサーIDの前回検索領域を記憶している場合、領域検索要求の中から取り出した位置情報が前回検索領域に含まれるか否かを判定する。そして、前回領域検索部202は、取り出した位置情報が前回検索領域に含まれる場合、当該前回検索領域を検索結果に追加し、前回領域検索部202の検索処理を終了する。その後、重複データ検索部134が、領域データDB122に記憶された重複領域に基づいて、検索結果に対応する重複領域の中から当該位置情報を含む重複領域を検索する。そして、重複データ検索部134は、検索できた重複領域の領域IDを検索結果に追加する。   Returning to FIG. 15, the previous area search unit 202 searches for an area including predetermined position information using the area that was searched when the previous area search was performed. For example, the previous area search unit 202 extracts the sensor ID and the position information from the area search request received by the request reception unit 131. Then, the previous area search unit 202 determines whether or not the previous search area of the extracted sensor ID is stored in the previous position DB 201. When the previous search area of the sensor ID is stored, the previous area search unit 202 determines whether or not the position information extracted from the area search request is included in the previous search area. Then, when the extracted position information is included in the previous search area, the previous area search unit 202 adds the previous search area to the search result, and ends the search process of the previous area search unit 202. Thereafter, based on the overlapping area stored in the area data DB 122, the overlapping data search unit 134 searches for an overlapping area including the position information from among the overlapping areas corresponding to the search results. Then, the duplicate data search unit 134 adds the area ID of the duplicate area that can be searched to the search result.

また、前回領域検索部202は、取り出した位置情報が前回検索領域に含まれない場合、当該位置情報を含む領域をツリー検索部133に検索させる。すなわち、ツリー検索部133が、領域インデックスDB121を用いて、前回検索領域を領域データに持つ葉ノードから当該位置情報を含む領域を検索する。   Further, when the extracted position information is not included in the previous search area, the previous area search unit 202 causes the tree search unit 133 to search for an area including the position information. That is, the tree search unit 133 uses the region index DB 121 to search a region including the position information from leaf nodes having the previous search region as region data.

ツリー検索部133は、葉ノードが持つ領域データの内、当該位置情報を含む領域データがあれば、検索できた領域データを検索結果に追加する。その後、重複データ検索部134が、領域データDB122に記憶された重複領域に基づいて、検索結果に対応する重複領域の中から当該位置情報を含む重複領域を検索する。一方、ツリー検索部133は、葉ノードが持つ領域データの内、当該位置情報を含む領域データがなければ、子ノードからルートノードへノードをボトムアップにノードを順番に辿り、当該位置情報を含むノードを選択する。そして、ツリー検索部133は、選択したノードの子ノードに、当該位置情報を含むものがあるか否かを、領域インデックスDB12を用いて判定する。そして、ツリー検索部133は、当該位置情報を含む子ノードを選択候補ノードとして追加する。そして、ツリー検索部133は、選択候補ノードとして追加されたノードを1つずつ選択し、選択したノードが葉ノードであれば、葉ノードにある領域データの内、当該位置情報を含む領域データがあるか否かを、領域インデックスDB121を用いて判定する。そして、ツリー検索部133は、当該位置情報を含む領域データが1つでもあれば、いずれか1つの領域データを検索結果に追加し、領域インデックスDB121を用いた検索を終了する。その後、重複データ検索部134が、領域データDB122に記憶された重複領域に基づいて、検索結果に対応する重複領域の中から当該位置情報を含む重複領域を検索する。そして、重複データ検索部134は、検索できた重複領域の領域IDを検索結果に追加する。   If there is area data including the position information among the area data of the leaf node, the tree search unit 133 adds the searched area data to the search result. Thereafter, based on the overlapping area stored in the area data DB 122, the overlapping data search unit 134 searches for an overlapping area including the position information from among the overlapping areas corresponding to the search results. On the other hand, if there is no area data including the position information among the area data of the leaf node, the tree search unit 133 sequentially traces the nodes from the child node to the root node in a bottom-up manner and includes the position information. Select a node. Then, the tree search unit 133 uses the region index DB 12 to determine whether there is a child node of the selected node that includes the position information. Then, the tree search unit 133 adds a child node including the position information as a selection candidate node. Then, the tree search unit 133 selects the nodes added as selection candidate nodes one by one, and if the selected node is a leaf node, the region data including the position information is included in the region data in the leaf node. It is determined using the region index DB 121 whether or not there is. Then, if there is at least one region data including the position information, the tree search unit 133 adds any one region data to the search result, and ends the search using the region index DB 121. Thereafter, based on the overlapping area stored in the area data DB 122, the overlapping data search unit 134 searches for an overlapping area including the position information from among the overlapping areas corresponding to the search results. Then, the duplicate data search unit 134 adds the area ID of the duplicate area that can be searched to the search result.

また、前回領域検索部202は、センサーIDの前回検索領域を記憶していない場合、ツリー検索部133および重複データ検索部134による検索処理に移行する。なお、ツリー検索部133および重複データ検索部134によって行われる検索処理については、実施例1で説明したとおりであるので、その説明を省略する。   Further, the previous area search unit 202 shifts to a search process by the tree search unit 133 and the duplicate data search unit 134 when the previous search area of the sensor ID is not stored. Note that the search processing performed by the tree search unit 133 and the duplicate data search unit 134 is as described in the first embodiment, and thus the description thereof is omitted.

前回領域記録部203は、領域検索要求があった要求元のセンサーIDに対応付けて検索結果を前回位置DB201に記録する。ここで、検索結果に検索できた領域IDが複数ある場合がある。かかる場合には、前回領域記録部203は、複数ある領域IDの内、重複領域の数が最小の領域IDを選択し、選択した領域IDを前回位置DB201に記録すれば良い。これにより、次回の領域検索要求で、当該領域検索要求の位置情報が前回記録された領域IDの領域に含まれていれば、続いて行われる当該領域と重複する重複領域に係る検索回数を減らせるからである。   The previous area recording unit 203 records the search result in the previous position DB 201 in association with the sensor ID of the request source that requested the area search. Here, there may be a plurality of area IDs that can be searched in the search result. In such a case, the previous area recording unit 203 may select an area ID having the smallest number of overlapping areas from among a plurality of area IDs, and record the selected area ID in the previous position DB 201. As a result, in the next area search request, if the position information of the area search request is included in the area of the previously recorded area ID, the number of searches related to the overlapping area that overlaps with the area can be reduced. This is because that.

[検索処理の手順]
次に、実施例2に係る検索処理の手順について、図17〜図19を参照して説明する。図17〜図19は、実施例2に係る検索処理の手順を示すフローチャートである。なお、図17〜図19の例では、領域検索要求に含まれる位置情報を検索座標として説明する。
[Search process steps]
Next, a search process procedure according to the second embodiment will be described with reference to FIGS. FIGS. 17 to 19 are flowcharts illustrating the procedure of the search process according to the second embodiment. In the examples of FIGS. 17 to 19, the position information included in the area search request is described as search coordinates.

まず、リクエスト受付部131によって領域検索要求が受け付けられると、前回領域検索部202は、問合せのセンサーIDの前回データ(前回検索領域)を前回位置DB201に記憶しているか否かを判定する(ステップS71)。問合せのセンサーIDの前回データを前回位置DB201に記憶していると判定した場合(ステップS71;Yes)、前回領域検索部202は、検索座標が前回データ内にあるか否かを判定する(ステップS72)。検索座標が前回データ内にある場合(ステップS72;Yes)、前回領域検索部202は、前回データを該当データとして検索結果に追加する(ステップS73)。   First, when an area search request is received by the request receiving unit 131, the previous area search unit 202 determines whether or not the previous data (previous search area) of the inquired sensor ID is stored in the previous position DB 201 (step S71). When it is determined that the previous data of the sensor ID of the inquiry is stored in the previous position DB 201 (step S71; Yes), the previous area search unit 202 determines whether the search coordinates are in the previous data (step). S72). When the search coordinates are in the previous data (step S72; Yes), the previous area search unit 202 adds the previous data as the corresponding data to the search result (step S73).

続いて、重複データ検索部134は、領域データDB122の重複領域122dに基づいて、検索結果に追加した領域データの重複領域から未判定のものを読み出し、読み出した重複領域を1つ選択する(ステップS74)。そして、重複データ検索部134は、選択した重複領域が検索座標を含むか否かを判定する(ステップS75)。選択した重複領域が検索座標を含むと判定した場合(ステップS75;Yes)、重複データ検索部134は、含むと判定した重複領域の領域IDを検索結果に追加し(ステップS76)、ステップS77に移行する。   Subsequently, based on the overlapping region 122d of the region data DB 122, the overlapping data search unit 134 reads an undetermined one from the overlapping regions of the region data added to the search result, and selects one read overlapping region (step) S74). Then, the duplicate data search unit 134 determines whether or not the selected overlap area includes a search coordinate (step S75). When it is determined that the selected overlapping area includes the search coordinates (step S75; Yes), the overlapping data search unit 134 adds the area ID of the overlapping area determined to include (step S76) to step S77. Transition.

一方、選択した重複領域が検索座標を含まないと判定した場合(ステップS75;No)、重複データ検索部134は、全重複領域の判定を終えていない場合(ステップS77;No)、次の重複領域を判定すべく、ステップS74に移行する。一方、重複データ検索部134は、全重複領域の判定を終えた場合(ステップS77;Yes)、作成された検索結果を問合せ側へ返答すべく、レスポンス転送部132に出力する(ステップS78)。そして、前回領域記録部203は、重複データ検索部134によって作成された検索結果の内1つの領域IDを問合せのセンサーIDに対応付けて前回位置DB201に記録し(ステップS79)、検索処理を終了する。   On the other hand, when it is determined that the selected overlapping area does not include the search coordinates (step S75; No), the overlapping data search unit 134 determines that the entire overlapping area has not been determined (step S77; No), and the next overlap. In order to determine the area, the process proceeds to step S74. On the other hand, when the determination of all the overlapping areas is completed (step S77; Yes), the duplicate data search unit 134 outputs the created search result to the response transfer unit 132 in order to reply to the inquiry side (step S78). Then, the previous area recording unit 203 records one area ID of the search results created by the duplicate data search unit 134 in the previous position DB 201 in association with the inquiry sensor ID (step S79), and ends the search process. To do.

ステップS71では、問合せのセンサーIDの前回データを前回位置DB201に記憶していない場合(ステップS71;No)、前回領域検索部202は、ノードをルートノードからトップダウンに辿る検索処理に移行すべく、ステップS11に移行する。   In step S71, when the previous data of the inquired sensor ID is not stored in the previous position DB 201 (step S71; No), the previous area search unit 202 should shift to a search process for tracing the node from the root node to the top down. The process proceeds to step S11.

ステップS72では、検索座標が前回データ内にない場合(ステップS72;No)、前回領域検索部202は、ノードをボトムアップに辿る検索処理に移行すべく、ステップS80に移行する。   In step S72, when the search coordinates are not in the previous data (step S72; No), the previous area search unit 202 shifts to step S80 in order to shift to a search process for tracing the node bottom up.

ステップS80では、ツリー検索部133が、領域インデックスDB121に基づいて、前回データを領域データとしてデータリストに持つ葉ノードまたは親ノードを選択する(ステップS80)。そして、ツリー検索部133は、選択した選択ノードが検索座標を含むか否かを、領域インデックスDB121を用いて判定する(ステップS81)。選択ノードが検索座標を含むと判定した場合(ステップS81;Yes)、ツリー検索部133は、さらにノードを選択ノードからトップダウンに辿る検索処理に移行すべく、ステップS91に移行する。   In step S80, based on the region index DB 121, the tree search unit 133 selects a leaf node or parent node having the previous data in the data list as region data (step S80). Then, the tree search unit 133 determines whether or not the selected selection node includes the search coordinates by using the region index DB 121 (step S81). If it is determined that the selected node includes the search coordinates (step S81; Yes), the tree search unit 133 proceeds to step S91 in order to further shift to a search process that traces the node from the selected node to the top down.

一方、選択ノードが検索座標を含まないと判定した場合(ステップS81;No)、ツリー検索部133は、選択ノードがルートノードであるか否かを、領域インデックスDB121を用いて判定する(ステップS82)。選択ノードがルートノードでなければ(ステップS82;No)、ツリー検索部133は、親ノードを検索すべく、ステップS80に移行する。   On the other hand, when it is determined that the selected node does not include the search coordinates (step S81; No), the tree search unit 133 determines whether or not the selected node is the root node using the region index DB 121 (step S82). ). If the selected node is not the root node (step S82; No), the tree search unit 133 proceeds to step S80 to search for the parent node.

一方、選択ノードがルートノードであれば(ステップS82;Yes)、ツリー検索部133は、検索結果無しとして問合せ側へ返答すべく、レスポンス転送部132に出力する(ステップS83)。そして、前回領域記録部203は、問合せのセンサーIDに対応付けて未検出である旨を前回位置DB201に記録し(ステップS84)、検索処理を終了する。   On the other hand, if the selected node is the root node (step S82; Yes), the tree search unit 133 outputs to the response transfer unit 132 in order to reply to the inquiry side that there is no search result (step S83). Then, the previous area recording unit 203 records in the previous position DB 201 that it has not been detected in association with the inquiry sensor ID (step S84), and ends the search process.

[前回位置DBに前回データを記憶していない場合の検索処理の手順]
次に、図17のステップS71に示した前回位置DB201に前回データを記憶していない場合の検索処理の手順について、図18を参照して説明する。なお、図18に示すように、ステップS11〜ステップS24については、図9と同様の処理手順であるので、その説明を省略する。図9と図18とが異なる点は、前回領域記録部203が検索結果を記録する点にある。
[Procedure for search processing when previous data is not stored in previous position DB]
Next, the procedure of search processing when the previous data is not stored in the previous position DB 201 shown in step S71 of FIG. 17 will be described with reference to FIG. As shown in FIG. 18, steps S11 to S24 are the same processing procedure as in FIG. The difference between FIG. 9 and FIG. 18 is that the previous area recording unit 203 records the search result.

重複データ検索部134が全重複領域の判定を終えると(ステップS22;Yes)、作成された検索結果を問合せ側へ返答すべく、レスポンス転送部132に出力する(ステップS23)。そして、前回領域記録部203は、重複データ検索部134によって作成された検索結果の内1つの領域IDを問合せのセンサーIDに対応付けて前回位置DB201に記録し(ステップS23A)、検索処理を終了する。   When the duplicate data search unit 134 finishes determining all the overlapping regions (step S22; Yes), the created search result is output to the response transfer unit 132 to reply to the inquiry side (step S23). Then, the previous area recording unit 203 records one area ID of the search results created by the duplicate data search unit 134 in association with the inquiry sensor ID in the previous position DB 201 (step S23A), and ends the search process. To do.

また、ツリー検索部133が全ての選択候補ノードの検索を終えると(ステップS15;Yes)、検索結果無しとして問合せ側へ返答すべく、レスポンス転送部132に出力する(ステップS24)。そして、前回領域記録部203は、問合せのセンサーIDに対応付けて未検出である旨を前回位置DB201に記録し(ステップS24A)、検索処理を終了する。   When the tree search unit 133 finishes searching all the selection candidate nodes (step S15; Yes), it outputs to the response transfer unit 132 to reply to the inquiry side that there is no search result (step S24). Then, the previous area recording unit 203 records in the previous position DB 201 that it has not been detected in association with the inquiry sensor ID (step S24A), and ends the search process.

[選択ノードが検索座標を含む場合の検索処理の手順]
次に、図17のステップS81に示した選択ノードが検索座標を含む場合の検索処理の手順について、図19を参照して説明する。
[Procedure for search processing when the selected node contains search coordinates]
Next, the procedure of search processing when the selected node shown in step S81 of FIG. 17 includes search coordinates will be described with reference to FIG.

ツリー検索部133は、検索座標を含む選択ノードが葉ノードであるか否かを、領域インデックスDB121を用いて判定する(ステップS91)。   The tree search unit 133 determines whether the selected node including the search coordinates is a leaf node using the region index DB 121 (step S91).

選択ノードが葉ノードでないと判定した場合(ステップS91;No)、ツリー検索部133は、選択ノードの子ノードに検索座標を含むものがあるか否かを、領域インデックスDB121を用いて判定する(ステップS92)。一例として、ツリー検索部133は、領域インデックスDB121に基づいて、選択ノードの子ノードリストを読み出し、読み出した子ノードリストに含まれるそれぞれの子ノードの矩形領域を読み出す。そして、ツリー検索部133は、読み出したそれぞれの子ノードの矩形領域に、検索座標を含むものがあるか否かを判定する。   When it is determined that the selected node is not a leaf node (step S91; No), the tree search unit 133 determines whether or not there is a child node of the selected node that includes the search coordinates using the region index DB 121 ( Step S92). As an example, the tree search unit 133 reads the child node list of the selected node based on the region index DB 121, and reads the rectangular region of each child node included in the read child node list. Then, the tree search unit 133 determines whether or not the read rectangular area of each child node includes a search coordinate.

選択ノードの子ノードに検索座標を含むものがあると判定した場合(ステップS92;Yes)、ツリー検索部133は、検索座標を含む子ノードを選択候補ノードに追加し(ステップS93)、ステップS94に移行する。一方、選択ノードの子ノードに検索座標を含むものがないと判定した場合(ステップS92;No)、ツリー検索部133は、ステップS94に移行する。   If it is determined that there is a child node of the selected node that includes the search coordinate (step S92; Yes), the tree search unit 133 adds the child node including the search coordinate to the selection candidate node (step S93), and step S94. Migrate to On the other hand, when it is determined that no child node of the selected node includes the search coordinate (step S92; No), the tree search unit 133 proceeds to step S94.

続いて、ツリー検索部133は、全ての選択候補ノードの検索を終えたか否かを判定する(ステップS94)。全ての選択候補ノードの検索を終えていないと判定した場合(ステップS94;No)、ツリー検索部133は、選択候補ノード内の1つの未検索ノードを選択し(ステップS95)、ステップS91に移行する。   Subsequently, the tree search unit 133 determines whether or not all selection candidate nodes have been searched (step S94). When it is determined that the search of all selection candidate nodes has not been completed (step S94; No), the tree search unit 133 selects one unsearched node in the selection candidate nodes (step S95), and proceeds to step S91. To do.

ステップS91では、選択ノードが葉ノードであると判定した場合(ステップS91;Yes)、ツリー検索部133は、選択した葉ノードが持つ領域データの内、検索座標を含むものがあるか否かを判定する(ステップS96)。一例として、ツリー検索部133は、領域インデックスDB121に基づいて、葉ノードであるノードのデータリストを読み出し、読み出したデータリストに含まれる領域データへのポインタ、例えば領域IDを取り出す。そして、ツリー検索部133は、領域データDB122に基づいて、取り出した領域IDに対応する領域情報122cに検索座標を含むものがあるか否かを判定する。   If it is determined in step S91 that the selected node is a leaf node (step S91; Yes), the tree search unit 133 determines whether or not there is a region including the search coordinates in the area data of the selected leaf node. Determination is made (step S96). As an example, the tree search unit 133 reads a data list of nodes that are leaf nodes based on the region index DB 121, and extracts a pointer to the region data included in the read data list, for example, a region ID. Then, based on the area data DB 122, the tree search unit 133 determines whether there is an area information 122c corresponding to the extracted area ID that includes the search coordinates.

選択した葉ノードが持つ領域データの内、検索座標を含むものがないと判定した場合(ステップS96;No)、ツリー検索部133は、次の選択候補ノードを検索すべく、ステップS94に移行する。   If it is determined that none of the area data held by the selected leaf node includes the search coordinates (step S96; No), the tree search unit 133 proceeds to step S94 to search for the next selection candidate node. .

一方、選択した葉ノードが持つ領域データの内、検索座標を含むものがあると判定した場合(ステップS96;Yes)、ツリー検索部133は、該当領域データの内の1つを該当データとして検索結果に追加する(ステップS97)。ここで、領域インデックスDB121を用いた検索を終了し、ステップS74に移行する。なお、ツリー検索部133は、該当領域データの内の1つとして、重複領域の数が最小の領域データを検索結果に追加しても良い。これは、ステップS74以降の重複データ検索部134の処理において、さらに検索座標を含む領域を検索する際、検索対象となる重複領域の数を減らすためである。   On the other hand, if it is determined that there is the area data included in the selected leaf node that includes the search coordinates (step S96; Yes), the tree search unit 133 searches one of the area data as the corresponding data. It adds to a result (step S97). Here, the search using the region index DB 121 is terminated, and the process proceeds to step S74. Note that the tree search unit 133 may add region data with the smallest number of overlapping regions to the search result as one of the corresponding region data. This is to reduce the number of overlapping areas to be searched when searching for an area further including the search coordinates in the processing of the overlapping data search unit 134 after step S74.

ステップS94では、全ての選択候補ノードの検索を終えたと判定した場合(ステップS94;Yes)、ツリー検索部133は、選択ノードに検索座標を含むものがないので、さらに親ノードから検索すべく、ステップS80に移行する。   In step S94, when it is determined that the search of all selection candidate nodes has been completed (step S94; Yes), the tree search unit 133 does not include a search coordinate in the selected node. Control goes to step S80.

このようにして、重複領域設定部135は、領域検索要求の検索座標(位置情報)を領域データに含む場合に、当該領域データを前回位置DB201に記録するようにした。また、ツリー検索部133は、検索座標(位置情報)を領域データに全く含まない場合に、未検出である旨を前回位置DB201に記録するようにした。しかしながら、ツリー検索部133は、検索座標(位置情報)を領域データに全く含まない場合であっても、検索座標を含むノードがあれば、当該ノードの内最も深いノード(最深ノード)を前回位置DB201に記録するようにしても良い。これは、次回の領域検索要求の際、前回の検索座標を含むノードの内最深ノードから領域検索を行うことで、領域検索にヒットする確率を高くできるとともに、且つ検索回数を減らすことができる可能性があるからである。   In this way, the overlapping area setting unit 135 records the area data in the previous position DB 201 when the area coordinates include the search coordinates (position information) of the area search request. In addition, when the search coordinate (position information) is not included in the area data at all, the tree search unit 133 records that it has not been detected in the previous position DB 201. However, even if the tree search unit 133 does not include any search coordinates (position information) in the region data, if there is a node including the search coordinates, the tree search unit 133 sets the deepest node (deepest node) among the nodes to the previous position. You may make it record in DB201. This is because it is possible to increase the probability of hitting an area search and reduce the number of searches by performing an area search from the deepest node among the nodes including the previous search coordinates at the time of the next area search request. Because there is sex.

[検索処理の変形例の手順]
図20、図21は、実施例に係る検索処理の変形例の手順を示すフローチャートである。なお、図17に示す検索処理と同一の処理S71〜S83については同一符号を示すことで、その重複する処理の説明については省略する。また、図19に示す、選択ノードが検索座標を含む場合の検索処理と同一の処理S91〜S97については同一符号を示すことで、その重複する処理の説明については省略する。
[Procedure of modified search process]
20 and 21 are flowcharts illustrating the procedure of a modification of the search process according to the embodiment. In addition, about the process S71-S83 same as the search process shown in FIG. 17, the description is abbreviate | omitted by showing the same code | symbol. In addition, the same processes S91 to S97 as the search process in the case where the selected node includes the search coordinates shown in FIG. 19 are denoted by the same reference numerals, and the description of the overlapping processes is omitted.

図20に示す検索処理が図17に示す検索処理と異なる点は、S91、S92を追加した点にある。図20に示すように、前回領域検索部202は、問合せのセンサーIDの前回データ(前回検索領域)を前回位置DB201に記憶しているか否かを判定する(ステップS71)。問合せのセンサーIDの前回データを前回位置DB201に記憶していると判定した場合(ステップS71;Yes)、前回領域検索部202は、前回データが領域データ(領域ID)か否かを判定する(ステップS91)。前回データが領域データである場合には(ステップS91;Yes)、前回領域検索部202は、ステップS72に移行する。一方、前回データが領域データでない場合には(ステップS91;No)、前回領域検索部202は、前回データのノードを選択し(ステップS92)、ステップS81に移行する。   The search process shown in FIG. 20 is different from the search process shown in FIG. 17 in that S91 and S92 are added. As shown in FIG. 20, the previous area search unit 202 determines whether or not the previous data (previous search area) of the inquired sensor ID is stored in the previous position DB 201 (step S71). When it is determined that the previous data of the sensor ID of the inquiry is stored in the previous position DB 201 (step S71; Yes), the previous area search unit 202 determines whether the previous data is area data (area ID) ( Step S91). If the previous data is area data (step S91; Yes), the previous area search unit 202 proceeds to step S72. On the other hand, when the previous data is not area data (step S91; No), the previous area search unit 202 selects the node of the previous data (step S92), and proceeds to step S81.

また、図20に示す検索処理が図17に示す検索処理と異なる点は、S121〜S123を追加した点にある。図20に示すように、ツリー検索部133は、選択ノードがルートノードであるか否かを、領域インデックスDB121を用いて判定する(ステップS82)。選択ノードがルートノードでなければ(ステップS82;No)、ツリー検索部133は、親ノードを検索すべく、ステップS80に移行する。一方、選択ノードがルートノードであれば(ステップS82;Yes)、ツリー検索部133は、検索結果無しとして問合せ側へ返答すべく、レスポンス転送部132に出力する(ステップS83)。そして、前回領域記録部203は、最深該当ノードがあるか否かを判定する(ステップS121)。最深該当ノードがあれば(ステップS121;Yes)、前回領域記録部203は、前回位置DB201に最深該当ノードを問合せのセンサーIDに対応付けて記録し(ステップS122)、検索処理を終了する。一方、最深該当ノードがなければ(ステップS121;No)、前回領域記録部203は、問合せのセンサーIDに対応付けて未検出である旨を前回位置DB201に記録し(ステップS123)、検索処理を終了する。   Further, the search process shown in FIG. 20 is different from the search process shown in FIG. 17 in that S121 to S123 are added. As illustrated in FIG. 20, the tree search unit 133 determines whether or not the selected node is a root node by using the region index DB 121 (step S82). If the selected node is not the root node (step S82; No), the tree search unit 133 proceeds to step S80 to search for the parent node. On the other hand, if the selected node is the root node (step S82; Yes), the tree search unit 133 outputs to the response transfer unit 132 in order to reply to the inquiry side that there is no search result (step S83). Then, the previous area recording unit 203 determines whether or not there is the deepest applicable node (step S121). If there is the deepest applicable node (step S121; Yes), the previous area recording unit 203 records the deepest applicable node in the previous position DB 201 in association with the inquired sensor ID (step S122), and ends the search process. On the other hand, if there is no deepest applicable node (step S121; No), the previous area recording unit 203 records in the previous position DB 201 that it has not been detected in association with the sensor ID of the inquiry (step S123), and performs the search process. finish.

図21に示す、選択ノードが検索座標を含む場合の検索処理が図19に示す、同様の検索処理と異なる点は、S101、S102を追加した点にある。図21に示すように、ツリー検索部133は、選択ノードが最深該当ノードより深いか否かを判定する(ステップS101)。選択ノードが最深該当ノードより深い場合には(ステップS101;Yes)、ツリー検索部133は、選択ノードを最深該当ノードとして一時的に記憶部12に記録し(ステップS102)、ステップS91に移行する。一方、選択ノードが最深該当ノードより深くない場合には(ステップS101;No)、ツリー検索部133は、ステップS91に移行する。   The search process when the selected node includes the search coordinates shown in FIG. 21 is different from the similar search process shown in FIG. 19 in that S101 and S102 are added. As shown in FIG. 21, the tree search unit 133 determines whether or not the selected node is deeper than the deepest corresponding node (step S101). If the selected node is deeper than the deepest relevant node (step S101; Yes), the tree search unit 133 temporarily records the selected node as the deepest relevant node in the storage unit 12 (step S102), and proceeds to step S91. . On the other hand, when the selected node is not deeper than the deepest corresponding node (step S101; No), the tree search unit 133 proceeds to step S91.

また、図21に示す、選択ノードが検索座標を含む場合の検索処理が図19に示す、同様の検索処理と異なる点は、S103、S104を追加した点にある。図21に示すように、選択ノードが葉ノードでない場合(ステップS91;No)且つ選択ノードの子ノードに検索座標を含むものがある場合(ステップS92;Yes)、ツリー検索部133は、以下の処理を行う。ツリー検索部133は、検索座標を含む子ノードを選択候補ノードに追加し(ステップS93)、当該子ノードが最深該当ノードより深いか否かを判定する(ステップS103)。そして、当該子ノードが最深該当ノードより深い場合(ステップS103;Yes)、ツリー検索部133は、子ノードを最深該当ノードとして一時的に記憶部12に記録し(ステップS104)、ステップS94に移行する。一方、当該子ノードが最深該当ノードより深くない場合(ステップS103;No)、ツリー検索部133は、ステップS94に移行する。   21 is different from the similar search process shown in FIG. 19 in that the search process when the selected node includes search coordinates is that S103 and S104 are added. As shown in FIG. 21, when the selected node is not a leaf node (step S91; No) and when there is a child node of the selected node that includes a search coordinate (step S92; Yes), the tree search unit 133 Process. The tree search unit 133 adds a child node including the search coordinates to the selection candidate node (step S93), and determines whether the child node is deeper than the deepest corresponding node (step S103). If the child node is deeper than the deepest applicable node (step S103; Yes), the tree search unit 133 temporarily records the child node as the deepest applicable node in the storage unit 12 (step S104), and proceeds to step S94. To do. On the other hand, when the child node is not deeper than the deepest corresponding node (step S103; No), the tree search unit 133 proceeds to step S94.

[最深ノードの説明]
ここで、最深ノードの具体例について、図22を参照して説明する。図22は、最深ノードの具体例を説明する図である。図22に示すように、ルートノードR0は、中間ノードR1〜R4の矩形領域を全て含む矩形領域であり、中間ノードR1は、子ノードR5〜R8の矩形領域を全て含む矩形領域である。領域検索要求の位置情報をP0で示す検索座標とすると、検索座標P0は、ルートノードR0に含まれ、且つ中間ノードR1に含まれている。ところが、検索座標P0は、中間ノードR2〜R4や、中間ノードR1に含まれる子ノードR5〜R8に含まれない。そこで、ツリー検索部133は、最深ノードを、検索座標P0を含むノードの内最も深いノードであるR1とする。そして、前回領域記録部203は、前回位置DB201に最深ノードR1を領域検索要求のセンサーIDに対応付けて記録する。
[Description of deepest node]
Here, a specific example of the deepest node will be described with reference to FIG. FIG. 22 is a diagram illustrating a specific example of the deepest node. As shown in FIG. 22, the root node R0 is a rectangular area including all the rectangular areas of the intermediate nodes R1 to R4, and the intermediate node R1 is a rectangular area including all of the rectangular areas of the child nodes R5 to R8. If the position information of the area search request is a search coordinate indicated by P0, the search coordinate P0 is included in the root node R0 and included in the intermediate node R1. However, the search coordinate P0 is not included in the intermediate nodes R2 to R4 or the child nodes R5 to R8 included in the intermediate node R1. Therefore, the tree search unit 133 sets the deepest node as R1 which is the deepest node among the nodes including the search coordinates P0. Then, the previous area recording unit 203 records the deepest node R1 in the previous position DB 201 in association with the sensor ID of the area search request.

[実施例2の効果]
上記実施例2によれば、領域検索サーバ2は、所定の位置を含む領域検索要求を取得すると、該位置が前回検索できた領域に含まれるか否かを判定する。そして、領域検索サーバ2は、判定の結果、該位置が前回検索できた領域に含まれると判定された場合、領域データDB122に基づいて、含まれると判定された領域の重複領域の中から該位置を含む領域を検索する。かかる構成によれば、領域検索サーバ2は、次回の領域検索を前回検索できた領域から行うこととした。仮に、領域検索要求を行う要求元が領域の大きさに対して小さい移動距離しか移動しないような場合には、次回の領域検索要求の位置が前回検索できた領域の近傍にある可能性が高くなる。このため、領域検索サーバ2は、前回検索できた領域から次回の領域検索を行うことにより次回の位置を含む領域検索の検索時間を高速化できる。
[Effect of Example 2]
According to the second embodiment, when the area search server 2 obtains an area search request including a predetermined position, the area search server 2 determines whether or not the position is included in an area that has been previously searched. Then, as a result of the determination, when it is determined that the position is included in the previously searched area, the area search server 2 selects the area from the overlapping areas of the areas determined to be included based on the area data DB 122. Search for the area containing the location. According to such a configuration, the area search server 2 performs the next area search from the area where the previous search was successful. If the requester who makes an area search request moves only a small moving distance with respect to the size of the area, the position of the next area search request is likely to be in the vicinity of the area where the previous search was possible. Become. For this reason, the area search server 2 can speed up the search time of the area search including the next position by performing the next area search from the previously searched area.

また、上記実施例2によれば、領域検索サーバ2は、所定の位置を含む領域検索要求を取得すると、該位置が前回検索できた領域に含まれるか否かを判定する。そして、領域検索サーバ2は、判定の結果、該位置が前回検索できた領域に含まれないと判定された場合、ツリー構造を形成するノードの中で、含まれないと判定された領域を含むインデックスの葉ノードから該位置を含む領域を検索する。そして、領域検索サーバ2は、該位置を含む領域を検索できた場合、検索できた情報の重複領域の中から該位置を含む領域を検索する。かかる構成によれば、領域検索サーバ2は、次回の領域検索を前回検索できた領域から行うこととした。仮に、領域検索要求を行う要求元が領域の大きさに対して小さい移動距離しか移動しないような場合には、次回の領域検索要求の位置が前回検索できた領域の近傍にある可能性が高くなる。このため、領域検索サーバ2は、次回の領域検索要求の位置が前回検索できた領域に含まれていなくても、当該位置が前回検索できた領域の近傍を含むインデックスの葉ノードから次回の領域検索を行うことにより次回の位置を含む領域検索の検索時間を高速化できる。   Further, according to the second embodiment, when the area search server 2 obtains an area search request including a predetermined position, the area search server 2 determines whether or not the position is included in an area that has been previously searched. Then, as a result of the determination, if it is determined that the position is not included in the previously searched area, the area search server 2 includes an area determined not to be included in the nodes forming the tree structure. A region including the position is searched from the leaf node of the index. Then, when the area search server 2 can search for the area including the position, the area search server 2 searches for the area including the position from the overlapping areas of the searched information. According to such a configuration, the area search server 2 performs the next area search from the area where the previous search was successful. If the requester who makes an area search request moves only a small moving distance with respect to the size of the area, the position of the next area search request is likely to be in the vicinity of the area where the previous search was possible. Become. For this reason, even if the position of the next area search request is not included in the previous search area, the area search server 2 starts the next area from the leaf node of the index including the vicinity of the area in which the previous position can be searched. By performing the search, the search time for the area search including the next position can be increased.

[領域検索の検索回数の比較結果]
ここで、ルートノードから検索を開始した場合と、前回検索できた領域から検索を開始した場合との領域検索の検索回数の比較結果を、図23を参照して説明する。図23は、検索回数の比較結果を説明する図である。図23に示すように、Rツリーは、深さ5のインデックスツリーである。そして、ルートノードR0は、深さが1のノードR1等の矩形領域を全て含む矩形領域である。ノードR1は、深さが2のノードR2等の矩形領域を全て含む矩形領域である。ノードR2は、深さが3のノードR3等の矩形領域を全て含む矩形領域である。ノードR3は、深さが4のノードRA、RBの矩形領域を全て含む矩形領域である。ノードRAは、A1、A2、A3の領域データを含む。ノードRBは、B1、B2、B3の領域データを含む。そして、A2は、A1、A3、B1と重複する重複領域である。A3は、A1、A2、B1と重複する重複領域である。
[Comparison result of area search frequency]
Here, a comparison result of the number of search times of the area search when the search is started from the root node and when the search is started from the area that has been searched last time will be described with reference to FIG. FIG. 23 is a diagram for explaining a comparison result of the number of searches. As shown in FIG. 23, the R-tree is an index tree having a depth of 5. The root node R0 is a rectangular area including all rectangular areas such as the node R1 having a depth of 1. The node R1 is a rectangular area including all rectangular areas such as the node R2 having a depth of 2. The node R2 is a rectangular area including all rectangular areas such as the node R3 having a depth of 3. The node R3 is a rectangular area including all the rectangular areas of the nodes RA and RB having a depth of 4. The node RA includes area data of A1, A2, and A3. The node RB includes region data of B1, B2, and B3. A2 is an overlapping area overlapping with A1, A3, and B1. A3 is an overlapping area overlapping with A1, A2, and B1.

まず、領域検索サーバ2は、最初にP2の位置を含む領域検索要求の領域検索を行った結果、P2の位置を含む領域データA2、B1の内、A2を前回検索領域として前回位置DB201に記録したものとする。そして、領域検索サーバ2は、次回、P3の位置を含む領域検索要求の領域検索を行うとする。すると、領域検索サーバ2によって行われる検索回数N1は、以下のようになる。
N1=1(A2)+3(A2の重複領域)=4
すなわち、N1は、P3の位置がA2の領域に含まれるかを検索する1回と、P3の位置がA2の領域に含まれているので、A2の領域と重複する重複領域A1、A3、B1にP3の位置が含まれているかを検索する3回とを加算した値4となる。
First, as a result of the area search of the area search request including the position of P2 first, the area search server 2 records A2 as the previous search area in the previous position DB 201 among the area data A2 and B1 including the position of P2. Shall be. Then, it is assumed that the area search server 2 performs the area search of the area search request including the position of P3 next time. Then, the number of searches N1 performed by the area search server 2 is as follows.
N1 = 1 (A2) +3 (overlapping area of A2) = 4
That is, N1 searches once whether the position of P3 is included in the area of A2, and since the position of P3 is included in the area of A2, overlapping areas A1, A3, B1 overlapping with the area of A2 The value 4 is obtained by adding 3 times to search whether or not the position of P3 is included.

一方、ルートノードから検索を開始した場合には、検索回数O1は、以下のようになる。なお、各ノードの子ノードが3であるとする。
O1=4×3(R0〜R3)+3(RA)+3(RB)=18
すなわち、O1には、R0〜R3の4個のノードについて各子ノードの数(3)分P3の位置が各ノードに含まれるかを検索する12回が設定される。さらに、P3の位置がRA、RBに含まれているので、RAに含まれる3個の領域データにP3の位置が含まれているかを検索する3回をO1に加算した15回が設定される。さらに、RBに含まれる3個の領域データにP3の位置が含まれているかを検索する3回をO1に加算した18回が設定される。
On the other hand, when the search is started from the root node, the search count O1 is as follows. It is assumed that the child node of each node is 3.
O1 = 4 × 3 (R0 to R3) +3 (RA) +3 (RB) = 18
That is, 12 times for searching whether each node includes the position of P3 by the number of child nodes (3) for the four nodes R0 to R3 is set in O1. Furthermore, since the position of P3 is included in RA and RB, 15 times obtained by adding 3 times for searching whether the position of P3 is included in the three area data included in RA to O1 is set. . Furthermore, 18 times obtained by adding 3 times for searching whether the position of P3 is included in the 3 area data included in the RB to O1 is set.

領域検索サーバ2が次回の領域検索を行った結果、P3の位置を含む領域データA1、A2、A3、B1の内、A2を前回検索領域として前回位置DB201に記録したものとする。そして、領域検索サーバ2は、さらに次回、P4の位置を含む領域検索要求の領域検索を行うとする。すると、領域検索サーバ2によって行われる検索回数N2は、以下のようになる。
N2=1(A2)+3(RA)+3(A3の重複領域)=7
すなわち、N2には、P4の位置がA2の領域に含まれるかを検索する1回が設定される。さらに、P4の位置がA2の領域に含まれていないので、A2のノードRAに含まれる3個の領域データにP4の位置が含まれているかを検索する3回をN2に加算した4回が設定される。さらに、P4の位置がA3の領域に含まれているので、A3の領域と重複する重複領域A1、A2、B1にP4の位置が含まれているかを検索する3回をN2に加算した7回が設定される。一方、ルートノードから検索を開始した場合には、検索回数O1、すなわち18回となる。
As a result of the area search server 2 performing the next area search, it is assumed that A2 of the area data A1, A2, A3, B1 including the position of P3 is recorded in the previous position DB 201 as the previous search area. Then, it is assumed that the area search server 2 performs the area search of the area search request including the position of P4 next time. Then, the number of searches N2 performed by the area search server 2 is as follows.
N2 = 1 (A2) +3 (RA) +3 (overlapping area of A3) = 7
That is, N2 is set once to search whether the position of P4 is included in the area of A2. Further, since the position of P4 is not included in the area of A2, four times obtained by adding 3 times to search for whether the position of P4 is included in the three area data included in the node RA of A2 are added to N2. Is set. Furthermore, since the position of P4 is included in the area of A3, 7 times of adding 3 to the search for whether the position of P4 is included in the overlapping areas A1, A2, and B1 overlapping with the area of A3 is added to N2. Is set. On the other hand, when the search is started from the root node, the number of searches is O1, that is, 18 times.

このようにして、領域検索サーバ2は、前回検索領域から次回の領域検索を行うことにより次回の位置を含む領域検索の検索回数を、ルートノードから検索を開始した場合の検索回数より少なくでき、検索時間を高速化できる。   In this way, the area search server 2 can perform the next area search from the previous search area so that the number of area searches including the next position can be less than the number of searches when the search is started from the root node, Search time can be increased.

なお、重複領域設定部135の処理の変形例として、追加領域と重複する重複領域が所定の数以上の場合には、追加領域の重複領域の欄に重複領域を追加しないようにした。しかしながら、重複領域設定部135は、これに限定されず、追加領域と重複する重複領域が所定の数以上の場合には、追加領域の重複領域の欄に「重複領域数過多」である旨の情報を追加するようにしても良い。   Note that, as a modification of the processing of the overlapping area setting unit 135, when the number of overlapping areas overlapping with the additional area is a predetermined number or more, the overlapping area is not added to the overlapping area column of the additional area. However, the overlapping area setting unit 135 is not limited to this, and when the number of overlapping areas overlapping with the additional area is equal to or greater than a predetermined number, the overlap area column of the additional area indicates “excessive number of overlapping areas”. Information may be added.

また、前回位置DB201は、センサーID201aと前回検索領域201とを対応付けるものとして説明した。しかしながら、前回位置DB201は、センサーID201aを、例えば、領域検索を要求する端末装置の装置IDに代えても良いし、領域検索を要求する携帯電話の携帯電話番号に代えても良い。すなわち、センサーID201aに相当するIDは、ユースケース毎に変えることができる。   Further, the previous position DB 201 has been described as associating the sensor ID 201a with the previous search area 201. However, in the previous position DB 201, the sensor ID 201a may be replaced with, for example, the device ID of the terminal device that requests the area search, or may be replaced with the mobile phone number of the mobile phone that requests the area search. That is, the ID corresponding to the sensor ID 201a can be changed for each use case.

また、ツリー検索部133は、検索座標(位置情報)を領域データに全く含まない場合であっても、検索座標を含むノードがあれば、当該ノードの内最も深いノード(最深ノード)を前回位置DB201に記録するようにした。ここで、同じ深さで複数の最深ノードが存在する場合がある。かかる場合には、ツリー検索部133は、例えば最深ノード毎に有する子ノードの数が最小の最深ノードを前回位置DB201に記録すれば良い。また、別の例では、ツリー検索部133は、最深ノード毎に有する矩形領域の面積あたりの子ノードの数が最小の最深ノードを前回位置DB201に記録する。具体的には、ツリー検索部133は、最深ノード毎に、子ノードリストの子ノード数を矩形領域の面積で割った値を算出し、算出した値が最小の最深ノードを選択し、選択した最深ノードを前回位置DB201に記録する。つまり、次回の検索量が少なくなるノードであることが望ましいのである。   Moreover, even if the search coordinates (position information) are not included in the region data at all, if there is a node including the search coordinates, the tree search unit 133 sets the deepest node (deepest node) among the nodes as the previous position. Recorded in DB201. Here, there may be a plurality of deepest nodes at the same depth. In such a case, the tree search unit 133 may record, for example, the deepest node having the smallest number of child nodes for each deepest node in the previous position DB 201. In another example, the tree search unit 133 records the deepest node having the smallest number of child nodes per area of the rectangular area for each deepest node in the previous position DB 201. Specifically, the tree search unit 133 calculates, for each deepest node, a value obtained by dividing the number of child nodes in the child node list by the area of the rectangular area, selects the deepest node with the smallest calculated value, and selects The deepest node is recorded in the previous position DB 201. In other words, it is desirable for the node to have a small amount of next search.

[プログラムなど]
なお、領域検索サーバ1、2は、既知のパーソナルコンピュータ、ワークステーションなどの情報処理装置に、上記したツリー検索部133、重複データ検索部134などの各機能を搭載することによって実現することができる。
[Programs]
The area search servers 1 and 2 can be realized by mounting each function such as the tree search unit 133 and the duplicate data search unit 134 on an information processing apparatus such as a known personal computer or workstation. .

また、図示した各装置の各構成要素は、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的態様は図示のものに限られず、その全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。例えば、ツリー検索部133と重複データ検索部134とを1個の部として統合しても良い。一方、ツリー検索部133を、葉ノードにおける検索処理と葉ノード以外のノードにおける検索処理とに分散しても良い。また、領域データDB122などの記憶部を領域検索サーバ1、2の外部装置としてネットワーク経由で接続するようにしても良い。   In addition, each component of each illustrated apparatus does not necessarily need to be physically configured as illustrated. That is, the specific mode of distribution / integration of each device is not limited to that shown in the figure, and all or a part thereof may be functionally or physically distributed or arbitrarily distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured. For example, the tree search unit 133 and the duplicate data search unit 134 may be integrated as one unit. On the other hand, the tree search unit 133 may be distributed to search processing in leaf nodes and search processing in nodes other than leaf nodes. Further, a storage unit such as the region data DB 122 may be connected as an external device of the region search servers 1 and 2 via a network.

また、上記実施例で説明した各種の処理は、あらかじめ用意されたプログラムをパーソナルコンピュータやワークステーションなどのコンピュータで実行することによって実現することができる。そこで、以下では、図1に示した領域検索サーバ1と同様の機能を実現する領域検索プログラムを実行するコンピュータの一例を説明する。図24は、領域検索プログラムを実行するコンピュータの一例を示す図である。   The various processes described in the above embodiments can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. Therefore, in the following, an example of a computer that executes an area search program that implements the same function as the area search server 1 illustrated in FIG. 1 will be described. FIG. 24 is a diagram illustrating an example of a computer that executes an area search program.

図24に示すように、コンピュータ200は、各種演算処理を実行するCPU201と、ユーザからのデータの入力を受け付ける入力装置202と、ディスプレイ203を有する。また、コンピュータ200は、記憶媒体からプログラム等を読取る読み取り装置204と、ネットワークを介して他のコンピュータとの間でデータの授受を行うインタフェース装置205とを有する。また、コンピュータ200は、各種情報を一時記憶するRAM206と、ハードディスク装置207を有する。そして、各装置201〜207は、バス208に接続される。   As illustrated in FIG. 24, the computer 200 includes a CPU 201 that executes various arithmetic processes, an input device 202 that receives input of data from a user, and a display 203. The computer 200 also includes a reading device 204 that reads a program and the like from a storage medium, and an interface device 205 that exchanges data with other computers via a network. The computer 200 also includes a RAM 206 that temporarily stores various information and a hard disk device 207. The devices 201 to 207 are connected to the bus 208.

ハードディスク装置207は、領域検索プログラム207a、重複領域設定プログラム207bを記憶する。CPU201は、各プログラム207a〜207bを読み出して、RAM206に展開する。領域検索プログラム207aは、領域検索プロセス206aとして機能する。重複領域設定プログラム207bは、重複領域設定プロセス206bとして機能する。   The hard disk device 207 stores an area search program 207a and an overlapping area setting program 207b. The CPU 201 reads out each program 207 a-207 b and develops it in the RAM 206. The area search program 207a functions as an area search process 206a. The overlapping area setting program 207b functions as an overlapping area setting process 206b.

例えば、領域検索プロセス206aは、ツリー検索部133および重複データ検索部134に対応する。重複領域設定プロセス206bは、重複領域設定部135に対応する。   For example, the area search process 206 a corresponds to the tree search unit 133 and the duplicate data search unit 134. The overlapping area setting process 206 b corresponds to the overlapping area setting unit 135.

なお、各プログラム207a〜207bについては、必ずしも最初からハードディスク装置207に記憶させておかなくてもよい。例えば、コンピュータ200に挿入されるフレキシブルディスク(FD)、CD−ROM、DVDディスク、光磁気ディスク、ICカードなどの「可搬用の物理媒体」に各プログラムを記憶させておく。そして、コンピュータ200がこれらから各プログラム207a〜207bを読み出して実行するようにしても良い。   Note that the programs 207a to 207b are not necessarily stored in the hard disk device 207 from the beginning. For example, each program is stored in a “portable physical medium” such as a flexible disk (FD), a CD-ROM, a DVD disk, a magneto-optical disk, and an IC card inserted into the computer 200. Then, the computer 200 may read and execute each of the programs 207a to 207b from these.

以上の実施例1〜2を含む実施形態に関し、さらに以下の付記を開示する。   The following appendices are further disclosed with respect to the embodiments including Examples 1 and 2 described above.

(付記1)コンピュータが
領域を探索する際に用いられるインデックス情報であって複数の領域を含む領域情報とともに前記領域を管理するインデックス情報をツリー構造で表したインデックスツリーを用いて、所定の位置を含む領域を検索し、
該位置を含む領域を検索できた場合、複数の領域のそれぞれについて領域と重複する重複領域の情報を記憶した記憶部に基づいて、検索できた領域の重複領域の中から該位置を含む領域を検索し、
検索できた領域の情報を出力する
ことを実行する領域検索方法。
(Supplementary Note 1) Index information used when a computer searches for an area and including index information for managing the area together with area information including a plurality of areas, using an index tree representing a predetermined position, Search for the containing area,
When the area including the position can be searched, the area including the position is selected from the overlapping areas of the searched areas based on the storage unit storing the information of the overlapping area overlapping the area for each of the plurality of areas. Search and
An area search method that outputs information on areas that can be searched.

(付記2)所定の位置を含む領域の問合せ要求を取得すると、該位置が前回検索できた領域に含まれるか否かを判定し、
判定の結果、該位置が前回検索できた領域に含まれると判定された場合、前記記憶部に基づいて、含まれると判定された領域の重複領域の中から該位置を含む領域を検索することを特徴とする付記1に記載の領域検索方法。
(Supplementary Note 2) When an inquiry request for an area including a predetermined position is acquired, it is determined whether or not the position is included in the area that was previously searched,
As a result of the determination, when it is determined that the position is included in the area that can be searched last time, an area including the position is searched from the overlapping areas determined to be included based on the storage unit. The region search method according to appendix 1, characterized by:

(付記3)前記判定の結果、該位置が前回検索できた領域に含まれないと判定された場合、前記ツリー構造を形成するノードの中で、含まれないと判定された領域を含むインデックス情報の葉ノードから該位置を含む領域を検索し、
該位置を含む領域を検索できた場合、検索できた情報の重複領域の中から該位置を含む領域を検索することを特徴とする付記2に記載の領域検索方法。
(Supplementary Note 3) When it is determined that the position is not included in the previously searched area as a result of the determination, the index information includes the area determined not to be included in the nodes forming the tree structure. Search the area containing the position from the leaf node,
The area search method according to appendix 2, wherein when the area including the position can be searched, the area including the position is searched from the overlapping areas of the searched information.

(付記4)前記領域を検索する処理において、検索できた領域が複数ある場合、複数ある領域の内、重複領域の数が最も小さい領域を選択することを特徴とする付記2または付記3に記載の領域検索方法。 (Additional remark 4) In the process which searches the said area | region, when there are two or more areas which were able to be searched, the area | region with the smallest number of overlapping areas is selected from several areas, The additional remark 2 or the additional remark 3 characterized by the above-mentioned Area search method.

(付記5)前記記憶部に記憶する処理は、領域と重複する重複領域が所定の値を超える場合、当該領域に関する重複領域の情報を記憶しないことを特徴とする付記1に記載の領域検索方法。 (Supplementary note 5) The region search method according to supplementary note 1, wherein the process of storing in the storage unit does not store the information of the overlapping region relating to the region when the overlapping region overlapping the region exceeds a predetermined value .

(付記6)コンピュータに、
領域を探索する際に用いられるインデックス情報であって複数の領域を含む領域情報とともに前記領域を管理するインデックス情報をツリー構造で表したインデックスツリーを用いて、所定の位置を含む領域を検索し、
該位置を含む領域を検索できた場合、複数の領域のそれぞれについて領域と重複する重複領域の情報を記憶した記憶部に基づいて、検索できた領域の重複領域の中から該位置を含む領域を検索し、
検索できた領域の情報を出力する
各処理を実行させることを特徴とする領域検索プログラム。
(Appendix 6)
Using the index tree that represents the index information used when searching for the area and the area information including a plurality of areas and the index information for managing the area in a tree structure, the area including the predetermined position is searched,
When the area including the position can be searched, the area including the position is selected from the overlapping areas of the searched areas based on the storage unit storing the information of the overlapping area overlapping the area for each of the plurality of areas. Search and
An area search program that outputs information on areas that can be searched and that executes each process.

(付記7)複数の領域のそれぞれについて領域と重複する重複領域の情報を記憶した記憶部と、
領域を探索する際に用いられるインデックス情報であって複数の領域を含む領域情報とともに前記領域を管理するインデックス情報をツリー構造で表したインデックスツリーを用いて、所定の位置を含む領域を検索する第1の検索部と、
前記第1の検索部によって該位置を含む領域を検索できた場合、前記記憶部に基づいて、検索できた領域の重複領域の中から該位置を含む領域を検索する第2の検索部と、
前記第1の検索部および前記第2の検索部によって検索できた領域の情報を出力する出力部と
を有することを特徴とする情報処理装置。
(Additional remark 7) The memory | storage part which memorize | stored the information of the overlapping area which overlaps with an area | region about each of several area | region,
The index information used when searching for an area, and using the index tree representing the index information for managing the area in a tree structure together with the area information including a plurality of areas, the area including the predetermined position is searched. 1 search part,
A second search unit that searches for an area including the position from among the overlapping areas of the areas that can be searched based on the storage unit when the first search unit can search the area including the position;
An information processing apparatus comprising: an output unit that outputs information on an area that can be searched by the first search unit and the second search unit.

1、2 領域検索サーバ
11 通信インタフェース
12 記憶部
121 領域インデックスDB
122 領域データDB
13 制御部
131 リクエスト受付部
132 レスポンス転送部
133 ツリー検索部
134 重複データ検索部
135 重複領域設定部
201 前回位置DB
202 前回領域検索部
203 前回領域記録部
1, 2 area search server 11 communication interface 12 storage unit 121 area index DB
122 Area data DB
DESCRIPTION OF SYMBOLS 13 Control part 131 Request reception part 132 Response transfer part 133 Tree search part 134 Duplicate data search part 135 Duplicate area setting part 201 Previous position DB
202 Previous area search unit 203 Previous area recording unit

Claims (6)

コンピュータが
領域を探索する際に用いられるインデックス情報であって複数の領域を含む領域情報とともに前記領域を管理するインデックス情報をツリー構造で表したインデックスツリーを用いて、所定の位置を含む領域を検索し、
該位置を含む領域を検索できた場合、複数の領域のそれぞれについて他の領域と一部が重複する場合の当該他の領域を示す重複領域の情報を記憶した記憶部に基づいて、検索できた領域と重複する重複領域の中から該位置を含む領域を検索し、
検索できた領域の情報を出力する
ことを実行する領域検索方法。
A search is made for an area including a predetermined position by using an index tree which is index information used when a computer searches for an area and which includes a plurality of areas and index information for managing the area in a tree structure. And
When the area including the position can be searched, the search can be performed based on the storage unit storing the information of the overlapping area indicating the other area when a part of the plurality of areas overlaps with the other area . Search for the area containing the position from the overlapping areas that overlap with the area,
An area search method that outputs information on areas that can be searched.
所定の位置を含む領域の問合せ要求を取得すると、該位置が前回検索できた領域に含まれるか否かを判定し、
判定の結果、該位置が前回検索できた領域に含まれると判定された場合、前記記憶部に基づいて、含まれると判定された領域の重複領域の中から該位置を含む領域を検索することを特徴とする請求項1に記載の領域検索方法。
When an inquiry request for an area including a predetermined position is acquired, it is determined whether or not the position is included in the area that was previously searched,
As a result of the determination, when it is determined that the position is included in the area that can be searched last time, an area including the position is searched from the overlapping areas determined to be included based on the storage unit. The region search method according to claim 1.
前記判定の結果、該位置が前回検索できた領域に含まれないと判定された場合、前記ツリー構造を形成するノードの中で、含まれないと判定された領域を含むインデックス情報の葉ノードから該位置を含む領域を検索し、
該位置を含む領域を検索できた場合、検索できた情報の重複領域の中から該位置を含む領域を検索することを特徴とする請求項2に記載の領域検索方法。
As a result of the determination, when it is determined that the position is not included in the area that was previously searched, from the leaf nodes of the index information including the area determined not to be included among the nodes that form the tree structure Search for the area containing the position,
3. The area search method according to claim 2, wherein, when an area including the position can be searched, an area including the position is searched from an overlapping area of the searched information.
前記領域を検索する処理において、検索できた領域が複数ある場合、複数ある領域の内、重複領域の数が最も小さい領域を選択することを特徴とする請求項2または請求項3に記載の領域検索方法。   4. The region according to claim 2, wherein when there are a plurality of regions that can be searched in the process of searching for the region, the region having the smallest number of overlapping regions is selected from the plurality of regions. retrieval method. コンピュータに、
領域を探索する際に用いられるインデックス情報であって複数の領域を含む領域情報とともに前記領域を管理するインデックス情報をツリー構造で表したインデックスツリーを用いて、所定の位置を含む領域を検索し、
該位置を含む領域を検索できた場合、複数の領域のそれぞれについて他の領域と一部が重複する場合の当該他の領域を示す重複領域の情報を記憶した記憶部に基づいて、検索できた領域と重複する重複領域の中から該位置を含む領域を検索し、
検索できた領域の情報を出力する
各処理を実行させることを特徴とする領域検索プログラム。
On the computer,
Using the index tree that represents the index information used when searching for the area and the area information including a plurality of areas and the index information for managing the area in a tree structure, the area including the predetermined position is searched,
When the area including the position can be searched, the search can be performed based on the storage unit storing the information of the overlapping area indicating the other area when a part of the plurality of areas overlaps with the other area . Search for the area containing the position from the overlapping areas that overlap with the area,
An area search program that outputs information on areas that can be searched and that executes each process.
複数の領域のそれぞれについて他の領域と一部が重複する場合の当該他の領域を示す重複領域の情報を記憶した記憶部と、
領域を探索する際に用いられるインデックス情報であって複数の領域を含む領域情報とともに前記領域を管理するインデックス情報をツリー構造で表したインデックスツリーを用いて、所定の位置を含む領域を検索する第1の検索部と、
前記第1の検索部によって該位置を含む領域を検索できた場合、前記記憶部に基づいて、検索できた領域と重複する重複領域の中から該位置を含む領域を検索する第2の検索部と、
前記第1の検索部および前記第2の検索部によって検索できた領域の情報を出力する出力部と
を有することを特徴とする情報処理装置。
A storage unit that stores information on an overlapping area indicating the other area when a part of each of the plurality of areas overlaps with another area ;
The index information used when searching for an area, and using the index tree representing the index information for managing the area in a tree structure together with the area information including a plurality of areas, the area including the predetermined position is searched. 1 search part,
A second search unit that searches for an area including the position from an overlapping area that overlaps the searched area based on the storage unit when the first search unit can search the area including the position; When,
An information processing apparatus comprising: an output unit that outputs information on an area that can be searched by the first search unit and the second search unit.
JP2011160299A 2011-07-21 2011-07-21 Region search method, region search program, and information processing apparatus Expired - Fee Related JP5776403B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011160299A JP5776403B2 (en) 2011-07-21 2011-07-21 Region search method, region search program, and information processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011160299A JP5776403B2 (en) 2011-07-21 2011-07-21 Region search method, region search program, and information processing apparatus

Publications (2)

Publication Number Publication Date
JP2013025591A JP2013025591A (en) 2013-02-04
JP5776403B2 true JP5776403B2 (en) 2015-09-09

Family

ID=47783863

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011160299A Expired - Fee Related JP5776403B2 (en) 2011-07-21 2011-07-21 Region search method, region search program, and information processing apparatus

Country Status (1)

Country Link
JP (1) JP5776403B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6065708B2 (en) * 2013-03-28 2017-01-25 富士通株式会社 Information processing method, apparatus and program
JP6086021B2 (en) * 2013-04-25 2017-03-01 富士通株式会社 Search system and search method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3501957B2 (en) * 1998-08-28 2004-03-02 日本電信電話株式会社 Location related information search method
JP2001109760A (en) * 1999-10-06 2001-04-20 Toshiba Corp Device for displaying geographical information and storage medium with program executing the same stored therein
US7493565B2 (en) * 2000-12-22 2009-02-17 Microsoft Corporation Environment-interactive context-aware devices and methods
WO2004013776A2 (en) * 2002-08-05 2004-02-12 Metacarta, Inc. Desktop client interaction with a geographic text search system
JP5237837B2 (en) * 2009-01-07 2013-07-17 株式会社日立製作所 Spatial data management device, spatial data management method, and spatial data management program
JP5446799B2 (en) * 2009-12-04 2014-03-19 ソニー株式会社 Information processing apparatus, information processing method, and program
US20110239163A1 (en) * 2009-12-04 2011-09-29 Daisuke Mochizuki Display screen control method, graphical user interface, information processing apparatus, information processing method, and program

Also Published As

Publication number Publication date
JP2013025591A (en) 2013-02-04

Similar Documents

Publication Publication Date Title
US20070192301A1 (en) Systems and methods for indexing and searching data records based on distance metrics
US20130054647A1 (en) Information processing apparatus, information processing method, and program
CN107690637B (en) Connecting semantically related data using large-table corpus
CN102316167B (en) Website recommending method, system thereof and network server
US20130159347A1 (en) Automatic and dynamic design of cache groups
CN102073733B (en) Method and device for managing Hash table
Rahman et al. Hdbscan: Density based clustering over location based services
CN117235285B (en) Method and device for fusing knowledge graph data
CN113779286B (en) Method and device for managing graph data
US20070130139A1 (en) Search system for providing information of keyword input freguency by category and method thereof
CN108897698B (en) File data block addressing method, system and equipment and storage medium
JP5776403B2 (en) Region search method, region search program, and information processing apparatus
CN114840487A (en) Metadata management method and device for distributed file system
JP6086021B2 (en) Search system and search method
JP2010277329A (en) Neighborhood retrieval device
CN103514224A (en) Method for processing data in database, data query method and corresponding device
JP5845818B2 (en) Region search method, region search program, and information processing apparatus
WO2019228009A1 (en) Lsm tree optimization method and device and computer equipment
KR101687755B1 (en) Method for providing Dynamic Service of Spatial Information
CN114297381A (en) Text processing method, device, equipment and storage medium
JP5765253B2 (en) Area search method, area search program, and information processing apparatus
JP6176107B2 (en) Information collection program, information collection method, and information collection apparatus
KR20220099745A (en) A spatial decomposition-based tree indexing and query processing methods and apparatus for geospatial blockchain data retrieval
JP6167531B2 (en) Region search method, region index construction method, and region search device
US20020078133A1 (en) Information collection apparatus and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140404

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140930

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141028

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141225

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150622

R150 Certificate of patent or registration of utility model

Ref document number: 5776403

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees