[go: up one dir, main page]

CN107026856A - The optimization method and optimization system of a kind of network plug-flow quality - Google Patents

The optimization method and optimization system of a kind of network plug-flow quality Download PDF

Info

Publication number
CN107026856A
CN107026856A CN201710199908.3A CN201710199908A CN107026856A CN 107026856 A CN107026856 A CN 107026856A CN 201710199908 A CN201710199908 A CN 201710199908A CN 107026856 A CN107026856 A CN 107026856A
Authority
CN
China
Prior art keywords
code check
current
frame
next cycle
code rate
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.)
Pending
Application number
CN201710199908.3A
Other languages
Chinese (zh)
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.)
SHANGHAI QINIU INFORMATION TECHNOLOGIES Co Ltd
Original Assignee
SHANGHAI QINIU INFORMATION TECHNOLOGIES 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 SHANGHAI QINIU INFORMATION TECHNOLOGIES Co Ltd filed Critical SHANGHAI QINIU INFORMATION TECHNOLOGIES Co Ltd
Priority to CN201710199908.3A priority Critical patent/CN107026856A/en
Publication of CN107026856A publication Critical patent/CN107026856A/en
Priority to PCT/CN2018/079677 priority patent/WO2018177165A1/en
Pending legal-status Critical Current

Links

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
    • 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/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/613Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for the control of the source by the destination
    • 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/40Support for services or applications
    • H04L65/4061Push-to services, e.g. push-to-talk or push-to-video
    • 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/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/152Data rate or code amount at the encoder output by measuring the fullness of the transmission buffer

Landscapes

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

Abstract

本申请提供一种网络推流质量的优化方法及优化系统,其中,所述方法包括:按照预设周期采集推流的特征信息;根据当前每帧TCP平均发送时长以及当前缓冲区数据吞吐量,对下一周期的码率进行调整,并将调整后的码率作为目标码率反馈至编码器;根据当前缓冲区数据吞吐量,对下一周期的帧率进行调整,并根据调整后的帧率确定两帧之间的时间间隔;基于确定的所述时间间隔对进入编码器的音视频数据进行过滤,以生成符合调整后的帧率的音视频数据;按照调整后的码率和调整后的帧率进行音视频数据的编码及传输。本申请提供的网络推流质量的优化方法及优化系统,能够平滑地调整推流的码率和帧率。

The present application provides a method and an optimization system for optimizing the quality of network streaming, wherein the method includes: collecting characteristic information of streaming according to a preset cycle; according to the current average sending time of each frame of TCP and the current buffer data throughput, Adjust the code rate of the next cycle, and feed the adjusted code rate back to the encoder as the target code rate; adjust the frame rate of the next cycle according to the current buffer data throughput, and adjust the frame rate according to the adjusted frame rate to determine the time interval between two frames; based on the determined time interval, the audio and video data entering the encoder is filtered to generate audio and video data that conforms to the adjusted frame rate; according to the adjusted bit rate and the adjusted Encoding and transmission of audio and video data at a certain frame rate. The method and system for optimizing the quality of network streaming provided by this application can smoothly adjust the code rate and frame rate of streaming.

Description

一种网络推流质量的优化方法及优化系统An optimization method and optimization system for network streaming quality

技术领域technical field

本申请涉及音视频处理技术领域,特别涉及一种网络推流质量的优化方法及优化系统。The present application relates to the technical field of audio and video processing, in particular to a method and system for optimizing the quality of network streaming.

背景技术Background technique

近年来,移动视频直播越来越火爆,在娱乐、教育、游戏电竞、体育等领域都得到广泛应用,各种直播产品竞争激烈,而能够提供优秀用户体验的直播产品和服务终将在这场竞争中脱颖而出。In recent years, mobile video live broadcasting has become more and more popular, and has been widely used in entertainment, education, game e-sports, sports and other fields. Various live broadcasting products have fierce competition, and live broadcasting products and services that can provide excellent user experience will eventually become popular in this field. Stand out from the competition.

影响直播观看体验的因素总体而言分为两个维度,一是画面清晰度(即画质),二是流畅度。画质与码率和分辨率正相关,流畅度与帧率和数据带宽正相关。当网络的带宽一定的情况下,流畅度与码率呈一种负相关的关系,即当码率超出实际网络数据吞吐率时,流畅度就会降低。理想情况下,当主播端与观众端都有无限带宽时,只需要选择一个直播设备所能承受的最佳画质进行推流,便能获得高清流畅的优质观看体验。然而考虑到直播者(即主播)所处的网络环境千差万别,从直播端到推流服务器的链路上经常发生丢包、抖动和延迟等情况,导致直播推流不畅,造成观看的体验下降。在这种情况下,必定要权衡画质与流畅度这两个维度来维持较好的观看体验,大量用户反馈表明,使用较低画质和高流畅度,与高画质和频繁卡顿的直播相比,前者能带来更好的用户观看体验。此时,一种能够根据直播端的网络质量来动态调节推流质量的技术方案显得尤为必要。The factors that affect the viewing experience of live broadcasts are generally divided into two dimensions, one is the clarity of the picture (that is, the picture quality), and the other is the fluency. Image quality is positively correlated with bit rate and resolution, and fluency is positively correlated with frame rate and data bandwidth. When the bandwidth of the network is constant, the fluency has a negative correlation with the code rate, that is, when the code rate exceeds the actual network data throughput rate, the fluency will decrease. Ideally, when both the anchor and the audience have unlimited bandwidth, you only need to choose the best picture quality that a live broadcast device can withstand to push the stream, and you can get a high-definition, smooth and high-quality viewing experience. However, considering that the network environment of the live broadcaster (that is, the host) is very different, packet loss, jitter, and delay often occur on the link from the live broadcast end to the streaming server, which leads to poor streaming of live streaming and a decline in viewing experience . In this case, it is necessary to balance the two dimensions of image quality and fluency to maintain a good viewing experience. A large number of user feedback shows that using lower image quality and high fluency is not the same as using high image quality and frequent freezes. Compared with live broadcast, the former can bring better user viewing experience. At this time, a technical solution that can dynamically adjust the streaming quality according to the network quality of the live broadcast terminal is particularly necessary.

目前直播推流的通用协议标准为RTMP(Real Time Messaging Protocol,实时消息传输协议)协议,是基于TCP进行传输,其本身是面向连接、可靠的传输层协议,内部实现了拥塞控制策略。在高丢包率的网络环境中,TCP的自动重传策略会占用很大一部分带宽,从而导致单位时间内网络数据吞吐量减少,造成播放端的卡顿。当前市面上应对弱网推流的方案主要有以下三种:At present, the general protocol standard for live streaming is RTMP (Real Time Messaging Protocol, Real-time Message Transmission Protocol), which is based on TCP for transmission. It is a connection-oriented and reliable transport layer protocol, and internally implements congestion control strategies. In a network environment with a high packet loss rate, TCP's automatic retransmission strategy will occupy a large part of the bandwidth, resulting in a decrease in network data throughput per unit time and causing freezes at the playback end. There are currently three main solutions on the market to deal with weak network streaming:

由主播根据观众反馈自行选择推流的清晰度,即推流端不做自动判断网络处理;The anchor chooses the clarity of the push stream according to the feedback from the audience, that is, the push stream end does not automatically judge the network processing;

在直播开始时判断网络质量,若检测到较差的网络条件,则直接采用一个较低的推流配置开始直播,并在整个直播过程中始终采用该配置;Judge the network quality at the beginning of the live broadcast. If poor network conditions are detected, a lower streaming configuration will be used to start the live broadcast, and this configuration will always be used throughout the live broadcast process;

将推流质量配置预设高低两个档次,在直播过程中根据网络状况在这两个档次间来回切换。Set the streaming quality configuration to preset two levels, high and low, and switch back and forth between these two levels according to the network conditions during the live broadcast.

以上方案能在一定程度上缓解由网络波动或弱网所引发的直播端推流不流畅问题,但也都分别存在一系列的缺陷,具体分析如下:The above solutions can alleviate to a certain extent the problem of unsmooth streaming at the live broadcast end caused by network fluctuations or weak networks, but they also have a series of defects. The specific analysis is as follows:

依靠主播根据观众反馈来选择推流清晰度,本身太过于依赖主播的经验,并且观众的反馈信息无法准确判断直播卡顿的根源,主播端的网络不佳或者观众自身的网络存在问题均可能造成直播体验的负面反馈;Relying on the anchor to choose the clarity of the stream based on audience feedback is too dependent on the experience of the anchor, and the feedback from the audience cannot accurately determine the root cause of the live broadcast stuttering. Poor network at the anchor end or problems with the audience's own network may cause live broadcast Negative feedback from experience;

未考虑到网络波动的因素,可能直播开始时网络处于波动状态,导致采用低画质进行推流,而后直播过程中网络恢复稳定,直播却只能始终采用低画质,无法达到观看体验的最优化。另外,可能一开始采用高画质推流,直播过程中网络波动,也将造成频繁卡顿;Factors of network fluctuations are not taken into account. It is possible that the network is fluctuating at the beginning of the live broadcast, resulting in low-quality streaming, and then the network becomes stable during the live broadcast, but the live broadcast can only always use low-quality images, which cannot achieve the best viewing experience. optimization. In addition, high-quality streaming may be used at the beginning, and network fluctuations during the live broadcast will also cause frequent freezes;

采用高低两档画质配置根据网络情况来回切换,会带来的两个问题。问题一是播放端能够明显感知画质的抖动,二是频繁从低画质切换到高画质时,可能瞬时增大网络负担,使发送的码率超过实际带宽,造成卡顿,总而言之无法做到平滑切换。Using high and low image quality configurations to switch back and forth according to network conditions will bring two problems. The first problem is that the playback end can clearly perceive the jitter of the image quality, and the second is that when frequently switching from low image quality to high image quality, it may increase the network burden instantaneously, causing the transmitted bit rate to exceed the actual bandwidth, causing freezes, and in short, it cannot be done. to smooth switching.

应该注意,上面对技术背景的介绍只是为了方便对本申请的技术方案进行清楚、完整的说明,并方便本领域技术人员的理解而阐述的。不能仅仅因为这些方案在本申请的背景技术部分进行了阐述而认为上述技术方案为本领域技术人员所公知。It should be noted that the above introduction to the technical background is only for the convenience of a clear and complete description of the technical solution of the present application, and for the convenience of understanding by those skilled in the art. It cannot be considered that the above technical solutions are known to those skilled in the art just because these solutions are described in the background technology section of this application.

发明内容Contents of the invention

本申请实施方式的目的在于提供一种网络推流质量的优化方法及优化系统,能够平滑地调整推流的码率和帧率。The purpose of the embodiments of the present application is to provide a method and system for optimizing the quality of network streaming, which can smoothly adjust the code rate and frame rate of streaming.

为实现上述目的,本申请一方面提供一种网络推流质量的优化方法,所述方法包括:按照预设周期采集推流的特征信息,所述特征信息包括平均码率、平均帧率、缓冲区数据吞吐量、每帧TCP平均发送时长;根据当前每帧TCP平均发送时长以及当前缓冲区数据吞吐量,对下一周期的码率进行调整,并将调整后的码率作为目标码率反馈至编码器;根据当前缓冲区数据吞吐量,对下一周期的帧率进行调整,并根据调整后的帧率确定两帧之间的时间间隔;基于确定的所述时间间隔对进入编码器的音视频数据进行过滤,以生成符合调整后的帧率的音视频数据;按照调整后的码率和调整后的帧率进行音视频数据的编码及传输。In order to achieve the above purpose, the present application provides a method for optimizing the quality of network push stream on the one hand, the method includes: collecting feature information of push stream according to a preset period, and the feature information includes average code rate, average frame rate, buffer Area data throughput, TCP average sending time of each frame; according to the current average TCP sending time of each frame and the current buffer data throughput, the code rate of the next cycle is adjusted, and the adjusted code rate is used as the target code rate feedback to the encoder; adjust the frame rate of the next cycle according to the current buffer data throughput, and determine the time interval between two frames according to the adjusted frame rate; The audio and video data is filtered to generate audio and video data conforming to the adjusted frame rate; the audio and video data is encoded and transmitted according to the adjusted bit rate and the adjusted frame rate.

进一步地,根据当前每帧TCP平均发送时长以及当前缓冲区数据吞吐量,对下一周期的码率进行调整具体包括:当所述当前每帧TCP平均发送时长大于第一预设风险值时,按照预设码率步长下降当前码率,并将下降后的码率作为下一周期的码率;当所述当前每帧TCP平均发送时长小于或者等于所述第一预设风险值时,判断所述当前每帧TCP平均发送时长是否大于第二预设风险值;若所述当前每帧TCP平均发送时长大于第二预设风险值并且当前缓冲区的数据占有率大于预设阈值时,按照预设码率步长下降当前码率,并将下降后的码率作为下一周期的码率。Further, according to the current average TCP transmission duration of each frame and the current buffer data throughput, adjusting the code rate of the next cycle specifically includes: when the current average TCP transmission duration of each frame is greater than the first preset risk value, Decrease the current code rate according to the preset code rate step size, and use the reduced code rate as the code rate for the next cycle; when the average transmission duration of each current TCP frame is less than or equal to the first preset risk value, Judging whether the current average TCP transmission duration of each frame is greater than a second preset risk value; if the current average TCP transmission duration of each frame is greater than the second preset risk value and the data occupancy rate of the current buffer is greater than a preset threshold, Decrease the current code rate according to the preset code rate step, and use the reduced code rate as the code rate for the next cycle.

进一步地,所述方法还包括:判断上一次进行的码率调整是否为下降码率,若是,将所述预设码率步长增加至预设值,并按照增加后的预设值下降当前码率。Further, the method further includes: judging whether the code rate adjustment performed last time is to decrease the code rate, and if so, increasing the preset code rate step size to a preset value, and decreasing the current code rate according to the increased preset value. code rate.

进一步地,根据当前每帧TCP平均发送时长以及当前缓冲区数据吞吐量,对下一周期的码率进行调整具体包括:判断当前缓冲区的吐出数据量与吞入数据量之间的关系,当吐出数据量大于或者等于吞入数据量时,将计数器的计数值加一;当吐出数据量小于吞入数据量时,将计数器的计数值减一;根据当前计数器中计数值的大小,调整下一周期的码率。Further, according to the current average sending time of each frame of TCP and the current buffer data throughput, adjusting the code rate of the next cycle specifically includes: judging the relationship between the amount of output data and the amount of ingested data in the current buffer, when When the amount of output data is greater than or equal to the amount of ingested data, add one to the count value of the counter; when the amount of output data is less than the amount of ingested data, decrease the count value of the counter by one; code rate for one cycle.

进一步地,根据当前计数器中计数值的大小,调整下一周期的码率具体包括:当所述计数器中的计数值小于第一判定阈值时,按照预设码率步长下降当前码率,并将下降后的码率作为下一周期的码率,同时将所述计数器的计数值归零;当所述计数器中的计数值大于第二判定阈值时,按照预设码率步长提高当前码率,并将提高后的码率作为下一周期的码率,同时将所述计数器的计数值归零。Further, according to the size of the count value in the current counter, adjusting the code rate of the next cycle specifically includes: when the count value in the counter is smaller than the first determination threshold, decreasing the current code rate according to the preset code rate step size, and Use the reduced code rate as the code rate of the next cycle, and simultaneously reset the count value of the counter to zero; when the count value in the counter is greater than the second judgment threshold, increase the current code rate according to the preset code rate step rate, and use the increased code rate as the code rate for the next period, and reset the count value of the counter to zero.

进一步地,所述方法还包括:判断上一次进行的码率调整是否为下降码率,若是,将所述预设码率步长增加至预设值,并按照增加后的预设值下降当前码率;判断上一次进行的码率调整是否为提高码率,若是,将所述预设码率步长增加至预设值,并按照增加后的预设值提高当前码率。Further, the method further includes: judging whether the code rate adjustment performed last time is to decrease the code rate, and if so, increasing the preset code rate step size to a preset value, and decreasing the current code rate according to the increased preset value. Code rate: determine whether the code rate adjustment performed last time is to increase the code rate, if so, increase the preset code rate step size to a preset value, and increase the current code rate according to the increased preset value.

进一步地,所述推流按照下述方式生成:将预先采集的音视频数据经过编码器进行编码,并将编码后的音视频数据经过封包后通过实时消息传输协议RTMP进行传输,以生成所述推流。Further, the push stream is generated in the following manner: encode the pre-collected audio and video data through an encoder, and transmit the encoded audio and video data through the real-time message transmission protocol RTMP after being packaged, so as to generate the Push flow.

为实现上述目的,本申请实施方式另一方面还提供一种网络推流质量的优化系统,所述系统包括:流数据收集控制模块,用于按照预设周期采集推流的特征信息,所述特征信息包括平均码率、平均帧率、缓冲区数据吞吐量、每帧TCP平均发送时长;自适应码率控制模块,用于根据当前每帧TCP平均发送时长以及当前缓冲区数据吞吐量,对下一周期的码率进行调整,并将调整后的码率作为目标码率反馈至编码器;动态帧率控制模块,用于根据当前缓冲区数据吞吐量,对下一周期的帧率进行调整,并根据调整后的帧率确定两帧之间的时间间隔;基于确定的所述时间间隔对进入编码器的音视频数据进行过滤,以生成符合调整后的帧率的音视频数据;传输控制模块,用于按照调整后的码率和调整后的帧率进行音视频数据的编码及传输。In order to achieve the above purpose, another embodiment of the present application also provides a system for optimizing the quality of network streaming, the system includes: a streaming data collection control module, used to collect characteristic information of streaming according to a preset period, and the Feature information includes average code rate, average frame rate, buffer data throughput, and average TCP sending time per frame; the adaptive code rate control module is used to control the The code rate of the next cycle is adjusted, and the adjusted code rate is fed back to the encoder as the target code rate; the dynamic frame rate control module is used to adjust the frame rate of the next cycle according to the current buffer data throughput , and determine the time interval between two frames according to the adjusted frame rate; filter the audio and video data entering the encoder based on the determined time interval to generate audio and video data that conforms to the adjusted frame rate; transmission control The module is used for encoding and transmitting audio and video data according to the adjusted code rate and the adjusted frame rate.

进一步地,所述自适应码率控制模块具体包括:第一判断单元,用于当所述当前每帧TCP平均发送时长大于第一预设风险值时,按照预设码率步长下降当前码率,并将下降后的码率作为下一周期的码率;第二判断单元,用于当所述当前每帧TCP平均发送时长小于或者等于所述第一预设风险值时,判断所述当前每帧TCP平均发送时长是否大于第二预设风险值;第三判断单元,用于若所述当前每帧TCP平均发送时长大于第二预设风险值并且当前缓冲区的数据占有率大于预设阈值时,按照预设码率步长下降当前码率,并将下降后的码率作为下一周期的码率。Further, the adaptive code rate control module specifically includes: a first judging unit, configured to decrease the current code rate according to a preset code rate step when the current average TCP transmission duration of each frame is greater than a first preset risk value. rate, and use the reduced code rate as the code rate of the next cycle; the second judging unit is used to judge the Whether the current average sending time of TCP per frame is greater than the second preset risk value; the third judging unit is used to if the current average sending time of TCP per frame is longer than the second preset risk value and the data occupancy rate of the current buffer is greater than the preset risk value When the threshold is set, the current code rate is decreased according to the preset code rate step size, and the reduced code rate is used as the code rate for the next cycle.

进一步地,所述自适应码率控制模块具体包括:吞吐量判断单元,用于判断当前缓冲区的吐出数据量与吞入数据量之间的关系,当吐出数据量大于或者等于吞入数据量时,将计数器的计数值加一;当吐出数据量小于吞入数据量时,将计数器的计数值减一;码率调整单元,用于根据当前计数器中计数值的大小,调整下一周期的码率。Further, the adaptive code rate control module specifically includes: a throughput judging unit for judging the relationship between the amount of output data and the amount of data ingested in the current buffer, when the amount of output data is greater than or equal to the amount of data ingested When the count value of the counter is increased by one; when the amount of output data is less than the amount of data swallowed, the count value of the counter is decreased by one; the code rate adjustment unit is used to adjust the value of the next cycle according to the size of the count value in the current counter code rate.

本发明实施方式利用码率与帧率调整相互配合作用,一方面有效控制网络波动情况下的音视频数据发送量,缓解网络拥塞,同时又能给播放端带来流畅的观看体验;另一方面在网络质量恢复时能够确保音视频的码率帧率是以设定的最优质量配置进行推流,并且能使不同码率帧率配置切换时以一种更为平滑的方式进行,不会给观看端带来画质波动的突兀感。The embodiment of the present invention utilizes the interaction between the code rate and the frame rate adjustment to effectively control the amount of audio and video data sent in the case of network fluctuations on the one hand, relieve network congestion, and at the same time bring a smooth viewing experience to the playback terminal; on the other hand When the network quality is restored, it can ensure that the bit rate and frame rate of audio and video are pushed with the optimal quality configuration set, and it can switch between different bit rate and frame rate configurations in a smoother way, without It brings an abrupt sense of image quality fluctuations to the viewing end.

参照后文的说明和附图,详细公开了本申请的特定实施方式,指明了本申请的原理可以被采用的方式。应该理解,本申请的实施方式在范围上并不因而受到限制。在所附权利要求的精神和条款的范围内,本申请的实施方式包括许多改变、修改和等同。With reference to the following description and accompanying drawings, specific embodiments of the present application are disclosed in detail, indicating the manner in which the principles of the application may be employed. It should be understood that the embodiments of the present application are not limited thereby in scope. Embodiments of the present application encompass many changes, modifications and equivalents within the spirit and scope of the appended claims.

针对一种实施方式描述和/或示出的特征可以以相同或类似的方式在一个或更多个其它实施方式中使用,与其它实施方式中的特征相组合,或替代其它实施方式中的特征。Features described and/or illustrated with respect to one embodiment can be used in the same or similar manner in one or more other embodiments, in combination with, or instead of features in other embodiments .

应该强调,术语“包括/包含”在本文使用时指特征、整件、步骤或组件的存在,但并不排除一个或更多个其它特征、整件、步骤或组件的存在或附加。It should be emphasized that the term "comprising/comprising" when used herein refers to the presence of a feature, integer, step or component, but does not exclude the presence or addition of one or more other features, integers, steps or components.

附图说明Description of drawings

所包括的附图用来提供对本申请实施方式的进一步的理解,其构成了说明书的一部分,用于例示本申请的实施方式,并与文字描述一起来阐释本申请的原理。显而易见地,下面描述中的附图仅仅是本申请的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。在附图中:The included drawings are used to provide further understanding of the embodiments of the present application, which constitute a part of the specification, are used to illustrate the embodiments of the present application, and explain the principles of the present application together with the text description. Apparently, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without any creative effort. In the attached picture:

图1为本申请实施方式提供的一种网络推流质量的优化方法的流程图;FIG. 1 is a flow chart of a method for optimizing the quality of network streaming provided by an embodiment of the present application;

图2为本申请实施方式中网络推流质量优化的原理图;FIG. 2 is a schematic diagram of network push quality optimization in an embodiment of the present application;

图3为本申请实施方式中码率调整的流程图;Fig. 3 is the flowchart of code rate adjustment in the embodiment of the present application;

图4为本申请实施方式提供的一种网络推流质量的优化系统的功能模块图。FIG. 4 is a functional block diagram of a system for optimizing the quality of network streaming provided by an embodiment of the present application.

具体实施方式detailed description

为了使本技术领域的人员更好地理解本申请中的技术方案,下面将结合本申请实施方式中的附图,对本申请实施方式中的技术方案进行清楚、完整地描述,显然,所描述的实施方式仅仅是本申请一部分实施方式,而不是全部的实施方式。基于本申请中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施方式,都应当属于本申请保护的范围。In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described The implementations are only some of the implementations of the present application, not all of them. Based on the implementation manners in this application, all other implementation manners obtained by persons of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.

图1为本申请实施方式提供的一种网络推流质量的优化方法的流程图。虽然下文描述流程包括以特定顺序出现的多个操作,但是应该清楚了解,这些过程可以包括更多或更少的操作,这些操作可以顺序执行或并行执行(例如使用并行处理器或多线程环境)。如图1所示,所述方法可以包括:FIG. 1 is a flow chart of a method for optimizing the quality of network streaming provided by an embodiment of the present application. Although the processes described below include multiple operations occurring in a particular order, it should be clearly understood that these processes may include more or fewer operations, which may be performed sequentially or in parallel (e.g., using parallel processors or a multi-threaded environment). . As shown in Figure 1, the method may include:

步骤S1:按照预设周期采集推流的特征信息,所述特征信息包括平均码率、平均帧率、缓冲区数据吞吐量、每帧TCP平均发送时长。Step S1: Collect feature information of streaming according to a preset period, and the feature information includes average code rate, average frame rate, buffer data throughput, and average TCP sending time of each frame.

在本实施方式种,可以对当前系统的推流进行一段时间的数据采集,以获取推流的历史数据。具体地,请参阅图2,源音视频文件通过音视频采集模块可以进行采样操作,从而能够从源音视频文件中采集音视频数据。在实际应用过程中,音视频采集模块可以按照预设采样周期进行音视频数据采集。In this embodiment, data collection may be performed on the push stream of the current system for a period of time to obtain historical data of the push stream. Specifically, referring to FIG. 2 , the source audio and video files can be sampled through the audio and video acquisition module, so that audio and video data can be collected from the source audio and video files. In the actual application process, the audio and video acquisition module can collect audio and video data according to the preset sampling period.

在本实施方式种,采集的音视频数据可以进入编码器,以编码器中设置的编码格式和码率进行编码。编码后的音视频帧在经过封包后,便可以通过传输控制模块中的实时消息传输协议(Real Time Messaging Protocol,RTMP)进行传输,以生成所述推流。即将传输的音视频数据可以暂存于所述传输控制模块中的发送缓冲区内,这样,可以保证音视频数据能够实时传输。In this embodiment, the collected audio and video data can enter the encoder and be encoded with the encoding format and bit rate set in the encoder. After the encoded audio and video frames are packaged, they can be transmitted through the Real Time Messaging Protocol (RTMP) in the transmission control module to generate the push stream. The audio and video data to be transmitted can be temporarily stored in the sending buffer in the transmission control module, so that the real-time transmission of the audio and video data can be guaranteed.

在本实施方式中,可以通过流数据收集控制模块按照预设周期采集推流的特征信息,所述特征信息可以包括平均码率、平均帧率、缓冲区数据吞吐量、每帧TCP平均发送时长。In this embodiment, the stream data collection control module can be used to collect the feature information of the push stream according to the preset period, and the feature information can include the average bit rate, the average frame rate, the buffer data throughput, and the average TCP sending time of each frame .

步骤S2:根据当前每帧TCP平均发送时长以及当前缓冲区数据吞吐量,对下一周期的码率进行调整,并将调整后的码率作为目标码率反馈至编码器。Step S2: According to the current average TCP transmission time of each frame and the current buffer data throughput, the code rate of the next cycle is adjusted, and the adjusted code rate is fed back to the encoder as the target code rate.

在本实施方式中,为了对推流质量进行优化,可以对采集的当前特征信息进行分析,从而能够预测下一个周期是否需要调整推流的码率和帧率。具体地,可以根据当前每帧TCP平均发送时长以及当前缓冲区数据吞吐量,对下一周期的码率进行调整。请参阅图3,当所述当前每帧TCP平均发送时长大于第一预设风险值时,则表明可能即将发生缓冲区内丢帧的情况,此时可以按照预设码率步长下降当前码率,并将下降后的码率作为下一周期的码率。In this embodiment, in order to optimize the streaming quality, the collected current feature information can be analyzed, so as to predict whether the code rate and frame rate of streaming need to be adjusted in the next cycle. Specifically, the code rate of the next period may be adjusted according to the current average TCP transmission duration of each frame and the current buffer data throughput. Please refer to Fig. 3, when the current average TCP sending duration of each frame is greater than the first preset risk value, it indicates that frame loss in the buffer may be about to occur, and the current code rate can be decreased according to the preset code rate step rate, and use the reduced code rate as the code rate for the next cycle.

当所述当前每帧TCP平均发送时长小于或者等于所述第一预设风险值时,可以继续判断所述当前每帧TCP平均发送时长是否大于第二预设风险值。其中,所述第二预设风险值可以小于所述第一预设风险值。When the current average TCP transmission duration per frame is less than or equal to the first preset risk value, it may continue to determine whether the current average TCP transmission duration per frame is greater than a second preset risk value. Wherein, the second preset risk value may be smaller than the first preset risk value.

若所述当前每帧TCP平均发送时长大于第二预设风险值并且当前缓冲区的数据占有率大于预设阈值时,同样可能发生缓冲区内丢帧的情况,此时可以按照预设码率步长下降当前码率,并将下降后的码率作为下一周期的码率。If the current TCP average sending time of each frame is greater than the second preset risk value and the data occupancy rate of the current buffer is greater than the preset threshold, the situation of frame loss in the buffer may also occur. At this time, the preset code rate can be used The step size decreases the current code rate, and the reduced code rate is used as the code rate for the next cycle.

在本实施方式中,对于每个周期内的码率均可以进行分析,并实时预测下一个周期的码率。在实际应用过程中,当网络发生波动时,可能会导致连续几个周期的码率均需要下降。在这种情况下,为了能够减少码率下降的次数,可以相应地增加码率下降的速率。具体地,可以判断上一次进行的码率调整是否为下降码率,若是,表明当前的网络条件处于码率连续下降的情况,这样便可以将所述预设码率步长增加至预设值,从而提高码率下降的速度,并按照增加后的预设值下降当前码率。In this embodiment, the code rate in each cycle can be analyzed, and the code rate in the next cycle can be predicted in real time. In actual application, when the network fluctuates, it may cause the code rate to decrease for several consecutive cycles. In this case, in order to reduce the number of code rate drops, the rate of code rate drops can be increased accordingly. Specifically, it can be determined whether the code rate adjustment performed last time is a decrease in the code rate, and if so, it indicates that the current network condition is in a situation in which the code rate continues to decrease, so that the preset code rate step size can be increased to the preset value , so as to increase the speed of bit rate decrease, and decrease the current bit rate according to the increased preset value.

在本实施方式中,可以对缓冲区数据吞吐量进行分析,以确定是否需要调整下一个周期的码率。具体地,可以判断当前缓冲区的吐出数据量与吞入数据量之间的关系,当吐出数据量大于或者等于吞入数据量时,可以将计数器的计数值加一;当吐出数据量小于吞入数据量时,可以将计数器的计数值减一。这样,根据计数器中计数值的大小,便可以获知之前几个周期内吐出数据量与吞入数据量的大小关系,从而可以根据当前计数器中计数值的大小,调整下一周期的码率。In this embodiment, the buffer data throughput may be analyzed to determine whether the code rate of the next cycle needs to be adjusted. Specifically, the relationship between the output data volume and the ingested data volume of the current buffer can be judged. When the output data volume is greater than or equal to the ingested data volume, the count value of the counter can be increased by one; when the output data volume is less than the ingested data volume When the amount of data is input, the count value of the counter can be decremented by one. In this way, according to the size of the count value in the counter, the relationship between the amount of output data and the amount of data swallowed in the previous few cycles can be known, so that the code rate of the next cycle can be adjusted according to the size of the count value in the current counter.

具体地,当所述计数器中的计数值小于第一判定阈值时,则说明缓冲区连续几次都是数据吞入量大于数据吐出量。例如,所述第一判定阈值可以是-3,这样,可以表明缓冲区连续3次以上都是数据吞入量大于数据吐出量。这种情况下会产生丢帧的风险,因此可以按照预设码率步长下降当前码率,并将下降后的码率作为下一周期的码率,同时将所述计数器的计数值归零。Specifically, when the count value in the counter is smaller than the first determination threshold, it indicates that the amount of data ingested in the buffer is greater than the amount of data output for several consecutive times. For example, the first determination threshold may be -3, so that it may indicate that the data ingested into the buffer is greater than the data outputted for more than three consecutive times. In this case, there will be a risk of frame loss, so the current code rate can be reduced according to the preset code rate step, and the reduced code rate will be used as the code rate for the next cycle, and the count value of the counter will be reset to zero .

当所述计数器中的计数值大于第二判定阈值时,则说明缓冲区连续几次都是数据吐出量大于数据吞入量。例如,所述第二判定阈值可以是3,这样,可以表明缓冲区连续3次以上都是数据吐出量大于数据吞入量。这种情况下表明网络状态良好,带宽足够,因此可以按照预设码率步长提高当前码率,并将提高后的码率作为下一周期的码率,同时将所述计数器的计数值归零。When the count value in the counter is greater than the second determination threshold, it indicates that the data output volume of the buffer is greater than the data ingestion volume for several consecutive times. For example, the second determination threshold may be 3, so that it may indicate that the amount of data output from the buffer is greater than the amount of data ingestion for more than three consecutive times. In this case, it indicates that the network is in good condition and the bandwidth is sufficient, so the current code rate can be increased according to the preset code rate step, and the increased code rate can be used as the code rate for the next cycle, and the count value of the counter can be returned to zero.

在本实施方式中,在对缓冲区数据吞吐量进行判断时,可以判断上一次进行的码率调整是否为下降码率,若是,则表明当前的网络条件处于码率连续下降的情况,于是可以将所述预设码率步长增加至预设值,以提高码率下降的速率,并按照增加后的预设值下降当前码率;In this embodiment, when judging the buffer data throughput, it can be judged whether the code rate adjustment performed last time is to reduce the code rate. Increase the preset code rate step to a preset value to increase the rate of code rate decrease, and decrease the current code rate according to the increased preset value;

此外,还可以判断上一次进行的码率调整是否为提高码率,若是,则表明当前的网络条件处于码率连续上升的情况,于是可以将所述预设码率步长增加至预设值,以提高码率上升的速率,并按照增加后的预设值提高当前码率。In addition, it can also be judged whether the code rate adjustment performed last time was to increase the code rate. If so, it indicates that the current network condition is in a situation where the code rate continues to rise, so the preset code rate step size can be increased to a preset value , to increase the bit rate increase rate, and increase the current bit rate according to the increased preset value.

这样,通过对当前每帧TCP平均发送时长以及当前缓冲区数据吞吐量进行分析,从而可以实时预测下一个周期的传输码率,能够实现码率的灵活切换。由于是每个周期进行分析,也避免了码率切换过于跳跃,保证用户的流畅观看体验。In this way, by analyzing the current average TCP transmission time of each frame and the current buffer data throughput, the transmission code rate of the next cycle can be predicted in real time, and the code rate can be switched flexibly. Since the analysis is performed every cycle, it also avoids excessive jumps in bit rate switching, ensuring a smooth viewing experience for users.

步骤S3:根据当前缓冲区数据吞吐量,对下一周期的帧率进行调整,并根据调整后的帧率确定两帧之间的时间间隔;基于确定的所述时间间隔对进入编码器的音视频数据进行过滤,以生成符合调整后的帧率的音视频数据。Step S3: Adjust the frame rate of the next cycle according to the current buffer data throughput, and determine the time interval between two frames according to the adjusted frame rate; The video data is filtered to generate audio and video data conforming to the adjusted frame rate.

在本实施方式中,可以采用与步骤S2中类似的方式,对当前缓冲区数据吞吐量进行分析,从而可以对下一周期的帧率进行调整。调整后的帧率可以表明两帧之间的时间间隔,通过该时间间隔,从而可以对进入编码器的音视频数据进行过滤,以生成符合调整后的帧率的音视频数据。In this embodiment, the current buffer data throughput can be analyzed in a manner similar to that in step S2, so that the frame rate of the next cycle can be adjusted. The adjusted frame rate can indicate the time interval between two frames, and through the time interval, the audio and video data entering the encoder can be filtered to generate audio and video data conforming to the adjusted frame rate.

需要说明的是,在本实施方式中,码率调整的过程可以在自适应码率控制模块中进行,帧率调整的过程可以在动态帧率控制模块中进行。在各种对比过程中,各个比较的阈值可以根据TCP发送时长预测算子或者缓冲区大小预测算子进行确定。所述自适应码率控制模块和所述动态帧率控制模块可以由自适应流质量控制模块同一管理。以上所述的自适应码率模块和动态帧率控制模块可单独开启或关闭,使用者可根据自身的需求来决定该技术方案的应用形态。如果使用场景要求尽量保持较高画质推流,则可使用动态帧率控制模块,优先调节帧率来控制单位时间内进入编码器的数据量,从而控制传输数据量;反之对帧率要求较高的场景则可优先使用自适应码率控制模块。It should be noted that, in this embodiment, the code rate adjustment process can be performed in the adaptive code rate control module, and the frame rate adjustment process can be performed in the dynamic frame rate control module. In various comparison processes, the thresholds for each comparison may be determined according to a TCP sending time prediction operator or a buffer size prediction operator. The adaptive code rate control module and the dynamic frame rate control module may be managed by an adaptive stream quality control module. The adaptive code rate module and the dynamic frame rate control module mentioned above can be turned on or off independently, and users can decide the application form of the technical solution according to their own needs. If the use scene requires to keep the high-quality streaming as possible, you can use the dynamic frame rate control module to give priority to adjusting the frame rate to control the amount of data entering the encoder per unit time, so as to control the amount of transmitted data; otherwise, the frame rate is more demanding. In high scenes, the adaptive bit rate control module can be used preferentially.

步骤S4:按照调整后的码率和调整后的帧率进行音视频数据的编码及传输。Step S4: Encoding and transmitting audio and video data according to the adjusted code rate and adjusted frame rate.

在本实施方式种,调整后的帧率可以对音视频采集模块采集的音视频数据进行调节,调整后的码率可以应用于编码器中,对编码器中处理的数据进行调节。这样,按照调整后的码率和调整后的帧率,便可以进行音视频数据的编码及传输。In this embodiment, the adjusted frame rate can adjust the audio and video data collected by the audio and video acquisition module, and the adjusted code rate can be applied to the encoder to adjust the data processed in the encoder. In this way, audio and video data can be encoded and transmitted according to the adjusted code rate and adjusted frame rate.

请参阅图4,本申请实施方式还提供一种网络推流质量的优化系统,所述系统包括:Please refer to Figure 4, the embodiment of the present application also provides a system for optimizing the quality of network streaming, and the system includes:

流数据收集控制模块100,用于按照预设周期采集推流的特征信息,所述特征信息包括平均码率、平均帧率、缓冲区数据吞吐量、每帧TCP平均发送时长;The stream data collection control module 100 is used to collect feature information of the push stream according to a preset period, and the feature information includes an average code rate, an average frame rate, buffer data throughput, and an average TCP transmission time per frame;

自适应码率控制模块200,用于根据当前每帧TCP平均发送时长以及当前缓冲区数据吞吐量,对下一周期的码率进行调整,并将调整后的码率作为目标码率反馈至编码器;The adaptive code rate control module 200 is used to adjust the code rate of the next cycle according to the current average TCP transmission time of each frame and the current buffer data throughput, and feed back the adjusted code rate as the target code rate to the coder device;

动态帧率控制模块300,用于根据当前缓冲区数据吞吐量,对下一周期的帧率进行调整,并根据调整后的帧率确定两帧之间的时间间隔;基于确定的所述时间间隔对进入编码器的音视频数据进行过滤,以生成符合调整后的帧率的音视频数据;The dynamic frame rate control module 300 is used to adjust the frame rate of the next cycle according to the current buffer data throughput, and determine the time interval between two frames according to the adjusted frame rate; based on the determined time interval Filter the audio and video data entering the encoder to generate audio and video data that conforms to the adjusted frame rate;

传输控制模块400,用于按照调整后的码率和调整后的帧率进行音视频数据的编码及传输。The transmission control module 400 is used for encoding and transmitting audio and video data according to the adjusted code rate and adjusted frame rate.

在本申请实施方式中,所述自适应码率控制模块200具体包括:In the implementation manner of this application, the adaptive code rate control module 200 specifically includes:

第一判断单元,用于当所述当前每帧TCP平均发送时长大于第一预设风险值时,按照预设码率步长下降当前码率,并将下降后的码率作为下一周期的码率;The first judging unit is used to decrease the current code rate according to the preset code rate step when the current TCP average transmission duration of each frame is greater than the first preset risk value, and use the code rate after the decrease as the next period's code rate code rate;

第二判断单元,用于当所述当前每帧TCP平均发送时长小于或者等于所述第一预设风险值时,判断所述当前每帧TCP平均发送时长是否大于第二预设风险值;A second judging unit, configured to judge whether the current average TCP transmission duration per frame is greater than a second preset risk value when the current average TCP transmission duration per frame is less than or equal to the first preset risk value;

第三判断单元,用于若所述当前每帧TCP平均发送时长大于第二预设风险值并且当前缓冲区的数据占有率大于预设阈值时,按照预设码率步长下降当前码率,并将下降后的码率作为下一周期的码率。The third judging unit is configured to decrease the current code rate according to the preset code rate step if the current average TCP transmission duration of each frame is greater than the second preset risk value and the data occupancy rate of the current buffer is greater than the preset threshold, And use the reduced code rate as the code rate for the next cycle.

在本申请实施方式中,所述自适应码率控制模块200具体包括:In the implementation manner of this application, the adaptive code rate control module 200 specifically includes:

吞吐量判断单元,用于判断当前缓冲区的吐出数据量与吞入数据量之间的关系,当吐出数据量大于或者等于吞入数据量时,将计数器的计数值加一;当吐出数据量小于吞入数据量时,将计数器的计数值减一;The throughput judging unit is used to judge the relationship between the output data volume and the ingested data volume of the current buffer. When the output data volume is greater than or equal to the ingested data volume, the count value of the counter is increased by one; when the output data volume When it is less than the amount of swallowed data, decrement the count value of the counter by one;

码率调整单元,用于根据当前计数器中计数值的大小,调整下一周期的码率。The code rate adjustment unit is configured to adjust the code rate of the next period according to the value of the count value in the current counter.

本发明实施方式利用码率与帧率调整相互配合作用,一方面有效控制网络波动情况下的音视频数据发送量,缓解网络拥塞,同时又能给播放端带来流畅的观看体验;另一方面在网络质量恢复时能够确保音视频的码率帧率是以设定的最优质量配置进行推流,并且能使不同码率帧率配置切换时以一种更为平滑的方式进行,不会给观看端带来画质波动的突兀感。The embodiment of the present invention utilizes the interaction between the code rate and the frame rate adjustment to effectively control the amount of audio and video data sent in the case of network fluctuations on the one hand, relieve network congestion, and at the same time bring a smooth viewing experience to the playback terminal; on the other hand When the network quality is restored, it can ensure that the bit rate and frame rate of audio and video are pushed with the optimal quality configuration set, and it can switch between different bit rate and frame rate configurations in a smoother way, without It brings an abrupt sense of image quality fluctuations to the viewing end.

上面对本申请的各种实施方式的描述以描述的目的提供给本领域技术人员。其不旨在是穷举的、或者不旨在将本发明限制于单个公开的实施方式。如上所述,本申请的各种替代和变化对于上述技术所属领域技术人员而言将是显而易见的。因此,虽然已经具体讨论了一些另选的实施方式,但是其它实施方式将是显而易见的,或者本领域技术人员相对容易得出。本申请旨在包括在此已经讨论过的本发明的所有替代、修改、和变化,以及落在上述申请的精神和范围内的其它实施方式。The foregoing description of various embodiments of the present application is provided for those skilled in the art for purposes of illustration. It is not intended to be exhaustive or to limit the invention to a single disclosed embodiment. As described above, various alterations and modifications of the present application will be apparent to those skilled in the art to which the above technologies pertain. Thus, while a few alternative implementations have been discussed in detail, other implementations will be apparent, or relatively readily arrived at, by those skilled in the art. This application is intended to cover all alternatives, modifications, and variations of the invention that have been discussed herein, as well as other embodiments that fall within the spirit and scope of the above application.

Claims (10)

1. a kind of optimization method of network plug-flow quality, it is characterised in that methods described includes:
The characteristic information of plug-flow is gathered according to predetermined period, the characteristic information includes average bit rate, average frame per second, number of buffer Duration is averagely sent according to handling capacity, per frame TCP;
Duration and current buffer data throughout are averagely sent according to current every frame TCP, the code check in next cycle is carried out Adjustment, and the code check after adjustment is fed back into encoder as target bit rate;
According to current buffer data throughout, the frame per second to next cycle is adjusted, and is determined according to the frame per second after adjustment Time interval between two frames;The time interval based on determination is filtered to the audio, video data for entering encoder, with Generation meets the audio, video data of the frame per second after adjustment;
Coding and the transmission of audio, video data are carried out according to the code check after adjustment and the frame per second after adjustment.
2. the optimization method of network plug-flow quality according to claim 1, it is characterised in that put down according to current per frame TCP Duration and current buffer data throughout are sent, the code check in next cycle is adjusted and specifically included:
When current every frame TCP averagely sends duration more than the first default value-at-risk, decline according to default code check step-length and work as Preceding code check, and using the code check after decline as next cycle code check;
When current every frame TCP averagely sends duration less than or equal to the described first default value-at-risk, judgement is described ought It is preceding averagely to send whether duration is more than the second default value-at-risk per frame TCP;
If the current duration that averagely sent per frame TCP is more than the second default value-at-risk and the data occupancy of current buffer During more than predetermined threshold value, current code check is declined according to default code check step-length, and using the code check after decline as next cycle code Rate.
3. the optimization method of network plug-flow quality according to claim 2, it is characterised in that methods described also includes:
Judge that the code check of last progress is regulateed whether to decline code check, if so, the default code check step-length is increased to default Value, and decline current code check according to the preset value after increase.
4. the optimization method of network plug-flow quality according to claim 1, it is characterised in that put down according to current per frame TCP Duration and current buffer data throughout are sent, the code check in next cycle is adjusted and specifically included:
The relation for judging the discharge data volume of current buffer and swallowing between data volume, when discharge data volume is more than or equal to When swallowing data volume, the count value of counter is added one;When discharge data volume, which is less than, swallows data volume, by the counting of counter Value subtracts one;
According to the size of nonce counter count value, the code check in next cycle is adjusted.
5. the optimization method of network plug-flow quality according to claim 4, it is characterised in that fallen into a trap according to nonce counter The size of numerical value, the code check for adjusting next cycle is specifically included:
When the count value in the counter is less than the first decision threshold, current code check is declined according to default code check step-length, and Using the code check after decline as next cycle code check, while by the counting value returns of the counter;
When the count value in the counter is more than the second decision threshold, current code check is improved according to default code check step-length, and Using the code check after raising as next cycle code check, while by the counting value returns of the counter.
6. the optimization method of network plug-flow quality according to claim 5, it is characterised in that methods described also includes:
Judge that the code check of last progress is regulateed whether to decline code check, if so, the default code check step-length is increased to default Value, and decline current code check according to the preset value after increase;
Judge that the code check of last progress is regulateed whether to improve code check, if so, the default code check step-length is increased to default Value, and improve current code check according to the preset value after increase.
7. the optimization method of network plug-flow quality according to claim 1, it is characterised in that the plug-flow is according to following sides Formula is generated:
The encoded device of the audio, video data gathered in advance is encoded, and by the audio, video data after coding after package It is transmitted by real-time messages host-host protocol RTMP, to generate the plug-flow.
8. a kind of optimization system of network plug-flow quality, it is characterised in that the system includes:
Flow data collects control module, the characteristic information for gathering plug-flow according to predetermined period, and the characteristic information includes flat Equal code check, average frame per second, buffer data handling capacity, every frame TCP averagely send duration;
Adaptive rate control module, for averagely sending duration and current buffer data throughput according to current every frame TCP Amount, is adjusted, and the code check after adjustment is fed back into encoder as target bit rate to the code check in next cycle;
Dynamic frame rate control module, for according to current buffer data throughout, the frame per second to next cycle to be adjusted, and Time interval between two frames is determined according to the frame per second after adjustment;The time interval based on determination is to the sound into encoder Video data is filtered, to generate the audio, video data for meeting the frame per second after adjustment;
Transmission control module, coding and biography for carrying out audio, video data according to the code check after adjustment and the frame per second after adjustment It is defeated.
9. the optimization system of network plug-flow quality according to claim 8, it is characterised in that the adaptive rate control Module is specifically included:
First judging unit, for when current every frame TCP averagely sends duration more than the first default value-at-risk, according to pre- If code check step-length declines current code check, and using the code check after decline as next cycle code check;
Second judging unit, for when the current duration that averagely sent per frame TCP is less than or equal to the described first default wind During the value of danger, judge the current duration that averagely sent per frame TCP whether more than the second default value-at-risk;
3rd judging unit, if presetting value-at-risk more than second and current for the current duration that averagely sent per frame TCP When the data occupancy of buffering area is more than predetermined threshold value, current code check is declined according to default code check step-length, and by the code after decline Rate as next cycle code check.
10. the optimization system of network plug-flow quality according to claim 8, it is characterised in that the self-adaption code rate control Molding block is specifically included:
Handling capacity judging unit, for the relation for judging the discharge data volume of current buffer and swallowing between data volume, when telling Go out data volume more than or equal to when swallowing data volume, the count value of counter is added one;Number is swallowed when discharge data volume is less than During according to amount, the count value of counter is subtracted one;
Code check adjustment unit, for the size according to nonce counter count value, adjusts the code check in next cycle.
CN201710199908.3A 2017-03-30 2017-03-30 The optimization method and optimization system of a kind of network plug-flow quality Pending CN107026856A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710199908.3A CN107026856A (en) 2017-03-30 2017-03-30 The optimization method and optimization system of a kind of network plug-flow quality
PCT/CN2018/079677 WO2018177165A1 (en) 2017-03-30 2018-03-20 Method and system for optimizing quality network pushed stream

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710199908.3A CN107026856A (en) 2017-03-30 2017-03-30 The optimization method and optimization system of a kind of network plug-flow quality

Publications (1)

Publication Number Publication Date
CN107026856A true CN107026856A (en) 2017-08-08

Family

ID=59526423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710199908.3A Pending CN107026856A (en) 2017-03-30 2017-03-30 The optimization method and optimization system of a kind of network plug-flow quality

Country Status (2)

Country Link
CN (1) CN107026856A (en)
WO (1) WO2018177165A1 (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107277568A (en) * 2017-08-16 2017-10-20 广州市千钧网络科技有限公司 A kind of plug-flow configuration parameter dynamic adjusting method and device
CN108282491A (en) * 2018-02-27 2018-07-13 北京奇艺世纪科技有限公司 A kind of method and device of assessment plug-flow quality
CN108600758A (en) * 2018-03-26 2018-09-28 南京地铁建设有限责任公司 I vertical frame dimensions burst code stream shaping methods based on city rail passenger information system
WO2018177165A1 (en) * 2017-03-30 2018-10-04 上海七牛信息技术有限公司 Method and system for optimizing quality network pushed stream
CN109168013A (en) * 2018-09-19 2019-01-08 广州华多网络科技有限公司 A kind of method, apparatus, equipment and computer readable storage medium for taking out frame
CN109743639A (en) * 2018-12-25 2019-05-10 深圳市麦谷科技有限公司 A kind of method for controlling self-adaption code rate, system, computer equipment and storage medium
CN109874027A (en) * 2019-03-11 2019-06-11 宸瑞普惠(广州)科技有限公司 A kind of low delay educational surgery demonstration live broadcasting method and its system
CN109922307A (en) * 2017-12-12 2019-06-21 杭州萤石软件有限公司 Multimedia data transmission method and camera
CN109996094A (en) * 2017-12-29 2019-07-09 杭州海康威视系统技术有限公司 Video broadcasting method, apparatus and system
CN110535810A (en) * 2018-05-25 2019-12-03 视联动力信息技术股份有限公司 A kind of processing method and terminal of video data
CN110958540A (en) * 2018-09-26 2020-04-03 炬芯(珠海)科技有限公司 USB audio conversion method and device
CN111385574A (en) * 2018-12-28 2020-07-07 北京字节跳动网络技术有限公司 Code rate control method and device in video coding, mobile terminal and storage medium
CN112087627A (en) * 2020-08-04 2020-12-15 西安万像电子科技有限公司 Image coding control method, device, equipment and storage medium
CN113206846A (en) * 2021-04-29 2021-08-03 杭州当虹科技股份有限公司 Method and device for dynamically adjusting sending code rate
CN113965752A (en) * 2021-09-27 2022-01-21 微梦创科网络科技(中国)有限公司 SRT plug flow code rate self-adaption method and system
CN114885209A (en) * 2022-04-08 2022-08-09 车智互联(北京)科技有限公司 Live data processing method, computing device and readable storage medium
CN116132717A (en) * 2021-11-12 2023-05-16 中兴通讯股份有限公司 Inward code stream code rate acquisition method, stream receiving processing method, electronic equipment and medium
CN116248598A (en) * 2023-03-27 2023-06-09 阿里巴巴(中国)有限公司 Bit rate determination method, electronic equipment and storage medium applied to audio and video transmission
WO2023159911A1 (en) * 2022-02-24 2023-08-31 广州市保伦电子有限公司 Audio/video interaction low-delay transmission method and background server

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110366035B (en) * 2019-07-19 2021-08-24 广州酷狗计算机科技有限公司 Frame rate control method, apparatus, computer device and computer-readable storage medium
CN112702649B (en) * 2019-10-22 2024-12-20 高新兴科技集团股份有限公司 A method for optimizing the smoothness of live video playback on a mobile terminal, a storage medium, and an electronic device
CN112714315B (en) * 2019-10-24 2023-02-28 上海交通大学 Layered buffering method and system based on panoramic video
CN113094239B (en) * 2021-04-27 2022-12-06 上海哔哩哔哩科技有限公司 Method for determining reason of live broadcast abnormity and server
CN115412776B (en) * 2021-05-28 2024-10-18 华为技术有限公司 A network quality assessment method and device in video transmission in near-field scenarios
CN113905249B (en) * 2021-09-30 2023-06-06 上海哔哩哔哩科技有限公司 Plug flow abnormality detection method and device
CN113905200B (en) * 2021-10-08 2023-07-11 山东亚华电子股份有限公司 Video processing method and device based on statistics
CN114222157B (en) * 2021-12-22 2024-05-10 厦门视诚科技有限公司 Multi-input signal portable pilot broadcast plug flow pre-monitoring system
CN114363209B (en) * 2022-01-07 2024-05-28 北京百度网讯科技有限公司 Performance detection method, device, equipment and storage medium based on TCP network
CN114051142B (en) * 2022-01-13 2022-04-29 深圳市麦谷科技有限公司 Hardware multi-channel coding anti-shake method and device, intelligent terminal and storage medium
CN115460406B (en) * 2022-08-31 2025-09-19 咪咕文化科技有限公司 Code rate adjusting method, device, electronic equipment and storage medium
CN115665485B (en) * 2022-12-26 2023-04-28 杭州星犀科技有限公司 Video picture optimization method and device, storage medium and video terminal
CN116055724B (en) * 2023-02-09 2025-03-21 西安万像电子科技有限公司 A multimedia code stream shaping method, device and storage medium for ensuring delay
CN116634203B (en) * 2023-07-18 2023-09-19 湖南马栏山视频先进技术研究院有限公司 Multi-collaborative self-adaptive video quality optimization method
CN116684668B (en) * 2023-08-03 2023-10-20 湖南马栏山视频先进技术研究院有限公司 Self-adaptive video frame processing method and playing terminal
CN117440209B (en) * 2023-12-15 2024-03-01 牡丹江师范学院 Implementation method and system based on singing scene
CN118158485B (en) * 2024-03-12 2024-09-24 广州市匠思元数字科技有限公司 A virtual live broadcast method and system based on real-scene mobile camera equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296184A (en) * 2008-05-30 2008-10-29 华为技术有限公司 Method, system and device for data transmission
CN101771492A (en) * 2008-12-29 2010-07-07 华为技术有限公司 Method and device for adjusting streaming media bit rate
CN102201887A (en) * 2010-03-23 2011-09-28 深圳市金蝶中间件有限公司 Method and device for controlling socket transmission rate
WO2014154822A1 (en) * 2013-03-27 2014-10-02 Jacoti Bvba Method and device for latency adjustment
CN204929081U (en) * 2015-08-26 2015-12-30 重庆西线科技有限公司 Video transmission device
CN106488175A (en) * 2015-08-26 2017-03-08 重庆西线科技有限公司 A kind of video transmission method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107026856A (en) * 2017-03-30 2017-08-08 上海七牛信息技术有限公司 The optimization method and optimization system of a kind of network plug-flow quality

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296184A (en) * 2008-05-30 2008-10-29 华为技术有限公司 Method, system and device for data transmission
CN101771492A (en) * 2008-12-29 2010-07-07 华为技术有限公司 Method and device for adjusting streaming media bit rate
CN102201887A (en) * 2010-03-23 2011-09-28 深圳市金蝶中间件有限公司 Method and device for controlling socket transmission rate
WO2014154822A1 (en) * 2013-03-27 2014-10-02 Jacoti Bvba Method and device for latency adjustment
CN204929081U (en) * 2015-08-26 2015-12-30 重庆西线科技有限公司 Video transmission device
CN106488175A (en) * 2015-08-26 2017-03-08 重庆西线科技有限公司 A kind of video transmission method

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018177165A1 (en) * 2017-03-30 2018-10-04 上海七牛信息技术有限公司 Method and system for optimizing quality network pushed stream
CN107277568A (en) * 2017-08-16 2017-10-20 广州市千钧网络科技有限公司 A kind of plug-flow configuration parameter dynamic adjusting method and device
CN109922307A (en) * 2017-12-12 2019-06-21 杭州萤石软件有限公司 Multimedia data transmission method and camera
CN109996094B (en) * 2017-12-29 2021-08-13 杭州海康威视系统技术有限公司 Video playing method, device and system
CN109996094A (en) * 2017-12-29 2019-07-09 杭州海康威视系统技术有限公司 Video broadcasting method, apparatus and system
CN108282491A (en) * 2018-02-27 2018-07-13 北京奇艺世纪科技有限公司 A kind of method and device of assessment plug-flow quality
CN108600758A (en) * 2018-03-26 2018-09-28 南京地铁建设有限责任公司 I vertical frame dimensions burst code stream shaping methods based on city rail passenger information system
CN110535810A (en) * 2018-05-25 2019-12-03 视联动力信息技术股份有限公司 A kind of processing method and terminal of video data
CN109168013B (en) * 2018-09-19 2020-09-25 广州华多网络科技有限公司 Method, device and equipment for extracting frame and computer readable storage medium
CN109168013A (en) * 2018-09-19 2019-01-08 广州华多网络科技有限公司 A kind of method, apparatus, equipment and computer readable storage medium for taking out frame
CN110958540B (en) * 2018-09-26 2022-02-18 炬芯科技股份有限公司 USB audio conversion method and device
CN110958540A (en) * 2018-09-26 2020-04-03 炬芯(珠海)科技有限公司 USB audio conversion method and device
CN109743639A (en) * 2018-12-25 2019-05-10 深圳市麦谷科技有限公司 A kind of method for controlling self-adaption code rate, system, computer equipment and storage medium
CN109743639B (en) * 2018-12-25 2021-11-09 深圳市麦谷科技有限公司 Self-adaptive code rate control method, system, computer equipment and storage medium
CN111385574A (en) * 2018-12-28 2020-07-07 北京字节跳动网络技术有限公司 Code rate control method and device in video coding, mobile terminal and storage medium
CN109874027A (en) * 2019-03-11 2019-06-11 宸瑞普惠(广州)科技有限公司 A kind of low delay educational surgery demonstration live broadcasting method and its system
CN112087627A (en) * 2020-08-04 2020-12-15 西安万像电子科技有限公司 Image coding control method, device, equipment and storage medium
CN113206846B (en) * 2021-04-29 2022-12-02 杭州当虹科技股份有限公司 Method and device for dynamically adjusting sending code rate
CN113206846A (en) * 2021-04-29 2021-08-03 杭州当虹科技股份有限公司 Method and device for dynamically adjusting sending code rate
CN113965752A (en) * 2021-09-27 2022-01-21 微梦创科网络科技(中国)有限公司 SRT plug flow code rate self-adaption method and system
CN113965752B (en) * 2021-09-27 2024-09-17 微梦创科网络科技(中国)有限公司 SRT plug flow code rate self-adaption method and system
CN116132717A (en) * 2021-11-12 2023-05-16 中兴通讯股份有限公司 Inward code stream code rate acquisition method, stream receiving processing method, electronic equipment and medium
WO2023083143A1 (en) * 2021-11-12 2023-05-19 中兴通讯股份有限公司 Incoming code stream code rate obtaining method, stream receiving processing method, electronic device, and medium
CN116132717B (en) * 2021-11-12 2025-10-03 中兴通讯股份有限公司 Incoming code stream rate acquisition method, incoming code stream processing method, electronic device, and medium
WO2023159911A1 (en) * 2022-02-24 2023-08-31 广州市保伦电子有限公司 Audio/video interaction low-delay transmission method and background server
CN114885209A (en) * 2022-04-08 2022-08-09 车智互联(北京)科技有限公司 Live data processing method, computing device and readable storage medium
CN116248598A (en) * 2023-03-27 2023-06-09 阿里巴巴(中国)有限公司 Bit rate determination method, electronic equipment and storage medium applied to audio and video transmission

Also Published As

Publication number Publication date
WO2018177165A1 (en) 2018-10-04

Similar Documents

Publication Publication Date Title
CN107026856A (en) The optimization method and optimization system of a kind of network plug-flow quality
US11546399B2 (en) Method and apparatus for providing a low latency transmission system using adjustable buffers
US10044466B2 (en) Server-side adaptive bit rate control for DLNA HTTP streaming clients
US10686704B2 (en) Method and apparatus for providing a low latency transmission system using adaptive buffering estimation
US10542064B2 (en) Method, server side and system for computing bandwidth of network transmission of streaming media
JP4838143B2 (en) Transmitter
CN103475902B (en) Video coding and network transmission method and video forwarding server
EP1786136A1 (en) Packet retransmission apparatus, communication system and program
WO2003071806A1 (en) A method for streaming fine granular scalability coded video over an ip network
CN108494698B (en) Congestion control method based on transmission rate
CN110996103A (en) Method for adjusting video coding rate according to network condition
CN106954101B (en) Frame loss control method for low-delay real-time video streaming media wireless transmission
AU2021200428B2 (en) System and method for automatic encoder adjustment based on transport data
JP4834013B2 (en) Transmission device, transmission program, reception device, and reception program
CN118101990B (en) Weak network countermeasure method and device for adaptively reducing frame rate based on dynamic picture capturing
CN109982080A (en) A video transmission method, storage medium, robot and control system
WO2025148499A1 (en) Bandwidth probing method and apparatus, electronic device, and storage medium
CN105306970A (en) Method and device for controlling stream media live broadcast transmitting speed
CN113132766B (en) VBR (visual basic) sending method of TS (transport stream) packaging format
CN114422823A (en) Improved cloud game stream stable transmission method
CN114513620A (en) Method, system and application of video frame loss and supplementary frame transmission based on WebRTC weak network environment
CN117729157A (en) Data processing method, device, electronic equipment and storage medium
CN107483220A (en) A kind of method for controlling quality of service, apparatus and system
CN114245131A (en) Optimization algorithm for dynamically adjusting video code rate based on buffer queue
CN115086285A (en) Data processing method and device, storage medium and electronic equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20170808

RJ01 Rejection of invention patent application after publication