JP6702582B2 - Database management system and database management method - Google Patents

Database management system and database management method Download PDF

Info

Publication number
JP6702582B2
JP6702582B2 JP2019089167A JP2019089167A JP6702582B2 JP 6702582 B2 JP6702582 B2 JP 6702582B2 JP 2019089167 A JP2019089167 A JP 2019089167A JP 2019089167 A JP2019089167 A JP 2019089167A JP 6702582 B2 JP6702582 B2 JP 6702582B2
Authority
JP
Japan
Prior art keywords
node
query
temporary
maximum value
minimum value
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.)
Active
Application number
JP2019089167A
Other languages
Japanese (ja)
Other versions
JP2019179555A (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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2019089167A priority Critical patent/JP6702582B2/en
Publication of JP2019179555A publication Critical patent/JP2019179555A/en
Application granted granted Critical
Publication of JP6702582B2 publication Critical patent/JP6702582B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明の実施形態は、データベース管理システムおよびデータベース管理方法に関する。 Embodiments of the present invention relate to a database management system and a database management method.

従来、クライアント端末からクエリを受信する上位ノードと、上位ノードによって受信されたクエリに基づく処理を実行してデータを取得する複数の下位ノードとを備える分散型のデータベース管理システムが知られている。下位ノードは、クエリに基づく処理を実行して取得したデータを上位ノードに送信し、上位ノードは、下位ノードから受信したデータを、クエリの送信元であるクライアント端末に送信する。 Conventionally, there is known a distributed database management system including an upper node that receives a query from a client terminal and a plurality of lower nodes that perform processing based on the query received by the upper node and acquire data. The lower node transmits the data acquired by executing the process based on the query to the upper node, and the upper node transmits the data received from the lower node to the client terminal which is the transmission source of the query.

しかしながら、データベース管理システムにおいては、下位ノードにおける処理の負荷が高くなり、データベース管理システムのパフォーマンスが低下する場合があった。 However, in the database management system, the processing load on the lower node is increased, and the performance of the database management system may be degraded.

国際公開第2016/027451号International Publication No. 2016/027451 特開2015−170239号公報JP, 2005-170239, A

本発明が解決しようとする課題は、パフォーマンスが低下するのを抑制することができるデータベース管理システムおよびデータベース管理方法を提供することである。 The problem to be solved by the present invention is to provide a database management system and a database management method capable of suppressing a decrease in performance.

実施形態のデータベース管理システムは、第1ノードと、複数の第2ノードとを持つ。前記第1ノードは、データを要求するクエリをクライアント端末から受信し、受信した前記クエリを条件に応じて複数の第2ノードのいずれかに送信する。前記第2ノードは、前記第2ノードが保持するデータの範囲を包含する範囲情報を前記第1ノードに送信する。前記第2ノードは、前記第1ノードから受信した前記クエリに基づく処理を実行してデータを取得し、取得したデータを前記第1ノードに送信する。前記第1ノードは、前記第2ノードに保持されるデータの範囲を示す範囲情報を前記第2ノードから取得して保持し、前記クエリの検索対象のデータの範囲が前記範囲情報によって示される範囲にない場合、前記第2ノードに前記クエリを転送しない。 The database management system of the embodiment has a first node and a plurality of second nodes. The first node receives a query requesting data from a client terminal, and transmits the received query to any of a plurality of second nodes according to conditions. The second node transmits range information including a range of data held by the second node to the first node. The second node executes a process based on the query received from the first node to acquire data, and transmits the acquired data to the first node. The first node acquires range information indicating a range of data held by the second node from the second node and holds the range information, and a range of data to be searched by the query is a range indicated by the range information. Otherwise, do not forward the query to the second node.

第1実施形態に係るデータベース管理システム10の全体構成を示すブロック図。The block diagram which shows the whole structure of the database management system 10 which concerns on 1st Embodiment. 第1実施形態に係る上位ノード200と下位ノード300の動作を説明するためのブロック図。The block diagram for demonstrating operation|movement of the upper node 200 and the lower node 300 which concern on 1st Embodiment. 第1実施形態に係る記憶部350に記憶されたテーブルT1の一例を示す図。The figure which shows an example of the table T1 memorize|stored in the memory|storage part 350 which concerns on 1st Embodiment. 第1実施形態に係る記憶部230に記憶されたテーブルT2(インデックス)の一例を示す図。The figure which shows an example of the table T2 (index) memorize|stored in the memory|storage part 230 which concerns on 1st Embodiment. 第1実施形態に係る記憶部350に記憶されたテーブルT3(インデックスの更新履歴)の一例を示す図。The figure which shows an example of the table T3 (index update history) memorize|stored in the memory|storage part 350 which concerns on 1st Embodiment. 第1実施形態に係るクエリ処理を示すシーケンス図。The sequence diagram which shows the query process which concerns on 1st Embodiment. 第1実施形態に係るクエリ受付処理の詳細を示すフローチャート。The flowchart which shows the detail of the query reception process which concerns on 1st Embodiment. 第1実施形態に係るインデックス更新処理の詳細を示すフローチャート。6 is a flowchart showing details of index update processing according to the first embodiment. 第1実施形態に係る仮最大値/仮最小値の更新処理の詳細を示すフローチャート。5 is a flowchart showing details of temporary maximum value/temporary minimum value update processing according to the first embodiment. 第1実施形態に係る精度無視ビット数nの更新処理の詳細を示すフローチャート。6 is a flowchart showing details of update processing of the precision neglected bit number n according to the first embodiment. 第2実施形態に係るクエリ受付処理(拡張版)の詳細を示すフローチャート。The flowchart which shows the detail of the query reception process (extended version) which concerns on 2nd Embodiment. 第2実施形態に係る最大値取得処理の詳細を示すフローチャート。The flowchart which shows the detail of the maximum value acquisition process which concerns on 2nd Embodiment. 第2実施形態に係る最小値取得処理の詳細を示すフローチャート。The flowchart which shows the detail of the minimum value acquisition process which concerns on 2nd Embodiment.

以下、実施形態のデータベース管理システムおよびデータベース管理方法を、図面を参照して説明する。 Hereinafter, a database management system and a database management method according to embodiments will be described with reference to the drawings.

(第1実施形態)
図1は、第1実施形態に係るデータベース管理システム10の全体構成を示すブロック図である。データベース管理システム10は、データベース管理装置200(以降、上位ノードと称す)と、複数のデータベース管理装置300(以降、下位ノードと称す)とを備える。図1において、3つの下位ノード300−1、300−2、および300−3が示されているが、下位ノードの数はこれに限られない。例えば、データベース管理システム10は、4つ以上の下位ノード300を備えてもよい。
(First embodiment)
FIG. 1 is a block diagram showing the overall configuration of a database management system 10 according to the first embodiment. The database management system 10 includes a database management device 200 (hereinafter, referred to as an upper node) and a plurality of database management devices 300 (hereinafter, referred to as lower nodes). Although three lower nodes 300-1, 300-2, and 300-3 are shown in FIG. 1, the number of lower nodes is not limited to this. For example, the database management system 10 may include four or more subordinate nodes 300.

上位ノード200は、ネットワークNW1を介して複数の下位ノード300−1から300−3に接続されている。ネットワークNW1は、例えば、WAN(Wide Area Network)やLAN(Local Area Network)、インターネット、プロバイダ装置、無線基地局、専用回線などのうち一部または全部を含む。 The upper node 200 is connected to the plurality of lower nodes 300-1 to 300-3 via the network NW1. The network NW1 includes, for example, a part or all of a WAN (Wide Area Network), a LAN (Local Area Network), the Internet, a provider device, a wireless base station, and a dedicated line.

クライアント端末100は、ネットワークNW2を介して上位ノード200に接続されている。ネットワークNW2は、例えば、WANやLAN、インターネット、プロバイダ装置、無線基地局、専用回線などのうち一部または全部を含む。 The client terminal 100 is connected to the upper node 200 via the network NW2. The network NW2 includes, for example, a part or all of a WAN, a LAN, the Internet, a provider device, a wireless base station, a dedicated line, and the like.

クライアント端末100は、ユーザによって用いられ、データを要求するクエリを上位ノード200に送信するコンピュータである。クライアント端末100は、デスクトップ型のコンピュータであるが、これに限られない。例えば、クライアント端末100は、ノート型のコンピュータ、タブレット端末、またはPDA(Personal Digital Assistant)であってもよい。 The client terminal 100 is a computer used by a user to send a query requesting data to the upper node 200. The client terminal 100 is a desktop computer, but is not limited to this. For example, the client terminal 100 may be a notebook computer, a tablet terminal, or a PDA (Personal Digital Assistant).

上位ノード200は、クライアント端末100からクエリを受信するコンピュータである。上位ノード200は、デスクトップ型のコンピュータであるが、これに限られない。例えば、上位ノード200は、ノート型のコンピュータ、タブレット端末、またはPDAであってもよい。 The upper node 200 is a computer that receives a query from the client terminal 100. The upper node 200 is a desktop computer, but is not limited to this. For example, the upper node 200 may be a notebook computer, a tablet terminal, or a PDA.

下位ノード300−1、300−2、および300−3は、上位ノード200によって受信されたクエリに基づく処理を実行して、データを取得するコンピュータである。下位ノード300−1、300−2、および300−3は、デスクトップ型のコンピュータであるが、これに限られない。例えば、下位ノード300−1、300−2、および300−3は、ノート型のコンピュータ、タブレット端末、またはPDAであってもよい。 The lower nodes 300-1, 300-2, and 300-3 are computers that execute processing based on the query received by the upper node 200 to acquire data. The lower nodes 300-1, 300-2, and 300-3 are desktop computers, but are not limited thereto. For example, the subordinate nodes 300-1, 300-2, and 300-3 may be notebook computers, tablet terminals, or PDAs.

図2は、第1実施形態に係る上位ノード200と下位ノード300の動作を説明するためのブロック図である。下位ノード300−1、300−2、および300−3は同様の動作を行うため、図2においては、これらをまとめて下位ノード300として説明する。 FIG. 2 is a block diagram for explaining operations of the upper node 200 and the lower node 300 according to the first embodiment. Since the lower nodes 300-1, 300-2, and 300-3 perform similar operations, they are collectively described as the lower node 300 in FIG.

上位ノード200は、クエリ実行部210と、インデックス管理部220と、記憶部230と、通信部240とを備える。クエリ実行部210およびインデックス管理部220は、CPU(Central Processing Unit)等のプロセッサが、記憶部230に記憶されたプログラムを実行することで実現される。なお、クエリ実行部210およびインデックス管理部220は、プロセッサがプログラムを実行するのと同様の機能を有するLSI(Large Scale Integration)、ASIC(Application Specific Integrated Circuit)、およびFPGA(Field-Programmable Gate Array)等のハードウェアにより実現されてもよい。 The upper node 200 includes a query execution unit 210, an index management unit 220, a storage unit 230, and a communication unit 240. The query execution unit 210 and the index management unit 220 are realized by a processor such as a CPU (Central Processing Unit) executing a program stored in the storage unit 230. The query execution unit 210 and the index management unit 220 have an LSI (Large Scale Integration), an ASIC (Application Specific Integrated Circuit), and an FPGA (Field-Programmable Gate Array), which have the same function as a processor executes a program. It may be realized by hardware such as.

記憶部230は、例えば、RAM(Random Access Memory)、ROM(Read Only Memory)、HDD(Hard Disk Drive)、フラッシュメモリ、またはこれらのうち複数が組み合わされたハイブリッド型記憶装置などにより実現される。また、記憶部230の一部または全部は、NAS(Network Attached Storage)や外部のストレージサーバなど、上位ノード200がアクセス可能な外部装置であってもよい。通信部240は、例えば、NIC(Network Interface Card)によって実現される。 The storage unit 230 is realized by, for example, a RAM (Random Access Memory), a ROM (Read Only Memory), a HDD (Hard Disk Drive), a flash memory, or a hybrid storage device in which a plurality of these are combined. Further, part or all of the storage unit 230 may be an external device such as a NAS (Network Attached Storage) or an external storage server that can be accessed by the upper node 200. The communication unit 240 is realized by, for example, a NIC (Network Interface Card).

下位ノード300は、通信部310と、クエリ実行部320と、テーブル管理部330と、インデックス管理部340と、記憶部350と、インデックス通知判定部360とを備える。クエリ実行部320、テーブル管理部330、インデックス管理部340、およびインデックス通知判定部360は、CPU等のプロセッサが、記憶部350に記憶されたプログラムを実行することで実現される。なお、クエリ実行部320、テーブル管理部330、インデックス管理部340、およびインデックス通知判定部360は、プロセッサがプログラムを実行するのと同様の機能を有するLSI、ASIC、およびFPGA等のハードウェアにより実現されてもよい。 The lower node 300 includes a communication unit 310, a query execution unit 320, a table management unit 330, an index management unit 340, a storage unit 350, and an index notification determination unit 360. The query execution unit 320, the table management unit 330, the index management unit 340, and the index notification determination unit 360 are realized by a processor such as a CPU executing a program stored in the storage unit 350. The query execution unit 320, the table management unit 330, the index management unit 340, and the index notification determination unit 360 are realized by hardware such as an LSI, an ASIC, and an FPGA, which have the same function as the processor executes the program. May be done.

通信部310は、例えば、NICによって実現される。記憶部350は、例えば、RAM、ROM、HDD、フラッシュメモリ、またはこれらのうち複数が組み合わされたハイブリッド型記憶装置などにより実現される。また、記憶部350の一部または全部は、NASや外部のストレージサーバなど、下位ノード300がアクセス可能な外部装置であってもよい。 The communication unit 310 is realized by, for example, a NIC. The storage unit 350 is realized by, for example, a RAM, a ROM, a HDD, a flash memory, or a hybrid storage device in which a plurality of these are combined. Further, part or all of the storage unit 350 may be an external device accessible by the lower node 300, such as a NAS or an external storage server.

記憶部350には、例えば、不図示のセンサから出力されたデータ(センサ値)が蓄積される。記憶部350に記憶されるデータは、センサ値に限られず、どのようなデータであってもよい。なお、記憶部350には、テーブル形式でデータが記憶されている。 The storage unit 350 stores, for example, data (sensor value) output from a sensor (not shown). The data stored in the storage unit 350 is not limited to the sensor value and may be any data. The storage unit 350 stores data in a table format.

図3は、第1実施形態に係る記憶部350に記憶されたテーブルT1の一例を示す図である。テーブルT1は、記録時刻とセンサ値とが対応付けられたテーブルである。記録時刻とは、センサ値が記憶部350に記録された時刻である。 FIG. 3 is a diagram showing an example of the table T1 stored in the storage unit 350 according to the first embodiment. The table T1 is a table in which the recording time and the sensor value are associated with each other. The recording time is the time when the sensor value is recorded in the storage unit 350.

記憶部350は、センサ値が入力される度に、記録時刻とセンサ値とが対応付けられたレコードを、テーブルT1に追加する。なお、テーブルT1に含まれるレコード数が予め定められた上限値に到達すると、記録時刻が最も古いレコードが、テーブルT1から削除される。 The storage unit 350 adds a record in which the recording time and the sensor value are associated with each other, to the table T1 each time the sensor value is input. When the number of records included in the table T1 reaches a predetermined upper limit value, the record having the oldest recording time is deleted from the table T1.

一方、上位ノード200の記憶部230には、複数の下位ノード300それぞれについてのインデックスがテーブル形式で記憶されている。インデックスとは、下位ノード300に保持されるデータの範囲を示す範囲情報である。 On the other hand, the storage unit 230 of the upper node 200 stores indexes for each of the plurality of lower nodes 300 in a table format. The index is range information indicating a range of data held in the lower node 300.

図4は、第1実施形態に係る記憶部230に記憶されたテーブルT2(インデックス)の一例を示す図である。テーブルT2は、ノードIDと、仮最大値と、仮最小値と、精度無視ビット数nとが対応付けられたテーブルである。 FIG. 4 is a diagram illustrating an example of the table T2 (index) stored in the storage unit 230 according to the first embodiment. The table T2 is a table in which a node ID, a provisional maximum value, a provisional minimum value, and the precision neglected bit number n are associated with each other.

ノードIDとは、下位ノード300を識別するための識別情報である。仮最大値は、下位ノード300に記憶されているデータの仮の最大値を示す情報である。仮最小値は、下位ノード300に記憶されているデータの仮の最小値を示す情報である。精度無視ビット数nは、仮最大値および仮最小値を算出する際に実行される丸め処理で用いられる値である。詳細は後述するが、丸め処理においては、最大値の下位nビットの値を(n+1)ビット目に繰り上げることにより仮最大値が求められ、最小値の下位nビットの値を切り捨てることにより仮最小値が求められる。 The node ID is identification information for identifying the lower node 300. The temporary maximum value is information indicating the temporary maximum value of the data stored in the lower node 300. The temporary minimum value is information indicating the temporary minimum value of the data stored in the lower node 300. The precision neglected bit number n is a value used in the rounding process executed when calculating the provisional maximum value and the provisional minimum value. As will be described later in detail, in the rounding process, the provisional maximum value is obtained by raising the value of the lower n bits of the maximum value to the (n+1)th bit, and the provisional minimum value is obtained by truncating the value of the lower n bits of the minimum value. Value is required.

まず、クエリ処理について説明する。上位ノード200がクライアント端末100からクエリを受信すると、クエリ実行部210は、下位ノード300のインデックスを要求するためのインデックス要求をインデックス管理部220に出力する。インデックス管理部220は、クエリ実行部210から入力されたインデックス要求に基づき、記憶部230からテーブルT2(インデックス)を読み出す。その後、インデックス管理部220は、記憶部230から読み出したインデックスを、クエリ実行部210に出力する。 First, the query processing will be described. When the upper node 200 receives the query from the client terminal 100, the query execution unit 210 outputs an index request for requesting the index of the lower node 300 to the index management unit 220. The index management unit 220 reads the table T2 (index) from the storage unit 230 based on the index request input from the query execution unit 210. After that, the index management unit 220 outputs the index read from the storage unit 230 to the query execution unit 210.

クエリ実行部210は、インデックス管理部220から入力されたインデックスに基づき、複数の下位ノード300のそれぞれに対して、クエリの検索対象であるデータの範囲の少なくとも一部が、下位ノード300に保持されるデータの範囲に含まれるか否かを判定する。具体的に、クエリ実行部210は、クエリの検索対象であるデータの範囲の少なくとも一部が、インデックスに含まれる仮最小値以上かつ仮最大値以下の範囲に含まれるか否かを判定する。 Based on the index input from the index management unit 220, the query execution unit 210 holds at least a part of the range of data that is the search target of the query in the lower node 300 for each of the plurality of lower nodes 300. Whether the data is included in the range of data Specifically, the query execution unit 210 determines whether or not at least a part of the range of data that is the search target of the query is included in the range that is greater than or equal to the temporary minimum value and less than or equal to the temporary maximum value included in the index.

クエリ実行部210は、クエリの検索対象であるデータの範囲の少なくとも一部が、下位ノード300に保持されるデータの範囲に含まれないと判定した場合、クエリを通信部240に出力しない。このため、通信部240は、クエリを下位ノード300に送信しない。これによって、クエリの検索対象のデータを保持しない下位ノード300がクエリを実行するのを防止できるため、下位ノード300における処理の負荷を軽減することができる。 The query execution unit 210 does not output the query to the communication unit 240 when determining that at least a part of the range of the data to be searched for by the query is not included in the range of the data held in the lower node 300. Therefore, the communication unit 240 does not send the query to the lower node 300. As a result, it is possible to prevent the lower-level node 300 that does not hold the search target data of the query from executing the query, and thus it is possible to reduce the processing load on the lower-level node 300.

一方、クエリ実行部210は、クエリの検索対象であるデータの範囲の少なくとも一部が、下位ノード300に保持されるデータの範囲に含まれると判定した場合、クエリを通信部240に出力する。通信部240は、クエリ実行部210から入力されたクエリを、下位ノード300に送信する。 On the other hand, when the query execution unit 210 determines that at least a part of the range of the data that is the search target of the query is included in the range of the data held in the lower node 300, the query execution unit 210 outputs the query to the communication unit 240. The communication unit 240 transmits the query input from the query execution unit 210 to the lower node 300.

下位ノード300の通信部310は、上位ノード200からクエリを受信すると、受信したクエリをクエリ実行部320に出力する。クエリ実行部320は、通信部310から入力されたクエリを、テーブル管理部330およびインデックス管理部340に出力する。 Upon receiving the query from the upper node 200, the communication unit 310 of the lower node 300 outputs the received query to the query execution unit 320. The query execution unit 320 outputs the query input from the communication unit 310 to the table management unit 330 and the index management unit 340.

テーブル管理部330は、クエリ実行部320から入力されたクエリに基づき、クエリ結果を記憶部350から取得する。具体的に、テーブル管理部330は、センサ値がクエリの検索対象の範囲に含まれるレコードを、記憶部350に記憶されたテーブルT1(図3)から取得する。テーブル管理部330は、テーブルT1から取得したレコードを、クエリ結果としてクエリ実行部320に出力する。 The table management unit 330 acquires the query result from the storage unit 350 based on the query input from the query execution unit 320. Specifically, the table management unit 330 acquires a record whose sensor value is included in the search target range of the query from the table T1 (FIG. 3) stored in the storage unit 350. The table management unit 330 outputs the record acquired from the table T1 to the query execution unit 320 as a query result.

クエリ実行部320は、テーブル管理部330から入力されたクエリ結果を、通信部310に出力する。通信部310は、クエリ実行部320から入力されたクエリ結果を、上位ノード200に送信する。 The query execution unit 320 outputs the query result input from the table management unit 330 to the communication unit 310. The communication unit 310 transmits the query result input from the query execution unit 320 to the upper node 200.

上位ノード200の通信部240は、下位ノード300から受信したクエリ結果を、クエリ実行部210に出力する。クエリ実行部210は、クエリの送信先の全ての下位ノード300からクエリ結果を受信すると、受信した複数のクエリ結果に対してマージ処理を行う。これによって、複数のクエリ結果が統合される。 The communication unit 240 of the upper node 200 outputs the query result received from the lower node 300 to the query execution unit 210. When the query execution unit 210 receives the query results from all the lower nodes 300 that are the destinations of the queries, the query execution unit 210 performs a merge process on the plurality of received query results. This merges multiple query results.

クエリ実行部210は、統合したクエリ結果を通信部240に出力する。通信部240は、クエリ実行部210から入力されたクエリ結果を、クライアント端末100に送信する。以上が、クエリ処理の一連の流れである。 The query execution unit 210 outputs the integrated query result to the communication unit 240. The communication unit 240 transmits the query result input from the query execution unit 210 to the client terminal 100. The above is a series of flow of query processing.

次に、インデックス更新処理について説明する。記憶部350には、不図示のセンサからセンサ値が入力される度に、センサ値を含むレコードがテーブルT1に追加される。テーブルT1にレコードが追加されることにより、テーブルT1におけるセンサ値の最大値または最小値が更新される場合、インデックス管理部340は、下位ノード300のインデックスを更新する。下位ノード300の記憶部350には、下位ノード300のインデックスの更新履歴がテーブル形式で記憶されている。 Next, the index update process will be described. A record including the sensor value is added to the storage unit 350 in the table T1 every time the sensor value is input from a sensor (not shown). When the maximum value or the minimum value of the sensor values in the table T1 is updated by adding the record to the table T1, the index management unit 340 updates the index of the lower node 300. The update history of the index of the lower node 300 is stored in a table format in the storage unit 350 of the lower node 300.

図5は、第1実施形態に係る記憶部350に記憶されたテーブルT3(インデックスの更新履歴)の一例を示す図である。テーブルT3は、更新時刻と、仮最大値と、仮最小値と、精度無視ビット数nとが対応付けられたテーブルである。更新時刻は、インデックス(仮最大値、仮最小値、および精度無視ビット数n)が更新された時刻を示す情報である。 FIG. 5 is a diagram showing an example of the table T3 (index update history) stored in the storage unit 350 according to the first embodiment. The table T3 is a table in which the update time, the temporary maximum value, the temporary minimum value, and the precision neglected bit number n are associated with each other. The update time is information indicating the time when the index (temporary maximum value, temporary minimum value, and precision neglected bit number n) is updated.

インデックス管理部340は、丸め処理として、記憶部350に記憶されるセンサ値の最大値の下位nビットを繰り上げて仮最大値を算出するとともに、記憶部350に記憶されるセンサ値の最小値の下位nビットを切り捨てて仮最小値を算出する。 As the rounding process, the index management unit 340 moves up the lower n bits of the maximum value of the sensor value stored in the storage unit 350 to calculate the provisional maximum value, and also determines the minimum value of the sensor value stored in the storage unit 350. The lower n bits are truncated to calculate the temporary minimum value.

例えば、センサ値の最大値が11010101であり、精度無視ビット数nが5ビットである場合、インデックス管理部340は、下位5ビットを6ビット目に繰り上げた値(11100000)を仮最大値として算出する。また、例えば、センサ値の最小値が00110100であり、精度無視ビット数nが5ビットである場合、インデックス管理部340は、下位5ビットを切り捨てた値(00100000)を仮最小値として算出する。 For example, when the maximum sensor value is 11010101 and the precision neglected bit number n is 5 bits, the index management unit 340 calculates the value (11100000) obtained by moving the lower 5 bits to the 6th bit as the temporary maximum value. To do. Further, for example, when the minimum sensor value is 00110100 and the precision neglected bit number n is 5 bits, the index management unit 340 calculates a value (0010000) in which the lower 5 bits are truncated as a temporary minimum value.

その後、インデックス管理部340は、算出した仮最大値および仮最小値を、精度無視ビット数nとともに、インデックス通知判定部360に出力する。インデックス通知判定部360は、テーブルT3を参照し、インデックス管理部340から入力された仮最大値および仮最小値が、前回算出された仮最大値および仮最小値とは異なるか否かを判定する。 After that, the index management unit 340 outputs the calculated provisional maximum value and provisional minimum value to the index notification determination unit 360 together with the precision neglected bit number n. The index notification determination unit 360 refers to the table T3 and determines whether the temporary maximum value and the temporary minimum value input from the index management unit 340 are different from the previously calculated temporary maximum value and temporary minimum value. ..

インデックス通知判定部360は、インデックス管理部340から入力された仮最大値および仮最小値が、前回算出された仮最大値および仮最小値とは異なると判定した場合、下位ノード300のノードIDと、今回算出された仮最大値および仮最小値と、精度無視ビット数nとを含む更新要求を、通信部310に出力する。通信部310は、インデックス通知判定部360から入力された更新要求を、上位ノード200に送信する。 When the index notification determination unit 360 determines that the temporary maximum value and the temporary minimum value input from the index management unit 340 are different from the previously calculated temporary maximum value and temporary minimum value, the index notification determination unit 360 determines that the node ID of the lower node 300 is The update request including the provisional maximum value and the provisional minimum value calculated this time and the precision ignored bit number n is output to the communication unit 310. The communication unit 310 transmits the update request input from the index notification determination unit 360 to the upper node 200.

上位ノード200の通信部240は、下位ノード300から更新要求を受信すると、受信した更新要求をインデックス管理部220に出力する。インデックス管理部220は、通信部240から入力された更新要求に含まれるノードIDに対応するテーブルT1のレコードを、更新要求に含まれる仮最大値、仮最小値、および精度無視ビット数nを用いて更新する。これによって、テーブルT1が更新される。 Upon receiving the update request from the lower node 300, the communication unit 240 of the upper node 200 outputs the received update request to the index management unit 220. The index management unit 220 uses the temporary maximum value, the temporary minimum value, and the precision neglected bit number n included in the update request for the record of the table T1 corresponding to the node ID included in the update request input from the communication unit 240. To update. As a result, the table T1 is updated.

テーブルT1の更新が完了すると、インデックス管理部220は、更新完了通知を通信部240に出力する。通信部240は、インデックス管理部220から入力された更新完了通知を下位ノード300に送信する。 When the update of the table T1 is completed, the index management unit 220 outputs an update completion notification to the communication unit 240. The communication unit 240 transmits the update completion notification input from the index management unit 220 to the lower node 300.

下位ノード300の通信部310は、上位ノード200から更新完了通知を受信すると、受信した更新完了通知をインデックス通知判定部360に出力する。インデックス通知判定部360は、通信部310から更新完了通知が入力されると、テーブルT3を更新するための更新要求をインデックス管理部340に出力する。 Upon receiving the update completion notification from the upper node 200, the communication unit 310 of the lower node 300 outputs the received update completion notification to the index notification determination unit 360. When the update completion notification is input from the communication unit 310, the index notification determination unit 360 outputs an update request for updating the table T3 to the index management unit 340.

インデックス管理部340は、インデックス通知判定部360から更新要求が入力されると、更新時刻と、今回算出された仮最大値および仮最小値と、精度無視ビット数nとを含むレコードを、テーブルT3に追加する。これによって、テーブルT3が更新される。なお、テーブルT3に含まれるレコード数が予め定められた上限値に到達すると、更新時刻が最も古いレコードが、テーブルT3から削除される。 When the update request is input from the index notification determination unit 360, the index management unit 340 stores a record including the update time, the temporary maximum value and the temporary minimum value calculated this time, and the precision neglected bit number n in the table T3. Add to. As a result, the table T3 is updated. When the number of records included in the table T3 reaches a predetermined upper limit value, the record having the oldest update time is deleted from the table T3.

図6は、第1実施形態に係るクエリ処理を示すシーケンス図である。図6においては、上位ノード200が、下位ノード300−1および300−2にクエリを送信する例が示されている。 FIG. 6 is a sequence diagram showing the query processing according to the first embodiment. In FIG. 6, an example in which the upper node 200 transmits a query to the lower nodes 300-1 and 300-2 is shown.

まず、クライアント端末100は、ユーザの操作に応じて、クエリを上位ノードに送信する(S1)。上位ノード200は、クライアント端末100から受信したクエリの送信先を判定する(S2)。前述したように、上位ノード200は、各下位ノード300のインデックスを、記憶部230に記憶されたテーブルT2から取得する。その後、上位ノード200は、クエリの検索対象であるデータの範囲および各下位ノード300のインデックスに基づいて、クエリの送信先を判定する。図6においては、上位ノード200が、クエリの送信先が下位ノード300−1および300−2であると判定した例が示されている。 First, the client terminal 100 transmits a query to an upper node according to a user operation (S1). The upper node 200 determines the transmission destination of the query received from the client terminal 100 (S2). As described above, the upper node 200 acquires the index of each lower node 300 from the table T2 stored in the storage unit 230. After that, the upper node 200 determines the destination of the query based on the range of data to be searched by the query and the index of each lower node 300. FIG. 6 shows an example in which the upper node 200 determines that the query transmission destinations are the lower nodes 300-1 and 300-2.

上位ノード200は、クエリを下位ノード300−1に送信する(S3)。下位ノード300−1は、上位ノード200からクエリを受信すると、クエリ処理を行う(S4)。前述したように、下位ノード300−1は、クエリ処理を行うことによって、記憶部350に記憶されたテーブルT1からクエリ結果(クエリの検索対象のデータ)を取得する。その後、下位ノード300−1は、クエリ結果を上位ノード200に送信する(S5)。 The upper node 200 transmits the query to the lower node 300-1 (S3). Upon receiving the query from the upper node 200, the lower node 300-1 performs the query process (S4). As described above, the lower node 300-1 acquires the query result (query search target data) from the table T1 stored in the storage unit 350 by performing the query process. After that, the lower node 300-1 transmits the query result to the upper node 200 (S5).

また、上位ノード200は、クエリを下位ノード300−2に送信する(S6)。下位ノード300−2は、上位ノード200からクエリを受信すると、クエリ処理を行う(S7)。前述したように、下位ノード300−2は、クエリ処理を行うことによって、クエリ結果(クエリの検索対象のデータ)を取得する。その後、下位ノード300−2は、クエリ結果を上位ノード200に送信する(S8)。 The upper node 200 also transmits the query to the lower node 300-2 (S6). Upon receiving the query from the upper node 200, the lower node 300-2 performs the query process (S7). As described above, the lower node 300-2 acquires the query result (data that is the search target of the query) by performing the query process. After that, the lower node 300-2 transmits the query result to the upper node 200 (S8).

上位ノード200は、下位ノード300−1から受信したクエリ結果と、下位ノード300−2から受信したクエリ結果に対してマージ処理を行う(S9)。これによって、下位ノード300−1から受信したクエリ結果と、下位ノード300−2から受信したクエリ結果とが統合される。その後、上位ノード200は、統合されたクエリ結果を、クライアント端末100に送信する(S10)。 The upper node 200 performs a merge process on the query result received from the lower node 300-1 and the query result received from the lower node 300-2 (S9). As a result, the query result received from the lower node 300-1 and the query result received from the lower node 300-2 are integrated. After that, the upper node 200 transmits the integrated query result to the client terminal 100 (S10).

一方、下位ノード300−1は、仮最大値および仮最小値を更新する必要があるか否かを判定する。下位ノード300−1は、仮最大値および仮最小値を更新する必要があると判定した場合、下位ノード300−1のノードIDと、仮最大値と、仮最小値と、精度無視ビット数nとを含む更新要求を、上位ノードに送信する(S11)。 On the other hand, the lower node 300-1 determines whether or not it is necessary to update the temporary maximum value and the temporary minimum value. When the lower node 300-1 determines that the temporary maximum value and the temporary minimum value need to be updated, the node ID of the lower node 300-1, the temporary maximum value, the temporary minimum value, and the precision neglected bit number n An update request including and is transmitted to the upper node (S11).

また、下位ノード300−2は、仮最大値および仮最小値を更新する必要があるか否かを判定する。下位ノード300−2は、仮最大値および仮最小値を更新する必要があると判定した場合、下位ノード300−2のノードIDと、仮最大値と、仮最小値と、精度無視ビット数nとを含む更新要求を、上位ノードに送信する(S12)。 Further, the lower node 300-2 determines whether or not it is necessary to update the temporary maximum value and the temporary minimum value. When the lower node 300-2 determines that the temporary maximum value and the temporary minimum value need to be updated, the node ID of the lower node 300-2, the temporary maximum value, the temporary minimum value, and the precision neglected bit number n An update request including and is transmitted to the upper node (S12).

上位ノード200は、下位ノード300−1から受信した更新要求と、下位ノード300−2から受信した更新要求とに基づき、記憶部230に格納されたテーブルT2(インデックス)を更新する(S13)。 The upper node 200 updates the table T2 (index) stored in the storage unit 230 based on the update request received from the lower node 300-1 and the update request received from the lower node 300-2 (S13).

上位ノード200は、テーブルT2(インデックス)の更新が完了すると、更新完了通知を下位ノード300−1および300−2に送信する。下位ノード300−1は、上位ノード200から受信した更新完了通知に応じて、記憶部350内に記憶されたテーブルT3(インデックス更新履歴)を更新する。下位ノード300−1も同様に、上位ノード200から受信した更新完了通知に応じて、テーブルT3(インデックス更新履歴)を更新する。 When the update of the table T2 (index) is completed, the upper node 200 transmits an update completion notification to the lower nodes 300-1 and 300-2. The lower node 300-1 updates the table T3 (index update history) stored in the storage unit 350 in response to the update completion notification received from the upper node 200. Similarly, the lower node 300-1 updates the table T3 (index update history) in response to the update completion notification received from the upper node 200.

なお、T3(インデックス更新履歴)の更新タイミングは、これに限られない。例えば、下位ノード300−1および300−2は、テーブルT3(インデックス更新履歴)の更新が完了した後に、更新要求をクライアント端末100に送信してもよい。 The update timing of T3 (index update history) is not limited to this. For example, the subordinate nodes 300-1 and 300-2 may transmit the update request to the client terminal 100 after the update of the table T3 (index update history) is completed.

また、インデックス通知判定部360は、インデックスの更新頻度を判定する更新頻度判定部361を備える。インデックス通知判定部360は、更新頻度判定部361によって判定されたインデックスの更新頻度に基づいて、精度無視ビット数nを増加させるか、減少させるかを判定する。この点についての詳細は後述する。 Further, the index notification determination unit 360 includes an update frequency determination unit 361 that determines the index update frequency. The index notification determination unit 360 determines whether to increase or decrease the precision neglected bit number n based on the index update frequency determined by the update frequency determination unit 361. Details of this point will be described later.

図7は、第1実施形態に係るクエリ受付処理の詳細を示すフローチャートである。図7に示されるクエリ受付処理は、上位ノード200がクライアント端末100からクエリを受信したときに、上位ノード200によって実行される。 FIG. 7 is a flowchart showing details of the query reception process according to the first embodiment. The query reception process shown in FIG. 7 is executed by the upper node 200 when the upper node 200 receives a query from the client terminal 100.

まず、上位ノード200は、上位ノード200に接続された複数の下位ノード300のうち、1つの下位ノード300の仮最大値と仮最小値を、記憶部230に記憶されたテーブルT2から取得する(S21)。次に、上位ノード200は、クライアント端末100から受信したクエリの検索対象のデータの範囲の少なくとも一部が、S21において取得された仮最大値から仮最小値の範囲に含まれるか否かを判定する(S22)。 First, the upper node 200 acquires the temporary maximum value and the temporary minimum value of one lower node 300 among the plurality of lower nodes 300 connected to the upper node 200 from the table T2 stored in the storage unit 230 ( S21). Next, the upper node 200 determines whether or not at least a part of the range of the search target data of the query received from the client terminal 100 is included in the range of the temporary maximum value to the temporary minimum value acquired in S21. Yes (S22).

上位ノード200は、クエリの検索対象の範囲の少なくとも一部が、S21において取得された仮最大値から仮最小値の範囲に含まれないと判定した場合、後述するS25に処理を進める。一方、上位ノード200は、クエリの検索対象の範囲の少なくとも一部が、S21において取得された仮最大値から仮最小値の範囲に含まれると判定した場合、判定に使用された仮最大値および仮最小値を有する下位ノード300にクエリを送信する(S23)。 When determining that at least a part of the search target range of the query is not included in the range of the temporary maximum value to the temporary minimum value acquired in S21, the upper node 200 advances the process to S25 described later. On the other hand, when the higher-level node 200 determines that at least a part of the range of the search target of the query is included in the range of the temporary maximum value to the temporary minimum value acquired in S21, the temporary maximum value used for the determination and The query is transmitted to the lower node 300 having the temporary minimum value (S23).

上位ノード200からクエリを受信した下位ノード300は、クエリ処理を実行することによりクエリ結果を取得する。下位ノード300は、クエリ結果を上位ノード200に送信する。その後、上位ノード200は、下位ノード300からクエリ結果を受信する(S24)。 The lower node 300 that receives the query from the upper node 200 acquires the query result by executing the query process. The lower node 300 transmits the query result to the upper node 200. After that, the upper node 200 receives the query result from the lower node 300 (S24).

次に、上位ノード200は、クエリの対象である全ての下位ノード300からクエリ結果を受信したか否かを判定する(S25)。上位ノード200は、クエリの対象である全ての下位ノード300からクエリ結果を受信したと判定しなかった場合、前述のS21に処理を戻す。 Next, the upper node 200 determines whether or not the query results have been received from all the lower nodes 300 that are the target of the query (S25). If the upper node 200 does not determine that the query results have been received from all the lower nodes 300 that are the target of the query, the process returns to S21 described above.

一方、上位ノード200は、クエリの対象である全ての下位ノード300からクエリ結果を受信したと判定した場合、受信した複数のクエリ結果に対してマージ処理を行う(S26)。これによって、複数のクエリ結果が統合される。その後、上位ノード200は、統合されたクエリ結果を、クライアント端末100に送信し(S27)、本フローチャートによる処理を終了する。 On the other hand, when the upper node 200 determines that the query results have been received from all the lower nodes 300 that are the target of the query, the upper node 200 performs the merge process on the plurality of received query results (S26). This merges multiple query results. After that, the upper node 200 transmits the integrated query result to the client terminal 100 (S27), and ends the process according to this flowchart.

このように、上位ノード200は、インデックス(仮最大値および仮最小値)を用いて、クエリの検索対象であるデータを保持する下位ノード300の候補を絞り込むことができる。このため、クエリの検索対象であるデータを保持しない下位ノード300がクエリ処理を実行してしまうこと(擬陽性)を抑制でき、下位ノード300のクエリ処理の負荷を軽減することができる。 In this way, the upper node 200 can narrow down the candidates of the lower node 300 holding the data that is the search target of the query using the indexes (temporary maximum value and temporary minimum value). For this reason, it is possible to prevent the lower node 300 that does not hold the data to be searched for the query from executing the query process (false positive), and reduce the load of the query process of the lower node 300.

図8は、第1実施形態に係るインデックス更新処理の詳細を示すフローチャートである。図8に示されるインデックス更新処理は、上位ノード200によって実行される。 FIG. 8 is a flowchart showing details of the index update process according to the first embodiment. The index update process shown in FIG. 8 is executed by the upper node 200.

まず、上位ノード200は、下位ノード300からインデックスを更新するための更新要求を受信すると(S31)、更新要求に含まれるノードID、仮最大値、仮最小値、および精度無視ビット数nを取得する(S32)。 First, when the upper node 200 receives the update request for updating the index from the lower node 300 (S31), it acquires the node ID, the temporary maximum value, the temporary minimum value, and the precision neglected bit number n included in the update request. Yes (S32).

次に、上位ノード200は、更新要求に含まれるノードIDに対応するテーブルT1のレコードを、更新要求に含まれる仮最大値、仮最小値、および精度無視ビット数nを用いて更新する(S33)。これによって、テーブルT1(インデックス)が更新される。その後、更新完了通知を下位ノード300に送信し(S34)、本フローチャートによる処理を終了する。 Next, the upper node 200 updates the record of the table T1 corresponding to the node ID included in the update request, using the temporary maximum value, the temporary minimum value, and the precision neglected bit number n included in the update request (S33). ). As a result, the table T1 (index) is updated. After that, the update completion notification is transmitted to the lower node 300 (S34), and the processing according to this flowchart ends.

図9は、第1実施形態に係る仮最大値/仮最小値の更新処理の詳細を示すフローチャートである。図9に示される仮最大値/仮最小値の更新処理は、記憶部350に記憶されたテーブルT1にレコードが追加されたときに、下位ノード300によって実行される。 FIG. 9 is a flowchart showing details of the temporary maximum value/temporary minimum value update processing according to the first embodiment. The temporary maximum value/temporary minimum value update processing shown in FIG. 9 is executed by the lower node 300 when a record is added to the table T1 stored in the storage unit 350.

まず、下位ノード300は、テーブルT1にレコードが追加されたことによって、テーブルT1におけるセンサ値の最大値および最小値の少なくとも一方が更新されるか否かを判定する(S41)。下位ノード300は、テーブルT1におけるセンサ値の最大値および最小値のいずれも更新されないと判定した場合、本フローチャートによる処理を終了する。 First, the subordinate node 300 determines whether or not at least one of the maximum value and the minimum value of the sensor value in the table T1 is updated by adding the record to the table T1 (S41). When determining that neither the maximum value nor the minimum value of the sensor value in the table T1 is updated, the lower node 300 ends the processing according to this flowchart.

一方、下位ノード300は、テーブルT1におけるセンサ値の最大値および最小値の少なくとも一方が更新されると判定した場合、精度無視ビット数nを用いて、仮最大値および仮最小値を算出する(S42)。前述したように、下位ノード300は、テーブルT1におけるセンサ値の最大値および最小値に対して丸め処理を行うことにより、仮最大値および仮最小値を算出する。 On the other hand, when the lower node 300 determines that at least one of the maximum value and the minimum value of the sensor value in the table T1 is updated, it calculates the provisional maximum value and the provisional minimum value using the precision neglected bit number n ( S42). As described above, the lower node 300 performs the rounding process on the maximum value and the minimum value of the sensor values in the table T1 to calculate the temporary maximum value and the temporary minimum value.

次に、下位ノード300は、仮最大値および仮最小値の少なくとも一方が、前回上位ノードに送信した値と異なるか否かを判定する(S43)。下位ノード300は、仮最大値および仮最小値のいずれも、前回上位ノードに送信した値と同じであると判定した場合、本フローチャートによる処理を終了する。 Next, the lower node 300 determines whether at least one of the temporary maximum value and the temporary minimum value is different from the value transmitted to the upper node last time (S43). When determining that both the temporary maximum value and the temporary minimum value are the same as the values transmitted to the upper node last time, the lower node 300 ends the process according to this flowchart.

一方、下位ノード300は、仮最大値および仮最小値の少なくとも一方が、前回上位ノードに送信した値と異なると判定した場合、上位ノード200の記憶部230に記憶されたインデックス(テーブルT2)を更新するための更新要求を、上位ノード200に送信する(S44)。 On the other hand, when the lower node 300 determines that at least one of the temporary maximum value and the temporary minimum value is different from the value transmitted to the upper node last time, the lower node 300 sets the index (table T2) stored in the storage unit 230 of the upper node 200. An update request for updating is transmitted to the upper node 200 (S44).

前述したように、上位ノード200は、下位ノード300から受信した更新要求に基づき、記憶部230に記憶されたインデックス(テーブルT2)を更新する。インデックスの更新が完了すると、上位ノード200は、下位ノード300に更新完了通知を送信する。 As described above, the upper node 200 updates the index (table T2) stored in the storage unit 230 based on the update request received from the lower node 300. When the index update is completed, the upper node 200 sends an update completion notification to the lower node 300.

下位ノード300は、上位ノード200から更新完了通知を受信すると、S42において算出した仮最大値および仮最小値を、記憶部350に記憶されたテーブルT3(インデックス更新履歴)に更新時刻とともに記録し(S45)、本フローチャートによる処理を終了する。 Upon receiving the update completion notification from the upper node 200, the lower node 300 records the temporary maximum value and the temporary minimum value calculated in S42 in the table T3 (index update history) stored in the storage unit 350 together with the update time ( S45), and the process according to this flowchart ends.

このように、下位ノード300は、下位ノード300に保持されるセンサ値の最大値および最小値が更新された場合、仮最大値および仮最小値を算出する。下位ノード300は、算出した仮最大値および仮最小値の少なくとも一方が前回算出した値(前回上位ノード200に送信した値)と同じである場合、更新要求を上位ノード200に送信しない。これによって、上位ノード200における処理の負荷を軽減することができる。 In this way, the lower node 300 calculates the temporary maximum value and the temporary minimum value when the maximum value and the minimum value of the sensor values held in the lower node 300 are updated. If at least one of the calculated temporary maximum value and temporary minimum value is the same as the previously calculated value (the value transmitted to the upper node 200 last time), the lower node 300 does not transmit the update request to the upper node 200. As a result, the processing load on the upper node 200 can be reduced.

図10は、第1実施形態に係る精度無視ビット数nの更新処理の詳細を示すフローチャートである。図10に示される精度無視ビット数nの更新処理は、下位ノード300によって定期的に実行される。 FIG. 10 is a flowchart showing details of the updating process of the precision ignored bit number n according to the first embodiment. The update process of the precision neglected bit number n shown in FIG. 10 is periodically executed by the lower node 300.

まず、下位ノード300は、最新の仮最大値または仮最小値の更新時刻を、記憶部350に記憶されたテーブルT3から取得する(S51)。次に、下位ノード300は、現在時刻とS51において取得した更新時刻との差が所定時間t1を超えるか否かを判定する(S52)。 First, the subordinate node 300 acquires the latest update time of the temporary maximum value or the temporary minimum value from the table T3 stored in the storage unit 350 (S51). Next, the subordinate node 300 determines whether or not the difference between the current time and the update time acquired in S51 exceeds the predetermined time t1 (S52).

所定時間t1は固定値であるが、これに限られない。例えば、所定時間t1は、精度無視ビット数nを入力とし、精度無視ビット数nが小さいほど大きな値を出力する関数f(n)によって定められてもよい。例えば、センサ値が32ビットの場合、f(n)=(32−n)×30[sec]としてよい。これによって、下位ノード300は、精度無視ビット数nに基づいて適切な所定時間t1を設定することができる。 The predetermined time t1 is a fixed value, but is not limited to this. For example, the predetermined time t1 may be defined by a function f(n) that inputs the precision neglected bit number n and outputs a larger value as the precision neglected bit number n is smaller. For example, when the sensor value is 32 bits, it may be f(n)=(32−n)×30 [sec]. Thereby, the lower node 300 can set an appropriate predetermined time t1 based on the precision neglected bit number n.

下位ノード300は、現在時刻とS51において取得した更新時刻との差が所定時間t1を超えると判定した場合、精度無視ビット数nから1を減算し(S53)、本フローチャートによる処理を終了する。 When determining that the difference between the current time and the update time acquired in S51 exceeds the predetermined time t1, the lower node 300 subtracts 1 from the precision neglected bit number n (S53), and ends the process according to this flowchart.

このように、下位ノード300は、仮最大値または仮最小値が所定時間t1の間更新されない場合、丸め処理に用いられる精度無視ビット数nを減少させる。つまり、下位ノード300は、インデックスの更新頻度が低い場合には、精度無視ビット数nを減少させる。精度無視ビット数nを減少させると、仮最大値が真の最大値に近づき、仮最小値が真の最小値に近づくことになる。これによって、クエリの検索対象であるデータを保持しない下位ノード300がクエリ処理を実行してしまうこと(擬陽性)を抑制でき、下位ノード300のクエリ処理の負荷を軽減することができる。 In this way, the lower node 300 reduces the precision neglected bit number n used in the rounding process when the provisional maximum value or the provisional minimum value is not updated for the predetermined time t1. That is, the lower node 300 reduces the precision neglected bit number n when the index update frequency is low. If the precision neglected bit number n is reduced, the temporary maximum value approaches the true maximum value, and the temporary minimum value approaches the true minimum value. As a result, it is possible to prevent the lower node 300 that does not hold the data to be searched for the query from executing the query process (false positive), and reduce the load of the query process of the lower node 300.

一方、S52において、下位ノード300は、現在時刻とS51において取得した更新時刻との差が所定時間t1を超えないと判定した場合、k回前の仮最大値または仮最小値の更新時刻を、記憶部350に記憶されたテーブルT3から取得する(S54)。次に、下位ノード300は、現在時刻とS54において取得した更新時刻との差が所定時間t2を超えるか否かを判定する(S55)。所定時間t2は、固定値であってよい。 On the other hand, in S52, when the lower node 300 determines that the difference between the current time and the update time acquired in S51 does not exceed the predetermined time t1, it updates the update time of the provisional maximum value or provisional minimum value k times before, It is acquired from the table T3 stored in the storage unit 350 (S54). Next, the subordinate node 300 determines whether or not the difference between the current time and the update time acquired in S54 exceeds the predetermined time t2 (S55). The predetermined time t2 may be a fixed value.

下位ノード300は、現在時刻とS54において取得した更新時刻との差が所定時間t2を超えると判定した場合、精度無視ビット数nに1を加算し(S56)、本フローチャートによる処理を終了する。 When the lower node 300 determines that the difference between the current time and the update time acquired in S54 exceeds the predetermined time t2, it adds 1 to the precision neglected bit number n (S56), and ends the process according to this flowchart.

このように、下位ノード300は、仮最大値または仮最小値が所定時間t2の間に所定回数kを超えて更新された場合、丸め処理に用いられる精度無視ビット数nを増加させる。つまり、下位ノード300は、インデックスの更新頻度が高い場合には、精度無視ビット数nを増加させる。これによって、上位ノード200によるインデックス更新処理の負荷を軽減することができる。 As described above, when the temporary maximum value or the temporary minimum value is updated more than the predetermined number of times k within the predetermined time t2, the lower node 300 increases the precision negation bit number n used for the rounding process. That is, the lower node 300 increases the precision neglected bit number n when the index is updated frequently. As a result, the load of the index update processing by the upper node 200 can be reduced.

一方、S55において、下位ノード300は、現在時刻とS54において取得した更新時刻との差が所定時間t2を超えないと判定した場合、本フローチャートによる処理を終了する。 On the other hand, when the lower node 300 determines in S55 that the difference between the current time and the update time acquired in S54 does not exceed the predetermined time t2, the process according to this flowchart ends.

図10に示されるフローチャートにおいて、下位ノード300は、仮最大値または仮最小値が所定時間t2の間に所定回数kを超えて更新された場合、丸め処理に用いられる精度無視ビット数nを増加させることとしたが、これに限られない。例えば、下位ノード300は、仮最大値または仮最小値が所定時間t3の間に更新された事象が連続で、所定回数mを超えて続いた場合、丸め処理に用いられる精度無視ビット数nを増加させてもよい。これによって、下位ノード300は、インデックスの更新による処理負荷を軽減することができ、データベース管理システム10のパフォーマンスが低下するのを抑制することができる。 In the flowchart shown in FIG. 10, when the temporary maximum value or the temporary minimum value is updated more than the predetermined number of times k within the predetermined time t2, the lower node 300 increases the number of precision neglected bits n used for the rounding process. However, it is not limited to this. For example, when the provisional maximum value or the provisional minimum value is continuously updated for a predetermined time t3 and continues for more than a predetermined number of times m, the subordinate node 300 sets the precision neglected bit number n used for the rounding process. May be increased. As a result, the lower node 300 can reduce the processing load due to the index update, and can suppress the performance of the database management system 10 from deteriorating.

以上説明したように、第1実施形態に係るデータベース管理システム10は、上位ノード200と、複数の下位ノード300とを持つ。上位ノード200は、データを要求するクエリをクライアント端末100から受信し、受信したクエリを条件に応じて複数の下位ノード300のいずれかに送信する。複数の下位ノード300は、上位ノード200から受信したクエリに基づく処理を実行してデータを取得し、取得したデータを上位ノード200に送信する。上位ノード200は、下位ノード300に保持されるデータの範囲を示すインデックスを保持し、クエリの検索対象のデータの範囲がインデックスによって示される範囲にない場合、下位ノード300にクエリを転送しない。これによって、データベース管理システム10は、下位ノードに保持されるデータの更新頻度が高い場合であっても、データベース管理システムのパフォーマンスが低下するのを抑制することができる。 As described above, the database management system 10 according to the first embodiment has the upper node 200 and the plurality of lower nodes 300. The upper node 200 receives a query requesting data from the client terminal 100, and transmits the received query to any of the plurality of lower nodes 300 according to the conditions. The plurality of lower nodes 300 execute processing based on the query received from the upper node 200 to acquire data, and transmit the acquired data to the upper node 200. The upper node 200 holds an index indicating the range of data held in the lower node 300, and does not transfer the query to the lower node 300 when the range of the search target data of the query is not within the range indicated by the index. As a result, the database management system 10 can prevent the performance of the database management system from deteriorating even when the frequency of updating the data held in the lower nodes is high.

(第2実施形態)
次に、第2実施形態について説明する。第1実施形態において、上位ノード200は、検索対象のデータの範囲を指定するクエリを受け付ける処理を行うこととした。これに対し、第2実施形態において、上位ノード200は、検索対象のデータの範囲を指定するクエリに加えて、最大値または最小値を求めるクエリを受け付けることとする。以下、第2実施形態の詳細を説明する。
(Second embodiment)
Next, a second embodiment will be described. In the first embodiment, the upper node 200 is supposed to perform the process of accepting the query designating the range of the search target data. On the other hand, in the second embodiment, the upper node 200 accepts a query for specifying the maximum value or the minimum value in addition to the query for specifying the range of the search target data. Hereinafter, the details of the second embodiment will be described.

図11は、第2実施形態に係るクエリ受付処理(拡張版)の詳細を示すフローチャートである。図11に示されるクエリ受付処理は、上位ノード200がクライアント端末100からクエリを受信したときに、上位ノード200によって実行される。 FIG. 11 is a flowchart showing details of the query reception process (extended version) according to the second embodiment. The query reception process shown in FIG. 11 is executed by the upper node 200 when the upper node 200 receives a query from the client terminal 100.

まず、上位ノード200は、クライアント端末100から受信したクエリは、センサ値の最大値を求めるクエリか否かを判定する(S61)。上位ノード200は、クライアント端末100から受信したクエリは、センサ値の最大値を求めるクエリであると判定した場合、後述する最大値取得処理を実行する(S62)。 First, the upper node 200 determines whether the query received from the client terminal 100 is a query for obtaining the maximum sensor value (S61). When the upper node 200 determines that the query received from the client terminal 100 is a query for obtaining the maximum value of the sensor value, the upper node 200 executes the maximum value acquisition process described later (S62).

一方、S61において、上位ノード200は、クライアント端末100から受信したクエリは、センサ値の最大値を求めるクエリでないと判定した場合、クライアント端末100から受信したクエリは、センサ値の最小値を求めるクエリか否かを判定する(S63)。上位ノード200は、クライアント端末100から受信したクエリは、センサ値の最小値を求めるクエリであると判定した場合、後述する最小値取得処理を実行する(S64)。 On the other hand, in S61, when the upper node 200 determines that the query received from the client terminal 100 is not the query for obtaining the maximum sensor value, the query received from the client terminal 100 is the query for obtaining the minimum sensor value. It is determined whether or not (S63). When the upper node 200 determines that the query received from the client terminal 100 is a query for obtaining the minimum sensor value, the upper node 200 executes a minimum value acquisition process described later (S64).

一方、S63において、上位ノード200は、クライアント端末100から受信したクエリは、センサ値の最小値を求めるクエリでないと判定した場合、通常のクエリ受付処理を実行する(S65)。ここで、通常のクエリ受付処理とは、図7に示される第1実施形態に係るクエリ受付処理である。 On the other hand, in S63, when the upper node 200 determines that the query received from the client terminal 100 is not the query for obtaining the minimum sensor value, the upper node 200 executes a normal query reception process (S65). Here, the normal query acceptance process is the query acceptance process according to the first embodiment shown in FIG. 7.

図12は、第2実施形態に係る最大値取得処理の詳細を示すフローチャートである。図12に示される最大値取得処理は、図11におけるS62に対応し、上位ノード200によって実行される。 FIG. 12 is a flowchart showing details of the maximum value acquisition process according to the second embodiment. The maximum value acquisition process shown in FIG. 12 corresponds to S62 in FIG. 11 and is executed by the upper node 200.

まず、上位ノード200は、上位ノード200に接続される全ての下位ノード300の仮最大値を、記憶部230に記憶されたテーブルT2から取得する(S71)。次に、上位ノード200は、全ての下位ノード300の真の最大値の下限値を算出する(S72)。 First, the upper node 200 acquires the provisional maximum values of all the lower nodes 300 connected to the upper node 200 from the table T2 stored in the storage unit 230 (S71). Next, the upper node 200 calculates the lower limit of the true maximum value of all the lower nodes 300 (S72).

S72において、精度無視ビット数がnの場合、上位ノード200は、仮最大値から1を減算して、2ビット目からnビット目を0にすることで、真の最大値の下限値を算出する。例えば、仮最大値が11100000であり、精度無視ビット数nが5である場合、上位ノード200は、11000001を真の最大値の下限値として算出する。 In S72, when the precision neglected bit number is n, the upper node 200 subtracts 1 from the provisional maximum value to set the 2nd bit to the nth bit to 0, thereby calculating the lower limit value of the true maximum value. To do. For example, when the provisional maximum value is 11100000 and the precision neglected bit number n is 5, the upper node 200 calculates 11000001 as the lower limit value of the true maximum value.

次に、上位ノード200は、複数の下位ノード300のそれぞれについて算出した複数の真の最大値の下限値のうちの最大値を、最大値Aとして取得する(S73)。上位ノード200は、上位ノード200に接続される複数の下位ノード300のうち、仮最大値が最大値A以上である下位ノード300に、クエリを送信する(S74)。上位ノード200からクエリを受信した下位ノード300は、クエリ処理を実行することによりクエリ結果を取得する。下位ノード300は、クエリ結果を上位ノード200に送信する。 Next, the upper node 200 acquires the maximum value of the lower limit values of the plurality of true maximum values calculated for each of the plurality of lower nodes 300 as the maximum value A (S73). The upper node 200 transmits the query to the lower node 300 whose provisional maximum value is the maximum value A or more among the plurality of lower nodes 300 connected to the upper node 200 (S74). The lower node 300 that receives the query from the upper node 200 acquires the query result by executing the query process. The lower node 300 transmits the query result to the upper node 200.

その後、上位ノード200は、下位ノード300からクエリ結果を受信する(S75)。上位ノード200は、下位ノード300から受信したクエリ結果のうちの最大値を、クライアント端末100に送信し(S76)、本フローチャートによる処理を終了する。 After that, the upper node 200 receives the query result from the lower node 300 (S75). The upper node 200 transmits the maximum value of the query results received from the lower node 300 to the client terminal 100 (S76), and ends the processing according to this flowchart.

このように、上位ノード200は、仮最大値と最大値Aとを比較することで、クエリの検索対象であるセンサ値の最大値を保持する下位ノード300の候補を絞り込むことができる。このため、センサ値の最大値を保持しない下位ノード300がクエリ処理を実行してしまうことを防止でき、下位ノード300のクエリ処理の負荷を軽減することができる。 In this way, the upper node 200 can narrow down the candidates of the lower node 300 holding the maximum value of the sensor value that is the search target of the query by comparing the temporary maximum value and the maximum value A. Therefore, it is possible to prevent the lower-level node 300 that does not hold the maximum sensor value from executing the query process, and reduce the load of the lower-level node 300 for the query process.

図13は、第2実施形態に係る最小値取得処理の詳細を示すフローチャートである。図13に示される最小値取得処理は、図11におけるS64に対応し、上位ノード200によって実行される。 FIG. 13 is a flowchart showing details of the minimum value acquisition processing according to the second embodiment. The minimum value acquisition process shown in FIG. 13 corresponds to S64 in FIG. 11 and is executed by the upper node 200.

まず、上位ノード200は、上位ノード200に接続される全ての下位ノード300の仮最小値を、記憶部230に記憶されたテーブルT2から取得する(S81)。次に、上位ノード200は、全ての下位ノード300の真の最小値の上限値を算出する(S82)。 First, the upper node 200 acquires the provisional minimum values of all the lower nodes 300 connected to the upper node 200 from the table T2 stored in the storage unit 230 (S81). Next, the upper node 200 calculates the upper limit value of the true minimum value of all the lower nodes 300 (S82).

S82において、精度無視ビット数がnの場合、上位ノード200は、仮最小値の1ビット目からnビット目を1にすることで、真の最小値の上限値を算出する。例えば、仮最小値が00100000であり、精度無視ビット数nが5である場合、上位ノード200は、00111111を真の最小値の上限値として算出する。 In S82, when the number of neglected precision bits is n, the upper node 200 calculates the upper limit value of the true minimum value by setting 1 from the first bit to the nth bit of the temporary minimum value. For example, when the provisional minimum value is 00100000 and the precision ignored bit number n is 5, the upper node 200 calculates 00111111 as the upper limit value of the true minimum value.

次に、上位ノード200は、複数の下位ノード300のそれぞれについて算出した複数の真の最小値の上限値のうちの最小値を、最小値Bとして取得する(S83)。上位ノード200は、上位ノード200に接続される複数の下位ノード300のうち、仮最小値が最小値B以下である下位ノード300に、クエリを送信する(S84)。上位ノード200からクエリを受信した下位ノード300は、クエリ処理を実行することによりクエリ結果を取得する。下位ノード300は、クエリ結果を上位ノード200に送信する。 Next, the upper node 200 acquires the minimum value of the upper limits of the plurality of true minimum values calculated for each of the plurality of lower nodes 300 as the minimum value B (S83). The upper node 200 transmits the query to the lower node 300 whose provisional minimum value is less than or equal to the minimum value B among the plurality of lower nodes 300 connected to the upper node 200 (S84). The lower node 300 that receives the query from the upper node 200 acquires the query result by executing the query process. The lower node 300 transmits the query result to the upper node 200.

その後、上位ノード200は、下位ノード300からクエリ結果を受信する(S85)。上位ノード200は、下位ノード300から受信したクエリ結果のうちの最小値を、クライアント端末100に送信し(S86)、本フローチャートによる処理を終了する。 After that, the upper node 200 receives the query result from the lower node 300 (S85). The upper node 200 transmits the minimum value of the query results received from the lower node 300 to the client terminal 100 (S86), and ends the process according to this flowchart.

このように、上位ノード200は、仮最小値と最小値Bとを比較することで、クエリの検索対象であるセンサ値の最小値を保持する下位ノード300の候補を絞り込むことができる。このため、センサ値の最小値を保持しない下位ノード300がクエリ処理を実行してしまうことを防止でき、下位ノード300のクエリ処理の負荷を軽減することができる。 In this way, the upper node 200 can narrow down the candidates for the lower node 300 holding the minimum sensor value that is the search target of the query by comparing the temporary minimum value and the minimum value B. Therefore, it is possible to prevent the lower-level node 300 that does not hold the minimum sensor value from executing the query process, and reduce the load of the lower-level node 300 for the query process.

以上説明したように、第2実施形態において、下位ノード300は、仮最大値および仮最小値に加えて、丸め処理に用いられた精度無視ビット数nを含む更新要求を上位ノード200に送信する。これによって、上位ノード200は、更新要求に含まれる精度無視ビット数nを用いて、センサ値の真の最大値および真の最小値を算出することができる。 As described above, in the second embodiment, the lower node 300 transmits to the upper node 200 an update request including the provisional maximum value and the provisional minimum value, as well as the precision ignored bit number n used in the rounding process. .. Thereby, the upper node 200 can calculate the true maximum value and the true minimum value of the sensor value by using the precision neglected bit number n included in the update request.

また、第2実施形態において、上位ノード200は、複数の下位ノード300に保持されるデータのうちの最大値を要求するクエリを受信した場合、複数の下位ノード300ごとに、仮最大値に基づいて真の最大値の下限値を算出する。上位ノード200は、算出した複数の下位ノード300ごとの真の最大値の下限値のうちの最大値Aと、複数の下位ノード300のそれぞれについての仮最大値とを比較する。上位ノード200は、仮最大値が最大値A以上である下位ノード300にのみ、クエリを転送する。これによって、下位ノード300における処理の負荷を軽減することができる。 In addition, in the second embodiment, when the upper node 200 receives the query requesting the maximum value of the data held in the plurality of lower nodes 300, it is based on the temporary maximum value for each of the plurality of lower nodes 300. Calculate the lower limit of the true maximum. The upper node 200 compares the calculated maximum value A of the lower limit values of the true maximum values of each of the plurality of lower nodes 300 with the temporary maximum value of each of the plurality of lower nodes 300. The upper node 200 transfers the query only to the lower node 300 whose provisional maximum value is greater than or equal to the maximum value A. As a result, the processing load on the lower node 300 can be reduced.

更に、第2実施形態において、上位ノード200は、複数の下位ノード300に保持されるデータのうちの最小値を要求するクエリを受信した場合、複数の下位ノード300ごとに、仮最小値に基づいて真の最小値の上限値を算出する。上位ノード200は、算出した複数の下位ノード300ごとの真の最小値の上限値のうちの最小値Bと、複数の下位ノード300のそれぞれについての仮最小値とを比較する。上位ノード200は、仮最小値が最小値B以下である下位ノード300にのみ、クエリを転送する。これによって、下位ノード300における処理の負荷を軽減することができる。 Further, in the second embodiment, when the upper node 200 receives the query requesting the minimum value of the data held in the plurality of lower nodes 300, the upper node 200 is based on the temporary minimum value for each of the plurality of lower nodes 300. Calculate the upper limit of the true minimum value. The upper node 200 compares the calculated minimum value B of the upper limit values of the true minimum values of the plurality of lower nodes 300 with the temporary minimum value of each of the plurality of lower nodes 300. The upper node 200 transfers the query only to the lower node 300 whose provisional minimum value is less than or equal to the minimum value B. As a result, the processing load on the lower node 300 can be reduced.

以下、実施形態に関する実験結果について述べる。出願人は、下記の条件で実験を行った。
・100万件の32ビットのデータ(乱数)を、記憶部350に順次入力する。
・記憶部350に記憶されるデータ数の上限は100件であり、古いデータから順に削除される。
Hereinafter, experimental results regarding the embodiment will be described. The applicant conducted the experiment under the following conditions.
The 1-million 32-bit data (random number) is sequentially input to the storage unit 350.
The upper limit of the number of data stored in the storage unit 350 is 100, and old data is deleted in order.

この場合、センサ値の最大値および最小値の更新回数は39656回であった。これに対し、仮最小値の更新回数は2727回であり、仮最大値の更新回数は2663回であり、これらの合計値は5390回であった。このため、本実施形態によれば、最大値または最小値の少なくとも一方が更新される度にインデックスを更新する場合と比較して、インデックスの更新回数を86.4%削減することができた。また、擬陽性の発生確率は、1.7%であった。このように、本発明によれば、インデックスの更新回数を削減できるとともに、擬陽性の発生を抑制することができる。 In this case, the maximum number of sensor values and the minimum number of updates were 39,656. On the other hand, the number of updates of the provisional minimum value was 2727, the number of updates of the provisional maximum value was 2663, and the total value of these was 5,390. Therefore, according to the present embodiment, the number of index updates can be reduced by 86.4% as compared with the case where the index is updated every time at least one of the maximum value and the minimum value is updated. The probability of false positive occurrence was 1.7%. As described above, according to the present invention, the number of index updates can be reduced and the occurrence of false positives can be suppressed.

以上説明した少なくともひとつの実施形態によれば、データベース管理システム10は、上位ノード200と、複数の下位ノード300とを持つ。上位ノード200は、データを要求するクエリをクライアント端末100から受信し、受信したクエリを条件に応じて複数の下位ノード300のいずれかに送信する。複数の下位ノード300は、上位ノード200から受信したクエリに基づく処理を実行してデータを取得し、取得したデータを上位ノード200に送信する。上位ノード200は、下位ノード300に保持されるデータの範囲を示すインデックスを保持し、クエリの検索対象のデータの範囲がインデックスによって示される範囲にない場合、下位ノード300にクエリを転送しない。これによって、データベース管理システム10は、下位ノードに保持されるデータの更新頻度が高い場合であっても、データベース管理システムのパフォーマンスが低下するのを抑制することができる。 According to at least one embodiment described above, the database management system 10 has an upper node 200 and a plurality of lower nodes 300. The upper node 200 receives a query requesting data from the client terminal 100, and transmits the received query to any of the plurality of lower nodes 300 according to the conditions. The plurality of lower nodes 300 execute processing based on the query received from the upper node 200 to acquire data, and transmit the acquired data to the upper node 200. The upper node 200 holds an index indicating the range of data held in the lower node 300, and does not transfer the query to the lower node 300 when the range of the search target data of the query is not within the range indicated by the index. As a result, the database management system 10 can prevent the performance of the database management system from deteriorating even when the frequency of updating the data held in the lower nodes is high.

なお、第1実施形態および第2実施形態において、クエリの検索対象のデータはセンサ値であることとしたが、これに限られない。例えば、クエリの検索対象のデータは、大小関係を規定できるデータであれば、文字データであってもよい。また、第1実施形態および第2実施形態において、精度無視ビット数nを用いて丸め処理を行うこととしたが、これに限られない。例えば、クエリの検索対象のデータが2次元データである場合、2次元の平面上における領域(例えば、矩形領域)を、インデックスとして用いてもよい。このため、上位ノード200は、下位ノード300に保持されるデータの範囲より広い範囲を、下位ノード300に保持されるデータの範囲情報(インデックス)として保持してよい。 In addition, in 1st Embodiment and 2nd Embodiment, although it was set as the data of search object of a query being a sensor value, it is not restricted to this. For example, the search target data of the query may be character data as long as the data can define the magnitude relationship. Further, in the first and second embodiments, the rounding process is performed using the precision neglected bit number n, but the rounding process is not limited to this. For example, when the search target data of the query is two-dimensional data, a region (for example, a rectangular region) on a two-dimensional plane may be used as an index. Therefore, the upper node 200 may hold a range wider than the range of data held in the lower node 300 as range information (index) of data held in the lower node 300.

また、第1実施形態および第2実施形態において、クライアント端末100、上位ノード200、および複数の下位ノード300は、ツリー型のネットワークによって互いに接続されていることとしたが、これに限られない。例えば、クライアント端末100、上位ノード200、および複数の下位ノード300は、メッシュ型のネットワークによって互いに接続されてもよい。 Further, in the first and second embodiments, the client terminal 100, the upper node 200, and the plurality of lower nodes 300 are connected to each other by a tree network, but the present invention is not limited to this. For example, the client terminal 100, the upper node 200, and the plurality of lower nodes 300 may be connected to each other by a mesh type network.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれると同様に、特許請求の範囲に記載された発明とその均等の範囲に含まれるものである。 Although some embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the spirit of the invention. The embodiments and their modifications are included in the scope of the invention and the scope thereof, and are included in the invention described in the claims and the scope of equivalents thereof.

10…データベース管理システム、100…クライアント端末、200…上位ノード、210…クエリ実行部、220…インデックス管理部、230…記憶部、240…通信部、300…下位ノード、310…通信部、320…クエリ実行部、330…テーブル管理部、340…インデックス管理部、350…記憶部、360…インデックス通知判定部、361…更新頻度判定部 10... Database management system, 100... Client terminal, 200... Upper node, 210... Query execution unit, 220... Index management unit, 230... Storage unit, 240... Communication unit, 300... Lower node, 310... Communication unit, 320... Query execution unit, 330... Table management unit, 340... Index management unit, 350... Storage unit, 360... Index notification determination unit, 361... Update frequency determination unit

Claims (13)

データを要求するクエリをクライアント端末から受信し、受信した前記クエリを条件に応じて複数の第2ノードのいずれかに送信する第1ノードと、
前記第1ノードから受信した前記クエリに基づく処理を実行してデータを取得し、取得したデータを前記第1ノードに送信する前記複数の第2ノードと、を備え、
前記第2ノードは、前記第2ノードが保持するデータの範囲を包含する範囲情報を前記第1ノードに送信し、
前記第1ノードは、前記範囲情報を前記第2ノードから取得して保持し、前記クエリの検索対象のデータの範囲が前記範囲情報によって示される範囲にない場合、前記第2ノードに前記クエリを転送しない
データベース管理システム。
A first node for receiving a query requesting data from a client terminal and transmitting the received query to any of a plurality of second nodes according to conditions;
A plurality of second nodes that perform processing based on the query received from the first node to acquire data, and transmit the acquired data to the first node;
The second node transmits range information including a range of data held by the second node to the first node,
The first node acquires the range information from the second node and retains the range information. When the range of the search target data of the query is not within the range indicated by the range information, the first node stores the query in the second node. A database management system that does not transfer.
前記範囲情報は、前記第2ノードが保持するデータの最大値以上である仮最大値と、自身が保持するデータの最小値以下である仮最小値とを含む、
請求項1記載のデータベース管理システム。
The range information includes a temporary maximum value that is equal to or larger than a maximum value of data held by the second node and a temporary minimum value that is equal to or smaller than a minimum value of data held by itself.
The database management system according to claim 1.
前記第2ノードは、予め設定されたビット数nを用いて、丸め処理として、前記第2ノードに保持されるデータの最大値の下位nビットを繰り上げて前記仮最大値を算出するとともに、前記第2ノードに保持されるデータの最小値の下位nビットを切り捨てて前記仮最小値を算出し、前記仮最大値および前記仮最小値を含む更新要求を前記第1ノードに送信し、
前記第1ノードは、前記第2ノードから前記更新要求を受信した場合、前記更新要求に含まれる前記仮最大値および前記仮最小値を前記範囲情報に設定する
請求項2記載のデータベース管理システム。
The second node uses a preset number of bits n to round up the lower n bits of the maximum value of the data held in the second node as rounding processing to calculate the temporary maximum value, and Truncating the lower n bits of the minimum value of the data held in the second node to calculate the temporary minimum value, and sending an update request including the temporary maximum value and the temporary minimum value to the first node,
The database management system according to claim 2, wherein when the first node receives the update request from the second node, the temporary maximum value and the temporary minimum value included in the update request are set in the range information.
前記第2ノードは、前記第2ノードに保持されるデータの前記最大値および前記最小値が更新された場合、前記仮最大値および前記仮最小値を算出し、算出した前記仮最大値および前記仮最小値の双方が前回算出した値と同じである場合、前記更新要求を前記第1ノードに送信しない
請求項3記載のデータベース管理システム。
The second node calculates the temporary maximum value and the temporary minimum value when the maximum value and the minimum value of the data stored in the second node are updated, and the calculated temporary maximum value and the temporary minimum value are calculated. The database management system according to claim 3, wherein when both of the provisional minimum values are the same as the values calculated last time, the update request is not transmitted to the first node.
前記第2ノードは、前記仮最大値および前記仮最小値に加えて、前記丸め処理に用いられた前記ビット数nを含む前記更新要求を前記第1ノードに送信する
請求項3または4記載のデータベース管理システム。
The said 2nd node transmits to the said 1st node the said update request which contains the said bit number n used for the said rounding process in addition to the said temporary maximum value and the said temporary minimum value. Database management system.
前記第2ノードは、前記仮最大値または前記仮最小値が所定時間t1の間更新されない場合、前記丸め処理に用いられる前記ビット数nを減少させる
請求項3から5の何れか一項に記載のデータベース管理システム。
The said 2nd node reduces the said bit number n used for the said rounding process, when the said temporary maximum value or the said temporary minimum value is not updated during the predetermined time t1, The said 2nd node is any one of Claim 3 to 5. Database management system.
前記第2ノードは、前記仮最大値または前記仮最小値が所定時間t2の間に所定回数kを超えて更新された場合、前記丸め処理に用いられる前記ビット数nを増加させる
請求項3から6の何れか一項に記載のデータベース管理システム。
The second node increases the number of bits n used for the rounding process when the temporary maximum value or the temporary minimum value is updated more than a predetermined number of times k within a predetermined time t2. 6. The database management system according to any one of 6.
前記所定時間t1は、前記ビット数nを入力とし、前記ビット数nが小さいほど大きな値を出力する関数f(n)によって定められる
請求項6記載のデータベース管理システム。
7. The database management system according to claim 6, wherein the predetermined time t1 is determined by a function f(n) that inputs the number of bits n and outputs a larger value as the number of bits n is smaller.
前記第2ノードは、前記仮最大値または前記仮最小値が所定時間t3の間に更新された事象が連続で、所定回数mを超えて続いた場合、前記丸め処理に用いられる前記ビット数nを増加させる
請求項3から6の何れか一項に記載のデータベース管理システム。
In the second node, when the temporary maximum value or the temporary minimum value is continuously updated for a predetermined time t3 and continues for more than a predetermined number of times m, the number of bits n used for the rounding process is n. The database management system according to claim 3, wherein the database management system is increased.
前記第1ノードは、
前記複数の第2ノードに保持されるデータのうちの最大値を要求するクエリを受信した場合、前記複数の第2ノードごとに、前記仮最大値に基づいて真の最大値の下限値を算出し、
算出した前記複数の第2ノードごとの前記真の最大値の下限値のうちの最大値と、前記複数の第2ノードのそれぞれについての前記仮最大値とを比較し、
前記仮最大値が前記真の最大値の下限値のうちの最大値以上である前記第2ノードにのみ、前記クエリを転送する
請求項3から9の何れか一項に記載のデータベース管理システム。
The first node is
When a query requesting the maximum value of the data held in the plurality of second nodes is received, a lower limit value of the true maximum value is calculated for each of the plurality of second nodes based on the temporary maximum value. Then
Comparing the maximum value of the calculated lower limit of the true maximum value for each of the plurality of second nodes with the temporary maximum value for each of the plurality of second nodes,
The database management system according to claim 3, wherein the query is transferred only to the second node in which the temporary maximum value is greater than or equal to a maximum value of the lower limit values of the true maximum value.
前記第1ノードは、
前記複数の第2ノードに保持されるデータのうちの最小値を要求するクエリを受信した場合、前記複数の第2ノードごとに、前記仮最小値に基づいて真の最小値の上限値を算出し、
算出した前記複数の第2ノードごとの前記真の最小値の上限値のうちの最小値と、前記複数の第2ノードのそれぞれについての前記仮最小値とを比較し、
前記仮最小値が前記真の最小値の上限値のうちの最小値以下である前記第2ノードにのみ、前記クエリを転送する
請求項3から9の何れか一項に記載のデータベース管理システム。
The first node is
When a query requesting the minimum value of the data held in the plurality of second nodes is received, an upper limit value of the true minimum value is calculated for each of the plurality of second nodes based on the temporary minimum value. Then
Comparing the calculated minimum value of the upper limit values of the true minimum value of each of the plurality of second nodes with the temporary minimum value of each of the plurality of second nodes,
The database management system according to any one of claims 3 to 9, wherein the query is transferred only to the second node in which the temporary minimum value is equal to or less than the minimum value of the upper limit values of the true minimum value.
前記第1ノードは、前記第2ノードに保持されるデータの範囲より広い範囲を、第2ノードに保持されるデータの前記範囲情報として保持する
請求項1から11の何れか一項に記載のデータベース管理システム。
The said 1st node hold|maintains the range wider than the range of the data hold|maintained at the said 2nd node as the said range information of the data hold|maintained at a 2nd node. Database management system.
第1ノードが、データを要求するクエリをクライアント端末から受信し、受信した前記クエリを条件に応じて複数の第2ノードのいずれかに送信し、
前記第2ノードが、前記第1ノードから受信した前記クエリに基づく処理を実行してデータを取得し、取得したデータを前記第1ノードに送信し、
前記第2ノードが、前記第2ノードが保持するデータの範囲を包含する範囲情報を前記第1ノードに送信し、
前記第1ノードが、前記第2ノードに保持されるデータの範囲を示す範囲情報を前記第2ノードから取得して保持し、前記クエリの検索対象のデータの範囲が前記範囲情報によって示される範囲にない場合、前記第2ノードに前記クエリを転送しない
データベース管理方法。
The first node receives a query requesting data from a client terminal, and sends the received query to any of a plurality of second nodes depending on conditions,
The second node executes a process based on the query received from the first node to acquire data, and transmits the acquired data to the first node,
The second node transmits range information including a range of data held by the second node to the first node,
The first node acquires range information indicating a range of data held in the second node from the second node and holds the range information, and a range of data to be searched by the query is a range indicated by the range information. If not, the database management method does not transfer the query to the second node.
JP2019089167A 2019-05-09 2019-05-09 Database management system and database management method Active JP6702582B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019089167A JP6702582B2 (en) 2019-05-09 2019-05-09 Database management system and database management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019089167A JP6702582B2 (en) 2019-05-09 2019-05-09 Database management system and database management method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2017111076A Division JP2018206084A (en) 2017-06-05 2017-06-05 Database management system and database management method

Publications (2)

Publication Number Publication Date
JP2019179555A JP2019179555A (en) 2019-10-17
JP6702582B2 true JP6702582B2 (en) 2020-06-03

Family

ID=68278689

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019089167A Active JP6702582B2 (en) 2019-05-09 2019-05-09 Database management system and database management method

Country Status (1)

Country Link
JP (1) JP6702582B2 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3395208B2 (en) * 1991-07-10 2003-04-07 株式会社日立製作所 How to sort and access a distributed database
JP3438699B2 (en) * 1993-04-28 2003-08-18 株式会社日立製作所 Database management method and system
ES2821415T3 (en) * 2003-05-19 2021-04-26 Huawei Tech Co Ltd Limit exploration of unordered and / or clustered relationships by using near-ordered correspondences
CN102859517B (en) * 2010-05-14 2016-07-06 株式会社日立制作所 Time series data managing device, system and method
US20140059000A1 (en) * 2011-04-08 2014-02-27 Hitachi, Ltd. Computer system and parallel distributed processing method
US10394848B2 (en) * 2013-07-29 2019-08-27 Amazon Technologies, Inc. Generating a multi-column index for relational databases by interleaving data bits for selectivity

Also Published As

Publication number Publication date
JP2019179555A (en) 2019-10-17

Similar Documents

Publication Publication Date Title
US10204114B2 (en) Replicating data across data centers
WO2019200714A1 (en) Server connection method, computer readable storage medium, terminal device, and apparatus
US11238046B2 (en) Information management device, information management method, and information management program
US9002844B2 (en) Generating method, generating system, and recording medium
EP3739466A1 (en) Information management device, information management method, and information management program
US9886785B2 (en) Indexing and querying spatial graphs
WO2018225314A1 (en) Database management system and database management method
JP6705764B2 (en) Generation device, generation method, and generation program
JP6702582B2 (en) Database management system and database management method
CN110120918B (en) Identification analysis method and device
US10298704B2 (en) Determining geolocation of IP addresses using user transitions over time
WO2019228009A1 (en) Lsm tree optimization method and device and computer equipment
JP5507620B2 (en) Synonym estimation device, synonym estimation method, and synonym estimation program
JP5949561B2 (en) Information processing apparatus, information processing system, information processing method, and information processing program
CN112612793B (en) Resource query method, device, node equipment and storage medium
JP2019144780A (en) Generating device, generating method, and generating program
US11720397B2 (en) Information processing method and apparatus to migrate tasks between resources
US11449549B2 (en) Storing entries as ordered linked lists
US11609894B2 (en) Data storage system conflict management
US20230195761A1 (en) Spatial lsm tree apparatus and method for indexing blockchain based geospatial point data
JP2017211846A (en) Retrieval data management device, retrieval data management method, and retrieval data management program
JP6767825B2 (en) Data management equipment, data management methods, and data management programs
JP2021060635A (en) Information processing device, information processing method, and information processing program
CN112199381A (en) Data synchronization system, method and device, electronic equipment and storage medium
CN115936091A (en) Deep learning model training method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190509

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200424

R150 Certificate of patent or registration of utility model

Ref document number: 6702582

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150