JP6488526B2 - COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, AND PROCESSOR - Google Patents

COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, AND PROCESSOR Download PDF

Info

Publication number
JP6488526B2
JP6488526B2 JP2014231060A JP2014231060A JP6488526B2 JP 6488526 B2 JP6488526 B2 JP 6488526B2 JP 2014231060 A JP2014231060 A JP 2014231060A JP 2014231060 A JP2014231060 A JP 2014231060A JP 6488526 B2 JP6488526 B2 JP 6488526B2
Authority
JP
Japan
Prior art keywords
communication
header information
information
unit
session
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.)
Expired - Fee Related
Application number
JP2014231060A
Other languages
Japanese (ja)
Other versions
JP2016096436A (en
Inventor
潤 小西
潤 小西
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2014231060A priority Critical patent/JP6488526B2/en
Publication of JP2016096436A publication Critical patent/JP2016096436A/en
Application granted granted Critical
Publication of JP6488526B2 publication Critical patent/JP6488526B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、通信装置、通信方法、通信プログラム、及びプロセッサに関する。   The present invention relates to a communication device, a communication method, a communication program, and a processor.

無線通信において、ある無線リンクの品質が低下した際、品質低下を検知して、異なる無線リンクへ切り換える技術が知られてきている(例えば、特許文献1、2、非特許文献1、2)。   In wireless communication, when the quality of a certain radio link is reduced, a technique for detecting a quality drop and switching to a different radio link has been known (for example, Patent Documents 1 and 2 and Non-Patent Documents 1 and 2).

特開2005−223811号公報Japanese Patent Laid-Open No. 2005-223811 特開2007−336335号公報JP 2007-336335 A

“ワイヤレスジャパン 2012:実効速度が2倍以上に−KDDIの「リンクアグリゲーション無線技術」”、[online]、平成24年5月30日、ITmedia+Dモバイル、[平成26年11月13日検索]、インターネット(URL:http://plusd.itmedia.co.jp/mobile/articles/1205/30/news066.html)“Wireless Japan 2012: Effective speed more than double -KDDI's“ Link Aggregation Wireless Technology ”” [online], May 30, 2012, ITmedia + D Mobile, [Search November 13, 2014], Internet (URL: http://plusd.itmedia.co.jp/mobile/articles/1205/30/news066.html) 蕨野貴之 Takayuki WARABINO他,端末間のシームレスな切り換えを実現するデバイスハンドオフ方式の提案 Proposal of a device handoff methods for seamless communications, 情報処理学会研究報告 Vol.2003 No. 114 IPSJ SIG Technical Reports, 日本, 社団法人情報処理学会 Information Processing Society of Japan, 2003年11月14日,第2003巻,第105-112頁Takayuki WARABINO and others, Proposal of a device handoff methods for seamless communications, IPSJ SIG Technical Reports Vol.2003 No. 114 IPSJ SIG Technical Reports, Japan, Japan Information Processing Society of Japan, Information Processing Society of Japan, November 14, 2003, Vol. 2003, pp. 105-112

例えば、特許文献1に記載の技術では、通信端末は、リンク1からリンク2に切り換えた際、HTTPのレンジフィールドを用いて、リンク2側で続きのデータを取得する。そして、通信端末は、レンジフィールドに対応していないサーバであった場合、通常のリクエストをリンク2側で行い、リンク1で取得済みのデータをスキップし、あたかも続きからデータが取得出来たように振る舞う。また、通信端末は、リンク2側がレンジフィールドに対応している場合には、そのままリンク2で取得したデータを結合する。
しかしながら、特許文献1に記載の技術では、アクセスの度に異なるコンテンツが返答されるような場合には、通信端末は、リンク1とリンク2でデータに整合性がとれない。この場合、通信端末は、無線リンクの切り換えに失敗することがある、という問題があった。
For example, in the technique described in Patent Document 1, when switching from link 1 to link 2, the communication terminal acquires subsequent data on the link 2 side using the HTTP range field. And if the communication terminal is a server that does not support the range field, it makes a normal request on the link 2 side, skips the data already acquired on the link 1, and seems to be able to acquire the data from the next behave. Further, when the link 2 side is compatible with the range field, the communication terminal combines the data acquired through the link 2 as it is.
However, with the technique described in Patent Document 1, when different contents are returned at each access, the communication terminal cannot maintain data consistency between the link 1 and the link 2. In this case, there is a problem that the communication terminal may fail to switch the radio link.

本発明は上記の点に鑑みてなされたものであり、適切に無線リンクの切り換えを制御できる通信装置、通信方法、通信プログラム、及びプロセッサを提供する。   The present invention has been made in view of the above points, and provides a communication device, a communication method, a communication program, and a processor that can appropriately control switching of a radio link.

本発明は上記の課題を解決するためになされたものであり、本発明の一態様は、第1通信を行う第1通信部と、第2通信を行う第2通信部と、前記第1通信を用いて取得した通信データのHTTPヘッダ情報である第1ヘッダ情報を記憶する記憶部と、前記第2通信を用いて取得した通信データのHTTPヘッダ情報である第2ヘッダ情報を取得する情報取得部と、前記第1ヘッダ情報と前記第2ヘッダ情報とを比較し、前記第1ヘッダ情報のコンテンツサイズと前記第2ヘッダ情報のコンテンツサイズが一致しない場合には、比較結果に基づいて、通信の一部又は全部について、前記第1通信と前記第2通信との切り換えを止めると判定する選択部と、を備える通信装置である。 SUMMARY An advantage of some aspects of the invention is that a first communication unit that performs first communication, a second communication unit that performs second communication, and the first communication. A storage unit that stores first header information that is HTTP header information of communication data acquired by using the information, and information acquisition that acquires second header information that is HTTP header information of communication data acquired by using the second communication And the first header information and the second header information are compared, and if the content size of the first header information does not match the content size of the second header information , communication is performed based on the comparison result. A selection unit that determines to stop switching between the first communication and the second communication for a part or all of the communication device.

また、本発明の一態様は、上記の通信装置において、前記選択部は、前記第1ヘッダ情報と前記第2ヘッダ情報の少なくとも一部が一致しない場合には、通信の一部又は全部について、前記第1通信と前記第2通信との切り換えを止めると判定する。   Further, according to one aspect of the present invention, in the communication device, the selection unit may perform communication for a part or all of communication when at least a part of the first header information and the second header information do not match. It is determined to stop switching between the first communication and the second communication.

また、本発明の一態様は、上記の通信装置において、前記選択部は、前記第2ヘッダ情報がリダイレクションを示す場合には、当該リダイレクション先から前記第2ヘッダ情報を取得し、取得した第2ヘッダ情報と前記第1ヘッダ情報との比較結果に基づいて、通信の一部又は全部について、前記第1通信と前記第2通信との切り換えを制御する。   Further, according to one aspect of the present invention, in the communication apparatus, when the second header information indicates redirection, the selection unit acquires the second header information from the redirection destination and acquires the second header information. Based on the comparison result between the header information and the first header information, switching between the first communication and the second communication is controlled for a part or all of the communication.

また、本発明の一態様は、上記の通信装置において、前記記憶部は、前記通信装置に提供される提供データのうち、前記第1通信を用いて取得した第1データを記憶し、前記選択部は、前記第1ヘッダ情報と前記第2ヘッダ情報の少なくとも一部が一致する場合には、通信の一部又は全部について、前記第1通信と前記第2通信を切り換えると判定し、前記第2通信を用いて、前記提供データのうち、前記第1データ以外の第2データを取得し、前記第1データと前記第2データを合成する合成部を備える。   Further, according to one aspect of the present invention, in the communication device, the storage unit stores first data acquired using the first communication among provided data provided to the communication device, and the selection is performed. A unit determines to switch between the first communication and the second communication for a part or all of the communication when at least a part of the first header information and the second header information match; The second data other than the first data is acquired from the provided data using two communications, and a synthesis unit is provided for synthesizing the first data and the second data.

また、本発明の一態様は、上記の通信装置において、前記選択部は、予め定めた一連の通信毎に、前記第1通信と前記第2通信の切り換えを制御し、前記第1通信から前記第2通信へ切り換えている前記一連の通信の数を計数する計数部を備え、前記選択部は、前記第1通信を優先し、前記計数部が計数した一連の通信の数が閾値を超えた場合には、前記第2通信を優先する。   According to another aspect of the present invention, in the communication device, the selection unit controls switching between the first communication and the second communication for each predetermined series of communication, The counter includes a counting unit that counts the number of the series of communications that are switched to the second communication, the selection unit prioritizes the first communication, and the number of the series of communications counted by the counting unit exceeds a threshold value. In this case, priority is given to the second communication.

また、本発明の一態様は、上記の通信装置において、前記第1通信と前記第2通信は、論理的又は物理的な通信インターフェースが異なり、前記選択部は、前記第1通信の通信インターフェースと前記第2通信のインターフェースとの切り換えを制御する。   In addition, according to one aspect of the present invention, in the communication device, the first communication and the second communication have different logical or physical communication interfaces, and the selection unit includes a communication interface for the first communication. Controls switching to the second communication interface.

また、本発明の一態様は、通信装置における通信方法おいて、記憶部が、第1通信を用いて取得した通信データのHTTPヘッダ情報である第1ヘッダ情報を記憶する記憶過程と、ヘッダ情報取得部が、第2通信を用いて取得した通信データのHTTPヘッダ情報である第2ヘッダ情報を取得する情報取得過程と、選択部が、前記第1ヘッダ情報と前記第2ヘッダ情報とを比較し、前記第1ヘッダ情報のコンテンツサイズと前記第2ヘッダ情報のコンテンツサイズが一致しない場合には、通信の一部又は全部について、前記第1通信と前記第2通信との切り換えを止めると判定する選択過程と、を有する通信方法である。 According to another aspect of the present invention, in the communication method in the communication device, the storage unit stores the first header information which is HTTP header information of the communication data acquired using the first communication, and the header information. An information acquisition process in which the acquisition unit acquires second header information, which is HTTP header information of communication data acquired using the second communication, and the selection unit compares the first header information and the second header information. If the content size of the first header information does not match the content size of the second header information, it is determined that switching between the first communication and the second communication is stopped for a part or all of the communication. And a selection process.

また、本発明の一態様は、通信装置のコンピュータに、第1通信を用いて取得した通信データのHTTPヘッダ情報である第1ヘッダ情報を記憶する記憶手順、第2通信を用いて取得した通信データのHTTPヘッダ情報である第2ヘッダ情報を取得する情報取得手順、前記第1ヘッダ情報と前記第2ヘッダ情報とを比較し、前記第1ヘッダ情報のコンテンツサイズと前記第2ヘッダ情報のコンテンツサイズが一致しない場合には、通信の一部又は全部について、前記第1通信と前記第2通信との切り換えを止めると判定する選択手順、を実行させるための通信プログラムを実行させるための通信プログラムである。 One embodiment of the present invention is a storage procedure for storing first header information, which is HTTP header information of communication data acquired using first communication, in a computer of a communication apparatus, and communication acquired using second communication. Information acquisition procedure for acquiring second header information which is HTTP header information of data, comparing the first header information with the second header information, the content size of the first header information and the content of the second header information A communication program for executing a communication program for executing a selection procedure for determining that switching between the first communication and the second communication is to be stopped for part or all of the communication when the sizes do not match It is.

また、本発明の一態様は、第1通信を用いて取得した通信データのHTTPヘッダ情報である第1ヘッダ情報と第2通信を用いて取得した通信データのHTTPヘッダ情報である第2ヘッダ情報とを比較し、前記第1ヘッダ情報のコンテンツサイズと前記第2ヘッダ情報のコンテンツサイズが一致しない場合には、通信の一部又は全部について、前記第1通信と前記第2通信との切り換えを止めると判定する選択部を備えるプロセッサである。 In addition, according to one aspect of the present invention, first header information that is HTTP header information of communication data acquired using the first communication and second header information that is HTTP header information of communication data acquired using the second communication If the content size of the first header information and the content size of the second header information do not match , switching between the first communication and the second communication is performed for a part or all of the communication. It is a processor provided with the selection part judged to stop .

本発明によれば、適切に無線リンクの切り換えを制御できる。   According to the present invention, switching of radio links can be appropriately controlled.

本発明の第1実施形態に係る通信システムの構成を示す概略図である。It is the schematic which shows the structure of the communication system which concerns on 1st Embodiment of this invention. 本実施形態に係る通信装置の構成を示す概略ブロック図である。It is a schematic block diagram which shows the structure of the communication apparatus which concerns on this embodiment. 本実施形態に係るプロキシ部の構成を示す概略ブロック図である。It is a schematic block diagram which shows the structure of the proxy part which concerns on this embodiment. 本実施形態に係るフォールバックを説明するための説明図である。It is explanatory drawing for demonstrating the fallback which concerns on this embodiment. 本実施形態に係るフェールバックを説明するための説明図である。It is explanatory drawing for demonstrating the failback which concerns on this embodiment. 本実施形態に係る通信装置の状態遷移を表す図である。It is a figure showing the state transition of the communication apparatus which concerns on this embodiment. 本実施形態に係る通信装置の状態遷移についての説明図である。It is explanatory drawing about the state transition of the communication apparatus which concerns on this embodiment. 本実施形態に係る通信装置の処理フローを示す図である。It is a figure which shows the processing flow of the communication apparatus which concerns on this embodiment. 本実施形態に係るプロキシ部の処理フローを示す図である。It is a figure which shows the processing flow of the proxy part which concerns on this embodiment. 本実施形態に係るプロキシ部の処理フローを示す図である。It is a figure which shows the processing flow of the proxy part which concerns on this embodiment. 本実施形態に係るプロキシ部の処理フローを示す別の図である。It is another figure which shows the processing flow of the proxy part which concerns on this embodiment. 本実施形態に係るプロキシ部の処理フローを示す別の図である。It is another figure which shows the processing flow of the proxy part which concerns on this embodiment. 本実施形態に係るプロキシ部の処理フローを示す別の図である。It is another figure which shows the processing flow of the proxy part which concerns on this embodiment. 本実施形態に係るプロキシ部の処理フローを示す別の図である。It is another figure which shows the processing flow of the proxy part which concerns on this embodiment.

(第1実施形態)
以下、図面を参照しながら本発明の第1実施形態について詳しく説明する。
図1は、本発明の第1実施形態に係る通信システムの構成を示す概略図である。この図において、通信システムは、通信装置1、アクセスポイントAP1、基地局装置BS1、及び、サーバ装置Sv101〜104を具備する。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a schematic diagram showing the configuration of a communication system according to the first embodiment of the present invention. In this figure, the communication system includes a communication device 1, an access point AP1, a base station device BS1, and server devices Sv101 to Sv104.

通信装置1は、Wi−Fi(登録商標。以下同じ)、3G(3rd Generation:第3世代移動通信システム)、LTE(Long Term Evolution)等のように、複数の異なる通信を行うことができる装置である。通信装置1は、複数の物理リンクを束ねて、1つの論理リンクとして扱うこと(リンクアグリゲーション)ができる。通信装置1は、例えば、スマートフォン、タブレット端末、フィーチャーフォン、パーソナルコンピュータ、モバイルルーター等である。   The communication device 1 is a device capable of performing a plurality of different communications such as Wi-Fi (registered trademark, the same applies hereinafter), 3G (3rd Generation: third generation mobile communication system), LTE (Long Term Evolution), and the like. It is. The communication device 1 can bundle a plurality of physical links and handle them as one logical link (link aggregation). The communication device 1 is, for example, a smartphone, a tablet terminal, a feature phone, a personal computer, a mobile router, or the like.

アクセスポイントAP1は、通信装置1からの接続要求を受け付けて、ネットワークへの通信を仲介する機器である。例えば、アクセスポイントAP1は、無線LANのアクセスポイントであり、通信装置1とWi−Fiによる通信(無線リンクL1と称する。また、Wi−Fi通信とも称する)を行うことができる。
基地局装置BS1は、携帯電話と直接電波を送受信する装置である。基地局装置BS1は、通信装置1と3G又はLTEによる通信(無線リンクL2と称する)を行うことができる。基地局装置BS1は、携帯電話網N1に接続され、携帯電話網N1を介して、ネットワークN2に接続された機器と通信を行うことができる。例えば、ネットワークN2はインターネットであり、携帯電話網N1と通信プロトコルが異なる。
The access point AP1 is a device that accepts a connection request from the communication device 1 and mediates communication to the network. For example, the access point AP1 is a wireless LAN access point, and can perform communication with the communication device 1 by Wi-Fi (referred to as a wireless link L1 and also referred to as Wi-Fi communication).
Base station apparatus BS1 is an apparatus that directly transmits and receives radio waves to and from a mobile phone. The base station apparatus BS1 can perform communication (referred to as a radio link L2) with the communication apparatus 1 by 3G or LTE. The base station device BS1 is connected to the mobile phone network N1, and can communicate with devices connected to the network N2 via the mobile phone network N1. For example, the network N2 is the Internet and has a communication protocol different from that of the cellular phone network N1.

サーバ装置Sv101は、例えば、ゲートウェイサーバであり、携帯電話網N1とネットワークN2の通信プロトコルの変換等を行う。サーバ装置Sv102は、ネットワークN1に接続され、基地局装置BS1を介して、通信装置1と通信を行うことができる。 サーバ装置Sv103、Sv104は、ネットワークN2に接続され、アクセスポイントAP1、又は、携帯電話網N1と基地局装置BS1を介して、通信装置1と通信を行うことができる。例えば、サーバ装置Sv102、Sv103は、ドメインネームシステム(DNS)のサーバ装置(DNSサーバとも称する)であり、ネットワーク上のホスト名やドメイン名と、IPアドレスとを対応付けたドメインネーム情報を管理する。例えば、サーバ装置Sv104は、コンテンツサーバであり、HTTP(Hypertext Transfer Protocol:ハイパーテキスト・トランスファー・プロトコル)等のプロトコルの通信(HTTP通信と称する)を行う。サーバ装置Sv104は、例えば、HTML形式のコンテンツを、通信装置1へ提供する。   The server device Sv101 is, for example, a gateway server, and performs communication protocol conversion between the mobile phone network N1 and the network N2. The server device Sv102 is connected to the network N1, and can communicate with the communication device 1 via the base station device BS1. The server devices Sv103 and Sv104 are connected to the network N2, and can communicate with the communication device 1 via the access point AP1 or the mobile phone network N1 and the base station device BS1. For example, the server devices Sv102 and Sv103 are domain name system (DNS) server devices (also referred to as DNS servers) and manage domain name information in which host names and domain names on the network are associated with IP addresses. . For example, the server device Sv104 is a content server and performs communication (referred to as HTTP communication) of a protocol such as HTTP (Hypertext Transfer Protocol). The server device Sv104 provides, for example, content in HTML format to the communication device 1.

通信装置1は、無線リンクL1を用いて、HTTP通信を行った場合、HTTPのヘッダ情報H1を取得して記憶する。その後、例えば無線リンクL1の品質が低下したことを検出した場合、通信装置1は、無線リンクL2を用いて、HTTPのレンジリクエストを行う。レンジリクエストとは、データの範囲を指定して、データの一部分だけを要求する指令である。具体的には、通信装置1は、HTTPのヘッダフィールドで「Range:bytes=501−」と指定することで、501バイトより後のデータを要求して、取得(ダウンロード)できる。   When performing HTTP communication using the wireless link L1, the communication device 1 acquires and stores HTTP header information H1. After that, for example, when it is detected that the quality of the wireless link L1 has deteriorated, the communication device 1 makes an HTTP range request using the wireless link L2. A range request is a command that specifies a data range and requests only a portion of the data. Specifically, the communication device 1 can request and acquire (download) data after 501 bytes by designating “Range: bytes = 501-” in the header field of HTTP.

通信装置1は、無線リンクL1を用いて取得したヘッダ情報H1と、無線リンクL2を用いて取得したヘッダ情報H2と、を比較するヘッダ比較処理を行う。ヘッダ比較処理においては、通信装置1は、例えばヘッダ情報のうち、HTTPのデータ部分(ボディ情報とも称する)に差分があると判断できる情報(Content−Lengthなどの情報)を比較する。ヘッダ比較処理の結果、ヘッダ情報H1とヘッダ情報H2が同じであると判定した場合、通信装置1は、無線リンクL1から無線リンクL2の切り換え(フォールバックと称する)を行う。なお、通信装置1は、フォールバックを行う場合、通信のインターフェースを変える。その結果、通信装置1は、例えば、通信に用いるIPアドレスやポート番号を変更する。なお、フォールバックは、Wi−FiとLTE等、通信種別を変える場合に限られず、Wi−Fi通信同士で行われてもよい。つまり、例えば、Wi−Fi通信のインターフェースが2個以上ある場合、フォールバックには、Wi−Fi通信のままインターフェースを変更することも含まれる。なお、インターフェースは、物理的なインターフェースに限らず、論理的なインターフェースであってもよい。論理的なインターフェースとは、例えば、VPN(Virtual Private Network)におけるインターフェースである。
一方、ヘッダ比較処理の結果、ヘッダ情報H1とヘッダ情報H2の全部又は一部が同じでないと判定した場合、つまり、HTTPのデータ部分に差分がある場合、通信装置1は、フォールバックを中止する。これにより、通信装置1は、例えばアクセスの度に異なるコンテンツが返答されるような場合でも、無線リンクL1を用いてフォールバック前と同じコンテンツの続きを取得できる。つまり、通信装置1は、フォールバックによって、無線リンクL1を用いて取得したデータと無線リンクL2を用いて取得したデータを結合してしまい、データの不整合が生じることを防止できる。
The communication device 1 performs a header comparison process that compares the header information H1 acquired using the wireless link L1 and the header information H2 acquired using the wireless link L2. In the header comparison process, for example, the communication device 1 compares information (information such as Content-Length) that can be determined to have a difference in the HTTP data portion (also referred to as body information) in the header information. As a result of the header comparison process, when it is determined that the header information H1 and the header information H2 are the same, the communication device 1 performs switching (referred to as fallback) from the wireless link L1 to the wireless link L2. Note that the communication device 1 changes the communication interface when performing fallback. As a result, the communication device 1 changes, for example, the IP address and port number used for communication. Note that fallback is not limited to changing the communication type, such as Wi-Fi and LTE, and may be performed between Wi-Fi communications. That is, for example, when there are two or more Wi-Fi communication interfaces, fallback includes changing the interface while maintaining Wi-Fi communication. The interface is not limited to a physical interface but may be a logical interface. The logical interface is, for example, an interface in VPN (Virtual Private Network).
On the other hand, if it is determined as a result of the header comparison processing that the header information H1 and the header information H2 are not all or partly the same, that is, if there is a difference in the HTTP data part, the communication device 1 stops the fallback. . Thereby, the communication apparatus 1 can acquire the continuation of the same content as before fallback using the wireless link L1 even when different content is returned for each access, for example. That is, the communication device 1 can prevent data inconsistency by combining data acquired using the wireless link L1 and data acquired using the wireless link L2 by fallback.

なお、ヘッダ比較処理の結果、ヘッダ情報H1とヘッダ情報H2が同じでないと判定した場合、通信装置1は、無線リンクL2を用いて取得したヘッダ情報に応じて、再度、フォールバックを試みてもよい。例えば、通信装置1は、無線リンクL2を用いて取得したヘッダ情報H2のうち、ステータスコードがリダイレクションを示す場合、再度、リダイレクション先に対して、HTTPのレンジリクエストを行う。ここで、ステータスコードがリダイレクションすることを示す場合とは、例えば、ステータスコードに移動先のURLが付されている場合である。具体的には、そのときのステータスコードは、「302」(Moved Permanently:恒久的に移動)、「303」(Found:発見)、「307」(Temporary Redirect)等である。   If it is determined as a result of the header comparison process that the header information H1 and the header information H2 are not the same, the communication device 1 may try fallback again according to the header information acquired using the wireless link L2. Good. For example, when the status code indicates redirection in the header information H2 acquired using the wireless link L2, the communication device 1 makes an HTTP range request to the redirection destination again. Here, the case where the status code indicates redirection is, for example, a case where the destination URL is attached to the status code. Specifically, the status code at that time is “302” (Moved Permanently), “303” (Found), “307” (Temporary Redirect), or the like.

通信装置1は、レンジリクエストの結果、リダイレクト先からヘッダ情報H2’を取得する(RD先情報取得処理とも称する)。通信装置1は、取得したヘッダ情報H2’を用いてヘッダ比較処理を行い、ヘッダ情報H1とヘッダ情報H2’が同じであると判定した場合、フォールバックを行う。一方、通信装置1は、ヘッダ情報H1とヘッダ情報H2’が同じでないと判定した場合、フォールバックを中止する。   As a result of the range request, the communication apparatus 1 acquires header information H2 'from the redirect destination (also referred to as RD destination information acquisition processing). The communication device 1 performs a header comparison process using the acquired header information H2 ', and performs a fallback when determining that the header information H1 and the header information H2' are the same. On the other hand, if the communication device 1 determines that the header information H1 and the header information H2 'are not the same, the communication device 1 stops the fallback.

また、通信装置1は、例えば、アプリケーションからの要求毎に、セッション単位でフォールバックを行うか否かを判定する。1つのセッションのフォールバック(FB)を、単一フォールバックとも称する。通信装置1は、単一フォールバックの数(後述するFBセッション数)を計数し、予め定めた許容数を超えた場合、無線リンクL1を「通信不能」と判定する(この場合の無線リンクL1を不要リンクとも称する)。この場合、通信装置1は、アプリケーションからの通信要求があったときには、無線リンクL2を用いて通信を行う、「強制フォールバックモード」の状態へ遷移する。   Further, for example, the communication device 1 determines whether or not to perform fallback for each session for each request from the application. One session fallback (FB) is also referred to as single fallback. The communication apparatus 1 counts the number of single fallbacks (the number of FB sessions to be described later), and determines that the radio link L1 is “communication impossible” when the predetermined allowable number is exceeded (the radio link L1 in this case) Is also referred to as an unnecessary link). In this case, when there is a communication request from an application, the communication device 1 makes a transition to a “forced fallback mode” state in which communication is performed using the wireless link L2.

以上により、通信装置1は、フォールバック時にヘッダ情報の内容を比較することで、同一のコンテンツであるかどうかを確認し、想定外のデータ(未更新データなど)をアプリケーションに送信してしまうことを未然に防ぐことができる。
また、通信装置1は、フォールバック時にリダイレクトされた場合でも、ヘッダ情報が同じものを取得できた場合、つまり、最終的にコンテンツが同じである場合、フォールバックを行うことができる。
通信装置1は、「強制フォールバックモード」に遷移させることで、不要リンクへの通信確立を試みるコストが不要となり、すぐに良好な通信を行うことができる。なお、通信装置1は、不要リンクと判断された無線リンクL1への接続を復帰させたい場合、ヘッダ比較処理を行ってもよく、それにより、効率的に再利用を開始することができる。
As described above, the communication device 1 confirms whether the contents are the same by comparing the contents of the header information at the time of fallback, and transmits unexpected data (unupdated data, etc.) to the application. Can be prevented in advance.
Further, even when the communication apparatus 1 is redirected at the time of fallback, the communication apparatus 1 can perform the fallback when the same header information can be obtained, that is, when the content is finally the same.
By switching to the “forced fallback mode”, the communication device 1 eliminates the cost of trying to establish communication with an unnecessary link, and can immediately perform good communication. Note that the communication device 1 may perform a header comparison process when it is desired to restore the connection to the wireless link L1 that is determined to be an unnecessary link, thereby efficiently starting reuse.

<通信装置1について>
図2は、本実施形態に係る通信装置1の構成を示す概略ブロック図である。通信装置1は、入力部11、出力部12、制御部13、記憶部14、及び通信部15を含んで構成される。制御部13は、アプリケーション部131とプロキシ部P1を含んで構成される。通信部15は、N個のインターフェース151−1〜151−N、及び信号強度検出部152を含んで構成される。
<About the communication device 1>
FIG. 2 is a schematic block diagram illustrating a configuration of the communication device 1 according to the present embodiment. The communication device 1 includes an input unit 11, an output unit 12, a control unit 13, a storage unit 14, and a communication unit 15. The control unit 13 includes an application unit 131 and a proxy unit P1. The communication unit 15 includes N interfaces 151-1 to 151-N and a signal strength detection unit 152.

入力部11は、通信装置1のユーザからの入力を受け付け、受け付けた入力を示す情報を制御部13へ出力する。例えば、入力部11は、ユーザからフォールバックを許可することを示す情報、又は、フォールバックを許可しないことを示す情報を受け付け、フォールバックへ出力する。入力部11は、例えば、タッチパネルやボタン、キーボード、カメラである。
出力部12は、制御部13の制御に基づいて、出力を行う。出力部12は、例えば、ディスプレイやスピーカー、振動子、発光素子である。
The input unit 11 receives an input from the user of the communication device 1 and outputs information indicating the received input to the control unit 13. For example, the input unit 11 receives information indicating that fallback is permitted from the user or information indicating that fallback is not permitted, and outputs the information to the fallback. The input unit 11 is, for example, a touch panel, buttons, a keyboard, or a camera.
The output unit 12 performs output based on the control of the control unit 13. The output unit 12 is, for example, a display, a speaker, a vibrator, or a light emitting element.

制御部13は、入力部11や通信部15から入力された情報、又は記憶部14が記憶する情報に基づいて、通信装置1の各部を制御する。制御部13のうち、アプリケーション部131は、記憶部14からプログラムを読み込み、読み込んだプログラムを実行することで、様々なアプリケーション機能を発揮する。   The control unit 13 controls each unit of the communication device 1 based on information input from the input unit 11 or the communication unit 15 or information stored in the storage unit 14. Of the control unit 13, the application unit 131 reads various programs from the storage unit 14 and executes various programs by executing the read program.

プロキシ部P1は、制御部13が生成した情報を、一又は複数のインターフェース151−n(n=1、2、・・・、N)を介して、送信させる。例えば、プロキシ部P1は、入力部11や通信部15から入力された情報、又は記憶部14が記憶する情報に基づいて、通信部15のインターフェース151−1〜151−Nの中から、一又は複数のインターフェース151−nを選択する。プロキシ部P1は、選択した一又は複数のインターフェース151−nを介して、アプリケーション部131が生成した情報を送信する。
また、プロキシ部P1は、複数のインターフェース151−nが情報を受信した場合、受信した情報を合成する。例えば、プロキシ部P1は、複数のインターフェース151−nを時間的に切り換えた場合、切り換え前後のデータを合成してもよい。プロキシ部P1の詳細については、後述する。
The proxy unit P1 causes the information generated by the control unit 13 to be transmitted via one or a plurality of interfaces 151-n (n = 1, 2,..., N). For example, the proxy unit P1 may select one or more of the interfaces 151-1 to 151-N of the communication unit 15 based on information input from the input unit 11 or the communication unit 15 or information stored in the storage unit 14. A plurality of interfaces 151-n are selected. The proxy unit P1 transmits the information generated by the application unit 131 via the selected one or more interfaces 151-n.
Moreover, the proxy part P1 synthesize | combines the received information, when the some interface 151-n receives information. For example, when the plurality of interfaces 151-n are switched over time, the proxy unit P1 may combine the data before and after the switching. Details of the proxy unit P1 will be described later.

通信部15は、複数の通信方式の通信を行うことができる。例えば、インターフェース151−1は、Wi−Fi通信を行うことができる。インターフェース151−2は、LTEによる通信(LTE通信とも称する)を行うことができる。また、インターフェース151−3は、3Gによる通信(3G通信とも称する)を行うことができる。なお、インターフェース151−nは、無線通信に限らず、有線通信を行うものであってもよい。また、インターフェース151−nは、物理的なインターフェースに限らず、論理的なインターフェースであってもよい。   The communication unit 15 can perform communication of a plurality of communication methods. For example, the interface 151-1 can perform Wi-Fi communication. The interface 151-2 can perform LTE communication (also referred to as LTE communication). The interface 151-3 can perform 3G communication (also referred to as 3G communication). Note that the interface 151-n is not limited to wireless communication, and may perform wired communication. Further, the interface 151-n is not limited to a physical interface, and may be a logical interface.

信号強度検出部152は、インターフェース151−n毎に、通信信号の受信する信号の強度(受信信号強度)を示す信号強度情報を検出する。例えば、信号強度検出部152は、インターフェース151−1による通信(Wi−Fi通信)では、RSSI(Received Signal Strength Indicator(又はIndication))を検出する。また、インターフェース151−2、15−3による通信(LTE通信、3G通信)では、CQI(Channel Quality Indicator)を検出してもよい。信号強度検出部152は、検出した信号強度情報を、制御部13(例えば、プロキシ部P1)へ出力する。   The signal strength detection unit 152 detects signal strength information indicating the strength of the signal received by the communication signal (reception signal strength) for each interface 151-n. For example, the signal strength detection unit 152 detects an RSSI (Received Signal Strength Indicator (or Indication)) in communication via the interface 151-1 (Wi-Fi communication). Further, in communication (LTE communication, 3G communication) by the interfaces 151-2 and 15-3, CQI (Channel Quality Indicator) may be detected. The signal strength detection unit 152 outputs the detected signal strength information to the control unit 13 (for example, the proxy unit P1).

<プロキシ部P1について>
図3は、本実施形態に係るプロキシ部P1の構成を示す概略ブロック図である。プロキシ部P1は、セッション管理部P111、DNS管理部P112、スループット取得部P113、容量情報取得部P114、信号強度取得部P121、計時部P122、AP(アクセスポイント)情報取得部P123、通信方式情報取得部P124、位置情報取得部P125、ヘッダ情報取得部P131、リダイレクト情報取得部P132、IF選択部P14、及び、データ合成部P15を含んで構成される。
<About proxy part P1>
FIG. 3 is a schematic block diagram illustrating a configuration of the proxy unit P1 according to the present embodiment. The proxy unit P1 includes a session management unit P111, a DNS management unit P112, a throughput acquisition unit P113, a capacity information acquisition unit P114, a signal strength acquisition unit P121, a timekeeping unit P122, an AP (access point) information acquisition unit P123, and a communication method information acquisition. Part P124, position information acquisition part P125, header information acquisition part P131, redirect information acquisition part P132, IF selection part P14, and data composition part P15.

セッション管理部P111は、セッションを管理する。セッションとは、一連の通信のことであり、例えば、接続を確立してから切断するまでの単位である。例えば、セッションは、アプリケーションからのリクエスト毎に生成され、各リクエストに対する応答後に、それぞれのセッションが終了する。具体的には、セッション管理部P111は、セッションの識別情報(セッション識別情報とも称する)、セッションの開始時刻、セッションの終了時刻、リクエストの識別情報、リクエストをしたアプリケーションの識別情報、セッション確立の成否、セッション異常の理由を示すセッション異常理由情報、セッションに用いた無線リンクを示す情報等を、記憶部14に記憶させ、参照や更新をすることで、セッションを管理する。セッション異常には、セッションの確立に失敗やセッションのタイムアウト等があり、その理由には、接続エラー、通信エラー、ソケットエラー、又はタイムアウト等がある。   The session management unit P111 manages a session. A session is a series of communications, for example, a unit from establishing a connection to disconnecting. For example, a session is generated for each request from the application, and each session ends after a response to each request. Specifically, the session management unit P111 includes session identification information (also referred to as session identification information), session start time, session end time, request identification information, request application identification information, and success or failure of session establishment. The session abnormality reason information indicating the reason for the session abnormality, the information indicating the wireless link used for the session, and the like are stored in the storage unit 14, and the session is managed by referring to and updating. Session abnormalities include failure to establish a session, timeout of the session, etc., and there are a connection error, a communication error, a socket error, a timeout, and the like.

セッション管理部P111は、セッションが確立できなかった場合(例えば、接続失敗)やセッションがタイムアウトした場合等、セッション異常が発生したときには、セッション異常を示すセッション異常情報とセッション異常理由情報を、セッション識別情報と対応付けて、IF選択部P14へ出力する。
また、セッション管理部P111は、フォールバックをしているセッション数(FBセッション数とも称する)を計数し、計数したFBセッション数を示すFBセッション数情報を、IF選択部P14へ出力する。なお、フォールバックは、セッション毎に発生し、セッション単位で発生するフォールバックのことを、「単一フォールバック」とも称する。
When a session abnormality occurs, such as when a session cannot be established (for example, connection failure) or when the session times out, the session management unit P111 identifies session abnormality information indicating session abnormality and session abnormality reason information as a session identification. The information is output to the IF selection unit P14 in association with the information.
In addition, the session management unit P111 counts the number of sessions performing fallback (also referred to as the number of FB sessions), and outputs FB session number information indicating the counted number of FB sessions to the IF selection unit P14. Note that fallback occurs for each session, and fallback that occurs in session units is also referred to as “single fallback”.

DNS管理部P112は、通信装置1において、ドメインネーム情報を管理する。DNS管理部P112は、例えば、コンテンツサーバのドメイン名をDNSサーバへ送信し、IPアドレスを取得する。このDNS管理部P112の処理を、名前解決処理とも称する。
DNS管理部P112は、名前解決処理に異常が発生したときには、名前解決の異常を示す名前解決異常情報と名前解決の異常の理由を示す名前解決異常理由情報を、セッション識別情報と対応付けて、IF選択部P14へ出力する。名前解決の異常には、名前解決処理の失敗(例えば、接続失敗)や名前解決処理のタイムアウト等があり、その理由には、ホスト名又はドメイン名の不登録、未登録や通信エラー、タイムアウト等がある。
The DNS management unit P112 manages domain name information in the communication device 1. For example, the DNS management unit P112 transmits the domain name of the content server to the DNS server, and acquires the IP address. This processing of the DNS management unit P112 is also referred to as name resolution processing.
When an abnormality occurs in the name resolution process, the DNS management unit P112 associates name resolution abnormality information indicating the name resolution abnormality and name resolution abnormality reason information indicating the reason for the name resolution abnormality with the session identification information, Output to the IF selector P14. Name resolution abnormalities include name resolution failure (for example, connection failure), name resolution timeout, etc., due to host name or domain name not registered, unregistered, communication error, timeout, etc. There is.

スループット取得部P113は、通信部15の送受信する情報量に基づいて、通信のスループットを算出する。スループットとは、一定時間内に通信したデータ量のことである。本実施形態のスループットは、下りの通信、つまり、アクセスポイントAP1又は基地局装置BS1から通信装置1への通信のスループットとするが、本発明は、これに限られない。スループット取得部P113は、算出したスループットを示すスループット情報を、セッション識別情報と対応付けて、IF選択部P14へ出力する。   The throughput acquisition unit P113 calculates the communication throughput based on the amount of information transmitted and received by the communication unit 15. Throughput is the amount of data communicated within a certain time. The throughput of the present embodiment is the throughput of downlink communication, that is, communication from the access point AP1 or the base station apparatus BS1 to the communication apparatus 1, but the present invention is not limited to this. The throughput acquisition unit P113 outputs throughput information indicating the calculated throughput to the IF selection unit P14 in association with the session identification information.

容量情報取得部P114は、通信に関する各情報の容量を管理し、その容量を示す容量情報を生成する。例えば、容量情報取得部P114は、コンテンツサーバから通信によって取得するコンテンツの容量(コンテンツサイズとも称する)を取得し、また、当該コンテンツについての現在取得済みの容量(DL済サイズとも称する)を算出する。また、容量情報取得部P114は、フォールバックを許容する容量(FB許容サイズとも称する)を、予め記憶する記憶部14から読み出す。容量情報取得部P114は、コンテンツサイズ、DL済サイズ、又はFB許容サイズを示す容量情報を、IF選択部P14へ出力する。なお、容量情報は、セッション毎の各容量を示す場合、セッション識別情報と対応付けて、IF選択部P14へ出力される。
信号強度取得部P121は、信号強度検出部152からインターフェース151−n毎の信号強度情報を取得し、取得した信号強度情報をIF選択部P14へ出力する。
The capacity information acquisition unit P114 manages the capacity of each piece of information related to communication, and generates capacity information indicating the capacity. For example, the capacity information acquisition unit P114 acquires the capacity (also referred to as content size) of content acquired by communication from the content server, and calculates the currently acquired capacity (also referred to as DL size) for the content. . In addition, the capacity information acquisition unit P114 reads the capacity that allows fallback (also referred to as FB allowable size) from the storage unit 14 that stores it in advance. The capacity information acquisition unit P114 outputs the capacity information indicating the content size, the DL completed size, or the FB allowable size to the IF selection unit P14. In addition, when capacity | capacitance information shows each capacity | capacitance for every session, it matches with session identification information and is output to IF selection part P14.
The signal strength acquisition unit P121 acquires signal strength information for each interface 151-n from the signal strength detection unit 152, and outputs the acquired signal strength information to the IF selection unit P14.

計時部P122は、計時を行う。例えば、計時部P122は、フォールバック状態C13(後述)に遷移してからの経過時間を計時する。計時部P122は、この経過時間が設定値(例えば、1分)を超えた場合、時間超過を示す時間超過情報をセッション識別情報と対応付けて、IF選択部P14へ出力する。
AP情報取得部P123は、現在通信をしているアクセスポイント或いは基地局の識別情報又はネットワークの識別情報(BSSID又はESSID等)を取得する。AP情報取得部P123は、取得した識別情報(AP識別情報とも称する)を、IF選択部P14へ出力する。
The time measurement unit P122 measures time. For example, the time measurement unit P122 measures the elapsed time after transition to the fallback state C13 (described later). When the elapsed time exceeds a set value (for example, 1 minute), the time measuring unit P122 associates the time excess information indicating the time excess with the session identification information and outputs it to the IF selection unit P14.
The AP information acquisition unit P123 acquires the identification information of the access point or base station that is currently communicating or the identification information of the network (such as BSSID or ESSID). The AP information acquisition unit P123 outputs the acquired identification information (also referred to as AP identification information) to the IF selection unit P14.

通信方式情報取得部P124は、現在通信に用いている通信方式を示す通信方式情報を生成する。例えば、通信方式情報取得部P124は、LTE通信を行っているときにはLTEを示す通信方式情報、3G通信を行っているときには3Gを示す通信方式情報を生成する。通信方式情報取得部P124は、生成した通信方式情報を、IF選択部P14へ出力する。
位置情報取得部P125は、例えば、GPS(Global Positioning System,全地球測位網)機能により、通信装置1の現在位置を測位する。位置情報取得部P125は、測位した通信装置1の現在位置を示す位置情報を、IF選択部P14へ出力する。なお、位置情報取得部P125は、基地局装置BS1の基地局情報であって通信装置1のおおよその位置を推定可能な基地局情報(例えば、通信装置1が接続中の基地局装置を示す情報や基地局装置の位置を示す情報)を取得し、取得した基地局情報を位置情報として、IF選択部P14へ出力してもよい。
The communication method information acquisition unit P124 generates communication method information indicating the communication method currently used for communication. For example, the communication method information acquisition unit P124 generates communication method information indicating LTE when performing LTE communication, and communication method information indicating 3G when performing 3G communication. The communication method information acquisition unit P124 outputs the generated communication method information to the IF selection unit P14.
The position information acquisition unit P125 measures the current position of the communication device 1 using, for example, a GPS (Global Positioning System) function. The position information acquisition unit P125 outputs position information indicating the current position of the measured communication device 1 to the IF selection unit P14. The location information acquisition unit P125 is base station information of the base station device BS1 and can estimate an approximate location of the communication device 1 (for example, information indicating a base station device to which the communication device 1 is connected). Or information indicating the position of the base station apparatus), and the acquired base station information may be output as position information to the IF selection unit P14.

ヘッダ情報取得部P131は、通信部15の送受信する情報から、セッション毎にHTTPのヘッダ情報を取得する。ヘッダ情報取得部P131は、取得したヘッダ情報を、セッション識別情報と対応付けて、IF選択部P14へ出力する。なお、ヘッダ情報取得部P131は、インターフェース151−n毎に、HTTPのヘッダ情報を取得してもよい。
リダイレクト情報取得部P132は、通信部15の送受信する情報から、セッション毎にHTTPのステータスコードを取得する。リダイレクト情報取得部P132は、取得しステータスコードを、セッション識別情報と対応付けて、IF選択部P14へ出力する。ここで、ステータスコードがリダイレクションを示す場合、リダイレクト情報取得部P132は、リダイレクション先を示す情報も取得し、IF選択部P14へ出力する。
The header information acquisition unit P131 acquires HTTP header information for each session from the information transmitted and received by the communication unit 15. The header information acquisition unit P131 outputs the acquired header information to the IF selection unit P14 in association with the session identification information. The header information acquisition unit P131 may acquire HTTP header information for each interface 151-n.
The redirect information acquisition unit P132 acquires an HTTP status code for each session from the information transmitted and received by the communication unit 15. The redirect information acquisition unit P132 outputs the acquired status code to the IF selection unit P14 in association with the session identification information. If the status code indicates redirection, the redirect information acquisition unit P132 also acquires information indicating the redirection destination and outputs the information to the IF selection unit P14.

IF選択部P14は、通信装置1の各部から入力された情報に基づいて、セッション毎に、通信を行うインターフェース151−1〜151−Nを選択する。IF選択部P14は、セッション毎に選択したインターフェース151−nにより、そのセッションでの通信を行わせる。これにより、IF選択部P14は、各セッションの無線リンクを切り換える。つまり、IF選択部P14は、フォールバックとフェールバックを制御する。
データ合成部P15は、通信部15の受信した情報を合成し、合成後の情報を、例えばアプリケーション部131や記憶部14へ出力する。例えば、データ合成部P15は、あるセッションにおいて、少なくとも2つのインターフェース151−nを時間的に切り換えた場合、切り換え前後のデータを合成する。
The IF selection unit P14 selects interfaces 151-1 to 151-N for performing communication for each session based on information input from each unit of the communication device 1. The IF selection unit P14 causes communication in the session to be performed by the interface 151-n selected for each session. Thereby, IF selection part P14 switches the radio link of each session. That is, the IF selection unit P14 controls fallback and failback.
The data synthesis unit P15 synthesizes the information received by the communication unit 15, and outputs the synthesized information to, for example, the application unit 131 and the storage unit 14. For example, when at least two interfaces 151-n are temporally switched in a certain session, the data synthesis unit P15 synthesizes data before and after switching.

<フォールバックについて>
図4は、本実施形態に係るフォールバックを説明するための説明図である。
この図において、符号C11を付した図は通常状態C11を表し、符号C12を付した図は単一フォールバックの状態C12を表し、符号C13を付した図はフォールバックの状態(フォールバック状態とも称する)C13を表す。通常状態C11から状態C12へは、通信が失敗した場合に遷移する。また、状態C12から状態C13へは、FBセッション数が許容数(単に許容数とも称する)を超えた場合に遷移する。なお、通信部15からホストへ向かう矢印各々は、各セッションの通信を表す。
<About fallback>
FIG. 4 is an explanatory diagram for explaining fallback according to the present embodiment.
In this figure, the figure with the reference C11 represents the normal state C11, the figure with the reference C12 represents the single fallback state C12, and the figure with the reference C13 represents the fallback state (also called the fallback state). C13). Transition from the normal state C11 to the state C12 occurs when communication fails. Also, the state C12 transitions to the state C13 when the number of FB sessions exceeds the allowable number (also simply referred to as the allowable number). Each arrow from the communication unit 15 to the host represents communication of each session.

通常状態C11では、通信部15とホスト(例えば、アクセスポイントAP1及び基地局装置BS1)は、全てのセッションにおいて、Wi−Fi通信を行う状態である。状態C12は、一部のセッションについて、Wi−Fi通信C121を止め、LTE通信又は3G通信(セルラー通信とも称する)C122へ切り換わった状態である。つまり、状態C12は、あるセッションに対して、通信C121から通信C122へ、単一フォールバックが行われた状態である。
状態C13は、全てのセッションにおいて、セルラー通信を行う状態である。状態C13は、セルラー通信が優先される状態であり、例えば、許容数を超えた場合、他のWi−Fi通信からセルラー通信へ遷移される状態である。なお、許容数を超えた場合、Wi−Fi通信を行っている最中のセッションがあった場合、そのセッションは、その通信の完了後に、セルラー通信へ遷移される。また、状態C13は、新規のセッションに対して、セルラー通信が割り当てられる状態である。
In the normal state C11, the communication unit 15 and the host (for example, the access point AP1 and the base station apparatus BS1) perform Wi-Fi communication in all sessions. The state C12 is a state in which, for some sessions, the Wi-Fi communication C121 is stopped and switched to LTE communication or 3G communication (also referred to as cellular communication) C122. That is, the state C12 is a state in which a single fallback is performed from the communication C121 to the communication C122 for a certain session.
The state C13 is a state in which cellular communication is performed in all sessions. The state C13 is a state in which cellular communication is prioritized, and is a state in which, for example, when the allowable number is exceeded, the state is shifted from another Wi-Fi communication to the cellular communication. When the allowable number is exceeded and there is a session in which Wi-Fi communication is being performed, the session is transitioned to cellular communication after the communication is completed. The state C13 is a state in which cellular communication is assigned to a new session.

以下、フォールバックについて、図2、3を参照しながら詳細を説明する。なお、以下では、フォールバックを行う元の無線リンクを「FB元リンク」とも称し、フォールバックを行う先の無線リンクを「FB先リンク」とも称する。例えば、FB元リンクはWi−Fi通信であり、FB先リンクはLTE通信である。また、「FB元リンク」の場合に通信を行うインターフェース151−i(i=1,2,・・・,Nのいずれか)をFB元インターフェース151−iとも称し、「FB先リンク」の場合に通信を行うインターフェース151−k(k=1,2,・・・,Nのいずれか、k≠i)をFB先インターフェース151−kとも称する。   Hereinafter, details of the fallback will be described with reference to FIGS. In the following, the original radio link that performs fallback is also referred to as “FB source link”, and the destination radio link that performs fallback is also referred to as “FB destination link”. For example, the FB source link is Wi-Fi communication, and the FB destination link is LTE communication. Further, the interface 151-i (i = 1, 2,..., N) that performs communication in the case of the “FB source link” is also referred to as the FB source interface 151-i, and in the case of the “FB destination link”. The interface 151-k (k = 1, 2,..., N, k ≠ i) that performs communication is also referred to as an FB destination interface 151-k.

単一フォールバックを行う条件(単一フォールバック条件とも称する)は、次の(A1)〜(A6)のいずれかである。
(A1)セッションがタイムアウトしたとき
(A2)名前解決処理がタイムアウトしたとき
(A3)スループットが低下したとき
(A4)セッションが確立できなかったとき
(A5)名前解決処理に失敗したとき
(A6)通信中にソケットエラーが発生したとき
以下、これらの(A1)〜(A6)について説明する。
A condition for performing a single fallback (also referred to as a single fallback condition) is one of the following (A1) to (A6).
(A1) When session times out (A2) When name resolution processing times out (A3) When throughput decreases (A4) When session cannot be established (A5) When name resolution processing fails (A6) Communication When a socket error occurs during the following, these (A1) to (A6) will be described.

(A1)セッションがタイムアウトしたとき
通信装置1は、ホストとのソケット接続をした時にタイムアウトした場合、単一フォールバックを行う。ここで、ソケット接続とは、接続要求用のインターフェース(例えば、socket()、bind()等)による接続である。具体的には、IF選択部P14は、入力されたセッション異常情報がタイムアウトを示す場合、セッション識別情報が示すセッションの通信について、FB先インターフェース151−kを選択する。これにより、通信装置1は、FB元インターフェース151−iでの通信からFB先インターフェース151−kでの通信へ切り換えることができ、FB元リンクからFB先リンクへ通信を切り換える。
(A1) When the session times out If the communication device 1 times out when making a socket connection with the host, the communication device 1 performs a single fallback. Here, the socket connection is a connection through a connection request interface (for example, socket (), bind (), etc.). Specifically, if the input session abnormality information indicates a timeout, the IF selection unit P14 selects the FB destination interface 151-k for communication of the session indicated by the session identification information. Accordingly, the communication device 1 can switch from communication at the FB source interface 151-i to communication at the FB destination interface 151-k, and switch communication from the FB source link to the FB destination link.

セッション管理部P111は、セルラー接続(LTE通信又は3G通信の接続)の場合、タイムアウト時間を、予め記憶する記憶部14から読み出す。セルラー接続の場合、タイムアウト時間は、例えば、固定値(例えば、3000ミリ秒)である。
セッション管理部P111は、各通信種別(Wi−Fi又はセルラーの種別)のソケット接続に対する応答が、その通信種別のタイムアウト時間を超えた場合、セッション異常とする。例えば、セッション管理部P111は、Java(登録商標。以下同じ)のプログラム(クラス、インスタンス、メソッド、又は属性等も、プログラムと称する)の場合、Connect()にタイムアウト時間を設定し、SocketTimeoutExceptionが発生した場合、セッション異常とする。その場合、セッション管理部P111は、タイムアウトを示すセッション異常情報を、IF選択部P14へ出力する。
In the case of cellular connection (LTE communication or 3G communication connection), the session management unit P111 reads the timeout time from the storage unit 14 that stores the timeout time in advance. In the case of a cellular connection, the timeout time is, for example, a fixed value (for example, 3000 milliseconds).
The session management unit P111 determines that the session is abnormal when the response to the socket connection of each communication type (Wi-Fi or cellular type) exceeds the timeout time of the communication type. For example, in the case of a Java (registered trademark, the same applies hereinafter) program (class, instance, method, attribute, etc. are also referred to as a program), the session management unit P111 sets a timeout time in Connect () and generates a SocketTimeoutException. If it does, the session is abnormal. In that case, the session management unit P111 outputs session abnormality information indicating a timeout to the IF selection unit P14.

(A2)名前解決処理がタイムアウトしたとき
通信装置1は、名前解決でDNSサーバへ接続をした時にタイムアウトした場合に単一フォールバックを行う。なお、Wi−Fi通信の場合、DNS管理部P112は、DNSサーバからホスト名等を取得する。具体的には、IF選択部P14は、入力された名前解決異常情報がタイムアウトを示す場合、セッション識別情報が示すセッションの通信について、FB先インターフェース151−kを選択する。
(A2) When the name resolution process times out The communication apparatus 1 performs a single fallback when the timeout occurs when connecting to the DNS server by name resolution. In the case of Wi-Fi communication, the DNS management unit P112 acquires a host name and the like from the DNS server. Specifically, if the input name resolution abnormality information indicates a timeout, the IF selection unit P14 selects the FB destination interface 151-k for communication of the session indicated by the session identification information.

なお、DNS管理部P112は、DNSサーバへの接続のタイムアウト時間を、予め記憶する記憶部14から読み出す。セルラー接続のタイムアウト時間は、例えば、固定値(例えば、1000ミリ秒)である。また、DNS管理部P112は、DNSサーバへの接続がタイムアウトした場合、例えば1秒後に、再接続(リトライ)を行う。再接続に失敗した場合、DNS管理部P112は、名前解決異常とする。また、DNS管理部P112は、Javaのプログラムの場合、InterruptedIOExceptionが発生した場合、名前解決異常とする。InterruptedIOExceptionは、入出力処理で割り込みが発生したことを通知するシグナルを発生させる。DNS管理部P112は、名前解決異常とした場合、名前解決異常情報を、IF選択部P14へ出力する。   Note that the DNS management unit P112 reads out the timeout time for connection to the DNS server from the storage unit 14 that stores in advance. The timeout time of the cellular connection is, for example, a fixed value (for example, 1000 milliseconds). In addition, when the connection to the DNS server times out, the DNS management unit P112 performs reconnection (retry) after 1 second, for example. If reconnection fails, the DNS management unit P112 determines that name resolution is abnormal. Also, in the case of a Java program, the DNS management unit P112 determines that name resolution is abnormal when an Interrupted IOException occurs. Interrupted IOException generates a signal notifying that an interrupt has occurred in the input / output process. When the DNS management unit P112 determines that the name resolution is abnormal, the DNS management unit P112 outputs the name resolution abnormality information to the IF selection unit P14.

(A3)スループットが低下したとき
通信装置1は、スループットが低下した場合、単一フォールバックを行う。具体的には、IF選択部P14は、入力されたスループット情報が示すスループットが、記憶部14が記憶する閾値(スループット閾値とも称する)以下になった場合、セッション識別情報が示すセッションの通信について、FB先インターフェース151−kを選択する。
なお、スループット閾値は、通信方式に応じて異なる値であってもよい。例えば、スループット閾値は、LTE通信の場合には512Kbpsである。一方、UMTS/HS(D)PA(Universal Mobile Telecommunications System/High Speed (Downlink) Packet Access)の場合には、スループット閾値は、256Kbpsである。
(A3) When throughput decreases When the throughput decreases, the communication device 1 performs a single fallback. Specifically, if the throughput indicated by the input throughput information is equal to or less than a threshold value (also referred to as a throughput threshold value) stored in the storage unit 14, the IF selection unit P14 performs communication regarding the session indicated by the session identification information. The FB destination interface 151-k is selected.
Note that the throughput threshold may be a different value depending on the communication method. For example, the throughput threshold is 512 Kbps in the case of LTE communication. On the other hand, in the case of UMTS / HS (D) PA (Universal Mobile Telecommunication System / High Speed (Downlink) Packet Access), the throughput threshold is 256 Kbps.

また、スループット取得部P113は、下りの通信のスループットを測定する場合、各セッションについて、受信を開始(例えば、応答を1byteでも読み込んだ時点)から計測を開始する。ここで、スループット取得部P113は、応答データの読込み開始前にスレッドを生成して、非同期で監視する。スループット取得部P113は、1秒間に取得するレスポンスデータの情報量を、バイトサイズにて計測する。例えば、通信部15が1秒間に64KB(キロバイト)を取得した場合は、スループットは、512Kbps(キロビット/秒)となる。スループット取得部P113は、フォールバック後は、ソケット接続から開始するので、FB元リンクで取得した応答(既に元アプリに流している応答)の情報量(バイト数)までは読み飛ばし、それ以降に受信した情報量を計測してもよい。   Further, when measuring the throughput of downlink communication, the throughput acquisition unit P113 starts measurement for each session from the start of reception (for example, when a response is read even with 1 byte). Here, the throughput acquisition unit P113 generates a thread and starts monitoring asynchronously before the response data is read. The throughput acquisition unit P113 measures the information amount of response data acquired in one second in byte size. For example, when the communication unit 15 acquires 64 KB (kilobytes) per second, the throughput is 512 Kbps (kilobits / second). Since the throughput acquisition unit P113 starts from the socket connection after the fallback, the throughput acquisition unit P113 skips the information amount (number of bytes) of the response (response already sent to the original application) acquired by the FB source link, and thereafter The amount of information received may be measured.

(A4)セッションが確立できなかったとき
通信装置1は、ホストとのソケット接続に失敗した場合、単一フォールバックを行う。具体的には、IF(インターフェース)選択部P14は、入力されたセッション異常情報が接続失敗を示す場合、セッション識別情報が示すセッションの通信について、FB先インターフェース151−kを選択する。なお、セッション管理部P111は、Javaのプログラムのとき、ソケット接続に時にIOExceptionを捕えた(キャッチした)場合、セッション異常とする。IOExceptionは、IO(入出力)エラーが発生したときに投げられる例外である。セッション管理部P111は、セッション異常とした場合、セッション異常情報をIF選択部P14へ出力する。
(A4) When session cannot be established The communication device 1 performs a single fallback when the socket connection with the host fails. Specifically, when the input session abnormality information indicates a connection failure, the IF (interface) selection unit P14 selects the FB destination interface 151-k for communication of the session indicated by the session identification information. In the case of a Java program, the session management unit P111 sets a session error when an IOException is caught (caught) at the time of socket connection. IOException is an exception thrown when an IO (input / output) error occurs. When the session management unit P111 determines that a session is abnormal, the session management unit P111 outputs session abnormality information to the IF selection unit P14.

(A5)名前解決処理に失敗したとき
通信装置1は、DNSサーバとのソケット接続に失敗した場合、単一フォールバックを行う。具体的には、IF選択部P14は、入力された名前解決異常情報が接続失敗を示す場合、セッション識別情報が示すセッションの通信について、FB先インターフェース151−kを選択する。
(A5) When name resolution processing fails When the communication device 1 fails in socket connection with the DNS server, it performs a single fallback. Specifically, when the input name resolution abnormality information indicates a connection failure, the IF selection unit P14 selects the FB destination interface 151-k for communication of the session indicated by the session identification information.

なお、DNS管理部P112は、DNSサーバへの接続のタイムアウト時間を、予め記憶する記憶部14から読み出す。DNSサーバへの接続に失敗に、例えば1秒後に、再接続を行う。再接続に失敗した場合、DNS管理部P112は、名前解決異常とする。例えば、DNS管理部P112は、Javaのプログラムのとき、ソケット接続に時にIOExceptionを捕えた場合、名前解決異常とする。また、DNS管理部P112は、名前解決後のIPアドレスをチェックし、例えばIPアドレスがnullの場合、名前解決異常とする。DNS管理部P112は、名前解決異常とした場合、名前解決異常情報を、IF選択部P14へ出力する。   Note that the DNS management unit P112 reads out the timeout time for connection to the DNS server from the storage unit 14 that stores in advance. If the connection to the DNS server fails, for example, after 1 second, reconnection is performed. If reconnection fails, the DNS management unit P112 determines that name resolution is abnormal. For example, in the case of a Java program, the DNS management unit P112 determines that the name resolution is abnormal when an IOException is caught in the socket connection. Also, the DNS management unit P112 checks the IP address after the name resolution. When the DNS management unit P112 determines that the name resolution is abnormal, the DNS management unit P112 outputs the name resolution abnormality information to the IF selection unit P14.

(A6)通信中にソケットエラーが発生したとき
通信装置1は、FB元での通信中にソケットエラーが発生した場合、単一フォールバックを行う。具体的には、IF選択部P14は、入力されたセッション異常情報がソケットエラーを示す場合、セッション識別情報が示すセッションの通信について、FB先インターフェース151−kを選択する。なお、セッション管理部P111は、Javaのプログラムのとき、通信中にSocketExceptionが発生した場合、セッション異常とする。SocketExceptionとは、ソケットエラーが発生したときに投げられる例外である。セッション管理部P111は、セッション異常とした場合、ソケットエラーを示すセッション異常情報を、IF選択部P14へ出力する。
(A6) When a socket error occurs during communication When the socket error occurs during communication at the FB source, the communication device 1 performs a single fallback. Specifically, if the input session abnormality information indicates a socket error, IF selection unit P14 selects FB destination interface 151-k for communication of the session indicated by the session identification information. In the case of a Java program, the session management unit P111 determines that a session error occurs when a SocketException occurs during communication. A SocketException is an exception thrown when a socket error occurs. When the session management unit P111 determines that a session is abnormal, the session management unit P111 outputs session abnormality information indicating a socket error to the IF selection unit P14.

フォールバック状態(図4の状態C13)へ遷移する条件は、以下のとおりである。
(B1)FBセッション数が許容数を超えたとき
具体的には、IF選択部P14は、入力されたFBセッション数情報が示すFBセッション数が、記憶部14が予め記憶する許容数(例えば「5」個)を超えたと判定した場合、全てのセッションについて、LTE通信のインターフェース151−2を選択する。これにより、通信部15は、図4の状態C13が表わす通信を行うこととなる。なお、セッション管理部P111は、(A1)セッションがタイムアウトしたとき、(A2)名前解決処理がタイムアウトしたとき、(A3)スループットが低下したときに、単一フォールバックをしたセッション数を、FBセッション数とする。ただし、本発明はこれに限らず、(A1)〜(A6)のすべての場合で、フォールバックをしたセッション数を、FBセッション数としてもよい。
また、IF選択部P14は、あるセッションにおいて、(A4)セッションが確立できなかったとき、又は、(A5)名前解決処理に失敗したとき、(A6)通信中にソケットエラーが発生したときには、全てのセッションについて、LTE通信のインターフェース151−2を選択してもよい。
The conditions for transitioning to the fallback state (state C13 in FIG. 4) are as follows.
(B1) When the number of FB sessions exceeds the allowable number Specifically, the IF selection unit P14 determines that the number of FB sessions indicated by the input FB session number information is the allowable number (for example, “ 5 ”), the LTE communication interface 151-2 is selected for all sessions. Thereby, the communication part 15 will perform the communication which the state C13 of FIG. 4 represents. The session management unit P111 determines the number of sessions that have been subjected to a single fallback when (A1) the session has timed out, (A2) the name resolution process has timed out, (A3) when the throughput has decreased, It is a number. However, the present invention is not limited to this, and in all cases (A1) to (A6), the number of fallback sessions may be the number of FB sessions.
Further, the IF selection unit P14, when (A4) session cannot be established in a session, (A5) when name resolution processing fails, (A6) when a socket error occurs during communication, For this session, the LTE communication interface 151-2 may be selected.

<フェールバックについて>
図5は、本実施形態に係るフェールバックを説明するための説明図である。なお、フェールバックとは、フォールバックとは逆の切り換えを行うことで、フォールバック前の状態に戻すことをいう。
この図において、通常状態C11とフォールバック状態C13は、図4のものと同じである。符号C22を付した図は、フェールバックの状態(フェールバック状態とも称する)C22を表す。フォールバック状態C13からフェールバックの状態へは、後述するフェールバック条件を充足した場合に遷移する。また、状態C22から状態C11へは、順次、遷移する。なお、通信部15からホストへ向かう矢印各々は、各セッションの通信を表す。
<About failback>
FIG. 5 is an explanatory diagram for explaining failback according to the present embodiment. Note that the failback means returning to the state before the fallback by performing the reverse switching to the fallback.
In this figure, the normal state C11 and the fallback state C13 are the same as those in FIG. The diagram with the symbol C22 represents a failback state (also referred to as a failback state) C22. Transition from the fallback state C13 to the failback state occurs when a failback condition described later is satisfied. In addition, the state C22 is sequentially changed to the state C11. Each arrow from the communication unit 15 to the host represents communication of each session.

状態C22は、一部のセッションについて、セルラー通信C221を止め、Wi−Fi通信C222へ切り換わった状態である。つまり、状態C22は、あるセッションに対して、通信C221から通信C222へ、フェールバックが行われた状態である。なお、フェールバックを行うときに、セルラー通信を行っている最中のセッションがあった場合、そのセッションは、その通信の完了後に、Wi−Fi通信へ移行される。例えば、そのセッションは、通信の完了までは、同じベアラで通信が継続することとなる。また、状態C22、C11は、新規のセッションに対して、Wi−Fi通信が割り当てられる状態である。   The state C22 is a state in which the cellular communication C221 is stopped and switched to the Wi-Fi communication C222 for some sessions. That is, the state C22 is a state in which a failback is performed from the communication C221 to the communication C222 for a certain session. When there is a session in the middle of performing cellular communication when performing failback, the session is shifted to Wi-Fi communication after the communication is completed. For example, the communication continues with the same bearer until the communication is completed. In addition, states C22 and C11 are states in which Wi-Fi communication is assigned to a new session.

以下、フェールバックについて、図2、3を参照しながら詳細を説明する。なお、フェールバックを行う元の無線リンクは上述のFB先リンクであり、フェールバックを行う先の無線リンクは上述のFB元リンクである。   Hereinafter, details of failback will be described with reference to FIGS. The original radio link that performs failback is the above-mentioned FB destination link, and the destination radio link that performs failback is the above-mentioned FB source link.

フェールバック条件は、次の(C1)〜(C5)のいずれかである。
(C1)FB元リンクの信号強度が上昇したとき
(C2)フォールバックから1分が経過したとき
(C3)アクセスポイントが変わったとき
(C4)LTE通信が3G通信に変わったとき
(C5)通信中にソケットエラーが発生したとき
The failback condition is one of the following (C1) to (C5).
(C1) When the signal strength of the FB source link increases (C2) When 1 minute has passed since fallback (C3) When the access point changes (C4) When LTE communication changes to 3G communication (C5) Communication When a socket error occurs during

(C1)FB元リンクの信号強度が上昇したとき
通信装置1は、FB元リンクの信号強度が、フォールバックしたときより予め定めた強度以上に上昇した場合、フェールバックを行う。具体的には、IF選択部P14は、随時入力されるFB元インターフェース151−iの信号強度情報について、フォールバックしたときの信号強度情報(FB信号強度情報とも称する)を記憶部14に記憶し、現在の信号強度情報からFB信号強度情報を差し引く。IF選択部P14は、差し引いた値(強度差とも称する)が予め定めた閾値以上であれば、フェールバックを行う。例えば、FB元リンクの通信方式がWi−Fi通信の場合、IF選択部P14は、RSSIの強度差が2ランク(アンテナ2本分)以上になった場合、FB元インターフェース151−iを選択する。これにより、通信装置1は、FB先インターフェース151−kでの通信からFB元ンターフェース151−iでの通信へ切り換えることができ、FB先リンクからFB元リンクへ通信を切り換える。なお、IF選択部P14は、現在の信号強度情報とFB信号強度情報との比を算出して閾値と比較してもよい。
(C1) When the signal strength of the FB source link increases The communication device 1 performs failback when the signal strength of the FB source link increases more than a predetermined strength from when it falls back. Specifically, the IF selection unit P14 stores signal strength information (also referred to as FB signal strength information) at the time of fallback in the storage unit 14 for the signal strength information of the FB source interface 151-i that is input as needed. The FB signal strength information is subtracted from the current signal strength information. If the subtracted value (also referred to as intensity difference) is equal to or greater than a predetermined threshold, the IF selection unit P14 performs failback. For example, when the communication method of the FB source link is Wi-Fi communication, the IF selection unit P14 selects the FB source interface 151-i when the RSSI intensity difference is 2 ranks (for two antennas) or more. . Thereby, the communication apparatus 1 can switch from communication at the FB destination interface 151-k to communication at the FB source interface 151-i, and switches communication from the FB destination link to the FB source link. Note that the IF selection unit P14 may calculate a ratio between the current signal strength information and the FB signal strength information and compare it with a threshold value.

なお、IF選択部P14は、FB信号強度情報が3ランク(アンテナ3本分)のとき、現在の信号強度情報が4ランク(アンテナ4本分:最大ランク)になった場合、強度さが1ランクであっても、フェールバックを行う。また、IF選択部P14は、現在の信号強度情報が予め定めた値以上になった場合、フェールバックを行ってもよく、例えば、最高ランク(アンテナ4本分)になった場合、フェールバックを行ってもよい。
ここで、信号強度検出部152は、例えばWifiManagerを用いて実現される。WifiManagerは、Wi−Fiの情報を取得するプログラムであり、BSSID、IPアドレス、ネットワークID等を取得できる。信号強度検出部152は、FB元インターフェース151−iでのWiFi通信のRSSIを、例えば5秒間隔で検出する。信号強度検出部152は、検出したRSSIを示す信号強度情報を、5秒間隔で信号強度取得部P121を介して、IF選択部P14へ出力する。
In addition, when the FB signal strength information is 3 ranks (for 3 antennas), the IF selection unit P14 has a strength of 1 when the current signal strength information is 4 ranks (for 4 antennas: maximum rank). Fail back even if it is a rank. Further, the IF selection unit P14 may perform failback when the current signal strength information exceeds a predetermined value. For example, when the highest rank (for four antennas) is reached, failback is performed. You may go.
Here, the signal strength detection unit 152 is realized by using, for example, WiFiManager. WifiManager is a program for acquiring Wi-Fi information, and can acquire BSSID, IP address, network ID, and the like. The signal strength detection unit 152 detects the RSSI of WiFi communication at the FB source interface 151-i, for example, at intervals of 5 seconds. The signal strength detection unit 152 outputs signal strength information indicating the detected RSSI to the IF selection unit P14 via the signal strength acquisition unit P121 at intervals of 5 seconds.

(C2)フォールバックから1分が経過したとき
通信装置1は、フォールバック状態C13に遷移してから1分以上経過した場合、フェールバックを行う。具体的には、IF選択部P14は、時間超過情報が入力された場合、つまり、フォールバックした時点から設定値(例えば、1分)の時間が経過した場合、FB元インターフェース151−iを選択する。
(C2) When 1 minute has elapsed since fallback The communication device 1 performs failback when 1 minute or more has elapsed since the transition to the fallback state C13. Specifically, the IF selection unit P14 selects the FB source interface 151-i when time-exceeded information is input, that is, when a set value (for example, 1 minute) has elapsed from the time of fallback. To do.

(C3)アクセスポイントが変わったとき
通信装置1は、FB元リンクの基地局の識別情報又はネットワークの識別情報が変更した場合、フェールバックを行う。具体的には、IF選択部P14は、入力されたAP識別情報が、フォールバックの前後で異なるか否かを判定する。フォールバックの前後で異なると判定した場合、IF選択部P14は、FB元インターフェース151−iを選択する。なお、IF選択部P14は、強制フォールバックの場合のみ、(C3)をフェールバック条件としてもよい。
ここで、AP情報取得部P123は、例えば、CONNECTIVITY_ACTIONを受信したときに、BSSIDを取得する。CONNECTIVITY_ACTIONは、ネットワークの接続状態が変化したときの通知を取得するプログラムである。
(C3) When the access point is changed The communication device 1 performs failback when the identification information of the base station of the FB source link or the identification information of the network is changed. Specifically, the IF selection unit P14 determines whether the input AP identification information is different before and after the fallback. If it is determined that there is a difference between before and after the fallback, the IF selection unit P14 selects the FB source interface 151-i. Note that the IF selection unit P14 may use (C3) as a failback condition only in the case of forced fallback.
Here, the AP information acquisition unit P123 acquires the BSSID when receiving, for example, CONNECTIVITY_ACTION. CONNECTIVITY_ACTION is a program that acquires a notification when the network connection state changes.

(C4)LTE通信が3G通信に変わったとき
通信装置1は、FB先リンクの通信方式がLTEであるときに、その後、その通信方式が3Gに変化した場合、フェールバックを行う。具体的には、IF選択部P14は、フォールバックを行った後、入力された通信方式情報がLTEから3Gに変わったときに、FB元インターフェース151−iを選択する。なお、IF選択部P14は、強制フォールバックの場合のみ、(C4)をフェールバック条件としてもよい。ここで、通信方式情報取得部P124は、例えば、CONNECTIVITY_ACTIONを受信したときに、セルラータイプを取得することで、通信方式を取得する。なお、通信装置1は、通信をLTEから3Gに変化させるとき、ヘッダ比較処理を行って、データを最初から取得するか或いは途中から取得するかを制御してもよい。ここで、通信装置1は、FB元リンク(Wi−Fi通信)を用いて取得したヘッダ情報とFB先リンクでの変化後のリンク(3G通信)を用いて取得したヘッダを比較することで、ヘッダ比較処理を行ってもよい。
(C4) When LTE communication is changed to 3G communication When the communication method of the FB destination link is LTE, the communication device 1 performs failback when the communication method is changed to 3G. Specifically, the IF selection unit P14 selects the FB source interface 151-i when the input communication method information changes from LTE to 3G after performing fallback. Note that the IF selection unit P14 may use (C4) as a failback condition only in the case of forced fallback. Here, for example, when receiving the CONNECTIVITY_ACTION, the communication method information acquisition unit P124 acquires the cellular type by acquiring the cellular type. In addition, when changing communication from LTE to 3G, the communication device 1 may perform header comparison processing to control whether to acquire data from the beginning or from the middle. Here, the communication device 1 compares the header information acquired using the FB source link (Wi-Fi communication) and the header acquired using the link (3G communication) after the change in the FB destination link, You may perform a header comparison process.

(C5)通信中にソケットエラーが発生したとき
通信装置1は、FB先での通信中にソケットエラーが発生した場合、フェールバックを行う。具体的には、IF選択部P14は、入力されたセッション異常情報がソケットエラーを示す場合、FB元インターフェース151−iを選択する。
(C5) When a socket error occurs during communication If the socket error occurs during communication at the FB destination, the communication device 1 performs failback. Specifically, the IF selection unit P14 selects the FB source interface 151-i when the input session abnormality information indicates a socket error.

なお、フェールバックを行った場合、IF選択部P14は、「強制フォールバックモード」の状態を解除してもよい。解除後は、IF選択部P14は、Wi−Fi通信を優先して選択する。
また、フェールバックを行った後、FB元リンクの通信に失敗した場合、通信装置1は、フォールバックを行ってもよい。さらに、このフォールバックを行った後、FB先リンクでも通信に失敗した場合、通信装置1は、通信を止めてもよい。これにより、通信装置1は、フォールバックとフェールバックが繰り返され続けることを防止できる。
When failback is performed, the IF selection unit P14 may cancel the “forced fallback mode” state. After the cancellation, the IF selection unit P14 preferentially selects Wi-Fi communication.
Further, after failback is performed, if communication on the FB source link fails, the communication device 1 may perform fallback. Furthermore, after performing this fallback, when communication fails in the FB destination link, the communication device 1 may stop communication. Thereby, the communication device 1 can prevent the fallback and the failback from being repeated.

<ヘッダ比較処理について>
上記のフォールバックを行う場合、通信装置1は、ヘッダ比較処理を行う。具体的には、ヘッダ情報取得部P131は、フォールバックを行う前に、FB元リンクにおいて例えば予め定めたプロトコル(例えばHTTP)のヘッダ情報(FB元ヘッダ情報とも称する)を取得したときに、取得したFB元ヘッダ情報をIF選択部P14へ出力する。IF選択部P14は、入力されたFB元ヘッダ情報を、として記憶部14に記憶させる。ヘッダ情報取得部P131は、フォールバックを行うときに、FB先リンクにおいてプロトコルのヘッダ情報(FB先ヘッダ情報)を取得し、取得したFB先ヘッダ情報をIF選択部P14へ出力する。IF選択部P14は、FB元ヘッダ情報とFB先ヘッダ情報を比較する。
ここで、IF選択部P14は、ヘッダ情報のうち、HTTPのデータ部分に差分があると判断できる情報を比較する。例えば、IF選択部P14は、ヘッダ情報のうち、コンテンツのサイズを表す情報(Content−Length)やコンテンツのバージョンや更新日時を示す情報を比較する。
<About header comparison processing>
When performing the above fallback, the communication device 1 performs a header comparison process. Specifically, the header information acquisition unit P131 acquires, for example, when header information (also referred to as FB source header information) of a predetermined protocol (for example, HTTP) is acquired in the FB source link before performing fallback. The FB source header information is output to the IF selection unit P14. The IF selection unit P14 causes the storage unit 14 to store the input FB source header information as. When performing fallback, the header information acquisition unit P131 acquires protocol header information (FB destination header information) in the FB destination link, and outputs the acquired FB destination header information to the IF selection unit P14. The IF selection unit P14 compares the FB source header information and the FB destination header information.
Here, the IF selection unit P14 compares information in the header information that can be determined to have a difference in the HTTP data portion. For example, the IF selection unit P14 compares information indicating the size of the content (Content-Length) and information indicating the version and update date / time of the header information.

比較の結果、FB元ヘッダ情報とFB先ヘッダ情報が同じであると判定した場合、IF選択部P14は、セッション識別情報が示すセッションの通信について、FB先インターフェース151−kを選択する(フォールバックを行う)。
一方、比較の結果、ヘッダ情報H1とヘッダ情報H2が同じでないと判定した場合、IF選択部P14は、セッション識別情報が示すセッションの通信について、FB元インターフェース151−iのままとする(フォールバックを中止する)。
As a result of the comparison, when it is determined that the FB source header information and the FB destination header information are the same, the IF selection unit P14 selects the FB destination interface 151-k for the communication of the session indicated by the session identification information (fallback) I do).
On the other hand, if it is determined as a result of the comparison that the header information H1 and the header information H2 are not the same, the IF selection unit P14 keeps the FB source interface 151-i for the communication of the session indicated by the session identification information (fallback). Cancel).

IF選択部P14は、ヘッダ情報H1とヘッダ情報H2が同じでないと判定した場合、リダイレクト情報取得部P132が取得したステータスコードに応じて、再度、フォールバックを試みてもよい。具体的には、ヘッダ情報H1とヘッダ情報H2が同じでないと判定した場合、ヘッダ情報取得部P131は、リダイレクト情報取得部P132が取得したリダイレクション先に対して、HTTPのレンジリクエストを行う。ヘッダ情報取得部P131は、レンジリクエストの結果、新たなヘッダ情報を取得し、取得したヘッダ情報を、FB先ヘッダ情報としてIF選択部P14へ出力する。IF選択部P14は、新たに取得したFB先ヘッダ情報とFB元ヘッダ情報を比較する。
比較の結果、FB元ヘッダ情報とFB先ヘッダ情報が同じであると判定した場合、IF選択部P14は、セッション識別情報が示すセッションの通信について、FB先インターフェース151−kを選択する(フォールバックを行う)。一方、比較の結果、ヘッダ情報H1とヘッダ情報H2が同じでないと判定した場合、IF選択部P14は、セッション識別情報が示すセッションの通信について、FB元インターフェース151−iのままとする(フォールバックを中止する)。
If the IF selection unit P14 determines that the header information H1 and the header information H2 are not the same, the IF selection unit P14 may try fallback again according to the status code acquired by the redirect information acquisition unit P132. Specifically, when it is determined that the header information H1 and the header information H2 are not the same, the header information acquisition unit P131 makes an HTTP range request to the redirection destination acquired by the redirect information acquisition unit P132. The header information acquisition unit P131 acquires new header information as a result of the range request, and outputs the acquired header information to the IF selection unit P14 as FB destination header information. The IF selection unit P14 compares the newly acquired FB destination header information with the FB source header information.
As a result of the comparison, when it is determined that the FB source header information and the FB destination header information are the same, the IF selection unit P14 selects the FB destination interface 151-k for the communication of the session indicated by the session identification information (fallback) I do). On the other hand, if it is determined as a result of the comparison that the header information H1 and the header information H2 are not the same, the IF selection unit P14 keeps the FB source interface 151-i for the communication of the session indicated by the session identification information (fallback). Cancel).

図6は、本実施形態に係る通信装置1の状態遷移を表す図である。この図において、S11を付した状態S11は、Wi−Fi通信を行う状態(WiFi通信状態S11とも称する)を示す。S12を付した状態S12は、セルラー通信を行う状態(セルラー通信状態S12とも称する)を示す。
通信装置1は、WiFi通信状態S11であるとき、Wi−Fi通信が良好な場合、例えば、上記の単一フォールバックを行う条件(A1)〜(A6)に該当しない場合、WiFi通信状態S11のままである。一方、通信装置1は、WiFi通信状態S11であるとき、上記の単一フォールバックを行う条件(A1)〜(A6)に該当した場合、フォールバックを行うことで、セルラー通信状態S12へ遷移する。
FIG. 6 is a diagram illustrating state transition of the communication device 1 according to the present embodiment. In this figure, a state S11 with S11 indicates a state in which Wi-Fi communication is performed (also referred to as WiFi communication state S11). State S12 with S12 indicates a state in which cellular communication is performed (also referred to as cellular communication state S12).
When the communication device 1 is in the WiFi communication state S11 and the Wi-Fi communication is good, for example, when the conditions (A1) to (A6) for performing the single fallback are not satisfied, the communication device 1 is in the WiFi communication state S11. It remains. On the other hand, when the communication device 1 is in the WiFi communication state S11 and falls under the conditions (A1) to (A6) for performing the single fallback, the communication device 1 transitions to the cellular communication state S12 by performing the fallback. .

通信装置1は、セルラー通信状態S12であるとき、例えば、上記のフェールバック条件(C1)〜(C5)に該当しない場合、セルラー通信状態S12のままである。また、通信装置1は、セルラー通信状態S12であるとき、セルラー通信に失敗した場合にも、セルラー通信状態S12のままである。一方、通信装置1は、セルラー通信状態S12であるとき、例えば、上記のフェールバック条件(C1)〜(C5)に該当した場合、フェールバックを行うことで、WiFi通信状態S11へ遷移する。   When the communication device 1 is in the cellular communication state S12, for example, when the failback conditions (C1) to (C5) are not satisfied, the communication device 1 remains in the cellular communication state S12. In addition, when the communication device 1 is in the cellular communication state S12, even when the cellular communication fails, the communication device 1 remains in the cellular communication state S12. On the other hand, when the communication device 1 is in the cellular communication state S12, for example, when the failback conditions (C1) to (C5) are satisfied, the communication device 1 transitions to the WiFi communication state S11 by performing failback.

図7は、本実施形態に係る通信装置1の状態遷移についての説明図である。この図において、各列は、条件、Wi−Fi通信状態S11、セルラー通信状態S12を表す。符号T11を付した情報は、条件が、セッションのタイムアウト(セッション接続タイムアウト)又は名前解決処理のタイムアウト(DNS接続タイムアウト)である場合を表す。以下では、セッション又は名前解決処理のタイムアウトを、タイムアウトとも称する。   FIG. 7 is an explanatory diagram for state transition of the communication device 1 according to the present embodiment. In this figure, each column represents a condition, a Wi-Fi communication state S11, and a cellular communication state S12. The information denoted by reference sign T11 represents a case where the condition is a session timeout (session connection timeout) or a name resolution processing timeout (DNS connection timeout). Hereinafter, the timeout of the session or name resolution processing is also referred to as timeout.

例えば、行の情報(行情報とも称する)T111は、Wi−Fi通信でタイムアウトせず(接続成功)、セルラー通信でもタイムアウトしない(接続成功)ときに、通信装置1がWi−Fi通信状態S11であればWi−Fi通信状態S11を継続し、セルラー通信状態S12であればセルラー通信状態S12を継続することを表す。行情報T112は、Wi−Fi通信でタイムアウトせず(接続成功)、セルラー通信でタイムアウトした(接続失敗)ときに、通信装置1がWi−Fi通信状態S11であればWi−Fi通信状態S11を継続し、セルラー通信状態S12であれば通信接続を止めることを表す。行情報T113は、Wi−Fi通信でタイムアウトし(接続失敗)、セルラー通信でタイムアウトしない(接続成功)ときに、通信装置1がWi−Fi通信状態S11であればセルラー通信状態S12へ遷移し(単一フォールバック条件(A1)、(A2))、セルラー通信状態S12であればセルラー通信状態S12を継続することを表す。なお、図7において、「フォールバック(※)」のように※を付したフォールバックは、単一フォールバックをした場合、セッション管理部P111がFBセッション数として計数するものである。   For example, when the line information (also referred to as line information) T111 does not time out in Wi-Fi communication (successful connection) and does not time out in cellular communication (successful connection), the communication apparatus 1 is in Wi-Fi communication state S11. If there is, the Wi-Fi communication state S11 is continued, and if the cellular communication state S12, the cellular communication state S12 is continued. If the communication apparatus 1 is in the Wi-Fi communication state S11 when the line information T112 does not time out in the Wi-Fi communication (successful connection) and times out in the cellular communication (connection failure), the row information T112 displays If the cellular communication state S12 continues, it indicates that the communication connection is stopped. If the communication apparatus 1 is in the Wi-Fi communication state S11 when the line information T113 times out in Wi-Fi communication (connection failure) and does not time out in cellular communication (successful connection), the line information T113 transits to the cellular communication state S12 ( If the single fallback condition (A1), (A2)) and the cellular communication state S12, it means that the cellular communication state S12 is continued. In FIG. 7, a fallback marked with * such as “fallback (*)” is counted by the session management unit P111 as the number of FB sessions when a single fallback is performed.

符号T12を付した情報は、条件が、セッションの確立の成否(セッション接続)と名前解決処理の成否(名前解決)である場合を表す。以下では、セッションの確立又は名前解決処理を、接続処理とも称する。例えば、行情報T123は、Wi−Fi通信で接続処理に失敗し(接続失敗)、セルラー通信で接続処理に成功した(接続成功)ときに、通信装置1がWi−Fi通信状態S11であればセルラー通信状態S12へ遷移し(単一フォールバック条件(A4)、(A5))、セルラー通信状態S12であればセルラー通信状態S12を継続することを表す。   The information denoted by reference sign T12 represents a case where the conditions are success or failure of session establishment (session connection) and success or failure of name resolution processing (name resolution). Hereinafter, session establishment or name resolution processing is also referred to as connection processing. For example, the row information T123 indicates that the communication apparatus 1 is in the Wi-Fi communication state S11 when the connection process fails in Wi-Fi communication (connection failure) and the connection process succeeds in cellular communication (connection success). Transition to the cellular communication state S12 (single fallback conditions (A4), (A5)) indicates that the cellular communication state S12 is continued if the cellular communication state S12.

符号T13を付した情報は、条件が状態監視の結果によるものであることを表す。行情報T131は、スループットが低下したときに、通信装置1がWi−Fi通信状態S11であればセルラー通信状態S12へ遷移する(単一フォールバック条件(A3))ことを表す。行情報T132は、Wi−Fi通信の信号強度が上昇したときに、通信装置1がセルラー通信状態S12であればWi−Fi通信状態S11へ遷移する(フェールバック条件(C1))ことを表す。行情報T133は、アクセスポイントが変わったときに、通信装置1がセルラー通信状態S12であればWi−Fi通信状態S11へ遷移する(フェールバック条件(C3))ことを表す。行情報T134は、LTE通信が3G通信に変わったときに、通信装置1がセルラー通信状態S12であればWi−Fi通信状態S11へ遷移する(フェールバック条件(C4))ことを表す。   The information with the symbol T13 represents that the condition is based on the result of state monitoring. The row information T131 represents that when the throughput decreases, if the communication device 1 is in the Wi-Fi communication state S11, the line information T131 transits to the cellular communication state S12 (single fallback condition (A3)). The row information T132 indicates that when the signal strength of Wi-Fi communication increases, the communication device 1 transitions to the Wi-Fi communication state S11 if the communication device 1 is in the cellular communication state S12 (failback condition (C1)). The row information T133 indicates that when the access point changes, if the communication device 1 is in the cellular communication state S12, the line information T133 transits to the Wi-Fi communication state S11 (failback condition (C3)). The row information T134 indicates that when the LTE communication is changed to 3G communication, the communication apparatus 1 transits to the Wi-Fi communication state S11 if the communication device 1 is in the cellular communication state S12 (failback condition (C4)).

符号T14を付した情報は、その他の条件を表す。行情報T141は、フォールバックから1分が経過したときに、通信装置1がセルラー通信状態S12であればWi−Fi通信状態S11へ遷移する(フェールバック条件(C2))ことを表す。行情報T142は、通信中にソケットエラー(SocketException)が発生したときに、通信装置1がWi−Fi通信状態S11であればセルラー通信状態S12へ遷移し(単一フォールバック条件(A6))、セルラー通信状態S12であればWi−Fi通信状態S11へ遷移する(フェールバック条件(C5))ことを表す。例えば、IF選択部P14は、セッション管理部P111がソケットエラーを検出した場合、FB元インターフェース151−iを選択する。これにより、通信装置1は、FB先インターフェース151−kでの通信からFB元ンターフェース151−iでの通信へ切り換えることができ、FB先リンクからFB元リンクへ通信を切り換える。   The information with the symbol T14 represents other conditions. The row information T141 indicates that, when one minute has elapsed from the fallback, if the communication device 1 is in the cellular communication state S12, the line information T141 transits to the Wi-Fi communication state S11 (failback condition (C2)). The line information T142 transitions to the cellular communication state S12 if the communication device 1 is in the Wi-Fi communication state S11 when a socket error (SocketException) occurs during communication (single fallback condition (A6)). If it is the cellular communication state S12, it represents transition to the Wi-Fi communication state S11 (failback condition (C5)). For example, if the session management unit P111 detects a socket error, the IF selection unit P14 selects the FB source interface 151-i. Thereby, the communication apparatus 1 can switch from communication at the FB destination interface 151-k to communication at the FB source interface 151-i, and switches communication from the FB destination link to the FB source link.

<処理フロー>
図8は、本実施形態に係る通信装置1の処理フローを示す図である。なお、この図において、ステップS103、S104、S105、S111、S121、S122、S128、S129は、Wi−Fi通信(FB元)の情報処理である。ステップS106、S107、S108、S123、S124、S125は、セルラー通信(FB先)の情報処理である。
<Processing flow>
FIG. 8 is a diagram illustrating a processing flow of the communication device 1 according to the present embodiment. In this figure, steps S103, S104, S105, S111, S121, S122, S128, and S129 are information processing for Wi-Fi communication (FB source). Steps S106, S107, S108, S123, S124, and S125 are information processing of cellular communication (FB destination).

(ステップS101)IF選択部P14は、全てのセッションでフォールバック中であるか否か、つまり、図4のフォールバック状態S13であるか否かを判定する。全てのセッションでフォールバック中であると判定された場合(Yes)、ステップS102へ進む。一方、少なくとも一部のセッションでフォールバック中ではないと判定した場合(No)、ステップS103へ進む。 (Step S101) The IF selection unit P14 determines whether or not fallback is in progress for all sessions, that is, whether or not the fallback state S13 in FIG. If it is determined that all sessions are falling back (Yes), the process proceeds to step S102. On the other hand, if it is determined that at least some sessions are not in fallback (No), the process proceeds to step S103.

(ステップS102)IF選択部P14は、通信がDLM(DownloadManager)による情報の取得であるか否かを判定する。DownloadManagerとは、サイズの大きいファイルを取得するときに用いるプログラムである。換言すれば、IF選択部P14は、サイズの大きいファイルを取得するか否かを判定する。DLMによる情報の取得であると判定された場合(Yes)、ステップS103へ進む。一方、DLMによる情報の取得ではないと判定された場合(No)、ステップS106へ進む。 (Step S <b> 102) The IF selection unit P <b> 14 determines whether or not the communication is acquisition of information by DLM (Download Manager). DownloadManager is a program used when acquiring a large file. In other words, the IF selection unit P14 determines whether to acquire a large file. If it is determined that information is acquired by DLM (Yes), the process proceeds to step S103. On the other hand, when it is determined that the information is not acquired by the DLM (No), the process proceeds to step S106.

(ステップS103)DNS管理部P112は、Wi−Fi通信を用いたDNSリクエストにより、ドメインネーム情報(例えば、IPアドレス)の取得を要求する。この要求の結果、ドメインネーム情報が取得された場合、ステップS104へ進む。一方、ドメインネーム情報が取得されなかった場合、IF選択部P14がFB先インターフェース151−kを選択することで、ステップS106へ進む。
(ステップS104)セッション管理部P111は、Wi−Fi通信を用いた接続要求(Connect)により、コンテンツサーバへの接続を要求する。この要求の結果、セッション管理部P111が接続に失敗した場合、ステップS106へ進む。一方、セッション管理部P111が接続に成功した場合、ステップS105へ進む。
(Step S103) The DNS management unit P112 requests acquisition of domain name information (for example, an IP address) by a DNS request using Wi-Fi communication. If domain name information is acquired as a result of this request, the process proceeds to step S104. On the other hand, when domain name information is not acquired, IF selection part P14 selects FB destination interface 151-k, and it progresses to step S106.
(Step S104) The session management unit P111 requests connection to the content server by a connection request (Connect) using Wi-Fi communication. If the session management unit P111 fails to connect as a result of this request, the process proceeds to step S106. On the other hand, if the session management unit P111 has successfully connected, the process proceeds to step S105.

(ステップS105)ヘッダ情報取得部P131は、Wi−Fi通信を用いて、FB元ヘッダ情報の取得を要求する(ヘッダDL(Wi−Fi))。FB元ヘッダ情報が取得された場合、容量情報取得部P114は、FB元ヘッダ情報を記憶させるとともに、FB元ヘッダ情報から取得対象のコンテンツサイズを抽出する。また、制御部13は、コンテンツの取得を開始する。
制御部13がコンテンツの取得を行っているとき、容量情報取得部P114は、随時、DL済サイズを算出する。また、容量情報取得部P114は、コンテンツサイズからDL済サイズを差し引くことで、残サイズを算出する。残サイズとは、取得するコンテンツのうち、取得が済んでいないコンテンツの容量である。また、制御部13がコンテンツの取得を行っているとき、随時、スループット取得部P113は、予め定めた時間間隔で、スループットを算出する。
(Step S105) The header information acquisition unit P131 uses the Wi-Fi communication to request acquisition of the FB source header information (header DL (Wi-Fi)). When the FB source header information is acquired, the capacity information acquisition unit P114 stores the FB source header information and extracts the acquisition target content size from the FB source header information. In addition, the control unit 13 starts content acquisition.
When the control unit 13 is acquiring content, the capacity information acquisition unit P114 calculates a DL size at any time. Further, the capacity information acquisition unit P114 calculates the remaining size by subtracting the DL completed size from the content size. The remaining size is the capacity of content that has not been acquired from the content to be acquired. Further, when the control unit 13 is acquiring content, the throughput acquisition unit P113 calculates the throughput at predetermined time intervals as needed.

(ステップS106)DNS管理部P112は、セルラー通信を用いたDNSリクエストにより、ドメインネーム情報の取得を要求する。この要求の結果、ドメインネーム情報が取得された場合、ステップS107へ進む。一方、ドメインネーム情報が取得されなかった場合、ステップS110へ進む。
(ステップS107)セッション管理部P111は、セルラー通信を用いた接続要求により、コンテンツサーバへの接続を要求する。この要求の結果、セッション管理部P111が接続に失敗した場合、ステップS110へ進む。一方、セッション管理部P111が接続に成功した場合、ステップS108へ進む。
(Step S106) The DNS management unit P112 requests acquisition of domain name information by a DNS request using cellular communication. If domain name information is acquired as a result of this request, the process proceeds to step S107. On the other hand, when domain name information is not acquired, it progresses to step S110.
(Step S107) The session management unit P111 requests connection to the content server by a connection request using cellular communication. If the session management unit P111 fails to connect as a result of this request, the process proceeds to step S110. On the other hand, if the session management unit P111 has successfully connected, the process proceeds to step S108.

(ステップS108)ヘッダ情報取得部P131は、セルラー通信を用いて、FB先ヘッダ情報の取得を要求する(ヘッダDL(Cellular))。FB先ヘッダ情報が取得された場合、容量情報取得部P114は、FB先ヘッダ情報から、取得対象のコンテンツサイズを抽出する。その後、ステップS109へ進む。
(ステップS109)IF選択部P14は、ステップS108で抽出したコンテンツサイズが予め定められたFB許容サイズより大きいか否かを判定する。FB許容サイズとは、フォールバックを許容するコンテンツの容量を示す情報である。コンテンツサイズがFB許容サイズより大きいと判定された場合(Yes)、ステップS110へ進む。一方、コンテンツサイズがFB許容サイズ以下であると判定された場合(No)、制御部13は、セルラー通信を用いて、コンテンツの取得を開始する。
(ステップS110)IOException又はInterruptedIOExceptionが投げられる。この場合、制御部13は、良好な接続がない又は無条件でのフォールバックが不可能と判定して、通信装置1の通信接続を止める。
(Step S108) The header information acquisition unit P131 requests the acquisition of the FB destination header information using cellular communication (header DL (Cellular)). When the FB destination header information is acquired, the capacity information acquisition unit P114 extracts the acquisition target content size from the FB destination header information. Thereafter, the process proceeds to step S109.
(Step S109) The IF selection unit P14 determines whether or not the content size extracted in Step S108 is larger than a predetermined FB allowable size. The FB allowable size is information indicating the capacity of content that allows fallback. When it is determined that the content size is larger than the FB allowable size (Yes), the process proceeds to step S110. On the other hand, when it is determined that the content size is equal to or smaller than the FB allowable size (No), the control unit 13 starts acquisition of the content using cellular communication.
(Step S110) IOException or InterruptedIOException is thrown. In this case, the control unit 13 determines that there is no good connection or that unconditional fallback is impossible, and stops the communication connection of the communication device 1.

(ステップS111)IF選択部P14は、スループット取得部P113が算出したスループットがスループット閾値以下になったか否かを判定する。スループットがスループット閾値より高い場合、制御部13は、Wi−Fi通信を用いて、コンテンツの取得を継続する。一方、スループットがスループット閾値以下になったと判定された場合、ステップS112へ進む。 (Step S111) The IF selection unit P14 determines whether or not the throughput calculated by the throughput acquisition unit P113 is equal to or less than the throughput threshold. When the throughput is higher than the throughput threshold, the control unit 13 continues to acquire content using Wi-Fi communication. On the other hand, if it is determined that the throughput is equal to or less than the throughput threshold, the process proceeds to step S112.

(ステップS112)IF選択部P14は、ステップS105で算出された残サイズ、つまり、ステップS112(又はS111)の時点で取得が済んでいないコンテンツの容量が、予め定められたFB許容サイズより大きいか否かを判定する。残サイズがFB許容サイズより大きいと判定された場合(Yes)、ステップS113へ進む。一方、残サイズがFB許容サイズ以下であると判定された場合(No)、ステップS121へ進む。
(ステップS113)IF選択部P14は、全てのセッションでフォールバック中であるか否かを判定する。全てのセッションでフォールバック中であると判定された場合(Yes)、ステップS112へ戻る。この場合、制御部13は、定期的なポーリング(定期的な問合せ)を行う。なお、全てのセッションでフォールバック中であると判定される(Yes)のは、ステップS102で、DLMによる情報の取得であると判定された場合のみである。一方、少なくとも一部のセッションでフォールバック中ではないと判定された場合(No)、ステップS114へ進む。
(Step S112) Whether the remaining size calculated in step S105, that is, the capacity of the content that has not been acquired at the time of step S112 (or S111), is larger than a predetermined FB allowable size (step S112) Determine whether or not. When it is determined that the remaining size is larger than the FB allowable size (Yes), the process proceeds to step S113. On the other hand, when it is determined that the remaining size is equal to or less than the FB allowable size (No), the process proceeds to step S121.
(Step S113) The IF selection unit P14 determines whether fallback is being performed in all sessions. If it is determined that all sessions are falling back (Yes), the process returns to step S112. In this case, the control unit 13 performs periodic polling (periodic inquiry). Note that it is determined that all sessions are falling back (Yes) only when it is determined in step S102 that information is acquired by DLM. On the other hand, if it is determined that at least some sessions are not in fallback (No), the process proceeds to step S114.

(ステップS114)制御部13は、出力部12に対して、ユーザにフォールバックするか否かを確認する情報を出力させる。例えば、出力部12は、「サイズの大きい通信です。フォールバックをしますか」と表示させる。例えば、コンテンツをセルラー通信で取得する場合とWi−Fi通信で取得する場合では、料金が異なる場合がある。つまり、通信装置1は、サイズの大きいコンテンツをセルラー通信で取得する場合、Wi−Fi通信と比較して高額の料金がかかる場合があるため、コンテンツをセルラー通信で取得してもよいか否かをユーザに確認している。
出力部12の出力に対して入力部11からの入力がない場合(未選択)、ステップS112へ戻る。この場合、制御部13は、定期的なポーリングを行う。入力があったとき、入力部11からの入力がフォールバックをすることを示す場合(Yes)、IF選択部P14はフォールバックが許容されたと判定し、ステップS121へ進む。一方、入力部11からの入力がフォールバックをしないことを示す場合(No)、ステップS128へ進む。つまり、ユーザ操作によって、通信装置1は、フォールバックを行わないこととなる。
(Step S114) The control unit 13 causes the output unit 12 to output information for confirming whether or not to fall back to the user. For example, the output unit 12 displays “This is a large communication. Do you want to fall back?”. For example, the charge may differ between when content is acquired by cellular communication and when it is acquired by Wi-Fi communication. That is, when the communication device 1 acquires a large-sized content by cellular communication, it may be expensive compared to Wi-Fi communication, so whether or not the content may be acquired by cellular communication. To the user.
When there is no input from the input unit 11 with respect to the output of the output unit 12 (unselected), the process returns to step S112. In this case, the control unit 13 performs regular polling. When there is an input, if the input from the input unit 11 indicates that a fallback is to be performed (Yes), the IF selection unit P14 determines that the fallback is permitted, and the process proceeds to step S121. On the other hand, when the input from the input unit 11 indicates that no fallback is performed (No), the process proceeds to step S128. That is, the communication apparatus 1 does not perform fallback by a user operation.

(ステップS121)制御部13は、受信バッファの読み込みを停止する(ReadStop)。その後、ステップS122へ進む。
(ステップS122)制御部13は、アプリバッファへの書き込みを停止する(WriteStop)。つまり、制御部13は、アプリケーションへのデータの出力を中断する。その後、ステップS123へ進む。
(Step S121) The control unit 13 stops reading of the reception buffer (ReadStop). Thereafter, the process proceeds to step S122.
(Step S122) The control unit 13 stops writing to the application buffer (WriteStop). That is, the control unit 13 interrupts output of data to the application. Thereafter, the process proceeds to step S123.

(ステップS123)DNS管理部P112は、セルラー通信を用いたDNSリクエストにより、ドメインネーム情報の取得を要求する。この要求の結果、ドメインネーム情報が取得された場合、ステップS124へ進む。一方、ドメインネーム情報が取得されなかった場合、ステップS128へ進む。
(ステップS124)セッション管理部P111は、セルラー通信を用いた接続要求により、コンテンツサーバへの接続を要求する。この要求の結果、セッション管理部P111が接続に失敗した場合、ステップS128へ進む。一方、セッション管理部P111が接続に成功した場合、ステップS125へ進む。
(Step S123) The DNS management unit P112 requests acquisition of domain name information by a DNS request using cellular communication. If domain name information is acquired as a result of this request, the process proceeds to step S124. On the other hand, when domain name information is not acquired, it progresses to step S128.
(Step S124) The session management unit P111 requests connection to the content server by a connection request using cellular communication. If the session management unit P111 fails to connect as a result of this request, the process proceeds to step S128. On the other hand, if the session management unit P111 has successfully connected, the process proceeds to step S125.

(ステップS125)ヘッダ情報取得部P131は、セルラー通信を用いて、FB先ヘッダ情報を取得する。その後、ステップS126へ進む。
(ステップS126)IF選択部P14は、ステップS105で記憶させたFB元ヘッダ情報と、ステップS125で取得したFB先ヘッダ情報と、を比較する(ヘッダ比較処理)。比較の結果、FB元ヘッダ情報とFB先ヘッダ情報が同じでないと判定された場合(Yes)、ステップS127へ進む。一方、FB元ヘッダ情報とFB先ヘッダ情報が同じであると判定された場合(No)、制御部13は、セルラー通信を用いて、コンテンツの取得を再開する。ここで、データ合成部P15は、Wi−Fi通信で取得済みのコンテンツのデータを読み出し、セルラー通信を用いて、そのデータの続きからデータの取得を再開する。つまり、通信装置1は、フォールバックに成功する。
なお、IF選択部P14は、ステップS126でNoと判定するまでは、フォールバック元の通信(Wi−Fi通信)でのセッションを継続させ続ける。
(Step S125) The header information acquisition unit P131 acquires FB destination header information using cellular communication. Thereafter, the process proceeds to step S126.
(Step S126) The IF selection unit P14 compares the FB source header information stored in Step S105 with the FB destination header information acquired in Step S125 (header comparison process). As a result of the comparison, when it is determined that the FB source header information and the FB destination header information are not the same (Yes), the process proceeds to step S127. On the other hand, when it is determined that the FB source header information and the FB destination header information are the same (No), the control unit 13 resumes content acquisition using cellular communication. Here, the data synthesizing unit P15 reads the data of the content already acquired by Wi-Fi communication, and resumes the data acquisition from the continuation of the data using cellular communication. That is, the communication device 1 succeeds in fallback.
The IF selection unit P14 continues the session in the fallback source communication (Wi-Fi communication) until it determines No in step S126.

(ステップS127)IF選択部P14は、リダイレクト情報取得部P132が取得したステータスコードがリダイレクションを示すか否かを判定する。ステータスコードがリダイレクションを示さないと判定された場合、ステップS128へ進む。
一方、ステータスコードがリダイレクションを示すと判定された場合、ステップS123へ戻る。この場合、ステップS123〜S125にて、リダイレクション先へ接続する。例えば、ステップS125にて、ヘッダ情報取得部P131は、リダイレクション先から取得したヘッダ情報を、FB先ヘッダ情報とする。その後、ステップS126で、新たなFB先ヘッダ情報とFB元ヘッダ情報が比較されることとなる。なお、ステップS127の処理は、1回だけ行われてもよい。つまり、制御部13は、一度だけ、転送を許容してもよい。この場合、IF選択部P14は、同じセッションにおいて、2回目以降のステップS127の処理を行わずに、ステップS128へ進む。
(Step S127) The IF selection unit P14 determines whether or not the status code acquired by the redirect information acquisition unit P132 indicates redirection. If it is determined that the status code does not indicate redirection, the process proceeds to step S128.
On the other hand, if it is determined that the status code indicates redirection, the process returns to step S123. In this case, the connection is made to the redirection destination in steps S123 to S125. For example, in step S125, the header information acquisition unit P131 sets the header information acquired from the redirection destination as FB destination header information. Thereafter, in step S126, the new FB destination header information and the FB source header information are compared. Note that the process of step S127 may be performed only once. That is, the control unit 13 may allow the transfer only once. In this case, the IF selection unit P14 proceeds to step S128 without performing the process of step S127 for the second and subsequent times in the same session.

(ステップS128)制御部13は、受信バッファの読み込みを再開する(ReadStart)。つまり、制御部13は、再度、Wi−Fi通信を用いて、コンテンツの取得を再開する。ここで、データ合成部P15は、Wi−Fi通信で取得済みのコンテンツのデータを読み出し、Wi−Fi通信を用いて、そのデータの続きからデータの取得を再開する。つまり、通信装置1は、フォールバックを止めて、元のFB元通信で、データの取得を再開する。
(ステップS129)制御部13は、アプリバッファへの書き込みを再開する(WriteStart)。つまり、制御部13は、アプリケーションへのデータの出力を再開する。
なお、IF選択部P14は、ステップS101、S113において、通信装置1が強制フォールバックモードか否かを判定してもよい。
(Step S128) The control unit 13 resumes reading of the reception buffer (ReadStart). That is, the control unit 13 resumes content acquisition using Wi-Fi communication again. Here, the data synthesizing unit P15 reads content data that has already been acquired by Wi-Fi communication, and resumes data acquisition from the continuation of the data using Wi-Fi communication. That is, the communication device 1 stops the fallback and resumes data acquisition by the original FB original communication.
(Step S129) The control unit 13 resumes writing to the application buffer (WriteStart). That is, the control unit 13 resumes outputting data to the application.
In addition, IF selection part P14 may determine whether the communication apparatus 1 is a forced fallback mode in step S101, S113.

<プロキシ部P1の処理フロー>
図9及び図10は、本実施形態に係るプロキシ部P1の処理フローを示す図である。なお、図10は、図9の続きである。
(ステップS201)プロキシ部P1は、プロキシサービス(LaProxyService)CL21を生成する(onCreate())。その後、ステップS202へ進む。
(ステップS202)プロキシサービスCL21は、フォールバックを管理するFB管理(FallbackManager)CL22を生成する。その後、ステップS203へ進む。
<Processing flow of proxy unit P1>
9 and 10 are diagrams illustrating a processing flow of the proxy unit P1 according to the present embodiment. FIG. 10 is a continuation of FIG.
(Step S201) The proxy unit P1 generates a proxy service (LaProxyService) CL21 (onCreate ()). Thereafter, the process proceeds to step S202.
(Step S202) The proxy service CL21 generates an FB management (FallbackManager) CL22 that manages fallback. Then, it progresses to step S203.

(ステップS203)プロキシサービスCL21は、サーバーソケット(ServerSocket)を生成する。サーバーソケットは、ソケット接続を受け付けるプログラムである。その後、ステップS204へ進む。
(ステップS204)プロキシサービスCL21は、例えば通信装置1(アプリケーション部131)のアプリケーション(元アプリとも称する)から、ソケット接続のリクエストを受け付ける。その後、ステップS205へ進む。
(ステップS205)プロキシサービスCL21は、セッションを管理するFBセッション(FallbackSession)CL23を生成する。その後、ステップS206へ進む。
(Step S203) The proxy service CL21 generates a server socket (ServerSocket). The server socket is a program that accepts a socket connection. Thereafter, the process proceeds to step S204.
(Step S204) The proxy service CL21 receives a socket connection request from an application (also referred to as an original application) of the communication device 1 (application unit 131), for example. Thereafter, the process proceeds to step S205.
(Step S205) The proxy service CL21 generates an FB session (Fallback Session) CL23 for managing the session. Thereafter, the process proceeds to step S206.

(ステップS206)プロキシサービスCL21は、FBセッションCL23を開始させる。その後、ステップS207へ進む。
(ステップS207)FBセッションCL23は、入力されたデータを読み込むプログラム(read())を生成する。その後、ステップS208へ進む。
(ステップS208)FBセッションCL23は、ステップS204で受け付けたリクエストを読み込む。その後、ステップS209へ進む。
(Step S206) The proxy service CL21 starts the FB session CL23. Thereafter, the process proceeds to step S207.
(Step S207) The FB session CL23 generates a program (read ()) for reading input data. Thereafter, the process proceeds to step S208.
(Step S208) The FB session CL23 reads the request received in Step S204. Thereafter, the process proceeds to step S209.

(ステップS209)FBセッションCL23は、接続を確立するためのプログラム(doconnect())を生成する。その後、ステップS210へ進む。
(ステップS210)FBセッションCL23は、ステップS208で読み込んだリクエストのURLを解析する。その後、ステップS211へ進む。
(ステップS211)FBセッションCL23は、ステップS208で読み込んだリクエストについて、不要なリクエストの修正や削除を行う。その後、ステップS212へ進む。
(Step S209) The FB session CL23 generates a program (connect ()) for establishing a connection. Thereafter, the process proceeds to step S210.
(Step S210) The FB session CL23 analyzes the URL of the request read in Step S208. Then, it progresses to step S211.
(Step S211) The FB session CL23 corrects and deletes unnecessary requests for the request read in Step S208. Thereafter, the process proceeds to step S212.

(ステップS212)FBセッションCL23は、LA(LinkAggregation:リンクアグリゲーション(同時通信))が有効であるか無効であるかを確認する。その後、ステップS213へ進む。
(ステップS213)FBセッションCL23は、FB管理CL22に、通信方式(RAT:Radio Access Technology)を選択させる要求を行う。その後、ステップS214へ進む。
(ステップS214)FB管理CL22は、通信方式を選択する(RAT選択)。例えば、FB管理CL22は、デフォルトではWi−Fi通信を選択する。一方、例えば強制フォールバックモードの場合、セルラー通信を選択する。その後、ステップS215へ進む。
(Step S212) The FB session CL23 confirms whether LA (Link Aggregation) is valid or invalid. Thereafter, the process proceeds to step S213.
(Step S213) The FB session CL23 requests the FB management CL22 to select a communication method (RAT: Radio Access Technology). Thereafter, the process proceeds to step S214.
(Step S214) The FB management CL 22 selects a communication method (RAT selection). For example, the FB management CL 22 selects Wi-Fi communication by default. On the other hand, for example, in the case of the forced fallback mode, cellular communication is selected. Thereafter, the process proceeds to step S215.

(ステップS215)FBセッションCL23は、ホストと接続するためのプログラム(clientConnect())を生成する。その後、ステップS216へ進む。
(ステップS216)FBセッションCL23は、ステップS208のリクエストに含まれるドメインネーム情報について、名前解決処理を行うことで、ホストのIPアドレスを取得する。ここで、FBセッションCL23は、ステップS213でWi−Fi通信が選択された場合、予め定めた規則に従ってDNSサーバ(図1のサーバ装置Sv103)を選択し、選択したDNSサーバへ接続する。FBセッションCL23は、接続したDNSサーバを使用して、名前解決処理を行う。一方、FBセッションCL23は、ステップS213でセルラー通信が選択された場合、所定のDNSサーバ(図1のサーバ装置Sv102)を使用して、名前解決処理を行う。その後、ステップS217へ進む。
なお、ステップS216で、DNSサーバへの接続がタイムアウトした場合やDNSサーバへの接続が失敗した場合、通信装置1は、フォールバック条件(A2)、(A5)に該当すると判定する。
(Step S215) The FB session CL23 generates a program (clientConnect ()) for connecting to the host. Thereafter, the process proceeds to step S216.
(Step S216) The FB session CL23 acquires the IP address of the host by performing name resolution processing on the domain name information included in the request of Step S208. Here, when Wi-Fi communication is selected in step S213, the FB session CL23 selects a DNS server (server device Sv103 in FIG. 1) according to a predetermined rule, and connects to the selected DNS server. The FB session CL23 performs name resolution processing using the connected DNS server. On the other hand, when cellular communication is selected in step S213, the FB session CL23 performs name resolution processing using a predetermined DNS server (server device Sv102 in FIG. 1). Thereafter, the process proceeds to step S217.
Note that if the connection to the DNS server times out or the connection to the DNS server fails in step S216, the communication device 1 determines that the fallback conditions (A2) and (A5) are met.

(ステップS217)FBセッションCL23は、ソケット接続を行う。ここで、FBセッションCL23は、ホストへ接続済みで、かつ、ステップS216で取得したホストのIPアドレスと同じ場合には、接続済みのソケット接続を使い廻す。一方、それ以外の場合(例えば未接続の場合)、FBセッションCL23は、ステップS216で取得したホストのIPアドレスを用いて、そのホストへ接続するためのソケットを生成する。FBセッションCL23は、生成したソケットを用いて、ホストへ接続する。例えば、FBセッションCL23は、通常(デフォルト)では、Wi−Fi通信により、ホストへ接続する。なお、ステップS217で、ホストへの接続がタイムアウトした場合やホストへの接続が失敗した場合、通信装置1は、フォールバック条件(A1)、(A4)に該当すると判定する。
ステップS215〜S217(clientConnect())の処理でエラーが発生した場合、ステップS218へ進む。一方、ステップS214〜S217の処理でエラーが発生しなかった場合、図10のステップS219へ進む。
(Step S217) The FB session CL23 performs socket connection. Here, if the FB session CL23 is already connected to the host and is the same as the host IP address acquired in step S216, the FB session CL23 uses the connected socket connection. On the other hand, in other cases (for example, when not connected), the FB session CL23 uses the IP address of the host acquired in step S216 to generate a socket for connecting to the host. The FB session CL23 connects to the host using the generated socket. For example, the FB session CL23 normally connects to the host through Wi-Fi communication (default). Note that if the connection to the host times out or the connection to the host fails in step S217, the communication device 1 determines that the fallback conditions (A1) and (A4) are met.
If an error has occurred in the processing of steps S215 to S217 (clientConnect ()), the process proceeds to step S218. On the other hand, if no error has occurred in steps S214 to S217, the process proceeds to step S219 in FIG.

(ステップS218)FBセッションCL23は、リトライを行う。つまり、FBセッションCL23は、ステップS213で選択された通信方式とは異なる通信方式で、再度、ステップS214〜S217の処理を行う。換言すれば、FBセッションCL23は、ステップS213で選択されたインターフェース151−iとは異なるインターフェース151−kを用いて、再度、ステップS214〜S217の処理を行う。すなわち、通信装置1は、フォールバックを行う。ここで、FBセッションCL23は、リトライを行う前に、ヘッダ比較処理及びRD先情報取得処理を行うことで、リトライを行うか否かを判定する。再度のステップS215〜S217の処理でエラーが発生しなかった場合、図10のステップS219へ進む。
(ステップS219)FBセッションCL23は、サーバへHTTPリクエストを送信するためのプログラム(sendRequest())を生成する。その後、ステップS220へ進む。
(Step S218) The FB session CL23 performs a retry. That is, the FB session CL23 performs the processing of steps S214 to S217 again with a communication method different from the communication method selected in step S213. In other words, the FB session CL23 performs the processes of steps S214 to S217 again using the interface 151-k different from the interface 151-i selected in step S213. That is, the communication device 1 performs fallback. Here, the FB session CL23 determines whether or not to retry by performing a header comparison process and an RD destination information acquisition process before retrying. If no error has occurred in the processes in steps S215 to S217 again, the process proceeds to step S219 in FIG.
(Step S219) The FB session CL23 generates a program (sendRequest ()) for transmitting an HTTP request to the server. Thereafter, the process proceeds to step S220.

(ステップS220)FBセッションCL23は、データを要求するリクエストを、バッファへ書き込む。その後、ステップS221へ進む。
(ステップS221及びS222)FBセッションCL23は、ステップS220で書き込んだリクエストを、ステップS217で接続したホストへ送信する。ステップS221のリクエストに失敗した場合、ステップS223へ進む。一方、ステップS221のリクエストに成功した場合、ステップS224へ進む。
(ステップS223)FBセッションCL23は、リトライを行う。すなわち、通信装置1は、フォールバックを行う。このフォールバックの詳細は、図11を用いて後述する。
(ステップS224)FBセッションCL23は、レスポンスを受信するためのプログラム(recvResponse())を生成する。その後、ステップS224へ進む。
(ステップS225)FBセッションCL23は、スレッド(Thread)CL24を生成する。スレッドは、データを受信するためのプログラムである。その後、ステップS226へ進む。
(ステップS226)FBセッションCL23は、スレッドCL24を開始させる。その後、ステップS227及びステップS237へ進む。
(Step S220) The FB session CL23 writes a request for data to the buffer. Thereafter, the process proceeds to step S221.
(Steps S221 and S222) The FB session CL23 transmits the request written in Step S220 to the host connected in Step S217. If the request in step S221 fails, the process proceeds to step S223. On the other hand, if the request in step S221 is successful, the process proceeds to step S224.
(Step S223) The FB session CL23 performs a retry. That is, the communication device 1 performs fallback. Details of this fallback will be described later with reference to FIG.
(Step S224) The FB session CL23 generates a program (recvResponse ()) for receiving a response. Thereafter, the process proceeds to step S224.
(Step S225) The FB session CL23 generates a thread CL24. A thread is a program for receiving data. Thereafter, the process proceeds to step S226.
(Step S226) The FB session CL23 starts the thread CL24. Then, it progresses to step S227 and step S237.

(ステップS227)スレッドCL24は、レスポンスのヘッダ情報を受信するためのプログラム(recvResponseHeader())を生成する。その後、ステップS228へ進む。
(ステップS228及びS229)スレッドCL24は、ステップS221で送信したリクエストに対するレスポンスのヘッダ情報を受信し、受信したヘッダ情報を読み込む。その後、ステップS230へ進む。
(ステップS230及びS231)スレッドCL24は、ステップS228で読み込んだヘッダ情報を、元アプリのソケットへ書き込む。つまり、スレッドCL24は、ヘッダ情報を、元アプリへ送信する。その後、スレッドCL24は、全てのヘッダ情報の受信が完了するまで、ステップS228〜S231の処理を繰り返す。全てのレスポンスの受信が完了したとき、ステップS232へ進む。
(Step S227) The thread CL24 generates a program (recvResponseHeader ()) for receiving response header information. Thereafter, the process proceeds to step S228.
(Steps S228 and S229) The thread CL24 receives the header information of the response to the request transmitted in Step S221, and reads the received header information. Thereafter, the process proceeds to step S230.
(Steps S230 and S231) The thread CL24 writes the header information read in Step S228 to the socket of the original application. That is, the thread CL24 transmits header information to the original application. Thereafter, the thread CL24 repeats the processes in steps S228 to S231 until reception of all header information is completed. When reception of all responses is completed, the process proceeds to step S232.

(ステップS232)スレッドCL24は、レスポンスのボディ情報(データ部分)を受信するためのプログラム(recvResponseBody())を生成する。その後、ステップS233へ進む。
(ステップS233及びS234)スレッドCL24は、ステップS223で送信したリクエストに対するレスポンスのボディ情報を受信し、受信したボディを読み込む。その後、ステップS235へ進む。
(ステップS235及びS236)スレッドCL24は、ステップS233及びS234で読み込んだボディ情報を、元アプリのソケットへ書き込む。つまり、スレッドCL24は、ボディ情報を、元アプリへ送信する。その後、スレッドCL24は、全てのボディ情報の受信が完了するまで、ステップS233〜S236の処理を繰り返す。
(Step S232) The thread CL24 generates a program (recvResponseBody ()) for receiving the body information (data part) of the response. Thereafter, the process proceeds to step S233.
(Steps S233 and S234) The thread CL24 receives the body information of the response to the request transmitted in Step S223, and reads the received body. Thereafter, the process proceeds to step S235.
(Steps S235 and S236) The thread CL24 writes the body information read in Steps S233 and S234 to the socket of the original application. That is, the thread CL24 transmits body information to the original application. Thereafter, the thread CL24 repeats the processes in steps S233 to S236 until reception of all body information is completed.

(ステップS237)FBセッションCL23は、スループットを監視する。FBセッションCL23は、スレッドCL24が全てのヘッダ情報及びボディ情報の受信が完了するまで、ステップS231又はS236の処理を繰り返す。その後、ステップS239へ進む。ただし、ステップS229又はS234で、スループットがスループット閾値以下であると判定された場合、フォールバック条件(A3)に該当すると判断し、後述の図12のステップS238へ進む。また、ステップS228〜S236の処理、つまり、レスポンス取得中に、エラーが発生した場合には、ステップS239へ進む。
(ステップS238)FBセッションCL23は、例えばスループットが低下した場合に、リトライを行う。すなわち、通信装置1は、フォールバックを行う。なお、スループットが低下した場合とは、例えば、FB元リンクがWi−Fi通信の場合には512Kbps(キロビット毎秒)であり、FB元リンクがLTE通信の場合には512Kbpsであり、FB元リンクが3G通信の場合には256である。このフォールバックの詳細は、図12、図13を用いて後述する。
(ステップS239)FBセッションCL23は、リトライを行う。すなわち、通信装置1は、フォールバックを行う。このフォールバックの詳細は、図14を用いて後述する。
(Step S237) The FB session CL23 monitors the throughput. The FB session CL23 repeats the process of step S231 or S236 until the thread CL24 completes reception of all header information and body information. Thereafter, the process proceeds to step S239. However, if it is determined in step S229 or S234 that the throughput is equal to or less than the throughput threshold value, it is determined that the fallback condition (A3) is satisfied, and the process proceeds to step S238 in FIG. If an error occurs during the processing of steps S228 to S236, that is, during response acquisition, the process proceeds to step S239.
(Step S238) The FB session CL23 retries, for example, when the throughput decreases. That is, the communication device 1 performs fallback. The case where the throughput decreases is, for example, 512 Kbps (kilobit per second) when the FB source link is Wi-Fi communication, 512 Kbps when the FB source link is LTE communication, and the FB source link is In the case of 3G communication, it is 256. Details of this fallback will be described later with reference to FIGS.
(Step S239) The FB session CL23 performs a retry. That is, the communication device 1 performs fallback. Details of this fallback will be described later with reference to FIG.

図11は、本実施形態に係るプロキシ部P1の処理フローを示す別の図である。この図は、図10のステップS218の続きであり、図11のステップS301以降が図10のステップS223に対応する。また、図10のステップ223は、図11のS304以降に対応する。図11において、図9又は図10と同じ符号を付した処理は、図9又は図10のものと同じであるので、説明を省略する。   FIG. 11 is another diagram showing a processing flow of the proxy unit P1 according to the present embodiment. This figure is a continuation of step S218 in FIG. 10, and step S301 and subsequent steps in FIG. 11 correspond to step S223 in FIG. Step 223 in FIG. 10 corresponds to S304 and subsequent steps in FIG. In FIG. 11, the processes denoted by the same reference numerals as those in FIG. 9 or FIG. 10 are the same as those in FIG. 9 or FIG.

(ステップS301)FBセッションCL23は、ステップS221で送信したリクエストに失敗する。なお、このリクエストは、例えば、Wi−Fi通信により送信されたものである。その後、ステップS302へ進む。
(ステップS302)FBセッションCL23は、ステップS217で生成されたソケットを閉じる。その後、ステップS303へ進む。
(ステップS303)FBセッションCL23は、フォールバックを行うためのプログラム(doRetry)を生成する。その後、ステップS304へ進む。
(Step S301) The FB session CL23 fails the request transmitted in step S221. Note that this request is transmitted by Wi-Fi communication, for example. Thereafter, the process proceeds to step S302.
(Step S302) The FB session CL23 closes the socket generated in Step S217. Thereafter, the process proceeds to step S303.
(Step S303) The FB session CL23 generates a program (doRetry) for performing fallback. Thereafter, the process proceeds to step S304.

(ステップS304)FBセッションCL23は、フォールバックを行うためのソケットを生成する。その後、ステップS305へ進む。
(ステップS305)FBセッションCL23は、ステップS208のリクエストに含まれるドメインネーム情報について、名前解決処理を行うことで、ホストのIPアドレスを取得する。ここで、FBセッションCL23は、セルラー通信で用いるDNSサーバ(図1のサーバ装置Sv102)を使用して、名前解決処理を行う。その後、ステップS306へ進む。なお、ステップS305で、DNSサーバへの接続がタイムアウトした場合やDNSサーバへの接続が失敗した場合、通信装置1は、フォールバックも不可能と判断し、通信エラーとする。
(Step S304) The FB session CL23 generates a socket for performing fallback. Thereafter, the process proceeds to step S305.
(Step S305) The FB session CL23 acquires the IP address of the host by performing name resolution processing on the domain name information included in the request of Step S208. Here, the FB session CL23 performs name resolution processing using a DNS server (server device Sv102 in FIG. 1) used in cellular communication. Thereafter, the process proceeds to step S306. In step S305, if the connection to the DNS server times out or the connection to the DNS server fails, the communication device 1 determines that the fallback is also impossible and sets a communication error.

(ステップS306)FBセッションCL23は、ソケット接続を行う。ここで、FBセッションCL23は、ステップS305で取得したホストのIPアドレスを用いて、そのホストへ接続するためのソケットを生成する。FBセッションCL23は、生成されたソケットを用いて、セルラー通信により、ホストへ接続する。その後、ステップS307へ進む。なお、ステップS306で、ホストへの接続がタイムアウトした場合やホストへの接続が失敗した場合、通信装置1は、フォールバックも不可能と判断し、通信エラーとする。
(ステップS307)FBセッションCL23は、データを要求するリクエストを送信するためのプログラム(sendRequest())を生成する。その後、ステップS308へ進む。
(ステップS308及びS309)FBセッションCL23は、データを要求するリクエストを、ステップS306で接続したホストへ、セルラー通信により送信する。その後、ステップS310へ進む。
(Step S306) The FB session CL23 performs socket connection. Here, the FB session CL23 generates a socket for connecting to the host by using the IP address of the host acquired in step S305. The FB session CL23 connects to the host through cellular communication using the generated socket. Thereafter, the process proceeds to step S307. In step S306, if the connection to the host times out or the connection to the host fails, the communication device 1 determines that fallback is also impossible and sets a communication error.
(Step S307) The FB session CL23 generates a program (sendRequest ()) for transmitting a request for requesting data. Thereafter, the process proceeds to step S308.
(Steps S308 and S309) The FB session CL23 transmits a request for data to the host connected in step S306 by cellular communication. Thereafter, the process proceeds to step S310.

(ステップS310)FBセッションCL23は、レスポンスのヘッダ情報を受信するためのプログラム(recvResponseHeader())を生成する。その後、ステップS311へ進む。
(ステップS311及びS312)FBセッションCL23は、レスポンスのヘッダ情報を受信し、受信したヘッダ情報を読み込む。その後、ステップS313へ進む。
(ステップS313及びS314)FBセッションCL23は、ステップS311で読み込んだヘッダ情報を、元アプリのソケットへ書き込む。つまり、FBセッションCL23は、ヘッダ情報を、元アプリへ送信する。その後、FBセッションCL23は、全てのヘッダ情報の受信が完了するまで、ステップS311〜S314の処理を繰り返す。全てのレスポンスの受信が完了したとき、ステップS315へ進む。ここで、FBセッションCL23は、ステップS314の後、ステップS315の前に、ヘッダ比較処理(例えば、コンテンツのサイズの比較処理)を行わない。なぜなら、ステップS301でリクエストに失敗しているため、通信装置1は、FB元ヘッダ情報を取得していないからである。
(Step S310) The FB session CL23 generates a program (recvResponseHeader ()) for receiving response header information. Thereafter, the process proceeds to step S311.
(Steps S311 and S312) The FB session CL23 receives the header information of the response and reads the received header information. Thereafter, the process proceeds to step S313.
(Steps S313 and S314) The FB session CL23 writes the header information read in Step S311 to the socket of the original application. That is, the FB session CL23 transmits header information to the original application. Thereafter, the FB session CL23 repeats the processes of steps S311 to S314 until reception of all header information is completed. When reception of all responses is completed, the process proceeds to step S315. Here, the FB session CL23 does not perform header comparison processing (for example, content size comparison processing) after step S314 and before step S315. This is because the communication apparatus 1 has not acquired the FB source header information because the request has failed in step S301.

(ステップS315)FBセッションCL23は、レスポンスのボディ情報(データ部分)を受信するためのプログラム(recvResponseBody())を生成する。その後、ステップS316へ進む。
(ステップS316及びS317)FBセッションCL23は、ステップS309で送信したリクエストに対するレスポンスのボディ情報を受信し、受信したボディを読み込む。その後、ステップS318へ進む。
(ステップS318及びS319)FBセッションCL23は、ステップS316及びS317で読み込んだボディ情報を、元アプリのソケットへ書き込む。つまり、FBセッションCL23は、ボディ情報を、元アプリへ送信する。その後、FBセッションCL23は、全てのボディ情報の受信が完了するまで、ステップS316〜S319の処理を繰り返す。全てのボディ情報の受信が完了した後、ステップS320へ進む。
(ステップS320)FBセッションCL23は、内部情報である、サーバ装置と接続しているソケットの情報に、FB後のソケット情報を設定(更新)する。
(Step S315) The FB session CL23 generates a program (recvResponseBody ()) for receiving the body information (data part) of the response. Thereafter, the process proceeds to step S316.
(Steps S316 and S317) The FB session CL23 receives the body information of the response to the request transmitted in step S309, and reads the received body. Thereafter, the process proceeds to step S318.
(Steps S318 and S319) The FB session CL23 writes the body information read in Steps S316 and S317 to the socket of the original application. That is, the FB session CL23 transmits the body information to the original application. Thereafter, the FB session CL23 repeats the processes of steps S316 to S319 until reception of all body information is completed. After reception of all body information is completed, the process proceeds to step S320.
(Step S320) The FB session CL23 sets (updates) the socket information after the FB in the information of the socket connected to the server device, which is internal information.

図12は、本実施形態に係るプロキシ部P1の処理フローを示す別の図である。この図は、図10のステップS223の続きである。図11において、図9、図10又は図11と同じ符号を付した処理は、図9、図10又は図11のものと同じであるので、説明を省略する。   FIG. 12 is another diagram showing a processing flow of the proxy unit P1 according to the present embodiment. This figure is a continuation of step S223 in FIG. In FIG. 11, the processes denoted by the same reference numerals as those in FIG. 9, FIG. 10, or FIG. 11 are the same as those in FIG. 9, FIG. 10, or FIG.

(ステップS401)FBセッションCL23は、フォールバックを行うためのプログラム(doRetry)を生成する。その後、ステップS304へ進む。
なお、図12では、ステップS312の後、ステップS402へ進む。また、S304、S306、S309の処理で失敗した場合については、図13で説明する。
(ステップS402)FBセッションCL23は、ステップS228〜S231で読み込んだヘッダ情報(FB元ヘッダ情報)とステップS311〜S312で読み込んだヘッダ情報(FB先ヘッダ情報)とを比較するヘッダ比較処理(例えば、コンテンツのサイズの比較処理)を行う。FB元ヘッダ情報とFB先ヘッダ情報が同じ(例えば、コンテンツのサイズが同じ)であると判定された場合、ステップS403へ進む。なお、FB元ヘッダ情報とFB先ヘッダ情報が同じでないと判定された場合については、図13で説明する。
(Step S401) The FB session CL23 generates a program (doRetry) for performing fallback. Thereafter, the process proceeds to step S304.
In FIG. 12, after step S312, the process proceeds to step S402. Further, the case where the processes in S304, S306, and S309 have failed will be described with reference to FIG.
(Step S402) The FB session CL23 compares the header information (FB source header information) read in steps S228 to S231 and the header information (FB destination header information) read in steps S311 to S312 (for example, Content size comparison process). If it is determined that the FB source header information and the FB destination header information are the same (for example, the content size is the same), the process proceeds to step S403. A case where it is determined that the FB source header information and the FB destination header information are not the same will be described with reference to FIG.

(ステップS403)FBセッションCL23は、フォールバックを開始する。その後、ステップS404へ進む。
(ステップS404)FBセッションCL23は、FB管理CL22に対して、FBセッション数に1を加えさせる。また、FBセッションCL23は、スループットが低下したことを示すスループット低下フラグを設定する。このフラグが設定された場合、スレッドCL24は、ステップS233〜S236のループを抜ける。その後、ステップS315及びS405へ進む。
(ステップS405)スレッドCL24は、図9のステップS217で生成されたソケットを閉じる。なお、FBセッションCL23は、図12の最初のステップS316において、最後のステップS236で書き込まれたボディ情報の続きから、ボディ情報を読み込む。
(Step S403) The FB session CL23 starts fallback. Thereafter, the process proceeds to step S404.
(Step S404) The FB session CL23 causes the FB management CL22 to add 1 to the number of FB sessions. The FB session CL23 sets a throughput reduction flag indicating that the throughput has been reduced. When this flag is set, the thread CL24 exits the loop of steps S233 to S236. Then, it progresses to step S315 and S405.
(Step S405) The thread CL24 closes the socket generated in step S217 of FIG. The FB session CL23 reads body information from the continuation of the body information written in the last step S236 in the first step S316 of FIG.

図13は、本実施形態に係るプロキシ部P1の処理フローを示す別の図である。この図は、図10のステップS223の続きである。図11において、図9〜図12と同じ符号を付した処理は、図9〜図12のものと同じであるので、説明を省略する。なお、図13のステップS304、S306、S309の処理で失敗した場合には、ステップS502へ進む。   FIG. 13 is another diagram illustrating a processing flow of the proxy unit P1 according to the present embodiment. This figure is a continuation of step S223 in FIG. In FIG. 11, the processes denoted by the same reference numerals as those in FIGS. 9 to 12 are the same as those in FIGS. Note that if the processing in steps S304, S306, and S309 in FIG. 13 fails, the process proceeds to step S502.

(ステップS501)FBセッションCL23は、ステップS228〜S231で読み込んだヘッダ情報(FB元ヘッダ情報)とステップS311〜S312で読み込んだヘッダ情報(FB先ヘッダ情報)とを比較するヘッダ比較処理(例えば、コンテンツのサイズの比較処理)を行う。FB元ヘッダ情報とFB先ヘッダ情報が同じ(例えば、コンテンツのサイズが同じ)でないと判定された場合、ステップS502へ進む。なお、FBセッションCL23は、ステップS501の後に、図8のステップS127の処理を行ってもよい。このとき、ステータスコードがリダイレクションを示すと判定された場合、ステップS123へ戻る。この場合、ステップS307に戻って、リダイレクション先へデータを要求するリクエストを送信するためのプログラム(sendRequest())を生成してもよい。
(ステップS502)FBセッションCL23は、ステップS304で生成されたソケットを閉じる。
(Step S501) The FB session CL23 compares the header information (FB source header information) read in Steps S228 to S231 and the header information (FB destination header information) read in Steps S311 to S312 (for example, Content size comparison process). If it is determined that the FB source header information and the FB destination header information are not the same (for example, the content size is the same), the process proceeds to step S502. Note that the FB session CL23 may perform the process of step S127 of FIG. 8 after step S501. At this time, if it is determined that the status code indicates redirection, the process returns to step S123. In this case, returning to step S307, a program (sendRequest ()) for transmitting a request for requesting data to the redirection destination may be generated.
(Step S502) The FB session CL23 closes the socket generated in Step S304.

図14は、本実施形態に係るプロキシ部P1の処理フローを示す別の図である。この図は、図10のステップS223の続きである。図11において、図9〜図12と同じ符号を付した処理は、図9〜図12のものと同じであるので、説明を省略する。   FIG. 14 is another diagram showing a processing flow of the proxy unit P1 according to the present embodiment. This figure is a continuation of step S223 in FIG. In FIG. 11, the processes denoted by the same reference numerals as those in FIGS. 9 to 12 are the same as those in FIGS.

(ステップS601、S602、及びS603)スレッドCL24は、図10のステップS221で送信したリクエストに対して、レスポンスのヘッダ情報を受信できない、又は、全てのヘッダ情報を受信できない状態となる。スレッドCL24は、3秒間、レスポンスを取得できなかった場合には、ステップS604へ進む。
(ステップS604)スレッドCL24は、ステップS217で生成されたソケットを閉じる。その後、ステップSS239へ進む。
(ステップS605)FBセッションCL23は、フォールバックを行うためのプログラム(doRetry)を生成する。その後、ステップS304へ進む。
(Steps S601, S602, and S603) The thread CL24 cannot receive response header information or cannot receive all header information in response to the request transmitted in Step S221 of FIG. If the thread CL24 fails to acquire a response for 3 seconds, the process proceeds to step S604.
(Step S604) The thread CL24 closes the socket generated in Step S217. Thereafter, the process proceeds to Step SS239.
(Step S605) The FB session CL23 generates a program (doRetry) for performing fallback. Thereafter, the process proceeds to step S304.

このように、本実施形態によれば、FB元インターフェース151−iは、第1通信(例えば、Wi−Fi)を行う。FB先インターフェース151−kは、第2通信(例えば、LTE)を行う。記憶部14は、第1通信を用いて取得した通信データのヘッダ情報であるFB元ヘッダ情報を記憶する。プロキシ部P1は、第2通信を用いて取得した通信データのヘッダ情報であるFB先ヘッダ情報を取得する。プロキシ部P1は、FB元ヘッダ情報とFB先ヘッダ情報とを比較し、比較結果に基づいて、通信の一部又は全部について、第1通信と第2通信との切り換えを制御する。これにより、通信装置1は、適切に無線リンクの切り換えを制御できる。例えば、通信装置1は、フォールバックによって、第1通信を用いて取得したデータと第2通信を用いて取得したデータを結合してしまい、データの不整合が生じることを防止できる。   Thus, according to the present embodiment, the FB source interface 151-i performs the first communication (for example, Wi-Fi). The FB destination interface 151-k performs second communication (for example, LTE). The memory | storage part 14 memorize | stores FB original header information which is header information of the communication data acquired using 1st communication. The proxy unit P1 acquires FB destination header information that is header information of communication data acquired using the second communication. The proxy unit P1 compares the FB source header information and the FB destination header information, and controls switching between the first communication and the second communication for a part or all of the communication based on the comparison result. Thereby, the communication apparatus 1 can control switching of a radio link appropriately. For example, the communication device 1 can prevent data inconsistency by combining data acquired using the first communication and data acquired using the second communication by fallback.

また、本実施形態によれば、プロキシ部P1は、FB元ヘッダ情報とFB先ヘッダ情報の少なくとも一部が一致しない場合には、通信の一部又は全部について、第1通信と第2通信との切り換えを止めると判定する。つまり、通信装置1は、フォールバックを止める。
プロキシ部P1は、FB先ヘッダ情報がリダイレクションを示す場合には、当該リダイレクション先からFB先ヘッダ情報を取得し、取得したFB先ヘッダ情報とFB元ヘッダ情報との比較結果に基づいて、通信の一部又は全部について、第1通信と第2通信との切り換えを制御する。これにより、通信装置1は、フォールバック時にリダイレクトされた場合でも、ヘッダ情報が同じものを取得できた場合、つまり、最終的にコンテンツが同じである場合、フォールバックを行うことができる。
Further, according to the present embodiment, the proxy unit P1 performs the first communication and the second communication for part or all of the communication when at least a part of the FB source header information and the FB destination header information do not match. It is determined to stop switching. That is, the communication device 1 stops the fallback.
When the FB destination header information indicates redirection, the proxy unit P1 acquires the FB destination header information from the redirection destination, and based on the comparison result between the acquired FB destination header information and the FB source header information, For some or all, switching between the first communication and the second communication is controlled. As a result, the communication device 1 can perform fallback when the same header information can be acquired even when redirected during fallback, that is, when the content is finally the same.

また、本実施形態によれば、記憶部14は、通信装置1に提供されるコンテンツのうち、第1通信を用いて取得したコンテンツ(取得済コンテンツとも称する)を記憶する。プロキシ部P1は、FB元ヘッダ情報とFB先ヘッダ情報の少なくとも一部が一致する場合には、通信の一部又は全部について、第1通信と第2通信を切り換えると判定する。プロキシ部P1は、第2通信を用いてコンテンツのうち、取得済コンテンツ以外のコンテンツ(未取得コンテンツとも称する)を取得し、取得済コンテンツと未取得コンテンツを合成する。   Further, according to the present embodiment, the storage unit 14 stores content (also referred to as acquired content) acquired using the first communication among the contents provided to the communication device 1. When at least a part of the FB source header information and the FB destination header information match, the proxy unit P1 determines to switch the first communication and the second communication for a part or all of the communication. The proxy unit P1 acquires content other than the acquired content (also referred to as non-acquired content) from the content using the second communication, and combines the acquired content and the unacquired content.

また、本実施形態によれば、プロキシ部P1は、予め定めたセッション(一連の通信)毎に、第1通信と第2通信の切り換えを制御し、第1通信から第2通信へ切り換えているセッションの数(FBセッション数)を計数する。プロキシ部P1は、予め定めたルールに従って第1通信を優先し、計数したFBセッション数が許容値を超えた場合に、第2通信を優先する(強制フォールバックモードへ遷移する)。このように、通信装置1は、強制フォールバックモードに遷移させることで、不要リンクへの通信確立を試みるコストが不要となり、すぐに良好な通信を行うことができる。なお、予め定めたルールとは、例えば、予め定めた状態(デフォルト状態、又は、通常状態)において、第1通信を優先するものである。 また、本実施形態によれば、第1通信と第2通信は、通信のインターフェースが異なる。プロキシ部P1は、第1通信のFB元インターフェース151−iと第2通信のFB先インターフェース151−kとの切り換えを制御する。   Further, according to the present embodiment, the proxy unit P1 controls switching between the first communication and the second communication for each predetermined session (a series of communications), and switches from the first communication to the second communication. Count the number of sessions (number of FB sessions). The proxy unit P1 prioritizes the first communication according to a predetermined rule, and prioritizes the second communication when the counted number of FB sessions exceeds the allowable value (transitions to the forced fallback mode). In this way, the communication device 1 makes a transition to the forced fallback mode, thereby eliminating the cost of trying to establish communication with an unnecessary link, and can immediately perform good communication. The predetermined rule is, for example, a method in which the first communication is given priority in a predetermined state (default state or normal state). According to the present embodiment, the first communication and the second communication have different communication interfaces. The proxy unit P1 controls switching between the FB source interface 151-i for the first communication and the FB destination interface 151-k for the second communication.

(第2の実施形態)
通信装置1(プロキシ部P1)は、セッションの途中、つまり、FB先での通信完了前にフェールバックを行ってもよい。その場合、通信装置1は、ヘッダ比較処理を行って、フェールバックをするか否かを判定してもよい。
(Second Embodiment)
The communication device 1 (proxy unit P1) may perform failback during the session, that is, before completion of communication at the FB destination. In that case, the communication apparatus 1 may determine whether or not to perform a failback by performing a header comparison process.

(第3の実施形態)
上記各実施形態において、通信装置1(プロキシ部P1)は、提供されるデータ部分のヘッダ情報の一部又は全部を比較してもよい。例えば、HTTPのパケットには、IPヘッダやTCPヘッダの後に、データ部分であるHTTPデータが含まれている。例えば、HTTPデータは、HTMLの情報である。
この場合、例えば、通信装置1は、無線リンクL2において、HTTPのヘッダフィールドで「Range:bytes=−200」と指定することで、200バイト以前のデータを取得できる。例えば、データがHTMLの場合、200バイト以前のデータには、HTMLのヘッダ情報の一部又は全部が含まれる。通信装置1は、取得したHTMLのヘッダ情報の一部又は全部と、無線リンクL1を用いて取得したHTMLのヘッダ情報の一部又は全部と、を比較することにより、ヘッダ比較処理を行ってもよい。
(Third embodiment)
In each said embodiment, the communication apparatus 1 (proxy part P1) may compare the one part or all part of the header information of the data part provided. For example, an HTTP packet includes HTTP data as a data portion after an IP header or a TCP header. For example, the HTTP data is HTML information.
In this case, for example, the communication device 1 can acquire data of 200 bytes or less by specifying “Range: bytes = −200” in the HTTP header field in the wireless link L2. For example, when the data is HTML, the data before 200 bytes includes part or all of the HTML header information. The communication device 1 may perform header comparison processing by comparing part or all of the acquired HTML header information with part or all of the HTML header information acquired using the radio link L1. Good.

(第4の実施形態)
通信装置1(プロキシ部P1)は、フォールバックを行うか否かの判定(ヘッダ比較処理を含む)において、アプリケーションのタイムアウト時間を考慮してもよい。例えば、通信装置1は、ヘッダ比較処理又はRD先情報取得処理の時間が、アプリケーションのタイムアウト時間に近づいたときには、フォールバックを行わないと判定してもよい。
(Fourth embodiment)
The communication device 1 (proxy unit P1) may consider the timeout time of the application in determining whether to perform fallback (including header comparison processing). For example, the communication device 1 may determine that the fallback is not performed when the time of the header comparison process or the RD destination information acquisition process approaches the timeout time of the application.

なお、上述した実施形態における通信装置1の一部をコンピュータで実現するようにしてもよい。その場合、この制御機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現してもよい。なお、ここでいう「コンピュータシステム」とは、通信装置1に内蔵されたコンピュータシステムであって、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでもよい。また上記プログラムは、前述した機能の一部を実現するためのものであってもよく、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよい。
また、上述した実施形態における通信装置1の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現してもよい。通信装置1の各機能ブロックは個別にプロセッサ化してもよいし、一部、または全部を集積してプロセッサ化してもよい。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現してもよい。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いてもよい。
Note that a part of the communication device 1 in the above-described embodiment may be realized by a computer. In that case, the program for realizing the control function may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read by the computer system and executed. Here, the “computer system” is a computer system built in the communication apparatus 1 and includes an OS and hardware such as peripheral devices. The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. Furthermore, the “computer-readable recording medium” is a medium that dynamically holds a program for a short time, such as a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line, In this case, a volatile memory inside a computer system that serves as a server or a client may be included that holds a program for a certain period of time. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
Moreover, you may implement | achieve part or all of the communication apparatus 1 in embodiment mentioned above as integrated circuits, such as LSI (Large Scale Integration). Each functional block of the communication device 1 may be individually made into a processor, or a part or all of them may be integrated into a processor. Further, the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. In addition, when an integrated circuit technology that replaces LSI appears due to the advancement of semiconductor technology, an integrated circuit based on the technology may be used.

以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。   As described above, the embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to the above, and various design changes and the like can be made without departing from the scope of the present invention. It is possible to

1・・・通信装置、AP1・・・アクセスポイント、BS1・・・基地局装置、Sv101、Sv102、Sv103、Sv104・・・サーバ装置、11・・・入力部、12・・・出力部、13・・・制御部、14・・・記憶部、15・・・通信部、131・・・アプリケーション部、P1・・・プロキシ部、151−1〜151−N・・・インターフェース、152・・・信号強度検出部、P111・・・セッション管理部、P112・・・DNS管理部、P113・・・スループット取得部、P114・・・容量情報取得部、P121・・・信号強度取得部、P122・・・計時部、P123・・・AP情報取得部、P124・・・通信方式情報取得部、P125・・・位置情報取得部、P131・・・ヘッダ情報取得部、P132・・・リダイレクト情報取得部、P14・・・IF選択部、P15・・・データ合成部   DESCRIPTION OF SYMBOLS 1 ... Communication apparatus, AP1 ... Access point, BS1 ... Base station apparatus, Sv101, Sv102, Sv103, Sv104 ... Server apparatus, 11 ... Input part, 12 ... Output part, 13 ... Control part, 14 ... Storage part, 15 ... Communication part, 131 ... Application part, P1 ... Proxy part, 151-1 to 151-N ... Interface, 152 ... Signal strength detection unit, P111 ... session management unit, P112 ... DNS management unit, P113 ... throughput acquisition unit, P114 ... capacity information acquisition unit, P121 ... signal strength acquisition unit, P122 ... Time measuring unit, P123 ... AP information acquisition unit, P124 ... Communication method information acquisition unit, P125 ... Position information acquisition unit, P131 ... Header information acquisition unit, P132 Redirection information acquisition unit, P14 ··· IF selection unit, P15 ··· data synthesis section

Claims (8)

第1通信を行う第1通信部と、
第2通信を行う第2通信部と、
前記第1通信を用いて取得した通信データのHTTPヘッダ情報である第1ヘッダ情報を記憶する記憶部と、
前記第2通信を用いて取得した通信データのHTTPヘッダ情報である第2ヘッダ情報を取得する情報取得部と、
前記第1ヘッダ情報と前記第2ヘッダ情報とを比較し、前記第1ヘッダ情報のコンテンツサイズと前記第2ヘッダ情報のコンテンツサイズが一致しない場合には、比較結果に基づいて、通信の一部又は全部について、前記第1通信と前記第2通信との切り換えを止めると判定する選択部と、
を備える通信装置。
A first communication unit for performing first communication;
A second communication unit for performing second communication;
A storage unit that stores first header information that is HTTP header information of communication data acquired using the first communication;
An information acquisition unit that acquires second header information that is HTTP header information of communication data acquired using the second communication;
When the first header information and the second header information are compared, and the content size of the first header information does not match the content size of the second header information , a part of communication is performed based on the comparison result Alternatively, for all, a selection unit that determines to stop switching between the first communication and the second communication,
A communication device comprising:
前記選択部は、前記第2ヘッダ情報がリダイレクションを示す場合には、当該リダイレクション先から前記第2ヘッダ情報を取得し、取得した第2ヘッダ情報と前記第1ヘッダ情報との比較結果に基づいて、通信の一部又は全部について、前記第1通信と前記第2通信との切り換えを制御する請求項に記載の通信装置。 When the second header information indicates redirection, the selection unit acquires the second header information from the redirection destination, and based on a comparison result between the acquired second header information and the first header information. The communication device according to claim 1 , wherein switching between the first communication and the second communication is controlled for part or all of the communication. 前記記憶部は、前記通信装置に提供される提供データのうち、前記第1通信を用いて取得した第1データを記憶し、
前記選択部は、前記第1ヘッダ情報と前記第2ヘッダ情報の少なくとも一部が一致する場合には、通信の一部又は全部について、前記第1通信と前記第2通信を切り換えると判定し、
前記第2通信を用いて、前記提供データのうち、前記第1データ以外の第2データを取得し、前記第1データと前記第2データを合成する合成部を備える請求項1又は2に記載の通信装置。
The storage unit stores first data acquired using the first communication among provided data provided to the communication device,
The selection unit determines to switch the first communication and the second communication for a part or all of the communication when at least a part of the first header information and the second header information match;
Using the second communication, the out of the provided data, the first to obtain a second data other than the data, according to claim 1 or 2 comprising a combining unit for combining the second data and the first data Communication equipment.
前記選択部は、予め定めた一連の通信毎に、前記第1通信と前記第2通信の切り換えを制御し、
前記第1通信から前記第2通信へ切り換えている前記一連の通信の数を計数する計数部を備え、
前記選択部は、前記第1通信を優先し、前記計数部が計数した一連の通信の数が閾値を超えた場合には、前記第2通信を優先する請求項1からのいずれか一項に記載の通信装置。
The selection unit controls switching between the first communication and the second communication for each predetermined series of communication,
A counting unit that counts the number of the series of communications that are switched from the first communication to the second communication;
The selection unit may give priority to the first communication, if the number of series of communications which the counting unit has counted exceeds the threshold, any one of 3 the second communication from the priority claim 1 The communication apparatus as described in.
前記第1通信と前記第2通信は、論理的又は物理的な通信インターフェースが異なり、
前記選択部は、前記第1通信の通信インターフェースと前記第2通信のインターフェースとの切り換えを制御する請求項1からのいずれか一項に記載の通信装置。
The first communication and the second communication are different in logical or physical communication interface,
The selection unit includes a communication device according to any one of claims 1 to 4 for controlling the switching between the first communication communications interface and the second communication interface.
通信装置における通信方法おいて、
記憶部が、第1通信を用いて取得した通信データのHTTPヘッダ情報である第1ヘッダ情報を記憶する記憶過程と、
ヘッダ情報取得部が、第2通信を用いて取得した通信データのHTTPヘッダ情報である第2ヘッダ情報を取得する情報取得過程と、
選択部が、前記第1ヘッダ情報と前記第2ヘッダ情報とを比較し、前記第1ヘッダ情報のコンテンツサイズと前記第2ヘッダ情報のコンテンツサイズが一致しない場合には、通信の一部又は全部について、前記第1通信と前記第2通信との切り換えを止めると判定する選択過程と、
を有する通信方法。
In a communication method in a communication device,
A storage process in which the storage unit stores first header information which is HTTP header information of communication data acquired using the first communication;
An information acquisition process in which the header information acquisition unit acquires second header information which is HTTP header information of communication data acquired using the second communication;
When the selection unit compares the first header information and the second header information, and the content size of the first header information does not match the content size of the second header information , part or all of the communication A selection process for determining to stop switching between the first communication and the second communication;
A communication method comprising:
通信装置のコンピュータに、
第1通信を用いて取得した通信データのHTTPヘッダ情報である第1ヘッダ情報を記憶する記憶手順、
第2通信を用いて取得した通信データのHTTPヘッダ情報である第2ヘッダ情報を取得する情報取得手順、
前記第1ヘッダ情報と前記第2ヘッダ情報とを比較し、前記第1ヘッダ情報のコンテンツサイズと前記第2ヘッダ情報のコンテンツサイズが一致しない場合には、通信の一部又は全部について、前記第1通信と前記第2通信との切り換えを止めると判定する選択手順、
を実行させるための通信プログラム。
In the computer of the communication device,
A storage procedure for storing first header information which is HTTP header information of communication data acquired using the first communication;
An information acquisition procedure for acquiring second header information which is HTTP header information of communication data acquired using the second communication;
When the first header information and the second header information are compared, and the content size of the first header information does not match the content size of the second header information, the first header information and the second header information A selection procedure for determining to stop switching between the first communication and the second communication;
Communication program for executing
第1通信を用いて取得した通信データのHTTPヘッダ情報である第1ヘッダ情報と第2通信を用いて取得した通信データのHTTPヘッダ情報である第2ヘッダ情報とを比較し、前記第1ヘッダ情報のコンテンツサイズと前記第2ヘッダ情報のコンテンツサイズが一致しない場合には、通信の一部又は全部について、前記第1通信と前記第2通信との切り換えを止めると判定する選択部を備えるプロセッサ。 First header information that is HTTP header information of communication data acquired using first communication is compared with second header information that is HTTP header information of communication data acquired using second communication, and the first header A processor including a selection unit that determines that switching between the first communication and the second communication is stopped for part or all of the communication when the content size of the information does not match the content size of the second header information .
JP2014231060A 2014-11-13 2014-11-13 COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, AND PROCESSOR Expired - Fee Related JP6488526B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014231060A JP6488526B2 (en) 2014-11-13 2014-11-13 COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, AND PROCESSOR

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014231060A JP6488526B2 (en) 2014-11-13 2014-11-13 COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, AND PROCESSOR

Publications (2)

Publication Number Publication Date
JP2016096436A JP2016096436A (en) 2016-05-26
JP6488526B2 true JP6488526B2 (en) 2019-03-27

Family

ID=56071990

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014231060A Expired - Fee Related JP6488526B2 (en) 2014-11-13 2014-11-13 COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, AND PROCESSOR

Country Status (1)

Country Link
JP (1) JP6488526B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4299082B2 (en) * 2002-10-18 2009-07-22 株式会社エヌ・ティ・ティ・ドコモ Mobile station, mobile communication system, and cell selection method
US7711369B2 (en) * 2005-08-22 2010-05-04 Toshiba America Research, Inc. Seamless mobility for a multiple interface device in a co-located wireless environment
JP2007318291A (en) * 2006-05-24 2007-12-06 Matsushita Electric Ind Co Ltd Communication terminal adaptive to multiple systems
JP5722171B2 (en) * 2011-09-13 2015-05-20 株式会社東芝 COMMUNICATION SYSTEM, ACCESS POINT, SERVER DEVICE, AND COMMUNICATION CONTROL METHOD
JP5865277B2 (en) * 2013-02-04 2016-02-17 アラクサラネットワークス株式会社 Authentication switch or network system

Also Published As

Publication number Publication date
JP2016096436A (en) 2016-05-26

Similar Documents

Publication Publication Date Title
JP5815690B2 (en) System and method for providing network access to electronic devices
US10212580B2 (en) Cloud-based connectivity information discovery
US20060234762A1 (en) Method and apparatus for selecting a communication mode for performing user requested data transfers
KR20110016918A (en) Methods and apparatus for prioritizing assignment of a packet data session for a plurality of applications of a mobile communication device
KR101903924B1 (en) Method and system for vicarious downloading or uploading of information
TW201110796A (en) Connection manager for a wireless communication device
WO2007014630A1 (en) Automatic mobile device capability management
CN1714559A (en) Methods, systems and computer program products for non-intrusive subsequent provisioning of a mobile terminal
JP4283818B2 (en) Roaming control device, mobile communication terminal, mobile communication system, and roaming control method
JPWO2008013291A1 (en) Mobile communication system, mobile communication terminal, and network selection method used therefor
US10757185B2 (en) Method for peer-to-peer multimedia data sharing, electronic device and non-volatile computer readable medium
JP2014179719A (en) Radio communication device, method for determining priority order of use access point, program and recording medium
WO2016180210A1 (en) Method and apparatus for accessing wifi network
JP2018032134A (en) Construction machine management system
JP2018502473A (en) Method and device for routing traffic of applications installed on a mobile device
CN112969208A (en) Switching control method and device of service server, electronic equipment and storage medium
CN113162788A (en) Method and communication device for transmitting report information and communication system
EP2931000B1 (en) Wireless communication apparatus, wireless communication method, and wireless communication program
CN114125974A (en) Cell selection method, device, terminal and storage medium
JP6488526B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, AND PROCESSOR
JP6488528B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, AND PROCESSOR
EP3280169B1 (en) Traffic statistics collecting method, device and terminal device
EP3413620A1 (en) Video optimization method, user equipment unit and network equipment unit
CN108737378B (en) Dual-mode communication networking method and system based on medium access control layer
JP2008187417A (en) Cellular phone

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170925

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180613

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180626

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180827

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190208

R150 Certificate of patent or registration of utility model

Ref document number: 6488526

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees