CN104936042B - A kind of video clip method for down loading and device - Google Patents
A kind of video clip method for down loading and device Download PDFInfo
- Publication number
- CN104936042B CN104936042B CN201510385932.7A CN201510385932A CN104936042B CN 104936042 B CN104936042 B CN 104936042B CN 201510385932 A CN201510385932 A CN 201510385932A CN 104936042 B CN104936042 B CN 104936042B
- Authority
- CN
- China
- Prior art keywords
- video clip
- serial number
- success rate
- continuous
- downloaded
- 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
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/632—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing using a connection between clients on a wide area network, e.g. setting up a peer-to-peer communication via Internet for retrieving video segments from the hard-disk of other client devices
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Television Signal Processing For Recording (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention discloses a kind of video clip method for down loading and device, method to include:Peer-to-peer network system interior joint to the node for the programme televised live that request is being broadcast live send obtain identify the programme televised live video clip there are the sequences of the mark sequence of situation to be asked;The mark sequence of the node feeding back is received, extraction has mark from each mark sequence respectively;It obtains the presence extracted in each mark sequence and identifies corresponding video clip serial number set, determine all video clip serial number union of sets collection;When the union is not empty, according to video clip playing sequence, each video clip serial number of this and concentration is ranked up;And according to quantity that is after determining be ranked up and concentrating the video clip serial number in each continuous serial number group, the corresponding video clip of all video clip serial numbers in continuous serial number group is downloaded.Compared with prior art, the video clip that the embodiment of the present invention downloads to is more continuous, therefore video playing is smoothly, and user's impression is preferable.
Description
Technical field
The present embodiments relate to the Internet, applications field, more particularly to a kind of video clip choosing method and device.
Background technology
Often realize that live streaming of the video on multinode, the P2P systems include using peer-to-peer network system (P2P systems) now
Data source server, node and index server three parts.Wherein, the video clip of data source server storage live video;
Node is each video playback apparatus being present in the P2P systems, and data source server can send the video clip of storage
To node;Index server stores:Video on the storage condition information of video clip and each node in data source server
The storage condition information and playback progress information of segment, in the P2P systems, each node all can serve as data set provider,
It can also be used as data requester.
During the prior art is using the live streaming of P2P system videos, some live streaming is regarded when index server receives node
When the request of frequency, directly the request is given to be broadcast live the identification feedback of a live streaming node of the specified playing live video
The node of the node of video, the request live video asks video clip to the live streaming node, and is obtaining live streaming node hair
After the video clip sent, the video clip is played.
But due to network or delay problem, the video clip stored in above-mentioned live streaming node may be discontinuous, so
The video clip downloaded for the node of the request live video may be also discontinuous, then will have a direct impact on live streaming in this way and regard
The broadcasting of frequency, user's impression are extremely bad.
Invention content
Based on the above issues, the embodiment of the invention discloses a kind of video clip method for down loading, to download continuous video
Segment.Technical solution is as follows:
An embodiment of the present invention provides a kind of video clip method for down loading, the node being applied in peer-to-peer network system, institute
The method of stating includes:
It is sent to the node that requested programme televised live is being broadcast live and obtains the video clip for identifying asked programme televised live
There are the sequences of the mark sequence of situation to be asked, wherein the mark sequence includes mark and video clip serial number
Correspondence, and any being identified as in the mark sequence:It identifies existing for the video clip to exist and identifies or identify institute
State that video clip is not present there is no marks;
The mark sequence for the node feeding back that requested programme televised live is being broadcast live is received, and respectively from each mark received
Know extraction in sequence and there is mark, obtains the presence extracted in each mark sequence and identify corresponding video clip serial number set,
Determine all video clip serial number union of sets collection obtained;
When the union is not empty, according to video clip playing sequence, to each video clip sequence that is described and concentrating
It number is ranked up;
Determine quantity that is after being ranked up and concentrating the video clip serial number in each continuous serial number groupWherein, institute
It states the most preceding corresponding video clip of video clip serial number in continuous serial number group and last video clip serial number is corresponding regards
The video clip serial number of each video clip between frequency segment exists in the continuous serial number group, and z and z+i are described and concentrate
Video clip serial number;
According to the quantity of determining video clip serial numberTo all video clip serial numbers pair in continuous serial number group
The video clip answered is downloaded.
Optionally, the quantity according to determining video clip serial numberTo all videos in continuous serial number group
The corresponding video clip of segment serial number is downloaded, including:
To quantityThe corresponding video clip of all video clip serial numbers in maximum continuous serial number group carries out down
It carries.
Optionally, described to quantityThe corresponding video of all video clip serial numbers in maximum continuous serial number group
Segment is downloaded, including:
QuantificationAll video clips of each video clip serial number in maximum continuous serial number group in acquisition
Occurrence number in serial number set;
Success rate, number of computations are downloaded according to the occurrence number and preset video clipMaximum continuous sequence
The initial download success rate of the corresponding video clip of each video clip serial number in number group;
By quantityThe corresponding video clip of each video clip serial number in each grouping in maximum continuous serial number group
The result that is multiplied of initial download success rate continuously download success rate as the grouping of the grouping, wherein the grouping
Interior video clip serial number is continuous and number is identical;
It is corresponding to the video clip serial number in the grouping successively according to the continuous size for downloading success rate of the grouping
Video clip is downloaded.
Optionally, described that success rate, number of computations are downloaded according to the occurrence number and preset video clipMost
The initial download success rate of the corresponding video clip of each video clip serial number in big continuous serial number group, including:
According to the occurrence number yzSuccess rate p is downloaded with preset video clip, utilizes formula
Number of computationsThe corresponding video clip of each video clip serial number in maximum continuous serial number group it is initial
Download success rate.
Optionally, described to quantityThe corresponding video of all video clip serial numbers in maximum continuous serial number group
Segment is downloaded, including:
According to quantityThe data volume of the corresponding video clip of each video clip serial number in maximum continuous serial number group
Size is downloaded;
Alternatively,
According to quantityThe broadcasting of the corresponding video clip of each video clip serial number is suitable in maximum continuous serial number group
Sequence is downloaded.
Optionally, further include:
Determine be ranked up after and concentration each video clip serial number acquisition all video clip serial number set
In occurrence number yz;
According to the occurrence number yzSuccess rate p is downloaded with preset video clip, utilizes formula
Calculate the initial download success rate p of the corresponding video clip of each video clip serial numberz;
It is after being ranked up and concentrate, utilize formulaThe subclass for calculating each subclass continuously downloads success
RateWherein, the number all same of the video clip serial number in the subclass, z and z+r are video that is described and concentrating
Segment serial number;
The quantity according to determining video clip serial numberTo all video clip sequences in continuous serial number group
Number corresponding video clip is downloaded, including:
Utilize formula
The weight of the corresponding video clips of video clip serial number z is calculated, and to the corresponding video clip sequence of weight limit
Number for starting continuous serial number group with regarding in the intersection of the subclass of weight limit corresponding video clip serial number starting
The corresponding video clip of frequency segment serial number is downloaded.
The embodiment of the present invention additionally provides a kind of video clip download apparatus, the node being applied in peer-to-peer network system,
Described device includes:Request transmitting unit, sequential reception unit, serial number sequencing unit, quantity determination unit and segment are downloaded single
Member;Wherein,
The request transmitting unit is asked for sending to obtain to identify to the node that requested programme televised live is being broadcast live
Seeking the video clip of programme televised live, there are the sequences of the mark sequence of situation to be asked, wherein the mark sequence includes
Mark and the correspondence of video clip serial number, and any in the mark sequence is identified as:The video clip is identified to deposit
Presence mark or identify that the video clip is not present there is no marks;
The sequential reception unit, the mark sequence for receiving the node feeding back that requested programme televised live is being broadcast live
Row, and from each mark sequence received there is mark in extraction respectively;Obtain the presence mark extracted in each mark sequence
Corresponding video clip serial number set determines all video clip serial number union of sets collection obtained;
The serial number sequencing unit is used for when the union that the sequential reception unit determines not is empty, according to piece of video
Section playing sequence is ranked up each video clip serial number that is described and concentrating;
The quantity determination unit, for determining after serial number sequencing unit sequence and concentrating in each continuous serial number group
Video clip serial number quantityWherein, the most preceding corresponding video of video clip serial number in the continuous serial number group
The video clip serial number of each video clip between segment and the last corresponding video clip of video clip serial number is continuous at this
Exist in serial number group, z and z+i are video clip serial number that is described and concentrating;
The segment download unit, the quantity of the video clip serial number for being determined according to the quantity determination unitThe corresponding video clip of all video clip serial numbers in continuous serial number group is downloaded.
Optionally, the segment download unit, is specifically used for:To quantityIt is all in maximum continuous serial number group
The corresponding video clip of video clip serial number is downloaded.
Optionally, the segment download unit, including:Occurrence number determination subelement, initial success rate computation subunit,
Subelements under continuous success rate determination subelement and segment;Wherein,
The occurrence number determination subelement is used for quantificationEach video in maximum continuous serial number group
Occurrence number of the segment serial number in all video clip serial number set received;
The initial success rate computation subunit, the occurrence number for being determined according to the occurrence number determination subelement
Success rate, number of computations are downloaded with preset video clipEach video clip serial number in maximum continuous serial number group
The initial download success rate of corresponding video clip;
The continuous success rate determination subelement is used for quantityIn maximum continuous serial number group in each grouping
Point of the result that the initial download success rate of the corresponding video clip of each video clip serial number is multiplied as the grouping
Group is continuous to download success rate, wherein the video clip serial number in the grouping is continuous and number is identical;
Subelements under the segment are continuously downloaded successfully for what is determined according to the continuous success rate determination subelement
The size of rate is successively downloaded the corresponding video clip of video clip serial number in the grouping.
Optionally, the initial success rate computation subunit, is specifically used for:According to the occurrence number yzIt is regarded with preset
Frequency segment downloads success rate p, utilizes formula
Number of computationsThe corresponding video clip of each video clip serial number in maximum continuous serial number group it is initial
Download success rate.
Optionally, the segment download unit, including:First time subelements or second time subelements,
First time subelements, are used for:According to quantityEach video clip sequence in maximum continuous serial number group
The data volume size of number corresponding video clip is downloaded;
Second time subelements, are used for:According to quantityEach video clip sequence in maximum continuous serial number group
The playing sequence of number corresponding video clip is downloaded.
Optionally, further include:Occurrence number determination unit, initial success rate computing unit and continuous success rate calculate single
Member;Wherein,
The occurrence number determination unit, each video for determining after serial number sequencing unit sequence and concentration
Occurrence number y of the segment serial number in all video clip serial number set of acquisitionz;
The initial success rate computing unit, for according to the occurrence number yzIt is downloaded successfully with preset video clip
Rate p, utilizes formula
Calculate the initial download success rate p of the corresponding video clip of each video clip serial numberz;
The continuous success rate computing unit, for the serial number sequencing unit sequence after and concentrate, utilize formulaThe subclass for calculating each subclass continuously downloads success rateWherein, the video clip sequence in the subclass
Number number all same, z and z+r are video clip serial number that is described and concentrating;
The segment download unit, is specifically used for:Utilize formula
The weight of the corresponding video clips of video clip serial number z is calculated, and to the corresponding video clip sequence of weight limit
Number for starting continuous serial number group with regarding in the intersection of the subclass of weight limit corresponding video clip serial number starting
The corresponding video clip of frequency segment serial number is downloaded.
In the embodiment of the present invention, the node in peer-to-peer network system is sent out to the node that requested programme televised live is being broadcast live
The sequence of mark sequence is sent to be asked, there are situations for the video clip of the mark sequence identifier programme televised live, are then connecing
After the mark sequence for receiving the node feeding back that requested programme televised live is being broadcast live, respectively from each mark sequence received
There is mark in extraction;It obtains the presence extracted in each mark sequence and identifies corresponding video clip serial number set, determine and obtain
All video clip serial number union of sets collection;When the union is not empty, according to video clip playing sequence, to this and concentrate
Each video clip serial number be ranked up;It determines after being ranked up and concentrates video clip serial number in each continuous serial number group
QuantityZ and z+i is video clip serial number that is described and concentrating;According to the quantity of determining video clip serial numberThe corresponding video clip of all video clip serial numbers in continuously mark group is downloaded.Compared with prior art,
The node source that the embodiment of the present invention obtains video clip is more, from the node that the programme televised live is being broadcast live request obtain
It identifies in sequence, obtains the video clip serial number set there are video clip indirectly, select continuous video clip in the set
The corresponding video clip of serial number is downloaded, and the video clip that download obtains in this way is more continuous, and smoothly, user feels video playing
By preferable.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
Obtain other attached drawings according to these attached drawings.
Fig. 1 is storage organization schematic diagram on the index server of the embodiment of the present invention;
A kind of a kind of flow chart for video clip method for down loading that Fig. 2 is provided by the embodiment of the present invention;
Fig. 3 is the data buffer storage structural schematic diagram of the node of the embodiment of the present invention;
Fig. 4 is the bitmap storage organization schematic diagram of the node of the embodiment of the present invention;
A kind of another flow chart for video clip method for down loading that Fig. 5 is provided by the embodiment of the present invention;
A kind of another flow chart for video clip method for down loading that Fig. 6 is provided by the embodiment of the present invention;
A kind of structural schematic diagram for video clip download apparatus that Fig. 7 is provided by the embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other without creative efforts
Embodiment shall fall within the protection scope of the present invention.
A kind of video clip method for down loading provided in an embodiment of the present invention is briefly described first, this method is applied to
Node in peer-to-peer network system, may comprise steps of:
It is sent to the node that requested programme televised live is being broadcast live and obtains the video clip for identifying asked programme televised live
There are the sequences of the mark sequence of situation to be asked, wherein the mark sequence includes mark and video clip serial number
Correspondence, and any being identified as in the mark sequence:It identifies existing for the video clip to exist and identifies or identify institute
State that video clip is not present there is no marks;
The mark sequence for the node feeding back that requested programme televised live is being broadcast live is received, and respectively from each mark received
Know extraction in sequence and there is mark, obtains the presence extracted in each mark sequence and identify corresponding video clip serial number set,
Determine all video clip serial number union of sets collection obtained;
When the union is not empty, according to video clip playing sequence, to each video clip sequence that is described and concentrating
It number is ranked up;
Determine quantity that is after being ranked up and concentrating the video clip serial number in each continuous serial number groupWherein, institute
It states the most preceding corresponding video clip of video clip serial number in continuous serial number group and last video clip serial number is corresponding regards
The video clip serial number of each video clip between frequency segment exists in the continuous serial number group, and z and z+i are described and concentrate
Video clip serial number;
According to the quantity of determining video clip serial numberTo all video clip serial numbers pair in continuous serial number group
The video clip answered is downloaded.
It should be noted that peer-to-peer network system is also known as P2P systems, by node, data source server and index service
Device forms, and in embodiments of the present invention, data source server stores the video clip of live video, and can be by the piece of video of storage
Section is sent to node;Index server stores:The storage condition information of video clip and each node in data source server
The storage condition information and playback progress information of upper video clip, as shown in Figure 1, for the information on an index server;At this
Each terminal equipment in peer-to-peer network system is all a node, and node itself has certain memory space, can be used as number
According to supplier, but also can be used as the requestor of data simultaneously.When node needs to play programme televised live, the preset particular size of meeting
Spatial cache is to store the data cached of programme televised live, since the spatial cache of the particular size is typically small, so this is slow
Deposit data stores by the way of recycling cover type, such as:The spatial cache can store 5 video clips, when 1 to No. 5
After video clip caches, No. 6 video clip is then stored in the position of No. 1 video clip, and No. 7 video clip is then deposited
Storage is in the position of No. 2 video clip, and video clip later covers successively, so the programme televised live stored on each node
Video clip data it is less, therefore within a certain period of time, it is possible to provide the data of video clip of programme televised live be also
It is limited.
Compared with prior art, the node source of acquisition of embodiment of the present invention video clip is more, straight from this is being broadcast live
It broadcasts in the mark sequence that request obtains at section destination node, obtains the video clip serial number set there are video clip indirectly, select
It selects the corresponding video clip of continuous video clip serial number in the set to be downloaded, downloads obtained video clip in this way and relatively connect
Continuous, smoothly, user's impression is preferable for video playing.
The step of being provided for the embodiments of the invention a kind of video clip method for down loading below describes in detail.Fig. 2
By a kind of a kind of flow chart for video clip method for down loading that the embodiment of the present invention provides, this method is applied to peer-to-peer network system
Node in system, may comprise steps of:
S101 sends to the node that requested programme televised live is being broadcast live and obtains the video for identifying asked programme televised live
There are the sequences of the mark sequence of situation to be asked for segment;
Wherein, the mark sequence includes the correspondence of mark and video clip serial number, and in the mark sequence
Any be identified as:Identify the video clip it is existing there is mark or identify that the video clip is not present there is no marks
Know;
It should be noted that data source server stores the video clip of live video in P2P systems, when programme televised live
When video data generates, which is divided into several to regard by data source server according to fixed size or fixed duration
Frequency segment, and video clip serial number is added for each video clip, the corresponding video clip serial number of each video clip is in network
In be unique.Under normal circumstances, the sequence of video clip serial number is consistent with video clip playing sequence.
In P2P systems, node can be used as data requester, can also be used as data set provider.At same time point,
In the case of not having network delay, it should be consistent that current video clip being played on, which is being broadcast live on the node of programme televised live,
, but just because of the difference of the network environment where each node, the video of the programme televised live stored on each node
Segment may be different.One section of spatial cache can be arranged to store the caching number of programme televised live generation in each node
According to as shown in figure 3, in the node data buffer structure, having the total m memory space of a to a+m-1, which can be disposable
At most m video clip of caching.In order to simply show the storage condition of each node, for each memory space, when this
When memory space is stored with video clip, indicated in the presence of mark with one;When the memory space is not stored with video clip, with one
There is no marks to indicate.The storage condition of the spatial cache of node, which can then be used to there is mark or be not present, in this way identifies table
Show, it is corresponding to there is mark or mark formation mark sequence is not present according to the sequence of the memory space storage video clip of node
Row, the mark sequence include the correspondence of mark and video clip serial number.As shown in figure 4, being node data shown in Fig. 3
The mark sequence that the corresponding mark of each memory space in buffer structure is formed, can also be referred to as bitmap storage organization.Its
In, there is mark and indicated with 1, there is no marks to be indicated with 0, then the mark sequence in Fig. 3 indicates:Memory space in Fig. 3
Number a has data, the number a+1 no datas of the memory space in Fig. 3, and so on.
Specifically, the node that live streaming request is sent to index server is known as requesting node, the request in P2P systems
After node sends live streaming request to index server, asked programme televised live during index server is asked according to the live streaming received
Program identification, the node of the programme televised live with the program identification is being broadcast live in locally lookup, and all by what is found
The node identification of node feeds back to the requesting node, after which receives the node identification of index server feedback, to
The sequence that node with node identification sends acquisition mark sequence is asked.These nodes with node identification receive
When sequence obtains request, the mark sequence feedback of itself is given to the requesting node.Wherein, which is the programme televised live
Title or label;The node identification is the network address for the node that the programme televised live is being broadcast live or corresponds to equipment physically
Location, certainly, the program identification and the node identification can also be that other identifier known in those skilled in the art, the present invention are real
Example is applied to be defined not to this.
S102 receives the mark sequence for the node feeding back that requested programme televised live is being broadcast live, and respectively from receiving
Each mark sequence in extraction exist mark;It obtains the presence extracted in each mark sequence and identifies corresponding video clip serial number
Set determines all video clip serial number union of sets collection obtained;
S103 judges whether the union is empty, when being not empty, executes S104 steps;
Specifically, when being sent to above-mentioned requesting node in S101 steps, sequence is asked and requesting node feeds back each section
After the sequence identifier of point, each sequence identifier of feedback is received.Then respective deposit is extracted from these sequence identifiers respectively
It is identifying, according to the correspondence of mark and video clip serial number in sequence identifier, it is known that these, which exist, identifies corresponding video
Segment serial number.For each sequence identifier, it can all obtain a presence extracted and identify corresponding video clip serial number composition
Video clip serial number set.The video clip serial number that may have repetition in these video clip serial number set, by each video
The video clip serial number for removing repetition in segment serial number set obtains all video clip serial number union of sets collection, it is known that, this is simultaneously
The video clip serial number of concentration is differing from each other.Judge whether the union is empty, when being not empty, executes S104 steps.
It illustrates, it is assumed that there is mark and indicated with 1, there is no marks to be indicated with 0, receives three requesting node feedbacks
Mark sequence, be respectively:101011,001000,110010, corresponding video clip serial number 1,2,3,4,5,6, then three
The video clip serial number set that a requesting node is formed is respectively { 1,3,5,6 }, { 3 }, { 1,2,5 }, the video clip that will be repeated
It is { 1,3,5,6,2 } to remove the union obtained later.
S104 is ranked up each video clip serial number that is described and concentrating according to video clip playing sequence;
It should be noted that data source server presses the video data after the video data of programme televised live generates
Several video clips are divided into according to fixed size or fixed duration, and unique video clip is added for each video clip
Serial number.Under normal circumstances, the sequence of video clip serial number is consistent with video clip playing sequence.It therefore can be according to piece of video
Section playing sequence is ranked up video clip serial number.The preceding video clip of reproduction time first plays, and reproduction time is posterior
It is played after video clip.
Specifically, after obtaining union in S102 steps, and when the union is not empty, can be played according to video clip suitable
Sequence is ranked up the video clip serial number of this and concentration, under normal circumstances, can be ranked up according to ascending order, but can also
It is ranked up according to descending, the embodiment of the present invention is defined not to this.Such as the example in S102 steps, obtained union
For { 1,3,5,6,2 }, the union after sorting according to the step is { 1,2,3,5,6 }.
S105 determines quantity that is after being ranked up and concentrating the video clip serial number in each continuous serial number group
Wherein, the most preceding corresponding video clip of video clip serial number in the continuous serial number group and last piece of video
The video clip serial number of each video clip between the corresponding video clip of section serial number exists in the continuous serial number group, z and z
+ i is video clip serial number that is described and concentrating;
It should be noted that above-mentioned continuous serial number group is intended merely to the title for facilitating description to be arranged, it in practice can't be right
After sequence and concentration video clip serial number is artificially grouped, and the embodiment of the present invention is given tacit consent to each video clip serial number and corresponded to
Video clip inside be continuous.Each video clip serial number in each continuous serial number group is continuous and inequality, one
Most preceding video clip in last video clip serial number and another continuous serial number group adjacent thereafter in continuous serial number group
Serial number is discontinuous.
Specifically, when in S104 steps pairs and after the video clip serial number of concentration is ranked up, and it is to have sequence to concentrate
Video clip serial number set, at this and concentrate, may each video clip serial number it is discontinuous, it is also possible to certain several video
Segment serial number is continuous, and continuous video clip serial number constitutes continuous serial number group, and in this way after the sequence and concentration then exists
Several continuous serial number groups can calculate the quantity of the video clip serial number in each continuous serial number group.Assume at this point that continuous sequence
Most preceding video clip serial number z, last video clip serial number z+i in number group, then the continuous serial number group can be obtained
In video clip serial number number be i+1, in order to preferably indicate it is the video clip serial number in which continuous serial number group
Number is usedIndicate most preceding video clip serial number z, the continuous serial number group of last video clip serial number z+i
Number.Such as the example in S104 steps, the union after sequence are { 1,2,3,5,6 }, it is seen that have { 1,2,3 }, { 5,6 } two companies
Continuous serial number group, the number of previous continuous serial number group are represented byThere are 3 video clip serial numbers, the continuous sequence of the latter
The number of number group is represented byThere are 2 video clip serial numbers.
S106, according to the quantity of determining video clip serial numberTo all video clip sequences in continuous serial number group
Number corresponding video clip is downloaded.
Specifically, S105 steps determine the quantity of the video clip serial number in each continuous serial number groupIt afterwards, can root
According to the quantityThe corresponding video clip of all video clip serial numbers in continuous serial number group is downloaded.Such as:Under
Carry quantityThe corresponding video clip of all video clip serial numbers in maximum continuous serial number group is downloaded;Alternatively, same
When to quantityMaximum continuous serial number group and quantityAll video clip serial numbers pair in second continuous serial number group
The video clip answered is downloaded.
Compared with prior art, the node source of acquisition of embodiment of the present invention video clip is more, straight from this is being broadcast live
It broadcasts in the mark sequence that request obtains at section destination node, obtains the video clip serial number set there are video clip indirectly, select
It selects the corresponding video clip of continuous video clip serial number in the set to be downloaded, downloads obtained video clip in this way and relatively connect
Continuous, smoothly, user's impression is preferable for video playing.
In a specific embodiment, the quantity according to determining video clip serial numberTo continuous serial number group
In the corresponding video clip of all video clip serial numbers be downloaded, may include:
To quantityThe corresponding video clip of all video clip serial numbers in maximum continuous serial number group is downloaded.
Specifically, S105 steps determine the quantity of the video clip serial number in each continuous serial number groupAfterwards, in order to
More video clips can be continuously obtained, to quantityAll video clip sequences in maximum video clip serial number group
Number corresponding video clip is downloaded, and can disposably download to most video clips in this way, node can also be disposable
Play more video clips.
On this basis, a variety of downloading modes can be set to quantityAll in maximum continuous serial number group regard
The corresponding video clip of frequency segment serial number is downloaded.
First way, can be to quantityAll video clip serial numbers in maximum continuous serial number group are corresponding to be regarded
Frequency fragment packet is downloaded, then described to quantityAll video clip serial numbers in maximum continuous serial number group are corresponding
Video clip is downloaded, and may include:
QuantificationAll video clips of each video clip serial number in maximum continuous serial number group in acquisition
Occurrence number in serial number set;
Success rate, number of computations are downloaded according to the occurrence number and preset video clipMaximum continuous serial number
The initial download success rate of the corresponding video clip of each video clip serial number in group;
By quantityThe corresponding video clip of each video clip serial number in each grouping in maximum continuous serial number group
The result that is multiplied of initial download success rate continuously download success rate as the grouping of the grouping, wherein the grouping
Interior video clip serial number is continuous and number is identical;
It is corresponding to the video clip serial number in the grouping successively according to the continuous size for downloading success rate of the grouping
Video clip is downloaded.
Specifically, after receiving mark sequence in S102 steps, the corresponding video clip serial number of each mark sequence can get
Gather, there may be repetitions for the video clip serial number in these video clip serial number set, that is to say, that all video clips
The same video clip serial number that may have more than one in serial number set, likewise, quantityMaximum continuous serial number group
In each video clip serial number may also occur more than once in all video clip serial number set.In this way, can first count
Calculate quantityEach video clip serial number going out in all video clip serial number set in maximum continuous serial number group
Occurrence number.
Video clip can be preset according to historical experience value and downloads success rate, and then according to above-mentioned each video clip serial number
Occurrence number in all video clip serial number set can calculate quantity using mathematical formulaeMaximum continuous sequence
The initial download success rate of the corresponding video clip of each video clip serial number in number group, the mathematical formulae are art technology
Technology well known to personnel.
According to specific quantity, above-mentioned each video clip serial number is grouped, then the video clip sequence being each grouped
Number amount is identical and continuous.For each grouping, by the initial download success rate phase of each video clip serial number in the grouping
Multiply, obtained result continuously downloads success rate as the grouping of the grouping.
The initial download success rate of above-mentioned each video clip serial number may be different, so the grouping being each grouped connects
Continuous success rate of downloading may also be different, can be first to being grouped the continuous video clip sequence downloaded in the maximum grouping of success rate
Number corresponding video clip is downloaded successively, when starting the video clip to being grouped in the continuous grouping for downloading success rate second
When the corresponding video clip of serial number is downloaded, first video in the continuous grouping for downloading success rate second of first detection grouping
The corresponding video clip of segment serial number, when not storing, is downloaded it whether being locally stored;When having stored, ignore
The video clip serial number continues to detect the corresponding video clip of next video clip serial number that situation is being locally stored, and then holds
The action of detection is downloaded or continued to row.For in all groupings after being grouped continuous download success rate third or ranked third
The corresponding video clip of video clip serial number carry out above-mentioned action successively, which is not described herein again.
It is described to be downloaded successfully according to the occurrence number and preset video clip when first way implements
Rate, number of computationsThe initial download of the corresponding video clip of each video clip serial number in maximum continuous serial number group
Success rate may include:
According to the occurrence number yzSuccess rate p is downloaded with preset video clip, utilizes formula
Number of computationsThe corresponding video clip of each video clip serial number in maximum continuous serial number group it is initial
Download success rate.
Specifically, using formulaAt the beginning of calculating the corresponding video clip of above-mentioned each video clip serial number
Begin to download success rate, wherein yzFor quantityEach video clip serial number in maximum continuous serial number group is in all videos
Occurrence number in segment serial number set, p are that preset video clip downloads success rate.
The second way, it is described to quantityAll video clip serial numbers in maximum continuous serial number group are corresponding to be regarded
Frequency segment is downloaded, and may include:
According to quantityThe data volume of the corresponding video clip of each video clip serial number in maximum continuous serial number group
Size is downloaded.
Specifically, the download time needed for the bigger video clip of data volume is longer, in order to enable users to viewing early
To video clip, can first downloading data amount minimum video clip, next penultimate video clip of downloading data amount, i.e.,
It is downloaded according to the size of data volume, in this way when user watches a video clip, another video clip has also been downloaded
Finish, the stand-by period of user can be reduced in this way turning next to second video clip, user experiences more preferably.
The third mode, it is described to quantityAll video clip serial numbers in maximum continuous serial number group are corresponding
Video clip is downloaded, and may include:
According to quantityThe broadcasting of the corresponding video clip of each video clip serial number is suitable in maximum continuous serial number group
Sequence is downloaded.
Specifically, when the video data of programme televised live generates, data source server is by the live data according to fixed big
Small or fixed duration is divided into several video clips, and adds video clip serial number, each video for each video clip
The corresponding video clip serial number of segment is unique in a network.Under normal circumstances, the sequence and piece of video of video clip serial number
Section playing sequence is consistent.It in this way can be according to the quantityEach video clip serial number in maximum continuous serial number group
Sequentially namely the playing sequence of video clip is downloaded video clip, and the video of this mode user viewing is relatively coherent, sense
By preferable.
In practice, there is no the nodes of the playing programme televised live in the possible P2P networks, correspondingly, video clip
Serial number set is then sky, and union is then sky, at this moment the node of programme televised live is asked then cannot to obtain piece of video from other nodes
The data of section because peer-to-peer network system can also include data source server, therefore can ask live streaming section to data source server
Purpose video data, as shown in figure 5, a kind of another kind of video clip method for down loading for the basis of embodiment shown in Fig. 2
Flow chart, when judging union for sky, the method can also include:
S201 sends live streaming request to the data source server, is carried in the live streaming request and live streaming is asked to save
Purpose program identification;
Specifically, when union is empty, the node of programme televised live is asked then to send live streaming request to data source server, it should
The program identification of requested programme televised live is carried in live streaming request.Data source server is receiving live streaming request in this way
Afterwards, the program identification carried in being asked according to the live streaming searches the video clip of the programme televised live with the program identification, and will
The newest video clip of the programme televised live found feeds back to the node of the request programme televised live.
S202 receives the video clip of the asked programme televised live of the data source server feedback.
Specifically, when data source server feeds back to the newest of the requested programme televised live of node of the request programme televised live
After video clip, the video clip is received, and then plays the video clip.
The viewing experience of user in order to further increase, can be to not only continuously downloading success rate but also high video clip progress
It downloads, on the basis of embodiment shown in Fig. 2, increases to downloading the step of success rate calculates, as shown in fig. 6, implementing for the present invention
Another flow chart that a kind of video clip for being provided of example is downloaded on the basis of Fig. 6 embodiments shown in Fig. 2, increases following step
Suddenly:
S301, determine be ranked up after and concentration each video clip serial number acquisition all video clip serial numbers
Occurrence number y in setz;
Specifically, after receiving mark sequence in S102 steps, the corresponding video clip serial number of each mark sequence can get
Gather, there may be repetitions for the video clip serial number in these video clip serial number set, that is to say, that all video clips
May have the same video clip serial number of more than one in serial number set, likewise, after being ranked up and concentration it is each
Video clip serial number may also occur more than once in all video clip serial number set.In this way, this can first be calculated simultaneously
Occurrence number of each video clip serial number concentrated in all video clip serial number set.
S302, according to the occurrence number yzSuccess rate p is downloaded with preset video clip, utilizes formula
Calculate the initial download success rate p of the corresponding video clip of each video clip serial numberz;
Specifically, can preset video clip according to historical experience value downloads success rate p, and then should and be concentrated according to above-mentioned
Occurrence number y of each video clip serial number in all video clip serial number setz, utilize mathematical formulaeThe initial download success rate of this and the corresponding video clip of each video clip serial number of concentration can be calculated
pz, mathematical formulae technology known to those skilled in the art.
S303, it is after being ranked up and concentrate, utilize formulaThe subclass for calculating each subclass is continuously downloaded
Success rateWherein, the number all same of the video clip serial number in the subclass, z and z+r are described and concentrate
Video clip serial number;
Specifically, according to specific quantity, each video clip serial number of this and concentration is divided into several subclass, the son
Set is intended merely to the title for facilitating description to be arranged, and can't be carried out in practice to after sequence and concentration video clip serial number
Artificial grouping, is calculated by S302 steps and is concentrated the initial download success rate of the corresponding video clip of each video clip serial number
pz, then the initial download success rate p of the corresponding video clip of video clip serial number in each subclasszIt is i.e. known.For each
Subclass utilizes formulaThe subclass that the subclass can be calculated continuously downloads success rate, wherein pzFor the subset
The initial download success rate of the corresponding video clip of video clip serial number in conjunction, z are video clip most preceding in the subclass
Serial number, z+i are video clip serial number last in the subclass, then the number of the video clip serial number in the subclass is r+
1,The result being calculated isIndicate most preceding video clip serial number z, last video clip serial number
The subclass of the subclass of z+r continuously downloads success rate.
Then in the S106 steps in embodiment illustrated in fig. 2, the quantity according to determining video clip serial number
To being that the corresponding video clip of all video clip serial numbers in the continuous serial number group originated is downloaded with z, may include:
S106 ' utilizes formula
The weight of the corresponding video clips of video clip serial number z is calculated, and to the corresponding video clip sequence of weight limit
Number for starting continuous serial number group with regarding in the intersection of the subclass of weight limit corresponding video clip serial number starting
The corresponding video clip of frequency segment serial number is downloaded.
Specifically, the quantity of the video clip serial number determined according to S105 stepsWith the calculated son of S303 steps
Set is continuous to download success rateUtilize formulaCalculate the corresponding video of each video clip serial number
The weight w of segmentz, video clip serial numberzForMost preceding video clip serial number in corresponding continuous serial number group is
Most preceding video clip serial number in corresponding subclass.The maximum video clip serial number of weight is selected, then determines the weight most
The subclass of the maximum video clip serial number starting of continuous serial number group and the weight of big video clip serial number starting,
The video clip serial number in the intersection in the continuous serial number group and the subclass is obtained, and then these video clip serial numbers are carried out
It downloads.Such as:First continuous serial number group is { 2,3,4 }, and the first subset is combined into { 2,3,4,6,7 }, the number of the first continuous serial number group
Mesh isAssuming that the subclass of the first subclass continuously downloads success rate isw2=9/5;Second continuous serial number
Group is { 5,6,7 }, and second subset is combined into { 5,6,9,11,14 }, and the number of the second continuous serial number group isAssuming that the second son
The subclass of set continuously downloads success ratew5=21/10, w5>w2, then the second continuous serial number group and the are selected
Video clip in the intersection { 5,6 } of two subclass is downloaded.
Corresponding to embodiment of the method shown in Fig. 2, the embodiment of the present invention additionally provides a kind of video clip download apparatus, such as
It is a kind of a kind of structural schematic diagram of video clip download apparatus provided in an embodiment of the present invention shown in Fig. 7, which is applied to
Node in peer-to-peer network system, described device may include:Request transmitting unit 410, sequential reception unit 420, serial number row
Sequence unit 430, quantity determination unit 440 and segment download unit 450;Wherein,
The request transmitting unit 410 is identified for being sent to the node that requested programme televised live is being broadcast live
There are the sequences of the mark sequence of situation to be asked for the video clip of asked programme televised live, wherein in the mark sequence
Including identify with the correspondence of video clip serial number, and any in the mark sequence is identified as:Identify the piece of video
Section is existing there is mark or identify that the video clip is not present there is no marks;
The sequential reception unit 420, the mark for receiving the node feeding back that requested programme televised live is being broadcast live
Sequence, and from each mark sequence received there is mark in extraction respectively;Obtain it is each mark sequence in extracted there are marks
Know corresponding video clip serial number set, determines all video clip serial number union of sets collection obtained;
The serial number sequencing unit 430 is used for when the union that the sequential reception unit 420 determines not is empty, according to
Video clip playing sequence is ranked up each video clip serial number that is described and concentrating;
The quantity determination unit 440, for determining after the serial number sequencing unit 430 sorts and concentrating each continuous sequence
The quantity of video clip serial number in number groupWherein, the most preceding video clip serial number in the continuous serial number group corresponds to
Video clip and the last corresponding video clip of video clip serial number between the video clip serial number of each video clip exist
Exist in the continuous serial number group, z and z+i are video clip serial number that is described and concentrating;
The segment download unit 450, the number of the video clip serial number for being determined according to the quantity determination unit 440
AmountThe corresponding video clip of all video clip serial numbers in continuous serial number group is downloaded.
Specifically, the node that live streaming request is sent to index server is known as requesting node, the request in P2P systems
After node sends live streaming request to index server, asked programme televised live during index server is asked according to the live streaming received
Program identification, the node of the programme televised live with the program identification is being broadcast live in locally lookup, and all by what is found
The node identification of node feeds back to the requesting node, after which receives the node identification of index server feedback, to
The sequence that node with node identification sends acquisition mark sequence is asked.These nodes with node identification receive
When sequence obtains request, the mark sequence feedback of itself is given to the requesting node.Receive each sequence identifier of feedback.Then divide
Respective presence mark is not extracted from these sequence identifiers, it is corresponding with video clip serial number according to being identified in sequence identifier
Relationship, it is known that these, which exist, identifies corresponding video clip serial number.For each sequence identifier, it can all obtain one and extract
In the presence of the video clip serial number set for identifying corresponding video clip serial number composition.May have in these video clip serial number set
The video clip serial number repeated, will remove the video clip serial number of repetition, obtains all regard in each video clip serial number set
Frequency segment serial number union of sets collection can be according to video clip playing sequence, to the piece of video of this and concentration when the union is not empty
Section serial number is ranked up.It at this and concentrates, possible each video clip serial number is discontinuous, it is also possible to certain several video clip sequence
Number be continuous, continuous video clip serial number constitutes continuous serial number group, if in this way after the sequence and concentrate then in the presence of involvement
Continuous serial number group, can calculate the quantity of the video clip serial number in each continuous serial number groupAnd then according to the quantityThe corresponding video clip of all video clip serial numbers in continuous serial number group is downloaded.
Compared with prior art, the node source of acquisition of embodiment of the present invention video clip is more, straight from this is being broadcast live
It broadcasts in the mark sequence that request obtains at section destination node, obtains the video clip serial number set there are video clip indirectly, select
It selects the corresponding video clip of continuous video clip serial number in the set to be downloaded, downloads obtained video clip in this way and relatively connect
Continuous, smoothly, user's impression is preferable for video playing.
The segment download unit 450 in embodiment illustrated in fig. 7, is specifically used for:To quantityMaximum continuous sequence
The corresponding video clip of all video clip serial numbers in number group is downloaded.The embodiment is known as first embodiment.
Specifically, determining the quantity of the video clip serial number in each continuous serial number groupAfterwards, in order to continuous
More video clips are obtained, to quantityAll video clip serial numbers in maximum video clip serial number group are corresponding
Video clip is downloaded, and can disposably download to most video clips in this way, and node can also be played disposably more
Video clip.
On the basis of the first embodiment, the segment download unit 450 may include:Occurrence number determines that son is single
Subelements under member, initial success rate computation subunit, continuous success rate determination subelement and segment;The embodiment is known as
Two embodiments, wherein
The occurrence number determination subelement is used for quantificationEach video in maximum continuous serial number group
Occurrence number of the segment serial number in all video clip serial number set received;
The initial success rate computation subunit, the occurrence number for being determined according to the occurrence number determination subelement
Success rate, number of computations are downloaded with preset video clipEach video clip serial number in maximum continuous serial number group
The initial download success rate of corresponding video clip;
The continuous success rate determination subelement is used for quantityIn maximum continuous serial number group in each grouping
Point of the result that the initial download success rate of the corresponding video clip of each video clip serial number is multiplied as the grouping
Group is continuous to download success rate, wherein the video clip serial number in the grouping is continuous and number is identical;
Subelements under the segment are continuously downloaded successfully for what is determined according to the continuous success rate determination subelement
The size of rate is successively downloaded the corresponding video clip of video clip serial number in the grouping.
Specifically, after receiving mark sequence, the corresponding video clip serial number set of each mark sequence is can get, these are regarded
There may be repetitions for video clip serial number in frequency segment serial number set, that is to say, that in all video clip serial number set
The same video clip serial number that may have more than one, likewise, quantityEach in maximum continuous serial number group regards
Frequency segment serial number may also occur more than once in all video clip serial number set.In this way, quantity can be calculated firstOccurrence number of each video clip serial number in all video clip serial number set in maximum continuous serial number group.
Video clip can be preset according to historical experience value and downloads success rate, and then according to above-mentioned each video clip serial number
Occurrence number in all video clip serial number set can calculate quantity using mathematical formulaeMaximum continuous sequence
The initial download success rate of the corresponding video clip of each video clip serial number in number group, the mathematical formulae are art technology
Technology well known to personnel.
According to specific quantity, above-mentioned each video clip serial number is grouped, then the video clip sequence being each grouped
Number amount is identical and continuous.For each grouping, by the initial download success rate phase of each video clip serial number in the grouping
Multiply, obtained result continuously downloads success rate as the grouping of the grouping.
The initial download success rate of above-mentioned each video clip serial number may be different, so the grouping being each grouped connects
Continuous success rate of downloading may also be different, can be first to being grouped the continuous video clip sequence downloaded in the maximum grouping of success rate
Number corresponding video clip is downloaded successively, when starting the video clip to being grouped in the continuous grouping for downloading success rate second
When the corresponding video clip of serial number is downloaded, first video in the continuous grouping for downloading success rate second of first detection grouping
The corresponding video clip of segment serial number, when not storing, is downloaded it whether being locally stored;When having stored, ignore
The video clip serial number continues to detect the corresponding video clip of next video clip serial number that situation is being locally stored, and then holds
The action of detection is downloaded or continued to row.For in all groupings after being grouped continuous download success rate third or ranked third
The corresponding video clip of video clip serial number carry out above-mentioned action successively, which is not described herein again.
On the basis of the second embodiment, the initial success rate computation subunit is specifically used for:According to the appearance
Number yzSuccess rate p is downloaded with preset video clip, utilizes formula
Number of computationsThe corresponding video clip of each video clip serial number in maximum continuous serial number group it is initial
Download success rate, wherein z is video clip serial number that is described and concentrating.
Specifically, using formulaAt the beginning of calculating the corresponding video clip of above-mentioned each video clip serial number
Begin to download success rate, wherein yzFor quantityEach video clip serial number in maximum continuous serial number group is in all videos
Occurrence number in segment serial number set, p are that preset video clip downloads success rate.
On the basis of the first embodiment, the segment download unit 450 may include:First time subelements or
Second time subelements,
First time subelements, are used for:According to quantityEach video clip sequence in maximum continuous serial number group
The data volume size of number corresponding video clip is downloaded;
Second time subelements, are used for:According to quantityEach video clip sequence in maximum continuous serial number group
The playing sequence of number corresponding video clip is downloaded.
Specifically, the download time needed for the bigger video clip of data volume is longer, in order to enable users to viewing early
To video clip, can first downloading data amount minimum video clip, next penultimate video clip of downloading data amount, i.e.,
Be downloaded successively according to the size of data volume, in this way user watch a video clip when, another video clip also under
Load finishes, and can reduce the stand-by period of user in this way turning next to second video clip, user experiences more preferably.
When the video data of programme televised live generates, data source server according to fixed size or consolidates the live data
Timing is long to be divided into several video clips, and adds video clip serial number for each video clip, and each video clip corresponds to
Video clip serial number be unique in a network.Under normal circumstances, the sequence of video clip serial number plays suitable with video clip
Sequence is consistent.It in this way can be according to the quantityThe sequence of each video clip serial number in maximum continuous serial number group, namely
The playing sequence of video clip is downloaded video clip, and the video of this mode user viewing is relatively coherent, and impression is preferable.
On the basis of embodiment shown in Fig. 7, can also include:Occurrence number determination unit, initial success rate calculate single
First and continuous success rate computing unit;Wherein,
The occurrence number determination unit, it is after the serial number sequencing unit 430 sorts and concentration each for determining
Occurrence number y of the video clip serial number in all video clip serial number set of acquisitionz;
The initial success rate computing unit, for according to the occurrence number yzIt is downloaded successfully with preset video clip
Rate p, utilizes formula
Calculate the initial download success rate p of the corresponding video clip of each video clip serial numberz;
The continuous success rate computing unit, for the serial number sequencing unit 430 sequence after and concentrate, utilize public affairs
FormulaThe subclass for calculating each subclass continuously downloads success rateWherein, the video clip in the subclass
The number all same of serial number, z and z+r are video clip serial number that is described and concentrating;
The segment download unit 450, is specifically used for:Utilize formula
The weight of the corresponding video clips of video clip serial number z is calculated, and to the corresponding video clip sequence of weight limit
Number for starting continuous serial number group with regarding in the intersection of the subclass of weight limit corresponding video clip serial number starting
The corresponding video clip of frequency segment serial number is downloaded.
As known from the above, which further increases the viewing experience of user, can be to both continuously downloading success rate
High video clip is downloaded again, and user experiences more preferably.
For system or device embodiment, since it is substantially similar to the method embodiment, so the comparison of description is simple
Single, the relevent part can refer to the partial explaination of embodiments of method.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
One of ordinary skill in the art will appreciate that all or part of step in realization above method embodiment is can
It is completed with instructing relevant hardware by program, the program can be stored in computer read/write memory medium,
The storage medium designated herein obtained, such as:ROM/RAM, magnetic disc, CD etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (8)
1. a kind of video clip method for down loading, which is characterized in that the node being applied in peer-to-peer network system, the method packet
It includes:
It is sent to the node that requested programme televised live is being broadcast live and obtains the video clip presence for identifying asked programme televised live
The sequence of the mark sequence of situation is asked, wherein the mark sequence includes that mark is corresponding with video clip serial number
Relationship, and any being identified as in the mark sequence:It identifies existing for the video clip to exist and be regarded described in mark or mark
What frequency segment was not present is not present mark;
The mark sequence for the node feeding back that requested programme televised live is being broadcast live is received, and respectively from each mark sequence received
In row there is mark in extraction, obtains the presence extracted in each mark sequence and identifies corresponding video clip serial number set, determines
All video clip serial number union of sets collection obtained;
When the union is not empty, according to video clip playing sequence, to each video clip serial number that is described and concentrating into
Row sequence;
Determine quantity that is after being ranked up and concentrating the video clip serial number in each continuous serial number groupWherein, the company
The most preceding corresponding video clip of video clip serial number in continuous serial number group and the last corresponding piece of video of video clip serial number
The video clip serial number of each video clip between section exists in the continuous serial number group, and z and z+i are described and concentration regard
Frequency segment serial number;
Wherein, most preceding video clip serial number z, last video clip serial number z+i,To indicate most preceding piece of video
Section serial number z, the number of the continuous serial number group of last video clip serial number z+i;
According to the quantity of determining video clip serial numberIt is corresponding to all video clip serial numbers in continuous serial number group to regard
Frequency segment is downloaded;
Wherein, the corresponding video clip of all video clip serial numbers in continuous serial number group be downloaded including:
To quantityThe corresponding video clip of all video clip serial numbers in maximum continuous serial number group is downloaded;
Alternatively,
The method further includes:
Determine after being ranked up and concentration each video clip serial number in all video clip serial number set of acquisition
Occurrence number yz;
According to the occurrence number yzSuccess rate p is downloaded with preset video clip, utilizes formula
Calculate the initial download success rate p of the corresponding video clip of each video clip serial numberz;
It is after being ranked up and concentrate, utilize formulaThe subclass for calculating each subclass continuously downloads success rateWherein, the number all same of the video clip serial number in the subclass, z and z+r are video clip that is described and concentrating
Serial number;
The corresponding video clip of all video clip serial numbers in continuous serial number group, which is downloaded, further includes:
Utilize formula
The weight of the corresponding video clips of video clip serial number z is calculated, and to the corresponding video clip serial number of weight limit
The continuous serial number group of starting with the piece of video in the intersection of the subclass of weight limit corresponding video clip serial number starting
The corresponding video clip of section serial number is downloaded;
Wherein, pzFor the initial download success rate of the corresponding video clip of video clip serial number in the subclass, z is the subset
Most preceding video clip serial number in conjunction, z+r is video clip serial number last in the subclass, then the video in the subclass
The number of segment serial number is r+1,The result being calculated isIndicate most preceding video clip serial number z, most
The subclass of the subclass of video clip serial number z+r afterwards continuously downloads success rate.
2. according to the method described in claim 1, it is characterized in that, described to quantityInstitute in maximum continuous serial number group
There is the corresponding video clip of video clip serial number to be downloaded, including:
QuantificationAll video clip serial numbers of each video clip serial number in maximum continuous serial number group in acquisition
Occurrence number in set;
Success rate, number of computations are downloaded according to the occurrence number and preset video clipIn maximum continuous serial number group
The corresponding video clip of each video clip serial number initial download success rate;
By quantityIn maximum continuous serial number group in each grouping the corresponding video clip of each video clip serial number just
The result that download success rate is multiplied that begins continuously downloads success rate as the grouping of the grouping, wherein in the grouping
Video clip serial number is continuous and number is identical;
According to the continuous size for downloading success rate of the grouping, successively to the corresponding video of video clip serial number in the grouping
Segment is downloaded.
3. according to the method described in claim 2, it is characterized in that, described according to the occurrence number and preset video clip
Download success rate, number of computationsThe corresponding video clip of each video clip serial number in maximum continuous serial number group
Initial download success rate, including:
According to the occurrence number yzSuccess rate p is downloaded with preset video clip, utilizes formula
Number of computationsThe initial download of the corresponding video clip of each video clip serial number in maximum continuous serial number group
Success rate.
4. according to the method described in claim 1, it is characterized in that, described to quantityInstitute in maximum continuous serial number group
There is the corresponding video clip of video clip serial number to be downloaded, including:
According to quantityThe data volume size of the corresponding video clip of each video clip serial number in maximum continuous serial number group
It is downloaded;
Alternatively,
According to quantityIn maximum continuous serial number group the playing sequence of the corresponding video clip of each video clip serial number into
Row is downloaded.
5. a kind of video clip download apparatus, which is characterized in that the node being applied in peer-to-peer network system, described device packet
It includes:Request transmitting unit, sequential reception unit, serial number sequencing unit, quantity determination unit and segment download unit;Wherein,
The request transmitting unit is asked directly for sending to obtain to identify to the node that requested programme televised live is being broadcast live
Broadcasting the video clip of program, there are the sequences of the mark sequence of situation to be asked, wherein the mark sequence includes mark
With the correspondence of video clip serial number, and any being identified as in the mark sequence:It identifies existing for the video clip
In the presence of identifying or identifying, the video clip is not present that there is no marks;
The sequential reception unit, the mark sequence for receiving the node feeding back that requested programme televised live is being broadcast live, and
From each mark sequence received there is mark in extraction respectively;It is corresponding to obtain the presence mark extracted in each mark sequence
Video clip serial number set determines all video clip serial number union of sets collection obtained;
The serial number sequencing unit, for when the union that the sequential reception unit determines not is empty, being broadcast according to video clip
Sequence is put forward, each video clip serial number that is described and concentrating is ranked up;
The quantity determination unit, for determining after serial number sequencing unit sequence and concentrating regarding in each continuous serial number group
The quantity of frequency segment serial numberWherein, the most preceding corresponding video clip of video clip serial number in the continuous serial number group
The video clip serial number of each video clip between the last corresponding video clip of video clip serial number is in the continuous serial number
Exist in group, z and z+i are video clip serial number that is described and concentrating;
Wherein, most preceding video clip serial number z, last video clip serial number z+i,To indicate most preceding piece of video
Section serial number z, the number of the continuous serial number group of last video clip serial number z+i;
The segment download unit, the quantity of the video clip serial number for being determined according to the quantity determination unitIt is right
The corresponding video clip of all video clip serial numbers in continuous serial number group is downloaded;
Wherein, the segment download unit is specifically used for:To quantityAll video clips in maximum continuous serial number group
The corresponding video clip of serial number is downloaded;
Alternatively,
Described device further includes:Occurrence number determination unit, initial success rate computing unit and continuous success rate computing unit;
The occurrence number determination unit:It is specifically used for:Determine that after the serial number sequencing unit sequence and each of concentration regards
Occurrence number y of the frequency segment serial number in all video clip serial number set of acquisitionz;
The initial success rate computing unit, is specifically used for:According to the occurrence number yzIt is downloaded successfully with preset video clip
Rate p, utilizes formula
Calculate the initial download success rate p of the corresponding video clip of each video clip serial numberz;
The continuous success rate computing unit, is specifically used for:The serial number sequencing unit sequence after and concentrate, utilize formulaThe subclass for calculating each subclass continuously downloads success rateWherein, the video clip serial number in the subclass
Number all same, z and z+r are video clip serial number that is described and concentrating;
The segment download unit is specifically used for:
Utilize formula
The weight of the corresponding video clips of video clip serial number z is calculated, and to the corresponding video clip serial number of weight limit
The continuous serial number group of starting with the piece of video in the intersection of the subclass of weight limit corresponding video clip serial number starting
The corresponding video clip of section serial number is downloaded;
Wherein, pzFor the initial download success rate of the corresponding video clip of video clip serial number in the subclass, z is the subset
Most preceding video clip serial number in conjunction, z+r is video clip serial number last in the subclass, then the video in the subclass
The number of segment serial number is r+1,The result being calculated isIndicate most preceding video clip serial number z, most
The subclass of the subclass of video clip serial number z+r afterwards continuously downloads success rate.
6. device according to claim 5, which is characterized in that the segment download unit, including:Occurrence number determines son
Subelements under unit, initial success rate computation subunit, continuous success rate determination subelement and segment;Wherein,
The occurrence number determination subelement is used for quantificationEach video clip sequence in maximum continuous serial number group
Occurrence number number in all video clip serial number set received;
The initial success rate computation subunit, occurrence number for being determined according to the occurrence number determination subelement and in advance
If video clip download success rate, number of computationsEach video clip serial number in maximum continuous serial number group corresponds to
Video clip initial download success rate;
The continuous success rate determination subelement is used for quantityIt is each in each grouping in maximum continuous serial number group to regard
The result that the initial download success rate of the corresponding video clip of frequency segment serial number is multiplied is continuous as the grouping of the grouping
Download success rate, wherein the video clip serial number in the grouping is continuous and number is identical;
Subelements under the segment continuously download success rate for what is determined according to the continuous success rate determination subelement
Size is successively downloaded the corresponding video clip of video clip serial number in the grouping.
7. device according to claim 6, which is characterized in that the initial success rate computation subunit is specifically used for:Root
According to the occurrence number yzSuccess rate p is downloaded with preset video clip, utilizes formula
Number of computationsThe initial download of the corresponding video clip of each video clip serial number in maximum continuous serial number group
Success rate.
8. device according to claim 5, which is characterized in that the segment download unit, including:First time subelements
Or second time subelements,
First time subelements, are used for:According to quantityEach video clip serial number pair in maximum continuous serial number group
The data volume size for the video clip answered is downloaded;
Second time subelements, are used for:According to quantityEach video clip serial number pair in maximum continuous serial number group
The playing sequence for the video clip answered is downloaded.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510385932.7A CN104936042B (en) | 2015-06-30 | 2015-06-30 | A kind of video clip method for down loading and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510385932.7A CN104936042B (en) | 2015-06-30 | 2015-06-30 | A kind of video clip method for down loading and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104936042A CN104936042A (en) | 2015-09-23 |
CN104936042B true CN104936042B (en) | 2018-08-07 |
Family
ID=54122951
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510385932.7A Active CN104936042B (en) | 2015-06-30 | 2015-06-30 | A kind of video clip method for down loading and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104936042B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106411894A (en) * | 2016-09-29 | 2017-02-15 | 天脉聚源(北京)传媒科技有限公司 | Video transmission method and system |
CN107070923B (en) * | 2017-04-18 | 2020-07-28 | 上海云熵网络科技有限公司 | P2P live broadcast system and method for reducing code segment repetition |
CN110809186B (en) * | 2019-10-28 | 2022-11-01 | 维沃移动通信有限公司 | Video processing method and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101605242A (en) * | 2008-06-13 | 2009-12-16 | 阿尔卡特朗讯公司 | Be used to realize the methods, devices and systems of video-on-demand service |
CN101686228A (en) * | 2008-09-27 | 2010-03-31 | 中兴通讯股份有限公司 | Multimedia slicing switching method and system based on content slicing |
CN101924777A (en) * | 2009-06-17 | 2010-12-22 | 中国移动通信集团公司 | Method, system and equipment for searching active nodes in P2P streaming media system |
CN102244665A (en) * | 2010-05-13 | 2011-11-16 | 中国移动通信集团公司 | Bitmap management and node collection inquiry method, node and index server |
CN103188279A (en) * | 2011-12-27 | 2013-07-03 | 中国电信股份有限公司 | Method and device for downloading file from neighbor nodes through peer-to-peer network |
-
2015
- 2015-06-30 CN CN201510385932.7A patent/CN104936042B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101605242A (en) * | 2008-06-13 | 2009-12-16 | 阿尔卡特朗讯公司 | Be used to realize the methods, devices and systems of video-on-demand service |
CN101686228A (en) * | 2008-09-27 | 2010-03-31 | 中兴通讯股份有限公司 | Multimedia slicing switching method and system based on content slicing |
CN101924777A (en) * | 2009-06-17 | 2010-12-22 | 中国移动通信集团公司 | Method, system and equipment for searching active nodes in P2P streaming media system |
CN102244665A (en) * | 2010-05-13 | 2011-11-16 | 中国移动通信集团公司 | Bitmap management and node collection inquiry method, node and index server |
CN103188279A (en) * | 2011-12-27 | 2013-07-03 | 中国电信股份有限公司 | Method and device for downloading file from neighbor nodes through peer-to-peer network |
Also Published As
Publication number | Publication date |
---|---|
CN104936042A (en) | 2015-09-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102075792B (en) | Video file playing method and system, user equipment and server equipment | |
CN104936042B (en) | A kind of video clip method for down loading and device | |
CN102790779B (en) | A kind of live video resource downloading method and device | |
CN104426853B (en) | A kind of multimedia synchronous plays method, server, terminal and system | |
CN101677325B (en) | Method, device and system for publishing media description information and acquiring media | |
Liang et al. | Incentivized peer-assisted streaming for on-demand services | |
CN101304514B (en) | VOD system as well as data caching method and scheduling server thereof | |
CN104768082A (en) | Audio/video playing information processing method and server | |
CN103096177B (en) | A kind of VOD method, system, agent node and media server | |
CN105519053A (en) | Dynamic interest forwarding mechanism for information centric networking | |
CN105245924B (en) | The video player of the push of video information and display methods and application this method | |
CN103327121A (en) | P2P (Peer-to-Peer Network) network resource transmission method and device for same | |
JP2008198047A (en) | Information distribution system, information distribution method, distribution unit, node unit, etc | |
KR20110119229A (en) | P2p live streaming system for high-definition media broadcasting and the method therefor | |
CN106453460B (en) | File distribution method, device and system | |
CN110166817A (en) | A kind of data cache method and relevant device | |
CN104702978B (en) | A kind of method and netcast equipment of video data positioning | |
CN110198332A (en) | Dispatching method, device and the storage medium of content delivery network node | |
CN102868936A (en) | Method and system for storing video logs | |
CN105592369B (en) | A kind of video frequency abstract processing method and processing device | |
CN105338421A (en) | HLS streaming media transmission method and device | |
CN109067916A (en) | A kind of online multimedia document down loading method and device, electronic equipment | |
CN101924777B (en) | Method, system and equipment for searching active nodes in P2P streaming media system | |
CN102947821A (en) | Indexing server and method therefor | |
WO2010024228A1 (en) | Content distribution system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |