File downloading method and system
By merging small-scale edge computer rooms in the virtual machine room and using the same machine room return operation, the high bandwidth cost and miss rate problems caused by frequent upstream return of small-scale edge computer rooms are solved, and the user download speed is improved.
Patent Information
- Application Number
- CN202510533003.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-08
AI Technical Summary
In the prior art, frequent upstream return of small-scale edge computer rooms leads to high bandwidth costs and high miss rates, affecting user download speed.
Combine multiple small-scale edge computer rooms to build a virtual machine room. By determining the target node in the virtual machine room for upstream or the same computer room return operation, reduce the number of upstream source return times, and use the low bandwidth cost of returning to the same computer room to download files.
It reduces the number of upstream return times and bandwidth costs of the system as a whole, reduces the miss rate, and improves the download speed of users.
Smart Images

Figure CN120455445A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a file downloading method and system. Background Art
[0002] A video CDN (Content Delivery Network) is a CDN system that provides video services, including storage, synchronization, back-to-source, scheduling, and video file parsing. A video download request initiated by a user on a client is dispatched to a designated server in an edge data center to download the file. After receiving the download request, if the server does not store the video file locally, it must retrieve the file from an upstream node and return it to the client, storing the file locally. If the upstream node does not have the file either, it must request the file from the upstream node's upstream node. This method is called upstream back-to-source.
[0003] The scale of edge data centers in the system is relatively flexible. In actual applications, due to cost considerations, some data centers may only have a few servers. These small data centers have fewer servers and, accordingly, relatively less disk cache space. When the disks are full, the stored files are eliminated. For popular video files, due to the large number of users, they are frequently dispatched to servers in various edge data centers for download. For small data centers with few servers, this leads to frequent elimination and upstream backhaul, resulting in excessively high bandwidth costs, affecting user download speeds and miss rates. Therefore, reducing server bandwidth costs and miss rates, and increasing user download speeds, is a problem that needs to be solved. Summary of the Invention
[0004] In view of this, the present application aims to propose a file downloading method to reduce the bandwidth cost and miss rate of the server and improve the download speed of the user.
[0005] To achieve the above objectives, the technical solutions of this application are as follows:
[0006] In a first aspect, an embodiment of the present application provides a file download method, which is applied to any server in a virtual machine room; the virtual machine room is constructed based on at least two edge machine rooms; and the servers in the virtual machine room are neighbor servers of each other; the method comprises:
[0007] When any server in the virtual machine room receives a download request for a target file from a client, detecting whether the target file is stored locally;
[0008] If the target file is not stored locally, determining a target node in the virtual machine room that needs to store the target file; the target node is the server, or a neighboring server of the server;
[0009] In the case where the target node is the server, the server obtains the target file from an upstream node and stores it locally, in response to download requests for the target file from the client and the neighboring server; the upstream node is a node in a content distribution network upstream of the virtual machine room, and the target file is stored in the content distribution network;
[0010] In a case where the target node is a neighboring server of the server, the server obtains the target file from the neighboring server to respond to the client's download request for the target file.
[0011] According to a second aspect of an embodiment of the present application, a file download method is provided. The method is applied to a computer room management module, comprising:
[0012] Obtain information about all edge computer rooms whose number of servers is less than a first threshold, to obtain a first set;
[0013] Eliminate edge data centers from the first set if the bandwidth cost of returning to the source from the same data center is not lower than the bandwidth cost of returning to the source from the upstream data center.
[0014] For each edge computer room in the first set, other edge computer rooms whose distance to the edge computer room is less than a second threshold are considered as neighboring computer rooms;
[0015] Clustering the edge computer rooms in the first set based on each edge computer room and the corresponding adjacent computer rooms to obtain multiple subsets; wherein each subset includes at least two edge computer rooms;
[0016] Constructing a virtual room in the method provided in the first aspect of the embodiment of the present application based on each subset;
[0017] Synchronize node information of neighboring servers to servers in each virtual room, and send configuration information of each virtual room to the scheduling module, so that the scheduling module selects an available server from the virtual room according to the configuration information of each virtual room to respond to the download request sent by the client; the configuration information of the virtual room includes: location information and node information of each server.
[0018] According to a third aspect of an embodiment of the present application, a file download method is provided, which is applied to a scheduling module, including:
[0019] At a first time interval, obtaining configuration information of the virtual machine room in the method provided in the first aspect of the embodiment of the present application, including: location information and node information of the server in the virtual machine room;
[0020] In response to a download request from a client, obtaining a download frequency of a corresponding target file according to the download request;
[0021] According to the download frequency, determining whether the target file is a hot file or a cold file;
[0022] If the target file is a cold file, determining a target node of the target file in the virtual machine room according to configuration information of the virtual machine room; using the target node as an available server, and returning node information of the available server to the client;
[0023] In the case that the target file is a hot file, an available server is designated from the virtual machine room in a polling manner according to the configuration information of the virtual machine room, and the node information of the available server is returned to the client.
[0024] According to a fourth aspect of an embodiment of the present application, a file download system is provided, comprising: an operation and maintenance module, a computer room management module, a scheduling module, a content distribution network, a client, and at least one virtual computer room; the content distribution network serves as an upstream node of the virtual computer room and stores the target file;
[0025] The operation and maintenance module is used to obtain configuration information of each edge computer room and send it to the same computer room management module; the configuration information of the edge computer room includes: location information of the edge computer room and node information of each server in the edge computer room;
[0026] The same computer room management module is used to execute the steps of the method provided in the second aspect of the embodiment of the present application to build a virtual computer room; the virtual computer room includes multiple servers; wherein each server is deployed with a back-to-source module;
[0027] The back-to-source module is configured to execute the steps of the method provided in the first aspect of the embodiment of the present application;
[0028] The scheduling module is used to execute the steps of the method provided in the third aspect of the embodiment of the present application;
[0029] The client is used to send a download request to the corresponding server according to the node information of the available server returned by the scheduling module.
[0030] Using the file download method provided in this application, when any server in the virtual machine room receives a download request, the back-to-source module in the server detects whether the corresponding target file is stored locally. If the target file is not stored locally, the target file is obtained through an upstream back-to-source operation or a back-to-source operation in the same machine room.
[0031] Specifically, when the target file is not stored locally, the only node (i.e., the target node) in the current virtual machine room where the target file needs to be stored is first determined. The target node may be the server itself or a neighboring server of the server. If it is the target node itself, the server performs an upstream back-to-source operation, requests the target file from the content distribution network upstream of the virtual machine room, and stores it locally. In this embodiment, the content distribution network stores a large number of different target files to meet the user's personalized download needs. Therefore, after storing the target file locally, the server will be able to respond to download requests for the target file from the client or other neighboring servers, and will need to obtain the file from the upstream content distribution network of the virtual machine room.
[0032] If the target node is a neighboring server, the server performs a local back-to-source operation, requesting the target file from the neighboring server. If the neighboring server already has the target file locally, it can directly return the file without performing an upstream back-to-source operation. If the target file does not exist locally, an upstream back-to-source operation is required, requesting the target file from a node in the upstream content distribution network.
[0033] Therefore, for the download request of the target file, the virtual machine room where the server is located only needs to perform an upstream back-to-source operation at most once to obtain the target file.
[0034] In the traditional solution, when the server in each edge computer room receives a download request for the target file, if none of the servers in the edge computer room stores the target file, it is necessary to request the target file from the upstream content distribution network. Since there are many small-scale edge computer rooms, the upstream back-to-source in the network is very frequent. This application combines multiple small computer rooms to build a virtual computer room, so that the virtual computer room provides services to the outside world as a whole. For a download request for a target file, the target file can be obtained by performing an upstream back-to-source operation at most once with the virtual computer room as a whole, and stored in the target node. When a download request for the target file is subsequently received, the download request is routed to the target node in the virtual computer room through the same computer room back-to-source operation, and the target node provides the locally stored target file without the need for an upstream back-to-source. Since the bandwidth cost of the same computer room back-to-source is much lower than the bandwidth cost of the upstream back-to-source, compared to the traditional solution in which multiple small-scale edge computer rooms perform upstream back-to-source to provide download services, this application can greatly reduce the number of upstream back-to-sources of the entire server in the network by building a virtual computer room, reduce the bandwidth cost and miss rate of the server, and improve the download speed of users.
[0035] In addition, since the number of servers in a virtual computer room is greater than that in a single small computer room, the overall disk cache space of the virtual computer room is correspondingly larger than that of a single small computer room. As a result, the disk can store more files, the frequency of disk elimination is reduced, and the number of upstream return to the source is further reduced, thereby improving the user's download speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0037] Figure 1 This is one of the flow charts of the file downloading method proposed in one embodiment of the present application;
[0038] Figure 2 This is a flowchart of downloading a target file in one embodiment of the present application;
[0039] Figure 3 This is a partial flow chart of downloading a large file in one embodiment of the present application;
[0040] Figure 4 This is the second flowchart of the file downloading method proposed in one embodiment of the present application;
[0041] Figure 5 This is the third flowchart of the file downloading method proposed in one embodiment of the present application;
[0042] Figure 6 It is a schematic diagram of a file downloading system in one embodiment of the present application. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0044] It should be understood that references throughout this specification to "one embodiment" or "an embodiment" mean that a particular feature, structure, or characteristic associated with the embodiment is included in at least one embodiment of the present application. Therefore, the appearances of "in one embodiment" or "in an embodiment" throughout this specification do not necessarily refer to the same embodiment. Furthermore, these particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0045] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0046] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with certain aspects as detailed herein.
[0047] It should be noted that, unless there is any conflict, the embodiments and features in the embodiments of this application can be combined with each other.
[0048] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments.
[0049] Figure 1 This is a flowchart of a file download method proposed in one embodiment of the present application. This method is applied to any server in a virtual machine room; the virtual machine room is constructed based on at least two edge machine rooms; and each server in the virtual machine room is a neighboring server. Figure 1 As shown, the method includes:
[0050] S11: When any server in the virtual room receives a download request for a target file from a client, detecting whether the target file is stored locally;
[0051] S12: If the target file is not stored locally, determining a target node in the virtual machine room that needs to store the target file; the target node is the server, or a neighboring server of the server;
[0052] S13: When the target node is the server, the server obtains the target file from an upstream node and stores it locally, in response to download requests for the target file from the client and the neighboring server; the upstream node is a node in a content distribution network upstream of the virtual machine room, and the target file is stored in the content distribution network;
[0053] S14: In a case where the target node is a neighboring server of the server, the server obtains the target file from the neighboring server to respond to the client's download request for the target file.
[0054] In this embodiment, a virtual computer room is constructed based on at least two edge computer rooms, replacing a single, smaller edge computer room with a single virtual computer room to provide file download services. A back-to-source module is deployed on the servers in the virtual computer room. When a local server receives a request to download a target file, it first checks whether the target file is stored locally. If so, the file is directly returned to the requester.
[0055] If the target file is not stored locally, the target node that needs to provide the target file is further determined in the virtual machine room to which it belongs. The target node is the local server or another neighboring server in the virtual machine room. If the target node is determined to be the local server, an upstream back-to-source operation is performed to obtain the target file and return it to the requester; if the target node is determined to be a neighboring server, a same-machine-room back-to-source operation is performed to obtain the target file through the neighboring server and return it to the requester. The neighboring server may already store the target file, in which case there is no need to perform an upstream back-to-source operation; if the neighboring server does not store the target file, the neighboring server will perform an upstream back-to-source operation to obtain the target file. In other words, after performing at most one upstream back-to-source operation, the target node will store the target file locally.
[0056] This embodiment aggregates multiple edge data centers with fewer servers into a virtual data center. Within the virtual data center, only one target node performs upstream back-to-source operations for the same target file, storing the target file locally. Subsequent downloads of the target file require only back-to-source operations within the same data center to retrieve the stored target file from the target node.
[0057] Compared with the traditional solution, this embodiment saves a lot of upstream return source costs in the system by merging multiple edge computer rooms into a larger virtual computer room. For example, a virtual computer room is built based on 10 edge computer rooms. When the target file does not exist in the computer room, each requested small-scale edge computer room in the traditional solution, as a whole, needs to perform one upstream return source to obtain the target file from the content distribution network, that is, the upstream return source cost of the entire system is 10 times. However, this solution takes the virtual computer room as a whole and only needs to perform one upstream return source to obtain the target file from the content distribution network, which greatly reduces the number of upstream return sources for the entire system. Since the bandwidth cost of returning to the source in the same computer room within the virtual computer room is much lower than the bandwidth cost of returning to the source upstream to the upstream node, compared with the traditional file download method of frequently returning to the source upstream in a small-scale edge computer room, this application greatly reduces the number of upstream return sources for the entire system, thereby reducing bandwidth costs, reducing the miss rate (i.e., server cache miss rate) through returning to the source in the same computer room, and improving the user's download speed.
[0058] As an implementation manner of the present application, the step S12 of "determining a target node in the virtual machine room that needs to store the target file" includes:
[0059] S121: Detect whether the request header of the download request contains a back-to-source identifier; if the request header contains the back-to-source identifier, determine itself as the target node;
[0060] S122: When the request header of the download request does not include a back-to-source identifier, determine a corresponding target node in the virtual machine room according to the file identifier of the target file.
[0061] In one embodiment, the request header of the download request received by the local server is used to determine whether the requester is a neighboring server. In this embodiment, when the server performs a return to source in the same computer room, it adds a return to source identifier to the request header of the download request and then forwards the download request to the target node. Optionally, part of the http request header is added to the request header of the download request as a return to source identifier. When the server receives the download request, it first checks the request header of the download request. If it finds that the request header contains a return to source identifier, it means that the download request is a download request sent by a neighboring server for return to source in the same computer room, that is, the server itself is the target node of the target file.
[0062] If the download request header does not contain a back-to-source identifier, it indicates that the download request was sent by the client. Further determination of the target node in the current virtual machine room for storing (and providing download access to) the target file is necessary based on the target file's file identifier. In this embodiment, the target node for each target file stores the target file and responds to download requests for that target file from all servers in the virtual machine room.
[0063] For example, when server A is the target node of the target file, server A stores the target file locally and responds to download requests for the target file sent by other neighboring servers in the virtual room (such as server B, server C) and the client.
[0064] Optionally, the target node is determined by a file URI (Uniform Resource Identifier). Based on the file identifier of the target file, a corresponding target node is matched in the virtual machine room. The specific method is described below.
[0065] As an implementation manner of the present application, each server in the virtual machine room has a corresponding hash value; and the step S122 of "determining the corresponding target node in the virtual machine room according to the file identifier of the target file" includes:
[0066] S1221: Calculate a consistent hash based on the file identifier of the target file to obtain a hash result;
[0067] S1222: Match the hash result with the hash value corresponding to each virtual machine room to determine the target node corresponding to the target file.
[0068] In one embodiment, consistent hashing is used to determine the target node. Servers in the virtual room cache files according to the consistent hashing and provide download services to users. For the same target file, a consistent hash is calculated based on the file identifier to obtain a hash result. Based on this hash result, a unique server in the virtual room is identified as the target node for providing the target file. Each server in the virtual room that can serve as a target node is associated with a hash value.
[0069] In this embodiment, when the requesting party is a client, the file identification URI of the target file is obtained from the download request, and a consistent hash is calculated based on the file identification to determine the target node in the virtual machine room. Specifically, a consistent hash calculation is performed on the URI of the target file, and the obtained hash result is matched with the hash value corresponding to each server in the virtual machine room to determine the target node where the target file needs to be stored. In this embodiment, the hash value of the server and the hash result obtained by calculating the file identification of the target file are mapped together to a hash ring connected end to end through a consistent hash algorithm. Based on the position of the hash result of the target file on the hash ring, a hash value that can determine the nearest distance is searched along a fixed direction of the hash ring. Then, the server corresponding to the hash value is determined as the target node of the target file.
[0070] If the target node is itself, it performs an upstream retrieval operation, sending a file request to a node in the content distribution network upstream of the virtual machine room (the upstream node). It retrieves the target file from the upstream node, returns it to the client, and stores it locally. If the target node is a neighboring server, it performs a same-machine-room retrieval operation, sending a file request to the target node, obtaining the target file from the target node, and returning it to the client.
[0071] As an embodiment of the present application, in step S13 above, “the server obtains the target file from the upstream node and stores it locally to respond to the download request of the client and the neighboring server for the target file” includes:
[0072] S131: The server forwards the download request to the upstream node, receives the target file returned by the upstream node, and stores it locally;
[0073] S132: Returning the locally stored target file to the client;
[0074] S133: When receiving a download request for the target file from a neighboring server, returning the locally stored target file to the neighboring server.
[0075] In one embodiment, the local server, as the target node, does not store the target file. Therefore, the target file is retrieved and stored locally through an upstream back-to-source operation. Specifically, the received download request is forwarded to an upstream node in the content distribution network, which requests the target file from the content distribution network. The target file is received and stored locally after being returned by the upstream node.
[0076] The target file is then returned to the requester along the original path along which the download request was received. Specifically, if the requester is a neighboring server, the target node returns the target file to the neighboring server, which then returns the target file to the client. If the requester is a client, the target node returns the target file to the client.
[0077] As an implementation manner of the present application, in the above step S14, “the server obtains the target file from the neighboring server to respond to the client's download request for the target file” includes:
[0078] S141: The server adds a back-to-source identifier to the request header of the download request and forwards the download request to the neighboring server, so that the neighboring server identifies itself as the target node based on the back-to-source identifier and performs the following operations: returning the locally stored target file according to the forwarding path of the download request; or obtaining the target file from the upstream node and storing it locally, and returning the target file according to the forwarding path of the download request;
[0079] S142: The server receives the target file returned by the neighboring server, and returns it to the client.
[0080] In one embodiment, a neighboring server is identified as the target node. Therefore, the server performs a same-datacenter retrieval operation, adds a retrieval identifier to the download request header, and forwards the download request with the retrieval identifier to the neighboring server. Upon detecting the retrieval identifier in the download request, the neighboring server determines that the download request is a same-datacenter retrieval request. For the receiving server of the download request, upon detecting the retrieval identifier in the download request, it determines itself as the target node for storing the target file.
[0081] When a neighboring server receives a download request from the same data center, if the target file is stored locally, it will directly return it along the original path of the download request; if the target file is not stored locally, it will perform an upstream return operation, obtain the target file from the upstream node, store it locally, and return it along the original path of the download request.
[0082] Figure 2 This is a flowchart of downloading target files in one embodiment of the present application. Figure 2 As shown, when any server receives a download request, it first determines whether the target file is stored locally. If the target file is stored, it directly returns the target file to the requester.
[0083] If the target file does not exist locally, the server determines whether the requester is a neighboring server or a client. If the requester is a neighboring server (i.e., the request is a return-to-origin request within the same computer room), the server determines itself as the target node, performs an upstream return-to-origin operation, obtains the target file from an upstream node in the upstream content distribution network of the virtual computer room, and returns the target file to the requester.
[0084] If the requester is a client, a consistent hash is calculated to determine the target node within the virtual machine room that needs to store the target file. If the target node is itself, an upstream retrieval operation is performed, obtaining the target file from the upstream node and returning the target file to the requester. If the target node is a neighboring server, a same-machine-room retrieval operation is performed, obtaining the target file from the target node and returning the target file to the requester.
[0085] As an implementation manner of the present application, the step S122 of “determining a corresponding target node in the virtual machine room according to the file identifier of the target file” includes:
[0086] S1221′: Based on the download request, obtain the capacity of the target file;
[0087] S1222′: Compare the capacity of the target file with a block threshold, and if the capacity of the target file is greater than or equal to the block threshold, determine that the target file is a large file;
[0088] S1223′: if the target file is a large file, split the target file into multiple file blocks, and assign a file identifier to each file block according to the order of splitting;
[0089] S1224′: Take each file block as a new target file, calculate the consistent hash based on the file identifier of each file block, and obtain a hash result;
[0090] S1225′: Match the hash result of each file block with the hash value corresponding to each virtual machine room to determine the target node corresponding to each file block.
[0091] Large files occupy more disk space than small files. In traditional file download solutions, storing large files in edge data centers with fewer servers further squeezes the storage space for small files, exacerbating the frequent disk obsolescence. To address this, one embodiment divides large files into chunks and stores them in virtual data centers, evenly utilizing the disks of each server and preventing frequent disk obsolescence on some servers.
[0092] Figure 3 This is a partial flow chart of downloading large files in one embodiment of the present application. Figure 3As shown, if it is determined that the download requester is a client, a further determination is made as to whether the target file is a large file. Specifically, the download request is parsed to obtain the storage capacity occupied by the target file. In this embodiment, the download request includes the file identifier of the target file and information about the storage capacity occupied by the target file. This storage capacity is compared with a block threshold to determine whether the target file is a large file. If the storage capacity occupied by the target file is greater than or equal to the block threshold, the target file is determined to be a large file.
[0093] In the case where the target file is a large file, the target file is segmented into multiple file blocks according to the preset segmentation configuration, and a corresponding file identifier is assigned to each file block in the order of segmentation. Each file block is regarded as a new target file, and the target node corresponding to each file block is determined. Optionally, a consistent hash is calculated based on the file identifier of the file block to determine the target node corresponding to each file block. For example, the server receives a large file request (such as an occupied storage capacity greater than 200M), and according to the preset segmentation configuration, the target file is segmented into file blocks of a fixed size (such as 2M), and then file identifiers (such as uri_1, uri_2...) are assigned to the file blocks in the order of segmentation. The consistent hash is calculated based on the file identifier of each file block (such as uri_1) to obtain the corresponding hash result. The hash result of each file block is matched with the hash value corresponding to each server in the virtual machine room to determine the target node corresponding to each file block.
[0094] Each file block is individually backed to its source based on its corresponding target node. For each file block, if the target node is the server currently being requested by the client, that server performs an upstream back-to-source operation, requesting the file block from an upstream node in the content distribution network upstream of the virtual machine room. If the target node is a neighboring server, the server performs a same-machine-room back-to-source operation, requesting the file block from the target node within the virtual machine room.
[0095] Then, for each file block, perform an upstream return-to-source operation or a return-to-source operation in the same computer room to obtain the corresponding file block. For each file block, perform at most one upstream return-to-source operation, and the file block can be stored in the server cache of the virtual computer room. If a target node caches multiple file blocks, the target node will cache different file blocks on different local disks. For each large file, the server records meta information while storing the file block, so that it is convenient to find the storage location of the file block by reading the meta information later. After each target node caches the file block obtained from the upstream return-to-source locally, it returns the cached file block to the server requested by the client along the original path according to the forwarding path of the download request, and the server finally returns the complete target file to the client.
[0096] In this embodiment, by dividing large files into blocks, different file blocks are distributed to multiple servers for back-to-source and caching, thereby reducing the load and disk pressure of a single server, balancing disk IO (Input / Output), reducing the frequency of disk elimination, and improving the overall download efficiency of the virtual machine room.
[0097] As an implementation manner of the present application, before the step S122 of "determining a corresponding target node in the virtual machine room according to the file identifier of the target file", the following steps are further included:
[0098] S122-1: Obtain the current load of each neighboring server in the virtual room;
[0099] S122-2: Compare the current load of each neighbor server with a load threshold. If the current load is less than the load threshold, select the corresponding neighbor server as a candidate server.
[0100] S123-3: Assign a corresponding hash value to each candidate server.
[0101] In one embodiment, server load is taken into consideration when determining the target node to which the target file should be provided. First, the current load of each neighboring server in the virtual room is obtained, and servers with current loads below a load threshold are selected as candidate servers. When determining the target node, the target node is selected from the candidate servers.
[0102] In this embodiment, when determining the target node, candidate servers for use as target nodes are screened by monitoring the current load of each server, improving the flexibility of back-to-source. Servers with a current load greater than or equal to the load threshold are eliminated from consideration as candidate target nodes for the target file. This prevents server downtime caused by excessive load in the virtual room, ensuring the security and stability of the virtual room.
[0103] As an implementation manner of the present application, in the case where "the target node is a neighboring server of the server" in the above step S14, the following is further included:
[0104] S151: Obtaining the download frequency of the target file according to the download request;
[0105] S152: Determine whether the target file is a hot file or a cold file based on the download frequency;
[0106] S153: If the target file is a hot file, after obtaining the target file from the neighbor server, the target file is stored locally.
[0107] Among the video files, the number of viewers of popular videos is large, but the data of popular videos is relatively small. The number of viewers of unpopular videos is small, but the number of videos is relatively large, showing a long-tail distribution. Since the number of views and download requests for popular videos is large, in order to speed up the download speed of users, in one embodiment, after the server performs the same-machine-room back-to-source operation to obtain the target file from the neighboring server, the hotness of the target file is judged. For hot files (for example: popular videos), the hot files are stored in the local disk so that when a client request is received later, the files can be returned directly from the local cache, saving the bandwidth cost of the same-machine-room back-to-source and improving the user's download speed. For cold files (for example, unpopular videos), they are only stored in the target node and are not cached in other servers in the virtual machine room, thereby saving the disk space of the virtual machine room as much as possible, so as to cache more hot files with higher download frequencies, while reducing the frequency of disk elimination and saving bandwidth costs.
[0108] Optionally, when the target file is a hot file, each server on the path from the target node back to the client stores a copy of the target file locally, thereby ensuring that each server on the path can directly return the target file from the local cache when receiving a download request sent by the client.
[0109] As an implementation manner of the present application, in the case where "the target node is a neighboring server of the server" in the above step S14, the following is further included:
[0110] S151′: acquiring the download frequency of the target file according to the download request;
[0111] S152': judging whether the target file is a hot file or a cold file according to the download frequency;
[0112] S153': If the target file is a hot file, compare its own remaining disk space with a first disk placement threshold, and compare its own miss rate with a second disk placement threshold;
[0113] S154′: If the remaining disk space is greater than the first disk placement threshold and the miss rate is greater than the second disk placement threshold, after obtaining the target file from the neighboring server, the target file is stored locally.
[0114] In one embodiment, after a local server performs a same-data-center back-to-source operation and obtains a target file from a neighboring server, it determines the target file's hotness or coldness. If the target file is a hot file, the local server's remaining disk space and miss rate are further considered. If the local server has less remaining disk space and a low miss rate, the hot file is not stored to ensure sufficient disk space and avoid frequent disk decommissioning. If the local server has more remaining disk space and a high miss rate, the hot file is stored to reduce the miss rate.
[0115] In this embodiment, the remaining disk space and miss rate of the current server are considered before storing hot data, thereby balancing the miss rate and disk elimination frequency of the server and improving the overall performance of the server.
[0116] Based on the same inventive concept, an embodiment of the present application provides a file downloading method, which is applied to the same computer room management module. Figure 4 This is the second flowchart of the file download method proposed in one embodiment of the present application. Figure 4 , the method comprising:
[0117] S21: Obtain information of all edge computer rooms whose number of servers is less than a first threshold, to obtain a first set;
[0118] S22: Eliminate edge data centers whose bandwidth cost back to the source in the same data center is not lower than the bandwidth cost back to the source upstream from the first set;
[0119] S23: For each edge computer room in the first set, consider other edge computer rooms whose distance to the edge computer room is less than a second threshold as neighboring computer rooms;
[0120] S24: Clustering the edge computer rooms in the first set based on each edge computer room and the corresponding adjacent computer rooms to obtain multiple subsets; wherein each subset includes at least two edge computer rooms;
[0121] S25: constructing a virtual room as mentioned in the above embodiment based on each subset;
[0122] S26: Synchronize node information of neighboring servers to servers in each virtual room, and send configuration information of each virtual room to the scheduling module, so that the scheduling module selects an available server from the virtual room according to the configuration information of each virtual room to respond to the download request sent by the client; the configuration information of the virtual room includes: location information and node information of each server.
[0123] In this embodiment, an edge computer room is a small data center deployed at the edge of a content delivery network, close to users and devices. The edge computer room provides low-latency and high-efficiency services to users nearby. For example, for the edge computer room of a video CDN, the edge computer room provides the download service of client video files nearby. Through the same-computer-room management module, a virtual computer room is constructed based on multiple small-scale edge computer rooms. The specific steps are as follows:
[0124] (1) Obtain the information of all edge computer rooms with the number of servers less than the first threshold to obtain the first set. The information of the edge computer room includes: the physical location of the edge computer room and the node information of the servers in the computer room; assume that there are n edge computer rooms in the first set, and each edge computer room has M1, M2... Mn servers. If the first threshold is k, then filter out the edge computer rooms with the number of servers M <k to obtain the first set;
[0125] (2) Obtain the outgoing bandwidth cost and incoming bandwidth cost of each computer room in the first set. Among them, the outgoing bandwidth cost represents the bandwidth cost of performing the same-computer-room origin return operation, and the incoming bandwidth cost represents the bandwidth cost of performing the upstream origin return operation. Assume that in the first set, the outgoing bandwidth costs of the edge computer rooms are C1, C2... C n (unit: yuan per Gb / s), and the incoming bandwidth costs are C p1 、C p2 ...C pn (unit: yuan per Gb / s). Remove the edge computer rooms with the outgoing bandwidth cost not less than the incoming bandwidth cost (i.e., C[[ID=~17]] j ≥C pj ) from the first set;
[0126] (3) According to the physical distance between the edge computer rooms in the first set, screen out the neighboring computer rooms of each edge computer room. Assume that the distance between two edge computer rooms (such as computer room 1 and computer room 2) is D 1,2 (unit: kilometers). Two computer rooms with a distance less than the distance threshold are called neighboring computer rooms. For any computer room m, at least one computer room n can be confirmed to satisfy D m,n <J. For example, when the distance threshold is J, if D 1,2 <J, then computer room 1 and computer room 2 are neighboring computer rooms;
[0127] (4) Based on the neighboring computer rooms of the edge computer rooms in the first set, use the clustering algorithm to divide the first set into several subsets, and construct virtual computer rooms based on each subset. The clustering algorithm can select the K-Means algorithm, the Bi-Kmeans algorithm, etc. Optionally, in actual applications, according to actual needs, one or more virtual computer rooms are constructed for each subset;
[0128] (5) After the virtual room is built, the node information (such as IP address, etc.) of each server in the virtual room is broadcast to all neighboring servers in the same virtual room. That is, each server knows the node information of its virtual neighbors. In addition, the configuration information of each virtual room (including the location information of the edge server and the node information of the server) is notified to the scheduling module, so that the scheduling module can schedule the download request sent by the client to the corresponding server based on the configuration information of the virtual room.
[0129] As an implementation of the present application, after the step S25 of "building a virtual room based on each subset", the following steps are further included:
[0130] S27: When any server in the virtual room goes offline, the node information of the offline server is removed from the node information stored in the remaining servers in the virtual room, and the scheduling module is notified so that the scheduling module performs the following steps: updating the stored configuration information of the virtual room according to the received node information of the offline server; and selecting an available server from the virtual room based on the updated configuration information to respond to the download request sent by the client;
[0131] S28: When there is a new server in the virtual room, the node information of the new server is synchronized to all neighboring servers in the virtual room, and the scheduling module is notified so that the scheduling module performs the following steps: updating the stored configuration information of the virtual room according to the received node information of the new server; selecting an available server from the virtual room based on the updated configuration information to respond to the download request sent by the client.
[0132] In one embodiment, the same computer room management module also dynamically monitors the server status of each virtual computer room. If a server in the virtual computer room goes offline, the node information of the offline server is removed from the node information recorded by all neighboring nodes, and the scheduling module is notified. If a new server is added to the virtual computer room (for example, a new server is added, or a server that has been offline comes back online), the node information of the new server is synchronized with all neighboring nodes, and the scheduling module is notified.
[0133] By dynamically monitoring the server status in each virtual room, neighboring servers and scheduling modules can be notified in a timely manner to ensure business stability.
[0134] Based on the same inventive concept, an embodiment of the present application provides a file downloading method, which is applied to a scheduling module. Figure 5 This is the third flowchart of the file download method proposed in one embodiment of the present application. Figure 5 , the method comprising:
[0135] S31: acquiring configuration information of the virtual machine room as mentioned in the above embodiment at a first time interval, including location information and node information of servers in the virtual machine room;
[0136] S32: Responding to a download request from the client, obtaining a download frequency of the corresponding target file according to the download request;
[0137] S33: judging whether the target file is a hot file or a cold file according to the download frequency;
[0138] S34: If the target file is a cold file, determine a target node of the target file from the virtual machine room according to the configuration information of the virtual machine room; use the target node as an available server, and return the node information of the available server to the client;
[0139] S35: When the target file is a hot file, according to the configuration information of the virtual machine room, an available server is specified from the virtual machine room in a polling manner, and the node information of the available server is returned to the client.
[0140] In this embodiment, a scheduling module dispatches download requests sent by clients to the corresponding virtual room and available servers. The scheduling module continuously synchronizes the location and node information of servers in each virtual room at a first time interval, thereby ensuring efficient and stable download services for the client. After the client sends a download request for a target file to the scheduling module, the scheduling module determines the download frequency of the target file based on the download request and determines the popularity of the target file. Furthermore, based on the configuration information of the virtual room, the scheduling module allocates an available server to the download request and dispatches the download request to the corresponding available server.
[0141] In this embodiment, due to the high download frequency of hot files, the scheduling module uses a round-robin approach to determine servers in the virtual room and assign available servers to hot file download requests. This balances the load across servers and improves the overall download performance of the virtual room. For example, when receiving two download requests for the hot file "KK," the scheduling module returns the node information to the client as "Server A in Virtual Room 1" and "Server B in Virtual Room 1," respectively.
[0142] For cold files, due to their low download frequency, the scheduling module directly identifies the target node corresponding to the cold file as an available server based on the cold file's file identifier and returns the corresponding node information to the client. Based on this node information, the client directly sends a download request to the target node for the cold file, enabling faster file retrieval and saving bandwidth costs back to the source within the same data center. For example, when receiving two download requests for the cold file "MM," the scheduling module returned the node information "Server D in Virtual Data Center 1" to the client.
[0143] Optionally, both the scheduling module and the virtual room's back-to-source module use consistent hashing to determine the target node corresponding to the target file. The client sends a download request for the target file to the scheduler. The scheduler obtains the user's location information based on the download request, selects an appropriate virtual room based on the user's location information, and then calculates a consistent hash based on the target file's file identifier to select the target node.
[0144] Based on the same inventive concept, an embodiment of the present application provides a file downloading system. Figure 6 Schematic diagram of a file download system in one embodiment of the present application. Figure 6 As shown, the system includes: an operation and maintenance module, a computer room management module, a scheduling module, a content distribution network, a client, and at least one virtual computer room; the content distribution network serves as an upstream node of the virtual computer room and stores the target file;
[0145] The operation and maintenance module is used to obtain configuration information of each edge computer room and send it to the same computer room management module; the configuration information of the edge computer room includes: location information of the edge computer room and node information of each server in the edge computer room;
[0146] The same computer room management module is used to execute the steps of the method described in the above embodiment to build a virtual computer room; the virtual computer room includes multiple servers; wherein each server is deployed with a back-to-source module;
[0147] The back-to-source module is used to execute the steps in the method described in the above embodiment;
[0148] The scheduling module is used to execute the steps of the method described in the above embodiment;
[0149] The client is used to send a download request to the corresponding server according to the node information of the available server returned by the scheduling module.
[0150] In this embodiment, the file download system includes an operation and maintenance module, a computer room management module, a scheduling module, a content distribution network (self-built CDN or commercial CDN), a client, and at least one virtual computer room.
[0151] The operation and maintenance module is used to obtain the configuration information of the edge computer room, such as the location of the computer room, the number of servers, etc., and send it to the management module of the same computer room.
[0152] The same-room management module builds a virtual room based on the edge room configuration information, synchronizes the virtual room configuration information with the back-to-source modules of each server in the virtual room, and notifies the scheduling module. Furthermore, the same-room management module monitors the online and offline status of servers, the dynamic addition and removal of small edge rooms within the virtual room, and synchronizes the virtual room configuration information with the scheduling module at a first time interval.
[0153] The virtual machine room is composed of multiple small edge rooms, such as Figure 6 As shown, virtual machine room 1 includes four servers (servers A, B, C, and D), which belong to two edge machine rooms (edge machine room 1 and edge machine room 2). Servers A and B belong to edge machine room 1, while servers C and D belong to edge machine room 2. Each server is deployed with a back-to-source module, which stores node information for all neighboring servers. The back-to-source module is responsible for reading files from disk and delivering them to users. If the file is a block, the back-to-source module needs to read the meta file to determine which disk the file is located on. If the target file is not stored locally, the back-to-source module performs an upstream back-to-source operation or a back-to-source operation within the same machine room.
[0154] The scheduling module receives virtual room configuration information from the room management module and responds to download requests from clients, returning information about currently available servers. Furthermore, the scheduling module schedules download requests for hot files using a round-robin approach, and schedules download requests for cold files (i.e., regular files) using consistent hashing, based on the popularity of the target files.
[0155] The content delivery network can be a commercial CDN or a self-built CDN, which is used as the upstream node of the virtual machine room. When the server in the virtual machine room performs an upstream back-to-source operation, the content delivery network, as the upstream node, returns the target file corresponding to the download request to the server in the virtual machine room.
[0156] When downloading a target file, the client first sends a download request to the scheduling module, receives the node information of the available server returned by the scheduling module, and requests the corresponding server to download the target file based on the node information.
[0157] Regarding the system in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0158] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
[0159] For the sake of simplicity, the method embodiments are described as a series of action combinations. However, those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and components involved are not necessarily required by this application.
[0160] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0161] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0162] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0163] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0164] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the underlying inventive concepts. Therefore, this application is intended to include the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0165] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.
[0166] The above is a detailed introduction to the file download method and system provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. At the same time, for those skilled in the art, according to the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present application.
Claims
1. A file downloading method, characterized in that: Applicable to any server in the virtual machine room; The virtual computer room is constructed based on at least two edge computer rooms; The servers in the virtual machine room are neighbor servers to each other; the method includes: When any server in the virtual machine room receives a download request for a target file from a client, detecting whether the target file is stored locally; If the target file is not stored locally, determining a target node in the virtual machine room that needs to store the target file; the target node is the server, or a neighboring server of the server; In the case where the target node is the server, the server obtains the target file from an upstream node and stores it locally, in response to download requests for the target file from the client and the neighboring server; the upstream node is a node in a content distribution network upstream of the virtual machine room, and the target file is stored in the content distribution network; In a case where the target node is a neighboring server of the server, the server obtains the target file from the neighboring server to respond to the client's download request for the target file.
2. The file downloading method according to claim 1, wherein: The server obtains the target file from the upstream node and stores it locally to respond to the download request of the client and the neighbor server for the target file, including: The server forwards the download request to the upstream node, receives the target file returned by the upstream node, and stores the target file locally; Returning the locally stored target file to the client; When a download request for the target file is received from a neighboring server, the locally stored target file is returned to the neighboring server.
3. The file downloading method according to claim 1, wherein: The server obtains the target file from a neighboring server to respond to the client's download request for the target file, including: The server adds a back-to-source identifier to the request header of the download request and forwards the download request to the neighboring server, so that the neighboring server identifies itself as the target node based on the back-to-source identifier and performs the following operations: returning the locally stored target file according to the forwarding path of the download request; or obtaining the target file from the upstream node and storing it locally, and returning the target file according to the forwarding path of the download request; The server receives the target file returned by the neighboring server and returns it to the client.
4. The file downloading method according to claim 3, wherein: Determining a target node in the virtual machine room where the target file needs to be stored includes: Detecting whether the request header of the download request contains a back-to-source identifier; if the request header contains the back-to-source identifier, determining itself as the target node; In a case where the request header of the download request does not include a back-to-source identifier, a corresponding target node is determined in the virtual machine room according to the file identifier of the target file.
5. The file downloading method according to claim 4, characterized in that: Each server in the virtual machine room has a corresponding hash value; Determining a corresponding target node in the virtual machine room according to the file identifier of the target file includes: Calculate a consistent hash based on the file identifier of the target file to obtain a hash result; The hash result is matched with the hash value corresponding to each virtual machine room to determine the target node corresponding to the target file.
6. The file downloading method according to claim 4, characterized in that: Determining a corresponding target node in the virtual machine room according to the file identifier of the target file includes: Based on the download request, obtaining the capacity of the target file; Comparing the capacity of the target file with a block threshold, and if the capacity of the target file is greater than or equal to the block threshold, determining that the target file is a large file; If the target file is a large file, the target file is segmented into a plurality of file blocks, and a file identifier is assigned to each file block in the order of segmentation; Treat each file block as a new target file, calculate the consistent hash based on the file identifier of each file block, and obtain the hash result; The hash result of each file block is matched with the hash value corresponding to each virtual room to determine the target node corresponding to each file block.
7. The file downloading method according to claim 4, characterized in that: Before determining the corresponding target node in the virtual machine room according to the file identifier of the target file, the method further includes: Obtaining the current load of each neighbor server in the virtual machine room; Compare the current load of each neighbor server with a load threshold, and if the current load is less than the load threshold, use the corresponding neighbor server as a candidate server; Assign a corresponding hash value to each candidate server.
8. The file downloading method according to any one of claims 1 to 7, characterized in that: In the case where the target node is a neighboring server of the server, the method further includes: Obtaining a download frequency of the target file according to the download request; According to the download frequency, determining whether the target file is a hot file or a cold file; If the target file is a hot file, after obtaining the target file from the neighbor server, the target file is stored locally.
9. The file downloading method according to any one of claims 1 to 7, characterized in that: In the case where the target node is a neighboring server of the server, the method further includes: Obtaining a download frequency of the target file according to the download request; According to the download frequency, determining whether the target file is a hot file or a cold file; If the target file is a hot file, the remaining disk space thereof is compared with a first disk placement threshold, and the miss rate thereof is compared with a second disk placement threshold; If the remaining disk space is greater than the first disk placement threshold and the miss rate is greater than the second disk placement threshold, the target file is stored locally after being obtained from the neighboring server.
10. A file downloading method, characterized in that: Applicable to the same computer room management module, including: Obtain information about all edge computer rooms whose number of servers is less than a first threshold, to obtain a first set; Eliminate edge data centers from the first set if the bandwidth cost of returning to the source from the same data center is not lower than the bandwidth cost of returning to the source from the upstream data center. For each edge computer room in the first set, other edge computer rooms whose distance to the edge computer room is less than a second threshold are considered as neighboring computer rooms; Clustering the edge computer rooms in the first set based on each edge computer room and the corresponding adjacent computer rooms to obtain multiple subsets; wherein each subset includes at least two edge computer rooms; Constructing a virtual room according to any one of the methods of claims 1 to 9 based on each subset; Synchronize node information of neighboring servers to servers in each virtual room, and send configuration information of each virtual room to the scheduling module, so that the scheduling module selects an available server from the virtual room according to the configuration information of each virtual room to respond to the download request sent by the client; the configuration information of the virtual room includes: location information and node information of each server.
11. The file downloading method according to claim 10, characterized in that: After building the virtual room, it also includes: When any server in the virtual room goes offline, the node information of the offline server is removed from the node information stored in the remaining servers in the virtual room, and the scheduling module is notified so that the scheduling module performs the following steps: updating the stored configuration information of the virtual room according to the received node information of the offline server; and selecting an available server from the virtual room based on the updated configuration information to respond to the download request sent by the client; In the case where a new server is added to the virtual room, the node information of the new server is synchronized to all neighboring servers in the virtual room, and the scheduling module is notified so that the scheduling module performs the following steps: updating the stored configuration information of the virtual room according to the received node information of the new server; and selecting an available server from the virtual room based on the updated configuration information to respond to the download request sent by the client.
12. A file downloading method, characterized in that: Applicable to the scheduling module, including: At a first time interval, obtaining configuration information of the virtual machine room according to any one of the methods of claims 1 to 9, including: location information and node information of servers in the virtual machine room; In response to a download request from a client, obtaining a download frequency of a corresponding target file according to the download request; According to the download frequency, determining whether the target file is a hot file or a cold file; If the target file is a cold file, determining a target node of the target file in the virtual machine room according to configuration information of the virtual machine room; using the target node as an available server, and returning node information of the available server to the client; In the case that the target file is a hot file, an available server is designated from the virtual machine room in a polling manner according to the configuration information of the virtual machine room, and the node information of the available server is returned to the client.
13. A file downloading system, characterized in that: include: Operation and maintenance module, computer room management module, scheduling module, content distribution network, client and at least one virtual computer room; The content distribution network serves as an upstream node of the virtual machine room and stores the target file; The operation and maintenance module is used to obtain the configuration information of each edge computer room and send it to the computer room management module; The configuration information of the edge computer room includes: location information of the edge computer room, and node information of each server in the edge computer room; The same computer room management module is used to execute the steps in the method according to claim 10 or 11 to build a virtual computer room; the virtual computer room includes multiple servers; wherein each server is deployed with a back-to-source module; The back-to-source module is configured to execute the steps of the method according to any one of claims 1 to 9; The scheduling module is configured to execute the steps in the method according to claim 12; The client is used to send a download request to the corresponding server according to the node information of the available server returned by the scheduling module.