JP2015033122A - Communication system, server device, control method, and program - Google Patents
Communication system, server device, control method, and program Download PDFInfo
- Publication number
- JP2015033122A JP2015033122A JP2013164051A JP2013164051A JP2015033122A JP 2015033122 A JP2015033122 A JP 2015033122A JP 2013164051 A JP2013164051 A JP 2013164051A JP 2013164051 A JP2013164051 A JP 2013164051A JP 2015033122 A JP2015033122 A JP 2015033122A
- Authority
- JP
- Japan
- Prior art keywords
- command
- electronic device
- received
- control
- server
- 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
Links
Images
Abstract
Description
本発明は、通信システム、サーバ装置、制御方法、およびプログラムに関する。特に、家庭用電気器具等の被制御装置を制御するための通信システム、通信システムを構成するサーバ装置、通信装置における制御方法、サーバ装置における制御方法、およびサーバ装置を制御するためのプログラムに関する。 The present invention relates to a communication system, a server device, a control method, and a program. In particular, the present invention relates to a communication system for controlling a controlled device such as a home appliance, a server device constituting the communication system, a control method for the communication device, a control method for the server device, and a program for controlling the server device.
従来、家庭用電気器具から受信するポーリング信号に基づき、当該家庭用電気器具にユーザ端末から受信した制御指令を送信する遠隔制御システムが知られている。 Conventionally, a remote control system that transmits a control command received from a user terminal to a household electric appliance based on a polling signal received from the household electric appliance is known.
たとえば、特許文献1には、当該遠隔制御システムとして、制御情報格納手段と、判定手段と、割当手段とを備える構成が開示されている。当該判定手段は、情報家電機器から、第1のタイムスロットにおいて、機器識別情報と初期ポーリング間隔とを含むポーリング信号を受信したことに応じて、制御情報格納手段を参照し、予め定めた制御情報有無判定時間内に、情報家電機器に対する制御情報の受信があったか否かを判定する。また、上記割当手段は、制御情報の受信があった場合に、上記第1のタイムスロットから、上記初期ポーリング間隔を所定の時間長さだけ短縮した時間だけ後の第2のタイムスロットを、次にポーリング信号を送出するタイムスロットとして情報家電機器に割り当てる。
For example,
しかしながら、特許文献1においては、次のポーリングが行なわれるまでに制御命令を複数受け付けた場合、いずれの制御命令に基づいて被制御装置を制御するかについて考慮されていない。つまり、特許文献1の構成では、制御命令の競合が発生したとき、複数の制御命令から1つの制御命令を選択する処理を行なうことはできない。
However, in
本願発明は、上記の問題点に鑑みなされたものであって、その目的は、制御命令が競合した場合に制御命令を選択可能な通信システム、通信システムを構成するサーバ装置、通信装置における制御方法、サーバ装置における制御方法、およびサーバ装置を制御するためのプログラムを提供することにある。 The present invention has been made in view of the above-described problems, and its object is to provide a communication system capable of selecting a control command when the control commands compete, a server device constituting the communication system, and a control method in the communication device. Another object of the present invention is to provide a control method in the server device and a program for controlling the server device.
本発明のある局面に従うと、通信システムは、サーバ装置と、被制御装置を制御する制御装置とを備える。制御装置は、被制御装置を制御するための指令がサーバ装置に存在するか否かを、指定されたタイミングでサーバ装置に問い合わせる。サーバ装置は、第1の電子機器および第2の電子機器の各々から指令を受信する受信手段と、各指令を受信した後に問い合わせがあった場合、予め定められた第1の規則に基づいて、第1の電子機器および第2の電子機器の各々から受信した各指令のうちのいずれかの指令を選択する選択手段と、問い合わせに対して、選択された指令を制御装置に送信する送信手段とを含む。 According to an aspect of the present invention, a communication system includes a server device and a control device that controls a controlled device. The control device inquires of the server device at a designated timing whether or not a command for controlling the controlled device exists in the server device. The server device receives a command from each of the first electronic device and the second electronic device, and when there is an inquiry after receiving each command, the server device is based on a predetermined first rule, Selection means for selecting one of the instructions received from each of the first electronic device and the second electronic device; and transmission means for transmitting the selected instruction to the control device in response to an inquiry. including.
好ましくは、前記サーバ装置は、指令が制御装置に送信されてから問い合わせを再度受け付ける迄の期間に受信手段が第1の電子機器および第2の電子機器の各々から指令をさらに受信した場合、期間に受信された各指令のうち第1の規則に基づいて選択された1つの指令の送信元と、制御装置に送信された指令の送信元とが同一か否かを判断する判断手段をさらに含む。送信手段は、送信元が同一であると判断された場合、期間に受信された各指令のうち選択された指令を制御装置にさらに送信する。 Preferably, the server device has a period when the receiving unit further receives a command from each of the first electronic device and the second electronic device during a period from when the command is transmitted to the control device until the inquiry is received again. And determining means for determining whether or not the transmission source of one command selected based on the first rule among the commands received in step S1 is the same as the transmission source of the command transmitted to the control device. . When it is determined that the transmission source is the same, the transmission unit further transmits a command selected from the commands received in the period to the control device.
好ましくは、送信手段は、送信元が同一でないと判断された場合、制御装置に送信された指令を受信手段が受信したときから予め定められた時間以上経過した後に、期間に受信した各指令のうち選択された指令を受信手段が受信していることを条件に、期間に受信した各指令のうち選択された指令を制御装置にさらに送信する。 Preferably, when it is determined that the transmission source is not the same, the transmission unit receives each command received in the period after a predetermined time has elapsed since the reception unit received the command transmitted to the control device. Of the commands received during the period, the selected command is further transmitted to the control device on condition that the selected command is received by the receiving means.
好ましくは、第1の規則は、複数の未送信の指令のうち最も古い方の指令を選択することを規定、あるいは複数の未送信の指令のうちの最も新しい方の指令を選択することを規定している。 Preferably, the first rule stipulates that the oldest command among a plurality of unsent commands is selected, or selects the newest command among a plurality of unsent commands. doing.
好ましくは、受信手段は、第1の電子機器から指令を受信してから問い合わせがある迄の期間に、第1の電子機器から指令をさらに受信する。選択手段は、予め定められた第2の規則に基づいて第1の電子機器から受信した各指令のうちのいずれかの指令を選択し、当該選択の後、第1の規則に基づいて当該選択された指令および第2の電子機器から受信した指令のうちのいずれかの指令を選択する。送信手段は、問い合わせに対して、第1の規則に基づいて当該選択された指令および第2の電子機器から受信した指令のうちから選択された指令を、制御装置に送信する。 Preferably, the receiving means further receives a command from the first electronic device during a period from when the command is received from the first electronic device to when an inquiry is received. The selection means selects any one of the commands received from the first electronic device based on a predetermined second rule, and selects the command based on the first rule after the selection. One of the received command and the command received from the second electronic device is selected. In response to the inquiry, the transmission unit transmits a command selected from the command selected based on the first rule and the command received from the second electronic device to the control device.
好ましくは、第1の規則は、複数の未送信の指令のうち最も古い方の指令を選択することを規定、あるいは複数の未送信の指令のうちの最も新しい方の指令を選択することを規定している。第2の規則は、2つの未送信の指令を受信した各時刻の差分が閾値よりも大きい場合には、当該2つの未送信の指令のうち後に受信された指令を選択し、差分が閾値よりも大きくない場合には、当該2つの未送信の指令のうち先に受信した指令を選択することを規定している。 Preferably, the first rule stipulates that the oldest command among a plurality of unsent commands is selected, or selects the newest command among a plurality of unsent commands. doing. The second rule is to select the command received later from the two untransmitted commands when the difference between the two times when the two untransmitted commands are received is larger than the threshold value. If not, it is specified that the command received earlier is selected from the two untransmitted commands.
本発明の他の局面に従うと、サーバ装置は、第1の電子機器および第2の電子機器と、被制御装置を制御する制御装置と通信する。被制御装置を制御するための指令がサーバ装置に存在するか否かが、指定されたタイミングで制御装置からサーバ装置に問い合わされる。サーバ装置は、第1の電子機器および第2の電子機器の各々から指令を受信する受信手段と、各指令を受信した後に問い合わせがあった場合、予め定められた規則に基づいて、第1の電子機器および第2の電子機器の各々から受信した各指令のうちのいずれかの指令を選択する選択手段と、問い合わせに対して、選択された指令を制御装置に送信する送信手段とを備える。 According to another aspect of the present invention, the server device communicates with the first electronic device, the second electronic device, and a control device that controls the controlled device. Whether the server device has a command for controlling the controlled device is inquired from the control device to the server device at a designated timing. The server device receives a command from each of the first electronic device and the second electronic device, and when there is an inquiry after receiving each command, the server device performs the first based on a predetermined rule. Selection means for selecting one of the commands received from each of the electronic device and the second electronic device, and transmission means for transmitting the selected command to the control device in response to an inquiry.
本発明のさらに他の局面に従うと、制御方法は、サーバ装置と、被制御装置を制御する制御装置とを備える通信システムにおいて実行される。制御方法は、制御装置が、被制御装置を制御するための指令がサーバ装置に存在するか否かを、指定されたタイミングでサーバ装置に問い合わせるステップと、サーバ装置が、第1の電子機器および第2の電子機器の各々から指令を受信するステップと、サーバ装置が、各指令を受信した後に問い合わせがあった場合、予め定められた規則に基づいて、第1の電子機器および第2の電子機器の各々から受信した各指令のうちのいずれかの指令を選択するステップと、サーバ装置が、問い合わせに対して、選択された指令を制御装置に送信するステップとを備える。 When the further another situation of this invention is followed, the control method is performed in a communication system provided with the server apparatus and the control apparatus which controls a to-be-controlled device. The control method includes a step in which the control device inquires to the server device at a designated timing whether or not a command for controlling the controlled device exists in the server device, and the server device includes the first electronic device and Receiving a command from each of the second electronic devices, and when there is an inquiry after the server device receives each command, the first electronic device and the second electronic device are based on a predetermined rule. A step of selecting any one of the commands received from each of the devices, and a step in which the server device transmits the selected command to the control device in response to the inquiry.
本発明のさらに他の局面に従うと、制御方法は、第1の電子機器および第2の電子機器と、被制御装置を制御する制御装置と通信するサーバ装置において実行される。被制御装置を制御するための指令がサーバ装置に存在するか否かが、指定されたタイミングで制御装置からサーバ装置に問い合わされる。制御方法は、第1の電子機器および第2の電子機器の各々から指令を受信するステップと、各指令を受信した後に問い合わせがあった場合、予め定められた規則に基づいて、第1の電子機器および第2の電子機器の各々から受信した各指令のうちのいずれかの指令を選択するステップと、問い合わせに対して、選択された指令を制御装置に送信するステップとを備える。 If the further another situation of this invention is followed, the control method is performed in the server apparatus which communicates with the control apparatus which controls a 1st electronic device and a 2nd electronic device, and a to-be-controlled device. Whether the server device has a command for controlling the controlled device is inquired from the control device to the server device at a designated timing. The control method includes a step of receiving a command from each of the first electronic device and the second electronic device, and when there is an inquiry after receiving each command, the first electronic device is based on a predetermined rule. Selecting one of the commands received from each of the device and the second electronic device, and transmitting the selected command to the control device in response to the inquiry.
本発明のさらに他の局面に従うと、プログラムは、第1の電子機器および第2の電子機器と、被制御装置を制御する制御装置と通信するサーバ装置を制御する。被制御装置を制御するための指令がサーバ装置に存在するか否かが、指定されたタイミングで制御装置からサーバ装置に問い合わされる。プログラムは、第1の電子機器および第2の電子機器の各々から指令を受信するステップと、各指令を受信した後に問い合わせがあった場合、予め定められた規則に基づいて、第1の電子機器および第2の電子機器の各々から受信した各指令のうちのいずれかの指令を選択するステップと、問い合わせに対して、選択された指令を制御装置に送信するステップとを、サーバ装置のプロセッサに実行させる。 If the further another situation of this invention is followed, a program will control the server apparatus which communicates with the control apparatus which controls a 1st electronic device and a 2nd electronic device, and a to-be-controlled device. Whether the server device has a command for controlling the controlled device is inquired from the control device to the server device at a designated timing. The program receives a command from each of the first electronic device and the second electronic device, and when there is an inquiry after receiving each command, the first electronic device is based on a predetermined rule. And a step of selecting any one of the commands received from each of the second electronic devices, and a step of transmitting the selected command to the control device in response to the inquiry to the processor of the server device. Let it run.
本発明によれば、制御命令が競合した場合に制御命令を選択可能となる。 According to the present invention, a control instruction can be selected when the control instructions compete.
以下、図面を参照しつつ、本発明の各実施の形態に係る通信システムについて説明する。また、以下の説明では、同一の部材には同一の参照符号を付してある。それらの名称および機能も同じである。したがって、それらについての詳細な説明は繰り返さない。
[実施の形態1]
<A.システム構成>
図1は、本実施の形態に係る通信システム1の概略構成を表した図である。図1を参照して、通信システム1は、サーバ装置100と、コントローラ300と、エアーコンディショナ401と、複数のスマートフォン501,502,503とを備える。本実施の形態では、被制御装置としてエアーコンディショナ401を例に挙げているが、これに限定されるものではなく、テレビまたは照明装置等の他の機器であってもよい。なお、以下では、スマートフォン501,502,503を区別しない場合には、「スマートフォン500」と表記する。すなわち、3台のスマートフォン501,502,503のうちの任意の1台のスマートフォンを「スマートフォン500」と表記する。
The communication system according to each embodiment of the present invention will be described below with reference to the drawings. In the following description, the same reference numerals are assigned to the same members. Their names and functions are also the same. Therefore, detailed description thereof will not be repeated.
[Embodiment 1]
<A. System configuration>
FIG. 1 is a diagram showing a schematic configuration of a
コントローラ300と、エアーコンディショナ401とは、宅内に設置されている。サーバ装置100は、宅外に設置されている。また、本実施の形態では、スマートフォン501,502,503は、それぞれ宅外にいる異なるユーザ(たとえば、父、母、子供)に所持されているものとして説明する。
The
スマートフォン501,502,503は、サーバ装置100と通信可能に接続されている。サーバ装置100は、図示しないルータを介して、コントローラ300と通信可能に接続されている。コントローラ300は、サーバ装置100およびエアーコンディショナ401と通信可能に接続されている。
サーバ装置100は、ポーリングを利用した双方向通信と、常時接続を利用した双方向通信とを選択的に利用して、コントローラ300と通信する。通信システム1では、常時接続を利用することにより、ポーリングを行なうことなく双方向通信ができる。以下では、常時接続を利用した通信方式として、ウェブソケット(WebSocket)を用いる例を説明する。
The
サーバ装置100は、ポーリングを利用した双方向通信およびウェブソケットを用いた双方向通信の各々において、一例として、XML(Extensible Markup Language)等のマークアップ言語を用いた通信仕様に基づき、コントローラ300と通信する。なお、サーバ装置100は、JSON(JavaScript(登録商標) Object Notation)等の非マークアップ言を用いた通信仕様に基づき、コントローラ300と通信してもよい。通信に用いるデータの形式は、特に限定されるものではない。
For example, in each of bidirectional communication using polling and bidirectional communication using a web socket, the
コントローラ300は、マークアップ言語を用いた制御指令を解釈し、エアーコンディショナ401を制御する。ポーリングを利用した双方向通信方式においては、コントローラ300は、エアーコンディショナ401を制御するための制御指令が存在するか否かを、指定されたタイミングでサーバ装置100に対して問い合わせ(つまり、ポーリングを行ない)、当該問い合わせに基づき制御指令を受信する。
The
以下においては、問合せのタイミングのデフォルト値がコントローラ300において予め指定(決定)されており、サーバ装置100が必要に応じてデフォルト値以外のタイミングで問い合せを行なうようにコントローラ300に対して指令を送信する構成を例に挙げて説明する。具体的には、ポーリングの送信についての時間間隔がコントローラ300において規定されており、サーバ装置100が、デフォルト値以外のタイミングにおいてポーリングを実行させるために、ウェブソケットを用いた通信によってポーリングを実行させるための指令(ポーリング要求指令)をコントローラ300に送信する構成を例に挙げて説明する。ポーリング要求指令を送信するためのトリガ等については、後述する。
In the following, the default value of the inquiry timing is designated (determined) in advance in the
なお、ポーリング要求指令が送信されることによりポーリングが行なわれる場合を含み、次回の問い合わせのタイミングは、サーバ装置100によって毎回指定される構成であってもよい。つまり、ポーリングのタイミングは、サーバ装置100によって都度指定される構成としてもよい。問い合わせのタイミングは、たとえば、時間間隔または時刻により指定され得る。
In addition, the timing of the next inquiry may be designated every time by the
また、以下では、説明を簡略化するために、コントローラ300は、ポーリング要求指令が送信されることによりポーリングが行なわれる場合を除き、指定されたタイミングの一例として予め定められた時間間隔で、サーバ装置100に対してポーリングを行なうものとして説明を行なう。すなわち、実際には、ポーリングの時間間隔は、一定範囲のランダム要素が含まれるため、正確には予め定められ時間間隔とはならない。たとえば、次回の問い合わせのタイミングがサーバ装置100によって毎回指定される構成においては、でサーバ装置100から指定される時間は、たとえば15分間隔といった固定された値ではなく、サーバ装置100への負荷を加味して、15分前後といったランダム要素が考慮された値となる。また、上述したように問合せのタイミングのデフォルト値がコントローラ300において予め指定されている構成であっても、ランダム要素が考慮される。しかしながら、以下の説明では、説明を簡略化し、理解を容易とするために、当該ランダム要素を考慮しないで説明を行なう。
Also, in the following, for the sake of simplicity, the
スマートフォン501,502,503は、各ユーザ操作に基づき、エアーコンディショナ401を制御するための制御指令の入力を受け付ける。スマートフォン501,501,502は、受付けた制御指令をサーバ装置100に送信する。
サーバ装置100は、制御指令をスマートフォン500から受信した場合には、ポーリングに対する応答として、コントローラ300に当該制御指令を送信する。この場合、コントローラ300は、受信した制御指令に基づき、エアーコンディショナ401を制御する。より詳しくは、コントローラ300は、マークアップ言語を用いた制御指令から、エアーコンディショナ401の制御に必要なデータを抽出する。コントローラ300は、当該抽出したデータを制御対象であるエアーコンディショナ401に送信することより、エアーコンディショナ401を制御する。
When the
<B.ハードウェア構成>
(b1.サーバ装置100)
図2は、サーバ装置100のハードウェア構成の典型例を表した図である。図2を参照して、サーバ装置100は、主たる構成要素として、プログラムを実行するCPU151と、データを不揮発的に格納するROM152と、CPU151によるプログラムの実行により生成されたデータ、又は入力装置(図示せず)を介して入力されたデータを揮発的に格納するRAM153と、データを不揮発的に格納するHDD154と、LED155と、スイッチ156と、通信IF(Interface)157と、電源回路158と、モニタ159と、操作キー160とを含む。各構成要素は、相互にデータバスによって接続されている。
<B. Hardware configuration>
(B1. Server apparatus 100)
FIG. 2 is a diagram illustrating a typical example of the hardware configuration of the
電源回路158は、コンセントを介して受信した商用電源の電圧を降圧し、サーバ装置100の各部に電源供給を行なう回路である。スイッチ156は、電源回路158に給電を行なうか否かを切替えるための主電源用のスイッチ、およびその他の各種の押しボタンスイッチである。モニタ159は、各種のデータを表示するためのデバイスである。
The
通信IF157は、コントローラ300に対するデータの送信処理およびコントローラ300から送信されたデータの受信処理、並びに、スマートフォン500に対するデータの送信処理およびスマートフォン500から送信されたデータの受信処理を行なう。
The communication IF 157 performs processing for transmitting data to the
LED155は、サーバ装置100の動作状態を表す各種の表示ランプである。たとえば、LED155は、サーバ装置100の主電源のオンまたはオフ状態、およびHDD154への読み出しまたは書き込み状態等を表す。操作キー160は、サーバ装置100のユーザがサーバ装置100へデータを入力するための用いるキー(キーボード)である。
The
サーバ装置100における処理は、各ハードウェアおよびCPU151により実行されるソフトウェアによって実現される。このようなソフトウェアは、HDD154に予め記憶されている場合がある。また、ソフトウェアは、その他の記憶媒体に格納されて、プログラムプロダクトとして流通している場合もある。あるいは、ソフトウェアは、いわゆるインターネットに接続されている情報提供事業者によってダウンロード可能なプログラムプロダクトとして提供される場合もある。このようなソフトウェアは、読取装置によりその記憶媒体から読み取られて、あるいは、通信IF157等を介してダウンロードされた後、HDD154に一旦格納される。そのソフトウェアは、CPU151によってHDD154から読み出され、RAM153に実行可能なプログラムの形式で格納される。CPU151は、そのプログラムを実行する。
The processing in the
同図に示されるサーバ装置100を構成する各構成要素は、一般的なものである。したがって、本発明の本質的な部分は、RAM153、HDD154、記憶媒体に格納されたソフトウェア、あるいはネットワークを介してダウンロード可能なソフトウェアであるともいえる。なお、サーバ装置100の各ハードウェアの動作は周知であるので、詳細な説明は繰り返さない。
Each component which comprises the
なお、記録媒体としては、DVD−RAMに限られず、DVD-ROM、CD−ROM、FD、ハードディスク、磁気テープ、カセットテープ、光ディスク、EEPROM、フラッシュROMなどの半導体メモリ等の固定的にプログラムを担持する媒体でもよい。また、記録媒体は、当該プログラム等をコンピュータが読取可能な一時的でない媒体である。また、ここでいうプログラムとは、CPUにより直接実行可能なプログラムだけでなく、ソースプログラム形式のプログラム、圧縮処理されたプログラム、暗号化されたプログラム等を含む。 The recording medium is not limited to a DVD-RAM, and a fixed program such as a semiconductor memory such as a DVD-ROM, a CD-ROM, an FD, a hard disk, a magnetic tape, a cassette tape, an optical disk, an EEPROM, and a flash ROM is supported. It may be a medium to be used. The recording medium is a non-temporary medium that can be read by the computer. The program here includes not only a program directly executable by the CPU but also a program in a source program format, a compressed program, an encrypted program, and the like.
(b2.コントローラ300)
図3は、コントローラ300のハードウェア構成の典型例を表した図である。図3を参照して、コントローラ300は、主たる構成要素として、プログラムを実行するCPU351と、フラッシュROM等のデータを不揮発的に格納するROM352と、CPU351によるプログラムの実行により生成されたデータ、又は入力装置(図示せず)を介して入力されたデータを揮発的に格納するRAM353と、スイッチ356と、通信IF357と、電源回路358とを含む。各構成要素は、相互にデータバスによって接続されている。
(B2. Controller 300)
FIG. 3 is a diagram illustrating a typical example of the hardware configuration of the
電源回路358は、コンセントを介して受信した商用電源の電圧を降圧し、コントローラ300の各部に電源供給を行なう回路である。スイッチ356は、電源回路358に給電を行なうか否かを切替えるための主電源用のスイッチ、およびその他の各種の押しボタンスイッチである。通信IF357は、サーバ装置100およびエアーコンディショナ401との間で通信を行なうために、データの送受信処理を行なう。
The
コントローラ300における処理は、各ハードウェアおよびCPU351により実行されるソフトウェアによって実現される。このようなソフトウェアは、ROM352に予め記憶されている場合がある。また、ソフトウェアは、その他の記憶媒体に格納されて、プログラムプロダクトとして流通している場合もある。あるいは、ソフトウェアは、いわゆるインターネットに接続されている情報提供事業者によってダウンロード可能なプログラムプロダクトとして提供される場合もある。このようなソフトウェアは、読取装置によりその記憶媒体から読み取られて、あるいは、通信IF357等を介してダウンロードされた後、ROM352に一旦格納される。そのソフトウェアは、CPU351によってROM352から読み出され、RAM353に実行可能なプログラムの形式で格納される。CPU351は、そのプログラムを実行する。
Processing in the
同図に示されるコントローラ300を構成する各構成要素は、一般的なものである。したがって、本発明の本質的な部分は、RAM353、ROM352、記憶媒体に格納されたソフトウェア、あるいはネットワークを介してダウンロード可能なソフトウェアであるともいえる。なお、コントローラ300の各ハードウェアの動作は周知であるので、詳細な説明は繰り返さない。
Each component constituting the
なお、記録媒体としては、DVD−RAMに限られず、DVD-ROM、CD−ROM、FD、ハードディスク、磁気テープ、カセットテープ、光ディスク、EEPROM、フラッシュROMなどの半導体メモリ等の固定的にプログラムを担持する媒体でもよい。また、記録媒体は、当該プログラム等をコンピュータが読取可能な一時的でない媒体である。また、ここでいうプログラムとは、CPUにより直接実行可能なプログラムだけでなく、ソースプログラム形式のプログラム、圧縮処理されたプログラム、暗号化されたプログラム等を含む。 The recording medium is not limited to a DVD-RAM, and a fixed program such as a semiconductor memory such as a DVD-ROM, a CD-ROM, an FD, a hard disk, a magnetic tape, a cassette tape, an optical disk, an EEPROM, and a flash ROM is supported. It may be a medium to be used. The recording medium is a non-temporary medium that can be read by the computer. The program here includes not only a program directly executable by the CPU but also a program in a source program format, a compressed program, an encrypted program, and the like.
<B.比較例>
図4は、本実施の形態の通信システム1とは異なる通信システムで実行される処理の流れを表したシーケンスチャートである。つまり、図4は、本実施の形態の通信システム1で行われる処理に対する比較例を表したシーケンスチャートである。なお、以下では、比較例のサーバ装置を、「サーバ装置900」と称する。また、サーバ装置900は、CPU951とHDD954とを有する。当該比較例の通信システムは、サーバ装置100の代わりにサーバ装置900を備える以外、他の機器は通信システム1と同じとしている。
<B. Comparative Example>
FIG. 4 is a sequence chart showing the flow of processing executed in a communication system different from the
図4を参照して、シーケンスSQ902において、スマートフォン501は、被制御装置の動作状態を変更するための機器制御指令をサーバ装置900に送信する。ステップS952において、CPU951は、指令チェックを行なう。すなわち、CPU951は、どのような種類および内容の指令を受信したかをチェックする。ステップS954において、CPU951は、指令を受信していた場合、ロック処理を実行する。「ロック処理」とは、予め定められたデータに対するアクセスおよび更新を一時的に制限することをいう。つまり、ロック処理とは、排他制御と同義である。
Referring to FIG. 4, in sequence SQ902,
シーケンスSQ904において、スマートフォン502は、機器制御指令をサーバ装置900に送信する。シーケンスSQ906において、CPU951は、ロック処理前に受信したスマートフォン501からの機器制御指令をHDD954に格納する。シーケンス908において、CPU951は、ウェブソケット通信を用いてポーリング要求指令をコントローラ300に送信する。また、CPU951は、スマートフォン501に対して、機器制御指令を受信したことおよび当該機器制御指令に基づく制御を行なうことを表す応答信号(OK信号)を送信する。
In sequence SQ904,
ステップS956において、CPU951はロックの解除を行なう。ステップS958において、CPU951は、指令チェックを行なう。ロック中にスマートフォン502から機器制御指令を受信しているため、シーケンスSQ912において、CPU951は、スマートフォン502に対して、機器制御指令を受信したことおよび当該機器制御指令に基づく制御を行なえないことを表す応答信号(NG信号)を送信する。
In step S956, the CPU 951 releases the lock. In step S958, the CPU 951 performs a command check. Since the device control command is received from the
シーケンスSQ914において、コントローラ300は、サーバ装置900に対してポーリングを行なう。換言すれば、コントローラ300は、サーバ装置900に対して、指示確認を行なうための確認信号を送信する。ポーリングが行なわれたことに基づき、シーケンスSQ916において、CPU951は、HDD954に格納したスマートフォン501からの機器制御指令を、HDD954から読み出す。
In sequence SQ914,
シーケンスSQ918において、CPU951は、読み出した機器制御指令を、ポーリングに対する要求信号としてコントローラ300に送信する。換言すれば、サーバ装置900は、コントローラ300に対して、制御を要求するための要求信号を送信する。なお、制御指令には、被制御装置の最新の状態を取得することを指示する状態更新指令、被制御装置の動作状態を変更するための機器制御指令等を含む。動作状態とは、エアーコンディショナ401に関しては、運転または停止、運転種別(冷房、除湿、送風、暖房)、設定温度、風量等を含む。
In sequence SQ918, the CPU 951 transmits the read device control command to the
シーケンスSQ920において、コントローラ300は、サーバ装置900に対して、制御指令に基づく処理を実行した旨を表す応答信号を送信する。シーケンスSQ922において、サーバ装置900は、応答信号を受信したことに基づき、コントローラ300に対して、ポーリングの送信を含む一連の通信処理G9を終了することを表す終了通知を送信する。
In sequence SQ920,
以上のように、比較例におけるサーバ装置900は、ロック処理(ステップS954)およびロック解除処理(ステップS956)を実行する必要がある。 As described above, the server device 900 in the comparative example needs to execute the lock process (step S954) and the lock release process (step S956).
<C.選択制御>
次に、本実施の形態の通信システム1における制御の詳細について説明する。
<C. Selection control>
Next, details of control in the
(c1.データ)
図5は、サーバ装置100に格納されているデータテーブルD5を表した図である。図5を参照して、データテーブルD5は、機器制御指令に関するデータを記憶している。具体的には、データテーブルD5においては、指令IDに対して、指令内容、指令を受信した日時、指令の送信元の機器ID、および指令を実行したか否かを表すフラグが対応付けられている。
(C1. Data)
FIG. 5 shows a data table D5 stored in the
機器IDの欄において、SMF001はスマートフォン501の機器IDであり、SMF002はスマートフォン502の機器IDであり、SMF003はスマートフォン503の機器IDである。フラグの欄において、「1」は制御指令が実行されたことを表し、「0」は、後述する選択処理により制御指令が実行されなかったことを表している。
In the device ID column, SMF001 is the device ID of the
(c2.複数のスマートフォンからの各制御指令に対する処理)
図6は、通信システム1で実行される処理の流れを表したシーケンスチャートである。具体的には、図6は、比較例として示した図4に対応する図である。詳しくは、図6は、複数のスマートフォンの各々から制御指令が送信された場合に実行される処理について説明するための図である。
(C2. Processing for each control command from multiple smartphones)
FIG. 6 is a sequence chart showing the flow of processing executed in the
図6を参照して、シーケンスSQ102において、スマートフォン501は、機器制御指令をサーバ装置100に送信する。ステップS152において、CPU151は、指令チェックを行なう。シーケンスSQ104において、スマートフォン502は、機器制御指令をサーバ装置100に送信する。ステップS154において、CPU151は、指令チェックを行なう。
Referring to FIG. 6, in sequence SQ <b> 102,
シーケンスSQ106において、CPU151は、スマートフォン501から受信した機器制御指令(先の指令)をHDD154に格納する。シーケンスSQ108において、CPU151は、ウェブソケット通信を用いて、ポーリング要求指令をコントローラ300に送信する。シーケンスSQ110において、サーバ装置100は、スマートフォン501に対して、機器制御指令を受信したことを表す応答信号を送信する。
In sequence SQ <b> 106, the
シーケンスSQ112において、CPU151は、スマートフォン502から受信した機器制御指令(後の指令)をHDD154に格納する。シーケンスSQ114において、CPU151は、ウェブソケット通信を用いて、ポーリング要求指令をコントローラ300に再度送信する。シーケンスSQ110において、サーバ装置100は、スマートフォン502に対して、機器制御指令を受信したことを表す応答信号を送信する。
In sequence SQ112,
シーケンスSQ118において、コントローラ300は、サーバ装置100に対してポーリングを行なう。換言すれば、コントローラ300は、サーバ装置100に対して、指示確認を行なうための確認信号を送信する。ポーリングが行なわれたことに基づき、ステップS156において、選択処理を実行する。具体的には、CPU151は、ステップS156において、先に受信した機器制御指令(換言すれば、HDD154に先に格納した機器制御指令)を選択する。なお、選択処理の詳細については、後述する(図7)。
In sequence SQ118,
シーケンスSQ918において、CPU951は、選択された機器制御指令を、ポーリングに対する要求信号としてコントローラ300に送信する。換言すれば、サーバ装置100は、コントローラ300に対して、制御を要求するための要求信号を送信する。
In sequence SQ918, the CPU 951 transmits the selected device control command to the
シーケンスSQ122において、コントローラ300は、サーバ装置100に対して、制御指令に基づく処理を実行した旨を表す応答信号を送信する。シーケンスSQ124において、サーバ装置100は、応答信号を受信したことに基づき、コントローラ300に対して、ポーリングの送信を含む一連の通信処理G1を終了することを表す終了通知を送信する。
In sequence SQ122,
図7は、図6におけるステップS156の処理の詳細を説明するためのフローチャートである。図7を参照して、ステップS2において、サーバ装置100のCPU151は、最後の実行済みの制御指令(以下、「制御指令X」と称する)をデータテーブルD5から取得する。ステップS4において、CPU151は、データテーブルD5に未実行の制御指令が存在するか否かを判断する。
FIG. 7 is a flowchart for explaining details of the process in step S156 in FIG. Referring to FIG. 7, in step S <b> 2,
CPU151は、制御指令が存在すると判断した場合(ステップS4においてYES)、ステップS6において、データテーブルD5から最も古い未実行の制御指令(以下、「制御指令Y_old」と称する)を取得する。CPU151は、制御指令が存在しないと判断した場合(ステップS4においてNO)、ステップS14において、制御指令をコントローラ300に送信せずに処理を終了する。
When
ステップS8において、CPU151は、制御指令Xを送信したスマートフォンと、制御指令Y_oldを送信したスマートフォンとが同一か否かを判断する。CPU151は、同一であると判断された場合(ステップS8においてYES)、ステップS14において、データテーブルD5に残っている未実行の制御命令をキャンセルする。すなわち、CPU151は、当該未実行の制御命令をデータテーブルD5から削除し、あるいは無為なデータとして扱うなどして、当該制御命令を無視する。
In step S8, the
ステップS16において、CPU151は、制御指令Y_oldをコントローラ300に送信する。このように、ステップS8において否定的な判断がなされた場合には、サーバ装置100は、コントローラ300に対して直近に送信した制御指令Xの送信元と同一の送信元(たとえば、スマートフォン501)から発信された未実行かつ最も古い制御指令Y_old(サーバ装置100が先に受信した制御指令)を、コントローラ300にエアーコンディショナ401を制御させるためにコントローラ300に対して送信する。
In step S <b> 16, the
CPU151は、同一でないと判断された場合(ステップS8においてNO)、ステップS10において、制御指令を受信してから予め定められた時間以上経過した後に制御指令Y_oldを受信したか否かを判断する。CPU151は、予め定められた時間以上経過した後に制御指令Y_oldを受信したと判断した場合(ステップS10においてYES)、処理をステップS16に進める。このように、CPU151は、制御指令Y_oldの送信元がコントローラ300に対して直近に送信した制御指令Xの送信元と異なる場合には、ある程度の時間が経過していることを条件に、未実行かつ最も古い制御指令Y_old(サーバ装置100が先に受信した制御指令)を、コントローラ300に対して送信する。
If it is determined that they are not the same (NO in step S8),
CPU151は、予め定められた時間以上経過する前に制御指令Y_oldを受信したと判断した場合(ステップS10においてNO)、ステップS12において、未実行の1つ以上の制御指令から制御指令Y_oldを削除する。具体的には、データテーブルD5から制御指令Y_oldを削除する。CPU151は、ステップS12の後、処理をステップS4に戻す。なお、この時点において、削除された制御指令Y_oldの次に古い未実行の制御指令が、この後の処理において制御指令Y_oldとして扱われる。
When
このように、通信システム1によれば、制御命令が競合した場合に制御命令を選択可能となる。また、通信システム1によれば、サーバ装置100に記憶したデータテーブルD5をロックする必要がなくなる。このため、通信システム1によれば、競合が発生した場合であっても、他の機器からデータテーブルD5を参照可能となる。
As described above, according to the
(c3.1つのスマートフォンからの複数の制御指令に対する処理)
次に、通信システム1においてさらに実行される処理について説明する。具体的には、1つのスマートフォンから複数の制御指令が送信されてきた場合の処理について説明する。つまり、同一のスマートフォンからの制御指令が競合した場合の処理について説明する。
(C3. Processing for multiple control commands from one smartphone)
Next, processing further executed in the
図8は、通信システム1でさらに実行される処理の流れを表したシーケンスチャートである。図8を参照して、シーケンスSQ202において、スマートフォン501は機器制御指令をサーバ装置100に送信する。ステップS252において、サーバ装置100のCPU151は指令チェックを行なう。シーケンスSQ204において、CPU151は、受信した機器制御指令をHDD154のデータテーブルD5に格納する。シーケンスSQ206において、CPU151は、ウェブソケット通信を用いて、ポーリング要求指令をコントローラ300に送信する。シーケンスSQ208において、CPU151は、機器制御指令を受信したことを表す応答信号をスマートフォン501に送信する。
FIG. 8 is a sequence chart showing the flow of processing further executed in the
シーケンスSQ210において、スマートフォン501は、機器制御指令をさらに送信する。ステップS254において、CPU151は、指令チェックを行なう。ステップS256において、サーバ装置100は、選択処理を行なう。選択処理の詳細については、後述する(図9)。シーケンスSQ212において、CPU151は、シーケンスSQ210に基づく機器制御指令に対応する応答信号をスマートフォン501に送信する。
In sequence SQ210,
シーケンスSQ214において、コントローラ300は、サーバ装置100に対してポーリングを行なう。ポーリングが行なわれたことに基づき、シーケンスSQ216において、CPU151は、HDD154のデータテーブルD5に格納したスマートフォン501からの機器制御指令を、HDD154から読み出す。
In sequence SQ214,
シーケンスSQ218において、CPU151は、読み出した機器制御指令を、ポーリングに対する要求信号としてコントローラ300に送信する。シーケンスSQ220において、コントローラ300は、サーバ装置100に対して、制御指令に基づく処理を実行した旨を表す応答信号を送信する。シーケンスSQ222において、サーバ装置100は、応答信号を受信したことに基づき、コントローラ300に対して、ポーリングの送信を含む一連の通信処理G2を終了することを表す終了通知を送信する。
In sequence SQ218,
図9は、図8のステップS256の詳細を説明するためのフローチャートである。図9を参照して、ステップS52において、CPU151は、最新の制御指令(以下、説明の便宜上「制御指令Q」と称する)を受信したときに、同一のスマートフォンから送られてきた未実行の制御指令(以下、「制御指令P」と称する)が既にデータテーブルD5に格納されているか否かを判断する。
FIG. 9 is a flowchart for explaining details of step S256 in FIG. Referring to FIG. 9, in step S <b> 52,
CPU151は、格納されていると判断された場合(ステップS52においてYES)、ステップS54において、制御指令Pを受信したときから予め定められた時間(たとえば、10分)経過した後に制御指令Qを受信したか否かを判断する。CPU151は、格納されていないと判断された場合(ステップS52においてNO)、ステップS60において、制御指令QをデータテーブルD5に格納する。
When
CPU151は、予め定められた時間経過した後に制御指令Qを受信したと判断した場合(ステップS54においてYES)、ステップS58において、制御指令Pをキャンセルする。すなわち、CPU151は、制御指令PをデータテーブルD5において削除し、あるいは無為なデータとして扱う。制御指令Pを削除する理由は、制御指令Pが古すぎる指令であり、制御指令Pに基づく制御を行なうことは適切でないためである。
If
CPU151は、予め定められた時間が経過するまでに制御指令を受信したと判断した場合(ステップS54においてNO)、ステップS56において、制御指令Qをキャンセルする。すなわち、CPU151は、制御指令QをデータテーブルD5において削除し、あるいは無為なデータとして扱う。このように、ステップS54で否定的な判断がなされた場合には、CPU151は、同一のスマートフォンから送られてきた制御指令のうち、先に受信した機器制御指令を選択する。
When
<D.機能的構成>
図10は、サーバ装置100の機能的構成を説明するための機能ブロック図である。図10を参照して、サーバ装置100は、受信部111と、記憶部112と、送信部113と、受付部114と、選択部115と、判断部116とを備える。なお、記憶部112は、データテーブルD5を記憶している。
<D. Functional configuration>
FIG. 10 is a functional block diagram for explaining the functional configuration of the
(1)上述したように、コントローラ300は、被制御装置であるエアーコンディショナ401を制御するための制御指令がサーバ装置100に存在するか否かを、指定されたタイミングでサーバ装置100に問い合わせる。つまり、コントローラ300は、指定されたタイミングでポーリングを行なう。
(1) As described above, the
サーバ装置100の受信部111は、各種の制御指令を、スマートフォン501、スマートフォン502、およびスマートフォン503から受信する。詳しくは、受信部111は、制御指令として、たとえば、被制御装置の最新の状態を取得することを指示する状態更新指令、被制御装置の動作状態を変更するための機器制御指令を受信する。記憶部112は、スマートフォン501〜503から受信した制御指令を記憶する。
The receiving
選択部115は、各制御指令を受信した後に受付部114がポーリングを受け付けた場合、予め定められた第1の規則に基づいて、スマートフォン501〜503の各々から受信した各指令のうちのいずれかの指令を選択する。詳しくは、上記第1の規則は、本実施の形態では、複数の未送信の制御指令のうち最も古い方の制御指令を選択することを規定している。つまり、選択部115は、図6のステップS156の選択処理を実行する。
When the
送信部113は、ポーリングに対して、上記選択された制御指令をコントローラ300に送信する。
The
したがって、通信システム1では、制御命令が競合した場合に制御命令を選択可能となる。また、通信システム1によれば、制御指令を記憶しているデータベース(データテーブルD5)をロックする必要がなくなる。このため、通信システム1によれば、競合が発生した場合であっても、他の機器から当該データベースを参照可能となる。
Therefore, in the
(2)判断部116は、制御指令がコントローラ300に送信されてからポーリングを再度受け付ける迄の期間(以下、「期間T1」と称する)に受信部111がスマートフォン501〜503の各々から制御指令をさらに受信した場合、当該期間T1に受信された各制御指令のうち上記第1の規則に基づいて選択された1つの制御指令の送信元と、コントローラ300に送信された制御指令の送信元とが同一か否かを判断する。
(2) The
送信部113は、送信元が同一であると判断された場合、期間T1に受信された各制御指令のうち上記選択された制御指令をコントローラ300にさらに送信する。
When it is determined that the transmission sources are the same, the
具体的には、サーバ装置100は、図7のステップS8において肯定的な判断がなされた場合(YESの場合)、ステップS16において制御指令Y_oldをコントローラ300に送信する。
Specifically, when a positive determination is made in step S8 of FIG. 7 (in the case of YES),
このように、サーバ装置100は、制御命令の送信元が同一のスマートフォンである場合、コントローラ300が制御指令を既に受け付けているのであれば、当該スマートフォンから送られてきた次の制御指令を連続して実行することができる。つまり、サーバ装置100は、スマートフォンの同一ユーザの連続操作を受け付けることが可能となる。
Thus, when the transmission source of the control command is the same smartphone, if the
(3)送信部113は、判断部116によって送信元が同一でないと判断された場合、コントローラ300に送信された制御指令を受信部111が受信したときから予め定められた時間以上経過した後に、上記期間T1に受信した各制御指令のうち上記選択された制御指令を受信部111が受信していることを条件に、当該期間T1に受信した各制御指令のうち上記選択された制御指令をコントローラ300にさらに送信する。
(3) When the
具体的には、サーバ装置100は、図7のステップS10において肯定的な判断がなされた場合(YESの場合)、ステップS16において制御指令Y_oldをコントローラ300に送信する。より詳しくは、選択された制御指令Y_oldを送信したスマートフォンと当該制御指令Y_oldの直前の制御指令Xを送信したスマートフォンとが異なる場合には、当該直前の制御指令Xを受信したときから予め定められた時間以上経過した後に、上記制御指令Y_oldを受信した場合にのみ、サーバ装置100は当該制御指令Y_oldをコントローラ300に送信する。
Specifically, when a positive determination is made in step S10 of FIG. 7 (in the case of YES),
したがって、通信システム1によれば、制御指令Xと制御指令Y_oldとの送信元が異なる場合には、一定時間が経過するまでは、送信元のユーザによるエアーコンディショナ401の遠隔操作を制限することができる。
Therefore, according to the
(4)受信部111は、たとえばスマートフォン501から制御指令を受信してからポーリングがある迄の期間に、スマートフォン501から制御指令をさらに受信する。
(4) For example, the receiving
この場合、選択部115は、予め定められた第2の規則に基づいてスマートフォン501から受信した各制御指令のうちのいずれかの指令を選択する。選択部115は、当該選択の後、上述した第1の規則に基づいて、当該選択された制御指令およびスマートフォン502(またはスマートフォン503)から受信した制御指令のうちのいずれかの制御指令を選択する。
In this case, the
詳しくは、上記第2の規則は、2つの未送信の制御指令を受信した各時刻の差分が閾値よりも大きい場合には、当該2つの未送信の制御指令のうち後に受信された指令を選択し、当該差分が当該閾値よりも大きくない場合には、当該2つの未送信の制御指令のうち先に受信した指令を選択することを規定している。つまり、選択部115は、図7のステップS256の選択処理を実行する。より詳しくは、選択部115は、図8のステップS54において否定的な判断がなされた場合(NOの場合)、ステップS56において最新の制御指令Qをキャンセルし、ステップS54において肯定的な判断がなされた場合(YESの場合)、ステップS58において制御指令Pをキャンセルする。
Specifically, the second rule selects the command received later from the two untransmitted control commands when the difference between the times when the two untransmitted control commands are received is greater than the threshold. However, when the difference is not larger than the threshold value, it is specified that the command received earlier is selected from the two untransmitted control commands. That is, the
送信部113は、上記ポーリングに対して、上記第1の規則に基づいて当該選択された制御指令およびスマートフォン502(またはスマートフォン503)から受信した制御指令のうちから選択された指令を、コントローラ300に送信する。
In response to the polling, the
このように、通信システム1においては、サーバ装置100が、同一のスマートフォンからの制御命令が競合した場合には、ポーリングが行なわれる前(つまり、図8に示すように、ポーリングの送信を含む一連の通信処理G2の前)に、制御命令の選択制御を行なうことができる。
[実施の形態2]
図11は、本実施の形態に係る通信システム1Aの概略構成を表した図である。図11を参照して、通信システム1Aは、サーバ装置100と、ホームサーバ200と、エアーコンディショナ401と、テレビ402と、照明装置403と、複数のスマートフォン501,502,503とを備える。通信システム1Aは、コントローラ300の代わりにホームサーバ200を備える点、並びに被制御装置としてテレビ402および照明装置403をさらに備える点において、実施の形態1の通信システム1とは異なる。
As described above, in the
[Embodiment 2]
FIG. 11 is a diagram showing a schematic configuration of the communication system 1A according to the present embodiment. Referring to FIG. 11, the communication system 1A includes a
ホームサーバ200、および各家庭用電気器具401〜403は、宅内に設置されている。
サーバ装置100は、一例として、XML(Extensible Markup Language)等のマークアップ言語を用いた通信仕様に基づき、ホームサーバ200と通信する。なお、サーバ装置100は、JSON(JavaScript(登録商標) Object Notation)等の非マークアップ言を用いた通信仕様に基づき、ホームサーバ200と通信してもよい。通信に用いるデータの形式は、特に限定されるものではない。
For example, the
より詳しくは、ホームサーバ200は、家庭用電気器具を制御するための指令が存在するか否かを、指定されたタイミングでサーバ装置100に対して問い合わせ、当該問い合わせに基づき上記指令を受信する。つまり、ホームサーバ200は、サーバ装置100に対してポーリングを行なう。ホームサーバ200が実行するポーリングは、実施の形態1のコントローラ300が実行するポーリングと同じであるため、ここではホームサーバ200によるポーリングに関する説明は繰り返さない。
More specifically, the
ホームサーバ200は、スマートハウス向けの制御プロトコルおよびセンサーネットプロトコルを有する通信プロトコルを用いて、各家庭用電気器具401〜403と通信する。ホームサーバ200は、たとえばECHONET Lite(登録商標)によって、各
家庭用電気器具401〜403と通信する。ただし、ホームサーバ200と家庭用電気器具401〜403との通信は、ECHONET Liteのように汎用の通信プロトコル
によるものではなく、独自の通信プロトコルにより実現してもよい。
スマートフォン501,502,503は、ユーザ操作に基づき、各家庭用電気器具401〜403を制御するための制御指令の入力を受け付ける。スマートフォン501,502,503は、受付けた制御指令をサーバ装置100に送信する。
ホームサーバ200は、受信した制御指令に基づき、当該制御指令に示された1つの家庭用電気器具(たとえば、エアーコンディショナ401)を制御する。より詳しくは、ホームサーバ200は、マークアップ言語を用いた制御指令を解釈し、ECHONET LITEの通信に必要なデータを抽出する。ホームサーバ200は、当該抽出したデータを制御対象である家庭用電気器具に送信することより、家庭用電気器具を制御する。
Based on the received control command,
ホームサーバ200とエアーコンディショナ401との関係は、実施の形態1におけるコントローラ300とエアーコンディショナ401との関係と同じである。ホームサーバ200は、エアーコンディショナ401との関係においてはコントローラ300と同様の処理を実行する。具体的には、ホームサーバ200は、図6、図8,および図10に基づいて説明したコントローラ300と同じ処理を実行する。このため、本実施の形態においても、実施の形態1で述べた効果(利点)を得ることができる。
[実施の形態3]
実施の形態1では、サーバ装置100は、図6のステップS156において、先に受信した機器制御指令を選択した。しかしながら、これに限定されるものではない。たとえば、ステップS156において、後に受信した機器制御指令を選択するように、サーバ装置100を構成してもよい。当該構成であっても、本実施の形態に係る通信システムおよびサーバ装置は、実施の形態1と同様の効果を奏する。
[実施の形態4]
実施の形態1では、サーバ装置100は、図6のステップS156において、先に受信した機器制御指令を選択した。しかしながら、これに限定されるものではない。たとえば、通信システム1がデマンドレスポンスを実行する構成である場合にステップS156において、デマンドレスポンスに応じて作成された機器制御指令を選択するように、サーバ装置100を構成してもよい。当該構成であっても、本実施の形態に係る通信システムおよびサーバ装置は、実施の形態1と同様の効果を奏する。
[実施の形態5]
実施の形態1では、サーバ装置100は、図6のステップS156において、先に受信した機器制御指令を選択した。しかしながら、これに限定されるものではない。たとえば、サーバ装置100の構成を以下のようにしてもよい。
The relationship between
[Embodiment 3]
In the first embodiment,
[Embodiment 4]
In the first embodiment,
[Embodiment 5]
In the first embodiment,
すなわち、サーバ装置100は、スマートフォン501〜503についての優先順位を表した順位情報を予め記憶しておく。たとえば、順位情報には、スマートフォン501が1位、スマートフォン502が2位、スマートフォン503が3位であることが示されている。サーバ装置100は、制御指令が競合した場合、競合した制御指令のうちから、優先順位が最も高い送信元の制御指令を選択する。当該構成であっても、本実施の形態に係る通信システムおよびサーバ装置は、実施の形態1と同様の効果を奏する。
That is, the
<まとめ>
(1)通信システム1,1Aは、サーバ装置100と、被制御装置(エアーコンディショナ401等)を制御する制御装置(コントローラ300またはホームサーバ200)とを備える。制御装置は、被制御装置を制御するための制御指令がサーバ装置100に存在するか否かを、指定されたタイミングでサーバ装置100に問い合わせる。サーバ装置100は、各種の制御指令を、第1の電子機器および第2の電子機器(たとえばスマートフォン501,502)から受信する受信部111と、各制御指令を受信した後に問い合わせがあった場合、予め定められた第1の規則に基づいて、第1の電子機器および第2の電子機器の各々から受信した各指令のうちのいずれかの指令を選択する選択部115と、問い合わせに対して、上記選択された制御指令を制御装置に送信する送信部113とを含む。
<Summary>
(1) The
したがって、通信システム1では、制御命令が競合した場合に制御命令を選択可能となる。また、通信システム1によれば、制御指令を記憶しているデータベース(データテーブルD5)をロックする必要がなくなる。このため、通信システム1によれば、競合が発生した場合であっても、他の機器から当該データベースを参照可能となる。
Therefore, in the
(2)好ましくは、通信システム1,1Aは、制御指令が制御装置に送信されてから問い合わせを再度受け付ける迄の期間に受信部111が第1の電子機器および第2の電子機器の各々から制御指令をさらに受信した場合、当該期間に受信された各制御指令のうち上記第1の規則に基づいて選択された1つの制御指令の送信元と、制御装置に送信された制御指令の送信元とが同一か否かを判断する判断部116をさらに備える。送信部113は、送信元が同一であると判断された場合、上記期間に受信された各制御指令のうち上記選択された制御指令を制御装置にさらに送信する。
(2) Preferably, in the
このように、サーバ装置100は、制御命令の送信元が同一の電子機器である場合、制御装置が制御指令を既に受け付けているのであれば、当該電子機器から送られてきた次の制御指令を連続して実行することができる。つまり、サーバ装置100は、電子機器の同一ユーザの連続操作を受け付けることが可能となる。
As described above, when the transmission source of the control command is the same electronic device, the
(3)好ましくは、送信部113は、判断部116によって送信元が同一でないと判断された場合、制御装置に送信された制御指令を受信部111が受信したときから予め定められた時間以上経過した後に、上記期間に受信した各制御指令のうち上記選択された制御指令を受信部111が受信していることを条件に、当該期間に受信した各制御指令のうち上記選択された制御指令を制御装置にさらに送信する。
(3) Preferably, when the
したがって、通信システム1によれば、2つの制御指令(具体的には、制御指令Xと制御指令Y_old)の送信元が異なる場合には、一定時間が経過するまでは、送信元のユーザによる被制御装置の遠隔操作を制限することができる。
Therefore, according to the
(4)好ましくは、第1の規則は、複数の未送信の制御指令のうち最も古い方の制御指令を選択することを規定、あるいは複数の未送信の制御指令のうちの最も新しい方の制御指令を選択することを規定している。 (4) Preferably, the first rule defines that the oldest control command is selected from among a plurality of untransmitted control commands, or the newest control command among a plurality of untransmitted control commands. It stipulates that a directive is selected.
(5)好ましくは、受信部111は、電子機器(たとえば、スマートフォン501)から制御指令を受信してから問い合わせがある迄の期間に、当該電子機器から制御指令をさらに受信する。この場合、選択部115は、予め定められた第2の規則に基づいて当該電子機器から受信した各制御指令のうちのいずれかの指令を選択する。選択部115は、当該選択の後、上述した第1の規則に基づいて、当該選択された制御指令および他の電子機器(たとえばスマートフォン502またはスマートフォン503)から受信した制御指令のうちのいずれかの制御指令を選択する。送信部113は、上記問い合わせに対して、上記第1の規則に基づいて当該選択された制御指令および上記他の電子機器から受信した制御指令のうちから選択された指令を、制御装置に送信する。
(5) Preferably, the receiving
このように、通信システム1においては、サーバ装置100が、同一のスマートフォンからの制御命令が競合した場合には、問い合わせが行なわれる前に、制御命令の選択制御を行なうことができる。
Thus, in the
(6)好ましくは、第1の規則は、複数の未送信の制御指令のうち最も古い方の制御指令を選択することを規定、あるいは複数の未送信の制御指令のうちの最も新しい方の制御指令を選択することを規定している。第2の規則は、2つの未送信の制御指令を受信した各時刻の差分が閾値よりも大きい場合には、当該2つの未送信の制御指令のうち後に受信された制御指令を選択し、当該差分が当該閾値よりも大きくない場合には、当該2つの未送信の制御指令のうち先に受信した制御指令を選択することを規定している。 (6) Preferably, the first rule specifies that the oldest control command is selected from among a plurality of untransmitted control commands, or the newest control among a plurality of untransmitted control commands. It stipulates that a directive is selected. When the difference between the times when two untransmitted control commands are received is larger than the threshold, the second rule selects a control command received later from the two untransmitted control commands, and When the difference is not larger than the threshold value, it is specified that the control command received earlier is selected from the two untransmitted control commands.
(7)サーバ装置100は、第1の電子機器(たとえばスマートフォン501)および第2の電子機器(たとえばスマートフォン502)と、被制御装置を制御する制御装置(コントローラ300またはホームサーバ200)と通信する。
(7) The
被制御装置を制御するための制御指令が前記サーバ装置に存在するか否かが、指定されたタイミングで制御装置からサーバ装置100に問い合わされる。サーバ装置100は、第1の電子機器および第2の電子機器の各々から制御指令を受信する受信部111と、各制御指令を受信した後に問い合わせがあった場合、予め定められた規則に基づいて、第1の電子機器および第2の電子機器の各々から受信した各制御指令のうちのいずれかの指令を選択する選択部115と、問い合わせに対して、選択された指令を制御装置に送信する送信部113とを備える。
Whether the server apparatus has a control command for controlling the controlled apparatus is inquired from the control apparatus to the
したがって、サーバ装置100は、制御命令が競合した場合に制御命令を選択可能となる。また、サーバ装置100によれば、制御指令を記憶しているデータベース(データテーブルD5)をロックする必要がなくなる。このため、サーバ装置100によれば、競合が発生した場合であっても、他の機器から当該データベースを参照可能となる。
Therefore, the
今回開示された実施の形態は例示であって、上記内容のみに制限されるものではない。本発明の範囲は特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 The embodiment disclosed this time is an exemplification, and the present invention is not limited to the above contents. The scope of the present invention is defined by the terms of the claims, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.
1,1A 通信システム、100,900 サーバ装置、111 受信部、112 記憶部、113 送信部、114 受付部、115 選択部、116 判断部、151,351,951 CPU、152,352 ROM、153,353 RAM、154,954 HDD、200 ホームサーバ、300 コントローラ、401 エアーコンディショナ、402 テレビ、403 照明装置、501,502,503 スマートフォン。 1,1A communication system, 100,900 server device, 111 receiving unit, 112 storage unit, 113 transmitting unit, 114 receiving unit, 115 selecting unit, 116 determining unit, 151,351,951 CPU, 152,352 ROM, 153 353 RAM, 154, 954 HDD, 200 home server, 300 controller, 401 air conditioner, 402 TV, 403 lighting device, 501, 502, 503 smartphone.
Claims (10)
前記制御装置は、前記被制御装置を制御するための指令が前記サーバ装置に存在するか否かを、指定されたタイミングで前記サーバ装置に問い合わせ、
前記サーバ装置は、
第1の電子機器および第2の電子機器の各々から前記指令を受信する受信手段と、
各前記指令を受信した後に前記問い合わせがあった場合、予め定められた第1の規則に基づいて、前記第1の電子機器および前記第2の電子機器の各々から受信した各指令のうちのいずれかの指令を選択する選択手段と、
前記問い合わせに対して、前記選択された指令を前記制御装置に送信する送信手段とを含む、通信システム。 A communication system comprising a server device and a control device for controlling a controlled device,
The control device inquires to the server device at a specified timing whether or not a command for controlling the controlled device exists in the server device,
The server device
Receiving means for receiving the command from each of the first electronic device and the second electronic device;
If there is an inquiry after receiving each of the commands, any one of the commands received from each of the first electronic device and the second electronic device based on a predetermined first rule. A selection means for selecting the command,
A communication system comprising: transmission means for transmitting the selected command to the control device in response to the inquiry.
前記送信手段は、前記送信元が同一であると判断された場合、前記期間に受信された各前記指令のうち前記選択された指令を前記制御装置にさらに送信する、請求項1に記載の通信システム。 In the server device, the receiving unit further receives the command from each of the first electronic device and the second electronic device in a period from when the command is transmitted to the control device until the inquiry is received again. In this case, whether the source of one command selected based on the first rule among the commands received during the period is the same as the source of the command transmitted to the control device A judgment means for judging
2. The communication according to claim 1, wherein, when it is determined that the transmission source is the same, the transmission unit further transmits the selected command among the commands received in the period to the control device. system.
前記選択手段は、予め定められた第2の規則に基づいて前記第1の電子機器から受信した各前記指令のうちのいずれかの指令を選択し、当該選択の後、前記第1の規則に基づいて当該選択された指令および前記第2の電子機器から受信した指令のうちのいずれかの指令を選択し、
前記送信手段は、前記問い合わせに対して、前記第1の規則に基づいて当該選択された指令および前記第2の電子機器から受信した指令のうちから選択された指令を、前記制御装置に送信する、請求項1に記載の通信システム。 The receiving means further receives the command from the first electronic device in a period from when the command is received from the first electronic device until the inquiry is received,
The selection means selects one of the commands received from the first electronic device based on a predetermined second rule, and after the selection, selects the first rule. Selecting any one of the selected instruction and the instruction received from the second electronic device based on
In response to the inquiry, the transmitting means transmits a command selected from the command selected based on the first rule and a command received from the second electronic device to the control device. The communication system according to claim 1.
前記第2の規則は、2つの未送信の前記指令を受信した各時刻の差分が閾値よりも大きい場合には、当該2つの未送信の指令のうち後に受信された指令を選択し、前記差分が前記閾値よりも大きくない場合には、当該2つの未送信の指令のうち先に受信した指令を選択することを規定している、請求項5に記載の通信システム。 The first rule stipulates that the oldest command among a plurality of untransmitted commands is selected, or selects the newest command among a plurality of untransmitted commands. And
When the difference between each time when the two untransmitted commands are received is larger than a threshold, the second rule selects a command received later from the two untransmitted commands, and the difference 6. The communication system according to claim 5, wherein when the value is not larger than the threshold value, the command received earlier is selected from the two untransmitted commands.
前記被制御装置を制御するための指令が前記サーバ装置に存在するか否かが、指定されたタイミングで前記制御装置から前記サーバ装置に問い合わされ、
前記サーバ装置は、
第1の電子機器および第2の電子機器の各々から前記指令を受信する受信手段と、
各前記指令を受信した後に前記問い合わせがあった場合、予め定められた規則に基づいて、前記第1の電子機器および前記第2の電子機器の各々から受信した各指令のうちのいずれかの指令を選択する選択手段と、
前記問い合わせに対して、前記選択された指令を前記制御装置に送信する送信手段とを備える、サーバ装置。 A server device that communicates with a first electronic device, a second electronic device, and a control device that controls the controlled device,
Whether the server device has a command for controlling the controlled device is inquired from the control device to the server device at a designated timing,
The server device
Receiving means for receiving the command from each of the first electronic device and the second electronic device;
If there is an inquiry after receiving each of the instructions, any one of the instructions received from each of the first electronic device and the second electronic device based on a predetermined rule A selection means for selecting
In response to the inquiry, a server device comprising: a transmission unit that transmits the selected command to the control device.
前記制御装置が、前記被制御装置を制御するための指令が前記サーバ装置に存在するか否かを、指定されたタイミングで前記サーバ装置に問い合わせるステップと、
前記サーバ装置が、第1の電子機器および第2の電子機器の各々から前記指令を受信するステップと、
前記サーバ装置が、各前記指令を受信した後に前記問い合わせがあった場合、予め定められた規則に基づいて、前記第1の電子機器および前記第2の電子機器の各々から受信した各指令のうちのいずれかの指令を選択するステップと、
前記サーバ装置が、前記問い合わせに対して、前記選択された指令を前記制御装置に送信するステップとを備える、制御方法。 A control method in a communication system comprising a server device and a control device for controlling a controlled device,
The control device inquires to the server device at a specified timing whether or not a command for controlling the controlled device exists in the server device; and
The server device receiving the command from each of the first electronic device and the second electronic device;
When the server device receives the inquiry after receiving each command, the command received from each of the first electronic device and the second electronic device based on a predetermined rule. Selecting one of the commands,
The server device includes a step of transmitting the selected command to the control device in response to the inquiry.
前記被制御装置を制御するための指令が前記サーバ装置に存在するか否かが、指定されたタイミングで前記制御装置から前記サーバ装置に問い合わされ、
前記制御方法は、
第1の電子機器および第2の電子機器の各々から前記指令を受信するステップと、
各前記指令を受信した後に前記問い合わせがあった場合、予め定められた規則に基づいて、前記第1の電子機器および前記第2の電子機器の各々から受信した各指令のうちのいずれかの指令を選択するステップと、
前記問い合わせに対して、前記選択された指令を前記制御装置に送信するステップとを備える、制御方法。 A control method in a server device that communicates with a first electronic device, a second electronic device, and a control device that controls a controlled device,
Whether the server device has a command for controlling the controlled device is inquired from the control device to the server device at a designated timing,
The control method is:
Receiving the command from each of the first electronic device and the second electronic device;
If there is an inquiry after receiving each of the instructions, any one of the instructions received from each of the first electronic device and the second electronic device based on a predetermined rule A step of selecting
And a step of transmitting the selected command to the control device in response to the inquiry.
前記被制御装置を制御するための指令が前記サーバ装置に存在するか否かが、指定されたタイミングで前記制御装置から前記サーバ装置に問い合わされ、
前記プログラムは、
第1の電子機器および第2の電子機器の各々から前記指令を受信するステップと、
各前記指令を受信した後に前記問い合わせがあった場合、予め定められた規則に基づいて、前記第1の電子機器および前記第2の電子機器の各々から受信した各指令のうちのいずれかの指令を選択するステップと、
前記問い合わせに対して、前記選択された指令を前記制御装置に送信するステップとを、前記サーバ装置のプロセッサに実行させる、プログラム。 A program for controlling a server device that communicates with a first electronic device, a second electronic device, and a control device that controls a controlled device,
Whether the server device has a command for controlling the controlled device is inquired from the control device to the server device at a designated timing,
The program is
Receiving the command from each of the first electronic device and the second electronic device;
If there is an inquiry after receiving each of the instructions, any one of the instructions received from each of the first electronic device and the second electronic device based on a predetermined rule A step of selecting
A program for causing the processor of the server device to execute a step of transmitting the selected command to the control device in response to the inquiry.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013164051A JP5714067B2 (en) | 2013-08-07 | 2013-08-07 | COMMUNICATION SYSTEM, SERVER DEVICE, CONTROL METHOD, AND PROGRAM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013164051A JP5714067B2 (en) | 2013-08-07 | 2013-08-07 | COMMUNICATION SYSTEM, SERVER DEVICE, CONTROL METHOD, AND PROGRAM |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015033122A true JP2015033122A (en) | 2015-02-16 |
JP5714067B2 JP5714067B2 (en) | 2015-05-07 |
Family
ID=52518068
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013164051A Expired - Fee Related JP5714067B2 (en) | 2013-08-07 | 2013-08-07 | COMMUNICATION SYSTEM, SERVER DEVICE, CONTROL METHOD, AND PROGRAM |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5714067B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019062329A (en) * | 2017-09-26 | 2019-04-18 | シャープ株式会社 | Communication device, space conditioner and network system |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110805991A (en) * | 2019-10-30 | 2020-02-18 | 青岛海信智慧家居系统股份有限公司 | Method and device for synchronizing states of control terminal and central air conditioner |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006054832A (en) * | 2004-08-16 | 2006-02-23 | Matsushita Electric Works Ltd | Remote-supervisory control system and center server therefor, equipment-monitor controller therefor and communication method therefor remote-supervisory control system |
JP2009224852A (en) * | 2008-03-13 | 2009-10-01 | Toshiba Corp | Facility equipment cooperation system, equipment control method, and agent apparatus |
JP2012253756A (en) * | 2011-05-09 | 2012-12-20 | Glamo Inc | Remote control terminal, server, method and computer program |
-
2013
- 2013-08-07 JP JP2013164051A patent/JP5714067B2/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006054832A (en) * | 2004-08-16 | 2006-02-23 | Matsushita Electric Works Ltd | Remote-supervisory control system and center server therefor, equipment-monitor controller therefor and communication method therefor remote-supervisory control system |
JP2009224852A (en) * | 2008-03-13 | 2009-10-01 | Toshiba Corp | Facility equipment cooperation system, equipment control method, and agent apparatus |
JP2012253756A (en) * | 2011-05-09 | 2012-12-20 | Glamo Inc | Remote control terminal, server, method and computer program |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019062329A (en) * | 2017-09-26 | 2019-04-18 | シャープ株式会社 | Communication device, space conditioner and network system |
Also Published As
Publication number | Publication date |
---|---|
JP5714067B2 (en) | 2015-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100559023B1 (en) | Home network system and its configuration system | |
US20160241445A1 (en) | Identifying and resolving network device rule conflicts and recursive operations at a network device | |
US20160164748A1 (en) | Identifying and resolving network device rule conflicts and recursive operations at a network device | |
US20130060360A1 (en) | Control server and control method | |
EP2840741B1 (en) | Method and apparatus for using service of home network device based on remote access | |
JP2008040858A (en) | Information processing equipment and information processing system | |
JP2015163920A (en) | Voice system | |
US9560167B2 (en) | Network system, communication method, server, and terminal | |
JP6231594B2 (en) | Control device, equipment operation system, control method and program | |
JP5714067B2 (en) | COMMUNICATION SYSTEM, SERVER DEVICE, CONTROL METHOD, AND PROGRAM | |
JP5787945B2 (en) | Control device, control system, control method, and program | |
CN106105253B (en) | Controller, control system, and control method of control system | |
JP5650816B1 (en) | COMMUNICATION SYSTEM, COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM | |
JP5689156B2 (en) | COMMUNICATION SYSTEM, SERVER DEVICE, CONTROL METHOD, AND PROGRAM | |
JP4971888B2 (en) | Remote control system | |
JP5208146B2 (en) | Arbitration server, arbitration method, and arbitration program | |
JP6320569B2 (en) | Home control device and home control system | |
US20170094035A1 (en) | Management method and management device | |
JP6785915B2 (en) | Control devices, equipment operation systems, control methods and programs | |
JP2009171379A (en) | Remote control device, remote control system, and remote control method | |
JP5528603B1 (en) | Communication adapter, control system, communication adapter control method, and program | |
JP6366416B2 (en) | Communication system and control method | |
JP5965362B2 (en) | Access control system, control server, controller, access control method, control program, and access control program | |
JP2014216764A (en) | Gateway device and program | |
KR102001886B1 (en) | Repeating apparatus for remote control, and control method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20141202 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150121 |
|
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: 20150217 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150310 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5714067 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |