WO2016090991A1 - 流媒体数据的下载方法及装置 - Google Patents

流媒体数据的下载方法及装置 Download PDF

Info

Publication number
WO2016090991A1
WO2016090991A1 PCT/CN2015/090327 CN2015090327W WO2016090991A1 WO 2016090991 A1 WO2016090991 A1 WO 2016090991A1 CN 2015090327 W CN2015090327 W CN 2015090327W WO 2016090991 A1 WO2016090991 A1 WO 2016090991A1
Authority
WO
WIPO (PCT)
Prior art keywords
download
media data
streaming media
code rate
downloading
Prior art date
Application number
PCT/CN2015/090327
Other languages
English (en)
French (fr)
Inventor
杨自清
Original Assignee
深圳Tcl数字技术有限公司
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 深圳Tcl数字技术有限公司 filed Critical 深圳Tcl数字技术有限公司
Publication of WO2016090991A1 publication Critical patent/WO2016090991A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for downloading streaming media data.
  • the main object of the present invention is to provide a method and a device for downloading streaming media data, which aim to improve the effect of playing a picture.
  • a method for downloading streaming media data includes the following steps:
  • step B when entering the current preset time period of streaming media data download, determine whether there is a historical download speed; if yes, execute step C, otherwise perform step D;
  • the method further includes:
  • the minimum value of the average speed of the streaming media data download in each time interval is set as the historical download speed of the current preset time period.
  • the determining whether there is a historical download speed is specifically:
  • the determining, according to the historical download speed, the download code rate in the current preset time period comprises:
  • the obtaining the streaming media data download code rate and the corresponding download link comprises:
  • the present invention further provides a device for downloading streaming media data, including:
  • the obtaining module is configured to obtain a streaming media data downloading code rate and a corresponding download link
  • a judging module configured to determine whether there is a historical download speed when the streaming media data in the current preset time period is downloaded
  • a determining module configured to determine, according to a historical download speed, a download code rate in the current preset time period when there is a historical download speed; and when the historical download speed does not exist, download a code rate according to the obtained streaming media data Determining the download code rate in the current preset time period;
  • the loading module is configured to load the corresponding download link according to the determined download code rate to download the streaming media data in the current preset time period.
  • the downloading device of the streaming media data further includes:
  • a recording module configured to record an average speed of streaming media data downloading in each consecutive time interval in the current preset time period
  • a setting module configured to set a minimum value of the average speed of the streaming media data download in each time interval as a historical download speed of the current preset time period.
  • the determining module is specifically configured to determine whether there is a historical download speed corresponding to consecutive N preset time periods.
  • the determining module comprises:
  • a calculating unit configured to calculate, according to the download code rate, a code rate range corresponding to each download code rate
  • a determining unit configured to determine a download code rate in the current preset time period according to the code rate range described by the historical download speed.
  • the obtaining module comprises:
  • a sending unit configured to send a streaming media data download request to the server
  • a receiving unit configured to receive an index file corresponding to the streaming media data delivered by the server according to the streaming media data download request
  • an analyzing unit configured to obtain, according to the index file, a download code rate of the streaming media data and a corresponding download link.
  • the streaming media data download rate and the corresponding download link are obtained, when the streaming media data in the current preset time period is downloaded, it is determined whether there is a historical download speed; and when there is a historical download speed, according to the history
  • the download speed determines the download rate of the streaming media data within the current preset time period. Since the download code rate of the streaming media data in the current preset time period is adjusted in real time according to the historical download speed, the phenomenon of jamming due to the jitter of the network speed is prevented, and the effect of the screen playback is improved.
  • FIG. 1 is a schematic flowchart of a first embodiment of a method for downloading streaming media data according to the present invention
  • FIG. 2 is a schematic flowchart of a second embodiment of a method for downloading streaming media data according to the present invention
  • FIG. 3 is a schematic diagram of a refinement process for determining a download code rate in an embodiment of a method for downloading streaming media data according to the present invention
  • FIG. 4 is a diagram showing an example of download rate adjustment in an embodiment of a method for downloading streaming media data according to the present invention
  • FIG. 5 is a schematic diagram of a refinement process for obtaining a download code rate and a download link in an embodiment of a method for downloading streaming media data according to the present invention
  • FIG. 6 is a schematic diagram of functional modules of a first embodiment of a device for downloading streaming media data according to the present invention.
  • FIG. 7 is a schematic diagram of functional modules of a second embodiment of a device for downloading streaming media data according to the present invention.
  • FIG. 8 is a schematic diagram of a refinement function module of the determining module in FIG. 7;
  • FIG. 9 is a schematic diagram of a refinement function module of the acquisition module in FIG. 7.
  • the present invention provides a method for downloading streaming media data.
  • the method for downloading streaming media data includes:
  • Step S10 obtaining a streaming media data download code rate and a corresponding download link
  • the method for downloading streaming media data may be applied to video playback control, for example, controlling the download speed of streaming media data (streaming video content) when the smart terminal performs video playback.
  • the foregoing download code rate reflects the playback quality of the streaming media data, for example, the download code rate may be 512 Kbps, 1024. Kbps and so on.
  • Step S20 when entering the current preset time period of the streaming media data download, it is determined whether there is a historical download speed; if so, step S30 is performed, and if not, step S40 is performed;
  • Step S30 determining the download code rate in the current preset time period according to the historical download speed; and proceeding to step S50;
  • Step S40 determining the download code rate in the current preset time period according to the obtained download rate of the streaming media data; and proceeding to step S50;
  • Step S50 Load the corresponding download link to download the streaming media data in the current preset time period according to the determined download code rate.
  • streaming video content is cut into a plurality of shorter video segments according to the independent relationship of a group of pictures (GOP), and is encoded into streaming video files of various code rates, and these files usually have 2-10 seconds of playback time.
  • the streaming media data in each preset time period constitutes one fragment, and each complete streaming media data is composed of a plurality of consecutive fragments, and each fragment has independence, and when downloaded, it may be targeted Different shards are downloaded at different download rates.
  • the streaming media data is downloaded in the current preset time period, it is first determined whether there is a record of the historical download speed.
  • the current preset speed can be determined according to the record of the historical download speed (currently The download code rate corresponding to the slice to be downloaded; if there is no record of the history download speed, the download code rate corresponding to the current preset time period (the slice currently required to be downloaded) may be determined according to the current network.
  • the download code rate of the currently downloaded slice may be determined according to the current network speed; or the obtained streaming media data may be downloaded in the code rate.
  • the lowest download rate is set to the download rate of the currently downloaded slice.
  • the download rate corresponding to the fragment currently needed to be downloaded is determined according to the download speed of the downloaded fragment.
  • the streaming media data download rate and the corresponding download link are obtained, when the streaming media data in the current preset time period is downloaded, it is determined whether there is a historical download speed; and when there is a historical download speed, according to the history
  • the download speed determines the download rate of the streaming media data within the current preset time period. Since the download code rate of the streaming media data in the current preset time period is adjusted in real time according to the historical download speed, the phenomenon of jamming due to the jitter of the network speed is prevented, and the effect of the screen playback is improved.
  • the method further includes:
  • Step S60 recording an average speed of streaming media data downloading in each consecutive time interval in the current preset time period
  • Step S70 setting a minimum value of the average speed of streaming media data downloading in each time interval as a historical download speed of the current preset time period.
  • the streaming media data of each preset time period corresponds to the historical download speed of the preset time period after the download is completed.
  • the calculation method of the historical download speed corresponding to each of the shards can be set according to actual needs. For example, in this embodiment, preferably, when downloading the current shard, the shard downloading may be recorded. The average download speed of the media data in the preset time interval; then the average download speed minimum value in all preset time intervals is extracted as the historical download speed of the slice.
  • the length of the preset time period can be set according to actual needs, for example, it can be 5 seconds. It can be understood that the historical download speed corresponding to the fragment may also be an average value of the average download speeds in all preset time intervals in the fragment.
  • determining whether the historical download speed exists is: determining whether there is a historical download speed corresponding to consecutive N preset time periods, where N is a positive integer greater than 1.
  • the historical download speed may be stored in the form of the array Speed_download[12], wherein each fragment corresponds to a historical download speed; specifically, the historical download speed update in the array may be:
  • Scurrent is the historical download speed of the current shard
  • Speed_download[11] is the historical download speed of the previous shard of the current shard
  • Speed_download[0] is the eleventh shard of the current shard.
  • the foregoing step S30 includes:
  • Step S31 calculating a code rate range corresponding to each download code rate according to the download code rate
  • Step S32 determining a download code rate in the current preset time period according to the code rate range of the historical download speed.
  • each download code rate corresponds to a code rate range; for example, the streaming media data has a total of 5 code rates, and is arranged in order from R1, R2, R3, R4, and R5; wherein the code corresponding to the code rate R1 is downloaded.
  • the rate range is greater than 0 and less than R2.
  • the code rate range corresponding to the download code rate R1 is greater than or equal to R2 and less than R3.
  • the code rate range corresponding to the download code rate R3 is greater than or equal to R3 and less than R4, and the code rate range corresponding to the download code rate R4 is If R4 is greater than or equal to R5, the code rate corresponding to the download code rate R5 is greater than or equal to R5.
  • determining the download code rate in the current preset time period according to the code rate range of the historical download speed may preferably be a code rate range according to the smallest historical download speed in the array. Determine the download rate of the current preset time period. In other embodiments, the average of the historical download speeds in the array can also be used for calculation.
  • the minimum download rate is 470 Bit. Rate/bps is downloaded.
  • the download rate is determined according to the historical average download speed; and in the next download process, according to the current network speed and the historical average download speed. Adjusting the download rate, it can effectively prevent the phenomenon of jamming due to the jitter of the network speed, and improve the screen playback effect.
  • the foregoing step S10 includes:
  • Step S11 sending a streaming media data download request to the server
  • Step S12 The index file corresponding to the streaming media data delivered by the receiving server according to the streaming media data download request;
  • Step S13 Acquire, according to the index file, the download code rate of the streaming media data and the corresponding download link.
  • the smart terminal may send a download request to the streaming media content publishing server through the HTTP protocol, and the streaming media content publishing server may obtain the index file corresponding to the streaming media data according to the download request, and send the index file to the smart terminal.
  • the smart terminal obtains the download code rate of the streaming media data and the corresponding download link according to the index file analysis.
  • the present invention also provides a device for downloading streaming media data.
  • the device for downloading streaming media data provided by the present invention includes:
  • the obtaining module 100 is configured to obtain a streaming media data download code rate and a corresponding download link;
  • the method for downloading streaming media data may be applied to video playback control, for example, controlling the download speed of streaming media data (streaming video content) when the smart terminal performs video playback.
  • the foregoing download code rate reflects the playback quality of the streaming media data, for example, the download code rate may be 512 Kbps, 1024. Kbps and so on.
  • the determining module 200 is configured to determine whether there is a historical download speed when the streaming media data is downloaded in the current preset time period;
  • a determining module 300 configured to determine, according to a historical download speed, a download code rate in the current preset time period when there is a historical download speed; and when the historical download speed does not exist, download the code according to the acquired streaming media data Rate determines the download code rate within the current preset time period;
  • the loading module 400 is configured to load the corresponding download link to download the streaming media data in the current preset time period according to the determined download code rate.
  • streaming video content is cut into a plurality of shorter video segments according to the independent relationship of a group of pictures (GOP), and is encoded into streaming video files of various code rates, and these files usually have 2-10 seconds of playback time.
  • the streaming media data in each preset time period constitutes one fragment, and each complete streaming media data is composed of a plurality of consecutive fragments, and each fragment has independence, and when downloaded, it may be targeted Different shards are downloaded at different download rates.
  • the streaming media data is downloaded in the current preset time period, it is first determined whether there is a record of the historical download speed.
  • the current preset speed can be determined according to the record of the historical download speed (currently The download code rate corresponding to the slice to be downloaded; if there is no record of the history download speed, the download code rate corresponding to the current preset time period (the slice currently required to be downloaded) may be determined according to the current network.
  • the download code rate of the currently downloaded slice may be determined according to the current network speed; or the obtained streaming media data may be downloaded in the code rate.
  • the lowest download rate is set to the download rate of the currently downloaded slice.
  • the download rate corresponding to the fragment currently needed to be downloaded is determined according to the download speed of the downloaded fragment.
  • the streaming media data download rate and the corresponding download link are obtained, when the streaming media data in the current preset time period is downloaded, it is determined whether there is a historical download speed; and when there is a historical download speed, according to the history
  • the download speed determines the download rate of the streaming media data within the current preset time period. Since the download code rate of the streaming media data in the current preset time period is adjusted in real time according to the historical download speed, the phenomenon of jamming due to the jitter of the network speed is prevented, and the effect of the screen playback is improved.
  • the device for downloading streaming media data further includes:
  • the recording module 500 is configured to record an average speed of streaming media data downloading in each consecutive time interval in the current preset time period
  • the setting module 600 is configured to set a minimum value of the average speed of the streaming media data download in each time interval as a historical download speed of the current preset time period.
  • the streaming media data of each preset time period corresponds to the historical download speed of the preset time period after the download is completed.
  • the calculation method of the historical download speed corresponding to each of the shards can be set according to actual needs. For example, in this embodiment, preferably, when downloading the current shard, the shard downloading may be recorded. The average download speed of the media data in the preset time interval; then the average download speed minimum value in all preset time intervals is extracted as the historical download speed of the slice.
  • the length of the preset time period can be set according to actual needs, for example, it can be 5 seconds. It can be understood that the historical download speed corresponding to the fragment may also be an average value of the average download speeds in all preset time intervals in the fragment.
  • determining whether the historical download speed exists is: determining whether there is a historical download speed corresponding to consecutive N preset time periods, where N is a positive integer greater than 1.
  • the historical download speed may be stored in the form of the array Speed_download[12], wherein each fragment corresponds to a historical download speed; specifically, the historical download speed update in the array may be:
  • Scurrent is the historical download speed of the current shard
  • Speed_download[11] is the historical download speed of the previous shard of the current shard
  • Speed_download[0] is the eleventh shard of the current shard.
  • the determining module 300 includes:
  • the calculating unit 301 is configured to calculate a code rate range corresponding to each download code rate according to the download code rate;
  • the determining unit 302 is configured to determine a download code rate in the current preset time period according to the code rate range of the historical download speed.
  • each download code rate corresponds to a code rate range; for example, the streaming media data has a total of 5 code rates, and is arranged in order from R1, R2, R3, R4, and R5; wherein the code corresponding to the code rate R1 is downloaded.
  • the rate range is greater than 0 and less than R2.
  • the code rate range corresponding to the download code rate R1 is greater than or equal to R2 and less than R3.
  • the code rate range corresponding to the download code rate R3 is greater than or equal to R3 and less than R4, and the code rate range corresponding to the download code rate R4 is If R4 is greater than or equal to R5, the code rate corresponding to the download code rate R5 is greater than or equal to R5.
  • determining the download code rate in the current preset time period according to the code rate range of the historical download speed may preferably be a code rate range according to the smallest historical download speed in the array. Determine the download rate of the current preset time period. In other embodiments, the average of the historical download speeds in the array can also be used for calculation.
  • the acquiring module 100 includes:
  • the sending unit 101 is configured to send a streaming media data download request to the server;
  • the receiving unit 102 is configured to receive an index file corresponding to the streaming media data delivered by the server according to the streaming media data download request;
  • the analyzing unit 103 is configured to obtain, according to the index file, a download code rate of the streaming media data and a corresponding download link.
  • the smart terminal may send a download request to the streaming media content publishing server through the HTTP protocol, and the streaming media content publishing server may obtain the index file corresponding to the streaming media data according to the download request, and send the index file to the smart terminal.
  • the smart terminal obtains the download code rate of the streaming media data and the corresponding download link according to the index file analysis.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

公开了一种流媒体数据的下载方法,所述流媒体数据的下载方法包括以下步骤:A、获取流媒体数据下载码率及对应的下载链接;B、当进入当前预置时间段内的流媒体数据下载时,判断是否存在历史下载速度;若是则执行步骤C,否则执行步骤D;C、根据历史下载速度确定所述当前预置时间段内的下载码率;并转入执行步骤E;D、根据获取到的所述流媒体数据下载码率确定当前预置时间段内的下载码率;并转入执行步骤E;E、根据确定的下载码率,加载对应的下载链接对当前预置时间段内的流媒体数据进行下载。还公开了一种流媒体数据的下载装置。上述方法和装置提高了画面播放效果。

Description

流媒体数据的下载方法及装置
技术领域
本发明涉及通讯技术领域,尤其涉及流媒体数据的下载方法及装置。
背景技术
随着互联网技术的飞速发展,越来越多的流媒体内容经由开放的互联网传输给用户;但是用户访问的速度经常出现抖动,很难保证带宽稳定,从而导致用户在根据接收到互联网发送的流媒体内容进行视屏播放时,容易出现卡顿现象,从而导致画面播放的效果较差。
上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。
发明内容
本发明的主要目的在于提供一种流媒体数据的下载方法及装置,旨在提高画面播放效果。
为实现上述目的,本发明提供的一种流媒体数据的下载方法包括以下步骤:
A、获取流媒体数据下载码率及对应的下载链接;
B、当进入当前预置时间段内的流媒体数据下载时,判断是否存在历史下载速度;若是则执行步骤C,否则执行步骤D;
C、根据历史下载速度确定所述当前预置时间段内的下载码率;并转入执行步骤E;
D、根据获取到的所述流媒体数据下载码率确定当前预置时间段内的下载码率;并转入执行步骤E;
E、根据确定的下载码率,加载对应的下载链接对当前预置时间段内的流媒体数据进行下载。
优选地,所述根据确定的下载码率,加载对应的下载链接对当前预置时间段内的流媒体数据进行下载之后还包括:
记录当前预置时间段内各连续的时间间隔中流媒体数据下载的平均速度;
将所述各时间间隔中流媒体数据下载的平均速度的最小值设定为当前预置时间段的历史下载速度。
优选地,所述判断是否存在历史下载速度具体为:
判断是否存在连续N次预置时间段对应的历史下载速度。
优选地,所述根据历史下载速度确定所述当前预置时间段内的下载码率包括:
根据所述下载码率计算各下载码率对应的码率范围;
根据所述历史下载速度所述的码率范围确定所述当前预置时间段内的下载码率。
优选地,所述获取流媒体数据下载码率及对应的下载链接包括:
向服务器发送流媒体数据下载请求;
接收服务器根据所述流媒体数据下载请求下发的流媒体数据对应的索引文件;
根据所述索引文件分析获取所述流媒体数据的下载码率及对应的下载链接。
此外,为实现上述目的,本发明还提供一种流媒体数据的下载装置包括:
获取模块,用于获取流媒体数据下载码率及对应的下载链接;
判断模块,用于当进入当前预置时间段内的流媒体数据下载时,判断是否存在历史下载速度;
确定模块,用于当存在历史下载速度时,根据历史下载速度确定所述当前预置时间段内的下载码率;当不存在历史下载速度时,根据获取到的所述流媒体数据下载码率确定当前预置时间段内的下载码率;
加载模块,用于根据确定的下载码率,加载对应的下载链接对当前预置时间段内的流媒体数据进行下载。
优选地,所述流媒体数据的下载装置还包括:
记录模块,用于记录当前预置时间段内各连续的时间间隔中流媒体数据下载的平均速度;
设置模块,用于将所述各时间间隔中流媒体数据下载的平均速度的最小值设定为当前预置时间段的历史下载速度。
优选地,所述判断模块具体用于判断是否存在连续N次预置时间段对应的历史下载速度。
优选地,所述确定模块包括:
计算单元,用于根据所述下载码率计算各下载码率对应的码率范围;
确定单元,用于根据所述历史下载速度所述的码率范围确定所述当前预置时间段内的下载码率。
优选地,所述获取模块包括:
发送单元,用于向服务器发送流媒体数据下载请求;
接收单元,用于接收服务器根据所述流媒体数据下载请求下发的流媒体数据对应的索引文件;
分析单元,用于根据所述索引文件分析获取所述流媒体数据的下载码率及对应的下载链接。
本发明实施例通过获取流媒体数据下载码率及对应的下载链接,当进入当前预置时间段内的流媒体数据下载时,判断是否存在历史下载速度;并当存在历史下载速度时,根据历史下载速度确定当前预置时间段内的流媒体数据的下载码率。由于根据历史下载速度实时调整当前预置时间段内的流媒体数据的下载码率,从而防止了由于网速的抖动导致出现卡顿现象,提高了画面播放效果。
附图说明
图1为本发明流媒体数据的下载方法第一实施例的流程示意图;
图2为本发明流媒体数据的下载方法第二实施例的流程示意图;
图3为本发明流媒体数据的下载方法一实施例中确定下载码率的细化流程示意图;
图4为本发明流媒体数据的下载方法一实施例中下载码率调整的示例图;
图5为本发明流媒体数据的下载方法一实施例中获取下载码率和下载链接的细化流程示意图;
图6为本发明流媒体数据的下载装置第一实施例的功能模块示意图;
图7为本发明流媒体数据的下载装置第二实施例的功能模块示意图;
图8为图7中确定模块的细化功能模块示意图;
图9为图7中获取模块的细化功能模块示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明提供一种流媒体数据的下载方法,参照图1,在一实施例中,该流媒体数据的下载方法包括:
步骤S10,获取流媒体数据下载码率及对应的下载链接;
本实施例提供的流媒体数据的下载方法可以应用于视频播放控制中,例如,在智能终端进行视频播放时,控制流媒体数据(流媒体视频内容)的下载速度。每一流媒体数据可以存在多个下载码率,每一下载码率均对应有一下载链接。具体地,上述下载码率反应流媒体数据的播放质量,例如下载码率可以为512Kbps、1024 Kbps等。
步骤S20,当进入当前预置时间段内的流媒体数据下载时,判断是否存在历史下载速度;若是,则执行步骤S30,若否,则执行步骤S40;
步骤S30,根据历史下载速度确定所述当前预置时间段内的下载码率;并转入执行步骤S50;
步骤S40,根据获取到的所述流媒体数据下载码率确定当前预置时间段内的下载码率;并转入执行步骤S50;
步骤S50,根据确定的下载码率,加载对应的下载链接对当前预置时间段内的流媒体数据进行下载。
应当说明的是,现有技术中将流媒体视频内容按照画面组(GOP)的独立关系切割成许多较短的视频片段,并且编码成各种不同码率的流媒体视频文件,这些文件通常有2-10秒的播放时长。本实施例中,每一预置时间段内的流媒体数据构成一个分片,每个完整的流媒体数据由若干连续的分片组成,且每一分片具有独立性,下载时,可针对不同的分片进行不同下载码率下载。在进入当前预置时间段内的流媒体数据下载时,首先判断是否存在历史下载速度的记录,若存在历史下载速度的记录,则可根据历史下载速度的记录确定当期预置时间段内(当前需要下载的分片)对应的下载码率;若不存在历史下载速度的记录,则可以根据当前的网络确定当期预置时间段内(当前需要下载的分片)对应的下载码率。
例如,在刚开始进入视频播放时,无历史下载速度的记录,此时则可以根据当前的网速确定当前下载分片的下载码率;或者以获取到的所述流媒体数据下载码率中最低的下载码率设定为当前下载分片的下载码率。在下载完一个或若干个分片后,根据已经下载的分片的下载速度确定当前需要下载的分片对应的下载码率。
本发明实施例通过获取流媒体数据下载码率及对应的下载链接,当进入当前预置时间段内的流媒体数据下载时,判断是否存在历史下载速度;并当存在历史下载速度时,根据历史下载速度确定当前预置时间段内的流媒体数据的下载码率。由于根据历史下载速度实时调整当前预置时间段内的流媒体数据的下载码率,从而防止了由于网速的抖动导致出现卡顿现象,提高了画面播放效果。
进一步地,参照图2,基于上述实施例,本实施例中,上述步骤S50之后还包括:
步骤S60,记录当前预置时间段内各连续的时间间隔中流媒体数据下载的平均速度;
步骤S70,将所述各时间间隔中流媒体数据下载的平均速度的最小值设定为当前预置时间段的历史下载速度。
应当说明的是,每一预置时间段(即每一分片)的流媒体数据在下载完成后均对应记录该预置时间段的历史下载速度。具体地,该每一分片对应的历史下载速度的计算方式可根据实际需要进行设置,例如,本实施例中,优选地,在对当前分片进行下载时,可记录该分片下载时各预置时间间隔中,媒体数据的平均下载速度;然后将提取所有预置时间间隔中平均下载速度最低值作为该分片的历史下载速度。上述预置时间段的时间长度可根据实际需要进行设置,例如可以为5秒。可以理解的是,该分片对应的历史下载速度也可以为该分片中所有预置时间间隔中平均下载速度的平均值。
应当说明的是,上述历史下载速度的数量可根据实际需要进行设置,例如可以根据当前预置时间段的前面连续N次预置时间段对应的历史下载速度进行确认。优选地,本实施例中,上述判断是否存在历史下载速度具体为:判断是否存在连续N次预置时间段对应的历史下载速度,其中N为大于1的正整数。
本实施例中,以N为12为例作出详细说明。具体地,可以采用数组Speed_download[12]的形式进行历史下载速度进行储存,其中每一分片对应的历史下载速度;具体地,数组中进行历史下载速度更新的方式可以为:
Speed_download[0] = Speed_download[1];
Speed_download[1] = Speed_download[2];
Speed_download[2] = Speed_download[3];
••••••
Speed_download[11] = Scurrent。
其中上述Scurrent为当前分片的历史下载速度,Speed_download[11]为当前分片的前一分片的历史下载速度,以此类推,Speed_download[0]为当前分片前第十一个分片的历史下载速度。
进一步地,参照图3,基于上述实施例,本实施例中,上述步骤S30包括:
步骤S31,根据所述下载码率计算各下载码率对应的码率范围;
步骤S32,根据所述历史下载速度所述的码率范围确定所述当前预置时间段内的下载码率。
可以理解的是,每一下载码率对应有一码率范围;例如流媒体数据共有5个码率,从小到大依次排列为R1、R2、R3、R4和R5;其中下载码率R1对应的码率范围为大于0小于R2,下载码率R1对应的码率范围为大于等于R2小于R3,下载码率R3对应的码率范围为大于等于R3小于R4,下载码率R4对应的码率范围为大于等于R4小于R5,下载码率R5对应的码率范围为大于等于R5。从而可以历史下载速度大于下载码率的同时,保证了采用了最大的下载码率进行下载,因此提高了画面播放的效果。可以理解的是,本实施例中,根据历史下载速度所述的码率范围确定所述当前预置时间段内的下载码率优选可以为根据上述数组中最小的历史下载速度所属的码率范围确定当前预置时间段的下载码率。其他实施例中,还可采用数组中历史下载速度的平均值进行计算。
具体地,如图4所示,在初始下载时,以最低下载码率470 Bit Rate/bps进行下载,在下载一段时间后,根据历史的平均下载速度确定当前预置时间段内的下载码率;并在接下来的下载过程中,根据当前的网速以及历史平均下载速度动态调整下载码率,因此可以有效防止了由于网速的抖动导致出现卡顿现象,提高了画面播放效果。
进一步地,参照图5,基于上述实施例,本实施例中,上述步骤S10包括:
步骤S11,向服务器发送流媒体数据下载请求;
步骤S12,接收服务器根据所述流媒体数据下载请求下发的流媒体数据对应的索引文件;
步骤S13,根据所述索引文件分析获取所述流媒体数据的下载码率及对应的下载链接。
本实施例中,智能终端可以通过HTTP协议向流媒体内容发布服务器发送下载请求,流媒体内容发布服务器将根据该下载请求获取流媒体数据对应的索引文件,并将该索引文件发送给智能终端,以供智能终端根据所述索引文件分析获取所述流媒体数据的下载码率及对应的下载链接。
本发明还提供一种流媒体数据的下载装置,参照图6,在一实施例中,本发明提供的流媒体数据的下载装置包括:
获取模块100,用于获取流媒体数据下载码率及对应的下载链接;
本实施例提供的流媒体数据的下载方法可以应用于视频播放控制中,例如,在智能终端进行视频播放时,控制流媒体数据(流媒体视频内容)的下载速度。每一流媒体数据可以存在多个下载码率,每一下载码率均对应有一下载链接。具体地,上述下载码率反应流媒体数据的播放质量,例如下载码率可以为512Kbps、1024 Kbps等。
判断模块200,用于当进入当前预置时间段内的流媒体数据下载时,判断是否存在历史下载速度;
确定模块300,用于当存在历史下载速度时,根据历史下载速度确定所述当前预置时间段内的下载码率;当不存在历史下载速度时,根据获取到的所述流媒体数据下载码率确定当前预置时间段内的下载码率;
加载模块400,用于根据确定的下载码率,加载对应的下载链接对当前预置时间段内的流媒体数据进行下载。
应当说明的是,现有技术中将流媒体视频内容按照画面组(GOP)的独立关系切割成许多较短的视频片段,并且编码成各种不同码率的流媒体视频文件,这些文件通常有2-10秒的播放时长。本实施例中,每一预置时间段内的流媒体数据构成一个分片,每个完整的流媒体数据由若干连续的分片组成,且每一分片具有独立性,下载时,可针对不同的分片进行不同下载码率下载。在进入当前预置时间段内的流媒体数据下载时,首先判断是否存在历史下载速度的记录,若存在历史下载速度的记录,则可根据历史下载速度的记录确定当期预置时间段内(当前需要下载的分片)对应的下载码率;若不存在历史下载速度的记录,则可以根据当前的网络确定当期预置时间段内(当前需要下载的分片)对应的下载码率。
例如,在刚开始进入视频播放时,无历史下载速度的记录,此时则可以根据当前的网速确定当前下载分片的下载码率;或者以获取到的所述流媒体数据下载码率中最低的下载码率设定为当前下载分片的下载码率。在下载完一个或若干个分片后,根据已经下载的分片的下载速度确定当前需要下载的分片对应的下载码率。
本发明实施例通过获取流媒体数据下载码率及对应的下载链接,当进入当前预置时间段内的流媒体数据下载时,判断是否存在历史下载速度;并当存在历史下载速度时,根据历史下载速度确定当前预置时间段内的流媒体数据的下载码率。由于根据历史下载速度实时调整当前预置时间段内的流媒体数据的下载码率,从而防止了由于网速的抖动导致出现卡顿现象,提高了画面播放效果。
进一步地,参照图7,基于上述实施例,本实施例中,上述流媒体数据的下载装置还包括:
记录模块500,用于记录当前预置时间段内各连续的时间间隔中流媒体数据下载的平均速度;
设置模块600,用于将所述各时间间隔中流媒体数据下载的平均速度的最小值设定为当前预置时间段的历史下载速度。
应当说明的是,每一预置时间段(即每一分片)的流媒体数据在下载完成后均对应记录该预置时间段的历史下载速度。具体地,该每一分片对应的历史下载速度的计算方式可根据实际需要进行设置,例如,本实施例中,优选地,在对当前分片进行下载时,可记录该分片下载时各预置时间间隔中,媒体数据的平均下载速度;然后将提取所有预置时间间隔中平均下载速度最低值作为该分片的历史下载速度。上述预置时间段的时间长度可根据实际需要进行设置,例如可以为5秒。可以理解的是,该分片对应的历史下载速度也可以为该分片中所有预置时间间隔中平均下载速度的平均值。
应当说明的是,上述历史下载速度的数量可根据实际需要进行设置,例如可以根据当前预置时间段的前面连续N次预置时间段对应的历史下载速度进行确认。优选地,本实施例中,上述判断是否存在历史下载速度具体为:判断是否存在连续N次预置时间段对应的历史下载速度,其中N为大于1的正整数。
本实施例中,以N为12为例作出详细说明。具体地,可以采用数组Speed_download[12]的形式进行历史下载速度进行储存,其中每一分片对应的历史下载速度;具体地,数组中进行历史下载速度更新的方式可以为:
Speed_download[0] = Speed_download[1];
Speed_download[1] = Speed_download[2];
Speed_download[2] = Speed_download[3];
••••••
Speed_download[11] = Scurrent。
其中上述Scurrent为当前分片的历史下载速度,Speed_download[11]为当前分片的前一分片的历史下载速度,以此类推,Speed_download[0]为当前分片前第十一个分片的历史下载速度。
进一步地,参照图8,基于上述实施例,本实施例中,上述确定模块300包括:
计算单元301,用于根据所述下载码率计算各下载码率对应的码率范围;
确定单元302,用于根据所述历史下载速度所述的码率范围确定所述当前预置时间段内的下载码率。
可以理解的是,每一下载码率对应有一码率范围;例如流媒体数据共有5个码率,从小到大依次排列为R1、R2、R3、R4和R5;其中下载码率R1对应的码率范围为大于0小于R2,下载码率R1对应的码率范围为大于等于R2小于R3,下载码率R3对应的码率范围为大于等于R3小于R4,下载码率R4对应的码率范围为大于等于R4小于R5,下载码率R5对应的码率范围为大于等于R5。从而可以历史下载速度大于下载码率的同时,保证了采用了最大的下载码率进行下载,因此提高了画面播放的效果。可以理解的是,本实施例中,根据历史下载速度所述的码率范围确定所述当前预置时间段内的下载码率优选可以为根据上述数组中最小的历史下载速度所属的码率范围确定当前预置时间段的下载码率。其他实施例中,还可采用数组中历史下载速度的平均值进行计算。
进一步地,参照图9,基于上述实施例,本实施例中,上述获取模块100包括:
发送单元101,用于向服务器发送流媒体数据下载请求;
接收单元102,用于接收服务器根据所述流媒体数据下载请求下发的流媒体数据对应的索引文件;
分析单元103,用于根据所述索引文件分析获取所述流媒体数据的下载码率及对应的下载链接。
本实施例中,智能终端可以通过HTTP协议向流媒体内容发布服务器发送下载请求,流媒体内容发布服务器将根据该下载请求获取流媒体数据对应的索引文件,并将该索引文件发送给智能终端,以供智能终端根据所述索引文件分析获取所述流媒体数据的下载码率及对应的下载链接。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (14)

  1. 一种流媒体数据的下载方法,其特征在于,所述流媒体数据的下载方法包括以下步骤:
    A、获取流媒体数据下载码率及对应的下载链接;
    B、当进入当前预置时间段内的流媒体数据下载时,判断是否存在历史下载速度;若是则执行步骤C,否则执行步骤D;
    C、根据历史下载速度确定所述当前预置时间段内的下载码率;并转入执行步骤E;
    D、根据获取到的所述流媒体数据下载码率确定当前预置时间段内的下载码率;并转入执行步骤E;
    E、根据确定的下载码率,加载对应的下载链接对当前预置时间段内的流媒体数据进行下载。
  2. 如权利要求1所述的流媒体数据的下载方法,其特征在于,所述根据确定的下载码率,加载对应的下载链接对当前预置时间段内的流媒体数据进行下载之后还包括:
    记录当前预置时间段内各连续的时间间隔中流媒体数据下载的平均速度;
    将所述各时间间隔中流媒体数据下载的平均速度的最小值设定为当前预置时间段的历史下载速度。
  3. 如权利要求2所述的流媒体数据的下载方法,其特征在于,所述判断是否存在历史下载速度具体为:
    判断是否存在连续N次预置时间段对应的历史下载速度。
  4. 如权利要求1所述的流媒体数据的下载方法,其特征在于,所述根据历史下载速度确定所述当前预置时间段内的下载码率包括:
    根据所述下载码率计算各下载码率对应的码率范围;
    根据所述历史下载速度所述的码率范围确定所述当前预置时间段内的下载码率。
  5. 如权利要求4所述的流媒体数据的下载方法,其特征在于,所述获取流媒体数据下载码率及对应的下载链接包括:
    向服务器发送流媒体数据下载请求;
    接收服务器根据所述流媒体数据下载请求下发的流媒体数据对应的索引文件;
    根据所述索引文件分析获取所述流媒体数据的下载码率及对应的下载链接。
  6. 如权利要求4所述的流媒体数据的下载方法,其特征在于,所述根据确定的下载码率,加载对应的下载链接对当前预置时间段内的流媒体数据进行下载之后还包括:
    记录当前预置时间段内各连续的时间间隔中流媒体数据下载的平均速度;
    将所述各时间间隔中流媒体数据下载的平均速度的最小值设定为当前预置时间段的历史下载速度。
  7. 如权利要求6所述的流媒体数据的下载方法,其特征在于,所述判断是否存在历史下载速度具体为:
    判断是否存在连续N次预置时间段对应的历史下载速度。
  8. 一种流媒体数据的下载装置,其特征在于,所述流媒体数据的下载装置:
    获取模块,用于获取流媒体数据下载码率及对应的下载链接;
    判断模块,用于当进入当前预置时间段内的流媒体数据下载时,判断是否存在历史下载速度;
    确定模块,用于当存在历史下载速度时,根据历史下载速度确定所述当前预置时间段内的下载码率;当不存在历史下载速度时,根据获取到的所述流媒体数据下载码率确定当前预置时间段内的下载码率;
    加载模块,用于根据确定的下载码率,加载对应的下载链接对当前预置时间段内的流媒体数据进行下载。
  9. 如权利要求8所述的流媒体数据的下载装置,其特征在于,所述流媒体数据的下载装置还包括:
    记录模块,用于记录当前预置时间段内各连续的时间间隔中流媒体数据下载的平均速度;
    设置模块,用于将所述各时间间隔中流媒体数据下载的平均速度的最小值设定为当前预置时间段的历史下载速度。
  10. 如权利要求9所述的流媒体数据的下载装置,其特征在于,所述判断模块具体用于判断是否存在连续N次预置时间段对应的历史下载速度。
  11. 如权利要求8所述的流媒体数据的下载装置,其特征在于,所述确定模块包括:
    计算单元,用于根据所述下载码率计算各下载码率对应的码率范围;
    确定单元,用于根据所述历史下载速度所述的码率范围确定所述当前预置时间段内的下载码率。
  12. 如权利要求11所述的流媒体数据的下载装置,其特征在于,所述获取模块包括:
    发送单元,用于向服务器发送流媒体数据下载请求;
    接收单元,用于接收服务器根据所述流媒体数据下载请求下发的流媒体数据对应的索引文件;
    分析单元,用于根据所述索引文件分析获取所述流媒体数据的下载码率及对应的下载链接。
  13. 如权利要求11所述的流媒体数据的下载装置,其特征在于,所述流媒体数据的下载装置还包括:
    记录模块,用于记录当前预置时间段内各连续的时间间隔中流媒体数据下载的平均速度;
    设置模块,用于将所述各时间间隔中流媒体数据下载的平均速度的最小值设定为当前预置时间段的历史下载速度。
  14. 如权利要求13所述的流媒体数据的下载装置,其特征在于,所述判断模块具体用于判断是否存在连续N次预置时间段对应的历史下载速度。
PCT/CN2015/090327 2014-12-08 2015-09-23 流媒体数据的下载方法及装置 WO2016090991A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410743132.3 2014-12-08
CN201410743132.3A CN105744308A (zh) 2014-12-08 2014-12-08 流媒体数据的下载方法及装置

Publications (1)

Publication Number Publication Date
WO2016090991A1 true WO2016090991A1 (zh) 2016-06-16

Family

ID=56106632

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/090327 WO2016090991A1 (zh) 2014-12-08 2015-09-23 流媒体数据的下载方法及装置

Country Status (2)

Country Link
CN (1) CN105744308A (zh)
WO (1) WO2016090991A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106303563B (zh) * 2016-08-19 2020-04-14 腾讯科技(深圳)有限公司 流媒体在线播放方法、装置、执行终端以及存储介质
CN107071529B (zh) * 2017-03-29 2018-10-26 咪咕视讯科技有限公司 一种hls视频播放方法、终端及服务器
CN107809647A (zh) * 2017-10-24 2018-03-16 深圳市创维软件有限公司 视频播放的码率切换方法、装置及存储介质
CN110022498B (zh) * 2018-01-08 2021-04-27 深圳市中兴微电子技术有限公司 一种实现码率切换的方法及装置
CN108900851A (zh) * 2018-06-19 2018-11-27 中兴通讯股份有限公司 描述文件的传输方法、视频的播放方法及装置
CN109672910A (zh) * 2018-12-25 2019-04-23 北京微播视界科技有限公司 视频播放方法、装置、电子设备及计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102088620A (zh) * 2010-12-01 2011-06-08 中兴通讯股份有限公司 一种内容分发网络中媒体文件下载方法及客户端
CN103108257A (zh) * 2011-11-10 2013-05-15 中国科学院声学研究所 一种用于嵌入式终端改善流媒体播放质量的方法及系统
CN103248962A (zh) * 2013-04-23 2013-08-14 华为技术有限公司 获取流媒体数据的方法、设备及系统
EP2696552A1 (en) * 2012-08-07 2014-02-12 NTT DoCoMo, Inc. Method, system and network for transmitting multimedia data to a plurality of clients

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009060535A (ja) * 2007-09-03 2009-03-19 Canon Inc 再生装置
CN101997890B (zh) * 2009-08-28 2013-11-06 中国移动通信集团公司 一种p2p流媒体下载方法、系统及装置
CN102137160B (zh) * 2011-03-14 2016-09-28 上海聚力传媒技术有限公司 一种用于调整p2p下载任务的下载速率的方法与设备
CN102355327B (zh) * 2011-08-26 2015-05-13 百度在线网络技术(北京)有限公司 一种用于确定数据传输超时时间的方法、装置与设备
US9450997B2 (en) * 2012-02-27 2016-09-20 Qualcomm Incorporated Dash client and receiver with request cancellation capabilities
US8762563B2 (en) * 2012-04-16 2014-06-24 Adobe Systems Incorporated Method and apparatus for improving the adaptive bit rate behavior of a streaming media player
CN103024593A (zh) * 2012-12-26 2013-04-03 人民搜索网络股份公司 一种网络视频点播加速系统及其播放方法
CN103905924B (zh) * 2012-12-28 2018-06-08 联芯科技有限公司 终端侧的视频自适应接收方法和装置
CN103024440B (zh) * 2013-01-11 2014-12-31 德科仕通信(上海)有限公司 针对has的视频质量评价和故障诊断方法
CN103200652A (zh) * 2013-03-25 2013-07-10 广东欧珀移动通信有限公司 WiFi接入点排序方法、装置及移动终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102088620A (zh) * 2010-12-01 2011-06-08 中兴通讯股份有限公司 一种内容分发网络中媒体文件下载方法及客户端
CN103108257A (zh) * 2011-11-10 2013-05-15 中国科学院声学研究所 一种用于嵌入式终端改善流媒体播放质量的方法及系统
EP2696552A1 (en) * 2012-08-07 2014-02-12 NTT DoCoMo, Inc. Method, system and network for transmitting multimedia data to a plurality of clients
CN103248962A (zh) * 2013-04-23 2013-08-14 华为技术有限公司 获取流媒体数据的方法、设备及系统

Also Published As

Publication number Publication date
CN105744308A (zh) 2016-07-06

Similar Documents

Publication Publication Date Title
WO2016090991A1 (zh) 流媒体数据的下载方法及装置
WO2019000792A1 (zh) 音质调整方法、系统、主机端、及存储介质
WO2016192254A1 (zh) 网络视频在线播放的方法和装置
WO2017177524A1 (zh) 音视频同步播放的方法及装置
WO2018018681A1 (zh) 视频节目预览方法及装置
WO2017107378A1 (zh) 基于hls流媒体的视频数据加速下载方法及装置
WO2016091011A1 (zh) 字幕切换方法及装置
WO2017084311A1 (zh) 单分片视频播放加速方法及装置
WO2018036057A1 (zh) 软件后台自适应升级方法及装置
WO2018023926A1 (zh) 电视与移动终端的互动方法及系统
WO2016192270A1 (zh) 媒体文件的快速启播方法及装置
WO2017020649A1 (zh) 音视频播放控制方法及装置
WO2017005066A1 (zh) 录制音视频同步时间戳的方法和装置
WO2019080022A1 (zh) 网络视频流传输拥塞控制方法及装置
WO2016101698A1 (zh) 基于dlna技术实现屏幕推送的方法及系统
WO2014187158A1 (zh) 终端数据云分享的控制方法、服务器及终端
WO2015120774A1 (en) Network access method and apparatus applied to mobile application
WO2018053963A1 (zh) 智能电视的系统升级方法及装置
WO2017063368A1 (zh) 视频广告的插播方法及装置
WO2017088427A1 (zh) 音频输出控制方法及装置
WO2016101252A1 (zh) 智能电视的频道信息显示方法及装置
WO2017084301A1 (zh) 音频数据播放方法、装置及智能电视机
WO2017045441A1 (zh) 基于智能电视的音频播放方法及装置
WO2019051897A1 (zh) 终端运行参数调整方法、装置及计算机可读存储介质
WO2017084305A1 (zh) 终端控制方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15867922

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 23/10/2017)

122 Ep: pct application non-entry in european phase

Ref document number: 15867922

Country of ref document: EP

Kind code of ref document: A1