CN102223416B - Method and system for transmitting media file - Google Patents

Method and system for transmitting media file Download PDF

Info

Publication number
CN102223416B
CN102223416B CN201110172914.2A CN201110172914A CN102223416B CN 102223416 B CN102223416 B CN 102223416B CN 201110172914 A CN201110172914 A CN 201110172914A CN 102223416 B CN102223416 B CN 102223416B
Authority
CN
China
Prior art keywords
download
media file
terminal device
data segment
server
Prior art date
Application number
CN201110172914.2A
Other languages
Chinese (zh)
Other versions
CN102223416A (en
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集团股份有限公司
Priority to CN201110172914.2A priority Critical patent/CN102223416B/en
Publication of CN102223416A publication Critical patent/CN102223416A/en
Application granted granted Critical
Publication of CN102223416B publication Critical patent/CN102223416B/en

Links

Abstract

本发明公开了一种媒体文件的传输方法及系统,由于采用了为媒体文件根据不同的网络连接速度建立多种索引类型,每种索引类型将媒体文件分成多个数据段以及将首个数据段以及从余下数据段中挑选部分传输到终端设备,而不必将媒体文件的所有数据均下载到终端设备,借助该方案,可以充分利用云端强大的存储能力,将下载流量和存储空间这两个关键的制约因素,均衡地负荷在云端和设备端,其可以均衡负载云端服务器与终端设备的计算和存储能力,减少了用户等待下载的时间及下载流量,减少了媒体文件播放的等待时间,提高了网络利用率,为用户提供了方便且节省了存储空间。 The present invention discloses a method and system for transmitting a media file, thanks to create multiple index files according to the different types of media network connection speed, types of media for each index file into the first plurality of data segments and data segments and choose from the remaining portion of the data segment transmitted to the terminal device, and not all the data is bound to the media files are downloaded to the terminal device, by means of the program, can take advantage of powerful cloud storage capacity, the download traffic and storage space for two key constraints, balanced load in the cloud and the device side, which can balance the load cloud computing and storage capabilities of the server and the terminal device, reducing the time and downloading user traffic waiting to be downloaded, reducing the media file playback latency, improved network utilization, provides users with a convenient and saves storage space.

Description

一种媒体文件的传输方法及系统 A method and system for transmitting a media file

技术领域 FIELD

[0001] 本发明涉及文件传输技术领域,尤其涉及的是一种媒体文件的传输方法及系统。 [0001] The present invention relates to a file transfer technology, and more particularly relates to a method and system for transmitting a media file.

背景技术 Background technique

[0002] 云计算已经成为互联网产业发展的重要趋势,随着各种非PC类的智能设备的兴起,云计算的重要性体现的越来越突出,因为智能设备由于自身的计算能力,存储能力,成本,电池续航能力等各种因素的制约,不可能做到PC那样的无所不能和包罗万象,此时,借助云端计算能力的帮助,均衡云端与设备的负荷,将是一种有效的方式。 [0002] Cloud computing has become an important trend in the development of the Internet industry, with the rise of smart devices of various non-PC, the importance of cloud computing is reflected more and more prominent, because smart devices because of their own computing power, storage capacity various constraints, cost, battery life, etc., can not do that kind of all-powerful and all-inclusive PC, this time, with the help cloud computing capabilities, load balancing cloud and equipment, will be an effective way .

[0003] 以音乐为例,传统模式下,音乐是从服务器上直接被下载和存储在终端设备上,对于移动设备来说,完全被下载到本地有两个问题:首先是耗费流量,尤其在目前3G网络的数据费用还是相对昂贵的情况下,对流量的要求会更加敏感;其次是存储空间,移动设备目前还没有具备类似电脑那种近乎无限的存储空间 [0003] Music, for example, the conventional mode, the music is downloaded directly from the server and stored on the terminal device for mobile devices, it is completely downloaded to local there are two problems: First, the flow rate is time consuming, especially in is still relatively expensive, the cost will be more sensitive data requirements of 3G network traffic; followed by storage space, there is no mobile device similar to a computer that has virtually unlimited storage space

[0004] 因此,现有技术还有待于改进和发展。 [0004] Thus, the prior art has yet to be improved and developed.

发明内容 SUMMARY

[0005] 本发明要解决的技术问题在于,针对现有技术的上述缺陷,提供一种媒体文件的传输方法及系统。 [0005] The present invention is to solve the technical problem, for the above-described drawbacks of the prior art by providing a method and a system for transmitting a media file. 其可以均衡负载云端服务器与终端设备的计算和存储能力,减少了用户等待下载的时间,减少了媒体文件播放的等待时间,提高了网络利用率。 It can load balancing cloud computing and storage capacity of the server and terminal equipment, reduces the time users wait for downloads, reducing the waiting time of the media file playback, improved network utilization.

[0006] 本发明解决技术问题所采用的技术方案如下: [0006] Solving the Problems The present invention adopts the following technical solution:

[0007] 一种媒体文件的传输方法,其中,包括步骤: [0007] A method for transmitting a media file, comprising the steps of:

[0008] A、将云端服务器的媒体文件根据不同的网络连接速度建立多种索引类型,每种索引类型将媒体文件分成多个数据段; [0008] A, the media file server cloud create multiple index types according to different network connection speeds, each index type media file into a plurality of data segments;

[0009] B、当有来自终端设备的媒体文件下载请求时,从请求中解析出所述终端设备网络连接的信息,并根据该网络连接信息,返回不同的索引文件给终端设备; [0009] B, when the media file download request from the terminal device, the information parsed from the request of the terminal device connected to the network, and the connection information according to the network, and returns the index file to the terminal device;

[0010] C、根据所述索引文件,将需下载媒体文件的首个数据段以及从余下数据段中挑选部分传输到终端设备。 [0010] C, according to the index file, the need to download the first data segments and the selected portion of the media file transmitted to the terminal device from the remaining data segments.

[0011] 所述媒体文件的传输方法,其中,所述步骤C之后还包括: After [0011] The media file transfer method, wherein the step C further comprising:

[0012] D1、所述终端设备对下载的媒体文件进行播放,并根据索引文件判断当前播放数据段的下一数据段是否已经下载; [0012] D1, the terminal device to download a media file to play, and determines whether the currently playing a next segment of the data segments in accordance with the index file has been downloaded;

[0013] D2、若未下载,则终端设备计算出下载下一数据段所需的时间T,在距离播放完毕前还剩下T的时间,所述终端设备向所述云端服务器发送对所述下一数据段的下载请求; [0013] D2, if not downloaded, the terminal device calculates the time required to download the next data segment T, is completed before the remaining player from the time T, the terminal device transmits to the server the cloud Download requests the next data segment;

[0014] D3、若已下载,则所述终端设备无操作。 [0014] D3, Ruoyi downloading, the terminal device does not operate.

[0015] 所述媒体文件的传输方法,其中,所述步骤D2还包括: [0015] The media file transfer method, wherein said step D2 further comprises:

[0016] D21、所述云端服务器接收到所述终端设备发来的对所述下一数据段的下载请求,判断所述终端设备是否有正在下载的原下载流程; [0016] D21, the first server to the terminal device receives the download request sent by the next data segment, the terminal device determines whether a download process is downloading of the original;

[0017] D22、若有,则所述云端服务器暂停原下载流程,启动所述下一数据段的下载,在所述下一数据段下载完毕后,所述云端服务器恢复执行原下载流程。 [0017] D22, and if so, the server suspends the original cloud download process, start the download of the next data segment, the download is complete in the next data segment, the original cloud server resumes the download process.

[0018] D23,若无,则所述云端服务器直接启动所述下一数据段的下载,在所述下一数据段下载完毕后,所述云端服务器结束下载。 [0018] D23, and if not, then the cloud server directly initiate the download of the next data segment, the download is complete in the next data segment, the end of the download server cloud.

[0019] 所述媒体文件的传输方法,其中,所述步骤C之后还包括: After [0019] The media file transfer method, wherein the step C further comprising:

[0020] D0、所述终端设备对下载的媒体文件进行播放时,接收到用户的跳转操作指令,且所述跳转操作指令所指示的跳转位置是已经下载完毕的数据段,则返回D1。 [0020] D0, when the terminal device to play the downloaded media file, receiving a user operation instruction jump, jump and jump to the position of the operation instruction indicates the data segment has been downloaded, then return D1.

[0021] 所述媒体文件的传输方法,其中,所述步骤DO还包括:所述跳转操作指令所指示的跳转位置是未下载的数据段,则终端设备根据索引所指示的位置,向所述云端服务器发送对该数据段的下载请求。 [0021] The media file transfer method, wherein said step of DO further comprises: a jump instruction jump operation position indicated by the segment data is not downloaded, the terminal device based on the location indicated by the index, to the cloud server sends a download request for the data segment.

[0022] 所述媒体文件的传输方法,其中,被下载的媒体文件数据实时存储在所述终端设备中。 [0022] The media file transfer method, wherein the media file is downloaded real-time data stored in the terminal device.

[0023] —种媒体文件的传输系统,其中,包括:云端服务器,及与云端服务器连接的多个终端设备; [0023] - kind of media file transfer system, comprising: a cloud server, and a plurality of terminal devices connected to the cloud server;

[0024] 所述云端服务器包括: [0024] The cloud server comprising:

[0025] 索引建立与数据分段模块,用于将云端服务器的媒体文件根据不同的网络连接速度建立多种索引类型,每种索引类型将媒体文件分成多个数据段; [0025] Indexing, cloud server for media files and create multiple types of index data segmentation module depending on the network connection speed, types of media files each index into a plurality of data segments;

[0026] 解析模块,用于当有来自终端设备的媒体文件下载请求时,从请求中解析出所述终端设备网络连接的信息,并根据该网络连接信息,返回不同的索引文件给终端设备; [0026] The parsing module configured to, when the media file download request from the terminal device, the information parsed from the request of the terminal device connected to the network, and the connection information according to the network, and returns the index file to the terminal device;

[0027] 数据传输模块,用于根据所述索引文件,将需下载媒体文件的首个数据段以及从余下数据段中挑选部分传输到终端设备; [0027] Data transmission module according to the index file, the media file will need to download the first data segments and the selection of the remaining portion of the transmission from the data segments to the terminal apparatus;

[0028] 所述终端设备,用于向云端服务器发送媒体文件下载请求,并从云端服务器逐级下载相应的媒体文件。 [0028] the terminal device, configured to send a media file download request to the cloud server, and download the appropriate step by step from the cloud media file server.

[0029] 所述媒体文件的传输系统,其中,所述终端设备包括: [0029] The media file transfer system, wherein the terminal device comprises:

[0030] 下载请求模块,用于接收用户的操作指令选择当前实际使用的网络连接,并根据该网络连接信息向所述云端服务器发送下载请求; [0030] The download request means for receiving a user selection operation instruction might actually be using the network connection, and the connection information transmits a download request to the server according to the network cloud;

[0031] 播放处理模块,用于通过播放器对下载的媒体文件进行播放,并根据索引文件判断当前播放数据段的下一数据段是否已经下载; [0031] The playback processing module, for playing the downloaded media file through the player, and determines whether the currently playing a next segment of the data segments in accordance with the index file has been downloaded;

[0032] 时间计算模块,用于当所述下一数据段未下载时,计算出下载所述下一数据段所需的时间T,在距离播放完毕前还剩下T的时间,向所述云端服务器发送所述下一数据段的下载请求。 [0032] The time calculation module configured to, when the next data segment is not downloaded, calculate the time T required for downloading the next data segment from the player before the remaining time T is completed, to the cloud server transmits the download request of the next data segment.

[0033] 所述媒体文件的传输系统,其中,所述云端服务器的数据传输模块还包括: [0033] The media file transfer system, wherein the cloud server data transmission module further comprises:

[0034] 判断单元,用于接收到终端设备发来的对所述下一数据段的下载请求时,判断该终端设备是否有正在下载的原下载流程;若有,则所述云端服务器暂停原下载流程,启动所述下一数据段的下载,在所述下一数据段下载完毕后,所述云端服务器恢复执行原下载流程;若无,则所述云端服务器直接启动所述下一数据段的下载,在所述下一数据段下载完毕后,所述云端服务器结束下载。 When the [0034] determination unit, to the terminal apparatus for receiving a download request sent by the next data segment, determining whether the terminal device has a download process is downloading original; if so, the server suspends the original cloud download process, start the download of the next data segment, a next data segment after the download is complete, the server resumes the original cloud download process; if not, then the cloud server directly start of the next data segment download, the download is complete in the next data segment, the end of the download server cloud.

[0035] 所述媒体文件的传输系统,其中,所述终端设备还包括: [0035] The media file transfer system, wherein the terminal device further comprises:

[0036] 跳选单元,用于当所述终端设备对下载的媒体文件进行播放时,接收到用户的跳转操作指令,根据所述跳转操作指令所指示的跳转位置选择继续播放或向所述云端服务器发送下载请求。 [0036] skip unit, when said terminal device to play the downloaded media file, receiving a user operation instruction jump, jump according to the jump instruction position indicated by the selected operation to continue to play or the cloud server transmits the download request.

[0037] 本发明所提供的媒体文件的传输方法及系统,由于采用了为媒体文件根据不同的网络连接速度建立多种索引类型,每种索引类型将媒体文件分成多个数据段”以及“将首个数据段以及从余下数据段中挑选部分传输到终端设备,而不必将媒体文件的所有数据均下载到终端设备,借助该方案,可以充分利用云端强大的存储能力,将下载流量和存储空间这两个关键的制约因素,均衡地负荷在云端和设备端,其可以均衡负载云端服务器与终端设备的计算和存储能力,减少了用户等待下载的时间以及下载流量,减少了媒体文件播放的等待时间,提高了网络利用率,为用户提供了方便且为用户节省了存储空间。 [0037] The transmission method and system of the present invention, a media file is provided, thanks to create multiple index files according to the different types of media network connection speed, types of media for each index file into multiple segments of data "and" the the first data segment and the data segment selected from the remaining part of the transmission to the terminal device, and not all the data is bound to the media files are downloaded to the terminal device, by means of the program, you can take advantage of powerful cloud storage capacity, the download traffic and storage space the two key constraints, cloud and load balanced terminal apparatus which can balance the load cloud computing and storage capacity of the server and the terminal device, and reducing the time to wait for the user to download the download traffic, reducing the waiting media file playback time, improve network utilization, provides users with a convenient and saves storage space for the user.

附图说明 BRIEF DESCRIPTION

[0038] 图1是本发明一种媒体文件的传输方法的流程图。 [0038] FIG. 1 is a flow diagram of the present invention provides a method for transmitting a media file.

[0039] 图2是本发明一种媒体文件的传输方法中的媒体文件分割结构一种实施例的示意图。 [0039] FIG. 2 is a schematic view of present invention provides a method for transmitting a media file in the media files to an embodiment of the segmented structure.

[0040] 图3是本发明一种媒体文件的传输方法中的媒体文件分割结构另一实施例的示意图。 [0040] FIG. 3 is a schematic diagram of another embodiment of the present invention provides a method for transmitting a media file in a media file division structure.

[0041] 图4是本发明一种媒体文件的传输系统原理框图。 [0041] FIG. 4 is a block diagram of transmission system of the present invention is a medium document.

[0042] 图5是本发明一种媒体文件的传输系统中的云端服务器内部原理框图。 [0042] FIG. 5 is a block diagram of an internal cloud server to transmit the file system of the present invention in a medium.

[0043] 图6是本发明一种媒体文件的传输系统中的终端设备内部原理框图。 [0043] FIG. 6 is an internal block diagram of transmission system of the terminal apparatus according to the present invention, one kind of media file.

具体实施方式 Detailed ways

[0044] 为使本发明的目的、技术方案及优点更加清楚、明确,以下参照附图并举实施例对本发明进一步详细说明。 [0044] To make the objectives, technical solutions and advantages of the present invention will become more apparent, clear embodiment of the present invention is described in more detail below with reference to the accompanying drawings. 应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。 It should be understood that the specific embodiments described herein are only intended to illustrate the present invention and are not intended to limit the present invention.

[0045] 本发明实施例提供的一种媒体文件的传输方法,如图1所示,主要包括以下步骤: [0045] A method for transmitting a media file according to an embodiment of the present invention, shown in Figure 1, includes the following steps:

[0046] 步骤S110、将云端服务器的媒体文件根据不同的网络连接速度建立多种索引类型,每种索引类型将媒体文件分成多个数据段。 [0046] Step S110, the media file server cloud will create multiple index types depending on the network connection speed, types of media for each index file into a plurality of data segments.

[0047] 本实施例中,首先,需要为在云端服务器的媒体文件如音乐文件建立索引,每一首音乐需要建立多种类型的索引,每种索引针对不同的网络连接速度。 [0047] In this embodiment, first of all, needs to be indexed media files such as music files in the cloud server, each piece needs to establish a plurality of types of indices, each index different network connection speeds.

[0048] 移动设备的网络接入环境是不断变化的,同样的一部终端设备,可能可以同时接入WIFI,LTE,3G,2G,蓝牙等各种不同的物理连接中,每种不同的网络连接,其网络速度也是不同的。 Various physical [0048] The environment of the mobile network access device is changing, the same one terminal device, may be able to simultaneously access WIFI, LTE, 3G, 2G, Bluetooth connection, each of the different networks connection, which is different network speed.

[0049] 本实施例中,采用对于网速较慢的连接如3G,2G网络,建立的索引以将媒体文件切割成较细的数据段为原则,如图2所示,将媒体文件分成9个数据段,分别为Al、A2、A3、A4、A5、A6、A7、A8和A9,对于网速较快的网络连接,如WIFI,LTE (LTE是英文Long TermEvolut1n的缩写。LTE也被通俗的称为3.9G,具有10Mbps的数据下载能力,被视作从3G向4G演进的主流技术),建立的索引以将媒体文件切割成较粗的数据段为原则,如图3所示,将媒体文件分成3个数据段,分别为B1、B2和B3。 [0049] In this embodiment, the use for slower speed connections, such as 3G, 2G network, indexing to cut thinner media file data segment to the principle shown in Figure 2, the media files into 9 data segments, each of Al, A2, A3, A4, A5, A6, A7, A8 and the A9, for fast network connection speed, such as WIFI, LTE (LTE Long TermEvolut1n is the abbreviation of .LTE also colloquially referred to as 3.9G, having the ability to download data of 10Mbps, is regarded as the mainstream technology evolution 4G), indexing of media files to cut thicker 3G data segment from the principle shown in Figure 3, the media data file is divided into three segments, namely B1, B2 and B3. 对于同样的一个媒体文件,图3的索引将文件切割为三段,分别对这三部分建立索引,而图2将文件切割为了九段,对这九部分建立索引。 For the same media file, the index file of FIG. 3 will be cut into three sections, each of these three parts index, and FIG. 2 cut to nine files, this index nine parts.

[0050] 当对各媒体文件根据不同的网络连接速度建立多种索引类型,每种索引类型将媒体文件分成多个数据段后,进入步骤S120。 After [0050] When multiple index established for each type of media files according to a different network connection speed, types of media for each index file into multiple data segments, proceeds to step S120.

[0051] 步骤S120、当有来自终端设备的媒体文件下载请求时,从请求中解析出当前终端设备网络连接的信息,并根据该网络连接信息,返回不同的索引文件给终端设备。 [0051] step S120, the media files when a download request from the terminal device, the information parsed from the request terminal device currently connected to the network, and the connection information according to the network, and returns the index file to the terminal device.

[0052] 本实施例中,网络连接的信息由用户操作操作选择提供,因为在实际情况下,终端设备使用何种物理连接,是非常清楚的,需要通过终端设备的UI界面,让用户选择当前实际使用的网络。 [0052] In embodiments, the network connection information provided by a user operation of selecting operation of the present embodiment, because in an actual case, the terminal device which use the physical connection is very clear, the terminal device need UI interface, allowing the user to select the current the actual use of the network.

[0053] 云端对音乐文件建立了几种不同的索引后,当有来自设备的音乐下载请求时,首先从用户请求中解析出当前终端设备网络连接的信息,根据该网络连接信息,决定返回不同的索引文件,进入步骤S130。 After [0053] Drive for a music file to establish several different index, when music download request from the device, the user first parses the request from the terminal device information of the current network connection, according to the network connection information, decided to return to a different the index file goes to step S130.

[0054] 步骤S130、根据所述索引文件,将需下载媒体文件的首个数据段以及从余下数据段中挑选部分传输到终端设备。 [0054] step S130, the file according to the index, the need to first download the media file segments and the selection of data transmitted to the terminal device portion from the remaining data segments.

[0055] 本实施例中,采用在上述返回索引文件的同时,需下载媒体文件如音乐文件本身不需把整个文件完全下载到终端设备,而是仅仅下载部分数据到设备中,以达到节约流量和快速下载的目的。 [0055] In the present embodiment, employed in the index file, while the return, need to download media files such as music files themselves without the complete file is downloaded to the terminal device, but only part of the data downloaded to the device, in order to achieve energy savings flow and the purpose of fast download.

[0056] 譬如采用将需下载媒体文件的首个数据段,即最开始的一段数据,对于图2而言,就是数据Al,对于图3而言,就是数据BI。 [0056] The use of such media file will need to download the first data segment, i.e., the beginning of a piece of data for FIG. 2, the data is Al, for the FIG. 3, the data is the BI. Al数据量较小,但是对应的网络连接也慢。 Al amount of data is small, but the corresponding network connection is also slow. 因为网速慢的连接时,只有划分得更加小,下载该数据片段,尽快恢复播放所需的时间就更少,减少了用户的等待时间。 Because the connection Suman, only a small division of a more, download the data segment, the recovery time needed to play less as soon as possible, reducing the waiting time for users.

[0057] 而BI的数据量较大,对应的网速也快,所以总的时间对于用户而言,是基本一致的,达到均衡的目的。 [0057] BI large amount of data, the corresponding speed is also fast, so the total time for the user, is basically the same, to achieve equilibrium.

[0058] 本实施例中采用将需下载媒体文件的首个数据段传输到终端设备,因为绝大多数用户在播放音乐时,是从头开始进行播放的,这样用户在播放的开始阶段就不需要进行网络缓冲,减少了媒体文件播放的等待时间。 [0058] The media file will need to download the first data segments transmitted to the terminal apparatus in the present embodiment, since the vast majority of users when playing music, playing is performed from the beginning, so that users do not need to play at the beginning of network buffer, reducing the waiting time of the media file playback.

[0059] 本实施例中,除了最开始的那段数据外,剩下的数据也是挑选部分进行下载,即余下数据段中挑选部分传输到终端设备,挑选的算法可以多样化,最简单的一种做法是均匀地跨段选择,以图2为例,挑选A3,A6,A9下载,而图3则挑选B3下载,这样,无论何种索引方式,最终实际下载的数据量其实是完全一样的。 [0059] In this embodiment, in addition to the period of the beginning of the data, the remaining data portion is selected for download, i.e., the remaining portion of the transmission data selection section to the terminal device, the selection algorithm can be diversified, a simple kind of approach is uniform across the segment selector, 2 as an example, the selection of A3, A6, A9 download, and Figure 3 pick B3 download, so, no matter what kind of indexing, the final amount of data actually downloaded in fact, is exactly the same . 这样,减少了用户等待下载的时间,为用户提供了方便。 In this way, reducing the time to wait for the user to download, to provide users with convenient.

[0060] 当挑选出来的数据片段下载完成后,整个音乐就算下载结束,以这种方式,可以达到节约流量和加快下载速度的目的。 [0060] When the selected data segments out of the download is complete, even if the entire music download end, in this way, the flow rate can achieve energy savings and speed of the object of the download speed. 当用户需播放下载的文件后进入步骤S140。 When the user needs to play downloaded file goes to step S140.

[0061] 步骤S140、所述终端设备对下载的媒体文件进行播放,并根据索引文件判断当前播放数据段的下一数据段是否已经下载;若已下载,则所述终端设备无操作。 [0061] step S140, the terminal device to download the media file to play, and determines whether the currently playing a next segment of the data segments in accordance with the index file has been downloaded; if downloaded, the terminal device does not operate. 若未下载,则终端设备计算出下载下一数据段所需的时间T,在距离播放完毕前还剩下T的时间,所述终端设备向所述云端服务器发送对所述下一数据段的下载请求,启动下一数据段的下载。 If not downloaded, the terminal device calculates the time required to download the next data segment T, the distance remaining before the finished playing time T, the terminal device to the cloud server transmits the next data segment download request to start the download of the next data segment.

[0062] 在启动下一数据段的下载前,判断当前是否有正在下载的原下载流程(即云端服务器接收到终端设备发来的对下一数据段得请求,判断终端设备是否有正在下载的原下载流程,该原下载流程为终端设备当前播放媒体文件的下载流程);若有,则云端服务器暂停原下载流程,启动下一数据段的下载,在下一数据段下载完毕后,云端服务器恢复执行原下载流程。 [0062] Before starting the downloading of the next data segment, it is determined whether the current download process is downloading the original (i.e., the cloud server receives the terminal apparatus may request sent by the next data segment, the terminal device determines whether downloading has original download process, the original download process for the terminal device download process currently playing media files); if so, the cloud server suspends the original download process, start the download of the next data segment, after the download is complete in the next segment, the cloud server recovery implementation of the original download process. 若无,则云端服务器直接启动下一数据段的下载,在下一数据段下载完毕后,云端服务器结束下载。 If not, then the cloud server directly initiate the download of the next data segment, the next segment after the download is complete, the end of the cloud server to download.

[0063] 本实施例中,在用户进行播放媒体文件时,如图2和图3所示,当开始播放Al或者BI的同时,播放器根据索引文件判断后续的A2或者B2是否已经下载到了本地,如果没有,那么在根据用户设置的网络连接速度,计算出下载A2或者B2所需的时间T。 [0063] In this embodiment, when a user to play a media file, as shown in FIGS. 2 and 3, when Al or BI start playing at the same time, the player is determined in accordance with the index file subsequent A2 or B2 have been downloaded to the local If not, then according to the network connection speed set by the user, calculated download time required A2 or B2 T. in

[0064] 在Al或者BI距离播放完毕前还剩下T的时刻,向云端服务发送下载请求,云端判断当前媒体文件(即正在播放的文件)是否下载结束,若当前媒体文件已经下载结束,则直接启动A2或者B2的下载。 [0064] BI time or distance before Al finished playing left T transmits a download request to cloud services, cloud determines the current media file (i.e. the file being played) whether the end of the download, if the current media file has downloaded ended, direct start download A2 or B2. 当A2或者B2下载结束,则结束下载流程。 A2 or B2 when the end of the download, the download process is ended.

[0065] 若当前媒体文件正在下载且未下载完毕,则云端服务器暂停跳出原下载流程,启动A2或者B2的下载,在A2或者B2下载完毕后,云端服务器恢复执行原下载流程。 [0065] If the current media file being downloaded and not downloaded, the cloud server out of the original pause download process, start the download of A2 or B2, A2 or after the download is complete in B2, the cloud server resumes the original download process.

[0066] 而终端设备对下载的媒体文件进行播放时,接收到用户的跳转操作指令,且跳转操作指令所指示的跳转位置是已经下载完毕的数据段,即如果用户选择了seek的跳转操作,如果跳转到的位置正好是已经下载完毕的数据片段,那么后续的流程同前述S140步骤。 [0066] When the terminal device to play the downloaded media file, receiving a user operation instruction jump, jump and jump position of the operation instruction indicates the segment has been downloaded data, i.e., if the user selects the seek jump operation, if a jump to a position exactly in the data segment has been downloaded, then the subsequent process step S140 as previously described. 而当跳转操作指令所指示的跳转位置是未下载的数据段,则终端设备根据索引所指示的位置,向云端服务器发送对该数据段的下载请求,从云端服务器请求该片段的下载。 When the jump instruction position indicated by the jump operation is not downloaded data segment, the terminal apparatus transmits a download request for the data segment to the server according to the position of the cloud indicated by the index, a request to download the fragments from the cloud server. 并将各下载的媒体文件数据实时存储在终端设备中。 And various real-time data downloaded media files stored in the terminal equipment. 本实施例中下载的数据将永久保留在终端设备中,所以相同的数据片段下载只会发生一次。 The data presented in the present embodiment download will remain permanently in the terminal device, the same data segment only occurs once downloaded.

[0067] 由上可见,本发明实施例的一种媒体文件的传输方法,其可以均衡负载云端服务器与终端设备的计算和存储能力,减少了用户等待下载的时间,减少了媒体文件播放的等待时间,提高了网络利用率。 [0067] As seen above, a method for transmitting a media file to an embodiment of the present invention, which can balance the load Cloud computing and storage capacity of the server and the terminal apparatus, reducing the time to wait for the user to download and play media files to reduce the waiting time and improves network utilization.

[0068] 基于上述实施例,本发明实施例还提供了一种媒体文件的传输系统,如图4所示,包括:云端服务器200,及与云端服务器200连接的多个终端设备300 ; [0068] Based on the above-described embodiments, embodiments of the present invention further provides a system for transmitting a media file, as shown in FIG 4 comprising: a plurality of terminal devices cloud server 200, and server 200 is connected with the cloud 300;

[0069] 其中,如图5所示,所述云端服务器200包括: [0069] wherein, as shown in FIG. 5, the server cloud 200 comprising:

[0070] 索引建立与数据分段模块210,用于将云端服务器200的媒体文件根据不同的网络连接速度建立多种索引类型,每种索引类型将媒体文件分成多个数据段;具体如步骤SllO所述。 [0070] Indexing 210, cloud server 200 for the media file index to create multiple types of data segmentation module depending on the network connection speed, types of media files each index into a plurality of data segments; DETAILED step SllO the.

[0071] 解析模块220,用于当有来自终端设备300的媒体文件下载请求时,从请求中解析出终端设备300网络连接的信息,并根据该网络连接信息,返回不同的索引文件给终端设备300 ;具体如步骤S120所述。 [0071] The parsing module 220, configured to, when the media file download request from the terminal apparatus 300, the information parsed from the request terminal apparatus 300 network connection, and the connection information according to the network, and returns the index file to a terminal device 300; as the particular step S120.

[0072] 数据传输模块230,用于根据索引文件,将需下载媒体文件的首个数据段以及从余下数据段中挑选部分传输到终端设备300 ;具体如步骤S130所述。 [0072] The data transmission module 230, according to the index file, the media file will need to download the first data segments and the selection of the remaining portion of the transmission from the terminal apparatus 300 to the data segment; Specifically as the step S130.

[0073] 其中,所述云端服务器的数据传输模块230还包括: [0073] wherein the cloud server 230 data transmission module further comprises:

[0074] 判断单元,用于接收到终端设备300发来的对下一数据段的下载请求时,判断该终端设备300是否有正在下载的原下载流程;若有,则云端服务器200暂停原下载流程,启动下一数据段的下载,在下一数据段下载完毕后,云端服务器200恢复执行原下载流程;若无,则云端服务器200直接启动下一数据段的下载,在下一数据段下载完毕后,云端服务器200结束下载。 When the [0074] determination means for receiving a request for downloading to the terminal apparatus 300 of the next data segment is sent, the terminal device 300 determines whether there is a download process to download the original; if so, the first server 200 to download the original suspension after if not, then the cloud server 200 directly initiate the download of the next data segment is completed in the next segment data download; process, start the download of the next data segment, the next segment after the download is complete, the cloud server 200 resumes the original download process the cloud server 200 ends the download.

[0075] 所述终端设备300,用于向云端服务器200发送媒体文件下载请求,并从云端服务器200逐级下载相应的媒体文件。 [0075] The terminal device 300, a download request to the first server 200 transmits a media file, the server 200 and the cloud progressively downloaded from the corresponding media file. 其中,如图6所示,终端设备300包括: Wherein, as shown in FIG 6, the terminal apparatus 300 comprising:

[0076] 下载请求模块310,用于接收用户的操作指令选择当前实际使用的网络连接,并根据该网络连接信息向云端服务器200发送下载请求;具体如上所述。 [0076] The download request module 310, for receiving the user's instruction to select the actual current network connection, the download request and transmits the connection information to the first server 200 according to the network; detailed above.

[0077] 播放处理模块320,用于通过播放器对下载的媒体文件进行播放,并根据索引文件判断当前播放数据段的下一数据段是否已经下载;具体如上所述。 [0077] The playback processing block 320 for the player by the downloaded media file playback, and determines whether the current data segment to the next segment play data according to whether the index file has been downloaded; detailed above.

[0078] 时间计算模块330,用于当下一数据段未下载时,计算出下载下一数据段所需的时间T,在距离播放完毕前还剩下T的时间,向云端服务器200发送下一数据段的下载请求,具体如上所述。 [0078] The time calculation module 330, is used when the next data segment is not downloaded, the download time calculated next data segment T, is completed before the player from remaining time T next transmits to the server cloud 200 a request to download data segment, as detailed above.

[0079] 跳选单元340,用于当终端设备300对下载的媒体文件进行播放时,接收到用户的跳转操作指令,根据跳转操作指令所指示的跳转位置选择继续播放或向云端服务器200发送下载请求,具体如上所述。 [0079] skip unit 340, when the terminal device 300 for the downloaded media file to play, receiving a user operation instruction jump, or choose to continue to play the cloud server according to the position of the jump instruction jump operation indicated 200 transmits a download request, as detailed above.

[0080] 综上所述,本发明所提供的媒体文件的传输方法及系统,由于采用了为媒体文件根据不同的网络连接速度建立多种索引类型,每种索引类型将媒体文件分成多个数据段以及将首个数据段以及从余下数据段中挑选部分传输到终端设备,而不必将媒体文件的所有数据均下载到终端设备,借助该方案,可以充分利用云端强大的存储能力,将下载流量和存储空间这两个关键的制约因素,均衡地负荷在云端和设备端,其可以均衡负载云端服务器与终端设备的计算和存储能力,减少了用户等待下载的时间及下载流量,减少了媒体文件播放的等待时间,提高了网络利用率,为用户提供了方便且为用户节省了存储空间。 [0080] In summary, a method and system for transmitting a media file provided by the present invention, thanks to create multiple index files according to the different types of media network connection speed, each index file into a plurality of types of media data the first segment and the data segment and the data segment selected from the remaining part of the transmission to the terminal device, and not all the data is bound to the media files are downloaded to the terminal device, by means of the program, you can take advantage of powerful cloud storage capacity, the download traffic and storage space two key constraints, cloud and load balanced terminal apparatus which can balance the load cloud computing and storage capacity of the server and the terminal device, and reducing the time to wait for the user to download the download traffic, reducing the media file play the waiting time and improve network utilization, provides users with a convenient and saves storage space for the user.

[0081] 应当理解的是,本发明的应用不限于上述的举例,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,所有这些改进和变换都应属于本发明所附权利要求的保护范围。 [0081] It should be appreciated that the present invention is applied is not limited to the above-described example, those of ordinary skill in the art, can be modified or converted according to the above description, all such modifications and variations shall fall within the appended claims of the invention protected range.

Claims (10)

1.一种媒体文件的传输方法,其特征在于,包括步骤: A、将云端服务器的媒体文件根据不同的网络连接速度建立多种索引类型,每种索引类型将媒体文件分成多个数据段;对于网速较慢的连接,建立的索引以将媒体文件切割成较细的数据段为原则,对于网速较快的网络连接,建立的索引以将媒体文件切割成较粗的数据段为原则; B、当有来自终端设备的媒体文件下载请求时,从请求中解析出所述终端设备网络连接的信息,并根据该网络连接信息,返回不同的索引文件给终端设备; C、根据所述索引文件,将需下载媒体文件的首个数据段以及从余下数据段中挑选部分传输到终端设备。 CLAIMS 1. A method of transmitting a media file, characterized by comprising the step of: A, the media file server cloud create multiple index types according to different network connection speeds, each index type media file into a plurality of data segments; for slow network connection, indexing to cut thinner media file data segment principle for fast network connection speed, indexing to cut thicker media file data segment principle ; B, when the media file download request from the terminal device, the information parsed from the request terminal apparatus connected to the network, and the network connection based on the information, and returns the index file to the terminal device; C, according to the index file will need to download the first data segments and the selected portion of the media file transmitted to the terminal device from the remaining data segments.
2.根据权利要求1所述媒体文件的传输方法,其特征在于,所述步骤C之后还包括: D1、所述终端设备对下载的媒体文件进行播放,并根据索引文件判断当前播放数据段的下一数据段是否已经下载; D2、若未下载,则终端设备计算出下载下一数据段所需的时间T,在距离播放完毕前还剩下T的时间,所述终端设备向所述云端服务器发送对所述下一数据段的下载请求; D3、若已下载,则所述终端设备无操作。 The transmission method according to claim 1 media file, wherein, after said step C further comprising: D1, the terminal device to download a media file to play, and determines whether the current data segment to playing the index file if the next data segment has been downloaded; D2 of, if not downloaded, the download time calculated by the terminal device T required for the next data segment, the distance finishes playing before the remaining time T of the terminal device to the Drive the server sends a download request for the next data segment; D3, Ruoyi downloading, the terminal device does not operate.
3.根据权利要求2所述媒体文件的传输方法,其特征在于,所述步骤D2还包括: D21、所述云端服务器接收到所述终端设备发来的对所述下一数据段的下载请求,判断所述终端设备是否有正在下载的原下载流程; D22、若有,则所述云端服务器暂停原下载流程,启动所述下一数据段的下载,在所述下一数据段下载完毕后,所述云端服务器恢复执行原下载流程; D23,若无,则所述云端服务器直接启动所述下一数据段的下载,在所述下一数据段下载完毕后,所述云端服务器结束下载。 The transmission method as claimed in claim 2 media file, wherein said step D2 further comprises: D21, the first server to the terminal device receives the download request sent by the next data segment determining whether the terminal device has a download process is downloading original; D22, if so, the server suspends the original cloud download process, start the download of the next data segment, the download is complete in the next data segment the cloud server resumes the original download process; D23, if not, then the cloud server directly initiate the download of the next data segment, the download is complete in the next data segment, the end of the download server cloud.
4.根据权利要求2所述媒体文件的传输方法,其特征在于,所述步骤C之后还包括: DO、所述终端设备对下载的媒体文件进行播放时,接收到用户的跳转操作指令,且所述跳转操作指令所指示的跳转位置是已经下载完毕的数据段,则返回D1。 4. The transmission method according to claim 2 media file claim, wherein after said step C further comprises: DO, when the terminal device to play the downloaded media file, receiving a user operation instruction jump, jump operation and the jump instruction position indicated by the data segment has been downloaded, D1 is returned.
5.根据权利要求4所述媒体文件的传输方法,其特征在于,所述步骤DO还包括:所述跳转操作指令所指示的跳转位置是未下载的数据段,则终端设备根据索引所指示的位置,向所述云端服务器发送对该数据段的下载请求。 The transmission method according to claim 4 media file claim, wherein said step of DO further comprises: a jump instruction jump operation position indicated by the segment data is not downloaded, the terminal apparatus according to the index position indication, sends a download request for the data segment to the server cloud.
6.根据权利要求1-5任一所述媒体文件的传输方法,其特征在于,被下载的媒体文件数据实时存储在所述终端设备中。 6. The transmission method of a media file of the claims 1-5, wherein the media file is downloaded real-time data stored in the terminal device.
7.—种媒体文件的传输系统,其特征在于,包括:云端服务器,及与云端服务器连接的多个终端设备; 所述云端服务器包括: 索引建立与数据分段模块,用于将云端服务器的媒体文件根据不同的网络连接速度建立多种索引类型,每种索引类型将媒体文件分成多个数据段;对于网速较慢的连接,建立的索引以将媒体文件切割成较细的数据段为原则,对于网速较快的网络连接,建立的索引以将媒体文件切割成较粗的数据段为原则; 解析模块,用于当有来自终端设备的媒体文件下载请求时,从请求中解析出所述终端设备网络连接的信息,并根据该网络连接信息,返回不同的索引文件给终端设备; 数据传输模块,用于根据所述索引文件,将需下载媒体文件的首个数据段以及从余下数据段中挑选部分传输到终端设备;所述终端设备,用于向云端服务器发送媒体文 7.- kinds of media file transfer system, characterized by comprising: a first server, and a plurality of terminal devices connected to a cloud server; the cloud server comprising: indexing data segments and means for the cloud server create multiple types of media files indexed according to different network connection speeds, each index type media file into a plurality of data segments; for slow network connection, to the indexing of the media file data segment is cut into smaller in principle, for a fast network connection speed, indexing to cut thicker media file data segment principle; parsing module, configured to, when the media file download request from the terminal device, the request from the parsed the information terminal apparatus connected to a network, and the connection information according to the network, and returns the index file to the terminal device; a data transmission module according to the index file, will need to download a media file from the first data segment and the remaining selected portions of the data segment is transmitted to the terminal device; and the terminal device is configured to send media packets to the cloud server 件下载请求,并从云端服务器逐级下载相应的媒体文件。 Member download request and download the appropriate step by step from the cloud media file server.
8.根据权利要求7所述媒体文件的传输系统,其特征在于,所述终端设备包括: 下载请求模块,用于接收用户的操作指令选择当前实际使用的网络连接,并根据该网络连接信息向所述云端服务器发送下载请求; 播放处理模块,用于通过播放器对下载的媒体文件进行播放,并根据索引文件判断当前播放数据段的下一数据段是否已经下载; 时间计算模块,用于当所述下一数据段未下载时,计算出下载所述下一数据段所需的时间T,在距离播放完毕前还剩下T的时间,向所述云端服务器发送所述下一数据段的下载请求。 8. The transmission system of the media file 7, characterized in that, said terminal device comprising: a download request module configured to receive the user's instruction to select the actual current network connection, and the connection information according to the network the cloud server transmits the download request; playback processing module, for playing the downloaded media file through the player, and determines whether the current data segment to the next segment play data according to whether the index file has been downloaded; time calculating module, configured to, when when the next data segment is not downloaded, the download time is calculated for the next data segment T, the distance remaining before the playing time T is completed, the cloud server to send the next data segment download requests.
9.根据权利要求8所述媒体文件的传输系统,其特征在于,所述云端服务器的数据传输模块还包括: 判断单元,用于接收到终端设备发来的对所述下一数据段的下载请求时,判断该终端设备是否有正在下载的原下载流程;若有,则所述云端服务器暂停原下载流程,启动所述下一数据段的下载,在所述下一数据段下载完毕后,所述云端服务器恢复执行原下载流程;若无,则所述云端服务器直接启动所述下一数据段的下载,在所述下一数据段下载完毕后,所述云端服务器结束下载。 9. A transmission system according to claim 8 media files claims, characterized in that said cloud server data transmission module further comprises: a judging unit, configured to receive a terminal device sent by the download of the next data segment when requested, the terminal device determines whether the original has a download process is downloading; if so, the server suspends the original cloud download process, start the download of the next data segment, the download is complete in the next data segment, the cloud server resumes the original download process; if not, then the cloud server directly initiate the download of the next data segment, a next data segment after the download is complete, the end of the download server cloud.
10.根据权利要求8所述媒体文件的传输系统,其特征在于,所述终端设备还包括: 跳选单元,用于当所述终端设备对下载的媒体文件进行播放时,接收到用户的跳转操作指令,根据所述跳转操作指令所指示的跳转位置选择继续播放或向所述云端服务器发送下载请求。 8 10. The transmission system according to claim media files, wherein the terminal apparatus further comprising: a skip unit, when said terminal device to play the downloaded media file, the received user jump transfer operation instruction, choose to continue play or send a download request to the first server using the jump instruction jump operation position indicated.
CN201110172914.2A 2011-06-24 2011-06-24 Method and system for transmitting media file CN102223416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110172914.2A CN102223416B (en) 2011-06-24 2011-06-24 Method and system for transmitting media file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110172914.2A CN102223416B (en) 2011-06-24 2011-06-24 Method and system for transmitting media file

Publications (2)

Publication Number Publication Date
CN102223416A CN102223416A (en) 2011-10-19
CN102223416B true CN102223416B (en) 2015-01-07

Family

ID=44779841

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110172914.2A CN102223416B (en) 2011-06-24 2011-06-24 Method and system for transmitting media file

Country Status (1)

Country Link
CN (1) CN102223416B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103248660A (en) * 2012-02-13 2013-08-14 深圳市腾讯计算机系统有限公司 Method and system for cloud subscription downloading
CN102737182B (en) * 2012-06-11 2015-04-01 深圳市腾讯计算机系统有限公司 Cloud computing-based scanning method and device
CN104022962B (en) * 2014-06-27 2017-12-12 宇龙计算机通信科技(深圳)有限公司 The method of flow control and flow control means
CN105100964A (en) * 2015-07-07 2015-11-25 安一恒通(北京)科技有限公司 Multimedia content processing method, client and server

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227460A (en) * 2007-01-19 2008-07-23 晨 秦 Method for uploading and downloading distributed document and apparatus and system thereof
CN101247402A (en) * 2008-03-17 2008-08-20 腾讯科技(深圳)有限公司 Multimedia files downloading and broadcasting system and method
CN101447994A (en) * 2008-12-30 2009-06-03 深圳市迅雷网络技术有限公司 Method for downloading and playing multimedia file and equipment thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7155735B1 (en) * 1999-10-08 2006-12-26 Vulcan Patents Llc System and method for the broadcast dissemination of time-ordered data
US20040225743A1 (en) * 2003-05-05 2004-11-11 Huggins Guy Dwayne Streaming media creation tool

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227460A (en) * 2007-01-19 2008-07-23 晨 秦 Method for uploading and downloading distributed document and apparatus and system thereof
CN101247402A (en) * 2008-03-17 2008-08-20 腾讯科技(深圳)有限公司 Multimedia files downloading and broadcasting system and method
CN101447994A (en) * 2008-12-30 2009-06-03 深圳市迅雷网络技术有限公司 Method for downloading and playing multimedia file and equipment thereof

Also Published As

Publication number Publication date
CN102223416A (en) 2011-10-19

Similar Documents

Publication Publication Date Title
US8392615B2 (en) Dynamic variable rate media delivery system
JP4571929B2 (en) Method and apparatus to perform synchronizing device suitable for multi-server environment client
KR101326390B1 (en) Power optimisation of a mobile device using transmission requests delaying based on historical user behavior
CN102439578B (en) Dynamic variable rate media delivery system
Li et al. Cloud transcoder: Bridging the format and resolution gap between internet videos and mobile devices
KR20040048363A (en) Peer-to-peer content broadcast transfer mechanism
CN101184021B (en) Method, equipment and system for implementing stream media caching replacement
CN101141627A (en) Storage system and method of stream media file
CN104246733B (en) Universal Serial Bus devices for data redirection
CN103024045B (en) A method for the cache server, and the server system
CN1182465C (en) Method for dynamically transferring data and its device
US9613142B2 (en) Method and system for providing the download of transcoded files
US9602578B2 (en) Method and system for optimizing download and instantaneous viewing of media files
JP5893810B2 (en) Dynamic adjustment of resources to support interrupt latency threshold and the processor in the portable computing device
JP5797769B2 (en) Data transmission and reception system
CN102882829A (en) Transcoding method and system
CN103391454B (en) A multi-threaded download method and apparatus
CN101227590A (en) P2P protocol-based media file order program control method and apparatus
CN102710630B (en) A multi-threaded cloud uploading and downloading method and system fragmentation
CN103051955B (en) Streaming method and apparatus
CN103024456B (en) An online video player and video playback method server
CN102905188B (en) A video code stream switching method and apparatus
CN101480051B (en) Support for interactive playback devices for performance aware peer-to-peer video-on-demand service
JP2015530781A (en) Distributed video cache of just-in-time
CN104854572B (en) Systems and methods for dynamically allocated storage subsystem having an asymmetric stored in the storage component

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C14 Granted