JP6420392B2 - Gateway device, gateway device control method, program, and data collection system - Google Patents

Gateway device, gateway device control method, program, and data collection system Download PDF

Info

Publication number
JP6420392B2
JP6420392B2 JP2017065784A JP2017065784A JP6420392B2 JP 6420392 B2 JP6420392 B2 JP 6420392B2 JP 2017065784 A JP2017065784 A JP 2017065784A JP 2017065784 A JP2017065784 A JP 2017065784A JP 6420392 B2 JP6420392 B2 JP 6420392B2
Authority
JP
Japan
Prior art keywords
information
server
sensor
gateway device
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
Application number
JP2017065784A
Other languages
Japanese (ja)
Other versions
JP2018169739A (en
Inventor
一憲 小島
一憲 小島
敦久 池口
敦久 池口
一洪 岡山
一洪 岡山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SoftBank Corp
Original Assignee
SoftBank 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 SoftBank Corp filed Critical SoftBank Corp
Priority to JP2017065784A priority Critical patent/JP6420392B2/en
Publication of JP2018169739A publication Critical patent/JP2018169739A/en
Application granted granted Critical
Publication of JP6420392B2 publication Critical patent/JP6420392B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Description

本発明は、ゲートウェイ装置、ゲートウェイ装置の制御方法、プログラム及びデータ収集システム
に関する。
The present invention relates to a gateway device, a gateway device control method, a program, and a data collection system.

近年、IoT(Internet of Things)と称される技術の研究が進められている。IoTでは、様々な物の状態をセンサによって測定し、センシングデータをサーバ装置に収集することがある。ここで、センシングデータは、ゲートウェイ装置によってセンサから取得され、サーバ装置に送信される場合がある。   In recent years, research on a technology called IoT (Internet of Things) has been advanced. In IoT, the state of various objects may be measured by a sensor, and sensing data may be collected in a server device. Here, the sensing data may be acquired from the sensor by the gateway device and transmitted to the server device.

IoTに用いられるゲートウェイ装置に関して、例えば、特許文献1には、ゲートウェイ装置のアクセスパスワードを暗号化し、インデックスと暗号化パスワードとを含む、ゲートウェイ装置のサービスセット識別子(SSID)を生成して、クライアント装置によりSSIDを選択し、選択したSSIDから暗号化パスワードを取得して、クライアント装置によりインデックスに従って暗号化パスワードを復号化してアクセスパスワードを取得し、取得したアクセスパスワードを用いて選択したSSIDに接続して、クライアント装置とゲートウェイ装置との間に無線接続を自動的に確立する方法が記載されている。   With regard to a gateway device used for IoT, for example, Patent Document 1 discloses that a gateway device access password is encrypted, a service set identifier (SSID) of the gateway device including an index and an encrypted password is generated, and a client device. To select the SSID, obtain the encrypted password from the selected SSID, decrypt the encrypted password according to the index by the client device, obtain the access password, and connect to the selected SSID using the obtained access password A method for automatically establishing a wireless connection between a client device and a gateway device is described.

特開2017−46337号公報JP 2017-46337 A

ゲートウェイ装置によってセンサからセンシングデータを収集するためには、ゲートウェイ装置とセンサの対応関係を指定して、ゲートウェイ装置がいずれのセンサからセンシングデータを取得するかを明らかにする必要がある。センサとゲートウェイ装置の対応関係は、新たにセンサを設置した場合や、修理等のためにセンサを取り外した場合に更新される。センサとゲートウェイ装置の対応関係の更新は、ゲートウェイ装置にリモートアクセスすることによって行われることがあるが、その際に用いられるログインIDやパスワードをゲートウェイ装置毎に設定すると、ゲートウェイ装置の管理が煩雑となり、ゲートウェイ装置の設置数が増えるほど更新処理の負担が増大する。そのため、出荷時に設定されているログインIDやパスワードをそのまま用いることがある。   In order to collect the sensing data from the sensor by the gateway device, it is necessary to specify the correspondence between the gateway device and the sensor and clarify from which sensor the gateway device acquires the sensing data. The correspondence relationship between the sensor and the gateway device is updated when a new sensor is installed or when the sensor is removed for repair or the like. The correspondence between the sensor and the gateway device may be updated by remote access to the gateway device, but if the login ID and password used at that time are set for each gateway device, management of the gateway device becomes complicated. As the number of installed gateway devices increases, the burden of update processing increases. Therefore, the login ID and password set at the time of shipment may be used as they are.

しかしながら、公開されているログインIDやパスワードを用いると、ゲートウェイ装置に不正アクセスされるおそれがあり、センシングデータが流出したり、DDoS攻撃(Distributed Denial of Service attack)に利用されたりするおそれがある。   However, if a publicly used login ID or password is used, there is a risk of unauthorized access to the gateway device, and sensing data may be leaked or used for a DDoS attack (Distributed Denial of Service attack).

このように、センサとゲートウェイ装置の対応関係を更新するにあたって、ゲートウェイ装置の管理を容易にすると安全性が損なわれるおそれがあり、安全性を向上させると管理が煩雑になるという傾向があった。   As described above, when updating the correspondence relationship between the sensor and the gateway device, if the gateway device is easily managed, the safety may be impaired. If the safety is improved, the management tends to be complicated.

そこで、本発明は、管理の容易さと高い安全性を両立させて、センサとゲートウェイ装置の対応関係を更新することのできるゲートウェイ装置、ゲートウェイ装置の制御方法、プログラム及びデータ収集システムを提供することを目的とする。   Therefore, the present invention provides a gateway device, a gateway device control method, a program, and a data collection system that can renew the correspondence between the sensor and the gateway device while achieving both easy management and high safety. Objective.

本発明の一態様に係るゲートウェイ装置は、センサ選択情報に基づいて選択される1又は複数のセンサから、第1通信プロトコルによってセンシングデータを取得する第1通信部と、第2通信プロトコルによってサーバ装置に記憶されたバージョン情報を取得する第2通信部と、バージョン情報に基づいて、サーバ装置に記憶されたセンサID情報を第2通信部によって取得するか否かを判断する判断部と、センサID情報を第2通信部によって取得した場合に、センサID情報に基づいて、センサ選択情報を更新する更新部と、を備える。   A gateway device according to an aspect of the present invention includes a first communication unit that acquires sensing data from one or more sensors selected based on sensor selection information using a first communication protocol, and a server device that uses a second communication protocol. A second communication unit that acquires the version information stored in the server, a determination unit that determines whether the second communication unit acquires the sensor ID information stored in the server device based on the version information, and a sensor ID An update unit that updates the sensor selection information based on the sensor ID information when the information is acquired by the second communication unit.

この態様によれば、ゲートウェイ装置がセンサID情報の取得要否を判断し、必要に応じてゲートウェイ装置がサーバ装置からセンサID情報を取得して、センサとゲートウェイ装置の対応関係を示すセンサ選択情報を更新することで、ゲートウェイ装置は、リモートアクセスを受け付けずにセンサ選択情報を更新することができるため、リモートアクセスのためにポートを開放する必要が無くなり、不正ログインを防止することができる。また、ゲートウェイ装置は、センサ選択情報を更新するためにリモートアクセスを受け付ける必要が無いため、ログインIDやパスワードを簡易に設定しても安全性を損なわず、IPアドレスを固定アドレスとする必要が無くなり、IPアドレスをDHCPで設定することができる。よって、管理の容易さと高い安全性を両立させて、センサとゲートウェイ装置の対応関係を更新することができる。   According to this aspect, the gateway device determines whether or not sensor ID information needs to be acquired, and the gateway device acquires sensor ID information from the server device as necessary, and sensor selection information indicating the correspondence between the sensor and the gateway device. Since the gateway device can update the sensor selection information without accepting remote access, there is no need to open a port for remote access, and unauthorized login can be prevented. In addition, since the gateway device does not need to accept remote access in order to update the sensor selection information, even if a login ID or password is simply set, the security is not impaired and the IP address does not need to be a fixed address. The IP address can be set by DHCP. Therefore, it is possible to update the correspondence relationship between the sensor and the gateway device while achieving both easy management and high safety.

上記態様において、第2通信部は、サーバ装置に記憶されたサーバ接続情報を取得し、サーバ設定情報に基づいて選択されるサーバ装置に、第2通信プロトコルによってセンシングデータを送信し、判断部は、センサID情報を第2通信部によって取得すると判断した場合に、サーバ接続情報に基づいて、サーバ設定情報を変更するか否かをさらに判断し、更新部は、サーバ設定情報を変更すると判断された場合に、サーバ接続情報に基づいて、サーバ設定情報を更新する。   In the above aspect, the second communication unit acquires server connection information stored in the server device, transmits sensing data to the server device selected based on the server setting information using the second communication protocol, and the determination unit When it is determined that the sensor ID information is acquired by the second communication unit, it is further determined whether to change the server setting information based on the server connection information, and the update unit is determined to change the server setting information. The server setting information is updated based on the server connection information.

この態様によれば、ゲートウェイ装置がサーバ装置に記憶されたサーバ接続情報を取得し、センシングデータの送信先を示すサーバ設定情報の変更要否を判断することで、センシングデータの送信先を変更する場合であっても、ゲートウェイ装置は、リモートアクセスのためにポートを開放する必要が無くなり、不正ログインを防止することができる。   According to this aspect, the gateway device acquires the server connection information stored in the server device, and determines whether or not the server setting information indicating the transmission destination of the sensing data needs to be changed, thereby changing the transmission destination of the sensing data. Even in this case, the gateway device does not need to open a port for remote access, and unauthorized login can be prevented.

上記態様において、判断部は、サーバ設定情報を変更すると判断した場合に、バージョン情報に基づいて、サーバ装置からのリモートアクセスを受け付けるか否かをさらに判断し、第2通信部は、サーバ装置からのリモートアクセスを受け付けると判断された場合に、第2通信プロトコルによるサーバ装置からのリモートアクセスを、所定の期間に限って受け付ける。   In the above aspect, when the determination unit determines to change the server setting information, the determination unit further determines whether or not to accept remote access from the server device based on the version information, and the second communication unit receives from the server device When it is determined that the remote access is accepted, the remote access from the server device using the second communication protocol is accepted only for a predetermined period.

この態様によれば、ゲートウェイ装置は、バージョン情報に基づいて、リモートアクセスを受け付けるか否かを判断し、必要に応じて所定の期間に限ってサーバ装置からのリモートアクセスを受け付けることで、リモートアクセスによる利便性を確保しつつ、不正ログインを防止して安全性を高めることができる。   According to this aspect, the gateway device determines whether or not to accept remote access based on the version information, and accepts remote access from the server device only during a predetermined period as necessary. While ensuring the convenience by, unauthorized login can be prevented and safety can be improved.

上記態様において、所定時刻に再起動を行わせる再起動部をさらに備え、更新部は、再起動が行われた時に更新を実行する。   The said aspect WHEREIN: The restart part which performs restart at predetermined time is further provided, and an update part performs update, when restart is performed.

この態様によれば、更新部によるセンサ選択情報等の更新が所定時刻に行われることで、センサからセンシングデータを収集する処理と競合しないように、ゲートウェイ装置によって自律的に更新処理を行うことができる。   According to this aspect, the update processing of the sensor selection information or the like by the update unit is performed at a predetermined time, so that the update process can be autonomously performed by the gateway device so as not to compete with the process of collecting the sensing data from the sensor. it can.

上記態様において、判断部は、バージョン情報に基づいて、再起動部によって再起動を行わせる必要があるか否かを判断し、再起動部は、判断部による判断に従って、再起動を行わせる。   In the above aspect, the determination unit determines whether or not the restart unit needs to be restarted based on the version information, and the restart unit performs restart according to the determination by the determination unit.

この態様によれば、更新部によってセンサ選択情報等の更新を行う必要が無い場合に、所定時刻に再起動を行わないようにして、再起動に伴うゲートウェイ装置に対する負荷を低減することができる。   According to this aspect, when there is no need to update the sensor selection information or the like by the updating unit, it is possible to reduce the load on the gateway device associated with the restart by not restarting at a predetermined time.

上記態様において、第2通信部は、ランダムな時間間隔で、バージョン情報を取得する。   In the above aspect, the second communication unit acquires version information at random time intervals.

この態様によれば、サーバ装置が多数のゲートウェイ装置を管理する場合であっても、サーバ装置にアクセスが集中することが防止され、サーバ装置の演算負荷や通信負荷が低減される。   According to this aspect, even when the server device manages a large number of gateway devices, it is possible to prevent access from being concentrated on the server device, and to reduce the computation load and communication load of the server device.

本発明の他の態様に係るゲートウェイ装置の制御方法は、ゲートウェイ装置によって、センサ選択情報に基づいて選択される1又は複数のセンサから、第1通信プロトコルによってセンシングデータを取得するステップと、ゲートウェイ装置によって、第2通信プロトコルによってサーバ装置に記憶されたバージョン情報を取得するステップと、ゲートウェイ装置によって、バージョン情報に基づいて、サーバ装置に記憶されたセンサID情報を第2通信部によって取得するか否かを判断するステップと、ゲートウェイ装置によって、センサID情報を第2通信部によって取得した場合に、センサID情報に基づいて、センサ選択情報を更新するステップと、を含む。   The gateway device control method according to another aspect of the present invention includes a step of acquiring sensing data by a first communication protocol from one or a plurality of sensors selected by the gateway device based on sensor selection information, and the gateway device. The step of acquiring the version information stored in the server device by the second communication protocol, and the gateway device acquiring the sensor ID information stored in the server device based on the version information by the second communication unit. And the step of updating the sensor selection information based on the sensor ID information when the sensor information is acquired by the second communication unit by the gateway device.

この態様によれば、ゲートウェイ装置によってセンサID情報の取得要否を判断し、必要に応じてゲートウェイ装置によってサーバ装置からセンサID情報を取得して、センサとゲートウェイ装置の対応関係を示すセンサ選択情報を更新することで、リモートアクセスを受け付けずにセンサ選択情報を更新することができるため、リモートアクセスのためにポートを開放する必要が無くなり、不正ログインを防止することができる。また、ゲートウェイ装置によって、センサ選択情報を更新するためにリモートアクセスを受け付ける必要が無いため、ログインIDやパスワードを簡易に設定しても安全性を損なわず、IPアドレスを固定アドレスとする必要が無くなり、IPアドレスをDHCPで設定することができる。よって、管理の容易さと高い安全性を両立させて、センサとゲートウェイ装置の対応関係を更新することができる。   According to this aspect, it is determined whether or not sensor ID information needs to be acquired by the gateway device, sensor ID information is acquired from the server device by the gateway device as necessary, and sensor selection information indicating the correspondence between the sensor and the gateway device Since the sensor selection information can be updated without accepting remote access, it is not necessary to open a port for remote access, and unauthorized login can be prevented. In addition, since it is not necessary to accept remote access to update sensor selection information by the gateway device, it is not necessary to set a login ID or password easily, and there is no need to set the IP address as a fixed address. The IP address can be set by DHCP. Therefore, it is possible to update the correspondence relationship between the sensor and the gateway device while achieving both easy management and high safety.

本発明の他の態様に係るプログラムは、ゲートウェイ装置に備えられたコンピュータを、センサ選択情報に基づいて選択される1又は複数のセンサから、第1通信プロトコルによってセンシングデータを取得する第1通信部、第2通信プロトコルによってサーバ装置に記憶されたバージョン情報を取得する第2通信部、バージョン情報に基づいて、サーバ装置に記憶されたセンサID情報を第2通信部によって取得するか否かを判断する判断部、及びセンサID情報を第2通信部によって取得した場合に、センサID情報に基づいて、センサ選択情報を更新する更新部、として機能させる。   The program which concerns on the other aspect of this invention is a 1st communication part which acquires sensing data by the 1st communication protocol from the 1 or several sensor selected based on sensor selection information for the computer with which the gateway apparatus was equipped. A second communication unit that acquires version information stored in the server device by the second communication protocol, and determines whether or not the sensor ID information stored in the server device is acquired by the second communication unit based on the version information When the second communication unit acquires the determination unit and the sensor ID information, the update unit functions as the update unit that updates the sensor selection information based on the sensor ID information.

この態様によれば、ゲートウェイ装置がセンサID情報の取得要否を判断し、必要に応じてゲートウェイ装置がサーバ装置からセンサID情報を取得して、センサとゲートウェイ装置の対応関係を示すセンサ選択情報を更新することで、ゲートウェイ装置は、リモートアクセスを受け付けずにセンサ選択情報を更新することができるため、リモートアクセスのためにポートを開放する必要が無くなり、不正ログインを防止することができる。また、ゲートウェイ装置は、センサ選択情報を更新するためにリモートアクセスを受け付ける必要が無いため、ログインIDやパスワードを簡易に設定しても安全性を損なわず、IPアドレスを固定アドレスとする必要が無くなり、IPアドレスをDHCPで設定することができる。よって、管理の容易さと高い安全性を両立させて、センサとゲートウェイ装置の対応関係を更新することができる。   According to this aspect, the gateway device determines whether or not sensor ID information needs to be acquired, and the gateway device acquires sensor ID information from the server device as necessary, and sensor selection information indicating the correspondence between the sensor and the gateway device. Since the gateway device can update the sensor selection information without accepting remote access, there is no need to open a port for remote access, and unauthorized login can be prevented. In addition, since the gateway device does not need to accept remote access in order to update the sensor selection information, even if a login ID or password is simply set, the security is not impaired and the IP address does not need to be a fixed address. The IP address can be set by DHCP. Therefore, it is possible to update the correspondence relationship between the sensor and the gateway device while achieving both easy management and high safety.

本発明の他の態様に係るデータ収集システムは、センシングデータを出力する1又は複数のセンサと、1又は複数のセンサのセンサID情報及びセンサID情報の更新の有無を示すバージョン情報を記憶するサーバ装置と、1又は複数のセンサからセンシングデータを取得し、センシングデータをサーバ装置に送信するゲートウェイ装置と、を含むデータ収集システムであって、ゲートウェイ装置は、センサ選択情報に基づいて選択される1又は複数のセンサから、第1通信プロトコルによってセンシングデータを取得する第1通信部と、第2通信プロトコルによってサーバ装置に記憶されたバージョン情報を取得する第2通信部と、バージョン情報に基づいて、サーバ装置に記憶されたセンサID情報を第2通信部によって取得するか否かを判断する判断部と、センサID情報を第2通信部によって取得した場合に、センサID情報に基づいて、センサ選択情報を更新する更新部と、を備える。   A data collection system according to another aspect of the present invention is a server that stores one or more sensors that output sensing data, sensor ID information of one or more sensors, and version information that indicates whether sensor ID information has been updated. A data collection system including a device and a gateway device that acquires sensing data from one or more sensors and transmits the sensing data to a server device, wherein the gateway device is selected based on sensor selection information 1 Alternatively, based on the version information, a first communication unit that acquires sensing data from a plurality of sensors using a first communication protocol, a second communication unit that acquires version information stored in a server device using a second communication protocol, Whether to acquire sensor ID information stored in the server device by the second communication unit Comprising a determining unit that determines, when the sensor ID information acquired by the second communication unit, based on the sensor ID information, an update unit for updating the sensor selection information.

この態様によれば、ゲートウェイ装置がセンサID情報の取得要否を判断し、必要に応じてゲートウェイ装置がサーバ装置からセンサID情報を取得して、センサとゲートウェイ装置の対応関係を示すセンサ選択情報を更新することで、ゲートウェイ装置は、リモートアクセスを受け付けずにセンサ選択情報を更新することができるため、リモートアクセスのためにポートを開放する必要が無くなり、不正ログインを防止することができる。また、ゲートウェイ装置は、センサ選択情報を更新するためにリモートアクセスを受け付ける必要が無いため、ログインIDやパスワードを簡易に設定しても安全性を損なわず、IPアドレスを固定アドレスとする必要が無くなり、IPアドレスをDHCPで設定することができる。よって、管理の容易さと高い安全性を両立させて、センサとゲートウェイ装置の対応関係を更新することができる。   According to this aspect, the gateway device determines whether or not sensor ID information needs to be acquired, and the gateway device acquires sensor ID information from the server device as necessary, and sensor selection information indicating the correspondence between the sensor and the gateway device. Since the gateway device can update the sensor selection information without accepting remote access, there is no need to open a port for remote access, and unauthorized login can be prevented. In addition, since the gateway device does not need to accept remote access in order to update the sensor selection information, even if a login ID or password is simply set, the security is not impaired and the IP address does not need to be a fixed address. The IP address can be set by DHCP. Therefore, it is possible to update the correspondence relationship between the sensor and the gateway device while achieving both easy management and high safety.

本発明によれば、管理の容易さと高い安全性を両立させて、センサとゲートウェイ装置の対応関係を更新することのできるゲートウェイ装置、ゲートウェイ装置の制御方法、プログラム及びデータ収集システムが提供される。   According to the present invention, there are provided a gateway device, a gateway device control method, a program, and a data collection system capable of updating the correspondence relationship between the sensor and the gateway device while achieving both easy management and high safety.

本発明の実施形態に係るデータ収集システムのネットワーク構成を示す図である。It is a figure which shows the network structure of the data collection system which concerns on embodiment of this invention. 本発明の実施形態に係るゲートウェイ装置及びサーバ装置の機能ブロックを示す図である。It is a figure which shows the functional block of the gateway apparatus and server apparatus which concern on embodiment of this invention. 本発明の実施形態に係るゲートウェイ装置により実行される第1処理のフローチャートである。It is a flowchart of the 1st process performed by the gateway apparatus which concerns on embodiment of this invention. 本発明の実施形態に係るゲートウェイ装置により実行される第2処理のフローチャートである。It is a flowchart of the 2nd process performed by the gateway apparatus which concerns on embodiment of this invention. 本発明の実施形態に係るゲートウェイ装置により実行される第3処理のフローチャートである。It is a flowchart of the 3rd process performed by the gateway apparatus which concerns on embodiment of this invention. 本発明の実施形態に係るゲートウェイ装置により実行される第4処理のフローチャートである。It is a flowchart of the 4th process performed by the gateway apparatus which concerns on embodiment of this invention.

添付図面を参照して、本発明の実施形態について説明する。なお、各図において、同一の符号を付したものは、同一又は同様の構成を有する。   Embodiments of the present invention will be described with reference to the accompanying drawings. In addition, in each figure, what attached | subjected the same code | symbol has the same or similar structure.

図1は、本発明の実施形態に係るデータ収集システム1のネットワーク構成を示す図である。データ収集システム1は、複数のセンサ20、複数のゲートウェイ装置10、複数のサーバ装置30及びユーザ端末装置40を含む。センサ20は、対象の状態を測定する任意のセンサであってよく、例えばドアの開閉状態を測定するセンサであってよい。センサ20は、第1通信プロトコルによる第1通信ネットワークN1に接続される。第1通信ネットワークN1は、無線通信ネットワークであってよく、センサ20は、第1通信プロトコルによって無線通信を行うための通信インターフェースを備えていてよい。もっとも、第1通信ネットワークN1は、有線通信ネットワークであってもよく、センサ20は、第1通信プロトコルによって有線通信を行うための通信インターフェースを備えてもよい。第1通信プロトコルとしては、規格化された既存の通信プロトコルを用いることができるが、独自の通信プロトコルを用いてもよい。   FIG. 1 is a diagram showing a network configuration of a data collection system 1 according to an embodiment of the present invention. The data collection system 1 includes a plurality of sensors 20, a plurality of gateway devices 10, a plurality of server devices 30, and a user terminal device 40. The sensor 20 may be an arbitrary sensor that measures the state of the target, and may be a sensor that measures the open / closed state of the door, for example. The sensor 20 is connected to the first communication network N1 according to the first communication protocol. The first communication network N1 may be a wireless communication network, and the sensor 20 may include a communication interface for performing wireless communication using a first communication protocol. However, the first communication network N1 may be a wired communication network, and the sensor 20 may include a communication interface for performing wired communication using the first communication protocol. As the first communication protocol, an existing standardized communication protocol can be used, but an original communication protocol may be used.

ゲートウェイ装置10は、第1通信ネットワークN1と、第2通信プロトコルによる第2通信ネットワークN2とに接続されて、第1通信プロトコルと第2通信プロトコルの変換を行う。ゲートウェイ装置10は、第1通信ネットワークN1を介して複数のセンサ20からセンシングデータを取得する。また、ゲートウェイ装置10は、第2通信ネットワークN2を介して、センシングデータをサーバ装置30に送信する。第2通信ネットワークN2は、無線通信ネットワークであってもよいし、有線通信ネットワークであってもよく、LAN(Local Area Network)であってもよい。ゲートウェイ装置10は、第1通信プロトコルによって無線通信又は有線通信を行うための第1通信インターフェース及び第2通信プロトコルによって無線通信又は有線通信を行うための第2通信インターフェースを備える。第2通信プロトコルとしては、規格化された既存の通信プロトコルを用いることができるが、独自の通信プロトコルを用いてもよい。   The gateway device 10 is connected to the first communication network N1 and the second communication network N2 based on the second communication protocol, and performs conversion between the first communication protocol and the second communication protocol. The gateway device 10 acquires sensing data from the plurality of sensors 20 via the first communication network N1. Further, the gateway device 10 transmits sensing data to the server device 30 via the second communication network N2. The second communication network N2 may be a wireless communication network, a wired communication network, or a local area network (LAN). The gateway device 10 includes a first communication interface for performing wireless communication or wired communication using a first communication protocol, and a second communication interface for performing wireless communication or wired communication using a second communication protocol. As the second communication protocol, an existing standardized communication protocol can be used, but an original communication protocol may be used.

サーバ装置30は、ゲートウェイ装置10とセンサ20の対応関係の設定を受け付けて、当該対応関係に関する情報を記憶したり、ゲートウェイ装置10から受信したセンシングデータを記憶して、ユーザ端末装置40に送信したりする。サーバ装置30は、第2通信ネットワークN2を介して、センシングデータをゲートウェイ装置10から受信し、第3通信ネットワークN3を介して、センシングデータをユーザ端末装置40に送信する。第3通信ネットワークN3は、インターネットであってよく、無線通信ネットワーク及び有線通信ネットワークを含んでよい。   The server device 30 receives the setting of the correspondence relationship between the gateway device 10 and the sensor 20, stores information regarding the correspondence relationship, stores the sensing data received from the gateway device 10, and transmits the sensing data to the user terminal device 40. Or The server device 30 receives sensing data from the gateway device 10 via the second communication network N2, and transmits the sensing data to the user terminal device 40 via the third communication network N3. The third communication network N3 may be the Internet and may include a wireless communication network and a wired communication network.

ユーザ端末装置40は、汎用のパーソナルコンピュータやスマートフォンであってよく、サーバ装置30に蓄積されたセンシングデータを閲覧するために用いられる。例えば、センサ20が、ドアの開閉状態を測定するセンサである場合、ユーザ端末装置40によって、建物のどの場所のドアがどのような状態にあるかをまとめて確認することができる。より具体的には、トイレの個室のドアにセンサ20を設置して、個室のドアの開閉状態を測定することで、どの階のどの個室が利用されているかをユーザ端末装置40によって確認することのできるサービスを構築することができる。   The user terminal device 40 may be a general-purpose personal computer or a smartphone, and is used for browsing sensing data accumulated in the server device 30. For example, when the sensor 20 is a sensor that measures the open / closed state of a door, the user terminal device 40 can collectively check in which state the door of which location of the building is in what state. More specifically, the user terminal device 40 confirms which private room on which floor is used by installing the sensor 20 on the door of the private room of the toilet and measuring the open / closed state of the door of the private room. A service that can be used.

図2は、本発明の実施形態に係るゲートウェイ装置10及びサーバ装置30の機能ブロックを示す図である。ゲートウェイ装置10は、第1通信部11、第2通信部12、判断部13、更新部14、ゲートウェイ記憶部15及び再起動部16を備える。また、サーバ装置30は、サーバ記憶部31を備える。   FIG. 2 is a diagram showing functional blocks of the gateway device 10 and the server device 30 according to the embodiment of the present invention. The gateway device 10 includes a first communication unit 11, a second communication unit 12, a determination unit 13, an update unit 14, a gateway storage unit 15, and a restart unit 16. In addition, the server device 30 includes a server storage unit 31.

サーバ記憶部31は、バージョン情報D1、センサID情報D2、サーバ接続情報D3及びスクリプトファイルD4を記憶する。バージョン情報D1は、センサバージョン情報D1aと、スクリプトバージョン情報D1bとを含む。センサバージョン情報D1aは、センサ20とゲートウェイ装置10の対応関係の更新とあわせて更新される情報であり、センサ20とゲートウェイ装置10の対応関係の更新を示すフラグ情報である。また、スクリプトバージョン情報D1bは、サーバ装置30からゲートウェイ装置10にリモートアクセスを行う場合に更新される情報であり、サーバ装置30からゲートウェイ装置10にリモートアクセスを行うことを示すフラグ情報である。   The server storage unit 31 stores version information D1, sensor ID information D2, server connection information D3, and a script file D4. The version information D1 includes sensor version information D1a and script version information D1b. The sensor version information D1a is information that is updated together with the update of the correspondence relationship between the sensor 20 and the gateway device 10, and is flag information that indicates the update of the correspondence relationship between the sensor 20 and the gateway device 10. The script version information D1b is information that is updated when remote access is performed from the server device 30 to the gateway device 10, and is flag information indicating that remote access is performed from the server device 30 to the gateway device 10.

センサID情報D2は、ゲートウェイ装置10によってセンシングデータを取得する対象となるセンサ20を特定するための情報である。センサID情報D2は、新しいセンサ20が設置された場合や、設置されているセンサ20を撤去した場合に、データ収集システム1の管理者によって更新される。センサID情報D2が更新されると、センサバージョン情報D1aがあわせて更新される。   The sensor ID information D2 is information for specifying the sensor 20 that is a target from which sensing data is acquired by the gateway device 10. The sensor ID information D2 is updated by the administrator of the data collection system 1 when a new sensor 20 is installed or when the installed sensor 20 is removed. When the sensor ID information D2 is updated, the sensor version information D1a is also updated.

サーバ接続情報D3は、ゲートウェイ装置10によってセンシングデータを送信する際の受信対象となるサーバ装置30を特定するための情報である。サーバ接続情報D3は、データ収集システム1の管理者によって更新される。サーバ接続情報D3は、センサID情報D2とともに更新されてよく、その場合、サーバ接続情報D3の更新とともに、センサバージョン情報D1aの更新が行われる。   The server connection information D3 is information for specifying the server device 30 that is a reception target when sensing data is transmitted by the gateway device 10. The server connection information D3 is updated by the administrator of the data collection system 1. The server connection information D3 may be updated together with the sensor ID information D2. In this case, the sensor version information D1a is updated together with the update of the server connection information D3.

スクリプトファイルD4は、サーバ装置30からゲートウェイ装置10にリモートアクセスを行う場合に、ゲートウェイ装置10によって実行されるファイルである。スクリプトファイルD4は、スクリプトバージョン情報D1bに応じてゲートウェイ装置10によって取得され、実行される。   The script file D4 is a file executed by the gateway device 10 when performing remote access from the server device 30 to the gateway device 10. The script file D4 is acquired and executed by the gateway device 10 according to the script version information D1b.

ゲートウェイ装置10の第1通信部11は、センサ選択情報D5に基づいて選択される1又は複数のセンサ20から、第1通信プロトコルによってセンシングデータを取得する。第1通信部11は、第1通信プロトコルによって無線通信又は有線通信を行うための第1通信インターフェースによって構成されてよい。また、第1通信プロトコルは、暗号化された通信プロトコルであってよい。   The first communication unit 11 of the gateway device 10 acquires sensing data from one or a plurality of sensors 20 selected based on the sensor selection information D5 using the first communication protocol. The first communication unit 11 may be configured by a first communication interface for performing wireless communication or wired communication using a first communication protocol. The first communication protocol may be an encrypted communication protocol.

第2通信部12は、第2通信プロトコルによってサーバ装置30に記憶されたバージョン情報D1を取得する。第2通信部12は、第2通信プロトコルによって無線通信又は有線通信を行うための第2通信インターフェースによって構成されてよい。また、第2通信プロトコルは、暗号化された通信プロトコルであってよい。第2通信部12は、サーバ装置30に記憶されたサーバ接続情報D3を取得し、サーバ設定情報D6に基づいて選択されるサーバ装置30に、第2通信プロトコルによってセンシングデータを送信する。また、第2通信部12は、ランダムな時間間隔で、バージョン情報D1を取得する。   The second communication unit 12 acquires the version information D1 stored in the server device 30 by the second communication protocol. The second communication unit 12 may be configured by a second communication interface for performing wireless communication or wired communication using the second communication protocol. Further, the second communication protocol may be an encrypted communication protocol. The second communication unit 12 acquires server connection information D3 stored in the server device 30, and transmits sensing data to the server device 30 selected based on the server setting information D6 using the second communication protocol. Further, the second communication unit 12 acquires the version information D1 at random time intervals.

判断部13は、バージョン情報D1に基づいて、サーバ装置30に記憶されたセンサID情報D2を第2通信部12によって取得するか否かを判断する。また、判断部13は、センサID情報D2を第2通信部12によって取得すると判断した場合に、サーバ接続情報D3に基づいて、サーバ設定情報D6を変更するか否かをさらに判断する。また、判断部13は、サーバ設定情報D6を変更すると判断した場合に、バージョン情報D1に基づいて、サーバ装置30からのリモートアクセスを受け付けるか否かをさらに判断する。ここで、第2通信部12は、サーバ装置30からのリモートアクセスを受け付けると判断された場合に、第2通信プロトコルによるサーバ装置30からのリモートアクセスを、所定の期間に限って受け付ける。   The determination unit 13 determines whether or not the second communication unit 12 acquires the sensor ID information D2 stored in the server device 30 based on the version information D1. When determining that the sensor ID information D2 is acquired by the second communication unit 12, the determining unit 13 further determines whether to change the server setting information D6 based on the server connection information D3. Further, when determining that the server setting information D6 is to be changed, the determination unit 13 further determines whether or not to accept remote access from the server device 30 based on the version information D1. Here, when it is determined that the remote access from the server device 30 is accepted, the second communication unit 12 accepts the remote access from the server device 30 according to the second communication protocol only for a predetermined period.

更新部14は、センサID情報D2を第2通信部12によって取得した場合に、センサID情報D2に基づいて、センサ選択情報D5を更新する。また、更新部14は、サーバ設定情報D6を変更すると判断された場合に、サーバ接続情報D3に基づいて、サーバ設定情報D6を更新する。   The updating unit 14 updates the sensor selection information D5 based on the sensor ID information D2 when the sensor ID information D2 is acquired by the second communication unit 12. In addition, when it is determined that the server setting information D6 is to be changed, the updating unit 14 updates the server setting information D6 based on the server connection information D3.

ゲートウェイ記憶部15は、少なくとも、センサ選択情報D5及びサーバ設定情報D6を記憶する。センサ選択情報D5は、センシングデータを取得するセンサ20を選択するための情報であり、センシングデータを取得するセンサ20を特定する情報を含む。サーバ設定情報D6は、取得したセンシングデータの送信先となるサーバ装置30を選択するための情報であり、センシングデータの送信先となるサーバ装置30を特定する情報を含む。   The gateway storage unit 15 stores at least sensor selection information D5 and server setting information D6. The sensor selection information D5 is information for selecting the sensor 20 that acquires the sensing data, and includes information that specifies the sensor 20 that acquires the sensing data. The server setting information D6 is information for selecting the server device 30 that is the transmission destination of the acquired sensing data, and includes information that identifies the server device 30 that is the transmission destination of the sensing data.

再起動部16は、所定時刻に再起動を行わせる。再起動部16は、所定時刻が訪れた際に、ゲートウェイ装置10を再起動させる。ここで、更新部14は、再起動が行われた時に更新を実行する。また、判断部13は、バージョン情報D1に基づいて、再起動部16によって再起動を行わせる必要があるか否かを判断し、再起動部16は、判断部13による判断に従って、再起動を行わせる。   The restart unit 16 restarts at a predetermined time. The restarting unit 16 restarts the gateway device 10 when a predetermined time comes. Here, the update unit 14 performs the update when the restart is performed. Further, the determination unit 13 determines whether or not the restart unit 16 needs to be restarted based on the version information D1, and the restart unit 16 restarts according to the determination by the determination unit 13. Let it be done.

図3は、本発明の実施形態に係るゲートウェイ装置10により実行される第1処理のフローチャートである。第1処理は、センサ選択情報D5及びサーバ設定情報D6の更新を行う処理である。   FIG. 3 is a flowchart of the first process executed by the gateway device 10 according to the embodiment of the present invention. The first process is a process for updating the sensor selection information D5 and the server setting information D6.

はじめに、ゲートウェイ装置10は、サーバ装置30から、バージョン情報D1及びサーバ接続情報D3をランダムな時間間隔で取得する(S10)。例えば、ゲートウェイ装置10は、15分から30分の中からランダムに選択される時間間隔で、サーバ装置30から、バージョン情報D1及びサーバ接続情報D3を取得してよい。   First, the gateway device 10 acquires version information D1 and server connection information D3 from the server device 30 at random time intervals (S10). For example, the gateway device 10 may acquire the version information D1 and the server connection information D3 from the server device 30 at a time interval randomly selected from 15 minutes to 30 minutes.

取得したバージョン情報D1のうち、センサバージョン情報D1aが更新されている場合(S11:Yes)、ゲートウェイ装置10は、センサID情報D2をサーバ装置30から取得する(S12)。取得したセンサID情報D2は、ゲートウェイ記憶部15に記憶される。その後、ゲートウェイ装置10は、所定時刻に再起動部16による再起動が行われた時に、センサID情報D2に基づいて、センサ選択情報D5を更新する(S13)。   When the sensor version information D1a is updated among the acquired version information D1 (S11: Yes), the gateway device 10 acquires the sensor ID information D2 from the server device 30 (S12). The acquired sensor ID information D2 is stored in the gateway storage unit 15. Thereafter, the gateway device 10 updates the sensor selection information D5 based on the sensor ID information D2 when the restarting unit 16 restarts at a predetermined time (S13).

一方、センサバージョン情報D1aが更新されていない場合(S11:No)、ゲートウェイ装置10は特段の処理を行わず、第1処理を終了させる。   On the other hand, when the sensor version information D1a has not been updated (S11: No), the gateway device 10 does not perform special processing and ends the first processing.

センサバージョン情報D1aが更新されており(S11:Yes)、センサID情報を第2通信部12によって取得すると判断した場合に、ゲートウェイ装置10は、サーバ接続情報D3が更新されているか否かを判断する(S14)。すなわち、ゲートウェイ装置10は、サーバ接続情報D3に基づいて、サーバ設定情報D6を変更するか否かを判断する。サーバ接続情報D3が更新されている場合(S14:Yes)、ゲートウェイ装置10は、ゲートウェイ記憶部15に記憶された現在のサーバ設定情報D6を、ゲートウェイ記憶部15の他の記憶領域に退避させ(S15)、所定時刻に再起動部16による再起動が行われた時に、サーバ接続情報D3に基づいて、サーバ設定情報D6を更新する(S16)。その後、ゲートウェイ装置10は、同図に「A」と示した第2処理を行ってよい。第2処理については、次図を用いて詳細に説明する。以上により、第1処理が終了する。   When the sensor version information D1a has been updated (S11: Yes) and it is determined that the sensor ID information is acquired by the second communication unit 12, the gateway device 10 determines whether or not the server connection information D3 has been updated. (S14). That is, the gateway device 10 determines whether to change the server setting information D6 based on the server connection information D3. When the server connection information D3 has been updated (S14: Yes), the gateway device 10 saves the current server setting information D6 stored in the gateway storage unit 15 in another storage area of the gateway storage unit 15 ( S15) When the restarting unit 16 is restarted at a predetermined time, the server setting information D6 is updated based on the server connection information D3 (S16). Thereafter, the gateway apparatus 10 may perform the second process indicated as “A” in FIG. The second process will be described in detail with reference to the following diagram. Thus, the first process ends.

本実施形態に係るゲートウェイ装置10によれば、ゲートウェイ装置10がセンサID情報D2の取得要否を判断し、必要に応じてゲートウェイ装置10がサーバ装置30からセンサID情報D2を取得して、センサ20とゲートウェイ装置10の対応関係を示すセンサ選択情報D5を更新することで、ゲートウェイ装置10は、リモートアクセスを受け付けずにセンサ選択情報D5を更新することができるため、リモートアクセスのためにポートを開放する必要が無くなり、不正ログインを防止することができる。また、ゲートウェイ装置10は、センサ選択情報D5を更新するためにリモートアクセスを受け付ける必要が無いため、ログインIDやパスワードを簡易に設定しても安全性を損なわず、IPアドレスを固定アドレスとする必要が無くなり、IPアドレスをDHCP(Dynamic Host Configuration Protocol)で設定することができる。よって、管理の容易さと高い安全性を両立させて、センサ20とゲートウェイ装置10の対応関係を更新することができる。   According to the gateway device 10 according to the present embodiment, the gateway device 10 determines whether or not the sensor ID information D2 needs to be acquired, and the gateway device 10 acquires the sensor ID information D2 from the server device 30 as necessary, and the sensor Since the gateway device 10 can update the sensor selection information D5 without accepting remote access by updating the sensor selection information D5 indicating the correspondence relationship between the gateway device 10 and the gateway device 10, the port is set for remote access. There is no need to open it, and unauthorized login can be prevented. Further, since the gateway device 10 does not need to accept remote access in order to update the sensor selection information D5, it is necessary to set the IP address as a fixed address without losing safety even if the login ID and password are simply set. The IP address can be set by DHCP (Dynamic Host Configuration Protocol). Therefore, the correspondence relationship between the sensor 20 and the gateway device 10 can be updated while achieving both easy management and high safety.

また、ゲートウェイ装置10がサーバ装置30に記憶されたサーバ接続情報D3を取得し、センシングデータの送信先を示すサーバ設定情報D6の変更要否を判断することで、センシングデータの送信先を変更する場合であっても、ゲートウェイ装置10は、リモートアクセスのためにポートを開放する必要が無くなり、不正ログインを防止することができる。   Further, the gateway device 10 acquires the server connection information D3 stored in the server device 30, and determines whether or not the server setting information D6 indicating the transmission destination of the sensing data needs to be changed, thereby changing the transmission destination of the sensing data. Even in this case, the gateway device 10 does not need to open a port for remote access, and can prevent unauthorized login.

さらに、サーバ装置30がランダムな時間間隔で、サーバ装置30からバージョン情報D1を取得することで、サーバ装置30が多数のゲートウェイ装置10を管理する場合であっても、サーバ装置30にアクセスが集中することが防止され、サーバ装置30の演算負荷や通信負荷が低減される。   Further, the server device 30 acquires version information D1 from the server device 30 at random time intervals, so that even when the server device 30 manages a large number of gateway devices 10, access concentrates on the server device 30. This prevents the calculation load and communication load of the server device 30 from being reduced.

本実施形態に係るゲートウェイ装置10によれば、サーバ装置30の管理者がサーバ装置30に記憶されたセンサID情報D2及びサーバ接続情報D3を更新することで、ゲートウェイ装置10によって自律的にセンサ選択情報D5及びサーバ設定情報D6が更新され、センサ20とゲートウェイ装置10の対応関係が更新され、ゲートウェイ装置10からセンシングデータを送信する際の受信対象が更新される。ゲートウェイ装置10が自律的にセンサ20とゲートウェイ装置10の対応関係を更新したり、センシングデータを送信する際の送信先を更新したりすることで、管理の容易さと高い安全性を両立させることができる。   According to the gateway device 10 according to the present embodiment, the administrator of the server device 30 updates the sensor ID information D2 and the server connection information D3 stored in the server device 30 so that the gateway device 10 autonomously selects the sensor. The information D5 and the server setting information D6 are updated, the correspondence relationship between the sensor 20 and the gateway device 10 is updated, and the reception target when the sensing data is transmitted from the gateway device 10 is updated. The gateway device 10 autonomously updates the correspondence relationship between the sensor 20 and the gateway device 10 or updates the transmission destination when transmitting sensing data, so that both ease of management and high safety can be achieved. it can.

図4は、本発明の実施形態に係るゲートウェイ装置10により実行される第2処理のフローチャートである。第2処理は、第1処理においてサーバ設定情報D6を更新した後に行われる処理であり、サーバ装置30からリモートアクセスを受け付ける処理である。   FIG. 4 is a flowchart of the second process executed by the gateway device 10 according to the embodiment of the present invention. The second process is a process performed after the server setting information D6 is updated in the first process, and is a process for accepting remote access from the server device 30.

ゲートウェイ装置10は、退避されたサーバ設定情報D6がゲートウェイ記憶部15に記憶されているか否かを判断する(S20)。退避されたサーバ設定情報D6が記憶されていない場合(S20:No)、第2処理は終了する。退避されたサーバ設定情報D6が記憶されている場合(S20:Yes)、ゲートウェイ装置10は、サーバ装置30から取得したバージョン情報D1に含まれるスクリプトバージョン情報D1bが更新されているか否かを判断する(S21)。スクリプトバージョン情報D1bが更新されている場合(S21:Yes)、判断部13は、サーバ装置30からのリモートアクセスを受け付けると判断し、ゲートウェイ装置10は、サーバ装置30からスクリプトファイルD4を取得する(S22)。その後、ゲートウェイ装置10は、スクリプトファイルD4を実行し、第2通信部は、第2通信プロトコルによるサーバ装置30からのリモートアクセスを、所定の期間に限って受け付ける(S23)。リモートアクセスの受け付けが終了した後、ゲートウェイ装置10は、退避されたサーバ設定情報D6をゲートウェイ記憶部15から削除する(S24)。   The gateway device 10 determines whether or not the saved server setting information D6 is stored in the gateway storage unit 15 (S20). If the saved server setting information D6 is not stored (S20: No), the second process ends. When the saved server setting information D6 is stored (S20: Yes), the gateway device 10 determines whether or not the script version information D1b included in the version information D1 acquired from the server device 30 has been updated. (S21). When the script version information D1b has been updated (S21: Yes), the determination unit 13 determines to accept remote access from the server device 30, and the gateway device 10 acquires the script file D4 from the server device 30 ( S22). Thereafter, the gateway device 10 executes the script file D4, and the second communication unit accepts remote access from the server device 30 using the second communication protocol only for a predetermined period (S23). After accepting the remote access, the gateway device 10 deletes the saved server setting information D6 from the gateway storage unit 15 (S24).

一方、スクリプトバージョン情報D1bが更新されていない場合(S21:No)、判断部13は、サーバ装置30からのリモートアクセスを受け付けないと判断し、ゲートウェイ装置10は、退避されたサーバ設定情報D6をゲートウェイ記憶部15から削除する(S24)。以上により、第2処理が終了する。   On the other hand, when the script version information D1b has not been updated (S21: No), the determination unit 13 determines that remote access from the server device 30 is not accepted, and the gateway device 10 stores the saved server setting information D6. It deletes from the gateway memory | storage part 15 (S24). Thus, the second process ends.

本実施形態に係るゲートウェイ装置10によれば、バージョン情報D1に基づいて、リモートアクセスを受け付けるか否かを判断し、必要に応じて所定の期間に限ってサーバ装置30からのリモートアクセスを受け付けることで、リモートアクセスによる利便性を確保しつつ、不正ログインを防止して安全性を高めることができる。   According to the gateway device 10 according to the present embodiment, it is determined whether to accept remote access based on the version information D1, and accepts remote access from the server device 30 only for a predetermined period as necessary. Thus, while ensuring convenience by remote access, unauthorized login can be prevented and safety can be improved.

図5は、本発明の実施形態に係るゲートウェイ装置10により実行される第3処理のフローチャートである。第3処理は、所定時刻にセンサ選択情報D5及びサーバ設定情報D6を更新する処理である。同図は、第1処理におけるセンサ選択情報D5の更新処理及びサーバ設定情報D6の更新処理をより詳しく説明するフローチャートである。   FIG. 5 is a flowchart of the third process executed by the gateway device 10 according to the embodiment of the present invention. The third process is a process for updating the sensor selection information D5 and the server setting information D6 at a predetermined time. This figure is a flowchart for explaining in more detail the update process of the sensor selection information D5 and the update process of the server setting information D6 in the first process.

ゲートウェイ装置10の判断部13は、バージョン情報D1に基づいて、バージョン情報D1が更新されたか否かによって、再起動部16によって再起動を行わせる必要があるか否かを判断する(S30)。バージョン情報D1が更新されていない場合(S30:No)、再起動部16によって再起動を行わせる必要がないと判断し、第3処理が終了する。一方、バージョン情報D1が更新されている場合(S30:Yes)、再起動部16によって再起動を行わせる必要があると判断し、再起動部16によって所定時刻に再起動を行わせる(S31)。ここで、所定時刻は任意の時刻に設定してよく、例えばセンサ20による測定が行われる頻度が低い時刻に設定してよい。センサ20がドアの開閉状態を測定するものである場合、所定時刻は、人が出入りすることの少ない深夜0時等に設定してよい。   Based on the version information D1, the determination unit 13 of the gateway device 10 determines whether or not the restart unit 16 needs to be restarted depending on whether or not the version information D1 has been updated (S30). When the version information D1 has not been updated (S30: No), it is determined that the restarting unit 16 does not need to restart, and the third process ends. On the other hand, when the version information D1 has been updated (S30: Yes), it is determined that the restarting unit 16 needs to be restarted, and the restarting unit 16 restarts at a predetermined time (S31). . Here, the predetermined time may be set to an arbitrary time, for example, may be set to a time when the frequency of measurement by the sensor 20 is low. When the sensor 20 is for measuring the open / closed state of the door, the predetermined time may be set to midnight or the like where people do not go in and out.

更新部14は、再起動部16によって再起動が行われた時に更新を実行する。より具体的には、更新部14は、再起動が行われた時に、センサID情報D2に基づいて、センサ選択情報D5を更新し(S32)、サーバ接続情報D3に基づいて、サーバ設定情報D6を更新する(S33)。以上により、第3処理が終了する。   The updating unit 14 performs the update when the restarting unit 16 restarts. More specifically, when the restart is performed, the updating unit 14 updates the sensor selection information D5 based on the sensor ID information D2 (S32), and the server setting information D6 based on the server connection information D3. Is updated (S33). Thus, the third process ends.

本実施形態に係るゲートウェイ装置10によれば、更新部14によるセンサ選択情報D5及びサーバ設定情報D6の更新が所定時刻に行われることで、センサ20からセンシングデータを収集する処理と競合しないように、ゲートウェイ装置10によって自律的に更新処理を行うことができる。   According to the gateway device 10 according to the present embodiment, the update of the sensor selection information D5 and the server setting information D6 by the updating unit 14 is performed at a predetermined time so as not to compete with the process of collecting sensing data from the sensor 20. The gateway device 10 can autonomously perform the update process.

また、更新部14によってセンサ選択情報D5及びサーバ設定情報D6の更新を行う必要が無い場合に、所定時刻に再起動を行わないようにして、再起動に伴うゲートウェイ装置10に対する負荷を低減することができる。   Further, when it is not necessary to update the sensor selection information D5 and the server setting information D6 by the updating unit 14, the restart is not performed at a predetermined time, and the load on the gateway device 10 due to the restart is reduced. Can do.

図6は、本発明の実施形態に係るゲートウェイ装置10により実行される第4処理のフローチャートである。第4処理は、センサ20からセンシングデータを取得して、サーバ装置30に送信する処理である。   FIG. 6 is a flowchart of the fourth process executed by the gateway device 10 according to the embodiment of the present invention. The fourth process is a process of acquiring sensing data from the sensor 20 and transmitting it to the server device 30.

ゲートウェイ装置10は、ゲートウェイ記憶部15に記憶されたセンサ選択情報D5に基づいて、センシングデータを取得するセンサ20を選択する(S40)。ゲートウェイ装置10は、選択された1又は複数のセンサ20から、第1通信プロトコルによってセンシングデータを取得する(S41)。   The gateway device 10 selects the sensor 20 that acquires sensing data based on the sensor selection information D5 stored in the gateway storage unit 15 (S40). The gateway device 10 acquires sensing data from the selected one or more sensors 20 by the first communication protocol (S41).

また、ゲートウェイ装置10は、ゲートウェイ記憶部15に記憶されたサーバ設定情報D6に基づいて、取得したセンシングデータを送信するサーバ装置30を選択する(S42)。ゲートウェイ装置10は、選択されたサーバ装置30に対して、第2通信プロトコルによってセンシングデータを送信する(S43)。以上により第4処理が終了する。   Moreover, the gateway apparatus 10 selects the server apparatus 30 which transmits the acquired sensing data based on the server setting information D6 memorize | stored in the gateway memory | storage part 15 (S42). The gateway device 10 transmits sensing data to the selected server device 30 using the second communication protocol (S43). Thus, the fourth process ends.

本実施形態に係るゲートウェイ装置10によれば、ゲートウェイ装置10によって自律的に更新されたセンサ選択情報D5に基づいて、センシングデータを取得するセンサ20の選択が行われ、センシングデータの取得が行われる。また、ゲートウェイ装置10によって自律的に更新されたサーバ設定情報D6に基づいて、取得したセンシングデータを送信するサーバ装置30の選択が行われ、サーバ装置30にセンシングデータが収集される。このようにして、管理の容易さと高い安全性を両立させたデータ収集システム1が提供される。   According to gateway device 10 concerning this embodiment, selection of sensor 20 which acquires sensing data is performed based on sensor selection information D5 autonomously updated by gateway device 10, and acquisition of sensing data is performed. . Further, based on the server setting information D6 updated autonomously by the gateway device 10, the server device 30 that transmits the acquired sensing data is selected, and the sensing data is collected in the server device 30. In this way, the data collection system 1 that provides both easy management and high safety is provided.

以上説明した実施形態は、本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。実施形態が備える各要素並びにその配置、材料、条件、形状及びサイズ等は、例示したものに限定されるわけではなく適宜変更することができる。また、異なる実施形態で示した構成同士を部分的に置換し又は組み合わせることが可能である。   The embodiments described above are for facilitating the understanding of the present invention, and are not intended to limit the present invention. Each element included in the embodiment and its arrangement, material, condition, shape, size, and the like are not limited to those illustrated, and can be changed as appropriate. In addition, the structures shown in different embodiments can be partially replaced or combined.

1…データ収集システム、10…ゲートウェイ装置、11…第1通信部、12…第2通信部、13…判断部、14…更新部、15…ゲートウェイ記憶部、16…再起動部、20…センサ、30…サーバ装置、31…サーバ記憶部、40…ユーザ端末装置、D1…バージョン情報、D1a…センサバージョン情報、D1b…スクリプトバージョン情報、D2…センサID情報、D3…サーバ接続情報、D4…スクリプトファイル、D5…センサ選択情報、D6…サーバ設定情報、N1…第1通信ネットワーク、N2…第2通信ネットワーク、N3…第3通信ネットワーク。   DESCRIPTION OF SYMBOLS 1 ... Data collection system, 10 ... Gateway apparatus, 11 ... 1st communication part, 12 ... 2nd communication part, 13 ... Judgment part, 14 ... Update part, 15 ... Gateway memory | storage part, 16 ... Restart part, 20 ... Sensor , 30 ... Server device, 31 ... Server storage unit, 40 ... User terminal device, D1 ... Version information, D1a ... Sensor version information, D1b ... Script version information, D2 ... Sensor ID information, D3 ... Server connection information, D4 ... Script File, D5 ... Sensor selection information, D6 ... Server setting information, N1 ... First communication network, N2 ... Second communication network, N3 ... Third communication network.

Claims (8)

センサ選択情報に基づいて選択される1又は複数のセンサから、第1通信プロトコルによってセンシングデータを取得する第1通信部と、
第2通信プロトコルによってサーバ装置に記憶されたバージョン情報を取得する第2通信部と、
前記バージョン情報に基づいて、前記サーバ装置に記憶されたセンサID情報を前記第2通信部によって取得するか否かを判断する判断部と、
前記センサID情報を前記第2通信部によって取得した場合に、前記センサID情報に基づいて、前記センサ選択情報を更新する更新部と、を備え、
前記第2通信部は、前記サーバ装置に記憶されたサーバ接続情報を取得し、サーバ設定情報に基づいて選択されるサーバ装置に、前記第2通信プロトコルによって前記センシングデータを送信し、
前記判断部は、前記センサID情報を前記第2通信部によって取得すると判断した場合に、前記サーバ接続情報に基づいて、前記サーバ設定情報を変更するか否かをさらに判断し、
前記更新部は、前記サーバ設定情報を変更すると判断された場合に、前記サーバ接続情報に基づいて、前記サーバ設定情報を更新する、
ートウェイ装置。
A first communication unit that obtains sensing data from one or more sensors selected based on sensor selection information using a first communication protocol;
A second communication unit for acquiring version information stored in the server device by a second communication protocol;
A determination unit that determines whether or not the second communication unit acquires sensor ID information stored in the server device based on the version information;
An update unit that updates the sensor selection information based on the sensor ID information when the sensor ID information is acquired by the second communication unit ;
The second communication unit acquires server connection information stored in the server device, and transmits the sensing data to the server device selected based on server setting information using the second communication protocol,
When the determination unit determines to acquire the sensor ID information by the second communication unit, the determination unit further determines whether or not to change the server setting information based on the server connection information;
The update unit updates the server setting information based on the server connection information when it is determined to change the server setting information.
Gateway devices.
前記判断部は、前記サーバ設定情報を変更すると判断した場合に、前記バージョン情報に基づいて、前記サーバ装置からのリモートアクセスを受け付けるか否かをさらに判断し、
前記第2通信部は、前記サーバ装置からのリモートアクセスを受け付けると判断された場合に、前記第2通信プロトコルによる前記サーバ装置からのリモートアクセスを、所定の期間に限って受け付ける、
請求項に記載のゲートウェイ装置。
When the determination unit determines to change the server setting information, the determination unit further determines whether to accept remote access from the server device based on the version information,
The second communication unit accepts remote access from the server device according to the second communication protocol only for a predetermined period when it is determined to accept remote access from the server device.
The gateway device according to claim 1 .
所定時刻に再起動を行わせる再起動部をさらに備え、
前記更新部は、再起動が行われた時に更新を実行する、
請求項1又は2に記載のゲートウェイ装置。
It further includes a restart unit that restarts at a predetermined time,
The update unit performs an update when a restart is performed,
The gateway device according to claim 1 or 2 .
前記判断部は、前記バージョン情報に基づいて、前記再起動部によって再起動を行わせる必要があるか否かを判断し、
前記再起動部は、前記判断部による判断に従って、再起動を行わせる、
請求項に記載のゲートウェイ装置。
The determination unit determines whether or not the restart unit needs to be restarted based on the version information,
The restarting unit causes restarting according to the determination by the determining unit.
The gateway device according to claim 3 .
前記第2通信部は、ランダムな時間間隔で、前記バージョン情報を取得する、
請求項1からのいずれか1項に記載のゲートウェイ装置。
The second communication unit acquires the version information at random time intervals.
The gateway apparatus of any one of Claim 1 to 4 .
ゲートウェイ装置によって、センサ選択情報に基づいて選択される1又は複数のセンサから、第1通信プロトコルによってセンシングデータを取得するステップと、
前記ゲートウェイ装置によって、第2通信プロトコルによってサーバ装置に記憶されたバージョン情報を取得するステップと、
前記ゲートウェイ装置によって、前記バージョン情報に基づいて、前記サーバ装置に記憶されたセンサID情報を前記第2通信プロトコルによる通信によって取得するか否かを判断するステップと、
前記ゲートウェイ装置によって、前記センサID情報を前記第2通信プロトコルによる通信によって取得した場合に、前記センサID情報に基づいて、前記センサ選択情報を更新するステップと、
前記サーバ装置に記憶されたサーバ接続情報を取得し、サーバ設定情報に基づいて選択されるサーバ装置に、前記第2通信プロトコルによって前記センシングデータを送信するステップと、
前記センサID情報を前記第2通信プロトコルによる通信によって取得すると判断した場合に、前記サーバ接続情報に基づいて、前記サーバ設定情報を変更するか否かを判断するステップと、
前記サーバ設定情報を変更すると判断された場合に、前記サーバ接続情報に基づいて、前記サーバ設定情報を更新するステップと、
を含むゲートウェイ装置の制御方法。
Obtaining sensing data by a first communication protocol from one or more sensors selected by the gateway device based on the sensor selection information;
Obtaining version information stored in a server device by a second communication protocol by the gateway device;
Determining whether the gateway device acquires sensor ID information stored in the server device by communication based on the second communication protocol based on the version information;
Updating the sensor selection information based on the sensor ID information when the gateway device acquires the sensor ID information by communication using the second communication protocol ;
Obtaining server connection information stored in the server device, and transmitting the sensing data to the server device selected based on server setting information by the second communication protocol;
Determining whether to change the server setting information based on the server connection information when it is determined that the sensor ID information is acquired by communication using the second communication protocol;
Updating the server setting information based on the server connection information when it is determined to change the server setting information;
Control method for gateway device including
ゲートウェイ装置に備えられたコンピュータを、
センサ選択情報に基づいて選択される1又は複数のセンサから、第1通信プロトコルによってセンシングデータを取得する第1通信部、
第2通信プロトコルによってサーバ装置に記憶されたバージョン情報を取得する第2通信部、
前記バージョン情報に基づいて、前記サーバ装置に記憶されたセンサID情報を前記第2通信部によって取得するか否かを判断する判断部、及び
前記センサID情報を前記第2通信部によって取得した場合に、前記センサID情報に基づいて、前記センサ選択情報を更新する更新部、として機能させ、
前記第2通信部は、前記サーバ装置に記憶されたサーバ接続情報を取得し、サーバ設定情報に基づいて選択されるサーバ装置に、前記第2通信プロトコルによって前記センシングデータを送信し、
前記判断部は、前記センサID情報を前記第2通信部によって取得すると判断した場合に、前記サーバ接続情報に基づいて、前記サーバ設定情報を変更するか否かをさらに判断し、
前記更新部は、前記サーバ設定情報を変更すると判断された場合に、前記サーバ接続情報に基づいて、前記サーバ設定情報を更新する、
ログラム。
A computer installed in the gateway device
A first communication unit that obtains sensing data from one or more sensors selected based on sensor selection information using a first communication protocol;
A second communication unit for acquiring version information stored in the server device by a second communication protocol;
A determination unit that determines whether or not the second communication unit acquires sensor ID information stored in the server device based on the version information, and when the sensor ID information is acquired by the second communication unit To function as an update unit that updates the sensor selection information based on the sensor ID information ,
The second communication unit acquires server connection information stored in the server device, and transmits the sensing data to the server device selected based on server setting information using the second communication protocol,
When the determination unit determines to acquire the sensor ID information by the second communication unit, the determination unit further determines whether or not to change the server setting information based on the server connection information;
The update unit updates the server setting information based on the server connection information when it is determined to change the server setting information.
Program.
センシングデータを出力する1又は複数のセンサと、
前記1又は複数のセンサのセンサID情報及び前記センサID情報の更新の有無を示すバージョン情報を記憶するサーバ装置と、
前記1又は複数のセンサから前記センシングデータを取得し、前記センシングデータを前記サーバ装置に送信するゲートウェイ装置と、を含むデータ収集システムであって、
前記ゲートウェイ装置は、
ンサ選択情報に基づいて選択される1又は複数のセンサから、第1通信プロトコルによって前記センシングデータを取得する第1通信部と、
第2通信プロトコルによって前記サーバ装置に記憶された前記バージョン情報を取得する第2通信部と、
前記バージョン情報に基づいて、前記サーバ装置に記憶された前記センサID情報を前記第2通信部によって取得するか否かを判断する判断部と、
前記センサID情報を前記第2通信部によって取得した場合に、前記センサID情報に基づいて、前記センサ選択情報を更新する更新部と、を備え、
前記第2通信部は、前記サーバ装置に記憶されたサーバ接続情報を取得し、サーバ設定情報に基づいて選択されるサーバ装置に、前記第2通信プロトコルによって前記センシングデータを送信し、
前記判断部は、前記センサID情報を前記第2通信部によって取得すると判断した場合に、前記サーバ接続情報に基づいて、前記サーバ設定情報を変更するか否かをさらに判断し、
前記更新部は、前記サーバ設定情報を変更すると判断された場合に、前記サーバ接続情報に基づいて、前記サーバ設定情報を更新する、
データ収集システム。
One or more sensors that output sensing data;
A server device that stores sensor ID information of the one or more sensors and version information indicating whether or not the sensor ID information is updated;
A gateway device that acquires the sensing data from the one or more sensors and transmits the sensing data to the server device,
The gateway device is
1 or a plurality of sensors are selected based on the sensor selection information, a first communication unit configured to obtain the sensing data by a first communication protocol,
A second communication unit for acquiring the version information stored in the server device by a second communication protocol;
A determination unit that determines whether to acquire the sensor ID information stored in the server device by the second communication unit based on the version information;
When the sensor ID information acquired by the second communication unit, based on the sensor ID information, e Bei an update unit, the updating the sensor selection information;
The second communication unit acquires server connection information stored in the server device, and transmits the sensing data to the server device selected based on server setting information using the second communication protocol,
When the determination unit determines to acquire the sensor ID information by the second communication unit, the determination unit further determines whether or not to change the server setting information based on the server connection information;
The update unit updates the server setting information based on the server connection information when it is determined to change the server setting information.
Data collection system.
JP2017065784A 2017-03-29 2017-03-29 Gateway device, gateway device control method, program, and data collection system Active JP6420392B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017065784A JP6420392B2 (en) 2017-03-29 2017-03-29 Gateway device, gateway device control method, program, and data collection system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017065784A JP6420392B2 (en) 2017-03-29 2017-03-29 Gateway device, gateway device control method, program, and data collection system

Publications (2)

Publication Number Publication Date
JP2018169739A JP2018169739A (en) 2018-11-01
JP6420392B2 true JP6420392B2 (en) 2018-11-07

Family

ID=64020367

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017065784A Active JP6420392B2 (en) 2017-03-29 2017-03-29 Gateway device, gateway device control method, program, and data collection system

Country Status (1)

Country Link
JP (1) JP6420392B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116801128A (en) * 2022-12-23 2023-09-22 慧之安信息技术股份有限公司 Agricultural sensor data acquisition method and system based on OPC UA

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007163165A (en) * 2005-12-09 2007-06-28 Denso Corp Map information updating device for moving body, navigation device, and map information updating system for moving body
JP5539129B2 (en) * 2010-09-13 2014-07-02 キヤノン株式会社 Image forming apparatus, firmware update method, and program
JP5942734B2 (en) * 2012-09-20 2016-06-29 沖電気工業株式会社 Data collection system, data collection method, adjacent information management server, and program

Also Published As

Publication number Publication date
JP2018169739A (en) 2018-11-01

Similar Documents

Publication Publication Date Title
JP5628227B2 (en) Network connection apparatus and method
WO2017148308A1 (en) Method, apparatus and system for accessing network by internet-of-things device
KR101587003B1 (en) Apparatus and method for determining validity of wifi connection in wireless communication system
KR100563907B1 (en) Method and system for remote controlling
JP5051238B2 (en) Control proxy device
US10523763B2 (en) Communication device, communication method, controlled device, and non-transitory computer readable medium
JP2013542621A (en) Access control method and system, and access terminal
US20230224215A1 (en) Methods and systems for dhcp policy management
JP2007004605A (en) Communication system, client, server, and program
JP2012027869A (en) Management server, information processing device, method and program
US20150341216A1 (en) Automatic and secure activation of a universal plug and play device management device
JP4693048B2 (en) In-home communication equipment compatible with power line communication, automatic setting method thereof, program thereof, and recording medium
JP6420392B2 (en) Gateway device, gateway device control method, program, and data collection system
JP2017514410A5 (en)
US12001853B2 (en) Device bootstrapping
US20180205721A1 (en) Monitoring device, control method, and recording medium
JP2019029689A (en) Image forming apparatus and method for controlling the same, and program
US8239930B2 (en) Method for controlling access to a network in a communication system
US10511671B2 (en) Communication device, communication method, controlled device, and non-transitory computer readable medium
JP2015154419A (en) Control device, control program, control method, and control system
KR101603692B1 (en) Method of identifying terminals and system thereof
KR101603694B1 (en) Method of identifying terminals and system thereof
JP2018156492A (en) Remote management system, mediation device, remote management method, and remote management program
JP2004355396A (en) Method, system and program for assuring security for information device
US11329988B2 (en) Access to a service in a network

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180820

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180828

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180913

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181011

R150 Certificate of patent or registration of utility model

Ref document number: 6420392

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250