JP2018132971A - Database writing control device - Google Patents

Database writing control device Download PDF

Info

Publication number
JP2018132971A
JP2018132971A JP2017026648A JP2017026648A JP2018132971A JP 2018132971 A JP2018132971 A JP 2018132971A JP 2017026648 A JP2017026648 A JP 2017026648A JP 2017026648 A JP2017026648 A JP 2017026648A JP 2018132971 A JP2018132971 A JP 2018132971A
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.)
Granted
Application number
JP2017026648A
Other languages
Japanese (ja)
Other versions
JP6891527B2 (en
Inventor
桂太 岩野
Keita Iwano
桂太 岩野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2017026648A priority Critical patent/JP6891527B2/en
Publication of JP2018132971A publication Critical patent/JP2018132971A/en
Application granted granted Critical
Publication of JP6891527B2 publication Critical patent/JP6891527B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To solve a problem that data that can be referenced in a database is old when the database writing processing cannot catch up due to a high database load.SOLUTION: A queue registration unit writes data to be written in a database into a queue. A load state detection unit detects a load of the database. A queue extraction unit, based on the load of the database, determines data to be extracted from the queue for writing to the database from one or more data stored in the queue.SELECTED DRAWING: Figure 1

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 data obtained by sensing (hereinafter referred to as sensor data) to a server device, and a server device that has a database that stores the sensor data and registers sensor data received from the sensor in the database. A sensor network system has been proposed (see, for example, Patent Document 1).

特許第5069884号公報Japanese Patent No. 5069884

ところで、センサデータのように時々刻々と発生するデータのトラフィックが一時的に増加する状況に対処可能にするために、データベースに書込む前のデータを一時的に記憶するキューを設けることがある。この場合、サーバ装置は、センサ等から受信したデータをキューに一旦記憶し、データベースへの書込みが可能な状態になると、キューからデータを取り出し、データベースへ書込む。サーバ装置は、キューからデータを取り出す際には、キューに記憶されたデータのうち最も古いデータを取り出す。   By the way, in order to be able to cope with a situation in which data traffic that occurs every moment, such as sensor data, temporarily increases, a queue that temporarily stores data before being written to a 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 the data can be written to the database, the server device extracts the data from the queue and writes it into the database. When retrieving data from the queue, the server device retrieves the oldest data stored in the queue.

しかしながら、サーバ装置が、1以上のデータを記憶するキューから古い順にデータを取り出すという一定の方法で、データベースに書込むためのデータを取り出す構成では、データベースの負荷が高いためにデータベースへの書込み処理が追いつかない場合、データベースで参照できるデータが古いものになってしまう。   However, in the configuration in which the server device retrieves data for writing to the database in a certain method of retrieving data from the queue that stores one or more data in the oldest order, the database processing is high because the load on the database is high. If it cannot catch up, the data that can be referenced in the database will be out of date.

本発明の目的は、上述した課題を解決するデータベース書込制御装置を提供することにある。   An object of the present invention is to provide a database write control apparatus that solves the above-described problems.

本発明の一形態に係るデータベース書込制御装置は、
データベースに書込むデータの書込順序待ち制御を行うデータベース書込制御装置であって、
前記データを一時的に記憶するキューと、
前記データを前記キューに書込むキュー登録部と、
前記データベースの負荷を検知する負荷状況検知部と、
前記キューに記憶された1以上の前記データの中から、前記データベースに書込むために前記キューから取り出すデータを、前記データベースの負荷に基づいて決定するキュー取出部と、
を含む。
A database write control device according to an aspect of the present invention provides:
A database write control device that performs control of waiting for the order of writing data to be written to a database,
A queue for temporarily storing the data;
A queue registration unit for writing the data to the queue;
A load status detection unit for detecting the load of the database;
A queue retrieval unit that determines data to be retrieved from the queue for writing to the database from one or more of the data stored in the queue based on a load on the database;
including.

本発明の他の形態に係るデータベース書込制御方法は、
データベースに書込むデータを一時的に記憶するキューを有するコンピュータが実行するデータベース書込制御方法であって、
前記データを前記キューに書込み、
前記データベースの負荷を検知し、
前記キューに記憶された1以上の前記データの中から、前記データベースに書込むために前記キューから取り出すデータを、前記データベースの負荷に基づいて決定する。
A database writing control method according to another aspect of the present invention is as follows.
A database write control method executed by a computer having a queue for temporarily storing data to be written to a database, comprising:
Writing the data to the queue;
Detecting the load on the database,
Of the one or more data stored in the queue, data to be retrieved from the queue for writing to the database is determined based on the load on the database.

本発明の他の形態に係るプログラムは、
データベースに書込むデータを一時的に記憶するキューを有するコンピュータを、
前記データを前記キューに書込むキュー登録部と、
前記データベースの負荷を検知する負荷状況検知部と、
前記キューに記憶された1以上の前記データの中から、前記データベースに書込むために前記キューから取り出すデータを、前記データベースの負荷に基づいて決定するキュー取出部と、
して機能させる。
A program according to another aspect of the present invention is:
A computer having a queue for temporarily storing data to be written to a database;
A queue registration unit for writing the data to the queue;
A load status detection unit for detecting the load of the database;
A queue retrieval unit that determines data to be retrieved from the queue for writing to the database from one or more of the data stored in the queue based on a load on the database;
And 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 catch up because the load on the database is high.

本発明の第1の実施形態に係るデータベース書込制御装置の構成例を示す図である。It is a figure which shows the structural example of the database write control apparatus which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係るデータベース書込制御装置における書込待ちキュー領域で管理されるデータ構造の一例を示す図である。It is a figure which shows an example of the data structure managed in the write waiting queue area | region in the database write control apparatus concerning the 1st Embodiment of this invention. 本発明の第1の実施形態に係るデータベース書込制御装置におけるキュー上で複数のデータをチェーン付けるデータ構造の一例を示す図である。It is a figure which shows an example of the data structure which chains several data on the queue in the database write control apparatus concerning the 1st Embodiment of this invention. 本発明の第1の実施形態に係るデータベース書込制御装置におけるキュー登録部の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of the queue registration part in the database write control apparatus concerning the 1st Embodiment of this invention. 本発明の第1の実施形態に係るデータベース書込制御装置におけるキュー取出部の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of the queue extraction part in the database write control apparatus concerning the 1st Embodiment of this invention. 本発明の第1の実施形態に係るデータベース書込制御装置におけるキュー取出部の動作の他の例を示すフローチャートである。It is a flowchart which shows the other example of operation | movement of the queue extraction part in the database write control apparatus concerning the 1st Embodiment of this invention. 本発明の第2の実施形態に係るデータベース書込制御装置の構成例を示す図である。It is a figure which shows the structural example of the database write control apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係るデータベース書込制御装置におけるキュー取出部の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of the queue extraction part in the database write control apparatus concerning the 2nd Embodiment of this invention. 本発明の第3の実施形態に係るデータベース書込制御装置の構成例を示す図である。It is a figure which shows the structural example of the database write control apparatus which concerns on the 3rd Embodiment of this invention. 本発明の第4の実施形態に係るデータベース書込制御装置の構成例を示す図である。It is a figure which shows the structural example of the database write control apparatus which concerns on the 4th Embodiment of this invention.

[第1の実施形態]
次に本発明の第1の実施形態について図面を参照して詳細に説明する。
[First embodiment]
Next, a first embodiment of the present invention will be described in detail with reference to the drawings.

<本実施形態の概要>
本実施形態に係るデータベース書込制御装置は、通常時はキューに登録された順にデータをデータベースに書き込む。しかし、データベース書込制御装置は、必要に応じてキューの中間や末尾からデータを取り出し、より新しいデータを優先的にデータベースに書き込む。こうすることで、データベース書込制御装置は、できる限り最新の情報をデータベースから参照可能とする。
<Outline of this embodiment>
The database write control apparatus according to the present embodiment normally writes data to the database in the order registered in the queue. However, the database write control device extracts data from the middle or end of the queue as necessary, and writes newer data preferentially to the database. By doing so, the database writing control apparatus can refer to the latest information from the database as much as possible.

<本実施形態が解決しようとする課題>
データベースに書込むデータの例に、航空機の位置情報がある。航空機の位置情報は、管制官としては最新のものを把握しておきたい。その理由は、ある程度時間が経過すると、より新しい情報が発生するため、それまでの情報は価値が大きく下がるためである。しかし、航空機の位置情報は、履歴情報として見た場合は、古いものを含めて全てデータベースに記録しておくことが望ましい。
<Problem to be solved by this embodiment>
An example of data to be written in the database is aircraft position information. As an air traffic controller, I want to keep track of the latest aircraft position information. The reason for this is that new information is generated after a certain amount of time has passed, and the value of the previous information is greatly reduced. However, when the aircraft position information is viewed as history information, it is desirable to record all of the aircraft position information including old ones in the database.

航空機の位置情報のような情報を記録・参照するシステムを構成する場合、大量の情報が発生し、あるいは障害発生等でシステムが縮退の状態になると、書き込みの処理が追いつかず、データベースで参照できる情報が古いものとなる恐れがある。予め発生する情報の最大量を想定した構成にするか、或いは、障害発生に備えて冗長化するといった構成にすると、上記問題は回避できるが、コストがかかるという問題がある。   When configuring a system that records and references information such as aircraft location information, if a large amount of information is generated or the system is in a degraded state due to a failure, etc., the writing process cannot catch up and can be referenced in the database Information may be out of date. If a configuration that assumes the maximum amount of information that occurs in advance or a configuration that provides redundancy in case of a failure occurs, the above problem can be avoided, but there is a problem that costs increase.

<本実施形態による解決手段>
本実施形態に係るデータベース書込制御装置は、データベースへのデータ書込順序をキューで管理する。データベース書込制御装置は、平時はキューの先頭から順にデータを取り出してデータベースに書き込む。即ち、データベース書込制御装置は、平時はキューに記憶されたデータのうち最も過去にキューに登録されたデータを取り出してデータベースに書込む。しかし、高負荷時等にデータベースへのデータ書き込みが遅延して、最新情報の参照が難しくなることが懸念される場合には、データベース書込制御装置は、より新しいデータを優先してデータベースに書き込むために、キューの中間や末尾からデータを取り出す。これにより、常にできるだけ新しい情報がデータベースから参照可能となる。また、データベース書込制御装置は、後回しにしたデータを最終的にはキューから取り出してデータベースに書き込む。これにより、古い情報を含む全ての情報が履歴情報としてデータベースに記憶される。
<Solution by this embodiment>
The database write control apparatus according to the present embodiment manages the data write order to the database in a queue. The database write control device retrieves data from the top of the queue in order during normal times and writes it to the database. In other words, the database write control device takes out the data registered in the queue most recently from the data stored in the queue during normal times and writes it in the database. However, if there is a concern that the writing of data to the database will be delayed during high load, etc., and it will be difficult to refer to the latest information, the database writing control device will preferentially write newer data to the database. Therefore, data is extracted from the middle or end of the queue. Thereby, as new information as possible can always be referred to from the database. Further, the database write control device finally takes out the postponed data from the queue and writes it in the database. Thereby, all information including old information is stored in the database as history information.

<本実施形態の構成>
図1は、本実施形態に係るデータベース書込制御装置100の構成の一例を示す。また図1はデータベース書込制御装置100を利用して、計測・採取した情報をオペレータに提供するシステムの構成の一例を示す。図1における各矢印は、各センサ部101で計測・採取した情報をデータ参照プログラム111で参照するまでのデータの流れを示している。
<Configuration of this embodiment>
FIG. 1 shows an example of the configuration of the database write control apparatus 100 according to the present embodiment. FIG. 1 shows an example of the configuration of a system that provides the operator with the measured / collected information using the database writing control device 100. Each arrow in FIG. 1 indicates a data flow until the data reference program 111 refers to information measured and collected by each sensor unit 101.

センサ部101は、計測・採取された情報をデータ受信部102に送信する。例えば、各センサ部101は、各航空機に搭載されたレーダやGPS等を含むものであってよい。各センサ部101で採取された航空機の位置情報は、無線通信によってデータ受信部102に向けて送信される。上記位置情報は、例えば、航空機の緯度と経度と高度とを含む。また上記位置情報は、採取した時刻、センサ部101を特定する情報(以下、センサIDと記す)を更に含んでいてよい。以下、航空機の位置情報を「データ」と記す。   The sensor unit 101 transmits the measured / collected information to the data receiving unit 102. For example, each sensor unit 101 may include a radar or a GPS mounted on each aircraft. The aircraft position information collected by each sensor unit 101 is transmitted to the data reception unit 102 by wireless communication. The position information includes, for example, the latitude, longitude, and altitude of the aircraft. The position information may further include the collected time and information for identifying the sensor unit 101 (hereinafter referred to as sensor ID). Hereinafter, the position information of the aircraft is referred to as “data”.

データ受信部102は、各センサ部101から送信されたデータを受信し、データベース書込制御装置100のキュー登録部103へデータ書込要求を送る。データ書込要求は、各センサ部101から受信したデータを含む。   The data receiving unit 102 receives the data transmitted from each sensor unit 101 and sends a data write request to the queue registration unit 103 of the database write control device 100. The data write request includes data received from each sensor unit 101.

データベース書込制御装置100は、キュー登録部103、書込待ちキュー領域104、キュー取出部105、対象キュー選択手段106、及び、負荷状況検知手段107を含む。   The database write control apparatus 100 includes a queue registration unit 103, a write queue region 104, a queue extraction unit 105, a target queue selection unit 106, and a load status detection unit 107.

データ書込要求を受けたキュー登録部103は、書込待ちキュー領域104にアクセスし、各センサ部101のセンサID毎に設けられたキューの末尾に、データ書込要求に含まれるデータを追加する。   Upon receiving the data write request, the queue registration unit 103 accesses the write wait queue area 104, and adds the data included in the data write request to the end of the queue provided for each sensor ID of each sensor unit 101. To do.

書込待ちキュー領域104は、データ書込要求のあったデータを一時的に保持しておく記憶領域である。図2は書込待ちキュー領域104で管理されるデータ構造の一例を示したものである。   The write waiting queue area 104 is a storage area for temporarily holding data requested to be written. FIG. 2 shows an example of the data structure managed in the write wait queue area 104.

図2を参照すると、書込待ちキュー領域104は、センサID毎に、キュー制御情報200およびキュー210のペアを有する。   Referring to FIG. 2, the write queue area 104 has a pair of queue control information 200 and a queue 210 for each sensor ID.

キュー210は、複数のデータ211をチェーン付けして記憶する領域である。キュー制御情報200は、センサID201、先頭位置ポインタ202、及び取出位置ポインタ203で構成される。先頭位置ポインタ202は、キュー210においてチェーン付けされた複数のデータ211の先頭のデータ211を指し示すポインタである。平時には、この先頭位置ポインタ202が指し示すデータがキュー210から取り出される。取出位置ポインタ203は、高負荷状況の時に取り出すべきデータ211を指し示すポインタである。先頭位置ポインタ202、取出位置ポインタ203、及びデータ211のチェーン付けは、キュー登録部103によるデータ211の追加、およびキュー取出部105によるデータ211の取出しに伴って更新される。   The queue 210 is an area for storing a plurality of data 211 in a chain. The queue control information 200 includes a sensor ID 201, a head position pointer 202, and an extraction position pointer 203. The head position pointer 202 is a pointer that points to the head data 211 of the plurality of data 211 chained in the queue 210. At normal times, the data pointed to by the head position pointer 202 is taken out from the queue 210. The extraction position pointer 203 is a pointer that points to data 211 to be extracted in a high load situation. The chaining of the head position pointer 202, the extraction position pointer 203, and the data 211 is updated as the data 211 is added by the queue registration unit 103 and the data 211 is extracted by the queue extraction unit 105.

図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 for chaining a plurality of data 211. In the example of FIG. 3, three pieces of data 211-1 to 211-3 are chained. Each data 211 includes a sensor ID 221, a collection time 222, sensing data 223, a forward pointer 224, and a backward pointer 225. The sensor ID 221, the collection time 222, and the sensing data 223 are elements that constitute data transmitted from the sensor unit 101. The forward pointer 224 is a pointer that points to the previous data 211 on the chain. The backward pointer 225 is a pointer that points to the next data 211 on the chain. The forward pointer 224 and the backward pointer 225 are added to the data 211 at the time of registration in the queue 210 and are removed at the time of removal from the queue 210.

図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, among the three data 211-1 to 211-3, the data 211-1 is first registered in the queue 210, the data 211-2 is registered in the queue 210, and finally the data 211- Reference numeral 3 denotes a status registered in the queue 210. At this time, the data 211-1 is referred to as the head data or the oldest data of the plurality of chained data 211. The data 211-3 is referred to as the last data of the plurality of data 211 chained or the latest data. The data 211-2 is referred to as intermediate data among the plurality of chained data 211. Further, when viewed from the data 211-2, the data 211-1 is called the previous data, and the data 211-3 is called the next data. The forward pointer 224 of the data 211-2 and 211-3 other than the head data 211-1 points to the previous data 211-1 and 211-2. The forward pointer 224 of the top data 211-1 is, for example, a NULL value. The backward pointer 225 of the data 211-1, 211-2 other than the tail data 211-3 points to the next data 211-2, 211-3. The backward pointer 225 of the tail data 211-3 is, for example, a NULL value. In the example of FIG. 3, the head position pointer 202 points to the head data 211-1. The take-out position pointer 203 points to the last data 211-3.

再び図1を参照すると、対象キュー選択手段106は、書込待ちキュー領域104内の複数のキュー210のうちデータを取り出すキューを選択する。選択の基準は、例えば、データ登録の時間順とすることができる。或いは選択の基準は、センサID間で予め定められた優先度順とすることができる。或いは選択の基準は、データベース120の高負荷時と平時とで相違していてよい。或いは選択の基準は、利用者が構築する図1のシステムの特性に応じて決定した他の基準であってもよい。対象キュー選択手段106は、選択したキューをキュー取出部105に通知する。   Referring again to FIG. 1, the target queue selection unit 106 selects a queue from which data is to be extracted from among the plurality of queues 210 in the write wait queue area 104. Selection criteria can be, for example, in the order of data registration. Alternatively, the selection criterion can be a predetermined priority order between the sensor IDs. Alternatively, the selection criteria may be different between when the database 120 is heavily loaded and when it is normal. Alternatively, the selection criteria may be other criteria determined according to the characteristics of the system of FIG. 1 constructed by the user. The target queue selection unit 106 notifies the queue extraction unit 105 of the selected queue.

負荷状況検知手段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 detection unit 107 detects the load status of the database 120. A method for detecting the load status of the database 120 is arbitrary. For example, the load status detection unit 107 measures the usage rate of a CPU (Central Processor Unit), which is a hardware element constituting the database 120, and detects the load status of the database 120 based on the measured CPU usage rate. It's okay. For example, the load status detection means 107 may be “high load” if the CPU usage rate is higher than the threshold value, and “low load” (normal time) if the CPU usage rate is equal to or lower than the threshold value. Alternatively, the load status detection unit 107 measures the disk input / output (I / O) usage rate of a disk device that is a hardware element constituting the database 120, and the database 120 is based on the measured disk I / O usage rate. You may detect the load situation. For example, the load status detection unit 107 may set “high load” if the disk I / O usage rate is higher than the threshold value, and “low load” (normal time) if the disk I / O usage rate is lower than the threshold value. In the above, the load on the database 120 is detected based on the CPU usage rate and the disk I / O usage rate. However, the load status detection unit 107 detects the load status of the database 120 from the usage status of resources other than the CPU and the disk. It's okay. Alternatively, the load status detection unit 107 may detect the load status of the database 120 by receiving a command indicating the load status of the database 120 from the operator. Alternatively, the load status detection unit 107 may detect the load status of the database 120 using another method determined according to the characteristics of the system of FIG. 1 constructed by the user.

キュー取出部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 data can be written to the database 120, the queue extraction unit 105 extracts one piece of data 211 from the write-waiting queue area 104, and sends the extracted data 211 to the database 120. Request registration. The queue 210 in the write waiting queue area 104 from which the queue extraction unit 105 extracts the data 211 is the queue 210 selected by the target queue selection unit 106. Further, the queue extraction unit 105 extracts the data 211 from the queue 210 based on the load status detected by the load status detection unit 107. That is, if the database 120 is heavily loaded, the queue extraction unit 105 extracts the data 211 pointed to by the extraction position pointer 203. Further, the queue extraction unit 105 extracts the data 211 pointed to by the head position pointer 202 if the database 120 has a low load (normal time).

データベース120は、データ書込部108、複数の記憶装置109、及びデータ読取部110を含む。データ書込部108は、キュー取出部105からのデータ書込要求を受けて、データを記憶装置109に書き込む。記憶装置109は、データを実際に格納する記憶領域である。記憶装置109は、本例では複数存在するが、最低1つあればよい。データ読取部110は、記憶装置109にアクセスし、書き込まれているデータを取得して、データ参照プログラム111に渡す。   The database 120 includes a data writing unit 108, a plurality of storage devices 109, and a data reading unit 110. The data writing unit 108 receives the data write request from the queue extraction unit 105 and writes the data to the storage device 109. The storage device 109 is a storage area that actually stores data. There are a plurality of storage devices 109 in this example, but at least one storage device 109 is sufficient. The data reading unit 110 accesses the storage device 109, acquires the written data, and passes it to the data reference program 111.

データ参照プログラム111は、データベース120を参照するプログラムである。データ参照プログラム111は、データ読取部110から受け取ったデータを加工して図示しない出力装置から出力する。例えばデータ参照プログラム111は、受け取ったデータに基づいてグラフや航跡図等を作成してディスプレイに表示する。   The data reference program 111 is a program that refers to the database 120. The data reference program 111 processes the data received from the data reading unit 110 and outputs it from an output device (not shown). For example, the data reference program 111 creates a graph, a wake map, etc. based on the received data and displays the graph on the display.

<本実施形態の動作>
図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 queue registration unit 103. When the queue registration unit 103 receives a data registration request from the data reception unit 102, the queue registration unit 103 performs the operation illustrated in FIG. First, the queue registration unit 103 checks whether or not the queue 210 corresponding to the sensor ID included in the data registration request from the data reception unit 102 already exists in the write queue region 104 (E01). If not, the queue registration unit 103 generates a pair of the queue control information 200 and the queue 210 corresponding to the sensor ID included in the data registration request, registers the data 211 included in the data registration request in the queue 210, and ends. (E02).

一方、データ登録要求に含まれるセンサ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 queue 210 corresponding to the sensor ID included in the data registration request exists, the queue registration unit 103 registers the data 211 included in the data registration request at the end of the queue 210 (E03). Further, the queue registration unit 103 determines whether or not the extraction position pointer 203 of the queue control information 200 needs to be updated based on a predetermined extraction position update rule, and if necessary, sets the extraction position pointer 203 to the data registered this time. Update to point 211. As the take-out position update rule, for example, the following can be considered.
(A) Each time the queue registration unit 103 registers data, the queue registration unit 103 updates the extraction position pointer 203 so as to indicate the latest registered data.
(B) The queue registration unit 103 updates the extraction position pointer 203 to indicate the latest registered data every time n pieces of data (n is a positive integer of 2 or more) are registered. For example, when five pieces of data are registered in the queue 210, the extraction position pointer 203 is updated so as to point to the last registered data, and thereafter, when the four pieces of data are registered, the extraction position pointer 203 is not updated.
(C) The queue registration unit 103 makes the determination of A or B for each sensor ID. That is, the queue registration unit 103 applies the rule A if the queue 210 corresponds to a specific sensor ID, and applies the rule B if the queue 210 corresponds to other than the specific sensor ID.
However, the rule for updating the extraction position pointer 203 is not limited to the above example. The queue registration unit 103 may determine whether or not the extraction position pointer 203 needs to be updated based on other rules determined according to the characteristics of the system of FIG. 1 constructed by the user.

図5はキュー取出部105の動作の一例を示すフローチャートである。キュー取出部105は、例えば、データ書込部108が現在書込んでいるデータの書込みを終了し、次のデータの書込みが可能になった旨の通知をデータ書込部108から受信すると、図5に示す動作を行う。   FIG. 5 is a flowchart showing an example of the operation of the queue extraction unit 105. For example, when the queue extracting unit 105 finishes writing the data currently written by the data writing unit 108 and receives a notification from the data writing unit 108 that the next data can be written, The operation shown in FIG.

先ずキュー取出部105は、対象キュー選択手段106の選択に従って、データ211を取り出す対象のキュー210を決定する(D01)。次にキュー取出部105は、負荷状況検知手段107による検知結果に基づいて、データベース120が高負荷状態か否かを判断する(D02)。   First, the queue extraction unit 105 determines a target queue 210 from which the data 211 is extracted in accordance with the selection by the target queue selection unit 106 (D01). Next, the queue extraction unit 105 determines whether or not the database 120 is in a high load state based on the detection result by the load state detection unit 107 (D02).

キュー取出部105は、平時であれば(データベース120が高負荷でなければ)、選択されたキュー210のキュー制御情報200内の先頭位置ポインタ202が指すデータ211を取り出す(D03)。次にキュー取出部105は、先頭位置ポインタ202を上記取り出したデータ211の1つ後のデータ211を指すように更新する(D04)。次にキュー取出部105は、上記取り出したデータ211の書込みをデータ書込部108に要求する(D05)。   When it is normal (when the database 120 is not heavily loaded), the queue extraction unit 105 extracts data 211 pointed to by the head position pointer 202 in the queue control information 200 of the selected queue 210 (D03). Next, the queue extraction unit 105 updates the head position pointer 202 to point to the data 211 immediately after the extracted data 211 (D04). Next, the queue extraction unit 105 requests the data writing unit 108 to write the extracted data 211 (D05).

一方、キュー取出部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 queue extraction unit 105 extracts the data 211 pointed to by the extraction position pointer 203 in the queue control information 200 of the selected queue 210 (D06). Next, the queue extraction unit 105 updates the extraction position pointer 203 (D07). For example, if there is one or more data after the extracted data 211, the queue extraction unit 105 updates the extraction position pointer 203 to point to one or more data 211 after the extracted data 211. In addition, if there is no data after the extracted data 211, the queue extraction unit 105 updates the extraction position pointer 203 to point to the data 211 immediately preceding the extracted data 211, if any. Next, the queue extraction unit 105 requests the data writing unit 108 to write the extracted data 211 (D05).

図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 illustrating another example of the operation of the queue extraction unit 105. In FIG. 6, the order of step D01 and step D02 shown in FIG. 5 is switched. Referring to FIG. 6, the queue extraction unit 105 first determines whether or not the database 120 is in a high load state (D02). Next, when it is normal time (when it is not high load), the queue extraction unit 105 determines the queue 210 selected by the target queue selection unit 106 based on the normal selection criterion as the extraction target queue (D01A). Then, the queue extraction unit 105 performs the same processing as steps D03 to D05 in FIG. On the other hand, if the load is high, the queue extraction unit 105 determines the queue 210 selected by the target queue selection unit 106 based on the selection criterion at the time of high load as the extraction target queue (D01B). The queue extraction unit 105 performs the same processing as steps D06, D07, and D08 in FIG.

<本実施形態の効果>
本実施形態によれば、データベース120の高負荷時には、キュー210上のより新しく発生したデータのデータベース120への書き込みが優先されるため、データ参照の際はできるだけ最新のデータをデータベース120から得ることができる。
<Effect of this embodiment>
According to the present embodiment, when the database 120 is heavily loaded, priority is given to writing of newly generated data on the queue 210 to the database 120. Therefore, the latest data as much as possible is obtained from the database 120 when referring to the data. Can do.

データベース120への書き込みが後回しにされたキュー210上のデータは、一時的にはデータベース120から参照できない状態となる。しかし、キュー210上の新しいデータから順に書込まれるか、平時に戻った際に古いデータから順に書き込まれるため、最終的には全てのデータがデータベース120から参照可能となる。   Data on the queue 210 for which writing to the database 120 has been postponed becomes temporarily inaccessible from the database 120. However, since new data is written in order from the new data on the queue 210 or written in order from old data when returning to normal time, all data can be referred to from the database 120 in the end.

[第2の実施形態]
図7は、本発明の第2の実施形態に係るデータベース書込制御装置100Aの構成の一例を示す。本実施形態に係るデータベース書込制御装置100Aは、図1に示したデータベース書込制御装置100と比較して、データ破棄判定手段112を更に含んでいる点で、データベース書込制御装置100と相違し、それ以外はデータベース書込制御装置100と同じである。
[Second Embodiment]
FIG. 7 shows an example of the configuration of a database write control apparatus 100A according to the second embodiment of the present invention. The database write control device 100A according to the present embodiment is different from the database write control device 100 in that the database write control device 100A further includes a data discard determination unit 112, as compared with the database write control device 100 shown in FIG. Otherwise, it is the same as the database write control device 100.

データ破棄判定手段112は、キュー210から取り出したデータ211のデータベース120への書込み要否を、そのデータ211の価値に基づいて決定する。データ211の価値に基づいて書込み要否を判断する基準は、例えば以下のようなものが考えられる。
(A)データ破棄判定手段112は、キュー210への登録時刻が一定時間以上古いデータは価値が充分に低いと判断して書込み不要と決定し、それ以外のデータは書込み要と決定する。この場合、キュー登録部103は、データ211に登録時刻を付与してキュー210に記憶する。データ破棄判定手段112は、データ211に付与された登録時刻と現在時刻とを比較して、登録時刻が一定時間以上古いデータか否かを判断する。
(B)データ破棄判定手段112は、その時点で特に注視する必要のないセンサのデータであって値が予測の範囲内であるデータは価値が充分に低いと判断して書込み不要と決定し、それ以外のデータは書込み要と決定する。データ破棄判定手段112は、その時点で特に注視する必要のないセンサのデータか否かは、例えば、注視する必要のある旨がオペレータからのコマンドで指定されたセンサのデータか否かに基づいて判断する。また、データ破棄判定手段112は、予測の範囲内であるデータか否かは、例えば、それ以前にキュー210に登録されたデータに基づいて補間等によって算出した推定値と当該データの値との誤差が一定値以内ならば予測可能なデータ、それ以外は予測不可能なデータと決定する。
The data discard determination unit 112 determines whether or not the data 211 extracted from the queue 210 needs to be written to the database 120 based on the value of the data 211. For example, the following may be considered as a criterion for determining whether or not writing is necessary based on the value of the data 211.
(A) The data discard determination unit 112 determines that data whose registration time in the queue 210 is older than a certain time is sufficiently low and determines that writing is not necessary, and determines that other data is required to be written. In this case, the queue registration unit 103 gives a registration time to the data 211 and stores it in the queue 210. The data discard determination unit 112 compares the registration time given to the data 211 with the current time, and determines whether the registration time is data older than a certain time.
(B) The data discarding determination unit 112 determines that the data of the sensor that does not need to be particularly watched at that time and whose value is within the prediction range is sufficiently low in value, and determines that writing is not necessary, The other data is determined to be written. The data discard determination unit 112 determines whether or not the sensor data need not be particularly watched at that time, for example, based on whether or not the sensor data specified by the command from the operator indicates that the data needs to be watched. to decide. In addition, the data discard determination unit 112 determines whether the data is within the prediction range, for example, an estimated value calculated by interpolation based on data previously registered in the queue 210 and the value of the data. If the error is within a certain value, it is determined to be predictable data, and the other is determined to be unpredictable data.

図8は、データ破棄判定手段112の判断内容によってデータ書込要求の発生の有無を決定するキュー取出部105の動作を示すフローチャートである。図8は、ステップD08、D09が追加されている点で、図5と相違し、それ以外は図5と同じである。   FIG. 8 is a flowchart showing the operation of the queue extraction unit 105 that determines whether or not a data write request is generated according to the determination contents of the data discard determination means 112. FIG. 8 is different from FIG. 5 in that steps D08 and D09 are added, and is otherwise the same as FIG.

図8を参照すると、キュー取出部105は、データベース120の高負荷時(D02でYes)、キュー210から取り出したデータ211のデータベース120への書込み要否を、データ破棄判定手段112を使用して判定する(D08)。そして、キュー取出部105は、書込み不要であれば、そのデータについて書込み要求をデータ書込部108に送ることなく、破棄する(D09)。一方、書込みが必要ならば、キュー取出部105は、そのデータについて書込み要求をデータ書込部108に送る(D05)。   Referring to FIG. 8, when the database 120 is under a high load (Yes in D02), the queue fetch unit 105 uses the data discard determination unit 112 to determine whether the data 211 retrieved from the queue 210 needs to be written to the database 120. Determine (D08). If writing is unnecessary, the queue fetching unit 105 discards the data without sending a write request to the data writing unit 108 (D09). On the other hand, if writing is necessary, the queue extraction unit 105 sends a write request for the data to the data writing unit 108 (D05).

このように本実施形態によれば、キュー210から取り出したデータ211の価値に基づいてデータベース120に書込む必要性を判断し、書込む必要性のないデータの書込み要求は発生させることなくデータを破棄する。これによって、データベース120への書き込みが後回しにされたデータについて、その後にデータベース120に書き込む必要が無いと判断できる場合には、そのデータの書き込み要求は発生させることなく破棄することができる。その結果、データベース120への書き込み量を抑止し、最低限残しておきたいデータの書き込みにリソースを割くことが可能となる。   As described above, according to the present embodiment, the necessity of writing to the database 120 is determined based on the value of the data 211 extracted from the queue 210, and the data is written without causing a write request for data that does not need to be written. Discard. As a result, if it is determined that there is no need to write data to the database 120 afterwards, data written to the database 120 can be discarded without generating a data write request. As a result, the amount of writing to the database 120 can be suppressed, and resources can be allocated for writing data that is to be kept at a minimum.

また本実施形態によれば、高負荷でない平時は、キュー210から取り出したデータの全てをデータベース120に書込むことができる。但し、本発明の他の実施形態として、高負荷時および平時に関係無く、キュー210から取り出したデータのデータベース120への書込み要否をデータ破棄判定手段112において常に判断するようにしてもよい。   Further, according to the present embodiment, all the data extracted from the queue 210 can be written into the database 120 during normal times when the load is not high. However, as another embodiment of the present invention, the data discard determination unit 112 may always determine whether or not the data extracted from the queue 210 needs to be written to the database 120 regardless of whether the load is high or normal.

[第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 a database write control apparatus 100B according to the third embodiment of the present invention. A computer apparatus 300 constituting the database write control apparatus 100B according to the present embodiment includes a CPU 51, a memory 302, a recording apparatus 303 such as a hard disk for storing programs and data, and an I / F (Interface) 304 for network connection. Including. The computer device 300 is connected to an input device 306 and an output device 307 via a bus 305.

CPU301は、オペレーティングシステムを動作させてコンピュータ装置300の全体を制御する。また、CPU301は、例えばドライブ装置などに装着された記録媒体308からプログラムやデータを読み出し、メモリ302に格納してもよい。また、CPU301は、図1に示すデータ受信部102、キュー登録部103、キュー取出部105、対象キュー選択手段106、負荷状況検知手段107、データ書込部108、データ読取部110、データ参照プログラム111、図7のデータ破棄判定手段112として機能し、プログラムに基づいて各種の処理を実行する。CPU301は、複数のCPUによって構成されてもよい。   The CPU 301 controls the entire computer apparatus 300 by operating an operating system. Further, the CPU 301 may read a program or data from a recording medium 308 mounted on, for example, a drive device and store the program or data in the memory 302. The CPU 301 also includes the data receiving unit 102, the queue registration unit 103, the queue extraction unit 105, the target queue selection unit 106, the load status detection unit 107, the data writing unit 108, the data reading unit 110, and the data reference program shown in FIG. 111 functions as the data discard determination unit 112 in FIG. 7 and executes various processes based on the program. The CPU 301 may be configured by a plurality of CPUs.

メモリ302は、例えば、ランダムアクセスメモリ(RAM)等である。メモリ302の一部は、書込み待ちキュー領域104として使用される。記録装置303は、例えば、光ディスク、フレキシブルディスク、磁気光ディスク、外付けハードディスク、または半導体メモリ等である。記録装置303の一部は、データベース120の記憶装置109として使用される。記録媒体308は、不揮発性記憶装置であり、そこにCPU301が実行するプログラムを記録する。記録媒体308は、記録装置303の一部であってもよい。また、プログラムは、通信網に接続されている図示しない外部コンピュータからI/F304を介してダウンロードされてもよい。   The memory 302 is, for example, a random access memory (RAM). A part of the memory 302 is used as a write waiting queue area 104. The recording device 303 is, for example, an optical disk, a flexible disk, a magnetic optical disk, an external hard disk, or a semiconductor memory. A part of the recording device 303 is used as the storage device 109 of the database 120. The recording medium 308 is a non-volatile storage device, and records a program executed by the CPU 301 therein. The recording medium 308 may be a part of the recording device 303. The program may be downloaded via an I / F 304 from an external computer (not shown) connected to the communication network.

入力装置306は、例えばマウスやキーボード、内蔵のキーボタンなどで実現され、入力操作に用いられる。入力装置306は、マウスやキーボード、内蔵のキーボタンに限らず、例えばタッチパネルでもよい。出力装置307は、例えばディスプレイで実現され、出力を確認するために用いられる。   The input device 306 is realized by, for example, a mouse, a keyboard, a built-in key button, and the like, and is used for an input operation. The input device 306 is not limited to a mouse, a keyboard, and a built-in key button, but may be a touch panel, for example. The output device 307 is realized by a display, for example, and is used for confirming the output.

以上のように、本実施形態に係るデータベース書込制御装置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 program shown in FIG. However, the hardware configuration is not limited to the configuration shown in FIG. For example, the input device 306 and the output device 307 may be externally attached via the interface 304.

また、コンピュータ装置300は、物理的に結合した一つの装置により実現されてもよいし、物理的に分離した二つ以上の装置を有線または無線で接続し、これら複数の装置により実現されてもよい。   In addition, the computer apparatus 300 may be realized by one physically coupled apparatus, or may be realized by a plurality of apparatuses that are physically or physically connected by connecting two or more physically separated apparatuses. Good.

[第4の実施形態]
図10を参照すると、本発明の第4の実施形態に係るデータベース書込制御装置100Cは、データベース410に書込むデータ411の書込順序待ち制御を行う装置である。データベース書込制御装置100Cは、キュー401、キュー登録部402、負荷状況検知部403、及びキュー取出部404を含む。
[Fourth Embodiment]
Referring to FIG. 10, a database write control device 100C according to the fourth embodiment of the present invention is a device that performs write order wait control of data 411 to be written to the database 410. The database write control device 100C includes a queue 401, a queue registration unit 402, a load status detection unit 403, and a queue extraction unit 404.

キュー401は、データ411を一時的に記憶する機能を有する。キュー登録部402は、データ411をキュー401に書込む機能を有する。負荷状況検知部403は、データベース410の負荷を検知する機能を有する。キュー取出部404は、キュー401に記憶された1以上のデータ411の中から、データベース410に書込むためにキュー401から取り出すデータを、データベース410の負荷に基づいて決定する機能を有する。   The queue 401 has a function of temporarily storing data 411. The queue registration unit 402 has a function of writing data 411 to the queue 401. The load status detection unit 403 has a function of detecting the load on the database 410. The queue extraction unit 404 has a function of determining data to be extracted from the queue 401 for writing to the database 410 from one or more pieces of data 411 stored in the queue 401 based on the load on the database 410.

このように構成されたデータベース書込制御装置100Cは、以下のように動作する。先ず、データベース410に書込むデータ411がデータベース書込制御装置100Cに入力されると、キュー登録部402は、そのデータ411をキュー401に書込む。   The database write control device 100C configured as described above operates as follows. First, when data 411 to be written to the database 410 is input to the database write control device 100C, the queue registration unit 402 writes the data 411 to the queue 401.

一方、データベース410にデータを書込む場合、先ず、負荷状況検知部403は、データベース410の負荷を検知する。次に、キュー取出部404は、キュー401に記憶された1以上のデータ411の中から、データベース410に書込むためにキュー401から取り出すデータを、データベース410の負荷に基づいて決定する。   On the other hand, when writing data into the database 410, first, the load status detection unit 403 detects the load on the database 410. Next, the queue extraction unit 404 determines data to be extracted from the queue 401 for writing to the database 410 from the one or more data 411 stored in the queue 401 based on the load on the database 410.

このように本実施形態によれば、データベース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 database 410 cannot catch up because the load on the database 410 is high, it is possible to prevent the data that can be referred to in the database 410 from becoming old. it can. The reason is that the queue extraction unit 404 determines data to be extracted from the queue 401 for writing to the database 410 from one or more data 411 stored in the queue 401 based on the load of the database 410. is there.

[その他の実施形態]
上述した実施形態では、負荷状況検知手段107は、データベース120の負荷状況を高負荷と平時とに区分したが、3つ以上に区分して検知してもよい。例えば、負荷状況検知手段107は、CPU使用率やディスクI/O使用率等のリソースの使用率が第1の閾値以上であればデータベース120は最大負荷であり、第1の閾値より小さな第2の閾値未満であればデータベース120は最小負荷であり、第2の閾値以上、第1の閾値未満であれば中間負荷であると検知してよい。そして、キュー取出部105は、データベース120が最大負荷であれば、キュー210の末尾のデータを取り出し、最小負荷であればキュー210の先頭のデータを取り出し、中間負荷であれば、キュー210の末尾と先頭との中間のデータを取り出すように構成されていてよい。
[Other Embodiments]
In the embodiment described above, the load status detection unit 107 classifies the load status of the database 120 into high load and normal time. However, the load status detection unit 107 may classify the load status into three or more. For example, the load status detection unit 107 indicates that the database 120 has the maximum load if the resource usage rate such as the CPU usage rate or the disk I / O usage rate is equal to or higher than the first threshold, and the second lower than the first threshold. If it is less than the threshold value, the database 120 may be detected as the minimum load, and if it is greater than or equal to the second threshold value and less than the first threshold value, it may be detected as an intermediate load. If the database 120 has the maximum load, the queue extraction unit 105 extracts the data at the end of the queue 210. If the database 120 has the minimum load, the queue extraction unit 105 extracts the data at the top of the queue 210. And an intermediate data between the head and the head may be extracted.

上述した実施形態では、データベースに書込むデータを、センサ部で検出された航空機の位置情報としたが、航空機の位置情報以外のセンサデータ、例えば温度、湿度、風速等を検出するセンサのセンシングデータをデータベースに書込む場合にも本発明は適用可能である。   In the embodiment described above, the data to be written in the database is the position information of the aircraft detected by the sensor unit, but sensor data other than the position information of the aircraft, for example, sensing data of a sensor that detects temperature, humidity, wind speed, etc. The present invention can also be applied to the case of writing to the database.

本発明は、センサで計測・採取されたデータをデータベースに書込むシステム全般に利用でき、特に航空管制における航空機の位置情報を照会・蓄積するシステムに利用できる。   INDUSTRIAL APPLICABILITY The present invention can be used in all systems for writing data measured and collected by sensors into a database, and in particular, can be used in a system for inquiring and storing 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…データ
DESCRIPTION OF SYMBOLS 100 ... Database write control apparatus 100A ... Database write control apparatus 100B ... Database write control apparatus 100C ... Database write control apparatus 101 ... Sensor part 102 ... Data receiving part 103 ... Queue registration part 104 ... Write waiting queue area 105 Queue extraction unit 106 Target queue selection unit 107 Load condition detection unit 108 Data writing unit 109 Storage device 110 Data reading unit 111 Data reference program 112 Data discard determination unit 200 Queue control information 201 Sensor ID
202 ... Leading position pointer 203 ... Extraction position pointer 210 ... Queue 221 ... Sensor ID
222 ... Collection time 223 ... Sensing data 224 ... Forward pointer 225 ... Back pointer 300 ... Computer device 301 ... CPU
302 ... Memory 303 ... Recording device 304 ... Interface 305 ... Bus 306 ... Input device 307 ... Output device 308 ... Recording medium 401 ... Queue 402 ... Queue registration unit 403 ... Load status detection unit 404 ... Queue extraction unit 410 ... Database 411 ... Data

Claims (8)

データベースに書込むデータの書込順序待ち制御を行うデータベース書込制御装置であって、
前記データを一時的に記憶するキューと、
前記データを前記キューに書込むキュー登録部と、
前記データベースの負荷を検知する負荷状況検知部と、
前記キューに記憶された1以上の前記データの中から、前記データベースに書込むために前記キューから取り出すデータを、前記データベースの負荷に基づいて決定するキュー取出部と、
を含むデータベース書込制御装置。
A database write control device that performs control of waiting for the order of writing data to be written to a database,
A queue for temporarily storing the data;
A queue registration unit for writing the data to the queue;
A load status detection unit for detecting the load of the database;
A queue retrieval unit that determines data to be retrieved from the queue for writing to the database from one or more of the data stored in the queue based on a load on the database;
A database writing control device.
前記キュー内の前記データのうちの最古のデータを指す先頭位置ポインタを格納する領域と、前記キュー内の前記データのうちの最新のデータを指す取出位置ポインタを格納する領域とを、更に含み、
前記キュー取出部は、前記データベースの負荷に基づいて、前記先頭位置ポインタが指す前記データを取り出すか、前記取出位置ポインタが指す前記データを取り出すかを決定する、
請求項1に記載のデータベース書込制御装置。
An area for storing a start position pointer indicating the oldest data of the data in the queue; and an area for storing an extraction position pointer indicating the latest data of the data in the queue. ,
The queue extraction unit determines whether to extract the data pointed to by the head position pointer or the data pointed to by the extraction position pointer based on the load on the database;
The database write control device according to claim 1.
前記キューから取り出した前記データの前記データベースへの書込み要否を、前記データの価値に基づいて決定するデータ破棄判定部を、更に含む、
請求項1または2に記載のデータベース書込制御装置。
A data discard determination unit that determines whether or not the data retrieved from the queue is to be written to the database based on the value of the data;
The database writing control apparatus according to claim 1 or 2.
前記データは、センサでセンシングされたデータであり、
前記キューは、センサ毎に存在する、
請求項1乃至3の何れかに記載のデータベース書込制御装置。
The data is data sensed by a sensor,
The cue exists for each sensor,
The database write control device according to claim 1.
前記キュー取出部が前記センサ毎の前記キューのうちの何れのキューから前記データを取り出すかを決定する対象キュー選択部を、更に含む、
請求項4に記載のデータベース書込制御装置。
A target queue selection unit that determines from which queue of the queues for each sensor the queue extraction unit extracts the data;
The database writing control device according to claim 4.
前記キュー取出部は、前記データベースの負荷がより高いほど、より最近に前記キューに書込まれた前記データを優先的に前記キューから取り出す、
請求項1乃至5の何れかに記載のデータベース書込制御装置。
The queue extraction unit preferentially takes out the data written to the queue more recently from the queue as the load on the database is higher.
The database write control device according to claim 1.
データベースに書込むデータを一時的に記憶するキューを有するコンピュータが実行するデータベース書込制御方法であって、
前記データを前記キューに書込み、
前記データベースの負荷を検知し、
前記キューに記憶された1以上の前記データの中から、前記データベースに書込むために前記キューから取り出すデータを、前記データベースの負荷に基づいて決定する、
データベース書込制御方法。
A database write control method executed by a computer having a queue for temporarily storing data to be written to a database, comprising:
Writing the data to the queue;
Detecting the load on the database,
Determining, from one or more of the data stored in the queue, data to be retrieved from the queue for writing to the database based on a load on the database;
Database write control method.
データベースに書込むデータを一時的に記憶するキューを有するコンピュータを、
前記データを前記キューに書込むキュー登録部と、
前記データベースの負荷を検知する負荷状況検知部と、
前記キューに記憶された1以上の前記データの中から、前記データベースに書込むために前記キューから取り出すデータを、前記データベースの負荷に基づいて決定するキュー取出部と、
して機能させるためのプログラム。
A computer having a queue for temporarily storing data to be written to a database;
A queue registration unit for writing the data to the queue;
A load status detection unit for detecting the load of the database;
A queue retrieval unit that determines data to be retrieved from the queue for writing to the database from one or more of the data stored in the queue based on a load on the database;
Program to make it function.
JP2017026648A 2017-02-16 2017-02-16 Database write controller Active JP6891527B2 (en)

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 true JP2018132971A (en) 2018-08-23
JP6891527B2 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)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008147938A (en) * 2006-12-08 2008-06-26 Chugoku Electric Power Co Inc:The Remote monitoring control system and method
JP2014137709A (en) * 2013-01-17 2014-07-28 Hitachi Solutions Ltd Computer system
WO2015072343A1 (en) * 2013-11-15 2015-05-21 オムロン株式会社 Transfer module, information-transfer network system, information transfer method, and information transfer program
JP2015145873A (en) * 2015-02-16 2015-08-13 株式会社東芝 sensor data recording device, method, and program
WO2016164351A1 (en) * 2015-04-06 2016-10-13 Preventice, Inc. Adverse event prioritization and handling

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008147938A (en) * 2006-12-08 2008-06-26 Chugoku Electric Power Co Inc:The Remote monitoring control system and method
JP2014137709A (en) * 2013-01-17 2014-07-28 Hitachi Solutions Ltd Computer system
WO2015072343A1 (en) * 2013-11-15 2015-05-21 オムロン株式会社 Transfer module, information-transfer network system, information transfer method, and information transfer program
JP2015145873A (en) * 2015-02-16 2015-08-13 株式会社東芝 sensor data recording device, method, and program
WO2016164351A1 (en) * 2015-04-06 2016-10-13 Preventice, Inc. Adverse event prioritization and handling

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
佐々木 拓郎: "メッセージキューイング Amazon SQS 性能重視と機能重視の2種のキュー 送信・受信の所要時間", 日経クラウドファースト 第10号, vol. 第10号, JPN6021005062, 20 January 2017 (2017-01-20), JP, pages 4 - 10, ISSN: 0004448691 *

Also Published As

Publication number Publication date
JP6891527B2 (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN100412865C (en) Read-copy update system and method
US20160378583A1 (en) Management computer and method for evaluating performance threshold value
JP2006244495A (en) Notification architecture of query base
US9946592B2 (en) Dump data collection management for a storage area network
CN111309732A (en) Data processing method, device, medium and computing equipment
JP2017162257A (en) Load monitoring program, load monitoring method, information processing device, and information processing system
US20180217875A1 (en) Data processing system and data processing method
US11514083B2 (en) Data processing system and data processing method
JP5084598B2 (en) Tracking processing apparatus and program
US20210119902A1 (en) Management device, information processing system, and computer-readable recording medium recording management program
US20160073315A1 (en) Information processing apparatus, storage control apparatus, and information processing method
JP5956064B2 (en) Computer system, data management method, and computer
US20110093688A1 (en) Configuration management apparatus, configuration management program, and configuration management method
JP6891527B2 (en) Database write controller
JP2021144629A (en) Data management system and data management method
JP7230512B2 (en) DATA PROCESSING DEVICE, DATA PROCESSING METHOD, AND PROGRAM
JP4905363B2 (en) Network failure detection program, network failure detection device, and network failure detection method
US20180165380A1 (en) Data processing system and data processing method
US20160105509A1 (en) Method, device, and medium
JP5509164B2 (en) Computer, management method and program
JP6977383B2 (en) Data processing equipment, programs and data processing methods
JP5472885B2 (en) Program, stream data processing method, and stream data processing computer
US8954970B2 (en) Determining executable processes based on a size of detected release-forgotten memory area and selecting a next process that achieves a highest production quantity
JP6508202B2 (en) INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM
JP2020135701A (en) Information processing system, information processing device, and information processing program

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 Request for written amendment filed

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