Quick downloading method and system fusing p2p and http mirror images

By integrating P2P and HTTP download technologies in cloud storage services and dynamically selecting and switching download methods according to resource pool parameters, the problems of multi-client download bandwidth pressure and low download efficiency in cloud storage services are solved, and fast and efficient file downloading is achieved. download.

CN118540318APending Publication Date: 2024-08-23CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410524420.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In cloud storage services, when multiple clients download the same file at the same time, the bandwidth pressure on the cloud server is too high and the download speed is slow. Moreover, existing technology cannot effectively solve the switching problem between P2P and HTTP download protocols, resulting in low download efficiency. .

Method used

Adopts a fast download system that integrates P2P and HTTP mirroring, dynamically selects the download method based on parameters such as the number of resource pool nodes, bandwidth, and file size, and supports multiple conversions of download methods during the download process. By monitoring the network interoperability between resource pools and Bandwidth changes, switching download protocols in real time to improve download efficiency.

Benefits of technology

It realizes real-time selection of HTTP and P2P download methods based on file size and node bandwidth, and dynamically switches download protocols, which significantly improves download speed, reduces server bandwidth consumption, and shortens the time complexity from O(N) to O(logN).

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540318A
    Figure CN118540318A
Patent Text Reader

Abstract

The invention discloses a quick downloading method and system for fusing p2p and http mirror images, and belongs to the field of data communication of data centers, and the system comprises a cloud storage server and a plurality of physical pools; the physical pool comprises a plurality of resource pools; distributing the mirror image file to a resource pool of each physical pool; transmitting the mirror image file in the physical pool to each resource pool; hTTP and P2P downloading are selected in real time according to the size of a downloaded file, the number of downloading users and the bandwidth between nodes, downloading modes can be dynamically switched by monitoring the change of data, and the two downloading modes are fused to achieve the optimal downloading time; the HTTP downloading mode is improved, all users completing downloading can serve as a server side to continue to provide HTTP downloading service for other users, and the time complexity is improved from O (N) to O (logN); the downloading mode is dynamically selected according to parameters such as the number of the resource pool nodes, the bandwidth and the file size, meanwhile, multiple times of downloading mode conversion is supported according to the parameter change condition in the downloading process, and the downloading efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the fields of cloud desktop technology, P2P download technology and HTTP download technology, and in particular relates to a method and system for fast downloading by integrating P2P and HTTP mirroring. Background Art

[0002] With the development of cloud computing technology, cloud storage services have become a universal storage solution for both commercial and personal applications. Since cloud storage services have the characteristics of sharing and collaboration, it is very common for users to share and download files. For example, a company uploads training courseware to the company's cloud storage service, and employees can download it by themselves according to the link. At this time, the employee, as a client, will send a request to the cloud storage server to download the same file. After receiving the request, the server starts to provide download services. The data transmission protocol in this data content distribution process generally adopts the HyperText Transfer Protocol (HTTP). At the same time, the following problems may occur during the data distribution process: a large number of clients send requests to the cloud server to download the same courseware in a short period of time, causing excessive bandwidth pressure on the cloud server and slow downloading. In view of this problem, Peer-to-Peer (P2P) transmission technology is integrated in the cloud server file distribution process, and the characteristic of data sharing between nodes in the P2P distribution system is used to reduce the server bandwidth consumption and reduce the time for employees to download files.

[0003] HTTP is a protocol designed to send content from web servers located in various parts of the world to an unspecified majority of users. In other words, HTTP can be regarded as a protocol designed to "distribute" files to an unspecified majority of users. However, HTTP downloads have a relatively large disadvantage, which is that it is difficult to solve the bandwidth pressure of a single server because they all use the traditional client-server method. P2P is peer-to-peer. Resources are not stored centrally on certain devices at the beginning, but are stored dispersedly on multiple devices, which are called peers. When you want to download a file, you only need to get the peers who already have the file and establish a point-to-point connection with these peers, without going to the central server, and you can download the file nearby. There is no central server, breaking the C / S model, and users are connected and share files. In this way, the more peer nodes participate, the faster the download speed.

[0004] The image file is stored on the server and needs to be sent to each resource pool under each physical pool. The network communication between each resource pool is as follows: Figure 1If all downloads are done using HTTP, it will take too long and will be too dependent on the server. If all downloads are done using P2P, the networks between physical pools cannot communicate, and not all peers (resource pools) can be interconnected. Only resource pools under one physical pool can be interconnected to share files. In view of this scenario, a solution that integrates HTTP download and P2P download has emerged. The number of resource pools in a physical pool is not fixed, some may have one, and some may have more than a dozen, and the bandwidth is not equal. Whether to use HTTP download or P2P between each physical pool requires comprehensive consideration of factors.

[0005] For this scenario, fusion download still has the following problems.

[0006] How to switch between the two download protocols to achieve fast download goals. Summary of the invention

[0007] The technical problem to be solved by the present invention is to provide a method and system for fast downloading by integrating p2p and http mirrors in view of the shortcomings of the background technology. The download mode is dynamically selected according to the number of resource pool nodes, bandwidth, file size and other parameters, and the download mode is supported to be converted multiple times according to the parameter changes during the download process, thereby improving the download efficiency.

[0008] The present invention adopts the following technical solutions to solve the above technical problems:

[0009] A fast download system integrating p2p and http images comprises a cloud storage service end and multiple physical pools; the cloud storage service end and the multiple physical pools are respectively connected; wherein the physical pool comprises multiple resource pools; the resource pools under the physical pool can access the server cloud storage, and all resource pools in the physical pool are interconnected through the network;

[0010] Specifically include:

[0011] (1) Image files are distributed to a resource pool in each physical pool;

[0012] (2) The image file in the physical pool is transferred to each resource pool.

[0013] As a further preferred solution of the present invention that integrates p2p and http image fast download systems, image files are distributed to a resource pool of each physical pool, specifically as follows: each physical pool selects a resource pool as a download node, and the download nodes of each physical pool queue up for downloading.

[0014] As a further preferred solution of the present invention that integrates p2p and http image fast download systems, the image files under the physical pool are transmitted to each resource pool: the resource pool that downloads the image files is used as the server, and the other resource pools are used as clients. The time for HTTP download and P2P download is calculated in the following way, and the method with shorter time is selected for download.

[0015] As a further preferred solution of the present invention that integrates p2p and http mirror fast download system, the HTTP download solution is as follows:

[0016] If the resource pool chooses HTTP download, a tree structure improvement solution is used for downloading. Each resource pool that has completed downloading can serve as a server and continue to provide downloads for other resource pools, instead of only allowing the first resource pool to provide downloads, shortening the overall download time complexity from O(N) to O(logN).

[0017] As a further preferred solution of the present invention for integrating p2p and http mirror fast download system, the improved HTTP download process is described as follows:

[0018] Step 1: The first resource pool that the physical pool downloads from the server storage is used as the service node. It selects one from other resource pools that have not downloaded the image to download and waits for the image download to be completed. This is the first round of downloads, and only one resource pool is downloading;

[0019] Step 2: If there are resource pools under the physical pool that have not downloaded the image, proceed to step 3; otherwise, proceed to step 4;

[0020] Step 3: The downloaded resource pool acts as a service node, selects the same number of undownloaded resource pools as client downloads, and waits for the download to complete. Assuming this is the Nth round of downloads, the number of resource pools being downloaded simultaneously is 2N, and then proceed to step 2;

[0021] Step 4, downloading is complete.

[0022] As a further preferred solution of the present invention for integrating the p2p and http mirror fast download system, the difference between the P2P download time and the HTTP download time is calculated: the estimation method of the P2P download time is:

[0023]

[0024] Among them, T P2P It represents the minimum time required to distribute a file of size F to L download nodes. The minimum time depends on the download speed of the slowest node d min , the average value of the bandwidth equally divided among the L download nodes and the minimum value of the upload bandwidth of each child node.

[0025] As a further preferred solution of the present invention that integrates the p2p and http mirror fast download system, P2P downloading will have additional time overhead, including preprocessing of the seed file by the download node and additional overhead in the download stage.

[0026] As a further preferred solution of the present invention that integrates p2p and http mirror fast download system, the download node will upload data to other nodes. Once there is no new file segment to provide, the upload will be interrupted, and other nodes will look for the node that has this file segment again; for the additional download overhead, the parameter η is introduced,

[0027]

[0028] Where N is the number of copies of the downloaded image file, k represents the number of connections owned by the download node. For large files, η is close to 1. The P2P download time estimation formula applicable to both large and small files is:

[0029]

[0030] Wherein, u'(I)=u(S)+ηu(L) represents the mixed upload bandwidth of all nodes.

[0031] As a further preferred solution of the present invention for integrating the p2p and http mirror fast download system, the time benefit is calculated as follows:

[0032] HTTP download time T HTTP The following statement is used to indicate:

[0033]

[0034] The time benefit formula is defined as follows:

[0035] G(T)=T HTTP –T P2P (5)

[0036] A method for implementing a fast image download system based on the integration of p2p and http, in which the first resource pool that downloads the image file in a physical pool acts as a server, and other resource pools act as clients;

[0037] Each resource pool will deploy a monitoring program to monitor whether the network between nodes is interconnected and whether the upload and download bandwidth between nodes changes. The monitoring time interval is configurable and the integrated download solution is as follows:

[0038] Step a, collecting image file download bandwidth, number of resource pools under the physical pool, and file size in real time;

[0039] Step b, calculate the download time benefit G of the resource pool by formula 5, if G is greater than 0, proceed to step c→step d, otherwise proceed to step e;

[0040] Step c, the resource pool that has downloaded the image file from the cloud storage terminal generates a seed file and transmits the seed file, and each resource pool receives the seed file;

[0041] Step d, the resource pool parses the seed file and starts the BT service to perform P2P download of the image file, and then proceeds to step f;

[0042] Step e, performing HTTP download using the improved tree structure scheme, and then proceeding to step f;

[0043] Step f, real-time monitoring of whether there is any change in the bandwidth size between resource pools, and whether there is any addition or reduction of resource pool nodes. If there is any change, repeat step 1 to dynamically switch the download mode; if there is no change, proceed to step e;

[0044] Step e, image download is complete, end.

[0045] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:

[0046] 1. The present invention is aimed at file downloading. It selects HTTP and P2P downloading in real time according to the size of the downloaded file, the number of downloading users, and the bandwidth between nodes. It can also dynamically switch the downloading mode by monitoring the changes in data, and integrate the two downloading modes to achieve the optimal downloading time.

[0047] 2. The present invention improves the HTTP download method. Users who have completed downloading can continue to provide HTTP download services to other users as a server, and the time complexity is improved from O(N) to O(logN). BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0049] Figure 1 It is a network architecture diagram of the system of the present invention;

[0050] Figure 2 This is a schematic diagram of downloading using a tree structure improvement scheme of the present invention;

[0051] Figure 3 This is the overall process of the system fusion download solution of the present invention. DETAILED DESCRIPTION

[0052] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings:

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. The present invention is described in detail below based on the drawings and preferred embodiments, and the purpose and effect of the present invention will become clearer. It should be understood that the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.

[0054] Glossary

[0055] HTTP (HyperText Transfer Protocol): is an application layer protocol for transferring hypermedia documents (such as HTML). It is designed for communication between web browsers and web servers, but can also be used for other purposes. HTTP follows the classic client-server model, where the client opens a connection to make a request and then waits until a response is received from the server.

[0056] P2P (Peer to Peer): In layman's terms, terminal devices such as mobile phones and computers can act as a node to communicate and interact with other nodes. P2P technology is not like traditional computer network technology, and a central server is not necessary. P2P technology allows people to interact directly through the Internet, and each terminal acts as both a server and a client, that is, a terminal. That is, it can provide services to other terminals, such as transmitting videos to others, and can also obtain resources on other terminals.

[0057] Figure 1 This is the network architecture diagram of this system. Each resource pool under a physical pool can access the server cloud storage. All resource pools in the physical pool are interconnected, but the network between physical pools is not connected. There will be a resource pool under the physical pool that downloads the image file from the cloud storage. This resource pool will serve as the server under the current physical pool, and other resource pools will download the image from this resource pool.

[0058] 1. Image files are distributed to a resource pool of each physical pool:

[0059] 1) Each physical pool selects a resource pool as a download node. Since the cloud storage bandwidth and performance are limited, the download nodes of each physical pool queue up for downloading.

[0060] 2. Transfer the image file in the physical pool to each resource pool:

[0061] The resource pool for downloading image files is used as the server, and other resource pools are used as clients. The time for HTTP download and P2P download is calculated as follows, and the method with shorter download time is selected for download.

[0062] 2.1HTTP download solution:

[0063] If the resource pool selects HTTP download, the tree structure improvement solution is used for downloading, such as Figure 2 , each resource pool that has completed downloading can serve as a server and continue to provide downloads for other resource pools, instead of only allowing the first resource pool to provide downloads, shortening the overall download time complexity from O(N) to O(logN). The improved HTTP download process is described as follows.

[0064] Step 1 The first resource pool downloaded from the server storage in the physical pool is used as the service node. It selects one from other resource pools that have not downloaded the image for downloading and waits for the image download to be completed. This is the first round of downloads, and only one resource pool is downloading.

[0065] If there are resource pools under the physical pool in step 2 that have not downloaded the image, proceed to step 3; otherwise, proceed to step 4.

[0066] Step 3: The downloaded resource pool is used as the service node, and the same number of undownloaded resource pools are selected as the client download, waiting for the download to complete. Assuming that this is the Nth round of download, the number of resource pools downloaded at the same time is 2 N . Then proceed to step 2.

[0067] Step 4: Download is complete.

[0068] 2.2 Calculate the difference between P2P download and HTTP download time:

[0069] Table 1 defines the relevant parameters:

[0070] Table 1

[0071] parameter definition F Download image file size u bandwidth S Resource pool node collection for downloaded image files L All resource pool nodes that request downloads I A collection of all resource pool nodes <![CDATA[u i ]]> Resource pool node upload speed <![CDATA[d i ]]> Resource pool node download speed <![CDATA[d min ]]> The slowest resource pool node download speed

[0072] The estimation method of P2P download time is:

[0073]

[0074] Among them, T P2P It represents the minimum time required to distribute a file of size F to L download nodes. The minimum time depends on the download speed of the slowest node d min , the average value of the bandwidth equally divided among the L download nodes and the minimum value of the upload bandwidth of each child node.

[0075] P2P downloading will have extra time overhead, mainly including the pre-processing of seed files by the downloading node and the extra overhead of the downloading stage. The downloading node will upload data to other nodes. Once there is no new file segment to provide, the upload will be interrupted and other nodes will search for the node with this file segment again. For the extra download overhead, the parameter η is introduced.

[0076]

[0077] Where N is the number of copies of the downloaded image file, and k is the number of connections the download node has. For large files, η is close to 1, but for small files, such as 10MB, when the number of connections is 2, the formula calculates η to be 0.707, indicating that the probability that the node does not download the target file from those nodes that are not blocked is about 30%. Based on the above situation, the P2P download time estimation formula applicable to both large and small files is:

[0078]

[0079] Wherein u'(I)=u(S)+ηu(L) represents the mixed upload bandwidth of all nodes.

[0080] 2.2 Calculate time benefits:

[0081] HTTP download time T HTTP It mainly depends on the slowest resource pool, or is limited by the upload bandwidth of the seed node divided equally among L resource pools. At the same time, each resource pool can be used as a server after downloading, which increases the time complexity. Therefore, T HTTP It can be expressed as follows:

[0082]

[0083] Finally, the time benefit formula is defined as follows:

[0084] G(T)=T HTTP –T P2P (5)

[0085] 3. The overall implementation process of this system solution:

[0086] In a physical pool, the first resource pool that downloads the image file acts as the server, and the other resource pools act as clients.

[0087] Each resource pool will deploy a monitoring program to monitor whether the network between nodes is interconnected and whether the upload and download bandwidth between nodes has changed. The monitoring time interval can be configured. For example, if it is set to 2 minutes, the number of online resource pool nodes and bandwidth size will be calculated every two minutes and compared with the last time to see if there is any change. The overall process of this system fusion download solution is as follows Figure 3 , the steps are as follows.

[0088] Step 1: The algorithm starts to collect image file download bandwidth, number of resource pools under the physical pool, file size, etc. in real time.

[0089] Step 2 calculates the download time benefit G of the resource pool by formula (5). If G is greater than 0, proceed to step 3→step 4; otherwise, proceed to step 5.

[0090] Step 3: The resource pool that has downloaded the image file from the cloud storage terminal generates a seed file and transmits the seed file, and each resource pool receives the seed file.

[0091] Step 4: The resource pool parses the seed file and starts the BT service to perform P2P download of the image file, and then proceeds to step 6.

[0092] Step 5 performs HTTP download using the improved tree structure scheme, and then proceeds to step 6.

[0093] Step 6 monitors in real time whether the bandwidth between resource pools has changed, whether resource pool nodes have been added or reduced, and if there is a change, repeat step 1 to dynamically switch the download mode. If there is no change, proceed to step 7.

[0094] Step 7: Image download is complete.

[0095] The present invention is aimed at file downloading. It selects HTTP and P2P downloads in real time according to the size of the downloaded file, the number of downloading users, and the bandwidth between nodes. It can also dynamically switch the download mode by monitoring the changes in data, and integrate the two download modes to achieve the optimal download time. The HTTP download mode is improved, and users who have completed the download can continue to provide HTTP download services to other users as the server. The time complexity is improved from O(N) to O(logN).

[0096] Those skilled in the art can understand that the above are only preferred examples of the invention and are not intended to limit the invention. Although the invention is described in detail with reference to the above examples, those skilled in the art can still modify the technical solutions recorded in the above examples or replace some of the technical features with equivalents. Any modification, equivalent replacement, etc. made within the spirit and principle of the invention should be included in the protection scope of the invention. All technical features in this embodiment can be freely combined according to actual needs.

[0097] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A fast download system integrating p2p and http mirror, characterized in that: It includes a cloud storage service end and multiple physical pools; the cloud storage service end and the multiple physical pools are connected respectively; wherein the physical pool includes multiple resource pools; the resource pools under the physical pool can access the server cloud storage, and all resource pools in the physical pool are interconnected through the network; Specifically include: (1) Image files are distributed to a resource pool in each physical pool; (2) The image file in the physical pool is transferred to each resource pool.

2. A fast download system integrating p2p and http mirroring according to claim 1, characterized in that: The image file is distributed to a resource pool of each physical pool, as follows: each physical pool selects a resource pool as a download node, and the download nodes of each physical pool queue for downloading.

3. A fast download system integrating p2p and http mirroring according to claim 1, characterized in that: Transfer the image file from the physical pool to each resource pool: The resource pool that downloads the image file is used as the server, and the other resource pools are used as clients. The HTTP download and P2P download times are calculated as follows, and the method with the shorter download time is selected for download.

4. A fast download system integrating p2p and http mirror according to claim 3, characterized in that: The HTTP download scheme is as follows: If the resource pool chooses HTTP download, a tree structure improvement solution is used for downloading. Each resource pool that has completed downloading can serve as a server and continue to provide downloads for other resource pools, instead of only allowing the first resource pool to provide downloads, shortening the overall download time complexity from O(N) to O(logN).

5. A fast download system integrating p2p and http mirroring according to claim 4, characterized in that: The improved HTTP download process is described as follows: Step 1: The first resource pool that the physical pool downloads from the server storage is used as the service node. It selects one from other resource pools that have not downloaded the image to download and waits for the image download to be completed. This is the first round of downloads, and only one resource pool is downloading; Step 2: If there are resource pools under the physical pool that have not downloaded the image, proceed to step 3; otherwise, proceed to step 4; Step 3: The downloaded resource pool is used as the service node, and the same number of undownloaded resource pools are selected as the client download, and the download is completed. Assuming that this is the Nth round of download, the number of resource pools downloaded at the same time is 2. N , then proceed to step 2; Step 4, downloading is complete.

6. A fast download system integrating p2p and http mirroring according to claim 5, characterized in that: Calculate the difference between P2P download and HTTP download time: The estimation method of P2P download time is: Among them, T P2P It represents the minimum time required to distribute a file of size F to L download nodes. The minimum time depends on the download speed of the slowest node d min , the average value of the bandwidth equally divided among the L download nodes and the minimum value of the upload bandwidth of each child node.

7. A fast download system integrating p2p and http mirroring according to claim 6, characterized in that: P2P downloading will incur additional time overhead, including the pre-processing of seed files by the downloading node and additional overhead in the downloading phase.

8. A fast download system integrating p2p and http mirroring according to claim 7, characterized in that: The downloading node will upload data to other nodes. Once there is no new file segment to provide, the upload will be interrupted and other nodes will look for the node that has this file segment again. For the additional download overhead, the parameter η is introduced. Where N is the number of copies of the downloaded image file, k represents the number of connections owned by the download node. For large files, η is close to 1. The P2P download time estimation formula applicable to both large and small files is: Wherein, u'(I)=u(S)+ηu(L) represents the mixed upload bandwidth of all nodes.

9. A fast download system integrating p2p and http mirroring according to claim 8, characterized in that: Calculate the time benefit as follows: HTTP download time T HTTP The following statement is used to indicate: The time benefit formula is defined as follows: G(T)=T HTTP -T P2P (5)。 10. A method for implementing the integrated p2p and http mirror fast download system according to any one of claims 1 to 9, characterized in that: In a physical pool, the first resource pool that downloads the image file acts as the server, and the other resource pools act as clients; Each resource pool will deploy a monitoring program to monitor whether the network between nodes is interconnected and whether the upload and download bandwidth between nodes changes. The monitoring time interval is configurable and the integrated download solution is as follows: Step a, collecting image file download bandwidth, number of resource pools under the physical pool, and file size in real time; Step b, calculate the download time benefit G of the resource pool by formula 5, if G is greater than 0, proceed to step c→step d, otherwise proceed to step e; Step c, the resource pool that has downloaded the image file from the cloud storage terminal generates a seed file and transmits the seed file, and each resource pool receives the seed file; Step d, the resource pool parses the seed file and starts the BT service to perform P2P download of the image file, and then proceeds to step f; Step e, performing HTTP downloading with an improved tree structure scheme, and then proceeding to step f; Step f, real-time monitoring of whether there is any change in the bandwidth size between resource pools, and whether there is any addition or reduction of resource pool nodes. If there is any change, repeat step 1 to dynamically switch the download mode; if there is no change, proceed to step e; Step e, image download is complete, end.

Citation Information

Cited By

  • Mirror image storage scheduling method and system based on resource popularity

    CN119814761A