CN104683416A - Method and device for downloading data in P2P (Peer-to-Peer) network - Google Patents

Method and device for downloading data in P2P (Peer-to-Peer) network Download PDF

Info

Publication number
CN104683416A
CN104683416A CN201310638418.0A CN201310638418A CN104683416A CN 104683416 A CN104683416 A CN 104683416A CN 201310638418 A CN201310638418 A CN 201310638418A CN 104683416 A CN104683416 A CN 104683416A
Authority
CN
China
Prior art keywords
data
downloading
download
interval censored
urgent
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
CN201310638418.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 Information Technology Beijing Co Ltd
Original Assignee
LeTV Information Technology Beijing 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 Information Technology Beijing Co Ltd filed Critical LeTV Information Technology Beijing Co Ltd
Priority to CN201310638418.0A priority Critical patent/CN104683416A/en
Publication of CN104683416A publication Critical patent/CN104683416A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for downloading data in a P2P (Peer-to-Peer) network, which are capable of increasing the P2P downloading efficiency. The method for downloading the data in the P2P network comprises the steps of judging whether the data volume of data, which are not downloaded, in emergency region data reaches a preset threshold value or not when P2P downloading is started for downloading non-emergency region data; switching off the P2P downloading to stop downloading of the non-emergency region data when the data volume of the data, which are not downloaded, in the emergency region data is determined to reach the preset threshold value.

Description

Data download method and device in a kind of P2P network
Technical field
The present invention relates to computer network field, particularly relate to data download method and device in a kind of P2P network.
Background technology
At P2P(peer-to-peer, point-to-point) in network, each node is the brother of node of equality, any node can to other node be connected with this node, namely the neighbor node of this node serves as client or server, the data of various ways can be shared, as video data, voice data etc. between each node be connected.
Therefore, in P2P network, the downloading mode of data can comprise P2P download and http downloads two kinds, and P2P downloads and refers to obtain data from neighbor node, and http downloads and refers to directly obtain data from server by http agreement.Usually, data to be downloaded in P2P network are divided into urgent interval censored data and non-emergent interval censored data usually.Such as, when displaying video, data in certain interval after video current played data position directly can affect the fluency of video playback, and in this interval, data are urgent interval censored data, and in the certain interval after urgent interval censored data, data are non-emergent interval censored data.Download because http speed of download is better than P2P, therefore in prior art, http is adopted to download for urgent interval censored data, adopt P2P to download for non-emergent interval censored data, http downloads a below direct-open and carries urgent interval censored data, after urgent interval censored data download all completes, just can open P2P to download to download non-emergent interval censored data, once there is non-downloading data in urgent interval censored data, close P2P immediately and download, stop downloading non-emergent interval censored data.
But when displaying video, the current played data position of video is constantly change, urgent interval censored data is also constantly change, all likely there is non-downloading data at any time in urgent interval censored data, cause frequent closedown, open P2P download, affect P2P download efficiency.
Summary of the invention
The embodiment of the present invention provides data download method and device in a kind of P2P network, in order to solve the lower problem of P2P download efficiency.
The embodiment of the present invention provides data download method in a kind of P2P network, comprising:
Download at unlatching P2P, during to download non-emergent interval censored data, judge whether the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value;
When determining that the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value, closing P2P and downloading, to stop downloading non-emergent interval censored data.
The embodiment of the present invention also provides data download apparatus in a kind of P2P network, comprising:
Judging unit, for downloading at unlatching P2P, during to download non-emergent interval censored data, judges whether the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value;
Switch element, for when determining that the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value, closing P2P and downloading, to stop downloading non-emergent interval censored data.
Beneficial effect of the present invention comprises:
In the scheme that the embodiment of the present invention provides, after unlatching P2P downloads, when determining that the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value, just can close P2P to download, stop downloading non-emergent interval censored data, when determining that the data volume of non-downloading data in urgent interval censored data does not reach predetermined threshold value, P2P can not be closed download, continue to download non-emergent interval censored data, therefore, compared in prior art, non-downloading data is there is in urgent interval censored data, close P2P immediately to download, stop the scheme downloading non-emergent interval censored data, adopt the scheme that the embodiment of the present invention provides, P2P can be avoided to download close frequently, open, ensure that P2P download has time enough and sets up effective download link downloading data, P2P download efficiency can be improve.
Accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms a part for specification, is used from explanation the present invention, is not construed as limiting the invention with the embodiment of the present invention one.In the accompanying drawings:
The flow chart of data download method in the P2P network that Fig. 1 provides for the embodiment of the present invention;
The flow chart of data download method in the P2P network that Fig. 2 provides for the embodiment of the present invention 1;
The flow chart of data download method in the P2P network that Fig. 3 provides for the embodiment of the present invention 2;
The structural representation of data download apparatus in the P2P network that Fig. 4 provides for the embodiment of the present invention.
Embodiment
In order to provide the implementation improving P2P download efficiency, embodiments provide data download method and device in a kind of P2P network, in conjunction with Figure of description, the preferred embodiments of the present invention are described, be to be understood that, preferred embodiment described herein, only for instruction and explanation of the present invention, is not intended to limit the present invention.And when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
Embodiments provide data download method in a kind of P2P network, as shown in Figure 1, comprising:
Step 101, unlatching P2P download, during to download non-emergent interval censored data, judge whether the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value;
Step 102, when determining that the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value, close P2P download, to stop downloading non-emergent interval censored data.
When determining that the data volume of non-downloading data in urgent interval censored data does not reach predetermined threshold value, continuing to open P2P and downloading, downloading non-emergent interval censored data.
Visible, data download method in the P2P network adopting the embodiment of the present invention to provide, the frequent closedown that P2P can be avoided to download, unlatching, make P2P download have time enough and set up effective download link downloading data, improve P2P download efficiency.
Further, can work as in urgent interval censored data when there is not non-downloading data, open P2P and download, to download non-emergent interval censored data.
Now, can continue to open http and download, but http downloads and P2P download is opened, and will inevitably carry out the competition of bandwidth simultaneously.
Therefore, preferably, when there is not non-downloading data in urgent interval censored data, downloading at unlatching P2P, while downloading non-emergent interval censored data, http can also be closed and download, to stop download emergency interval censored data.
Now close http to download, only open P2P and download, P2P speed of download can be improved.
If close http when opening P2P and downloading to download, when determining that the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value, not only to close P2P and downloading, stop downloading non-emergent interval censored data, also to open http to download, with download emergency interval censored data.
Above-mentioned predetermined threshold value has multiplely determines mode, in an embodiment of the present invention, can according to the total amount of data determination predetermined threshold value of urgent interval censored data, setting predetermined threshold value is the prescribed percentage of the total amount of data of urgent interval censored data, such as, setting predetermined threshold value is the half of the total amount of data of urgent interval censored data, when the data volume of downloading data non-in urgent interval censored data reaches a half of the total amount of data of urgent interval censored data, closes P2P and downloads.
In an alternative embodiment of the invention, the code stream determination predetermined threshold value also can downloaded according to http; Wherein, the code stream that http downloads is larger, and predetermined threshold value is larger; The code stream that http downloads is larger, and predetermined threshold value is less.
The determination mode of above-mentioned two kinds of predetermined threshold value is only an example, is not intended to limit the present invention.In other embodiments of the invention, alternate manner also can be adopted to set predetermined threshold value.
Below in conjunction with accompanying drawing, in the P2P network provide the embodiment of the present invention, data download method is described in detail.
Embodiment 1:
Figure 2 shows that the flow chart of data download method in the P2P network that the embodiment of the present invention 1 provides, specifically comprise:
Step 201, initial at beginning downloading data, close P2P and download, only open http and download.
Namely initial at beginning downloading data, non-emergent interval censored data wouldn't be downloaded, preferential download emergency interval censored data.
Step 202, judge whether there is non-downloading data in urgent interval censored data.
When determining there is not non-downloading data in anxious interval censored data, enter step 203; When determining to there is non-downloading data in anxious interval censored data, circulation performs this step 202, carries out cycle criterion.
Step 203, unlatching P2P download.
Namely now, while download emergency interval censored data, non-emergent interval censored data is downloaded.
Step 204, judge whether the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value.
When determining that the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value, enter step 205; When determining that the data volume of non-downloading data in urgent interval censored data does not reach predetermined threshold value, circulation performs this step 204, carries out cycle criterion.
Wherein, the determination of the predetermined threshold value adopted during judgement can adopt above-mentionedly multiplely determines mode, does not repeat them here.
Step 205, closedown P2P download, and return step 202.
Namely now, only download emergency interval censored data, stops downloading non-emergent interval censored data.
Visible, adopt the scheme that the embodiment of the present invention 1 provides, one direct-open http downloads, open P2P to download when determining there is not non-downloading data in anxious interval censored data, close P2P to download when determining that the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value, compared in prior art, non-downloading data is there is in urgent interval censored data, close the scheme that P2P downloads immediately, P2P download can be avoided to close frequently, open, ensure that P2P download has time enough and sets up effective download link downloading data, P2P download efficiency can be improve.
Embodiment 2:
Figure 3 shows that the flow chart of data download method in the P2P network that the embodiment of the present invention 2 provides, specifically comprise:
Step 301, initial at beginning downloading data, close P2P and download, only open http and download.
Namely initial at beginning downloading data, non-emergent interval censored data wouldn't be downloaded, preferential download emergency interval censored data.
Step 302, judge whether there is non-downloading data in urgent interval censored data.
When determining there is not non-downloading data in anxious interval censored data, enter step 303; When determining to there is non-downloading data in anxious interval censored data, circulation performs this step 302, carries out cycle criterion.
Step 303, unlatching P2P download, and close http and download.
Namely now, download non-emergent interval censored data, stop download emergency interval censored data.
Step 304, judge whether the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value.
When determining that the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value, enter step 305; When determining that the data volume of non-downloading data in urgent interval censored data does not reach predetermined threshold value, circulation performs this step 304, carries out cycle criterion.
Wherein, the determination of the predetermined threshold value adopted during judgement can adopt above-mentionedly multiplely determines mode, does not repeat them here.
Step 305, closedown P2P download, and open http simultaneously and download, return step 302.
Namely now, stop downloading non-emergent interval censored data, continue download emergency interval censored data.
Visible, adopt the scheme that the embodiment of the present invention 2 provides, when determining there is not non-downloading data in anxious interval censored data, open P2P to download, close http to download simultaneously, compared to the scheme that a direct-open http in above-described embodiment 1 downloads, can bandwidth contention be avoided, improve P2P download efficiency further.
Based on same inventive concept, according to data download method in the P2P network that the above embodiment of the present invention provides, correspondingly, the embodiment of the present invention also provides data download apparatus in a kind of P2P network, as shown in Figure 4, specifically comprises:
Judging unit 401, for downloading at unlatching P2P, during to download non-emergent interval censored data, judges whether the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value;
Switch element 402, for when determining that the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value, closing P2P and downloading, to stop downloading non-emergent interval censored data.
Further, switch element 402, also for when there is not non-downloading data in urgent interval censored data, opening P2P and downloading, to download non-emergent interval censored data.
Preferably, switch element 402, also for when there is not non-downloading data in urgent interval censored data, closing http and downloading, to stop download emergency interval censored data.
Further, switch element 402, also for when determining that the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value, opening http and downloading, with download emergency interval censored data.
Preferably, the code stream that predetermined threshold value is downloaded according to http is determined.
Wherein, the code stream that http downloads is larger, and this predetermined threshold value is larger; The code stream that http downloads is less, and this predetermined threshold value is less.
The function of above-mentioned each unit may correspond to the respective handling step in the arbitrary shown flow process of Fig. 1-Fig. 3, does not repeat them here.
In sum, data download scenarios in the P2P network that the embodiment of the present invention provides, comprising: download at unlatching P2P, during to download non-emergent interval censored data, judge whether the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value; When determining that the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value, closing P2P and downloading, to stop downloading non-emergent interval censored data.The scheme adopting the embodiment of the present invention to provide, can avoid P2P download to close frequently, open, improve P2P download efficiency.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the flow chart of the method for the embodiment of the present invention, equipment (system) and computer program and/or block diagram.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can being provided to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computer or other programmable data processing device produce device for realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices is provided for the step realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification to the embodiment of the present invention and not depart from the spirit and scope of the embodiment of the present invention.Like this, if these amendments of the embodiment of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (10)

1. a data download method in P2P network, is characterized in that, comprising:
Download at unlatching P2P, during to download non-emergent interval censored data, judge whether the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value;
When determining that the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value, closing P2P and downloading, to stop downloading non-emergent interval censored data.
2. the method for claim 1, is characterized in that, also comprises:
When there is not non-downloading data in urgent interval censored data, opening P2P and downloading, to download non-emergent interval censored data.
3. method as claimed in claim 2, is characterized in that, when there is not non-downloading data in urgent interval censored data, also comprising:
Close http to download, to stop download emergency interval censored data.
4. method as claimed in claim 3, is characterized in that, when determining that the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value, also comprising:
Open http to download, with download emergency interval censored data.
5. the method as described in as arbitrary in claim 1-4, it is characterized in that, the code stream that described predetermined threshold value is downloaded according to http is determined; Wherein, the code stream that http downloads is larger, and described predetermined threshold value is larger.
6. a data download apparatus in P2P network, is characterized in that, comprising:
Judging unit, for downloading at unlatching P2P, during to download non-emergent interval censored data, judges whether the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value;
Switch element, for when determining that the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value, closing P2P and downloading, to stop downloading non-emergent interval censored data.
7. device as claimed in claim 6, is characterized in that, described switch element, also for when there is not non-downloading data in urgent interval censored data, opening P2P and downloading, to download non-emergent interval censored data.
8. device as claimed in claim 7, is characterized in that, described switch element, also for when there is not non-downloading data in urgent interval censored data, closing http and downloading, to stop download emergency interval censored data.
9. device as claimed in claim 8, is characterized in that, described switch element, also for when determining that the data volume of non-downloading data in urgent interval censored data reaches predetermined threshold value, opening http and downloading, with download emergency interval censored data.
10. the device as described in as arbitrary in claim 6-9, it is characterized in that, the code stream that described predetermined threshold value is downloaded according to http is determined; Wherein, the code stream that http downloads is larger, and described predetermined threshold value is larger.
CN201310638418.0A 2013-12-02 2013-12-02 Method and device for downloading data in P2P (Peer-to-Peer) network Pending CN104683416A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310638418.0A CN104683416A (en) 2013-12-02 2013-12-02 Method and device for downloading data in P2P (Peer-to-Peer) network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310638418.0A CN104683416A (en) 2013-12-02 2013-12-02 Method and device for downloading data in P2P (Peer-to-Peer) network

Publications (1)

Publication Number Publication Date
CN104683416A true CN104683416A (en) 2015-06-03

Family

ID=53318001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310638418.0A Pending CN104683416A (en) 2013-12-02 2013-12-02 Method and device for downloading data in P2P (Peer-to-Peer) network

Country Status (1)

Country Link
CN (1) CN104683416A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872764A (en) * 2015-12-21 2016-08-17 乐视云计算有限公司 Data downloading method and device based on P2P (Peer-to-Peer) network

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141459A (en) * 2007-10-25 2008-03-12 南京远古科技有限公司 Method of implementing data transmission or stream media transmission using combination of HTTP and P2P
CN101471919A (en) * 2007-12-29 2009-07-01 突触计算机系统(上海)有限公司 Method and device for downloading slicing of equipment based on point-to-point transmission protocol
CN102137124A (en) * 2010-01-27 2011-07-27 中国电信股份有限公司 Method and system for live broadcast of peer-to-peer (P2P) streaming media
WO2011113331A1 (en) * 2010-03-15 2011-09-22 腾讯科技(深圳)有限公司 Movie file download device and method
CN102790925A (en) * 2011-05-20 2012-11-21 深圳市快播科技有限公司 Method and VOD (Video On Demand) terminal for playing online streaming media

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141459A (en) * 2007-10-25 2008-03-12 南京远古科技有限公司 Method of implementing data transmission or stream media transmission using combination of HTTP and P2P
CN101471919A (en) * 2007-12-29 2009-07-01 突触计算机系统(上海)有限公司 Method and device for downloading slicing of equipment based on point-to-point transmission protocol
CN102137124A (en) * 2010-01-27 2011-07-27 中国电信股份有限公司 Method and system for live broadcast of peer-to-peer (P2P) streaming media
WO2011113331A1 (en) * 2010-03-15 2011-09-22 腾讯科技(深圳)有限公司 Movie file download device and method
CN102790925A (en) * 2011-05-20 2012-11-21 深圳市快播科技有限公司 Method and VOD (Video On Demand) terminal for playing online streaming media

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
危婷: "P2P流媒体系统的测量分析和建模研究", 《中国博士学位论文全文数据库(信息科技辑)》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872764A (en) * 2015-12-21 2016-08-17 乐视云计算有限公司 Data downloading method and device based on P2P (Peer-to-Peer) network

Similar Documents

Publication Publication Date Title
US11374995B2 (en) Multimedia file processing
CN103096385B (en) A kind of method of flow control, device and terminal
CN108124284B (en) Bluetooth data transmission method and device
CN109688574B (en) Network slice selection method and system
WO2015131582A1 (en) Method, terminal, system for short-distance data transmission, and computer storage medium
CN105426244B (en) Application process management method and application process managing device
JP2016502781A5 (en)
US10231005B2 (en) Operation instructing method and apparatus for remote controller of intelligent television
CN104661088A (en) Video source switching method and device
KR20140004799A (en) Peer-to-peer data migration
CN105228221A (en) A kind of method and apparatus of fast return Long Term Evolution LTE network
CN103237115B (en) Terminal download control method and mobile terminal implementing same
CN111352350A (en) Method and device for determining execution of smart home scene
EP3622785B1 (en) Forming groups of devices by analyzing device control information
CN103686876A (en) Information processing method and electronic equipment
CN109788491B (en) Method, device and system for managing slice migration
JP6587997B6 (en) Sliding window management method and system for time machine function
CN108694035A (en) The report management method and device of voice messaging
CN104683416A (en) Method and device for downloading data in P2P (Peer-to-Peer) network
CN104735115A (en) P2P downloading method and device
CN104639450A (en) Data package forwarding control method and device and SDN (software defined network) frame system
CN105872764A (en) Data downloading method and device based on P2P (Peer-to-Peer) network
CN112534967B (en) Method, electronic equipment and storage medium related to light command emission
CN104717569A (en) Data elimination method and device
WO2017066988A1 (en) Mobile phone internet of things control method and 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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150603

WD01 Invention patent application deemed withdrawn after publication