CN109756782A - A kind of method for processing resource, device and streaming media server - Google Patents
A kind of method for processing resource, device and streaming media server Download PDFInfo
- Publication number
- CN109756782A CN109756782A CN201711080019.1A CN201711080019A CN109756782A CN 109756782 A CN109756782 A CN 109756782A CN 201711080019 A CN201711080019 A CN 201711080019A CN 109756782 A CN109756782 A CN 109756782A
- Authority
- CN
- China
- Prior art keywords
- url
- heat label
- file
- index file
- heat
- 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.)
- Pending
Links
- 238000012545 processing Methods 0.000 title claims abstract description 64
- 238000000034 method Methods 0.000 title claims abstract description 59
- 230000001133 acceleration Effects 0.000 claims abstract description 75
- 238000010438 heat treatment Methods 0.000 claims abstract description 15
- 230000005540 biological transmission Effects 0.000 claims abstract description 6
- 238000004590 computer program Methods 0.000 claims description 11
- 238000003860 storage Methods 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 claims description 5
- 238000012360 testing method Methods 0.000 description 10
- 230000000694 effects Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 230000000712 assembly Effects 0.000 description 4
- 238000000429 assembly Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 230000003139 buffering effect Effects 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000003032 molecular docking Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000011282 treatment Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
A kind of method for processing resource, device and streaming media server, which comprises selection will add the URL of pre- heat label from the url list for the slice file that index file includes;Pre- heat label is added respectively for the URL of selection, and the pre- heat label includes the address information for the one or more slice files for needing to preheat.The method also includes: the URL of terminal transmission is received, when URL includes pre- heat label as described in determining, the pre-heat treatments are carried out to one or more files that are sliced that needs preheat according to the pre- heat label.Present invention also provides corresponding resource processing unit and streaming media servers.The application can be used for program request acceleration system, realize the control to pre- heat flow.
Description
Technical field
The present invention relates to resource processing techniques, more particularly, to a kind of method for processing resource, device and streaming media service
Device.
Background technique
HLS (HTTP Live Streaming:HTTP real-time streams) is the stream matchmaker based on HTTP proposed by Apple company
Body transport protocol.With opening, it is succinct, can pass through firewall, with (Content Delivery Network, i.e. content points of CDN
Hairnet network) the convenient feature of system docking.On terminal type, all apple iOS terminals (including Phone, iPod Touch,
IPad, Mac) all support HLS streaming media playing, Android (Android) system of newest publication to be also initially added into the branch to HLS
It holds.
HLS stream is made of index file and numerous slice files, and for HLS program request, slice tool can be used to work
It is sliced for the multimedia file in the source HLS, generates index file and multiple slice files.Slice file in HLS is alternatively referred to as TS
(Transport stream, transport stream) file or TS slice, and index file is also referred to as M3U8 file.
HLS broadcasting is divided into live streaming and program request, and the process of the two is essentially identical, all includes: that terminal passes through browse request one
A index file, the content of the index file are an orderly network address list namely URL (Uniform/Universal
Resource Locator, uniform resource locator) list, one playable TS file of each URL direction;Browser is by suitable
Sequence accesses the URL in the index file, plays in order each TS file.
In the related technology, live streaming acceleration system can preheat URL in index file in browse request index file simultaneously
Whole TS files of list refer to the preheating of TS file if the TS file not in the buffer, is obtained and is stored in from source station
Caching, to achieve the effect that accelerate to play.Although and program request acceleration system can realize quickly dividing for content by P2P technology
Hair, but because being unable to control pre- heat flow, thus cannot achieve the effect that acceleration by program request preheating.
Summary of the invention
The embodiment of the invention provides a kind of method for processing resource, comprising:
Selection will add pre- heat label from the uniform resource position mark URL list for the slice file that index file includes
URL;
Pre- heat label is added respectively for the URL of selection, and the pre- heat label includes the one or more for needing to preheat
It is sliced the address information of file.
The embodiment of the invention also provides a kind of resource processing units, comprising:
Selecting module, for selecting to want from the uniform resource position mark URL list for the slice file that index file includes
Add the URL of pre- heat label;
Mark module is preheated, adds pre- heat label respectively for the URL for selection, the pre- heat label includes to need
The address information of one or more slice files of preheating.
The embodiment of the invention also provides a kind of streaming media server, including memory, processor and it is stored in described deposit
It is realized on reservoir and when processor described in the computer program that can run on the processor executes the calculation procedure as above
The processing of the method for processing resource.
The present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, the computer
The processing of method as described above is realized when program is executed by processor.
Above-described embodiment can be to add pre- heat label in the URL of indexed file, what instruction needed to preheat is sliced file
Information, so as to for realizing the control to pre- heat flow.
The embodiment of the invention also provides a kind of method for processing resource, comprising:
Receive the uniform resource position mark URL that terminal is sent;
When determining that the URL includes pre- heat label, the one or more that needs preheat is sliced according to the pre- heat label
File carries out the pre-heat treatment;
Wherein, the pre- heat label includes the address information for the one or more slice files for needing to preheat.
The embodiment of the invention also provides a kind of resource processing units, comprising:
Request receiving module receives the uniform resource position mark URL that terminal is sent;
The pre-heat treatment module, when for determining that the URL includes pre- heat label, according to the pre- heat label to needing to preheat
One or more slice files carry out the pre-heat treatments;Wherein, the pre- heat label includes that the one or more preheated is needed to cut
The address information of piece file.
The embodiment of the invention also provides a kind of streaming media server, including memory, processor and it is stored in described deposit
It is realized on reservoir and when processor described in the computer program that can run on the processor executes the calculation procedure as above
The processing of the method.
The present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, the computer
The processing of method as described above is realized when program is executed by processor.
Above-described embodiment controls pre- heat flow by pre- heat label, can be used for program request acceleration system and reaches pre- thermal acceleration
Effect effectively promotes experience when user watches order video.
Detailed description of the invention
Fig. 1 is the flow chart of one method for processing resource of the embodiment of the present invention;
Fig. 2 is the module map of one resource processing unit of the embodiment of the present invention;
Fig. 3 is the flow chart of two method for processing resource of the embodiment of the present invention;
Fig. 4 is the module map of two resource processing unit of the embodiment of the present invention;
Fig. 5 is the timing diagram of an illustrative program request accelerated method of embodiment three.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention
Embodiment be described in detail.It should be noted that in the absence of conflict, in the embodiment and embodiment in the application
Feature can mutual any combination.
Acceleration system is broadcast live when terminal passes through browse request index file in CDN, can preheat URL in index file simultaneously
Whole TS files of list, to accelerate to play.
In the HLS playing process of the relevant technologies, terminal, should first to the index file in the streaming media server request source HLS
In the url list of index file, each URL is directed toward a playable slice file;Streaming media server will be under index file
After issuing terminal, terminal requests slice file according to the sequence of URL in url list one by one, and slice file is carried in request
URL, streaming media server obtain corresponding slice file from source station according to the URL and return to terminal.
One of the difference of HLS live streaming and program request is the length of index file: in HLS live streaming, an index file is only wrapped
URL containing several TS files;And in HLS program request, an index file includes the URL of hundreds and thousands of a TS files.If with
Family only plays one of TS file, and CDN program request acceleration system preheats other all TS slices simultaneously, will cause very big
Flow waste.Thus need to find a kind of method for efficiently controlling pre- heat flow.
Embodiment one
The present embodiment is related to a kind of method for processing resource and device, by adding pre- heat label in the URL of indexed file
It indicates to need the slice file that preheats, for realizing the control of pre- heat flow.
By taking the program request acceleration system based on HLS as an example, the program request acceleration system can be set as CDN the present embodiment
In the streaming media server of node.When user passes through a certain multimedia file of terminal on demand (such as video file), terminal can be requested
The index file of the multimedia file, after program request acceleration system receives end to the request of the index file, if it is determined that not
The index file is cached, the index file can be obtained from source station, then this resource is added preheating to index file
The processing of label.
As shown in Figure 1, the method for processing resource of the present embodiment program request acceleration system includes:
Step 110, it selects to add from the uniform resource position mark URL list for the slice file that index file includes pre-
The URL of heat label;
In the present embodiment, the selection from the url list for the slice file that index file includes will add pre- heat label
URL, comprising: in the url list according to setting interval select URL, as the URL that add pre- heat label.It is described
The interval of setting can be indicated with the number of URL, namely select a URL to add pre- heat label every N number of URL, and N is nature
Number.When N is larger, the URL added after pre- heat label can be longer, while the slice file preheated is more, and when N is smaller, preheating
Slice file it is less, thus be contemplated that these because usually selection N value.In one example, N is set as 1 value in 1-10.
And when N is set as 0, it is that pre- heat label is added to each URL.In addition, the interval of the setting is not required for each
Every all must be the same, to the URL on the different broadcasting periods, different interval selection URL can be used.
It can also be indicated with the playing duration of the corresponding slice file of URL at the interval of another embodiment, the setting, example
Such as, after adding pre- heat label for a URL in url list, by the corresponding playing duration for being sliced file of its subsequent URL
It adds up one by one, when cumulative duration meets or exceeds the playing duration of setting, the last one URL of reselection addition preheating mark
Note.Playing duration as setting interval can consider in conjunction with the playing duration for being sliced file, for example, if each TS can be broadcast
10s is put, then preheating a 1-2 can;If each TS can only play 2s, that needs more preheatings several, such as 5-10,
It is equivalent to the time for reserving one section of buffering.
Step 120, pre- heat label is added respectively for the URL of selection, the pre- heat label includes need to preheat one
The address information of a or multiple slice files.
This step is after the URL of selection adds pre- heat label respectively, which is modified.The modification
The URL with pre- heat label being not present before including in the url list of index file afterwards, if the interval of setting is not 0,
It further include original URL without pre- heat label in the url list.Program request acceleration system completes the above-mentioned place to index file
After reason, the index file is sent to the terminal and caches the index file.The subsequent terminal that receives again is to the index
When the request of file, the index file duplication portion of caching can be directly sent to the terminal of request.
In the present embodiment, the address information in the pre- heat label is URL namely the pre- heat label includes the needs
The URL of the one or more slice files preheated.Program request acceleration system according to the URL in pre- heat label can directly from
Source station gets corresponding slice file and is put into caching, to realize preheating.But the application is not limited to this, in another implementation
In example, described address information not instead of URL itself, the index information of URL, the index information needs to carry out pre- for lookup
The URL of one or more slice files of heat.
In this application, preheating is to obtain the slice file not played and be put into caching, thus pre- heat label includes
The address information for the one or more slice files for needing to preheat is necessarily after the corresponding slice file of URL where pre- heat label
One or more slice files address informations.And in the present embodiment, to any pre- heat label, address information packet therein
First URL after URL where including the pre- heat label (namely the pre- heat label be added to URL) will be added to next
Between the URL of pre- heat label all URL (including after URL where pre- heat label first URL and it is next to add it is pre-
The URL of heat label).In one example, it selects URL to add pre- heat label by interval of 3 URL, then to add in url list
Adding the URL of pre- heat label is the 1st URL, the 4th URL, the 7th URL ... ..., and so on.So, add in the 1st URL
The pre- heat label added includes the 2-4 URL (namely the 2-4 URL for being sliced file), and program request acceleration system receives terminal to the
After the request of 1 slice file, so that it may the pre- heat label in the 1st URL is parsed, according to the 2-4 URL therein from source station
It obtains the 2-4 slice file and is stored in caching, that is, complete the pre-heat treatment for being sliced file to the 2-4, program request acceleration system
After terminal is received to the request of the 2nd, the 3rd and the 4th slice file, it can directly find from caching and cut accordingly
Piece file simultaneously returns to terminal, to achieve the effect that acceleration.Similarly, the pre- heat label added in the 4th URL includes 5-
7 URL can make program request acceleration system after receiving terminal to the request of the 4th slice file, complete to cut 5-7
The pre-heat treatment of piece file, and so on.Using this labeling method, in addition to the slice file that first is requested, other slices
File can be preheated, thus have good preheating acceleration effect.Certainly, for the application, if limited by resource
System, can also be by the portion between first URL to next URL that add pre- heat label after URL where pre- heat label
URL is divided to be added in the pre- heat label.
In the present embodiment, the pre- heat label can be added in the domain name of URL, or be added in the path of URL, or
Person is added in the parameter of URL.Wherein, be added in the domain name of URL include be added to before the domain name of URL, below or in
Between, the path for being added to URL neutralize be added in the parameter of URL be also in this way,
One explanation is done to the addition of pre- heat label with an example below.Assuming that primary index file is m3u8, m3u8
Content format there are many, it is assumed that m3u8 file be test.com/x/1.m3u8, if the content of every row shaped like
Test.com/1.ts, then player can request test.com/1.ts next time;If every row content is shaped like 1.ts, under player
It is secondary to request test.com/x/1.ts;If every row content can request test.com/ shaped like/1.ts, player next time
1.ts.In this example, it is assumed that the entitled test.com/1.m3u8 of m3u8 file, preceding 3 TS slice of url list
URL are as follows:
1.ts
2.ts
3.ts
It is divided into 2 URL between the setting that selection uses when adding the URL of pre- heat label, in this example, selection adds 1.ts
Add pre- heat label, then needing in the pre- heat label added for 1.ts comprising 2.ts and 3.ts.
If pre- heat label is added in the domain name of URL, modified index file includes:
2.ts.3.ts.test.com/1.ts
test.com/2.ts
test.com/3.ts
When carrying 2.ts.3.ts.test.com/1.ts in the request that program request acceleration system receives, 2.ts is just preheated simultaneously
And 3.ts.
If pre- heat label is added in the path of URL, modified index file includes:
/2.ts/3.ts/1.ts
/2.ts
/3.ts
In the request that program request acceleration system receives when carrying/2.ts/3.ts/1.ts, 2.ts and 3.ts are just preheated simultaneously.
If pre- heat label is added in the parameter of url, modified index file includes:
1.ts? next=2.ts, 3.ts
2.ts
3.ts
1.ts is carried in the request that program request acceleration system receives? when next=2.ts, 3.ts, just simultaneously preheat 2.ts and
3.ts。
For be sliced file URL add pre- heat label mode be not limited to it is above several, as long as appointing addition
Position and format can be parsed pre- heat label and URL respectively by the position of agreement and format.
Correspondingly, the present embodiment additionally provides a kind of resource processing unit, as shown in Figure 2, comprising:
Selecting module 10, for being selected from the uniform resource position mark URL list for the slice file that index file includes
Add the URL of pre- heat label;
Mark module 20 is preheated, adds pre- heat label respectively for the URL for selection, the pre- heat label includes to need
The address information for the one or more slice files to be preheated.
In the present embodiment,
The resource processing unit is arranged in program request acceleration system;
The resource processing unit further include:
File acquisition module, for receiving terminal pair before selecting module selection will add the URL of pre- heat label
The request of the index file when determining the uncached index file, obtains the index file from source station;
File sending module, for it is described preheating mark module be selection the URL add respectively pre- heat label it
Afterwards, the index file is sent to the terminal and caches the index file.
In the present embodiment,
The selecting module selects to add pre- heat label from the url list for the slice file that index file includes
URL, comprising: URL is selected according to the interval of setting in the url list, as the URL that add pre- heat label;
Address information in the pre- heat label of the preheating mark module addition includes URL where the pre- heat label
All URL between first URL to next URL that add pre- heat label later.
Any processing can be by corresponding mould in the present embodiment resource processing unit in the present embodiment method for processing resource
Block is realized, is no longer described one by one here.
The present embodiment additionally provides a kind of streaming media server, including memory, processor and is stored in the memory
Computer program that is upper and can running on the processor, the processor can realize embodiment when executing the calculation procedure
The processing of any method for processing resource described in one.
The present embodiment additionally provides a kind of computer readable storage medium, is stored thereon with computer program, the calculating
Machine program can realize the processing of any method for processing resource described in embodiment one when being executed by processor.
It should be noted that, although the present embodiment is to be added pre- heat label to index file in program request acceleration system
Processing, but the application is not limited to this, for example, the processing for the part URL addition label in url list can also be in filleter
Tool generate index file while carry out or indexed file generate after, completed by special module to index file
The processing of pre- heat label is added, these processing can be completed in source station, or be completed on other multimedia servers.
The scheme of above-described embodiment can be to add pre- heat label in the URL of indexed file, instruction needs the slice preheated
File, that is to say, that the number for the slice file for needing to preheat refers to fixed in pre- heat label.Thus the index file can be used for
It realizes the control to pre- heat flow, when being applied to program request acceleration system, the effect that preheating accelerates can be obtained.
Embodiment two
The present embodiment provides a kind of method for processing resource and device, the pre- heat label in URL sent according to terminal is realized
To the pre-heat treatment of slice file.
By taking the program request acceleration system based on HLS as an example, the program request acceleration system can be set as CDN the present embodiment
In the streaming media server of node.
The method for processing resource of the present embodiment carries out the pre-heat treatment according to the pre- heat label in URL, to slice file resource.
As shown in figure 3, the present embodiment method includes:
Step 210, the uniform resource position mark URL that terminal is sent is received;
In the present embodiment, the URL is that the terminal is obtained from index file, and carries in the terminal to described
In the request to slice file that program request acceleration system is sent (namely the request for playing slice file).It is a certain more in user's program request
During media file, terminal requests the index file of the multimedia file to program request acceleration system, receives program request acceleration
After the index file that system issues, terminal can send the request to slice file to program request acceleration system, carry in request from rope
The URL of the slice file obtained in quotation part.
The index file of the present embodiment is handled by method described in embodiment one.The program request acceleration system
Before terminal is received to the request of slice file, the index file first is obtained from source station, is cut from what the index file included
Selection will add the URL of pre- heat label in the url list of piece file, and add the preheating mark respectively for the URL of selection
Note, is then sent to the terminal for the index file.The present embodiment can use embodiment one to the processing of index file
Described in any pair of index file processing method, for example, the program request acceleration system can in the url list according to
The interval of setting selects URL, as the URL that add pre- heat label.For another example, the address information in the pre- heat label can wrap
All URL between first URL to next URL that add pre- heat label after URL where including the pre- heat label.
Thus, the URL that this step terminal is sent may include pre- heat label, it is also possible to not include pre- heat label.
Step 220, when determining that the URL includes pre- heat label, according to the pre- heat label to needs preheat one or
Multiple slice files carry out the pre-heat treatment;Wherein, the pre- heat label includes the one or more slice files for needing to preheat
Address information.
Program request acceleration system can parse the URL according to the format of the URL added with pre- heat label of agreement,
Determine whether the URL includes pre- heat label, when determining that the URL includes pre- heat label, can parse to obtain the preheating
The address information for one or more slice files that the needs that label includes preheat, such as the one or more slices for needing to preheat
The index information of the URL or URL of file.When the address information is URL, program request acceleration system is according to the URL in pre- heat label
Corresponding slice file directly can be obtained from source station and be put into caching, to realize preheating.The address information is URL's
When index information, program request acceleration system can record the URL of the slice file preheated in the database in advance, then
The corresponding URL being added in index file using the index information for being used to search these URL as pre- heat label.In this way, program request adds
When carrying pre- heat label in the URL that speed system receives, so that it may be searched according to the index information in pre- heat label into database
To the URL of the slice file preheated, and then corresponding slice file is obtained from source station and is put into caching.
The present embodiment based on system be although by taking program request acceleration system as an example, but the application is not limited thereto, for
Using slice file and index file come the system for realizing broadcasting, the method for the present embodiment can be used.
By the above method, when in the URL that terminal is sent comprising pre- heat label, program request acceleration system can be marked according to preheating
The address information for the slice file that will includes preheats subsequent one or more slice files, i.e., after obtaining from source station
These continuous slice files are simultaneously stored in the buffer, in this way in these subsequent slice files of terminal request can directly from
It is taken out in caching and returns to terminal, it is not necessary to gone to source station to obtain again, thus preheating flow control may be implemented, reach pre- thermal acceleration
Effect.
The present embodiment additionally provides a kind of resource processing unit, as shown in figure 4, the resource processing unit includes:
Request receiving module 50, for receiving the uniform resource position mark URL of terminal transmission;
The pre-heat treatment module 60, it is pre- to needing according to the pre- heat label when for determining that the URL includes pre- heat label
One or more slice files of heat carry out the pre-heat treatment;Wherein, the pre- heat label includes the one or more for needing to preheat
It is sliced the address information of file.
Program request acceleration system further includes the module for realizing other function, is such as sent to the slice file of terminal request
The module of terminal, will not enumerate here.
In the present embodiment,
The resource processing unit is arranged in program request acceleration system, and the program request acceleration system can be use and be based on
The content distributing network CDN program request acceleration system of the streaming media transmission protocol HLS of HTTP, can be set in corresponding streaming media service
On device.
In the present embodiment,
The URL be the terminal from obtained in index file and carry be sent in the request to slice file it is described
Program request acceleration system.
The resource processing unit further include: index file processing module, for obtaining the index file from source station, from
Selection will add the URL of pre- heat label in the url list for the slice file that the index file includes, for the URL of selection
After adding the pre- heat label respectively, the index file is sent to the terminal.Index file processing module can be according to
Either type described in embodiment one adds pre- heat label in the URL of the index file, for example, at the index file
URL can be selected according to the interval of setting in the url list by managing module, as the URL that add pre- heat label;For another example,
Address information in the pre- heat label of the index file processing module addition may include URL where the pre- heat label
All URL between first URL to next URL that add pre- heat label later.Etc..
After the resource processing unit of the present embodiment receives the URL of terminal transmission, subsequent slice file can be carried out
Preheating makes user in these slice files of subsequent access, and response speed is faster.
The present embodiment additionally provides a kind of streaming media server, including memory, processor and is stored in the memory
Computer program that is upper and can running on the processor, the processor realize the present embodiment when executing the calculation procedure
The above-mentioned processing of method.
The present embodiment additionally provides a kind of computer readable storage medium, is stored thereon with computer program, the calculating
Machine program realizes the above-mentioned processing of the present embodiment method when being executed by processor.
Embodiment three
The present embodiment provides the method based on embodiment one and embodiment two, the tool in CDN program request acceleration system
The example of body application.
It is the timing diagram for the program request accelerated method that the present embodiment is applied to CDN program request acceleration system shown in Fig. 5, designates
Several typical access behaviors in HLS on-demand process.As shown, this exemplary HLS on-demand process includes following processing:
Step 1, user terminal (being usually to pass through browser) accesses CDN program request acceleration system, and more matchmakers of program request are wanted in request
The m3u8 file of body file;
The inquiry of step 2.CDN program request acceleration system finds that requested m3u8 file is uncached, obtains from source station requested
M3u8 file;
If requested m3u8 file has cached, requested m3u8 file directly can be returned to user terminal.
Step 3. source station returns to requested m3u8 file to CDN program request acceleration system
Step 4.CDN program request acceleration system is in the m3u8 file of acquisition, for pre- heat label in the URL addition of selection, it
Afterwards, modified m3u8 file is stored in and is cached;
The concrete mode for adding pre- heat label has been described in example 1, is not repeated to illustrate.
Step 5.CDN program request acceleration system returns to modified m3u8 file to user terminal;
Above-mentioned steps 1-5 is the treatment process of terminal request index file triggering.
Step 6, user passes through the terminal request one corresponding TS file of URL without adding pre- heat label, takes in request
Band URL, does not carry pre- heat label;
The request (such as request m3u8 file, request TS file) of terminal convection media server is all by URL, to stream matchmaker
Body server initiates HTTP request.When user requests TS file, streaming media server can be obtained by the parsing to request
URL is taken, if there is pre- heat label, pre- heat label can also be got.
Step 7, CDN program request acceleration system analysis request does not find pre- heat label;
Step 8, the inquiry of CDN program request acceleration system finds that requested TS file in the buffer, is not obtained to source station and asked
The TS file asked;
If requested TS file has cached, requested TS file directly can be returned to user terminal.
Step 9, source station returns to requested TS file to CDN program request acceleration system;
Step 10, requested TS file is stored in and caches by CDN program request acceleration system;
Step 11, CDN program request acceleration system returns to requested TS file to user terminal;
Above-mentioned steps 6-11 be terminal request do not add pre- heat label URL corresponding TS file when trigger it is processed
Journey.
Step 12, the user terminal requests one URL corresponding TS file for being added to pre- heat label carries in request
URL and pre- heat label;
Http protocol be it is stateless, user request a TS file when, program request acceleration system is not aware that accordingly
The content of m3u8 file can only obtain the information of needs from request.
Step 13, CDN program request acceleration system analysis request finds pre- heat label;
Step 14, CDN program request acceleration system has inquired the requested TS file of discovery in the buffer, this by caching is asked
The TS file asked returns to user terminal;
Step 15.CDN program request acceleration system asynchronously starts warm-up tasks on backstage, according to pre- heat label to requested
One or more TS files after TS file preheated namely one or more TS file not in the buffer, then from source
It stands and obtains and be stored in caching.The pre-heat treatment of this step finds to start after pre- heat label in parsing.
Above-mentioned steps 12-15 be terminal request be added to pre- heat label URL corresponding TS file when trigger it is processed
Journey.
Start to play after user's request to m3u8 file, sends the request to TS file one by one, playing a TS text
Before part, the time sends the request to next TS file more in advance, and the present embodiment can use broadcasting between Twice requests
Put the time is preheated in acceleration system, to accelerate broadcasting speed.And by pre- heat label, primary need to be to pre- heat label
Specified part TS file is preheated, rather than is preheated to subsequent all TS files, flow control is realized, to make a little
The actual implementation for broadcasting preheating is possibly realized.
It should be noted that the above process is only exemplary.For example, first request to slice file that terminal is sent
In, it is possible to the URL for being added to pre- heat label of carrying, the not necessarily URL without adding pre- heat label.
It will appreciated by the skilled person that whole or certain steps, system, dress in method disclosed hereinabove
Functional module/unit in setting may be implemented as software, firmware, hardware and its combination appropriate.In hardware embodiment,
Division between the functional module/unit referred in the above description not necessarily corresponds to the division of physical assemblies;For example, one
Physical assemblies can have multiple functions or a function or step and can be executed by several physical assemblies cooperations.Certain objects
Reason component or all physical assemblies may be implemented as by processor, such as central processing unit, digital signal processor or micro process
The software that device executes, is perhaps implemented as hardware or is implemented as integrated circuit, such as specific integrated circuit.Such software
Can be distributed on a computer-readable medium, computer-readable medium may include computer storage medium (or non-transitory be situated between
Matter) and communication media (or fugitive medium).As known to a person of ordinary skill in the art, term computer storage medium includes
In any method or skill for storing information (such as computer readable instructions, data structure, program module or other data)
The volatile and non-volatile implemented in art, removable and nonremovable medium.Computer storage medium includes but is not limited to
RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storages, magnetic
Box, tape, disk storage or other magnetic memory apparatus or it can be used for storing desired information and can be visited by computer
Any other medium asked.In addition, known to a person of ordinary skill in the art be, communication media generally comprises computer-readable
Other numbers in the modulated data signal of instruction, data structure, program module or such as carrier wave or other transmission mechanisms etc
According to, and may include any information delivery media.
Claims (13)
1. a kind of method for processing resource, comprising:
Selection will add the URL of pre- heat label from the uniform resource position mark URL list for the slice file that index file includes;
Pre- heat label is added respectively for the URL of selection, and the pre- heat label includes the one or more slices for needing to preheat
The address information of file.
2. the method as described in claim 1, it is characterised in that:
The method for processing resource is applied to program request acceleration system;
The program request acceleration system before selection will add the URL of pre- heat label in the url list, also wrap by the method
Include: the program request acceleration system receives request of the terminal to the index file, when determining the uncached index file, from source
It stands and obtains the index file;
After the program request acceleration system adds pre- heat label for the URL of selection respectively, the method also includes: the point
Acceleration system is broadcast the index file is sent to the terminal and caches the index file.
3. method according to claim 1 or 2, it is characterised in that:
The selection from the url list for the slice file that index file includes will add the URL of pre- heat label, comprising: in institute
It states in url list and selects URL according to the interval of setting, as the URL that add pre- heat label;
Address information in the pre- heat label includes that first URL after URL where the pre- heat label is wanted to next
Add all URL between the URL of pre- heat label.
4. a kind of resource processing unit characterized by comprising
Selecting module, for selecting to add from the uniform resource position mark URL list for the slice file that index file includes
The URL of pre- heat label;
Mark module is preheated, adds pre- heat label respectively for the URL for selection, the pre- heat label includes to need to preheat
One or more slice files address informations.
5. device as claimed in claim 4, it is characterised in that:
The resource processing unit is arranged in program request acceleration system;
The resource processing unit further include:
File acquisition module, for receiving terminal to described before selecting module selection will add the URL of pre- heat label
The request of index file when determining the uncached index file, obtains the index file from source station;
File sending module, for inciting somebody to action after the URL that the preheating mark module is selection adds pre- heat label respectively
The index file is sent to the terminal and caches the index file.
6. device as described in claim 4 or 5, it is characterised in that:
The selecting module selects to add the URL of pre- heat label from the url list for the slice file that index file includes, packet
It includes: URL is selected according to the interval of setting in the url list, as the URL that add pre- heat label;
After address information in the pre- heat label of the preheating mark module addition includes URL where the pre- heat label
First URL to next URL that add pre- heat label between all URL.
7. a kind of method for processing resource, comprising:
Receive the uniform resource position mark URL that terminal is sent;
When determining that the URL includes pre- heat label, files are sliced to the one or more that needs preheat according to the pre- heat label
Carry out the pre-heat treatment;
Wherein, the pre- heat label includes the address information for the one or more slice files for needing to preheat.
8. the method for claim 7, comprising:
The method for processing resource is applied to program request acceleration system, and the URL is that the terminal is obtained from index file, and
It carries in the terminal into the request to slice file that the program request acceleration system is sent;
Before the program request acceleration system receives terminal to the request of slice file, the method also includes:
The program request acceleration system obtains the index file from source station, the URL for the slice file for including from the index file
Selection will add the URL of pre- heat label in list;
The program request acceleration system is that after the URL of selection adds the pre- heat label respectively, the index file is sent
To the terminal.
9. method according to claim 8, comprising:
The program request acceleration system selects to add pre- heat label from the url list for the slice file that index file includes
URL, comprising: URL is selected according to the interval of setting in the url list, as the URL that add pre- heat label;
Address information in the pre- heat label includes that first URL after URL where the pre- heat label is wanted to next
Add all URL between the URL of pre- heat label.
10. a kind of resource processing unit characterized by comprising
Request receiving module, for receiving the uniform resource position mark URL of terminal transmission;
The pre-heat treatment module, when for determining that the URL includes pre- heat label, according to the pre- heat label to need to preheat one
A or multiple slice files carry out the pre-heat treatment;Wherein, the pre- heat label includes the one or more slice texts for needing to preheat
The address information of part.
11. device as claimed in claim 10, it is characterised in that:
The resource processing unit is arranged in program request acceleration system, and the URL is that the terminal obtains simultaneously from index file
It carries and is sent to the program request acceleration system in the request to slice file;
The resource processing unit further include: index file processing module, for obtaining the index file from source station, from described
Selection will add the URL of pre- heat label in the url list for the slice file that index file includes, and distinguish for the URL of selection
After adding the pre- heat label, the index file is sent to the terminal.
12. a kind of streaming media server, including memory, processor and it is stored on the memory and can be in the processor
The computer program of upper operation, which is characterized in that the processor realized when executing the calculation procedure as claim 1-3,
The processing of any method in 7-9.
13. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The processing of the method as described in any in claim 1-3,7-9 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711080019.1A CN109756782A (en) | 2017-11-06 | 2017-11-06 | A kind of method for processing resource, device and streaming media server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711080019.1A CN109756782A (en) | 2017-11-06 | 2017-11-06 | A kind of method for processing resource, device and streaming media server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109756782A true CN109756782A (en) | 2019-05-14 |
Family
ID=66400910
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711080019.1A Pending CN109756782A (en) | 2017-11-06 | 2017-11-06 | A kind of method for processing resource, device and streaming media server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109756782A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112104885A (en) * | 2020-09-09 | 2020-12-18 | 海看网络科技(山东)股份有限公司 | System and method for accelerating M3U8 initial playing speed in live broadcasting |
CN114138357A (en) * | 2021-10-29 | 2022-03-04 | 北京达佳互联信息技术有限公司 | Request processing method and device, electronic equipment, storage medium and product |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101686228A (en) * | 2008-09-27 | 2010-03-31 | 中兴通讯股份有限公司 | Multimedia slicing switching method and system based on content slicing |
CN103596067A (en) * | 2013-11-26 | 2014-02-19 | 深圳创维数字技术股份有限公司 | Television program transmission method and device based on HTTP real-time steam media protocol |
CN104602115A (en) * | 2015-01-13 | 2015-05-06 | 青岛海信宽带多媒体技术有限公司 | Method and system for switching of network television channels |
CN105872607A (en) * | 2016-03-31 | 2016-08-17 | 乐视控股(北京)有限公司 | Method, server and terminal device for providing multimedia contents |
CN105933799A (en) * | 2016-05-19 | 2016-09-07 | 成都虚拟世界科技有限公司 | Method and device for playing video |
WO2016197691A1 (en) * | 2015-06-08 | 2016-12-15 | 广州市动景计算机科技有限公司 | Method and apparatus for downloading streaming media |
-
2017
- 2017-11-06 CN CN201711080019.1A patent/CN109756782A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101686228A (en) * | 2008-09-27 | 2010-03-31 | 中兴通讯股份有限公司 | Multimedia slicing switching method and system based on content slicing |
CN103596067A (en) * | 2013-11-26 | 2014-02-19 | 深圳创维数字技术股份有限公司 | Television program transmission method and device based on HTTP real-time steam media protocol |
CN104602115A (en) * | 2015-01-13 | 2015-05-06 | 青岛海信宽带多媒体技术有限公司 | Method and system for switching of network television channels |
WO2016197691A1 (en) * | 2015-06-08 | 2016-12-15 | 广州市动景计算机科技有限公司 | Method and apparatus for downloading streaming media |
CN105872607A (en) * | 2016-03-31 | 2016-08-17 | 乐视控股(北京)有限公司 | Method, server and terminal device for providing multimedia contents |
CN105933799A (en) * | 2016-05-19 | 2016-09-07 | 成都虚拟世界科技有限公司 | Method and device for playing video |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112104885A (en) * | 2020-09-09 | 2020-12-18 | 海看网络科技(山东)股份有限公司 | System and method for accelerating M3U8 initial playing speed in live broadcasting |
CN112104885B (en) * | 2020-09-09 | 2022-06-24 | 海看网络科技(山东)股份有限公司 | System and method for accelerating M3U8 initial playing speed in live broadcasting |
CN114138357A (en) * | 2021-10-29 | 2022-03-04 | 北京达佳互联信息技术有限公司 | Request processing method and device, electronic equipment, storage medium and product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102111685B (en) | Acceleration method, equipment and system for network video loading | |
US20170164020A1 (en) | Content delivery method for content delivery network platform and scheduling proxy server | |
WO2017071228A1 (en) | Hls protocol-based method and system for live broadcast and client | |
CN104581374B (en) | A kind of method, node and server for obtaining section file and generating sub- m3u8 files | |
CN104093064B (en) | The method, system and device of video interactive are carried out between terminal devices | |
CN103813185B (en) | A kind of method that segment programs are quickly distributed, server and client | |
CN108063769B (en) | Method and device for realizing content service and content distribution network node | |
CN103929427A (en) | Dynamic multi-thread downloading device and method | |
WO2017166525A1 (en) | Method for providing multimedia content, server and terminal device | |
JP2013535054A (en) | Method, apparatus and system for updating a metadata file | |
CN103517157A (en) | Method and system for achieving HLS channel time-shifting playing | |
CN105323597A (en) | MP4 file playing method, MP4 file processing method, MP4 file playing device, MP4 file processing device and MP4 file playing system | |
CN110933517A (en) | Code rate switching method, client and computer readable storage medium | |
CN110139123A (en) | The broadcasting of files in stream media, transmission, treating method and apparatus | |
WO2018233539A1 (en) | Video processing method, computer storage medium, and device | |
CN112788126A (en) | Resource downloading method, device, server and storage medium | |
CN105721952A (en) | Live streaming network transmission method and system for equal-length slices | |
CN110290396B (en) | Video processing method, device, system, equipment and storage medium | |
CN110933460A (en) | Video splicing method and device and computer storage medium | |
CN109756782A (en) | A kind of method for processing resource, device and streaming media server | |
CN104702978A (en) | Video data locating method and network playing equipment | |
WO2016107197A1 (en) | Network program recording method, device and system, and recorded-program playing method and device | |
CN110958279B (en) | Data processing method and device | |
US9332421B2 (en) | Method and apparatus for random access to multimedia content in wireless communication system | |
CN106789655B (en) | Method and device for sending route announcement message |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190514 |