JP6891527B2 - Database write controller - Google Patents
Database write controller Download PDFInfo
- Publication number
- JP6891527B2 JP6891527B2 JP2017026648A JP2017026648A JP6891527B2 JP 6891527 B2 JP6891527 B2 JP 6891527B2 JP 2017026648 A JP2017026648 A JP 2017026648A JP 2017026648 A JP2017026648 A JP 2017026648A JP 6891527 B2 JP6891527 B2 JP 6891527B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- queue
- database
- load
- unit
- 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
Links
- 238000000605 extraction Methods 0.000 claims description 20
- 238000000034 method Methods 0.000 claims description 14
- 230000006378 damage Effects 0.000 claims description 10
- 238000001514 detection method Methods 0.000 claims description 10
- 230000006870 function Effects 0.000 description 5
- 239000000284 extract Substances 0.000 description 2
- 230000003111 delayed effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、データベース書込制御装置、データベース書込制御方法、及びプログラムに関する。 The present invention relates to a database write control device, a database write control method, and a program.
センシングして得たデータ(以下、センサデータと記す)をサーバ装置へ送信するセンサと、センサデータを記憶するデータベースを有し、センサから受信したセンサデータを上記データベースに登録するサーバ装置とを含むセンサネットワークシステムが提案されている(例えば特許文献1参照)。 It includes a sensor that transmits the data obtained by sensing (hereinafter referred to as sensor data) to the server device, and a server device that has a database that stores the sensor data and registers the sensor data received from the sensor in the above database. A sensor network system has been proposed (see, for example, Patent Document 1).
ところで、センサデータのように時々刻々と発生するデータのトラフィックが一時的に増加する状況に対処可能にするために、データベースに書込む前のデータを一時的に記憶するキューを設けることがある。この場合、サーバ装置は、センサ等から受信したデータをキューに一旦記憶し、データベースへの書込みが可能な状態になると、キューからデータを取り出し、データベースへ書込む。サーバ装置は、キューからデータを取り出す際には、キューに記憶されたデータのうち最も古いデータを取り出す。 By the way, in order to cope with a situation where the traffic of data that is generated every moment such as sensor data is temporarily increased, a queue that temporarily stores the data before being written to the database may be provided. In this case, the server device temporarily stores the data received from the sensor or the like in the queue, and when it becomes possible to write to the database, the server device takes out the data from the queue and writes it to the database. When retrieving data from the queue, the server device retrieves the oldest data stored in the queue.
しかしながら、サーバ装置が、1以上のデータを記憶するキューから古い順にデータを取り出すという一定の方法で、データベースに書込むためのデータを取り出す構成では、データベースの負荷が高いためにデータベースへの書込み処理が追いつかない場合、データベースで参照できるデータが古いものになってしまう。 However, in a configuration in which the server device retrieves data to be written to the database by a fixed method of fetching data from a queue that stores one or more data in chronological order, the load on the database is high, so the write process to the database is performed. If you can't keep up, the data available in the database will be out of date.
本発明の目的は、上述した課題を解決するデータベース書込制御装置を提供することにある。 An object of the present invention is to provide a database write control device that solves the above-mentioned problems.
本発明の一形態に係るデータベース書込制御装置は、
データベースに書込むデータの書込順序待ち制御を行うデータベース書込制御装置であって、
前記データを一時的に記憶するキューと、
前記データを前記キューに書込むキュー登録部と、
前記データベースの負荷を検知する負荷状況検知部と、
前記キューに記憶された1以上の前記データの中から、前記データベースに書込むために前記キューから取り出すデータを、前記データベースの負荷に基づいて決定するキュー取出部と、
を含む。
The database write control device according to one embodiment of the present invention is
A database write control device that controls the writing order of data to be written to the database.
A queue that temporarily stores the data and
A queue registration unit that writes the data to the queue,
A load status detection unit that detects the load on the database,
A queue retrieval unit that determines data to be fetched from the queue for writing to the database from one or more of the data stored in the queue based on the load of the database.
including.
本発明の他の形態に係るデータベース書込制御方法は、
データベースに書込むデータを一時的に記憶するキューを有するコンピュータが実行するデータベース書込制御方法であって、
前記データを前記キューに書込み、
前記データベースの負荷を検知し、
前記キューに記憶された1以上の前記データの中から、前記データベースに書込むために前記キューから取り出すデータを、前記データベースの負荷に基づいて決定する。
The database write control method according to another embodiment of the present invention is
A database write control method executed by a computer that has a queue that temporarily stores the data to be written to the database.
Write the data to the queue,
Detects the load on the database and
From one or more of the data stored in the queue, the data to be fetched from the queue for writing to the database is determined based on the load of the database.
本発明の他の形態に係るプログラムは、
データベースに書込むデータを一時的に記憶するキューを有するコンピュータを、
前記データを前記キューに書込むキュー登録部と、
前記データベースの負荷を検知する負荷状況検知部と、
前記キューに記憶された1以上の前記データの中から、前記データベースに書込むために前記キューから取り出すデータを、前記データベースの負荷に基づいて決定するキュー取出部と、
して機能させる。
Programs according to other embodiments of the present invention
A computer that has a queue that temporarily stores the data to be written to the database
A queue registration unit that writes the data to the queue,
A load status detection unit that detects the load on the database,
A queue retrieval unit that determines data to be fetched from the queue for writing to the database from one or more of the data stored in the queue based on the load of the database.
To make it work.
本発明は上述した構成を有することにより、データベースの負荷が高いためにデータベースへの書込み処理が追いつかない場合であっても、データベースで参照できるデータが古いものになるのを防止することができる。 By having the above-described configuration, the present invention can prevent the data that can be referred to in the database from becoming old even when the writing process to the database cannot keep up with the load on the database.
[第1の実施形態]
次に本発明の第1の実施形態について図面を参照して詳細に説明する。
[First Embodiment]
Next, the first embodiment of the present invention will be described in detail with reference to the drawings.
<本実施形態の概要>
本実施形態に係るデータベース書込制御装置は、通常時はキューに登録された順にデータをデータベースに書き込む。しかし、データベース書込制御装置は、必要に応じてキューの中間や末尾からデータを取り出し、より新しいデータを優先的にデータベースに書き込む。こうすることで、データベース書込制御装置は、できる限り最新の情報をデータベースから参照可能とする。
<Outline of this embodiment>
The database write control device according to the present embodiment normally writes data to the database in the order registered in the queue. However, the database write control device fetches data from the middle or the end of the queue as needed, and preferentially writes newer data to the database. By doing so, the database write control device can refer to the latest information from the database as much as possible.
<本実施形態が解決しようとする課題>
データベースに書込むデータの例に、航空機の位置情報がある。航空機の位置情報は、管制官としては最新のものを把握しておきたい。その理由は、ある程度時間が経過すると、より新しい情報が発生するため、それまでの情報は価値が大きく下がるためである。しかし、航空機の位置情報は、履歴情報として見た場合は、古いものを含めて全てデータベースに記録しておくことが望ましい。
<Problems to be solved by this embodiment>
An example of the data to be written to the database is the location information of the aircraft. As a controller, I want to keep track of the latest aircraft position information. The reason is that after a certain amount of time, newer information is generated, and the value of the previous information is greatly reduced. However, when viewed as historical information, it is desirable to record all aircraft position information, including old ones, in the database.
航空機の位置情報のような情報を記録・参照するシステムを構成する場合、大量の情報が発生し、あるいは障害発生等でシステムが縮退の状態になると、書き込みの処理が追いつかず、データベースで参照できる情報が古いものとなる恐れがある。予め発生する情報の最大量を想定した構成にするか、或いは、障害発生に備えて冗長化するといった構成にすると、上記問題は回避できるが、コストがかかるという問題がある。 When configuring a system that records and refers to information such as aircraft position information, if a large amount of information is generated or the system is in a degenerate state due to a failure, etc., the writing process cannot keep up and can be referred to in the database. The information may be out of date. The above problem can be avoided, but there is a problem that the cost is high if the configuration is such that the maximum amount of information generated in advance is assumed or the configuration is made redundant in preparation for the occurrence of a failure.
<本実施形態による解決手段>
本実施形態に係るデータベース書込制御装置は、データベースへのデータ書込順序をキューで管理する。データベース書込制御装置は、平時はキューの先頭から順にデータを取り出してデータベースに書き込む。即ち、データベース書込制御装置は、平時はキューに記憶されたデータのうち最も過去にキューに登録されたデータを取り出してデータベースに書込む。しかし、高負荷時等にデータベースへのデータ書き込みが遅延して、最新情報の参照が難しくなることが懸念される場合には、データベース書込制御装置は、より新しいデータを優先してデータベースに書き込むために、キューの中間や末尾からデータを取り出す。これにより、常にできるだけ新しい情報がデータベースから参照可能となる。また、データベース書込制御装置は、後回しにしたデータを最終的にはキューから取り出してデータベースに書き込む。これにより、古い情報を含む全ての情報が履歴情報としてデータベースに記憶される。
<Solution by the present embodiment>
The database write control device according to the present embodiment manages the data write order to the database in a queue. In normal times, the database write control device takes out data in order from the beginning of the queue and writes it to the database. That is, in normal times, the database write control device takes out the data stored in the queue most recently and writes it to the database. However, when there is a concern that writing data to the database will be delayed and it will be difficult to refer to the latest information when the load is high, the database write control device will give priority to writing newer data to the database. To retrieve data from the middle or end of the queue. This ensures that as much new information as possible is always available from the database. In addition, the database write control device finally takes out the postponed data from the queue and writes it to the database. As a result, all the information including the old information is stored in the database as history information.
<本実施形態の構成>
図1は、本実施形態に係るデータベース書込制御装置100の構成の一例を示す。また図1はデータベース書込制御装置100を利用して、計測・採取した情報をオペレータに提供するシステムの構成の一例を示す。図1における各矢印は、各センサ部101で計測・採取した情報をデータ参照プログラム111で参照するまでのデータの流れを示している。
<Structure of this embodiment>
FIG. 1 shows an example of the configuration of the database
センサ部101は、計測・採取された情報をデータ受信部102に送信する。例えば、各センサ部101は、各航空機に搭載されたレーダやGPS等を含むものであってよい。各センサ部101で採取された航空機の位置情報は、無線通信によってデータ受信部102に向けて送信される。上記位置情報は、例えば、航空機の緯度と経度と高度とを含む。また上記位置情報は、採取した時刻、センサ部101を特定する情報(以下、センサIDと記す)を更に含んでいてよい。以下、航空機の位置情報を「データ」と記す。
The
データ受信部102は、各センサ部101から送信されたデータを受信し、データベース書込制御装置100のキュー登録部103へデータ書込要求を送る。データ書込要求は、各センサ部101から受信したデータを含む。
The
データベース書込制御装置100は、キュー登録部103、書込待ちキュー領域104、キュー取出部105、対象キュー選択手段106、及び、負荷状況検知手段107を含む。
The database
データ書込要求を受けたキュー登録部103は、書込待ちキュー領域104にアクセスし、各センサ部101のセンサID毎に設けられたキューの末尾に、データ書込要求に含まれるデータを追加する。
The
書込待ちキュー領域104は、データ書込要求のあったデータを一時的に保持しておく記憶領域である。図2は書込待ちキュー領域104で管理されるデータ構造の一例を示したものである。
The write-waiting
図2を参照すると、書込待ちキュー領域104は、センサID毎に、キュー制御情報200およびキュー210のペアを有する。
Referring to FIG. 2, the write-waiting
キュー210は、複数のデータ211をチェーン付けして記憶する領域である。キュー制御情報200は、センサID201、先頭位置ポインタ202、及び取出位置ポインタ203で構成される。先頭位置ポインタ202は、キュー210においてチェーン付けされた複数のデータ211の先頭のデータ211を指し示すポインタである。平時には、この先頭位置ポインタ202が指し示すデータがキュー210から取り出される。取出位置ポインタ203は、高負荷状況の時に取り出すべきデータ211を指し示すポインタである。先頭位置ポインタ202、取出位置ポインタ203、及びデータ211のチェーン付けは、キュー登録部103によるデータ211の追加、およびキュー取出部105によるデータ211の取出しに伴って更新される。
The
図3は、複数のデータ211をチェーン付けるデータ構造の一例を示す。図3の例では、3つのデータ211−1〜211−3がチェーン付けされている。各々のデータ211は、センサID221、採取時刻222、センシングデータ223、前方向ポインタ224、及び後方向ポインタ225を含む。センサID221と採取時刻222とセンシングデータ223は、センサ部101から送信されたデータを構成する要素である。前方向ポインタ224は、チェーン上の1つ前のデータ211を指し示すポインタである。後方向ポインタ225は、チェーン上の1つ後のデータ211を指し示すポインタである。前方向ポインタ224と後方向ポインタ225は、キュー210への登録時にデータ211に付加され、キュー210からの取出し時に除去される。
FIG. 3 shows an example of a data structure in which a plurality of
図3の例では、3つのデータ211−1〜211−3のうち、データ211−1が最初にキュー210に登録され、次にデータ211−2がキュー210に登録され、最後にデータ211−3がキュー210に登録された状況を示している。このとき、データ211−1を、チェーン付けされた複数のデータ211の先頭のデータ、或いは最古のデータと呼ぶ。また、データ211−3を、チェーン付けされた複数のデータ211の末尾のデータ、或いは最新のデータと呼ぶ。また、データ211−2を、チェーン付けされた複数のデータ211の中間のデータと呼ぶ。また、データ211−2から見てデータ211−1を1つ前のデータと呼び、データ211−3を1つ後のデータと呼ぶ。先頭のデータ211−1以外のデータ211−2、211−3の前方向ポインタ224は、1つ前のデータ211−1、211−2を指している。先頭のデータ211−1の前方向ポインタ224は、例えばNULL値である。末尾のデータ211−3以外のデータ211−1、211−2の後方向ポインタ225は、1つ後のデータ211−2、211−3を指している。末尾のデータ211−3の後方向ポインタ225は、例えばNULL値である。また図3の例では、先頭位置ポインタ202は、先頭のデータ211−1を指している。また取出位置ポインタ203は、末尾のデータ211−3を指している。
In the example of FIG. 3, of the three data 211-1 to 211-3, the data 211-1 is first registered in the
再び図1を参照すると、対象キュー選択手段106は、書込待ちキュー領域104内の複数のキュー210のうちデータを取り出すキューを選択する。選択の基準は、例えば、データ登録の時間順とすることができる。或いは選択の基準は、センサID間で予め定められた優先度順とすることができる。或いは選択の基準は、データベース120の高負荷時と平時とで相違していてよい。或いは選択の基準は、利用者が構築する図1のシステムの特性に応じて決定した他の基準であってもよい。対象キュー選択手段106は、選択したキューをキュー取出部105に通知する。
Referring to FIG. 1 again, the target queue selection means 106 selects a queue for fetching data from a plurality of
負荷状況検知手段107は、データベース120の負荷状況を検知する。データベース120の負荷状況を検知する方法は、任意である。例えば、負荷状況検知手段107は、データベース120を構成するハードウェアの要素であるCPU(Central Processor Unit)の使用率を計測し、この計測したCPU使用率に基づいてデータベース120の負荷状況を検知してよい。例えば負荷状況検知手段107は、CPU使用率が閾値より高ければ「高負荷」、CPU使用率が閾値以下であれば「低負荷」(平時)としてよい。或いは負荷状況検知手段107は、データベース120を構成するハードウェアの要素であるディスク装置のディスク入出力(I/O)使用率を計測し、この計測したディスクI/O使用率に基づいてデータベース120の負荷状況を検知してよい。例えば負荷状況検知手段107は、ディスクI/O使用率が閾値より高ければ「高負荷」、ディスクI/O使用率が閾値以下であれば「低負荷」(平時)としてよい。上記では、CPU使用率、ディスクI/O使用率に基づいてデータベース120の負荷を検知したが、負荷状況検知手段107は、CPUおよびディスク以外のリソースの使用状況からデータベース120の負荷状況を検知してよい。或いは、負荷状況検知手段107は、データベース120の負荷状況を示すコマンドをオペレータから受信することによって、データベース120の負荷状況を検知してよい。或いは負荷状況検知手段107は、利用者が構築する図1のシステムの特性に応じて決定した他の方法を使用して、データベース120の負荷状況を検知してよい。
The load status detecting means 107 detects the load status of the
キュー取出部105は、データベース120へのデータの書込みが可能になると、書込待ちキュー領域104からデータ211を1つ取り出し、データ書込部108に対して、取り出したデータ211のデータベース120への登録を要求する。キュー取出部105がデータ211を取り出す書込待ちキュー領域104内のキュー210は、対象キュー選択手段106によって選択されたキュー210である。また、キュー取出部105は、負荷状況検知手段107によって検知された負荷状況に基づいて、キュー210からデータ211を取り出す。即ち、キュー取出部105は、データベース120が高負荷ならば、取出位置ポインタ203が指すデータ211を取り出す。またキュー取出部105は、データベース120が低負荷(平時)ならば、先頭位置ポインタ202が指すデータ211を取り出す。
When the
データベース120は、データ書込部108、複数の記憶装置109、及びデータ読取部110を含む。データ書込部108は、キュー取出部105からのデータ書込要求を受けて、データを記憶装置109に書き込む。記憶装置109は、データを実際に格納する記憶領域である。記憶装置109は、本例では複数存在するが、最低1つあればよい。データ読取部110は、記憶装置109にアクセスし、書き込まれているデータを取得して、データ参照プログラム111に渡す。
The
データ参照プログラム111は、データベース120を参照するプログラムである。データ参照プログラム111は、データ読取部110から受け取ったデータを加工して図示しない出力装置から出力する。例えばデータ参照プログラム111は、受け取ったデータに基づいてグラフや航跡図等を作成してディスプレイに表示する。
The
<本実施形態の動作>
図4は、キュー登録部103の動作の一例を示すフローチャートである。キュー登録部103は、データ受信部102からデータ登録要求を受信すると、図4に示す動作を行う。先ずキュー登録部103は、データ受信部102からのデータ登録要求に含まれるセンサIDに対応するキュー210が、既に書込待ちキュー領域104に存在するか否かを確認する(E01)。存在しない場合、キュー登録部103は、データ登録要求に含まれるセンサIDに対応するキュー制御情報200とキュー210のペアを生成し、キュー210にデータ登録要求に含まれるデータ211を登録して終了する(E02)。
<Operation of this embodiment>
FIG. 4 is a flowchart showing an example of the operation of the
一方、データ登録要求に含まれるセンサIDに対応するキュー210が存在する場合、キュー登録部103は、そのキュー210の末尾にデータ登録要求に含まれるデータ211を登録する(E03)。また、キュー登録部103は、予め定められた取出位置更新ルールに基づいてキュー制御情報200の取出位置ポインタ203の更新の要否を判断し、必要ならば取出位置ポインタ203を、今回登録したデータ211を指すように更新する。取出位置更新ルールは、例えば以下のものが考えられる。
(A)キュー登録部103は、データを登録する都度、登録した最新のデータを指し示すように、取出位置ポインタ203を更新する。
(B)キュー登録部103は、データをn個(nは2以上の正の整数)登録する毎に、登録した最新のデータを指し示すように、取出位置ポインタ203を更新する。例えば、キュー210にデータを5つ登録すると、最後に登録したデータを指し示すように取出位置ポインタ203を更新し、その後、4つのデータを登録する際には取出位置ポインタ203は更新しない。
(C)キュー登録部103は、上記AあるいはBの判断を、センサID毎に行う。即ち、キュー登録部103は、特定のセンサIDに対応するキュー210ならば上記Aのルールを適用し、特定のセンサID以外に対応するキュー210ならば上記Bのルールを適用する。
但し、取出位置ポインタ203を更新するルールは上記の例に限定されない。キュー登録部103は、利用者が構築する図1のシステムの特性に応じて決定した他のルールに基づいて、取出位置ポインタ203の更新の要否を判断してよい。
On the other hand, when the
(A) The
(B) The
(C) The
However, the rule for updating the take-out
図5はキュー取出部105の動作の一例を示すフローチャートである。キュー取出部105は、例えば、データ書込部108が現在書込んでいるデータの書込みを終了し、次のデータの書込みが可能になった旨の通知をデータ書込部108から受信すると、図5に示す動作を行う。
FIG. 5 is a flowchart showing an example of the operation of the
先ずキュー取出部105は、対象キュー選択手段106の選択に従って、データ211を取り出す対象のキュー210を決定する(D01)。次にキュー取出部105は、負荷状況検知手段107による検知結果に基づいて、データベース120が高負荷状態か否かを判断する(D02)。
First, the
キュー取出部105は、平時であれば(データベース120が高負荷でなければ)、選択されたキュー210のキュー制御情報200内の先頭位置ポインタ202が指すデータ211を取り出す(D03)。次にキュー取出部105は、先頭位置ポインタ202を上記取り出したデータ211の1つ後のデータ211を指すように更新する(D04)。次にキュー取出部105は、上記取り出したデータ211の書込みをデータ書込部108に要求する(D05)。
In normal times (unless the
一方、キュー取出部105は、高負荷状態であれば、選択されたキュー210のキュー制御情報200内の取出位置ポインタ203が指すデータ211を取り出す(D06)。次にキュー取出部105は、取出位置ポインタ203を更新する(D07)。例えばキュー取出部105は、取り出したデータ211の後ろに1以上のデータがあれば、取り出したデータ211の1つ以上後ろのデータ211を指すように取出位置ポインタ203を更新する。またキュー取出部105は、取り出したデータ211の後ろにデータがなければ、取り出したデータ211の1つ前のデータ211があればそれを指すように取出位置ポインタ203を更新する。次にキュー取出部105は、上記取り出したデータ211の書込みをデータ書込部108に要求する(D05)。
On the other hand, if the load is high, the
図6は、キュー取出部105の動作の他の例を示すフローチャートである。図6では、図5に示すステップD01とステップD02の順序が入れ替わっている。図6を参照すると、キュー取出部105は、先ずデータベース120が高負荷状態か否かを判断する(D02)。次にキュー取出部105は、平時(高負荷でない時)であれば、対象キュー選択手段106によって平時の選択の基準で選択されたキュー210を取り出し対象のキューに決定する(D01A)。そしてキュー取出部105は、図5のステップD03〜D05と同様の処理を行う。他方、キュー取出部105は、高負荷時であれば、対象キュー選択手段106によって高負荷時の選択の基準で選択されたキュー210を取り出し対象のキューに決定する(D01B)。そしてキュー取出部105は、図5のステップD06、D07、D08と同様の処理を行う。
FIG. 6 is a flowchart showing another example of the operation of the
<本実施形態の効果>
本実施形態によれば、データベース120の高負荷時には、キュー210上のより新しく発生したデータのデータベース120への書き込みが優先されるため、データ参照の際はできるだけ最新のデータをデータベース120から得ることができる。
<Effect of this embodiment>
According to the present embodiment, when the load of the
データベース120への書き込みが後回しにされたキュー210上のデータは、一時的にはデータベース120から参照できない状態となる。しかし、キュー210上の新しいデータから順に書込まれるか、平時に戻った際に古いデータから順に書き込まれるため、最終的には全てのデータがデータベース120から参照可能となる。
The data on the
[第2の実施形態]
図7は、本発明の第2の実施形態に係るデータベース書込制御装置100Aの構成の一例を示す。本実施形態に係るデータベース書込制御装置100Aは、図1に示したデータベース書込制御装置100と比較して、データ破棄判定手段112を更に含んでいる点で、データベース書込制御装置100と相違し、それ以外はデータベース書込制御装置100と同じである。
[Second Embodiment]
FIG. 7 shows an example of the configuration of the database
データ破棄判定手段112は、キュー210から取り出したデータ211のデータベース120への書込み要否を、そのデータ211の価値に基づいて決定する。データ211の価値に基づいて書込み要否を判断する基準は、例えば以下のようなものが考えられる。
(A)データ破棄判定手段112は、キュー210への登録時刻が一定時間以上古いデータは価値が充分に低いと判断して書込み不要と決定し、それ以外のデータは書込み要と決定する。この場合、キュー登録部103は、データ211に登録時刻を付与してキュー210に記憶する。データ破棄判定手段112は、データ211に付与された登録時刻と現在時刻とを比較して、登録時刻が一定時間以上古いデータか否かを判断する。
(B)データ破棄判定手段112は、その時点で特に注視する必要のないセンサのデータであって値が予測の範囲内であるデータは価値が充分に低いと判断して書込み不要と決定し、それ以外のデータは書込み要と決定する。データ破棄判定手段112は、その時点で特に注視する必要のないセンサのデータか否かは、例えば、注視する必要のある旨がオペレータからのコマンドで指定されたセンサのデータか否かに基づいて判断する。また、データ破棄判定手段112は、予測の範囲内であるデータか否かは、例えば、それ以前にキュー210に登録されたデータに基づいて補間等によって算出した推定値と当該データの値との誤差が一定値以内ならば予測可能なデータ、それ以外は予測不可能なデータと決定する。
The data destruction determining means 112 determines whether or not the
(A) The data destruction determining means 112 determines that the data whose registration time in the
(B) The data discard determination means 112 determines that the data of the sensor that does not need to be closely watched at that time and whose value is within the range of prediction is sufficiently low in value and that writing is unnecessary. It is determined that other data needs to be written. Whether or not the data destruction determination means 112 is the data of the sensor that does not need to be watched at that time is based on, for example, whether or not the data of the sensor that needs to be watched is the data of the sensor specified by the command from the operator. to decide. Further, the data destruction determining means 112 determines whether or not the data is within the prediction range, for example, the estimated value calculated by interpolation or the like based on the data registered in the
図8は、データ破棄判定手段112の判断内容によってデータ書込要求の発生の有無を決定するキュー取出部105の動作を示すフローチャートである。図8は、ステップD08、D09が追加されている点で、図5と相違し、それ以外は図5と同じである。
FIG. 8 is a flowchart showing the operation of the
図8を参照すると、キュー取出部105は、データベース120の高負荷時(D02でYes)、キュー210から取り出したデータ211のデータベース120への書込み要否を、データ破棄判定手段112を使用して判定する(D08)。そして、キュー取出部105は、書込み不要であれば、そのデータについて書込み要求をデータ書込部108に送ることなく、破棄する(D09)。一方、書込みが必要ならば、キュー取出部105は、そのデータについて書込み要求をデータ書込部108に送る(D05)。
Referring to FIG. 8, when the load of the
このように本実施形態によれば、キュー210から取り出したデータ211の価値に基づいてデータベース120に書込む必要性を判断し、書込む必要性のないデータの書込み要求は発生させることなくデータを破棄する。これによって、データベース120への書き込みが後回しにされたデータについて、その後にデータベース120に書き込む必要が無いと判断できる場合には、そのデータの書き込み要求は発生させることなく破棄することができる。その結果、データベース120への書き込み量を抑止し、最低限残しておきたいデータの書き込みにリソースを割くことが可能となる。
As described above, according to the present embodiment, the necessity of writing to the
また本実施形態によれば、高負荷でない平時は、キュー210から取り出したデータの全てをデータベース120に書込むことができる。但し、本発明の他の実施形態として、高負荷時および平時に関係無く、キュー210から取り出したデータのデータベース120への書込み要否をデータ破棄判定手段112において常に判断するようにしてもよい。
Further, according to the present embodiment, all the data fetched from the
[第3の実施形態]
図9は、本発明の第3の実施形態に係るデータベース書込制御装置100Bのブロック図である。本実施形態に係るデータベース書込制御装置100Bを構成するコンピュータ装置300は、CPU51、メモリ302、プログラムおよびデータを格納するハードディスク等の記録装置303、およびネットワーク接続用のI/F(Interface)304を含む。また、コンピュータ装置300は、バス305を介して入力装置306および出力装置307に接続されている。
[Third Embodiment]
FIG. 9 is a block diagram of the database write control device 100B according to the third embodiment of the present invention. The
CPU301は、オペレーティングシステムを動作させてコンピュータ装置300の全体を制御する。また、CPU301は、例えばドライブ装置などに装着された記録媒体308からプログラムやデータを読み出し、メモリ302に格納してもよい。また、CPU301は、図1に示すデータ受信部102、キュー登録部103、キュー取出部105、対象キュー選択手段106、負荷状況検知手段107、データ書込部108、データ読取部110、データ参照プログラム111、図7のデータ破棄判定手段112として機能し、プログラムに基づいて各種の処理を実行する。CPU301は、複数のCPUによって構成されてもよい。
The
メモリ302は、例えば、ランダムアクセスメモリ(RAM)等である。メモリ302の一部は、書込み待ちキュー領域104として使用される。記録装置303は、例えば、光ディスク、フレキシブルディスク、磁気光ディスク、外付けハードディスク、または半導体メモリ等である。記録装置303の一部は、データベース120の記憶装置109として使用される。記録媒体308は、不揮発性記憶装置であり、そこにCPU301が実行するプログラムを記録する。記録媒体308は、記録装置303の一部であってもよい。また、プログラムは、通信網に接続されている図示しない外部コンピュータからI/F304を介してダウンロードされてもよい。
The
入力装置306は、例えばマウスやキーボード、内蔵のキーボタンなどで実現され、入力操作に用いられる。入力装置306は、マウスやキーボード、内蔵のキーボタンに限らず、例えばタッチパネルでもよい。出力装置307は、例えばディスプレイで実現され、出力を確認するために用いられる。
The
以上のように、本実施形態に係るデータベース書込制御装置100Bは、図9に示されるハードウェア構成とプログラムとによって実現される。ただし、ハードウェア構成は、図9に示す構成に限定されない。例えば、入力装置306、出力装置307は、インターフェース304を介して外付けされるものでもよい。
As described above, the database write control device 100B according to the present embodiment is realized by the hardware configuration and the program shown in FIG. However, the hardware configuration is not limited to the configuration shown in FIG. For example, the
また、コンピュータ装置300は、物理的に結合した一つの装置により実現されてもよいし、物理的に分離した二つ以上の装置を有線または無線で接続し、これら複数の装置により実現されてもよい。
Further, the
[第4の実施形態]
図10を参照すると、本発明の第4の実施形態に係るデータベース書込制御装置100Cは、データベース410に書込むデータ411の書込順序待ち制御を行う装置である。データベース書込制御装置100Cは、キュー401、キュー登録部402、負荷状況検知部403、及びキュー取出部404を含む。
[Fourth Embodiment]
Referring to FIG. 10, the database
キュー401は、データ411を一時的に記憶する機能を有する。キュー登録部402は、データ411をキュー401に書込む機能を有する。負荷状況検知部403は、データベース410の負荷を検知する機能を有する。キュー取出部404は、キュー401に記憶された1以上のデータ411の中から、データベース410に書込むためにキュー401から取り出すデータを、データベース410の負荷に基づいて決定する機能を有する。
The
このように構成されたデータベース書込制御装置100Cは、以下のように動作する。先ず、データベース410に書込むデータ411がデータベース書込制御装置100Cに入力されると、キュー登録部402は、そのデータ411をキュー401に書込む。
The database
一方、データベース410にデータを書込む場合、先ず、負荷状況検知部403は、データベース410の負荷を検知する。次に、キュー取出部404は、キュー401に記憶された1以上のデータ411の中から、データベース410に書込むためにキュー401から取り出すデータを、データベース410の負荷に基づいて決定する。
On the other hand, when writing data to the
このように本実施形態によれば、データベース410の負荷が高いためにデータベース410への書込み処理が追いつかない場合であっても、データベース410で参照できるデータが古いものになるのを防止することができる。その理由は、キュー取出部404は、キュー401に記憶された1以上のデータ411の中から、データベース410に書込むためにキュー401から取り出すデータを、データベース410の負荷に基づいて決定するためである。
As described above, according to the present embodiment, even when the writing process to the
[その他の実施形態]
上述した実施形態では、負荷状況検知手段107は、データベース120の負荷状況を高負荷と平時とに区分したが、3つ以上に区分して検知してもよい。例えば、負荷状況検知手段107は、CPU使用率やディスクI/O使用率等のリソースの使用率が第1の閾値以上であればデータベース120は最大負荷であり、第1の閾値より小さな第2の閾値未満であればデータベース120は最小負荷であり、第2の閾値以上、第1の閾値未満であれば中間負荷であると検知してよい。そして、キュー取出部105は、データベース120が最大負荷であれば、キュー210の末尾のデータを取り出し、最小負荷であればキュー210の先頭のデータを取り出し、中間負荷であれば、キュー210の末尾と先頭との中間のデータを取り出すように構成されていてよい。
[Other Embodiments]
In the above-described embodiment, the load status detecting means 107 classifies the load status of the
上述した実施形態では、データベースに書込むデータを、センサ部で検出された航空機の位置情報としたが、航空機の位置情報以外のセンサデータ、例えば温度、湿度、風速等を検出するセンサのセンシングデータをデータベースに書込む場合にも本発明は適用可能である。 In the above-described embodiment, the data to be written in the database is the position information of the aircraft detected by the sensor unit, but the sensor data other than the position information of the aircraft, for example, the sensing data of the sensor that detects temperature, humidity, wind speed, etc. The present invention can also be applied when writing to a database.
本発明は、センサで計測・採取されたデータをデータベースに書込むシステム全般に利用でき、特に航空管制における航空機の位置情報を照会・蓄積するシステムに利用できる。 The present invention can be used for all systems that write data measured and collected by sensors into a database, and can be particularly used for a system that inquires and stores aircraft position information in air traffic control.
100…データベース書込制御装置
100A…データベース書込制御装置
100B…データベース書込制御装置
100C…データベース書込制御装置
101…センサ部
102…データ受信部
103…キュー登録部
104…書込待ちキュー領域
105…キュー取出部
106…対象キュー選択手段
107…負荷状況検知手段
108…データ書込部
109…記憶装置
110…データ読取部
111…データ参照プログラム
112…データ破棄判定手段
200…キュー制御情報
201…センサID
202…先頭位置ポインタ
203…取出位置ポインタ
210…キュー
221…センサID
222…採取時刻
223…センシングデータ
224…前方向ポインタ
225…後方向ポインタ
300…コンピュータ装置
301…CPU
302…メモリ
303…記録装置
304…インターフェース
305…バス
306…入力装置
307…出力装置
308…記録媒体
401…キュー
402…キュー登録部
403…負荷状況検知部
404…キュー取出部
410…データベース
411…データ
100 ... Database
202 ... Start
222 ...
302 ...
Claims (7)
前記データを一時的に記憶するキューと、
前記データを前記キューに書込むキュー登録部と、
前記データベースの負荷を検知する負荷状況検知部と、
前記キューに記憶された1以上の前記データの中から、前記データベースに書込むために前記キューから取り出すデータを、前記データベースの負荷に基づいて決定するキュー取出部と、
前記キュー内の前記データのうちの最古のデータを指す先頭位置ポインタを格納する領域と、前記キュー内の前記データのうちの最新のデータを指す取出位置ポインタを格納する領域と
を含み、
前記キュー取出部は、前記データベースの負荷に基づいて、前記先頭位置ポインタが指す前記データを取り出すか、前記取出位置ポインタが指す前記データを取り出すかを決定する、
データベース書込制御装置。 A database write control device that controls the writing order of data to be written to the database.
A queue that temporarily stores the data and
A queue registration unit that writes the data to the queue,
A load status detection unit that detects the load on the database,
A queue retrieval unit that determines data to be fetched from the queue for writing to the database from one or more of the data stored in the queue based on the load of the database.
An area for storing a start position pointer that points to the oldest data among the data in the queue, and an area for storing a fetch position pointer that points to the latest data among the data in the queue.
Including
The queue fetching unit determines whether to fetch the data pointed to by the head position pointer or the data pointed to by the fetch position pointer based on the load of the database.
Database write controller.
請求項1に記載のデータベース書込制御装置。 Further including a data destruction determination unit that determines whether or not the data taken out from the queue needs to be written to the database based on the value of the data.
The database write control device according to claim 1.
前記キューは、センサ毎に存在する、
請求項1または2に記載のデータベース書込制御装置。 The data is the data sensed by the sensor.
The queue exists for each sensor.
The database write control device according to claim 1 or 2.
請求項3に記載のデータベース書込制御装置。 A target queue selection unit for determining from which queue of the queues for each sensor the queue extraction unit retrieves the data is further included.
The database write control device according to claim 3.
請求項1乃至4の何れかに記載のデータベース書込制御装置。 The queue fetching unit preferentially retrieves the data written in the queue more recently from the queue as the load on the database is higher.
The database write control device according to any one of claims 1 to 4.
前記データを前記キューに書込み、
前記データベースの負荷を検知し、
前記キューに記憶された1以上の前記データの中から、前記データベースに書込むために前記キューから取り出すデータを、前記データベースの負荷に基づいて決定し、
前記決定では、前記データベースの負荷に基づいて、前記先頭位置ポインタが指す前記データを取り出すか、前記取出位置ポインタが指す前記データを取り出すかを決定する、
データベース書込制御方法。 A queue that temporarily stores the data to be written to the database, a start position pointer that points to the oldest data among the data in the queue, and a fetch position pointer that points to the latest data among the data in the queue. It is a database write control method executed by a computer having
Write the data to the queue,
Detects the load on the database and
From one or more of the data stored in the queue, the data to be retrieved from the queue for writing to the database is determined based on the load of the database .
In the determination, it is determined whether to retrieve the data pointed to by the start position pointer or the data pointed to by the fetch position pointer based on the load of the database .
Database write control method.
前記データを前記キューに書込むキュー登録部と、
前記データベースの負荷を検知する負荷状況検知部と、
前記キューに記憶された1以上の前記データの中から、前記データベースに書込むために前記キューから取り出すデータを、前記データベースの負荷に基づいて決定し、前記決定では、前記データベースの負荷に基づいて、前記先頭位置ポインタが指す前記データを取り出すか、前記取出位置ポインタが指す前記データを取り出すかを決定するキュー取出部と、
して機能させるためのプログラム。
A queue that temporarily stores the data to be written to the database, a start position pointer that points to the oldest data among the data in the queue, and a fetch position pointer that points to the latest data among the data in the queue. Computer with
A queue registration unit that writes the data to the queue,
A load status detection unit that detects the load on the database,
From one or more of the data stored in the queue, the data to be retrieved from the queue for writing to the database is determined based on the load of the database, and in the determination , based on the load of the database. , A queue extraction unit that determines whether to extract the data pointed to by the head position pointer or the data pointed to by the extraction position pointer.
A program to make it work.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017026648A JP6891527B2 (en) | 2017-02-16 | 2017-02-16 | Database write controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017026648A JP6891527B2 (en) | 2017-02-16 | 2017-02-16 | Database write controller |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018132971A JP2018132971A (en) | 2018-08-23 |
JP6891527B2 true JP6891527B2 (en) | 2021-06-18 |
Family
ID=63249718
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017026648A Active JP6891527B2 (en) | 2017-02-16 | 2017-02-16 | Database write controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6891527B2 (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4959312B2 (en) * | 2006-12-08 | 2012-06-20 | 中国電力株式会社 | Remote monitoring control system and remote monitoring control method |
JP5982683B2 (en) * | 2013-01-17 | 2016-08-31 | 株式会社日立ソリューションズ | Computer system |
JP6357756B2 (en) * | 2013-11-15 | 2018-07-18 | オムロン株式会社 | Transmission module, information transmission network system, information transmission method, information transmission program |
JP5933055B2 (en) * | 2015-02-16 | 2016-06-08 | 株式会社東芝 | Sensor data recording apparatus, method and program |
US10297347B2 (en) * | 2015-04-06 | 2019-05-21 | Preventice Solutions, Inc. | Adverse event prioritization and handling |
-
2017
- 2017-02-16 JP JP2017026648A patent/JP6891527B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2018132971A (en) | 2018-08-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100412865C (en) | Read-copy update system and method | |
US7320060B2 (en) | Method, apparatus, and computer readable medium for managing back-up | |
JP5471178B2 (en) | Cache control device, cache control system, cache control method, and cache control program | |
JP2011123752A (en) | Device for collecting log, program for collecting log, method for collecting log, and system for collecting log | |
US9946592B2 (en) | Dump data collection management for a storage area network | |
US7734769B2 (en) | Monitoring system of apparatuses connected in a network, monitoring apparatus, monitoring method and program | |
CN104078071A (en) | Data archive system and quality inspection method | |
JP2017162257A (en) | Load monitoring program, load monitoring method, information processing apparatus, and information processing system | |
WO2018189845A1 (en) | Work management system and work management method | |
US20160073315A1 (en) | Information processing apparatus, storage control apparatus, and information processing method | |
JP6744545B2 (en) | Information processing apparatus, information processing program, and information processing system | |
JP6891527B2 (en) | Database write controller | |
CN110088745B (en) | Data processing system and data processing method | |
JP7431070B2 (en) | Data management system and data management method | |
JP7230512B2 (en) | DATA PROCESSING DEVICE, DATA PROCESSING METHOD, AND PROGRAM | |
JP4245021B2 (en) | Storage device, storage system, and storage device control method | |
KR101637593B1 (en) | Partial updating system of map data | |
JP2009129025A (en) | Stored information arrangement system, stored information arrangement method, and stored information arrangement program | |
US9870326B2 (en) | Transfer apparatus, transfer system, and non-transitory computer readable medium | |
JP5509164B2 (en) | Computer, management method and program | |
CN113760903B (en) | A method, device, equipment and storage medium for processing unbounded stream data association | |
JP4578442B2 (en) | Verification device and verification program | |
US20220365723A1 (en) | Storage system and storage control method | |
JP4349303B2 (en) | File storage system, file storage method, and file storage program | |
US11029887B2 (en) | Data process execution device, storage medium, and data process execution system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200115 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210210 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210224 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210402 |
|
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: 20210427 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210510 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6891527 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |