CN108111531B - Method and device for enhancing video live broadcast quality - Google Patents

Method and device for enhancing video live broadcast quality Download PDF

Info

Publication number
CN108111531B
CN108111531B CN201810001580.4A CN201810001580A CN108111531B CN 108111531 B CN108111531 B CN 108111531B CN 201810001580 A CN201810001580 A CN 201810001580A CN 108111531 B CN108111531 B CN 108111531B
Authority
CN
China
Prior art keywords
packet
supplementing
live broadcast
client
data packet
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
Application number
CN201810001580.4A
Other languages
Chinese (zh)
Other versions
CN108111531A (en
Inventor
王熙强
万里
陈志勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense TransTech Co Ltd
Original Assignee
Hisense TransTech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense TransTech Co Ltd filed Critical Hisense TransTech Co Ltd
Priority to CN201810001580.4A priority Critical patent/CN108111531B/en
Publication of CN108111531A publication Critical patent/CN108111531A/en
Application granted granted Critical
Publication of CN108111531B publication Critical patent/CN108111531B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a method and a device for enhancing video live broadcast quality, wherein the method comprises the steps that a packet supplementing client sends a live broadcast packet supplementing request to a packet supplementing server in a unicast mode when determining that a live broadcast data packet in a delay cache of the packet supplementing client has packet loss, the live broadcast packet supplementing request comprises a serial number of the lost data packet, when an effective supply bandwidth of a live broadcast wireless link is larger than a first threshold value, the delay cache of the packet supplementing client is larger than a second threshold value and smaller than a third threshold value, the supplemented data packet sent by the packet supplementing server is received, the serial number of the supplemented data packet is mapped into a timestamp, and the supplemented data packet is sent to a player according to the timestamp so that the player can play a video in a delayed mode. Because the live broadcast data packet is stored through the delay cache, and the packet supplementing client requests the packet supplementing server to send the data packet additionally, the player can play the video in a delayed mode, the playing quality of the video can be improved, and the fluency is improved.

Description

Method and device for enhancing video live broadcast quality
Technical Field
The embodiment of the invention relates to the technical field of rail transit, in particular to a method and a device for enhancing video live broadcast quality.
Background
The unstable network state refers to a network used for service communication, and has the characteristics of severe bandwidth change, intermittent network, high packet loss rate, severe network delay change and the like. The backbone network usually does not have an unstable network state, and a wireless network is a relatively common unstable network state. Typically a train-ground wireless communication network such as a subway train in a high speed roaming state.
In the state, the fluency of the live video broadcast is reduced, and the success rate and the effect are greatly reduced if no additional processing is performed, for example, mosaic and pause and the like occur in the live video broadcast.
Therefore, a method for enhancing the live video effect is needed to improve the fluency of live video.
Disclosure of Invention
The embodiment of the invention provides a method and a device for enhancing video live broadcast quality, and aims to solve the problems of reasonably planning and using resources and ensuring the fluency of video live broadcast in an unstable network state.
The method for enhancing the video live broadcast quality provided by the embodiment of the invention comprises the following steps:
when determining that a live broadcast data packet in a delay cache of a packet supplementing client has packet loss, the packet supplementing client sends a live broadcast packet supplementing request to a packet supplementing server in a unicast mode, wherein the live broadcast packet supplementing request comprises a serial number of the lost data packet; when the effective supply bandwidth of a live broadcast wireless link is greater than a first threshold value, the delay cache of the packet complementing client is greater than a second threshold value and smaller than a third threshold value;
the packet supplementing client receives a data packet which is sent by the packet supplementing server and is supplemented with the data packet;
the packet supplementing client maps the sequence number of the supplemented data packet into a timestamp;
and the packet supplementing client sends the supplemented data packet to the player according to the timestamp.
Optionally, before determining that the live data packet in the delay buffer of the packet complementing client has packet loss, the packet complementing client further includes:
the repacking client receives a live broadcast data packet sent by a live broadcast source in a multicast mode;
and the packet supplementing client stores the live broadcast data packet in a delay cache of the packet supplementing client.
Optionally, the method further includes:
the packet supplementing client receives a reference clock message periodically sent by a live broadcast source;
the packet supplementing client sends the supplemented data packet to the player according to the timestamp, and the method comprises the following steps:
the packet supplementing client corrects the timestamp according to the reference clock message and the sequence number of the supplemented data packet;
and the reissue client sends the reissued data packet to the player according to the corrected timestamp.
Optionally, the first threshold needs to be in accordance with formula (1), the second threshold needs to be in accordance with formula (2), and the third threshold needs to be in accordance with formula (3);
the formula (1) is:
Figure GDA0002521867450000021
wherein A is1The value is a first threshold value, C is live broadcast data flow, and d is the average packet loss rate of a wireless link;
the formula (2) is:
Figure GDA0002521867450000022
wherein A is2The value is a second threshold value, T is a response time interval of one effective request from the packet supplementing server to the packet supplementing client, C is live broadcast data flow, and d is the average packet loss rate of the wireless link;
the formula (3) is:
Figure GDA0002521867450000023
wherein A is3And C is the third threshold, and the live data traffic.
Correspondingly, the embodiment of the invention also provides a method for enhancing the live video quality, which comprises the following steps:
a pack supplementing server acquires a live broadcast pack supplementing request sent by a pack supplementing client; the live broadcast packet supplementing request comprises a sequence number of a lost data packet;
the packet supplementing server determines a data packet to be supplemented from a delay cache of the packet supplementing server according to the sequence number of the lost data packet;
and the packet supplementing server sends the supplemented data packet to the packet supplementing client.
Optionally, before obtaining the live package supplementing request sent by the package supplementing client, the package supplementing server further includes:
the packet supplementing server receives a live broadcast data packet sent by a live broadcast source in a multicast mode;
and the packet supplementing server stores the live broadcast data packet in a delay cache of the packet supplementing server.
Optionally, before the packet complementing server determines the data packet to be complemented from the delay buffer of the packet complementing server according to the sequence number of the lost data packet, the method further includes:
the packet supplementing server determines whether a live packet supplementing request sent by the same packet supplementing client is received within set time according to the sequence number of the lost data packet;
and if so, the packet supplementing server gives up the live broadcast packet supplementing request.
Optionally, the determining, by the packet complementing server, the data packet to be complemented from the delay buffer of the packet complementing server according to the sequence number of the lost data packet includes:
when the packet supplementing server obtains the live broadcast packet supplementing requests of a plurality of packet supplementing clients, grouping the plurality of packet supplementing clients according to the unstable network where the plurality of packet supplementing clients are located;
the packet supplementing server distributes resources according to groups, and determines a data packet to be supplemented and sent corresponding to the live packet supplementing request according to the live packet supplementing request of the packet supplementing client in each group and a token bucket mechanism;
each group corresponds to one token bucket, and each data packet which is determined to be sent in a complementary manner and corresponds to a live broadcast complementary package request of one complementary package client consumes one token in the token bucket.
Optionally, the method further includes:
and the packet complementing server receives a reference clock message periodically sent by a live broadcast source.
Correspondingly, the embodiment of the invention also provides a device for enhancing the live video quality, which comprises the following steps:
the receiving and sending unit is used for sending a live broadcast packet supplementing request to the packet supplementing server in a unicast mode when determining that a live broadcast packet in a delay cache of the packet supplementing client has packet loss, wherein the live broadcast packet supplementing request comprises a serial number of the lost packet; when the effective supply bandwidth of a live broadcast wireless link is greater than a first threshold value, the delay cache of the packet complementing client is greater than a second threshold value and smaller than a third threshold value; receiving a data packet sent by the packet supplementing server;
the processing unit is used for mapping the sequence number of the reissued data packet into a time stamp;
and the transceiving unit is further used for sending the complemented data packet to a player according to the timestamp.
Optionally, before determining that the live data packet in the delay buffer of the packet complementing client has a packet loss, the processing unit is further configured to:
controlling the receiving and sending unit to receive a live broadcast data packet sent by a live broadcast source in a multicast mode;
and storing the live broadcast data packet in a delay cache of the packet complementing client.
Optionally, the processing unit is further configured to:
controlling the receiving and sending unit to receive a reference clock message periodically sent by a live broadcast source;
when the processing unit sends the reissued data packet to the player according to the timestamp, the processing unit is specifically configured to:
correcting the timestamp according to the reference clock message and the sequence number of the reissued data packet;
and controlling the transceiver unit to send the complementary data packet to the player according to the corrected timestamp.
Optionally, the first threshold needs to be in accordance with formula (1), the second threshold needs to be in accordance with formula (2), and the third threshold needs to be in accordance with formula (3);
the formula (1) is:
Figure GDA0002521867450000041
wherein A is1The value is a first threshold value, C is live broadcast data flow, and d is the average packet loss rate of a wireless link;
the formula (2) is:
Figure GDA0002521867450000042
wherein A is2The value is a second threshold value, T is a response time interval of one effective request from the packet supplementing server to the packet supplementing client, C is live broadcast data flow, and d is the average packet loss rate of the wireless link;
the formula (3) is:
Figure GDA0002521867450000051
wherein A is3And C is the third threshold, and the live data traffic.
Correspondingly, the embodiment of the invention also provides a device for enhancing the live video quality, which comprises the following steps:
the receiving and sending unit is used for acquiring a live broadcast packet supplementing request sent by a packet supplementing client; the live broadcast packet supplementing request comprises a sequence number of a lost data packet;
the processing unit is used for determining a data packet to be sent again from the delay cache of the packet supplementing server according to the sequence number of the lost data packet;
the receiving and sending unit is further configured to send the complementary data packet to the complementary packet client.
Optionally, before obtaining the live package supplementing request sent by the package supplementing client, the processing unit is further configured to:
controlling the receiving and sending unit to receive a live broadcast data packet sent by a live broadcast source in a multicast mode;
and storing the live broadcast data packet in a delay cache of the packet complementing server.
Optionally, before determining the reissued data packet from the delay buffer of the packet complementation server according to the sequence number of the lost data packet, the processing unit is further configured to:
determining whether a live-broadcast packet-supplementing request sent by the same packet-supplementing client is received within set time according to the sequence number of the lost data packet;
and if so, giving up the live broadcast packet supplementing request.
Optionally, when the processing unit determines the reissued data packet from the delay buffer of the packet complementing server according to the sequence number of the lost data packet, the processing unit is specifically configured to:
when acquiring live package supplementing requests of a plurality of package supplementing clients, grouping the plurality of package supplementing clients according to an unstable network where the plurality of package supplementing clients are located;
allocating resources according to groups, and determining a reissued data packet corresponding to a live supplementary packet request according to the live supplementary packet request of a supplementary packet client in each group and a token bucket mechanism;
each group corresponds to one token bucket, and each data packet which is determined to be sent in a complementary manner and corresponds to a live broadcast complementary package request of one complementary package client consumes one token in the token bucket.
Optionally, the processing unit is further configured to:
and controlling the receiving and sending unit to receive the reference clock message periodically sent by the live broadcast source.
Correspondingly, an embodiment of the present invention further provides a computing device, including:
a memory for storing program instructions;
and the processor is used for calling the program instruction stored in the memory and executing the method for enhancing the video live broadcast quality according to the obtained program.
Correspondingly, the embodiment of the invention also provides a computer storage medium, and the computer storage medium stores computer executable instructions, and the computer executable instructions are used for causing a computer to execute the method for enhancing the video live broadcast quality.
The embodiment of the invention shows that when determining that a live broadcast data packet in a delay cache of a packet supplementing client has packet loss, the packet supplementing client sends a live broadcast packet supplementing request to a packet supplementing server in a unicast mode, wherein the live broadcast packet supplementing request comprises a serial number of the lost data packet, when an effective supply bandwidth of a live broadcast wireless link is greater than a first threshold, the delay cache of the packet supplementing client is greater than a second threshold and smaller than a third threshold, receives the supplemented data packet sent by the packet supplementing server, maps the serial number of the supplemented data packet into a timestamp, and sends the supplemented data packet to a player according to the timestamp, so that the player plays a video in a delayed mode. Because the live broadcast data packet is stored through the delay cache, and the packet supplementing client requests the packet supplementing server to send the data packet additionally, the player can play the video in a delayed mode, the playing quality of the video can be improved, and the fluency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a video live broadcasting system according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for enhancing live video quality according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for enhancing video live broadcast quality according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for enhancing video live broadcast quality according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 exemplarily shows a live video system to which the method for enhancing live video quality according to the embodiment of the present invention is applied, where the live video system includes a live source 101, a complementary package server 102, a complementary package client 103 and players 104, where one complementary package client 103 may correspond to one or more players 104.
In the embodiment of the present invention, the live source 101 refers to a device that generates a live data stream in a video live system. The repackaging server 102 and the repackaging client 103 may be software modules, or may be chip devices such as a processor that executes the method for enhancing the live video quality provided by the embodiment of the present invention. The player 104 refers to a device in a video live broadcast system for receiving a live broadcast data stream of a live broadcast source, decoding a live broadcast video, and playing the live broadcast video, and one video live broadcast system generally has a plurality of players 104.
Delay caches with specified duration are arranged in the packet complementing server 102 and the packet complementing client 103, and sequence numbers in the data packets are used as indexes. The buffer is a circular queue, and the maximum buffer size is the maximum possible sequence number, such as a 16-bit sequence number, corresponding to a maximum buffer size of 65536.
In the embodiment of the invention, the delayed live broadcast is a technology for replacing some other characteristics by deliberately increasing the duration of video cache and sacrificing the real-time performance of partial live broadcast. Multicast refers to a technique in which a sender performs intra-group broadcasting to all receivers in one logical group in network transmission. Compared with common on-demand, the technology can save bandwidth of a backbone network, and thus, the technology is more and more widely applied to a video live broadcast system. Packet padding refers to a technique for retransmitting a lost data packet in a network transmission process. The live broadcast source 101 uses multicast as a basic live broadcast method, and only one multicast is used in the system for each live broadcast source 101, so that the bandwidth of a backbone network is saved and the bandwidth is used for supplementing packets. The live broadcast source 101 selects an open Transport layer streaming media Protocol (such as Real-time Transport Protocol (RTP)) with a sequence number capable of forming a timestamp mapping in an open data packet, so as to ensure accuracy of the delayed live broadcast time. The repacking server 102 and the repacking client 103 both obtain live broadcast data packets from the live broadcast source 104 in a multicast mode, and the player 104 does not directly obtain the live broadcast data packets any more. The player 104 plays in a delayed live broadcast mode, and the repackaging client 103 serves as a video cache of the player 104 to provide delayed live broadcast data for the player 104.
Based on the above description, fig. 2 exemplarily shows a flow of a method for enhancing video live broadcast quality according to an embodiment of the present invention, and the flow of enhancing video live broadcast quality is described below in a manner that a repackaging server interacts with a repackaging client.
As shown in fig. 2, the process specifically includes:
step 201, a live broadcast source sends a live broadcast data packet to a repackage client and a repackage server.
In the embodiment of the invention, the live broadcast source does not directly send the live broadcast data packet to the player, but now sends the live broadcast data packet to the repackaging client side, and the repackaging client side forwards the live broadcast data packet to the broadcaster, and the live broadcast source sends the live broadcast data packet to the repackaging client side and the repackaging server in a multicast mode.
Step 202, the repackaging client sends a live repackaging request to the repackaging server.
Before the repackaging client sends a live repackaging request to the repackaging server, both the repackaging client and the repackaging server can receive the live broadcast data packet sent by the live broadcast source in a multicast mode and store the received live broadcast data packet in respective delay caches. The live broadcast data packet stored in the repacking server is used for repacking the repacking client, and the live broadcast data packet stored in the repacking client is used for providing live broadcast video for the live broadcast device and can achieve the purpose of delayed playing.
When determining that a live broadcast packet in a delay cache of the packet complementing client has a packet loss, the packet complementing client may send a live broadcast packet complementing request to the packet complementing server in a unicast manner, where the live broadcast packet complementing request includes a sequence number of a lost packet, or in other words, an index of the lost packet.
The packet supplementing client can periodically check the delay cache, and if the missing serial number of the live broadcast data packet in the delay cache is found, in order to save bandwidth, a packet supplementing request in a UDP unicast mode can be sent to the packet supplementing server after batch compression.
Optionally, the too long play-out delay may cause the real-time performance of the video program to be impaired, and the too short play-out delay may cause the packet to be lost, so that when the available supply bandwidth of the live broadcast wireless link is greater than the first threshold, the delay buffer of the packet-complementing client is greater than the second threshold and less than the third threshold.
Wherein the first threshold needs to be in accordance with formula (1), the second threshold needs to be in accordance with formula (2), and the third threshold needs to be in accordance with formula (3);
the formula (1) is:
Figure GDA0002521867450000091
wherein A is1The value is a first threshold value, C is live broadcast data flow (unit is Mbit/s), and d is the average packet loss rate of a wireless link;
the formula (2) is:
Figure GDA0002521867450000092
wherein A is2The second threshold value is T, the response time interval (unit is s) of one-time effective request from the packet complementing server to the packet complementing client, C is live broadcast data flow, and d is the average packet loss rate of the wireless link;
the formula (3) is:
Figure GDA0002521867450000093
wherein A is3And C is the third threshold, and the live data traffic.
For example, the Media Delivery quality Index (MDI) is most commonly used in Internet Protocol Television (IPTV), which can be described as two parameters, namely Delay Factor (DF) and Media Loss Rate (MLR), and IPTV usually requires less than 50ms for DF and 0.004 for MLR.
If the live broadcast data flow generated by the live broadcast server is C (C <8Mbit/s), the statistical average packet loss rate of the wireless link is d (d < 10%), the response time interval of an effective request from the packet complementing server to the play controller is T (unit is s), and each RTP packet is 1350Byte ═ 0.0103Mbit on average, the effective supply bandwidth of the wireless link exclusively used for vehicle-to-ground wireless live broadcast must be larger than the formula (1), the cache time (unit is s, the same below) cannot be lower than the formula (2) and cannot be higher than the formula (3), the MLR number requirement of the live broadcast effect evaluation standard can be met, and if the assumption is not true, the live broadcast effect cannot be guaranteed. The second threshold value may also be set empirically, and may be increased appropriately according to the field environment in actual application.
When the live data flow C is 6Mbit/s, the statistical average packet loss rate d of the wireless link is 10%, and the effective request response time interval T is 0.5 s.
The wireless link must effectively supply more than 7.49Mbit/s of bandwidth; the buffering time must satisfy: 4.165s < buffer time <112.5s, it is possible to meet the MLR number requirements of the live broadcast effect evaluation criteria and adjust it appropriately to the field situation to achieve the best effect.
Step 203, the packet supplementing server determines the data packet to be supplemented from the delay cache of the packet supplementing server according to the sequence number of the lost data packet.
After receiving a live packet supplementing request sent by a packet supplementing client, the packet supplementing server can determine a data packet to be supplemented from a delay cache of the packet supplementing server according to a sequence number of a lost data packet. In order to avoid the situation of repeated packet complementing, before determining a data packet to be complemented from the delay cache of the packet complementing server according to the sequence number of the lost data packet, the packet complementing server may determine whether a live packet complementing request sent by the same packet complementing client is received within a set time according to the sequence number of the lost data packet, and if the same request is received, the packet complementing server may give up the live packet complementing request without processing, that is, ignore the live packet complementing request.
After receiving the live broadcast package supplementing request, the package supplementing server can filter the data packages with illegal formats or illegal sources and then decompress the data packages. For each sequence number after decompression, if it has been requested by the same client for the last period of time, the live supplemental package request is ignored, a mechanism known as cooling. The cooling mechanism is to avoid unnecessary repeated packet repair, which consumes the backbone network resources and the unstable network resources. The reason for the repeated packet patching is two: one is that the transport layer protocol itself may repeatedly send the complementary packet request packet. And secondly, the packet supplementing data is delayed due to high network delay, so that the packet supplementing client side judges that the packet supplementing is failed by mistake, and the packet supplementing request is retransmitted.
When determining a data packet to be retransmitted from the delay cache of the packet supplementing server according to the sequence number of the lost data packet, the packet supplementing server may specifically group the multiple packet supplementing clients according to an unstable network where the multiple packet supplementing clients are located when the packet supplementing server obtains a live packet supplementing request of the multiple packet supplementing clients. And allocating resources according to the groups, and determining a reissued data packet corresponding to the live repacking request according to the live repacking request of the repacking client in each group and a token bucket mechanism, wherein each group corresponds to one token bucket, and each data packet determined to be reissued corresponding to the live repacking request of one repacking client consumes one token in the token bucket.
For example, the packet supplementing server groups the packet supplementing clients into a group according to the packet supplementing clients in each unstable network. And allocating resource processing packet supplementing requests according to the packets, and fairly scheduling processing resources among the packets to enable each packet to equally use the resources. Each group independently establishes a token bucket with maximum token number limit, a specified number of tokens are automatically generated within a specified equal interval time until the maximum token number limit is reached, each pack filling of each group consumes one token in the token bucket, and if no token exists in the token bucket, new tokens need to be generated. The token bucket mechanism limits the speed of sending the complementary packet data of each packet, so that the resources of the backbone network can be evenly distributed, and the possibility that a certain packet occupies the service is avoided. The processing resources in the packet are allocated according to the priority principle of the data packet played first, so as to obtain the best playing effect.
And step 204, the packet supplementing server sends the data packet to be supplemented to the packet supplementing client.
And after determining the data packet to be supplemented, the packet supplementing server sends the data packet to be supplemented to the packet supplementing client, so that the packet supplementing of the lost data packet is completed.
In step 205, the packet complementing client maps the sequence number of the complemented data packet to a timestamp.
And step 206, the pack supplementing client sends the data pack to be supplemented to the player by the pack supplementing client.
After receiving the reissued data packets, the reissued client needs to map the serial numbers of the reissued data packets into time stamps, and then sends the reissued data packets to the player according to the time stamps, so that the video playing is completed.
In order to accurately play the delayed video and complete the mapping from the serial number to the timestamp, the packet supplementing server also needs to periodically send a reference clock message to the packet supplementing client, the packet supplementing client corrects the timestamp according to the reference clock message and the serial number of the supplemented data packet after receiving the reference clock message, and then the packet supplementing client sends the supplemented data packet to the player according to the corrected timestamp. Therefore, the accuracy of playing the delayed video is improved.
It should be noted that, in the embodiment of the present invention, the clock is a representation of a coordinate system describing time, including definition of a zero point and definition of a time unit. Clocks are divided into two categories: absolute clocks and relative clocks. An absolute clock, also called a wall clock, is a representation of a coordinate system describing time, including the definition of zero and the definition of time units, describing the distance between the current point in time and zero (typically 0: 00 a.1.1.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0. There are two absolute clock concepts in RTP: the local clock is an absolute clock described by the local clock, and because the precision of a clock generator is not high, the difference from a real clock exists; the reference clock is the representation of the local clock of the host where the live source is located in the RTP session to other machines in the session, and there is also a difference in accuracy.
The relative clock can be regarded as a lossy compression format of an absolute clock, which has much lower precision than the local clock and the reference clock (for example, according to the RTP/AVP standard, the MPEG-TS stream is 90000Hz), and no longer uses the zero point of the real clock as its own zero point (the zero point is randomly generated by the sender when a session is established), the emphasis of the relative clock is to express the sequence of the message, and the sequence number in the RTP packet is a relative clock.
Because some time calculation is needed in the service processing (for example, judging whether the message in the cache is expired) of the packet supplementing client and the packet supplementing server, different coordinate systems need to be converted into the same coordinate system, which is more convenient for a local clock coordinate system. Errors are easily generated by the conversion from the reference clock to the relative clock to the local clock, and long-time error accumulation may cause error influence on the service processing. Therefore, zero point correction needs to be periodically performed through the reference clock message, so that the error can be controlled within a reasonable range.
The above-mentioned coordinate system conversion needs to provide an intersection point (actually, the same point is represented in two different coordinate systems) between the coordinate systems, and a point to be converted of a source coordinate system. During calculation, the distance between the point to be converted and the intersection point of the source coordinate system is firstly obtained, then the distance is converted into a target coordinate system, and then the intersection point and the distance are added to obtain a converted time point.
The intersection point can be updated through a reference clock message sent by a live broadcast source, and a timestamp of a local stable clock when the reference clock message is received needs to be additionally recorded for a relative timestamp + a reference timestamp in the sent reference clock message to form a triple. When the actual intersection point is used, a transition compensation factor is added and subtracted moderately according to the current local stable clock so that the transition is smoother.
Through the set of clock mechanism, the time accuracy of delayed playing can be solved, and the phenomenon of playing jitter can not occur.
It should be noted that, in the embodiment of the present invention, the player does not directly receive the live data packet sent by the live source, but obtains the live data packet from the repackaging client, and completes the repackaging of the lost data packet through the repackaging client, so as to avoid the phenomena of mosaic, pause and the like occurring in the live broadcasting process of the broadcaster.
The embodiment shows that when determining that a live broadcast data packet in a delay cache of a packet supplementing client has a packet loss, the packet supplementing client sends a live broadcast packet supplementing request to a packet supplementing server in a unicast mode, where the live broadcast packet supplementing request includes a sequence number of the lost data packet, and when an effective supply bandwidth of a live broadcast wireless link is greater than a first threshold, the delay cache of the packet supplementing client is greater than a second threshold and smaller than a third threshold, receives a supplemented data packet sent by the packet supplementing server, maps the sequence number of the supplemented data packet into a timestamp, and sends the supplemented data packet to a player according to the timestamp, so that the player plays a video in a delayed manner. Because the live broadcast data packet is stored through the delay cache, and the packet supplementing client requests the packet supplementing server to send the data packet additionally, the player can play the video in a delayed mode, the playing quality of the video can be improved, and the fluency is improved.
Based on the same technical concept, fig. 3 exemplarily shows a structure of a device for enhancing video live broadcast quality according to an embodiment of the present invention, where the device may be a repackaging client or may be located in the repackaging client.
As shown in fig. 3, the apparatus specifically includes:
the receiving and sending unit 301 is configured to send a live broadcast packet supplementing request to a packet supplementing server in a unicast manner when it is determined that a live broadcast packet in a delay cache of a packet supplementing client has a packet loss, where the live broadcast packet supplementing request includes a sequence number of the lost packet; when the effective supply bandwidth of a live broadcast wireless link is greater than a first threshold value, the delay cache of the packet complementing client is greater than a second threshold value and smaller than a third threshold value; receiving a data packet sent by the packet supplementing server;
a processing unit 302, configured to map a sequence number of the complementary data packet to a timestamp;
the transceiving unit 301 is further configured to send the complementary data packet to a player according to the timestamp.
Optionally, before determining that the live data packet in the delay buffer of the packet complementing client is lost, the processing unit 302 is further configured to:
controlling the transceiver unit 301 to receive a live broadcast data packet sent by a live broadcast source in a multicast mode;
and storing the live broadcast data packet in a delay cache of the packet complementing client.
Optionally, the processing unit 302 is further configured to:
controlling the transceiver unit 301 to receive a reference clock message sent by the packet complementing server;
when the processing unit 302 sends the complementary data packet to the player according to the timestamp, the processing unit is specifically configured to:
correcting the timestamp according to the reference clock message and the sequence number of the reissued data packet;
and controlling the transceiver unit 301 to transmit the complementary data packet to the player according to the corrected timestamp.
Optionally, the first threshold needs to be in accordance with formula (1), the second threshold needs to be in accordance with formula (2), and the third threshold needs to be in accordance with formula (3);
the formula (1) is:
Figure GDA0002521867450000141
wherein A is1The value is a first threshold value, C is live broadcast data flow, and d is the average packet loss rate of a wireless link;
the formula (2) is:
Figure GDA0002521867450000142
wherein A is2The value is a second threshold value, T is a response time interval of one effective request from the packet supplementing server to the packet supplementing client, C is live broadcast data flow, and d is the average packet loss rate of the wireless link;
the formula (3) is:
Figure GDA0002521867450000151
wherein A is3And C is the third threshold, and the live data traffic.
Based on the same technical concept, fig. 4 exemplarily shows an apparatus for enhancing video live broadcast quality provided by an embodiment of the present invention, where the apparatus may be a repackaging server or may be located in the repackaging server.
As shown in fig. 4, the apparatus specifically includes:
the receiving and sending unit 401 is configured to obtain a live package supplementing request sent by a package supplementing client; the live broadcast packet supplementing request comprises a sequence number of a lost data packet;
a processing unit 402, configured to determine a data packet to be retransmitted from a delay buffer of the packet retransmission server according to the sequence number of the lost data packet;
the transceiver 401 is further configured to send the complementary data packet to the complementary packet client.
Optionally, before acquiring the live repackaging request sent by the repackaging client, the processing unit 402 is further configured to:
controlling the transceiver unit 401 to receive a live broadcast data packet sent by a live broadcast source in a multicast mode;
and storing the live broadcast data packet in a delay cache of the packet complementing server.
Optionally, before determining the reissued data packet from the delay buffer of the packet complementation server according to the sequence number of the lost data packet, the processing unit 402 is further configured to:
determining whether a live-broadcast packet-supplementing request sent by the same packet-supplementing client is received within set time according to the sequence number of the lost data packet;
and if so, giving up the live broadcast packet supplementing request.
Optionally, when the processing unit 402 determines a data packet to be sent again from the delay buffer of the packet supplementation server according to the sequence number of the lost data packet, specifically configured to:
when acquiring live package supplementing requests of a plurality of package supplementing clients, grouping the plurality of package supplementing clients according to an unstable network where the plurality of package supplementing clients are located;
allocating resources according to groups, and determining a reissued data packet corresponding to a live supplementary packet request according to the live supplementary packet request of a supplementary packet client in each group and a token bucket mechanism;
each group corresponds to one token bucket, and each data packet which is determined to be sent in a complementary manner and corresponds to a live broadcast complementary package request of one complementary package client consumes one token in the token bucket.
Optionally, the processing unit 402 is further configured to:
and controlling the transceiver unit 401 to periodically send a reference clock message to the packet complementing client.
Based on the same technical concept, an embodiment of the present invention further provides a computing device, including:
a memory for storing program instructions;
and the processor is used for calling the program instruction stored in the memory and executing the method for enhancing the video live broadcast quality according to the obtained program.
Based on the same technical concept, the embodiment of the invention also provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used for enabling a computer to execute the method for enhancing the live video quality.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (14)

1. A method for enhancing the quality of a live video, comprising:
when determining that a live broadcast data packet in a delay cache of a packet supplementing client has packet loss, the packet supplementing client sends a live broadcast packet supplementing request to a packet supplementing server in a unicast mode, wherein the live broadcast packet supplementing request comprises a serial number of the lost data packet; when the effective supply bandwidth of a live broadcast wireless link is greater than a first threshold value, the delay cache of the packet complementing client is greater than a second threshold value and smaller than a third threshold value;
the packet supplementing client receives a data packet which is sent by the packet supplementing server and is supplemented with the data packet;
the packet supplementing client maps the sequence number of the supplemented data packet into a timestamp;
the packet supplementing client sends the supplemented data packet to a player according to the timestamp so that the player can play the video in a delayed manner;
the first threshold needs to be in accordance with formula (1), the second threshold needs to be in accordance with formula (2), and the third threshold needs to be in accordance with formula (3);
the formula (1) is:
Figure FDA0002677056450000011
wherein A is1The value is a first threshold value, C is live broadcast data flow, and d is the average packet loss rate of a wireless link;
the formula (2) is:
Figure FDA0002677056450000012
wherein A is2The value is a second threshold value, T is a response time interval of one effective request from the packet supplementing server to the packet supplementing client, C is live broadcast data flow, and d is the average packet loss rate of the wireless link;
the formula (3) is:
Figure FDA0002677056450000013
wherein A is3And C is the third threshold, and the live data traffic.
2. The method of claim 1, wherein before determining that there is packet loss in the live data packet in the delay buffer of the packet complementing client, the packet complementing client further comprises:
the repacking client receives a live broadcast data packet sent by a live broadcast source in a multicast mode;
and the packet supplementing client stores the live broadcast data packet in a delay cache of the packet supplementing client.
3. The method of claim 1, wherein the method further comprises:
the packet supplementing client receives a reference clock message periodically sent by a live broadcast source;
the packet supplementing client sends the supplemented data packet to the player according to the timestamp, and the method comprises the following steps:
the packet supplementing client corrects the timestamp according to the reference clock message and the sequence number of the supplemented data packet;
and the reissue client sends the reissued data packet to the player according to the corrected timestamp.
4. A method for enhancing the quality of a live video, comprising:
a pack supplementing server acquires a live broadcast pack supplementing request sent by a pack supplementing client; the live broadcast packet supplementing request comprises a sequence number of a lost data packet;
the packet supplementing server determines a data packet to be supplemented from a delay cache of the packet supplementing server according to the sequence number of the lost data packet;
the packet supplementing server sends the supplemented data packet to the packet supplementing client;
the packet supplementing server determines the data packet to be supplemented from the delay cache of the packet supplementing server according to the sequence number of the lost data packet, and the method comprises the following steps:
when the packet supplementing server obtains the live broadcast packet supplementing requests of a plurality of packet supplementing clients, grouping the plurality of packet supplementing clients according to the unstable network where the plurality of packet supplementing clients are located;
the packet supplementing server distributes resources according to groups, and determines a data packet to be supplemented and sent corresponding to the live packet supplementing request according to the live packet supplementing request of the packet supplementing client in each group and a token bucket mechanism;
each group corresponds to one token bucket, and each data packet which is determined to be sent in a complementary manner and corresponds to a live broadcast complementary package request of one complementary package client consumes one token in the token bucket.
5. The method of claim 4, wherein the repackaging server, prior to obtaining the live repackaging request sent by the repackaging client, further comprises:
the packet supplementing server receives a live broadcast data packet sent by a live broadcast source in a multicast mode;
and the packet supplementing server stores the live broadcast data packet in a delay cache of the packet supplementing server.
6. The method of claim 4, wherein the packet complementing server, prior to determining the complementary data packet from the delay buffer of the packet complementing server based on the sequence number of the lost data packet, further comprises:
the packet supplementing server determines whether a live packet supplementing request sent by the same packet supplementing client is received within set time according to the sequence number of the lost data packet;
and if so, the packet supplementing server gives up the live broadcast packet supplementing request.
7. An apparatus for enhancing the quality of a live video, comprising:
the receiving and sending unit is used for sending a live broadcast packet supplementing request to the packet supplementing server in a unicast mode when determining that a live broadcast packet in a delay cache of the packet supplementing client has packet loss, wherein the live broadcast packet supplementing request comprises a serial number of the lost packet; when the effective supply bandwidth of a live broadcast wireless link is greater than a first threshold value, the delay cache of the packet complementing client is greater than a second threshold value and smaller than a third threshold value; receiving a data packet sent by the packet supplementing server;
the processing unit is used for mapping the sequence number of the reissued data packet into a time stamp;
the transceiving unit is also used for sending the complementary data packet to a player according to the timestamp;
the first threshold needs to be in accordance with formula (1), the second threshold needs to be in accordance with formula (2), and the third threshold needs to be in accordance with formula (3);
the formula (1) is:
Figure FDA0002677056450000031
wherein A is1The value is a first threshold value, C is live broadcast data flow, and d is the average packet loss rate of a wireless link;
the formula (2) is:
Figure FDA0002677056450000032
wherein A is2The value is a second threshold value, T is a response time interval of one effective request from the packet supplementing server to the packet supplementing client, C is live broadcast data flow, and d is the average packet loss rate of the wireless link;
the formula (3) is:
Figure FDA0002677056450000041
wherein A is3And C is the third threshold, and the live data traffic.
8. The apparatus of claim 7, wherein before determining that there is a packet loss in the live data packet in the delay buffer of the packet complementing client, the processing unit is further configured to:
controlling the receiving and sending unit to receive a live broadcast data packet sent by a live broadcast source in a multicast mode;
and storing the live broadcast data packet in a delay cache of the packet complementing client.
9. The apparatus as recited in claim 7, said processing unit to further:
controlling the receiving and sending unit to receive a reference clock message periodically sent by a live broadcast source;
when the processing unit sends the reissued data packet to the player according to the timestamp, the processing unit is specifically configured to:
correcting the timestamp according to the reference clock message and the sequence number of the reissued data packet;
and controlling the transceiver unit to send the complementary data packet to the player according to the corrected timestamp.
10. An apparatus for enhancing the quality of a live video, comprising:
the receiving and sending unit is used for acquiring a live broadcast packet supplementing request sent by a packet supplementing client; the live broadcast packet supplementing request comprises a sequence number of a lost data packet;
the processing unit is used for determining a data packet to be sent again from the delay cache of the packet supplementing server according to the sequence number of the lost data packet;
the receiving and sending unit is further configured to send the complementary data packet to the complementary packet client;
when the processing unit determines a data packet to be sent again from the delay cache of the packet supplementation server according to the sequence number of the lost data packet, the processing unit is specifically configured to:
when acquiring live package supplementing requests of a plurality of package supplementing clients, grouping the plurality of package supplementing clients according to an unstable network where the plurality of package supplementing clients are located;
allocating resources according to groups, and determining a reissued data packet corresponding to a live supplementary packet request according to the live supplementary packet request of a supplementary packet client in each group and a token bucket mechanism;
each group corresponds to one token bucket, and each data packet which is determined to be sent in a complementary manner and corresponds to a live broadcast complementary package request of one complementary package client consumes one token in the token bucket.
11. The apparatus as claimed in claim 10, wherein said processing unit, prior to obtaining a live repackaging request sent by a repackaging client, is further configured to:
controlling the receiving and sending unit to receive a live broadcast data packet sent by a live broadcast source in a multicast mode;
and storing the live broadcast data packet in a delay cache of the packet complementing server.
12. The apparatus as claimed in claim 10, wherein said processing unit, prior to determining a complementary packet from a delay buffer of said packet complementing server based on a sequence number of said lost packet, is further configured to:
determining whether a live-broadcast packet-supplementing request sent by the same packet-supplementing client is received within set time according to the sequence number of the lost data packet;
and if so, giving up the live broadcast packet supplementing request.
13. A computing device, comprising:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory to perform the method of any one of claims 1 to 3 or 4 to 6 in accordance with the obtained program.
14. A computer storage medium having computer-executable instructions stored thereon for causing a computer to perform the method of any one of claims 1 to 3 or 4 to 6.
CN201810001580.4A 2018-01-02 2018-01-02 Method and device for enhancing video live broadcast quality Active CN108111531B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810001580.4A CN108111531B (en) 2018-01-02 2018-01-02 Method and device for enhancing video live broadcast quality

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810001580.4A CN108111531B (en) 2018-01-02 2018-01-02 Method and device for enhancing video live broadcast quality

Publications (2)

Publication Number Publication Date
CN108111531A CN108111531A (en) 2018-06-01
CN108111531B true CN108111531B (en) 2020-12-08

Family

ID=62219523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810001580.4A Active CN108111531B (en) 2018-01-02 2018-01-02 Method and device for enhancing video live broadcast quality

Country Status (1)

Country Link
CN (1) CN108111531B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110062339B (en) * 2019-03-28 2021-09-17 山东省计算中心(国家超级计算济南中心) Method and device for shareable data transmission
CN110022534B (en) * 2019-03-28 2021-06-08 山东省计算中心(国家超级计算济南中心) Data transmission method and device based on multicast
CN111865874B (en) * 2019-04-28 2022-08-16 成都鼎桥通信技术有限公司 Data transmission method and device
CN110351569B (en) * 2019-06-25 2021-02-02 腾讯科技(深圳)有限公司 Live content processing method, device, equipment and medium
CN113347137B (en) * 2020-03-02 2024-03-05 广州虎牙科技有限公司 Patch method and device for data stream slice, computer equipment and storage medium
CN113872916A (en) * 2020-06-30 2021-12-31 中兴通讯股份有限公司 Data retransmission method, network device, and computer-readable storage medium
CN114025389B (en) * 2021-11-01 2024-04-30 网易(杭州)网络有限公司 Data transmission method, device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103533451A (en) * 2013-09-30 2014-01-22 广州华多网络科技有限公司 Method and system for regulating jitter buffer
CN105072508A (en) * 2015-08-12 2015-11-18 苏州华启智能科技有限公司 System and method for making up packets for multimedia playing of wireless network
CN106534884A (en) * 2016-11-10 2017-03-22 中广热点云科技有限公司 Code rate control method and system for video coding

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015014403A1 (en) * 2013-08-01 2015-02-05 Telefonaktiebolaget L M Ericsson (Publ) Method and apparatus for controlling streaming of video content

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103533451A (en) * 2013-09-30 2014-01-22 广州华多网络科技有限公司 Method and system for regulating jitter buffer
CN105072508A (en) * 2015-08-12 2015-11-18 苏州华启智能科技有限公司 System and method for making up packets for multimedia playing of wireless network
CN106534884A (en) * 2016-11-10 2017-03-22 中广热点云科技有限公司 Code rate control method and system for video coding

Also Published As

Publication number Publication date
CN108111531A (en) 2018-06-01

Similar Documents

Publication Publication Date Title
CN108111531B (en) Method and device for enhancing video live broadcast quality
WO2020192152A1 (en) Video transmission method, root node, child node, p2p server, and system
RU2634908C2 (en) Method and device for mediadata delivery management
JP6178523B2 (en) Transport accelerator implementing request manager and connection manager functionality
US9973345B2 (en) Calculating and signaling segment availability times for segments of media data
RU2369040C2 (en) Buffering during data streaming
TWI419565B (en) Method for buffering packets of a media stream, system for buffering a media stream, device and chipset for transmitting, server and computer program product
EP3247121B1 (en) Streaming media data transmission method, client and server
CN108696772B (en) Real-time video transmission method and device
CN105376613B (en) A kind of fast channel switching method, server and IPTV system
CN104836748A (en) Congestion control bitrate algorithm
RU2598805C2 (en) Method for dynamic adaptation of repetition frequency of bits when receiving and appropriate receiver
CN101552660A (en) Method as well as device and communication system for retransmitting streaming media data
KR102198701B1 (en) Method and apparatus for transmitting and receiving information in a multimedia system
EP3777218A1 (en) Congestion response for timely media delivery
KR20230002784A (en) Methods and servers for transmitting audio and/or video content
CN110086797B (en) Real-time receiving method of media stream, client, computer device and storage medium
US10903921B2 (en) Method and device for providing heterogeneous network-based broadcast service
CN101090369B (en) Method for controlling data packet sending speed in flow medium system
CN103139188B (en) Flow-medium transmission method and system
US10440406B2 (en) Method and apparatus for transmitting or receiving multimedia
JP5610743B2 (en) Content receiving method and apparatus
KR20200018493A (en) Methods and apparatuses for streaming data
US10182089B2 (en) Method and broadcast multicast service center, BM-SC, node for providing an on-request service
CN114143297B (en) Ultralow-delay audio processing method and device suitable for cloud game scene

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