CN109819336A - Method and system for downloading fragments based on size of play cache - Google Patents

Method and system for downloading fragments based on size of play cache Download PDF

Info

Publication number
CN109819336A
CN109819336A CN201910100534.4A CN201910100534A CN109819336A CN 109819336 A CN109819336 A CN 109819336A CN 201910100534 A CN201910100534 A CN 201910100534A CN 109819336 A CN109819336 A CN 109819336A
Authority
CN
China
Prior art keywords
fragment
downloading
source
queue
loading source
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.)
Granted
Application number
CN201910100534.4A
Other languages
Chinese (zh)
Other versions
CN109819336B (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.)
Hunan MgtvCom Interactive Entertainment Media Co Ltd
Original Assignee
Hunan MgtvCom Interactive Entertainment Media 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 Hunan MgtvCom Interactive Entertainment Media Co Ltd filed Critical Hunan MgtvCom Interactive Entertainment Media Co Ltd
Priority to CN201910100534.4A priority Critical patent/CN109819336B/en
Publication of CN109819336A publication Critical patent/CN109819336A/en
Application granted granted Critical
Publication of CN109819336B publication Critical patent/CN109819336B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a system for downloading in a slicing mode based on the size of a playing cache, which are used for downloading video data required by playing a video in a slicing mode, regularly detecting the playable time length of the playing cache when the video data required by each current slicing is downloaded, and selecting an available downloading source with higher downloading speed as a downloading source of the next slicing if the playable time length of the playing cache is smaller than a first threshold; and if the playable time length of the play cache is greater than a second threshold value, selecting an available download source with lower bandwidth price as a download source of the next fragment, wherein the second threshold value is greater than the first threshold value. The method and the device can effectively reduce errors, reduce the playing pause chance and reduce the bandwidth cost, thereby improving the watching experience of the internet video on demand and improving the user viscosity of the video platform.

Description

A kind of method and system based on broadcasting cache size fragment downloading
Technical field
The present invention relates to internet video program request technologies, and in particular to a kind of based on the side for playing the downloading of cache size fragment Method and system.
Background technique
Currently, internet video program request is substantially http on-demand request, format mainly has mp4 and two kinds of hls.Conventional On-demand request, by way of the get of http/https request, to fringe node or the fringe node request data of cdn manufacturer, In a http on-demand process, data source only one can only be by retrying or hand when network failure occurs or playing abnormal It is dynamic to be switched to other nodes and just can solve, viewing experience is affected, video platform usage rate of the user is directly influenced.
Summary of the invention
The technical problem to be solved in the present invention: it in view of the above problems in the prior art, provides a kind of big based on caching is played The method and system of small fragment downloading.The present invention can be effectively reduced mistake, reduce broadcasting Caton chance, reduce bandwidth expense, To promote the viewing experience of internet video program request, the usage rate of the user of video platform is promoted.
In order to solve the above-mentioned technical problem, the technical solution adopted by the present invention are as follows:
A method of based on the downloading of cache size fragment is played, implementation steps include: to be downloaded needed for playing video based on fragment Video data, timing detection plays the playable duration of caching when the video data needed for downloading each current slice, If the playable duration for playing caching is less than first threshold, select the higher available downloads source of downloading rate as next The loading source of fragment;If the playable duration for playing caching is greater than second threshold, under selecting bandwidth price is lower can be used Loading source of the load source as next fragment, the second threshold are bigger than first threshold.
Optionally, the loading source of the next fragment of switching further include: if the playable duration for playing caching is greater than Third threshold value and it is less than second threshold, then is decided whether that the lower available downloads source of bandwidth price is selected to make according to preference strategy For the loading source of next fragment, selected if preference strategy is price priority the lower available downloads source of bandwidth price as The loading source of next fragment.
It optionally, further include selecting at least one not when the playable duration for playing caching is greater than second threshold The unavailable loading source is revised as by the step of available downloads source is detected offline if detecting loading source recovery Available downloads source.
Optionally, in described the step of being detected offline, do not restore yet if detecting the loading source, it can not by this It is revised as thoroughly discarded, subsequent no longer being detected offline with loading source.
Optionally, the higher available downloads source of selection downloading rate specifically refers to the selection downloading speed from online queue The higher available downloads source of rate is stored with all available downloads sources in the online queue and according under each loading source Rate is carried to be ranked up;The lower available downloads source of selection bandwidth price specifically refers to select bandwidth valence from price queue Lattice lower available downloads source is stored with all available downloads sources in the price queue and according to the band of each loading source Wide price is ranked up;The selection carries out offline detection at least one unavailable loading source and specifically refers to from offline queue Selection detects at least one unavailable loading source offline, and the offline queue is from being stored with all unavailable downloadings Source.
Optionally, it is described line queue be to program request dispatch server issue on-demand request after according to program request dispatch service Available downloads source and its downloading rate sequence in all loading sources of device return generate, and download needed for each current slice Video data after according to complete downloading loading source state and speed of download update its sequence in online queue; The price queue is that the loading source based on online queue increases or completes to update when reducing;Each current point of the downloading The loading source of failure is deleted from online queue, price queue if encountering loading source failure when video data needed for piece And offline queue is added.
Optionally, the loading source of next fragment is defaulted as when video data needed for described each current slice of downloading It keeps identical as the loading source of current slice.
Optionally, the detailed step of video data needed for the downloading broadcasting video based on fragment includes:
1) player sends playing request to program request dispatch server, receives broadcast address, all loading sources, loading source of return Price weight and video code rate;
2) player requests preference strategy to program request dispatch server, determines whether preference strategy is price priority;
3) returned according to all loading sources of return and program request dispatch server or local detection obtains or sheet The downloading rate and presence of each loading source of ground record generate online loading source online according to downloading rate sequence Queue generates price queue according to the price weight sequencing of loading source, and offline loading source is put into offline queue;
4) the fragment size of fragment size or setting default is set according to video code rate;
5) the fragment request queue for storing fragment request is established;
6) first fragment is requested according to the broadcast address of return, and fragment request uses http range request to obtain target The information of video file size;
7) it creates the fragment request of first fragment and adds it in fragment request queue;
8) the acquisition of information target video file size returned according to first fragment, by target video file size divided by fragment Size rounds up to obtain fragment total quantity again, and first fragment is as current slice;
9) video data needed for downloading current slice, if the failure of the loading source of current slice selection from online queue or Other available downloads sources are selected in price queue and are switched to new available downloads source;
Player starts to play based on the video data that current slice returns, and timing detection plays the playable duration of caching to refer to The loading source of fixed next fragment, defaults loading source of the available downloads source of current slice as next fragment;
Judge the fragment request that whether there is next fragment in fragment request queue, is asked if there is the fragment of next fragment It asks, then the loading source specified for the loading source setting of next fragment;If there is no the fragment request of next fragment, then sentence Whether the fixed fragment quantity created is equal to fragment total quantity, creates in fragment request queue if not equal to fragment total quantity Build the fragment request of new next fragment and the loading source specified for the setting of the loading source of next fragment;If current slice Required video data, which is downloaded, to be completed, then jumps execution step 10);Otherwise continue to jump execution step 9);
10) corresponding loading source is updated according to this downloading rate for completing downloading and is located at the position in online queue;
11) judge whether that downloading is completed in all fragments, if not yet completing downloading, selected in fragment request queue Next fragment jumps execution step 9) as new current slice;Otherwise, terminate and exit.
The present invention also provides a kind of based on the system for playing the downloading of cache size fragment, including computer equipment, the meter Calculate the step of machine equipment is programmed to perform the aforementioned method based on broadcasting cache size fragment downloading of the invention;Or the meter It calculates to be stored on the storage medium of machine equipment and is programmed to perform the aforementioned side based on broadcasting cache size fragment downloading of the present invention The computer program of method.
The present invention also provides a kind of computer readable storage medium, it is stored with and is compiled on the computer readable storage medium Journey is to execute the aforementioned computer program based on the method for playing the downloading of cache size fragment of the present invention.
Compared to the prior art, the present invention has an advantage that the present invention by playing end group in fragment downloading broadcasting Video data needed for video, video data needed for downloading broadcasting video based on fragment under existing video platform frame, from And play end http on-demand request is converted into fragment request, can be to multiple sources or node requests data, when source or distribution Fragment request can be switched to normal node requests data when node failure can effectively reduce error rate, work as downloading each The loading source of the next fragment of exchange-column shift when video data needed for preceding fragment, when played data is cached it is small when, it is automatic to select The higher node requests data of downloading rate is selected, Caton is reduced;It, can be more honest and cleaner to broadband when played data caches abundance The node requests data of valence, overall reduction bandwidth expense.Therefore, the present invention can be effectively reduced mistake, reduce broadcasting Caton Chance, reduction bandwidth expense promote the usage rate of the user of video platform to promote the viewing experience of internet video program request.
Detailed description of the invention
Fig. 1 is the basic procedure schematic diagram of present invention method.
Fig. 2 is the detailed process schematic diagram of present invention method.
Specific embodiment
As shown in Figure 1, implementation steps of the present embodiment based on the method for playing the downloading of cache size fragment include: to be based on dividing Video data needed for piece downloading plays video, timing detection broadcasting when the video data needed for download each current slice The playable duration of caching selects downloading rate is higher can if the playable duration for playing caching is less than first threshold Use loading source as the loading source of next fragment;If the playable duration for playing caching is greater than second threshold, band is selected Loading source of the wide lower available downloads source of price as next fragment, second threshold are bigger than first threshold.Wherein, the first threshold Value is the critical value of Caton, may then play generation Caton lower than first threshold, first threshold is used for when played data is slow When depositing too small, the higher node requests data of downloading rate is automatically selected, Caton is reduced;Second threshold is bigger one In general value, second threshold keep itself and Caton relationship little since the time is relatively long by the setting of threshold value, but It is bigger with the cost relation of reduction bandwidth, if current broadcasting caching is greater than second threshold, it can have bigger freedom Degree reduces the cost of bandwidth to select the price to meet the available downloads source of preset condition.In the present embodiment, first threshold 2 Second, second threshold is 10 seconds, and other values can be set as needed in unquestionable those skilled in the art.It is periodically examined in the present embodiment It surveys the playable duration for playing and caching to refer to every the playable duration of 1 second detection broadcasting caching, furthermore also can according to need Other detection cycles are set.The playable duration for playing caching can be obtained according to the timestamp of video frame, will be currently playing Video frame after the timestamp of most end video frame subtract the timestamp of currently playing video frame, can be obtained play caching can Playing duration.
Unquestionably, when the selection higher available downloads source of downloading rate, according to the downloading rate of current slice loading source Can determine all available downloads sources more higher than the downloading rate of current slice loading source as the first list to be selected, first to Select the downloading rate of all loading sources in list higher than the downloading rate of current slice loading source, it on this basis can basis It needs to select downloading rate highest in list to be selected or downloading rate time is high or downloading rate is minimum or downloading rate is more than Preset threshold or random available downloads source.
Unquestionably, when the selection lower available downloads source of bandwidth price, according to the bandwidth price of current slice loading source Can determine all available downloads sources more lower than the bandwidth price of current slice loading source as the second list to be selected, second to Select the downloading rate of all loading sources in list lower than the bandwidth price of current slice loading source, it on this basis can basis It needs to select bandwidth price minimum wherein or the low or bandwidth price highest of bandwidth price time or bandwidth price is lower than default threshold Value or random available downloads source.More lower than the bandwidth price of current slice loading source all using aforesaid way selection When available downloads source, it can not both consider downloading rate, the control effect of price is become apparent from this way;In addition it is also possible to root It is selected according to needing to be based on downloading rate, such as the downloading for requiring the downloading rate of loading source to be not less than current slice loading source Rate requires the difference of the downloading rate of loading source and the downloading rate of current slice loading source to be less than preset threshold etc., leads to Aforesaid way is crossed, the influence of downloading rate can be also more or less considered while controlled price, to realize control valence Lattice and the equilibrium for playing experience.
In the present embodiment, switch the loading source of next fragment further include: if the playable duration for playing caching is greater than Third threshold value and it is less than second threshold, then is decided whether that the lower available downloads source of bandwidth price is selected to make according to preference strategy For the loading source of next fragment, selected if preference strategy is price priority the lower available downloads source of bandwidth price as The loading source of next fragment.Third threshold value is one between second threshold, second threshold value, and third threshold value is with respect to the It is more sensitive for reducing the cost of bandwidth for two threshold values, but it may will affect fluency, it is therefore desirable to according to preferential Strategy selects loading source of the lower available downloads source of bandwidth price as next fragment to decide whether to enable.The present embodiment In, third threshold value is 5 seconds, and other values can be set as needed in unquestionable those skilled in the art.
It further include selecting at least one not when playing the playable duration of caching greater than second threshold in the present embodiment The unavailable loading source is revised as by the step of available downloads source is detected offline if detecting loading source recovery Available downloads source.Since the time of second threshold is longer (such as being 10 seconds in the present embodiment), it is next to can use the time It is detected offline, to detect whether that unavailable loading source has reverted to available mode, improves available downloads source more New efficiency.Be specially in the present embodiment select unavailable loading source the step of being detected offline with reduce time loss, It economizes on resources, unquestionably, the unavailable loading source detected offline is more, then time and resource consumption are bigger.
In the step of the present embodiment is detected offline, do not restore yet if detecting the loading source, this is unavailable Loading source is revised as thoroughly discarded, subsequent no longer being detected offline, that is to say, that if if a unavailable loading source even It is continuous detect twice it is unavailable, then it is subsequent no longer to be detected offline, to economize on resources;But aforesaid way is only a kind of excellent Mode is selected, unquestionably, can according to need that the detection times of unavailable loading source are arranged is more than just to carry out after specified threshold value It is thoroughly discarded, or also can according to need in the frequent situation of loading source Comparison of Gardening Activities setting from being not thorough discarded and adopt With being detected offline every time, these modes all more or less will cause the bandwidth and cpu resource of player or loading source It occupies.
In the present embodiment, the higher available downloads source of downloading rate is selected to specifically refer to the selection downloading speed from online queue The higher available downloads source of rate is stored with all available downloads sources in online queue and according to the downloading of each loading source speed Rate is ranked up;The selection lower available downloads source of bandwidth price specifically refers to select bandwidth price lower from price queue Available downloads source is stored with all available downloads sources in price queue and is arranged according to the bandwidth price of each loading source Sequence;Selection carries out offline detection at least one unavailable loading source and specifically refers to select at least one not from offline queue Available downloads source is detected offline, and offline queue is from being stored with all unavailable loading sources.By above-mentioned online queue, from Line queue, price queue enable to the higher available downloads source of selection downloading rate and select bandwidth price is lower can Temporary detecting is not needed when with loading source, so that setting is more efficient.
It should be noted that queue, offline queue, price queue can according to need and determined by node state manager online When safeguard.In the present embodiment, in order to promoted online queue, offline queue, price queue three maintenance efficiency, touched using event The mode of hair updates online queue, offline queue, price queue, specifically: online queue is to program request dispatch server The available downloads source and its downloading rate issued in all loading sources returned after on-demand request according to program request dispatch server is arranged Sequence generates, and after video data needed for downloading each current slice according to the state for the loading source for completing downloading and under It carries speed and updates its sequence in online queue;Price queue is that the loading source based on online queue is complete when increasing or reducing At update;When video data needed for downloading each current slice if encounter loading source failure if by the loading source of failure from It is deleted in online queue, price queue and offline queue is added.By the above-mentioned means, can greatly improve online queue, from The maintenance efficiency of line queue, price queue, so that the higher available downloads source of selection downloading rate and selection bandwidth price are more Temporary detecting is not needed when low available downloads source, is arranged more efficient.
In the present embodiment, when video data needed for downloading each current slice the loading source of next fragment be defaulted as It keeps identical as the loading source of current slice, the fluctuation of load of loading source in playing process can be reduced through the above way, made The stability for obtaining the downloading rate of each loading source is more preferable, so as to promote the scheduling essence for the loading source for switching next fragment Degree.In addition it is also possible to which the loading source default value of next fragment is arranged using other modes as needed, such as it is set as specified Default loading source, random loading source etc..
As shown in Fig. 2, the detailed step that the present embodiment downloads video data needed for playing video based on fragment includes:
1) player sends playing request to program request dispatch server, receives broadcast address, all loading sources, loading source of return Price weight and video code rate;
2) player requests preference strategy to program request dispatch server, determines whether preference strategy is price priority;
3) returned according to all loading sources of return and program request dispatch server or local detection obtains or sheet The downloading rate and presence of each loading source of ground record generate online loading source online according to downloading rate sequence Queue online_queue, price queue price_queue is generated according to the price weight sequencing of loading source, by offline downloading Source is put into offline queue offline_queue;The price weight of each loading source can both be returned by program request dispatch server, (such as CDN management server etc.) can also be requested to other servers by being preset at player local, or temporarily, under The state in load source can be realized by node state manager.
4) the fragment size of fragment size or setting default is set according to video code rate;
It is calculated according to code rate, according to 512KB paging, fragment size=(((video code rate (kbps)/8)+511)/ 512) * 512, unit K B;If using 512 KB of default value without video code rate;
5) the fragment request queue slice_queue for storing fragment request is established;
6) first fragment is requested according to the broadcast address of return, and fragment request uses http range request to obtain target The information of video file size;
7) it creates the fragment request of first fragment and adds it in fragment request queue slice_queue;
8) the acquisition of information target video file size returned according to first fragment, by target video file size divided by fragment Size rounds up to obtain fragment total quantity again, and first fragment is as current slice;
9) video data needed for downloading current slice selects if the failure of the loading source of current slice from online queue Other available downloads sources are selected in online_queue or price queue price_queue and are switched to new available downloads Source;
Player starts to play based on the video data that current slice returns, and timing detection plays the playable duration of caching to refer to The loading source of fixed next fragment, defaults loading source of the available downloads source of current slice as next fragment;
The fragment request that whether there is next fragment in fragment request queue slice_queue is judged, if there is next The fragment request of fragment, the then loading source specified for the loading source setting of next fragment;If there is no next fragment Fragment request, then determine whether the fragment quantity created is equal to fragment total quantity, is dividing if not equal to fragment total quantity The fragment request of new next fragment is created in piece request queue slice_queue and is arranged for the loading source of next fragment Specified loading source;If the downloading of video data needed for current slice is completed, execution step 10) is jumped;Otherwise continue to jump Turn to execute step 9);
In the present embodiment, aforementioned timing detection plays the playable duration of caching to specify the loading source of next fragment to be specifically Refer to: if the playable duration for playing caching is less than first threshold, the selection downloading speed from online queue online_queue Loading source of the higher available downloads source of rate as next fragment;If the playable duration for playing caching is greater than the second threshold Value, then select downloading of the lower available downloads source of bandwidth price as next fragment from price queue price_queue Source, second threshold are bigger than first threshold;If the playable duration for playing caching is greater than third threshold value and is less than second threshold, Decided whether according to preference strategy select the lower available downloads source of bandwidth price, if preference strategy be price priority if from Loading source of the lower available downloads source of bandwidth price as next fragment is selected in price queue price_queue;Otherwise Default loading source of the available downloads source of current slice as next fragment.
It further include from offline queue when playing the playable duration of caching greater than second threshold in the present embodiment The step that offline_queue selection detects a unavailable loading source (it is more also to can according to need selection) offline Suddenly, if detect the loading source recovery, which is revised as available downloads source, it may be assumed that by the loading source from It is deleted in offline queue offline_queue, it will further according to obtained downloading rate or its history downloading rate is detected offline It is inserted into corresponding position in online queue online_queue, is inserted into price queue price_queue according to price Corresponding position.
When the present embodiment is detected offline, do not restore yet if detecting the loading source, by the unavailable loading source It is revised as thoroughly discarded, subsequent no longer being detected offline, it may be assumed that directly delete it from offline queue offline_queue And it is added without online queue online_queue and price queue price_queue, the loading source thoroughly discarded later in this way It will not be used in online queue online_queue and price queue price_queue again, due to not in offline queue In offline_queue, offline detection will not detect the loading source thoroughly discarded again.
10) corresponding loading source is updated according to this downloading rate for completing downloading to be located in online queue online_queue Position;
11) judge whether that downloading is completed in all fragments, if downloading is not yet completed, in fragment request queue slice_ It selects next fragment as new current slice in queue, jumps execution step 9);Otherwise, terminate and exit.
In the present embodiment, stored for fragment request using fragment request queue slice_queue, and fragment request Current fragment request is stored in queue slice_queue, thereby increases and it is possible to which there are next fragment requests, and at current point of downloading It can generate next fragment request during the video data of piece and specify the loading source of next fragment request;In addition, can also To generate more fragment requests in fragment request queue slice_queue in advance as needed or all fragments are asked It asks, be then downloaded one by one again or Parallel download is carried out to multiple fragments simultaneously, equally also may be implemented current in downloading The loading source of next fragment request is specified during the video data of fragment.It is every to have downloaded a fragment then in the present embodiment It is deleted from fragment request queue slice_queue, furthermore also be can according to need and downloaded one using every and then mark To complete or deleting.In the present embodiment, for first fragment request in fragment request queue slice_queue, according to The broadcast address that program request dispatch server returns is downloaded video data, furthermore also can according to need from specified or random The downloading of video data is completed in available downloads source.
The present embodiment is playing end for http on-demand request conversion ingredient based on the method for playing the downloading of cache size fragment Piece request is switched to effective node when node failure in conjunction with broadcasting cache size and node state in time;It is cached when playing When size is too small, the faster node of speed of download is selected;When playing caching abundance enough, selects a good opportunity and select bandwidth more cheap Node;Compared to common http point broadcast mode, error rate, Caton rate and bandwidth cost are effectively reduced.
It should be noted that loading source may be different appellations in not homologous ray, such as in content distribution system CDN In may be named as distribution node, downloading node, data source etc. may be named as in other systems, but its essence be all Video file in internet with heterogeneous networks path stores computer node.
The present embodiment also provides a kind of based on the system for playing the downloading of cache size fragment, including computer equipment, the meter Calculate machine equipment be programmed to perform the present embodiment it is aforementioned based on play cache size fragment downloading method the step of.The present embodiment It also provides a kind of based on the system for playing the downloading of cache size fragment, including computer equipment, storage Jie of the computer equipment It is stored in matter and is programmed to perform the aforementioned computer program based on the method for playing the downloading of cache size fragment of the present embodiment, The computer program can for player or player with download function or in the downloader for having playing function, or Downloader of the person with simulation playing function.The present embodiment also provides a kind of computer readable storage medium, this is computer-readable It is stored on storage medium and is programmed to perform the aforementioned calculating based on the method for playing the downloading of cache size fragment of the present embodiment Machine program, the computer program can be for player or players with download function or in the case where there is playing function Carry device, or the downloader with simulation playing function.
The above is only a preferred embodiment of the present invention, protection scope of the present invention is not limited merely to above-mentioned implementation Example, all technical solutions belonged under thinking of the present invention all belong to the scope of protection of the present invention.It should be pointed out that for the art Those of ordinary skill for, several improvements and modifications without departing from the principles of the present invention, these improvements and modifications It should be regarded as protection scope of the present invention.

Claims (10)

1. a kind of based on the method for playing the downloading of cache size fragment, it is characterised in that implementation steps include: to be downloaded based on fragment Video data needed for playing video, timing detection, which plays, when the video data needed for download each current slice caches It can play duration, if the playable duration for playing caching is less than first threshold, select the higher available downloads of downloading rate Loading source of the source as next fragment;If the playable duration for playing caching is greater than second threshold, bandwidth price is selected Loading source of the lower available downloads source as next fragment, the second threshold are bigger than first threshold.
2. according to claim 1 based on the method for playing the downloading of cache size fragment, which is characterized in that under the switching The loading source of one fragment further include: if the playable duration for playing caching is greater than third threshold value and is less than second threshold, Decide whether the loading source for selecting the lower available downloads source of bandwidth price as next fragment according to preference strategy, if Preference strategy is that price priority then selects loading source of the lower available downloads source of bandwidth price as next fragment.
3. according to claim 2 based on the method for playing the downloading of cache size fragment, which is characterized in that described play is delayed It further include the step for selecting to detect at least one unavailable loading source offline when the playable duration deposited is greater than second threshold Suddenly, if detecting loading source recovery, which is revised as available downloads source.
4. it is according to claim 3 based on play cache size fragment downloading method, which is characterized in that it is described carry out from In the step of line detects, do not restore yet if detecting the loading source, by the unavailable loading source be revised as thoroughly it is discarded, after It is continuous no longer to be detected offline.
5. according to claim 4 based on the method for playing the downloading of cache size fragment, which is characterized in that under the selection Carry the higher available downloads source of rate specifically refer to from online queue select the higher available downloads source of downloading rate, it is described It is stored with all available downloads sources in line queue and is ranked up according to the downloading rate of each loading source;The selection band The wide lower available downloads source of price specifically refers to select the lower available downloads source of bandwidth price, the valence from price queue It is stored with all available downloads sources in lattice queue and is ranked up according to the bandwidth price of each loading source;The selection pair At least one unavailable loading source carries out offline detection and specifically refers to select from offline queue at least one unavailable downloading Source is detected offline, and the offline queue is from being stored with all unavailable loading sources.
6. according to claim 5 based on the method for playing the downloading of cache size fragment, which is characterized in that the online team Be classified as to program request dispatch server issue on-demand request after according to program request dispatch server return all loading sources in can It is generated with loading source and its downloading rate sequence, and according to completion after video data needed for downloading each current slice The state and speed of download of the loading source of downloading update its sequence in online queue;The price queue is based on online team The loading source of column increases or completes to update when reducing;If met when video data needed for described each current slice of downloading Then the loading source of failure is deleted from online queue, price queue to loading source failure and offline queue is added.
7. according to claim 1 based on the method for playing the downloading of cache size fragment, which is characterized in that the downloading is every The loading source of next fragment is defaulted as keeping the loading source phase with current slice when video data needed for one current slice Together.
8. based on the method for playing the downloading of cache size fragment described according to claim 1~any one of 7, feature exists In the detailed step of video data needed for the downloading broadcasting video based on fragment includes:
1) player sends playing request to program request dispatch server, receives broadcast address, all loading sources, loading source of return Price weight and video code rate;
2) player requests preference strategy to program request dispatch server, determines whether preference strategy is price priority;
3) returned according to all loading sources of return and program request dispatch server or local detection obtains or sheet The downloading rate and presence of each loading source of ground record generate online loading source online according to downloading rate sequence Queue generates price queue according to the price weight sequencing of loading source, and offline loading source is put into offline queue;
4) the fragment size of fragment size or setting default is set according to video code rate;
5) the fragment request queue for storing fragment request is established;
6) first fragment is requested according to the broadcast address of return, and fragment request uses http range request to obtain target The information of video file size;
7) it creates the fragment request of first fragment and adds it in fragment request queue;
8) the acquisition of information target video file size returned according to first fragment, by target video file size divided by fragment Size rounds up to obtain fragment total quantity again, and first fragment is as current slice;
9) video data needed for downloading current slice, if the failure of the loading source of current slice selection from online queue or Other available downloads sources are selected in price queue and are switched to new available downloads source;
Player starts to play based on the video data that current slice returns, and timing detection plays the playable duration of caching to refer to The loading source of fixed next fragment, defaults loading source of the available downloads source of current slice as next fragment;
Judge the fragment request that whether there is next fragment in fragment request queue, is asked if there is the fragment of next fragment It asks, then the loading source specified for the loading source setting of next fragment;If there is no the fragment request of next fragment, then sentence Whether the fixed fragment quantity created is equal to fragment total quantity, creates in fragment request queue if not equal to fragment total quantity Build the fragment request of new next fragment and the loading source specified for the setting of the loading source of next fragment;If current slice Required video data, which is downloaded, to be completed, then jumps execution step 10);Otherwise continue to jump execution step 9);
10) corresponding loading source is updated according to this downloading rate for completing downloading and is located at the position in online queue;
11) judge whether that downloading is completed in all fragments, if not yet completing downloading, selected in fragment request queue Next fragment jumps execution step 9) as new current slice;Otherwise, terminate and exit.
9. a kind of based on the system for playing the downloading of cache size fragment, including computer equipment, it is characterised in that: the computer Equipment is programmed to perform the step based on the method for playing the downloading of cache size fragment described in any one of claim 1~8 Suddenly;Or it is stored with and is programmed to perform described in any one of claim 1~8 on the storage medium of the computer equipment Computer program based on the method for playing the downloading of cache size fragment.
10. a kind of computer readable storage medium, it is characterised in that: be stored with and be programmed on the computer readable storage medium With the computer program based on the method for playing the downloading of cache size fragment described in any one of perform claim requirement 1~8.
CN201910100534.4A 2019-01-31 2019-01-31 Method and system for downloading fragments based on size of play cache Active CN109819336B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910100534.4A CN109819336B (en) 2019-01-31 2019-01-31 Method and system for downloading fragments based on size of play cache

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910100534.4A CN109819336B (en) 2019-01-31 2019-01-31 Method and system for downloading fragments based on size of play cache

Publications (2)

Publication Number Publication Date
CN109819336A true CN109819336A (en) 2019-05-28
CN109819336B CN109819336B (en) 2020-12-04

Family

ID=66606304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910100534.4A Active CN109819336B (en) 2019-01-31 2019-01-31 Method and system for downloading fragments based on size of play cache

Country Status (1)

Country Link
CN (1) CN109819336B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110198495A (en) * 2019-06-28 2019-09-03 广州市百果园信息技术有限公司 A kind of method, apparatus, equipment and the storage medium of video download and broadcasting
CN111614717A (en) * 2020-04-10 2020-09-01 网宿科技股份有限公司 File access scheduling method and central server
CN113259229A (en) * 2020-02-13 2021-08-13 阿里巴巴集团控股有限公司 Data processing method and device and gateway equipment
CN113490046A (en) * 2021-07-05 2021-10-08 湖南快乐阳光互动娱乐传媒有限公司 Method, device, equipment and storage medium for multi-source caching of video data
CN113490186A (en) * 2021-08-25 2021-10-08 深圳市万佳安物联科技股份有限公司 Real-time communication method and system for cloud video enhancement p2p
CN114189715A (en) * 2021-12-07 2022-03-15 北京奇艺世纪科技有限公司 Download address switching method and related equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547395A (en) * 2011-12-31 2012-07-04 上海聚力传媒技术有限公司 Method and device for determining video data source of network player
CN102571894A (en) * 2010-12-07 2012-07-11 中国电信股份有限公司 Transmission control method and player of online streaming media
US20140241415A1 (en) * 2013-02-27 2014-08-28 Apple Inc. Adaptive streaming techniques
CN105898388A (en) * 2016-04-05 2016-08-24 合网络技术(北京)有限公司 Node downloading scheduling method and node downloading scheduling device
CN105897853A (en) * 2015-12-29 2016-08-24 乐视云计算有限公司 Peer-to-peer network connection method and device
CN106331084A (en) * 2016-08-22 2017-01-11 深圳Tcl新技术有限公司 Software background adaptive upgrading method and apparatus
CN108282547A (en) * 2018-01-18 2018-07-13 北京奇艺世纪科技有限公司 Resource accesses pre-control method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571894A (en) * 2010-12-07 2012-07-11 中国电信股份有限公司 Transmission control method and player of online streaming media
CN102547395A (en) * 2011-12-31 2012-07-04 上海聚力传媒技术有限公司 Method and device for determining video data source of network player
US20140241415A1 (en) * 2013-02-27 2014-08-28 Apple Inc. Adaptive streaming techniques
CN105897853A (en) * 2015-12-29 2016-08-24 乐视云计算有限公司 Peer-to-peer network connection method and device
CN105898388A (en) * 2016-04-05 2016-08-24 合网络技术(北京)有限公司 Node downloading scheduling method and node downloading scheduling device
CN106331084A (en) * 2016-08-22 2017-01-11 深圳Tcl新技术有限公司 Software background adaptive upgrading method and apparatus
CN108282547A (en) * 2018-01-18 2018-07-13 北京奇艺世纪科技有限公司 Resource accesses pre-control method and device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110198495A (en) * 2019-06-28 2019-09-03 广州市百果园信息技术有限公司 A kind of method, apparatus, equipment and the storage medium of video download and broadcasting
CN113259229A (en) * 2020-02-13 2021-08-13 阿里巴巴集团控股有限公司 Data processing method and device and gateway equipment
CN113259229B (en) * 2020-02-13 2023-04-07 阿里巴巴集团控股有限公司 Data processing method and device and gateway equipment
CN111614717A (en) * 2020-04-10 2020-09-01 网宿科技股份有限公司 File access scheduling method and central server
CN113490046A (en) * 2021-07-05 2021-10-08 湖南快乐阳光互动娱乐传媒有限公司 Method, device, equipment and storage medium for multi-source caching of video data
CN113490046B (en) * 2021-07-05 2022-06-07 湖南快乐阳光互动娱乐传媒有限公司 Method, device, equipment and storage medium for multi-source caching of video data
CN113490186A (en) * 2021-08-25 2021-10-08 深圳市万佳安物联科技股份有限公司 Real-time communication method and system for cloud video enhancement p2p
CN114189715A (en) * 2021-12-07 2022-03-15 北京奇艺世纪科技有限公司 Download address switching method and related equipment

Also Published As

Publication number Publication date
CN109819336B (en) 2020-12-04

Similar Documents

Publication Publication Date Title
CN109819336A (en) Method and system for downloading fragments based on size of play cache
US9916250B2 (en) Method for using service level objectives to dynamically allocate cache resources among competing workloads
CN107124630B (en) Method and device for node data management
DK2454680T3 (en) SYSTEM AND PROCEDURE FOR DISTRIBUTING DIGITAL CONTENT
CN105338027B (en) Carry out the method, system and device of video data cloud storage
EP2290912A1 (en) Content distributing method, service redirecting method and system, node device
CN105339922A (en) Personal over-the-top network video recorder
CN102546226B (en) Multi-node-based network service provision system and method
CN101247402A (en) Multimedia files downloading and broadcasting system and method
CN110830533B (en) HTTP scheduling method and system for cloud distribution network
JP2005149387A5 (en)
Nair et al. A rank based replacement policy for multimedia server cache using zipf-like law
CN107908730B (en) Method and device for downloading data
US20130204959A1 (en) Systems and methods of real-time data subscription and reporting for telecommunications systems and devices
US8713052B2 (en) File management apparatus and file management apparatus controlling method
CN111045715A (en) Hot updating method and system of cloud game and readable storage medium
US10165040B2 (en) Small disk support for large cloud-based storage systems
US9210451B2 (en) Replication decision in P2P VoD systems
CN110062280A (en) P2P-oriented video cache management and playing method, system and medium
US11586515B1 (en) Data ingestion replication and disaster recovery
CN101551781A (en) Method of magnetic disc cache replacement in P2P video on demand system
US20200133883A1 (en) Asynchronous Tracking for High-Frequency and High-Volume Storage
CN104010046A (en) Server selecting method and system, recording server and measurement servers
Wu et al. Reuse time based caching policy for video streaming
CN115550368B (en) Metadata reporting method, device, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant