CN115378832B - Congestion detection method and device, stream media transmission system, electronic equipment and medium - Google Patents
Congestion detection method and device, stream media transmission system, electronic equipment and medium Download PDFInfo
- Publication number
- CN115378832B CN115378832B CN202210908240.6A CN202210908240A CN115378832B CN 115378832 B CN115378832 B CN 115378832B CN 202210908240 A CN202210908240 A CN 202210908240A CN 115378832 B CN115378832 B CN 115378832B
- Authority
- CN
- China
- Prior art keywords
- code rate
- packet loss
- real
- streaming media
- media data
- 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.)
- Active
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 166
- 238000001514 detection method Methods 0.000 title claims abstract description 27
- 238000011156 evaluation Methods 0.000 claims abstract description 79
- 238000000034 method Methods 0.000 claims abstract description 30
- 238000004891 communication Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 8
- 230000000630 rising effect Effects 0.000 claims description 8
- 238000004422 calculation algorithm Methods 0.000 description 12
- 230000007423 decrease Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 9
- 230000008859 change Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000013139 quantization Methods 0.000 description 4
- 101100465000 Mus musculus Prag1 gene Proteins 0.000 description 3
- 230000009471 action Effects 0.000 description 3
- 230000003044 adaptive effect Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000001174 ascending effect Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000012937 correction Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 230000035945 sensitivity Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 241000352333 Amegilla alpha Species 0.000 description 1
- 208000032369 Primary transmission Diseases 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000002045 lasting effect Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0823—Errors, e.g. transmission errors
- H04L43/0829—Packet loss
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0852—Delays
- H04L43/0864—Round trip delays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/80—Responding to QoS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Multimedia (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention provides a congestion detection method, a congestion detection device, a streaming media transmission system, electronic equipment and a medium, wherein the method is applied to sending equipment, a transmission link is established between the sending equipment and receiving equipment, and the method comprises the following steps: when streaming media data is sent to receiving equipment, network characteristic information fed back by the receiving equipment is obtained; the network characteristic information comprises real-time packet loss rate, retransmission rate and round trip delay; calculating expected transmission times for streaming media data based on the round trip delay and a preset delay upper limit value; acquiring an evaluation threshold matched with the expected transmission times; and detecting whether the transmission link is in a congestion state according to the difference between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold value. The embodiment of the invention can realize that the receiving equipment can combine the dimensions of the real-time packet loss rate, the retransmission rate, the round trip delay and the like to judge whether the transmission link of the receiving equipment and the receiving equipment is in a congestion state, and improve the accuracy of judging the congestion state of the transmission link.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a congestion detection method, a congestion detection device, a streaming media transmission system, an electronic device, and a readable storage medium.
Background
WebRTC (Web Real-Time Communication ) is an application programming interface that supports Web browsers for Real-time voice conversations or video conversations.
The low-delay audio and video streaming technology based on the WebRTC is suitable for scenes such as online video conferences, online teaching, audio and video live broadcast interaction and the like. WebRTC encapsulates streaming media using standard RTP (Real-time Transport Protocol )/RTCP (Real-time transport control protocol) and transmits streaming media based on UDP (User Datagram Protocol ), which itself provides a mechanism to guarantee transmission reliability, for example: congestion control mechanisms based on GCC (Google Congestion Control ) rate estimation algorithms. The GCC algorithm is mainly divided into two parts, one is congestion control based on packet loss and the other is congestion control based on delay. In early implementations, the two congestion control algorithms were implemented in the sending device and the receiving device, respectively, and the estimated bandwidth calculated by the delay-based congestion control algorithm of the receiving device would be fed back to the sending device via REMB (Receiver Estimated Max Bitrate, receiving device estimated maximum bit rate) of RTCP, and the sending device would synthesize the results of the two control algorithms to obtain a final sending code rate, and send the data packet at this final sending code rate.
The problem of the GCC code rate estimation algorithm is that whether the transmission links of the sending equipment and the receiving equipment are congested is judged based on the packet loss rate, and whether the transmission links are congested is not only dependent on the packet loss rate, so that the congestion state of the transmission links is judged by the GCC code rate estimation algorithm to be inaccurate.
Disclosure of Invention
The embodiment of the invention aims to provide a congestion detection method for realizing the stability and reliability of detecting the congestion state of a transmission link between different devices and reducing the fluctuation of the code rate of transmission data between the devices. The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a congestion detection method applied to a transmitting device, a transmission link being established between the transmitting device and a receiving device, the method including:
when streaming media data is sent to the receiving equipment, acquiring network characteristic information fed back by the receiving equipment; the network characteristic information comprises a real-time packet loss rate, a retransmission rate and round trip delay;
calculating the expected transmission times for the streaming media data based on the round trip delay and a preset delay upper limit value;
acquiring an evaluation threshold matched with the expected transmission times;
And detecting whether the transmission link is in a congestion state according to the difference between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold value.
In a second aspect of the present invention, there is also provided a congestion detection apparatus applied to a transmitting device, a transmission link being established between the transmitting device and a receiving device, the apparatus comprising:
the characteristic information acquisition module is used for acquiring network characteristic information fed back by the receiving equipment when streaming media data is sent to the receiving equipment; the network characteristic information comprises a real-time packet loss rate, a retransmission rate and round trip delay;
the expected transmission times determining module is used for calculating the expected transmission times of the streaming media data based on the round trip delay and a preset delay upper limit value;
an evaluation threshold acquisition module, configured to acquire an evaluation threshold that matches the expected number of transmissions;
and the congestion state detection module is used for detecting whether the transmission link is in a congestion state according to the difference between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold value.
In a third aspect of the present invention, there is further provided a streaming media transmission system, including a sending device and a receiving device for streaming media data, where a transmission link is established between the sending device and the receiving device;
The receiving equipment comprises a device for generating network characteristic information corresponding to the streaming media data when receiving the streaming media data sent by the sending equipment;
the sending equipment comprises network characteristic information which is used for acquiring feedback of the receiving equipment when streaming media data is sent to the receiving equipment; the network characteristic information comprises a real-time packet loss rate, a retransmission rate and round trip delay;
calculating the expected transmission times for the streaming media data based on the round trip delay and a preset delay upper limit value;
acquiring an evaluation threshold matched with the expected transmission times;
and determining the congestion state of the transmission link according to the difference between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold.
In yet another aspect of the present invention, there is also provided an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory perform communication with each other through the communication bus; a memory for storing a computer program; and the processor is used for realizing the congestion detection method when executing the program stored in the memory.
In yet another aspect of the present invention, there is also provided a computer-readable storage medium having instructions stored therein, which when run on a computer, cause the computer to perform the congestion detection method as described above.
In yet another aspect of the invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the congestion detection methods described above.
According to the congestion detection method provided by the embodiment of the invention, when streaming media data is sent to receiving equipment, network characteristic information including real-time packet loss rate, retransmission rate and round trip delay is fed back by the receiving equipment; calculating expected transmission times for streaming media data based on the round trip delay and a preset delay upper limit value; acquiring an evaluation threshold matched with the expected transmission times; according to the difference between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold value, whether the transmission link is in a congestion state or not is detected, so that the receiving device can judge whether the transmission link with the receiving device is in the congestion state or not by combining the multi-dimensions of the real-time packet loss rate, the retransmission rate, the round trip delay and the like, and the accuracy of judging the congestion state of the transmission link is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic diagram of a code rate adjustment in the prior art;
fig. 2 is a schematic diagram of code rate information adjustment according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating steps of a first embodiment of a congestion detection method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating steps of a second embodiment of a congestion detection method according to an embodiment of the present invention;
fig. 5 is a block diagram of an embodiment of a congestion detection apparatus in an embodiment of the invention;
fig. 6 is a block diagram illustrating an embodiment of a streaming media transmission system according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an embodiment of an electronic device in an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
Referring to fig. 1, there is shown a schematic diagram of code rate adjustment in the prior art, involving a transmitting device 100 and a receiving device 200 connected by a transmission link. The sending device 100 adjusts the rate of the streaming media data according to the GCC algorithm, specifically, the packet loss rate control module 101 of the sending device 100 is configured to estimate the rate based on the packet loss rate, and compare the estimated rate with the REMB rate fed back by the receiving device 200 based on the RTCP protocol, where the smaller value of the estimated rate and the REMB rate is the target rate. The encoder 102 is configured to output streaming media data according to a target code rate. The constant speed module 103 is used for controlling the sending rate of the data packet. FEC (Forward Error Correction) refers to adding a portion of an encoded data packet as redundant data to a data packet that needs to be transmitted. The front-back error correction module 104 is configured to add redundant data to the encoded data packet, and the transmitting device 100 encapsulates the streaming media data added with the redundant data into a data packet based on the RTP protocol, and sends the data packet to the receiving device 200 via a transmission link.
The arrival filtering module 201 of the receiving device 200 is configured to filter the interval fluctuation of the arrival time of the data packet to obtain a delay time after receiving the data packet, the adaptive threshold module 202 is configured to obtain an adaptive threshold according to the delay time and a preset rule, the overload detecting module 203 is configured to determine whether the interval fluctuation of the received streaming media data is overloaded according to the delay time and the adaptive threshold, the remote code rate control module 204 is configured to form an estimated RMEB code rate according to the overload detection result, and the RMEB processing module 205 is configured to feed back the estimated REMB code rate to the sending device 100 through an RTCP protocol.
The specific GCC algorithm is as follows:
f l (t k ) When the packet loss rate is more than 10%, the network is considered to be congested, the bandwidth is reduced according to the packet loss rate, and the higher the packet loss rate is, the more the bandwidth is reduced; when the packet loss rate is less than 2%, the network condition is considered to be good, and at the moment, the bandwidth is increased by 5% upwards to detect whether more bandwidth is available; the packet loss rate between 2% and 10% can keep the current bit rate unchanged, and the bit rate change is easy to fluctuate and the interference degree is lower because the bit rate of the data packet is adjusted only based on the packet loss rate in the transmission link.
Referring to fig. 2, a schematic diagram of code rate information adjustment provided by the embodiment of the present invention is shown, and compared with the prior art shown in fig. 1, the congestion control algorithm module 110 of the sending device 100 in the embodiment of the present invention combines the real-time packet loss rate, retransmission rate and round trip delay fed back by the receiving device 200 to determine whether the transmission link with the receiving device 200 is in a congestion state, and calculates the target code rate information based on the current code rate information. If the target code rate information is different from the current code rate information, the target code rate information is sent to the encoder 102, and the encoder 102 dynamically adjusts the code rate of the streaming media output by the encoder according to the target code rate information, so that the bandwidth for sending the audio/video packets is automatically adapted to network fluctuation as much as possible. For example: the code rate of the encoder is modified in real time by calling a system interface of the encoder in an operating system of the mobile terminal (for example, the code rate of the encoder can be modified in real time by calling a system interface VTSessionSetProperty of the object-c language of the encoder at a mobile phone end deployed with an ios operating system), the bandwidth required for sending an audio-video link can be reduced by reducing the code rate, network congestion can be reduced, the definition of the audio-video can be improved by improving the code rate, the bandwidth utilization rate can be improved, and network congestion can be caused in a weak network environment.
Referring to fig. 3, a flow chart of a congestion detection method of the present invention is shown; the embodiment of the invention is applied to the transmitting equipment, and a transmission link is established between the transmitting equipment and the receiving equipment.
The transmitting device may establish a transmission link with one or more receiving devices based on a user data packet protocol in advance, thereby forming a UDP network. The transmitting device may transmit streaming media data to the receiving device over the transmission link. The streaming media data may include one or more of an audio stream, a video stream, a text stream, an image stream, and the like.
The transmitting device may be a terminal or server, and the terminal may include, but is not limited to, one or more of a smart phone, a tablet computer, a personal computer, a wearable device.
Similarly, the receiving device may be a terminal or a device, which is not described herein in detail, and may be described with reference to the transmitting device.
The embodiment of the invention specifically comprises the following steps:
step 301, when streaming media data is sent to the receiving device, acquiring network characteristic information fed back by the receiving device; the network characteristic information comprises a real-time packet loss rate, a retransmission rate and round trip delay;
when the transmitting device transmits streaming media data to the receiving device, the receiving device may generate corresponding network characteristic information for a transmission link, determine a feedback Time interval of the transmission network characteristic information, and transmit the network characteristic information to the transmitting device by using the transmission link according to the feedback Time interval, where the network characteristic information may include a packet loss rate, a retransmission rate, and a Round Trip Time (RTT). In practical application, the feedback frequency can be determined according to the bandwidth of the transmission link, so as to avoid the network characteristic information from occupying excessive bandwidth, for example: and determining a feedback time interval according to the upper limit of the bandwidth occupied by the network characteristic information as 5%. On this basis, the range of feedback time intervals may be set, for example: the feedback time interval may be set to a fixed value between 150 milliseconds and 250 milliseconds. When transmitting streaming media data, the streaming media data may be divided into a plurality of data packets and transmitted to a receiving device.
The retransmission rate is the proportion of the data packets received by the receiving equipment after retransmission to the data packets sent by the sending equipment; the packet loss rate is the proportion of the lost (the receiving equipment fails to receive) data packets accounting for the data packets sent by the sending equipment when the sending equipment sends streaming media data to the receiving equipment, specifically, the data packets are divided into media packets and FEC packets, the FEC packets contain redundancy codes, the packet loss rate refers to the proportion of the data packets which can not be correctly received by the receiving equipment through means of data packet retransmission, redundancy code transmission and the like, and the packet loss rate is the true occurrence of packet loss, directly influences the data integrity, leads to picture screen display and audio definition reduction; when receiving the data packet sent by the sending device, the receiving device feeds back an acknowledgement message for the data packet to the sending device, and the round trip delay is the time between sending the data packet by the sending device and receiving the acknowledgement message for the data packet.
In practice, the real-time packet loss rate, retransmission rate and round trip delay can be calculated according to a preset unit time.
Step 302, calculating the expected transmission times for the streaming media data based on the round trip delay and a preset delay upper limit value;
The preset delay upper limit value may refer to failure of the receiving device to receive any data packet until the receiving device receives the data packet accurately.
The expected number of transmissions by the sending device to the receiving device of a single packet may be calculated based on the upper delay value and the round trip delay. The expected transmission times are allowed transmission times under the condition of not affecting the user experience of the receiving equipment under the current time delay upper limit value and round trip time delay.
Step 303, obtaining an evaluation threshold value matched with the expected transmission times;
the evaluation thresholds corresponding to the plurality of different expected transmission times may be predetermined and stored, and when the current expected transmission times are obtained in step 302, one matching the current expected transmission times is determined from the stored evaluation thresholds.
In a specific example, a preset list may be stored in the transmitting device, where the preset list records different evaluation thresholds and the number of transmissions corresponding to each evaluation threshold. An evaluation threshold value matching the calculated expected number of transmissions may be obtained from a preset list.
And step 304, detecting whether the transmission link is in a congestion state according to the difference between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold value.
And calculating the sum of the real-time packet loss rate and the retransmission rate to obtain a sum value of the real-time packet loss rate and the retransmission rate, and determining whether the transmission link is in a congestion state or not based on the magnitude relation between the sum value and the evaluation threshold value for the magnitude of the sum value and the evaluation threshold value.
Since the evaluation threshold is matched with the expected number of transmissions, when the sum of the real-time packet loss rate and the retransmission rate is less than or equal to the evaluation threshold, it is reflected that the transmitting device can successfully transmit a certain streaming media data packet to the receiving device at no more than the expected number of transmissions when the streaming media data packet is transmitted at the current real-time packet loss rate and retransmission rate, and the receiving device successfully receives the streaming media data (i.e., the transmitting device can successfully transmit a certain data packet to the receiving device at no more than the expected number of transmissions matched with the evaluation threshold), so that it can be determined that the transmission link is not in a congestion state. Otherwise, when the sum of the real-time packet loss rate and the retransmission rate is greater than the evaluation threshold, it is reflected that the sending device is capable of transmitting the streaming media data packet under the current condition of the real-time packet loss rate and the retransmission rate, failing to successfully transmit the streaming media data packet to the receiving device at no more than the expected transmission times, and the receiving device is capable of successfully receiving the streaming media data (i.e. the sending device is incapable of successfully transmitting the data packet to the receiving device at the time of transmitting the data packet at the expected transmission times which are no more than the evaluation threshold, so that the transmission link is in a congestion state, and therefore, whether the transmission link is in the congestion state or not can be detected based on the magnitude relation between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold after the evaluation threshold which is matched with the expected transmission times is obtained.
In the embodiment of the application, when streaming media data is sent to receiving equipment, network characteristic information including real-time packet loss rate, retransmission rate and round trip delay is fed back by the receiving equipment; calculating expected transmission times for streaming media data based on the round trip delay and a preset delay upper limit value; acquiring an evaluation threshold matched with the expected transmission times; according to the difference between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold value, whether the transmission link is in a congestion state or not is detected, so that the receiving device can judge whether the transmission link with the receiving device is in the congestion state or not by combining the multi-dimensions of the real-time packet loss rate, the retransmission rate, the round trip delay and the like, and the accuracy of judging the congestion state of the transmission link is improved.
Referring to fig. 4, a flow chart of a congestion detection method of the present invention is shown; the embodiment of the invention is applied to the transmitting equipment, and a transmission link is established between the transmitting equipment and the receiving equipment.
The embodiment of the invention specifically comprises the following steps:
step 401, when streaming media data is sent to the receiving device, obtaining network characteristic information fed back by the receiving device; the network characteristic information comprises a real-time packet loss rate, a retransmission rate and round trip delay;
In an alternative embodiment of the present application, step 401 specifically includes: acquiring network characteristic information fed back by the receiving equipment according to a specified time interval; the specified time interval is greater than 100 milliseconds and less than 300 milliseconds.
In practical applications, the receiving device defaults to feedback the network characteristic information including the real-time packet loss rate and the retransmission rate, and the actual interval is too small (for example, less than 50 milliseconds), so that the fluctuation of the real-time packet loss rate and the retransmission rate is too large, and the data distortion is caused. Based on the above formula (2) this leads to frequent misinterpretations as network congestion. The sensitivity drop occurs when the interval between the feedback of the network characteristic information by the receiving device is too large. 100-300 milliseconds are taken as a designated time interval, and the receiving equipment feeds back in advance when judging that obvious fluctuation occurs in the network, so that better balance is obtained in sensitivity and accuracy.
Step 402, calculating the expected transmission times for the streaming media data based on the round trip delay and a preset delay upper limit value;
in an alternative embodiment of the present application, step 302 specifically includes: and calculating a double value of a quotient of a preset delay upper limit value and the round trip delay as expected transmission times.
Assuming that when the transmitting device transmits data to the receiving device, the real-time packet loss rate (lost) and the real-time retransmission rate (nack) of each time are both 0.2, the total packet loss rate of a single data packet after several retransmissions is 0.002, and the relationship (formula 1) between the number n of times of transmitting the data packet and the initial packet loss rate and the retransmission rate of each time are both 0.2 can be obtained as follows:
0.2 n ≤0.002
According to n=3.86 obtained in the formula 1, that is, 4 transmissions (1 primary transmission and 3 retransmissions) are needed, the total packet loss rate can be reduced to below 0.2%.
Equation 2 can be derived from equation 1:
(nack+lost) n ≤0.002
the judging condition that the sending device and the receiving device are not in the congestion state is determined as that when n is the expected transmission times, the above formula 2 is established, that is, when n is the expected transmission times, the sum of nack and lost has an upper limit value, the transmission link can be judged to be not in the congestion state, and the evaluation threshold values corresponding to different expected transmission times are obtained based on the upper limit value, so that the congestion state of the transmission link can be detected only by comparing the sum of the real-time packet loss rate and the retransmission rate with the evaluation threshold value after the evaluation threshold value corresponding to the expected transmission times is determined.
In practical application, a certain delay generally exists in the network, when the delay is smaller, a user of the receiving device cannot easily perceive the delay condition of the network, and when the delay is larger, the user of the receiving device can easily perceive the delay condition of the network. The delay upper limit value may be set first, and by comparing the real-time delay value of the network with the delay upper limit value, it is determined whether the user of the receiving device perceives the delay condition of the network. Based on the delay upper limit value and the round trip delay, the relationship (formula 3) between the expected transmission times of the data packet and the delay upper limit value and the round trip delay in the time corresponding to the delay upper limit value can be obtained as follows:
n=delay/(RTT/2)
Where n is the expected number of transmissions, delay is the upper limit of the delay, and RTT is the round trip delay.
The preset delay upper limit value is determined by the following method: identifying a current scene type matched with the streaming media data; and reading a preset delay upper limit value matched with the current scene type.
The delay perception of the network by the receiving device may be different in different scenarios, for example: cloud gaming requires a latency of <100 milliseconds and video conferencing requires a session latency of 400-500 milliseconds. The delay upper limit value of the cloud game service is lower, so that the problem of data packet loss can be solved by redundant coded transmission as much as possible. Video call services may typically allow a delay upper limit of about 200 ms, and users may not easily perceive data retransmission within 200 ms.
And setting corresponding delay upper limit values for different scene types in advance, and determining the scene type of the current transmission streaming media data when the congestion state of the network needs to be determined, so as to determine the delay upper limit value corresponding to the type.
Step 403, obtaining an evaluation threshold value matched with the expected transmission times;
in an alternative embodiment of the present application, step 303 includes: reading a preset expected packet loss rate; and determining an evaluation threshold by taking the expected packet loss rate as a base and the inverse of the expected transmission times as an index.
By combining the above-described formula 2 and formula 3, formula 4 for calculating the evaluation threshold value can be obtained as follows:
wherein, C is the expected packet loss rate, and K is the evaluation threshold.
In one example, the expected packet loss rate is 0.002, at which time the threshold is evaluated
Step 404, detecting whether the transmission link is in a congestion state according to the difference between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold;
the step 304 may further include comparing the sum of the real-time packet loss rate and the retransmission rate with the evaluation threshold to determine whether the transmission link is in a congestion state: judging whether the sum of the real-time packet loss rate and the retransmission rate is larger than the evaluation threshold value or not; if the sum of the real-time packet loss rate and the retransmission rate is larger than the evaluation threshold value, determining that the transmission link is in a congestion state; and if the sum of the real-time packet loss rate and the retransmission rate is not greater than the evaluation threshold, determining that the transmission link is in a non-congestion state. In practical application, whether the congestion state is determined by judging whether the relation among the real-time packet loss rate, the retransmission rate and the evaluation threshold value satisfies the formula 5, wherein the formula 5 is as follows:
In practical application, the evaluation threshold calculation may be simplified into table lookup to obtain the allowable upper threshold limit (sum of real-time packet loss rate and retransmission rate) corresponding to different expected transmission times. For example: with 0.5 retransmissions as minimum accuracy, the following upper threshold list (table 1) is calculated according to equation 2, namely: the upper threshold limit corresponding to different transmission times can be obtained, for example: the expected number of transmissions is calculated to be 3 according to (equation 2), corresponding to an upper threshold of 0.126.
TABLE 1
Step 405, obtaining current code rate information corresponding to the streaming media data;
the sending device may send the streaming media data to the receiving device according to a certain code rate, where the current code rate information is a code rate of the streaming media data currently sent by the sending device, that is, a number of data bits transmitted by the sending device to the sending device in a unit time, for example: 1500Kbit/s (kilo bit per second, kilobits per second),
step 406, calculating a difference value between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold value;
calculating the sum value of the real-time packet loss rate and the retransmission rate, and calculating the difference value between the sum value and the evaluation threshold value, wherein if the difference value is larger, the transmission link congestion degree is more serious; the smaller the difference value is, the more bandwidth redundancy is provided for the transmission link, and the streaming media data can be transmitted by adopting a larger code rate.
Step 407, adjusting the current code rate information to target code rate information according to the difference value;
the target code rate information may be determined according to the difference size, for example: a first preset threshold value greater than zero and a second preset threshold value less than zero are set at the transmitting device. When the difference value is larger than a first preset threshold value, the sum value of the real-time packet loss rate and the retransmission rate is larger than an evaluation threshold value, and as the evaluation threshold value is matched with the expected transmission times, the situation that the sending equipment can successfully send the streaming media data packet to the receiving equipment without more than the expected transmission times when the sending equipment can transmit the streaming media data packet under the current real-time packet loss rate and retransmission rate is reflected, the receiving equipment successfully receives the streaming media data, the current transmission link is in a congestion state, and the current code rate information needs to be reduced to obtain target code rate information, so that the packet loss condition of the receiving equipment is reduced; when the difference is smaller than a second preset threshold, that is, when the sum of the real-time packet loss rate and the retransmission rate is smaller than the evaluation threshold, the difference reflects that the sending device can successfully send a certain streaming media data packet to the receiving device without more than the expected transmission times when the streaming media data packet is transmitted under the current real-time packet loss rate and retransmission rate, and the receiving device successfully receives the streaming media data, so that it is determined that the transmission link is not in a congestion state, and the current code rate information is gradually increased to obtain target code rate information, thereby fully utilizing bandwidth resources in the transmission link. When the difference is not greater than the first preset threshold value and not less than the second preset threshold value, the current code rate information is not adjusted; wherein the first preset is greater than the second preset threshold.
It should be noted that, because the bandwidth of the transmission link may have a fluctuation condition, the first preset threshold and the second preset threshold are set to be non-zero numbers, so as to prevent frequent adjustment of the current code rate information, and cause continuous jump (for example, continuous change of definition of the streaming media video) when the receiving device outputs the streaming media data.
In an alternative embodiment of the invention, the receiving device is provided with a data table; the data table records a plurality of grades, and the upper threshold value limit and the transmission times corresponding to each grade; the data table shown in table 2 may be constructed based on the correspondence between the plurality of levels and the threshold upper limit and the number of transmissions obtained by dividing the plurality of levels for each threshold upper limit in table 1. When it is determined that the current code rate information needs to be reduced, the reduced target code rate information is calculated in combination with table 2, and table 2 is as follows:
TABLE 2
The step of reducing the current code rate information to obtain target code rate information comprises the following steps: determining a first grade G1 corresponding to the expected transmission times based on the data table; determining a second grade G2 corresponding to the sum of the real-time packet loss rate and the retransmission rate based on the data table; the second grade is the highest grade with the upper threshold value smaller than the sum of the real-time packet loss rate and the retransmission rate; according to the preset descending step alpha, the first grade G1, the second grade G2 and the current code rate information A, calculating the reduced target code rate information A down The method comprises the steps of carrying out a first treatment on the surface of the Wherein,(equation 6), α is a positive number less than 1.
Such as: when the sending device determines that the current code rate information needs to be reduced, according to the Round Trip Time (RTT) value 50 and the preset delay upper limit value of 200 ms, the calculated expected transmission times are 200/(50/2) =8 times, and the corresponding first grade G1 is 13 through table 2. The sum of the real-time packet loss rate and the retransmission rate currently received by the sending device is 0.5, and the second grade G2 corresponding to the sum of the real-time packet loss rate and the retransmission rate is 15 obtained from table 2. The second gear G2 is two gears higher than the first gear G1. Calculating target code rate information according to the formula (6), wherein the target code rate information after reduction is A x alpha (15-13) I.e. A.alpha. 2 . If α=0.9, the target code rate information after the decrease is 0.81A.
In an optional embodiment of the present invention, the step of raising the current code rate information to obtain target code rate information includes: according to the preset rising step beta and the current code rate information A, calculating the raised target code rate information A up The method comprises the steps of carrying out a first treatment on the surface of the Wherein A is up β (formula 8), β being a positive number less than 1A number.
The step up step may be preset into the transmitting device. In practical application, the rising step length is set to be 5% -10%, and a steep descent and slow rising strategy is adopted, so that the congestion network caused by rising blocks is avoided.
In a specific application, when the round trip delay fluctuation is large, it indicates that the transmission link is also in an unstable state, and at this time, if the current code rate information is directly raised, it may cause the receiving device to receive the streaming media data packet more unstable, so that the condition of raising the current code rate information not only needs to satisfy the formula (5), but also stores several RTT values of the last few seconds in a pre-constructed queue, and calculates the average valueAnd a standard deviation d of the sum of the values,
wherein RTT i For the values of different RTTs in the queue, standard deviation d is used to evaluate the transmission stability.
Wherein, a constant f (30-50 ms) is introduced in the formula (7) to avoid that the calculated average value of RTT is small when RTT is small.
After determining that the current network characteristic information satisfies the above formula (5) and formula (7), the transmitting apparatus increases the current code rate information according to the following formula (8).
And step 408, the streaming media data is sent to the receiving equipment according to the target code rate information.
And sending the streaming media data to receiving equipment according to the adjusted target code rate information, so that the code rate of the streaming media data is adapted to the current network congestion condition.
In an optional embodiment of the present application, the network characteristic information further includes expected code rate information; prior to step 408, the method further comprises: judging whether the expected code rate information is smaller than the target code rate information or not; if the expected code rate information is smaller than the target code rate information, sending the streaming media data to the receiving equipment according to the expected code rate information; if the expected code rate information is not less than the target code rate information, step 408 is performed.
The expected code rate information is the code rate required by the receiving device. The expected information of the receiving device is different in different scenarios, for example: the expected rate information for a video conference is higher than for a voice conference. In order to avoid bandwidth resource waste, if the expected code rate information is smaller than the target code rate information, the sending device sends stream media data to the receiving device according to the expected code rate information; if the expected code rate information is not less than the target code rate information, the code rate information indicating that the sending device is transmitting the streaming media data currently is less than the code rate required by the receiving device in the current scene, step 308 is executed to increase the code rate of the streaming media data output by the sending device.
Specifically, the expected code rate in a 720P resolution 25 frame video conferencing scenario as described above is 2Mbit/S. If the target code rate information obtained according to the embodiment of the invention is 3Mbit/S, the sending device transmits the streaming media data to the receiving device according to the 2Mbit/S code rate information in order to avoid the waste of bandwidth resources because the expected code rate information is smaller than the target code rate information. If the target code rate information obtained according to the embodiment of the invention is 1Mbit/S, the expected code rate information is not smaller than the target code rate information, and the code rate information indicating that the sending device currently transmits the streaming media data is smaller than the code rate required by the receiving device in the current scene but the target code rate information which can be achieved currently is 1Mbit/S, the sending device transmits the streaming media data to the receiving device according to the 1Mbit/S code rate information.
In the embodiment of the invention, when streaming media data is sent to receiving equipment, network characteristic information including real-time packet loss rate, retransmission rate and round trip delay is fed back by the receiving equipment; calculating expected transmission times for streaming media data based on the round trip delay and a preset delay upper limit value; acquiring an evaluation threshold matched with the expected transmission times; and calculating the difference value between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold value, and detecting whether the transmission link is in a congestion state based on the difference value, so that the receiving equipment can judge whether the transmission link with the receiving equipment is in the congestion state by combining the multi-dimensionalities of the real-time packet loss rate, the retransmission rate, the round trip delay and the like, and the accuracy of judging the congestion state of the transmission link is improved. Meanwhile, when the transmission link is in a congestion state, the target code rate information can be calculated by combining the real-time packet loss rate, the retransmission rate, the round trip delay, the preset descending step length and the current code rate information; when the transmission link is in a non-congestion state, the target code rate information can be calculated according to the preset ascending step length and the current code rate information, so that the target code rate information which needs to be reduced or the ascending code rate information is determined on the basis of the current code rate information, and the dynamic adjustment of the code rate information of the transmission streaming media data of the sending equipment is realized. Furthermore, according to the target code rate information obtained by reducing the current code rate information, the blocking condition of the receiving device can be reduced, or according to the target code rate information obtained by increasing the current code rate information, the quality (such as video image quality, voice definition and the like) of the stream media data displayed by the receiving device can be improved.
As a practical application, can set up receiving equipment in city A, set up transmitting equipment in city B, constantly improve real-time packet loss rate through the transmission front end, monitor two kinds of audio and video quality boundaries that the real-time packet loss rate risees and lead to:
boundary 1: the audio and video quality starts to slightly decline or the definition fluctuates, and the audio and video quality can be recovered to be normal after lasting for a few minutes; boundary 2: after the audio and video are obviously reduced, the picture is blurred, and the bandwidth and the picture quality cannot be recovered to be normal.
Example (1) public network RTT was 25 milliseconds, and the test results were as follows:
by adopting the code rate information adjusting mode provided by the embodiment of the invention, when the real-time packet loss rate is increased to 20%, the bandwidth and definition start fluctuation corresponds to the boundary 1, and the real-time packet loss rate is increased to 28% picture blurring corresponds to the boundary 2.
By adopting the code rate information adjusting mode (shown in fig. 1) provided by the prior art, the definition is reduced when the real-time packet loss rate is increased to 5%, the definition corresponds to the boundary 1, and the picture blurring is increased to 8%, the real-time packet loss rate corresponds to the boundary 2.
Example (2) the public network RTT was 36 milliseconds, and the test results were as follows:
by adopting the code rate information adjusting mode provided by the embodiment of the invention, when the real-time packet loss rate is increased to 15%, the bandwidth and definition start fluctuation corresponds to the boundary 1, and the real-time packet loss rate is increased to 20% and the picture blurring corresponds to the boundary 2.
By adopting the code rate information adjusting mode provided by the prior art, the definition of the real-time packet loss rate is reduced to be corresponding to the boundary 1 when the real-time packet loss rate is increased to 3%, and the picture blurring of the real-time packet loss rate is increased to be 7% to be corresponding to the boundary 2.
From the above, when the sending device determines that the sending device sends the streaming media data according to the code rate information adjustment method provided by the embodiment of the present invention, the sending device will trigger when the real-time packet loss rate is higher. In practical applications, the real-time packet loss rate is often dynamically changed, for example: in a certain scene, the change range of the real-time packet loss rate is 1% -10%, and as can be seen from the above examples (1) and (2), taking the case that the audio/video quality corresponding to the boundary 1 starts to slightly decrease as an example: if the code rate information is adjusted by adopting the mode of the embodiment of the invention, the sending equipment does not need to be adjusted or only needs to be adjusted with small change, so that the receiving equipment cannot trigger the audio and video quality to start to slightly decrease or the definition to have fluctuation. Under the same variation range, if the code rate information is adjusted according to the prior art, the receiving device cannot trigger the audio and video quality to start to slightly decrease when the real-time packet loss rate is 1% -3% (excluding 3%), and the receiving device can cause the audio and video quality to start to slightly decrease when the real-time packet loss rate is 3% -10% because the sending device adjusts the code rate information. Specifically, when the real-time packet loss rate obtained at different moments is 1%, 4%, 3%, 2% and 5%, if the receiving device does not trigger the condition that the audio and video quality starts to slightly decrease according to the code rate adjusting method in the embodiment of the invention, and if the code rate information is adjusted by adopting the prior art, when the code rate information is changed from 1% to 4% and from 2% to 5%, the receiving device triggers the condition that the audio and video quality starts to slightly decrease. The condition that the audio and video quality of the receiving equipment starts to slightly decline is that the sending equipment obviously reduces the expression of the code rate information, so that the code rate information adjusting mode provided by the embodiment of the invention is more stable compared with the prior art, and frequent fluctuation of the code rate information received by the receiving equipment is avoided.
As a specific application, in a scene that 300-bit vermicelli is simultaneously connected in real time and displayed by adopting a screen, data such as round trip delay, real-time packet loss rate, retransmission rate and the like collected by an audio and video stream transmitting end (equivalent to the transmitting device) and a receiving end (equivalent to the receiving device) are transmitted to a big data background, then, whether a terminal network link of the vermicelli is congested can be judged by comparing the sum of the real-time packet loss rate and the retransmission rate with an evaluation threshold value calculated based on the round trip delay, and one of clear good, medium and bad signals can be given to the terminal, so that a traffic light composed of three colors such as red (representing the difference signal), yellow (representing the medium signal), green (representing the good signal) and the like is formed, and the traffic light is displayed on a scene connecting screen of hundreds of people, whether network congestion of each candidate vermicelli is presented to a scene guest and a worker in real time, whether network access quality of each candidate vermicelli can meet real-time interaction is judged, and a video coding qp (Quantization Parameter, quantization parameter value H8/VP 9/VP (quantization parameter) collected by the transmitting end of the user) is combined, and a quantization parameter such as VP (video coding algorithm is defined, and a definition is determined for a VP (video coding algorithm); in H264 coding, if qp value is smaller than 28 and quality is considered normal, if qp value is larger than 34 and quality is considered poor), it can be determined whether the picture of the user is clear.
Referring to fig. 5, there is shown a block diagram of an embodiment of a congestion detection apparatus in an embodiment of the present invention, applied to a transmitting device, between which a transmission link is established, the apparatus including:
a feature information obtaining module 501, configured to obtain network feature information fed back by the receiving device when sending streaming media data to the receiving device; the network characteristic information comprises a real-time packet loss rate, a retransmission rate and round trip delay;
an expected transmission number determining module 502, configured to calculate an expected transmission number for the streaming media data based on the round trip delay and a preset delay upper limit value;
an evaluation threshold obtaining module 503, configured to obtain an evaluation threshold that matches the expected number of transmissions;
a congestion status determining module 504, configured to determine a congestion status of the transmission link according to a difference between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold.
In an alternative embodiment of the present invention, the expected number of transmissions determining module 502 is configured to calculate a double value of a quotient of a preset delay upper limit value and the round trip delay as the expected number of transmissions.
In an alternative embodiment of the present invention, the preset delay upper limit value is determined by the following module:
The scene type identification module is used for identifying the current scene type matched with the streaming media data;
and the delay upper limit value determining module is used for reading a preset delay upper limit value matched with the current scene type.
In an alternative embodiment of the present invention, the evaluation threshold acquisition module 503 includes:
the expected packet loss rate obtaining sub-module is used for reading a preset expected packet loss rate;
and the evaluation threshold determining submodule is used for determining an evaluation threshold by taking the expected packet loss rate as a base number and the inverse of the expected transmission times as an index.
In an alternative embodiment of the present invention, the feature information acquisition module 501 includes:
the timing sub-module is used for acquiring the network characteristic information fed back by the receiving equipment according to a specified time interval; the specified time interval is greater than 100 milliseconds and less than 300 milliseconds.
In an alternative embodiment of the invention, the apparatus further comprises:
the current code rate information acquisition module is used for acquiring current code rate information corresponding to the streaming media data;
the difference value calculation module is used for calculating the difference value between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold value;
The target code rate information adjusting module is used for adjusting the current code rate information into target code rate information according to the difference value;
and the sending module is used for sending the streaming media data to the receiving equipment according to the target code rate information.
In an optional embodiment of the present invention, the target code rate information adjustment module includes:
the code rate reducing sub-module is used for reducing the current code rate information to obtain target code rate information when the difference value is larger than a first preset threshold value;
the code rate raising sub-module is used for raising the current code rate information to obtain target code rate information when the difference value is smaller than a second preset threshold value;
the code rate maintaining sub-module is used for not adjusting the current code rate information when the difference value is not larger than a first preset threshold value and not smaller than a second preset threshold value;
wherein the first preset is greater than the second preset threshold.
In an alternative embodiment of the invention, the receiving device is provided with a data table; the data table records a plurality of grades, and the upper threshold value limit and the transmission times corresponding to each grade; the code rate reducing submodule comprises:
a first grade determining unit, configured to determine a first grade G1 corresponding to the expected transmission times based on the data table;
A second grade determining unit, configured to determine a second grade G2 corresponding to a sum of the real-time packet loss rate and the retransmission rate based on the data table; the second grade is the highest grade with the upper threshold value smaller than the sum of the real-time packet loss rate and the retransmission rate;
a code rate reducing unit for reducing the code rate according to a preset step-down lengthAlpha, the first grade G1, the second grade G2 and the current code rate information A, and calculating the reduced target code rate information A down ;
Wherein,alpha is a positive number less than 1.
In an optional embodiment of the present invention, the rising code rate sub-module is configured to calculate rising target code rate information a according to a preset rising step β and the current code rate information a up ;
Wherein A is up =a×β, β being a positive number smaller than 1.
In an alternative embodiment of the present invention, the network characteristic information further includes expected code rate information; the apparatus further comprises:
the code rate information judging module is used for judging whether the expected code rate information is smaller than the target code rate information; if yes, the streaming media data is sent to the receiving equipment according to the expected code rate information; and if not, executing the step of sending the streaming media data to the receiving equipment according to the target code rate information.
In an alternative embodiment of the present invention, the congestion status determination module 504 is configured to determine whether the sum of the real-time packet loss rate and the retransmission rate is greater than the evaluation threshold; if the sum of the real-time packet loss rate and the retransmission rate is larger than the evaluation threshold value, determining that the transmission link is in a congestion state; and if the sum of the real-time packet loss rate and the retransmission rate is not greater than the evaluation threshold, determining that the transmission link is in a non-congestion state.
Referring to fig. 6, a block diagram of an embodiment of a streaming media transmission system in accordance with an embodiment of the present invention is shown; the streaming media transmission system comprises a sending device 601 and a receiving device 602 of streaming media data, wherein a transmission link is established between the sending device 601 and the receiving device 602;
the receiving device 602 is configured to generate network feature information corresponding to the streaming media data when receiving the streaming media data sent by the sending device;
the sending device 601 is configured to obtain network characteristic information fed back by the receiving device when sending streaming media data to the receiving device; the network characteristic information comprises a real-time packet loss rate, a retransmission rate and round trip delay; calculating the expected transmission times for the streaming media data based on the round trip delay and a preset delay upper limit value; acquiring an evaluation threshold matched with the expected transmission times; and determining the congestion state of the transmission link according to the difference between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold.
The embodiment of the invention also provides an electronic device, as shown in fig. 7, which comprises a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702 and the memory 703 complete communication with each other through the communication bus 704, the electronic device is located in a transmitting device, a transmission link is established between the transmitting device and a receiving device,
a memory 703 for storing a computer program;
the processor 701 is configured to execute the program stored in the memory 703, and implement the following steps:
when streaming media data is sent to the receiving equipment, acquiring network characteristic information fed back by the receiving equipment; the network characteristic information comprises a real-time packet loss rate, a retransmission rate and round trip delay;
calculating the expected transmission times for the streaming media data based on the round trip delay and a preset delay upper limit value;
acquiring an evaluation threshold matched with the expected transmission times;
and determining the congestion state of the transmission link according to the difference between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, in which instructions are stored, which when run on a computer, cause the computer to perform the congestion detection method according to any of the above embodiments.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the congestion detection method according to any of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims (15)
1. A congestion detection method applied to a transmitting device, a transmission link being established between the transmitting device and a receiving device, the method comprising:
when streaming media data is sent to the receiving equipment, acquiring network characteristic information fed back by the receiving equipment; the network characteristic information comprises a real-time packet loss rate, a retransmission rate and round trip delay;
calculating the expected transmission times for the streaming media data based on the round trip delay and a preset delay upper limit value;
acquiring an evaluation threshold matched with the expected transmission times;
and detecting whether the transmission link is in a congestion state according to the difference between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold value.
2. The method of claim 1, wherein the step of calculating the expected number of transmissions for the streaming media data based on the round trip delay and a preset delay upper limit comprises:
And calculating a double value of a quotient of a preset delay upper limit value and the round trip delay as expected transmission times.
3. The method according to claim 2, wherein the preset delay upper limit value is determined by:
identifying a current scene type matched with the streaming media data;
and reading a preset delay upper limit value matched with the current scene type.
4. A method according to claim 2 or 3, wherein the step of obtaining an evaluation threshold matching the expected number of transmissions comprises:
reading a preset expected packet loss rate;
and determining an evaluation threshold by taking the expected packet loss rate as a base and the inverse of the expected transmission times as an index.
5. A method according to any of claims 1-3, wherein the step of obtaining network characteristic information fed back by the receiving device comprises:
acquiring network characteristic information fed back by the receiving equipment according to a specified time interval; the specified time interval is greater than 100 milliseconds and less than 300 milliseconds.
6. A method according to any one of claims 1-3, wherein the method further comprises:
acquiring current code rate information corresponding to the streaming media data;
Calculating a difference between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold;
adjusting the current code rate information into target code rate information according to the difference value;
and sending the streaming media data to the receiving equipment according to the target code rate information.
7. The method of claim 6, wherein the step of adjusting the current code rate information to target code rate information according to the difference value comprises:
when the difference value is larger than a first preset threshold value, the current code rate information is reduced to obtain target code rate information;
when the difference value is smaller than a second preset threshold value, the current code rate information is raised to obtain target code rate information;
when the difference value is not greater than a first preset threshold value and not less than a second preset threshold value, the current code rate information is not adjusted;
wherein the first preset is greater than the second preset threshold.
8. The method according to claim 7, wherein the receiving device is provided with a data table; the data table records a plurality of grades, and the upper threshold value limit and the transmission times corresponding to each grade; the step of reducing the current code rate information to obtain target code rate information comprises the following steps:
Determining a first grade G1 corresponding to the expected transmission times based on the data table;
determining a second grade G2 corresponding to the sum of the real-time packet loss rate and the retransmission rate based on the data table; the second grade is the highest grade with the upper threshold value smaller than the sum of the real-time packet loss rate and the retransmission rate;
calculating the reduced target code rate information A according to the preset descending step alpha, the first grade G1, the second grade G2 and the current code rate information A down ;
Wherein,alpha is a positive number less than 1.
9. The method of claim 8, wherein the step of raising the current code rate information to obtain target code rate information comprises:
calculating the raised target code rate information A according to the preset rising step beta and the current code rate information A up ;
Wherein A is up =a×β, β being a positive number smaller than 1.
10. The method of claim 6, wherein the network characteristic information further comprises expected code rate information; before the streaming media data is sent to the receiving device according to the target code rate information, the method further includes:
judging whether the expected code rate information is smaller than the target code rate information or not;
If yes, the streaming media data is sent to the receiving equipment according to the expected code rate information;
and if not, executing the step of sending the streaming media data to the receiving equipment according to the target code rate information.
11. A method according to claim 1, 2 or 3, wherein the step of detecting whether the transmission link is in a congested state based on a difference between a sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold value comprises:
judging whether the sum of the real-time packet loss rate and the retransmission rate is larger than the evaluation threshold value or not;
if the sum of the real-time packet loss rate and the retransmission rate is larger than the evaluation threshold value, determining that the transmission link is in a congestion state;
and if the sum of the real-time packet loss rate and the retransmission rate is not greater than the evaluation threshold, determining that the transmission link is in a non-congestion state.
12. A congestion detection apparatus applied to a transmitting device, a transmission link being established between the transmitting device and a receiving device, the apparatus comprising:
the characteristic information acquisition module is used for acquiring network characteristic information fed back by the receiving equipment when streaming media data is sent to the receiving equipment; the network characteristic information comprises a real-time packet loss rate, a retransmission rate and round trip delay;
The expected transmission times determining module is used for calculating the expected transmission times of the streaming media data based on the round trip delay and a preset delay upper limit value;
an evaluation threshold acquisition module, configured to acquire an evaluation threshold that matches the expected number of transmissions;
and the congestion state determining module is used for determining the congestion state of the transmission link according to the difference between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold value.
13. The stream media transmission system is characterized by comprising a sending device and a receiving device of stream media data, wherein a transmission link is established between the sending device and the receiving device;
the receiving equipment is used for generating network characteristic information corresponding to the streaming media data when receiving the streaming media data sent by the sending equipment;
the sending equipment is used for acquiring network characteristic information fed back by the receiving equipment when sending streaming media data to the receiving equipment; the network characteristic information comprises a real-time packet loss rate, a retransmission rate and round trip delay; calculating the expected transmission times for the streaming media data based on the round trip delay and a preset delay upper limit value; acquiring an evaluation threshold matched with the expected transmission times; and determining the congestion state of the transmission link according to the difference between the sum of the real-time packet loss rate and the retransmission rate and the evaluation threshold.
14. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the congestion detection method according to any of claims 1-11 when executing a program stored on a memory.
15. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when executed by a processor, implements the congestion detection method according to any of claims 1-11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210908240.6A CN115378832B (en) | 2022-07-29 | 2022-07-29 | Congestion detection method and device, stream media transmission system, electronic equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210908240.6A CN115378832B (en) | 2022-07-29 | 2022-07-29 | Congestion detection method and device, stream media transmission system, electronic equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115378832A CN115378832A (en) | 2022-11-22 |
CN115378832B true CN115378832B (en) | 2024-03-26 |
Family
ID=84063254
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210908240.6A Active CN115378832B (en) | 2022-07-29 | 2022-07-29 | Congestion detection method and device, stream media transmission system, electronic equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115378832B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116546191B (en) * | 2023-07-05 | 2023-09-29 | 杭州海康威视数字技术股份有限公司 | Video link quality detection method, device and equipment |
Citations (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6904015B1 (en) * | 2000-09-01 | 2005-06-07 | Force10 Networks, Inc. | Congestion avoidance profiles in a packet switching system |
JP2007150859A (en) * | 2005-11-29 | 2007-06-14 | Sharp Corp | Receiver, transmitter, communication system, control program of receiver and recording medium having control program of receiver recorded thereon |
CN102394858A (en) * | 2011-06-30 | 2012-03-28 | 北京邮电大学 | Method and device for transmitting information |
CN102664717A (en) * | 2012-04-25 | 2012-09-12 | 北京中科晶上科技有限公司 | Packet loss processing method in automatic repeat request (ARQ) feedback communication systems |
CN102843257A (en) * | 2012-08-15 | 2012-12-26 | 无锡北邮感知技术产业研究院有限公司 | Path estimating method and device |
CN104270724A (en) * | 2014-09-19 | 2015-01-07 | 杭州华三通信技术有限公司 | Method and device for adjusting multicast physical sending rate |
CN106255149A (en) * | 2016-08-10 | 2016-12-21 | 广州市百果园网络科技有限公司 | A kind of media data transmission method and device |
CN106713161A (en) * | 2015-11-13 | 2017-05-24 | 中国移动通信集团公司 | Method for transmitting network outlet congestion state, network outlet selection method, and router |
FR3059185A1 (en) * | 2016-11-24 | 2018-05-25 | Belledonne Communications | CONGESTION DETECTION METHOD AND CIRCUIT |
CN108540395A (en) * | 2018-04-18 | 2018-09-14 | 清华大学 | Without the congestion judgment method lost in network |
CN109167734A (en) * | 2018-08-06 | 2019-01-08 | 华为技术有限公司 | The method and apparatus for identifying transmission control protocol state |
CN109688064A (en) * | 2018-12-19 | 2019-04-26 | 北京达佳互联信息技术有限公司 | Data transmission method, device, electronic equipment and storage medium |
WO2019080022A1 (en) * | 2017-10-26 | 2019-05-02 | 天彩电子(深圳)有限公司 | Method and device for network video stream transmission congestion control |
CN110417669A (en) * | 2018-07-09 | 2019-11-05 | 腾讯科技(深圳)有限公司 | Data packet retransmission control, network congestion detection method and device |
WO2020143180A1 (en) * | 2019-01-11 | 2020-07-16 | 深圳市网心科技有限公司 | Network congestion detection-based intelligent speed limiting method and apparatus, and storage medium |
CN113111127A (en) * | 2021-04-15 | 2021-07-13 | 深圳市腾讯网络信息技术有限公司 | Data storage method and device, electronic equipment and readable medium |
CN113364698A (en) * | 2021-06-08 | 2021-09-07 | 北京汇钧科技有限公司 | Bandwidth estimation method, system, electronic device and storage medium |
CN113595830A (en) * | 2021-07-30 | 2021-11-02 | 百果园技术(新加坡)有限公司 | Method, device, equipment and storage medium for detecting network packet loss state |
CN113783775A (en) * | 2021-03-09 | 2021-12-10 | 北京京东尚科信息技术有限公司 | Data transmission method and device |
WO2022111724A1 (en) * | 2020-11-30 | 2022-06-02 | 苏州盛科通信股份有限公司 | Network congestion detection method and apparatus |
CN114666831A (en) * | 2022-03-25 | 2022-06-24 | 南通先进通信技术研究院有限公司 | Packet transmission method and system based on stream coding and bandwidth estimation driving |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011122999A1 (en) * | 2010-03-30 | 2011-10-06 | Telefonaktiebolaget L M Ericsson (Publ) | A method of congestion detection in a cellular radio system |
KR102102254B1 (en) * | 2014-01-15 | 2020-04-20 | 삼성전자주식회사 | Apparatus and method for congestion detection of wireless network in a communication system |
US11234159B2 (en) * | 2019-10-04 | 2022-01-25 | Verizon Patent And Licensing Inc. | Systems and methods for congestion control on mobile edge networks |
-
2022
- 2022-07-29 CN CN202210908240.6A patent/CN115378832B/en active Active
Patent Citations (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6904015B1 (en) * | 2000-09-01 | 2005-06-07 | Force10 Networks, Inc. | Congestion avoidance profiles in a packet switching system |
JP2007150859A (en) * | 2005-11-29 | 2007-06-14 | Sharp Corp | Receiver, transmitter, communication system, control program of receiver and recording medium having control program of receiver recorded thereon |
CN102394858A (en) * | 2011-06-30 | 2012-03-28 | 北京邮电大学 | Method and device for transmitting information |
CN102664717A (en) * | 2012-04-25 | 2012-09-12 | 北京中科晶上科技有限公司 | Packet loss processing method in automatic repeat request (ARQ) feedback communication systems |
CN102843257A (en) * | 2012-08-15 | 2012-12-26 | 无锡北邮感知技术产业研究院有限公司 | Path estimating method and device |
CN104270724A (en) * | 2014-09-19 | 2015-01-07 | 杭州华三通信技术有限公司 | Method and device for adjusting multicast physical sending rate |
CN106713161A (en) * | 2015-11-13 | 2017-05-24 | 中国移动通信集团公司 | Method for transmitting network outlet congestion state, network outlet selection method, and router |
CN106255149A (en) * | 2016-08-10 | 2016-12-21 | 广州市百果园网络科技有限公司 | A kind of media data transmission method and device |
FR3059185A1 (en) * | 2016-11-24 | 2018-05-25 | Belledonne Communications | CONGESTION DETECTION METHOD AND CIRCUIT |
WO2019080022A1 (en) * | 2017-10-26 | 2019-05-02 | 天彩电子(深圳)有限公司 | Method and device for network video stream transmission congestion control |
CN108540395A (en) * | 2018-04-18 | 2018-09-14 | 清华大学 | Without the congestion judgment method lost in network |
CN110417669A (en) * | 2018-07-09 | 2019-11-05 | 腾讯科技(深圳)有限公司 | Data packet retransmission control, network congestion detection method and device |
CN109167734A (en) * | 2018-08-06 | 2019-01-08 | 华为技术有限公司 | The method and apparatus for identifying transmission control protocol state |
CN109688064A (en) * | 2018-12-19 | 2019-04-26 | 北京达佳互联信息技术有限公司 | Data transmission method, device, electronic equipment and storage medium |
WO2020143180A1 (en) * | 2019-01-11 | 2020-07-16 | 深圳市网心科技有限公司 | Network congestion detection-based intelligent speed limiting method and apparatus, and storage medium |
WO2022111724A1 (en) * | 2020-11-30 | 2022-06-02 | 苏州盛科通信股份有限公司 | Network congestion detection method and apparatus |
CN113783775A (en) * | 2021-03-09 | 2021-12-10 | 北京京东尚科信息技术有限公司 | Data transmission method and device |
CN113111127A (en) * | 2021-04-15 | 2021-07-13 | 深圳市腾讯网络信息技术有限公司 | Data storage method and device, electronic equipment and readable medium |
CN113364698A (en) * | 2021-06-08 | 2021-09-07 | 北京汇钧科技有限公司 | Bandwidth estimation method, system, electronic device and storage medium |
CN113595830A (en) * | 2021-07-30 | 2021-11-02 | 百果园技术(新加坡)有限公司 | Method, device, equipment and storage medium for detecting network packet loss state |
CN114666831A (en) * | 2022-03-25 | 2022-06-24 | 南通先进通信技术研究院有限公司 | Packet transmission method and system based on stream coding and bandwidth estimation driving |
Also Published As
Publication number | Publication date |
---|---|
CN115378832A (en) | 2022-11-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10819766B2 (en) | Voice encoding and sending method and apparatus | |
CN111836079B (en) | Video code stream transmission method and device | |
CN106330761B (en) | Congestion control method and device based on queue time delay | |
US20190035383A1 (en) | Artificially generated speech for a communication session | |
US8964115B2 (en) | Transmission capacity probing using adaptive redundancy adjustment | |
US8780960B2 (en) | Adjustment of transmission data rate based on data errors and/or latency | |
US10148598B2 (en) | Efficient packet processing at video receiver in multimedia communications over packet networks | |
US9014028B2 (en) | Identifying and transitioning to an improved VOIP session | |
CN108833930B (en) | Live broadcast data transmission control method and device, live broadcast equipment and storage medium | |
EP2178261B1 (en) | Communication apparatus, communication method for communication apparatsu, and computer-readable medium storing communication control program for communication apparatus | |
US10116715B2 (en) | Adapting encoded bandwidth | |
US8340126B2 (en) | Method and apparatus for congestion control | |
US20170048025A1 (en) | Communication control apparatus, communication control method, and computer-readable non-transitory recording medium | |
CN110996103A (en) | Method for adjusting video coding rate according to network condition | |
CN108401128A (en) | A kind of jamming control method in video calling | |
EP3403379A1 (en) | Real-time transport protocol congestion control techniques in video telephony | |
CN115378832B (en) | Congestion detection method and device, stream media transmission system, electronic equipment and medium | |
CN110191060A (en) | A kind of adjustment data packet sends method, apparatus, equipment and the system of code rate | |
US20180035135A1 (en) | Video encoder | |
US20090113048A1 (en) | Method and program for managing the quantity of data transmitted by a transmission device over a telecommunication network | |
CN113612649B (en) | Round trip estimation | |
CN114866763A (en) | Video quality evaluation method and device, terminal equipment and storage medium | |
KR101384125B1 (en) | Apparatus and method for generating quality of service parameter about mac layer in communication system | |
WO2014087764A1 (en) | Terminal and communication system | |
CN107154913B (en) | IP telephone terminal communication method |
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 |