US10542064B2ActiveUtilityA1

Method, server side and system for computing bandwidth of network transmission of streaming media

62
Assignee: HANGZHOU HIKVISION DIGITAL TECPriority: Jul 8, 2015Filed: May 18, 2016Granted: Jan 21, 2020
Est. expiryJul 8, 2035(~9 yrs left)· nominal 20-yr term from priority
H04N 21/64792H04N 21/238H04L 1/0009H04N 21/6437H04N 21/64769H04L 69/164H04L 1/0015H04L 1/0014H04N 21/64723H04L 65/607H04L 1/0034H04L 65/80H04L 29/06H04L 65/601H04L 65/602H04L 1/0002H04L 67/42H04L 65/70H04L 65/762
62
PatentIndex Score
1
Cited by
33
References
14
Claims

Abstract

A method, a server and a system for calculating bandwidth of UDP-based streaming media network transmission. The method includes: dividing video frame data to be sent into a plurality of sub-video frame packets, sending a sub-video frame packet with a preset serial number to a client, and receiving a response message sent by the client, wherein the response message includes a first serial number and a second serial number; sending a sub-video frame packet corresponding to the first serial number to the client, and determining whether the client has received all sub-video frame packets of the video frame data; if so, accurately calculating the actual bandwidth of the current network based on the sending start time of the first sub-video frame packet of the video frame data, the sending end time of the last sub-video frame packet of the video frame data and the size of the video frame data, which provides a basis for the self-adaption of the encoding rate.

Claims

exact text as granted — not AI-modified
The invention claimed is: 
     
       1. A method for calculating bandwidth of UDP-based streaming media network transmission, which is applicable to a server, wherein the method comprises:
 dividing video frame data to be sent into a plurality of sub-video frame data units, and encapsulating each sub-video frame data unit into a sub-video frame packet with a preset serial number; 
 sending sub-video frame packets with preset serial numbers to a client, and recording sending start time; 
 receiving a response message sent by the client, wherein the response message is generated based on a sub-video frame packet received by the client, and comprises a first serial number corresponding to at least one sub-video frame packet that the client requires the server to send and a second serial number for the received sub-video frame packet; 
 extracting the first serial number and the second serial number from the response message, sending a sub-video frame packet corresponding to the first serial number to the client, and determining whether the client has received all sub-video frame packets of the video frame data based on the second serial number; 
 if the client has received all sub-video frame packets of the video frame data, recording sending end time of the last sub-video frame packet of the video frame data, and calculating network bandwidth based on the sending start time, the sending end time and the size of the video frame data, 
 wherein calculating network bandwidth comprises: 
 calculating a sending rate of a network, the sending rate being B/T; calculating the sum of sending rates for all video frame data sent within preset unit time, and calculating the average of the sum to obtain the network bandwidth; 
 wherein, B is equal to the sum of the size of the video frame data and the sizes of all sub-video frame packets corresponding to the first serial number sent during the sending of the video frame data, and T is equal to the time interval between the sending start time and the sending end time. 
 
     
     
       2. The method for calculating bandwidth of UDP-based streaming media network transmission of  claim 1 , wherein extracting the first serial number and the second serial number from the response message, sending a sub-video frame packet corresponding to the first serial number to the client, comprises:
 extracting the first serial number and the second serial number from the response message, and accumulating a retransmission count of the sub-video frame packet corresponding to the first serial number; 
 sending the sub-video frame packet corresponding to the first serial number associated with the retransmission count to the client if the retransmission count is greater than a preset retransmission threshold. 
 
     
     
       3. The method for calculating bandwidth of UDP-based streaming media network transmission of  claim 2 , wherein after extracting the first serial number and the second serial number from the response message, the method further comprises:
 deleting, from a sending buffer, sub-video frame packets with serial numbers that are smaller than the smallest serial number in the first serial numbers; 
 decreasing the count of sub-video frame packets which have been sent to the client but for which response messages comprising second serial numbers have not been received according to the number of the deleted sub-video frame packets. 
 
     
     
       4. The method for calculating bandwidth of UDP-based streaming media network transmission of  claim 2 , wherein sending the sub-video frame packet corresponding to the first serial number associated with the retransmission count to the client if the retransmission count is greater than a preset retransmission threshold, comprises:
 determining whether the number of sub-video frame packets which have been sent to the client but for which response messages comprising second serial numbers have not been received reaches a preset number threshold; 
 if the number of sub-video frame packets which have been sent to the client but for which response messages comprising second serial numbers have not been received reaches the preset number threshold, selecting, from a sending buffer, a sub-video frame packet whose retransmission count is greater than the preset retransmission threshold according to a preset strategy, and sending the sub-video frame packet to the client; 
 if the number of sub-video frame packets which have been sent to the client but for which response messages comprising second serial numbers have not been received does not reach the preset number threshold, sending a sub-video frame packet, selected from the sending buffer, whose retransmission count is greater than the preset retransmission threshold, and sending new sub-video frame packets and accumulating the count of sub-video frame packets which have been sent to the client but for which response messages comprising second serial numbers have not been received based on the number of the new sub-video frame packets. 
 
     
     
       5. The method for calculating bandwidth of UDP-based streaming media network transmission of  claim 4 , wherein the preset strategy comprises: selecting, from the sending buffer, a sub-video frame packet with the smallest serial number in sub-video frame packets whose retransmission counts are greater than the preset retransmission threshold. 
     
     
       6. The method for calculating bandwidth of UDP-based streaming media network transmission of  claim 1 , wherein after obtaining the network bandwidth, the method further comprises:
 adjusting an encoding rate of the transmission of the video frame data according to the network bandwidth. 
 
     
     
       7. A system for UDP-based streaming media network transmission, wherein the system comprises a client and a server for UDP-based streaming media network transmission, and the server establishes network connection with the client;
 wherein the server performs following steps: 
 dividing video frame data to be sent into a plurality of sub-video frame data units, and encapsulating each sub-video frame data unit into a sub-video frame packet with a preset serial number; 
 sending sub-video frame packets with preset serial numbers to a client, and recording sending start time; 
 receiving a response message sent by the client, wherein the response message is generated based on a sub-video frame packet received by the client, and comprises a first serial number corresponding to at least one sub-video frame packet that the client requires a server to send and a second serial number for the received sub-video frame packet; 
 extracting the first serial number and the second serial number from the response message, sending a sub-video frame packet corresponding to the first serial number to the client, and determining whether the client has received all sub-video frame packets of the video frame data based on the second serial number; 
 if the client has received all sub-video frame packets of the video frame data, recording sending end time of the last sub-video frame packet of the video frame data, and calculating network bandwidth based on the sending start time, the sending end time and the size of the video frame data; 
 wherein calculating network bandwidth comprises: 
 calculating a sending rate of a network, the sending rate being B/T; calculating the sum of sending rates for all video frame data sent within preset unit time, and calculating the average of the sum to obtain the network bandwidth; 
 wherein, B is equal to the sum of the size of the video frame data and the sizes of all sub-video frame packets corresponding to the first serial number sent during the sending of the video frame data, and T is equal to the time interval between the sending start time and the sending end time. 
 
     
     
       8. A non-transitory storage medium, wherein the storage medium is configured to store an application program that is configured to perform the following steps when being executed:
 dividing video frame data to be sent into a plurality of sub-video frame data units, and encapsulating each sub-video frame data unit into a sub-video frame packet with a preset serial number; 
 sending sub-video frame packets with preset serial numbers to a client, and recording sending start time; 
 receiving a response message sent by the client, wherein the response message is generated based on a sub-video frame packet received by the client, and comprises a first serial number corresponding to at least one sub-video frame packet that the client requires a server to send and a second serial number for the received sub-video frame packet; 
 extracting the first serial number and the second serial number from the response message, sending a sub-video frame packet corresponding to the first serial number to the client, and determining whether the client has received all sub-video frame packets of the video frame data based on the second serial number; 
 if the client has received all sub-video frame packets of the video frame data, recording sending end time of the last sub-video frame packet of the video frame data, and calculating network bandwidth based on the sending start time, the sending end time and the size of the video frame data, 
 wherein calculating network bandwidth comprises: 
 calculating a sending rate of a network, the sending rate being B/T; calculating the sum of sending rates for all video frame data sent within preset unit time, and calculating the average of the sum to obtain the network bandwidth; 
 wherein, B is equal to the sum of the size of the video frame data and the sizes of all sub-video frame packets corresponding to the first serial number sent during the sending of the video frame data, and T is equal to the time interval between the sending start time and the sending end time. 
 
     
     
       9. A computing device, comprising a processor and a memory, wherein
 the memory stores executable program codes; 
 the processor executes a program corresponding to the executable program codes stored in the memory by reading the executable program codes, to perform a method for calculating bandwidth of UDP-based streaming media network transmission, wherein the method comprises: 
 dividing video frame data to be sent into a plurality of sub-video frame data units, and encapsulating each sub-video frame data unit into a sub-video frame packet with a preset serial number; 
 sending sub-video frame packets with preset serial numbers to a client, and recording sending start time; 
 receiving a response message sent by the client, wherein the response message is generated based on a sub-video frame packet received by the client, and comprises a first serial number corresponding to at least one sub-video frame packet that the client requires a server to send and a second serial number for the received sub-video frame packet; 
 extracting the first serial number and the second serial number from the response message, sending a sub-video frame packet corresponding to the first serial number to the client, and determining whether the client has received all sub-video frame packets of the video frame data based on the second serial number; 
 if the client has received all sub-video frame packets of the video frame data, recording sending end time of the last sub-video frame packet of the video frame data, and calculating network bandwidth based on the sending start time, the sending end time and the size of the video frame data; 
 wherein calculating network bandwidth comprises: 
 calculating a sending rate of a network, the sending rate being B/T; calculating the sum of sending rates for all video frame data sent within preset unit time, and calculating the average of the sum to obtain the network bandwidth; 
 wherein, B is equal to the sum of the size of the video frame data and the sizes of all sub-video frame packets corresponding to the first serial number sent during the sending of the video frame data, and T is equal to the time interval between the sending start time and the sending end time. 
 
     
     
       10. The computing device of  claim 9 , wherein extracting the first serial number and the second serial number from the response message, sending a sub-video frame packet corresponding to the first serial number to the client, comprises:
 extracting the first serial number and the second serial number from the response message, and accumulating a retransmission count of the sub-video frame packet corresponding to the first serial number; 
 sending the sub-video frame packet corresponding to the first serial number associated with the retransmission count to the client if the retransmission count is greater than a preset retransmission threshold. 
 
     
     
       11. The computing device of  claim 10 , wherein after extracting the first serial number and the second serial number from the response message, the method further comprises:
 deleting, from a sending buffer, sub-video frame packets with serial numbers that are smaller than the smallest serial number in the first serial numbers; 
 decreasing the count of sub-video frame packets which have been sent to the client but for which response messages comprising second serial numbers have not been received according to the number of the deleted sub-video frame packets. 
 
     
     
       12. The computing device of  claim 10 , wherein sending the sub-video frame packet corresponding to the first serial number associated with the retransmission count to the client if the retransmission count is greater than a preset retransmission threshold, comprises:
 determining whether the number of sub-video frame packets which have been sent to the client but for which response messages comprising second serial numbers have not been received reaches a preset number threshold; 
 if the number of sub-video frame packets which have been sent to the client but for which response messages comprising second serial numbers have not been received reaches the preset number threshold, selecting, from a sending buffer, a sub-video frame packet whose retransmission count is greater than the preset retransmission threshold according to a preset strategy, and sending the sub-video frame packet to the client; 
 if the number of sub-video frame packets which have been sent to the client but for which response messages comprising second serial numbers have not been received does not reach the preset number threshold, sending a sub-video frame packet, selected from the sending buffer, whose retransmission count is greater than the preset retransmission threshold, and sending new sub-video frame packets and accumulating the count of sub-video frame packets which have been sent to the client but for which response messages comprising second serial numbers have not been received based on the number of the new sub-video frame packets. 
 
     
     
       13. The computing device of  claim 12 , wherein the preset strategy comprises: selecting, from the sending buffer, a sub-video frame packet with the smallest serial number in sub-video frame packets whose retransmission counts are greater than the preset retransmission threshold. 
     
     
       14. The computing device of  claim 9 , wherein after obtaining the network bandwidth, the method further comprises:
 adjusting an encoding rate of the transmission of the video frame data according to the network bandwidth.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.