JP2017157964A - Communication device, control method and program - Google Patents

Communication device, control method and program Download PDF

Info

Publication number
JP2017157964A
JP2017157964A JP2016038040A JP2016038040A JP2017157964A JP 2017157964 A JP2017157964 A JP 2017157964A JP 2016038040 A JP2016038040 A JP 2016038040A JP 2016038040 A JP2016038040 A JP 2016038040A JP 2017157964 A JP2017157964 A JP 2017157964A
Authority
JP
Japan
Prior art keywords
communication
data
communication path
predetermined
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2016038040A
Other languages
Japanese (ja)
Inventor
暁央 木下
Akihisa Kinoshita
暁央 木下
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2016038040A priority Critical patent/JP2017157964A/en
Publication of JP2017157964A publication Critical patent/JP2017157964A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To allow data via a desired communication path to be received preferentially to data via a communication path different from the desired path.SOLUTION: A communication device of the present invention includes: establishing means for establishing a plurality of communication paths; receiving means for receiving data via the communication paths established by the establishing means; determining means for determining which is a prescribed communication path on which the receiving means preferentially receives data among the plurality of communication paths; and transmitting means for transmitting a signal to restrain data transmission via communication paths different from the prescribed communication path determined by the determination means than data transmission via the prescribed communication path among the plurality of communication paths.SELECTED DRAWING: Figure 5

Description

本発明は、データ通信の制御を行う通信装置に関する。   The present invention relates to a communication apparatus that controls data communication.

TCP/IP通信では、データの送信装置と受信装置とは、コネクションと呼ばれる通信路を確立し、当該通信路上で通信を行う。また、受信装置は、コネクションを介して受信したデータに対して受信確認応答であるACKを送信することで通信の信頼性を向上させている。このACKには、ACKを待つことなく、データの送信装置が送信することのできるデータ量を示すウィンドウサイズと呼ばれる情報が含められている。受信装置は、自装置が受信したデータを一時的に記憶するバッファの空き容量等に基づいて、ウィンドウサイズを設定する。一方、送信装置は、ウィンドウサイズに従って、送信するデータのサイズを調整することで、受信装置が利用可能なバッファを越えたデータを送信してしまうことを防止している(特許文献1)。   In TCP / IP communication, a data transmission device and a reception device establish a communication path called a connection and perform communication on the communication path. In addition, the receiving apparatus improves the reliability of communication by transmitting an ACK that is a reception confirmation response to the data received through the connection. This ACK includes information called a window size indicating the amount of data that can be transmitted by the data transmission apparatus without waiting for the ACK. The receiving device sets the window size based on the free capacity of a buffer that temporarily stores data received by the receiving device. On the other hand, the transmission device prevents the transmission of data exceeding the available buffer by the reception device by adjusting the size of data to be transmitted according to the window size (Patent Document 1).

特開2007−110680号公報JP 2007-110680 A

しかしながら、バッファとして利用可能なメモリのサイズが小さい装置が複数のコネクションを確立した場合、次のような課題が発生する。即ち、優先的にデータを受信したいコネクションがあるにも拘わらず、他のコネクションを介して受信したデータでバッファが占有されてしまい、優先的にデータを受信したいコネクションを介したデータ受信が阻まれてしまう場合があった。   However, when a device having a small size of memory that can be used as a buffer establishes a plurality of connections, the following problem occurs. In other words, the buffer is occupied with data received through other connections even though there is a connection that wants to receive data preferentially, and data reception via the connection that wants to receive data preferentially is blocked. There was a case.

例えば、プリンタが印刷データの受信のためにPCと接続するコネクションと、インターネットに接続するコネクションと、を確立している場合がある。この場合に、インターネットに接続するコネクションを介して大量のデータを受信してしまうと、印刷データの受信が阻まれ、プリンタ本来の動作に支障をきたす場合があった。   For example, the printer may establish a connection for connecting to a PC and a connection for connecting to the Internet for receiving print data. In this case, if a large amount of data is received via a connection connected to the Internet, the reception of print data is blocked, and the original operation of the printer may be hindered.

上記課題を鑑み、所望の通信路を介したデータの受信を、これとは異なる通信路を介したデータの受信よりも優先してできるようにすることを目的とする。   In view of the above problems, it is an object of the present invention to allow data reception via a desired communication path to be given priority over data reception via a different communication path.

上記課題を鑑み、本発明の通信装置は、複数の通信路を確立する確立手段と、前記確立手段により確立された通信路を介してデータを受信する受信手段と、前記複数の通信路のうち、前記受信手段によるデータの受信を優先的に行う所定の通信路を判定する判定手段と、前記複数の通信路のうち、前記判定手段により判定された前記所定の通信路とは異なる通信路を介したデータ送信を、前記所定の通信路を介したデータ送信よりも抑制させるための信号を送信する送信手段と、を有する。   In view of the above problems, a communication device according to the present invention includes an establishing unit that establishes a plurality of communication paths, a receiving unit that receives data via the communication path established by the establishing unit, and the plurality of communication paths. Determining means for determining a predetermined communication path for preferentially receiving data by the receiving means; and a communication path different from the predetermined communication path determined by the determination means among the plurality of communication paths. Transmitting means for transmitting a signal for suppressing data transmission via the predetermined communication path rather than data transmission via the predetermined communication path.

本発明によれば、所望の通信路を介したデータの受信を、これとは異なる通信路を介したデータの受信よりも優先して行うことができる。   According to the present invention, reception of data via a desired communication path can be performed with priority over reception of data via a different communication path.

システム構成図。System Configuration. 通信装置のハードウェア構成図。The hardware block diagram of a communication apparatus. 通信装置のソフトウェア構成図。The software block diagram of a communication apparatus. コネクション毎の優先度を示すテーブル。A table showing the priority for each connection. 通信装置が実現するフローチャート。The flowchart which a communication apparatus implement | achieves.

図1に、本実施形態のシステム構成を示す。通信装置101と他の通信装置102はTCP/IPに準拠した通信を行う。なお、通信装置101が、複数の他の通信装置102とTCP/IPに準拠した通信を行うようにしてもよい。ここで、TCPとはTransmission Control Protocolの略であり、IPとはInternet Protocolの略である。TCP/IPに準拠した通信は、TCP/IPヘッダを付したパケットを送受信することによって行われる。   FIG. 1 shows the system configuration of this embodiment. The communication device 101 and the other communication device 102 perform communication complying with TCP / IP. Note that the communication apparatus 101 may communicate with a plurality of other communication apparatuses 102 in conformity with TCP / IP. Here, TCP is an abbreviation for Transmission Control Protocol, and IP is an abbreviation for Internet Protocol. Communication conforming to TCP / IP is performed by transmitting and receiving a packet with a TCP / IP header.

図2に、通信装置101のハードウェア構成を示す。記憶部201はROMやRAM等のメモリにより構成され、後述する各種動作を行うためのプログラムや、TCP/IP通信のための通信パラメータ等の各種情報を記憶する。なお、記憶部201として、ROM、RAM等のメモリの他に、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、磁気テープ、不揮発性のメモリカード、CD、DVDなどの記憶媒体を用いてもよい。また、記憶部201が複数のメモリ等を備えていてもよい。   FIG. 2 shows a hardware configuration of the communication apparatus 101. The storage unit 201 is configured by a memory such as a ROM or a RAM, and stores various information such as a program for performing various operations described later and a communication parameter for TCP / IP communication. The storage unit 201 may be a storage medium such as a flexible disk, a hard disk, an optical disk, a magneto-optical disk, a magnetic tape, a nonvolatile memory card, a CD, and a DVD, in addition to a memory such as a ROM and a RAM. The storage unit 201 may include a plurality of memories.

制御部202はCPUやMPU等のプロセッサにより構成され、記憶部201に記憶されたプログラムを実行することにより通信装置101全体を制御する。なお、制御部202は、記憶部201に記憶されたプログラムとOS(Operating System)との協働により通信装置101全体を制御するようにしてもよい。また、制御部202がマルチコア等の複数のプロセッサを備え、複数のプロセッサにより通信装置101全体を制御するようにしてもよい。   The control unit 202 is configured by a processor such as a CPU or MPU, and controls the entire communication device 101 by executing a program stored in the storage unit 201. Note that the control unit 202 may control the entire communication apparatus 101 in cooperation with a program stored in the storage unit 201 and an OS (Operating System). The control unit 202 may include a plurality of processors such as multi-cores, and the plurality of processors may control the entire communication apparatus 101.

機能部203は、通信装置101が所定の処理を実行するためのハードウェアである。例えば、通信装置101がカメラである場合、機能部203は撮像部であり、撮像処理を行う。また、例えば、通信装置101がプリンタである場合、機能部203は印刷部であり、印刷処理を行う。また、例えば、通信装置101がプロジェクタである場合、機能部203は投影部であり、投影処理を行う。機能部203が処理するデータは、記憶部201に記憶されているデータであってもよいし、後述する通信部206を介して他の通信装置と通信したデータであってもよい。   The functional unit 203 is hardware for the communication apparatus 101 to execute predetermined processing. For example, when the communication apparatus 101 is a camera, the function unit 203 is an imaging unit and performs an imaging process. For example, when the communication apparatus 101 is a printer, the function unit 203 is a printing unit, and performs a printing process. For example, when the communication apparatus 101 is a projector, the function unit 203 is a projection unit, and performs a projection process. The data processed by the function unit 203 may be data stored in the storage unit 201 or data communicated with another communication device via the communication unit 206 described later.

入力部204は、ユーザからの各種操作の受付を行う。出力部205は、ユーザに対して各種出力を行う。ここで、出力部205による出力とは、画面上への表示や、スピーカーによる音声出力、振動出力等の少なくとも1つを含む。なお、タッチパネルのように入力部204と出力部205の両方を1つのモジュールで実現するようにしてもよい。   The input unit 204 receives various operations from the user. The output unit 205 performs various outputs to the user. Here, the output by the output unit 205 includes at least one of display on a screen, sound output by a speaker, vibration output, and the like. Note that both the input unit 204 and the output unit 205 may be realized by one module like a touch panel.

通信部206はTCP/IP通信の制御を行い、不図示のIF(インターフェース)を介して、画像データや文書データ、映像データ等のコンテンツを他の通信装置102と通信する。   A communication unit 206 controls TCP / IP communication, and communicates contents such as image data, document data, and video data with another communication apparatus 102 via an IF (interface) (not shown).

図3に、記憶部201に記憶されたプログラムを制御部202が読み出し、それを実行することで実現されるソフトウェアブロック図を示す。   FIG. 3 shows a software block diagram realized by the control unit 202 reading the program stored in the storage unit 201 and executing the program.

送受信部301は、後述する通信処理部302から受け取ったデータを他の通信装置102に送信する。また、送受信部301は、他の通信装置102から受信したデータを通信処理部302へ提供する。通信処理部302はTCP/IP処理を行う。具体的には、送受信部301から受け取ったデータに対してTCP/IPの受信処理を行う。また、通信処理部302は、後述するアプリケーション部306から受け取ったデータに対してTCP/IPの送信処理を行う。また、通信処理部302は、アプリケーション部306において実行されるアプリケーションからの指示に応じて、TCPにおいてデータを通信するための通信路であるコネクションの確立および切断を行う。通信処理部302は、1台の他の通信装置102との間で複数のコネクションを確立することも、複数の他の通信装置102の各々との間で1つまたは複数のコネクションを確立することも可能である。   The transmission / reception unit 301 transmits data received from a communication processing unit 302 (to be described later) to another communication device 102. In addition, the transmission / reception unit 301 provides data received from another communication device 102 to the communication processing unit 302. The communication processing unit 302 performs TCP / IP processing. Specifically, TCP / IP reception processing is performed on the data received from the transmission / reception unit 301. The communication processing unit 302 performs TCP / IP transmission processing on data received from the application unit 306 described later. Further, the communication processing unit 302 establishes and disconnects a connection that is a communication path for communicating data in TCP in accordance with an instruction from an application executed in the application unit 306. The communication processing unit 302 establishes a plurality of connections with one other communication device 102 or establishes one or a plurality of connections with each of the plurality of other communication devices 102. Is also possible.

優先度管理部303は、通信処理部302が確立したコネクション毎の優先度を管理する。当該管理は、図4に示すようなコネクションIDと優先度値を対応付けたテーブルを用いて行われる。この例では、通信装置101が並行して維持することが可能な10コのコネクションのうち、7コのコネクションが既に確立されている。   The priority management unit 303 manages the priority for each connection established by the communication processing unit 302. The management is performed using a table associating connection IDs with priority values as shown in FIG. In this example, of the 10 connections that the communication apparatus 101 can maintain in parallel, 7 connections have already been established.

図4において、コネクションIDとは、各コネクションを識別するための識別情報である。また、優先度値とは、コネクション毎の優先度を示す値である。ここでは、優先度値が大きいほど優先度が高い。優先度の高いコネクションにおける通信は、優先度の低いコネクションにおける通信よりも、優先的に行われるように制御される。なお、以下の実施形態において、当該優先度は、対応するコネクションを介したデータ受信の優先度を示すものとして説明する。データ送信に関する各コネクションの優先度は、データ受信の優先度と同じであってもよいし、異なっていてもよい。   In FIG. 4, the connection ID is identification information for identifying each connection. The priority value is a value indicating the priority for each connection. Here, the higher the priority value, the higher the priority. Communication in a connection with a high priority is controlled to be performed preferentially over communication in a connection with a low priority. In the following embodiments, the priority will be described as indicating the priority of data reception via the corresponding connection. The priority of each connection regarding data transmission may be the same as or different from the priority of data reception.

また、本実施形態において、優先度は、当該コネクションを利用するアプリケーションプログラムの重要度、および、コネクションを確立したタイミングに基づいて設定される。一例として、通信装置101がプリンタであって、プリントアプリケーションとインターネット接続アプリケーションの2つのアプリケーションを実行する場合について説明する。この場合、アプリケーション自体の優先度に応じて、当該アプリケーションが確立したコネクションの優先度が設定される。ここでは、プリントアプリケーションが確立したコネクションの優先度が、インターネット接続アプリケーションが確立したコネクションの優先度よりも高く設定される。これにより、プリンタとして優先的に処理すべきプリント処理に関する通信を優先的に行うことができる。   In the present embodiment, the priority is set based on the importance of the application program that uses the connection and the timing at which the connection is established. As an example, a case will be described in which the communication apparatus 101 is a printer and two applications of a print application and an Internet connection application are executed. In this case, the priority of the connection established by the application is set according to the priority of the application itself. Here, the priority of the connection established by the print application is set higher than the priority of the connection established by the Internet connection application. Accordingly, communication regarding print processing to be preferentially processed as a printer can be preferentially performed.

また、上述の例において、通信装置101が複数のプリントアプリケーションを実行する場合、当該複数のプリントアプリケーションの各々が確立したコネクションについては、コネクションが確立された順序に基づいて優先度が設定される。ここでは、より早く確立されたコネクションの優先度が、より遅く確立されたコネクションの優先度よりも高いものとする。これにより、より早く確立されたコネクションの通信を優先的に行うことができる。なお、これに代えて、より早く確立されたコネクションの優先度が、より遅く確立されたコネクションの優先度よりも低くするようにしてもよい。この場合、より遅く確立されたコネクションの通信を優先的に行うことができる。   Further, in the above-described example, when the communication apparatus 101 executes a plurality of print applications, the priority is set for the connections established by each of the plurality of print applications based on the order in which the connections are established. Here, it is assumed that the priority of the connection established earlier is higher than the priority of the connection established later. Thereby, communication of the connection established earlier can be preferentially performed. Instead of this, the priority of the connection established earlier may be set lower than the priority of the connection established later. In this case, communication of a connection established later can be preferentially performed.

いずれのアプリケーションの優先度を高めるか、また、コネクションの確立順序に応じた優先度の設定方法は、製品毎に固定的に決めておいてもよいし、ユーザが適宜変更できるようにしてもよい。   The priority of which application should be increased and the priority setting method according to the connection establishment order may be fixedly determined for each product, or may be appropriately changed by the user. .

バッファ管理部304は、他の通信装置102と送受信するデータを一時的に記憶するバッファを管理する。バッファ管理部304が管理するバッファには、ネットワークバッファと受信バッファとがある。ネットワークバッファは複数のコネクションで共用されるメモリであり、各コネクションでのデータの送受信に応じて、その一部または全部が、一時的に当該コネクション用に割り当てられる。例えば、他の通信装置102から、あるコネクションを介してデータを受信した場合、バッファ管理部304は、当該データを一時的に記憶するために、ネットワークバッファの一部を当該コネクションに割り当てる。このようにして割り当てられたバッファを受信バッファと呼ぶ。なお、コネクション毎に、受信バッファとして利用できるサイズの上限値(最大受信バッファサイズ)が定められている。最大受信バッファサイズは、例えば64kバイトである。当該割り当ての制御は、バッファ管理部304が行う。   The buffer management unit 304 manages a buffer that temporarily stores data to be transmitted / received to / from another communication apparatus 102. The buffers managed by the buffer management unit 304 include a network buffer and a reception buffer. The network buffer is a memory shared by a plurality of connections, and part or all of the network buffer is temporarily allocated for the connection according to transmission / reception of data in each connection. For example, when data is received from another communication apparatus 102 via a certain connection, the buffer management unit 304 allocates a part of the network buffer to the connection in order to temporarily store the data. The buffer allocated in this way is called a reception buffer. An upper limit value (maximum reception buffer size) that can be used as a reception buffer is defined for each connection. The maximum reception buffer size is 64 kbytes, for example. The buffer management unit 304 controls the allocation.

このように、複数のコネクションでネットワークバッファを共用し、必要に応じてネットワークバッファから各コネクションに受信バッファを割り当てることで、メモリを効率的に利用することができる。なお、当該ネットワークバッファおよび受信バッファは、記憶部201の一部を構成する。   As described above, a network buffer is shared by a plurality of connections, and a reception buffer is allocated to each connection from the network buffer as necessary, whereby the memory can be efficiently used. Note that the network buffer and the reception buffer constitute a part of the storage unit 201.

ウィンドウ制御部305は、TCPにおけるウィンドウサイズを制御する。ここで、ウィンドウサイズとは、他の通信装置102が通信装置101へ、TCPにおけるデータの受信確認応答信号であるACKを待つことなく送信することのできるデータ量、即ち、他の通信装置102に送信を許可するデータ量を示す。当該ウィンドウサイズは、通信装置101が他の通信装置102からデータを受信した際に、当該データに対するACKに含めて他の通信装置に通知される。なお、ACKは、Acknowledgementの略である。   The window control unit 305 controls the window size in TCP. Here, the window size is the amount of data that other communication apparatuses 102 can transmit to the communication apparatus 101 without waiting for ACK, which is a data reception confirmation response signal in TCP, that is, to other communication apparatuses 102. Indicates the amount of data permitted to be transmitted. When the communication apparatus 101 receives data from the other communication apparatus 102, the window size is included in the ACK for the data and notified to the other communication apparatus. Note that ACK is an abbreviation for Acknowledgment.

アプリケーション部306は他の通信装置102から受信したデータに基づき、各種の情報処理やユーザへの提示を行う。また、各種の情報処理やユーザからの指示に基づいてデータを生成し、他の通信装置102へ送信するために、通信処理部302へ生成したデータを提供する。   The application unit 306 performs various types of information processing and presentation to the user based on data received from the other communication device 102. In addition, the generated data is provided to the communication processing unit 302 in order to generate data based on various types of information processing and instructions from the user and transmit the data to other communication apparatuses 102.

次に、通信装置101が他の通信装置102からデータを含むIPパケットを受信した場合の動作について、図5を用いて説明する。図5は、通信装置101が他の通信装置102からデータを受信する際に、記憶部201に記憶されたプログラムを制御部202が読み出し、それを実行することで実現される処理の流れのフローチャートである。   Next, an operation when the communication apparatus 101 receives an IP packet including data from another communication apparatus 102 will be described with reference to FIG. FIG. 5 is a flowchart of a process flow realized when the control unit 202 reads out and executes a program stored in the storage unit 201 when the communication device 101 receives data from another communication device 102. It is.

なお、図5に示すフローチャートの少なくとも一部をハードウェアにより実現してもよい。ハードウェアにより実現する場合、例えば、所定のコンパイラを用いることで、各ステップを実現するためのプログラムからFPGA上に自動的に専用回路を生成すればよい。FPGAとは、Field Programmable Gate Arrayの略である。また、FPGAと同様にしてGate Array回路を形成し、ハードウェアとして実現するようにしてもよい。また、ASIC(Application Specific Integrated Circuit)により実現するようにしてもよい。   Note that at least a part of the flowchart shown in FIG. 5 may be realized by hardware. When realized by hardware, for example, a dedicated circuit may be automatically generated on the FPGA from a program for realizing each step by using a predetermined compiler. FPGA is an abbreviation for Field Programmable Gate Array. Further, a Gate Array circuit may be formed in the same manner as an FPGA and realized as hardware. Further, it may be realized by an ASIC (Application Specific Integrated Circuit).

また、ここでは、他の通信装置102からデータを受信するのに先立って、通信装置101は他の通信装置102と複数のコネクションを確立済みであるものとする。また、図4に示すように、確立済みのコネクション毎に優先度が既に設定されているものとする。   Here, it is assumed that the communication apparatus 101 has already established a plurality of connections with the other communication apparatus 102 prior to receiving data from the other communication apparatus 102. Further, as shown in FIG. 4, it is assumed that the priority is already set for each established connection.

まず、通信装置101は、他の通信装置102からパケットを受信し、受信したパケットに含まれるデータを受信バッファに格納する(S501)。例えば、30kバイトのデータを受信した場合、通信装置101はネットワークバッファから、30kバイト分のメモリをネットワークバッファから確保し、受信バッファとして利用できるようにする。そして、通信装置101は、30kバイトのデータを当該確保した受信バッファに格納する。これに伴い、ネットワークバッファの空き容量(残容量)が30kバイト分、低下する。   First, the communication apparatus 101 receives a packet from another communication apparatus 102, and stores data included in the received packet in a reception buffer (S501). For example, when 30 kbytes of data is received, the communication apparatus 101 secures 30 kbytes of memory from the network buffer so that it can be used as a reception buffer. Then, the communication apparatus 101 stores 30 kbytes of data in the secured reception buffer. Along with this, the free capacity (remaining capacity) of the network buffer decreases by 30 kbytes.

なお、通信装置101のウィンドウサイズを問い合わせるゼロウィンドウプローブ等、データを含まないパケットを受信した場合には、通信装置101はデータの受信バッファへの格納処理を省略することができる。   When receiving a packet that does not include data, such as a zero window probe that inquires about the window size of the communication apparatus 101, the communication apparatus 101 can omit the process of storing data in the reception buffer.

パケットを受信すると、通信装置101は、ネットワークバッファの空き容量(残容量)を確認する(S502)。そして、通信装置101は、ネットワークバッファの空き容量と所定の閾値との比較を行い、ネットワークバッファの空き容量が所定の閾値以上であるか否かを判定する(S503)。ここで、所定の閾値とは、例えば、コネクションの最大受信バッファサイズである。   When receiving the packet, the communication apparatus 101 confirms the free capacity (remaining capacity) of the network buffer (S502). The communication apparatus 101 compares the free space of the network buffer with a predetermined threshold value, and determines whether the free space of the network buffer is equal to or greater than the predetermined threshold value (S503). Here, the predetermined threshold is, for example, the maximum reception buffer size of the connection.

なお、残容量として、ネットワークバッファの空き容量に代えて、S501におけるデータ受信に利用したコネクションの最大受信バッファサイズに対する空き容量を用いてもよい。例えば、コネクションの最大受信バッファサイズが64kバイトであり、当該コネクションを介して受信したデータを受信バッファに30kバイト格納している場合、コネクションの最大受信バッファサイズに対する空き容量は34kとなる。通信装置101は、この空き容量34kが、所定の閾値以上であるか否かを判定するようにしてもよい。なお、この場合は、所定の閾値として、例えば、コネクションの最大受信バッファサイズの半分の値を設定する。   As the remaining capacity, the free capacity for the maximum reception buffer size of the connection used for data reception in S501 may be used instead of the free capacity of the network buffer. For example, if the maximum reception buffer size of a connection is 64 kbytes and data received via the connection is stored in 30 kbytes in the reception buffer, the free capacity for the maximum reception buffer size of the connection is 34 k. The communication apparatus 101 may determine whether or not the free capacity 34k is equal to or greater than a predetermined threshold value. In this case, for example, a value that is half the maximum reception buffer size of the connection is set as the predetermined threshold.

該判定の結果、ネットワークバッファの空き容量が所定の閾値以上である場合(S503のYes)について説明する。この場合、通信装置101は、他の通信装置102に送信を許可するデータ量を示すウィンドウサイズとして、データ受信に利用したコネクションの最大受信バッファサイズに対する空き容量の値を設定する(S506)。なお、データ受信に利用したコネクションの最大受信バッファサイズに対する空き容量よりも、ネットワークバッファの空き容量が小さい場合には、通信装置101はウィンドウサイズとして、ネットワークバッファの空き容量の値を設定する。即ち、ウィンドウサイズとして、最大受信バッファサイズに対する空き容量、もしくは、ネットワークバッファの空き容量のうち、いずれか小さい方の値が設定される。   As a result of the determination, the case where the free space of the network buffer is equal to or greater than a predetermined threshold (Yes in S503) will be described. In this case, the communication apparatus 101 sets the value of the free capacity for the maximum reception buffer size of the connection used for data reception as the window size indicating the amount of data permitted to be transmitted to the other communication apparatus 102 (S506). When the free space of the network buffer is smaller than the free space for the maximum reception buffer size of the connection used for data reception, the communication apparatus 101 sets the value of the free space of the network buffer as the window size. That is, as the window size, the smaller one of the free capacity with respect to the maximum reception buffer size or the free capacity of the network buffer is set.

例えば、ネットワークバッファの容量が200kバイトであり、コネクションの最大受信バッファサイズが64kバイトである場合を考える。この場合において、S501において30kバイトを受信すると、コネクションの最大受信バッファサイズに対する空き容量は34kバイトである。一方、ネットワークバッファは、S501において30kバイトを受信し、30kバイト分が受信バッファとして確保されるので、170kバイトの空き容量があると考えられる。しかしながら、ネットワークバッファは、他のコネクションの通信においても利用される。従って、他のコネクションの通信により、例えば、ネットワークバッファが150kバイト分、利用されている場合もある。このような場合、ネットワークバッファの空き容量は20kバイトになってしまう。   For example, consider a case where the capacity of the network buffer is 200 kbytes and the maximum reception buffer size of the connection is 64 kbytes. In this case, when 30 kbytes are received in S501, the free capacity for the maximum reception buffer size of the connection is 34 kbytes. On the other hand, the network buffer receives 30 kbytes in S501, and 30 kbytes are secured as a reception buffer, so it is considered that there is 170 kbytes of free space. However, the network buffer is also used for communication of other connections. Accordingly, for example, the network buffer may be used for 150 kbytes by communication of another connection. In such a case, the free capacity of the network buffer becomes 20 kbytes.

このような場合には、最大受信バッファサイズに対する空き容量(34kバイト)よりも、ネットワークバッファの空き容量(20kバイト)の方が小さいため、ネットワークバッファの空き容量である20kバイトがウィンドウサイズとして設定される。一方、例えば、ネットワークバッファが他のコネクションの通信において30kバイトしか利用されていない場合には、S501で受信した30kバイトのデータと合わせても、ネットワークバッファの空き容量は140kバイトとなる。このような場合には、最大受信バッファサイズに対する空き容量(34kバイト)よりも、ネットワークバッファの空き容量(140kバイト)の方が大きい。従って、より小さい大受信バッファサイズに対する空き容量である20kバイトがウィンドウサイズとして設定される。これにより、他のコネクションによる通信によってネットワークバッファが占有されている場合であっても、適切なウィンドウサイズを設定することができる。   In such a case, since the free space (20 kbytes) of the network buffer is smaller than the free space (34 kbytes) for the maximum reception buffer size, 20 kbytes, which is the free space of the network buffer, is set as the window size. Is done. On the other hand, for example, when the network buffer uses only 30 kbytes in communication of other connections, the free space of the network buffer is 140 kbytes even when combined with the 30 kbyte data received in S501. In such a case, the free space (140 kbytes) of the network buffer is larger than the free space (34 kbytes) for the maximum reception buffer size. Accordingly, 20 kbytes, which is a free capacity for a smaller large reception buffer size, is set as the window size. As a result, an appropriate window size can be set even when the network buffer is occupied by communication using another connection.

そして、通信装置101は、S501において受信したデータに対するACKに、S506において設定されたウィンドウサイズを含めて他の通信装置102へ送信する(S508)。その後、通信装置101は、図5に示すフローを終了し、次のデータ受信を待ち受ける。   Then, the communication apparatus 101 transmits the ACK for the data received in S501 to the other communication apparatus 102 including the window size set in S506 (S508). Thereafter, the communication apparatus 101 ends the flow shown in FIG. 5 and waits for the next data reception.

一方、ネットワークバッファの空き容量が所定の閾値未満である場合(S503のNo)、通信装置101は、S501におけるデータ受信に利用したコネクションに対応する優先度値を取得する(S504)。なお、通信装置101は、受信したデータに含まれる他の通信装置102のIPアドレスや、ポート番号に基づいて、当該データが利用したコネクションを判別することができる。   On the other hand, when the free capacity of the network buffer is less than the predetermined threshold (No in S503), the communication apparatus 101 acquires a priority value corresponding to the connection used for data reception in S501 (S504). Note that the communication device 101 can determine the connection used by the data based on the IP address or port number of another communication device 102 included in the received data.

そして、通信装置101は、S501におけるデータ受信に利用したコネクションに対応する優先度値が、他のコネクションに対応する優先度値よりも相対的に高いかを判定する(S505)。ここでは、データ受信に利用したコネクションに対応する優先度値が上位3番目以内に入っているかを判定する。例えば、図4におけるコネクションIDが2のコネクションを利用したデータである場合には優先度値が相対的に高いと判定され、コネクションIDが7のコネクションを利用したデータである場合には優先度値が相対的に低いと判定される。   The communication apparatus 101 determines whether the priority value corresponding to the connection used for data reception in S501 is relatively higher than the priority values corresponding to other connections (S505). Here, it is determined whether the priority value corresponding to the connection used for data reception is within the top third. For example, when the connection ID in FIG. 4 is data using the connection of 2, the priority value is determined to be relatively high, and when the connection ID is data using the connection of 7, the priority value is determined. Is determined to be relatively low.

S501におけるデータ受信に利用したコネクションに対応する優先度値が、他のコネクションに対応する優先度値よりも相対的に高いと判定された場合(S505のYes)、S506に進む。S506以降の処理は、上述と同様なので、説明を省略する。   If it is determined that the priority value corresponding to the connection used for data reception in S501 is relatively higher than the priority value corresponding to another connection (Yes in S505), the process proceeds to S506. Since the processing after S506 is the same as described above, the description thereof is omitted.

次に、S501におけるデータ受信に利用したコネクションに対応する優先度値が、他のコネクションに対応する優先度値よりも相対的に低いと判定された場合(S505のNo)について説明する。この場合、通信装置101はウィンドウサイズとして、S506において設定されるウィンドウサイズよりも小さい値を設定する(S507)即ち、優先度の低いコネクションについて、送信を許可するデータ量を制限する。ここでは、ウィンドウサイズとして0が設定されるものとする。しかし、これに限らず、当該コネクションを利用するアプリケーションが他の通信装置102との接続を維持するために利用する信号を定期的に通信できるように、0よりも大きい値を設定するようにしてもよい。なお、この場合であっても、S506において設定されるウィンドウサイズよりは小さい値を設定するものとする。   Next, a case will be described in which it is determined that the priority value corresponding to the connection used for data reception in S501 is relatively lower than the priority values corresponding to other connections (No in S505). In this case, the communication apparatus 101 sets a value smaller than the window size set in S506 as the window size (S507), that is, limits the amount of data permitted to be transmitted for a low priority connection. Here, it is assumed that 0 is set as the window size. However, the present invention is not limited to this, and a value larger than 0 is set so that an application using the connection can periodically communicate a signal used to maintain a connection with another communication apparatus 102. Also good. Even in this case, a value smaller than the window size set in S506 is set.

その後、S508に進み、通信装置101は、S501において受信したデータに対するACKに、S507において設定されたウィンドウサイズを含めて他の通信装置102へ送信する。即ち、優先度の高いコネクションを介したデータ送信よりも、優先度の低いコネクションを介したデータ送信を抑制するための信号を送信する。   Thereafter, the process proceeds to S508, and the communication apparatus 101 transmits the ACK for the data received in S501 to the other communication apparatus 102 including the window size set in S507. That is, a signal for suppressing data transmission via a low priority connection is transmitted rather than data transmission via a high priority connection.

このように、優先度の低いコネクションについて、送信を許可するデータ量を抑制するので、優先度の低いコネクションのデータによって受信バッファが逼迫し、優先度の高いコネクションのデータを受信できなくなる可能性を低減させることができる。   In this way, the amount of data that is permitted to be transmitted for connections with a low priority is suppressed, so there is a possibility that the reception buffer will be tight due to the data of connections with a low priority and that data of connections with a high priority cannot be received. Can be reduced.

なお、優先度の低いコネクションで、データ送信を抑制するための信号を送信された場合、当該コネクションの相手装置は、ゼロウィンドウプローブを送信する。通信装置101はゼロウィンドウプローブを受信すると、図5に示す処理が行われるので、通信装置101の受信状態に合わせて、優先度の低いコネクションからも、データの受信を開始することができる。   When a signal for suppressing data transmission is transmitted in a low priority connection, the counterpart device of the connection transmits a zero window probe. When the communication apparatus 101 receives the zero window probe, the processing shown in FIG. 5 is performed, so that it is possible to start receiving data from a connection with a low priority in accordance with the reception state of the communication apparatus 101.

また、コネクションの切断やユーザの設定等に応じて、各コネクションの優先度が変わり、優先度の低いコネクションから優先度の高いコネクションに変更された場合、大きな値が設定されたウィンドウサイズを当該コネクション宛に通知するようにしてもよい。これにより、優先度の低いコネクションの通信相手からのゼロウィンドウプローブ等を待つことなく、データの受信を開始することができる。   Also, if the priority of each connection changes according to the connection disconnection or user settings, etc., and the connection is changed from a low-priority connection to a high-priority connection, the window size with a large value is set to that connection. You may make it notify to address. As a result, data reception can be started without waiting for a zero window probe or the like from a communication partner of a low priority connection.

また、上述の実施形態において、S502〜503を省略し、S501からS504に進むようにしてもよい。これにより、残容量に拘わらず、コネクションの優先度に応じた制御をすることができる。   In the above-described embodiment, S502 to 503 may be omitted, and the process may proceed from S501 to S504. Thereby, control according to the priority of the connection can be performed regardless of the remaining capacity.

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

101 通信装置
102 他の通信装置
101 communication device 102 other communication device

Claims (10)

通信装置であって、
複数の通信路を確立する確立手段と、
前記確立手段により確立された通信路を介してデータを受信する受信手段と、
前記複数の通信路のうち、前記受信手段によるデータの受信を優先的に行う所定の通信路を判定する判定手段と、
前記複数の通信路のうち、前記判定手段により判定された前記所定の通信路とは異なる通信路を介したデータ送信を、前記所定の通信路を介したデータ送信よりも抑制させるための信号を送信する送信手段と、
を有することを特徴とする通信装置。
A communication device,
Establishing means for establishing a plurality of communication paths;
Receiving means for receiving data via the communication path established by the establishing means;
A determination unit that determines a predetermined communication channel that preferentially receives data by the receiving unit among the plurality of communication channels;
A signal for suppressing data transmission via a communication path different from the predetermined communication path determined by the determination means from the plurality of communication paths, rather than data transmission via the predetermined communication path. A transmission means for transmitting;
A communication apparatus comprising:
前記送信手段は、前記受信手段により受信したデータに対する確認応答信号として、前記判定手段により判定された前記所定の通信路とは異なる通信路を介したデータ送信を、前記所定の通信路を介したデータ送信よりも抑制させるための信号を送信することを特徴とする請求項1に記載の通信装置。   The transmission means transmits data transmission via a communication path different from the predetermined communication path determined by the determination means as an acknowledgment signal for the data received by the reception means via the predetermined communication path. The communication apparatus according to claim 1, wherein a signal for suppressing data transmission is transmitted. 前記送信手段は、前記所定の通信路に対して送信する信号に含まれるTCP(Transmission Control Protocol)に準拠したウィンドウサイズよりも、前記所定の通信路とは異なる通信路に対して送信する信号に含まれる前記ウィンドウサイズを小さくした信号を送信することを特徴とする請求項1または2に記載の通信装置。   The transmission means generates a signal to be transmitted to a communication path different from the predetermined communication path, rather than a window size based on TCP (Transmission Control Protocol) included in the signal to be transmitted to the predetermined communication path. The communication apparatus according to claim 1 or 2, wherein the communication apparatus transmits a signal having a reduced window size. 前記送信手段は、前記所定の通信路とは異なる通信路に対して送信する信号に含まれる前記ウィンドウサイズを0に設定した信号を送信することを特徴とする請求項3に記載の通信装置。   4. The communication apparatus according to claim 3, wherein the transmission unit transmits a signal in which the window size included in a signal to be transmitted to a communication path different from the predetermined communication path is set to zero. 前記通信路は、TCP(Transmission Control Protocol)に準拠したコネクションであることを特徴とする請求項1から4のいずれか1項に記載の通信装置。   5. The communication apparatus according to claim 1, wherein the communication path is a connection compliant with TCP (Transmission Control Protocol). 6. 前記受信手段により受信されたデータを格納する格納手段と、
前記格納手段がデータの格納に利用できる残容量と所定の閾値とを比較する比較手段と、
を更に有し、
前記比較手段による比較の結果、前記残容量が前記所定の閾値よりも少ない場合、前記送信手段は、前記複数の通信路のうち、前記判定手段により判定された前記所定の通信路とは異なる通信路を介したデータの受信を、前記所定の通信路を介したデータの受信よりも抑制するための信号を送信することを特徴とする請求項1から5のいずれか1項に記載の通信装置。
Storage means for storing data received by the receiving means;
A comparison means for comparing the remaining capacity available for data storage by the storage means with a predetermined threshold;
Further comprising
As a result of the comparison by the comparison means, when the remaining capacity is less than the predetermined threshold, the transmission means is a communication different from the predetermined communication path determined by the determination means among the plurality of communication paths. 6. The communication device according to claim 1, wherein a signal for suppressing reception of data via a path is suppressed compared to reception of data via the predetermined communication path. .
前記比較手段による比較の結果、前記残容量が前記所定の閾値よりも大きい場合、前記送信手段は、前記複数の通信路のうち、前記判定手段により判定された前記所定の通信路とは異なる通信路を介したデータの受信を、前記所定の通信路を介したデータの受信よりも抑制するための信号を送信しないことを特徴とする請求項6に記載の通信装置。   As a result of comparison by the comparison means, when the remaining capacity is larger than the predetermined threshold, the transmission means is a communication different from the predetermined communication path determined by the determination means among the plurality of communication paths. The communication apparatus according to claim 6, wherein a signal for suppressing reception of data via a path is suppressed compared to reception of data via the predetermined communication path. 前記比較手段による比較の結果、前記残容量が前記所定の閾値よりも少ない場合、前記判定手段による判定を行い、
前記比較手段による比較の結果、前記残容量が前記所定の閾値よりも大きい場合、前記判定手段による判定を行わないことを特徴とする請求項6または7に記載の通信装置。
As a result of the comparison by the comparison means, when the remaining capacity is less than the predetermined threshold, the determination by the determination means,
8. The communication apparatus according to claim 6, wherein when the remaining capacity is larger than the predetermined threshold as a result of the comparison by the comparison unit, the determination by the determination unit is not performed. 9.
通信装置の制御方法であって、
複数の通信路を確立する確立工程と、
前記確立工程において確立された通信路を介してデータを受信する受信工程と、
前記複数の通信路のうち、前記受信工程におけるデータの受信を優先的に行う所定の通信路を判定する判定工程と、
前記複数の通信路のうち、前記判定工程において判定された前記所定の通信路とは異なる通信路を介したデータ送信を、前記所定の通信路を介したデータ送信よりも抑制させるための信号を送信する送信工程と、
を有することを特徴とする制御方法。
A communication device control method comprising:
An establishment process for establishing a plurality of communication paths;
A receiving step of receiving data via the communication path established in the establishing step;
A determination step of determining a predetermined communication path that preferentially receives data in the reception step among the plurality of communication paths;
Of the plurality of communication paths, a signal for suppressing data transmission via a communication path different from the predetermined communication path determined in the determination step is less than data transmission via the predetermined communication path. A transmission process to transmit;
A control method characterized by comprising:
コンピュータを請求項1から8のいずれか1項に記載の通信装置として動作させるためのプログラム。   The program for operating a computer as a communication apparatus of any one of Claim 1 to 8.
JP2016038040A 2016-02-29 2016-02-29 Communication device, control method and program Pending JP2017157964A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016038040A JP2017157964A (en) 2016-02-29 2016-02-29 Communication device, control method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016038040A JP2017157964A (en) 2016-02-29 2016-02-29 Communication device, control method and program

Publications (1)

Publication Number Publication Date
JP2017157964A true JP2017157964A (en) 2017-09-07

Family

ID=59810427

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016038040A Pending JP2017157964A (en) 2016-02-29 2016-02-29 Communication device, control method and program

Country Status (1)

Country Link
JP (1) JP2017157964A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017157963A (en) * 2016-02-29 2017-09-07 キヤノン株式会社 Communication device, communication method and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017157963A (en) * 2016-02-29 2017-09-07 キヤノン株式会社 Communication device, communication method and program

Similar Documents

Publication Publication Date Title
US10455630B2 (en) Communication apparatus that communicates with another communication apparatus, control method thereof, and storage medium
US20150188986A1 (en) Information processing apparatus, control method, and storage medium
US10382923B2 (en) Communication apparatus capable of preventing data erroneous transmission, control method therefor, and storage medium storing control program therefor
EP2958346B1 (en) Information processing apparatus, information processing method and recording medium
US20220272070A1 (en) Electronic device for controlling packet transmission, and operating method thereof
US11079983B2 (en) Information processing apparatus that saves, in a shared memory, information for accessing a device using a URL via a USB, and method of controlling same
JP2018064187A (en) Communication device, communication method, and program
EP2905928B1 (en) Apparatus and method for providing metadata with network traffic
JP2017157964A (en) Communication device, control method and program
US11006323B2 (en) Electronic device and WLAN relay function control method thereof
JP5924883B2 (en) Information processing system, information processing method, and information processing apparatus
US10560590B2 (en) Information processing apparatus equipped with communication functions, control method therefor, and storage medium
KR100889730B1 (en) Method and Apparatus for Direct Memory Access Controlling
CN113922934A (en) Method and network device for cross-carrier scheduling
JP6084204B2 (en) Wireless communication apparatus, wireless communication method, and wireless communication control program
US9106608B2 (en) Communication device, communication method, and non-transitory computer-readable recording medium
US10574725B2 (en) Mobile terminal for remotely operating device via network, control method therefor, storage medium, and remote support system
US10581725B2 (en) Information processing apparatus having a multi-connection communication function for transmitting and receiving data blocks by using a plurality of connections, method for controlling the same, and storage medium
JP2019016842A (en) Communication device and control method
JP2017157963A (en) Communication device, communication method and program
US20180152830A1 (en) Information reception terminal and information distribution system
JP2018093330A (en) Communication device and control method of communication device
KR102582483B1 (en) the Method for Wireless Communication and the Electronic Device supporting the same
US20220286502A1 (en) Communication control device, communication system, communication control method, and recording medium
JP2019020851A (en) Device control apparatus and device control method and program