CN107241398B - A kind of method for downloading video based on content distributing network - Google Patents
A kind of method for downloading video based on content distributing network Download PDFInfo
- Publication number
- CN107241398B CN107241398B CN201710375362.2A CN201710375362A CN107241398B CN 107241398 B CN107241398 B CN 107241398B CN 201710375362 A CN201710375362 A CN 201710375362A CN 107241398 B CN107241398 B CN 107241398B
- Authority
- CN
- China
- Prior art keywords
- video
- node
- video clip
- time
- content
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention provides a kind of method for downloading video based on content distributing network, this method receives the video clip of the request downloading of requesting node sending first, then judge whether there is the request viewing beginning and ending time with the request video clip to have overlapping video clip in other content node, if there is, each video clip of the content node judged is done into intersection or union processing, then processing is compared in the set of acquisition again, corresponding content node is established into P2P network peer protocol according to the result for comparing processing, if it is judged that not having, judge the duration of the video clip of request, video is split processing according to the duration of video clip, then the video file sent to requesting node is judged further according to the bandwidth of requesting node, the efficiency of video download is significantly improved after handling above, and release data source service Device improves higher redundancy bandwidth, can provide download service for more clients.
Description
Technical field
The invention belongs to video download field, in particular to a kind of method for downloading video based on content distributing network.
Background technique
Content distributing network (Content Delivery Network, CDN) technology be it is a kind of by content from center service
Device is distributed to the client close to user, to realize the method that the distribution of content accesses nearby.CDN technology effectively improves
The service quality of access to content, and support large-scale concurrent access ability.
However, existing CDN network has certain problems in independent content construction bearer network, such as present
CDN is unified to CDN data source server downloading data when carrying out content downloading, due to the number downloaded from data source server
Amount is relatively more, not can guarantee the efficiency of downloading.In turn resulting in CDN data source server, over-burden, bandwidth pressure it is larger and
CDN node scalability is poor.In order to solve the above-mentioned technical problem, CN105872764 is disclosed under a kind of data based on P2P network
Support method.P2P technology has many advantages, such as to eliminate server bottleneck and balances flow distribution, so the prior art is by each content section
Point is performed both by Peer-to-Peer Network P2P agreement, solves existing video download and distribution and excessively relies on CDN data source server, causes
Poor expandability, CDN data source server the problem of over-burden, but the technology brings another problem therewith, is exactly right
Equal network P 2 Ps agreement is also to need bandwidth, when each child node is performed both by Peer-to-Peer Network P2P agreement, can also give data source
The bandwidth of server brings biggish pressure, and the child node having is present due to by network speed etc., when application
It is fewer, it is also executed to Peer-to-Peer Network P2P agreement, waste bandwidth resource, and be not necessarily to foundation pair between the child node having
Equal networks, because it may there is no the video clips that requesting node needs.
Summary of the invention
In order to solve the problems in the existing technology, the present invention provides a kind of video download based on content distributing network
Method, this method guarantees that data source server has the bandwidth of redundancy, alleviates the bandwidth pressure of data source server, improves video
The efficiency of downloading.
Specific technical solution of the present invention is as follows:
The present invention provides a kind of method for downloading video based on content distributing network, which includes data source
Server, several requesting nodes being connected with data source server and content node, each requesting node and content node have
Unique IP address;This method comprises the following steps:
S1: requesting node issues the request message of request foradownloaded video segment, includes requesting node in the request message
IP address, video name and request viewing beginning and ending time;
S2: judging the video clip for whether having Chong Die with the request viewing beginning and ending time in each content node, if so, carrying out
Step S3, if not provided, carrying out step S4;
S3: doing different process of aggregation for the beginning and ending time of video clip each in the content node judged, and by content
The IP address and peer network P2P agreement that processing sends content node to requesting node is compared in video clip in node
File;
S4: according to the duration size of request video clip, being split video clip, and combines the band of requesting node
Width judges the video stream file sent to requesting node.
Further to improve, step S3 includes:
S31: each video clip corresponding beginning and ending time and request viewing beginning and ending time are done into intersection processing respectively, obtained more
A one level temporal section intersection;
S32: judging whether the beginning and ending time of each one level temporal section intersection has continuously, if so, carrying out step S33;
S33: the beginning and ending time of continuous period intersection is done into union processing, obtains period union;
S34: period union and remaining period intersection are done into intersection processing again, obtain the intersection of second level period;
S35: judge whether the intersection of second level period is empty, if being not sky, step S36 is carried out, if it is sky, by the time
The corresponding each content node of section union, carries out step S37;
S36: calculating separately period union and has in the corresponding content node of the one level temporal section intersection of intersection with it
Video length picks out the corresponding content node of the longest video clip of video length, carries out step S37;
S37: processing is compared in the video clip in content node, and will foundation pair between requesting node and content node
Equal volume grids P2P agreement.
It is further to improve, step S3 further include:
S38: when step S32 judges that the beginning and ending time section of one level temporal section intersection does not have consecutive hours, by each one level temporal section
Intersection carries out intersection processing again, obtains the intersection of three-level period;
S39: judging whether the intersection of three-level period is sky, if it is sky, will have intersection with the request viewing beginning and ending time
The corresponding content node of video clip carries out step S37, if being not sky, carries out step S310;
S310: the video length in the corresponding content node of each one level temporal section intersection is calculated separately, when picking out video
The corresponding content node of the longest video clip of length carries out step S37.
It is further to improve, step S3 further include:
S311: when the longest video length number in the content node that step S310 is calculated is greater than 1, selection starting first
It time and terminates time and step S37 and is sent to the corresponding beginning and ending time of video clip in the content node of requesting node and have overlapping
Content node, carry out step S37;If not provided, reselection and step S37 are sent to video in the content node of requesting node
Segment corresponding beginning and ending time closest content node carries out step S37.
Further to improve, step S37 includes:
S371: each video clip corresponding beginning and ending time in each content node is subjected to union processing, when obtaining second level
Between section union, and by the second level period union with request viewing the beginning and ending time be compared, when the second level period union with
The request viewing beginning and ending time is completely overlapped, by the corresponding all the elements node of second level period union, carries out step S372;
S372: the IP address and peer network P2P document of agreement of each content node are sent to requesting node.
It is further to improve, step S37 further include:
S373: when step S371 judge second level period union and request viewing the beginning and ending time it is not exclusively be overlapped, first
The number N for judging video clip in second level period union carries out step S374 if N=1;
S374: the initial time for judging the initial time T1 of video clip, terminating time T2 and request viewing beginning and ending time
T3 and the relationship for terminating time T4 carry out step S375, when T1 is later than T3 or T2 earlier than T4 when T1 is later than T4 earlier than T3 or T2
When, carry out step S376;
S375: video clip corresponding in content node is split processing from T3 or T4 time point;
S376: the time difference of T1 and T3 or T2 and T4 are calculated;
S377: the obtained time difference is compared with time difference threshold value △ T1, as time difference >=△ T1, carries out step
S378;As time difference < △ T1, step S379 is carried out;
S378: the request of the corresponding video clip of download time difference is sent to data source server;
S379: the prompt information whether prompt downloads this section of video is sent to requesting node.
It is further to improve, step S37 further include:
S3710: when step S373 judges N > 1, judge the initial time of first video clip in second level period union
T1 and the time T2 that terminates of the last one video clip watch the initial time T3 of beginning and ending time with request and terminate time T4's
Relationship carries out step S375 when T1 is later than T4 earlier than T3 or T2, when T1 is later than T3 or T2 earlier than T4, carries out step S376.
It is further to improve, step S37 further include:
S3711: judge two adjacent video clips the termination time and initial time whether be it is continuous, if not
Continuously, step S3712 is carried out;
S3712: the initial time of the termination time and n-th video clip of the N-1 video clip of record, and calculate
Begin time and the time difference for terminating the time, carries out step S377.
Further to improve, step S4 includes:
S41: the duration C of the video clip of computation requests node request and is compared with duration threshold value C1, as C≤C1,
Carry out step S42;
S42: by two layers of file of video flowing ingredient of video clip, based on layer and enhancement layer, and enhancement layer is divided
It cuts;
S43: the moment judges the bandwidth of requesting node, when band is wider than bandwidth threshold, by basal layer and enhancement layer files
It is sent to requesting node, when bandwidth is less than bandwidth threshold, basal layer file is only sent to requesting node.
It is further to improve, step S4 further include:
S44: when step S41 judges C > C1, video clip is first divided into multiple sub-video segments, then again by sub- view
Frequency fragment segmentation at two layers of file, based on layer and enhancement layer, and enhancement layer is split;
S45: the basal layer of the first sub-video segment and prompt information are first sent to requesting node;
S46: when receiving requesting node transmission continuation foradownloaded video, the basal layer of remaining sub-video node and enhancement layer are pressed
It is sent according to step S43;
S47: when receiving requesting node transmission not foradownloaded video, stop sending remaining sub-video segment.
Beneficial effects of the present invention are as follows:
The present invention provides a kind of method for downloading video based on content distributing network, and this method receives requesting node hair first
Then whether the video clip of request downloading out judges to have in other content node and watch with the request of the request video clip
There is the video clip of overlapping in beginning and ending time, if so, each video clip of the content node judged is done into intersection or union processing,
Then processing is compared in the set of acquisition again, corresponding content node is established by P2P network according to the result for comparing processing
Peer protocol judges the duration of the video clip of request, is carried out video according to the duration of video clip if it is judged that not having
Then dividing processing judges the video file sent to requesting node further according to the bandwidth of requesting node, after handling above
The efficiency of video download is significantly improved, and releases data source server, improves higher redundancy bandwidth, it can be for more
More clients provides download service.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the method for downloading video based on content distributing network of embodiment 1;
Fig. 2 is the flow chart of 2 step S3 of embodiment;
Fig. 3 is the schematic diagram of 3 step S37 of embodiment;
Fig. 4 is the flow chart of 4 step S4 of embodiment.
Specific embodiment
Invention is further described in detail with following embodiment with reference to the accompanying drawing.
Embodiment 1
The embodiment of the present invention 1 provides a kind of method for downloading video based on content distributing network, the content distributing network packet
Several requesting nodes and content node for including data source server, being connected with data source server, each requesting node and content
Node has unique IP address;As shown in Figure 1, this method comprises the following steps:
S1: requesting node issues the request message of request foradownloaded video segment, includes requesting node in the request message
IP address, video name and request viewing beginning and ending time;
S2: judging the video clip for whether having Chong Die with the request viewing beginning and ending time in each content node, if so, carrying out
Step S3, if not provided, carrying out step S4;
S3: doing different process of aggregation for the beginning and ending time of video clip each in the content node judged, and by content
The IP address and peer network P2P agreement that processing sends content node to requesting node is compared in video clip in node
File;
S4: according to the duration size of request video clip, being split video clip, and combines the band of requesting node
Width judges the video stream file sent to requesting node.
The present invention provides a kind of method for downloading video based on content distributing network, and this method receives requesting node hair first
Then whether the video clip of request downloading out judges to have in other content node and watch with the request of the request video clip
There is the video clip of overlapping in beginning and ending time, if so, each video clip of the content node judged is done into intersection or union processing,
Then processing is compared in the set of acquisition again, corresponding content node is established by P2P network according to the result for comparing processing
Peer protocol judges the duration of the video clip of request, is carried out video according to the duration of video clip if it is judged that not having
Then dividing processing judges the video file sent to requesting node further according to the bandwidth of requesting node, after handling above
The efficiency of video download is significantly improved, and releases data source server, improves higher redundancy bandwidth, it can be for more
More clients provides download service.
Embodiment 2
The embodiment of the present invention 2 provides a kind of method for downloading video based on content distributing network, this method and embodiment 1
It is essentially identical, unlike, as shown in Fig. 2, step S3 includes:
S31: each video clip corresponding beginning and ending time and request viewing beginning and ending time are done into intersection processing respectively, obtained more
A one level temporal section intersection;
S32: judging whether the beginning and ending time of each one level temporal section intersection has continuously, if so, carrying out step S33;
S33: the beginning and ending time of continuous period intersection is done into union processing, obtains period union;
S34: period union and remaining period intersection are done into intersection processing again, obtain the intersection of second level period;
S35: judge whether the intersection of second level period is empty, if being not sky, step S36 is carried out, if it is sky, by the time
The corresponding each content node of section union, carries out step S37;
S36: calculating separately period union and has in the corresponding content node of the one level temporal section intersection of intersection with it
Video length picks out the corresponding content node of the longest video clip of video length, carries out step S37;
S37: processing is compared in the video clip in content node, and will foundation pair between requesting node and content node
Equal volume grids P2P agreement;
S38: when step S32 judges that the beginning and ending time section of one level temporal section intersection does not have consecutive hours, by each one level temporal section
Intersection carries out intersection processing again, obtains the intersection of three-level period;
S39: judging whether the intersection of three-level period is sky, if it is sky, will have intersection with the request viewing beginning and ending time
The corresponding content node of video clip carries out step S37, if being not sky, carries out step S310;
S310: the video length in the corresponding content node of each one level temporal section intersection is calculated separately, when picking out video
The corresponding content node of the longest video clip of length carries out step S37;
S311: when the longest video length number in the content node that step S310 is calculated is greater than 1, selection starting first
It time and terminates time and step S37 and is sent to the corresponding beginning and ending time of video clip in the content node of requesting node and have overlapping
Content node, carry out step S37;If not provided, reselection and step S37 are sent to video in the content node of requesting node
Segment corresponding beginning and ending time closest content node carries out step S37.
The present invention is further defined step 3, detailed process reference table 1: assuming that the video clip of request viewing
Beginning and ending time be 1-50min, first by content node each video clip corresponding beginning and ending time and request viewing start-stop
Time (1-50min) does intersection processing, obtains the intersection of one level temporal section and is respectively as follows: 1:00-10:00,2:00-4:59,5:00-
10:00、5:00-11:00、12:00-20:00、15:00-19:00、15:00-22:00、23:00-25:00、25:01-45:00、
21:00-40:00,46:00-50:00. judge whether the beginning and ending time of each one level temporal section intersection has continuously, wherein 2:00-
4:59 and 5:00-10:00 is that continuously, 23:00-25:00 and 25:01-45:00 are continuously, by continuous period intersection
Beginning and ending time do union processing, obtaining period union is 2:00-10:00,23:00-45:00;By period union and its
Intersection processing is done in remaining period intersection again, obtains the intersection of second level period, then judges whether the intersection of second level period is sky again,
If being not sky, the video length of period union and the period intersection for having intersection with it, the view of content node A are calculated separately
A length of 9min when frequency, the when a length of 8min of second level period intersection, the when a length of 22min, content node G of second level period union
A length of 19min when corresponding, thus to requesting node send content node A, content node H and content node I IP address and
If it is sky processing is compared, and request is saved in video clip in content node by peer network P2P document of agreement
Peer network P2P agreement is established between point and content node;There is no consecutive hours when the beginning and ending time for judging one level temporal section intersection,
Such as 12:00-20:00,15:00-19:00,15:00-22:00,46:00-50:00 do not have it is continuous, by 12:00-20:00,
15:00-19:00,15:00-23:00,46:00-50:00 do intersection processing again, obtain the intersection of three-level period, judge 46:00-
The corresponding three-level period intersection of 60:00 is sky, so selecting content node K, the IP of content node K is sent to requesting node
The three-level period of address and peer network P2P document of agreement, 12:00-20:00,15:00-19:00,15:00-23:00 hands over
Collection is not sky, calculates the when a length of 8min of video clip in content node E, the when a length of 4min of video clip in content node F,
The when a length of 8min of video clip, selects the longest content node E and G of duration, there are two discoveries, first root in content node G
It is the corresponding 1:00-10:00 of content node A, the corresponding 21:00- of content node H according to the beginning and ending time for being sent to requesting node
The corresponding 25:01-35:00 of 25:00, content node I and content node K corresponding 46:00-60:00, content node E and G are corresponding
Beginning and ending time be respectively 12:00-20:00 and 15:00-23:00, the corresponding termination time 20:00 of discovery content node E with it is interior
It is closest to hold the corresponding 21:00 of node H, so selection content node E, to requesting node send content node E IP address and
Peer network P2P document of agreement.By the content node A (1:00-10:00) selected, content node E (12:00-20:00),
Content node H (21:00-25:00), content node I (25:01-45:00) and content node K (46:00-60:00) and request save
Peer network P2P agreement is established between point.
The content node that table 1 selects
Embodiment 3
The embodiment of the present invention 3 provides a kind of method for downloading video based on content distributing network, this method and embodiment 2
It is essentially identical, unlike, as shown in figure 3, step S37 includes:
S371: each video clip corresponding beginning and ending time in each content node is subjected to union processing, when obtaining second level
Between section union, and by the second level period union with request viewing the beginning and ending time be compared, when the second level period union with
The request viewing beginning and ending time is completely overlapped, by the corresponding all the elements node of second level period union, carries out step S372;
S372: peer network P2P agreement will be established between requesting node and each content node;
S373: when step S371 judge second level period union and request viewing the beginning and ending time it is not exclusively be overlapped, first
The number N for judging video clip in second level period union carries out step S374 if N=1;
S374: the initial time for judging the initial time T1 of video clip, terminating time T2 and request viewing beginning and ending time
T3 and the relationship for terminating time T4 carry out step S375, when T1 is later than T3 or T2 earlier than T4 when T1 is later than T4 earlier than T3 or T2
When, carry out step S376;
S375: video clip corresponding in content node is split processing from T3 or T4 time point;
S376: the time difference of T1 and T3 or T2 and T4 are calculated;
S377: the obtained time difference is compared with time difference threshold value △ T1, as time difference >=△ T1, carries out step
S378;As time difference < △ T1, step S379 is carried out;
S378: the request of the corresponding video clip of download time difference is sent to data source server;
S379: the prompt information whether prompt downloads this section of video is sent to requesting node;
S3710: when step S373 judges N > 1, judge the initial time of first video clip in second level period union
T1 and the time T2 that terminates of the last one video clip watch the initial time T3 of beginning and ending time with request and terminate time T4's
Relationship carries out step S375 when T1 is later than T4 earlier than T3 or T2, when T1 is later than T3 or T2 earlier than T4, carries out step S376;
S3711: judge two adjacent video clips the termination time and initial time whether be it is continuous, if not
Continuously, step S3712 is carried out;
S3712: the initial time of the termination time and n-th video clip of the N-1 video clip of record, and calculate
Begin time and the time difference for terminating the time, carries out step S377.
The present invention is further handled the video clip in the content node of acquisition, and embodiment 2 selects content node
For content node A (1:00-10:00), content node E (12:00-20:00), content node H (21:00-25:00), content section
Point I (25:01-45:00) and content node K (46:00-60:00), by the video clip corresponding beginning and ending time in these nodes
Do union processing, obtain second level period union (1:00-10:00,12:00-20:00,21:00-45:00,46:00-60:
00) it, and by the union with the request viewing beginning and ending time is compared, when the second level period union and request viewing beginning and ending time
It is completely overlapped, the IP address of the corresponding all the elements node of second level period union and peer network P2P document of agreement is equal
It is sent to requesting node;When judgement not exclusively overlapping, the number N=4 of video clip in second level period union is judged, if
N=1, second level period union are (00:30-51:00), judge the initial time T1 of video clip, terminate time T2 and request
Watch the beginning and ending time initial time T3 and terminate time T4 relationship, 00:30 earlier than request watch initial time 1:00,51:
00, which is later than request viewing, terminates time 50:00, and video clip corresponding in content node is split from 1:00,50:00,
For another example second level period union is (2:00-40:00), and 2:00 is later than request viewing initial time 1:00,40:00 and sees earlier than request
It sees and terminates time 50:00, the time difference for calculating 2:00 and 1:00,40:00 and 50:0 is respectively 1min and 10min, will be with the time
Poor threshold value 2min is compared, and 1min is less than 2min, sends the prompt information whether prompt downloads this section of video to requesting node,
10min is greater than 2min, and the request of the corresponding video clip of download time difference is sent to data source server, when N is greater than 1, example
Such as N=4, the end of the initial time 1:00 of first video clip and the last one video clip in second level period union are judged
Only the time 60:00 and initial time 1:00 of request viewing beginning and ending time and the relationship for terminating time 50:00, discovery terminate the time
60:00 is later than 50:00, so needing video clip corresponding in content node being split processing from 50:00, then judges
The termination time of 1:00-10:00 video clip corresponding with 12:00-20:00 and initial time are not continuous, calculating 1:00-
Termination time 10:00 of 10:00 video clip and the time difference of the initial time 12:00 of 12:00-20:00 video clip be
2min, 2min=2min send the request of the corresponding video clip of download time difference to data source server, calculate 12:00-
Termination time 20:00 of 20:00 video clip and the time difference of the initial time 21:00 of 21:00-45:00 video clip be
1min, 1min are less than 2min, send the prompt information whether prompt downloads this section of video to requesting node;Calculate 21-45:00 view
The time difference of the initial time 46:00 for terminating time 45:00 and 46:00-60:00 video clip of frequency segment is 1min, 1min
Less than 2min, the prompt information whether prompt downloads this section of video is sent to requesting node, to complete the downloading of entire video
Task.
Embodiment 4
The embodiment of the present invention 4 provides a kind of method for downloading video based on content distributing network, this method and embodiment 3
It is essentially identical, unlike, as shown in figure 4, step S4 includes:
S41: the duration C of the video clip of computation requests node request and is compared with duration threshold value C1, as C≤C1,
Carry out step S42;
S42: by two layers of file of video flowing ingredient of video clip, based on layer and enhancement layer, and enhancement layer is divided
It cuts;
S43: the moment judges the bandwidth of requesting node, when band is wider than bandwidth threshold, by basal layer and enhancement layer files
It is sent to requesting node, when bandwidth is less than bandwidth threshold, basal layer file is only sent to requesting node;
S44: when step S41 judges C > C1, video clip is first divided into multiple sub-video segments, then again by sub- view
Frequency fragment segmentation at two layers of file, based on layer and enhancement layer, and enhancement layer is split;
S45: the basal layer of the first sub-video segment and prompt information are first sent to requesting node;
S46: when receiving requesting node transmission continuation foradownloaded video, the basal layer of remaining sub-video node and enhancement layer are pressed
It is sent according to step S43;
S47: when receiving requesting node transmission not foradownloaded video, stop sending remaining sub-video segment.
The present invention is further defined step S4, first determines whether the duration of request video judgement, if duration is shorter,
By two layers of file of video flowing ingredient of video clip, based on layer and enhancement layer, and enhancement layer is split, moment judgement is asked
Basal layer and enhancement layer files are sent to requesting node, work as bandwidth by the bandwidth for seeking node when band is wider than bandwidth threshold
It is that basal layer file is only sent to requesting node less than bandwidth threshold;It is longer if it is duration, video clip is first divided into
Multiple sub-video segments, then again by sub-video fragment segmentation at two layers of file, based on layer and enhancement layer, and by enhancement layer into
Row segmentation, is first sent to requesting node for the basal layer of the first sub-video segment and prompt information, receive requesting node send after
When continuous foradownloaded video, the basal layer of remaining sub-video node and enhancement layer are sent according to step S43, is saved when receiving request
When point sends not foradownloaded video, stop sending remaining sub-video segment.This method can be downloaded in conjunction with the demand of user,
Improve download efficiency.
The present invention is not limited to above-mentioned preferred forms, anyone can show that other are various under the inspiration of the present invention
The product of form, however, make any variation in its shape or structure, it is all that there is skill identical or similar to the present application
Art scheme, is within the scope of the present invention.
Claims (7)
1. a kind of method for downloading video based on content distributing network, the content distributing network include data source server, with
Data source server connected several requesting nodes and content node, each requesting node and content node are with having unique IP
Location;It is characterized in that, described method includes following steps:
S1: the request message of requesting node sending request foradownloaded video segment, the interior IP including requesting node of the request message
Location, video name and request viewing beginning and ending time;
S2: judging the video clip for whether having Chong Die with the request viewing beginning and ending time in each content node, if so, carrying out step
S3, if not provided, carrying out step S4;
S3: doing different process of aggregation for the beginning and ending time of video clip each in the content node judged, and by content node
The IP address and peer network P2P agreement text that processing sends content node to requesting node is compared in interior video clip
Part;
Step S3 includes:
S31: each video clip corresponding beginning and ending time and request viewing beginning and ending time are done into intersection processing respectively, obtain multiple one
Grade period intersection;
S32: judging whether the beginning and ending time of each one level temporal section intersection has continuously, if so, carrying out step S33;
S33: the beginning and ending time of continuous period intersection is done into union processing, obtains period union;
S34: period union and remaining period intersection are done into intersection processing again, obtain the intersection of second level period;
S35: judge whether the intersection of second level period is empty, if being not sky, carry out step S36, if it is sky, simultaneously by the period
Collect corresponding each content node, carries out step S37;
S36: calculating separately period union and has the video in the corresponding content node of the one level temporal section intersection of intersection with it
Duration picks out the corresponding content node of the longest video clip of video length, carries out step S37;
S37: processing is compared in the video clip in content node, and peer-to-peer will be established between requesting node and content node
Network P 2 P agreement;
S38: when step S32 judges that the beginning and ending time section of one level temporal section intersection does not have consecutive hours, by each one level temporal section intersection
Intersection processing is carried out again, obtains the intersection of three-level period;
S39: judging whether the intersection of three-level period is sky, if it is sky, will there is the video of intersection with the request viewing beginning and ending time
The corresponding content node of segment carries out step S37, if being not sky, carries out step S310;
S310: the video length in the corresponding content node of each one level temporal section intersection is calculated separately, picks out video length most
The corresponding content node of long video clip carries out step S37;
S311: when the longest video length number in the content node that step S310 is calculated is greater than 1, initial time is selected first
Have in overlapping with terminating time and step S37 and being sent to the corresponding beginning and ending time of video clip in the content node of requesting node
Hold node, carries out step S37;If not provided, reselection and step S37 are sent to video clip in the content node of requesting node
Closest content node of corresponding beginning and ending time carries out step S37;
S4: according to the duration size of request video clip, being split video clip, and combines the bandwidth of requesting node, sentences
The video stream file broken to requesting node transmission.
2. as described in claim 1 based on the method for downloading video of content distributing network, which is characterized in that step S37 includes:
S371: each video clip corresponding beginning and ending time in each content node is subjected to union processing, obtains the second level period
Union, and the second level period union is compared with the request viewing beginning and ending time, when the second level period union and request
The viewing beginning and ending time is completely overlapped, by the corresponding all the elements node of second level period union, carries out step S372;
S372: the IP address and peer network P2P document of agreement of each content node are sent to requesting node.
3. as claimed in claim 2 based on the method for downloading video of content distributing network, which is characterized in that step S37 is also wrapped
It includes:
S373: when step S371 judge second level period union and request viewing the beginning and ending time it is not exclusively be overlapped, first determine whether
The number N of video clip in second level period union carries out step S374 if N=1;
S374: judge video clip initial time T1, terminate time T2 and request viewing the beginning and ending time initial time T3 and
The relationship for terminating time T4 carries out step S375 when T1 is later than T4 earlier than T3 or T2, when T1 is later than T3 or T2 earlier than T4,
Carry out step S376;
S375: video clip corresponding in content node is split processing from T3 or T4 time point;
S376: the time difference of T1 and T3 or T2 and T4 are calculated;
S377: the obtained time difference is compared with time difference threshold value △ T1, as time difference >=△ T1, carries out step S378;
As time difference < △ T1, step S379 is carried out;
S378: the request of the corresponding video clip of download time difference is sent to data source server;
S379: the prompt information whether prompt downloads this section of video is sent to requesting node.
4. as claimed in claim 3 based on the method for downloading video of content distributing network, which is characterized in that step S37 is also wrapped
It includes:
S3710: when step S373 judges N > 1, judge in second level period union the initial time T1 of first video clip and
The relationship of the initial time T3 for terminating time T2 and request viewing beginning and ending time and termination time T4 of the last one video clip,
When T1 is later than T4 earlier than T3 or T2, step S375 is carried out, when T1 is later than T3 or T2 earlier than T4, carries out step S376.
5. as claimed in claim 4 based on the method for downloading video of content distributing network, which is characterized in that step S37 is also wrapped
It includes:
S3711: judging the termination time of two adjacent video clips and whether initial time is continuously, if not continuous
, carry out step S3712;
S3712: when recording the initial time of the termination time and n-th video clip of the N-1 video clip, and calculating starting
Between with terminate the time time difference, carry out step S377.
6. as described in claim 1 based on the method for downloading video of content distributing network, which is characterized in that step S4 includes:
S41: the duration C of the video clip of computation requests node request, and be compared with duration threshold value C1, as C≤C1, carry out
Step S42;
S42: by two layers of file of video flowing ingredient of video clip, based on layer and enhancement layer, and enhancement layer is split;
S43: judging the bandwidth of requesting node, and when band is wider than bandwidth threshold, basal layer and enhancement layer files are sent to
Basal layer file is only sent to requesting node when bandwidth is less than bandwidth threshold by requesting node.
7. as claimed in claim 6 based on the method for downloading video of content distributing network, which is characterized in that step S4 is also wrapped
It includes:
S44: when step S41 judges C > C1, video clip is first divided into multiple sub-video segments, then again by sub-video piece
Section is divided into two layers of file, based on layer and enhancement layer, and enhancement layer is split;
S45: the basal layer of the first sub-video segment and prompt information are first sent to requesting node;
S46: when receiving requesting node transmission continuation foradownloaded video, by the basal layer of remaining sub-video node and enhancement layer according to step
Rapid S43 is sent;
S47: when receiving requesting node transmission not foradownloaded video, stop sending remaining sub-video segment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710375362.2A CN107241398B (en) | 2017-05-24 | 2017-05-24 | A kind of method for downloading video based on content distributing network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710375362.2A CN107241398B (en) | 2017-05-24 | 2017-05-24 | A kind of method for downloading video based on content distributing network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107241398A CN107241398A (en) | 2017-10-10 |
CN107241398B true CN107241398B (en) | 2019-09-03 |
Family
ID=59985900
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710375362.2A Active CN107241398B (en) | 2017-05-24 | 2017-05-24 | A kind of method for downloading video based on content distributing network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107241398B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112616070B (en) * | 2018-05-31 | 2022-12-09 | 西安万像电子科技有限公司 | Transmission link management method and device |
CN109348257B (en) * | 2018-11-14 | 2021-02-26 | 广州虎牙信息科技有限公司 | Pull stream control method and device and live broadcast system |
CN111241072B (en) * | 2018-11-29 | 2023-07-18 | 珠海格力电器股份有限公司 | Method and system for judging continuity of data segment |
CN115250358A (en) * | 2021-04-26 | 2022-10-28 | 北京金山云网络技术有限公司 | Stream pulling method, stream pulling device, storage medium and electronic equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103944917A (en) * | 2014-05-04 | 2014-07-23 | 中山大学 | Video distribution optimization method applied to microblog social network |
CN105191261A (en) * | 2013-02-26 | 2015-12-23 | 高通股份有限公司 | Content management in peer-to-peer systems |
CN105376612A (en) * | 2014-08-26 | 2016-03-02 | 华为技术有限公司 | Video playing method, media equipment, playing equipment and multimedia system |
CN105959358A (en) * | 2016-04-25 | 2016-09-21 | 乐视控股(北京)有限公司 | CDN server and method of CDN server of caching data |
CN106170095A (en) * | 2009-10-08 | 2016-11-30 | 华为技术有限公司 | Content distribution network system and method |
CN106454424A (en) * | 2016-11-10 | 2017-02-22 | 中广热点云科技有限公司 | Hot cloud management platform and method thereof |
-
2017
- 2017-05-24 CN CN201710375362.2A patent/CN107241398B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106170095A (en) * | 2009-10-08 | 2016-11-30 | 华为技术有限公司 | Content distribution network system and method |
CN105191261A (en) * | 2013-02-26 | 2015-12-23 | 高通股份有限公司 | Content management in peer-to-peer systems |
CN103944917A (en) * | 2014-05-04 | 2014-07-23 | 中山大学 | Video distribution optimization method applied to microblog social network |
CN105376612A (en) * | 2014-08-26 | 2016-03-02 | 华为技术有限公司 | Video playing method, media equipment, playing equipment and multimedia system |
CN105959358A (en) * | 2016-04-25 | 2016-09-21 | 乐视控股(北京)有限公司 | CDN server and method of CDN server of caching data |
CN106454424A (en) * | 2016-11-10 | 2017-02-22 | 中广热点云科技有限公司 | Hot cloud management platform and method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN107241398A (en) | 2017-10-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107241398B (en) | A kind of method for downloading video based on content distributing network | |
US7995473B2 (en) | Content delivery system for digital object | |
CN101626389B (en) | Network node management method | |
CN102546711B (en) | Storage adjustment method, device and system for contents in streaming media system | |
CN101141459A (en) | Method of implementing data transmission or stream media transmission using combination of HTTP and P2P | |
JP2007529073A (en) | Cache server network and content file delivery scheduling method | |
Detti et al. | Mobile peer-to-peer video streaming over information-centric networks | |
CN101895576B (en) | P2P distributed streaming media live broadcast method with small-startup time delay | |
Wang et al. | A joint online transcoding and delivery approach for dynamic adaptive streaming | |
CN102394899B (en) | On-demand system and method for improving file downloading speed | |
CN101631034A (en) | Method, device and system for node management and access in peer-to-peer network | |
CN113453038A (en) | Effectiveness optimal collaborative cache management method under CDN-P2P hybrid architecture | |
Xu et al. | Analysis of a hybrid architecture for cost-effective streaming media distribution | |
CN103037015A (en) | Active P2P data distribution method and node client-side | |
Wang et al. | PLVER: Joint stable allocation and content replication for edge-assisted live video delivery | |
Shehab et al. | Efficient schemes for playout latency reduction in P2P-VoD systems | |
CN115002497A (en) | Live broadcast source returning scheduling method and system and source returning server | |
Noh et al. | Progressive caching system for video streaming services over content centric network | |
WO2016165596A1 (en) | Multimedia file control method and system | |
Muscat et al. | A Hybrid CDN-P2P Architecture for Live Video Streaming | |
CN104661108A (en) | Media stream downloading method for terminal, terminal and communication system | |
CN103037017A (en) | Passive P2P data distribution method and node client-side | |
Kao et al. | I2CC: Interleaving two-level cache with network coding in peer-to-peer VoD system | |
Wang et al. | Channel-aware peer selection in multi-view peer-to-peer multimedia streaming | |
Li et al. | Elite: differentiating the playback lag for peer-assisted live video streaming |
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 | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: A video download method based on content distribution network Effective date of registration: 20210622 Granted publication date: 20190903 Pledgee: Beijing culture science and technology financing Company limited by guarantee Pledgor: CBC CLOUD TECHNOLOGY Co.,Ltd. Registration number: Y2021980005035 |