CN107241398A - 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 PDF

Info

Publication number
CN107241398A
CN107241398A CN201710375362.2A CN201710375362A CN107241398A CN 107241398 A CN107241398 A CN 107241398A CN 201710375362 A CN201710375362 A CN 201710375362A CN 107241398 A CN107241398 A CN 107241398A
Authority
CN
China
Prior art keywords
video
node
video segment
content
time
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
CN201710375362.2A
Other languages
Chinese (zh)
Other versions
CN107241398B (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.)
China Science And Technology Co Ltd
Original Assignee
China Science And Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Science And Technology Co Ltd filed Critical China Science And Technology Co Ltd
Priority to CN201710375362.2A priority Critical patent/CN107241398B/en
Publication of CN107241398A publication Critical patent/CN107241398A/en
Application granted granted Critical
Publication of CN107241398B publication Critical patent/CN107241398B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

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 segment for the request download that requesting node is sent first, then judge whether to have in other guide node and have overlapping video segment with the request viewing beginning and ending time of the request video segment, if, each video segment of content node that will determine that out, which is done, to occur simultaneously or union processing, then processing is compared in the set of acquisition again, corresponding content node is set up P2P network peer protocols by the result handled according to comparing, if it is judged that not having, judge the duration of the video segment of request, video is carried out by dividing processing according to the duration of video segment, then the bandwidth further according to requesting node judges the video file sent to requesting node, the efficiency of video download is significantly improved after being handled more than, and release data source server, improve higher redundancy bandwidth, download service can be provided for more clients.

Description

A kind of method for downloading video based on content distributing network
Technical field
The invention belongs to video downloading field, more particularly to a kind of method for downloading video based on content distributing network.
Background technology
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, so as to realize the method that the distribution of content is accessed nearby.CDN technologies are effectively improved The service quality of access to content, and support large-scale concurrent access ability.
However, the problem of existing CDN has certain in independent content construction bearer network, such as present CDN is unified to CDN data source server downloading datas when carrying out content download, due to the number downloaded from data source server Amount is relatively more, it is impossible to ensure the efficiency downloaded.In turn resulting in CDN data source servers, over-burden, bandwidth pressure it is larger and CDN node autgmentability is poor.In order to solve the above-mentioned technical problem, CN105872764 is disclosed under a kind of data based on P2P networks Support method.P2P technologies have the advantages that to eliminate server bottleneck and balance flow distribution, so prior art is by each content section Point is performed both by Peer-to-Peer Network P2P agreement, solves existing video download and distribution excessively relies on CDN data source servers, caused Poor expandability, CDN data source servers are the problem of over-burden, but the technology brings another problem therewith, is exactly right It is also to need bandwidth Deng network P 2 P agreement, when each child node is performed both by Peer-to-Peer Network P2P agreement, can also gives data source The bandwidth of server brings larger pressure, and the child node having is due to by the present of the reasons such as network speed, using when It is fewer, it is also performed to Peer-to-Peer Network P2P agreement, It is not necessary to foundation pair between waste bandwidth resource, and the child node having Deng network, because the video segment that requesting node needs may be not present in it.
The content of the invention
In order to solve problems of the prior art, the present invention provides a kind of video based on content distributing network and downloaded Method, this method ensures that data source server has the bandwidth of redundancy, alleviates the bandwidth pressure of data source server, improves video The efficiency of download.
Concrete technical scheme of the present invention is as follows:
The present invention provides a kind of method for downloading video based on content distributing network, and the content distributing network includes data source Server, some 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, which is sent, includes requesting node in the request message of request foradownloaded video fragment, the request message IP address, video name and request viewing beginning and ending time;
S2:Judge whether there be the video segment overlapping 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:The beginning and ending time of each video segment does different process of aggregation in the content node that will determine that out, and by content IP address and peer network P2P agreement of the processing to requesting node transmission content node is compared in video segment in node File;
S4:According to the duration size of request video segment, video segment is split, 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 segment corresponding beginning and ending time is done into common factor processing with the request viewing beginning and ending time respectively, obtained many Individual one level temporal section is occured simultaneously;
S32:Judge whether the beginning and ending time that each one level temporal section is occured simultaneously has continuously, if so, carrying out step S33;
S33:The beginning and ending time that the continuous period occurs simultaneously is done into union processing, period union is obtained;
S34:Period union and remaining period are occured simultaneously and do common factor processing again, two grades of periods common factors are obtained;
S35:Whether be empty, if being not sky, step S36 is carried out, if sky, by the time if judging that two grades of periods occur simultaneously The corresponding each content node of section union, carries out step S37;
S36:Period union is calculated respectively and is had with it in the one level temporal section corresponding content node of common factor of common factor Video duration, picks out the video duration most long corresponding content node of video segment, carries out step S37;
S37:Processing is compared in video segment in content node, and will foundation pair between requesting node and content node Deng volume grid P2P agreements.
Further to improve, step S3 also includes:
S38:When step S32 judges the no consecutive hours of beginning and ending time section that one level temporal section is occured simultaneously, by each one level temporal section Common factor carries out common factor processing again, obtains three-level period common factor;
S39:Whether be empty, if sky, will have common factor with the request viewing beginning and ending time if judging that the three-level period occurs simultaneously The corresponding content node of video segment, carries out step S37, if being not sky, carries out step S310;
S310:The video duration that each one level temporal section is occured simultaneously in corresponding content node is calculated respectively, when picking out video Grow the corresponding content node of most long video segment and carry out step S37.
Further to improve, step S3 also includes:
S311:When the most long video duration number in the content node that step S310 is calculated is more than 1, selection starting first Time and termination time and step S37, which are sent to the corresponding beginning and ending time of video segment in the content node of requesting node, overlapping Content node, carry out step S37;If not provided, reselection is sent to video in the content node of requesting node with step S37 Fragment corresponding beginning and ending time closest content node, carries out step S37.
Further to improve, step S37 includes:
S371:Each video segment corresponding beginning and ending time in each content node is subjected to union processing, when obtaining two grades Between section union, and by two grades of period unions and request viewing the beginning and ending time be compared, when two grades of period unions with The request viewing beginning and ending time is completely overlapped, by the corresponding all the elements node of two grades of period unions, carries out step S372;
S372:The IP address and peer network P2P document of agreement of each content node are sent to requesting node.
Further to improve, step S37 also includes:
S373:When step S371 judge two grades of period unions with request viewing the beginning and ending time it is not exclusively overlapping, first Judge the number N of video segment in two grades of period unions, if N=1, carry out step S374;
S374:Judge the initial time T1 of video segment, terminate the initial time of time T2 and request viewing beginning and ending time T3 and the relation for terminating time T4, when T1 is later than T4 earlier than T3 or T2, carry out step S375, when T1 is later than T3 or T2 earlier than T4 When, carry out step S376;
S375:Corresponding video segment in content node is subjected to dividing processing from T3 or T4 time points;
S376:Calculate T1 and T3 or T2 and T4 time difference;
S377:The obtained time difference is compared with time difference threshold value △ T1, as time difference >=△ T1, step is carried out S378;As time difference < △ T1, step S379 is carried out;
S378:The request of the corresponding video segment of download time difference is sent to data source server;
S379:The prompt message whether prompting downloads this section of video is sent to requesting node.
Further to improve, step S37 also includes:
S3710:When step S373 judges N > 1, the initial time of first video segment in two grades of period unions is judged Time T2 that terminates of T1 and last video segment watches the initial time T3 of beginning and ending time with request and terminates time T4 Relation, when T1 is later than T4 earlier than T3 or T2, carries out step S375, when T1 is later than T3 or T2 earlier than T4, carries out step S376.
Further to improve, step S37 also includes:
S3711:Judge two adjacent video segments the termination time and initial time whether be it is continuous, if not Continuously, step S3712 is carried out;
S3712:The termination time of the N-1 video segment and the initial time of n-th video segment are recorded, and is calculated Time beginning and the time difference for terminating the time, carry out step S377.
Further to improve, step S4 includes:
S41:The duration C of the video segment 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 composition of video segment, based on layer and enhancement layer, and enhancement layer is divided Cut;
S43:Moment judges the bandwidth of requesting node, when band is wider than bandwidth threshold, by basal layer and enhancement layer files Requesting node is sent to, when bandwidth less than bandwidth threshold is, basal layer file is only sent to requesting node.
Further to improve, step S4 also includes:
S44:When step S41 judges C > C1, video segment is first divided into multiple sub-video fragments, then again son is regarded Frequency fragment is divided into two layers of file, based on layer and enhancement layer, and enhancement layer is split;
S45:The basal layer and prompt message of the first sub-video fragment are first sent to requesting node;
S46:When receiving requesting node transmission continuation foradownloaded video, the basal layer and enhancement layer of remaining sub-video node are pressed It is transmitted according to step S43;
S47:When receiving requesting node transmission not foradownloaded video, stop sending remaining sub-video fragment.
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 Whether the video segment that the request gone out is downloaded, then judge to have in other guide node the request with the request video segment to watch There is overlapping video segment beginning and ending time, occurs simultaneously or union processing if so, each video segment of the content node that will determine that out is done, Then processing is compared in the set of acquisition again, corresponding content node is set up by P2P networks according to the result of comparison processing Peer protocol, if it is judged that not having, judges the duration of the video segment of request, is carried out video according to the duration of video segment Dividing processing, then the bandwidth further according to requesting node judge the video file sent to requesting node, more than handle after The efficiency of video download is significantly improved, and releases data source server, higher redundancy bandwidth is improved, can be for more Many clients provide download service.
Brief description of the drawings
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 step S3 of embodiment 2 flow chart;
Fig. 3 is the step S37 of embodiment 3 schematic diagram;
Fig. 4 is the step S4 of embodiment 4 flow chart.
Embodiment
The present invention is described in further detail with following examples below in conjunction with the accompanying drawings.
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 bag Some requesting nodes and content node for include 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, which is sent, includes requesting node in the request message of request foradownloaded video fragment, the request message IP address, video name and request viewing beginning and ending time;
S2:Judge whether there be the video segment overlapping 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:The beginning and ending time of each video segment does different process of aggregation in the content node that will determine that out, and by content IP address and peer network P2P agreement of the processing to requesting node transmission content node is compared in video segment in node File;
S4:According to the duration size of request video segment, video segment is split, 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 Whether the video segment that the request gone out is downloaded, then judge to have in other guide node the request with the request video segment to watch There is overlapping video segment beginning and ending time, occurs simultaneously or union processing if so, each video segment of the content node that will determine that out is done, Then processing is compared in the set of acquisition again, corresponding content node is set up by P2P networks according to the result of comparison processing Peer protocol, if it is judged that not having, judges the duration of the video segment of request, is carried out video according to the duration of video segment Dividing processing, then the bandwidth further according to requesting node judge the video file sent to requesting node, more than handle after The efficiency of video download is significantly improved, and releases data source server, higher redundancy bandwidth is improved, can be for more Many clients provide 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 segment corresponding beginning and ending time is done into common factor processing with the request viewing beginning and ending time respectively, obtained many Individual one level temporal section is occured simultaneously;
S32:Judge whether the beginning and ending time that each one level temporal section is occured simultaneously has continuously, if so, carrying out step S33;
S33:The beginning and ending time that the continuous period occurs simultaneously is done into union processing, period union is obtained;
S34:Period union and remaining period are occured simultaneously and do common factor processing again, two grades of periods common factors are obtained;
S35:Whether be empty, if being not sky, step S36 is carried out, if sky, by the time if judging that two grades of periods occur simultaneously The corresponding each content node of section union, carries out step S37;
S36:Period union is calculated respectively and is had with it in the one level temporal section corresponding content node of common factor of common factor Video duration, picks out the video duration most long corresponding content node of video segment, carries out step S37;
S37:Processing is compared in video segment in content node, and will foundation pair between requesting node and content node Deng volume grid P2P agreements;
S38:When step S32 judges the no consecutive hours of beginning and ending time section that one level temporal section is occured simultaneously, by each one level temporal section Common factor carries out common factor processing again, obtains three-level period common factor;
S39:Whether be empty, if sky, will have common factor with the request viewing beginning and ending time if judging that the three-level period occurs simultaneously The corresponding content node of video segment, carries out step S37, if being not sky, carries out step S310;
S310:The video duration that each one level temporal section is occured simultaneously in corresponding content node is calculated respectively, when picking out video Grow the corresponding content node of most long video segment and carry out step S37;
S311:When the most long video duration number in the content node that step S310 is calculated is more than 1, selection starting first Time and termination time and step S37, which are sent to the corresponding beginning and ending time of video segment in the content node of requesting node, overlapping Content node, carry out step S37;If not provided, reselection is sent to video in the content node of requesting node with step S37 Fragment corresponding beginning and ending time closest content node, carries out step S37.
The present invention is further defined to step 3, idiographic flow reference table 1:Assuming that the video segment of request viewing Beginning and ending time be 1-50min, first by each video segment corresponding beginning and ending time in content node with request viewing start-stop Time (1-50min) does common factor processing, obtains one level temporal section common factor and is respectively: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. judges whether the beginning and ending time that each one level temporal section is occured simultaneously has continuously, wherein 2:00- 4:59 and 5:00-10:00 be it is continuous, 23:00-25:00 and 25:01-45:00 is continuous, and the continuous period is occured simultaneously Beginning and ending time do union processing, it is 2 to obtain period union:00-10:00、23:00-45:00;By period union and its The remaining period occurs simultaneously does common factor processing again, obtains two grades of periods common factors, and whether then judge that two grades of periods occur simultaneously again is sky, If being not sky, the video duration of period union and the period common factor for having common factor with it is calculated respectively, content node A's regards A length of 9min during frequency, when a length of 8min, the when a length of 22min, content node G of two grades of period unions that two grades of periods occur simultaneously A length of 19min when corresponding, thus to requesting node transmission content node A, content node H and content node I IP address and Peer network P2P document of agreement, if sky, is compared processing, and request is saved by the video segment in content node Peer network P2P agreements are set up between point and content node;There is no consecutive hours when the beginning and ending time for judging one level temporal section common factor, Such as 12:00-20:00、15:00-19:00、15:00-22:00、46:00-50:00 without continuous, by 12:00-20:00、 15:00-19:00、15:00-23:00、46:00-50:00 does common factor processing again, obtains three-level period common factor, judges 46:00- 60:It is sky that 00 corresponding three-level period, which occured simultaneously, so content node K is selected, to requesting node transmission content node K IP Address and peer network P2P document of agreement, 12:00-20:00、15:00-19:00、15:00-23:00 three-level period hands over Collection is not sky, calculates when a length of 4min of video segment in when a length of 8min of video segment in content node E, content node F, When a length of 8min of video segment in content node G, selection duration most long content node E and G, discovery has two, first root According to be sent to requesting node beginning and ending time be content node A corresponding 1:00-10:00, content node H corresponding 21:00- 25:00, content node I corresponding 25:01-35:00 corresponding with content node K 46:00-60:00, content node E is corresponding with G Beginning and ending time be respectively 12:00-20:00 and 15:00-23:00, find the content node E corresponding termination times 20:00 with it is interior Hold node H corresponding 21:00 is closest, thus selection content node E, to requesting node transmission content node E IP address and Peer network P2P document of agreement.By the content node A (1 selected:00-10:00), content node E (12:00-20:00)、 Content node H (21:00-25:00), content node I (25:01-45:00) with content node K (46:00-60:00) saved with request Peer network P2P agreements are set up between point.
The content node that table 1 is selected
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 segment corresponding beginning and ending time in each content node is subjected to union processing, when obtaining two grades Between section union, and by two grades of period unions and request viewing the beginning and ending time be compared, when two grades of period unions with The request viewing beginning and ending time is completely overlapped, by the corresponding all the elements node of two grades of period unions, carries out step S372;
S372:Peer network P2P agreements will be set up between requesting node and each content node;
S373:When step S371 judge two grades of period unions with request viewing the beginning and ending time it is not exclusively overlapping, first Judge the number N of video segment in two grades of period unions, if N=1, carry out step S374;
S374:Judge the initial time T1 of video segment, terminate the initial time of time T2 and request viewing beginning and ending time T3 and the relation for terminating time T4, when T1 is later than T4 earlier than T3 or T2, carry out step S375, when T1 is later than T3 or T2 earlier than T4 When, carry out step S376;
S375:Corresponding video segment in content node is subjected to dividing processing from T3 or T4 time points;
S376:Calculate T1 and T3 or T2 and T4 time difference;
S377:The obtained time difference is compared with time difference threshold value △ T1, as time difference >=△ T1, step is carried out S378;As time difference < △ T1, step S379 is carried out;
S378:The request of the corresponding video segment of download time difference is sent to data source server;
S379:The prompt message whether prompting downloads this section of video is sent to requesting node;
S3710:When step S373 judges N > 1, the initial time of first video segment in two grades of period unions is judged Time T2 that terminates of T1 and last video segment watches the initial time T3 of beginning and ending time with request and terminates time T4 Relation, when T1 is later than T4 earlier than T3 or T2, carries out step S375, when T1 is later than T3 or T2 earlier than T4, carries out step S376;
S3711:Judge two adjacent video segments the termination time and initial time whether be it is continuous, if not Continuously, step S3712 is carried out;
S3712:The termination time of the N-1 video segment and the initial time of n-th video segment are recorded, and is calculated Time beginning and the time difference for terminating the time, carry out step S377.
The present invention is further handled the video segment in the content node of acquisition, the selection content node of embodiment 2 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) with content node K (46:00-60:00), by the video segment corresponding beginning and ending time in these nodes Union processing is done, two grades of period unions (1 are obtained:00-10:00、12:00-20:00、21:00-45:00、46:00-60: 00), and by the union it is compared with the request viewing beginning and ending time, when two grades of period unions and request viewing beginning and ending time It is completely overlapped, the IP address and peer network P2P document of agreement of the corresponding all the elements node of two grades of period unions is equal It is sent to requesting node;When judging not exclusively overlapping, the number N=4 of video segment in two grades of period unions is judged, if N=1, two grades of period unions are (00:30-51:00), judge the initial time T1 of video segment, terminate time T2 and request Watch the initial time T3 of beginning and ending time and terminate the relation of time T4,00:30 watch initial time 1 earlier than request:00,51: 00 is later than the request viewing termination time 50:00, by corresponding video segment in content node from 1:00、50:Split at 00, And for example two grades of period unions are (2:00-40:00), 2:00 is later than request viewing initial time 1:00,40:00 sees earlier than request See the termination time 50:00, calculate 2:00 and 1:00、40:00 and 50:0 time difference is respectively 1min and 10min, will be with the time Poor threshold value 2min is compared, and 1min is less than 2min, and the prompt message whether prompting downloads this section of video is sent to requesting node, 10min is more than 2min, and the request of the corresponding video segment of download time difference is sent to data source server, when N is more than 1, example Such as N=4, the initial time 1 of first video segment in two grades of period unions is judged:00 and last video segment end Only time 60:00 watches the initial time 1 of beginning and ending time with request:00 and terminate the time 50:00 relation, finds the termination time 60:00 is later than 50:00, so needing corresponding video segment in content node from 50:00 carries out dividing processing, then judges 1:00-10:00 and 12:00-20:The termination time of 00 correspondence video segment and initial time are not continuous, calculating 1:00- 10:The termination time 10 of 00 video segment:00 and 12:00-20:The initial time 12 of 00 video segment:00 time difference is 2min, 2min=2min, the request of the corresponding video segment of download time difference is sent to data source server, 12 are calculated:00- 20:The termination time 20 of 00 video segment:00 and 21:00-45:The initial time 21 of 00 video segment:00 time difference is 1min, 1min are less than 2min, and the prompt message whether prompting downloads this section of video is sent to requesting node;Calculate 21-45:00 regards The termination time 45 of frequency fragment:00 and 46:00-60:The initial time 46 of 00 video segment:00 time difference is 1min, 1min Less than 2min, the prompt message whether prompting downloads this section of video is sent to requesting node, so as to complete the download of whole 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 segment 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 composition of video segment, based on layer and enhancement layer, and enhancement layer is divided Cut;
S43:Moment judges the bandwidth of requesting node, when band is wider than bandwidth threshold, by basal layer and enhancement layer files Requesting node is sent to, when bandwidth less than bandwidth threshold is, basal layer file is only sent to requesting node;
S44:When step S41 judges C > C1, video segment is first divided into multiple sub-video fragments, then again son is regarded Frequency fragment is divided into two layers of file, based on layer and enhancement layer, and enhancement layer is split;
S45:The basal layer and prompt message of the first sub-video fragment are first sent to requesting node;
S46:When receiving requesting node transmission continuation foradownloaded video, the basal layer and enhancement layer of remaining sub-video node are pressed It is transmitted according to step S43;
S47:When receiving requesting node transmission not foradownloaded video, stop sending remaining sub-video fragment.
The present invention is further defined to step S4, first determines whether the duration for asking video to judge, if duration is shorter, By two layers of file of video flowing composition of video segment, based on layer and enhancement layer, and enhancement layer is split, the moment judges please The bandwidth of node is sought, when band is wider than bandwidth threshold, basal layer and enhancement layer files is sent to requesting node, work as bandwidth It is that basal layer file is only sent to requesting node less than bandwidth threshold;If duration is longer, video segment is first divided into Multiple sub-video fragments, are then divided into two layers of file by sub-video fragment again, based on layer and enhancement layer, and enhancement layer is entered Row segmentation, is first sent to requesting node by the basal layer and prompt message of the first sub-video fragment, receive requesting node send after During continuous foradownloaded video, the basal layer and enhancement layer of remaining sub-video node are transmitted according to step S43, saved when receiving request When point sends not foradownloaded video, stop sending remaining sub-video fragment.The demand that this method can combine user is downloaded, Improve download efficiency.
The present invention is not limited to above-mentioned preferred forms, and anyone can show that other are various under the enlightenment of the present invention The product of form, however, make any change in its shape or structure, it is every that there is skill identical or similar to the present application Art scheme, is within the scope of the present invention.

Claims (10)

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 some requesting nodes and content node, each requesting node and content node are with having unique IP Location;Characterized in that, methods described comprises the following steps:
S1:Requesting node sends the request message of request foradownloaded video fragment, IP including requesting node in the request message Location, video name and request viewing beginning and ending time;
S2:Judge whether there be the video segment overlapping 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:The beginning and ending time of each video segment does different process of aggregation in the content node that will determine that out, and by content node IP address and peer network P2P agreement text of the processing to requesting node transmission content node is compared in interior video segment Part;
S4:According to the duration size of request video segment, video segment is split, and combines the bandwidth of requesting node, is sentenced Break the video stream file sent to requesting node.
2. the method for downloading video as claimed in claim 1 based on content distributing network, it is characterised in that step S3 includes:
S31:Each video segment corresponding beginning and ending time is done into common factor processing with the request viewing beginning and ending time respectively, multiple one is obtained The level period occurs simultaneously;
S32:Judge whether the beginning and ending time that each one level temporal section is occured simultaneously has continuously, if so, carrying out step S33;
S33:The beginning and ending time that the continuous period occurs simultaneously is done into union processing, period union is obtained;
S34:Period union and remaining period are occured simultaneously and do common factor processing again, two grades of periods common factors are obtained;
S35:Whether be empty, if being not sky, carry out step S36 if judging that two grades of periods occur simultaneously, if sky, by the period simultaneously Collect corresponding each content node, carry out step S37;
S36:Period union is calculated respectively and has the video in the one level temporal section corresponding content node of common factor of common factor with it Duration, picks out the video duration most long corresponding content node of video segment, carries out step S37;
S37:Processing is compared in video segment in content node, and peer-to-peer will be set up between requesting node and content node Network P 2 P agreement.
3. the method for downloading video as claimed in claim 2 based on content distributing network, it is characterised in that step S3 is also wrapped Include:
S38:When step S32 judges the no consecutive hours of beginning and ending time section that one level temporal section is occured simultaneously, each one level temporal section is occured simultaneously Common factor processing is carried out again, obtains three-level period common factor;
S39:Whether be empty, if sky, will have the video of common factor with the request viewing beginning and ending time if judging that the three-level period occurs simultaneously The corresponding content node of fragment, carries out step S37, if being not sky, carries out step S310;
S310:The video duration that each one level temporal section is occured simultaneously in corresponding content node is calculated respectively, picks out video duration most The corresponding content node of long video segment carries out step S37.
4. the method for downloading video as claimed in claim 3 based on content distributing network, it is characterised in that step S3 is also wrapped Include:
S311:When the most long video duration number in the content node that step S310 is calculated is more than 1, initial time is selected first Being sent to the corresponding beginning and ending time of video segment in the content node of requesting node with termination time and step S37 has in overlapping Hold node, carry out step S37;If not provided, reselection is sent to video segment in the content node of requesting node with step S37 Closest content node of corresponding beginning and ending time, carries out step S37.
5. the method for downloading video as claimed in claim 1 based on content distributing network, it is characterised in that step S37 includes:
S371:Each video segment corresponding beginning and ending time in each content node is subjected to union processing, two grades of periods are obtained Union, and two grades of period unions are compared with the request viewing beginning and ending time, when two grades of period unions and request The viewing beginning and ending time is completely overlapped, by the corresponding all the elements node of two grades of period unions, carries out step S372;
S372:The IP address and peer network P2P document of agreement of each content node are sent to requesting node.
6. the method for downloading video as claimed in claim 4 based on content distributing network, it is characterised in that step S37 is also wrapped Include:
S373:When step S371 judges that two grades of period unions are not exclusively overlapping with the request viewing beginning and ending time, first determine whether The number N of video segment in two grades of period unions, if N=1, carries out step S374;
S374:Judge video segment initial time T1, terminate time T2 with request viewing the beginning and ending time initial time T3 and Termination time T4 relation, when T1 is later than T4 earlier than T3 or T2, carries out step S375, when T1 is later than T3 or T2 earlier than T4, Carry out step S376;
S375:Corresponding video segment in content node is subjected to dividing processing from T3 or T4 time points;
S376:Calculate T1 and T3 or T2 and T4 time difference;
S377:The obtained time difference is compared with time difference threshold value △ T1, as time difference >=△ T1, step S378 is carried out; As time difference < △ T1, step S379 is carried out;
S378:The request of the corresponding video segment of download time difference is sent to data source server;
S379:The prompt message whether prompting downloads this section of video is sent to requesting node.
7. the method for downloading video as claimed in claim 2 based on content distributing network, it is characterised in that step S37 is also wrapped Include:
S3710:When step S373 judges N > 1, judge in two grades of period unions the initial time T1 of first video segment and The initial time T3 and the relation of termination time T4 that terminate time T2 and request viewing beginning and ending time of last video segment, 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, step S376 is carried out.
8. the method for downloading video as claimed in claim 6 based on content distributing network, it is characterised in that step S37 is also wrapped Include:
S3711:Whether the termination time and initial time for judging two adjacent video segments are continuous, if not continuous , carry out step S3712;
S3712:The termination time of the N-1 video segment and the initial time of n-th video segment are recorded, and when calculating starting Between with terminating time difference of time, carry out step S377.
9. the method for downloading video as claimed in claim 1 based on content distributing network, it is characterised in that step S4 includes:
S41:The duration C of the video segment 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 composition of video segment, based on layer and enhancement layer, and enhancement layer is split;
S43:Moment judges the bandwidth of requesting node, when band is wider than bandwidth threshold, and basal layer and enhancement layer files are sent out Requesting node is given, when bandwidth less than bandwidth threshold is, basal layer file is only sent to requesting node.
10. the method for downloading video as claimed in claim 8 based on content distributing network, it is characterised in that step S4 is also wrapped Include:
S44:When step S41 judges C > C1, video segment is first divided into multiple sub-video fragments, 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 and prompt message of the first sub-video fragment are first sent to requesting node;
S46:When receiving requesting node transmission continuation foradownloaded video, by the basal layer and enhancement layer of remaining sub-video node according to step Rapid S43 is transmitted;
S47:When receiving requesting node transmission not foradownloaded video, stop sending remaining sub-video fragment.
CN201710375362.2A 2017-05-24 2017-05-24 A kind of method for downloading video based on content distributing network Active CN107241398B (en)

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 true CN107241398A (en) 2017-10-10
CN107241398B 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)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108718418A (en) * 2018-05-31 2018-10-30 西安万像电子科技有限公司 A kind of management method and device of transmission link
CN109348257A (en) * 2018-11-14 2019-02-15 广州虎牙信息科技有限公司 Draw method of flow control, device and live broadcast system
CN111241072A (en) * 2018-11-29 2020-06-05 珠海格力电器股份有限公司 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)

* Cited by examiner, † Cited by third party
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
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

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108718418A (en) * 2018-05-31 2018-10-30 西安万像电子科技有限公司 A kind of management method and device of transmission link
CN108718418B (en) * 2018-05-31 2020-12-29 西安万像电子科技有限公司 Transmission link management method and device
CN109348257A (en) * 2018-11-14 2019-02-15 广州虎牙信息科技有限公司 Draw method of flow control, device and live broadcast system
CN111241072A (en) * 2018-11-29 2020-06-05 珠海格力电器股份有限公司 Method and system for judging continuity of data segment
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

Also Published As

Publication number Publication date
CN107241398B (en) 2019-09-03

Similar Documents

Publication Publication Date Title
CN107241398B (en) A kind of method for downloading video based on content distributing network
CN101141459B (en) Method of implementing data transmission or stream media transmission using combination of HTTP and P2P
US10506062B2 (en) Network-optimized content delivery for high demand non-live contents
CN101641685B (en) Method for file transfer by a peer-to-peer file transfer model and a client-server transfer model
US7995473B2 (en) Content delivery system for digital object
JP2007529073A (en) Cache server network and content file delivery scheduling method
JP2010522372A (en) Hierarchically clustered P2P streaming system
CN103108008B (en) A kind of method and file download system for downloading file
CN102394899B (en) On-demand system and method for improving file downloading speed
WO2008025294A1 (en) A stream media live system, device and method of peer to peer connection
CN101800885A (en) Video data distribution method and system method and system for distributing video data
CN101895576A (en) P2P distributed streaming media live broadcast method with small-startup time delay
Xu et al. Analysis of a hybrid architecture for cost-effective streaming media distribution
CN108833350B (en) Data transmission method suitable for multi-server self-adaptive streaming media system
CN109962947A (en) Method for allocating tasks and device in a kind of peer-to-peer network
Wang et al. PLVER: Joint stable allocation and content replication for edge-assisted live video delivery
EP2569899B1 (en) Content distribution in a P2P infrastructure by means of multicast connections
EP2252061A1 (en) Method and system for storing and distributing electronic content
Kwon et al. Distributed multimedia streaming over peer-to-peer networks
CN103916328A (en) Flow control method and system for content distribution network and peer-to-peer network
WO2016165596A1 (en) Multimedia file control method and system
CN103281395A (en) Data piece equipartition selecting system and method based on number of client-sides
EP3061223B1 (en) Aggressive prefetching
CN105959364A (en) Data transmission method and device based on point to point protocol
Muscat et al. A Hybrid CDN-P2P Architecture for 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