CN106303577B - Download the method and device of Streaming Media - Google Patents

Download the method and device of Streaming Media Download PDF

Info

Publication number
CN106303577B
CN106303577B CN201510312810.5A CN201510312810A CN106303577B CN 106303577 B CN106303577 B CN 106303577B CN 201510312810 A CN201510312810 A CN 201510312810A CN 106303577 B CN106303577 B CN 106303577B
Authority
CN
China
Prior art keywords
file
newest
segment
describes
failure
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510312810.5A
Other languages
Chinese (zh)
Other versions
CN106303577A (en
Inventor
赖昆盛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Guangzhou Dongjing Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Dongjing Computer Technology Co Ltd filed Critical Guangzhou Dongjing Computer Technology Co Ltd
Priority to CN201510312810.5A priority Critical patent/CN106303577B/en
Priority to PCT/CN2016/078992 priority patent/WO2016197691A1/en
Publication of CN106303577A publication Critical patent/CN106303577A/en
Application granted granted Critical
Publication of CN106303577B publication Critical patent/CN106303577B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/235Processing of additional data, e.g. scrambling of additional data or processing content descriptors
    • H04N21/2353Processing of additional data, e.g. scrambling of additional data or processing content descriptors specifically adapted to content descriptors, e.g. coding, compressing or processing of metadata
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/232Content retrieval operation locally within server, e.g. reading video streams from disk arrays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/235Processing of additional data, e.g. scrambling of additional data or processing content descriptors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2407Monitoring of transmitted content, e.g. distribution time, number of downloads
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44209Monitoring of downstream path of the transmission network originating from a server, e.g. bandwidth variations of a wireless network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/2312Data placement on disk arrays
    • H04N21/2318Data placement on disk arrays using striping

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Library & Information Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses the method and devices of downloading Streaming Media, for downloading the Streaming Media of m3u8 format, which comprises if the current m3u8 for downloading Streaming Media describes file failure, obtain the corresponding newest m3u8 of Streaming Media and describe file;The newest m3u8 m3u8 for describing file and failure is described into file progress TS segment information matches, if successful match, the newest address information of the TS segment for the failed download for obtaining Streaming Media in file is described from newest m3u8;Continue to download the TS segment of the failed download according to newest address information.The present invention describes file progress TS segment information matches by the m3u8 that newest m3u8 is described file and failure, to guarantee to describe the TS segment for getting failed download in file from newest m3u8, to only be downloaded the TS segment of failed download, avoid re-downloading the TS segment for having downloaded completion and time and bandwidth resources being caused to waste.

Description

Download the method and device of Streaming Media
Technical field
The present invention relates to Internet technical fields, more particularly to the method and device of downloading Streaming Media.
Background technique
With the rapid development of mobile Internet, user obtains the multimedia resources such as video, audio by mobile terminal Demand be increasing.Especially with the continuous improvement of network transmission speed, user also gets over the downloading demand of HD video Come bigger.The HD video that major video website provides at present is based on HLS (HTTP Live Streaming) Streaming Media mostly Play the m3u8 video format of agreement.
The streaming media resource of m3u8 format such as streaming media video is in production, by server compressed video source file It is cut into several small transport stream TSs (Transport Stream) segment, or is TS fragment, each TS segment stores respectively Different address in the server.The storage address of each TS segment that server includes according to the source file, each TS segment when Long message and other relevant description informations generate the corresponding m3u8 of the video source file and describe file (or for m3u8 rope Quotation part).Server provides a user the corresponding m3u8 of the video and describes file address.When user downloads the video, pass through The m3u8 for accessing the video describes file address, obtains m3u8 and describes file, then describes to read out each TS piece in file from m3u8 The corresponding storage address of section, and then downloaded respectively from each storage address by each TS segment.
In the downloading process of streaming media video, the failure of video source file address is prompted sometimes, causes failed download.This It is because m3u8 describes file with certain timeliness, for the protection and security consideration to video copy, server warp The storage address or streaming media video that the corresponding several TS segments of streaming media video can often be changed are cut again.When When the m3u8 of video to be downloaded describes file failure, the newest m3u8 for needing to reacquire the video describes file, to obtain The newest storage address of TS segment wherein included re-downloads each TS segment according to the newest storage address, until entire view Frequency downloading is completed.
In the downloading process of streaming media video it is possible that the case where multiple address failure, and since Streaming Media regards Frequency is general all bigger, requires to describe file according to newest m3u8 after downloading failure each time to re-download TS segment, from And cause the waste of time and bandwidth resources.
Summary of the invention
The embodiment of the invention provides a kind of method and devices for downloading Streaming Media, to solve to work as Streaming Media in the prior art After corresponding m3u8 describes file failure, it has to describe file according to newest m3u8 and re-download TS segment, cause the time The problem of with the wastes of bandwidth resources.
In order to solve the above-mentioned technical problem, the embodiment of the invention discloses following technical solutions:
On the one hand, the present invention provides a kind of method for downloading Streaming Media, the method is used to download the stream of m3u8 format Media, which comprises
If the current m3u8 for downloading Streaming Media describes file failure, it is corresponding newest to obtain the Streaming Media M3u8 describes file;
File progress TS segment information matches are described into the newest m3u8 m3u8 for describing file and failure, if matching Success, the newest address information for the TS segment for describing to obtain the failed download of the Streaming Media in file from the newest m3u8;
Continue to download the TS segment of the failed download according to the newest address information.
Preferably, the m3u8 that the newest m3u8 is described file and failure describes file progress TS piece segment information With including:
If the newest m3u8 describes the TS piece segment information for including in file and the m3u8 of the failure is described in file The correspondence TS piece segment information for including belongs to same TS segment, then confirms successful match.
Preferably, the newest m3u8 describes the TS piece segment information for including in file and the m3u8 of the failure describes file In include correspondence TS piece segment information belong to same TS segment and include:
The newest m3u8 describes the quantity of TS piece segment information for including in file and the m3u8 of the failure describes file In include TS piece segment information quantity it is equal, and
The m3u8 that the newest m3u8 describes the TS clip durations and failure for including in file is described Correspondence TS clip durations it is equal.
Preferably, the TS segment for describing to obtain the failed download of the Streaming Media in file from the newest m3u8 Newest address information includes:
The address information for obtaining the TS segment of the failed download describes index bit in file in the m3u8 of the failure Confidence breath;
The TS segment that the failed download is obtained in file is described according to the index position information from the newest m3u8 Newest address information.
Preferably, the method also includes:
If the Streaming Media failed download, receives the prompt information of failed download, if the prompt information is and works as Preceding m3u8 describes file and fails the corresponding prompt information of this event, then determines that the current m3u8 describes file failure.
On the other hand, the present invention provides a kind of device for downloading Streaming Media, the method is for downloading m3u8 format Streaming Media, described device include:
First acquisition unit fails if describing file for the current m3u8 for downloading Streaming Media, described in acquisition The corresponding newest m3u8 of Streaming Media describes file;
Matching unit, the m3u8 for the newest m3u8 to be described file and failure describe file progress TS piece segment information Matching;
Second acquisition unit describes to obtain the Streaming Media in file if being used for successful match from the newest m3u8 Failed download TS segment newest address information;
Download unit, for continuing to download the TS segment of the failed download according to the newest address information.
Preferably, if the matching unit describes the TS piece segment information for including in file and institute for the newest m3u8 Whether the correspondence TS piece segment information that the m3u8 for stating failure describes to include in file belongs to same TS segment, then confirms successful match.
Preferably, the matching unit is also used to:
If the newest m3u8 describes the quantity for the TS piece segment information for including in file and the m3u8 of the failure is described Whether the quantity for the TS piece segment information for including in file is equal, and
The m3u8 that the newest m3u8 describes the TS clip durations and failure for including in file is described Correspondence TS clip durations it is whether equal, then confirm it is described it is newest description file in include TS piece segment information and the failure The correspondence TS piece segment information that m3u8 describes to include in file belongs to same TS segment.
Preferably, the second acquisition unit is used to obtain the address information of the TS segment for not downloading completion described The m3u8 of failure describes the index position information in file, and describes text from the newest m3u8 according to the index position information The newest address information of the TS segment of the failed download is obtained in part.
Preferably, described device further include:
Receiving unit receives the prompt information of failed download if being used for the Streaming Media failed download;
Judging unit, if being to describe file with current m3u8 to fail that this event is corresponding to be mentioned for the prompt information Show information, then determines that the current m3u8 describes file failure.
The technical solution of the method and device of above-mentioned downloading Streaming Media, when the current m3u8 for downloading Streaming Media describes text When part fails, then obtains the corresponding newest m3u8 of the Streaming Media and describe file, and the newest m3u8 is described into file and is lost The m3u8 of effect describes file progress TS segment information matches and describes to obtain in file from the newest m3u8 if successful match The newest address information of the TS segment of the failed download of the Streaming Media;According to the newest address information continue to download it is described under Carry the TS segment of failure.
This programme describes file progress TS segment information matches by the m3u8 that newest m3u8 is described file and failure, with Guarantee to describe the TS segment for being accurately obtained failed download in file from newest m3u8, so as to only to failed download TS segment is downloaded, and avoids re-downloading the TS segment for having downloaded completion and time and bandwidth resources being caused to waste.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, for those of ordinary skill in the art Speech, without any creative labor, is also possible to obtain other drawings based on these drawings.
Fig. 1 is the flow diagram of one embodiment of the method for present invention downloading Streaming Media;
Fig. 2 is that the m3u8 of streaming media video describes the schematic diagram of file;
Fig. 3 is that the m3u8 of streaming media video describes another schematic diagram of file;
Fig. 4 is the structural schematic diagram of one embodiment of the device of present invention downloading Streaming Media;
Fig. 5 is the structural schematic diagram of another embodiment of the device of present invention downloading Streaming Media.
Specific embodiment
The embodiment of the method for present invention downloading Streaming Media is illustrated first, referring to Fig. 1, for the lower current-carrying matchmaker of the present invention The flow diagram of one embodiment of the method for body, the method are used to download the Streaming Media of m3u8 format, such as high definition view Frequently, audio etc..The present embodiment includes the following steps:
Step 101: if the current m3u8 for downloading Streaming Media describes file failure, it is corresponding to obtain the Streaming Media Newest m3u8 file is described.
During downloading Streaming Media, if caused under Streaming Media since currently used m3u8 describes file failure Failure is carried, then according to the address link information of the Streaming Media such as URL, re-requests the newest m3u8 description for obtaining the Streaming Media File.It is usually using " .m3u8 " as file name suffix that m3u8, which describes file,.
Specifically, can judge currently to make according to the prompt information of failed download if the Streaming Media failed download M3u8 describes whether file fails, and if it is failed download caused by other reasons, is then not belonging to skill of the present invention The situation that art scheme can solve.
Step 102: the newest m3u8 m3u8 for describing file and failure is described into file progress TS segment information matches, If successful match, describe to obtain the TS segment of the failed download of the Streaming Media in file fresh from the newest m3u8 Location information.
Successful match is in order to ensure server does not have streaming media to be cut again, so as to from newest m3u8 The address information for not downloading the TS segment of completion is got in description file.With reference to background technique it is found that sometimes Streaming Media takes Business device may cut again Streaming Media, at this point, newest TS segment and cutting method institute shape before that the Streaming Media includes At TS segment it is different, so that the m3u8 for making newest m3u8 describe file mapped TS segment and failure describes file and is reflected The TS segment penetrated is not also identical, therefore cannot match.
The m3u8 description of the TS piece segment information for including in file and the failure can be described especially by newest m3u8 is judged Whether the correspondence TS piece segment information for including in file belongs to same TS segment, if it is, illustrating successful match.
For example, if newest m3u8 describes the TS piece segment information of the arbitrary number in file and the m3u8 description text of failure The TS piece segment information of reference numeral in part belongs to the same TS segment, then illustrates successful match.
Step 103: being continued to download the TS segment of the failed download according to the newest address information.
The technical solution of the present embodiment, when the current m3u8 for downloading Streaming Media describes file failure, by will most The TS segment that the m3u8 that new m3u8 describes the TS segment and failure that include in file is described in file carries out information matches one by one, when When successful match, illustrate that newest m3u8 describes file and do not cut again to former Streaming Media, this makes it possible to retouch from newest m3u8 The TS segment for being accurately obtained failed download in file is stated, is downloaded, avoids so as to the TS segment only to failed download It re-downloads and has downloaded successful TS segment and time and bandwidth resources is caused to waste.
In other embodiments of the invention, in above-mentioned steps 102, the newest m3u8 can be judged by the following method Whether the TS piece segment information for including in description file describes the corresponding TS piece segment information for including in file with the m3u8 of the failure Belong to same TS segment, and then further determines that the newest m3u8 describes file and the m3u8 of failure describes file progress TS piece Segment information whether successful match:
A): judging that the newest m3u8 describes the quantity of TS piece segment information for including in file and the m3u8 of the failure is retouched Whether the quantity for stating the TS piece segment information for including in file is equal;
B): judging that the newest m3u8 describes the TS clip durations for including in file and the m3u8 of the failure describes file In include correspondence TS clip durations it is whether equal.
If it is above-mentioned a), b) two judging results be it is equal, determine that the newest m3u8 describes to include in file TS piece segment information belongs to same TS segment with the m3u8 of the failure corresponding TS piece segment information for describing to include in file, and then really The newest m3u8 describes file calmly and the m3u8 of failure describes the TS segment information matches of file successfully.
It in other embodiments of the invention, specifically can be according to following methods from the newest m3u8 in above-mentioned steps 103 The newest address information of the TS segment of the failed download of the Streaming Media is obtained in description file:
The address information for obtaining the TS segment of the failed download describes index bit in file in the m3u8 of the failure Confidence breath;
The TS segment that the failed download is obtained in file is described according to the index position information from the newest m3u8 Newest address information.
If successful match in above-mentioned steps 102, illustrate that newest m3u8 describes the m3u8 description text of file and failure The TS segment of part mapping is consistent, therefore the index position information in the information of the TS segment of failed download two description files It is also the same, therefore can be described in file according to the address information of the TS segment of failed download in the m3u8 of the failure Newest address information of the index position information from the newest m3u8 TS segment for describing to get failed download in file.
The method that downloading Streaming Media of the invention is specifically introduced below by the embodiment in a practical application, The m3u8 for being illustrated in figure 2 the streaming media video of a m3u8 format describes the schematic diagram of file, this describes the entitled of file " video.m3u8 ", by can get the quantity of the TS segment that the video includes, duration and the storage address of each section of TS segment in Fig. 2 Information.
By statistics it is found that the video is made of 11 TS segments, " #EXTINF " subsequent number indicates corresponding TS The duration of segment, default units are " second ", and then the next section of actual storage address for the segment, are appointed in normal creation downloading It when business, can be described in file from m3u8, read out the storage address, and according to the storage address under the downloading of corresponding TS segment Come.
If prompting downloading error or failed download, then according to the prompt information of pop-up during downloading the video Such as the similar informations such as " failure of video source file address " or " error of video source file address " can determine currently used retouch State file " video.m3u8 " failure.In other cases, which may be preset letter or number form Information alert code, each keying can all correspond to a kind of event, if the keying is to describe file with current m3u8 to lose The corresponding prompt information of this event is imitated, then determines that the current m3u8 describes file failure.Further by being generated in downloading Prompt information or intermediate file can determine the TS segment of failed download, it is assumed that be serial download in the present embodiment, downloading Malfunction when the 5th TS segment, then the 5th TS segment and later until the 11st TS segment all do not download completion.
It is linked by the address of the video, re-request obtains the corresponding newest m3u8 of the video and describes file, such as Fig. 3 institute Show, it is assumed that the newest m3u8 describes entitled " video_new.m3u8 " of file, by describing file with " video.m3u8 " Compare it is found that the numbers of two description files TS segments for including all are 11, the duration of each TS segment is equal to each other, all for { 8,3,3,3,9,9,9,10,10,10,10 }, unit are " second ", then can confirm that the newest m3u8 describes file and original failure Description file successful match.
In description file video_new.m3u8 since the TS segment (i.e. the 5th) of error, TS piece below is read out The storage address (the i.e. the 5th to the 11st) of section, and replace with the address the 5th to the 11st TS segment in former downloading task Raw address continues to download the video, and original is downloaded successful TS segment (the 1st to the 4th) and can be reused, no longer needs to download.
It is reusable above-mentioned if there is the prompt of the failed download of same type again in subsequent downloading process Method, until all TS segments of the video all download success.
Corresponding with the embodiment of method of above-mentioned downloading Streaming Media, the present invention also provides the devices of downloading Streaming Media Embodiment downloads the structural schematic diagram of one embodiment of the device of Streaming Media, for the present invention referring to fig. 4 for the side of description Just, with function division when describing the device of the application, each functional unit is described respectively.Certainly, in carrying out the present invention may be used It is realized in the same or multiple software and or hardware so that the function of each unit is integrated in.
Described device includes: first acquisition unit 401, matching unit 402, second acquisition unit 403, download unit 404.
Wherein, the first acquisition unit 401 is lost if describing file for the current m3u8 for downloading Streaming Media Effect, then obtain the corresponding newest m3u8 of the Streaming Media and describe file;
The matching unit 402, the m3u8 for the newest m3u8 to be described file and failure describe file progress TS Segment information matches;
The second acquisition unit 403 describes in file described in acquisition if being used for successful match from the newest m3u8 The newest address information of the TS segment of the failed download of Streaming Media;
The download unit 404, for continuing to download the TS segment of the failed download according to the newest address information.
In other embodiments of the invention, if the matching unit 402 describes in file for the newest m3u8 Whether the TS piece segment information for including belongs to same TS with the m3u8 of the failure corresponding TS piece segment information for describing to include in file Segment then confirms successful match.
Preferably, the matching unit 402 is also used to:
If the newest m3u8 describes the quantity for the TS piece segment information for including in file and the m3u8 of the failure is described Whether the quantity for the TS piece segment information for including in file is equal, and
The m3u8 that the newest m3u8 describes the TS clip durations and failure for including in file is described Correspondence TS clip durations it is whether equal, then confirm it is described it is newest description file in include TS piece segment information and the failure The correspondence TS piece segment information that m3u8 describes to include in file belongs to same TS segment.
Specifically, the address information that the second acquisition unit 403 is used to obtain the TS segment for not downloading completion exists The m3u8 of the failure describes the index position information in file, and is retouched according to the index position information from the newest m3u8 State the newest address information that the TS segment of the failed download is obtained in file.
As shown in figure 5, the structural schematic diagram of another embodiment for the device of present invention downloading Streaming Media, described device Further include:
Receiving unit 405 receives the prompt information of failed download if being used for the Streaming Media failed download;
Judging unit 406, if being that describe file this event that fails with current m3u8 corresponding for the prompt information Prompt information, then determine the current m3u8 describe file failure.
The embodiment of the device of above-mentioned downloading Streaming Media, the concrete mode that wherein modules unit executes operation exist It is described in detail in embodiment in relation to this method, no detailed explanation will be given here, and related place is referring to above-mentioned side The part of method embodiment illustrates.
The device of the present embodiment, when the current m3u8 for downloading Streaming Media describes file failure, by will be newest The m3u8 that m3u8 describes the TS segment and failure for including in file describes the TS segment in file and carries out information matches one by one, when When with success, illustrate that newest m3u8 describes file and do not cut again to former Streaming Media, this makes it possible to describe from newest m3u8 It is accurately obtained the TS segment of failed download in file, is downloaded so as to the TS segment only to failed download, avoids weight It is newly downloaded to have downloaded successful TS segment and time and bandwidth resources is caused to waste.
It is required that those skilled in the art can be understood that the technology in the embodiment of the present invention can add by software The mode of common hardware realize that common hardware includes universal integrated circuit, universal cpu, general-purpose storage, universal elements Deng, naturally it is also possible to it by specialized hardware include specific integrated circuit, dedicated cpu, private memory, special components and parts etc. come real It is existing, but the former is more preferably embodiment in many cases.Based on this understanding, the technical solution sheet in the embodiment of the present invention The part that contributes to existing technology can be embodied in the form of software products in other words in matter, which produces Product can store in storage medium, as read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk, CD etc., including some instructions are used so that computer equipment (can be People's computer, server or network equipment etc.) it executes described in certain parts of each embodiment of the present invention or embodiment Method.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device and For system embodiment, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to method The part of embodiment illustrates.
The above is only the specific embodiment of the application, is made skilled artisans appreciate that or realizing this Shen Please.Various modifications to these embodiments will be apparent to one skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (8)

1. a kind of method for downloading Streaming Media, the method are used to download the Streaming Media of m3u8 format, which is characterized in that the side Method includes:
If the current m3u8 for downloading Streaming Media describes file failure, obtains the corresponding newest m3u8 of the Streaming Media and retouch State file;
The newest m3u8 m3u8 for describing file and failure is described into file and carries out TS segment information matches, if matching at Function then describes the newest address information for the TS segment that the failed download of the Streaming Media is obtained in file from the newest m3u8;
Continue to download the TS segment of the failed download according to the newest address information;
Wherein, the m3u8 that the newest m3u8 is described file and failure describes file progress TS segment information matches packet It includes:
If the m3u8 that the newest m3u8 describes the TS piece segment information and failure for including in file is described Correspondence TS piece segment information belong to same TS segment, then confirm successful match.
2. the method according to claim 1, wherein
It is described in file when the newest m3u8 describes the quantity of TS piece segment information for including in file with the m3u8 of the failure The quantity for the TS piece segment information for including is equal, also, the newest m3u8 describe the TS clip durations for including in file with it is described The correspondence TS clip durations that the m3u8 of failure describes to include in file are equal, then newest m3u8 describes the TS segment for including in file Information belongs to same TS segment with the m3u8 of the failure corresponding TS piece segment information for describing to include in file.
3. according to claim 1 to method described in 2 any one, which is characterized in that described from the newest m3u8 description text The newest address information that the TS segment of the failed download of the Streaming Media is obtained in part includes:
The address information for obtaining the TS segment of the failed download describes index bit confidence in file in the m3u8 of the failure Breath;
Describe to obtain the TS segment of the failed download in file most from the newest m3u8 according to the index position information New address information.
4. according to claim 1 to method described in 2 any one, which is characterized in that further include:
If the Streaming Media failed download, receives the prompt information of failed download, if the prompt information be with it is current M3u8 describes file and fails the corresponding prompt information of this event, then determines that the current m3u8 describes file failure.
5. a kind of device for downloading Streaming Media, described device are used to download the Streaming Media of m3u8 format, which is characterized in that the dress It sets and includes:
First acquisition unit obtains the stream matchmaker if describing file failure for the current m3u8 for downloading Streaming Media The corresponding newest m3u8 of body describes file;
Matching unit, the m3u8 for the newest m3u8 to be described file and failure describe file progress TS piece segment information Match;
Second acquisition unit describes to obtain in file under the Streaming Media if being used for successful match from the newest m3u8 Carry the newest address information of the TS segment of failure;
Download unit, for continuing to download the TS segment of the failed download according to the newest address information;
Wherein, if the matching unit describes the TS piece segment information for including in file and the failure for the newest m3u8 The m3u8 correspondence TS piece segment information that describes to include in file belong to same TS segment, then confirm successful match.
6. device according to claim 5, which is characterized in that the matching unit is also used to:
If the newest m3u8 describes the quantity of TS piece segment information for including in file and the m3u8 of the failure describes file In include TS piece segment information quantity it is equal, and
The newest m3u8 describes the TS clip durations for including in file and the m3u8 of the failure describes pair for including in file It answers TS clip durations equal, then confirms that the newest m3u8 describes the m3u8 of the TS piece segment information for including in file Yu the failure The correspondence TS piece segment information for including in description file belongs to same TS segment.
7. according to device described in claim 5 to 6 any one, which is characterized in that
The address information for the TS segment that the second acquisition unit is used to obtain the failed download is retouched in the m3u8 of the failure The index position information in file is stated, and is described described in acquisition in file according to the index position information from the newest m3u8 The newest address information of the TS segment of failed download.
8. according to device described in claim 5 to 6 any one, which is characterized in that described device further include:
Receiving unit receives the prompt information of failed download if being used for the Streaming Media failed download;
Judging unit, if being to describe file with current m3u8 to fail this event corresponding prompt letter for the prompt information Breath then determines that the current m3u8 describes file failure.
CN201510312810.5A 2015-06-08 2015-06-08 Download the method and device of Streaming Media Active CN106303577B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510312810.5A CN106303577B (en) 2015-06-08 2015-06-08 Download the method and device of Streaming Media
PCT/CN2016/078992 WO2016197691A1 (en) 2015-06-08 2016-04-11 Method and apparatus for downloading streaming media

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510312810.5A CN106303577B (en) 2015-06-08 2015-06-08 Download the method and device of Streaming Media

Publications (2)

Publication Number Publication Date
CN106303577A CN106303577A (en) 2017-01-04
CN106303577B true CN106303577B (en) 2019-10-08

Family

ID=57503055

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510312810.5A Active CN106303577B (en) 2015-06-08 2015-06-08 Download the method and device of Streaming Media

Country Status (2)

Country Link
CN (1) CN106303577B (en)
WO (1) WO2016197691A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107070923B (en) * 2017-04-18 2020-07-28 上海云熵网络科技有限公司 P2P live broadcast system and method for reducing code segment repetition
CN109756782A (en) * 2017-11-06 2019-05-14 阿里巴巴集团控股有限公司 A kind of method for processing resource, device and streaming media server
CN110545459A (en) * 2018-05-29 2019-12-06 武汉斗鱼网络科技有限公司 method for caching video and related equipment
CN113163226B (en) * 2021-03-26 2023-04-07 维沃移动通信有限公司 Media file playing method and device, electronic equipment, server and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102695081A (en) * 2012-06-13 2012-09-26 百视通网络电视技术发展有限责任公司 Video resource scheduling method based on Internet television and television terminal
CN103546830A (en) * 2013-10-28 2014-01-29 Tcl集团股份有限公司 Method and system for processing video address failure
CN103648019A (en) * 2013-11-29 2014-03-19 乐视致新电子科技(天津)有限公司 Video downloading method and device based on HLS protocol
CN103686455A (en) * 2013-11-22 2014-03-26 乐视致新电子科技(天津)有限公司 Video playing method and device based on HLS protocol
CN104125229A (en) * 2014-07-31 2014-10-29 合一网络技术(北京)有限公司 Streaming media playing method and streaming media playing device
CN104135672A (en) * 2014-08-13 2014-11-05 浪潮软件集团有限公司 HLS-based method for realizing seamless disaster recovery of video on demand

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120151080A1 (en) * 2010-12-14 2012-06-14 of California Media Repackaging Systems and Software for Adaptive Streaming Solutions, Methods of Production and Uses Thereof
US8583818B2 (en) * 2011-01-31 2013-11-12 Cbs Interactive Inc. System and method for custom segmentation for streaming video
GB2483125B (en) * 2011-02-25 2012-09-26 British Sky Broadcasting Ltd Media system
CN104811796B (en) * 2014-01-24 2018-11-16 北京猎豹移动科技有限公司 Network video continuous transmission method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102695081A (en) * 2012-06-13 2012-09-26 百视通网络电视技术发展有限责任公司 Video resource scheduling method based on Internet television and television terminal
CN103546830A (en) * 2013-10-28 2014-01-29 Tcl集团股份有限公司 Method and system for processing video address failure
CN103686455A (en) * 2013-11-22 2014-03-26 乐视致新电子科技(天津)有限公司 Video playing method and device based on HLS protocol
CN103648019A (en) * 2013-11-29 2014-03-19 乐视致新电子科技(天津)有限公司 Video downloading method and device based on HLS protocol
CN104125229A (en) * 2014-07-31 2014-10-29 合一网络技术(北京)有限公司 Streaming media playing method and streaming media playing device
CN104135672A (en) * 2014-08-13 2014-11-05 浪潮软件集团有限公司 HLS-based method for realizing seamless disaster recovery of video on demand

Also Published As

Publication number Publication date
CN106303577A (en) 2017-01-04
WO2016197691A1 (en) 2016-12-15

Similar Documents

Publication Publication Date Title
CN106303577B (en) Download the method and device of Streaming Media
WO2017036228A1 (en) Method and apparatus for implementing system upgrading
CN112000355A (en) Method and device for firmware upgrading and household appliance
CN105389177A (en) Software version confirmation method, device and system
CN109391673A (en) A kind of method, system and the terminal device of management update file
CN105354132A (en) Mobile application release processing method and release channel tracking method and system
CN103702176A (en) HLS (http live streaming) protocol-based video downloading method and device
CN105450682A (en) Method, device, and system for data synchronous storage and synchronizing data to client
CN104618418A (en) Method and device for playing multimedia file
CN105635753B (en) The method for down loading and device of media data
CN105049546B (en) A kind of Dynamic Host Configuration Protocol server is the method and device of client distribution IP address
CN111176706A (en) Terminal upgrading method and device, electronic equipment and storage medium
WO2017124741A1 (en) Method and device for synchronizing apparatus version
CN110545489A (en) self-adaptive streaming media playing method, system and client
CN104767672A (en) Account relation establishing method and device
CN106446138B (en) Data packet storage method and device
CN108418857B (en) Zookeeper cluster system and connection method and device thereof
CN110768811B (en) Method, device and system for updating YANG model file library
CN103841458A (en) Auxiliary information pushing method and device and auxiliary information receiving method and device
CN107707672B (en) Method, device and equipment for reconstructing code with balanced load
US10979287B2 (en) Method and apparatus for receiving a solution when configuration function verification fails in a terminal
CN114422576A (en) Session cleaning method and device, computer equipment and readable storage medium
CN106341480B (en) Data packet uploading method and device
CN107465704B (en) Data downloading method and device
CN105141638A (en) Method and device for downloading video resources

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200420

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Alibaba (China) Co.,Ltd.

Address before: 510627 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping B radio 14 floor tower square

Patentee before: GUANGZHOU UCWEB COMPUTER TECHNOLOGY Co.,Ltd.