WO2011150643A1 - Method and device for on-line adaptation of media content - Google Patents

Method and device for on-line adaptation of media content Download PDF

Info

Publication number
WO2011150643A1
WO2011150643A1 PCT/CN2010/079913 CN2010079913W WO2011150643A1 WO 2011150643 A1 WO2011150643 A1 WO 2011150643A1 CN 2010079913 W CN2010079913 W CN 2010079913W WO 2011150643 A1 WO2011150643 A1 WO 2011150643A1
Authority
WO
WIPO (PCT)
Prior art keywords
media content
user
predicted
cache
transcoding
Prior art date
Application number
PCT/CN2010/079913
Other languages
French (fr)
Chinese (zh)
Inventor
张鹏
赵华
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2010/079913 priority Critical patent/WO2011150643A1/en
Priority to CN201080004692.7A priority patent/CN102217278B/en
Publication of WO2011150643A1 publication Critical patent/WO2011150643A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • H04L67/306User profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/38Flow control; Congestion control by adapting coding or compression rate

Definitions

  • the present invention relates to the field of streaming media technologies, and in particular, to a method and device for online adaptation of media content.
  • streaming media refers to the media format that is played on the Internet and the intranet by means of streaming.
  • the user can provide an online playing service, and the client can watch the online after the multimedia file is completely downloaded, which brings great convenience to the user.
  • a disadvantage of the pre-storage method is that more storage resources are needed to store copies of media content at different bit rates/resolutions, which are costly to store, and have limited adaptability to network bandwidth and changes in terminal devices.
  • the prior art may use a method of generating media content copies of different code rates/resolutions online.
  • the user may be generated by online adaptation on the edge nodes. Quality media content is required to achieve smooth quality changes.
  • this method of online adaptation requires online adaptation of the media content, and the adaptation process is usually triggered after receiving the user request, and after receiving the media content that meets the requirements, the response is returned to the user.
  • the time required for this adaptation process will increase the response delay requested by the user.
  • the requested media content is a slice with a duration of 2 seconds and a rate of 512 kbps.
  • after receiving the user request first query whether there is a cache in the cache. The user requests the appropriate media content. If not, the corresponding media content needs to be requested from the original server, or the media content in the cache is transcoded, and then the response is returned to the user. In any case, there is a delay in the response to the user request. Summary of the invention
  • the embodiment of the invention provides a method and a device for online media content adaptation, which can reduce the response delay caused by the online adaptation process to the user request.
  • An online adaptation method for media content including:
  • the obtained media content is returned to the user.
  • a media content online adaptation device comprising:
  • a prediction unit configured to predict a media content required by the user before the non-first user request arrives
  • an obtaining unit configured to acquire the media content required by the predicted user
  • a response unit configured to: when the user request arrives, return the obtained media content to the user if the media content actually requested by the user is the same as the media content required by the predicted user.
  • the media content required by the user can be predicted before the user requests, and if the prediction is accurate, the response to the user request can be directly returned to the user. Obviously, the response delay of the user request can be greatly reduced as compared to the manner in which the corresponding media content is prepared after receiving the user request.
  • FIG. 1 is a flowchart of a method according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a device according to an embodiment of the present invention
  • 4 is a flowchart of another apparatus according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of an acquiring unit in an apparatus according to an embodiment of the present invention. detailed description
  • the client in the process of playing the same media file, the client usually needs to send a user request to the media server multiple times, and each time a part of the media file is sent. Among them, a part of the media content requested by the user each time is called a slice of the media file, in other words, the client requests one slice of the media file each time.
  • the client sends a user request, it carries the information such as the bit rate, code rate, or resolution of the requested fragment.
  • the server needs to return the media content of the corresponding bit rate for the user request.
  • the server may first prepare the corresponding media content and then return a response to the user. While returning the response, before the second user request arrives, the media content required by the second user request can be predicted and the predicted media content can be obtained, so that when the second user request arrives,
  • the predicted media content parameters (for convenience of description, the following are all introduced by bit rate), compared with the bit rate of the media content carried in the second user request, if the same, the prediction is accurate, And directly using the predicted media content that has been obtained to return the response information for the second user request.
  • the media content requested by the third user request may be predicted and the predicted media content may be obtained, so that after the third user request arrives,
  • the bit rate of the predicted media content can be compared with the bit rate of the media content carried in the third user request. If the same, the predicted media content that has been obtained is directly used to return a request for the third user. Response information, and so on.
  • the media content required by the user may be predicted before the user requests, and if the prediction is accurate, the user may directly return the request for the request. response.
  • the response delay of the user request can be greatly reduced as compared to the manner in which the corresponding media content is prepared after receiving the user request.
  • the media actually carried in the request may be re-prepared.
  • the content of the content matches the media content, and then returns a response to the user request, while predicting the media content needed in the next user request.
  • the media file and its bit rate are briefly introduced.
  • the client receives the media content for decoding and playing, and the smoothness of the playback is related to the state of the client (including bandwidth, hardware and software configuration, network link status, etc.) and the bit rate used when transmitting the media content. .
  • the state of the client if the state of the client is different, the fluency of the media files played on the client is different.
  • the ability of different client states to receive the bit rate is different under the premise of ensuring smooth play. When the actual bit rate exceeds the maximum bit rate that the client's current state can withstand, the client may not play smoothly.
  • bit rate is not as small as possible, because the bit rate reduction is usually at the cost of reducing the amount of information transmitted per unit time, which means for the client, the clarity, resolution or audio of the video.
  • the quality of the playback is declining. It can be seen that if the user selects a suitable bit rate according to the specific conditions of the client and comprehensively considers the smoothness and clarity of the playback, a higher quality playback effect can be obtained for the client.
  • the media content required by the user in the next user request may be predicted according to the current network bandwidth condition and/or the virtual buffer status of the user player.
  • the network bandwidth condition and/or the virtual buffer status of the user player and the bit rate of the media content may be established according to experience or other means. For specific prediction, you can first obtain the current network bandwidth condition and/or the virtual buffer status of the user player, and then according to the advance The established correspondence acquires the bit rate of the corresponding media content, and uses it as the predicted bit rate of the media content required by the user.
  • the current network bandwidth condition and the virtual buffer status of the user player may be reported to the server by the client, or may be obtained through a separate mechanism to obtain the current network bandwidth condition and the virtuality of the user player. Buffer status information.
  • the above method for predicting the media content required by the user is not unique. In practical applications, other methods can also be used for prediction. For example, the prediction may be performed according to the current media content of the user and the previously requested media content, that is, the rule of the media content required by the user is obtained from the historical user request, and the media content required by the user in the next user request is predicted by using the rule. .
  • the server may first query the cache of the server. If the user has previously requested the part of the media content, and has not been deleted or has not been replaced by other content, the server caches. This part of the media content is already stored. At this time, it is equivalent to the media content that meets the requirements in the cache. After receiving the user request, if the predicted result is the same as the bit rate of the media content requested by the user, the media content is directly taken out from the cache as a response of the user. Return to the user.
  • the method may be used to obtain the prediction by using the method requested by the upper server or by transcoding the media content existing in the cache.
  • the method of requesting the upper-level server is equivalent to making a request to the original server where the media content is located, and the original server stores multiple copies of the same media content, and each copy has the same content but different bits. Rate; When it is predicted that a fragment with a certain bit rate is needed, the fragment of the bit rate can be requested from the original server, and the original server will return the corresponding fragment.
  • the method of transcoding the media content existing in the cache is equivalent to when the fragment that needs to have a certain bit rate is predicted, the fragment of the bit rate does not exist in the cache, but the other bit rate is used. Fragmentation, at this time, other bit rates can be converted to the required bit rate by transcoding to obtain the desired media content.
  • the number of shards and the size of the shards for the same media file It is usually predetermined by the server, and each slice has its own slice identifier.
  • the sharding mode between the individual splicings is the same, and the sharding identities of the shards are also corresponding.
  • a media file has three copies: copy A, copy B, copy C, each of which has M shards, and the shard identifiers for each shard in each copy are 1, 2, 3... ... M, then the content of the same slice in the three copies is the same, that is, when the client plays the slice of the same slice in the three copies (assuming smooth Under the premise of playing), the content that the user sees is the same, but the definition will be different.
  • the client When sending a user request, the client carries the fragmentation identifier of the fragment in addition to the bit rate of the fragment; and the fragments of the media file are sequentially arranged, so, for predicting the media required by the next user request In terms of content, only the required bit rate needs to be predicted. For the fragmentation identifier, only the next fragmentation needs to be taken on the basis of the fragmentation identifier in the current user request.
  • the slice identifier requested by the next user should be 3; and the next user is predicted.
  • the bit rate of the requested fragment is 512 kbps
  • the server can find the fragment with the bit rate of 512 kbps in the fragment with the fragment identifier of 3 in the cache. If it does not exist, it can request the branch from the upper server.
  • the slice is identified as a slice with a bit rate of 512 kbps, or a slice of another bit rate existing in the buffer is identified as a slice of 3, and is converted into a slice having a bit rate of 512 kbps.
  • the media content that is predicted by the user may be obtained by using any of the foregoing methods.
  • whether the same content already exists in the cache may be used. However, factors such as fragmentation of different bit rates, transcoding delay, request delay of the upper server request, transcoding load, user level, etc., determine whether to use the request of the upper server or use the cache.
  • the existing media content is transcoded to obtain the predicted media content required by the user.
  • the user's level is transcoded, and the high bit rate media content existing in the cache is transcoded into the predicted content.
  • the transcoding delay of the media content required by the user is less than the delay of the request from the upper server, the media content that is predicted by the user is obtained by transcoding the media content existing in the cache; otherwise, the superior is used.
  • the way the server requests the predicted media content required by the user.
  • the fragmentation identifier of the next fragment of the currently requested fragment is 3, and the bit rate of the media content required by the next user request is predicted according to the network bandwidth condition and the virtual buffer status of the user player.
  • the steps to obtain the predicted media content required by the user can be as shown in Figure 2:
  • step S201 determining whether there is a fragmentation identifier in the cache, and a media content having a bit rate of 512 kbps exists, if yes, ending the acquisition process; otherwise, proceeding to step S202;
  • bit rate is usually at the expense of reducing the amount of information transmitted per unit time, that is, low bit rate media content is transmitted per unit time relative to high bit rate media content.
  • the amount of information will be relatively small. Therefore, for the fragmentation of the same content, it is relatively easy to convert from a high bit rate to a low bit rate, as long as some information is deleted from the high bit rate media content; otherwise, if it is from Converting a low bit rate to a high bit rate may mean that operations such as restoration of information are required, which is relatively complicated.
  • the conversion from the high bit rate to the low bit rate only when there is media content higher than the predicted bit rate in the cache, that is, the buffer is cached.
  • the media content of other bit rate existing in the conversion manner is obtained, and the predicted media content required by the user is obtained. Otherwise, the predicted media content required by the user is obtained in a manner requested from the upper server.
  • step S203 determining whether the user's level can be transcoded, if yes, proceeding to step S204, no, and proceeding to step S208;
  • S204 Calculate a transcoding delay required for transcoding from a high bit rate to a 512 kbps slice according to an average transcoding delay and a current transcoding load condition;
  • the current transcoding load refers to the transcoding load of the transcoder. Since the server may provide streaming media services to multiple users at the same time, the transcoder may perform multiple transcoding processes at the same time. When the transcoding load is high, The time it takes to complete a new transcoding task will be longer.
  • step S205 determining whether the transcoding delay is less than the delay required by the upper server request, if not, proceeding to step S206, otherwise proceeding to step S208;
  • S206 Submit a transcoding task to the transcoder; For example, if the bit rate of the high bit rate media content existing in the cache is lmbps, the transcoding task submitted to the transcoder is: the slice is identified as 3, the media content of the bit rate is lmbps, and the bit rate is transcoded. Media content of 512kbps.
  • the transcoder writes the transcoded media content to a cache of the server
  • the upper server requests the media content whose slice identifier is 3 and the bit rate is 512 kbps.
  • the above method of selecting media content is not unique, and the system can be used in practical applications. For example, first, it is checked whether the predicted media content has been stored in the cache. If there is no storage, the upper-level server is queried whether the media content is stored, and if it is already stored, it is obtained from the upper-level server; if the predicted media content is not in the upper-level server, For storage, the query caches whether there is suitable media content for transcoding, and whether the transcoder has the ability to perform transcoding, and if the conditions are met, the transcoding is performed.
  • the cache management system may determine whether to store the transcoded media content or the media content obtained from the superior content server in the cache according to a certain cache management policy.
  • the specific cache management strategy is not the focus of the present invention, and therefore will not be described again.
  • a media content online adaptation device see FIG. 3, the device comprises:
  • the predicting unit 301 is configured to predict a media content required by the user before the non-first user request arrives;
  • the obtaining unit 302 is configured to obtain the predicted media content required by the user
  • the response unit 303 is configured to: when the user request arrives, return the obtained media content to the user if the media content actually requested by the user is the same as the media content required by the predicted user.
  • the prediction unit 301 is specifically configured to: predict the media content required by the user according to the network bandwidth condition and/or the virtual buffer status of the user player.
  • the obtaining unit 302 may include:
  • the query subunit 3021 is configured to query, from the cache, the media content that matches the predicted media content required by the user.
  • the requesting sub-unit 3022 is configured to: when the media content that matches the media content required by the predicted user does not exist in the cache, obtain the media content required by the predicted user by using a manner requested by the upper server;
  • the transcoding sub-unit 3023 is configured to: when the media content that matches the media content required by the predicted user does not exist in the cache, use the method of transcoding the media content existing in the cache to obtain the predicted The user needs the media content.
  • the obtaining unit 302 may further include:
  • the selecting subunit 3024 is configured to determine, according to whether the same content in the cache but the different bit rate, the fragmentation delay, the request delay requested by the upper server, the transcoding load condition, and/or the user level, determine the acquisition of the prediction. The way the user needs the media content.
  • the selection subunit 3024 can include:
  • the first determining sub-unit 30241 is configured to determine whether there is media content in the cache that is higher than a bit rate of the media content required by the predicted user; if not, the method may be used to obtain the predicted content in a manner requested by the upper server. Media content required by the user;
  • a second determining sub-unit 30242 configured to determine, if the determination result of the first determining sub-unit is yes, whether the level of the user can be transcoded; if not, the method can be used to obtain the predicted result by using the request of the upper-level server Media content required by the user;
  • a third determining sub-unit 30243 configured to: if the determination result of the second determining sub-unit is yes, determine that the high-bit rate media content existing in the cache is transcoded into the predicted media required by the user Whether the transcoding delay of the content is less than the delay of the request from the upper server; if not less than, the media content required by the predicted user may be obtained by using the request of the upper server;
  • the transcoding determination sub-unit 30244 is configured to: if the determination result of the third determining sub-unit is YES, obtain the predicted user by using the media content that is stored in the cache to be transcoded The media content needed.
  • the media content required by the user can be predicted before the non-first-time user request arrives, and if the prediction is accurate, the response to the user request can be directly returned to the user. Obviously, the response delay of the user request can be greatly reduced as compared to the manner in which the corresponding media content is prepared after receiving the user request.
  • the method includes the following steps: predicting media content required by the user before the non-first user request arrives; obtaining the predicted media content required by the user; and when the user request arrives, if the user actually requests the media content and the location If the predicted media content required by the user is the same, the obtained media content is returned to the user.
  • the storage medium is as follows:

Abstract

A method and device for on-line adaptation of media content are disclosed, wherein the method includes: before a non-first user request arrives, predicting the media content required by the user; obtaining the predicted media content; when the user request arrives, if the media content actually required by the user and the predicted media content are the same, returning the obtained media content to the user. The present invention can reduce the delay of a response to a user request caused by an on-line adaptation processing.

Description

一种媒体内容在线适配方法及装置 技术领域  Online media content adaptation method and device
本发明涉及流媒体技术领域, 尤其涉及一种媒体内容在线适配方法及装 置。  The present invention relates to the field of streaming media technologies, and in particular, to a method and device for online adaptation of media content.
背景技术 Background technique
随着网络通信和多媒体技术的发展, 流媒体技术的应用也日益广泛。 所谓 流媒体是指釆用流式传输的方式在因特网与内联网播放的媒体格式。通过流媒 体技术, 可以为用户提供一种在线播放服务,客户端无需等到多媒体文件全部 下载完成后就可以进行在线观看, 这样给用户带来了很大的方便。  With the development of network communication and multimedia technology, the application of streaming media technology has become increasingly widespread. The so-called streaming media refers to the media format that is played on the Internet and the intranet by means of streaming. Through the streaming media technology, the user can provide an online playing service, and the client can watch the online after the multimedia file is completely downloaded, which brings great convenience to the user.
由于媒体内容格式的不断增加,同时用户的网络连接、终端设备的不同(例 如, 手机, 个人 PC机等), 为满足用户需求和适应带宽变化, 内容提供商往 往需要提供相同媒体内容的不同版本, 并且根据网络带宽变化, 用户终端的不 同, 对媒体内容进行码率、 分辨率等方面的适配。 种预先存储的方式的缺点在于, 需要更多的存储资源来来保存不同码率 /分辨 率的媒体内容副本, 存储成本较高, 同时对于网络带宽、 终端设备的变化的适 应能力有限。  Due to the increasing format of media content, and the different network connections and terminal devices of users (for example, mobile phones, personal PCs, etc.), content providers often need to provide different versions of the same media content to meet user needs and adapt to bandwidth changes. And adapting the media content to the code rate and resolution according to the change of the network bandwidth and the user terminal. A disadvantage of the pre-storage method is that more storage resources are needed to store copies of media content at different bit rates/resolutions, which are costly to store, and have limited adaptability to network bandwidth and changes in terminal devices.
为了更好地适应不同的用户接入网络环境,现有技术可以釆用在线生成不 同码率 /分辨率的媒体内容副本的方式, 例如, 可以在边缘节点上通过在线适 配的方式生成用户所需质量的媒体内容, 从而实现平滑的质量变化。  In order to better adapt to different user access network environments, the prior art may use a method of generating media content copies of different code rates/resolutions online. For example, the user may be generated by online adaptation on the edge nodes. Quality media content is required to achieve smooth quality changes.
但是, 这种在线适配的方式需要在线对媒体内容进行适配处理, 并且这种 适配处理通常是在接收到用户请求之后触发的,获取到符合要求的媒体内容之 后, 再向用户返回响应, 显然, 这种适配处理所需的时间会增加用户请求的响 应延迟。 例如, 在某次用户请求中, 请求的媒体内容为时长为 2 秒、 速率为 512kbps的分片, 则在现有技术的方法中, 需要在接收到用户请求之后, 首先 查询緩存中是否有与用户请求相适应的媒体内容, 如果没有, 需要向原始服务 器请求相应的媒体内容, 或者, 将緩存中的媒体内容进行转码处理, 然后再向 用户返回响应。 而无论如何, 都会对用户请求的响应造成延迟。 发明内容 However, this method of online adaptation requires online adaptation of the media content, and the adaptation process is usually triggered after receiving the user request, and after receiving the media content that meets the requirements, the response is returned to the user. Obviously, the time required for this adaptation process will increase the response delay requested by the user. For example, in a user request, the requested media content is a slice with a duration of 2 seconds and a rate of 512 kbps. In the prior art method, after receiving the user request, first query whether there is a cache in the cache. The user requests the appropriate media content. If not, the corresponding media content needs to be requested from the original server, or the media content in the cache is transcoded, and then the response is returned to the user. In any case, there is a delay in the response to the user request. Summary of the invention
本发明实施例提供了一种媒体内容在线适配方法及装置,能够降低在线适 配处理对用户请求造成的响应延迟。  The embodiment of the invention provides a method and a device for online media content adaptation, which can reduce the response delay caused by the online adaptation process to the user request.
本发明实施例提供了如下方案:  The embodiment of the invention provides the following solutions:
一种媒体内容在线适配方法, 包括:  An online adaptation method for media content, including:
在非首次用户请求到达之前, 预测用户需要的媒体内容;  Predicting the media content the user needs before the non-first user request arrives;
获取所述预测出的用户需要的媒体内容;  Obtaining the predicted media content required by the user;
当所述用户请求到达时,如果用户实际请求的媒体内容与所述预测出的用 户需要的媒体内容相同, 则将所述获取到的媒体内容返回给用户。  When the user request arrives, if the media content actually requested by the user is the same as the media content required by the predicted user, the obtained media content is returned to the user.
一种媒体内容在线适配装置, 包括:  A media content online adaptation device, comprising:
预测单元, 用于在非首次用户请求到达之前, 预测用户需要的媒体内容; 获取单元, 用于获取所述预测出的用户需要的媒体内容;  a prediction unit, configured to predict a media content required by the user before the non-first user request arrives; and an obtaining unit, configured to acquire the media content required by the predicted user;
响应单元, 用于当所述用户请求到达时,如果用户实际请求的媒体内容与 所述预测出的用户需要的媒体内容相同,则将所述获取到的媒体内容返回给用 户。  And a response unit, configured to: when the user request arrives, return the obtained media content to the user if the media content actually requested by the user is the same as the media content required by the predicted user.
通过本发明实施例, 可以在用户请求到来之前,对用户需要的媒体内容进 行预测,如果预测准确,则可以直接向用户返回针对该用户请求的响应。显然, 相对于在接收到用户请求之后再准备相应的媒体内容的方式相比,可以大大降 低用户请求的响应延迟。 附图说明  With the embodiment of the present invention, the media content required by the user can be predicted before the user requests, and if the prediction is accurate, the response to the user request can be directly returned to the user. Obviously, the response delay of the user request can be greatly reduced as compared to the manner in which the corresponding media content is prepared after receiving the user request. DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付 出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.
图 1是本发明实施例提供的方法的流程图; 图 3是本发明实施例提供的装置的示意图; 图 4是本发明实施例提供的另一装置的流程图; 1 is a flowchart of a method according to an embodiment of the present invention; FIG. 3 is a schematic diagram of a device according to an embodiment of the present invention; 4 is a flowchart of another apparatus according to an embodiment of the present invention;
图 5是本发明实施例提供的装置中获取单元的示意图。 具体实施方式  FIG. 5 is a schematic diagram of an acquiring unit in an apparatus according to an embodiment of the present invention. detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有做出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。  BRIEF DESCRIPTION OF THE DRAWINGS The technical solutions in the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without the creative work are all within the scope of the present invention.
S101 : 在非首次用户请求到达之前, 预测用户需要的媒体内容; S101: predicting media content required by the user before the non-first user request arrives;
S102: 获取所述预测出的用户需要的媒体内容;  S102: Obtain the predicted media content required by the user;
S103 : 当所述用户请求到达时,如果用户实际请求的媒体内容与所述预测 出的用户需要的媒体内容相同, 则将所述获取到的媒体内容返回给用户。  S103: When the user request arrives, if the media content actually requested by the user is the same as the media content required by the predicted user, the obtained media content is returned to the user.
首先需要说明的是, 在播放同一个媒体文件的过程中,客户端通常需要多 次向媒体服务器发送用户请求, 每次请求发送媒体文件的一部分内容。 其中, 用户每次请求的一部分媒体内容称为媒体文件的一个分片,换言之,客户端每 次请求媒体文件的一个分片。客户端在发送用户请求时,会携带请求的分片的 比特率、码率或者分辨率等信息,服务器需要针对用户请求返回相应比特率的 媒体内容。  First of all, it should be noted that in the process of playing the same media file, the client usually needs to send a user request to the media server multiple times, and each time a part of the media file is sent. Among them, a part of the media content requested by the user each time is called a slice of the media file, in other words, the client requests one slice of the media file each time. When the client sends a user request, it carries the information such as the bit rate, code rate, or resolution of the requested fragment. The server needs to return the media content of the corresponding bit rate for the user request.
针对首次接收到的播放某媒体文件的用户请求,服务器可以首先准备相应 的媒体内容, 然后向用户返回响应。 在返回该响应的同时, 第二个用户请求到 来之前, 就可以对第二个用户请求需要的媒体内容进行预测, 并获取预测出的 媒体内容, 这样, 当第二个用户请求到来之后, 就可以将预测出的媒体内容的 参数(为方便描述, 下面均以比特率为例进行介绍), 与第二个用户请求中携 带的媒体内容的比特率进行比较, 如果相同, 则证明预测准确, 并直接利用已 经获取到的预测出的媒体内容返回针对第二个用户请求的响应信息即可。在针 对第二个用户请求返回响应信息的同时,又可以对第三个用户请求需要的媒体 内容进行预测,并获取预测出的媒体内容,这样, 当第三个用户请求到来之后, 就可以将预测出的媒体内容的比特率,与第三个用户请求中携带的媒体内容的 比特率进行比较, 如果相同, 直接利用已经获取到的预测出的媒体内容返回针 对第三个用户请求的响应信息, 以此类推。 For the first received user request to play a media file, the server may first prepare the corresponding media content and then return a response to the user. While returning the response, before the second user request arrives, the media content required by the second user request can be predicted and the predicted media content can be obtained, so that when the second user request arrives, The predicted media content parameters (for convenience of description, the following are all introduced by bit rate), compared with the bit rate of the media content carried in the second user request, if the same, the prediction is accurate, And directly using the predicted media content that has been obtained to return the response information for the second user request. While returning the response information for the second user request, the media content requested by the third user request may be predicted and the predicted media content may be obtained, so that after the third user request arrives, The bit rate of the predicted media content can be compared with the bit rate of the media content carried in the third user request. If the same, the predicted media content that has been obtained is directly used to return a request for the third user. Response information, and so on.
换言之, 在本发明实施例中, 除了首次接收到的用户请求之外, 都可以在 用户请求到来之前, 对用户需要的媒体内容进行预测, 如果预测准确, 则可以 直接向用户返回针对该请求的响应。显然,相对于在接收到用户请求之后再准 备相应的媒体内容的方式相比, 可以大大降低用户请求的响应延迟。  In other words, in the embodiment of the present invention, in addition to the user request received for the first time, the media content required by the user may be predicted before the user requests, and if the prediction is accurate, the user may directly return the request for the request. response. Obviously, the response delay of the user request can be greatly reduced as compared to the manner in which the corresponding media content is prepared after receiving the user request.
当然, 如果当某用户请求到来时,发现针对该用户请求预测出的媒体内容 的比特率, 与用户请求中实际携带的媒体内容的比特率不同, 则可以重新准备 与用户请求中实际携带的媒体内容的比特率相匹配的媒体内容,然后再针对该 用户请求返回响应, 同时, 对下一个用户请求中需要的媒体内容进行预测。  If the bit rate of the media content predicted by the user request is different from the bit rate of the media content actually carried in the user request, the media actually carried in the request may be re-prepared. The content of the content matches the media content, and then returns a response to the user request, while predicting the media content needed in the next user request.
下面介绍如何预测用户需要的媒体内容。 为了便于理解, 首先对媒体文件 及其比特率进行简单的介绍。在流媒体技术应用中,客户端接收到媒体内容进 行解码播放, 播放的流畅度与客户端的状态(包括带宽、 软硬件配置及网络链 路状况等) 以及传输媒体内容时釆用的比特率有关。 对于相同的比特率而言, 如果客户端的状态不同, 则在客户端上播放出的媒体文件的流畅度是不同的。 换言之, 从播放流畅程度的角度出发, 在保证播放流畅的前提下, 不同的客户 端状态能够接收比特率的能力是不同的。当实际的比特率超过客户端当前状态 能够承受的最大比特率时, 客户端就可能出现播放不流畅的现象。  Here's how to predict the media content your users need. For ease of understanding, the media file and its bit rate are briefly introduced. In the streaming media technology application, the client receives the media content for decoding and playing, and the smoothness of the playback is related to the state of the client (including bandwidth, hardware and software configuration, network link status, etc.) and the bit rate used when transmitting the media content. . For the same bit rate, if the state of the client is different, the fluency of the media files played on the client is different. In other words, from the perspective of the smoothness of playback, the ability of different client states to receive the bit rate is different under the premise of ensuring smooth play. When the actual bit rate exceeds the maximum bit rate that the client's current state can withstand, the client may not play smoothly.
当然, 比特率也不是越小越好, 因为比特率的降低通常是以减少单位时间 内传输的信息量为代价的, 这对于客户端而言, 就意味着视频的清晰程度、 分 辨率或者音频的播放质量的下降。 可见, 如果能够根据客户端的具体状况, 综 合考虑播放的流畅度以及清晰度等因素,选择较为合适的比特率, 则对于客户 端而言, 可以得到更高品质的播放效果。  Of course, the bit rate is not as small as possible, because the bit rate reduction is usually at the cost of reducing the amount of information transmitted per unit time, which means for the client, the clarity, resolution or audio of the video. The quality of the playback is declining. It can be seen that if the user selects a suitable bit rate according to the specific conditions of the client and comprehensively considers the smoothness and clarity of the playback, a higher quality playback effect can be obtained for the client.
因此, 在本发明实施例中, 可以根据当前的网络带宽条件和 /或用户播放 器的虚拟緩冲区状况,对下一个用户请求中用户需要的媒体内容进行预测。 实 际应用中, 可以根据经验或者其他手段, 建立网络带宽条件和 /或用户播放器 的虚拟緩冲区状况, 与媒体内容的比特率的对应关系。 具体预测时, 可以首先 获取当前的网络带宽条件和 /或用户播放器的虚拟緩冲区状况, 然后根据预先 建立的对应关系, 获取对应的媒体内容的比特率, 将其作为预测出的用户需要 的媒体内容的比特率即可。其中, 关于当前的网络带宽条件及用户播放器的虚 拟緩冲区状况, 可以是由客户端主动上报给服务器的,也可以通过单独一套机 制去获取当前的网络带宽条件及用户播放器的虚拟緩冲区状况信息。 Therefore, in the embodiment of the present invention, the media content required by the user in the next user request may be predicted according to the current network bandwidth condition and/or the virtual buffer status of the user player. In practical applications, the network bandwidth condition and/or the virtual buffer status of the user player and the bit rate of the media content may be established according to experience or other means. For specific prediction, you can first obtain the current network bandwidth condition and/or the virtual buffer status of the user player, and then according to the advance The established correspondence acquires the bit rate of the corresponding media content, and uses it as the predicted bit rate of the media content required by the user. The current network bandwidth condition and the virtual buffer status of the user player may be reported to the server by the client, or may be obtained through a separate mechanism to obtain the current network bandwidth condition and the virtuality of the user player. Buffer status information.
当然, 上述对用户需要的媒体内容进行预测的方法并不是唯一的,在实际 应用中, 还可以使用其他的方法进行预测。 例如, 可以根据用户当前以及之前 请求的媒体内容的情况进行预测, 即, 从历史用户请求中, 获取用户需要的媒 体内容的规律, 利用该规律对下一用户请求中用户需要的媒体内容进行预测。  Of course, the above method for predicting the media content required by the user is not unique. In practical applications, other methods can also be used for prediction. For example, the prediction may be performed according to the current media content of the user and the previously requested media content, that is, the rule of the media content required by the user is obtained from the historical user request, and the media content required by the user in the next user request is predicted by using the rule. .
在预测出用户需要的媒体内容的比特率之后,就可以预先准备相应的媒体 内容。具体在获取预测出的用户需要的媒体内容时, 可以首先在服务器的緩存 中查询,如果此前已经有用户请求过该部分媒体内容, 并且尚未被删除或者尚 未被其它内容替换, 则服务器的緩存中就已经存储有这部分媒体内容。 此时, 相当于緩存中存在符合要求的媒体内容,在接收到用户请求之后, 如果预测的 结果与用户请求的媒体内容的比特率相同,则直接从緩存中取出这部分媒体内 容作为用户的响应返回给用户即可。  After predicting the bit rate of the media content desired by the user, the corresponding media content can be prepared in advance. Specifically, when obtaining the predicted media content required by the user, the server may first query the cache of the server. If the user has previously requested the part of the media content, and has not been deleted or has not been replaced by other content, the server caches. This part of the media content is already stored. At this time, it is equivalent to the media content that meets the requirements in the cache. After receiving the user request, if the predicted result is the same as the bit rate of the media content requested by the user, the media content is directly taken out from the cache as a response of the user. Return to the user.
如果经过查询发现緩存中不存在与预测出的媒体内容相匹配的媒体内容, 则可以釆用向上级服务器请求的方式,或者釆用对緩存中存在的媒体内容进行 转码的方式, 来获取预测出的用户需要的媒体内容。  If the query finds that there is no media content matching the predicted media content in the cache, the method may be used to obtain the prediction by using the method requested by the upper server or by transcoding the media content existing in the cache. The media content that the user needs.
其中, 釆用向上级服务器请求的方式,相当于是向媒体内容所在的原始服 务器进行请求, 在原始服务器中存有同一媒体内容的多个副本, 每个副本中, 内容相同, 但是具有不同的比特率; 当预测出需要具有某比特率的某分片时, 就可以向原始服务器请求该比特率的该分片, 原始服务器会将相应的分片返 回。  The method of requesting the upper-level server is equivalent to making a request to the original server where the media content is located, and the original server stores multiple copies of the same media content, and each copy has the same content but different bits. Rate; When it is predicted that a fragment with a certain bit rate is needed, the fragment of the bit rate can be requested from the original server, and the original server will return the corresponding fragment.
釆用对緩存中存在的媒体内容进行转码的方式,相当于当预测出需要具有 某比特率的某分片时,緩存中不存在该比特率的该分片,但是具有其他比特率 的该分片, 此时, 可以通过转码操作, 将其他比特率转换为需要的比特率, 从 而得到所需的媒体内容。  The method of transcoding the media content existing in the cache is equivalent to when the fragment that needs to have a certain bit rate is predicted, the fragment of the bit rate does not exist in the cache, but the other bit rate is used. Fragmentation, at this time, other bit rates can be converted to the required bit rate by transcoding to obtain the desired media content.
这里需要说明的是, 对于同一媒体文件而言, 具有的分片数目及分片大小 通常是由服务器预先确定好的, 并且每一分片具有各自的分片标识。对于同一 媒体文件的不同比特率的副本而言,各个副本之间的分片方式是相同的, 并且 各个分片的分片标识也是都对应的。例如,某媒体文件具有三个副本: 副本 A、 副本 B、 副本 C, 每个副本中有 M个分片, 每个副本中各分片的分片标识都 为 1、 2、 3... ... M, 则三个副本中分片标识相同的分片对应的内容是相同的, 也就是说, 在客户端播放这三个副本中相同分片标识的分片时(假设都能够流 畅播放的前提下), 用户看到的内容是相同的, 只是清晰度会有所差别。 What needs to be explained here is the number of shards and the size of the shards for the same media file. It is usually predetermined by the server, and each slice has its own slice identifier. For copies of different bitrates of the same media file, the sharding mode between the individual splicings is the same, and the sharding identities of the shards are also corresponding. For example, a media file has three copies: copy A, copy B, copy C, each of which has M shards, and the shard identifiers for each shard in each copy are 1, 2, 3... ... M, then the content of the same slice in the three copies is the same, that is, when the client plays the slice of the same slice in the three copies (assuming smooth Under the premise of playing), the content that the user sees is the same, but the definition will be different.
客户端在发送用户请求时, 除了携带分片的比特率以外,还会携带分片的 分片标识; 而媒体文件的各个分片是顺序排列的, 因此, 对于预测下一个用户 请求需要的媒体内容而言, 只需要预测其需要的比特率, 对于分片标识, 只需 要在当前用户请求中的分片标识的基础上取下一分片即可。  When sending a user request, the client carries the fragmentation identifier of the fragment in addition to the bit rate of the fragment; and the fragments of the media file are sequentially arranged, so, for predicting the media required by the next user request In terms of content, only the required bit rate needs to be predicted. For the fragmentation identifier, only the next fragmentation needs to be taken on the basis of the fragmentation identifier in the current user request.
例如,假设当前请求的是分片标识为 2的分片, 该分片的下一分片的分片 标识为 3 , 则下一用户请求的分片标识应该为 3; 并且预测出下一用户请求需 要的分片的比特率为 512kbps, 则服务器就可以在緩存中查找分片标识为 3的 分片中, 是否存在比特率为 512kbps的分片, 如果不存在, 就可以向上级服务 器请求分片标识为 3、 比特率为 512kbps的分片, 或者, 将緩存中存在的其他 比特率的分片标识为 3的分片进行转码, 转换为比特率为 512kbps的分片。  For example, if the current request is a slice with a slice ID of 2, and the slice identifier of the next slice of the slice is 3, the slice identifier requested by the next user should be 3; and the next user is predicted. If the bit rate of the requested fragment is 512 kbps, the server can find the fragment with the bit rate of 512 kbps in the fragment with the fragment identifier of 3 in the cache. If it does not exist, it can request the branch from the upper server. The slice is identified as a slice with a bit rate of 512 kbps, or a slice of another bit rate existing in the buffer is identified as a slice of 3, and is converted into a slice having a bit rate of 512 kbps.
具体实现时, 可以选择上述任意种方式获取预测出的用户需要的媒体内 容, 当然, 为了能够进一步降低对用户请求的响应延迟, 在本发明实施例中, 还可以根据緩存中是否已经存在相同内容但不同比特率的分片、转码延迟、 向 上级服务器请求的请求延迟、 转码负载情况、 用户等级等因素, 来确定是釆用 向上级服务器请求的方式,还是釆用对所述緩存中存在的媒体内容进行转码的 方式, 获取预测出的用户需要的媒体内容。  In a specific implementation, the media content that is predicted by the user may be obtained by using any of the foregoing methods. In order to further reduce the response delay to the user request, in the embodiment of the present invention, whether the same content already exists in the cache may be used. However, factors such as fragmentation of different bit rates, transcoding delay, request delay of the upper server request, transcoding load, user level, etc., determine whether to use the request of the upper server or use the cache. The existing media content is transcoded to obtain the predicted media content required by the user.
具体的,如果緩存中存在比预测出的用户需要的媒体内容的比特率高的媒 体内容, 用户的等级为可以转码, 并且从緩存中存在的高比特率的媒体内容转 码为预测出的用户需要的媒体内容的转码延迟, 小于向上级服务器请求的延 迟, 则釆用对緩存中存在的媒体内容进行转码的方式, 获取预测出的用户需要 的媒体内容; 否则, 釆用向上级服务器请求的方式, 获取预测出的用户需要的 媒体内容。 例如, 当前请求的分片的下一分片的分片标识为 3 , 并且根据网络带宽条 件及用户播放器的虚拟緩冲区状况等,预测出下一个用户请求需要的媒体内容 的比特率为 512kbps, 则获取预测出的用户需要的媒体内容的步骤可以如图 2 所示: Specifically, if there is media content in the cache that is higher than the predicted bit rate of the media content required by the user, the user's level is transcoded, and the high bit rate media content existing in the cache is transcoded into the predicted content. If the transcoding delay of the media content required by the user is less than the delay of the request from the upper server, the media content that is predicted by the user is obtained by transcoding the media content existing in the cache; otherwise, the superior is used. The way the server requests, the predicted media content required by the user. For example, the fragmentation identifier of the next fragment of the currently requested fragment is 3, and the bit rate of the media content required by the next user request is predicted according to the network bandwidth condition and the virtual buffer status of the user player. At 512 kbps, the steps to obtain the predicted media content required by the user can be as shown in Figure 2:
S201 : 判断緩存中是否有分片标识为 3、 比特率为 512kbps的媒体内容存 在, 如果有, 则结束获取流程, 否则, 进入步骤 S202;  S201: determining whether there is a fragmentation identifier in the cache, and a media content having a bit rate of 512 kbps exists, if yes, ending the acquisition process; otherwise, proceeding to step S202;
S202: 判断緩存中是否有分片标识为 3、 比特率高于 512 kbps的媒体内容 存在, 如果有, 则进入步骤 S203 , 否则进入步骤 S208;  S202: determining whether there is a fragment identifier in the cache is 3, a media content having a bit rate higher than 512 kbps exists, if yes, proceeding to step S203, otherwise proceeding to step S208;
如前文所述,比特率的降低通常是以减少单位时间内传输的信息量为代价 的, 也就是说, 低比特率的媒体内容相对于高比特率的媒体内容而言, 单位时 间内传输的信息量会比较少, 因此, 对于相同内容的分片而言, 从高比特率向 低比特率转换相对比较容易, 只要将高比特率的媒体内容中删除一些信息即 可; 否则, 如果是从低比特率向高比特率进行转换, 则可能意味着需要进行信 息的还原等操作, 相对比较复杂。 因此, 为了进一步降低对用户请求的响应延 迟, 可以仅当緩存中存在高于预测出的比特率的媒体内容的情况, 才可能进行 从高比特率向低比特率的转换,即釆用将緩存中存在的其他比特率的媒体内容 进行转换的方式, 获取预测出的用户需要的媒体内容, 否则, 选择从上级服务 器请求的方式获取预测出的用户需要的媒体内容。  As mentioned earlier, the reduction in bit rate is usually at the expense of reducing the amount of information transmitted per unit time, that is, low bit rate media content is transmitted per unit time relative to high bit rate media content. The amount of information will be relatively small. Therefore, for the fragmentation of the same content, it is relatively easy to convert from a high bit rate to a low bit rate, as long as some information is deleted from the high bit rate media content; otherwise, if it is from Converting a low bit rate to a high bit rate may mean that operations such as restoration of information are required, which is relatively complicated. Therefore, in order to further reduce the response delay to the user request, it is possible to perform the conversion from the high bit rate to the low bit rate only when there is media content higher than the predicted bit rate in the cache, that is, the buffer is cached. The media content of other bit rate existing in the conversion manner is obtained, and the predicted media content required by the user is obtained. Otherwise, the predicted media content required by the user is obtained in a manner requested from the upper server.
S203 : 判断用户的等级是否可以转码, 如果可以, 进入步骤 S204, 否贝' J , 进入步骤 S208;  S203: determining whether the user's level can be transcoded, if yes, proceeding to step S204, no, and proceeding to step S208;
S204: 根据平均转码延迟、 当前的转码负载情况计算从某高比特率转码得 到 512kbps的分片所需的转码延迟;  S204: Calculate a transcoding delay required for transcoding from a high bit rate to a 512 kbps slice according to an average transcoding delay and a current transcoding load condition;
当前的转码负载是指转码器的转码负载,由于服务器可能同时向多个用户 提供流媒体服务, 因此, 转码器可能同时进行多个转码进程, 当转码负载较高 时, 完成新的转码任务所需的时间就会比较长。  The current transcoding load refers to the transcoding load of the transcoder. Since the server may provide streaming media services to multiple users at the same time, the transcoder may perform multiple transcoding processes at the same time. When the transcoding load is high, The time it takes to complete a new transcoding task will be longer.
S205: 判断转码延迟是否小于向上级服务器请求所需的延迟, 如果小于, 则进入步骤 S206 , 否则进入步骤 S208;  S205: determining whether the transcoding delay is less than the delay required by the upper server request, if not, proceeding to step S206, otherwise proceeding to step S208;
S206: 向转码器提交转码任务; 例如, 緩存中存在的高比特率的媒体内容的比特率为 lmbps, 则向转码器 提交的转码任务为: 将分片标识为 3、 比特率为 lmbps的媒体内容, 转码为比 特率为 512kbps的媒体内容。 S206: Submit a transcoding task to the transcoder; For example, if the bit rate of the high bit rate media content existing in the cache is lmbps, the transcoding task submitted to the transcoder is: the slice is identified as 3, the media content of the bit rate is lmbps, and the bit rate is transcoded. Media content of 512kbps.
S207: 转码器将转码后的媒体内容写入到服务器的緩存;  S207: The transcoder writes the transcoded media content to a cache of the server;
S208: 向上级服务器请求分片标识为 3、 比特率为 512kbps的媒体内容。 当然, 上述选择获取媒体内容的方式也不是唯一的, 实际应用中还可以釆 用系统方式。 例如, 首先查询緩存中是否已经存储预测出的媒体内容, 如果没 有存储, 则查询上级服务器是否存储有该媒体内容, 若已经存储则从上级服务 器获取; 若预测出的媒体内容也没有在上级服务器存储, 则查询緩存中是否有 合适的媒体内容进行转码, 以及转码器是否具有能力进行转码, 如果条件满足 则进行转码。  S208: The upper server requests the media content whose slice identifier is 3 and the bit rate is 512 kbps. Of course, the above method of selecting media content is not unique, and the system can be used in practical applications. For example, first, it is checked whether the predicted media content has been stored in the cache. If there is no storage, the upper-level server is queried whether the media content is stored, and if it is already stored, it is obtained from the upper-level server; if the predicted media content is not in the upper-level server, For storage, the query caches whether there is suitable media content for transcoding, and whether the transcoder has the ability to perform transcoding, and if the conditions are met, the transcoding is performed.
需要说明的是,对于緩存中对媒体内容的存储情况,緩存管理系统可以根 据一定的緩存管理策略 ,决定是否在緩存中存储转码后的媒体内容或从上级内 容服务器获取的媒体内容。具体的緩存管理策略并不是本发明的重点, 因此不 再赘述。 供了一种媒体内容在线适配装置, 参见图 3 , 该装置包括:  It should be noted that, for the storage of media content in the cache, the cache management system may determine whether to store the transcoded media content or the media content obtained from the superior content server in the cache according to a certain cache management policy. The specific cache management strategy is not the focus of the present invention, and therefore will not be described again. Provided is a media content online adaptation device, see FIG. 3, the device comprises:
预测单元 301 , 用于在非首次用户请求到达之前, 预测用户需要的媒体内 容;  The predicting unit 301 is configured to predict a media content required by the user before the non-first user request arrives;
获取单元 302 , 用于获取所述预测出的用户需要的媒体内容;  The obtaining unit 302 is configured to obtain the predicted media content required by the user;
响应单元 303 , 用于当所述用户请求到达时, 如果用户实际请求的媒体内 容与所述预测出的用户需要的媒体内容相同,则将所述获取到的媒体内容返回 给用户。  The response unit 303 is configured to: when the user request arrives, return the obtained media content to the user if the media content actually requested by the user is the same as the media content required by the predicted user.
其中, 预测单元 301 具体用于: 根据网络带宽条件和 /或用户播放器的虚 拟緩冲区状况, 预测用户需要的媒体内容。  The prediction unit 301 is specifically configured to: predict the media content required by the user according to the network bandwidth condition and/or the virtual buffer status of the user player.
具体实现时, 参见图 4, 获取单元 302可以包括:  For specific implementation, referring to FIG. 4, the obtaining unit 302 may include:
查询子单元 3021 , 用于从緩存中查询出与所述预测出的用户需要的媒体 内容匹配的媒体内容。 请求子单元 3022 , 用于緩存中不存在与所述预测出的用户需要的媒体内 容匹配的媒体内容时, 釆用向上级服务器请求的方式, 获取所述预测出的用户 需要的媒体内容; The query subunit 3021 is configured to query, from the cache, the media content that matches the predicted media content required by the user. The requesting sub-unit 3022 is configured to: when the media content that matches the media content required by the predicted user does not exist in the cache, obtain the media content required by the predicted user by using a manner requested by the upper server;
或者,  Or,
转码子单元 3023 , 用于緩存中不存在与所述预测出的用户需要的媒体内 容匹配的媒体内容时, 釆用对所述緩存中存在的媒体内容进行转码的方式, 获 取所述预测出的用户需要的媒体内容。  The transcoding sub-unit 3023 is configured to: when the media content that matches the media content required by the predicted user does not exist in the cache, use the method of transcoding the media content existing in the cache to obtain the predicted The user needs the media content.
实际应用中, 获取单元 302还可以包括:  In an actual application, the obtaining unit 302 may further include:
选择子单元 3024, 用于根据緩存中是否已经存在相同内容但不同比特率 的分片、 转码延迟、 向上级服务器请求的请求延迟、 转码负载情况和 /或用户 等级, 确定获取所述预测出的用户需要的媒体内容的方式。  The selecting subunit 3024 is configured to determine, according to whether the same content in the cache but the different bit rate, the fragmentation delay, the request delay requested by the upper server, the transcoding load condition, and/or the user level, determine the acquisition of the prediction. The way the user needs the media content.
参见图 5 , 选择子单元 3024可以包括:  Referring to Figure 5, the selection subunit 3024 can include:
第一判断子单元 30241 , 用于判断緩存中是否存在比所述预测出的用户需 要的媒体内容的比特率高的媒体内容; 如果不存在, 则可以釆用向上级服务器 请求的方式获取预测出的用户需要的媒体内容;  The first determining sub-unit 30241 is configured to determine whether there is media content in the cache that is higher than a bit rate of the media content required by the predicted user; if not, the method may be used to obtain the predicted content in a manner requested by the upper server. Media content required by the user;
第二判断子单元 30242 , 用于如果所述第一判断子单元的判断结果为是, 则判断用户的等级是否可以转码; 如果不可以, 则可以釆用向上级服务器请求 的方式获取预测出的用户需要的媒体内容;  a second determining sub-unit 30242, configured to determine, if the determination result of the first determining sub-unit is yes, whether the level of the user can be transcoded; if not, the method can be used to obtain the predicted result by using the request of the upper-level server Media content required by the user;
第三判断子单元 30243 , 用于如果所述第二判断子单元的判断结果为是, 则判断从所述緩存中存在的高比特率的媒体内容转码为所述预测出的用户需 要的媒体内容的转码延迟, 是否小于向上级服务器请求的延迟; 如果不小于, 则可以釆用向上级服务器请求的方式获取预测出的用户需要的媒体内容;  a third determining sub-unit 30243, configured to: if the determination result of the second determining sub-unit is yes, determine that the high-bit rate media content existing in the cache is transcoded into the predicted media required by the user Whether the transcoding delay of the content is less than the delay of the request from the upper server; if not less than, the media content required by the predicted user may be obtained by using the request of the upper server;
转码确定子单元 30244, 用于如果所述第三判断子单元的判断结果为是, 则釆用所述对所述緩存中存在的媒体内容进行转码的方式,获取所述预测出的 用户需要的媒体内容。  The transcoding determination sub-unit 30244 is configured to: if the determination result of the third determining sub-unit is YES, obtain the predicted user by using the media content that is stored in the cache to be transcoded The media content needed.
通过本发明实施例, 可以在非首次用户请求到来之前,对用户需要的媒体 内容进行预测,如果预测准确,则可以直接向用户返回针对该用户请求的响应。 显然,相对于在接收到用户请求之后再准备相应的媒体内容的方式相比, 可以 大大降低用户请求的响应延迟。 With the embodiment of the present invention, the media content required by the user can be predicted before the non-first-time user request arrives, and if the prediction is accurate, the response to the user request can be directly returned to the user. Obviously, the response delay of the user request can be greatly reduced as compared to the manner in which the corresponding media content is prepared after receiving the user request.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于一计算机可 读取存储介质中, 该程序在执行时, 包括如下步骤: 在非首次用户请求到达之 前, 预测用户需要的媒体内容; 获取所述预测出的用户需要的媒体内容; 当所 述用户请求到达时,如果用户实际请求的媒体内容与所述预测出的用户需要的 媒体内容相同,则将所述获取到的媒体内容返回给用户。所述的存储介质,如: A person skilled in the art can understand that all or part of the steps of implementing the above embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium, and the program is executed. The method includes the following steps: predicting media content required by the user before the non-first user request arrives; obtaining the predicted media content required by the user; and when the user request arrives, if the user actually requests the media content and the location If the predicted media content required by the user is the same, the obtained media content is returned to the user. The storage medium is as follows:
ROM/RAM、 磁碟、 光盘等。 ROM/RAM, disk, CD, etc.
以上所述仅是本发明的优选实施方式,应当指出, 对于本技术领域的普通 技术人员来说, 在不脱离本发明原理的前提下, 还可以做出若干改进和润饰, 这些改进和润饰也应视为本发明的保护范围。  The above description is only a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It should be considered as the scope of protection of the present invention.

Claims

权 利 要 求 Rights request
1、 一种媒体内容在线适配方法, 其特征在于, 包括:  A method for online adaptation of media content, comprising:
在非首次用户请求到达之前, 预测用户需要的媒体内容;  Predicting the media content the user needs before the non-first user request arrives;
获取所述预测出的用户需要的媒体内容;  Obtaining the predicted media content required by the user;
当所述用户请求到达时,如果用户实际请求的媒体内容与所述预测出的用 户需要的媒体内容相同, 则将所述获取到的媒体内容返回给用户。  When the user request arrives, if the media content actually requested by the user is the same as the media content required by the predicted user, the obtained media content is returned to the user.
2、 根据权利要求 1所述的方法, 其特征在于, 所述预测用户需要的媒体 内容包括:  2. The method according to claim 1, wherein the predicting media content required by the user comprises:
根据网络带宽条件和 /或用户播放器的虚拟緩冲区状况, 预测用户需要的 媒体内容。  The media content desired by the user is predicted based on network bandwidth conditions and/or virtual buffer conditions of the user player.
3、 根据权利要求 1所述的方法, 其特征在于, 所述获取所述预测出的用 户需要的媒体内容包括:  The method according to claim 1, wherein the obtaining the media content required by the predicted user comprises:
从緩存中查询出与所述预测出的用户需要的媒体内容匹配的媒体内容。 The media content matching the predicted media content required by the user is queried from the cache.
4、 根据权利要求 3所述的方法, 其特征在于, 如果所述緩存中不存在与 所述预测出的用户需要的媒体内容匹配的媒体内容,所述获取所述预测出的用 户需要的媒体内容还包括: The method according to claim 3, wherein if the media content that matches the predicted media content required by the user does not exist in the cache, the obtaining the media required by the predicted user The content also includes:
釆用向上级服务器请求的方式, 获取所述预测出的用户需要的媒体内容; 或者,  Obtaining, by means of a request from a superior server, the media content required by the predicted user; or
釆用对所述緩存中存在的媒体内容进行转码的方式,获取所述预测出的用 户需要的媒体内容。  The media content required by the predicted user is obtained by transcoding the media content existing in the cache.
5、 根据权利要求 4所述的方法, 其特征在于: 级服务器请求的请求延迟、 转码负载情况和 /或用户等级, 确定获取所述预测 出的用户需要的媒体内容的方式。  The method according to claim 4, wherein: the request delay, the transcoding load condition and/or the user level requested by the level server determine a manner of obtaining the predicted media content required by the user.
6、 根据权利要求 5所述的方法, 其特征在于, 所述确定获取所述预测出 的用户需要的媒体内容的方式包括:  The method according to claim 5, wherein the determining the manner of obtaining the predicted media content required by the user comprises:
判断緩存中是否存在比所述预测出的用户需要的媒体内容的比特率高的 媒体内容;  Determining whether there is media content in the cache that is higher than a bit rate of the predicted media content required by the user;
如果是, 判断用户的等级是否可以转码; 如果可以,判断从所述緩存中存在的高比特率的媒体内容转码为所述预测 出的用户需要的媒体内容的转码延迟, 是否小于向上级服务器请求的延迟; 如果小于, 则釆用所述对所述緩存中存在的媒体内容进行转码的方式, 获 取所述预测出的用户需要的媒体内容。 If yes, determine whether the user's rating can be transcoded; If so, determining whether the transcoding delay from the high bit rate media content present in the cache to the predicted media content of the user is less than the delay requested by the upper server; if less than, And the method of transcoding the media content existing in the cache to obtain the predicted media content required by the user.
7、 一种媒体内容在线适配装置, 其特征在于, 包括:  7. A media content online adaptation device, comprising:
预测单元, 用于在非首次用户请求到达之前, 预测用户需要的媒体内容; 获取单元, 用于获取所述预测出的用户需要的媒体内容;  a prediction unit, configured to predict a media content required by the user before the non-first user request arrives; and an obtaining unit, configured to acquire the media content required by the predicted user;
响应单元, 用于当所述用户请求到达时,如果用户实际请求的媒体内容与 所述预测出的用户需要的媒体内容相同,则将所述获取到的媒体内容返回给用 户。  And a response unit, configured to: when the user request arrives, return the obtained media content to the user if the media content actually requested by the user is the same as the media content required by the predicted user.
8、 根据权利要求 7所述的装置, 其特征在于, 所述预测单元具体用于: 根据网络带宽条件和 /或用户播放器的虚拟緩冲区状况, 预测用户需要的媒体 内容。  The device according to claim 7, wherein the predicting unit is specifically configured to: predict media content required by the user according to a network bandwidth condition and/or a virtual buffer condition of the user player.
9、 根据权利要求 7所述的装置, 其特征在于, 所述获取单元包括: 查询子单元,用于从緩存中查询出与所述预测出的用户需要的媒体内容匹 配的媒体内容。  The device according to claim 7, wherein the obtaining unit comprises: a query subunit, configured to query, from the cache, the media content that matches the predicted media content required by the user.
10、 根据权利要求 9所述的装置, 其特征在于, 所述获取单元包括: 请求子单元,用于所述緩存中不存在与所述预测出的用户需要的媒体内容 匹配的媒体内容时, 釆用向上级服务器请求的方式, 获取所述预测出的用户需 要的媒体内容;  The device according to claim 9, wherein the obtaining unit comprises: a requesting subunit, configured to: when there is no media content in the cache that matches the media content required by the predicted user, Obtaining the predicted media content required by the user by using a request from the upper server;
或者,  Or,
转码子单元,用于所述緩存中不存在与所述预测出的用户需要的媒体内容 匹配的媒体内容时, 釆用对所述緩存中存在的媒体内容进行转码的方式, 获取 所述预测出的用户需要的媒体内容。  a transcoding sub-unit, configured to: when the media content that matches the media content required by the predicted user does not exist in the cache, use the method of transcoding the media content existing in the cache to obtain the prediction The media content that the user needs.
11、 根据权利要求 10所述的装置, 其特征在于, 所述获取单元还包括: 片、 转码延迟、 向上级服务器请求的请求延迟、 转码负载情况和 /或用户等级, 确定获取所述预测出的用户需要的媒体内容的方式。  The device according to claim 10, wherein the obtaining unit further comprises: a slice, a transcoding delay, a request delay requested by the upper server, a transcoding load condition, and/or a user level, determining to obtain the The way in which the user's desired media content is predicted.
12、 根据权利要求 11所述的装置, 其特征在于, 所述选择子单元包括: 第一判断子单元,用于判断緩存中是否存在比所述预测出的用户需要的媒 体内容的比特率高的媒体内容; 12. The apparatus according to claim 11, wherein the selecting subunit comprises: a first determining subunit, configured to determine whether there is media content in the cache that is higher than a bit rate of the media content required by the predicted user;
第二判断子单元, 用于如果所述第一判断子单元的判断结果为是, 则判断 用户的等级是否可以转码;  a second determining subunit, configured to determine, if the determination result of the first determining subunit is YES, whether the level of the user can be transcoded;
第三判断子单元, 用于如果所述第二判断子单元的判断结果为是, 则判断 从所述緩存中存在的高比特率的媒体内容转码为所述预测出的用户需要的媒 体内容的转码延迟, 是否小于向上级服务器请求的延迟;  a third determining subunit, configured to: if the determination result of the second determining subunit is YES, determine to transcode the high bit rate media content existing in the cache into the predicted media content required by the user Whether the transcoding delay is less than the delay requested by the upper server;
转码确定子单元, 用于如果所述第三判断子单元的判断结果为是, 则釆用 所述对所述緩存中存在的媒体内容进行转码的方式,获取所述预测出的用户需 要的媒体内容。  a transcoding determining subunit, configured to: if the judgment result of the third judging subunit is YES, use the method of transcoding the media content existing in the cache to obtain the predicted user requirement Media content.
PCT/CN2010/079913 2010-12-17 2010-12-17 Method and device for on-line adaptation of media content WO2011150643A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2010/079913 WO2011150643A1 (en) 2010-12-17 2010-12-17 Method and device for on-line adaptation of media content
CN201080004692.7A CN102217278B (en) 2010-12-17 2010-12-17 Method and apparatus for online adapting of media content

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2010/079913 WO2011150643A1 (en) 2010-12-17 2010-12-17 Method and device for on-line adaptation of media content

Publications (1)

Publication Number Publication Date
WO2011150643A1 true WO2011150643A1 (en) 2011-12-08

Family

ID=44746756

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/079913 WO2011150643A1 (en) 2010-12-17 2010-12-17 Method and device for on-line adaptation of media content

Country Status (2)

Country Link
CN (1) CN102217278B (en)
WO (1) WO2011150643A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103348648B (en) * 2011-11-28 2015-11-25 华为技术有限公司 A kind of method that user of judgement asks, equipment and system
CN110213616B (en) * 2018-05-15 2021-12-28 腾讯科技(深圳)有限公司 Video providing method, video obtaining method, video providing device, video obtaining device and video providing equipment
CN111526379B (en) * 2019-02-03 2021-06-29 华为技术有限公司 Data transmission method and data transmission device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6016520A (en) * 1995-07-14 2000-01-18 Microsoft Corporation Method of viewing at a client viewing station a multiple media title stored at a server and containing a plurality of topics utilizing anticipatory caching
CN1655547A (en) * 2004-09-09 2005-08-17 上海川海信息科技有限公司 A speed control method in stream media transmission system
CN101075952A (en) * 2006-05-16 2007-11-21 卡乐迷迪有限公司 Method for online playing fluid media
CN101075957A (en) * 2007-06-26 2007-11-21 上海大学 Method for controlling AVS fluid-medium transmission

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8078695B2 (en) * 2008-07-16 2011-12-13 Sony Corporation Media on demand using an intermediary device to output media from a remote computing device
CN101656869A (en) * 2008-08-21 2010-02-24 华为技术有限公司 Method, device and system for switching channels
CN101848205A (en) * 2010-03-16 2010-09-29 深圳市同洲电子股份有限公司 RTSP based stream media playing method and system thereof on mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6016520A (en) * 1995-07-14 2000-01-18 Microsoft Corporation Method of viewing at a client viewing station a multiple media title stored at a server and containing a plurality of topics utilizing anticipatory caching
CN1655547A (en) * 2004-09-09 2005-08-17 上海川海信息科技有限公司 A speed control method in stream media transmission system
CN101075952A (en) * 2006-05-16 2007-11-21 卡乐迷迪有限公司 Method for online playing fluid media
CN101075957A (en) * 2007-06-26 2007-11-21 上海大学 Method for controlling AVS fluid-medium transmission

Also Published As

Publication number Publication date
CN102217278B (en) 2014-07-16
CN102217278A (en) 2011-10-12

Similar Documents

Publication Publication Date Title
US9247276B2 (en) System and method for progressive delivery of media content
JP7275033B2 (en) Systems and methods for adaptive switching between multiple content delivery networks during adaptive bitrate streaming
US10142405B2 (en) Multi-CDN digital content streaming
CN101203827B (en) Flow control for media streaming
US9015779B2 (en) Streaming video server with segment length control and methods for use therewith
US7594025B2 (en) Startup methods and apparatuses for use in streaming content
US8850054B2 (en) Hypertext transfer protocol live streaming
US20190082199A1 (en) Distributed multi-datacenter video packaging system
WO2011150794A1 (en) Method, system and client for streaming media service
US20040003101A1 (en) Caching control for streaming media
EP2391953A1 (en) Application, usage&radio link aware transport network scheduler
JP2006506738A (en) Transcodeable caching proxy and method
KR20150083793A (en) Method for downloading, at a client terminal, an upcoming sequence of segments of a multimedia content, and corresponding terminal
GB2477642A (en) Selection of a streaming server which stores the required content in the highest (fastest access) hierarchical storage layer.
WO2011054319A1 (en) Method, device and system for realizing hierarchically requesting content in http streaming system
JP2021522718A (en) Adaptive Bitrate Method for Live Broadcasting
US20200413112A1 (en) Delivering video in a content delivery network
US9665646B1 (en) Method and system for providing bit rate adaptaion to video files having metadata
WO2011144176A1 (en) Method, apparatus and system for controlling content provision of content delivery network
WO2011150643A1 (en) Method and device for on-line adaptation of media content
US9294821B2 (en) Scrubbing noise remover and methods for use therewith
WO2011143916A1 (en) Media adaptation method and apparatus
KR102304476B1 (en) Multipath-based block transmission system and streaming method for adaptive streaming service
WO2013097184A1 (en) Service distribution method, device and system
WO2013071517A1 (en) Media stream sending method and server

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201080004692.7

Country of ref document: CN

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

Ref document number: 10852438

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10852438

Country of ref document: EP

Kind code of ref document: A1