WO2017080450A1 - Multi-media data download method, client, server, system and storage medium - Google Patents

Multi-media data download method, client, server, system and storage medium Download PDF

Info

Publication number
WO2017080450A1
WO2017080450A1 PCT/CN2016/105164 CN2016105164W WO2017080450A1 WO 2017080450 A1 WO2017080450 A1 WO 2017080450A1 CN 2016105164 W CN2016105164 W CN 2016105164W WO 2017080450 A1 WO2017080450 A1 WO 2017080450A1
Authority
WO
WIPO (PCT)
Prior art keywords
segment
server
data
client
file
Prior art date
Application number
PCT/CN2016/105164
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 中兴通讯股份有限公司
Publication of WO2017080450A1 publication Critical patent/WO2017080450A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Definitions

  • the present invention relates to the field of multimedia technologies, and in particular, to a multimedia data downloading method, a client, a server, a system, and a computer storage medium.
  • the application of multimedia technology is becoming wider and wider.
  • the download terminal In the process of downloading and playing multimedia data, if the network bandwidth changes, the download terminal must wait for the download of the currently downloaded segment file to complete, and then download the next segment file with the appropriate code rate according to the network bandwidth.
  • the traditional download method often causes the rate switching to lag behind the change of the client network bandwidth, and the real-time performance of the rate switching is poor, which leads to a decrease in user experience.
  • the embodiments of the present invention are directed to a multimedia data downloading method, a client, a server, a system, and a computer storage medium, which solve the problem of how to improve the rate switching efficiency when the network bandwidth changes in the existing multimedia data downloading process.
  • An embodiment of the present invention provides a multimedia data downloading method, where the multimedia data downloading method includes the following steps:
  • the client When the client detects a change in the network bandwidth, the client determines the changed network bandwidth. a first code rate and determining sub-segment data of the segment file of the multimedia data currently being downloaded;
  • the client monitors the boundary identifier of the determined sub-segment data
  • the client downloads the next sub-segment data of the corresponding segment file at the first code rate from the server.
  • the client downloads the next sub-segment data of the corresponding segment file in the first code rate from the server, including:
  • the client calculates a location of the next sub-segment data of the corresponding segment file in the first code rate
  • the client generates the first request according to the calculated location information
  • the client sends the first request to the server, and receives the next sub-segment data of the corresponding segment file under the first code rate returned by the server.
  • the client determines the first code rate corresponding to the changed network bandwidth when detecting the change of the network bandwidth, and determines the sub-segment data of the segment file of the multimedia data currently being downloaded.
  • Also includes:
  • the client receives an index file returned by the server
  • the client sequentially sends a request to the server according to the index file, and receives each segment file under the second code rate returned by the server.
  • the method includes:
  • the client When the client downloads the next sub-segment data corresponding to the segment file at the first code rate, the client plays the downloaded sub-segment data according to the first code rate.
  • the client sends a second request to the server to receive the service.
  • the method further includes:
  • the server generates an index file and a plurality of segment files according to the multimedia data
  • the server adds corresponding decoding information at a starting position of each segment file
  • the server adds the location information of each sub-segment data to the index file, so that the client performs rate switching between the sub-segment data according to the network bandwidth when the client downloads the multimedia data.
  • An embodiment of the present invention further provides a client, where the client includes:
  • a determining module configured to determine a first code rate corresponding to the changed network bandwidth when detecting a change in network bandwidth, and determine sub-segment data of the segment file of the multimedia data currently being downloaded;
  • a monitoring module configured to monitor a boundary identifier of the determined sub-segment data
  • a downloading module configured to download the next sub-segment data of the corresponding segment file in the first code rate from the server when the downloaded data reaches the boundary identifier.
  • the downloading module includes a calculating unit, a generating unit, and a receiving unit;
  • a calculating unit configured to calculate, when the downloaded data reaches the boundary identifier, a location of a next sub-segment data of the corresponding segment file in the first code rate
  • a generating unit configured to generate the first request according to the calculated location information
  • the receiving unit is configured to send the first request to the server, and receive the next sub-segment data of the corresponding segment file in the first code rate returned by the server.
  • the downloading module is further configured to send a second request to the server to download an index file of the multimedia data from the server;
  • the downloading module is further configured to receive an index file returned by the server;
  • the downloading module is further configured to sequentially send a request to the service according to the index file And receiving each segment file at the second code rate returned by the server.
  • the client further includes a play module
  • the playing module is configured to play the downloaded sub-segment data according to the first code rate when the downloading of the next sub-segment data of the corresponding segment file is completed at the first code rate.
  • an embodiment of the present invention further provides a server, where the server includes:
  • Generating a module configured to generate an index file and a plurality of segment files according to the multimedia data
  • Adding a module configured to add corresponding decoding information at a starting position of each segment file
  • the identifier module is configured to identify, according to each of the decoding information, sub-segment data that can be code rate switched in the corresponding segment file;
  • the adding module is further configured to add location information of each sub-segment data to the index file, so that when the client downloads the multimedia data, the rate switching is performed between the sub-segment data according to the network bandwidth.
  • an embodiment of the present invention further provides a multimedia data downloading system, where the multimedia data downloading system includes a client as described above and a server as described above.
  • an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores a computer program, and the computer program is used to execute the multimedia data downloading method described above.
  • the multimedia data downloading method, the client, the server, the system, and the computer storage medium provided by the embodiments of the present invention monitor the network bandwidth when downloading the multimedia data, and wait for the currently downloaded multimedia data when detecting the change of the network bandwidth.
  • the cell rate can be switched to another code rate, and the next sub-segment data of the corresponding segment file under another code rate is downloaded.
  • the corresponding code rate is determined according to the changed network bandwidth, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the code rate switching efficiency.
  • FIG. 1 is a schematic flow chart of a first embodiment of a method for downloading multimedia data according to the present invention
  • FIG. 2 is a schematic flowchart of a second embodiment of a method for downloading multimedia data according to the present invention
  • FIG. 3 is a schematic flowchart diagram of a third embodiment of a method for downloading multimedia data according to the present invention.
  • FIG. 4 is a schematic flowchart diagram of a fourth embodiment of a method for downloading multimedia data according to the present invention.
  • FIG. 5 is a schematic diagram of functional modules of a first embodiment of a client according to the present invention.
  • FIG. 6 is a schematic diagram of functional modules of a second embodiment of a client according to the present invention.
  • FIG. 7 is a schematic diagram of functional modules of a preferred embodiment of a server of the present invention.
  • FIG. 8 is a schematic diagram of functional modules of a preferred embodiment of a multimedia data download system of the present invention.
  • the main solution of the embodiment of the present invention is: when detecting that the network bandwidth changes, the client determines the first code rate corresponding to the changed network bandwidth, and determines the sub-segment of the segment file of the multimedia data currently being downloaded. Data; the client monitors the determined boundary identifier of the sub-segment data; and when the downloaded data reaches the boundary identifier, the client downloads the next segment of the corresponding segment file at the first code rate from the server. Sub-segment data.
  • the present invention provides a multimedia data downloading method.
  • FIG. 1 is a schematic flowchart diagram of a first embodiment of a method for downloading multimedia data according to the present invention.
  • the multimedia data downloading method includes:
  • Step S10 When detecting that the network bandwidth changes, the client determines a first code rate corresponding to the changed network bandwidth, and determines sub-segment data of the segment file of the multimedia data currently being downloaded;
  • the client is a terminal device for multimedia data downloading, and the client may be, for example, a mobile phone, a smart phone, a notebook computer, a personal digital assistant (PDA, Personal Digital Assistant), a tablet computer (PAD, Portable Android Device).
  • PDA personal digital assistant
  • PAD Portable Android Device
  • a mobile terminal such as a portable multimedia player (PMP), and a fixed terminal such as a digital television (TV), a desktop computer, and the like.
  • PMP portable multimedia player
  • TV digital television
  • desktop computer and the like.
  • the multimedia data is stored on a server for the client to download.
  • the multimedia data includes an index file and a plurality of segment files at different code rates.
  • each of the segment files includes a plurality of sub-segment data.
  • the client When detecting the change of the network bandwidth, the client determines the first code rate corresponding to the changed network bandwidth according to the downloaded index file, and determines the sub-segment data of the segment file of the multimedia data currently being downloaded.
  • the first code rate is a code rate corresponding to the changed network bandwidth.
  • the description of the use of "first” herein is merely for the purpose of facilitating the description of the present invention, and does not have a specific meaning in itself. For example, the client downloads a segment file at a code rate of 800 kbps, detects that the network changes, and the changed network bandwidth conforms to a code rate of 2000 kbps, and the client downloads a segment file corresponding to a code rate of 2000 kbps.
  • Step S20 the client monitors the boundary identifier of the determined sub-segment data
  • the boundary identifier is a flag in the segment file for determining the range of the sub-segment data.
  • the boundary identifier may include a start identifier and an end identifier.
  • a boundary identifier of the sub-segment data currently being downloaded is an end identifier of the sub-segment data.
  • Step S30 the client downloads the next sub-segment data of the corresponding segment file in the first code rate from the server when the downloaded data reaches the boundary identifier.
  • the segment data has been downloaded, and the client downloads the next sub-segment data of the corresponding segment file at the first code rate from the server according to the downloaded index file.
  • the next sub-segment data here is the next sub-segment data corresponding to the sub-segment data that has been downloaded in the order set in the index file. Specifically, for example, when the first sub-sub-segment data download at the 800 kbps code rate is completed, the code rate switching is performed, and the second sub-segment data at the 2000 kbps code rate is downloaded, and the first sub-segment at the 2000 kbps code rate is performed.
  • the segment data corresponds to the first sub-segment data at a code rate of 800 kbps, and only the code rates are different.
  • the client may further play the downloaded sub-segment according to the first code rate when the downloading of the next sub-segment data of the corresponding segment file is completed at the first code rate. Segment data.
  • the network bandwidth is monitored.
  • the sub-segment data of the segment file of the currently downloaded multimedia data is downloaded, and the code rate can be switched to another code rate. Download the next sub-segment data of the corresponding segment file under another bit rate. You can quickly switch between code rates without waiting for the entire downloaded segment file to be downloaded.
  • the corresponding code rate is determined according to the changed network bandwidth, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the code rate switching efficiency.
  • FIG. 2 is a schematic flowchart diagram of a second embodiment of a multimedia data downloading method according to the present invention. Based on the first embodiment of the foregoing multimedia data downloading method, the step S30 includes:
  • Step S31 the client calculates a location of the next sub-segment data of the corresponding segment file in the first code rate when the downloaded data reaches the boundary identifier;
  • the client calculates the location of the next sub-segment data of the corresponding segment file at the first code rate according to the downloaded index file. It should be understood that the location file of each sub-segment data is stored in the index file of the multimedia file.
  • the location information is location information stored by the sub-segment data.
  • Step S32 the client generates the first request according to the calculated location information
  • the client generates the first request according to the calculated location information, to download, from the server, the next sub-segment data of the corresponding segment file in the first code rate.
  • the client may also add the calculated location information to the first request and send a first request containing the location information to the server.
  • Step S33 The client sends the first request to the server, and receives the next sub-segment data of the corresponding segment file in the first code rate returned by the server.
  • the server may first send the decoding information corresponding to the next sub-segment file of the corresponding segment file in the first code rate to the client, when the first request is received, and then The corresponding sub-segment data is sent to the client.
  • a first request is generated according to the location information, and the generated first request is sent to the server to download the corresponding location from the server.
  • the sub-segment data realizes fast switching of the code rate between the sub-segment data according to the network bandwidth, and improves the rate switching efficiency.
  • FIG. 3 is a schematic flowchart diagram of a third embodiment of a multimedia data downloading method according to the present invention. Based on the first embodiment of the foregoing multimedia data downloading method, before the step S10, the method further includes:
  • Step S11 the client sends a second request to the server to download an index file of the multimedia data from the server;
  • Step S12 the client receives an index file returned by the server
  • Step S13 The client sequentially sends a request to the server according to the index file, and receives each segment file under the second code rate returned by the server.
  • the client When downloading the multimedia file, the client first sends a second request to the server to download an index file of the multimedia data from the server; the client receives an index file returned by the server; the client The terminal sequentially sends a request to the server according to the index file to sequentially download each segment file of the multimedia file from the server; the client receives each segment under the second code rate returned by the server. File and play at the second rate.
  • the index file of the multimedia data is first downloaded, and the sub-segment data of each segment file of the multimedia file is sequentially downloaded according to the index file, and the network bandwidth is monitored during the downloading process, and the network bandwidth is detected.
  • the sub-segment data of the segment file waiting for the currently downloaded multimedia data is downloaded, and then the code rate is switched to another code rate, and the next sub-segment data of the corresponding segment file under another code rate is downloaded.
  • the rate switching can be performed without waiting for all the segment files currently being downloaded to be downloaded.
  • the corresponding code rate is determined according to the changed network bandwidth, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the code rate switching efficiency.
  • FIG. 4 is a schematic flowchart diagram of a fourth embodiment of a multimedia data downloading method according to the present invention. Based on the first embodiment of the foregoing multimedia data downloading method, before the step S11, the method further includes:
  • Step S100 the server generates an index file and a plurality of segment files according to the multimedia data
  • Step S101 the server adds corresponding decoding information at a starting position of each segment file
  • Step S102 the server identifies, according to each of the decoding information, sub-segment data that can be code rate switched in the corresponding segment file;
  • Step S103 the server adds location information of each sub-segment data to the index file.
  • the code rate is switched between the sub-segment data according to the network bandwidth.
  • the server generates an index file and a plurality of segment files according to the multimedia data; the server adds corresponding decoding information at a starting position of each segment file; the server analyzes each segment file, and decodes according to each The information identifies the sub-segment data that can be code-switched in the corresponding segment file; the server adds the location information of each sub-segment data to the index file, so that the client downloads the multimedia data according to The network bandwidth performs rate switching between sub-segment data.
  • the server when receiving the multimedia data download request of the client, the server sends the corresponding multimedia data to the client according to the received request.
  • the server generates the index file and the plurality of segment files by using the multimedia data, and identifies the sub-segment unit that can perform rate switching in the segment file, and adds the location information of each sub-segment unit to the index.
  • the file So that when the multimedia data is downloaded, the network bandwidth is monitored. When the network bandwidth is detected to change, the sub-segment data of the segment file of the currently downloaded multimedia data is downloaded, and the code rate can be switched to another code rate. Download the next sub-segment data of the corresponding segment file under another bit rate. The rate switching can be performed without waiting for all the segment files currently being downloaded to be downloaded. At the same time, the corresponding code rate is determined according to the changed network bandwidth, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the code rate switching efficiency.
  • the invention further provides a client.
  • FIG. 5 is a schematic diagram of functional modules of a first embodiment of a client according to the present invention.
  • the client includes: a determining module 10, a monitoring module 20, and a downloading module 30.
  • the determining module 10 is configured to determine a first code rate corresponding to the changed network bandwidth when detecting that the network bandwidth changes, and determine a segmented text of the multimedia data currently being downloaded. Sub-segment data of the piece;
  • the client is a terminal device for multimedia data downloading, and the client may be a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a PDA, a PAD, a PMP, etc., and a digital TV, a desktop computer, or the like.
  • a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a PDA, a PAD, a PMP, etc., and a digital TV, a desktop computer, or the like.
  • Fixed terminal such as a mobile phone, a smart phone, a notebook computer, a PDA, a PAD, a PMP, etc.
  • the multimedia data is stored on a server for the client to download.
  • the multimedia data includes an index file and a plurality of segment files at different code rates.
  • each of the segment files includes a plurality of sub-segment data.
  • the client When detecting the change of the network bandwidth, the client determines the first code rate corresponding to the changed network bandwidth according to the downloaded index file, and determines the sub-segment data of the segment file of the multimedia data currently being downloaded.
  • the first code rate is a code rate corresponding to the changed network bandwidth.
  • the description of the use of "first” herein is merely for the purpose of facilitating the description of the present invention, and does not have a specific meaning in itself. For example, the client downloads a segment file at a code rate of 800 kbps, detects that the network changes, and the changed network bandwidth conforms to a code rate of 2000 kbps, and the client downloads a segment file corresponding to a code rate of 2000 kbps.
  • the monitoring module 20 is configured to monitor a boundary identifier of the determined sub-segment data
  • the boundary identifier is a flag in the segment file for determining the range of the sub-segment data.
  • the boundary identifier may include a start identifier and an end identifier.
  • a boundary identifier of the sub-segment data currently being downloaded is an end identifier of the sub-segment data.
  • the downloading module 30 is configured to download the next sub-segment data of the corresponding segment file in the first code rate from the server when the downloaded data reaches the boundary identifier.
  • the client determines that the currently downloaded sub-segment data has been downloaded, and the client downloads the corresponding segment at the first code rate from the server according to the downloaded index file.
  • the next sub-segment data of the file is the next sub-segment data corresponding to the sub-segment data that has been downloaded in the order set in the index file.
  • the first sub-sub-segment data download at the 800 kbps code rate is completed, Perform rate switching to download the second sub-segment data at a rate of 2000 kbps, and the first sub-segment data at a code rate of 2000 kbps corresponds to the first sub-segment data at a code rate of 800 kbps, only the code rate is different. .
  • the client may further include a playing module, where the playing module is configured to: when the downloading of the next sub-segment data of the corresponding segment file is completed at the first code rate, according to the The downloaded sub-segment data is played at the first code rate.
  • the determining module 10, the monitoring module 20, the downloading module 30, and the playing module may all be a central processing unit (CPU), a microprocessor (MPU, a Micro Processor Unit) in the client.
  • CPU central processing unit
  • MPU Microprocessor
  • DSP Digital Signal processor
  • FPGA Field Programmable Gate Array
  • the network bandwidth is monitored.
  • the sub-segment data of the segment file of the currently downloaded multimedia data is downloaded, and the code rate can be switched to another code rate. Download the next sub-segment data of the corresponding segment file under another bit rate. You can quickly switch between code rates without waiting for the entire downloaded segment file to be downloaded.
  • the corresponding code rate is determined according to the changed network bandwidth, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the code rate switching efficiency.
  • FIG. 6 is a schematic diagram of functional modules of a second embodiment of a client according to the present invention.
  • the download module 30 includes a computing unit 31, a generating unit 32, and a receiving unit 33, based on the first embodiment of the client;
  • the calculating unit 31 is configured to calculate, when the downloaded data reaches the boundary identifier, a location of the next sub-segment data of the corresponding segment file in the first code rate;
  • the client calculates the location of the next sub-segment data of the corresponding segment file at the first code rate according to the downloaded index file. It should be understood that the location file of each sub-segment data is stored in the index file of the multimedia file.
  • the location information is location information stored by the sub-segment data.
  • the generating unit 32 is configured to generate the first request according to the calculated location information
  • the client generates the first request according to the calculated location information, to download, from the server, the next sub-segment data of the corresponding segment file in the first code rate.
  • the client may also add the calculated location information to the first request and send a first request containing the location information to the server.
  • the receiving unit 33 is configured to send the first request to the server, and receive the next sub-segment data of the corresponding segment file in the first code rate returned by the server.
  • the server may first send the decoding information corresponding to the next sub-segment file of the corresponding segment file in the first code rate to the client, when the first request is received, and then The corresponding sub-segment data is sent to the client.
  • the computing unit 31, the generating unit 32, and the receiving unit 33 can all be implemented by a CPU, an MPU, a DSP, an FPGA, or the like in the client.
  • a first request is generated according to the location information, and the generated first request is sent to the server to download the corresponding location from the server.
  • the sub-segment data realizes fast switching of the code rate between the sub-segment data according to the network bandwidth, and improves the rate switching efficiency.
  • the downloading module 30 is further configured to send a second request to the server to download an index file of the multimedia data from the server;
  • the downloading module 30 is further configured to receive an index file returned by the server;
  • the downloading module 30 is further configured to sequentially send a request to the server according to the index file, and receive each segment file under the second code rate returned by the server.
  • the index file includes location information of the segment file at each bit rate of the multimedia file, location information of the sub-segment data of each segment file, and network bandwidth data corresponding to each code rate.
  • the client first sends a second request to the server to download an index file of the multimedia data from the server; the client receives an index file returned by the server; the client The terminal sequentially sends a request to the server according to the index file to sequentially download each segment file of the multimedia file from the server; the client receives each segment under the second code rate returned by the server. File and play at the second rate.
  • the index file of the multimedia data is first downloaded, and the sub-segment data of each segment file of the multimedia file is sequentially downloaded according to the index file, and the network bandwidth is monitored during the downloading process, and the network bandwidth is detected.
  • the sub-segment data of the segment file waiting for the currently downloaded multimedia data is downloaded, and then the code rate is switched to another code rate, and the next sub-segment data of the corresponding segment file under another code rate is downloaded.
  • the rate switching can be performed without waiting for all the segment files currently being downloaded to be downloaded.
  • the corresponding code rate is determined according to the changed network bandwidth, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the code rate switching efficiency.
  • the invention further provides a server.
  • FIG. 7 is a schematic diagram of functional modules of a preferred embodiment of a server according to the present invention.
  • the server includes: a generating module 100, an adding module 101, and an identifying module 103;
  • the generating module 100 is configured to generate an index file and a plurality of segment files according to the multimedia data
  • the adding module 101 is configured to add corresponding decoding information at a starting position of each segment file
  • the identifier module 102 is configured to identify a corresponding segment file according to each of the decoding information. Sub-segment data in which rate switching can be performed;
  • the adding module 102 is further configured to add location information of each sub-segment data to the index file, so that when the client downloads the multimedia data, the code rate is switched between the sub-segment data according to the network bandwidth.
  • the server generates an index file and a plurality of segment files according to the multimedia data; the server adds corresponding decoding information at a starting position of each segment file; the server analyzes each segment file, and decodes according to each The information identifies the sub-segment data that can be code-switched in the corresponding segment file; the server adds the location information of each sub-segment data to the index file, so that the client downloads the multimedia data according to The network bandwidth performs rate switching between sub-segment data.
  • the server may further include a sending module, where the sending module is configured to: when receiving the multimedia data download request of the client, send the corresponding multimedia data to the client according to the received request. end.
  • the generating module 100, the adding module 101, and the identifying module 103 can be implemented by a CPU, an MPU, a DSP, an FPGA, or the like located in the server.
  • the sending module further included in the server may be implemented by a transceiver antenna.
  • the server generates the index file and the plurality of segment files by using the multimedia data, and identifies the sub-segment unit that can perform rate switching in the segment file, and adds the location information of each sub-segment unit to the index.
  • the file So that when the multimedia data is downloaded, the network bandwidth is monitored. When the network bandwidth is detected to change, the sub-segment data of the segment file of the currently downloaded multimedia data is downloaded, and the code rate can be switched to another code rate. Download the next sub-segment data of the corresponding segment file under another bit rate. The rate switching can be performed without waiting for all the segment files currently being downloaded to be downloaded. At the same time, the corresponding code rate is determined according to the changed network bandwidth, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the code rate switching efficiency.
  • the invention further provides a multimedia data downloading system.
  • FIG. 8 is a schematic diagram of functional modules of a multimedia data download system according to a preferred embodiment of the present invention.
  • the multimedia data download system includes a client as described above and a server as described above.
  • the specific features of the client and the server are referred to the foregoing embodiments. Since all the technical solutions of all the foregoing embodiments are used in the present multimedia data, at least all the beneficial effects brought by the technical solutions of the foregoing embodiments are provided. I will not repeat them one by one.
  • the embodiment of the invention further describes a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the multimedia data downloading method described in the foregoing embodiments.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
  • the network bandwidth is monitored.
  • the sub-segment data of the segment file of the currently downloaded multimedia data is downloaded, and the switch can be switched to another.
  • One bit rate download the next sub-segment data of the corresponding segment file under another bit rate, so that the code rate switching can be quickly performed without waiting for all the segment files currently being downloaded to be completely downloaded;
  • the network bandwidth determines the corresponding code rate, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the rate switching efficiency.

Landscapes

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

Abstract

A multi-media data download method, a client, a server, a multi-media data download system and a computer storage medium. The multi-media data download method comprises the following steps: when detecting a change in a network bandwidth, a client determines a first code rate corresponding to the changed network bandwidth, and determines sub-segment data of a segment file of multi-media data being downloaded at present; the client monitors a boundary identifier of the determined sub-segment data; the client downloads next sub-segment data of the segment file corresponding to the first code rate from a server when the downloaded data arrives at the boundary identifier.

Description

多媒体数据下载方法、客户端、服务器、系统及存储介质Multimedia data downloading method, client, server, system and storage medium 技术领域Technical field
本发明涉及多媒体技术领域,尤其涉及一种多媒体数据下载方法、客户端、服务器、系统及计算机存储介质。The present invention relates to the field of multimedia technologies, and in particular, to a multimedia data downloading method, a client, a server, a system, and a computer storage medium.
背景技术Background technique
随着通信技术的发展,多媒体技术的应用越来越广。在多媒体数据的下载及播放过程中,若网络带宽发生了变化,下载终端必须等待当前下载的分段文件下载完成时,才能根据网络带宽下载码率合适的下一分段文件。采用传统的下载方法往往会造成码率的切换滞后于客户端网络带宽的变化,码率切换的实时性差,进而导致用户体验降低。With the development of communication technology, the application of multimedia technology is becoming wider and wider. In the process of downloading and playing multimedia data, if the network bandwidth changes, the download terminal must wait for the download of the currently downloaded segment file to complete, and then download the next segment file with the appropriate code rate according to the network bandwidth. The traditional download method often causes the rate switching to lag behind the change of the client network bandwidth, and the real-time performance of the rate switching is poor, which leads to a decrease in user experience.
因此,现有的多媒体数据下载过程中,当网络带宽发生变化时如何提高码率切换效率的问题,此方面的问题亟待发明人解决。Therefore, in the existing multimedia data downloading process, how to improve the efficiency of the code rate switching when the network bandwidth changes, the problem in this aspect needs to be solved by the inventor.
上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。The above content is only used to assist in understanding the technical solutions of the present invention, and does not constitute an admission that the above is prior art.
发明内容Summary of the invention
本发明实施例期望一种多媒体数据下载方法、客户端、服务器、系统及计算机存储介质,解决现有的多媒体数据下载过程中,当网络带宽发生变化时如何提高码率切换效率的问题。The embodiments of the present invention are directed to a multimedia data downloading method, a client, a server, a system, and a computer storage medium, which solve the problem of how to improve the rate switching efficiency when the network bandwidth changes in the existing multimedia data downloading process.
为达到上述目的,本发明的技术方案是这样实现的:In order to achieve the above object, the technical solution of the present invention is achieved as follows:
本发明实施例提供一种多媒体数据下载方法,所述多媒体数据下载方法包括以下步骤:An embodiment of the present invention provides a multimedia data downloading method, where the multimedia data downloading method includes the following steps:
客户端在检测到网络带宽发生变化时,确定变化后的网络带宽对应的 第一码率,并确定当前正在下载的多媒体数据的分段文件的子分段数据;When the client detects a change in the network bandwidth, the client determines the changed network bandwidth. a first code rate and determining sub-segment data of the segment file of the multimedia data currently being downloaded;
所述客户端监控所确定的子分段数据的边界标识;The client monitors the boundary identifier of the determined sub-segment data;
所述客户端在下载的数据达到所述边界标识时,从服务器下载所述第一码率下对应分段文件的下一子分段数据。When the downloaded data reaches the boundary identifier, the client downloads the next sub-segment data of the corresponding segment file at the first code rate from the server.
上述方案中,所述客户端在下载的数据达到所述边界标识时,从服务器下载所述第一码率下对应分段文件的下一子分段数据的步骤包括:In the above solution, when the downloaded data reaches the boundary identifier, the client downloads the next sub-segment data of the corresponding segment file in the first code rate from the server, including:
所述客户端在下载的数据达到所述边界标识时,计算所述第一码率下对应分段文件的下一子分段数据的位置;When the downloaded data reaches the boundary identifier, the client calculates a location of the next sub-segment data of the corresponding segment file in the first code rate;
所述客户端根据计算出的位置信息生成所述第一请求;The client generates the first request according to the calculated location information;
所述客户端将所述第一请求发送至所述服务器,并接收所述服务器返回的所述第一码率下对应分段文件的下一子分段数据。The client sends the first request to the server, and receives the next sub-segment data of the corresponding segment file under the first code rate returned by the server.
上述方案中,所述客户端在检测到网络带宽发生变化时,确定变化后的网络带宽对应的第一码率,并确定当前正在下载的多媒体数据的分段文件的子分段数据的步骤之前,还包括:In the above solution, the client determines the first code rate corresponding to the changed network bandwidth when detecting the change of the network bandwidth, and determines the sub-segment data of the segment file of the multimedia data currently being downloaded. ,Also includes:
所述客户端发送第二请求至所述服务器,以从所述服务器下载所述多媒体数据的索引文件;Sending, by the client, a second request to the server, to download an index file of the multimedia data from the server;
所述客户端接收所述服务器返回的索引文件;The client receives an index file returned by the server;
所述客户端根据所述索引文件依次发送请求至所述服务器,并接收所述服务器返回的第二码率下的各分段文件。The client sequentially sends a request to the server according to the index file, and receives each segment file under the second code rate returned by the server.
上述方案中,所述客户端在下载的数据达到所述边界标识时,从服务器下载所述第一码率下对应分段文件的下一子分段数据的步骤之后,还包括:In the above solution, after the step of downloading, by the client, the next sub-segment data of the corresponding segment file in the first code rate, the method includes:
所述客户端在所述第一码率下对应分段文件的下一子分段数据下载完成时,按照所述第一码率播放所下载的子分段数据。When the client downloads the next sub-segment data corresponding to the segment file at the first code rate, the client plays the downloaded sub-segment data according to the first code rate.
上述方案中,所述客户端发送第二请求至所述服务器,以从所述服务 器下载所述多媒体数据的索引文件的步骤之前,还包括:In the above solution, the client sends a second request to the server to receive the service. Before the step of downloading the index file of the multimedia data, the method further includes:
所述服务器根据所述多媒体数据生成索引文件和多个分段文件;The server generates an index file and a plurality of segment files according to the multimedia data;
所述服务器在各个分段文件的起始位置添加对应的解码信息;The server adds corresponding decoding information at a starting position of each segment file;
所述服务器根据各个所述解码信息标识出对应分段文件内可以进行码率切换的子分段数据;Determining, by the server, the sub-segment data that can be code rate switched in the corresponding segment file according to each of the decoding information;
所述服务器将各子分段数据的位置信息添加至所述索引文件中,以供客户端下载所述多媒体数据时根据网络带宽在子分段数据之间进行码率切换。The server adds the location information of each sub-segment data to the index file, so that the client performs rate switching between the sub-segment data according to the network bandwidth when the client downloads the multimedia data.
本发明实施例还提供一种客户端,所述客户端包括:An embodiment of the present invention further provides a client, where the client includes:
确定模块,配置为在检测到网络带宽发生变化时,确定变化后的网络带宽对应的第一码率,并确定当前正在下载的多媒体数据的分段文件的子分段数据;a determining module, configured to determine a first code rate corresponding to the changed network bandwidth when detecting a change in network bandwidth, and determine sub-segment data of the segment file of the multimedia data currently being downloaded;
监控模块,配置为监控所确定的子分段数据的边界标识;a monitoring module configured to monitor a boundary identifier of the determined sub-segment data;
下载模块,配置为在下载的数据达到所述边界标识时,从服务器下载所述第一码率下对应分段文件的下一子分段数据。And a downloading module, configured to download the next sub-segment data of the corresponding segment file in the first code rate from the server when the downloaded data reaches the boundary identifier.
上述方案中,所述下载模块包括计算单元、生成单元和接收单元;In the above solution, the downloading module includes a calculating unit, a generating unit, and a receiving unit;
计算单元,配置为在下载的数据达到所述边界标识时,计算所述第一码率下对应分段文件的下一子分段数据的位置;a calculating unit, configured to calculate, when the downloaded data reaches the boundary identifier, a location of a next sub-segment data of the corresponding segment file in the first code rate;
生成单元,配置为根据计算出的位置信息生成所述第一请求;a generating unit, configured to generate the first request according to the calculated location information;
接收单元,配置为将所述第一请求发送至所述服务器,并接收所述服务器返回的所述第一码率下对应分段文件的下一子分段数据。The receiving unit is configured to send the first request to the server, and receive the next sub-segment data of the corresponding segment file in the first code rate returned by the server.
上述方案中,所述下载模块,还配置为发送第二请求至所述服务器,以从所述服务器下载所述多媒体数据的索引文件;In the above solution, the downloading module is further configured to send a second request to the server to download an index file of the multimedia data from the server;
所述下载模块,还配置为接收所述服务器返回的索引文件;The downloading module is further configured to receive an index file returned by the server;
所述下载模块,还配置为根据所述索引文件依次发送请求至所述服务 器,并接收所述服务器返回的第二码率下的各分段文件。The downloading module is further configured to sequentially send a request to the service according to the index file And receiving each segment file at the second code rate returned by the server.
上述方案中,所述客户端还包括播放模块;In the above solution, the client further includes a play module;
所述播放模块,配置为在所述第一码率下对应分段文件的下一子分段数据下载完成时,按照所述第一码率播放所下载的子分段数据。The playing module is configured to play the downloaded sub-segment data according to the first code rate when the downloading of the next sub-segment data of the corresponding segment file is completed at the first code rate.
此外,为实现上述目的,本发明实施例还提供一种服务器,所述服务器包括:In addition, in order to achieve the above object, an embodiment of the present invention further provides a server, where the server includes:
生成模块,配置为根据所述多媒体数据生成索引文件和多个分段文件;Generating a module, configured to generate an index file and a plurality of segment files according to the multimedia data;
添加模块,配置为在各个分段文件的起始位置添加对应的解码信息;Adding a module, configured to add corresponding decoding information at a starting position of each segment file;
标识模块,配置为根据各个所述解码信息标识出对应分段文件内可以进行码率切换的子分段数据;The identifier module is configured to identify, according to each of the decoding information, sub-segment data that can be code rate switched in the corresponding segment file;
所述添加模块,还配置为将各子分段数据的位置信息添加至所述索引文件中,以供客户端下载所述多媒体数据时根据网络带宽在子分段数据之间进行码率切换。The adding module is further configured to add location information of each sub-segment data to the index file, so that when the client downloads the multimedia data, the rate switching is performed between the sub-segment data according to the network bandwidth.
此外,为实现上述目的,本发明实施例还提供一种多媒体数据下载系统,所述多媒体数据下载系统包括如上所述的客户端和如上所述的服务器。In addition, in order to achieve the above object, an embodiment of the present invention further provides a multimedia data downloading system, where the multimedia data downloading system includes a client as described above and a server as described above.
此外,为实现上述目的,本发明实施例提供了一种计算机存储介质,所述计算机存储介质中存储有计算机程序,所述计算机程序用于执行以上所述的多媒体数据下载方法。In addition, in order to achieve the above object, an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores a computer program, and the computer program is used to execute the multimedia data downloading method described above.
本发明实施例提供的多媒体数据下载方法、客户端、服务器、系统及计算机存储介质,在下载多媒体数据时,对网络带宽进行监控,在检测到网络带宽发生变化时,等待当前下载的多媒体数据的分段文件的子分段数据下载完成,即可切换至另一码率,下载另一码率下对应的分段文件的下一子分段数据。无需等待当前正在下载的分段文件全部下载完成,即可快速进行码率切换。同时根据变化后的网络带宽确定对应的码率,实现了根据网络带宽快速切换码率进行多媒体文件的下载,提高了码率切换效率。 The multimedia data downloading method, the client, the server, the system, and the computer storage medium provided by the embodiments of the present invention monitor the network bandwidth when downloading the multimedia data, and wait for the currently downloaded multimedia data when detecting the change of the network bandwidth. After the sub-segment data download of the segment file is completed, the cell rate can be switched to another code rate, and the next sub-segment data of the corresponding segment file under another code rate is downloaded. You can quickly switch between code rates without waiting for the entire downloaded segment file to be downloaded. At the same time, the corresponding code rate is determined according to the changed network bandwidth, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the code rate switching efficiency.
附图说明DRAWINGS
图1为本发明多媒体数据下载方法的第一实施例的流程示意图;1 is a schematic flow chart of a first embodiment of a method for downloading multimedia data according to the present invention;
图2为本发明多媒体数据下载方法的第二实施例的流程示意图;2 is a schematic flowchart of a second embodiment of a method for downloading multimedia data according to the present invention;
图3为本发明多媒体数据下载方法的第三实施例的流程示意图;3 is a schematic flowchart diagram of a third embodiment of a method for downloading multimedia data according to the present invention;
图4为本发明多媒体数据下载方法的第四实施例的流程示意图;4 is a schematic flowchart diagram of a fourth embodiment of a method for downloading multimedia data according to the present invention;
图5为本发明客户端的第一实施例的功能模块示意图;FIG. 5 is a schematic diagram of functional modules of a first embodiment of a client according to the present invention; FIG.
图6为本发明客户端的第二实施例的功能模块示意图;6 is a schematic diagram of functional modules of a second embodiment of a client according to the present invention;
图7为本发明服务器的较佳实施例的功能模块示意图;7 is a schematic diagram of functional modules of a preferred embodiment of a server of the present invention;
图8为本发明多媒体数据下载系统的较佳实施例的功能模块示意图。FIG. 8 is a schematic diagram of functional modules of a preferred embodiment of a multimedia data download system of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。The technical solutions in the embodiments of the present invention will be clearly and completely described in the following with reference to the accompanying drawings. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明实施例的主要解决方案是:客户端在检测到网络带宽发生变化时,确定变化后的网络带宽对应的第一码率,并确定当前正在下载的多媒体数据的分段文件的子分段数据;所述客户端监控所确定的子分段数据的边界标识;所述客户端在下载的数据达到所述边界标识时,从服务器下载所述第一码率下对应分段文件的下一子分段数据。The main solution of the embodiment of the present invention is: when detecting that the network bandwidth changes, the client determines the first code rate corresponding to the changed network bandwidth, and determines the sub-segment of the segment file of the multimedia data currently being downloaded. Data; the client monitors the determined boundary identifier of the sub-segment data; and when the downloaded data reaches the boundary identifier, the client downloads the next segment of the corresponding segment file at the first code rate from the server. Sub-segment data.
现有的多媒体数据下载过程中,当网络带宽发生变化时如何提高码率切换效率的问题。In the existing multimedia data downloading process, how to improve the efficiency of rate switching when the network bandwidth changes.
基于上述问题,本发明提供一种多媒体数据下载方法。Based on the above problems, the present invention provides a multimedia data downloading method.
参照图1,图1为本发明多媒体数据下载方法的第一实施例的流程示意图。Referring to FIG. 1, FIG. 1 is a schematic flowchart diagram of a first embodiment of a method for downloading multimedia data according to the present invention.
在本实施例中,所述多媒体数据下载方法包括: In this embodiment, the multimedia data downloading method includes:
步骤S10,客户端在检测到网络带宽发生变化时,确定变化后的网络带宽对应的第一码率,并确定当前正在下载的多媒体数据的分段文件的子分段数据;Step S10: When detecting that the network bandwidth changes, the client determines a first code rate corresponding to the changed network bandwidth, and determines sub-segment data of the segment file of the multimedia data currently being downloaded;
所述客户端为用于多媒体数据下载的终端设备,所述客户端可以是诸如移动电话、智能电话、笔记本电脑、个人数字助理(PDA,Personal Digital Assistant)、平板电脑(PAD,Portable Android Device)、便携式多媒体播放器(PMP,Portable Media Player)等等的移动终端以及诸如数字电视(TV,television)、台式计算机等等的固定终端。The client is a terminal device for multimedia data downloading, and the client may be, for example, a mobile phone, a smart phone, a notebook computer, a personal digital assistant (PDA, Personal Digital Assistant), a tablet computer (PAD, Portable Android Device). A mobile terminal such as a portable multimedia player (PMP), and a fixed terminal such as a digital television (TV), a desktop computer, and the like.
所述多媒体数据存储在服务器,以供客户端进行下载。所述多媒体数据包括索引文件和不同码率下的多个分段文件。在本发明实施例中,每个所述分段文件包括多个子分段数据。The multimedia data is stored on a server for the client to download. The multimedia data includes an index file and a plurality of segment files at different code rates. In an embodiment of the invention, each of the segment files includes a plurality of sub-segment data.
所述客户端在检测到网络带宽发生变化时,根据已下载的索引文件确定变化后的网络带宽对应的第一码率,并确定当前正在下载的多媒体数据的分段文件的子分段数据。所述第一码率为变化后的网络带宽对应的码率,此处使用“第一”的描述仅为了有利于本发明的说明,其本身并没有特定的意义。例如:所述客户端下载800kbps码率下的分段文件,检测到网络发生变化,变化后的网络带宽符合2000kbps码率,则所述客户端下载2000kbps码率下对应的分段文件。When detecting the change of the network bandwidth, the client determines the first code rate corresponding to the changed network bandwidth according to the downloaded index file, and determines the sub-segment data of the segment file of the multimedia data currently being downloaded. The first code rate is a code rate corresponding to the changed network bandwidth. The description of the use of "first" herein is merely for the purpose of facilitating the description of the present invention, and does not have a specific meaning in itself. For example, the client downloads a segment file at a code rate of 800 kbps, detects that the network changes, and the changed network bandwidth conforms to a code rate of 2000 kbps, and the client downloads a segment file corresponding to a code rate of 2000 kbps.
步骤S20,所述客户端监控所确定的子分段数据的边界标识;Step S20, the client monitors the boundary identifier of the determined sub-segment data;
所述边界标识为分段文件中用于判断子分段数据范围的标记。可选地,所述边界标识可以包括起始标识和结束标识,在本实施例中,当前正在下载的子分段数据的边界标识为该子分段数据的结束标识。The boundary identifier is a flag in the segment file for determining the range of the sub-segment data. Optionally, the boundary identifier may include a start identifier and an end identifier. In this embodiment, a boundary identifier of the sub-segment data currently being downloaded is an end identifier of the sub-segment data.
步骤S30,所述客户端在下载的数据达到所述边界标识时,从服务器下载所述第一码率下对应分段文件的下一子分段数据。Step S30, the client downloads the next sub-segment data of the corresponding segment file in the first code rate from the server when the downloaded data reaches the boundary identifier.
所述客户端在下载的数据达到所述边界标识时,确定当前下载的子分 段数据已下载完成,所述客户端根据已下载的索引文件从服务器下载所述第一码率下对应分段文件的下一子分段数据。此处的下一子分段数据,为按照索引文件内设定的次序当前已下载完成的子分段数据对应的下一子分段数据。具体的,例如:在800kbps码率下的第一子子分段数据下载完成时,进行码率切换,下载2000kbps码率下的第二子分段数据,而2000kbps码率下的第一子分段数据与800kbps码率下的第一子分段数据是对应的,仅码率不同。Determining, by the client, the currently downloaded sub-score when the downloaded data reaches the boundary identifier The segment data has been downloaded, and the client downloads the next sub-segment data of the corresponding segment file at the first code rate from the server according to the downloaded index file. The next sub-segment data here is the next sub-segment data corresponding to the sub-segment data that has been downloaded in the order set in the index file. Specifically, for example, when the first sub-sub-segment data download at the 800 kbps code rate is completed, the code rate switching is performed, and the second sub-segment data at the 2000 kbps code rate is downloaded, and the first sub-segment at the 2000 kbps code rate is performed. The segment data corresponds to the first sub-segment data at a code rate of 800 kbps, and only the code rates are different.
作为一种可选实施方式,所述客户端还可以在所述第一码率下对应分段文件的下一子分段数据下载完成时,按照所述第一码率播放所下载的子分段数据。As an optional implementation manner, the client may further play the downloaded sub-segment according to the first code rate when the downloading of the next sub-segment data of the corresponding segment file is completed at the first code rate. Segment data.
本实施例在下载多媒体数据时,对网络带宽进行监控,在检测到网络带宽发生变化时,等待当前下载的多媒体数据的分段文件的子分段数据下载完成,即可切换至另一码率,下载另一码率下对应的分段文件的下一子分段数据。无需等待当前正在下载的分段文件全部下载完成,即可快速进行码率切换。同时根据变化后的网络带宽确定对应的码率,实现了根据网络带宽快速切换码率进行多媒体文件的下载,提高了码率切换效率。In this embodiment, when the multimedia data is downloaded, the network bandwidth is monitored. When the network bandwidth is detected to change, the sub-segment data of the segment file of the currently downloaded multimedia data is downloaded, and the code rate can be switched to another code rate. Download the next sub-segment data of the corresponding segment file under another bit rate. You can quickly switch between code rates without waiting for the entire downloaded segment file to be downloaded. At the same time, the corresponding code rate is determined according to the changed network bandwidth, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the code rate switching efficiency.
参照图2,图2为本发明多媒体数据下载方法的第二实施例的流程示意图。基于上述多媒体数据下载方法的第一实施例,所述步骤S30包括:Referring to FIG. 2, FIG. 2 is a schematic flowchart diagram of a second embodiment of a multimedia data downloading method according to the present invention. Based on the first embodiment of the foregoing multimedia data downloading method, the step S30 includes:
步骤S31,所述客户端在下载的数据达到所述边界标识时,计算所述第一码率下对应分段文件的下一子分段数据的位置;Step S31, the client calculates a location of the next sub-segment data of the corresponding segment file in the first code rate when the downloaded data reaches the boundary identifier;
所述客户端在下载的数据达到所述边界标识时,根据已下载的索引文件计算所述第一码率下对应分段文件的下一子分段数据的位置。应当理解的是,所述多媒体文件的索引文件中保存有各个子分段数据的位置信息。所述位置信息为所述子分段数据存储的位置信息。When the downloaded data reaches the boundary identifier, the client calculates the location of the next sub-segment data of the corresponding segment file at the first code rate according to the downloaded index file. It should be understood that the location file of each sub-segment data is stored in the index file of the multimedia file. The location information is location information stored by the sub-segment data.
步骤S32,所述客户端根据计算出的位置信息生成所述第一请求; Step S32, the client generates the first request according to the calculated location information;
所述客户端根据计算出的位置信息生成所述第一请求,用以从所述服务器下载所述第一码率下对应分段文件的下一子分段数据。或者,所述客户端也可以将计算出的位置信息添加至所述第一请求中,并将含有所述位置信息的第一请求发送至服务器。The client generates the first request according to the calculated location information, to download, from the server, the next sub-segment data of the corresponding segment file in the first code rate. Alternatively, the client may also add the calculated location information to the first request and send a first request containing the location information to the server.
步骤S33,所述客户端将所述第一请求发送至所述服务器,并接收所述服务器返回的所述第一码率下对应分段文件的下一子分段数据。Step S33: The client sends the first request to the server, and receives the next sub-segment data of the corresponding segment file in the first code rate returned by the server.
所述客户端将所述第一请求发送至所述服务器,以供所述服务器在接收到所述第一请求时,返回所述第一码率下对应分段文件的下一子分段数据。所述客户端接收所述服务器返回的子分段数据。可选地,所述服务器可以在接收到所述第一请求时,先将所述第一码率下对应分段文件的下一子分段文件对应的解码信息发送给所述客户端,再将对应的子分段数据发送给所述客户端。Sending, by the client, the first request to the server, for the server to return the next sub-segment data of the corresponding segment file at the first code rate when receiving the first request . The client receives sub-segment data returned by the server. Optionally, the server may first send the decoding information corresponding to the next sub-segment file of the corresponding segment file in the first code rate to the client, when the first request is received, and then The corresponding sub-segment data is sent to the client.
本实施例通过计算网络带宽发生变化后对应的码率下的下一子分段数据的位置,根据位置信息生成第一请求,并将生成的第一请求发送至服务器,以从服务器下载对应位置的子分段数据,实现了根据网络带宽在子分段数据之间快速进行切换码率,提高了码率切换效率。In this embodiment, by calculating a location of the next sub-segment data under the corresponding code rate after the network bandwidth changes, a first request is generated according to the location information, and the generated first request is sent to the server to download the corresponding location from the server. The sub-segment data realizes fast switching of the code rate between the sub-segment data according to the network bandwidth, and improves the rate switching efficiency.
参照图3,图3为本发明多媒体数据下载方法的第三实施例的流程示意图。基于上述多媒体数据下载方法的第一实施例,所述步骤S10之前,还包括:Referring to FIG. 3, FIG. 3 is a schematic flowchart diagram of a third embodiment of a multimedia data downloading method according to the present invention. Based on the first embodiment of the foregoing multimedia data downloading method, before the step S10, the method further includes:
步骤S11,所述客户端发送第二请求至所述服务器,以从所述服务器下载所述多媒体数据的索引文件;Step S11, the client sends a second request to the server to download an index file of the multimedia data from the server;
步骤S12,所述客户端接收所述服务器返回的索引文件;Step S12, the client receives an index file returned by the server;
步骤S13,所述客户端根据所述索引文件依次发送请求至所述服务器,并接收所述服务器返回的第二码率下的各分段文件。Step S13: The client sequentially sends a request to the server according to the index file, and receives each segment file under the second code rate returned by the server.
所述索引文件内包括所述多媒体文件的各个码率下的分段文件的位置 信息、各个分段文件的子分段数据的位置信息以及各个码率对应的网络带宽数据。所述客户端在下载多媒体文件时,首先发送第二请求至所述服务器,以从所述服务器下载所述多媒体数据的索引文件;所述客户端接收所述服务器返回的索引文件;所述客户端根据所述索引文件依次发送请求至所述服务器,以从所述服务器依次下载所述多媒体文件的各分段文件;所述客户端接收所述服务器返回的第二码率下的各分段文件,并按照第二码率进行播放。Included in the index file, the location of the segment file under each code rate of the multimedia file Information, location information of sub-segment data of each segment file, and network bandwidth data corresponding to each code rate. When downloading the multimedia file, the client first sends a second request to the server to download an index file of the multimedia data from the server; the client receives an index file returned by the server; the client The terminal sequentially sends a request to the server according to the index file to sequentially download each segment file of the multimedia file from the server; the client receives each segment under the second code rate returned by the server. File and play at the second rate.
本实施例在下载多媒体数据时,先下载多媒体数据的索引文件,根据索引文件依次下载多媒体文件的各分段文件的子分段数据,在下载过程中对网络带宽进行监控,在检测到网络带宽发生变化时,等待当前下载的多媒体数据的分段文件的子分段数据下载完成,即可切换至另一码率,下载另一码率下对应的分段文件的下一子分段数据。无需等待当前正在下载的分段文件全部下载完成,即可进行码率切换。同时根据变化后的网络带宽确定对应的码率,实现了根据网络带宽快速切换码率进行多媒体文件的下载,提高了码率切换效率。In the embodiment, when downloading the multimedia data, the index file of the multimedia data is first downloaded, and the sub-segment data of each segment file of the multimedia file is sequentially downloaded according to the index file, and the network bandwidth is monitored during the downloading process, and the network bandwidth is detected. When the change occurs, the sub-segment data of the segment file waiting for the currently downloaded multimedia data is downloaded, and then the code rate is switched to another code rate, and the next sub-segment data of the corresponding segment file under another code rate is downloaded. The rate switching can be performed without waiting for all the segment files currently being downloaded to be downloaded. At the same time, the corresponding code rate is determined according to the changed network bandwidth, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the code rate switching efficiency.
参照图4,图4为本发明多媒体数据下载方法的第四实施例的流程示意图。基于上述多媒体数据下载方法的第一实施例,所述步骤S11之前,还包括:Referring to FIG. 4, FIG. 4 is a schematic flowchart diagram of a fourth embodiment of a multimedia data downloading method according to the present invention. Based on the first embodiment of the foregoing multimedia data downloading method, before the step S11, the method further includes:
步骤S100,所述服务器根据所述多媒体数据生成索引文件和多个分段文件;Step S100, the server generates an index file and a plurality of segment files according to the multimedia data;
步骤S101,所述服务器在各个分段文件的起始位置添加对应的解码信息;Step S101, the server adds corresponding decoding information at a starting position of each segment file;
步骤S102,所述服务器根据各个所述解码信息标识出对应分段文件内可以进行码率切换的子分段数据;Step S102, the server identifies, according to each of the decoding information, sub-segment data that can be code rate switched in the corresponding segment file;
步骤S103,所述服务器将各子分段数据的位置信息添加至所述索引文 件中,以供客户端下载所述多媒体数据时根据网络带宽在子分段数据之间进行码率切换。Step S103, the server adds location information of each sub-segment data to the index file. In the piece, when the client downloads the multimedia data, the code rate is switched between the sub-segment data according to the network bandwidth.
所述服务器根据所述多媒体数据生成索引文件和多个分段文件;所述服务器在各个分段文件的起始位置添加对应的解码信息;所述服务器分析各个分段文件,根据各个所述解码信息标识出对应分段文件内可以进行码率切换的子分段数据;所述服务器将各子分段数据的位置信息添加至所述索引文件中,以供客户端下载所述多媒体数据时根据网络带宽在子分段数据之间进行码率切换。The server generates an index file and a plurality of segment files according to the multimedia data; the server adds corresponding decoding information at a starting position of each segment file; the server analyzes each segment file, and decodes according to each The information identifies the sub-segment data that can be code-switched in the corresponding segment file; the server adds the location information of each sub-segment data to the index file, so that the client downloads the multimedia data according to The network bandwidth performs rate switching between sub-segment data.
作为一种可选实施方式,所述服务器在接收到客户端的多媒体数据下载请求时,根据接收到的请求将对应的多媒体数据发送给所述客户端。As an optional implementation manner, when receiving the multimedia data download request of the client, the server sends the corresponding multimedia data to the client according to the received request.
本实施例通过服务器将多媒体数据生成索引文件和多个分段文件,并在分段文件中标识出可以进行码率切换的子分段单元,并将各个子分段单元的位置信息添加至索引文件中。以使得在下载多媒体数据时,对网络带宽进行监控,在检测到网络带宽发生变化时,等待当前下载的多媒体数据的分段文件的子分段数据下载完成,即可切换至另一码率,下载另一码率下对应的分段文件的下一子分段数据。无需等待当前正在下载的分段文件全部下载完成,即可进行码率切换。同时根据变化后的网络带宽确定对应的码率,实现了根据网络带宽快速切换码率进行多媒体文件的下载,提高了码率切换效率。In this embodiment, the server generates the index file and the plurality of segment files by using the multimedia data, and identifies the sub-segment unit that can perform rate switching in the segment file, and adds the location information of each sub-segment unit to the index. In the file. So that when the multimedia data is downloaded, the network bandwidth is monitored. When the network bandwidth is detected to change, the sub-segment data of the segment file of the currently downloaded multimedia data is downloaded, and the code rate can be switched to another code rate. Download the next sub-segment data of the corresponding segment file under another bit rate. The rate switching can be performed without waiting for all the segment files currently being downloaded to be downloaded. At the same time, the corresponding code rate is determined according to the changed network bandwidth, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the code rate switching efficiency.
本发明进一步提供一种客户端。The invention further provides a client.
参照图5,图5为本发明客户端的第一实施例的功能模块示意图。Referring to FIG. 5, FIG. 5 is a schematic diagram of functional modules of a first embodiment of a client according to the present invention.
在本实施例中,所述客户端包括:确定模块10、监控模块20及下载模块30。In this embodiment, the client includes: a determining module 10, a monitoring module 20, and a downloading module 30.
所述确定模块10,配置为在检测到网络带宽发生变化时,确定变化后的网络带宽对应的第一码率,并确定当前正在下载的多媒体数据的分段文 件的子分段数据;The determining module 10 is configured to determine a first code rate corresponding to the changed network bandwidth when detecting that the network bandwidth changes, and determine a segmented text of the multimedia data currently being downloaded. Sub-segment data of the piece;
所述客户端为用于多媒体数据下载的终端设备,所述客户端可以是诸如移动电话、智能电话、笔记本电脑、PDA、PAD、PMP等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。The client is a terminal device for multimedia data downloading, and the client may be a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a PDA, a PAD, a PMP, etc., and a digital TV, a desktop computer, or the like. Fixed terminal.
所述多媒体数据存储在服务器,以供客户端进行下载。所述多媒体数据包括索引文件和不同码率下的多个分段文件。在本发明实施例中,每个所述分段文件包括多个子分段数据。The multimedia data is stored on a server for the client to download. The multimedia data includes an index file and a plurality of segment files at different code rates. In an embodiment of the invention, each of the segment files includes a plurality of sub-segment data.
所述客户端在检测到网络带宽发生变化时,根据已下载的索引文件确定变化后的网络带宽对应的第一码率,并确定当前正在下载的多媒体数据的分段文件的子分段数据。所述第一码率为变化后的网络带宽对应的码率,此处使用“第一”的描述仅为了有利于本发明的说明,其本身并没有特定的意义。例如:所述客户端下载800kbps码率下的分段文件,检测到网络发生变化,变化后的网络带宽符合2000kbps码率,则所述客户端下载2000kbps码率下对应的分段文件。When detecting the change of the network bandwidth, the client determines the first code rate corresponding to the changed network bandwidth according to the downloaded index file, and determines the sub-segment data of the segment file of the multimedia data currently being downloaded. The first code rate is a code rate corresponding to the changed network bandwidth. The description of the use of "first" herein is merely for the purpose of facilitating the description of the present invention, and does not have a specific meaning in itself. For example, the client downloads a segment file at a code rate of 800 kbps, detects that the network changes, and the changed network bandwidth conforms to a code rate of 2000 kbps, and the client downloads a segment file corresponding to a code rate of 2000 kbps.
所述监控模块20,配置为监控所确定的子分段数据的边界标识;The monitoring module 20 is configured to monitor a boundary identifier of the determined sub-segment data;
所述边界标识为分段文件中用于判断子分段数据范围的标记。可选地,所述边界标识可以包括起始标识和结束标识,在本实施例中,当前正在下载的子分段数据的边界标识为该子分段数据的结束标识。The boundary identifier is a flag in the segment file for determining the range of the sub-segment data. Optionally, the boundary identifier may include a start identifier and an end identifier. In this embodiment, a boundary identifier of the sub-segment data currently being downloaded is an end identifier of the sub-segment data.
所述下载模块30,配置为在下载的数据达到所述边界标识时,从服务器下载所述第一码率下对应分段文件的下一子分段数据。The downloading module 30 is configured to download the next sub-segment data of the corresponding segment file in the first code rate from the server when the downloaded data reaches the boundary identifier.
所述客户端在下载的数据达到所述边界标识时,确定当前下载的子分段数据已下载完成,所述客户端根据已下载的索引文件从服务器下载所述第一码率下对应分段文件的下一子分段数据。此处的下一子分段数据,为按照索引文件内设定的次序当前已下载完成的子分段数据对应的下一子分段数据。具体的,例如:在800kbps码率下的第一子子分段数据下载完成时, 进行码率切换,下载2000kbps码率下的第二子分段数据,而2000kbps码率下的第一子分段数据与800kbps码率下的第一子分段数据是对应的,仅码率不同。When the downloaded data reaches the boundary identifier, the client determines that the currently downloaded sub-segment data has been downloaded, and the client downloads the corresponding segment at the first code rate from the server according to the downloaded index file. The next sub-segment data of the file. The next sub-segment data here is the next sub-segment data corresponding to the sub-segment data that has been downloaded in the order set in the index file. Specifically, for example, when the first sub-sub-segment data download at the 800 kbps code rate is completed, Perform rate switching to download the second sub-segment data at a rate of 2000 kbps, and the first sub-segment data at a code rate of 2000 kbps corresponds to the first sub-segment data at a code rate of 800 kbps, only the code rate is different. .
作为一种可选实施方式,所述客户端还可以包括播放模块;所述播放模块,配置为在所述第一码率下对应分段文件的下一子分段数据下载完成时,按照所述第一码率播放所下载的子分段数据。As an optional implementation manner, the client may further include a playing module, where the playing module is configured to: when the downloading of the next sub-segment data of the corresponding segment file is completed at the first code rate, according to the The downloaded sub-segment data is played at the first code rate.
在实际应用中,所述确定模块10、监控模块20、下载模块30、播放模块,均可由客户端中的中央处理器(CPU,Central Processing Unit)、微处理器(MPU,Micro Processor Unit)、数字信号处理器(DSP,Digital Signal Processor)、或现场可编程门阵列(FPGA,Field Programmable Gate Array)等实现。In an actual application, the determining module 10, the monitoring module 20, the downloading module 30, and the playing module may all be a central processing unit (CPU), a microprocessor (MPU, a Micro Processor Unit) in the client. Digital signal processor (DSP, Digital Signal Processor), or Field Programmable Gate Array (FPGA) implementation.
本实施例在下载多媒体数据时,对网络带宽进行监控,在检测到网络带宽发生变化时,等待当前下载的多媒体数据的分段文件的子分段数据下载完成,即可切换至另一码率,下载另一码率下对应的分段文件的下一子分段数据。无需等待当前正在下载的分段文件全部下载完成,即可快速进行码率切换。同时根据变化后的网络带宽确定对应的码率,实现了根据网络带宽快速切换码率进行多媒体文件的下载,提高了码率切换效率。In this embodiment, when the multimedia data is downloaded, the network bandwidth is monitored. When the network bandwidth is detected to change, the sub-segment data of the segment file of the currently downloaded multimedia data is downloaded, and the code rate can be switched to another code rate. Download the next sub-segment data of the corresponding segment file under another bit rate. You can quickly switch between code rates without waiting for the entire downloaded segment file to be downloaded. At the same time, the corresponding code rate is determined according to the changed network bandwidth, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the code rate switching efficiency.
参照图6,图6为本发明客户端的第二实施例的功能模块示意图。基于上述客户端的第一实施例,所述下载模块30包括计算单元31、生成单元32和接收单元33;Referring to FIG. 6, FIG. 6 is a schematic diagram of functional modules of a second embodiment of a client according to the present invention. The download module 30 includes a computing unit 31, a generating unit 32, and a receiving unit 33, based on the first embodiment of the client;
计算单元31,配置为在下载的数据达到所述边界标识时,计算所述第一码率下对应分段文件的下一子分段数据的位置;The calculating unit 31 is configured to calculate, when the downloaded data reaches the boundary identifier, a location of the next sub-segment data of the corresponding segment file in the first code rate;
所述客户端在下载的数据达到所述边界标识时,根据已下载的索引文件计算所述第一码率下对应分段文件的下一子分段数据的位置。应当理解的是,所述多媒体文件的索引文件中保存有各个子分段数据的位置信息。 所述位置信息为所述子分段数据存储的位置信息。When the downloaded data reaches the boundary identifier, the client calculates the location of the next sub-segment data of the corresponding segment file at the first code rate according to the downloaded index file. It should be understood that the location file of each sub-segment data is stored in the index file of the multimedia file. The location information is location information stored by the sub-segment data.
生成单元32,配置为根据计算出的位置信息生成所述第一请求;The generating unit 32 is configured to generate the first request according to the calculated location information;
所述客户端根据计算出的位置信息生成所述第一请求,用以从所述服务器下载所述第一码率下对应分段文件的下一子分段数据。或者,所述客户端也可以将计算出的位置信息添加至所述第一请求中,并将含有所述位置信息的第一请求发送至服务器。The client generates the first request according to the calculated location information, to download, from the server, the next sub-segment data of the corresponding segment file in the first code rate. Alternatively, the client may also add the calculated location information to the first request and send a first request containing the location information to the server.
接收单元33,配置为将所述第一请求发送至所述服务器,并接收所述服务器返回的所述第一码率下对应分段文件的下一子分段数据。The receiving unit 33 is configured to send the first request to the server, and receive the next sub-segment data of the corresponding segment file in the first code rate returned by the server.
所述客户端将所述第一请求发送至所述服务器,以供所述服务器在接收到所述第一请求时,返回所述第一码率下对应分段文件的下一子分段数据。所述客户端接收所述服务器返回的子分段数据。可选地,所述服务器可以在接收到所述第一请求时,先将所述第一码率下对应分段文件的下一子分段文件对应的解码信息发送给所述客户端,再将对应的子分段数据发送给所述客户端。Sending, by the client, the first request to the server, for the server to return the next sub-segment data of the corresponding segment file at the first code rate when receiving the first request . The client receives sub-segment data returned by the server. Optionally, the server may first send the decoding information corresponding to the next sub-segment file of the corresponding segment file in the first code rate to the client, when the first request is received, and then The corresponding sub-segment data is sent to the client.
在实际应用中,所述计算单元31、生成单元32和接收单元33;均可由客户端中的CPU、MPU、DSP、或FPGA等实现。In practical applications, the computing unit 31, the generating unit 32, and the receiving unit 33 can all be implemented by a CPU, an MPU, a DSP, an FPGA, or the like in the client.
本实施例通过计算网络带宽发生变化后对应的码率下的下一子分段数据的位置,根据位置信息生成第一请求,并将生成的第一请求发送至服务器,以从服务器下载对应位置的子分段数据,实现了根据网络带宽在子分段数据之间快速进行切换码率,提高了码率切换效率。In this embodiment, by calculating a location of the next sub-segment data under the corresponding code rate after the network bandwidth changes, a first request is generated according to the location information, and the generated first request is sent to the server to download the corresponding location from the server. The sub-segment data realizes fast switching of the code rate between the sub-segment data according to the network bandwidth, and improves the rate switching efficiency.
在一实施例中,所述下载模块30,还配置为发送第二请求至所述服务器,以从所述服务器下载所述多媒体数据的索引文件;In an embodiment, the downloading module 30 is further configured to send a second request to the server to download an index file of the multimedia data from the server;
所述下载模块30,还配置为接收所述服务器返回的索引文件;The downloading module 30 is further configured to receive an index file returned by the server;
所述下载模块30,还配置为根据所述索引文件依次发送请求至所述服务器,并接收所述服务器返回的第二码率下的各分段文件。 The downloading module 30 is further configured to sequentially send a request to the server according to the index file, and receive each segment file under the second code rate returned by the server.
所述索引文件内包括所述多媒体文件的各个码率下的分段文件的位置信息、各个分段文件的子分段数据的位置信息以及各个码率对应的网络带宽数据。所述客户端在下载多媒体文件时,首先发送第二请求至所述服务器,以从所述服务器下载所述多媒体数据的索引文件;所述客户端接收所述服务器返回的索引文件;所述客户端根据所述索引文件依次发送请求至所述服务器,以从所述服务器依次下载所述多媒体文件的各分段文件;所述客户端接收所述服务器返回的第二码率下的各分段文件,并按照第二码率进行播放。The index file includes location information of the segment file at each bit rate of the multimedia file, location information of the sub-segment data of each segment file, and network bandwidth data corresponding to each code rate. When downloading the multimedia file, the client first sends a second request to the server to download an index file of the multimedia data from the server; the client receives an index file returned by the server; the client The terminal sequentially sends a request to the server according to the index file to sequentially download each segment file of the multimedia file from the server; the client receives each segment under the second code rate returned by the server. File and play at the second rate.
本实施例在下载多媒体数据时,先下载多媒体数据的索引文件,根据索引文件依次下载多媒体文件的各分段文件的子分段数据,在下载过程中对网络带宽进行监控,在检测到网络带宽发生变化时,等待当前下载的多媒体数据的分段文件的子分段数据下载完成,即可切换至另一码率,下载另一码率下对应的分段文件的下一子分段数据。无需等待当前正在下载的分段文件全部下载完成,即可进行码率切换。同时根据变化后的网络带宽确定对应的码率,实现了根据网络带宽快速切换码率进行多媒体文件的下载,提高了码率切换效率。In the embodiment, when downloading the multimedia data, the index file of the multimedia data is first downloaded, and the sub-segment data of each segment file of the multimedia file is sequentially downloaded according to the index file, and the network bandwidth is monitored during the downloading process, and the network bandwidth is detected. When the change occurs, the sub-segment data of the segment file waiting for the currently downloaded multimedia data is downloaded, and then the code rate is switched to another code rate, and the next sub-segment data of the corresponding segment file under another code rate is downloaded. The rate switching can be performed without waiting for all the segment files currently being downloaded to be downloaded. At the same time, the corresponding code rate is determined according to the changed network bandwidth, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the code rate switching efficiency.
本发明进一步提供一种服务器。The invention further provides a server.
参照图7,图7为本发明服务器的较佳实施例的功能模块示意图。Referring to FIG. 7, FIG. 7 is a schematic diagram of functional modules of a preferred embodiment of a server according to the present invention.
在本实施例中,所述服务器包括:生成模块100、添加模块101及标识模块103;In this embodiment, the server includes: a generating module 100, an adding module 101, and an identifying module 103;
所述生成模块100,配置为根据所述多媒体数据生成索引文件和多个分段文件;The generating module 100 is configured to generate an index file and a plurality of segment files according to the multimedia data;
所述添加模块101,配置为在各个分段文件的起始位置添加对应的解码信息;The adding module 101 is configured to add corresponding decoding information at a starting position of each segment file;
所述标识模块102,配置为根据各个所述解码信息标识出对应分段文件 内可以进行码率切换的子分段数据;The identifier module 102 is configured to identify a corresponding segment file according to each of the decoding information. Sub-segment data in which rate switching can be performed;
所述添加模块102,还配置为将各子分段数据的位置信息添加至所述索引文件中,以供客户端下载所述多媒体数据时根据网络带宽在子分段数据之间进行码率切换。The adding module 102 is further configured to add location information of each sub-segment data to the index file, so that when the client downloads the multimedia data, the code rate is switched between the sub-segment data according to the network bandwidth. .
所述服务器根据所述多媒体数据生成索引文件和多个分段文件;所述服务器在各个分段文件的起始位置添加对应的解码信息;所述服务器分析各个分段文件,根据各个所述解码信息标识出对应分段文件内可以进行码率切换的子分段数据;所述服务器将各子分段数据的位置信息添加至所述索引文件中,以供客户端下载所述多媒体数据时根据网络带宽在子分段数据之间进行码率切换。The server generates an index file and a plurality of segment files according to the multimedia data; the server adds corresponding decoding information at a starting position of each segment file; the server analyzes each segment file, and decodes according to each The information identifies the sub-segment data that can be code-switched in the corresponding segment file; the server adds the location information of each sub-segment data to the index file, so that the client downloads the multimedia data according to The network bandwidth performs rate switching between sub-segment data.
作为一种可选实施方式,所述服务器还可以包括发送模块;所述发送模块,配置为在接收到客户端的多媒体数据下载请求时,根据接收到的请求将对应的多媒体数据发送给所述客户端。As an optional implementation manner, the server may further include a sending module, where the sending module is configured to: when receiving the multimedia data download request of the client, send the corresponding multimedia data to the client according to the received request. end.
在实际应用中,所述生成模块100、添加模块101及标识模块103;均可由位于服务器中的CPU、MPU、DSP、或FPGA等实现。所述服务器还包括的发送模块可以由收发天线来实现。In an actual application, the generating module 100, the adding module 101, and the identifying module 103 can be implemented by a CPU, an MPU, a DSP, an FPGA, or the like located in the server. The sending module further included in the server may be implemented by a transceiver antenna.
本实施例通过服务器将多媒体数据生成索引文件和多个分段文件,并在分段文件中标识出可以进行码率切换的子分段单元,并将各个子分段单元的位置信息添加至索引文件中。以使得在下载多媒体数据时,对网络带宽进行监控,在检测到网络带宽发生变化时,等待当前下载的多媒体数据的分段文件的子分段数据下载完成,即可切换至另一码率,下载另一码率下对应的分段文件的下一子分段数据。无需等待当前正在下载的分段文件全部下载完成,即可进行码率切换。同时根据变化后的网络带宽确定对应的码率,实现了根据网络带宽快速切换码率进行多媒体文件的下载,提高了码率切换效率。 In this embodiment, the server generates the index file and the plurality of segment files by using the multimedia data, and identifies the sub-segment unit that can perform rate switching in the segment file, and adds the location information of each sub-segment unit to the index. In the file. So that when the multimedia data is downloaded, the network bandwidth is monitored. When the network bandwidth is detected to change, the sub-segment data of the segment file of the currently downloaded multimedia data is downloaded, and the code rate can be switched to another code rate. Download the next sub-segment data of the corresponding segment file under another bit rate. The rate switching can be performed without waiting for all the segment files currently being downloaded to be downloaded. At the same time, the corresponding code rate is determined according to the changed network bandwidth, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the code rate switching efficiency.
本发明进一步提供一种多媒体数据下载系统。The invention further provides a multimedia data downloading system.
参照图8,图8为本发明多媒体数据下载系统的较佳实施例的功能模块示意图。Referring to FIG. 8, FIG. 8 is a schematic diagram of functional modules of a multimedia data download system according to a preferred embodiment of the present invention.
在本实施例中,所述多媒体数据下载系统包括如上所述的客户端和如上所述的服务器。所述客户端和所述服务器的具体特征参照上述实施例,由于本多媒体数据采用了上述所有实施例的全部技术方案,因此至少具有上述实施例的技术方案所带来的所有有益效果,在此不再一一赘述。In this embodiment, the multimedia data download system includes a client as described above and a server as described above. The specific features of the client and the server are referred to the foregoing embodiments. Since all the technical solutions of all the foregoing embodiments are used in the present multimedia data, at least all the beneficial effects brought by the technical solutions of the foregoing embodiments are provided. I will not repeat them one by one.
本发明实施例还记载了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述各个实施例所述的多媒体数据下载方法。The embodiment of the invention further describes a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the multimedia data downloading method described in the foregoing embodiments.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes those elements. It also includes other elements that are not explicitly listed, or elements that are inherent to such a process, method, article, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。 Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.
工业实用性Industrial applicability
本发明实施例中,在下载多媒体数据时,对网络带宽进行监控,在检测到网络带宽发生变化时,等待当前下载的多媒体数据的分段文件的子分段数据下载完成,即可切换至另一码率,下载另一码率下对应的分段文件的下一子分段数据,这样,无需等待当前正在下载的分段文件全部下载完成,即可快速进行码率切换;同时根据变化后的网络带宽确定对应的码率,实现了根据网络带宽快速切换码率进行多媒体文件的下载,提高了码率切换效率。 In the embodiment of the present invention, when the multimedia data is downloaded, the network bandwidth is monitored. When the network bandwidth is detected to change, the sub-segment data of the segment file of the currently downloaded multimedia data is downloaded, and the switch can be switched to another. One bit rate, download the next sub-segment data of the corresponding segment file under another bit rate, so that the code rate switching can be quickly performed without waiting for all the segment files currently being downloaded to be completely downloaded; The network bandwidth determines the corresponding code rate, and the multimedia file is downloaded according to the fast switching rate of the network bandwidth, thereby improving the rate switching efficiency.

Claims (12)

  1. 一种多媒体数据下载方法,所述方法包括:A multimedia data downloading method, the method comprising:
    客户端在检测到网络带宽发生变化时,确定变化后的网络带宽对应的第一码率,并确定当前正在下载的多媒体数据的分段文件的子分段数据;When detecting that the network bandwidth changes, the client determines a first code rate corresponding to the changed network bandwidth, and determines sub-segment data of the segment file of the multimedia data currently being downloaded;
    所述客户端监控所确定的子分段数据的边界标识;The client monitors the boundary identifier of the determined sub-segment data;
    所述客户端在下载的数据达到所述边界标识时,从服务器下载所述第一码率下对应分段文件的下一子分段数据。When the downloaded data reaches the boundary identifier, the client downloads the next sub-segment data of the corresponding segment file at the first code rate from the server.
  2. 如权利要求1所述的多媒体数据下载方法,其中,所述客户端在下载的数据达到所述边界标识时,从服务器下载所述第一码率下对应分段文件的下一子分段数据的步骤包括:The multimedia data downloading method according to claim 1, wherein the client downloads the next sub-segment data of the corresponding segment file at the first code rate from the server when the downloaded data reaches the boundary identifier The steps include:
    所述客户端在下载的数据达到所述边界标识时,计算所述第一码率下对应分段文件的下一子分段数据的位置;When the downloaded data reaches the boundary identifier, the client calculates a location of the next sub-segment data of the corresponding segment file in the first code rate;
    所述客户端根据计算出的位置信息生成所述第一请求;The client generates the first request according to the calculated location information;
    所述客户端将所述第一请求发送至所述服务器,并接收所述服务器返回的所述第一码率下对应分段文件的下一子分段数据。The client sends the first request to the server, and receives the next sub-segment data of the corresponding segment file under the first code rate returned by the server.
  3. 如权利要求1所述的多媒体数据下载方法,其中,所述客户端在检测到网络带宽发生变化时,确定变化后的网络带宽对应的第一码率,并确定当前正在下载的多媒体数据的分段文件的子分段数据的步骤之前,还包括:The multimedia data downloading method according to claim 1, wherein the client determines a first code rate corresponding to the changed network bandwidth when detecting a change in the network bandwidth, and determines a score of the multimedia data currently being downloaded. Before the step of sub-segment data of the segment file, it also includes:
    所述客户端发送第二请求至所述服务器,以从所述服务器下载所述多媒体数据的索引文件;Sending, by the client, a second request to the server, to download an index file of the multimedia data from the server;
    所述客户端接收所述服务器返回的索引文件;The client receives an index file returned by the server;
    所述客户端根据所述索引文件依次发送请求至所述服务器,并接收所述服务器返回的第二码率下的各分段文件。The client sequentially sends a request to the server according to the index file, and receives each segment file under the second code rate returned by the server.
  4. 如权利要求1至3任一项所述的多媒体数据下载方法,其中,所述 客户端在下载的数据达到所述边界标识时,从服务器下载所述第一码率下对应分段文件的下一子分段数据的步骤之后,还包括:The multimedia data downloading method according to any one of claims 1 to 3, wherein After the step of downloading, by the server, the next sub-segment data of the corresponding segment file in the first code rate, the method further includes:
    所述客户端在所述第一码率下对应分段文件的下一子分段数据下载完成时,按照所述第一码率播放所下载的子分段数据。When the client downloads the next sub-segment data corresponding to the segment file at the first code rate, the client plays the downloaded sub-segment data according to the first code rate.
  5. 如权利要求3所述的多媒体数据下载方法,其中,所述客户端发送第二请求至所述服务器,以从所述服务器下载所述多媒体数据的索引文件的步骤之前,所述方法还包括:The multimedia data downloading method according to claim 3, wherein before the step of the client transmitting the second request to the server to download the index file of the multimedia data from the server, the method further comprises:
    所述服务器根据所述多媒体数据生成索引文件和多个分段文件;The server generates an index file and a plurality of segment files according to the multimedia data;
    所述服务器在各个分段文件的起始位置添加对应的解码信息;The server adds corresponding decoding information at a starting position of each segment file;
    所述服务器根据各个所述解码信息标识出对应分段文件内可以进行码率切换的子分段数据;Determining, by the server, the sub-segment data that can be code rate switched in the corresponding segment file according to each of the decoding information;
    所述服务器将各子分段数据的位置信息添加至所述索引文件中,以供客户端下载所述多媒体数据时根据网络带宽在子分段数据之间进行码率切换。The server adds the location information of each sub-segment data to the index file, so that the client performs rate switching between the sub-segment data according to the network bandwidth when the client downloads the multimedia data.
  6. 一种客户端,所述客户端包括:A client, the client comprising:
    确定模块,配置为在检测到网络带宽发生变化时,确定变化后的网络带宽对应的第一码率,并确定当前正在下载的多媒体数据的分段文件的子分段数据;a determining module, configured to determine a first code rate corresponding to the changed network bandwidth when detecting a change in network bandwidth, and determine sub-segment data of the segment file of the multimedia data currently being downloaded;
    监控模块,配置为监控所确定的子分段数据的边界标识;a monitoring module configured to monitor a boundary identifier of the determined sub-segment data;
    下载模块,配置为在下载的数据达到所述边界标识时,从服务器下载所述第一码率下对应分段文件的下一子分段数据。And a downloading module, configured to download the next sub-segment data of the corresponding segment file in the first code rate from the server when the downloaded data reaches the boundary identifier.
  7. 如权利要求6所述的客户端,其中,所述下载模块包括计算单元、生成单元和接收单元;The client of claim 6, wherein the downloading module comprises a computing unit, a generating unit, and a receiving unit;
    计算单元,配置为在下载的数据达到所述边界标识时,计算所述第一码率下对应分段文件的下一子分段数据的位置; a calculating unit, configured to calculate, when the downloaded data reaches the boundary identifier, a location of a next sub-segment data of the corresponding segment file in the first code rate;
    生成单元,配置为根据计算出的位置信息生成所述第一请求;a generating unit, configured to generate the first request according to the calculated location information;
    接收单元,配置为将所述第一请求发送至所述服务器,并接收所述服务器返回的所述第一码率下对应分段文件的下一子分段数据。The receiving unit is configured to send the first request to the server, and receive the next sub-segment data of the corresponding segment file in the first code rate returned by the server.
  8. 如权利要求6所述的客户端,其中,所述下载模块,还配置为发送第二请求至所述服务器,以从所述服务器下载所述多媒体数据的索引文件;The client according to claim 6, wherein the downloading module is further configured to send a second request to the server to download an index file of the multimedia data from the server;
    所述下载模块,还配置为接收所述服务器返回的索引文件;The downloading module is further configured to receive an index file returned by the server;
    所述下载模块,还配置为根据所述索引文件依次发送请求至所述服务器,并接收所述服务器返回的第二码率下的各分段文件。The downloading module is further configured to sequentially send a request to the server according to the index file, and receive each segment file under the second code rate returned by the server.
  9. 如权利要求6所述的客户端,其中,所述客户端还包括播放模块;The client of claim 6, wherein the client further comprises a play module;
    所述播放模块,配置为在所述第一码率下对应分段文件的下一子分段数据下载完成时,按照所述第一码率播放所下载的子分段数据。The playing module is configured to play the downloaded sub-segment data according to the first code rate when the downloading of the next sub-segment data of the corresponding segment file is completed at the first code rate.
  10. 一种服务器,所述服务器包括:A server, the server comprising:
    生成模块,配置为根据所述多媒体数据生成索引文件和多个分段文件;Generating a module, configured to generate an index file and a plurality of segment files according to the multimedia data;
    添加模块,配置为在各个分段文件的起始位置添加对应的解码信息;Adding a module, configured to add corresponding decoding information at a starting position of each segment file;
    标识模块,配置为根据各个所述解码信息标识出对应分段文件内可以进行码率切换的子分段数据;The identifier module is configured to identify, according to each of the decoding information, sub-segment data that can be code rate switched in the corresponding segment file;
    所述添加模块,还配置为将各子分段数据的位置信息添加至所述索引文件中,以供客户端下载所述多媒体数据时根据网络带宽在子分段数据之间进行码率切换。The adding module is further configured to add location information of each sub-segment data to the index file, so that when the client downloads the multimedia data, the rate switching is performed between the sub-segment data according to the network bandwidth.
  11. 一种多媒体数据下载系统,所述多媒体数据下载系统包括如权利要求6至9任一项所述的客户端以及如权利要求10所述的服务器。A multimedia data downloading system, the multimedia data downloading system comprising the client according to any one of claims 6 to 9 and the server according to claim 10.
  12. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至5任一项所述的方法。 A computer storage medium having stored therein computer executable instructions for performing the method of any one of claims 1 to 5.
PCT/CN2016/105164 2015-11-10 2016-11-09 Multi-media data download method, client, server, system and storage medium WO2017080450A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510762818.1A CN106686036A (en) 2015-11-10 2015-11-10 Multimedia data downloading method and system, client and server
CN201510762818.1 2015-11-10

Publications (1)

Publication Number Publication Date
WO2017080450A1 true WO2017080450A1 (en) 2017-05-18

Family

ID=58694532

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/105164 WO2017080450A1 (en) 2015-11-10 2016-11-09 Multi-media data download method, client, server, system and storage medium

Country Status (2)

Country Link
CN (1) CN106686036A (en)
WO (1) WO2017080450A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110121100A (en) * 2019-05-28 2019-08-13 平安科技(深圳)有限公司 Method for down loading, device, terminal and the computer readable storage medium of media file
CN117560525A (en) * 2024-01-11 2024-02-13 腾讯科技(深圳)有限公司 Data processing method, device, equipment and readable storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110213653B (en) * 2019-06-14 2022-03-04 北京奇艺世纪科技有限公司 Method and device for playing video
CN110324681B (en) * 2019-07-08 2021-05-25 广州酷狗计算机科技有限公司 Slicing method, device, storage medium and transmission system of multimedia data
CN113259729B (en) * 2020-02-10 2023-07-14 北京字节跳动网络技术有限公司 Data switching method, server, system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145933A (en) * 2007-10-26 2008-03-19 北大方正集团有限公司 Transmission method, receiving method and corresponding device for distribution system and media data
CN102761524A (en) * 2011-04-27 2012-10-31 中兴通讯股份有限公司 Steaming media storage and playing method and corresponding system
US20130282917A1 (en) * 2012-04-24 2013-10-24 Vid Scale, Inc. Method and apparatus for smooth stream switching in mpeg/3gpp-dash
CN105027567A (en) * 2013-01-07 2015-11-04 诺基亚技术有限公司 Method and apparatus for video coding and decoding

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145933A (en) * 2007-10-26 2008-03-19 北大方正集团有限公司 Transmission method, receiving method and corresponding device for distribution system and media data
CN102761524A (en) * 2011-04-27 2012-10-31 中兴通讯股份有限公司 Steaming media storage and playing method and corresponding system
US20130282917A1 (en) * 2012-04-24 2013-10-24 Vid Scale, Inc. Method and apparatus for smooth stream switching in mpeg/3gpp-dash
CN105027567A (en) * 2013-01-07 2015-11-04 诺基亚技术有限公司 Method and apparatus for video coding and decoding

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110121100A (en) * 2019-05-28 2019-08-13 平安科技(深圳)有限公司 Method for down loading, device, terminal and the computer readable storage medium of media file
CN110121100B (en) * 2019-05-28 2022-03-15 平安科技(深圳)有限公司 Method, device, terminal and computer readable storage medium for downloading media file
CN117560525A (en) * 2024-01-11 2024-02-13 腾讯科技(深圳)有限公司 Data processing method, device, equipment and readable storage medium
CN117560525B (en) * 2024-01-11 2024-04-19 腾讯科技(深圳)有限公司 Data processing method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN106686036A (en) 2017-05-17

Similar Documents

Publication Publication Date Title
WO2017080450A1 (en) Multi-media data download method, client, server, system and storage medium
US10943272B2 (en) Smart broadcasting device
US20220239760A1 (en) Message pushing method for a virtual gift and electronic device
US9706371B2 (en) Push notification middleware
KR101832533B1 (en) Reputation checking obtained files
EP2901660B1 (en) Termininal interaction methods and related devices and systems
WO2019047613A1 (en) Verification system, method and device
US20150264095A1 (en) Web service push method and web service push server and web service providing server performing same
US8606955B1 (en) Pause-button content rendering
CN111258602B (en) Information updating method and device
US20140250158A1 (en) Method and device for obtaining file
EP2747380B1 (en) Data processing method, access checking equipment and system thereof
CN104967647A (en) Message push method and apparatus
CN111784380B (en) Advertisement putting attribution method and device
CN110557689B (en) Video playing method and device
CA2787413A1 (en) Bandwidth constrained auctions
WO2017197888A1 (en) Information sharing method, intelligent terminal, and system
EP3313041B1 (en) Application download method and device
WO2018000646A1 (en) Video download method and apparatus, and electronic device
WO2017193544A1 (en) Method, device, and electronic apparatus for downloading resource
US20170063956A1 (en) Coordinating state changes among multiple media devices
WO2019242279A1 (en) Message processing method and device
WO2012159291A1 (en) Method for identifying type of terminal and wireless access network device
US20140068006A1 (en) Method, apparatus and system for providing content
CN113961162A (en) Screen projection control method, screen projection sending end, screen projection receiving end and screen projection system

Legal Events

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

Ref document number: 16863626

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: 16863626

Country of ref document: EP

Kind code of ref document: A1