A file distribution method, device, system, electronic device, and storage medium

By determining the distribution mode in CDN nodes and delegating file distribution tasks to the nearest distribution relay station, the problem of traffic consumption and latency caused by CDN nodes distributing files to distant edge machines is solved, achieving efficient and reliable file distribution.

CN119676229BActive Publication Date: 2026-04-17CHINA TELECOM CLOUD TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CLOUD TECH CO LTD
Filing Date
2024-11-26
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

When CDN nodes distribute files to distant edge machines, it causes problems such as high traffic consumption, severe cross-network transmission delays, and enormous pressure on the file service origin server.

Method used

By determining the distribution mode at the central service node and delegating the file distribution task to the distribution relay station in the relay cluster, the nearest distribution relay station is responsible for distributing the file download commands. Taking advantage of the fact that the distribution relay station and edge nodes are usually on the same network segment, network transmission time and pressure on the central service node are reduced.

Benefits of technology

It effectively saves network transmission time, reduces the distribution pressure on the central service node, enhances the reliability and efficiency of the system, and achieves fast and efficient file distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676229B_ABST
    Figure CN119676229B_ABST
Patent Text Reader

Abstract

This invention provides a file distribution method, apparatus, system, electronic device, and storage medium. The method includes: upon receiving a distribution task command, determining the current task's distribution mode; if the current task's distribution mode is a large-scale distribution mode, marking the current task's distribution mode as a large-scale distribution mode, and storing the current task's file data on a file server; and distributing the marked distribution task command to a first scheduling center in a scheduling center cluster, so that when the first scheduling center receives the distribution task command, it distributes the distribution task command to the corresponding distribution relay stations in each relay cluster for scheduling according to the edge nodes corresponding to the distribution task. This invention distributes the distribution command to each relay cluster for forwarding, quickly distributing files on a large scale to designated nodes, effectively saving network transmission time and reducing the distribution pressure on the central service node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of document distribution technology, and in particular to a document distribution method, apparatus, system, electronic device, and computer-readable storage medium. Background Technology

[0002] With the rapid development of cloud computing, resources around the world are closely connected through cloud technology. Edge machines achieve unified management and scheduling of resources through Kubernetes and kubeedge technologies, forming a huge content delivery network (CDN).

[0003] In related technologies, during the process of CDN nodes providing services, it is often necessary to quickly distribute various files, such as configuration files, installation packages, and image files, to meet the service needs of different nodes. However, since edge machines are geographically distant, belong to different operators, and are located in different network segments, if files are directly distributed from the central node to distant edge machines, the transmission channel becomes lengthy, increasing not only the sending latency but also consuming a large amount of bandwidth and causing problems such as untimely task feedback. At the same time, the file service origin station will be under tremendous pressure when edge machines frequently download files.

[0004] Therefore, how to achieve fast and efficient file distribution among large-scale CDN edge nodes and reduce the huge pressure on the file service origin server when edge machines download files is a problem that needs to be solved. Summary of the Invention

[0005] This invention provides a file distribution method, apparatus, system, electronic device, and computer-readable storage medium to at least solve the problems in related technologies where the distribution of files from a central node to distant edge machines results in excessive bandwidth consumption, severe cross-network transmission delays, untimely task feedback, and increased download pressure on file service source servers. The technical solution of this invention is as follows:

[0006] According to a first aspect of the present invention, a file distribution method is provided, the method being applied to a central service node, comprising:

[0007] Upon receiving a command to distribute a task, determine the current task's distribution mode;

[0008] When the current task's distribution mode is a large-scale distribution mode, mark the current task's distribution mode as a large-scale distribution mode and store the current task's file data on the file server;

[0009] The command for the marked distribution task is distributed to the first scheduling center in the scheduling center cluster, so that when the first scheduling center receives the command for the distribution task, it distributes the command for the distribution task to the corresponding distribution relay station in each relay cluster for scheduling according to the edge node corresponding to the distribution task.

[0010] Optionally, the method further includes:

[0011] When the current task's distribution mode is a small-scale direct push mode, mark the current task's distribution mode as a small-scale direct push mode;

[0012] The command for the marked distribution task and the file data of the current task are sent to the second scheduling center in the scheduling center cluster, so that when the second scheduling center receives the command for the distribution task, it can directly distribute the file data of the current task to the corresponding edge node.

[0013] Optionally, determining the current task distribution mode upon receiving a task distribution command includes:

[0014] When a command to distribute tasks is received, the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time are obtained.

[0015] The current traffic volume is determined based on the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time.

[0016] Based on the current traffic volume, determine whether the current task's delivery mode is a large-scale delivery mode or a small-scale direct push mode.

[0017] Optionally, determining whether the current task's delivery mode is a large-scale delivery mode or a small-scale direct push mode based on the current traffic volume includes:

[0018] Determine if the current traffic volume exceeds a set threshold;

[0019] When the current traffic volume exceeds a set threshold, the current task's delivery mode is determined to be a large-scale delivery mode; or

[0020] If the current traffic volume does not exceed the set threshold, the current task's delivery mode is determined to be a small-scale direct push mode.

[0021] According to a second aspect of the present invention, a file distribution method is provided, the method being applied to each scheduling center in a scheduling center cluster, comprising:

[0022] Upon receiving a command from the central service node to distribute tasks, determine the current task distribution mode;

[0023] When the current task is distributed in a large-scale distribution mode, determine the first distribution relay station in the relay cluster to which the edge node of the current task distribution belongs;

[0024] Call the preheating interface of the file cache server of the first distribution relay station to obtain the file data of the current task from the file server and cache it on the file cache server;

[0025] The command for the distribution task is distributed to the first distribution relay station, so that the first distribution relay station can send the command for the distribution task to the corresponding edge node, and the edge node can obtain the file data of the current task from the file cache server of the corresponding first distribution relay station.

[0026] Optionally, the method further includes:

[0027] When the current task is distributed in a small-scale direct push mode, determine the second distribution relay station in the relay cluster to which the edge node of the current task is directly pushed belongs;

[0028] The command for the distribution task and the file data are directly pushed to the second distribution relay station, so that the second distribution relay station can directly distribute the command for the distribution task and the file data to the corresponding edge node, and the edge node can directly store the received file data of the current task in the specified directory.

[0029] Optionally, determining the first distribution relay station in the relay cluster to which the edge node currently distributing the task belongs includes:

[0030] Based on the attribute information of the edge nodes currently being distributed, the distribution relay stations of the relay cluster to which the edge nodes belong are grouped, and the distribution relay station with a healthy center hop in each group is determined as the first distribution relay station in the relay cluster to which the edge nodes of the corresponding group belong. The attribute information includes: the IP address of the edge node and / or the location information of the edge node.

[0031] The step of determining the second distribution relay station in the relay cluster to which the edge node of the current task distribution belongs includes:

[0032] Based on the attribute information of the edge nodes currently being distributed, the distribution relay stations of the relay cluster to which the edge nodes belong are grouped, and the distribution relay station with a healthy center hop in each group is determined as the second distribution relay station in the relay cluster to which the edge nodes of the corresponding group belong. The attribute information includes: the IP address of the edge node and / or the location information of the edge node.

[0033] According to a third aspect of the present invention, a file distribution apparatus is provided, the apparatus being applied to a central service node, comprising:

[0034] The determination module is used to determine the current task distribution mode when a task distribution command is received;

[0035] The first marking module is used to mark the current task's distribution mode as a large-scale distribution mode when the current task's distribution mode is a large-scale distribution mode, and to store the current task's file data on a file server.

[0036] The first distribution module is used to distribute the marked distribution task command to the first scheduling center in the scheduling center cluster, so that when the first scheduling center receives the distribution task command, it distributes the distribution task command to the distribution relay station in each relay cluster for scheduling according to the edge node corresponding to the distribution task.

[0037] Optionally, the device further includes:

[0038] The second marking module is used to mark the current task's distribution mode as a small-scale direct push mode when the current task's distribution mode is a small-scale direct push mode.

[0039] The second distribution module is used to send the command of the marked distribution task and the file data of the current task to the second scheduling center in the scheduling center cluster, so that when the second scheduling center receives the command of the distribution task, it can directly distribute the file data of the current task to the corresponding edge node.

[0040] Optionally, the determining module includes:

[0041] The acquisition module is used to obtain the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time when a command to distribute tasks is received.

[0042] The traffic determination module is used to determine the current traffic volume based on the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time.

[0043] The mode determination module is used to determine whether the current task's distribution mode is a large-scale distribution mode or a small-scale direct push mode based on the current traffic volume.

[0044] Optionally, the pattern determination module includes:

[0045] The judgment module is used to determine whether the current traffic volume exceeds a set threshold.

[0046] The first delivery mode determination module is used to determine the delivery mode of the current task as a large-scale delivery mode when the judgment module determines that the current traffic size exceeds a set threshold.

[0047] The second delivery mode determination module is used to determine that the delivery mode of the current task is a small-scale direct push mode when the judgment module determines that the current traffic size does not exceed a set threshold.

[0048] According to a fourth aspect of the present invention, a file distribution apparatus is provided, the apparatus being applied to each scheduling center in a scheduling center cluster, comprising:

[0049] The mode determination module is used to determine the current task distribution mode when it receives a command to distribute tasks from the central service node.

[0050] The first relay determination module is used to determine the first distribution relay station in the relay cluster to which the edge node of the current task distribution belongs when the mode determination module determines that the current task distribution mode is a large-scale distribution mode.

[0051] The calling module is used to call the preheating interface of the file cache server of the first distribution relay station, obtain the file data of the current task from the file server, and cache it on the file cache server;

[0052] The first distribution module is used to distribute the command of the distribution task to the first distribution relay station, so that the first distribution relay station can send the command of the distribution task to the corresponding edge node, and the edge node can obtain the file data of the current task from the file cache server of the corresponding first distribution relay station.

[0053] Optionally, the device further includes:

[0054] The second relay determination module is used to determine the second distribution relay station in the relay cluster to which the edge node of the current task direct push belongs when the mode determination module determines that the task distribution mode is small-scale direct push mode.

[0055] The second distribution module is used to directly push the command of the distribution task and the file data to the second distribution relay station, so that the second distribution relay station can directly distribute the command of the distribution task and the file data to the corresponding edge node, and the edge node can directly store the received file data of the current task in a specified directory.

[0056] Optionally, the first relay determination module is specifically used to group the distribution relay stations of the relay cluster where the edge node is located according to the attribute information of the edge node to which the current task is distributed, when the mode determination module determines that the current task distribution mode is a large-scale distribution mode, and determine the distribution relay station with a healthy center hop in each group as the first distribution relay station in the relay cluster to which the edge node of the corresponding group belongs. The attribute information includes: the IP address of the edge node and / or the location information of the edge node.

[0057] The second relay determination module is specifically used to, when the mode determination module determines that the task distribution mode is a small-scale direct push mode, group the distribution relay stations of the relay cluster where the edge node is located according to the attribute information of the edge node currently being distributed, and determine the distribution relay station with a healthy center hop in each group as the second distribution relay station in the relay cluster to which the edge node of the corresponding group belongs. The attribute information includes: the IP address of the edge node and / or the location information of the edge node.

[0058] According to a fifth aspect of the present invention, a file distribution system is provided, the system comprising: a central service node, a file server, a scheduling center cluster, a distribution relay cluster, and a file caching service cluster, wherein...

[0059] The central service node is configured to, upon receiving a command to distribute a task, determine the current task's distribution mode; if the current task's distribution mode is a large-scale distribution mode, mark the current task's distribution mode as a large-scale distribution mode, store the current task's file data on a file server, and distribute the marked task distribution command to the first scheduling center in the scheduling center cluster; or, if the current task's distribution mode is determined to be a small-scale direct push mode, mark the current task's distribution mode as a small-scale direct push mode in the command; and distribute the marked task distribution command and the current task's file data to the second scheduling center in the scheduling center cluster.

[0060] The file server is used to store file data sent by the central service node and to provide external download functionality;

[0061] Each scheduling center in the scheduling center cluster is used to determine the current task's distribution mode when it receives a task distribution command from the central service node; when the current task's distribution mode is a large-scale distribution mode, it determines the first distribution relay station in the distribution relay cluster to which the edge node of the current task distribution belongs; calls the preheating interface of the file cache server of the first distribution relay station to obtain the file data of the current task from the file server and caches it on the file cache server; and distributes the task distribution command to the first distribution relay station; or, when the current task's distribution mode is determined to be a small-scale direct push mode, it determines the second distribution relay station in the distribution relay cluster to which the edge node of the current task direct push belongs; and directly pushes the task distribution command and the file data to the second distribution relay station.

[0062] Each file cache server in the file cache service cluster is used to provide a preheating interface for the distribution relay station in the corresponding relay cluster, temporarily cache the file data of the current task obtained from the file server, and provide download services;

[0063] Each distribution relay station in the distribution relay cluster is configured to, upon receiving a distribution task command from the corresponding scheduling center, forward the command to the corresponding edge node so that the edge node can retrieve the file data of the current task from the file cache server of the corresponding first distribution relay station; or, upon receiving the distribution task command and the file data from the corresponding scheduling center, directly forward the distribution task command and the file data to the corresponding edge node, and the edge node directly stores the received file data of the current task in a specified directory.

[0064] According to a sixth aspect of the present invention, an electronic device is provided, comprising:

[0065] processor;

[0066] Memory used to store the processor's executable instructions;

[0067] The processor is configured to execute the instructions to implement the file distribution method described above.

[0068] According to a seventh aspect of the present invention, a computer-readable storage medium is provided, wherein when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the file distribution method as described above.

[0069] According to an eighth aspect of the present invention, a computer program product is provided, comprising a computer program or instructions that, when executed by a processor of an electronic device, implement the file distribution method described above.

[0070] The technical solutions provided by the embodiments of the present invention bring at least the following beneficial effects:

[0071] In this embodiment of the invention, upon receiving a command to distribute a task, the current task's distribution mode is determined. If the current task's distribution mode is a large-scale distribution mode, it is marked as such, and the file data of the current task is stored on a file server. The marked distribution task command is then distributed to the first scheduling center in the scheduling center cluster. This allows the first scheduling center, upon receiving the distribution task command, to distribute the command to the corresponding distribution relay station in each relay cluster according to the edge node corresponding to the distribution task. In other words, this embodiment of the invention decentralizes the file distribution task command service to the distribution relay station in the relay cluster, thereby reducing the pressure on the central service node and shortening network links. Since the distribution relay station and the managed edge nodes are usually located in the same network segment, this embodiment of the invention utilizes this characteristic to distribute task distribution commands to the distribution relay stations in each relay cluster. The nearest distribution relay station is responsible for distributing the file download command, effectively saving network transmission time, reducing the distribution pressure on the central service node, and enhancing the system's reliability and efficiency.

[0072] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0073] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present invention and, together with the description, serve to explain the principles of the invention. They do not constitute an undue limitation of the invention. To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0074] Figure 1 This is a flowchart of a file distribution method provided in an embodiment of the present invention.

[0075] Figure 2 This is another flowchart of a file distribution method provided in an embodiment of the present invention.

[0076] Figure 2A This is a schematic diagram of group scheduling based on the target machines of the current task distribution provided by an embodiment of the present invention.

[0077] Figure 3 This is an application example diagram of a file distribution method provided in an embodiment of the present invention.

[0078] Figure 4 This is a block diagram of a file distribution device provided in an embodiment of the present invention.

[0079] Figure 5 This is another block diagram of a file distribution device provided in an embodiment of the present invention.

[0080] Figure 6 This is a block diagram of a file distribution system provided in an embodiment of the present invention.

[0081] Figure 7 This is an application block diagram of a file distribution system provided in an embodiment of the present invention.

[0082] Figure 7A This is a schematic diagram of the distribution of machines across the entire network provided in an embodiment of the present invention.

[0083] Figure 7B This is a schematic diagram of edge cluster machine distribution provided in an embodiment of the present invention.

[0084] Figure 8 This is a block diagram of an electronic device provided in an embodiment of the present invention.

[0085] Figure 9 This is a block diagram of a file distribution apparatus provided in an embodiment of the present invention. Detailed Implementation

[0086] To enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0087] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0088] Figure 1 This is a flowchart of a file distribution method provided by an embodiment of the present invention. The method is applied to a central service node, such as... Figure 1 As shown, the method includes the following steps:

[0089] Step 101: Upon receiving the command to distribute the task, determine the current task distribution mode.

[0090] Step 102: When the current task's distribution mode is large-scale distribution mode, mark the current task's distribution mode as large-scale distribution mode and store the current task's file data on the file server.

[0091] Step 103: Distribute the marked distribution task command to the first scheduling center of the scheduling center cluster, so that when the first scheduling center receives the distribution task command, it distributes the distribution task command to the corresponding distribution relay station in each cluster for scheduling according to the edge node corresponding to the distribution task.

[0092] In this embodiment of the invention, the received distribution command is sent to the distribution relay stations (i.e., management machines) of each relay cluster. Each cluster's distribution relay station is responsible for distributing the file download command; that is, each cluster's distribution relay station sends the command for the distribution task to the corresponding edge nodes in the edge cluster. The edge nodes can then download the file data for the current task from the file cache server of the cluster's distribution relay station. This effectively saves network transmission time, reduces the distribution pressure on the central service node, and enables rapid large-scale distribution of files to designated nodes, alleviating the pressure on the source site (file server) for file download services. It also enhances the system's reliability and efficiency.

[0093] The file distribution method described in this invention can be applied to terminals, servers, etc., without limitation. The terminal implementation device can be an electronic device such as a smartphone, laptop, tablet, desktop computer, personal digital assistant (PDA), and wearable device. The server can be an independent server, a server cluster, or a server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, or big data and artificial intelligence platforms, etc., without limitation.

[0094] The following is combined Figure 1 The specific implementation steps of a file distribution method provided in the embodiments of the present invention will be described in detail.

[0095] In step 101, upon receiving a command to distribute tasks, the current task distribution mode is determined.

[0096] In this step, when the central service node receives the command for the file distribution task, it first determines the current task's distribution mode, specifically including: obtaining the current file size, the number of edge nodes for the current task, and the number of tasks per unit time; determining the current traffic volume based on the current file size, the number of edge nodes for the current task, and the number of tasks per unit time; and determining whether the current task's distribution mode is a large-scale distribution mode or a small-scale direct push mode based on the current traffic volume.

[0097] The determination of the current traffic volume is based on the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time, including:

[0098] Upon receiving a file distribution task command, the central service calculates the current traffic Q based on the file size, the scale of edge nodes (number of edge nodes), and the number of tasks in the current system within 1 minute. The calculation formula is as follows:

[0099]

[0100] Wherein: F now Indicates the file size of the current task, in MB. now This represents the target number of machines for the current task, t represents the number of tasks within 1 minute, and F... i M represents the file size of the i-th task. i Let represent the number of machines for the i-th task, where the number of task machines can be understood as the number of edge nodes.

[0101] Then, the central service node determines whether the current traffic volume exceeds a set threshold; if it determines that the current traffic volume exceeds the set threshold, it determines that the current task's delivery mode is a large-scale delivery mode; or if it determines that the current traffic volume does not exceed the set threshold, it determines that the current task's delivery mode is a small-scale direct push mode.

[0102] In step 102, when the current task's distribution mode is a large-scale distribution mode, the current task's distribution mode is marked as a large-scale distribution mode, and the current task's file data is stored on the file server.

[0103] In this step, when the current task's distribution mode is large-scale distribution mode, the central service node first pushes the task's file data to the file server for storage and marks the task as large-scale distribution mode in the command; of course, it is also possible to first mark the task as large-scale distribution mode in the command and then push the task's file data to the file server for storage.

[0104] In step 103, the command of the marked distribution task is distributed to the first scheduling center in the scheduling center cluster, so that when the first scheduling center receives the command of the distribution task, it distributes the command of the distribution task to the corresponding distribution relay station in each relay cluster for scheduling according to the edge node corresponding to the distribution task.

[0105] In this step, the central service node sends the tagged command to the first dispatch center in the dispatch center cluster, such as the North China Dispatch Center in the dispatch center cluster. When the first dispatch center receives the command for the distribution task, it distributes the command to the corresponding distribution relay station in each relay cluster for scheduling according to the edge node corresponding to the distribution task.

[0106] The term "dispatch center cluster" is a general term for the regional center clusters, which may include the North China cluster, South China cluster, Northeast cluster, East China cluster, Central China cluster, Southwest cluster, and Northwest cluster.

[0107] In this embodiment of the invention, upon receiving a command to distribute a task, the current task's distribution mode is determined. If the current task's distribution mode is a large-scale distribution mode, it is marked as such, and the file data of the current task is stored on a file server. The marked distribution task command is then distributed to the first scheduling center in the scheduling center cluster. This allows the first scheduling center, upon receiving the distribution task command, to distribute the command to the corresponding distribution relay station in each relay cluster according to the edge node corresponding to the distribution task. In other words, in this embodiment of the invention, the service of file distribution task commands is decentralized to the distribution relay station in the relay cluster (this distribution relay station is also called the management machine of the edge cluster, typically consisting of two management machines, primary and backup), thereby reducing the pressure on the central service node to distribute commands and shortening network links. Since the distribution relay station and the managed edge nodes are usually located in the same network segment, this embodiment of the invention utilizes this feature to distribute task distribution commands to the distribution relay stations in each relay cluster. The nearest distribution relay station is responsible for distributing file download commands, which effectively saves network transmission time, reduces the distribution pressure on the central service node, and enhances the reliability and efficiency of the system.

[0108] Optionally, in another embodiment, based on the above embodiment, the method may further include: when the current task's distribution mode is a small-scale direct push mode, marking the current task's distribution mode as a small-scale direct push mode in the command; and sending the marked task distribution command and the current task's file data to a second scheduling center in the scheduling center cluster, so that when the second scheduling center receives the task distribution command, it directly distributes the current task's file data to the corresponding edge node.

[0109] In this embodiment, when the central service node determines that the current task is issued in a small-scale direct push mode, it marks the task as a small-scale direct push mode in the command and issues the marked command to the corresponding scheduling center (such as the second scheduling center) in the scheduling center cluster, while also carrying file data. That is, the command and file data are issued together to the scheduling center of the corresponding cluster.

[0110] In other words, in this embodiment, when the central service node determines that the current traffic Q exceeds a set threshold, it determines that the current task's delivery mode is a large-scale delivery mode. It then first pushes the task's file data to a file server for storage, marks the task as a large-scale delivery mode in the command, and finally sends the marked command to the corresponding cluster's scheduling center. Otherwise, if the current traffic Q does not exceed the set threshold, it marks the task as a small-scale direct push mode in the command and sends the marked command to the corresponding cluster's scheduling center, carrying the file data along with it—that is, sending the command and file data together to the corresponding cluster's scheduling center.

[0111] Based on the distribution of edge nodes in the Content Delivery Network (CND), and considering the needs of CDN services to distribute files across the entire network on a large scale, as well as the requirements for distributing configuration files to newly deployed clusters, this invention proposes a method for direct push distribution of small files and small-scale machines, and pre-warming and local scheduling of large-scale network-wide files. This achieves rapid file distribution by decentralizing the distribution and download command service to various distribution relay stations (management machines), which are then scheduled by the corresponding scheduling center. This reduces the link distance for commands to reach the destination, effectively saves network transmission time, improves the speed of download command issuance, and reduces the distribution pressure on the central service node.

[0112] Please also see Figure 2 This is another flowchart of a file distribution method provided by an embodiment of the present invention. The method is used for each scheduling center in a scheduling center cluster and includes:

[0113] Step 201: Upon receiving the command to distribute the task from the central service node, determine the current task distribution mode.

[0114] In this step, when the scheduling center receives the command to distribute the task sent by the central service node, it can determine the current task distribution mode based on the marker in the command. For example, it can determine whether the current task distribution mode is a large-scale distribution mode or a small-scale direct push mode.

[0115] Step 202: When it is determined that the current task distribution mode is large-scale distribution mode, determine the first distribution relay station in the relay cluster to which the edge node of the current task distribution belongs.

[0116] In this step, the scheduling center can group the distribution relay stations of the relay cluster to which the edge node belongs according to the attribute information of the edge node currently being distributed. It then determines one healthy distribution relay station in each group as the first distribution relay station in the relay cluster to which the edge node of that group belongs. The first distribution relay station can also be understood as the distribution relay station in the first relay cluster, and other similar descriptions follow the same pattern. The attribute information includes: the IP address of the edge node and / or the location information of the edge node, such as which province or municipality. Of course, this attribute information can also adaptively include other information, which is not limited in this embodiment. In this embodiment, the relay cluster is a general term for various provincial-level administrative division clusters, which may include: Beijing, Shanghai, Guangdong, Inner Mongolia, Fujian, Qinghai, Gansu, etc. These will not be listed individually in this embodiment.

[0117] In this embodiment, the scheduling center groups (or categorizes) the distribution relay stations in the relay cluster where the edge nodes (target machines) are located according to the attribute information of the edge nodes (target machines) currently being distributed. It then determines one healthy distribution relay station from each group for scheduling. A schematic diagram of this grouping and scheduling is shown below. Figure 2A As shown, Figure 2A This is a schematic diagram illustrating group scheduling based on the target machine (i.e., edge node) of the current task distribution, provided as an embodiment of the present invention. Specifically, it includes:

[0118] like Figure 2AAs shown, the scheduling center groups the target machines (i.e., edge nodes) of the tasks to be distributed according to their IP addresses (in this implementation, IP addresses are used as an example, such as 1.1.12; 1.1.1.3; 2.2.2.2; 2.2.2.3; 2.2.3.2; 11.2.3.2, etc.), based on their respective management machines (which deploy distribution relay stations and file caching services). Then, it checks the health of the grouped management machines' heartbeats. If healthy, the management machine's service is normal, and the command is distributed to its distribution relay station. If unhealthy, the management machine's service is abnormal, and a relay distribution station needs to be selected from nearby (e.g., data centers in neighboring cities) for relay service. If there is no suitable nearby management machine, one is randomly selected from existing, healthy management machines as the relay service. Finally, the task distribution command is sent to the corresponding management machine. In addition, in this embodiment, file data is sent along with the distribution command in the direct push mode, while in the large-scale mode, the file caching service of a distribution relay station in the relay cluster is called to preheat the file.

[0119] In this embodiment, when the scheduling center receives a command to distribute a task (i.e., a file distribution command), if the task's distribution mode is a large-scale distribution mode, it will first call the preheating interface of the file cache server. This will control the file cache server to pull the file from the source site (file server or file service database, etc.). The pulling method can be P2P or similar methods for sharding or chunking the file, and the sharded or chunked files will be stored on the local disk. Through nginx load balancing, the file download function will be provided externally. In this way, when the edge execution agent (i.e., the edge execution agent service of the edge node, etc.) receives the command to distribute the task, it can directly pull the file from the file cache server within the cluster, without needing to pull the file from the file server. This avoids all machines pulling files from the file server, effectively reducing the distribution pressure on the file server.

[0120] Step 203: Call the preheating interface of the file cache server of the first distribution relay station to obtain the file data of the current task from the file server and cache it on the file cache server.

[0121] In this step, when the scheduling center determines the distribution relay station in the relay cluster to which the edge node of the current task distribution belongs, it calls the preheating interface of the file cache server of the first distribution relay station to obtain the file data of the current task from the file server and cache it on the file cache server.

[0122] The method of obtaining the file data of the current task from the file server can be to use P2P to pull the file in chunks or segments. The specific P2P download method is a well-known technology and will not be described in detail here. Of course, other download methods can also be used, and this embodiment does not limit them.

[0123] Step 204: Distribute the command of the distribution task to the first distribution relay station, so that the first distribution relay station can send the command of the distribution task to the corresponding edge node, and the edge node can obtain the file data of the current task from the file cache server of the corresponding first distribution relay station.

[0124] In this step, the scheduling center distributes the command of the distribution task to the first distribution relay station, the first distribution relay station sends the command of the distribution task to the corresponding edge node, and the edge execution agent of the edge node obtains the file data of the current task from the file cache server of the corresponding first distribution relay station and stores the obtained file data of the current task in the specified directory.

[0125] In this embodiment, the distribution relay station is responsible for distributing the commands of the received distribution file to the edge execution agent service on the designated edge node. The edge execution agent service collects and reports the task status, etc.

[0126] In other words, after the edge execution agent service receives the command to distribute tasks, it will save the file data directly if the task distribution mode is a direct push mode, and if the task distribution mode is a large-scale distribution mode, it will pull the file from the file cache server and save the pulled file to the specified directory.

[0127] Optionally, in another embodiment, based on the above embodiment, after the edge execution agent downloads the file, it reports the download result and completion time to the distribution relay station. The distribution relay station then records the result in Redis, an open-source in-memory data structure storage system that can also be used as a database, cache, and message broker. Then, the scheduling center transmits the task completion data to the central service node. Finally, the central service records the received result in the database for user querying. Furthermore, the system provides comprehensive tracing functionality and task completion callback functionality, enabling timely detection and troubleshooting of delivery failures.

[0128] Optionally, in another embodiment, based on the above embodiments, the method may further include: when it is determined that the current task's distribution mode is a small-scale direct push mode, determining the distribution relay station in the relay cluster to which the edge node of the current task's direct push belongs, referred to as the second distribution relay station. The second distribution relay station can also be understood as the distribution relay station in the second relay cluster, and other similar descriptions are the same; directly pushing the command of the distribution task and the file data to the second distribution relay station, so that the second distribution relay station directly distributes the command of the distribution task and the file data to the corresponding edge node, and the edge node directly stores the received file data of the current task in a specified directory.

[0129] The step of determining the distribution relay station in the relay cluster to which the edge node of the current task distribution belongs, referred to as the second distribution relay station, includes: grouping the distribution relay stations in the relay cluster to which the edge node belongs according to the attribute information of the edge node of the current task distribution, and determining the distribution relay station with a healthy center hop in each group as the second distribution relay station in the relay cluster to which the edge node of the corresponding group belongs. The attribute information includes: the IP address of the edge node and / or the location information of the edge node.

[0130] Optionally, in another embodiment, based on the above embodiments, a redistribution mechanism can be implemented in the event of a service failure or upgrade.

[0131] When the dispatch center or distribution relay station is upgraded or restarted due to a failure, it will read relevant data from the database during startup and resend all unsent tasks to the corresponding edge execution agents. The edge execution agents will also use a retry mechanism each time a task is sent to ensure that the files can be downloaded accurately on the corresponding machines.

[0132] The file distribution method provided in this invention adopts a hierarchical distribution architecture, which has flexible scalability. For the access of small clusters or single machines in newly added data centers, as long as the cluster information of the access cluster is stored in the CDN platform that specifically manages machine data, it can be quickly connected to the system, realizing machine (such as edge nodes) scheduling and file distribution. In addition, the migration of machines to different edge clusters and the re-listing after failure are well compatible, thereby improving the system's flexibility and scalability.

[0133] Please also see Figure 3 This is an application example diagram of a file distribution method provided in an embodiment of the present invention. The method includes:

[0134] Step 301: The central service node receives the command for the file distribution task.

[0135] Step 302: The central service node obtains the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time.

[0136] Step 303: The central service node determines the current traffic volume based on the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time.

[0137] Step 304: The central service node determines whether the current traffic volume exceeds the set threshold. If so, proceed to steps 305 to 311; otherwise, proceed to step 312.

[0138] Step 305: The central service node determines that the current task's distribution mode is a large-scale distribution mode.

[0139] Step 306: When the current task's distribution mode is large-scale distribution mode, the central service node marks the current task's distribution mode as large-scale distribution mode and stores the current task's file data on the file server.

[0140] Step 307: The central service node distributes the marked task command to the first scheduling center in the scheduling center cluster.

[0141] Step 308: When the first scheduling center receives the task distribution command sent by the central service node, it determines the current task distribution mode;

[0142] Step 309: When the first dispatch center determines that the current task distribution mode is a large-scale distribution mode, it determines the first distribution relay station in the relay cluster to which the edge node of the current task distribution belongs;

[0143] Step 310: The first scheduling center calls the preheating interface of the file cache server of the first distribution relay station to obtain the file data of the current task from the file server and cache it on the file cache server.

[0144] Step 311: The first scheduling center distributes the command of the distribution task to the first distribution relay station, so that the first distribution relay station sends the command of the distribution task to the corresponding edge node. The execution agent service (i.e., edge execution agent) of the edge node obtains the file data of the current task from the file cache server of the corresponding first distribution relay station and saves the file data to the specified directory.

[0145] Step 312: When the current task's distribution mode is small-scale direct push mode, the central service node marks the current task's distribution mode as small-scale direct push mode.

[0146] Step 313: The central service node sends the marked task distribution command and the current task file data to the second scheduling center in the scheduling center cluster.

[0147] Step 314: When the second dispatch center receives the command to distribute the task and the file data of the current task sent by the central service node, it determines that the current task's distribution mode is the small-scale direct push mode.

[0148] Step 315: The second scheduling center determines the distribution relay station in the relay cluster to which the edge node directly pushed by the current task belongs, which is called the second distribution relay station.

[0149] Step 316: The second scheduling center directly pushes the command of the distribution task and the file data to the second distribution relay station, so that the second distribution relay station directly distributes the command of the distribution task and the file data to the corresponding edge node, and the execution agent service (i.e. the edge execution agent) of the edge node directly saves the received file data to the specified directory.

[0150] The implementation process of each step in this embodiment is detailed in the above-mentioned embodiment and will not be repeated here.

[0151] In this embodiment of the invention, large-scale file distribution across the entire network is supported. By decentralizing the service of distributing download instructions (distribution relay station) to the management machine and scheduling it by the scheduling center, the link distance for instructions to reach the network is reduced, and the speed of issuing download commands is improved.

[0152] In this embodiment of the invention, the hierarchical architecture design of file distribution enables edge nodes (i.e. target machines) to flexibly and conveniently access the system, providing a convenient file distribution channel for the initial download of newly uploaded node files (i.e. machine files).

[0153] In this embodiment of the invention, the command to distribute files is pushed down to the distribution relay station (i.e., management machine) of the relay cluster, realizing the machine-based message distribution scheduling technology. According to the geographical location or network topology of the machine, the command can be sent to the nearest distribution relay station (i.e., management machine), reducing message transmission latency and improving the efficiency and real-time performance of file distribution.

[0154] In this embodiment of the invention, file distribution can flexibly distribute files of different sizes and machine tasks of different scales. Depending on the file distribution mode, file preheating or direct file push can be used to effectively reduce the distribution pressure on the file server, improve the concurrency and stability of file distribution, speed up the file distribution speed, and thus improve the overall performance and reliability of the system.

[0155] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that this disclosure is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the present invention.

[0156] Figure 4 This is a block diagram of a file distribution device provided in an embodiment of the present invention. The device is applied to a central service node and includes: a determination module 401, a first marking module 402, and a first distribution module 403, wherein...

[0157] The determination module 401 is used to determine the current task distribution mode when a task distribution command is received;

[0158] The first marking module 402 is used to mark the current task's distribution mode as a large-scale distribution mode when the current task's distribution mode is a large-scale distribution mode, and to store the current task's file data on a file server.

[0159] The first distribution module 403 is used to distribute the command of the marked distribution task to the first scheduling center in the scheduling center cluster, so that when the first scheduling center receives the command of the distribution task, it distributes the command of the distribution task to the distribution relay station in each relay cluster for scheduling according to the edge node corresponding to the distribution task.

[0160] Optionally, in another embodiment, based on the above embodiments, the apparatus further includes:

[0161] The second marking module is used to mark the current task's distribution mode as a small-scale direct push mode when the current task's distribution mode is a small-scale direct push mode.

[0162] The second distribution module is used to send the command of the marked distribution task and the file data of the current task to the second scheduling center in the scheduling center cluster, so that when the second scheduling center receives the command of the distribution task, it can directly distribute the file data of the current task to the corresponding edge node.

[0163] Optionally, in another embodiment, based on the above embodiments, the determining module includes:

[0164] The acquisition module is used to obtain the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time when a command to distribute tasks is received.

[0165] The traffic determination module is used to determine the current traffic volume based on the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time.

[0166] The mode determination module is used to determine whether the current task's distribution mode is a large-scale distribution mode or a small-scale direct push mode based on the current traffic volume.

[0167] Optionally, in another embodiment, based on the above embodiments, the pattern determination module includes:

[0168] The judgment module is used to determine whether the current traffic volume exceeds a set threshold.

[0169] The first delivery mode determination module is used to determine the delivery mode of the current task as a large-scale delivery mode when the judgment module determines that the current traffic size exceeds a set threshold.

[0170] The second delivery mode determination module is used to determine that the delivery mode of the current task is a small-scale direct push mode when the judgment module determines that the current traffic size does not exceed a set threshold.

[0171] Please also see Figure 5 This is another block diagram of a file distribution device provided in an embodiment of the present invention. The device is applied to each scheduling center in a scheduling center cluster and includes: a mode determination module 501, a first transit determination module 502, a calling module 503, and a first distribution module 504, wherein...

[0172] The mode determination module 501 is used to determine the current task distribution mode when it receives a command to distribute the task sent by the central service node.

[0173] The first relay determination module 502 is used to determine the first distribution relay station in the relay cluster to which the edge node of the current task distribution belongs when the mode determination module determines that the current task distribution mode is a large-scale distribution mode.

[0174] The calling module 503 is used to call the preheating interface of the file cache server of the first distribution relay station, obtain the file data of the current task from the file server, and cache it on the file cache server;

[0175] The first distribution module 504 is used to distribute the command of the distribution task to the first distribution relay station, so that the first distribution relay station can send the command of the distribution task to the corresponding edge node, and the edge node can obtain the file data of the current task from the file cache server of the corresponding first distribution relay station.

[0176] Optionally, in another embodiment, based on the above embodiments, the apparatus further includes:

[0177] The second relay determination module is used to determine the second distribution relay station in the relay cluster to which the edge node of the current task direct push belongs when the mode determination module determines that the task distribution mode is small-scale direct push mode.

[0178] The second distribution module is used to directly push the command of the distribution task and the file data to the second distribution relay station, so that the second distribution relay station can directly distribute the command of the distribution task and the file data to the corresponding edge node, and the edge node can directly store the received file data of the current task in a specified directory.

[0179] Optionally, in another embodiment, based on the above embodiment, the first relay determination module is specifically used to group the distribution relay stations of the relay cluster where the edge node is located according to the attribute information of the edge node to which the current task is distributed, when the mode determination module determines that the current task distribution mode is a large-scale distribution mode, and determine the distribution relay station with a healthy center hop in each group as the first distribution relay station in the relay cluster to which the edge node of the corresponding group belongs. The attribute information includes: the IP address of the edge node and / or the location information of the edge node.

[0180] The second relay determination module is specifically used to, when the mode determination module determines that the task distribution mode is a small-scale direct push mode, group the distribution relay stations of the relay cluster where the edge node is located according to the attribute information of the edge node currently being distributed, and determine the distribution relay station with a healthy center hop in each group as the second distribution relay station in the relay cluster to which the edge node of the corresponding group belongs. The attribute information includes: the IP address of the edge node and / or the location information of the edge node.

[0181] Please also see Figure 6 This invention provides a block diagram of a file distribution system, comprising: a central service node 601, a file server 602, a scheduling center cluster 603 (including multiple scheduling centers), a file caching service cluster 604 (including multiple file caching servers), and a distribution relay cluster 605 (including multiple distribution relay stations).

[0182] The central service node 601, upon receiving a command to distribute a task, determines the distribution mode of the current task. If the distribution mode of the current task is a large-scale distribution mode, it marks the distribution mode of the current task as a large-scale distribution mode, stores the file data of the current task on the file server 602, and distributes the command for the marked distribution task to the first scheduling center in the scheduling center cluster. Alternatively, if the distribution mode of the current task is determined to be a small-scale direct push mode, it marks the distribution mode of the current task as a small-scale direct push mode in the command and distributes the command for the marked distribution task and the file data of the current task to the second scheduling center in the scheduling center cluster.

[0183] The file server 602 is used to store file data sent by the central service node and provide external download functionality;

[0184] Each scheduling center in the scheduling center cluster 603 is configured to, upon receiving a command to distribute a task from a central service node, determine the current task's distribution mode; if the current task's distribution mode is a large-scale distribution mode, determine the first distribution relay station in the distribution relay cluster to which the edge node of the current task distribution belongs; call the preheating interface of the file cache server of the first distribution relay station to obtain the file data of the current task from the file server and cache it on the file cache server; and distribute the command of the distribution task to the first distribution relay station; or, if the current task's distribution mode is determined to be a small-scale direct push mode, determine the second distribution relay station in the distribution relay cluster to which the edge node of the current task direct push belongs; and directly push the command of the distribution task and the file data to the second distribution relay station.

[0185] Each file cache server in the file cache service cluster 604 is used to provide a warm-up interface for the distribution relay station in the corresponding relay cluster, temporarily cache the file data of the current task obtained from the file server, and provide download services;

[0186] Each distribution relay station in the distribution relay cluster 605 is configured to, upon receiving a distribution task command from the corresponding scheduling center, forward the command to the corresponding edge node, so that the edge node can obtain the file data of the current task from the file cache server of the corresponding first distribution relay station and store the file data of the current task in a specified directory; or, upon receiving the distribution task command and the file data from the corresponding scheduling center, directly forward the distribution task command and the file data to the corresponding edge node, and the edge node directly stores the received file data of the current task in a specified directory.

[0187] The embodiments of the present invention support the rapid access of new CDN machines and clusters to the file distribution system, and can retry the restart task of abnormal machines, and migrate machines between different clusters, greatly improving flexibility and scalability.

[0188] Please also see Figure 7 This is an application block diagram of a file distribution system provided in an embodiment of the present invention, such as... Figure 7 As shown, it includes: the central cluster, the South China cluster and the North China cluster connected to the central service (taking the Fujian cluster connected to the South China cluster as an example), and the Beijing cluster connected to the North China cluster as an example.

[0189] The central cluster includes a central service (i.e., a central service node), the South China cluster includes a dispatch center, and the North China cluster also includes a dispatch center. In practical applications, to distinguish different dispatch centers, they can be designated as a first dispatch center, a second dispatch center, etc., and so on. Before issuing a command, each dispatch center checks the health of the distribution relay station's heartbeat. If it is healthy, it issues the distribution command; if it is unhealthy, it selects a distribution relay station from a neighboring city as the relay service.

[0190] In this cluster, both the file caching servers in the Fujian and Beijing clusters can pull (i.e., download) file data from the file server. The distribution relay station in the Fujian cluster is connected to the dispatch center in the South China cluster, and the distribution relay station in the Beijing cluster is connected to the dispatch center in the North China cluster. The file caching servers and distribution relay station in the Fujian cluster are deployed on the management machines in their respective data centers, as are those in the Beijing cluster. The file server is deployed on the file source server and is used to store file data for the Chinese service.

[0191] In the Fujian cluster, the distribution relay station manages two edge execution agents for two edge nodes. These two edge execution agents can be the same or different. Each edge execution agent can download file data from the file caching server in the Fujian cluster. An edge execution agent can also be understood as a service deployed on the edge node. Similarly, in the Beijing cluster, the distribution relay station also manages two edge execution agents for two edge nodes. These two edge execution agents can be the same or different, and each edge execution agent can download file data from the file caching server in the Beijing cluster.

[0192] Of course, in practical applications, this file distribution system is not limited to this. In another embodiment, the system includes six modules: a central service (i.e., a central service node), a scheduling center (i.e., a scheduling center node), a distribution relay station, a file server, an edge execution agent, and a file cache server. The functions of each module are as follows:

[0193] The central service provides interface services for users to call, including: interface verification and authentication; task creation, task distribution to corresponding regions, task query, and task callback; and file writing to persistent storage.

[0194] The dispatch center is responsible for functions such as scheduling files issued by machines, preheating files, and collecting and reporting task completion status.

[0195] The distribution relay station manages the edge execution agents on the edge nodes in the edge cluster. Deployed on the corresponding management machine, it is the relay station for command issuance, responsible for issuing commands to the edge execution agents (agents) of the edge machines (i.e., edge nodes) in the managed cluster.

[0196] An edge execution agent is responsible for downloading files and saving them to a specified directory. In this context, the edge execution agent can also be understood as a service deployed on an edge node.

[0197] A file caching server is used to cache temporary files and provide file download services.

[0198] File server: It is responsible for the persistent storage of distributed files and provides third-party access services.

[0199] The file distribution system provided in this embodiment offers an API interface service for third-party calls; this function is primarily handled by the central service. The API interface service further includes the following functions:

[0200] (1) Interface verification and authentication service: to ensure the legality and security of user calls to interfaces;

[0201] (2) Task link status tracking: task creation, task issuance, and task completion;

[0202] (3) Task result callback function: Based on the callback interface set by the user, the result will be fed back to the user at a specified time or after the task is completed.

[0203] The file distribution system provided in this embodiment of the invention, through the above functions, not only provides services to the outside world, but also ensures the security and reliability of the system.

[0204] The file distribution system provided in this embodiment of the invention decentralizes the file distribution command service to the management machine of the edge cluster (consisting of two management machines, a primary and a backup), thereby reducing the pressure on the central service and shortening network links. Since the management machine and the managed edge machines are on the same network segment, this feature allows commands from the edge machines to be decentralized to the management machine, with the nearest management machine responsible for distributing file download commands. This effectively saves network transmission time, reduces the pressure on the central service, and enhances the reliability and efficiency of the system.

[0205] It should be noted that the hierarchical large-scale network file distribution system provided in this embodiment of the invention is based on the existing distribution of CND edge nodes and combined with the needs of CDN services to distribute files across the entire network on a large scale and distribute configuration files to some newly deployed clusters. It proposes a direct push method for small files and small-scale machines, and a method of pre-warming and local scheduling for large-scale network files to achieve rapid file distribution.

[0206] Among them, based on the current distribution characteristics of CDN edge machines across the entire network, such as Figure 7A and Figure 7B As shown, Figure 7A This is a schematic diagram of the distribution of machines across the entire network provided by an embodiment of the present invention. Figure 7B This is a schematic diagram of edge cluster machine distribution provided in an embodiment of the present invention.

[0207] like Figure 7A and Figure 7B As shown, the CDN's network of machines is distributed as follows: central clusters are set up in each major region, and smaller clusters are set up within each major region based on province. All edge machines are managed within these smaller clusters, and each cluster has two primary and backup management machines serving as service centers. Specifically,

[0208] like Figure 7A As shown, this includes central clusters, major regional central clusters, and provincial-level administrative division clusters. The central cluster example includes the Guizhou central cluster. The major regional central clusters include: North China Cluster, South China Cluster, Northeast Cluster, East China Cluster, Central China Cluster, Southwest Cluster, and Northwest Cluster. The provincial-level administrative division clusters include: North China Cluster (including Beijing and Inner Mongolia), South China Cluster (including Fujian and Guangdong), Northwest Cluster (including Qinghai and Gansu), etc. These will not be listed individually in this implementation.

[0209] like Figure 7B As shown, this embodiment takes the Fujian cluster as an example, which includes a primary management machine (i.e., the main management machine) and a backup management machine (i.e., the standby management machine), as well as multiple edge machines (i.e., edge execution agents of the boundary nodes) responsible for management. Typically, each cluster includes two management machines, such as when the primary management machine fails, the backup management machine is activated. However, in actual applications, it is not limited to this.

[0210] This invention, leveraging the characteristics of CDN machine nodes, improves a hierarchical file distribution system by decentralizing distribution command services to the management machines of each cluster. This enables hierarchical command distribution, optimizes the transmission links of distribution commands, significantly reduces the pressure on the central node, and achieves rapid large-scale file distribution to designated nodes, alleviating the pressure on the origin server, saving transmission time, and reducing network consumption. The modified file distribution system architecture can flexibly expand distribution machines while ensuring system stability. It improves the file distribution speed and reduces network bandwidth consumption. For large files and large-scale machine distribution, the system provides a file preheating function; for small files and small-scale machine distribution, it employs a small file direct push function. Combined with a proximity scheduling strategy for distribution commands, it reduces command and file download links, significantly improving file distribution speed.

[0211] Optionally, embodiments of the present invention also provide an electronic device, comprising:

[0212] processor;

[0213] Memory used to store the processor's executable instructions;

[0214] The processor is configured to execute the instructions to implement the file distribution method described above.

[0215] Optionally, embodiments of the present invention also provide a computer-readable storage medium, wherein when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is able to perform the file distribution method described above.

[0216] Optionally, embodiments of the present invention also provide a computer program product, including a computer program or instructions, which, when executed by a processor of an electronic device, implement the file distribution method described above.

[0217] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0218] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0219] Figure 8 This is a block diagram of an electronic device 800 provided in an embodiment of the present invention. For example, the electronic device 800 can be a mobile terminal or a server; in this embodiment, a mobile terminal is used as an example for explanation. For example, the electronic device 800 can be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0220] Reference Figure 8 The electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0221] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.

[0222] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0223] Power supply component 806 provides power to various components of electronic device 800. Power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.

[0224] Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0225] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.

[0226] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0227] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0228] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, carrier networks (such as 2G, 3G, 4G, or 5G), or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0229] In an embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the file distribution method described above.

[0230] In this embodiment, a computer-readable storage medium is also provided, which, when executed by a processor of an electronic device, enables the electronic device 800 to perform the file distribution method described above. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.

[0231] In one embodiment, a computer program product is also provided, including a computer program or instructions that, when executed by the processor 820 of the electronic device 800, cause the electronic device 800 to perform the file distribution method described above.

[0232] Figure 9 This is a block diagram of a file distribution apparatus 900 provided in an embodiment of the present invention. For example, apparatus 900 may be provided as a server. (See also...) Figure 9 The apparatus 900 includes a processing component 922, which further includes one or more processors, and memory resources represented by memory 932 for storing instructions, such as application programs, that can be executed by the processing component 922. The application programs stored in memory 932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 922 is configured to execute instructions to perform the methods described above.

[0233] Device 900 may also include a power supply component 926 configured to perform power management of device 900, a wired or wireless network interface 950 configured to connect device 900 to a network, and an input / output (I / O) interface 958. Device 900 may operate on an operating system stored in memory 932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.

[0234] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.

[0235] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A file distribution method, characterized in that, The method is applied to the central service node and includes: Upon receiving a command to distribute a task, determine the current task's distribution mode; When the current task's distribution mode is a large-scale distribution mode, mark the current task's distribution mode as a large-scale distribution mode and store the current task's file data on the file server; The command for the marked distribution task is distributed to the first scheduling center in the scheduling center cluster, so that when the first scheduling center receives the command for the distribution task, it distributes the command for the distribution task to the corresponding distribution relay station in each relay cluster for scheduling according to the edge node corresponding to the distribution task. When the current task's distribution mode is a small-scale direct push mode, mark the current task's distribution mode as a small-scale direct push mode; The command for the marked distribution task and the file data of the current task are sent to the second scheduling center in the scheduling center cluster, so that when the second scheduling center receives the command for the distribution task, it can directly distribute the file data of the current task to the corresponding edge node. Upon receiving a command to distribute a task, determining the current task's distribution mode includes: When a command to distribute tasks is received, the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time are obtained. The current traffic volume is determined based on the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time. Based on the current traffic volume, determine whether the current task's distribution mode is a large-scale distribution mode or a small-scale direct push mode. The current traffic volume is determined based on the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time, including: Upon receiving the file distribution task command, the central service node calculates the current traffic Q based on the file size, the number of edge nodes to which the task is distributed, and the number of tasks in the current system within 1 minute. The calculation formula is as follows: in: Indicates the file size of the current task. This represents the target number of machines for the current task, and t represents the number of tasks within 1 minute. This represents the file size of the i-th task. Let represent the number of machines for the i-th task, where the number of task machines is the number of edge nodes.

2. A file distribution method, characterized in that, The method is applied to each scheduling center in the scheduling center cluster, including: Upon receiving a command from the central service node to distribute tasks, determine the current task distribution mode; When the current task is distributed in a large-scale distribution mode, determine the first distribution relay station in the relay cluster to which the edge node of the current task distribution belongs; Call the preheating interface of the file cache server of the first distribution relay station to obtain the file data of the current task from the file server and cache it on the file cache server; The command for the distribution task is distributed to the first distribution relay station, so that the first distribution relay station can send the command for the distribution task to the corresponding edge node, and the edge node can obtain the file data of the current task from the file cache server of the corresponding first distribution relay station; When the central service node receives a command to distribute tasks, it determines the current task distribution mode, including: When a command to distribute tasks is received, the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time are obtained. The current traffic volume is determined based on the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time. Based on the current traffic volume, determine whether the current task's distribution mode is a large-scale distribution mode or a small-scale direct push mode. The method further includes: When the current task is distributed in a small-scale direct push mode, determine the second distribution relay station in the relay cluster to which the edge node of the current task is directly pushed belongs; The command and file data of the distribution task are directly pushed to the second distribution relay station, so that the second distribution relay station can directly distribute the command and file data of the distribution task to the corresponding edge node, and the edge node can directly store the received file data of the current task in the specified directory. The current traffic volume is determined based on the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time, including: Upon receiving the file distribution task command, the central service node calculates the current traffic Q based on the file size, the number of edge nodes to which the task is distributed, and the number of tasks in the current system within 1 minute. The calculation formula is as follows: in: Indicates the file size of the current task. This represents the target number of machines for the current task, and t represents the number of tasks within 1 minute. This represents the file size of the i-th task. Let represent the number of machines for the i-th task, where the number of task machines is the number of edge nodes.

3. A file distribution device, characterized in that, The device is applied to the central service node and includes: The determination module is used to determine the current task distribution mode when a task distribution command is received; The first marking module is used to mark the current task's distribution mode as a large-scale distribution mode when the current task's distribution mode is a large-scale distribution mode, and to store the current task's file data on a file server. The first distribution module is used to distribute the command of the marked distribution task to the first scheduling center in the scheduling center cluster, so that when the first scheduling center receives the command of the distribution task, it distributes the command of the distribution task to the distribution relay station in each relay cluster for scheduling according to the edge node corresponding to the distribution task. The second marking module is used to mark the current task's distribution mode as a small-scale direct push mode when the current task's distribution mode is a small-scale direct push mode. The second distribution module is used to send the marked distribution task command and the file data of the current task to the second scheduling center in the scheduling center cluster, so that when the second scheduling center receives the distribution task command, it can directly distribute the file data of the current task to the corresponding edge node. The apparatus is further configured to determine the current task distribution mode upon receiving a task distribution command, including: When a command to distribute tasks is received, the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time are obtained. The current traffic volume is determined based on the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time. Based on the current traffic volume, determine whether the current task's distribution mode is a large-scale distribution mode or a small-scale direct push mode. The device is further configured to determine the current traffic volume based on the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time, including: Upon receiving the file distribution task command, the central service node calculates the current traffic Q based on the file size, the number of edge nodes to which the task is distributed, and the number of tasks in the current system within 1 minute. The calculation formula is as follows: in: Indicates the file size of the current task. This represents the target number of machines for the current task, and t represents the number of tasks within 1 minute. This represents the file size of the i-th task. Let represent the number of machines for the i-th task, where the number of task machines is the number of edge nodes.

4. A document distribution device, characterized in that, The device is applied to each dispatch center in the dispatch center cluster, including: The mode determination module is used to determine the current task distribution mode when it receives a task distribution command from the central service node. The first relay determination module is used to determine the first distribution relay station in the relay cluster to which the edge node of the current task distribution belongs when the mode determination module determines that the current task distribution mode is a large-scale distribution mode. The calling module is used to call the preheating interface of the file cache server of the first distribution relay station, obtain the file data of the current task from the file server, and cache it on the file cache server; The first distribution module is used to distribute the command of the distribution task to the first distribution relay station, so that the first distribution relay station can send the command of the distribution task to the corresponding edge node, and the edge node can obtain the file data of the current task from the file cache server of the corresponding first distribution relay station. When the central service node receives a command to distribute tasks, it determines the current task distribution mode, including: When a command to distribute tasks is received, the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time are obtained. The current traffic volume is determined based on the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time. Based on the current traffic volume, determine whether the current task's distribution mode is a large-scale distribution mode or a small-scale direct push mode. The device is also used to determine the second distribution relay station in the relay cluster to which the edge node of the current task direct push belongs when the current task distribution mode is small-scale direct push mode. The command and file data of the distribution task are directly pushed to the second distribution relay station, so that the second distribution relay station can directly distribute the command and file data of the distribution task to the corresponding edge node, and the edge node can directly store the received file data of the current task in the specified directory. The current traffic volume is determined based on the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time, including: Upon receiving the file distribution task command, the central service node calculates the current traffic Q based on the file size, the number of edge nodes to which the task is distributed, and the number of tasks in the current system within 1 minute. The calculation formula is as follows: in: Indicates the file size of the current task. This represents the target number of machines for the current task, and t represents the number of tasks within 1 minute. This represents the file size of the i-th task. Let represent the number of machines for the i-th task, where the number of task machines is the number of edge nodes.

5. A file distribution system, characterized in that, The system includes: a central service node, a file server, a scheduling center cluster, a distribution relay cluster, and a file caching service cluster, wherein... The central service node is configured to, upon receiving a command to distribute a task, determine the current task's distribution mode; if the current task's distribution mode is a large-scale distribution mode, mark the current task's distribution mode as a large-scale distribution mode, store the current task's file data on a file server, and distribute the marked task distribution command to the first scheduling center in the scheduling center cluster; or, if the current task's distribution mode is determined to be a small-scale direct push mode, mark the current task's distribution mode as a small-scale direct push mode in the command; and distribute the marked task distribution command and the current task's file data to the second scheduling center in the scheduling center cluster. The file server is used to store file data sent by the central service node and to provide external download functionality; Each scheduling center in the scheduling center cluster is used to determine the current task's distribution mode when it receives a task distribution command from the central service node; when the current task's distribution mode is a large-scale distribution mode, it determines the first distribution relay station in the distribution relay cluster to which the edge node of the current task distribution belongs; calls the preheating interface of the file cache server of the first distribution relay station to obtain the file data of the current task from the file server; and distributes the task distribution command to the first distribution relay station; or, when the current task's distribution mode is determined to be a small-scale direct push mode, it determines the second distribution relay station in the distribution relay cluster to which the edge node of the current task direct push belongs; and directly pushes the task distribution command and the file data to the second distribution relay station. Each file cache server in the file cache service cluster is used to provide a preheating interface for the distribution relay station in the corresponding relay cluster, temporarily cache the file data of the current task obtained from the file server, and provide download services; Each distribution relay station in the distribution relay cluster is configured to, upon receiving a distribution task command from the corresponding scheduling center, forward the command to the corresponding edge node so that the edge node can retrieve the file data of the current task from the file cache server of the corresponding first distribution relay station; or, upon receiving the distribution task command and the file data from the corresponding scheduling center, directly forward the distribution task command and the file data to the corresponding edge node, and the edge node directly stores the received file data of the current task in a specified directory. When the central service node receives a command to distribute tasks, it determines the current task distribution mode, including: When a command to distribute tasks is received, the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time are obtained. The current traffic volume is determined based on the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time. Based on the current traffic volume, determine whether the current task's distribution mode is a large-scale distribution mode or a small-scale direct push mode. The current traffic volume is determined based on the file size of the current task, the number of edge nodes of the current task, and the number of tasks per unit time, including: Upon receiving the file distribution task command, the central service node calculates the current traffic Q based on the file size, the number of edge nodes to which the task is distributed, and the number of tasks in the current system within 1 minute. The calculation formula is as follows: in: Indicates the file size of the current task. This represents the target number of machines for the current task, and t represents the number of tasks within 1 minute. This represents the file size of the i-th task. Let represent the number of machines for the i-th task, where the number of task machines is the number of edge nodes.

6. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the file distribution method as described in any one of claims 1 to 2.

7. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the file distribution method as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Edge server management system and method for CDN network

    CN109104309A

  • File downloading method and system, computing equipment and storage medium

    CN116506421A

  • System and method for file distribution, and recording medium

    JP2001014228A