CN114095760A - Data transmission method and data transmission device thereof - Google Patents

Data transmission method and data transmission device thereof Download PDF

Info

Publication number
CN114095760A
CN114095760A CN202111319466.4A CN202111319466A CN114095760A CN 114095760 A CN114095760 A CN 114095760A CN 202111319466 A CN202111319466 A CN 202111319466A CN 114095760 A CN114095760 A CN 114095760A
Authority
CN
China
Prior art keywords
sending
period
quota
data
transmission
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.)
Granted
Application number
CN202111319466.4A
Other languages
Chinese (zh)
Other versions
CN114095760B (en
Inventor
李磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Ezviz Network Co Ltd
Original Assignee
Hangzhou Ezviz Network Co Ltd
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 Hangzhou Ezviz Network Co Ltd filed Critical Hangzhou Ezviz Network Co Ltd
Priority to CN202111319466.4A priority Critical patent/CN114095760B/en
Publication of CN114095760A publication Critical patent/CN114095760A/en
Application granted granted Critical
Publication of CN114095760B publication Critical patent/CN114095760B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2402Monitoring of the downstream path of the transmission network, e.g. bandwidth available
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a data transmission method, which is applied to the transmission of dynamic code rate video data under a user datagram protocol UDP and comprises the following steps: determining a sending quota of a T + N sending period according to the packet loss rate and the load condition in the T sending period, wherein the sending quota of the T + N sending period is the maximum number of bytes allowed to be sent in the T + N sending period; and sending data according to the sending quota of the T + N sending period. According to the embodiment provided by the application, the sending quota of the current sending period can be determined and the data can be sent according to the packet loss rate and the load condition in the preamble sending period, so that the sending quota of the current sending period can be flexibly adjusted according to the data sending condition of the preamble sending period, the network congestion in the data transmission process can be effectively reduced, and the timeliness of data transmission is improved.

Description

Data transmission method and data transmission device thereof
Technical Field
The present application relates to the field of communications, and in particular, to a data transmission method and a data transmission apparatus.
Background
With the development of technology, the amount of data to be transmitted is also larger and larger, and especially for real-time audio and video data, higher requirements are put forward on network transmission. The network bandwidth is limited by the actual physical link and the processing capacity of the router on the link, theoretically, there is a maximum value, if the currently sent audio/video data is larger than the current bandwidth, for the User Datagram Protocol (UDP), the data packet will be directly sent to the network, which will cause an instant impact to the network, if the bandwidth is limited, the network condition will be further deteriorated, and a large amount of network packet loss will be caused.
The transmitted audio and video data packets are determined to have a good transmission interval, so that the data packets are uniformly distributed in a current transmitted time sequence, in the field of real-time audio and video, a fixed code rate is generally required to be adopted for coding, and the fixed code rate cannot bring instantaneous impact to a network, thereby causing network congestion, but the fixed code rate has some problems, so that the fixed code rate is not suitable for storage, such as insufficient code rate of a complex picture, fuzzy pictures, waste of code rate of a simple picture, waste of storage space, video files with the same size, and poor image quality of the fixed code rate compared with a dynamic code rate.
When the dynamic code rate video is transmitted in real time, due to the fact that the code rates of the dynamic code rate video are not uniformly distributed in time, instantaneous impact can be brought to a link when the code rate is high, and network congestion is caused.
Therefore, a data transmission method is needed at present, and the method is applied to the transmission of the dynamic code rate video data under the user datagram protocol UDP, so that the network congestion in the transmission process of the dynamic code rate video data can be effectively reduced, and the timeliness of data transmission is improved.
Disclosure of Invention
The application provides a data transmission method, which can effectively reduce network congestion in the transmission process of dynamic code rate video data and improve the timeliness of data transmission.
In a first aspect, a method for data transmission is provided, where the method is applied to video data transmission with dynamic bitrate under a user datagram protocol UDP, and includes: determining a sending quota of a T + N sending period according to the packet loss rate and the load condition in the T sending period, wherein the sending quota of the T + N sending period is the maximum number of bytes allowed to be sent in the T + N sending period; and sending data according to the sending quota of the T + N sending period, wherein N is a positive integer.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the sending data according to the sending quota of the T + N-th sending period includes: when first data to be sent exist in the T + N sending periods and a sending quota in the T + N sending periods is remained, sending the first data by using the sending quota; otherwise, the first data is put into a target message queue, and in a T + N +1 th sending period, the first sending data is sent by using the sending quota of the T + N +1 th sending period, wherein the sending quota of the T + N +1 th sending period is determined by the packet loss rate and the load condition in the T +1 th sending period.
With reference to the first aspect and the foregoing implementation manner, in a second possible implementation manner of the first aspect, in a T + N +1 th sending period, the sending priority of the target message queue is higher than the sending priority of the initial message queue, and the sending priority of the target message queue is lower than the sending priority of the retransmission message queue.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the determining, according to a packet loss rate and a load condition in a T-th transmission period, a transmission quota for a T + N-th transmission period includes: when the T-th sending period is a high-load period and the packet loss rate in the T-th sending period is lower than a first threshold, increasing the sending quota of the T + N-th sending period; when the packet loss rate in the T-th sending period is greater than a second threshold, reducing the sending quota of the T + N-th sending period; otherwise, maintaining the sending quota of the T + N sending periods to be the same as the sending quota of the previous sending period; wherein, the tth sending period is a high load period, which means that the transmission data amount in the tth sending period is greater than a reference threshold.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, when the packet loss rate in the tth sending period is greater than a second threshold, reducing the sending quota of the T + N sending period includes: when the Tth sending period is a high-load period, setting the sending quota of the T + N sending periods as M; and when the Tth sending period is a low load period, setting the sending quota of the T + N sending periods as S, wherein S is smaller than M, and S and M are both smaller than the sending quota of the Tth sending period, wherein the Tth sending period is a low load period and indicates that the quantity of the transmission data in the Tth sending period is smaller than or equal to a reference threshold value.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the method further includes: and taking the sending period with the maximum sending data amount in the W sending periods as a reference period, wherein the reference threshold is 80-90% of the sending data amount in the reference period, and W is a positive integer.
With reference to the first aspect and the foregoing implementation manner, in a fifth possible implementation manner of the first aspect, the sending period is 40-100ms, and the method is applied to one of the following scenarios: video calls, video conferences, live broadcasts, video monitoring, and the like.
In a second aspect, a data transmission apparatus is provided, where the apparatus is applied to video data transmission with dynamic bit rate under UDP, and includes: a processing unit, configured to determine a sending quota of a T + N sending period according to a packet loss rate and a load condition in the T sending period, where the sending quota of the T + N sending period is a maximum number of bytes allowed to be sent in the T + N sending period; a sending unit, configured to send data according to the sending quota of the T + N-th sending period, where N is a positive integer.
It will be appreciated that the data transmission arrangement provided by the second aspect may perform the steps of the method as described in the first aspect.
In a third aspect, an electronic device is provided, where the electronic device is applied to a sending end of data transmission, and includes: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to: determining a sending quota of a T + N sending period according to the packet loss rate and the load condition in the T sending period, wherein the sending quota of the T + N sending period is the maximum number of bytes allowed to be sent in the T + N sending period; and sending data according to the sending quota of the T + N sending period, wherein N is a positive integer.
In a fourth aspect, a computer-readable storage medium, applied to a transmitting end of data transmission, stores one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to perform operations of: determining a sending quota of a T + N sending period according to the packet loss rate and the load condition in the T sending period, wherein the sending quota of the T + N sending period is the maximum number of bytes allowed to be sent in the T + N sending period; and sending data according to the sending quota of the T + N sending period, wherein N is a positive integer.
Because the embodiment provided by the application can determine the sending quota of the current sending period and send data according to the packet loss rate and the load condition in the preamble sending period, the sending quota of the current sending period can be flexibly adjusted according to the data sending condition of the preamble sending period, and therefore, at least one technical scheme adopted by the embodiment of the application can achieve the following beneficial effects:
the network congestion in the data transmission process can be effectively reduced, and the timeliness of data transmission is improved.
Furthermore, the scheme of the application considers the load condition of the preamble sending period, so that when the bandwidth is enough, the video data is sent as soon as possible, the real-time performance is guaranteed, and when the bandwidth is not enough, the sending rate is properly smoothed, so as to avoid causing network congestion.
Further, by judging a high-load transmission period and a low-load transmission period, different strategies are adopted in different types of transmission periods to detect available network bandwidth, so that the transmission speed is adjusted.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flow chart of a method provided by an embodiment of the present application.
Fig. 2 is a schematic flow chart of a method provided in another embodiment of the present application.
Fig. 3 is a schematic diagram of a method according to yet another embodiment of the present application.
Fig. 4 is a schematic flow chart of a method provided by an embodiment of the present application.
Fig. 5 is a schematic flow chart of a method provided in another embodiment of the present application.
Fig. 6 is a schematic diagram of determining a reference threshold according to an embodiment of the present application.
Fig. 7 is a schematic structural block diagram of a data transmission apparatus according to an embodiment of the present application.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Before introducing the scheme, a fixed code rate and a dynamic code rate are explained, wherein the fixed code rate and the size of data after video coding are constant in unit time; and dynamic code rate, the code rate of the video coding in unit time is adjusted according to the complexity of the picture, more data are generated in a complex picture, and less data are generated in a simple picture.
Fig. 1 is a schematic flowchart of a method according to an embodiment of the present application, where the method is applied to dynamic bitrate video data transmission under a user datagram protocol UDP, and an execution subject of the method may be a sending end device in a data transmission process, as shown in fig. 1, where the method 100 includes:
step 110, determining a sending quota of a T + N sending period according to a packet loss rate and a load condition in the T sending period, where the sending quota of the T + N sending period is a maximum number of bytes allowed to be sent in the T + N sending period;
and step 120, sending data according to the sending quota of the T + N-th sending period, where N is a positive integer.
It should be understood that the data transmission method of the present application is applied to transmission of dynamic code data.
Specifically, before step 110, a retransmission request returned by the opposite end (data receiving end) needs to be received, the retransmission request determines the packet loss rate, and retransmits the retransmitted data packet, the sending end calculates the packet loss rate by taking the sending period as a unit, for example, 10 packets marked as 1-10 are sent in the T-th sending period, but 3 retransmission packets marked as 2, 4, and 7 are received in the near future, then the packet loss rate of the sending period is 30%, and the sending end records the sending period in which each data packet to be sent is located, so that the packet loss rate of each sending period can be obtained.
That is, data is transmitted according to the transmission quota of the T + N-th transmission cycle, and the transmission quota of the T + N-th transmission cycle is determined according to the data transmission condition of the T-th transmission cycle, and is determined according to the packet loss rate and the load condition of the T-th transmission cycle.
Optionally, as an embodiment of the present application, sending data according to the sending quota of the T + N-th sending period includes: when first data to be sent exist in the T + N sending periods and a sending quota in the T + N sending periods is remained, sending the first data by using the sending quota; otherwise, the first data is put into a target message queue, and in a T + N +1 th sending period, the first sending data is sent by using the sending quota of the T + N +1 th sending period, wherein the sending quota of the T + N +1 th sending period is determined by the packet loss rate and the load condition in the T +1 th sending period.
Optionally, as an embodiment of the present application, in a T + N +1 th sending period, the sending priority of the target message queue is higher than the sending priority of the initial message queue, and the sending priority of the target message queue is lower than the sending priority of the retransmission message queue.
It should be understood that the target message queue herein refers to a message queue for storing the first data.
That is, when the first data that is not transmitted in the T + N-th transmission period is queued to be transmitted in the T + N + 1-th transmission period, the transmission priority of the first data is higher than that of the newly generated initial transmission data but lower than that of the retransmission data. Fig. 2 is a schematic flow chart of a method provided in another embodiment of the present application. As shown in fig. 2, a sending end sends an initially transmitted data packet through a sending queue, and a receiving end returns a retransmission request to the sending end, where the retransmission request includes an identifier of a data packet to be retransmitted, and then the sending end resends the data packet to be retransmitted through the retransmission queue, and the sending end preferentially sends the data packet to be retransmitted. It should be understood that the transmit queues shown in the figures may include the target message queue and the initial message queue referred to in this application.
For example, each time a video source generates a video frame, the video frame is sent to a sending queue, a sending end establishes a periodic sending task, each sending cycle has a sending quota when executing the task, data within the quotas are taken out from the sending queue and a retransmission queue, and the data are sent to a receiving end through a network by a udp protocol; the receiving end receives data from the network, and due to the unreliability of the udp protocol, packet loss occurs in the received data, and when the receiving end finds the packet loss, the receiving end sends a retransmission request to the sending end; after receiving the retransmission request, the sending end puts the requested packet into a retransmission queue, and the retransmission queue has higher sending priority than the sending queue.
In the following, the retransmission process is further described with reference to fig. 3, fig. 3 is a schematic flow chart of a method according to another embodiment of the present application, and an execution subject of the method may be a sending end device in a data transmission process.
As shown in fig. 3, in step 301, a sending end generates sending data or receives a retransmission request sent by an opposite end;
step 302, judging whether the current sending queue or the retransmission queue is empty;
step 303, if the transmission queue is not empty, it is proved that the data to be transmitted is waiting to be transmitted in the queue, and the data to be transmitted initially needs to be waiting to be transmitted in the queue; if the retransmission queue is not empty, the retransmission queue also indicates that retransmission data are waiting to be sent in the queue, and then the retransmission data are put into the retransmission queue to be sent;
step 304, if in step 302, it is determined that the current sending queue and the retransmission queue are both empty, then checking whether a sending quota exists in the current sending period;
step 305, if there is a sending quota in the period, directly consuming the sending quota of the current period and sending the initial transmission data or the retransmission data without putting the initial transmission data and the retransmission data into a queue;
similarly, if in step 304, it is determined that there is no transmission quota in the current transmission period, if there is initial transmission data, step 303 is executed, and the initial transmission data is placed in the transmission queue to wait for the next transmission period to be transmitted again; if there is retransmission data, step 303 is also executed to put the retransmission data into a retransmission queue to wait for transmission in the next transmission cycle, and it should be understood that the transmission priority of the retransmission queue is higher than that of the transmission queue of the initial transmission data.
The retransmission process is further described below in conjunction with fig. 4, where fig. 4 is a schematic flow chart of a method provided by another embodiment of the present application.
As shown in fig. 4, in step 401, in a sending period, when it is determined that there is retransmission data to be sent or data to be sent remains in a retransmission queue, and at this time, when there is still a sending quota remaining in the period, step 402 may be executed to directly consume the sending quota to send the retransmission data;
when no retransmission data needs to be sent, executing step 403, determining that there is initial transmission data to be sent or there is initial transmission data to be sent in the transmission queue, and if there is still remaining transmission quota in the current transmission period, executing step 404, directly consuming the transmission quota to send the initial transmission data;
in step 405, if there is still retransmission data or initial transmission data that needs to be sent, but the current period has not sent the quota, then put the retransmission data into the retransmission queue, put the initial transmission data into the transmission queue, and wait for the next transmission period to attempt to send the data in the queue, it should be understood that the transmission priority of the retransmission queue is higher than the transmission queue of the initial transmission data.
At step 406, the transmit quota for the next transmit cycle is reconfigured.
Optionally, as an embodiment of the present application, the determining, according to a packet loss ratio and a load condition in a T-th sending period, a sending quota of a T + N-th sending period includes: when the T-th sending period is a high-load period and the packet loss rate in the T-th sending period is lower than a first threshold, increasing the sending quota of the T + N-th sending period; when the packet loss rate in the T-th sending period is greater than a second threshold, reducing the sending quota of the T + N-th sending period; otherwise, maintaining the sending quota of the T + N sending periods to be the same as the sending quota of the previous sending period; wherein, the tth sending period is a high load period, which means that the transmission data amount in the tth sending period is greater than a reference threshold.
It should be understood that, the first threshold may be 2%, 3%, etc., and the second threshold may be 10%, 15%, etc., where the first threshold is smaller than the second threshold, and the specific value is not limited in this application.
In the initial stage, because no detected data exists, a sending end assumes an initial quota, sends data according to the initial quota, and continuously obtains the packet loss rate of each sending period according to the received retransmission request, and does not increase the quota because the upper limit of the bandwidth is not touched when no network congestion occurs in a low-load period; however, if the packet loss rate is lower than a certain threshold in the T-th sending period, which is determined to be a high load period, it is proved that the current network is healthy and more bandwidth is available, and then the sending quota of the T + N-th sending period needs to be increased. For example, the transmission quota of the T + N-th transmission period may be increased by 10%, 12%, or the like, compared with the transmission quota of the T-th transmission period, which is not limited in this application.
Optionally, as an embodiment of the present application, when the packet loss ratio in the T-th sending period is greater than a second threshold, reducing the sending quota of the T + N-th sending period includes: when the Tth sending period is a high-load period, setting the sending quota of the T + N sending periods as M; and when the Tth sending period is a low load period, setting the sending quota of the T + N sending periods as S, wherein S is smaller than M, and S and M are both smaller than the sending quota of the Tth sending period, wherein the Tth sending period is a low load period and indicates that the quantity of the transmission data in the Tth sending period is smaller than or equal to a reference threshold value.
When the packet loss rate in the T-th period is greater than a second threshold, further determining whether the T sending periods are low load periods or high load periods, and in a high load period, if network congestion occurs, a quota needs to be reduced appropriately, for example, a sending quota M of the T + N-th sending period is 90% of a sending quota of the T sending period; in a low load period, network congestion occurs, which indicates that the network has a high degree of deterioration and requires a large reduction of quota, for example, the transmission quota S of the T + N sending period is 80% of the transmission quota of the T sending period.
It should be understood that the values of S and M may be set according to practical application scenarios, and the application does not limit specific values.
Fig. 5 is a schematic flow chart of a method provided in another embodiment of the present application.
As shown in fig. 5, in step 501, a sending end receives a retransmission request sent by an opposite end;
step 502, determining a packet loss rate of a transmission cycle corresponding to the retransmission request according to the retransmission request, for example, calculating a packet loss rate of the T-th transmission cycle.
Step 503, if the T-th sending period is a low load period, the packet loss rate is greater than 10%; step 504 is executed to reduce the sending quota of the T + N sending period, where the sending quota of the T + N sending period is reduced by 20% compared with the sending quota of the T sending period, it should be understood that the T + N sending period is a sending period that has not been sent yet, and the duration of N × sending period is greater than the network delay.
Step 505, if the tth sending period is a high load period, the packet loss rate is less than 2%; step 506 is executed, and the transmission quota of the T + N th transmission cycle is increased, where the transmission quota of the T + N th transmission cycle is increased by 10% than the transmission quota of the T th transmission cycle.
Step 507, if the Tth sending period is a high load period, the packet loss rate is more than 10%; step 508 is executed, the sending quota of the T + N sending period is reduced, and the sending quota of the T + N sending period is reduced by 10% compared with the sending quota of the T sending period.
Step 509, obtaining a transmission quota of T + N transmission cycles;
step 510, the new quota is applied to the T + N th period, and data is sent according to the new quota in this period.
Optionally, as an embodiment of the present application, the reference value is determined by taking a transmission cycle with the maximum transmission data amount in W transmission cycles as a reference cycle, where the reference threshold is 80-90% of the transmission data amount in the reference cycle, and W is a positive integer.
Fig. 6 is a schematic diagram of determining a reference threshold according to an embodiment of the present application. As shown in fig. 6, the abscissa is a period, the ordinate is a data amount, the unit may be byte, in a dynamic bitrate scene, how much data is actually transmitted in different transmission periods is different, by recording the data amount actually transmitted in each transmission period, 90% of the maximum one-time transmission data amount is taken as a reference line, a period in which the transmission data amount is higher than the reference line is called a high load period, and a period in which the transmission data amount is lower than the reference line is taken as a low load period.
Optionally, as an embodiment of the present application, the data transmission method is applied to a user datagram protocol UDP, and the sending period is 40 to 100 ms.
It should be noted that, the executing subjects of the steps of the methods provided in the embodiments of fig. 1 to 6 may all be the same device, or different devices may also be used as the executing subjects of the methods. For example, the execution subject of step 110 may be device 1, and the execution subject of step 120 may be device 2; for another example, the main body for executing step 110 and step 120 may be device 3, etc., and the present application is not limited thereto.
Because the embodiment provided by the application can determine the sending quota of the current sending period and send data according to the packet loss rate and the load condition in the preamble sending period, the sending quota of the current sending period can be flexibly adjusted according to the data sending condition of the preamble sending period, and therefore, at least one technical scheme adopted by the embodiment of the application can achieve the following beneficial effects:
the network congestion in the data transmission process can be effectively reduced, and the timeliness of data transmission is improved.
Furthermore, the scheme of the application considers the load condition of the preamble sending period, so that when the bandwidth is enough, the video data is sent as soon as possible, the real-time performance is guaranteed, and when the bandwidth is not enough, the sending rate is properly smoothed, so as to avoid causing network congestion.
Further, by judging a high-load transmission period and a low-load transmission period, different strategies are adopted in different types of transmission periods to detect available network bandwidth, so that the transmission speed is adjusted.
Fig. 7 is a schematic structural block diagram of a data transmission apparatus according to an embodiment of the present application.
As shown in fig. 7, the data transmission apparatus 700 includes: a processing unit 710, where the processing unit 710 is configured to determine a sending quota of a T + N sending cycle according to a packet loss ratio and a load condition in the T sending cycle, where the sending quota of the T + N sending cycle is a maximum number of bytes allowed to be sent in the T + N sending cycle;
a sending unit 720, where the sending unit 720 is configured to send data according to the sending quota of the T + N-th sending period, where N is a positive integer.
Optionally, as an embodiment of the present application, the sending unit 720 is configured to: when first data to be sent exist in the T + N sending periods and a sending quota in the T + N sending periods is remained, sending the first data by using the sending quota; otherwise, the first data is put into a target message queue, and in a T + N +1 th sending period, the first sending data is sent by using the sending quota of the T + N +1 th sending period, wherein the sending quota of the T + N +1 th sending period is determined by the packet loss rate and the load condition in the T +1 th sending period.
The data transmission device provided by the embodiment of the invention can realize each process in the embodiment corresponding to the message processing method, and is not described again to avoid repetition.
It should be noted that the data transmission apparatus provided in the embodiment of the present invention and the data transmission method provided in the embodiment of the present invention are based on the same inventive concept, and achieve the same beneficial effects, so that the specific implementation of the embodiment may refer to the implementation and beneficial effects of the foregoing configuration method of network resources, and repeated details are not described again.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 8, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 8, but that does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the data acquisition device on the logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
determining a sending quota of a T + N sending period according to the packet loss rate and the load condition in the T sending period, wherein the sending quota of the T + N sending period is the maximum number of bytes allowed to be sent in the T + N sending period;
and sending data according to the sending quota of the T + N sending period, wherein N is a positive integer.
The electronic device provided by the embodiment of the invention is applied to a sending end of data transmission, can realize each process in the embodiment corresponding to the message processing method, and is not repeated here for avoiding repetition.
It should be noted that, when the electronic device provided in the embodiment of the present invention is applied to a sending end of data transmission, the same beneficial effects are achieved based on the same inventive concept as the data transmission method provided in the embodiment of the present invention, and therefore, specific implementation of the embodiment may refer to implementation and beneficial effects of the foregoing configuration method of network resources, and repeated details are not described again.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for data transmission is applied to video data transmission with dynamic code rate under user datagram protocol UDP, and comprises the following steps:
determining a sending quota of a T + N sending period according to the packet loss rate and the load condition in the T sending period, wherein the sending quota of the T + N sending period is the maximum number of bytes allowed to be sent in the T + N sending period;
and sending data according to the sending quota of the T + N sending period, wherein N is a positive integer.
2. The method of claim 1, wherein sending data according to the sending quota of the T + N-th sending period comprises:
when first data to be sent exist in the T + N sending periods and a sending quota in the T + N sending periods is remained, sending the first data by using the sending quota;
otherwise, the first data is put into a target message queue, and in a T + N +1 th sending period, the first sending data is sent by using the sending quota of the T + N +1 th sending period, wherein the sending quota of the T + N +1 th sending period is determined by the packet loss rate and the load condition in the T +1 th sending period.
3. The method of claim 2, wherein in the T + N +1 th transmission period, the transmission priority of the target message queue is higher than that of the initial transmission message queue, and the transmission priority of the target message queue is lower than that of the retransmission message queue.
4. The method according to claim 2, wherein the determining the transmission quota for the T + N-th transmission period according to the packet loss ratio and the load condition in the T-th transmission period includes:
when the T-th sending period is a high-load period and the packet loss rate in the T-th sending period is lower than a first threshold, increasing the sending quota of the T + N-th sending period;
when the packet loss rate in the T-th sending period is greater than a second threshold, reducing the sending quota of the T + N-th sending period;
otherwise, maintaining the sending quota of the T + N sending periods to be the same as the sending quota of the previous sending period;
wherein, the tth sending period is a high load period, which means that the transmission data amount in the tth sending period is greater than a reference threshold.
5. The method of claim 3, wherein when the packet loss rate in the tth sending period is greater than a second threshold, decreasing the sending quota for the T + N sending period comprises:
when the Tth sending period is a high-load period, setting the sending quota of the T + N sending periods as M;
and when the Tth sending period is a low load period, setting the sending quota of the T + N sending periods as S, wherein S is smaller than M, and S and M are both smaller than the sending quota of the Tth sending period, wherein the Tth sending period is a low load period and indicates that the quantity of the transmission data in the Tth sending period is smaller than or equal to a reference threshold value.
6. The method of claim 4, further comprising:
and taking the sending period with the maximum sending data amount in the W sending periods as a reference period, wherein the reference threshold is 80-90% of the sending data amount in the reference period, and W is a positive integer.
7. The method of claim 4, wherein the transmission period is 40-100ms, and wherein the method is applied in one of the following scenarios: video call, video conference, live broadcast and video monitoring.
8. A data transmission device is applied to dynamic code rate video data transmission under a User Datagram Protocol (UDP), and comprises:
a processing unit, configured to determine a sending quota of a T + N sending period according to a packet loss rate and a load condition in the T sending period, where the sending quota of the T + N sending period is a maximum number of bytes allowed to be sent in the T + N sending period;
a sending unit, configured to send data according to the sending quota of the T + N-th sending period, where N is a positive integer.
9. An electronic device, which is applied to a sending end of video data transmission with dynamic code rate, includes:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
determining a sending quota of a T + N sending period according to the packet loss rate and the load condition in the T sending period, wherein the sending quota of the T + N sending period is the maximum number of bytes allowed to be sent in the T + N sending period;
and sending data according to the sending quota of the T + N sending period, wherein N is a positive integer.
10. A computer-readable storage medium, applied to a transmitting end of dynamic bitrate video data transmission, storing one or more programs that, when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform operations of:
determining a sending quota of a T + N sending period according to the packet loss rate and the load condition in the T sending period, wherein the sending quota of the T + N sending period is the maximum number of bytes allowed to be sent in the T + N sending period;
and sending data according to the sending quota of the T + N sending period, wherein N is a positive integer.
CN202111319466.4A 2021-11-09 2021-11-09 Data transmission method and data transmission device thereof Active CN114095760B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111319466.4A CN114095760B (en) 2021-11-09 2021-11-09 Data transmission method and data transmission device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111319466.4A CN114095760B (en) 2021-11-09 2021-11-09 Data transmission method and data transmission device thereof

Publications (2)

Publication Number Publication Date
CN114095760A true CN114095760A (en) 2022-02-25
CN114095760B CN114095760B (en) 2024-04-30

Family

ID=80299635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111319466.4A Active CN114095760B (en) 2021-11-09 2021-11-09 Data transmission method and data transmission device thereof

Country Status (1)

Country Link
CN (1) CN114095760B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1980238A (en) * 2006-10-30 2007-06-13 上海广电(集团)有限公司中央研究院 II.264 flow-media transmission control method based on real-time transmission/control protocl
CN101965007A (en) * 2009-07-21 2011-02-02 中兴通讯股份有限公司 Congestion control method and device for base station
CN102076021A (en) * 2010-12-22 2011-05-25 大唐移动通信设备有限公司 Transmission resource allocation method and equipment
CN102263699A (en) * 2011-08-15 2011-11-30 杭州华三通信技术有限公司 Load balancing implementation method and device applied to MPLS TP (multiprotocol label switch transport profile)
CN103634299A (en) * 2013-11-14 2014-03-12 北京邮电大学 Real-time stream media transmission terminal and method based on multi-connection
US20150012928A1 (en) * 2013-07-08 2015-01-08 The Trustees Of Princeton University Quota aware video adaptation
WO2017166493A1 (en) * 2016-03-31 2017-10-05 乐视控股(北京)有限公司 Bandwidth estimation method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1980238A (en) * 2006-10-30 2007-06-13 上海广电(集团)有限公司中央研究院 II.264 flow-media transmission control method based on real-time transmission/control protocl
CN101965007A (en) * 2009-07-21 2011-02-02 中兴通讯股份有限公司 Congestion control method and device for base station
CN102076021A (en) * 2010-12-22 2011-05-25 大唐移动通信设备有限公司 Transmission resource allocation method and equipment
CN102263699A (en) * 2011-08-15 2011-11-30 杭州华三通信技术有限公司 Load balancing implementation method and device applied to MPLS TP (multiprotocol label switch transport profile)
US20150012928A1 (en) * 2013-07-08 2015-01-08 The Trustees Of Princeton University Quota aware video adaptation
CN103634299A (en) * 2013-11-14 2014-03-12 北京邮电大学 Real-time stream media transmission terminal and method based on multi-connection
WO2017166493A1 (en) * 2016-03-31 2017-10-05 乐视控股(北京)有限公司 Bandwidth estimation method and device

Also Published As

Publication number Publication date
CN114095760B (en) 2024-04-30

Similar Documents

Publication Publication Date Title
US11166330B2 (en) Data-stream allocation method for link aggregation and related devices
CN108810657B (en) Method and system for setting video cover
CN112579148A (en) Service message processing method and device based on service agent and electronic equipment
US10284481B2 (en) Communication device, communication method, and storage medium
CN111181698A (en) Data processing method, device, equipment and medium
CN108023938B (en) Message sending method and server
CN114095760B (en) Data transmission method and data transmission device thereof
CN115955447A (en) Data transmission method, switch and switch system
CN114244758B (en) Network diagnosis method, storage medium, electronic equipment and system of android platform
CN115514710A (en) Weak connection flow management and control method based on self-adaptive sliding window
CN107295667B (en) Access resource adjusting method and device
CN112202914B (en) Message pushing method and device
CN114338401A (en) Resource allocation method, device, electronic equipment and readable medium
CN110557453A (en) data distribution method, device, equipment and storage medium
CN117041235A (en) Real-time communication method, device and medium based on Web application
CN110874267A (en) Polling scheduling method, device, storage medium and equipment
CN113891392B (en) Congestion control method, device, equipment and storage medium
CN113630422B (en) Network security data processing method and system based on edge node
CN115714992A (en) Data transmission method and device
CN116016687B (en) Message distribution method and system based on DPDK
Chen et al. A reliable messaging middleware for financial institutions
CN114006864B (en) Channel scheduling method, device, system and storage medium based on time equalization
CN116366503B (en) Data processing method and related device
CN111726679B (en) Video playing method, device, equipment and medium
CN107454432B (en) Data sending method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant