The present disclosure relates to data transmission, and particularly to a method and device for data transmission.
Currently, various data transmission applications, such as video data transmission, audio data transmission, text data transmission, and the like, become increasingly popular over a network, such as internet or intranet. Accordingly, the requirement for data transmission is higher than before. For example, a video application, such as video conference, video chat, and Video on Demand and the like, needs transmitting video data in real time as much as possible. In order to expedite the transmission speed, some transmission protocols with minimum or without flow control or acknowledge mechanism, such as User Data Protocol (UDP), are widely used in such video applications. Taking the UDP as an example, it uses a simple connectionless transmission model with minimum flow control mechanism to realize data transmission in real time. However, since the data cache/buffer of some facilities, such as gateways, routers and Access Points (AP), is limited, it means that it is of great possibility that the data cache/buffer is overflowed if a multitude of data arrives at the data cache/buffer at same time or during a short period. In such a case, the subsequent data may be lost due to insufficient capacity of the data cache/buffer. As a result, the quality of video would be deteriorated, and the user would have a poor experience.
According to one aspect of the present disclosure, there is provided a method for data transmission, comprising: encapsulating a data stream to be transmitted into a plurality of packets; and starting to transmit the plurality of packets in sequence; suspending transmission of the packets according to a first condition; and resuming transmission of remaining packets according to a second condition; wherein the suspending and the resuming are repeated until the transmission of all the packets is completed.
According to another aspect of the present disclosure, there is provided a device for data transmission, comprising: an encapsulator configured to encapsulate a data stream into a plurality of packets; a transmission interface configured to transmit the plurality of packets in sequence; a controller configured to control the transmission interface to suspend transmission of packets according to a first condition, and to control the transmission interface to resume transmission of remaining packets according to a second condition.
According to another aspect of the present disclosure, there is provided a computer readable medium storing program code instructions which cause a computer to implement the method for data transmission as described above.
These and other aspects, features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which is to be read in connection with the accompanying drawings.
The present disclosure may be better understood when reading the description as follows with reference to the following accompanying figures, in which:
To illustrate the technical solutions of the present disclosure clearly and fully, hereinafter, detailed description will be made to the embodiments of the present disclosure with reference to the accompanying drawings. It should be appreciated that those skilled in the art will be able to devise various arrangements that, although are not explicitly described or illustrated herein, embody an inventive concept of the present disclosure and thus are intended to fall into the scope of the present disclosure.
As mentioned above, in a time-critical data transmission, a transmission protocol without flow control or acknowledge mechanism, such as UDP, is overwhelmingly used over transmission network so as to achieve data transmission in real time as much as possible. Taking a case in which a client is connected to a host or a server via a gateway as an example, when the host needs to transmit data to the client via the gateway in response to the request from the client, the host encapsulates data into a plurality of packets, and then sends the plurality of packets to the gateway. In view of a high bandwidth of the network, the plurality of packets might arrive at a network interface of the gateway at almost the same time. In such a case, if a great multitude of data is received at the network interface simultaneously or during a very short time period, that is, a burst occurs upon receiving data, and an overflow in the data cache/buffer of the gateway is inevitable since the capacity of the data cache/buffer of the gateway is limited and there is not enough space for accommodating the data which arrives subsequently. Therefore, a packet loss might take place, which would decrease the quality of the data transmission. Depending on the extent of the packet loss, the user's experience might be deteriorated.
In below embodiments, a flow control is introduced into the data transmission without acknowledge mechanism, that is, after one or more packets are transmitted to a communication link, the transmission is suspended until a predetermined condition is satisfied; then, the transmission is resumed, and the remaining packets are transmitted, so that the intermediary device/the receiver has sufficient time to process the packets as previously received and make room in the data cache/buffer for accommodating the packets arriving subsequently. In such a case, it avoids the overflowing due to the limited capacity of the data cache/buffer, thus preventing a heavy packet loss from occurring, and improving the user's experience.
In embodiments of the present disclosure, UDP can be taken as an example for illustrating the solutions of the present disclosure. However, the scope of the present disclosure is not limited to the transmission with UDP mechanism. In fact, the solutions of the present disclosure can be applied to any data transmission without flow control or acknowledge mechanism to improve the reliability of a data transmission while maintaining a high speed transmission for real-time applications.
It should be noted that reference in the specification to “one embodiment” or “an embodiment” of the present disclosure, as well as other variations thereof, means that a particular feature, structure, characteristic, and so forth described in connection with the embodiment is included in at least one embodiment of the present disclosure. Thus, the appearances of the phrase “in one embodiment” or “in an embodiment”, as well any other variations, appearing in various places throughout the specification are not necessarily all referring to the same embodiment.
Herein, the term of “receiver” should be broadly construed as a device which can receive data from various sources. Therefore, an intermediary device, such as a gateway, a router, an Access Point can also be referred as a receiver. Naturally, the term of “receiver” can also refer to a user terminal, such a client, a STB, a PDA or a mobile phone.
Similarly, in the present disclosure, the term of “transmitter” should be broadly construed as a device which can transmit data to various destinations. Therefore, in a specific scenario, an intermediary device, such as a gateway, a router, an Access Point can also be referred as a transmitter. Naturally, the term of “transmitter” can also refer to a user terminal, such a client, a STB, a PDA or a mobile phone in a case in which it sends data.
Further, the term of “communication link” can refer to a wire link or a wireless link for communication, and can comprise but not limited to a link over LAN, WLAN, or WAN.
Optionally, the first predetermined condition is that a total data amount of the packets or the total number of the packets which have been sent continuously reaches a first preset threshold. In such a case, while transmitting the packets, the transmitter calculates the total data amount of the packets or the total number of the packets which have been sent continuously; when the total data amount or the total number of the packets reaches the first preset threshold, the transmitter would stop transmitting the packets and waits for a second predetermined condition to be met.
As an alternative, the first predetermined condition is in that a time period in which the packets are continuously transmitted reaches a second preset threshold. In such a case, while transmitting the packets, the transmitter counts the time period for continuously transmitting the packets; when the time period reaches the second preset threshold, the transmitter would stop transmitting the packets and waits for a second predetermined condition to be met.
Optionally, at least one of the first preset threshold and the second preset threshold can be set based on at least one of the following: a capacity of a cache/buffer in the intermediary device/the receiver, a bandwidth of a communication link between the transmitter and the intermediary device/the receiver, a capability of the intermediary device/the receiver to process data, the number of transmitters over the communication link, and the like. For example, if the capacity of the cache/buffer in the intermediary device/the receiver is sufficient, the first preset threshold can be set as a large value.
Further, at least one of the first preset threshold and the second preset threshold can vary from time to time. That is, depending on a current condition of the network, such as congestion, packet loss rate, the number of transmitters which transmit data to the communication link simultaneously, and the like, the first preset threshold might vary. For instance, if the packet loss rate increases, the first preset threshold would be changed to a small value for a transmission of subsequent packets.
Optionally, the second predetermined condition is that a delay time expires, wherein the delay time can be set depending on an estimation of the capacity of the cache/buffer in the intermediary device/the receiver, the bandwidth of the communication link between the transmitter and the intermediary device/the receiver, the capability of the intermediary device/the receiver to process data, the number of the transmitters over the communication link, and the like. For example, if the processing ability of the processor in the intermediary device/the receiver is strong, a small delay time can be set.
Optionally, a delay time is inserted between two successive packets, which means that after the transmitter sends one packet to the receiver, it stops and waits until the corresponding delay time expires; and then, the transmitter resumes transmitting a next packet to the receiver.
Further, the delay time can be fixed to a constant value. For example, for a simple networking environment, such as in a video chat application, a client is connected to another client via an intermediary device (e.g. gateway), and the delay time can be fixed to e.g. 5 ms. With the delay time, the intermediary device has an opportunity to process the data previously received and to make room (or to prepare usable space) in the cache for receiving the subsequent packets, thus avoiding the overflowing in the cache.
Similarly, the delay time can vary depending on a current condition of the network, such as congestion, packet loss rate, the number of transmitters which transmit data to the communication link simultaneously, and the like. For instance, if the packet loss rate increases, the delay time would be changed to a larger value before subsequent packets are transmitted.
The inventor(s) further finds that in a more complicated networking environment, for example, in a case of a video data transmission in which more than one STB is connected to one gateway or more than one video application is running simultaneously on one STB, the video packets from different video streams would overlap if the delay time between successive transmissions is fixed.
In view of the above, it is proposed to apply a delay time having a random value between successive transmissions to decrease the probability of such overlapping.
Since the delay time having a random value is inserted between successive transmissions, even if a plurality of transmitters sends data streams to a same receiver simultaneously, the possibility, that the packets from different data streams arrive at the same receiver simultaneously and thus overlap each other, is decreased significantly.
Optionally, the random value is generated by a random function. For data streams from different sources, different seeds can be used for initializing the random function for respective data streams. In other words, the seed of the random function for different data stream is unique to avoid the overlapping of the packets from different data streams. In such a case, even if a same random function is used for all the data streams, different random values are generated by the same random function for respective data streams. Therefore, the delay time periods between successive transmissions of different data streams are different from each other, the possibility of the overlapping of the packets from different data streams is decreased as much as possible.
Optionally, the seeds can be based on the current time, etc.
Optionally, the seeds of the random function might be generated by another random function. That means that the random values are generated in an iterative mode.
It should be noted that in
Further, the value of the delay time can be fixed or variable. Optionally, for a simple networking environment, the delay time can be set as a fixed value, such as 1 ms, 5 ms, or the like. The larger the number of the packets which are sent previously is, the longer the subsequent delay time would be.
Additionally, in a more complicated networking environment, for example, in a case in which more than one host transmits data packets to a same intermediary device or a same client simultaneously, the video data from different video streams would overlap if the delay time between successive transmissions is fixed.
In such a case, the delay time with a random value might be applied. That is, between two successive transmissions, there is inserted a random delay time, so that even if a plurality of hosts send data streams to a same client simultaneously, the possibility, that the packets from different data streams arrive at the same client simultaneously is decreased greatly, thus reducing the overlapping of the packets.
According to one aspect of the present disclosure, there is provided a method for data transmission.
As illustrated in
Optionally, a total value of the delay time in one frame of video is less than a reciprocal value of a frame rate of the video so as to guarantee the smooth of the viewing on the video.
As illustrated in
Optionally, the method illustrated in
Optionally, as mentioned above, in order to decreasing the possibility of the overlapping of the packets from different data streams, in a case in which a same random function is used for video streams from different sources, the method as illustrated in
According to another aspect of the present disclosure, there is provided a device for data transmission. As illustrated in
Optionally, the first predetermined condition is in that a total data amount of the packets or the total number of the packets which have been sent continuously reaches a first preset threshold. Optionally, the first predetermined condition is in that a time period for continuously transmitting the packets reaches a second preset threshold. In such a case, the device for data transmission can further comprise a counter 615 configured to count a total size of the packets sent continuously or count a time period for sending the packets continuously. In an embodiment, the counter is implemented by a processor.
Optionally, the second predetermined condition is in that a delay time elapses. In such a case, the device for data transmission can further comprise a counter 615 configured to count the delay time.
Optionally, the device for data transmission can further comprise a random value generator 620 configured to generate random values for the delay time. In an embodiment, the generator is implemented by a processor.
As readily conceived by one of ordinary skill in the art, the teachings of the present disclosure may be implemented in various forms of hardware, software, firmware, special purpose processors, or combinations thereof.
Optionally, the teachings of the present disclosure are implemented as a combination of hardware and software. Moreover, the software may be implemented as an application program tangibly embodied on a program storage unit. The application program may be uploaded to, and executed by, a machine comprising any suitable architecture. Preferably, the machine is implemented on a computer platform having hardware such as one or more central processing units (“CPU”), a random access memory (“RAM”), and input/output (“I/O”) interfaces. The computer platform may also include an operating system and microinstruction code. The various processes and functions described herein may be either part of the microinstruction code or part of the application program, or any combination thereof, which may be executed by a CPU. In addition, various other peripheral units may be connected to the computer platform such as an additional data storage unit and a printing unit.
By introducing fixed/random delay between successive transmission, the method and the device for data transmission provided in the embodiments of the present disclosure can reduce the burst of the data transmission, and decrease the probability of data overflow which might occur due to the limited capacity of the cache or buffer under the protocol without flow control or acknowledge mechanism.
Therefore, the method and the device for data transmission provided in the embodiments of the present disclosure can reduce the packet loss in the data transmission while maintaining the real-time data transmission as much as possible, thus enhancing the reliability of the data transmission, and improving the user's experience.
Furthermore, it is provided a computer program product downloadable from a communication network and/or recorded on a medium readable by computer and/or executable by a processor, comprising program code instructions for implementing the steps of a method as aforementioned.
Furthermore, it is provided Non-transitory computer-readable medium comprising a computer program product recorded thereon and capable of being run by a processor, including program code instructions for implementing the steps of a method as aforementioned.
The embodiments of the invention being thus described, it will be obvious that all the embodiments may be varied in many ways. Such variations should not be regarded as a departure from the scope of the invention, and all such modifications as would be obvious to those skilled in the art are intended to be included within the scope of the following claims.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2015/082340 | 6/25/2015 | WO | 00 |