Provided is a relay device for transferring a protocol data unit (PDU) transmitted from a server device to a terminal device, receiving content information that pertains to content stored in the PDU, and controlling a transfer in the PDU transfer step on the basis of the content information. The terminal device receives, via the relay device, the PDU transmitted from the server device, and transmits the content information that pertains to the content stored in the PDU to the relay device.

TECHNICAL FIELD

The present invention relates to a relay device, a terminal device, a communication system, a protocol data unit (PDU) relay method, a PDU reception method, and a program.

BACKGROUND ART

Relay devices configured to relay communication between a server device and a terminal device may perform transfer control according to details of content to be transferred (for example, web access, moving-image viewing, a file transfer, a video conference, or the like). Also, data transmission using encrypted communication for preventing information from being leaked is known.

In Patent Document 1 and 2, technology in which a cable television relay device performs limited reception management without descrambling content is disclosed.

CITATION LIST

Patent Literature

SUMMARY OF INVENTION

Technical Problem

If the communication between the server device and the terminal device is encrypted, the relay device cannot identify details of the transferred content. Thus, when communication between the server de vice and the terminal device is encrypted, the relay device cannot perform transfer control according to the details of the transferred content.

In the inventions described in Patent Document 1 and 2, it is possible to provide appropriate transfer control because it is known that the data relayed by the relay device is cable television content. However, even if the inventions described in Patent Document 1 and 2 are applied to relay devices capable of relaying different types of content, it is not possible to perform transfer control according to the details of the content.

An objective of the present invention Is to provide a relay device, a terminal device, a communication system, a PDU relay method, a PDU reception method, and a program for solving the above-described problems.

Solution to Problem

According to a first aspect of the present invention, a relay device includes a PDU transfer unit configured to transfer a PDU transmitted from a server device to a terminal device; a content information reception unit configured to receive content information which is information about content stored in the PDU; and a transfer control unit configured to control a transfer by the PDU transfer unit on the basis of the content information.

According to a second aspect of the present invention, a terminal device includes a PDU reception unit configured to receive, via a relay device, a PDU transmitted from a server device; and a content information transmission unit configured to transmit contest information which is information about content stored in the PDU to the relay device.

According to a third aspect of the present invention, a communication system includes the relay device according to the above-described first aspect; and the terminal device according to the above-described second aspect.

According to a fourth aspect of the present invention, a PDU relay method includes a PDU transfer step of transferring a PDU transmitted from a server device to a terminal device; a content information reception step of receiving content information which is information about content stored in the PDU; and a transfer control step of controlling a transfer in the PDU transfer step on the basis of the content information.

According to a fifth aspect of the present invention, a PDU reception method includes a PDU reception step of receiving, via a relay device, a PDU transmitted from a server device; and a content information transmission step of transmitting content information which is information about content stored in the PDU to the relay device.

According to a sixth aspect of the present invention, a program causes a computer to function as: a PDU transfer unit configured to transfer a PDU transmitted from a server device to a terminal device; a content information reception unit configured to receive content information which is information about content stored in the PDU; and a transfer control unit configured to control a transfer by the PDU transfer unit on the basis of the content information.

According to a seventh aspect of the present invention, a program causes a computer to function as: a PDU reception unit configured to receive, via a relay device, a PDU transmitted from a server device; and a content information transmission unit configured to transmit content information which is information about content stored in the PDU to the relay device.

Advantageous Effects of Invention

According to at least one of the above-described aspects of the present invention, the relay device receives the content information about the content stored in the transferred PDU and controls the transfer of the PDU on the basis of the content information. Thereby, even when the communication between the server device and the terminal device is encrypted, the relay device can perform transfer control according to details of the transferred content.

DESCRIPTION OF EMBODIMENTS

The first embodiment will be described.

FIG. 1is a schematic block diagram illustrating a configuration of a communication system according to the first embodiment.

The communication system1includes a server device10configured to transmit a stream, a relay device20configured to relay the stream, and a terminal device30configured to receive the stream.

For example, the stream is encrypted according to transport layer security (TLS). The stream is an example of a protocol data unit (PDU) which is a data transmission unit.

The relay device20includes a stream transfer unit21, a relayed stream analysis unit22, a content information reception unit23, and a transfer control unit24.

The stream transfer unit21transfers the stream transmitted from the server device10to the terminal device30.

If the stream is not encrypted, the relayed stream analysis unit22analyzes the stream received from the server device10by the stream transfer unit21and generates content information indicating details of the content included in the stream. If the stream is encrypted, the relayed stream analysis unit22cannot analyze the stream.

The content information reception unit23receives the content information indicating the details of the content Included in the relayed stream and a reception port number in the terminal device30of the stream from the terminal device30.

The transfer control unit24controls a transfer of the stream by the stream transfer unit21on the basis of the content information received by the content information reception unit23.

FIG. 2is a diagram illustrating a relationship between content information and transfer control for each type of content.

Information stored in the content information received by the content information reception unit23and the transfer control by the transfer control unit24differ according to a type of content.

In the content information according to the present embodiment, a type of content (a document, an image, a moving image, sound, or the like) is stored. If the type of content is the moving image, the content information further stores a size of content and a reproduction time of the content.

The type of content is identified on the basis of Content-type stored in a header of a hypertext transfer protocol (HTTP) response.

The size of content is identified on the basis of Content-Length stored in a header of the HTTP response.

Also, the reproduction time of moving-image content is identified by analyzing the header of the moving-image data stored in a pay load of the HTTP response.

Also, if the type of content indicated by the content information is the moving image, the transfer control unit24performs the pacing of the stream. The pacing is control of a transmission rate in accordance with a bit rate of the content. The bit rate of the content is calculated by dividing the size of content by the reproduction time.

Also, if the type of content indicated by the content information is not the moving image, the transfer control unit24performs transmission control protocol (TCP) optimization control according to the type of content. An example of the TCP optimization control is setting of an initial value of a congestion window (a value for adjusting an amount of data that is capable of being transmitted depending on a communication situation) according to the type of content.

The terminal device30includes a stream reception unit31, a stream processing unit32, a received stream analysis unit33, and a content information transmission unit34.

The stream reception unit31receives the stream transmitted from the server device10via the relay de vice20. If the stream is encrypted, the stream reception unit31decrypts the stream.

The stream processing unit32executes a process according to the content stored in the stream decrypted by the stream reception unit31. Examples of processes corresponding to the content include reproduction of moving images or sound, display of documents or images, and the like.

The received stream analysis unit33analyzes the stream received by the stream reception unit31and generates content information indicating details of the content stored in the stream.

The content information, transmission unit34transmits the type of content generated by the received stream analysis unit33and the reception port number at which the stream reception unit31receives the stream, to the relay device20.

The operation of the relay device20according to the present embodiment will be described. Every time the relay device20receives the stream from the server device10, a process shown hereinafter is performed.

FIG. 3is a flowchart illustrating an operation of the relay device according to the first embodiment.

When the stream transfer unit21of the relay device20receives the stream from the server device10(step S11), the relayed stream analysis unit22determines whether or not the stream has been encrypted (step S12).

If the received stream has not been encrypted (step S12: NO), the relayed stream analysis unit22analyzes the stream and generates content information (step S13).

Next, the transfer control unit24determines transfer control details according to the type of content on the basis of the content information generated by the relayed stream analysis unit22(step S14). The transfer control unit24performs control for causing the stream transfer unit21to transfer the stream received in step S11to the terminal device30on the basis of the determined transfer control details (step S15). Thereby, the relay device20can perform transfer control according to details of the transferred content.

On the other hand, if the received stream is encrypted (step S12: YES), the content information reception unit23determines whether or not the content information related to the stream has been received from the terminal device30(step S16). The content information related to the stream is content information received together with the reception port number of a transfer destination of the stream.

If the content information related to the stream has not been received (step S16: NO), the transfer control unit24performs control for causing the stream transfer unit21to transfer the stream received in step S11to the terminal device30on the basis of standard transfer control (step S17). An example of the standard transfer control is a TCP level optimization process.

On the other hand, if the content information reception unit23has received the content information (step S16: YES), the transfer control unit24determines transfer control details according to the type of content on the basis of content information received by the content information reception unit23(step S14). The transfer control unit24performs control for causing the stream transfer unit21to transfer the stream received in step S11to the terminal device30on the basis of the determined transfer control details (step S15). Thereby, the relay device20can perform transfer control according to the details of the transferred content.

Next, the operation of the terminal device30according to the present embodiment will be described. Every time the terminal device30receives the stream from the relay device20, a process shown hereinafter is performed.

FIG. 4is a flowchart illustrating the operation of the terminal device according to the first embodiment.

When the stream is received from the relay device20(step S21), the stream reception unit31of the terminal device30determines whether or not the stream has been encrypted (step S22).

If the received stream has been encrypted (step S22: YES), the stream reception unit31decrypts the stream by a predetermined method (step S23). Next, the received stream analysis unit33analyzes the decrypted stream and generates content information (step S24). Next, the content information transmission unit34notifies the relay device20of the content information generated by the received stream analysis unit33and a reception port number of the stream (step S23).

On the other hand, if the stream received by the stream reception unit31has not been encrypted (step S22: NO) or if the content information transmission unit34has provided a notification of the content information in the above-described step S25, the stream processing unit32performs a process according to the content with respect to the received and decrypted stream (step S26).

Next, the behavior of the entire communication system1due to the relay device20and the terminal device30performing the above-described process will be described. Here, an operation of the communication system1when the stream is encrypted will be described.

FIG. 5is a sequence diagram illustrating an example of communication in the communication system according to the first embodiment.

When the server device10starts transmission of an encrypted stream (step S31), the relay device20receives the stream. Because the stream is encrypted and cannot be analyzed in the relay device20, the relay device20starts transfer control of the stream based on the standard transfer control (step S32).

When the stream is received, the terminal device30decrypts the stream (step S33). The terminal device30analyzes the decrypted stream and generates content information (step S34). Then, the terminal device30notifies the relay device20of the content information (step S35).

When the content information is received from the terminal device30, the relay device20switches transfer control from the standard transfer control to the transfer control according to the type of content (step S36). Thereafter, a transfer of the stream to be transferred by the relay device20is controlled on the basis of the content information.

As described above, according to fee present embodiment, the relay device20includes the stream transfer unit23configured to transfer the stream transmitted from the server device10to the terminal device30, the content information reception unit23configured to receive the content information which is information about the content stored in the stream, and the transfer control unit24configured to control a transfer by the stream transfer unit21on the basis of the content information.

Thereby, even when the communication between the server device10and the terminal device30is encrypted, the relay device20can perform the transfer control according to details of the transferred content on the basis of the content information.

Also, the content information reception unit23according to the present embodiment receives the content information and the reception port number of the stream from the terminal device30. Also, the transfer control unit24controls the transfer of the stream by the stream transfer unit21to the reception port of the reception port number of the terminal device30on the basis of the content information.

Thereby, the relay device20can identity the stream serving as a control target based on the content information.

Also, the transfer control unit24according to the present embodiment determines whether there is a necessity for pacing of the stream on the basis of the type of content included in the content information. Thereby, the relay device20can perform pacing on only content for which pacing is necessary in the stream.

The second embodiment will be described.

FIG. 6is a schematic block diagram illustrating a configuration of a communication system according to the second embodiment.

In a communication system1according to the present embodiment, a relay device20performs a logging process of a stream (recording and accumulating a communication history and the like in time series) in addition to a transfer according to content.

In addition to the configuration of the first embodiment, the relay device20according to the second embodiment further includes a logging unit25. The logging unit25performs the logging process on the basis of content information generated by a relayed stream analysis unit22or content information received from the terminal device30by a content information reception unit23.

Specifically, the logging unit25extracts information about a type of stored content in the stream to be relayed, a communication fee for each type of content, and the like as log information.

Also, the relay device20can also appropriately perform logging on the stream relayed until content information is received by rewriting information related to a stream relayed until the reception of the content information to information corresponding to the type of content indicated by the content information.

Also, the logging unit25calculates an effect of reducing an amount of communication due to pacing of moving-image content. Specifically, the logging unit25can compute the reduction effect by comparing a size of content to be originally sent and a communication fee when the transmission is disconnected midway due to pacing.

As described above, according to the present embodiment, even when the stream is encrypted, the relay device20can perform a logging process according to the type of content stored in the stream. Also, the relay device20can compute the effect of pacing even when the stream is encrypted.

Although several embodiments have been described above in detail with reference to the drawings, specific configurations are not limited to those described above and various design changes and the like can be made.

Although the terminal device30generates content information related to the content stored in the stream received by the terminal device30and transmits the generated content information to the relay device20when the stream is encrypted in the above-described embodiment, the present invention is not limited thereto.

For example, in another embodiment, if the stream is encrypted, the server device10may transmit the content information related to the content stored in the stream to be transmitted to the relay device20.

Also, although the relay device20relays the communication by the stream in the above-described embodiment, the present invention is not limited thereto.

For example, the relay device20according to another embodiment may relay the communication by datagram. The datagram can be encrypted by a method such as datagram transport layer security (DTLS). In this case, the relayed stream analysis unit22and the received stream analysis unit33analyze content stored in the datagram and generate content information.

Also, the relay device20according to another embodiment may be a relay device related to a layer, which relays frames and packets, lower than a fourth layer (a transport layer) in an OSI reference model. Also, the relay device20according to another embodiment may be a relay device related to a layer higher than the fourth layer.

Also, although the relay device20determines whether to perform pacing or whether to perform TCP optimization control on the basis of content information in the above-described embodiment, the present invention is not limited thereto.

For example, the relay device20according to another embodiment may determine only the necessity of pacing on the basis of the content information without performing the TCP optimization control. Also, the relay device20according to another embodiment may perform only the TCP optimization control according to the type of content without performing the pacing control.

Also, although the terminal device30according to the above-described embodiment transmits the content information to the relay device20without encrypting the content information, the present invention is not limited thereto.

For example, the terminal device30according to another embodiment may establish an encrypted stream by the TLS with the relay device20and transmit the content information with the stream.

Also, although the relayed stream analysis unit22generates the content information if the stream is not encrypted and the received stream analysis unit33generates the content information if the stream is encrypted in the communication system1according to the above-described embodiment, the present invention is not limited thereto.

For example, in the communication system1according to another embodiment, the received stream analysis unit33may generate the content information regardless of whether or not the stream is encrypted. In other words, the transfer control unit24of the relay device20according to the communication system1performs stream transfer control on the basis of the content information received by the content information reception unit23regardless of whether or not the stream is encrypted.

Also, although the relay device20according to the above-described embodiment receives content information indicating the details of the content and controls the transfer of the stream on the basis of the content information, the present invention is not limited thereto.

For example, the relay device20according to another embodiment may receive the content information indicating transfer control details according to details of content and control the transfer of the stream according to the transfer control details indicated by the content information.

FIG. 7is a schematic Block diagram illustrating the basic configuration of the relay device.

Although the configurations illustrated inFIGS. 1 and 6have been described as embodiments of the relay device20in the above-described embodiments, the basic configuration of the relay device20is as illustrated inFIG. 7.

That is, the relay device20has a PDU transfer unit29, a content information reception unit23, and a transfer control unit24as basic components.

The PDU transfer unit29transfers the PDU transmitted from the server device to the terminal device. The stream transfer unit21according to the above-described embodiment is an example of the PDU transfer unit29.

The content information reception unit23receives content information which is information related to the content stored in the PDU.

The transfer control unit24controls a transfer by the PDU transfer unit29on the basis of the content information.

Thereby, even when the communication between the server device and the terminal device is encrypted, the relay device20can perform transfer control according to details of the transferred content.

FIG. 8is a schematic block diagram illustrating the basic configuration of the terminal device.

Although the configuration illustrated inFIGS. 1 and 6has been described as an embodiment of she terminal device30in the above-described embodiments, the basic configuration of the terminal device30is as illustrated inFIG. 8.

That is, the terminal device30uses a PDU reception unit39and a content information transmission unit34as basic components.

The PDU reception unit39receives the PDU transmitted from the server device via the relay device.

Also, the stream reception unit31according to the above-described embodiment is an example of the PDU reception unit39.

The content information transmission unit34transmits content information, which is information about the content stored in the PDU, to the relay device.

Thereby, even when the communication between the server device and the terminal device30is encrypted, the terminal device30can cause the relay device to execute transfer control according to details of content to be transferred.

FIG. 9is a schematic block diagram illustrating a configuration of a computer according to at least one embodiment.

The computer90includes a CPU91, a main storage device92, an auxiliary storage device93, and an interface94.

The server device10, the relay device20, and the terminal device30described above are mounted on the computer90. Operations of the processing units described above are stored in the auxiliary storage device93in the form of a program. The CPU91reads the above-described program, from the auxiliary storage device93, loads the program to the main storage device92, and executes the above-described process according to the program.

Also, in at least one embodiment, the auxiliary storage device93is an example of a non-transitory tangible medium. Other examples of non-transitory tangible media include a magnetic disk, a magneto-optical disk, a CD-ROM, a DVD-ROM, a semiconductor memory, and the like connected via the interface94.

Also, if this program is distributed to the computer90through communication line, the computer90receiving the distributed program may load the program to the main storage device92and execute the above-described process.

Also, the program may be for implementing some of the above-described functions.

Furthermore, the program may be a so-called differential file (a differential program) that implements the above-described function by a combination with another program already stored in the auxiliary storage device93.

This application claims priority based on Japanese Patent Application No. 2015-119075, filed on Jun. 12, 2015, the entire disclosure of which is incorporated herein by reference.

INDUSTRIAL APPLICABILITY

According to the present invention, a relay device can perform transfer control according to details of content to be transferred even when communication between a server device and a terminal device is encrypted.

REFERENCE SIGNS LIST

21Stream transfer unit

22Relayed stream analysis unit

23Content information reception unit

24Transfer control unit

31Stream reception unit

32Stream processing unit

33Received stream analysis unit

34Content information transmission unit