WO2011009362A1 - Method, apparatus, system and node for downloading data - Google Patents
Method, apparatus, system and node for downloading data Download PDFInfo
- Publication number
- WO2011009362A1 WO2011009362A1 PCT/CN2010/074390 CN2010074390W WO2011009362A1 WO 2011009362 A1 WO2011009362 A1 WO 2011009362A1 CN 2010074390 W CN2010074390 W CN 2010074390W WO 2011009362 A1 WO2011009362 A1 WO 2011009362A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- seed
- current
- new
- node
- seeds
- Prior art date
Links
- 238000000034 method Methods 0.000 claims abstract description 37
- 238000004891 communication Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 2
- YTPMCWYIRHLEGM-BQYQJAHWSA-N 1-[(e)-2-propylsulfonylethenyl]sulfonylpropane Chemical compound CCCS(=O)(=O)\C=C\S(=O)(=O)CCC YTPMCWYIRHLEGM-BQYQJAHWSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1074—Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
- H04L67/1076—Resource dissemination mechanisms or network resource keeping policies for optimal resource availability in the overlay network
Definitions
- the present invention relates to the field of computer network communication technologies, and in particular, to a method, device, system and node for downloading data.
- P2P download is one of the popular download methods on the Internet.
- P2P download is downloaded through the seed.
- the specific process is as follows: When the node requester (the node requesting to download data) needs to download data, The server queries the seed (the node containing the data that the node requester needs to download); the server queries the seed and returns a seed message to the node requester; the node requester receives the seed message, downloads the data from the seed, and the more the number of seeds, the node The faster the requester downloads the data.
- the embodiment of the present invention provides a method, device, system and node for downloading data.
- the technical solution is as follows:
- an embodiment of the present invention provides a method for downloading data, where the method includes:
- Get information about new seeds The data is simultaneously downloaded from the new seed and the current seed.
- the method further includes:
- the current seed receives an indication to extend a new seed
- the current seed acquires an idle node, and instructs the idle node to download the data from the current seed, so that the idle node downloads the data into a new seed.
- the indicating that the current seed extends a new seed specifically includes: indicating that the current seed expands a new seed, and indicating that the current seed expands a new seed;
- the method further includes:
- the current seed receives an indication of expanding the number of new seeds and expanding new seeds
- the current seed acquires an idle node, and selects an idle node to be extended from among all the obtained idle nodes, wherein the number of the idle nodes to be extended is equal to the number of the extended new seeds;
- the current seed instructs the to-be-expanded idle node to download data from the current seed, so that the to-be-expanded idle node downloads the data into a new seed.
- the current seed acquires an idle node, specifically:
- the nodes in the current seed query network get idle nodes; and/or
- the current seed obtains a free node by querying a node in the network by the server.
- the information for acquiring the new seed is specifically:
- an embodiment of the present invention provides an apparatus for downloading data, where the apparatus includes:
- a determining module configured to download data from the current seed, and determine whether the total number of the current seeds is less than a preset seed number threshold
- the indicating module configured to: when the determining result of the determining module is that the total number of the current seeds is less than the preset seed number threshold, instructing the current seed to expand a new seed;
- a first acquiring module configured to acquire information about a new seed after the indicating module indicates that the current seed expands a new seed
- a downloading module configured to download the data from the new seed and the current seed simultaneously after the first acquiring module acquires the information of the new seed.
- the indication module is further configured to: when indicating that the current seed expands a new seed, instruct the current seed to expand the number of new seeds.
- the first acquiring module is specifically configured to: after the indicating module instructs the current seed to expand a new seed, acquire information about a new seed from a server;
- the first acquiring module is specifically configured to: after the indicating module instructs the current seed to expand a new seed, obtain information about the new seed from the current seed;
- the first acquiring module is specifically configured to: after the indicating module instructs the current seed to expand a new seed, acquire information of the new seed from the new seed.
- an embodiment of the present invention provides a system for downloading data, where the system includes:
- a node requester configured to download data from the current seed, and determine whether the total number of the current seeds is less than a preset seed number threshold; when the judgment result is that the total number of the current seeds is less than the preset seed quantity At the threshold, the current seed is instructed to expand the new seed; the information of the new seed is obtained; and the data is simultaneously downloaded from the new seed and the current seed.
- system further includes:
- the current seed configured to receive an indication of extending a new seed; acquiring a idle node, and instructing the idle node to download the data from the current seed;
- the idle node is configured to receive an indication that the data is downloaded from the current seed, and download the data from the current seed into a new seed.
- the node requester is further configured to: when indicating that the current seed expands a new seed, instruct the current seed to expand the number of new seeds;
- system further comprises:
- the current seed for receiving an indication of the number of the extended new seed and the extended new seed; acquiring the idle node, selecting the idle node to be extended from all the obtained idle nodes; indicating the idle node to be extended from the current Downloading the data in the seed; wherein, the number of idle nodes to be extended is equal to the number of extended new seeds;
- the idle node to be extended is configured to receive an indication that the data is downloaded from the current seed, and download the data from the current seed to become a new seed.
- the current seed is specifically used to query a node in the network to obtain a idle node; and/or the current seed is specifically used to obtain a idle node by querying a node in the network by using a server.
- an embodiment of the present invention provides a node, where the node includes:
- a receiving module configured to receive an indication of expanding a new seed
- an obtaining module configured to: after the receiving module receives the indication of extending the new seed, acquire the idle node, and instruct the idle node to download data from the node, so that the idle node downloads the data into a new seed.
- the receiving module is specifically configured to receive an indication of expanding the number of new seeds and expanding the number of new seeds;
- the acquiring module is specifically configured to: after the receiving module receives the indication of the number of the extended new seed and the extended new seed, acquire the idle node, select the idle node to be extended from all the obtained idle nodes, and indicate the The idle node to be extended downloads the data from the current seed, so that the idle node to be extended downloads the data into a new seed.
- the acquiring module is specifically configured to query a node in the network to obtain a idle node; and/or the acquiring module is specifically configured to obtain a idle node by querying a node in the network by using a server.
- the current seed to expand the new seed By instructing the current seed to expand the new seed, it is possible to use the current seed real-time delivery download to expand the new seed, so that the number of seeds can be expanded in real time, the number of seeds can be guaranteed, the download speed can be quickly increased, the download time is saved, and the user is greatly improved.
- the new seed to expand the new seed increase the seed utilization;
- the idle node downloads data from the current seed to become a new seed, without the server providing download data, without additional server load; further indicating the current When the seed expands the new seed, by indicating the current seed to expand the number of new seeds, the number of extended seeds can be limited, avoiding unrestricted expansion, and avoiding wasting network resources.
- Embodiment 1 is a flowchart of a method for downloading data provided by Embodiment 1 of the present invention
- FIG. 2 is a schematic structural diagram of a system for downloading data according to Embodiment 2 of the present invention.
- Embodiment 3 is a flowchart of a method for downloading data provided by Embodiment 2 of the present invention.
- FIG. 4 is a schematic structural diagram of an apparatus for downloading data according to Embodiment 3 of the present invention.
- FIG. 5 is a schematic structural diagram of a system for downloading data according to Embodiment 4 of the present invention.
- FIG. 6 is a schematic structural diagram of a system for downloading data according to Embodiment 4 of the present invention.
- FIG. 7 is a schematic structural diagram of a node according to Embodiment 5 of the present invention. detailed description
- an embodiment of the present invention provides a method for downloading data, where the method includes:
- 101 Download data from the current seed, and determine whether the total number of current seeds is less than a preset seed number threshold. 102: When the judgment result is that the total number of current seeds is less than a preset seed quantity threshold, indicating that the current seed is expanded. seed; 103: Obtain information about the new seed;
- the method further includes:
- the current seed receives an indication to extend the new seed
- the current seed acquires the idle node and instructs the idle node to download data from the current seed, causing the idle node to download the data as a new seed.
- indicating that the current seed expands the new seed specifically includes: indicating that the current seed expands the new seed, and indicates that the current seed expands the number of new seeds;
- the method further comprises:
- the current seed receives an indication of the number of new seeds to be expanded and the number of new seeds to be expanded;
- the current seed acquires the idle node, and selects the idle node to be extended from among all the obtained idle nodes, wherein the number of idle nodes to be extended is equal to the number of extended new seeds;
- the current seed indicates that the idle node to be extended downloads data from the current seed, so that the idle node download data to be extended becomes a new seed.
- the current seed acquires an idle node, specifically:
- the nodes in the current seed query network get idle nodes; and/or
- the current seed obtains a free node by querying a node in the network through the server.
- the information for obtaining a new seed is specifically:
- the method for downloading data according to the embodiment of the present invention by instructing the current seed to expand the new seed, makes it possible to use the current seed to download and expand the new seed in real time, so that the number of seeds can be expanded in real time, the number of seeds can be guaranteed, and the download can be quickly improved.
- the idle node downloads data from the current seed into a new seed, without the server to provide download data, There is no need to additionally increase the server burden; further, when instructing the current seed to expand the new seed, by indicating the current seed to expand the number of new seeds, the number of extended seeds can be limited, avoiding unrestricted expansion, and avoiding wasting network resources.
- FIG. 2 is a schematic structural diagram of a system for downloading data according to an embodiment of the present invention, where a node requester A, The seed 1 and the nodes in the network (node 1, node 2, and node N) are respectively connected to the server.
- the method for downloading data provided by the embodiment of the present invention is specifically described below with reference to FIG.
- an embodiment of the present invention provides a method for downloading data, where the method includes:
- the node requester A needs to download the data B, and then queries the server for the information of the seed (ie, the node containing the data B).
- the querying the information of the seed to the server may be performed by sending a query message to the server, where the query message carries the information of the data that the node requester A needs to download, for example, the node requester A needs to download the data B in this embodiment.
- the query message carries the information of the data B.
- the query can be performed by any feasible query method in the prior art, which is not specifically limited, and can be flexibly selected according to actual application conditions.
- the server queries the seed information, and returns the seed information to the node requester A.
- the seed information includes the identifier of the seed, the type of the network of the seed, and the IP (Internet Protocol, International Protocol) address of the seed.
- the step may specifically be: the server receives the query message, and queries the node containing the data B according to the query message, and then returns the query to the node requester A.
- the result message wherein, the query result message carries the information of the seed queried by the server.
- This embodiment sets a query to a seed as seed 1, but is not limited thereto.
- the seed queried by the server may be referred to as a current seed.
- the information that returns the seed to the node requester A is the information that returns the current seed to the node requester A. Accordingly, the above seed 1 is the current seed.
- the node requester A receives the information of the current seed, downloads the data B from the current seed, and determines whether the total number of the current seed is less than a preset seed number threshold. If not, performs 204; otherwise, performs 207.
- the total number of current seeds is the sum of the number of current seeds obtained by the node requester A; the preset seed quantity threshold may be set according to the actual situation and the experience value of the node requester A.
- the preset seed number threshold is 2.
- the node requester A can obtain information such as the identifier of the current seed, the network type of the current seed, and the IP address of the current seed, and according to the information, establish a contact with the current seed, thereby Download data B in the current seed.
- Node requester A indicates that the current seed extends the new seed.
- the node requester A when it indicates that the current seed expands the new seed, it may be performed by sending a message, a signal or an instruction to the current seed.
- the extended seed quantity message can be sent to the current seed, and the corresponding identifier is carried in the extended seed quantity message to convey that the current seed quantity is insufficient, and the node requester A cannot download the data.
- Ask indicating that the current seed is expanding the new seed.
- By carrying "1" in the extended seed quantity message it indicates that the current seed quantity is insufficient, indicating that the current seed expands the new seed; carrying the "0" in the extended seed quantity message indicates that the current seed quantity is sufficient, and the current seed does not need Expand new seeds. This is not specifically limited, and can be flexibly set according to actual application conditions.
- the step 204 may further specifically: the node requester A indicates that the current seed extends the new seed, and indicates the current seed to expand the number of new seeds, that is, the node requester A in this step indicates that the current seed expands the new seed.
- the node requester A may also indicate that each current seed specifically expands several new seeds according to the total number of current seeds, the specific condition of each current seed itself, and/or the size of a preset seed number threshold.
- the node requester A can according to the total number of current seeds, each current The specific condition of the seed itself and the preset seed number threshold indicate that the first current seed expands 3 new seeds, the second current seed expands 2 new seeds, and the third current seed expands 2 new seeds. It should be noted that the node requester A indicates that each current seed specifically expands several new seeds without specific limitation, and can be flexibly set according to actual application conditions.
- the current seed receives an indication to extend the new seed, expanding the new seed.
- the current seed receives an indication of expanding the new seed; the current seed acquires the idle node, and indicates that the idle node downloads the data B from the current seed; the idle node receives the indication of downloading the data B from the current seed, and the downloaded data B becomes new seed.
- the idle node refers to a node whose current downlink data and uplink data of the node are smaller than a preset traffic threshold.
- Obtaining a free node may be that the current seed itself queries each node in the network to obtain a free node; or the server may query each node in the network to obtain a free node, and the current seed then obtains a free node from the server, that is, the current seed queries the network through the server.
- Each node in the middle gets a free node. And instructing the idle node to download data B from the current seed, specifically by sending a message, signal or instruction to the idle node.
- node 1 and node 2 are idle nodes, node 1 and node 2 download data B from seed 1 to become a new seed.
- the corresponding download policy can be set.
- the downloading strategy may be that each idle node randomly downloads various parts of the data B; the downloading strategy may also be that some idle nodes start downloading from the latter part of the data B, some idle nodes start downloading from the previous part of the data B, and the like; When downloading data B, it is not necessary to download the entire part of data B.
- some free nodes can be set to download the first half of data B to stop downloading, and some idle nodes download the last two of data B.
- One part can stop downloading and so on.
- the download policy is not limited, and can be flexibly set according to the actual application.
- the step 204 when the step 204 is specifically: the node requester A indicates that the current seed expands the new seed, and indicates the current seed to expand the number of new seeds, the step 205 may specifically be: the current seed receives the extended new seed and the extension. An indication of the number of new seeds; the current seed acquires an idle node, and selects from all the idle nodes obtained The idle node is to be extended, wherein the number of idle nodes to be extended is equal to the number of extended new seeds; the current seed indicates that the idle node to be extended downloads data B from the current seed; the idle node to be extended receives data downloaded from the current seed Instructed by B, downloading data B becomes a new seed.
- the total number of available idle nodes is smaller than the number of extended new seeds, and only all idle nodes need to be selected as the idle nodes to be extended.
- the same idle node may be used as the idle node to be extended by any current seed of any current seed, or The same idle node may be used as the to-be-expanded idle node of the current seed that meets the preset selection condition in the current current seed, and is not specifically limited. Any other feasible allocation method may be set according to the actual application status.
- a download policy similar to that when the idle node downloads the data B from the current seed may be set.
- the node requester A obtains the information of the new seed, and downloads the data B from the new seed and the current seed, and determines whether the total number of the current seed and the new seed is less than a preset seed number threshold, if the preset seed quantity is greater than or equal to Threshold, then stop expanding the seed, download data B from the new seed and the current seed, and end after downloading data B.
- the node requester A may acquire information of the new seed from the server; or may acquire information of the new seed from the current seed; or may acquire information of the new seed from the new seed.
- a connection relationship is established between each node and the server.
- the server knows the latest status of the node, so that the new seed information can be notified to the node requester A or the node request.
- A is obtained by querying the server; since the new seed is obtained by the current seed extension, the current seed can inform the node requester A or the node requester A of the new seed information by querying the current seed; or when expanding the new seed
- the new seed directly informs the node requester A of its own information.
- the information of the node requester A includes information such as the identifier of the node requester A, the network type of the node requester A, and the IP address of the node requester A.
- the new seed is set to node 1 and node 2, so data B is downloaded from the new seed and the current seed, that is, data B is downloaded from node 1, node 2, and seed 1.
- the components of the data B may be randomly downloaded; or the node 1 may first download from the previous component of the data B, and the node 2 first Download from the next component of data B, and so on.
- the total number of current seeds and new seeds is 3, and the preset seed number threshold is 2, then node requester A downloads data B from node 1, node 2, and seed 1, and downloads data B. After the end.
- the process of further expanding the new seed by the new current seed is similar to the process of expanding the new seed by the current seed, and will not be described here. That is, when the preset seed number threshold is not reached, the new seed can be further expanded until the requirement is met, thereby ensuring the number of seeds and increasing the speed of downloading data.
- Node requester A downloads data B from the current seed, and ends after downloading data B.
- the method for downloading data according to the embodiment of the present invention by instructing the current seed to expand the new seed, makes it possible to use the current seed to download and expand the new seed in real time, so that the number of seeds can be expanded in real time, the number of seeds can be guaranteed, and the download can be quickly improved. Speed, saving download time, greatly improving the user experience; and, by seed expanding new seeds, increasing seed utilization;
- the idle node downloads data from the current seed into a new seed, without the server providing download data, It is necessary to additionally increase the server burden; further, when instructing the current seed to expand the new seed, by indicating the current seed to expand the number of new seeds, the number of extended seeds can be limited, avoiding unrestricted expansion, and avoiding wasting network resources.
- an embodiment of the present invention provides an apparatus for downloading data, where the apparatus includes:
- the determining module 301 is configured to download data from the current seed, and determine whether the total number of the current seeds is less than a preset seed number threshold;
- the indicating module 302 is configured to: when the judgment result of the determining module 301 is that the total number of the current seeds is less than a preset seed number threshold, instruct the current seed to expand the new seed;
- the first obtaining module 303 is configured to obtain information about the new seed after the indicating module 302 indicates that the current seed extends the new seed.
- the downloading module 304 is configured to download data from the new seed and the current seed simultaneously after the first obtaining module 303 acquires the information of the new seed.
- the indicating module 302 is further configured to indicate the current seed to expand the number of new seeds when the current seed is expanded to indicate a new seed.
- the first obtaining module 303 is specifically configured to: after the indication module 302 indicates that the current seed extends the new seed, obtain information about the new seed from the server;
- the first obtaining module 303 is specifically configured to: after the indicating module 302 indicates that the current seed expands the new seed, acquire information of the new seed from the current seed;
- the first obtaining module 303 is specifically configured to: after the indication module 302 indicates that the current seed expands the new seed, acquire information of the new seed from the new seed.
- the apparatus for downloading data according to the embodiment of the present invention, by instructing the current seed to expand a new seed, enables the new seed to be downloaded and expanded in real time by using the current seed, so that the number of seeds can be expanded in real time, the number of seeds can be guaranteed, and the download can be quickly improved.
- the idle node downloads data from the current seed into a new seed, without the server to provide download data, There is no need to additionally increase the server burden; further, when instructing the current seed to expand the new seed, by indicating the current seed to expand the number of new seeds, the number of extended seeds can be limited, avoiding unrestricted expansion, and avoiding wasting network resources.
- an embodiment of the present invention provides a system for downloading data, where the system includes:
- the node requester 401 is configured to download data from the current seed 402, and determine whether the total number of the current seeds 402 is less than a preset seed number threshold; when the judgment result is that the total number of the current seeds 402 is less than a preset seed number threshold Instructing the current seed 402 to expand the new seed; obtaining information of the new seed; and simultaneously downloading the data from the new seed and the current seed 402.
- system further includes:
- the current seed 402 is configured to receive an indication to extend the new seed; obtain the idle node 403, and instruct the idle node 403 to download data from the current seed 402;
- the idle node 403 is configured to receive an indication of downloading data from the current seed 402, and download the data from the current seed 402 into a new seed.
- the node requester 401 is further configured to: when the current seed 402 is instructed to expand the new seed, instruct the current seed 402 to expand the number of new seeds;
- the system also includes:
- the current seed 402 is configured to receive an indication of the number of the extended new seed and the extended new seed.
- the idle node 403 is obtained, and the idle node 404 to be extended is selected from all the obtained idle nodes 403; the idle node 404 to be extended is indicated from the current seed. Downloading data in 402; wherein, the number of idle nodes to be extended is equal to the number of extended new seeds;
- the idle node to be extended 404 is configured to receive an indication to download the data from the current seed, and download the data from the current seed into a new seed.
- the current seed 402 is specifically used to query a node in the network to obtain a idle node; and/or
- the current seed 402 is specifically configured to obtain a free node by querying a node in the network by using a server.
- the system for downloading data by instructing the current seed to expand the new seed, makes it possible to use the current seed to download and expand the new seed in real time, so that the number of seeds can be expanded in real time, and the number of seeds can be guaranteed.
- the idle node downloads data from the current seed into a new seed, no server Providing download data does not require additional server load; further, when instructing the current seed to expand a new seed, by indicating the current seed to expand the number of new seeds, the number of extended seeds can be limited, avoiding unrestricted expansion, and avoiding wasting network resources. .
- an embodiment of the present invention provides a node, where the node includes:
- the receiving module 501 is configured to receive an indication for extending a new seed.
- the obtaining module 502 is configured to: after receiving the indication that the new seed is extended by the receiving module 501, query the idle node around the node, and instruct the idle node to download data from the node, so that the idle node downloads the data into a new seed.
- the receiving module 501 is specifically configured to receive an indication of the number of the extended new seed and the extended new seed.
- the obtaining module 502 is specifically configured to obtain, after the receiving module 501 receives the indication of the number of the extended new seed and the extended new seed, The idle node selects the idle node to be extended from all the obtained idle nodes, and indicates that the idle node to be extended downloads data from the current seed, so that the idle node download data to be expanded becomes a new seed.
- the obtaining module 502 is specifically configured to query a node in the network to obtain a free node; and/or an obtaining module 502, which is specifically configured to obtain a free node by querying a node in the network by using a server.
- the node in the embodiment of the present invention by instructing the current seed to expand the new seed, makes it possible to use the current seed to download and expand the new seed in real time, so that the number of seeds can be expanded in real time, the number of seeds can be ensured, the download speed can be quickly increased, and the saving can be achieved.
- the download time greatly improves the user experience; and, by expanding the new seed through the current seed, the seed utilization is increased; in addition, the idle node downloads data from the current seed into a new seed, without the server providing download data, and no additional Increasing the server burden; further, when instructing the current seed to expand the new seed, by indicating the current seed to expand the number of new seeds, the number of extended seeds can be limited, avoiding unrestricted expansion, and avoiding wasting network resources.
- All or part of the technical solutions provided by the above embodiments may be implemented by software programming, and the software program is stored in a readable storage medium such as a hard disk, an optical disk or a floppy disk in a computer.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention discloses a method, an apparatus, a system and a node for downloading data, which belong to the field of computer network communications. The method includes: downloading data from current seeds and determining whether the total number of the current seeds is less than a preset threshold of the seed number; when the determination result is that the total number of the current seeds is less than the preset threshold of a seed number, instructing the current seeds to expand new seeds; obtaining information of new seeds; downloading the data from the new seeds and the current seeds at the same time. The apparatus includes: a determining module, an indicating module, a first obtaining module and a downloading module. The system includes: a node requester. The node includes: a receiving module and an obtaining module. By instructing the current seeds to expand new seeds, the invention enables new seeds to be expanded by transferring downloading of the current seeds in real time, and the number of seeds to be increased in real time, thus the number of seeds is guaranteed, the downloading speed is increased quickly, downloading time is saved and the user experience is significantly improved.
Description
下载数据的方法、 装置和系统及节点 本申请要求于 2009年 7月 21 日提交中国专利局、 申请号为 200910157629.6、 发明名 称为 "下载数据的方法、 装置和系统及节点" 的中国专利申请的优先权, 其全部内容通过 引用结合在本申请中。 Method, device and system for downloading data and nodes The present application claims to be filed on July 21, 2009 in Chinese Patent Application No. 200910157629.6, entitled "Method, Apparatus and System for Downloading Data and Nodes" Priority is hereby incorporated by reference in its entirety.
说 Say
技术领域 Technical field
本发明涉及计算机网络通信技术领域, 特别涉及一种下载数据的方法、 装置和系统及 节点。 The present invention relates to the field of computer network communication technologies, and in particular, to a method, device, system and node for downloading data.
书 Book
背景技术 Background technique
随着计算机网络通信技术的发展, 下载数据的方式在不断地进步, 下载数据的速度也 越来越快。 P2P (Peer to Peer, 点对点) 下载是目前网上流行的下载方式之一, P2P下载是 通过种子的方式进行下载, 具体过程如下: 当节点请求者 (请求下载数据的节点) 需要下 载数据时, 向服务器查询种子 (含有节点请求者需要下载的数据的节点); 服务器查询到种 子, 并向节点请求者返回种子消息; 节点请求者接收种子消息, 从种子中下载数据, 并且 种子数量越多, 节点请求者下载数据的速度就会越快。 With the development of computer network communication technology, the way to download data is constantly improving, and the speed of downloading data is getting faster and faster. P2P (Peer to Peer, peer-to-peer) download is one of the popular download methods on the Internet. P2P download is downloaded through the seed. The specific process is as follows: When the node requester (the node requesting to download data) needs to download data, The server queries the seed (the node containing the data that the node requester needs to download); the server queries the seed and returns a seed message to the node requester; the node requester receives the seed message, downloads the data from the seed, and the more the number of seeds, the node The faster the requester downloads the data.
然而在实现本发明的过程中, 发明人发现现有技术至少存在以下问题: However, in the process of implementing the present invention, the inventors have found that the prior art has at least the following problems:
现有下载数据的方法无法保证种子的数量, 当节点请求者获取到的种子数量较少时, 节点请求者很难获取较快的下载速度。 发明内容 The existing method of downloading data cannot guarantee the number of seeds. When the number of seeds obtained by the node requester is small, it is difficult for the node requester to obtain a faster download speed. Summary of the invention
为了在下载数据时, 保证种子的数量, 提高下载数据的速度, 本发明实施例提供了一 种下载数据的方法、 装置和系统及节点。 所述技术方案如下: In order to ensure the number of seeds and speed of downloading data when downloading data, the embodiment of the present invention provides a method, device, system and node for downloading data. The technical solution is as follows:
一方面, 本发明实施例提供了一种下载数据的方法, 所述方法包括: In one aspect, an embodiment of the present invention provides a method for downloading data, where the method includes:
从当前种子中下载数据, 并判断所述当前种子的总数量是否小于预设的种子数量阈值; 当判断结果是所述当前种子的总数量小于所述预设的种子数量阈值时, 指示所述当前 种子扩展新种子; Downloading data from the current seed, and determining whether the total number of the current seeds is less than a preset seed number threshold; when the determination result is that the total number of the current seeds is less than the preset seed number threshold, indicating the The current seed expands the new seed;
获取新种子的信息;
同时从所述新种子和所述当前种子中下载所述数据。 Get information about new seeds; The data is simultaneously downloaded from the new seed and the current seed.
进一步地, 所述指示所述当前种子扩展新种子之后, 还包括: Further, after the indicating that the current seed extends a new seed, the method further includes:
所述当前种子接收扩展新种子的指示; The current seed receives an indication to extend a new seed;
所述当前种子获取空闲节点, 并指示所述空闲节点从所述当前种子中下载所述数据, 使得所述空闲节点下载所述数据成为新种子。 The current seed acquires an idle node, and instructs the idle node to download the data from the current seed, so that the idle node downloads the data into a new seed.
进一步地, 所述指示所述当前种子扩展新种子具体包括: 指示所述当前种子扩展新种 子, 并指示所述当前种子扩展新种子的数量; Further, the indicating that the current seed extends a new seed specifically includes: indicating that the current seed expands a new seed, and indicating that the current seed expands a new seed;
相应地, 所述方法还包括: Correspondingly, the method further includes:
所述当前种子接收扩展新种子和扩展新种子的数量的指示; The current seed receives an indication of expanding the number of new seeds and expanding new seeds;
所述当前种子获取空闲节点, 从获取的所有空闲节点中, 选取出待扩展空闲节点, 其 中, 所述待扩展空闲节点的数量与所述扩展新种子的数量相等; The current seed acquires an idle node, and selects an idle node to be extended from among all the obtained idle nodes, wherein the number of the idle nodes to be extended is equal to the number of the extended new seeds;
所述当前种子指示所述待扩展空闲节点从所述当前种子中下载数据, 使得所述待扩展 空闲节点下载所述数据成为新种子。 The current seed instructs the to-be-expanded idle node to download data from the current seed, so that the to-be-expanded idle node downloads the data into a new seed.
进一步地, 所述当前种子获取空闲节点, 具体为: Further, the current seed acquires an idle node, specifically:
所述当前种子查询网络中的节点得到空闲节点; 和 /或 The nodes in the current seed query network get idle nodes; and/or
所述当前种子通过服务器查询网络中的节点得到空闲节点。 The current seed obtains a free node by querying a node in the network by the server.
进一步地, 所述获取新种子的信息具体为: Further, the information for acquiring the new seed is specifically:
从服务器获取新种子的信息; Obtain new seed information from the server;
或从所述当前种子获取新种子的信息; Or obtaining information of a new seed from the current seed;
或从所述新种子获取新种子的信息。 Or obtain information about the new seed from the new seed.
一方面, 本发明实施例提供了一种下载数据的装置, 所述装置包括: In one aspect, an embodiment of the present invention provides an apparatus for downloading data, where the apparatus includes:
判断模块, 用于从当前种子中下载数据, 并判断所述当前种子的总数量是否小于预设 的种子数量阈值; a determining module, configured to download data from the current seed, and determine whether the total number of the current seeds is less than a preset seed number threshold;
指示模块, 用于当所述判断模块的判断结果是所述当前种子的总数量小于所述预设的 种子数量阈值时, 指示所述当前种子扩展新种子; The indicating module, configured to: when the determining result of the determining module is that the total number of the current seeds is less than the preset seed number threshold, instructing the current seed to expand a new seed;
第一获取模块, 用于在所述指示模块指示所述当前种子扩展新种子后, 获取新种子的 信息; a first acquiring module, configured to acquire information about a new seed after the indicating module indicates that the current seed expands a new seed;
下载模块, 用于在所述第一获取模块获取新种子的信息后, 同时从所述新种子和所述 当前种子中下载所述数据。 And a downloading module, configured to download the data from the new seed and the current seed simultaneously after the first acquiring module acquires the information of the new seed.
进一步地, 所述指示模块, 还用于在指示所述当前种子扩展新种子时, 指示所述当前 种子扩展新种子的数量。
进一步地, 所述第一获取模块, 具体用于在所述指示模块指示所述当前种子扩展新种 子后, 从服务器获取新种子的信息; Further, the indication module is further configured to: when indicating that the current seed expands a new seed, instruct the current seed to expand the number of new seeds. Further, the first acquiring module is specifically configured to: after the indicating module instructs the current seed to expand a new seed, acquire information about a new seed from a server;
或所述第一获取模块, 具体用于在所述指示模块指示所述当前种子扩展新种子后, 从 所述当前种子获取新种子的信息; Or the first acquiring module is specifically configured to: after the indicating module instructs the current seed to expand a new seed, obtain information about the new seed from the current seed;
或所述第一获取模块, 具体用于在所述指示模块指示所述当前种子扩展新种子后, 从 所述新种子获取新种子的信息。 Or the first acquiring module is specifically configured to: after the indicating module instructs the current seed to expand a new seed, acquire information of the new seed from the new seed.
一方面, 本发明实施例提供了一种下载数据的系统, 所述系统包括: In one aspect, an embodiment of the present invention provides a system for downloading data, where the system includes:
节点请求者, 用于从当前种子中下载数据, 并判断所述当前种子的总数量是否小于预 设的种子数量阈值; 当判断结果是所述当前种子的总数量小于所述预设的种子数量阈值时, 指示所述当前种子扩展新种子; 获取新种子的信息; 同时从所述新种子和所述当前种子中 下载所述数据。 a node requester, configured to download data from the current seed, and determine whether the total number of the current seeds is less than a preset seed number threshold; when the judgment result is that the total number of the current seeds is less than the preset seed quantity At the threshold, the current seed is instructed to expand the new seed; the information of the new seed is obtained; and the data is simultaneously downloaded from the new seed and the current seed.
进一步地, 所述系统还包括: Further, the system further includes:
所述当前种子, 用于接收扩展新种子的指示; 获取空闲节点, 并指示所述空闲节点从 所述当前种子中下载所述数据; The current seed, configured to receive an indication of extending a new seed; acquiring a idle node, and instructing the idle node to download the data from the current seed;
所述空闲节点, 用于接收从所述当前种子中下载所述数据的指示, 从所述当前种子中 下载所述数据成为新种子。 And the idle node is configured to receive an indication that the data is downloaded from the current seed, and download the data from the current seed into a new seed.
进一步地, 所述节点请求者, 还用于在指示所述当前种子扩展新种子时, 指示所述当 前种子扩展新种子的数量; Further, the node requester is further configured to: when indicating that the current seed expands a new seed, instruct the current seed to expand the number of new seeds;
相应地, 所述系统还包括: Correspondingly, the system further comprises:
所述当前种子, 用于接收扩展新种子和扩展新种子的数量的指示; 获取空闲节点, 从 获取的所有空闲节点中, 选取出待扩展空闲节点; 指示所述待扩展空闲节点从所述当前种 子中下载所述数据; 其中, 所述待扩展空闲节点的数量与扩展新种子的数量相等; The current seed, for receiving an indication of the number of the extended new seed and the extended new seed; acquiring the idle node, selecting the idle node to be extended from all the obtained idle nodes; indicating the idle node to be extended from the current Downloading the data in the seed; wherein, the number of idle nodes to be extended is equal to the number of extended new seeds;
所述待扩展空闲节点, 用于接收从所述当前种子中下载所述数据的指示, 从所述当前 种子中下载所述数据成为新种子。 And the idle node to be extended is configured to receive an indication that the data is downloaded from the current seed, and download the data from the current seed to become a new seed.
进一步地, 所述当前种子, 具体用于查询网络中的节点得到空闲节点; 和 /或 所述当前种子, 具体用于通过服务器查询网络中的节点得到空闲节点。 Further, the current seed is specifically used to query a node in the network to obtain a idle node; and/or the current seed is specifically used to obtain a idle node by querying a node in the network by using a server.
一方面, 本发明实施例提供了一种节点, 所述节点包括: In one aspect, an embodiment of the present invention provides a node, where the node includes:
接收模块, 用于接收扩展新种子的指示; a receiving module, configured to receive an indication of expanding a new seed;
获取模块, 用于在所述接收模块接收到扩展新种子的指示后, 获取空闲节点, 并指示 所述空闲节点从所述节点中下载数据, 使得所述空闲节点下载所述数据成为新种子。 And an obtaining module, configured to: after the receiving module receives the indication of extending the new seed, acquire the idle node, and instruct the idle node to download data from the node, so that the idle node downloads the data into a new seed.
进一步地, 所述接收模块, 具体用于接收扩展新种子和扩展新种子的数量的指示;
所述获取模块, 具体用于在所述接收模块接收到扩展新种子和扩展新种子的数量的指 示后, 获取空闲节点, 从获取的所有空闲节点中, 选取出待扩展空闲节点, 指示所述待扩 展空闲节点从所述当前种子中下载所述数据, 使得所述待扩展空闲节点下载所述数据成为 新种子。 Further, the receiving module is specifically configured to receive an indication of expanding the number of new seeds and expanding the number of new seeds; The acquiring module is specifically configured to: after the receiving module receives the indication of the number of the extended new seed and the extended new seed, acquire the idle node, select the idle node to be extended from all the obtained idle nodes, and indicate the The idle node to be extended downloads the data from the current seed, so that the idle node to be extended downloads the data into a new seed.
进一步地, 所述获取模块, 具体用于查询网络中的节点得到空闲节点; 和 /或 所述获取模块, 具体用于通过服务器查询网络中的节点得到空闲节点。 Further, the acquiring module is specifically configured to query a node in the network to obtain a idle node; and/or the acquiring module is specifically configured to obtain a idle node by querying a node in the network by using a server.
本发明实施例提供的技术方案的有益效果是: The beneficial effects of the technical solutions provided by the embodiments of the present invention are:
通过指示当前种子扩展新种子, 使得可以利用当前种子实时传递下载扩展出新种子, 使得种子数量能够实时扩充, 可以保证种子的数量, 快速地提高下载速度, 节省了下载时 间, 极大地提升了用户体验; 并且, 通过当前种子扩展出新种子, 增加了种子利用率; 另 外, 空闲节点从当前种子中下载数据成为新种子, 无需服务器提供下载数据, 不需要额外 增加服务器负担; 进一步地在指示当前种子扩展新种子时, 通过指示当前种子扩展新种子 的数量, 可以限制扩展的种子的数量, 避免无限制地扩展, 避免浪费网络资源。 附图说明 By instructing the current seed to expand the new seed, it is possible to use the current seed real-time delivery download to expand the new seed, so that the number of seeds can be expanded in real time, the number of seeds can be guaranteed, the download speed can be quickly increased, the download time is saved, and the user is greatly improved. Experience; and, by the new seed to expand the new seed, increase the seed utilization; In addition, the idle node downloads data from the current seed to become a new seed, without the server providing download data, without additional server load; further indicating the current When the seed expands the new seed, by indicating the current seed to expand the number of new seeds, the number of extended seeds can be limited, avoiding unrestricted expansion, and avoiding wasting network resources. DRAWINGS
图 1是本发明实施例 1提供的 种下载数据的方法流程图; 1 is a flowchart of a method for downloading data provided by Embodiment 1 of the present invention;
图 2是本发明实施例 2提供的 种下载数据的系统架构示意图; 2 is a schematic structural diagram of a system for downloading data according to Embodiment 2 of the present invention;
图 3是本发明实施例 2提供的 种下载数据的方法流程图; 3 is a flowchart of a method for downloading data provided by Embodiment 2 of the present invention;
图 4是本发明实施例 3提供的 种下载数据的装置结构示意图; 4 is a schematic structural diagram of an apparatus for downloading data according to Embodiment 3 of the present invention;
图 5是本发明实施例 4提供的 种下载数据的系统结构示意图; FIG. 5 is a schematic structural diagram of a system for downloading data according to Embodiment 4 of the present invention; FIG.
图 6是本发明实施例 4提供的 一种下载数据的系统结构示意图; 6 is a schematic structural diagram of a system for downloading data according to Embodiment 4 of the present invention;
图 7是本发明实施例 5提供的 种节点的结构示意图。 具体实施方式 FIG. 7 is a schematic structural diagram of a node according to Embodiment 5 of the present invention. detailed description
为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本发明实施方式作 进一步地详细描述。 The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
实施例 1 Example 1
参见图 1, 本发明实施例提供了一种下载数据的方法, 该方法包括: Referring to FIG. 1, an embodiment of the present invention provides a method for downloading data, where the method includes:
101:从当前种子中下载数据,并判断当前种子的总数量是否小于预设的种子数量阈值; 102: 当判断结果是当前种子的总数量小于预设的种子数量阈值时, 指示当前种子扩展 新种子;
103: 获取新种子的信息; 101: Download data from the current seed, and determine whether the total number of current seeds is less than a preset seed number threshold. 102: When the judgment result is that the total number of current seeds is less than a preset seed quantity threshold, indicating that the current seed is expanded. seed; 103: Obtain information about the new seed;
104: 同时从新种子和当前种子中下载数据。 104: Download data from both the new seed and the current seed.
进一步地, 指示当前种子扩展新种子之后, 还包括: Further, after indicating that the current seed expands the new seed, the method further includes:
当前种子接收扩展新种子的指示; The current seed receives an indication to extend the new seed;
当前种子获取空闲节点, 并指示空闲节点从当前种子中下载数据, 使得空闲节点下载 数据成为新种子。 The current seed acquires the idle node and instructs the idle node to download data from the current seed, causing the idle node to download the data as a new seed.
进一步地, 指示当前种子扩展新种子具体包括: 指示当前种子扩展新种子, 并指示当 前种子扩展新种子的数量; Further, indicating that the current seed expands the new seed specifically includes: indicating that the current seed expands the new seed, and indicates that the current seed expands the number of new seeds;
相应地, 该方法还包括: Correspondingly, the method further comprises:
当前种子接收扩展新种子和扩展新种子的数量的指示; The current seed receives an indication of the number of new seeds to be expanded and the number of new seeds to be expanded;
当前种子获取空闲节点, 从获取的所有空闲节点中, 选取出待扩展空闲节点, 其中, 待扩展空闲节点的数量与扩展新种子的数量相等; The current seed acquires the idle node, and selects the idle node to be extended from among all the obtained idle nodes, wherein the number of idle nodes to be extended is equal to the number of extended new seeds;
当前种子指示待扩展空闲节点从当前种子中下载数据, 使得待扩展空闲节点下载数据 成为新种子。 The current seed indicates that the idle node to be extended downloads data from the current seed, so that the idle node download data to be extended becomes a new seed.
进一步地, 当前种子获取空闲节点, 具体为: Further, the current seed acquires an idle node, specifically:
当前种子查询网络中的节点得到空闲节点; 和 /或 The nodes in the current seed query network get idle nodes; and/or
当前种子通过服务器查询网络中的节点得到空闲节点。 The current seed obtains a free node by querying a node in the network through the server.
进一步地, 获取新种子的信息具体为: Further, the information for obtaining a new seed is specifically:
从服务器获取新种子的信息; Obtain new seed information from the server;
或从当前种子获取新种子的信息; Or obtaining information about new seeds from the current seed;
或从新种子获取新种子的信息。 Or get information about new seeds from new seeds.
本发明实施例所述的下载数据的方法, 通过指示当前种子扩展新种子, 使得可以利用 当前种子实时传递下载扩展出新种子, 使得种子数量能够实时扩充, 可以保证种子的数量, 快速地提高下载速度, 节省了下载时间, 极大地提升了用户体验; 并且, 通过当前种子扩 展出新种子, 增加了种子利用率; 另外, 空闲节点从当前种子中下载数据成为新种子, 无 需服务器提供下载数据, 不需要额外增加服务器负担; 进一步地在指示当前种子扩展新种 子时, 通过指示当前种子扩展新种子的数量, 可以限制扩展的种子的数量, 避免无限制地 扩展, 避免浪费网络资源。 实施例 2 The method for downloading data according to the embodiment of the present invention, by instructing the current seed to expand the new seed, makes it possible to use the current seed to download and expand the new seed in real time, so that the number of seeds can be expanded in real time, the number of seeds can be guaranteed, and the download can be quickly improved. Speed, saving download time, greatly improving the user experience; and, by the new seed to expand the new seed, increased seed utilization; In addition, the idle node downloads data from the current seed into a new seed, without the server to provide download data, There is no need to additionally increase the server burden; further, when instructing the current seed to expand the new seed, by indicating the current seed to expand the number of new seeds, the number of extended seeds can be limited, avoiding unrestricted expansion, and avoiding wasting network resources. Example 2
参见图 2,为本发明实施例提供的一种下载数据的系统架构示意图,其中节点请求者 A、
种子 1和网络中的节点(节点 1、节点 2……节点 N)分别与服务器相连,下面将结合图 2 详 细描述本发明实施例提供的下载数据的方法具体是如何下载数据的。参见图 3, 本发明实施 例提供了一种下载数据的方法, 该方法包括: FIG. 2 is a schematic structural diagram of a system for downloading data according to an embodiment of the present invention, where a node requester A, The seed 1 and the nodes in the network (node 1, node 2, and node N) are respectively connected to the server. The method for downloading data provided by the embodiment of the present invention is specifically described below with reference to FIG. Referring to FIG. 3, an embodiment of the present invention provides a method for downloading data, where the method includes:
201: 节点请求者 A需要下载数据 B, 于是向服务器查询种子 (即含有数据 B的节点) 的信息。 201: The node requester A needs to download the data B, and then queries the server for the information of the seed (ie, the node containing the data B).
具体地, 向服务器查询种子的信息, 可以通过向服务器发送查询消息进行查询, 其中 查询消息中携带节点请求者 A需要下载的数据的信息, 例如: 本实施例中节点请求者 A需 要下载数据 B, 则查询消息中携带数据 B的信息。 另外, 还可以通过现有技术中任何可行 的查询方法进行查询, 对此不做具体限定, 可以根据实际应用状况灵活选择。 Specifically, the querying the information of the seed to the server may be performed by sending a query message to the server, where the query message carries the information of the data that the node requester A needs to download, for example, the node requester A needs to download the data B in this embodiment. , the query message carries the information of the data B. In addition, the query can be performed by any feasible query method in the prior art, which is not specifically limited, and can be flexibly selected according to actual application conditions.
202: 服务器查询到种子的信息, 向节点请求者 A返回种子的信息。 202: The server queries the seed information, and returns the seed information to the node requester A.
其中, 种子的信息包括种子的标识、 种子的网络类型、 种子的 IP(Internet Protocol, 国 际互联网络通讯协定;)地址等信息。 并且如果步骤 201中节点请求者 A通过向服务器发送查 询消息进行查询, 则该步骤具体可以为: 服务器接收查询消息, 并根据查询消息查询到含 有数据 B的节点, 然后向节点请求者 A返回查询结果消息; 其中, 查询结果消息中携带服 务器查询到的种子的信息。 查询到的种子可能有很多个, 也可能只有很少的几个, 例如: 本实施例设查询到一个种子为种子 1, 但并不以此为限制。 The seed information includes the identifier of the seed, the type of the network of the seed, and the IP (Internet Protocol, International Protocol) address of the seed. And if the node requester A sends a query message to the server for querying in step 201, the step may specifically be: the server receives the query message, and queries the node containing the data B according to the query message, and then returns the query to the node requester A. The result message; wherein, the query result message carries the information of the seed queried by the server. There may be a large number of queried seeds, or there may be only a few, for example: This embodiment sets a query to a seed as seed 1, but is not limited thereto.
需要说明的是, 为了便于说明, 可以将服务器查询到的种子称为当前种子。 则相应地, 向节点请求者 A返回种子的信息即为向节点请求者 A返回当前种子的信息。 相应地, 上述 种子 1即为当前种子。 It should be noted that, for convenience of description, the seed queried by the server may be referred to as a current seed. Correspondingly, the information that returns the seed to the node requester A is the information that returns the current seed to the node requester A. Accordingly, the above seed 1 is the current seed.
203: 节点请求者 A接收当前种子的信息, 从当前种子中下载数据 B, 并判断当前种子 的总数量是否小于预设的种子数量阈值, 如果小于, 则执行 204; 否则, 执行 207。 203: The node requester A receives the information of the current seed, downloads the data B from the current seed, and determines whether the total number of the current seed is less than a preset seed number threshold. If not, performs 204; otherwise, performs 207.
其中, 当前种子的总数量即节点请求者 A得到的当前种子的个数的总和; 预设的种子 数量阈值可以根据节点请求者 A的实际情况和经验值进行设置。 例如: 本实施例设预设的 种子数量阈值为 2。 The total number of current seeds is the sum of the number of current seeds obtained by the node requester A; the preset seed quantity threshold may be set according to the actual situation and the experience value of the node requester A. For example, in this embodiment, the preset seed number threshold is 2.
需要说明的是, 节点请求者 A接收当前种子的信息后, 可以获取到当前种子的标识、 当前种子的网络类型、 当前种子的 IP地址等信息, 根据这些信息, 与当前种子建立联系, 从而从当前种子中下载数据 B。 It should be noted that, after receiving the information of the current seed, the node requester A can obtain information such as the identifier of the current seed, the network type of the current seed, and the IP address of the current seed, and according to the information, establish a contact with the current seed, thereby Download data B in the current seed.
204: 节点请求者 A指示当前种子扩展新种子。 204: Node requester A indicates that the current seed extends the new seed.
具体地, 节点请求者 A指示当前种子扩展新种子时, 可以通过向当前种子发送消息、 信号或指令的方式进行。 例如: 可以向当前种子发送扩展种子数量消息, 在扩展种子数量 消息中携带相应的标识符来传达当前种子数量不足, 无法满足节点请求者 A下载数据的要
求, 指示当前种子扩展新种子。 例如: 可以通过在扩展种子数量消息中携带 " 1 "来表示当 前种子数量不足, 指示当前种子扩展新种子; 在扩展种子数量消息中携带 "0"来表示当前 种子数量已足, 当前种子不需要扩展新种子。 对此不做具体限定, 可以根据实际应用状况 进行灵活设置。 Specifically, when the node requester A indicates that the current seed expands the new seed, it may be performed by sending a message, a signal or an instruction to the current seed. For example: The extended seed quantity message can be sent to the current seed, and the corresponding identifier is carried in the extended seed quantity message to convey that the current seed quantity is insufficient, and the node requester A cannot download the data. Ask, indicating that the current seed is expanding the new seed. For example: By carrying "1" in the extended seed quantity message, it indicates that the current seed quantity is insufficient, indicating that the current seed expands the new seed; carrying the "0" in the extended seed quantity message indicates that the current seed quantity is sufficient, and the current seed does not need Expand new seeds. This is not specifically limited, and can be flexibly set according to actual application conditions.
并且, 进一步地, 该步骤 204具体还可以是: 节点请求者 A指示当前种子扩展新种子, 并指示当前种子扩展新种子的数量, 即该步骤中节点请求者 A在指示当前种子扩展新种子 时, 节点请求者 A还可以根据当前种子的总数量、 每个当前种子自身的具体情况、 和 /或预 设的种子数量阈值的大小等, 指示每个当前种子具体扩展几个新种子。 如假设有 3 个当前 种子, 分别为第一当前种子、 第二当前种子和第三当前种子, 预设的种子数量阈值为 10, 则节点请求者 A可以根据当前种子的总数量、 每个当前种子自身的具体情况和预设的种子 数量阈值的大小, 指示第一当前种子扩展 3个新种子、 第二当前种子扩展 2个新种子、 第 三当前种子扩展 2个新种子。 需要说明的是, 对节点请求者 A指示每个当前种子具体扩展 几个新种子不做具体限定, 可以根据实际应用状况进行灵活设置。 Further, the step 204 may further specifically: the node requester A indicates that the current seed extends the new seed, and indicates the current seed to expand the number of new seeds, that is, the node requester A in this step indicates that the current seed expands the new seed. The node requester A may also indicate that each current seed specifically expands several new seeds according to the total number of current seeds, the specific condition of each current seed itself, and/or the size of a preset seed number threshold. If it is assumed that there are 3 current seeds, which are the first current seed, the second current seed, and the third current seed respectively, and the preset seed number threshold is 10, the node requester A can according to the total number of current seeds, each current The specific condition of the seed itself and the preset seed number threshold indicate that the first current seed expands 3 new seeds, the second current seed expands 2 new seeds, and the third current seed expands 2 new seeds. It should be noted that the node requester A indicates that each current seed specifically expands several new seeds without specific limitation, and can be flexibly set according to actual application conditions.
205: 当前种子接收扩展新种子的指示, 扩展新种子。 205: The current seed receives an indication to extend the new seed, expanding the new seed.
具体地, 当前种子接收扩展新种子的指示; 当前种子获取空闲节点, 并指示空闲节点 从该当前种子中下载数据 B;空闲节点接收从该当前种子中下载数据 B的指示,下载数据 B 成为新种子。 其中, 空闲节点是指该节点当前的下行数据和上行数据的总流量小于预设的 流量阀值的节点。 获取空闲节点可以是当前种子自身查询网络中的各个节点, 得到空闲节 点; 也可以服务器查询网络中的各个节点, 得到空闲节点, 当前种子再从服务器查询得到 空闲节点, 即当前种子通过服务器查询网络中的各个节点得到空闲节点。 并且指示空闲节 点从该当前种子中下载数据 B,具体可以通过向空闲节点发送消息、信号或指令的方式进行。 本实施例设节点 1和节点 2为空闲节点,则节点 1和节点 2从种子 1中下载数据 B,成为新 种子。 另外空闲节点在从当前种子中下载数据 B时, 可以设置相应的下载策略。 如下载策 略可以是每个空闲节点随机下载数据 B 的各个部分; 下载策略也可以是一部分空闲节点从 数据 B的后一部分开始下载, 一部分空闲节点从数据 B的前一部分开始下载等; 并且空闲 节点在下载数据 B时, 不一定要下载完数据 B的整个部分, 如可以设置一部分空闲节点下 载完数据 B的前二分之一部分即可停止下载, 一部分空闲节点下载完数据 B的后二分之一 部分即可停止下载等。 对下载策略不做具体限定, 可以根据实际应用状况进行灵活设置。 Specifically, the current seed receives an indication of expanding the new seed; the current seed acquires the idle node, and indicates that the idle node downloads the data B from the current seed; the idle node receives the indication of downloading the data B from the current seed, and the downloaded data B becomes new seed. The idle node refers to a node whose current downlink data and uplink data of the node are smaller than a preset traffic threshold. Obtaining a free node may be that the current seed itself queries each node in the network to obtain a free node; or the server may query each node in the network to obtain a free node, and the current seed then obtains a free node from the server, that is, the current seed queries the network through the server. Each node in the middle gets a free node. And instructing the idle node to download data B from the current seed, specifically by sending a message, signal or instruction to the idle node. In this embodiment, if node 1 and node 2 are idle nodes, node 1 and node 2 download data B from seed 1 to become a new seed. In addition, when the idle node downloads data B from the current seed, the corresponding download policy can be set. For example, the downloading strategy may be that each idle node randomly downloads various parts of the data B; the downloading strategy may also be that some idle nodes start downloading from the latter part of the data B, some idle nodes start downloading from the previous part of the data B, and the like; When downloading data B, it is not necessary to download the entire part of data B. For example, some free nodes can be set to download the first half of data B to stop downloading, and some idle nodes download the last two of data B. One part can stop downloading and so on. The download policy is not limited, and can be flexibly set according to the actual application.
并且, 进一步地, 当步骤 204具体是: 节点请求者 A指示当前种子扩展新种子, 并指 示当前种子扩展新种子的数量时, 相应地该步骤 205 具体可以是: 当前种子接收扩展新种 子和扩展新种子的数量的指示; 当前种子获取空闲节点, 从获取的所有空闲节点中, 选取
出待扩展空闲节点, 其中, 待扩展空闲节点的数量与扩展新种子的数量相等; 当前种子指 示待扩展空闲节点从该当前种子中下载数据 B;待扩展空闲节点接收从该当前种子中下载数 据 B的指示, 下载数据 B成为新种子。 需要说明的是, 实际应用中可能会存在获取的总的 空闲节点的数量小于扩展新种子的数量的情况, 这时只需要将所有空闲节点选取为待扩展 空闲节点即可。 或实际应用中可能会存在多个当前种子选取同一个空闲节点作为待扩展空 闲节点的情况, 这时可以将该同一个空闲节点作为多个当前种子中任意一个当前种子的待 扩展空闲节点, 或可以将该同一个空闲节点作为多个当前种子中符合预设的选取条件的当 前种子的待扩展空闲节点等, 对此不做具体限定, 可以根据实际应用状况设置其他任何可 行的分配方法。 并且, 待扩展空闲节点在从当前种子中下载数据 B时, 可以设置与上述空 闲节点在从当前种子中下载数据 B时类似的下载策略。 Further, when the step 204 is specifically: the node requester A indicates that the current seed expands the new seed, and indicates the current seed to expand the number of new seeds, the step 205 may specifically be: the current seed receives the extended new seed and the extension. An indication of the number of new seeds; the current seed acquires an idle node, and selects from all the idle nodes obtained The idle node is to be extended, wherein the number of idle nodes to be extended is equal to the number of extended new seeds; the current seed indicates that the idle node to be extended downloads data B from the current seed; the idle node to be extended receives data downloaded from the current seed Instructed by B, downloading data B becomes a new seed. It should be noted that, in actual applications, there may be a case where the total number of available idle nodes is smaller than the number of extended new seeds, and only all idle nodes need to be selected as the idle nodes to be extended. Or in the actual application, there may be multiple current seeds selecting the same idle node as the idle node to be extended. In this case, the same idle node may be used as the idle node to be extended by any current seed of any current seed, or The same idle node may be used as the to-be-expanded idle node of the current seed that meets the preset selection condition in the current current seed, and is not specifically limited. Any other feasible allocation method may be set according to the actual application status. Moreover, when the idle node to be extended downloads the data B from the current seed, a download policy similar to that when the idle node downloads the data B from the current seed may be set.
206: 节点请求者 A获取新种子的信息, 同时从新种子和当前种子中下载数据 B, 并判 断当前种子和新种子的总数量是否小于预设的种子数量阈值, 如果大于等于预设的种子数 量阈值, 则停止扩展种子, 从新种子和当前种子中下载数据 B, 下载完数据 B后结束。 206: The node requester A obtains the information of the new seed, and downloads the data B from the new seed and the current seed, and determines whether the total number of the current seed and the new seed is less than a preset seed number threshold, if the preset seed quantity is greater than or equal to Threshold, then stop expanding the seed, download data B from the new seed and the current seed, and end after downloading data B.
具体地, 节点请求者 A可以从服务器获取新种子的信息; 或可以从当前种子获取新种 子的信息; 或可以从新种子获取新种子的信息。 Specifically, the node requester A may acquire information of the new seed from the server; or may acquire information of the new seed from the current seed; or may acquire information of the new seed from the new seed.
需要说明的是, 各个节点与服务器之间都建立有连接关系, 当空闲节点成为新种子后, 服务器会得知该节点的最新情况, 从而可以将新种子的信息告知节点请求者 A或节点请求 者 A通过向服务器查询得到; 由于新种子是当前种子扩展得到的, 所以当前种子可以将新 种子的信息告知节点请求者 A或节点请求者 A通过向当前种子查询得到; 或者在扩展新种 子时, 将节点请求者 A的信息告知新种子, 使新种子获取到节点请求者 A的信息后, 新种 子直接将其自身的信息告知节点请求者 A。 其中节点请求者 A的信息包括节点请求者 A的 标识、 节点请求者 A的网络类型、 节点请求者 A的 IP地址等信息。 It should be noted that a connection relationship is established between each node and the server. When the idle node becomes a new seed, the server knows the latest status of the node, so that the new seed information can be notified to the node requester A or the node request. A is obtained by querying the server; since the new seed is obtained by the current seed extension, the current seed can inform the node requester A or the node requester A of the new seed information by querying the current seed; or when expanding the new seed After the information of the node requester A is notified to the new seed, and the new seed obtains the information of the node requester A, the new seed directly informs the node requester A of its own information. The information of the node requester A includes information such as the identifier of the node requester A, the network type of the node requester A, and the IP address of the node requester A.
本实施例中设新种子为节点 1和节点 2, 所以从新种子和当前种子中下载数据 B, 即从 节点 1、 节点 2和种子 1中下载数据 B。 并且, 从步骤 205可知, 节点 1、 节点 2在下载数 据 B时, 可能是随机地下载数据 B的各个组成部分; 也可能是节点 1先从数据 B的前一组 成部分开始下载, 节点 2先从数据 B的后一组成部分下载等。这样使得节点 1、节点 2能很 快地为节点请求者 A提供其还没有下载过的数据 B的组成部分, 加快节点请求者 A的下载 速度。 另外可知, 本实施例中当前种子和新种子的总数量为 3, 预设的种子数量阈值为 2, 则节点请求者 A从节点 1、 节点 2和种子 1中下载数据 B, 下载完数据 B后结束。 In this embodiment, the new seed is set to node 1 and node 2, so data B is downloaded from the new seed and the current seed, that is, data B is downloaded from node 1, node 2, and seed 1. Moreover, it can be known from step 205 that when the node 1 and the node 2 download the data B, the components of the data B may be randomly downloaded; or the node 1 may first download from the previous component of the data B, and the node 2 first Download from the next component of data B, and so on. This allows Node 1 and Node 2 to quickly provide Node Requester A with the components of Data B that it has not yet downloaded, speeding up the download speed of Node Requestor A. In addition, it can be seen that, in this embodiment, the total number of current seeds and new seeds is 3, and the preset seed number threshold is 2, then node requester A downloads data B from node 1, node 2, and seed 1, and downloads data B. After the end.
并且需要说明的是, 当该步骤的判断结果是当前种子和新种子的总数量小于预设的种 子数量阈值时, 将原来的当前种子和新种子作为新的当前种子, 节点请求者 A指示新的当
前种子再进一步地扩展新的种子。 其中, 新的当前种子再进一步地扩展新种子的过程与原 来的当前种子扩展新种子的过程类似, 此处不再赘述。 即当达不到预设的种子数量阈值时, 可以进一步地扩展新种子直到达到要求, 从而可以保证种子的数量, 提高下载数据的速度。 It should be noted that, when the judgment result of the step is that the total number of the current seed and the new seed is less than the preset seed number threshold, the original current seed and the new seed are regarded as new current seeds, and the node requester A indicates new When The pre-seed further expands the new seed. Among them, the process of further expanding the new seed by the new current seed is similar to the process of expanding the new seed by the current seed, and will not be described here. That is, when the preset seed number threshold is not reached, the new seed can be further expanded until the requirement is met, thereby ensuring the number of seeds and increasing the speed of downloading data.
207: 节点请求者 A从当前种子中下载数据 B, 下载完数据 B后结束。 207: Node requester A downloads data B from the current seed, and ends after downloading data B.
本发明实施例所述的下载数据的方法, 通过指示当前种子扩展新种子, 使得可以利用 当前种子实时传递下载扩展出新种子, 使得种子数量能够实时扩充, 可以保证种子的数量, 快速地提高下载速度, 节省了下载时间, 极大地提升了用户体验; 并且, 通过种子扩展出 新种子, 增加了种子利用率; 另外, 空闲节点从当前种子中下载数据成为新种子, 无需服 务器提供下载数据, 不需要额外增加服务器负担; 进一步地在指示当前种子扩展新种子时, 通过指示当前种子扩展新种子的数量, 可以限制扩展的种子的数量, 避免无限制地扩展, 避免浪费网络资源。 实施例 3 The method for downloading data according to the embodiment of the present invention, by instructing the current seed to expand the new seed, makes it possible to use the current seed to download and expand the new seed in real time, so that the number of seeds can be expanded in real time, the number of seeds can be guaranteed, and the download can be quickly improved. Speed, saving download time, greatly improving the user experience; and, by seed expanding new seeds, increasing seed utilization; In addition, the idle node downloads data from the current seed into a new seed, without the server providing download data, It is necessary to additionally increase the server burden; further, when instructing the current seed to expand the new seed, by indicating the current seed to expand the number of new seeds, the number of extended seeds can be limited, avoiding unrestricted expansion, and avoiding wasting network resources. Example 3
参见图 4, 本发明实施例提供了一种下载数据的装置, 该装置包括: Referring to FIG. 4, an embodiment of the present invention provides an apparatus for downloading data, where the apparatus includes:
判断模块 301, 用于从当前种子中下载数据, 并判断当前种子的总数量是否小于预设的 种子数量阈值; The determining module 301 is configured to download data from the current seed, and determine whether the total number of the current seeds is less than a preset seed number threshold;
指示模块 302,用于当判断模块 301的判断结果是当前种子的总数量小于预设的种子数 量阈值时, 指示当前种子扩展新种子; The indicating module 302 is configured to: when the judgment result of the determining module 301 is that the total number of the current seeds is less than a preset seed number threshold, instruct the current seed to expand the new seed;
第一获取模块 303, 用于在指示模块 302指示当前种子扩展新种子后, 获取新种子的信 息; The first obtaining module 303 is configured to obtain information about the new seed after the indicating module 302 indicates that the current seed extends the new seed.
下载模块 304, 用于在第一获取模块 303获取新种子的信息后, 同时从新种子和当前种 子中下载数据。 The downloading module 304 is configured to download data from the new seed and the current seed simultaneously after the first obtaining module 303 acquires the information of the new seed.
进一步地, further,
指示模块 302,还用于在指示当前种子扩展新种子时,指示当前种子扩展新种子的数量。 进一步地, The indicating module 302 is further configured to indicate the current seed to expand the number of new seeds when the current seed is expanded to indicate a new seed. further,
第一获取模块 303, 具体用于在指示模块 302指示当前种子扩展新种子后, 从服务器获 取新种子的信息; The first obtaining module 303 is specifically configured to: after the indication module 302 indicates that the current seed extends the new seed, obtain information about the new seed from the server;
或第一获取模块 303, 具体用于在指示模块 302指示当前种子扩展新种子后, 从当前种 子获取新种子的信息; Or the first obtaining module 303 is specifically configured to: after the indicating module 302 indicates that the current seed expands the new seed, acquire information of the new seed from the current seed;
或第一获取模块 303, 具体用于在指示模块 302指示当前种子扩展新种子后, 从新种子 获取新种子的信息。
本发明实施例所述的下载数据的装置, 通过指示当前种子扩展新种子, 使得可以利用 当前种子实时传递下载扩展出新种子, 使得种子数量能够实时扩充, 可以保证种子的数量, 快速地提高下载速度, 节省了下载时间, 极大地提升了用户体验; 并且, 通过当前种子扩 展出新种子, 增加了种子利用率; 另外, 空闲节点从当前种子中下载数据成为新种子, 无 需服务器提供下载数据, 不需要额外增加服务器负担; 进一步地在指示当前种子扩展新种 子时, 通过指示当前种子扩展新种子的数量, 可以限制扩展的种子的数量, 避免无限制地 扩展, 避免浪费网络资源。 实施例 4 Or the first obtaining module 303 is specifically configured to: after the indication module 302 indicates that the current seed expands the new seed, acquire information of the new seed from the new seed. The apparatus for downloading data according to the embodiment of the present invention, by instructing the current seed to expand a new seed, enables the new seed to be downloaded and expanded in real time by using the current seed, so that the number of seeds can be expanded in real time, the number of seeds can be guaranteed, and the download can be quickly improved. Speed, saving download time, greatly improving the user experience; and, by the new seed to expand the new seed, increased seed utilization; In addition, the idle node downloads data from the current seed into a new seed, without the server to provide download data, There is no need to additionally increase the server burden; further, when instructing the current seed to expand the new seed, by indicating the current seed to expand the number of new seeds, the number of extended seeds can be limited, avoiding unrestricted expansion, and avoiding wasting network resources. Example 4
参见图 5, 本发明实施例提供了一种下载数据的系统, 该系统包括: Referring to FIG. 5, an embodiment of the present invention provides a system for downloading data, where the system includes:
节点请求者 401, 用于从当前种子 402中下载数据, 并判断当前种子 402的总数量是否 小于预设的种子数量阈值; 当判断结果是当前种子 402 的总数量小于预设的种子数量阈值 时, 指示当前种子 402扩展新种子; 获取新种子的信息; 同时从新种子和当前种子 402中 下载所述数据。 The node requester 401 is configured to download data from the current seed 402, and determine whether the total number of the current seeds 402 is less than a preset seed number threshold; when the judgment result is that the total number of the current seeds 402 is less than a preset seed number threshold Instructing the current seed 402 to expand the new seed; obtaining information of the new seed; and simultaneously downloading the data from the new seed and the current seed 402.
进一步地, 该系统还包括: Further, the system further includes:
当前种子 402, 用于接收扩展新种子的指示; 获取空闲节点 403, 并指示空闲节点 403 从当前种子 402中下载数据; The current seed 402 is configured to receive an indication to extend the new seed; obtain the idle node 403, and instruct the idle node 403 to download data from the current seed 402;
空闲节点 403, 用于接收从当前种子 402中下载数据的指示, 从当前种子 402中下载数 据成为新种子。 The idle node 403 is configured to receive an indication of downloading data from the current seed 402, and download the data from the current seed 402 into a new seed.
进一步地, 节点请求者 401, 还用于在指示当前种子 402扩展新种子时, 指示当前种子 402扩展新种子的数量; Further, the node requester 401 is further configured to: when the current seed 402 is instructed to expand the new seed, instruct the current seed 402 to expand the number of new seeds;
相应地, 参见图 6, 该系统还包括: Accordingly, see Figure 6, the system also includes:
当前种子 402, 用于接收扩展新种子和扩展新种子的数量的指示; 获取空闲节点 403, 从获取的所有空闲节点 403中, 选取出待扩展空闲节点 404; 指示待扩展空闲节点 404从当 前种子 402中下载数据; 其中, 待扩展空闲节点的数量与扩展新种子的数量相等; The current seed 402 is configured to receive an indication of the number of the extended new seed and the extended new seed. The idle node 403 is obtained, and the idle node 404 to be extended is selected from all the obtained idle nodes 403; the idle node 404 to be extended is indicated from the current seed. Downloading data in 402; wherein, the number of idle nodes to be extended is equal to the number of extended new seeds;
待扩展空闲节点 404, 用于接收从所述当前种子中下载所述数据的指示, 从所述当前种 子中下载所述数据成为新种子。 The idle node to be extended 404 is configured to receive an indication to download the data from the current seed, and download the data from the current seed into a new seed.
进一步地, 当前种子 402, 具体用于查询网络中的节点得到空闲节点; 和 /或 Further, the current seed 402 is specifically used to query a node in the network to obtain a idle node; and/or
当前种子 402, 具体用于通过服务器查询网络中的节点得到空闲节点。 The current seed 402 is specifically configured to obtain a free node by querying a node in the network by using a server.
本发明实施例所述的下载数据的系统, 通过指示当前种子扩展新种子, 使得可以利用 当前种子实时传递下载扩展出新种子, 使得种子数量能够实时扩充, 可以保证种子的数量,
快速地提高下载速度, 节省了下载时间, 极大地提升了用户体验; 并且, 通过当前种子扩 展出新种子, 增加了种子利用率; 另外, 空闲节点从当前种子中下载数据成为新种子, 无 需服务器提供下载数据, 不需要额外增加服务器负担; 进一步地在指示当前种子扩展新种 子时, 通过指示当前种子扩展新种子的数量, 可以限制扩展的种子的数量, 避免无限制地 扩展, 避免浪费网络资源。 实施例 5 The system for downloading data according to the embodiment of the present invention, by instructing the current seed to expand the new seed, makes it possible to use the current seed to download and expand the new seed in real time, so that the number of seeds can be expanded in real time, and the number of seeds can be guaranteed. Quickly increase the download speed, save download time, greatly improve the user experience; and, by the new seed to expand the new seed, increase the seed utilization; In addition, the idle node downloads data from the current seed into a new seed, no server Providing download data does not require additional server load; further, when instructing the current seed to expand a new seed, by indicating the current seed to expand the number of new seeds, the number of extended seeds can be limited, avoiding unrestricted expansion, and avoiding wasting network resources. . Example 5
参见图 7, 本发明实施例提供了一种节点, 该节点包括: Referring to FIG. 7, an embodiment of the present invention provides a node, where the node includes:
接收模块 501, 用于接收扩展新种子的指示; The receiving module 501 is configured to receive an indication for extending a new seed.
获取模块 502, 用于在接收模块 501接收到扩展新种子的指示后, 查询节点周围的空闲 节点, 并指示空闲节点从节点中下载数据, 使得空闲节点下载数据成为新种子。 The obtaining module 502 is configured to: after receiving the indication that the new seed is extended by the receiving module 501, query the idle node around the node, and instruct the idle node to download data from the node, so that the idle node downloads the data into a new seed.
进一步地, 接收模块 501, 具体用于接收扩展新种子和扩展新种子的数量的指示; 获取模块 502,具体用于在接收模块 501接收到扩展新种子和扩展新种子的数量的指示 后, 获取空闲节点, 从获取的所有空闲节点中, 选取出待扩展空闲节点, 指示待扩展空闲 节点从当前种子中下载数据, 使得待扩展空闲节点下载数据成为新种子。 Further, the receiving module 501 is specifically configured to receive an indication of the number of the extended new seed and the extended new seed. The obtaining module 502 is specifically configured to obtain, after the receiving module 501 receives the indication of the number of the extended new seed and the extended new seed, The idle node selects the idle node to be extended from all the obtained idle nodes, and indicates that the idle node to be extended downloads data from the current seed, so that the idle node download data to be expanded becomes a new seed.
进一步地, 获取模块 502, 具体用于查询网络中的节点得到空闲节点; 和 /或 获取模块 502, 具体用于通过服务器查询网络中的节点得到空闲节点。 Further, the obtaining module 502 is specifically configured to query a node in the network to obtain a free node; and/or an obtaining module 502, which is specifically configured to obtain a free node by querying a node in the network by using a server.
本发明实施例所述的节点, 通过指示当前种子扩展新种子, 使得可以利用当前种子实 时传递下载扩展出新种子, 使得种子数量能够实时扩充, 可以保证种子的数量, 快速地提 高下载速度, 节省了下载时间, 极大地提升了用户体验; 并且, 通过当前种子扩展出新种 子, 增加了种子利用率; 另外, 空闲节点从当前种子中下载数据成为新种子, 无需服务器 提供下载数据, 不需要额外增加服务器负担; 进一步地在指示当前种子扩展新种子时, 通 过指示当前种子扩展新种子的数量, 可以限制扩展的种子的数量, 避免无限制地扩展, 避 免浪费网络资源。 以上实施例提供的技术方案中的全部或部分内容可以通过软件编程实现, 其软件程序 存储在可读取的存储介质中, 存储介质例如: 计算机中的硬盘、 光盘或软盘。 以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本发明的精神和原则 之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。
The node in the embodiment of the present invention, by instructing the current seed to expand the new seed, makes it possible to use the current seed to download and expand the new seed in real time, so that the number of seeds can be expanded in real time, the number of seeds can be ensured, the download speed can be quickly increased, and the saving can be achieved. The download time greatly improves the user experience; and, by expanding the new seed through the current seed, the seed utilization is increased; in addition, the idle node downloads data from the current seed into a new seed, without the server providing download data, and no additional Increasing the server burden; further, when instructing the current seed to expand the new seed, by indicating the current seed to expand the number of new seeds, the number of extended seeds can be limited, avoiding unrestricted expansion, and avoiding wasting network resources. All or part of the technical solutions provided by the above embodiments may be implemented by software programming, and the software program is stored in a readable storage medium such as a hard disk, an optical disk or a floppy disk in a computer. The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.
Claims
1、 一种下载数据的方法, 其特征在于, 所述方法包括: A method for downloading data, the method comprising:
从当前种子中下载数据, 并判断所述当前种子的总数量是否小于预设的种子数量阈值; 当判断结果是所述当前种子的总数量小于所述预设的种子数量阈值时, 指示所述当前种 子扩展新种子; Downloading data from the current seed, and determining whether the total number of the current seeds is less than a preset seed number threshold; when the determination result is that the total number of the current seeds is less than the preset seed number threshold, indicating the The current seed expands the new seed;
获取新种子的信息; Get information about new seeds;
同时从所述新种子和所述当前种子中下载所述数据。 The data is simultaneously downloaded from the new seed and the current seed.
2、根据权利要求 1所述的下载数据的方法, 其特征在于, 所述指示所述当前种子扩展新 种子之后, 还包括: The method of downloading data according to claim 1, wherein the indicating that the current seed extends a new seed further comprises:
所述当前种子接收扩展新种子的指示; The current seed receives an indication to extend a new seed;
所述当前种子获取空闲节点, 并指示所述空闲节点从所述当前种子中下载所述数据, 使 得所述空闲节点下载所述数据成为新种子。 The current seed acquires an idle node, and instructs the idle node to download the data from the current seed, so that the idle node downloads the data into a new seed.
3、根据权利要求 1所述的下载数据的方法, 其特征在于, 所述指示所述当前种子扩展新 种子具体包括: 指示所述当前种子扩展新种子, 并指示所述当前种子扩展新种子的数量; 相应地, 所述方法还包括: The method for downloading data according to claim 1, wherein the indicating that the current seed extends a new seed specifically includes: indicating that the current seed expands a new seed, and instructing the current seed to expand a new seed The method further includes:
所述当前种子接收扩展新种子和扩展新种子的数量的指示; The current seed receives an indication of expanding the number of new seeds and expanding new seeds;
所述当前种子获取空闲节点, 从获取的所有空闲节点中, 选取出待扩展空闲节点, 其中, 所述待扩展空闲节点的数量与所述扩展新种子的数量相等; The current seed acquires an idle node, and selects an idle node to be extended from among all the obtained idle nodes, where the number of the idle nodes to be extended is equal to the number of the extended new seeds;
所述当前种子指示所述待扩展空闲节点从所述当前种子中下载数据, 使得所述待扩展空 闲节点下载所述数据成为新种子。 The current seed instructs the to-be-expanded idle node to download data from the current seed, so that the to-be-expanded idle node downloads the data into a new seed.
4、根据权利要求 2或 3所述的下载数据的方法, 其特征在于, 所述当前种子获取空闲节 点, 具体为: The method for downloading data according to claim 2 or 3, wherein the current seed acquires an idle node, specifically:
所述当前种子查询网络中的节点得到空闲节点; 和 /或 The nodes in the current seed query network get idle nodes; and/or
所述当前种子通过服务器查询网络中的节点得到空闲节点。 The current seed obtains a free node by querying a node in the network by the server.
5、 根据权利要求 1-3中任意一项权利要求所述的下载数据的方法, 其特征在于, 所述获
取新种子的信息具体为: The method for downloading data according to any one of claims 1 to 3, wherein the obtaining The information for taking new seeds is specifically as follows:
从服务器获取新种子的信息; Obtain new seed information from the server;
或从所述当前种子获取新种子的信息; Or obtaining information of a new seed from the current seed;
或从所述新种子获取新种子的信息。 Or obtain information about the new seed from the new seed.
6、 一种下载数据的装置, 其特征在于, 所述装置包括: 6. An apparatus for downloading data, the apparatus comprising:
判断模块, 用于从当前种子中下载数据, 并判断所述当前种子的总数量是否小于预设的 种子数量阈值; a determining module, configured to download data from the current seed, and determine whether the total number of the current seeds is less than a preset seed number threshold;
指示模块, 用于当所述判断模块的判断结果是所述当前种子的总数量小于所述预设的种 子数量阈值时, 指示所述当前种子扩展新种子; The indicating module, configured to: when the determining result of the determining module is that the total number of the current seeds is less than the preset seed number threshold, instructing the current seed to expand a new seed;
第一获取模块, 用于在所述指示模块指示所述当前种子扩展新种子后, 获取新种子的信 息; a first acquiring module, configured to acquire information about a new seed after the indication module instructs the current seed to expand a new seed;
下载模块, 用于在所述第一获取模块获取新种子的信息后, 同时从所述新种子和所述当 前种子中下载所述数据。 And a downloading module, configured to download the data from the new seed and the current seed simultaneously after the first acquiring module acquires the information of the new seed.
7、 根据权利要求 6所述的下载数据的装置, 其特征在于, 7. The apparatus for downloading data according to claim 6, wherein:
所述指示模块, 还用于在指示所述当前种子扩展新种子时, 指示所述当前种子扩展新种 子的数量。 The indication module is further configured to: when indicating that the current seed expands a new seed, instruct the current seed to expand the number of new seeds.
8、 根据权利要求 6所述的下载数据的装置, 其特征在于, 8. The apparatus for downloading data according to claim 6, wherein:
所述第一获取模块, 具体用于在所述指示模块指示所述当前种子扩展新种子后, 从服务 器获取新种子的信息; The first obtaining module is specifically configured to: after the indicating module instructs the current seed to expand a new seed, obtain information about a new seed from a server;
或所述第一获取模块, 具体用于在所述指示模块指示所述当前种子扩展新种子后, 从所 述当前种子获取新种子的信息; Or the first obtaining module is specifically configured to: after the indicating module instructs the current seed to expand a new seed, obtain information about the new seed from the current seed;
或所述第一获取模块, 具体用于在所述指示模块指示所述当前种子扩展新种子后, 从所 述新种子获取新种子的信息。 Or the first obtaining module is specifically configured to: after the indicating module instructs the current seed to expand a new seed, acquire information of the new seed from the new seed.
9、 一种下载数据的系统, 其特征在于, 所述系统包括: 9. A system for downloading data, characterized in that the system comprises:
节点请求者, 用于从当前种子中下载数据, 并判断所述当前种子的总数量是否小于预设 的种子数量阈值; 当判断结果是所述当前种子的总数量小于所述预设的种子数量阈值时, 指
示所述当前种子扩展新种子; 获取新种子的信息; 同时从所述新种子和所述当前种子中下载 所述数据。 a node requester, configured to download data from the current seed, and determine whether the total number of the current seeds is less than a preset seed number threshold; when the judgment result is that the total number of the current seeds is less than the preset seed quantity Threshold Displaying the current seed to expand a new seed; acquiring information of the new seed; simultaneously downloading the data from the new seed and the current seed.
10、 根据权利要求 9所述的下载数据的系统, 其特征在于, 所述系统还包括: 所述当前种子, 用于接收扩展新种子的指示; 获取空闲节点, 并指示所述空闲节点从所 述当前种子中下载所述数据; The system for downloading data according to claim 9, wherein the system further comprises: the current seed, configured to receive an indication of expanding a new seed; acquiring an idle node, and indicating the idle node from the location Downloading the data in the current seed;
所述空闲节点, 用于接收从所述当前种子中下载所述数据的指示, 从所述当前种子中下 载所述数据成为新种子。 And the idle node is configured to receive an indication that the data is downloaded from the current seed, and download the data from the current seed into a new seed.
11、 根据权利要求 9所述的下载数据的系统, 其特征在于, 11. The system for downloading data according to claim 9, wherein:
所述节点请求者, 还用于在指示所述当前种子扩展新种子时, 指示所述当前种子扩展新 种子的数量; The node requester is further configured to: when indicating that the current seed expands a new seed, instructing the current seed to expand the number of new seeds;
相应地, 所述系统还包括: Correspondingly, the system further comprises:
所述当前种子, 用于接收扩展新种子和扩展新种子的数量的指示; 获取空闲节点, 从获 取的所有空闲节点中, 选取出待扩展空闲节点; 指示所述待扩展空闲节点从所述当前种子中 下载所述数据; 其中, 所述待扩展空闲节点的数量与扩展新种子的数量相等; The current seed, for receiving an indication of the number of the extended new seed and the extended new seed; acquiring the idle node, selecting the idle node to be extended from all the obtained idle nodes; indicating the idle node to be extended from the current Downloading the data in the seed; wherein, the number of idle nodes to be extended is equal to the number of extended new seeds;
所述待扩展空闲节点, 用于接收从所述当前种子中下载所述数据的指示, 从所述当前种 子中下载所述数据成为新种子。 The idle node to be extended is configured to receive an indication that the data is downloaded from the current seed, and download the data from the current seed to become a new seed.
12、 根据权利要求 10或 11所述的下载数据的系统, 其特征在于, 12. A system for downloading data according to claim 10 or 11, wherein:
所述当前种子, 具体用于查询网络中的节点得到空闲节点; 和 /或 The current seed is specifically used to query a node in the network to obtain a free node; and/or
所述当前种子, 具体用于通过服务器查询网络中的节点得到空闲节点。 The current seed is specifically used to obtain a free node by querying a node in the network by using a server.
13、 一种节点, 其特征在于, 所述节点包括: 13. A node, wherein the node comprises:
接收模块, 用于接收扩展新种子的指示; a receiving module, configured to receive an indication of expanding a new seed;
获取模块, 用于在所述接收模块接收到扩展新种子的指示后, 获取空闲节点, 并指示所 述空闲节点从所述节点中下载数据, 使得所述空闲节点下载所述数据成为新种子。 And an obtaining module, configured to: after the receiving module receives the indication of extending the new seed, acquire the idle node, and instruct the idle node to download data from the node, so that the idle node downloads the data into a new seed.
14、 根据权利要求 13所述的节点, 其特征在于, 14. The node of claim 13 wherein:
所述接收模块, 具体用于接收扩展新种子和扩展新种子的数量的指示;
所述获取模块, 具体用于在所述接收模块接收到扩展新种子和扩展新种子的数量的指示 后, 获取空闲节点, 从获取的所有空闲节点中, 选取出待扩展空闲节点, 指示所述待扩展空 闲节点从所述当前种子中下载所述数据,使得所述待扩展空闲节点下载所述数据成为新种子。 The receiving module is specifically configured to receive an indication of expanding a new seed and expanding the number of new seeds; The acquiring module is specifically configured to: after the receiving module receives the indication of the number of the extended new seed and the extended new seed, acquire the idle node, select the idle node to be extended from all the obtained idle nodes, and indicate the The idle node to be extended downloads the data from the current seed, so that the idle node to be extended downloads the data into a new seed.
15、 根据权利要求 13或 14所述的节点, 其特征在于, 15. A node according to claim 13 or 14, characterized in that
所述获取模块, 具体用于查询网络中的节点得到空闲节点; 和 /或 The obtaining module is specifically configured to query a node in the network to obtain a idle node; and/or
所述获取模块, 具体用于通过服务器查询网络中的节点得到空闲节点。
The obtaining module is specifically configured to obtain a idle node by querying a node in the network by using a server.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910157629.6 | 2009-07-21 | ||
CNA2009101576296A CN101610289A (en) | 2009-07-21 | 2009-07-21 | The methods, devices and systems of data download and node |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2011009362A1 true WO2011009362A1 (en) | 2011-01-27 |
Family
ID=41483867
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2010/074390 WO2011009362A1 (en) | 2009-07-21 | 2010-06-24 | Method, apparatus, system and node for downloading data |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN101610289A (en) |
WO (1) | WO2011009362A1 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101610289A (en) * | 2009-07-21 | 2009-12-23 | 腾讯科技(深圳)有限公司 | The methods, devices and systems of data download and node |
CN109194766B (en) * | 2018-09-26 | 2021-09-03 | 北京雷石天地电子技术有限公司 | Set top box-based P2P sharing method and system |
CN111970320B (en) * | 2020-06-30 | 2022-10-14 | 百度在线网络技术(北京)有限公司 | Control method and device for OTA data packet issuing flow |
CN113364877B (en) * | 2021-06-11 | 2022-10-11 | 北京百度网讯科技有限公司 | Data processing method, device, electronic equipment and medium |
CN116192831A (en) * | 2022-12-11 | 2023-05-30 | 南京机敏软件科技有限公司 | A fast distribution method of IDV image based on tower download |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070028133A1 (en) * | 2005-01-28 | 2007-02-01 | Argo-Notes, Inc. | Download method for file by bit torrent protocol |
CN101079766A (en) * | 2006-06-30 | 2007-11-28 | 腾讯科技(深圳)有限公司 | Method and system for constructing half-fixed P2P network |
CN101222438A (en) * | 2008-01-28 | 2008-07-16 | 北京航空航天大学 | A Data Transmission Method in Opportunistic Networks |
CN101610289A (en) * | 2009-07-21 | 2009-12-23 | 腾讯科技(深圳)有限公司 | The methods, devices and systems of data download and node |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101136911B (en) * | 2006-08-31 | 2010-12-15 | 腾讯科技(深圳)有限公司 | Method to download files using P2P technique and P2P download system |
CN1972289A (en) * | 2006-12-01 | 2007-05-30 | 华中科技大学 | Method for suppressing free rider of nodes in peer-to-peer network |
-
2009
- 2009-07-21 CN CNA2009101576296A patent/CN101610289A/en active Pending
-
2010
- 2010-06-24 WO PCT/CN2010/074390 patent/WO2011009362A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070028133A1 (en) * | 2005-01-28 | 2007-02-01 | Argo-Notes, Inc. | Download method for file by bit torrent protocol |
CN101079766A (en) * | 2006-06-30 | 2007-11-28 | 腾讯科技(深圳)有限公司 | Method and system for constructing half-fixed P2P network |
CN101222438A (en) * | 2008-01-28 | 2008-07-16 | 北京航空航天大学 | A Data Transmission Method in Opportunistic Networks |
CN101610289A (en) * | 2009-07-21 | 2009-12-23 | 腾讯科技(深圳)有限公司 | The methods, devices and systems of data download and node |
Also Published As
Publication number | Publication date |
---|---|
CN101610289A (en) | 2009-12-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103731451B (en) | A kind of method and system that file uploads | |
CN102640471B (en) | Method and apparatus for multipath communication | |
JP5223480B2 (en) | Content distribution method and communication terminal device | |
CN104519036B (en) | A kind of method and device for sending business request information | |
CN102065112B (en) | Peer-to-peer (P2P) network system and method and related device for establishing the same | |
CN111247836A (en) | Session management method, terminal device and network device | |
CN103312752B (en) | Point to point network information dispensing method, download node, index server and system | |
WO2016015582A1 (en) | Packet transmission method, apparatus and system | |
JP2007280388A (en) | Peer-to-peer file sharing system and method using downloadable data segment | |
JP2004185618A (en) | Peer to peer type content broadcast transfer mechanism | |
CN101588287B (en) | Method, device and system for scheduling and downloading peer-to-peer network data | |
CN101741750A (en) | Resource downloading method and system in P2P | |
CN109818905B (en) | Method, network element equipment and system for adapting transport layer protocol | |
US10402280B2 (en) | File transfer system and method, policy server, terminal and storage medium | |
CN105635287A (en) | File transmission system and method | |
WO2011009362A1 (en) | Method, apparatus, system and node for downloading data | |
WO2019242698A1 (en) | Network element management method, device and system | |
WO2012034414A1 (en) | Method and system for processing peer to peer (p2p) services | |
JP6643458B2 (en) | User plane gateway updating method and apparatus | |
CN100579056C (en) | A data distribution method, device and system | |
WO2012075853A1 (en) | Peer-to-peer communication method, apparatus, and system | |
CN101964741B (en) | A node list sending method and device | |
WO2012155645A1 (en) | Network startup method and system for diskless device based on peer to peer | |
WO2012167659A1 (en) | Data communication method and device in constrained application protocol | |
CN101883124A (en) | A data download method, device and system for an on-demand system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 10801921 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC OF 290512 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 10801921 Country of ref document: EP Kind code of ref document: A1 |