CN105721889A - P2P data download method and device - Google Patents

P2P data download method and device Download PDF

Info

Publication number
CN105721889A
CN105721889A CN201510250676.0A CN201510250676A CN105721889A CN 105721889 A CN105721889 A CN 105721889A CN 201510250676 A CN201510250676 A CN 201510250676A CN 105721889 A CN105721889 A CN 105721889A
Authority
CN
China
Prior art keywords
cdn
current
download
probability
initial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510250676.0A
Other languages
Chinese (zh)
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.)
LeTV Cloud Computing Co Ltd
Original Assignee
LeTV Cloud Computing 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 LeTV Cloud Computing Co Ltd filed Critical LeTV Cloud Computing Co Ltd
Priority to CN201510250676.0A priority Critical patent/CN105721889A/en
Priority to PCT/CN2016/076065 priority patent/WO2016184230A1/en
Publication of CN105721889A publication Critical patent/CN105721889A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/23805Controlling the feeding rate to the network, e.g. by controlling the video pump
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2408Monitoring of the upstream path of the transmission network, e.g. client requests

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a P2P data download method and a device, belonging to the computer communication technology field. The P2P data download method comprises steps of obtaining an initial CDN download probability, an initial network status parameter and a current network status parameter, wherein the initial CDN download probability shows the probability that the video data in a data block in an initial preset P2P download zone is chosen to be downloaded from a CDN server, comparing the current network statusparameterwith the initial network status parameter, performing updating on the initial CDN download probability to obtain the current CDN downloading probability according to the comparison result, and choosing the video data in the data block in the P2P download zone to be downloaded from the CDN server according to the current CDN downloading probability. The device comprises an acquisition data, a processing module and a download module. The method and the device of the invention can better share the P2P data and can further improve the P2P download rate.

Description

The method and apparatus that P2P data are downloaded
Technical field
The present invention relates to computer communication technology field, particularly relate to the method and apparatus that a kind of P2P data are downloaded.
Background technology
Along with the development of computer communication technology, increasing user watches video online by computer.During online viewing video, client player passes through http (HyperTextTransferProtocol, HTML (Hypertext Markup Language)) agreement plays online from CDN (ContentDeliveryNetwork, content distributing network) server foradownloaded video data.And the speed of download in order to improve video data reduces client player to the access pressure of CDN server and bandwidth simultaneously, client player takes P2P (peer-to-peer, P2P computing) download function (namely set up with other client player and be connected sharing data by client player, client player can download the video data not having in client player from other client player, and other client player can download the video data not having in other client player from client player).The method that current P2P data are downloaded is specific as follows: referring to Fig. 1, positive direction at the broadcast point of client player sets gradually urgent district and P2P download area, wherein, the video data in urgent district is that client player will play the video data that use is arrived at once, therefore the video data in urgent district mainly directly downloads from CDN server, the video data of P2P download area is mainly downloaded from other client player, each grid in urgent district and P2P download area represents a data block, this data block is video playback, http downloads, the master data unit that P2P downloads and shares.But, due under live state, the playing progress rate of all client player is substantially all at the same time, obtain between each client player progress that video data downloads and the video data that has also essentially identical (video data that namely I has others also have, the video data that I does not have others also without), this situation will cause having no chance between each client player to carry out P2P sharing data, the data of End-Customer end player will be downloaded from CDN server, and the effect of P2P is greatly limited.
In order to solve the problems referred to above that live state exists, for live state, the method that current P2P data are downloaded is specific as follows: when arranging P2P download area, each data block in P2P download area is carried out a probability respectively is choosing of n%, video data in the data block chosen is downloaded from CDN server, thus can make between each client player produce have video data difference (video data that namely I has others do not have, the video data that others has I do not have), so that under live state, each client player can be had an opportunity sharing data.
But, in practical application, the network bandwidth of each client player is different, speed during from CDN server foradownloaded video data also differs, if each client player is taken from the fixed value that probability is n%, take long enough to have downloaded when the client player that then the little network speed of the network bandwidth is low is from CDN server foradownloaded video data, affect P2P sharing data;And the sum no matter carrying out live client player is how many simultaneously, each client player is taken from the fixed value that probability is n%, easily cause and downloaded too much video data from CDN server, hinder the further raising of P2P download rate, such as: choose probability and be set to 20%, when the client player watching same programme televised live is more, if reach 10000, the probability of choosing of each client player has only to be 0.01% in theory, all video datas that programme televised live needs just can be got by each client player of P2P sharing data, if probability will be chosen be fixed as 20%, necessarily cause and downloaded too much video data from CDN server.
Summary of the invention
The embodiment of the present invention provides the method and apparatus that a kind of P2P data are downloaded, and is used for solving to affect P2P sharing data in prior art, it is easy to causes and has downloaded too much video data from CDN server, hinders the further raising of P2P download rate;The client player of different network bandwidth network speeds can be balanced, it is possible to carry out P2P sharing data better, it is possible to achieve the further raising of P2P download rate.
The embodiment of the present invention provides a kind of method that P2P data are downloaded, and described method includes:
Obtain initial CDN and download probability, initial network condition parameter and current network conditions parameter;Wherein, described initial CDN downloads the probability that probability represents that the video data in the data block in the P2P download area of initial setting is selected from CDN server to download;
Described current network conditions parameter and described initial network condition parameter are compared, according to comparative result, described initial CDN is downloaded probability and is updated obtaining current CDN download probability;
Download probability according to described current CDN, choose the video data in the data block in described P2P download area and download from described CDN server.
The embodiment of the present invention provides the device that a kind of P2P data are downloaded, and described device includes:
Acquisition module, is used for obtaining initial CDN and downloads probability, initial network condition parameter and current network conditions parameter;Wherein, described initial CDN downloads the probability that probability represents that the video data in the data block in the P2P download area of initial setting is selected from CDN server to download;
Processing module, for described current network conditions parameter and described initial network condition parameter being compared, according to comparative result, downloads probability and is updated obtaining current CDN download probability described initial CDN;
Download module, for downloading probability according to described current CDN, chooses the video data in the data block in described P2P download area and downloads from described CDN server.
The method and apparatus that P2P data provided by the invention are downloaded: CDN is set according to network condition and downloads probability, the client player making the roomy network speed of Netowrk tape high has the client player that bigger chance downloads more video data from CDN server, the little network speed of the network bandwidth is low to download little video data from CDN server, the client player of different network bandwidth network speeds can be balanced, it is possible to carry out P2P sharing data better;Further, the CDN of different client player downloads probability and dynamically changes according to CDN download probability before, it is not easy to causes and downloads too much video data from CDN server, it is possible to achieve the further raising of P2P download rate.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, the accompanying drawing used required in embodiment or description of the prior art will be briefly described below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is one embodiment flow chart of method that P2P data of the present invention are downloaded;
Fig. 2 is another embodiment flow chart of method that P2P data of the present invention are downloaded;
Fig. 3 is the another embodiment flow chart of method that P2P data of the present invention are downloaded;
Fig. 4 is the method another embodiment flow chart that P2P data of the present invention are downloaded;
Fig. 5 is the method another embodiment flow chart that P2P data of the present invention are downloaded;
Fig. 6 is one example structure schematic diagram of device that P2P data of the present invention are downloaded.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is a part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under not making creative work premise, broadly fall into the scope of protection of the invention.
Embodiment one
The method that Fig. 1 downloads for a kind of P2P data that the embodiment of the present invention one provides;As it is shown in figure 1, it can specifically include:
S101: obtain initial CDN and download probability, initial network condition parameter and current network conditions parameter;Wherein, initial CDN downloads the probability that probability represents that the video data in the data block in the P2P download area of initial setting is selected from CDN server to download.
Wherein, initial network condition parameter can include initial p 2P and uploads rate, initial p 2P flow rate ratio and CDN and prefetch data volume.Current network conditions parameter can include current P2P and upload rate, current P2P flow rate ratio and the current P2P amount of uploading.
S102: current network conditions parameter and initial network condition parameter are compared, according to comparative result, downloads probability and is updated obtaining current CDN download probability initial CDN.
Specifically, by current network conditions parameter and initial network condition parameter are compared, according to comparative result it is known that whether good than initial network situation current network conditions is, as current network conditions is better than initial network situation, then can improve initial CDN download probability and obtain current CDN download probability, increase the probability that the video data in the data block in P2P download area is downloaded from CDN server, as current network conditions is poorer than initial network situation, then can reduce initial CDN download probability and obtain current CDN download probability, reduce the probability that the video data in the data block in P2P download area is downloaded from CDN server, thus the good client player of network state can be downloaded more video data quickly from CDN server and be shared with the client player of network state difference and use.
S103: download probability according to current CDN, choose the video data in the data block in P2P download area and download from CDN server.
Specifically, the current CDN in the present embodiment downloads probability and is updated obtaining to initial CDN download probability, and namely in the present embodiment, CDN downloads probability is not the ground that immobilizes, but carries out real-time change according to current network condition.
The method that P2P data described in the present embodiment are downloaded, CDN is set according to network condition and downloads probability, the client player making the roomy network speed of Netowrk tape high has the client player that bigger chance downloads more video data from CDN server, the little network speed of the network bandwidth is low to download little video data from CDN server, the client player of different network bandwidth network speeds can be balanced, it is possible to carry out P2P sharing data better;Further, the CDN of different client player downloads probability and dynamically changes according to CDN download probability before, it is not easy to causes and downloads too much video data from CDN server, it is possible to achieve the further raising of P2P download rate.
Embodiment two
In the preferred embodiment of the present invention, upload rate, initial p 2P flow rate ratio and CDN prefetch data volume when initial network condition parameter includes initial p 2P;Current network conditions parameter includes current P2P and uploads rate, current P2P flow rate ratio and the current P2P amount of uploading;Obtain initial CDN referring to Fig. 2, S101 and download probability, initial network condition parameter and current network conditions parameter, including:
S101a: obtain the initial CDN that Play Server returns and download probability, and initial p 2P is uploaded rate, initial p 2P flow rate ratio and CDN download probability updating ratio and initialize.
Specifically, Play Server can arrange an initial CDN and download probability, when after client player initial start, initial CDN can be obtained from Play Server and download probability, first use initial CDN to download whether the video data in certain data block that probability is chosen in P2P download area is downloaded from CDN server.Initial CDN downloads the value of probability and can be configured according to practical application situation, as could be arranged to 10%, 15% etc., this is not specifically limited.
Specifically, P2P flow rate ratio is: (P2P flow/video flow) %, and wherein, P2P flow represents the P2P download in certain time and the P2P amount of uploading sum, and video flow represents the CDN download in certain time and P2P download sum.P2P uploads rate for (the P2P amount of uploading/video flow) %.
Specifically, initial p 2P uploads rate, initial p 2P flow rate ratio and CDN download probability updating ratio initialize, be initial p 2P is uploaded rate, to download probability updating ratio setting be initial value for initial p 2P flow rate ratio and CDN, initial p 2P uploads the initial value of rate, initial p 2P flow rate ratio and CDN download probability updating ratio and can be configured according to practical application situation, in the present embodiment, initial p 2P uploads rate, the initial value of initial p 2P flow rate ratio is set to 0, the CDN initial value downloading probability updating ratio and is set to 5%.
S101b: the current P2P download in statistics prefixed time interval, the current P2P amount of uploading and current CDN download.
Wherein, prefixed time interval can be configured according to practical application situation, as being set to 90 seconds, 100 seconds, 270 seconds.Further, prefixed time interval is possible not only to be set to a fixing interval, it is also possible to be set to one transformable.
Specifically, statistics is started when the success of P2P engine is set up and is connected with Play Server and determines and can carry out p2p data interaction, referring to Fig. 3, the method for the current P2P download in the present embodiment statistics prefixed time interval, the current P2P amount of uploading and current CDN download is as follows:
B1: P2P engine success with Play Server foundation be connected and determine can carry out p2p data interaction time, begin through the first timer and the second timer timing statistics.
Being provided with the first prefixed time interval and the second prefixed time interval in the present embodiment, the second prefixed time interval is more than the first prefixed time interval.After the first prefixed time interval reaches, it is not necessary to start to calculate current P2P download, the current P2P amount of uploading and current CDN download;After the second prefixed time interval reaches, necessarily start to calculate current P2P download, the current P2P amount of uploading and current CDN download.For ease of the interval that record is more different, the first timer is set herein and the second timer is actuated for timing simultaneously.
B2: when the timing statistics of the first timer reaches the first prefixed time interval, terminates probability by default statistics and determines whether to terminate the statistics of the first timer, if it is determined that terminate the statistics of the first timer, then perform b6;Otherwise, b3 is performed.
Specifically, the first prefixed time interval can be configured according to practical application situation, and this is not limited, and the present embodiment is set to 90 seconds.
Specifically, presetting statistics end probability for deciding whether to terminate the statistics of the first timer, presetting statistics end probability can be configured according to practical application situation, and this is not limited, and the present embodiment is set to 50%.
B3: judge that whether the time of the second timer is be more than or equal to the second prefixed time interval, if greater than equal to the second prefixed time interval, then performing b5;Otherwise, b4 is performed.
Specifically, the second prefixed time interval is more than the first prefixed time interval, and the second prefixed time interval can be configured according to practical application situation, and this is not limited, and the present embodiment is set to 270 seconds.
B4: being reset by the timing statistics of the first timer, the first timer restarts timing statistics, then performs b2.
B5: the second timer terminates statistics, then performs b6.
B6: calculate the current P2P download in the timing statistics of the second timer, the current P2P amount of uploading and current CDN download.
S101c: according to current P2P download, the current P2P amount of uploading and current CDN download, calculate current P2P and upload rate, current P2P flow rate ratio.
Specifically, P2P flow rate ratio is: (P2P flow/video flow) %, and wherein, P2P flow represents the P2P download in certain time and the P2P amount of uploading sum, and video flow represents the CDN download in certain time and P2P download sum.Thus current P2P download and the current P2P amount of uploading being sued for peace obtain current P2P flow, current P2P download and current CDN download being sued for peace obtains current video flow, obtains current P2P flow rate ratio by current P2P flow and current video flow.Current P2P download and the current P2P amount of uploading being sued for peace and obtain current P2P flow, current P2P download and current CDN download being sued for peace obtains current video flow, obtains current P2P flow rate ratio according to current P2P flow and current video flow.
Specifically, P2P uploads rate for (the P2P amount of uploading/video flow) %.Thus according to the current P2P amount of uploading and current video flow obtained above, obtaining current P2P and upload rate.
S101d: download probability according to current P2P download, current CDN download and initial CDN, calculate CDN and prefetch data volume.
Specifically, CDN prefetches data amount and represents that downloading probability by CDN in certain time chooses from the CDN data volume downloaded, and CDN prefetches data volume and is: CDN downloads probability * video flow.Thus current P2P download and current CDN download being sued for peace obtain current video flow, initial CDN prefetches data volume and is: initial CDN downloads probability * current video flow.
The method that P2P data described in the present embodiment are downloaded, CDN is set according to network condition and downloads probability, the client player making the roomy network speed of Netowrk tape high has the client player that bigger chance downloads more video data from CDN server, the little network speed of the network bandwidth is low to download little video data from CDN server, the client player of different network bandwidth network speeds can be balanced, it is possible to carry out P2P sharing data better;Further, the CDN of different client player downloads probability and dynamically changes according to CDN download probability before, it is not easy to causes and downloads too much video data from CDN server, it is possible to achieve the further raising of P2P download rate.Initial network condition parameter includes initial p 2P and uploads rate, initial p 2P flow rate ratio and CDN and prefetch data volume, current network conditions parameter includes current P2P and uploads rate, current P2P flow rate ratio and the current P2P amount of uploading, P2P uploads rate, P2P flow rate ratio, the P2P amount of uploading and CDN and prefetches data volume acquisition conveniently, it is simple to realize the present invention.
Embodiment three
In the preferred embodiment of the present invention, referring to Fig. 4, S102, current network conditions parameter and initial network condition parameter are compared, according to comparative result, initial CDN is downloaded probability and is updated obtaining current CDN download probability, including:
S102a: current P2P is uploaded rate, current P2P flow rate ratio and the current P2P amount of uploading, upload rate, initial p 2P flow rate ratio and CDN respectively to prefetch data volume compare with initial p 2P, if current P2P uploads, rate uploads rate more than initial p 2P, current P2P flow rate ratio prefetches data volume be more than or equal to initial p 2P flow rate ratio and the current P2P amount of uploading be more than or equal to CDN, then perform S102b;If current P2P uploads rate and uploads the preset ratio of rate less than initial p 2P or the current P2P amount of uploading prefetches data volume less than CDN, then perform S101a;If current P2P uploads rate and uploads rate less than initial p 2P and upload the preset ratio of rate more than initial p 2P, then perform S102c.
Specifically, initial p 2P uploads the preset ratio of rate, and namely initial p 2P uploads a part for rate, and if preset ratio is 80%, then current P2P uploads rate and uploads the 80% of rate less than initial p 2P.It is 80% that preset ratio is not limited to value, it is possible to be configured according to practical application situation, this is not specifically limited.
Specifically, if current P2P uploads rate and uploads the preset ratio of rate less than initial p 2P or the current P2P amount of uploading prefetches data volume less than CDN, then perform S101a, namely reacquire initial CDN and download probability, and initialize initial network condition parameter, initializing CDN download probability updating ratio is preset value.
S102b: initial CDN is downloaded probability, downloading probability updating ratio according to CDN increases, and obtains current CDN and downloads probability, and rate of being uploaded by current P2P uploads rate, current P2P flow rate ratio as initial p 2P flow as initial p 2P, then performs S103.
Such as: initial CDN download probability be 10%, to download probability updating ratio be 5% to CDN, then current CDN downloads probability and is: 10%+5%=15%.
S102c: initial CDN is downloaded probability, downloads probability updating ratio according to CDN and reduces, and obtains current CDN and downloads probability, and rate of being uploaded by current P2P uploads rate, current P2P flow rate ratio as initial p 2P flow as initial p 2P, then performs S103.
Such as: initial CDN download probability be 10%, to download probability updating ratio be 5% to CDN, then current CDN downloads probability and is: 10%-5%=5%.
Specifically, CDN download probability updating ratio for presetting, or current P2P upload when rate is uploaded rate less than initial p 2P and is uploaded the preset ratio of rate more than initial p 2P according to preset ratio reduction and obtain.Wherein, reducing according to preset ratio and how much can be configured according to practical application situation, as could be arranged to be reduced to original 1/2,1/3 etc., this being not specifically limited.
Wherein, when CDN download probability updating ratio reduces according to preset ratio, at least can be realized by following 2 kinds of methods:
1) CDN downloads probability updating ratio first according to preset ratio reduction, then more initial CDN is downloaded probability, downloads probability updating ratio according to CDN and reduces.
Such as: preset ratio is 1/2, then CDN download probability updating ratio deta is first reduced to according to preset ratio: deta=deta/2;Then more initial CDN is downloaded probability C, download probability updating ratio according to CDN and be reduced to: C=C-deta.
2) initial CDN download probability first reduces according to CDN download probability updating ratio, and then CDN download probability updating ratio reduces according still further to preset ratio.Such as: preset ratio is 1/2, initial CDN downloads probability C, first downloads probability updating ratio according to CDN and is reduced to: C=C-deta;Then CDN download probability updating ratio deta is reduced to according still further to preset ratio: deta=deta/2.
And, it should be noted that, initial CDN downloads probability and presets and less than or equal to 50%, arrange be to the maximum 50% be because that p2p data in theory download realize two nodes of minimum needs, the probability of 50% is it is ensured that data needed for can downloading to the other side when two nodes be mutually shared with the other side.When the scope pre-setting CDN download probability, then after execution S102b, S102d obtain current CDN download probability, also need to judge that current CDN downloads whether probability is downloaded in the scope of probability at CDN, without in the scope downloading probability at CDN, then need to download current CDN probability to be limited in CDN and download after in the scope of probability, then perform follow-up operation.Current CDN is downloaded probability and is limited in the CDN scope downloading probability, the maximum of probability is downloaded more than CDN as current CDN downloads probability, it is CDN the maximum downloading probability that current CDN then can download parameter probability valuing, download the reckling of probability more than CDN as current CDN downloads probability, then it is the CDN reckling downloading probability that current CDN can download parameter probability valuing.CDN downloads the scope of probability and is not limited to above-mentioned span, it is possible to be configured according to practical application situation, this is not limited.
The method that P2P data described in the present embodiment are downloaded, CDN is set according to network condition and downloads probability, the client player making the roomy network speed of Netowrk tape high has the client player that bigger chance downloads more video data from CDN server, the little network speed of the network bandwidth is low to download little video data from CDN server, the client player of different network bandwidth network speeds can be balanced, it is possible to carry out P2P sharing data better;Further, the CDN of different client player downloads probability and dynamically changes according to CDN download probability before, it is not easy to causes and downloads too much video data from CDN server, it is possible to achieve the further raising of P2P download rate.CDN can be pre-set and download the scope of probability, CDN be downloaded probability and controls within the specific limits, it is to avoid download too much video data from CDN server.
Embodiment four
In the preferred embodiment of the present invention, download probability referring to Fig. 5, S103 according to current CDN, choose after the video data in the data block in P2P download area downloads from CDN server, also include:
S104: current CDN is downloaded probability and downloads probability, current network conditions parameter as initial network condition parameter as initial CDN, then perform S101 and obtain the step of initial CDN download probability, initial network condition parameter and current network conditions parameter.
Namely follow-up constantly repeating operates, and at any time CDN download probability to be adjusted according to network condition, makes CDN download probability
The method that P2P data described in the present embodiment are downloaded, CDN is set according to network condition and downloads probability, the client player making the roomy network speed of Netowrk tape high has the client player that bigger chance downloads more video data from CDN server, the little network speed of the network bandwidth is low to download little video data from CDN server, the client player of different network bandwidth network speeds can be balanced, it is possible to carry out P2P sharing data better;Further, the CDN of different client player downloads probability and dynamically changes according to CDN download probability before, it is not easy to causes and downloads too much video data from CDN server, it is possible to achieve the further raising of P2P download rate.Constantly repeating operation, dynamic realtime changes CDN and downloads probability, better profits from the network condition that client player is current.
Embodiment five
The embodiment of the present invention five provides the device that a kind of P2P data are downloaded, and referring to Fig. 6, it can specifically include:
Acquisition module 201, is used for obtaining initial CDN and downloads probability, initial network condition parameter and current network conditions parameter;Wherein, initial CDN downloads the probability that probability represents that the video data in the data block in the P2P download area of initial setting is selected from CDN server to download;
Processing module 202, for current network conditions parameter and initial network condition parameter being compared, according to comparative result, downloads probability and is updated obtaining current CDN download probability initial CDN;
Download module 203, for downloading probability according to current CDN, chooses the video data in the data block in P2P download area and downloads from CDN server.
Further, current network conditions parameter includes current P2P and uploads rate, current P2P flow rate ratio and the current P2P amount of uploading;Acquisition module 201 farther includes: statistic unit and computing unit;
Statistic unit, for adding up the current P2P download in prefixed time interval, the current P2P amount of uploading and current CDN download;
Computing unit, for according to current P2P download, the current P2P amount of uploading and current CDN download, calculating current P2P and upload rate, current P2P flow rate ratio.
Further, initial network condition parameter includes initial p 2P and uploads rate, initial p 2P flow rate ratio and CDN and prefetch data volume, CDN prefetches data volume and obtains according to current P2P download, current CDN download and initial CDN download probability calculation, processing module 202 farther includes: probability regulon
Probability regulon, if uploaded for current P2P, rate uploads rate more than initial p 2P, current P2P flow rate ratio prefetches data volume be more than or equal to initial p 2P flow rate ratio and the current P2P amount of uploading be more than or equal to CDN, then initial CDN is downloaded probability, download probability updating ratio according to CDN to increase, obtain current CDN and download probability, and rate of being uploaded by current P2P uploads rate, current P2P flow rate ratio as initial p 2P flow as initial p 2P;
Probability regulon, if being additionally operable to current P2P upload rate and upload the preset ratio of rate less than initial p 2P or the current P2P amount of uploading prefetches data volume less than CDN, then reacquire initial CDN and download probability, and initialize initial network condition parameter, initializing CDN download probability updating ratio is preset value;
Probability regulon, if being additionally operable to current P2P upload rate and upload rate less than initial p 2P and upload the preset ratio of rate more than initial p 2P, then initial CDN is downloaded probability, download probability updating ratio according to CDN to reduce, obtain current CDN and download probability, and rate of being uploaded by current P2P uploads rate, current P2P flow rate ratio as initial p 2P flow as initial p 2P.
Further, CDN download probability updating ratio for presetting, or current P2P upload when rate is uploaded rate less than initial p 2P and is uploaded the preset ratio of rate more than initial p 2P according to preset ratio reduction and obtain.
Further, initial CDN download probability presets and less than or equal to 50%.
The device that P2P data described in the present embodiment are downloaded, CDN is set according to network condition and downloads probability, the client player making the roomy network speed of Netowrk tape high has the client player that bigger chance downloads more video data from CDN server, the little network speed of the network bandwidth is low to download little video data from CDN server, the client player of different network bandwidth network speeds can be balanced, it is possible to carry out P2P sharing data better;Further, the CDN of different client player downloads probability and dynamically changes according to CDN download probability before, it is not easy to causes and downloads too much video data from CDN server, it is possible to achieve the further raising of P2P download rate.Initial network condition parameter includes initial p 2P and uploads rate, initial p 2P flow rate ratio and CDN and prefetch data volume, current network conditions parameter includes current P2P and uploads rate, current P2P flow rate ratio and the current P2P amount of uploading, P2P uploads rate, P2P flow rate ratio, the P2P amount of uploading and CDN and prefetches data volume acquisition conveniently, it is simple to realize the present invention.Constantly repeating operation, dynamic realtime changes CDN and downloads probability, better profits from the network condition that client player is current.
Described device describes corresponding with aforesaid method flow, and weak point, with reference to the narration of said method flow process, no longer repeats one by one.
Device embodiment described above is merely schematic, the wherein said unit illustrated as separating component can be or may not be physically separate, the parts shown as unit can be or may not be physical location, namely may be located at a place, or can also be distributed on multiple NE.Some or all of module therein can be selected according to the actual needs to realize the purpose of the present embodiment scheme.Those of ordinary skill in the art, when not paying performing creative labour, are namely appreciated that and implement.
Through the above description of the embodiments, those skilled in the art is it can be understood that can add the mode of required general hardware platform by software to each embodiment and realize, naturally it is also possible to pass through hardware.Based on such understanding, the part that prior art is contributed by technique scheme substantially in other words can embody with the form of software product, this computer software product can store in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD etc., including some instructions with so that a computer equipment (can be personal computer, server, or the network equipment etc.) perform the method described in some part of each embodiment or embodiment.
Last it is noted that above example is only in order to illustrate technical scheme, it is not intended to limit;Although the present invention being described in detail with reference to previous embodiment, it will be understood by those within the art that: the technical scheme described in foregoing embodiments still can be modified by it, or wherein portion of techniques feature is carried out equivalent replacement;And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (10)

1. the method that P2P data are downloaded, it is characterised in that described method includes:
Obtain initial CDN and download probability, initial network condition parameter and current network conditions parameter;Wherein, described initial CDN downloads the probability that probability represents that the video data in the data block in the P2P download area of initial setting is selected from CDN server to download;
Described current network conditions parameter and described initial network condition parameter are compared, according to comparative result, described initial CDN is downloaded probability and is updated obtaining current CDN download probability;
Download probability according to described current CDN, choose the video data in the data block in described P2P download area and download from described CDN server.
2. method according to claim 1, it is characterised in that described current network conditions parameter includes current P2P and uploads rate, current P2P flow rate ratio and the current P2P amount of uploading;Obtain current network conditions parameter, including:
Current P2P download in statistics prefixed time interval, the described current P2P amount of uploading and current CDN download;
According to described current P2P download, the described current P2P amount of uploading and described current CDN download, calculate described current P2P and upload rate, described current P2P flow rate ratio.
3. method according to claim 2, it is characterized in that, described initial network condition parameter includes initial p 2P and uploads rate, initial p 2P flow rate ratio and CDN and prefetch data volume, and described CDN prefetches data volume and downloads probability calculation according to described current P2P download, described current CDN download and described initial CDN and obtain;
Described current network conditions parameter and described initial network condition parameter are compared, according to comparative result, described initial CDN is downloaded probability and is updated obtaining current CDN download probability, including:
If described current P2P uploads, rate uploads rate more than described initial p 2P, described current P2P flow rate ratio prefetches data volume be more than or equal to described initial p 2P flow rate ratio and the described current P2P amount of uploading be more than or equal to described CDN, then described initial CDN is downloaded probability, download probability updating ratio according to CDN to increase, obtain described current CDN and download probability, and rate of being uploaded by described current P2P uploads rate, described current P2P flow rate ratio as described initial p 2P flow as described initial p 2P;
If described current P2P uploads rate and uploads the preset ratio of rate less than described initial p 2P or the described current P2P amount of uploading prefetches data volume less than described CDN, then reacquire described initial CDN and download probability, and initialize described initial network condition parameter, initializing described CDN download probability updating ratio is preset value;
If described current P2P uploads rate and uploads rate less than described initial p 2P and upload the preset ratio of rate more than described initial p 2P, then described initial CDN is downloaded probability, download probability updating ratio according to described CDN to reduce, obtain described current CDN and download probability, and rate of being uploaded by described current P2P uploads rate, described current P2P flow rate ratio as described initial p 2P flow as described initial p 2P.
4. method according to claim 3, it is characterized in that, described CDN download probability updating ratio for presetting, or described current P2P upload when rate is uploaded rate less than described initial p 2P and is uploaded the preset ratio of rate more than described initial p 2P according to preset ratio reduction and obtain.
5. method according to claim 1, it is characterised in that described initial CDN downloads probability and presets and less than or equal to 50%.
6. the device that P2P data are downloaded, it is characterised in that described device includes:
Acquisition module, is used for obtaining initial CDN and downloads probability, initial network condition parameter and current network conditions parameter;Wherein, described initial CDN downloads the probability that probability represents that the video data in the data block in the P2P download area of initial setting is selected from CDN server to download;
Processing module, for described current network conditions parameter and described initial network condition parameter being compared, according to comparative result, downloads probability and is updated obtaining current CDN download probability described initial CDN;
Download module, for downloading probability according to described current CDN, chooses the video data in the data block in described P2P download area and downloads from described CDN server.
7. device according to claim 6, it is characterised in that described current network conditions parameter includes current P2P and uploads rate, current P2P flow rate ratio and the current P2P amount of uploading;Described acquisition module farther includes: statistic unit and computing unit;
Described statistic unit, for adding up the current P2P download in prefixed time interval, the described current P2P amount of uploading and current CDN download;
Described computing unit, for according to described current P2P download, the described current P2P amount of uploading and described current CDN download, calculating described current P2P and upload rate, described current P2P flow rate ratio.
8. device according to claim 7, it is characterized in that, described initial network condition parameter includes initial p 2P and uploads rate, initial p 2P flow rate ratio and CDN and prefetch data volume, described CDN prefetches data volume and obtains according to described current P2P download, described current CDN download and described initial CDN download probability calculation, described processing module farther includes: probability regulon
Described probability regulon, if uploaded for described current P2P, rate uploads rate more than described initial p 2P, described current P2P flow rate ratio prefetches data volume be more than or equal to described initial p 2P flow rate ratio and the described current P2P amount of uploading be more than or equal to described CDN, then described initial CDN is downloaded probability, download probability updating ratio according to described CDN to increase, obtain described current CDN and download probability, and rate of being uploaded by described current P2P uploads rate, described current P2P flow rate ratio as described initial p 2P flow as described initial p 2P;
Described probability regulon, if being additionally operable to described current P2P upload rate and upload the preset ratio of rate less than described initial p 2P or the described current P2P amount of uploading prefetches data volume less than described CDN, then reacquire described initial CDN and download probability, and initialize described initial network condition parameter, initializing described CDN download probability updating ratio is preset value;
Described probability regulon, if being additionally operable to described current P2P upload rate and upload rate less than described initial p 2P and upload the preset ratio of rate more than described initial p 2P, then described initial CDN is downloaded probability, download probability updating ratio according to described CDN to reduce, obtain described current CDN and download probability, and rate of being uploaded by described current P2P uploads rate, described current P2P flow rate ratio as described initial p 2P flow as described initial p 2P.
9. device according to claim 8, it is characterized in that, described CDN download probability updating ratio for presetting, or described current P2P upload when rate is uploaded rate less than described initial p 2P and is uploaded the preset ratio of rate more than described initial p 2P according to preset ratio reduction and obtain.
10. device according to claim 6, it is characterised in that described initial CDN downloads probability and presets and less than or equal to 50%.
CN201510250676.0A 2015-05-15 2015-05-15 P2P data download method and device Pending CN105721889A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510250676.0A CN105721889A (en) 2015-05-15 2015-05-15 P2P data download method and device
PCT/CN2016/076065 WO2016184230A1 (en) 2015-05-15 2016-03-10 P2p data downloading method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510250676.0A CN105721889A (en) 2015-05-15 2015-05-15 P2P data download method and device

Publications (1)

Publication Number Publication Date
CN105721889A true CN105721889A (en) 2016-06-29

Family

ID=56144724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510250676.0A Pending CN105721889A (en) 2015-05-15 2015-05-15 P2P data download method and device

Country Status (2)

Country Link
CN (1) CN105721889A (en)
WO (1) WO2016184230A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107979644A (en) * 2017-11-30 2018-05-01 掌阅科技股份有限公司 Prevent packet method for down loading, electronic equipment, the storage medium of high concurrent
CN109412959A (en) * 2018-09-10 2019-03-01 广州小鹏汽车科技有限公司 A kind of vehicle OTA upgrading Current limited Control mthods, systems and devices
CN114390349A (en) * 2020-10-22 2022-04-22 武汉斗鱼鱼乐网络科技有限公司 Video playing control method, device, terminal and storage medium
CN114827649A (en) * 2022-04-22 2022-07-29 上海哔哩哔哩科技有限公司 Method and device for constructing live peer-to-peer network, electronic equipment and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111372100B (en) * 2020-04-21 2023-07-14 白杨 Distributed election-based end-to-end content distribution network system and distribution method
CN112469008B (en) * 2020-11-27 2022-07-05 重庆电讯职业学院 Content distribution method and device based on D2D reliability
CN114666609A (en) * 2022-03-31 2022-06-24 北京奇艺世纪科技有限公司 Video data downloading method and device, electronic equipment and storage medium
CN116320507B (en) * 2023-05-26 2023-08-08 湖南快乐阳光互动娱乐传媒有限公司 Video data downloading method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841556A (en) * 2010-02-23 2010-09-22 中国科学院计算技术研究所 Method and system for placing resources replication in CDN-P2P (Content Distribution Network-Peer-to-Peer) network
CN101895577A (en) * 2010-07-06 2010-11-24 中国科学院计算技术研究所 Distribution method of network sharing resources
CN102333106A (en) * 2010-07-13 2012-01-25 中国移动通信集团公司 Peer-to-peer (P2P) system resource scheduling method and device and system thereof
CN103049452A (en) * 2011-10-14 2013-04-17 百度在线网络技术(北京)有限公司 Method and device for performing application sequencing based on estimated download rate
CN103179145A (en) * 2011-12-20 2013-06-26 中国电信股份有限公司 Method, system and implicit content server for data transmission on basis of cloud computing
CN103931159A (en) * 2011-10-05 2014-07-16 皮里亚埃利斯姆有限公司 Method and device for arranging peers in live streaming P2P network
CN103997522A (en) * 2014-05-16 2014-08-20 广州金山网络科技有限公司 Content distribution network flow control method and terminal

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101305062B1 (en) * 2011-08-05 2013-09-11 (주)네오위즈게임즈 Device and method for distributed control of file downloading network
US9591070B2 (en) * 2012-12-19 2017-03-07 Hive Streaming Ab Multiple requests for content download in a live streaming P2P network
CN104348647B (en) * 2013-07-31 2019-04-12 腾讯科技(深圳)有限公司 Multi-source bandwidth scheduling method, apparatus and system
CN104506929A (en) * 2014-12-26 2015-04-08 电子科技大学 Hybrid data scheduling method for P2P (peer to peer) systems

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841556A (en) * 2010-02-23 2010-09-22 中国科学院计算技术研究所 Method and system for placing resources replication in CDN-P2P (Content Distribution Network-Peer-to-Peer) network
CN101895577A (en) * 2010-07-06 2010-11-24 中国科学院计算技术研究所 Distribution method of network sharing resources
CN102333106A (en) * 2010-07-13 2012-01-25 中国移动通信集团公司 Peer-to-peer (P2P) system resource scheduling method and device and system thereof
CN103931159A (en) * 2011-10-05 2014-07-16 皮里亚埃利斯姆有限公司 Method and device for arranging peers in live streaming P2P network
CN103049452A (en) * 2011-10-14 2013-04-17 百度在线网络技术(北京)有限公司 Method and device for performing application sequencing based on estimated download rate
CN103179145A (en) * 2011-12-20 2013-06-26 中国电信股份有限公司 Method, system and implicit content server for data transmission on basis of cloud computing
CN103997522A (en) * 2014-05-16 2014-08-20 广州金山网络科技有限公司 Content distribution network flow control method and terminal

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107979644A (en) * 2017-11-30 2018-05-01 掌阅科技股份有限公司 Prevent packet method for down loading, electronic equipment, the storage medium of high concurrent
CN107979644B (en) * 2017-11-30 2019-02-26 掌阅科技股份有限公司 Prevent packet method for down loading, electronic equipment, the storage medium of high concurrent
CN109412959A (en) * 2018-09-10 2019-03-01 广州小鹏汽车科技有限公司 A kind of vehicle OTA upgrading Current limited Control mthods, systems and devices
CN109412959B (en) * 2018-09-10 2022-08-16 广州小鹏汽车科技有限公司 Vehicle OTA (over the air) upgrading current-limiting control method, system and device
CN114390349A (en) * 2020-10-22 2022-04-22 武汉斗鱼鱼乐网络科技有限公司 Video playing control method, device, terminal and storage medium
CN114390349B (en) * 2020-10-22 2024-05-17 北京神州数码云科信息技术有限公司 Video playing control method, device, terminal and storage medium
CN114827649A (en) * 2022-04-22 2022-07-29 上海哔哩哔哩科技有限公司 Method and device for constructing live peer-to-peer network, electronic equipment and storage medium
CN114827649B (en) * 2022-04-22 2024-02-23 上海哔哩哔哩科技有限公司 Method and device for constructing live peer-to-peer network, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2016184230A1 (en) 2016-11-24

Similar Documents

Publication Publication Date Title
CN105721889A (en) P2P data download method and device
DE102015002119B4 (en) Live video streaming with low lag time
CN105657578B (en) Live broadcasting method, system and client based on HLS protocol
DE102013114633B4 (en) Network adaptive latency reduction through frame rate control
CN103327415B (en) Method and device for accelerating network video downloading
CN107683600A (en) System and method for managing the delivering of ABR bit rates in response to the video buffer characteristic of client
CN105898352A (en) m3u8-based streaming media file direct broadcast method and system
CN104683884A (en) Live method and system for stream medium
CN106804002A (en) A kind of processing system for video and method
US20120143986A1 (en) Systems and methods for downloading by different processes
CN105897850A (en) Response processing method and system and scheduling proxy server for CDN platform
CN102857470B (en) Network transmission system, servers and client
CN105812840A (en) Live video transmission method, live video transmission device, and video direct broadcast system
US20240106890A1 (en) Peer-to-peer network scheduling method and system
US20240106891A1 (en) Peer-to-peer network scheduling method and system
CN109962947A (en) Method for allocating tasks and device in a kind of peer-to-peer network
JP6342526B2 (en) Method and system for sharing live broadcast data
US9578077B2 (en) Aggressive prefetching
CN109347967A (en) A kind of method and device obtaining audio, video data
AU2020249319A1 (en) Method for obtaining a data segment by means of a client device capable of communicating with a plurality of content delivery networks
CN113891176B (en) HLS-based on-demand flow control method, device, equipment and storage medium
CN105872764A (en) Data downloading method and device based on P2P (Peer-to-Peer) network
CN105847271A (en) Providing method and providing device for multimedia content based on HTTP real-time streaming
CN110755843B (en) Game audio processing method and device, storage medium and electronic device
WO2009130287A1 (en) Client and server for a video on demand 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20160629

RJ01 Rejection of invention patent application after publication