JP2017076866A - Communication device, control method thereof, and program - Google Patents

Communication device, control method thereof, and program Download PDF

Info

Publication number
JP2017076866A
JP2017076866A JP2015202914A JP2015202914A JP2017076866A JP 2017076866 A JP2017076866 A JP 2017076866A JP 2015202914 A JP2015202914 A JP 2015202914A JP 2015202914 A JP2015202914 A JP 2015202914A JP 2017076866 A JP2017076866 A JP 2017076866A
Authority
JP
Japan
Prior art keywords
transmission interval
communication
signal
keepalive
protocols
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.)
Pending
Application number
JP2015202914A
Other languages
Japanese (ja)
Inventor
和矢 谷口
Kazuya Taniguchi
和矢 谷口
健介 安間
Kensuke Yasuma
健介 安間
智哉 酒井
Tomoya Sakai
智哉 酒井
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2015202914A priority Critical patent/JP2017076866A/en
Publication of JP2017076866A publication Critical patent/JP2017076866A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To reduce the consumption power of a communication device.SOLUTION: A communication device can communicate with another communication device by using a plurality of protocols. The communication device obtains a transmission interval of a signal to maintain connection with the other communication device for each of the protocols, determines a new transmission interval of the signal for each of the protocols so as to lengthen a period when the signal is not transmitted in a range where the connection is maintained on the basis of the obtained transmission interval, and sets the determined new transmission intervals to the respective protocols.SELECTED DRAWING: Figure 7

Description

本発明は、通信装置、その制御方法、及びプログラムに関する。   The present invention relates to a communication device, a control method thereof, and a program.

近年、ウェブの発展により、HTTP/1.1の高速化が求められている。IETF(Internet Engineering Task Force)では、HTTP/1.1の次期の規格であるHTTP/2が策定された。また、HTTPは、パーソナルコンピュータやブラウザ以外の組込み機器においても広く利用されている。そのような組込み機器のうち、内蔵型電池を持つ組込み機器では、一般的に通信利用時には稼働時間が短くなる傾向にあった。   In recent years, with the development of the web, speeding up of HTTP / 1.1 has been demanded. In the IETF (Internet Engineering Task Force), HTTP / 2, which is the next standard of HTTP / 1.1, was formulated. HTTP is also widely used in embedded devices other than personal computers and browsers. Among such embedded devices, embedded devices having a built-in battery generally tend to have a shorter operating time when using communication.

通信機器は、対向機器とコネクションを確立したのち、そのコネクションを維持するため、及び、対向機器との通信経路を維持するため、定期的にKeepAliveメッセージを送受信している。通信機器と対向機器との間の通信経路を制御しているルータは、アプリケーション層とトランスポート層それぞれにおいて、データの送受信があるかを判断し、一定期間データの送受信が無かった場合に、コネクションを切断することが一般的に知られている。なお、通信機器は、KeepAlive処理は、トランスポート層だけでなく、アプリケーション層でも行われる。また、各層のKeepAlive送信間隔や送信タイミングは、層毎で決定される。   After establishing a connection with the opposite device, the communication device periodically transmits and receives a KeepAlive message in order to maintain the connection and to maintain a communication path with the opposite device. The router that controls the communication path between the communication device and the opposite device determines whether there is data transmission / reception in each of the application layer and the transport layer. It is generally known to cut. For communication devices, KeepAlive processing is performed not only in the transport layer but also in the application layer. In addition, the KeepAlive transmission interval and transmission timing of each layer are determined for each layer.

一方、デバイスの処理負荷軽減の為に、複数のCPU(Central Processing Unit)で処理することが可能なデバイスの開発が行われている。このようなデバイスでは、例えば、通信機能処理を行うCPUとアプリケーション処理を行うCPUといったように、保持するCPUごとに処理が割り当てられている。また、このようなデバイスでは、アプリケーション処理を行うCPUが通信機能処理を行うCPUに依存しているため、アプリケーション処理が動いている場合に、通信処理を行うCPUも動いていなければならない。   On the other hand, devices that can be processed by a plurality of CPUs (Central Processing Units) have been developed to reduce the processing load on the devices. In such a device, a process is assigned to each CPU to be held, such as a CPU that performs communication function processing and a CPU that performs application processing. In such a device, since the CPU that performs the application processing depends on the CPU that performs the communication function processing, the CPU that performs the communication processing must also operate when the application processing is operating.

特開2014-175711号公報JP 2014-175711 A

アプリケーション層とトランスポート層におけるKeepAliveの送信間隔は、各層毎で決定されるため、それぞれ異なる場合がある。この場合、複数のCPUで処理するデバイスは、アプリケーション処理を行うCPUが通信機能処理を行うCPUに依存しているため、トランスポート層のKeepAliveを送信していないタイミングでも、アプリケーション層のKeepAliveを送信するために、トランスポート層における処理を行わなければならない。そのため、消費電力が大きくなってしまうという課題があった。また、1つのCPUでアプリケーション処理と通信機能処理を行う場合においても、各処理におけるKeepAliveの送信タイミングのズレによって通信装置の消費電力が大きくなってしまう恐れがあった。   Since the keep-alive transmission interval in the application layer and the transport layer is determined for each layer, it may be different. In this case, since the device that processes multiple CPUs depends on the CPU that performs application function processing, the CPU that performs application processing transmits the KeepAlive of the application layer even when it does not transmit the KeepAlive of the transport layer. In order to do so, processing in the transport layer must be performed. Therefore, there has been a problem that power consumption becomes large. In addition, even when application processing and communication function processing are performed by one CPU, there is a risk that the power consumption of the communication device may increase due to a shift in transmission timing of KeepAlive in each processing.

特許文献1では、通信機器内の複数のアプリケーションにおけるKeepAliveの送信タイミングを制御する技術が開示されている。しかしながら、特許文献1には、アプリケーション層とトランスポート層といった、異なる通信階層におけるKeepAliveの送信タイミングを制御することは行われていない。その結果、通信装置が通信不要な期間が短くなり、消費電力の低減が図れなかった。   Patent Document 1 discloses a technique for controlling KeepAlive transmission timing in a plurality of applications in a communication device. However, Patent Document 1 does not control KeepAlive transmission timing in different communication layers such as an application layer and a transport layer. As a result, the period during which the communication device does not require communication is shortened, and power consumption cannot be reduced.

本発明は。上記課題に鑑みてなされたものであり、通信装置の消費電力を低減することを目的とする。   The present invention. The present invention has been made in view of the above problems, and aims to reduce power consumption of a communication device.

上記目的を達成するための一手段として、本発明の通信装置は以下の構成を有する。すなわち、複数のプロトコルを用いることで他の通信装置と通信可能な通信装置であって、前記複数のプロトコルそれぞれについて、前記他の通信装置とのコネクションを維持するための信号の送信間隔を取得する取得手段と、前記取得された送信間隔に基づいて、前記コネクションが維持される範囲で前記信号が送信されない期間が長くなるように、前記複数のプロトコルそれぞれについて、前記信号の新たな送信間隔を決定する決定手段と、前記決定された新たな送信間隔を前記複数のプロトコルそれぞれに対して設定する設定手段と、を有することを特徴とする。   As a means for achieving the above object, the communication apparatus of the present invention has the following configuration. That is, a communication device that can communicate with another communication device by using a plurality of protocols, and for each of the plurality of protocols, obtain a signal transmission interval for maintaining a connection with the other communication device Based on the acquisition means and the acquired transmission interval, a new transmission interval of the signal is determined for each of the plurality of protocols so that a period during which the signal is not transmitted is long as long as the connection is maintained. And determining means for setting the determined new transmission interval for each of the plurality of protocols.

通信装置の消費電力を低減できる。   The power consumption of the communication device can be reduced.

実施形態1における通信装置101のシステム構成を示す図。1 is a diagram illustrating a system configuration of a communication apparatus 101 according to a first embodiment. 実施形態1における通信装置101のハードウェア構成を示す図。FIG. 2 is a diagram illustrating a hardware configuration of a communication apparatus 101 according to the first embodiment. アプリケーション制御部205に含まれるモジュールの構成を示す図。The figure which shows the structure of the module contained in the application control part 205. FIG. プロトコル制御部206に含まれるモジュールの構成を示す図。The figure which shows the structure of the module contained in the protocol control part 206. 無線制御部207に含まれるモジュールの構成を示す図。The figure which shows the structure of the module contained in the wireless control part 207. 実施形態1における通信装置101の処理のフローチャートの一例を示す図。FIG. 3 is a diagram illustrating an example of a flowchart of processing of the communication apparatus 101 according to the first embodiment. 実施形態1におけるシーケンスの一例を示す図。FIG. 4 is a diagram illustrating an example of a sequence according to the first embodiment. 実施形態1における通信装置101に保持される情報の一例を示す図。FIG. 5 is a diagram illustrating an example of information held in the communication apparatus 101 according to the first embodiment. 実施形態2における通信装置101の処理のフローチャートの一例を示す図。FIG. 10 is a diagram illustrating an example of a flowchart of processing of the communication apparatus 101 according to the second embodiment. 実施形態2におけるシーケンスの一例を示す図。FIG. 10 is a diagram illustrating an example of a sequence according to the second embodiment. 実施形態2における表示画面例を示す図。FIG. 9 is a diagram illustrating an example of a display screen in the second embodiment.

以下、添付の図面を参照して、本発明をその実施形態に基づいて詳細に説明する。なお、以下の実施形態において示す構成は一例に過ぎず、本発明は図示された構成に限定されるものではない。   Hereinafter, the present invention will be described in detail based on the embodiments with reference to the accompanying drawings. The configurations shown in the following embodiments are merely examples, and the present invention is not limited to the illustrated configurations.

[実施形態1]
本発明の例示的な実施形態である実施形態1を、図面を参照して説明する。図1は、実施形態1におけるシステム構成を示す図である。通信装置101は、ネットワーク100に接続し、サーバ102と通信可能である。サーバ102は、ネットワーク100に接続し、通信装置101と通信可能である。ネットワーク100は、通信装置101とサーバ102が接続するネットワークである。本実施形態におけるネットワーク100は、インターネット、WAN(Wide Area Network)、LAN(Local Area Network)、等の複合であっても実現できる。なお、通信装置101とサーバ102は、ネットワーク100を介さずに、直接に接続することも可能である。例えば、通信装置101とサーバ102は、無線アドホックネットワークを用いることにより、直接接続が実現可能である。通信装置101は、サーバ102との間でコネクションが確立された後、該コネクションを維持するための信号であるKeepAliveを、一定間隔で送信する。
[Embodiment 1]
Embodiment 1, which is an exemplary embodiment of the present invention, will be described with reference to the drawings. FIG. 1 is a diagram illustrating a system configuration according to the first embodiment. The communication device 101 is connected to the network 100 and can communicate with the server 102. The server 102 is connected to the network 100 and can communicate with the communication device 101. The network 100 is a network in which the communication device 101 and the server 102 are connected. The network 100 in the present embodiment can be realized by a combination of the Internet, a WAN (Wide Area Network), a LAN (Local Area Network), and the like. Note that the communication apparatus 101 and the server 102 can be directly connected without using the network 100. For example, the communication device 101 and the server 102 can be directly connected by using a wireless ad hoc network. After the connection is established with the server 102, the communication apparatus 101 transmits KeepAlive, which is a signal for maintaining the connection, at regular intervals.

図2は、通信装置101のハードウェア構成を示す図である。バス200は、電源供給部201から、アプリケーション制御部205、プロトコル制御部206、及び無線制御部207へ電源を供給するバスである。電源供給部201は、各モジュールに電源を供給する。電源供給部201は、特定のモジュールのみに電源を供給することが可能である。例えば、電源供給部201は、無線制御部207のみに電源を供給し、アプリケーション制御部205、プロトコル制御部206には電源を供給しないことが可能である。バス202は、アプリケーション制御部205とプロトコル制御部206を接続する。バス203は、プロトコル制御部206と無線制御部207を接続する。バス204は、アプリケーション制御部205とプロトコル制御部206から電源供給部201への電源供給を制御する。アプリケーション制御部205は、アプリケーションに対応した処理を行う。プロトコル制御部206は、通信プロトコルに対応した処理を行う。無線制御部207は、無線通信の処理を行う。アンテナ208は、無線通信を行うアンテナでありサーバ102と無線通信を行う。なお、本実施形態では、通信装置101は無線通信を行うものとして説明するが、有線通信を行うことも可能である。   FIG. 2 is a diagram illustrating a hardware configuration of the communication apparatus 101. The bus 200 is a bus that supplies power from the power supply unit 201 to the application control unit 205, the protocol control unit 206, and the wireless control unit 207. The power supply unit 201 supplies power to each module. The power supply unit 201 can supply power only to a specific module. For example, the power supply unit 201 can supply power only to the wireless control unit 207 and not supply power to the application control unit 205 and the protocol control unit 206. The bus 202 connects the application control unit 205 and the protocol control unit 206. A bus 203 connects the protocol control unit 206 and the wireless control unit 207. The bus 204 controls power supply from the application control unit 205 and the protocol control unit 206 to the power supply unit 201. The application control unit 205 performs processing corresponding to the application. The protocol control unit 206 performs processing corresponding to the communication protocol. The wireless control unit 207 performs wireless communication processing. The antenna 208 is an antenna that performs wireless communication, and performs wireless communication with the server 102. In the present embodiment, the communication apparatus 101 is described as performing wireless communication, but it is also possible to perform wired communication.

本実施形態では、アプリケーション制御部205、プロトコル制御部206、無線制御部207それぞれがCPUを持つような3CPU構成となっている。3CPU構成にすることで、アプリケーション制御部205、プロトコル制御部206、無線制御部207における処理が分離され、処理速度の向上や、アプリケーション制御部205、プロトコル制御部206の処理負荷が軽減可能となる。なお、本実施形態では3CPU構成としているが、例えばアプリケーション制御部205とプロトコル制御部206の処理を1つのCPUが行っても良いし、PCの複数コアの構成にアプリケーション制御部205とプロトコル制御部206を割り当てる構成であってもよい。また、無線制御部207は、無線チップのような半導体チップであってもよい。前者の2CPU構成によれば、処理負荷の大きい無線制御部207を分離できることにより、アプリケーション制御部205、プロトコル制御部206の処理負荷を軽減できる。また、後者の半導体チップによれば、無線制御部207における処理速度を向上することができる。   In this embodiment, the application control unit 205, the protocol control unit 206, and the wireless control unit 207 have a 3-CPU configuration in which each has a CPU. With the 3CPU configuration, the processing in the application control unit 205, the protocol control unit 206, and the wireless control unit 207 is separated, and the processing speed can be improved and the processing load on the application control unit 205 and the protocol control unit 206 can be reduced. . In the present embodiment, a three-CPU configuration is used. However, for example, the processing of the application control unit 205 and the protocol control unit 206 may be performed by a single CPU. 206 may be assigned. The wireless control unit 207 may be a semiconductor chip such as a wireless chip. According to the former two-CPU configuration, the radio control unit 207 having a large processing load can be separated, so that the processing load on the application control unit 205 and the protocol control unit 206 can be reduced. Moreover, according to the latter semiconductor chip, the processing speed in the wireless control unit 207 can be improved.

図3は、アプリケーション制御部205に含まれるモジュールの構成を示す図である。バス300は、アプリケーション制御部205に接続するバスである。アプリケーションプロトコル制御部301は、アプリケーションプロトコルに関する制御を行う。表示部302は、各種表示を行い、例えば、エラーの表示を行う。操作部303は、ユーザの操作等に基づいて、アプリケーションの操作を行う。撮像部304は、静止画や動画の撮影を行う。取得部305は、第1のデータ保持部306、第2のデータ保持部403(図4)、第3のデータ保持部502(図5)からKeepAlive送信間隔を取得する。第1データ保持部306は、アプリケーションのKeepAlive送信間隔や送信開始タイミングを保持する。図8(b)に、第1のデータ保持部306で保持される情報の一例を示す。図8(b)に示される情報には、後述する処理により変更される前と後のKeepAlive送信間隔(sec)と、KeepAlive送信開始タイミングが含まれている。   FIG. 3 is a diagram illustrating a configuration of modules included in the application control unit 205. A bus 300 is a bus connected to the application control unit 205. The application protocol control unit 301 performs control related to the application protocol. The display unit 302 performs various displays, for example, displays an error. The operation unit 303 operates an application based on a user operation or the like. The imaging unit 304 captures still images and moving images. The acquisition unit 305 acquires the KeepAlive transmission interval from the first data holding unit 306, the second data holding unit 403 (FIG. 4), and the third data holding unit 502 (FIG. 5). The first data holding unit 306 holds the KeepAlive transmission interval and transmission start timing of the application. FIG. 8B shows an example of information held by the first data holding unit 306. The information shown in FIG. 8B includes the KeepAlive transmission interval (sec) before and after the change by the process described later, and the KeepAlive transmission start timing.

決定部307は、取得部305で取得したKeepAlive送信間隔をもとに、プロトコル制御部206と無線制御部207が処理を行わない時間が長くなるように、KeepAlive送信間隔や送信開始タイミングを決定する。設定部308は、決定部307で決定したKeepAlive送信間隔や送信開始タイミングを、第1のデータ保持部306、第2のデータ保持部403、第3のデータ保持部502に設定する。再接続判断部309は、サーバ102との通信が切断された場合に、再接続を行うか判断を行う。第1の接続維持部310は、アプリケーションのKeepAlive送信を行う。接続維持情報保持部311は、取得部305で取得したKeepAlive送信間隔や、決定部307で決定したKeepAlive送信間隔や送信開始タイミングと保持する。図8(a)に、接続維持情報保持部311で保持される情報の一例を示す。図8(a)に含まれる情報には、各プロトコルについて、後述する処理により変更される前と後のKeepAlive送信間隔(sec)と、KeepAlive送信開始タイミングが含まれている。   Based on the KeepAlive transmission interval acquired by the acquisition unit 305, the determination unit 307 determines the KeepAlive transmission interval and transmission start timing so that the time during which the protocol control unit 206 and the radio control unit 207 do not perform processing becomes longer. . The setting unit 308 sets the KeepAlive transmission interval and transmission start timing determined by the determination unit 307 in the first data holding unit 306, the second data holding unit 403, and the third data holding unit 502. The reconnection determination unit 309 determines whether to reconnect when communication with the server 102 is disconnected. The first connection maintaining unit 310 performs KeepAlive transmission of the application. The connection maintenance information holding unit 311 holds the KeepAlive transmission interval acquired by the acquisition unit 305, the KeepAlive transmission interval and transmission start timing determined by the determination unit 307. FIG. 8A shows an example of information held by the connection maintenance information holding unit 311. The information included in FIG. 8A includes, for each protocol, the KeepAlive transmission interval (sec) before and after being changed by the processing described later, and the KeepAlive transmission start timing.

図4は、プロトコル制御部206に含まれるモジュールの構成を示す図である。バス400は、プロトコル制御部206に接続するモジュールのバスである。HTTP/2制御部401は、HTTP/2の処理を行う。本実施形態では、HTTP/2を利用するが、HTTP/1.1やWebsocketといったTCPベースのプロトコルでもCoAPなどのUDPベースのプロトコルを利用してもよい。TCP/IP制御部402は、TCP/IPの処理を行う。なお、本実施形態ではTCPとするが、UDPであってもよい。第2のデータ保持部403は、HTTP/2のKeepAlive送信間隔や送信開始タイミングを保持する。第2のデータ保持部403で保持される情報の一例は、第1のデータ保持部306で保持される情報の一例と同様に図8(b)に示される。第2の接続維持部404は、HTTP/2のKeepAlive送信を行う。第1の検知部405は、HTTP/2の切断の検知を行う。第1の通知部406は、HTTP/2の切断/再接続の通知を行う。   FIG. 4 is a diagram illustrating a configuration of modules included in the protocol control unit 206. The bus 400 is a module bus connected to the protocol control unit 206. The HTTP / 2 control unit 401 performs HTTP / 2 processing. In this embodiment, HTTP / 2 is used, but a TCP-based protocol such as HTTP / 1.1 or Websocket or a UDP-based protocol such as CoAP may be used. The TCP / IP control unit 402 performs TCP / IP processing. In this embodiment, TCP is used, but UDP may be used. The second data holding unit 403 holds an HTTP / 2 KeepAlive transmission interval and transmission start timing. An example of information held by the second data holding unit 403 is illustrated in FIG. 8B, similarly to an example of information held by the first data holding unit 306. The second connection maintaining unit 404 performs HTTP / 2 KeepAlive transmission. The first detection unit 405 detects the disconnection of HTTP / 2. The first notification unit 406 notifies disconnection / reconnection of HTTP / 2.

図5は、無線制御部207に含まれるモジュール構成を示す図である。バス500は、無線制御部207に接続するモジュールのバスである。無線プロトコル制御部501は、無線プロトコルの処理を行う。第3のデータ保持部502は、TCP/IPのKeepAlive送信間隔や送信開始タイミングを保持する。第3のデータ保持部502で保持する情報の一例は、第1のデータ保持部306で保持される情報の一例と同様に図8(b)に示される。第3の接続維持部503は、TCP/IPのKeepAlive送信を行う。第2の検知部504は、TCP/IPの切断の検知を行う。第2の通知部505は、TCP/IPの切断/再接続の通知を行う。   FIG. 5 is a diagram illustrating a module configuration included in the wireless control unit 207. A bus 500 is a module bus connected to the wireless control unit 207. The wireless protocol control unit 501 performs wireless protocol processing. The third data holding unit 502 holds a TCP / IP KeepAlive transmission interval and transmission start timing. An example of information held by the third data holding unit 502 is shown in FIG. 8B, similarly to an example of information held by the first data holding unit 306. The third connection maintaining unit 503 performs TCP / IP KeepAlive transmission. The second detection unit 504 detects TCP / IP disconnection. The second notification unit 505 notifies TCP / IP disconnection / reconnection.

本実施形態における通信装置101は、上述したように、複数のCPUを有する。各CPU間で処理のやり取りをする際に、アプリケーション制御部205/プロトコル制御部206間と、プロトコル制御部206/無線制御部207間でCPU間の通信を行う。例えば、アプリケーション制御部205に含まれる取得部305がプロトコル制御部206に含まれる第2のデータ保持部403からKeepAlive送信間隔を取得する場合について記述する。取得部305がアプリケーション制御部205を経由し、アプリケーション制御部205とプロトコル制御部206間でCPU間通信を行い、第2のデータ保持部403からKeepAlive送信間隔を取得する。また、アプリケーション制御部205から無線制御部207のモジュールに制御を行う場合は、プロトコル制御部206を経由してCPU間の通信を行う。本実施形態では、アプリケーション制御部205から無線制御部207のモジュールに制御を行うためにプロトコル制御部206を経由しているが、アプリケーション制御部205から無線制御部207に直接CPU間の通信を行う構成であっても良い。以降の記載では、CPUを跨いだ処理を「CPU間通信を行い」と省略する。   As described above, the communication apparatus 101 according to the present embodiment includes a plurality of CPUs. When processing is exchanged between the CPUs, communication between the CPUs is performed between the application control unit 205 / protocol control unit 206 and between the protocol control unit 206 / wireless control unit 207. For example, a case where the acquisition unit 305 included in the application control unit 205 acquires the KeepAlive transmission interval from the second data holding unit 403 included in the protocol control unit 206 will be described. The acquisition unit 305 performs inter-CPU communication between the application control unit 205 and the protocol control unit 206 via the application control unit 205, and acquires the KeepAlive transmission interval from the second data holding unit 403. When the application control unit 205 controls the module of the wireless control unit 207, communication between CPUs is performed via the protocol control unit 206. In this embodiment, the application control unit 205 passes through the protocol control unit 206 in order to control the module of the wireless control unit 207, but the CPU directly communicates from the application control unit 205 to the wireless control unit 207. It may be a configuration. In the following description, the process across the CPUs is abbreviated as “performing CPU communication”.

図6は、HTTP/2を使用した通信において、通信装置101がサーバ102に対するKeepAliveの送信タイミング(KeepAlive送信間隔と送信開始タイミング)を決定する処理のフローチャートである。本フローは、通信装置101がサーバ102との接続/再接続を行う時に開始される。なお、本フローの開始時は、接続/再接続時だけでなく、所定の時間で行っても良いし、操作部303が所定の操作を行った時でも良いし、アクセスポイントや通信経路が切り替わった時でも良い。   FIG. 6 is a flowchart of a process in which the communication apparatus 101 determines the KeepAlive transmission timing (KeepAlive transmission interval and transmission start timing) to the server 102 in communication using HTTP / 2. This flow is started when the communication apparatus 101 performs connection / reconnection with the server 102. Note that the start of this flow may be performed not only at the time of connection / reconnection but also at a predetermined time, or when the operation unit 303 performs a predetermined operation, or an access point or a communication path is switched. It ’s okay.

取得部305は、第1のデータ保持部306からKeepAlive送信間隔を取得する。また、取得部305は、CPU間通信を行い、第2のデータ保持部403と第3のデータ保持部502からKeepAlive送信間隔を取得する。取得部305は、取得したKeepAlive送信間隔を接続維持情報保持部311に保持する(S601)。本実施形態では、アプリケーション制御部205、プロトコル制御部206、無線制御部207が保持しているKeepAlive送信間隔を用いたが、1つのCPUにて保持されている各通信プロトコルのKeepAlive送信間隔を用いてもよい。また、取得部305は、KeepAlive送信間隔を測定して取得しても良い。   The acquisition unit 305 acquires the KeepAlive transmission interval from the first data holding unit 306. Further, the acquisition unit 305 performs inter-CPU communication, and acquires the KeepAlive transmission interval from the second data holding unit 403 and the third data holding unit 502. The acquisition unit 305 holds the acquired KeepAlive transmission interval in the connection maintenance information holding unit 311 (S601). In this embodiment, the KeepAlive transmission interval held by the application control unit 205, the protocol control unit 206, and the wireless control unit 207 is used. However, the KeepAlive transmission interval of each communication protocol held by one CPU is used. May be. The acquisition unit 305 may measure and acquire the KeepAlive transmission interval.

決定部307は、取得部305で取得したKeepAlive送信間隔から、KeepAlive送信間隔と送信開始タイミングを決定する(S602)。本実施形態では、決定部307は、サーバ102とのコネクションが維持される時間の範囲で、プロトコル制御部206と無線制御部207が処理を行わない時間が長くなるように、KeepAlive送信間隔と送信開始タイミングを決定する。本実施形態では、決定部307は、取得部305で取得したKeepAlive送信間隔の最小のKeepAlive送信間隔の倍数かつ、変更前のKeepAlive送信間隔以下となるように、KeepAlive送信間隔を決定する。例えば、アプリケーションのKeepAlive送信間隔が35(sec)、HTTP/2のKeepAlive送信間隔が24(sec)、TCP/IPのKeepAlive送信間隔が10(sec)である場合を考える。この場合、最小のKeepAlive送信間隔は、TCP/IPのKeepAlive送信間隔の10(sec)であることから、決定部307は、アプリケーションのKeepAlive送信間隔を30(sec)、HTTP/2のKeepAlive送信間隔を20(sec)、TCP/IPのKeepAlive送信間隔を10(sec)と変更することを決定する。これにより、各層におけるKeepAliveの送信タイミングの一部が一致するようになる。すなわち、決定部307は、各プロトコルでKeepAliveの送信タイミングの少なくとも一部が同期するように、複数のプロトコルそれぞれについて、KeepAliveの新たな送信間隔を決定する。   The determination unit 307 determines the KeepAlive transmission interval and transmission start timing from the KeepAlive transmission interval acquired by the acquisition unit 305 (S602). In this embodiment, the determination unit 307 transmits the keep-alive transmission interval and the transmission so that the time during which the protocol control unit 206 and the wireless control unit 207 do not perform processing becomes longer in the time range in which the connection with the server 102 is maintained. Determine the start timing. In the present embodiment, the determination unit 307 determines the KeepAlive transmission interval so as to be a multiple of the minimum KeepAlive transmission interval of the KeepAlive transmission interval acquired by the acquisition unit 305 and equal to or less than the KeepAlive transmission interval before the change. For example, consider a case where the application KeepAlive transmission interval is 35 (sec), the HTTP / 2 KeepAlive transmission interval is 24 (sec), and the TCP / IP KeepAlive transmission interval is 10 (sec). In this case, since the minimum KeepAlive transmission interval is 10 (sec) of the TCP / IP KeepAlive transmission interval, the determination unit 307 sets the application KeepAlive transmission interval to 30 (sec) and the HTTP / 2 KeepAlive transmission interval. Is determined to be changed to 20 (sec), and the TCP / IP KeepAlive transmission interval is changed to 10 (sec). Thereby, a part of the transmission timing of KeepAlive in each layer becomes coincident. That is, the determination unit 307 determines a new transmission interval of KeepAlive for each of the plurality of protocols so that at least a part of the transmission timing of KeepAlive is synchronized in each protocol.

なお、決定部307は、上記の方法以外の方法を利用してKeepAlive送信間隔を決定してもよい。例えば、決定部307は、HTTP/2のKeepAlive送信間隔とTCP/IPのKeepAlive送信間隔を最小のKeepAlive送信間隔に合わせてもよい。さらに、本実施形態では、変更後のKeepAlive送信間隔を、変更前のKeepAlive送信間隔以下となるように決定しているが、変更前のKeepAlive送信間隔以上となるように決定してもよい。例えば、変更前のアプリケーションのKeepAlive送信間隔が35(sec)だった場合に、決定部307は、変更後の送信間隔を40(sec)と決定してもよい。KeepAlive送信間隔が長い場合は、接続が切れる可能性が高くなるので、決定したKeepAlive送信間隔を設定後に接続が切れなかった場合に、該送信間隔を本設定するようにしてもよい。それにより、無駄なKeepAlive送信を省くことができ、消費電力を低減できる。また、決定部307は、取得部305で取得したKeepAlive送信間隔の最小のKeepAlive送信間隔の倍数かつ、変更前のKeepAlive送信間隔に近くなるように、KeepAlive送信間隔を決定してもよい。例えば、アプリケーションのKeepAlive送信間隔が35(sec)、HTTP/2のKeepAlive送信間隔が24(sec)、TCP/IPのKeepAlive送信間隔が10(sec)である場合、決定部307は、アプリケーションのKeepAlive送信間隔を40(sec)、HTTP/2のKeepAlive送信間隔を20(sec)、TCP/IPのKeepAlive送信間隔を10(sec)と変更することを決定する。   Note that the determination unit 307 may determine the KeepAlive transmission interval using a method other than the above method. For example, the determination unit 307 may match the HTTP / 2 KeepAlive transmission interval and the TCP / IP KeepAlive transmission interval to the minimum KeepAlive transmission interval. Furthermore, in this embodiment, the changed KeepAlive transmission interval is determined to be equal to or shorter than the previous KeepAlive transmission interval, but may be determined to be equal to or longer than the previous KeepAlive transmission interval. For example, when the KeepAlive transmission interval of the application before the change is 35 (sec), the determination unit 307 may determine the transmission interval after the change as 40 (sec). When the KeepAlive transmission interval is long, there is a high possibility that the connection will be disconnected. Therefore, when the connection is not disconnected after setting the determined KeepAlive transmission interval, the transmission interval may be set as the main setting. Thereby, useless KeepAlive transmission can be omitted and power consumption can be reduced. Further, the determination unit 307 may determine the KeepAlive transmission interval so that it is a multiple of the minimum KeepAlive transmission interval of the KeepAlive transmission interval acquired by the acquisition unit 305 and is close to the KeepAlive transmission interval before the change. For example, when the application KeepAlive transmission interval is 35 (sec), the HTTP / 2 KeepAlive transmission interval is 24 (sec), and the TCP / IP KeepAlive transmission interval is 10 (sec), the determination unit 307 determines that the application KeepAlive transmission interval is 10 (sec). It is determined to change the transmission interval to 40 (sec), the HTTP / 2 KeepAlive transmission interval to 20 (sec), and the TCP / IP KeepAlive transmission interval to 10 (sec).

本実施形態において、決定部307は、KeepAlive送信開始タイミングについて、HTTP/2のKeepAlive送信開始タイミングとTCP/IPのKeepAlive送信開始タイミングを同じ時刻にし、アプリケーションのKeepAlive送信開始タイミングを該時刻よりも所定時間早くするように決定する。アプリケーションのKeepAlive送信開始タイミングを所定時間早くする理由は、アプリケーションのKeepAliveはTCP/IPのKeepAliveよりも一般的にデータサイズが大きいため、TCP/IPのKeepAliveのKeepAlive送受信時間に比べ遅延が発生するからである。なお、本実施形態では、決定部307は、アプリケーションのKeepAlive送信開始タイミングを所定時間早くしているが、同時刻にしても良い。また、決定部307は、優先度を用いてKeepAlive送信順序を制御しても良い。   In the present embodiment, the determination unit 307 sets the HTTP / 2 KeepAlive transmission start timing and the TCP / IP KeepAlive transmission start timing to the same time for the KeepAlive transmission start timing, and sets the KeepAlive transmission start timing of the application to a predetermined time. Decide to be early. The reason why the application KeepAlive transmission start timing is advanced by a predetermined time is that the application KeepAlive generally has a larger data size than the TCP / IP KeepAlive, so a delay occurs compared to the TCP / IP KeepAlive KeepAlive transmission / reception time. It is. In the present embodiment, the determination unit 307 advances the KeepAlive transmission start timing of the application by a predetermined time, but it may be the same time. Further, the determination unit 307 may control the KeepAlive transmission order using the priority.

なお、決定部307は、KeepAliveに関する情報(送信間隔および送信開始タイミング)を、KeepAliveの待受け時間を考慮して決定してもよい。インターネットを介した通信の場合、100ms以上の遅延が発生することが知られている。接続相手によって遅延を考慮することで、受信時間外になるKeepAliveを取り逃すことを低減する。さらに、決定部307は、通信の揺らぎの値から遅延の上限値と下限値を想定してKeepAliveに関する情報を決定してもよい。また、本実施形態では、通信装置101の対向機器となるサーバ102を1台にしているが、通信装置101は、複数の接続先の装置とのKeepAlive送信間隔と送信開始タイミングを調整してもよい。これにより、更なる消費電力の低減を行うことができる。   Note that the determination unit 307 may determine information related to KeepAlive (transmission interval and transmission start timing) in consideration of the standby time of KeepAlive. In the case of communication via the Internet, it is known that a delay of 100 ms or more occurs. By considering the delay depending on the connection partner, it is possible to reduce the miss of KeepAlive that is outside the reception time. Further, the determination unit 307 may determine information related to KeepAlive by assuming an upper limit value and a lower limit value of the delay from the communication fluctuation value. In the present embodiment, the server 102 that is the opposite device of the communication apparatus 101 is provided as one unit. However, the communication apparatus 101 may adjust the KeepAlive transmission interval and transmission start timing with a plurality of connection destination apparatuses. Good. Thereby, the power consumption can be further reduced.

次に、設定部308は、決定部307にて決定したKeepAlive送信間隔と送信開始タイミングを第1のデータ保持部306に設定する。また、設定部308は、CPU間通信を行い、第2のデータ保持部403および第3のデータ保持部502に設定する(S603)。   Next, the setting unit 308 sets the KeepAlive transmission interval and transmission start timing determined by the determination unit 307 in the first data holding unit 306. Also, the setting unit 308 performs inter-CPU communication and sets the second data holding unit 403 and the third data holding unit 502 (S603).

図7はHTTP/2を使用した通信において、通信装置101が通信判断を行い、サーバ102に接続維持を行うためのシーケンスを示す図である。M701において、通信装置101は、サーバ102とHTTP/2通信を開始し、コネクションを確立する。具体的には、アプリケーションプロトコル制御部301が、CPU間通信を行い、HTTP/2制御部401にサーバ102とのコネクション生成を指示し、HTTP/2制御部401はTCP/IP制御部402を介し、CPU間通信を行い、無線制御部207を用いてサーバ102とパケットの送受信を行う。   FIG. 7 is a diagram illustrating a sequence for the communication apparatus 101 to perform communication determination and maintain connection to the server 102 in communication using HTTP / 2. In M701, the communication apparatus 101 starts HTTP / 2 communication with the server 102 and establishes a connection. Specifically, the application protocol control unit 301 performs inter-CPU communication, instructs the HTTP / 2 control unit 401 to generate a connection with the server 102, and the HTTP / 2 control unit 401 passes through the TCP / IP control unit 402. Then, communication between CPUs is performed, and packets are transmitted to and received from the server 102 using the wireless control unit 207.

M702において、取得部305は、第1のデータ保持部306からKeepAlive送信間隔を取得する(S601)。M703において、取得部305は、CPU間通信を行い、第2のデータ保持部403からKeepAlive送信間隔を取得する(S601)。M704において、取得部305は、CPU間通信を行い、第3のデータ保持部502からKeepAlive送信間隔を取得する(S601)。なお、M702〜M704の順序は変更可能である。   In M702, the acquisition unit 305 acquires the KeepAlive transmission interval from the first data holding unit 306 (S601). In M703, the acquisition unit 305 performs inter-CPU communication, and acquires the KeepAlive transmission interval from the second data holding unit 403 (S601). In M704, the acquisition unit 305 performs inter-CPU communication, and acquires the KeepAlive transmission interval from the third data holding unit 502 (S601). Note that the order of M702 to M704 can be changed.

M705において、決定部307は、KeepAlive送信間隔と送信開始タイミングを決定する(S602)。M706において、設定部308は、KeepAlive送信間隔と送信開始タイミングを第1のデータ保持部306に設定する(S603)。M707において、設定部308は、CPU間通信を行い、KeepAlive送信間隔と送信開始タイミングを第2のデータ保持部403に設定する(S603)。M708において、設定部308は、CPU間通信を行い、KeepAlive送信間隔と送信開始タイミングを第1のデータ保持部502に設定する(S603)。なお、M706〜M708の順序は変更可能である。   In M705, the determination unit 307 determines the KeepAlive transmission interval and transmission start timing (S602). In M706, the setting unit 308 sets the KeepAlive transmission interval and transmission start timing in the first data holding unit 306 (S603). In M707, the setting unit 308 performs inter-CPU communication, and sets the KeepAlive transmission interval and transmission start timing in the second data holding unit 403 (S603). In M708, the setting unit 308 performs inter-CPU communication, and sets the KeepAlive transmission interval and transmission start timing in the first data holding unit 502 (S603). Note that the order of M706 to M708 can be changed.

M709において、第1の接続維持部310は、サーバ102に対してアプリケーションのKeepAlive送信を行う。具体的には、まず、第1の接続維持部310がCPU間通信を行い、HTTP/2制御部401にKeepAliveメッセージの生成を指示する。本実施形態におけるアプリケーションのKeepAliveメッセージは、アプリケーションデータを含むメッセージのことである。例えば、HTTP/2のHEADERフレームを用いてHTTPのGETメソッドやHEADメッセージといったような、サーバ102の状態が変わらないようなKeepAliveメッセージを用いる。HTTP/2制御部401は、TCP/IP制御部402を介し、CPU間通信を行い、無線制御部207を用いてサーバ102とパケットの送受信を行う。通信装置101は、アプリケーション制御部205のKeepAliveメッセージにアプリケーションデータを含めることにより、所定のルータがアプリケーションデータのやり取りを行っていないと接続を切ってしまうという問題の解消が可能となる。   In M709, the first connection maintaining unit 310 transmits the application KeepAlive to the server 102. Specifically, first, the first connection maintaining unit 310 performs inter-CPU communication, and instructs the HTTP / 2 control unit 401 to generate a KeepAlive message. The application KeepAlive message in this embodiment is a message including application data. For example, a KeepAlive message that does not change the state of the server 102, such as an HTTP GET method or a HEAD message, using an HTTP / 2 HEADER frame is used. The HTTP / 2 control unit 401 performs inter-CPU communication via the TCP / IP control unit 402, and transmits and receives packets to and from the server 102 using the wireless control unit 207. By including the application data in the KeepAlive message of the application control unit 205, the communication device 101 can solve the problem that the connection is disconnected if the predetermined router does not exchange the application data.

また、本実施形態では、第1の接続維持部310は、アプリケーション制御部205のKeepAliveメッセージを他のKeepAliveメッセージよりも所定の時間早く送信する。アプリケーション制御部205のKeepAliveメッセージは、他のKeepAliveメッセージよりもデータサイズが大きく、KeepAliveメッセージの送受信時間がかかる。アプリケーション制御部205のKeepAliveメッセージが所定の時間早く送信されることで、プロトコル制御部206と無線制御部207の処理遅延を解消することができ、消費電力を小さくすることが可能である。なお、本実施形態ではアプリケーション制御部205のKeepAliveメッセージの送信を所定時間早くしているが、プロトコル制御部206と無線制御部207のKeepAliveメッセージの送信と同時刻であっても良い。   In the present embodiment, the first connection maintaining unit 310 transmits the KeepAlive message of the application control unit 205 a predetermined time earlier than other KeepAlive messages. The KeepAlive message of the application control unit 205 has a larger data size than other KeepAlive messages, and it takes time to send and receive KeepAlive messages. By transmitting the KeepAlive message from the application control unit 205 a predetermined time earlier, the processing delay between the protocol control unit 206 and the wireless control unit 207 can be eliminated, and the power consumption can be reduced. In this embodiment, the KeepAlive message is transmitted earlier by the application control unit 205 by a predetermined time, but it may be the same time as the KeepAlive message transmitted by the protocol control unit 206 and the wireless control unit 207.

M710において、第2の接続維持部404は、サーバ102にHTTP/2のKeepAlive送信を行う。具体的には、まず、第2の接続維持部404がHTTP/2制御部401にKeepAliveメッセージの生成を指示する。本実施形態におけるアプリケーションのKeepAliveメッセージは、HTTP/2のPINGフレームのことである。HTTP/2制御部401は、TCP/IP制御部402を介し、CPU間通信を行い、無線制御部207を用いてサーバ102とパケットの送受信を行う。なお、本実施形態ではPINGフレームを送信しているが、HEADERフレームであっても良い。また、本実施形態では、第2の接続維持部404は、HTTP/2のKeepAlive送信をしているが、HTTP/2のKeepAlive送信間隔よりアプリケーションのKeepAlive送信間隔が長い場合は、HTTP/2のKeepAlive送信を行わなくても良い。M711において、第3の接続維持部503はサーバ102にTCP/IPのKeepAlive送信を行う。なお、M710とM711の順序は変更可能である。   In M710, the second connection maintenance unit 404 performs HTTP / 2 KeepAlive transmission to the server 102. Specifically, first, the second connection maintaining unit 404 instructs the HTTP / 2 control unit 401 to generate a KeepAlive message. The application KeepAlive message in this embodiment is an HTTP / 2 PING frame. The HTTP / 2 control unit 401 performs inter-CPU communication via the TCP / IP control unit 402, and transmits and receives packets to and from the server 102 using the wireless control unit 207. In this embodiment, a PING frame is transmitted, but a HEADER frame may be used. In this embodiment, the second connection maintaining unit 404 performs HTTP / 2 KeepAlive transmission. If the application KeepAlive transmission interval is longer than the HTTP / 2 KeepAlive transmission interval, the HTTP / 2 There is no need to send KeepAlive. In M711, the third connection maintaining unit 503 performs TCP / IP KeepAlive transmission to the server 102. Note that the order of M710 and M711 can be changed.

本実施形態では、決定部307で決定したKeepAlive送信間隔を用いてKeepAliveメッセージを送受信しているが、決定部307で決定したKeepAlive送信間隔より小さな間隔で送信してもよい。例えば、ネットワークの状況によって、パケットのバーストロスが発生する場合がある。この時、通信装置101は、パケットロスが発生しているか否かを判断し、パケットロスが発生していた場合は、決定部307で決定したKeepAlive送信間隔よりも短い時間でKeepAliveメッセージを送受信しても良い。これによって、接続がより維持しやすくなるという効果がある。   In this embodiment, the KeepAlive message is transmitted / received using the KeepAlive transmission interval determined by the determination unit 307, but may be transmitted at an interval smaller than the KeepAlive transmission interval determined by the determination unit 307. For example, packet burst loss may occur depending on network conditions. At this time, the communication apparatus 101 determines whether or not a packet loss has occurred. If a packet loss has occurred, the communication apparatus 101 transmits and receives a KeepAlive message in a time shorter than the KeepAlive transmission interval determined by the determination unit 307. May be. This has the effect that the connection is more easily maintained.

また、本実施形態ではKeepAlive送信間隔の取得、決定、設定をアプリケーション制御部205のCPUにて行っているが、これに限らず、プロトコル制御部206や無線制御部207で行っても良い。   In this embodiment, the keep-alive transmission interval is acquired, determined, and set by the CPU of the application control unit 205. However, the present invention is not limited to this, and may be performed by the protocol control unit 206 or the wireless control unit 207.

以上、本実施形態における通信装置101は、サーバ102とのコネクション生成後、該コネクションの維持のためのKeepAlive通信を行う時に、アプリケーション、HTTP/2、TCP/IPのKeepAlive送信間隔と送信開始タイミングを決定する。これにより、KeepAlive時におけるプロトコル制御部206と無線制御部207が処理していない時間が長くなり、消費電力を小さくすることが可能とある。   As described above, the communication apparatus 101 according to the present embodiment, after creating a connection with the server 102, performs KeepAlive transmission intervals and transmission start timings of applications, HTTP / 2, and TCP / IP when performing KeepAlive communication for maintaining the connection. decide. As a result, the time during which the protocol control unit 206 and the wireless control unit 207 are not processing at the time of KeepAlive becomes longer, and the power consumption can be reduced.

実施形態のHTTP/2は、例えば、WebSocket、XMPP、RTSPといった通信プロトコルであっても実現できる。XMPPやRTSPのような、KeepAliveメッセージに相当するメッセージがない場合には、アプリケーションデータをKeepAliveメッセージとして送信する必要がある。その際のアプリケーションデータは、XMPPであれば所定のメッセージ、RTSPであれば、GETメソッドのメッセージといった、サーバ102の状態が変わらないようなメッセージを用いることで、アプリケーション制御部205の通信を維持することができる。本実施形態のKeepAlive送信間隔は通信装置101の状態によってその値を変更しても良い。例えば、AC電源に繋いでいるような安定した電力が供給されている場合は、KeepAlive送信間隔を短くすることで、サーバ102との通信を維持しやすくすることが可能である。また、通信装置101の電池の残量が少ない場合は、KeepAlive送信間隔を長くすることで消費電力を小さくすることが可能である。   The HTTP / 2 of the embodiment can be realized even with a communication protocol such as WebSocket, XMPP, and RTSP, for example. When there is no message corresponding to the KeepAlive message, such as XMPP or RTSP, it is necessary to transmit application data as a KeepAlive message. The application data at that time maintains a communication of the application control unit 205 by using a message that does not change the state of the server 102, such as a predetermined message for XMPP and a GET method message for RTSP. be able to. The value of the KeepAlive transmission interval of this embodiment may be changed depending on the state of the communication apparatus 101. For example, when stable power that is connected to an AC power supply is supplied, communication with the server 102 can be easily maintained by shortening the KeepAlive transmission interval. In addition, when the battery of the communication device 101 is low, it is possible to reduce power consumption by increasing the KeepAlive transmission interval.

[実施形態2]
本発明の例示的な実施形態である実施形態2を、図面を参照して説明する。システム構成及び通信装置101の構成は、実施形態1で説明した構成と同様であるため、説明を省略する。
[Embodiment 2]
Embodiment 2 which is exemplary embodiment of this invention is demonstrated with reference to drawings. Since the system configuration and the configuration of the communication apparatus 101 are the same as those described in the first embodiment, the description thereof is omitted.

図9は、HTTP/2を使用した通信において、所定のプロトコルの通信が切断された際に、通信装置101が再接続を行ない、サーバ102とのKeepAlive送信間隔と送信開始タイミングを再決定する処理のフローチャートである。このフローは、第1の検知部405にてHTTP/2コネクションの切断、もしくは第2の検知部504にてTCP/IPの切断が検知された時に開始する。第1の検知部405にてHTTP/2コネクションの切断が検知された場合、第1の通知部406は、CPU間通信を行い、アプリケーションプロトコル制御部301に切断の通知を行う(S901)。第2の検知部504にてTCP/IPコネクションの切断が検知された場合、第2の通知部505は、CPU間通信を行い、TCP/IP制御部402、HTTP/2制御部401を介し、アプリケーションプロトコル制御部301に切断の通知を行う。   FIG. 9 shows a process of re-determining the keep-alive transmission interval and transmission start timing with the server 102 when the communication of the predetermined protocol is disconnected in the communication using HTTP / 2 and the communication apparatus 101 reconnects. It is a flowchart of. This flow starts when the first detection unit 405 detects disconnection of the HTTP / 2 connection or the second detection unit 504 detects disconnection of the TCP / IP. When the disconnection of the HTTP / 2 connection is detected by the first detection unit 405, the first notification unit 406 performs inter-CPU communication and notifies the application protocol control unit 301 of the disconnection (S901). When disconnection of the TCP / IP connection is detected by the second detection unit 504, the second notification unit 505 performs inter-CPU communication, via the TCP / IP control unit 402 and the HTTP / 2 control unit 401, The application protocol control unit 301 is notified of disconnection.

再接続判断部309は、第1の通知部406もしくは第2の検知部504からの切断の通知をもとに、表示部302にて、HTTP/2またはTCP/IPの再接続を行うか否かをユーザに判断させるための表示制御を行う。図11(a)に、再接続を行うか否かをユーザに判断させるために再接続判断部309により表示制御された表示部302における画面例を示す。ユーザにより再接続するための操作が一定時間行われなかった場合、もしくは、再接続しないことを示す操作が行われた場合、再接続判断部309は、再接続を待たないと判断する(S902のNo)。ユーザにより再接続するための操作が行われた場合、再接続判断部309は再接続を待つと判断する(S902のYes)。この場合、再接続判断部309は、通信装置101とサーバ102間の再接続を確認するために待機する(S903)。   The reconnection determination unit 309 determines whether to perform HTTP / 2 or TCP / IP reconnection on the display unit 302 based on the disconnection notification from the first notification unit 406 or the second detection unit 504. Display control is performed to make the user determine whether or not. FIG. 11A shows an example of a screen on the display unit 302 whose display is controlled by the reconnection determination unit 309 in order to make the user determine whether or not to perform reconnection. If the user does not perform an operation for reconnection for a certain period of time, or if an operation indicating that reconnection is not performed is performed, the reconnection determination unit 309 determines that reconnection is not waited (S902). No). When an operation for reconnection is performed by the user, the reconnection determination unit 309 determines to wait for reconnection (Yes in S902). In this case, the reconnection determination unit 309 waits to confirm reconnection between the communication apparatus 101 and the server 102 (S903).

再接続判断部309は、第1の通知部406もしくは第2の検知部504から所定時間内に再接続の通知を受けることができたか否かによって、通信装置101とサーバ102間で再接続できたか否かを判断する(S904)。再接続判断部309は、所定時間内に再接続の通知を受けた場合、通信装置101とサーバ102間で再接続できたと判断する(S904のYes)。この場合、通信装置101は、KeepAlive送信間隔と送信開始タイミングを再設定する為に、実施形態1において説明した図6の処理を実行する(S905)。一方、再接続判断部309は、所定時間内に再接続の通知を受けなかった場合、通信装置101とサーバ間で再接続できなかったと判断し(S904のNo)、表示部302にて、エラー画面を表示するための制御を行い(S906)、処理は終了する。図11(c)に、再接続判断部309により表示制御された表示部302におけるエラー画面例を示す。   The reconnection determination unit 309 can reconnect between the communication apparatus 101 and the server 102 depending on whether or not the reconnection notification can be received from the first notification unit 406 or the second detection unit 504 within a predetermined time. It is determined whether or not (S904). When the reconnection determination unit 309 receives a reconnection notification within a predetermined time, the reconnection determination unit 309 determines that reconnection has been established between the communication apparatus 101 and the server 102 (Yes in S904). In this case, the communication apparatus 101 executes the process of FIG. 6 described in the first embodiment in order to reset the KeepAlive transmission interval and the transmission start timing (S905). On the other hand, if the reconnection determination unit 309 does not receive the reconnection notification within a predetermined time, the reconnection determination unit 309 determines that the reconnection between the communication apparatus 101 and the server cannot be performed (No in S904), and the display unit 302 determines that an error has occurred. Control for displaying the screen is performed (S906), and the process ends. FIG. 11C shows an example of an error screen on the display unit 302 whose display is controlled by the reconnection determination unit 309.

なお、本実施形態では、再接続判断部309は、表示部302にて図11(a)と図11(c)に例示する画面を表示するための制御を行うが、このような表示制御を行わなくてもよい。また、再接続判断部309は、再接続を行うか否かを、ユーザからの操作以外の方法により判断してもよい。また、再接続判断部309は、図11(a)に例示する画面を表示するための制御を行った後、表示部302に対して、再接続時のKeepAlive送信間隔を短くするか否かをユーザに判断させるための表示制御を行ってもよい。図11(b)に、再接続時のKeepAlive送信間隔を短くするか否かをユーザに判断させるために再接続判断部309により表示制御された表示部302における画面例を示す。
再接続を行うか否かをユーザに判断させるために再接続判断部309により表示制御された表示部302における画面例を示す。ユーザによりKeepAlive送信間隔(図11(b)の「接続維持間隔」)を短くするための操作が行われた場合、再接続時の通信が維持される可能性が高くなる。
In this embodiment, the reconnection determination unit 309 performs control for displaying the screens illustrated in FIG. 11A and FIG. 11C on the display unit 302. Such display control is performed. It does not have to be done. Further, the reconnection determination unit 309 may determine whether or not to perform reconnection by a method other than an operation from the user. Further, the reconnection determination unit 309 performs control for displaying the screen illustrated in FIG. 11A, and then determines whether or not to shorten the KeepAlive transmission interval during reconnection with respect to the display unit 302. Display control for allowing the user to make a determination may be performed. FIG. 11B shows an example of a screen on the display unit 302 that is display-controlled by the reconnection determination unit 309 in order to make the user determine whether or not to shorten the KeepAlive transmission interval at the time of reconnection.
The screen example in the display part 302 by which display control was performed by the reconnection determination part 309 in order to make a user determine whether reconnection is performed is shown. When the user performs an operation for shortening the KeepAlive transmission interval (the “connection maintaining interval” in FIG. 11B), there is a high possibility that communication during reconnection is maintained.

図10は、HTTP/2を使用した通信において、TCPの通信が切断された際に、再接続を行ない、通信装置101がサーバ102とのKeepAlive送信間隔と送信開始タイミングを再決定するためのシーケンスを示す図である。本シーケンス図は、TCP/IPの通信が切断された場合を示すが、HTTP/2の通信が切断された場合のシーケンスも同様である。   FIG. 10 shows a sequence for re-determining the KeepAlive transmission interval and transmission start timing with the server 102 when the TCP communication is disconnected in the communication using HTTP / 2 and reconnection is performed. FIG. This sequence diagram shows the case where the TCP / IP communication is disconnected, but the sequence when the HTTP / 2 communication is disconnected is the same.

M1001において、第2の検知部504は、TCP/IPコネクションの切断を検知する。M1002において、第2の通知部505は、CPU間通信を行い、TCP/IP制御部402、HTTP/2制御部401を介し、アプリケーションプロトコル制御部301に切断の通知を行う(S901)。再接続判断部309は、ユーザにより再接続するための操作が行われた場合、再接続処理が行われるまで所定時間待機する(S902のYes、S903)。   In M1001, the second detection unit 504 detects disconnection of the TCP / IP connection. In M1002, the second notification unit 505 performs inter-CPU communication, and notifies the application protocol control unit 301 of disconnection via the TCP / IP control unit 402 and the HTTP / 2 control unit 401 (S901). When an operation for reconnection is performed by the user, the reconnection determination unit 309 waits for a predetermined time until the reconnection process is performed (Yes in S902, S903).

M1003において、TCP/IP制御部402は、CPU間通信を行い、無線制御部207を用いてサーバ102とコネクションの生成を行う。M1004において、第2の通知部505は、CPU間通信を行い、TCP/IP制御部402、HTTP/2制御部401を介し、アプリケーションプロトコル制御部301に再接続の通知を行う。再接続判断部309は、この通知をもとに、再接続できたことを判断し(S904でYes)、通信装置101は、実施形態1において説明した図6の処理を行う。M1005において、取得部305は、CPU間通信を行い、第3のデータ保持部502からKeepAlive送信間隔を取得する(S601)。また、このとき、取得部305は、アプリケーションのKeepAlive送信間隔とHTTP/2のKeepAlive送信間隔を取得してもよい。   In M1003, the TCP / IP control unit 402 performs inter-CPU communication and generates a connection with the server 102 using the wireless control unit 207. In M1004, the second notification unit 505 performs inter-CPU communication, and notifies the application protocol control unit 301 of reconnection via the TCP / IP control unit 402 and the HTTP / 2 control unit 401. Based on this notification, the reconnection determination unit 309 determines that reconnection has been made (Yes in S904), and the communication apparatus 101 performs the process of FIG. 6 described in the first embodiment. In M1005, the acquiring unit 305 performs inter-CPU communication, and acquires the KeepAlive transmission interval from the third data holding unit 502 (S601). At this time, the acquisition unit 305 may acquire the application KeepAlive transmission interval and the HTTP / 2 KeepAlive transmission interval.

M1006において、決定部307は、KeepAlive送信間隔と送信開始タイミングを決定する(S602)。M1007において、設定部308は、KeepAlive送信間隔と送信開始タイミングを第1のデータ保持部306に設定する(S603)。M1008において、設定部308は、CPU間通信を行い、KeepAlive送信間隔と送信開始タイミングを第2のデータ保持部403に設定する(S603)。M1009において、設定部308は、CPU間通信を行い、KeepAlive送信間隔と送信開始タイミングを第1のデータ保持部502に設定する(S603)。なお、M1007〜M1009の順序は変更可能である。   In M1006, the determination unit 307 determines the KeepAlive transmission interval and transmission start timing (S602). In M1007, the setting unit 308 sets the KeepAlive transmission interval and the transmission start timing in the first data holding unit 306 (S603). In M1008, the setting unit 308 performs inter-CPU communication, and sets the KeepAlive transmission interval and transmission start timing in the second data holding unit 403 (S603). In M1009, the setting unit 308 performs inter-CPU communication, and sets the KeepAlive transmission interval and transmission start timing in the first data holding unit 502 (S603). Note that the order of M1007 to M1009 can be changed.

M1010において、第1の接続維持部310は、サーバ102にアプリケーションのKeepAlive送信を行う。具体的には、第1の接続維持部310が、CPU間通信を行い、HTTP/2制御部401にKeepAliveメッセージの生成を指示する。HTTP/2制御部401は、TCP/IP制御部402を介し、CPU間通信を行い、無線制御部207を用いてサーバ102とパケットの送受信を行う。   In M <b> 1010, the first connection maintaining unit 310 transmits the application KeepAlive to the server 102. Specifically, the first connection maintaining unit 310 performs inter-CPU communication and instructs the HTTP / 2 control unit 401 to generate a KeepAlive message. The HTTP / 2 control unit 401 performs inter-CPU communication via the TCP / IP control unit 402, and transmits and receives packets to and from the server 102 using the wireless control unit 207.

M1011において、第2の接続維持部404はサーバ102にHTTP/2のKeepAlive送信を行う。具体的には、第2の接続維持部404がHTTP/2制御部401にKeepAliveメッセージの生成を指示する。HTTP/2制御部401はTCP/IP制御部402を介し、CPU間通信を行い、無線制御部207を用いてサーバ102とパケットの送受信を行う。M1012において、第3の接続維持部503はサーバ102にTCP/IPのKeepAlive送信を行う。なお、M1011とM1012の順序は変更可能である。   In M1011, the second connection maintaining unit 404 performs HTTP / 2 KeepAlive transmission to the server 102. Specifically, the second connection maintaining unit 404 instructs the HTTP / 2 control unit 401 to generate a KeepAlive message. The HTTP / 2 control unit 401 performs inter-CPU communication via the TCP / IP control unit 402, and transmits / receives packets to / from the server 102 using the wireless control unit 207. In M1012, the third connection maintaining unit 503 performs TCP / IP KeepAlive transmission to the server 102. Note that the order of M1011 and M1012 can be changed.

続いて、TCPの通信が切断された際に再接続できなかった場合のシーケンスを示す。M1013において、第2の検知部504は、TCP/IPコネクションの切断を検知する。M1014において、第2の通知部505は、CPU間通信を行い、TCP/IP制御部402、HTTP/2制御部401を介し、アプリケーションプロトコル制御部301に切断の通知を行う(S901)。再接続判断部309は、ユーザにより再接続するための操作が行われた場合、再接続処理が行われるまで所定時間待機する(S902のYes、S903)。再接続判断部309は、所定時間内に再接続の通知を受けないことから、再接続できなかったと判断する(S904でNo)。M1015において、アプリケーションプロトコル制御部301はサーバ102とのコネクションを削除し、M1016において、再接続判断部309は、表示部302にて図11(c)に例示するエラー画面を表示するための制御を行う。   Next, a sequence when reconnection cannot be performed when TCP communication is disconnected will be shown. In M1013, the second detection unit 504 detects the disconnection of the TCP / IP connection. In M1014, the second notification unit 505 performs inter-CPU communication, and notifies the application protocol control unit 301 of the disconnection via the TCP / IP control unit 402 and the HTTP / 2 control unit 401 (S901). When an operation for reconnection is performed by the user, the reconnection determination unit 309 waits for a predetermined time until the reconnection process is performed (Yes in S902, S903). The reconnection determination unit 309 determines that reconnection was not possible because no reconnection notification is received within a predetermined time (No in S904). In M1015, the application protocol control unit 301 deletes the connection with the server 102. In M1016, the reconnection determination unit 309 performs control for displaying the error screen illustrated in FIG. 11C on the display unit 302. Do.

このように、本実施形態における通信装置101は、サーバ102とのコネクションを再生成した際に、通信維持を行う時に、アプリケーション、HTTP/2、TCP/IPのKeepAlive送信間隔と送信開始時間を再決定する。これにより、再接続時にKeepAliveタイミングが変わることによる、消費電力の増加を抑えることが可能である。   As described above, the communication device 101 in this embodiment regenerates the application, HTTP / 2, and TCP / IP KeepAlive transmission interval and transmission start time when maintaining communication when the connection with the server 102 is regenerated. decide. As a result, it is possible to suppress an increase in power consumption due to a change in KeepAlive timing during reconnection.

[その他の実施形態]
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other Embodiments]
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

101 通信装置、102 サーバ、205 アプリケーション制御部、206 プロトコル制御部、207 無線通信制御部、305 取得部、307 決定部
101 communication device, 102 server, 205 application control unit, 206 protocol control unit, 207 wireless communication control unit, 305 acquisition unit, 307 determination unit

Claims (13)

複数のプロトコルを用いることで他の通信装置と通信可能な通信装置であって、
前記複数のプロトコルそれぞれについて、前記他の通信装置とのコネクションを維持するための信号の送信間隔を取得する取得手段と、
前記取得された送信間隔に基づいて、前記コネクションが維持される範囲で前記信号が送信されない期間が長くなるように、前記複数のプロトコルそれぞれについて、前記信号の新たな送信間隔を決定する決定手段と、
前記決定された新たな送信間隔を前記複数のプロトコルそれぞれに対して設定する設定手段と、
を有することを特徴とする通信装置。
A communication device capable of communicating with other communication devices by using a plurality of protocols,
For each of the plurality of protocols, an acquisition means for acquiring a transmission interval of a signal for maintaining a connection with the other communication device;
Determining means for determining a new transmission interval of the signal for each of the plurality of protocols based on the acquired transmission interval so that a period in which the signal is not transmitted is long within a range in which the connection is maintained; ,
Setting means for setting the determined new transmission interval for each of the plurality of protocols;
A communication apparatus comprising:
前記決定手段は、前記複数のプロトコルのそれぞれについての前記信号の送信開始タイミングをさらに決定することを特徴とする請求項1に記載の通信装置。   The communication apparatus according to claim 1, wherein the determination unit further determines transmission start timing of the signal for each of the plurality of protocols. 前記決定手段は、前記複数のプロトコルのうち、前記信号のデータサイズが大きいプロトコルについての前記信号の送信開始タイミングが、他のプロトコルについての前記信号の送信開始タイミングよりも早くなるように前記信号の送信開始タイミングを決定することを特徴とする請求項2に記載の通信装置。   The determination unit is configured to transmit the signal so that a transmission start timing of the signal for a protocol having a large data size of the signal is earlier than a transmission start timing of the signal for another protocol. The communication apparatus according to claim 2, wherein transmission start timing is determined. 前記決定手段は、前記複数のプロトコルそれぞれにおける前記信号の送信間隔のうちの最小の送信間隔の倍数となるように、前記新たな送信間隔を決定することを特徴とする請求項2または3に記載の通信装置。   The said determination means determines the said new transmission interval so that it may become a multiple of the minimum transmission interval among the transmission intervals of the said signal in each of these protocols. Communication equipment. 前記決定手段は、さらに、前記取得された送信間隔以下となるように、前記新たな送信間隔を決定することを特徴とする請求項4に記載の通信装置。   The communication apparatus according to claim 4, wherein the determination unit further determines the new transmission interval so as to be equal to or less than the acquired transmission interval. 前記決定手段は、さらに、前記取得された送信間隔以上となるように、前記新たな送信間隔を決定することを特徴とする請求項4に記載の通信装置。   The communication apparatus according to claim 4, wherein the determination unit further determines the new transmission interval so as to be equal to or greater than the acquired transmission interval. 前記決定手段は、さらに、前記取得された送信間隔に近い値となるように、前記新たな送信間隔を決定することを特徴とする請求項4に記載の通信装置。   The communication apparatus according to claim 4, wherein the determination unit further determines the new transmission interval so as to be a value close to the acquired transmission interval. 前記取得手段により、前記複数のプロトコルそれぞれについて前記信号の送信間隔が取得されている状態で前記複数のプロトコルのうちのいずれかのプロトコルを用いた通信が切断された場合に、前記他の通信装置と再接続するかを判断する判断手段をさらに有し、
前記他の通信装置と再接続すると判断された場合、前記取得手段は、少なくとも前記切断されたプロトコルについて、前記信号の送信間隔を取得し、
前記決定手段は、前記取得された送信間隔に基づいて、前記信号の送信タイミングが同期するように、前記複数のプロトコルそれぞれについて、前記信号の新たな送信タイミングを決定し、
前記設定手段は、前記決定された新たな送信タイミングを前記複数のプロトコルそれぞれに対して設定することを特徴とする請求項1から7のいずれか1項に記載の通信装置
When communication using any one of the plurality of protocols is disconnected while the transmission interval of the signal is acquired for each of the plurality of protocols by the acquisition unit, the other communication device And determining means for determining whether to reconnect
When it is determined to reconnect with the other communication device, the acquisition unit acquires the transmission interval of the signal for at least the disconnected protocol,
The determining means determines a new transmission timing of the signal for each of the plurality of protocols so that the transmission timing of the signal is synchronized based on the acquired transmission interval,
The communication apparatus according to claim 1, wherein the setting unit sets the determined new transmission timing for each of the plurality of protocols.
前記判断手段は、ユーザの操作に基づいて、前記他の通信装置と再接続するかを判断することを特徴とする請求項8に記載の通信装置。   9. The communication apparatus according to claim 8, wherein the determination unit determines whether to reconnect to the other communication apparatus based on a user operation. 前記複数のプロトコルは、アプリケーション層の通信プロトコルおよびトランスポート層の通信プロトコルを含むことを特徴とする請求項1から9のいずれか1項に記載の通信装置。   The communication apparatus according to claim 1, wherein the plurality of protocols include an application layer communication protocol and a transport layer communication protocol. 前記信号は、KeepAliveであることを特徴とする請求項1から10のいずれか1項に記載の通信装置。   The communication apparatus according to claim 1, wherein the signal is KeepAlive. 複数のプロトコルを用いることで他の通信装置と通信可能な通信装置の制御方法であって、
前記複数のプロトコルそれぞれについて、前記他の通信装置とのコネクションを維持するための信号の送信間隔を取得する取得工程と、
前記取得された送信間隔に基づいて、前記コネクションが維持される範囲で前記信号が送信されない期間が長くなるように、前記複数のプロトコルそれぞれについて、前記信号の新たな送信間隔を決定する決定工程と、
前記決定された新たな送信間隔を前記複数のプロトコルそれぞれに対して設定する設定工程と、
を有することを特徴とする制御方法。
A communication device control method capable of communicating with other communication devices by using a plurality of protocols,
For each of the plurality of protocols, an acquisition step of acquiring a signal transmission interval for maintaining a connection with the other communication device;
A determination step of determining a new transmission interval of the signal for each of the plurality of protocols based on the acquired transmission interval so that a period during which the signal is not transmitted is extended within a range in which the connection is maintained; ,
A setting step of setting the determined new transmission interval for each of the plurality of protocols;
A control method characterized by comprising:
コンピュータを、請求項1から11のいずれか1項に記載の通信装置として機能させるためのプログラム。   The program for functioning a computer as a communication apparatus of any one of Claim 1 to 11.
JP2015202914A 2015-10-14 2015-10-14 Communication device, control method thereof, and program Pending JP2017076866A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015202914A JP2017076866A (en) 2015-10-14 2015-10-14 Communication device, control method thereof, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015202914A JP2017076866A (en) 2015-10-14 2015-10-14 Communication device, control method thereof, and program

Publications (1)

Publication Number Publication Date
JP2017076866A true JP2017076866A (en) 2017-04-20

Family

ID=58549561

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015202914A Pending JP2017076866A (en) 2015-10-14 2015-10-14 Communication device, control method thereof, and program

Country Status (1)

Country Link
JP (1) JP2017076866A (en)

Similar Documents

Publication Publication Date Title
TWI642282B (en) Fail recovery method and internet of things system and charging system using the same
JP6487883B2 (en) Failure recovery method, Internet system of goods and charging system using the same
US10652340B2 (en) Quick relay interface and transport selection
JP6192284B2 (en) COMMUNICATION DEVICE AND ITS CONTROL METHOD
US10159041B2 (en) Communication apparatus, method of controlling the same, and non-transitory computer-readable storage medium
JPWO2016152307A1 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM
US20170230484A1 (en) Network System and Method for Establishing Data Link by Using Relay Node
JP5221617B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, CONTROL METHOD, AND PROGRAM
JP4732523B2 (en) Communication device and power supply method
JP5768017B2 (en) Communication terminal, communication method, and communication program
US10015746B2 (en) Communication apparatus and control method thereof
US11729289B2 (en) Push message communication apparatus
JP5880688B2 (en) Information processing apparatus, information processing system, information processing method, and program
JP6576099B2 (en) COMMUNICATION DEVICE, COMMUNICATION DEVICE CONTROL METHOD, PROGRAM, AND COMMUNICATION SYSTEM
JP2017076866A (en) Communication device, control method thereof, and program
US20170093624A1 (en) Router Connectivity for Client Devices
JP6806865B2 (en) Communication equipment, control methods and programs for communication equipment
US10327125B2 (en) Communication apparatus, control method for communication apparatus, and non-transitory computer-readable storage medium
US20150156166A1 (en) Communication method and mobile electronic device using the same
JP6577718B2 (en) COMMUNICATION DEVICE, COMMUNICATION DEVICE CONTROL METHOD, AND PROGRAM
JP6554002B2 (en) Communication device, control method therefor, and program
JP2014050090A (en) Packet repeater and method
JP5986528B2 (en) Control device, program and method for preventing transition to sleep mode in terminal
JP2016219909A (en) Device and method for packet relay
JP2017022550A (en) Radio communication terminal