File obtaining and scheduling method and device

Through collaboration between edge nodes, when the target edge node detects that only partial fragment data is stored, it first retrieves the missing data from neighboring nodes and returns it to the client, solving the problem of excessive back-to-origin traffic from the origin server and achieving faster data retrieval speed.

CN121864872APending Publication Date: 2026-04-14SHANGHAI BILIBILI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-02
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In an edge computing architecture, when large files are fragmented and stored on different edge nodes, clients need to retrieve unstored fragmented data from the origin server when retrieving files, resulting in a large amount of backhaul traffic from the origin server and increasing network load.

Method used

The target edge node checks whether it stores all the fragment data. If it only stores part of the data, it first requests the missing fragment data from other edge nodes and sends the fragment data returned by the local node and other edge nodes to the client, reducing the back-to-origin traffic to the origin server.

Benefits of technology

By reducing the backhaul traffic to the origin server, the data transmission path and latency are shortened, thereby improving the data acquisition speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121864872A_ABST
    Figure CN121864872A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a file obtaining method and device, a file scheduling method and device, a content distribution network, computer equipment, a computer readable storage medium and a computer program product, and belongs to the technical field of servers. The method comprises the following steps: receiving a file acquisition request sent by a client, wherein the file acquisition request is used for acquiring at least one piece of target fragment data of a target file; detecting whether the target edge node stores all target fragment data corresponding to the file acquisition request or not; under the condition that only a part of the target fragment data is stored in the target edge node, requesting other edge nodes to obtain missing target fragment data; and returning part of the target fragment data stored in the target edge node and the target fragment data returned by other edge nodes to the client. According to the technical scheme of the embodiment of the invention, the flow back to the source station can be greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of server technology, and in particular to a file acquisition and scheduling method, apparatus, content delivery network, computer equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] With the rapid development of IoT, cloud computing and distributed storage technologies, edge computing architecture is widely used in scenarios such as file distribution and video on demand because it can push data processing tasks to edge nodes closer to the user side, effectively reducing network transmission latency and saving core network bandwidth.

[0003] In edge computing architectures, large files are typically split into multiple fragments and distributed across different edge nodes. When a client retrieves a file, it usually sends a file retrieval request to the nearest edge node. Upon receiving the request, if the edge node does not have all the target fragments stored within it, it typically requests the missing fragments from the origin server, resulting in high backhaul traffic to the origin server.

[0004] It should be noted that the above content is not necessarily prior art, nor is it intended to limit the scope of patent protection of this application. Summary of the Invention

[0005] This application provides a file acquisition and scheduling method, apparatus, content delivery network, computer device, computer-readable storage medium, and computer program product to solve or alleviate one or more of the technical problems mentioned above.

[0006] One aspect of this application provides a file acquisition method applied to a target edge node, the method comprising:

[0007] Receive a file retrieval request sent by a client, the file retrieval request being used to retrieve at least one target fragment of a target file; Detect whether the target edge node stores all target fragment data corresponding to the file acquisition request; If only a portion of the target fragment data is stored in the target edge node, request the missing target fragment data from other edge nodes. The target fragment data stored in the target edge node and the target fragment data returned by the other edge nodes are returned to the client.

[0008] Optionally, requesting the missing target fragment data from other edge nodes includes: The neighboring edge nodes that store missing target fragment data are determined based on the local integrity view maintained in the target edge node. The local integrity view records the integrity information of all files stored by each neighboring edge node. The integrity information includes the file's identification information and the storage information of the file's fragment data. The neighboring edge nodes are edge nodes that have established a connection with the target edge node, and the determined neighboring edge nodes are referred to as the other edge nodes. Request the missing target fragment data from the identified neighbor edge nodes.

[0009] Optionally, the method further includes: If requests to other edge nodes fail, a request will be made to the origin server to retrieve all missing target fragment data. The target fragment data returned by the source station is returned to the client. The failure of the request refers to the inability to obtain all missing target fragment data from the other edge nodes.

[0010] Optionally, the method further includes: If the missing target fragment data is obtained from the other edge nodes, request the source station to obtain the remaining missing target fragment data; The target fragment data returned by the source station is returned to the client. The missing remaining target fragment data refers to the missing target fragment data that cannot be obtained from the other edge nodes.

[0011] Optionally, the method further includes: After obtaining the target fragment data returned by the other edge nodes or the source station, it is stored in the target edge node; The local integrity table is updated. The local integrity table records the integrity information of all files stored in the target edge node. The integrity information includes the file's identification information and the storage information of the file's fragment data.

[0012] Optionally, the method further includes: The integrity information of the changed file is synchronized to neighboring edge nodes, where the neighboring edge nodes are other edge nodes that have established a connection with the target edge node. The integrity information of the changed files is reported to the dispatch center.

[0013] Optionally, the target edge node establishes connections with each of its neighboring edge nodes in the following manner: The target edge node registers with the service discovery component, wherein the registration information includes the node address of the target edge node; The target edge node obtains an edge node list from the service discovery component, the edge node list including the node addresses of multiple neighboring edge nodes; The target edge node establishes connections with each of its neighboring edge nodes one by one based on the node addresses of each neighboring edge node.

[0014] Another aspect of this application provides a file scheduling method applied in a scheduling center, the method comprising: Receive a file retrieval request sent by a client, the file retrieval request being used to retrieve at least one target fragment of a target file; The global integrity view is queried according to the file acquisition request. The target edge node is determined according to the node table of multiple edge nodes contained in the global integrity view. The node table of each edge node includes the node information of the edge node and the integrity information of all files stored in the edge node. The integrity information includes the file identification information and the storage information of the file's fragment data. The node address of the target edge node is returned to the client.

[0015] Optionally, determining the target edge node based on the node table of multiple edge nodes included in the global integrity view includes: The target edge node is determined based on the integrity information of all files stored at each edge node; Among the multiple edge nodes, the target edge stores the largest number of target fragment data.

[0016] Optionally, the node information includes load information, and determining the target edge node based on the node table of multiple edge nodes included in the global integrity view includes: Based on the integrity information of all files stored in each edge node, multiple candidate edge nodes are selected from multiple edge nodes, wherein each candidate edge node stores at least one target fragment data; The target edge node is selected from multiple candidate edge nodes based on the load information of each candidate edge node.

[0017] Another aspect of this application provides a file acquisition device applied to a target edge node, the device comprising: The receiving module is used to receive a file acquisition request sent by the client, wherein the file acquisition request is used to acquire at least one target fragment of the target file; The detection module is used to detect whether the target edge node stores all target fragment data corresponding to the file acquisition request; The request module is used to request the missing target fragment data from other edge nodes when only a portion of the target fragment data is stored in the target edge node. The return module is used to return a portion of the target fragment data stored in the target edge node and the target fragment data returned by other edge nodes to the client.

[0018] Another aspect of this application provides a file scheduling apparatus applied in a scheduling center, the apparatus comprising: The receiving module is used to receive a file acquisition request sent by the client, wherein the file acquisition request is used to acquire at least one target fragment of the target file; The determination module is used to query the global integrity view according to the file acquisition request, and determine the target edge node according to the node table of multiple edge nodes contained in the global integrity view. The node table of each edge node includes the node information of the edge node and the integrity information of all files stored in the edge node. The integrity information includes the file's identification information and the storage information of the file's fragment data. The return module is used to return the node address of the target edge node to the client.

[0019] Another aspect of this application provides a content delivery network, including: Multiple edge nodes, each edge node is used to execute the file acquisition method described above; The scheduling center is used to execute the file scheduling method described above; A service discovery component is used for edge nodes to register and to provide the edge nodes with a list of edge nodes, which includes the node addresses of multiple neighboring edge nodes; The origin server is used to respond to the origin requests from the edge nodes and return the requested fragment data to the edge nodes.

[0020] Another aspect of this application provides a computer device, including: At least one processor; and A memory that is communicatively connected to the at least one processor; Wherein: the memory stores instructions that can be executed by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method as described above.

[0021] Another aspect of this application provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the method described above.

[0022] Another aspect of this application provides a computer program product including a computer program that, when executed by a processor, implements the method described above.

[0023] The embodiments of this application employing the above-described technical solution may have the following advantages: Upon receiving a file retrieval request from a client, the target edge node first checks whether it stores all target fragment data. If only a portion of the target fragment data is stored, it does not directly forward the request to the origin server. Instead, it first requests the missing target fragment data from other edge nodes. Finally, it returns the partial fragment data stored in the target edge node along with the fragment data returned by other edge nodes to the client, thereby significantly reducing the traffic sent back to the origin server. Furthermore, since the physical transmission distance between edge nodes is much shorter than the distance between the edge node and the origin server, the data transmission path and latency are effectively shortened, improving data retrieval speed. Attached Figure Description

[0024] The accompanying drawings exemplify embodiments and form part of the specification, serving together with the textual description to explain exemplary implementations of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0025] Figure 1 This diagram schematically illustrates the operating environment of the file acquisition or file scheduling method according to Embodiment 1 of this application; Figure 2 A flowchart illustrating a document acquisition method according to Embodiment 1 of this application is shown schematically. Figure 3 Schematic illustration Figure 2 Detailed flowchart of step S204; Figure 4 The flowchart illustrating the additional steps of the document acquisition method according to Embodiment 1 of this application is shown in the schematic diagram. Figure 5 The flowchart illustrating the additional steps in the document acquisition method according to Embodiment 1 of this application is shown in the schematic diagram. Figure 6 The flowchart illustrating the additional steps of the document acquisition method according to Embodiment 1 of this application is shown in the schematic diagram. Figure 7 The flowchart illustrating the additional steps in the document acquisition method according to Embodiment 1 of this application is shown in the schematic diagram. Figure 8 This schematically illustrates the flowchart of the steps for establishing connections between the target edge node and each of its neighboring edge nodes; Figure 9A flowchart illustrating a file scheduling method according to Embodiment 2 of this application is shown schematically; Figure 10 Schematic illustration Figure 9 Flowchart of step S902; Figure 11 A block diagram of a document acquisition apparatus according to Embodiment 3 of this application is shown schematically; Figure 12 A block diagram of a file scheduling apparatus according to Embodiment 4 of this application is shown schematically; Figure 13 The diagram illustrates the architecture of a content delivery network according to Embodiment 5 of this application. Figure 14 A schematic diagram of the hardware architecture of a computer device according to Embodiment Six of this application is shown. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0027] It should be noted that the descriptions involving "first," "second," etc., in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0028] It should be noted that, in any stage of this application involving the collection, storage, use, transmission, and processing of data, each stage strictly adheres to the laws, regulations, industry standards, and regulatory requirements of the data source, usage location, and relevant countries and regions to ensure the legality and compliance of data activities. In the collection stage, the purpose, method, and scope of collection are clearly communicated to the data subject in a prominent manner. Collection is conducted only after obtaining the data subject's legal authorization, ensuring that the collection process follows the "minimum necessary" principle and does not exceed the scope of data collection. In the storage stage, storage periods are limited, and data is promptly deleted or anonymized / encrypted after the storage purpose is achieved. In the usage stage, a strict data security protection mechanism is implemented, using field-level desensitization technology and processing the original data according to preset desensitization rules. For different types of data, multiple desensitization strategies, such as data generalization, data anonymization, and data encryption, are employed to effectively mitigate the risk of sensitive information leakage and ensure that all data used is securely processed and desensitized, comprehensively protecting the rights and interests of data subjects and data security. In the transmission and processing stages, the confidentiality and security of data are ensured during transmission and processing.

[0029] In the description of this application, it should be understood that the numerical labels before the steps do not indicate the order of the steps, but are only used to facilitate the description of this application and to distinguish each step, and therefore should not be construed as a limitation of this application.

[0030] First, a definition of the terminology used in this application is provided: CDN (Content Delivery Network): A technology that improves user access speed, reduces bandwidth consumption, and increases concurrent capacity by deploying nodes at the network edge to cache website static resources closer to users.

[0031] Consistent Hashing: A special type of hashing algorithm. This algorithm maps the hash value space to a virtual ring structure and uses a clockwise search mechanism to locate nodes. This means that when adding or removing servers, only a small portion of the data on the ring needs to be relocated, satisfying the requirements of balance, monotonicity, and dispersion.

[0032] Secondly, to facilitate understanding of the technical solutions provided in the embodiments of this application by those skilled in the art, the relevant technologies are described below: In edge computing architectures, large files are typically split into multiple fragments and distributed across different edge nodes. When a client retrieves a file, it usually sends a file retrieval request to the nearest edge node. Upon receiving the request, if the target edge node does not store all the target fragments, it typically requests the missing fragments from the origin server, resulting in high backhaul traffic to the origin server.

[0033] Therefore, this application provides a technical solution for a file acquisition method. In this solution, after receiving a file acquisition request from a client, the target edge node first checks whether all target fragment data is stored. If only part of the target fragment data is stored, the request is not forwarded to the origin server. Instead, it directly requests the missing target fragment data from other edge nodes. Finally, the partially stored fragment data and the fragment data returned by other edge nodes are returned to the client, thereby significantly reducing the traffic sent back to the origin server. Furthermore, since the physical transmission distance between edge nodes is much smaller than the distance between the edge node and the origin server, the data transmission path and waiting latency can be effectively shortened, improving the data acquisition speed. See below for details.

[0034] Finally, for ease of understanding, an exemplary operating environment is provided below.

[0035] like Figure 1 As shown in the diagram, the runtime environment includes: Service Platform 2, Network 4, and Client 6, where: Service platform 2 can consist of one or more computing devices. These computing devices may include virtualized computing instances. Virtualized computing instances may include virtual machines, such as emulations of computer systems, operating systems, servers, etc. The computing devices can load virtual machines based on virtual images and / or other data that define specific software used for emulation (e.g., operating systems, dedicated applications, servers). As the demand for different types of processing services changes, different virtual machines can be loaded and / or terminated on one or more computing devices. A hypervisor can be implemented to manage the use of different virtual machines on the same computing device.

[0036] Service platform 2 can be configured to communicate with clients 6, etc., via network 4. Network 4 includes various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and / or similar devices. Network 4 may include physical links, such as coaxial cable links, twisted pair cable links, fiber optic links, or combinations thereof, or wireless links, such as cellular links, satellite links, Wi-Fi links, etc.

[0037] Service platform 2 can provide services such as storage, reading, writing, querying, and deletion, such as running file retrieval method models or providing file retrieval method services to clients.

[0038] Client 6 can be an electronic device running operating systems such as Windows, Android™, or iOS, including smartphones, tablets, laptops, virtual reality devices, gaming devices, set-top boxes, in-vehicle terminals, and smart TVs. Based on these operating systems, various applications can run, such as applications for file retrieval methods.

[0039] Client 6 can provide / configure user access pages for controlling service platform 2 or uploading objects, etc.

[0040] It should be noted that the above-mentioned equipment is exemplary, and the number and type of equipment can be adjusted in different scenarios or according to different needs.

[0041] The technical solution of this application will be described below through multiple embodiments, using service platform 2 as the implementing entity. It should be understood that these embodiments can be implemented in many different forms and should not be construed as being limited to the embodiments described herein.

[0042] Example 1 Figure 2 A flowchart illustrating a document acquisition method according to Embodiment 1 of this application is shown schematically.

[0043] In this embodiment, the file acquisition method is applied to a target edge node, which is an edge node in the content delivery network used to process file acquisition requests sent by clients. The content delivery network comprises several distributed edge nodes, each of which pre-stores partial fragments of a large file (e.g., 1MB per fragment). Communication connections are established between the edge nodes to enable the interactive transmission of fragmented data.

[0044] It's important to note that when storing fragmented files, each edge node can concatenate the filename, start address, end address, and total file size into a string, calculate a hash value, and determine which disk (or storage path) on the edge node to store it. The edge node also records metadata for each fragment, such as the fragment key, file ID, and offset.

[0045] like Figure 2 As shown, the method may include steps S200~S206, wherein: Step S200: Receive a file retrieval request sent by the client, the file retrieval request being used to retrieve at least one target fragment of the target file.

[0046] Step S202: Detect whether the target edge node stores all target fragment data corresponding to the file acquisition request.

[0047] Step S204: If only part of the target fragment data is stored in the target edge node, request the missing target fragment data from other edge nodes.

[0048] Step S206: Return a portion of the target fragment data stored in the target edge node and the target fragment data returned by the other edge nodes to the client.

[0049] Upon receiving a file retrieval request from a client, the target edge node first checks whether it stores all target fragment data. If only a portion of the target fragment data is stored, instead of directly forwarding the request to the origin server, it first requests the missing target fragment data from other edge nodes. Finally, it returns the partial fragment data stored in the target edge node along with the fragment data returned by other edge nodes to the client, thereby significantly reducing the traffic sent back to the origin server. Furthermore, since the physical transmission distance between edge nodes is much shorter than the distance between the edge node and the origin server, the data transmission path and latency are effectively shortened, improving data retrieval speed.

[0050] The following combination Figure 2 The steps in steps S200 to S206, as well as other optional steps, are described in detail.

[0051] Step S200 The system receives a file retrieval request sent by the client, the file retrieval request being used to retrieve at least one target fragment of the target file.

[0052] In this embodiment, the client can establish a connection with the target edge node based on the node address returned by the scheduling center, and then initiate a file retrieval request to the target edge node after the connection is established. The file retrieval request can be for retrieving partial data of the target file or for retrieving all data of the target file. The file retrieval request may carry the target file's identification information (such as file ID, file hash value) and the requested range of the target file, indicating at least one target fragment of data that needs to be retrieved. The target edge node receives the request through a preset communication interface (such as a TCP / IP interface, a dedicated edge node interaction interface) and parses the target file identification information and range data in the request.

[0053] The requested range can be determined by the file's byte offset range, typically in the format [start byte]-[end byte], where the byte count starts from 0. For example, if the total file size is 3MB (3,145,728 bytes), a client requesting 0-1048,575 means requesting the range of data from the 1st to the 104,857th byte of the file.

[0054] It should be noted that the target fragment data in this embodiment can be a complete fragment file or a portion of the data in a complete fragment file.

[0055] Step S202 Detect whether the target edge node stores all target fragment data corresponding to the file acquisition request.

[0056] In this embodiment, the target edge node can retrieve a local integrity table maintained in its own memory to determine whether it stores all target fragment data corresponding to the file retrieval request. The local integrity table records the integrity information of all files stored by the target edge node. This integrity information includes file identification information (e.g., file ID) and storage information of the file's fragment data. The storage information may include the file ID of the fragment file to which the fragment data belongs, the byte range of the fragment data (start address, end address), storage address, fragment verification information, fragment version number, fragment data size, update time, etc.

[0057] The integrity information may also include the integrity of the file (number of cached fragments / total number of fragments).

[0058] In a specific scenario, the target edge node can perform a matching query in the local integrity table based on the parsed target file's identifier information to determine whether all target fragment data corresponding to the file retrieval request are stored locally. The entire process can include the following three steps: Step 1: Check if the target file exists in the local integrity table.

[0059] Using the target file's identifier as the search key, the local integrity table is searched for a record of the target file. If no record of the target file is found, it can be determined that "the target file does not exist locally," and the origin retrieval process will be triggered. If a record of the target file is found, the process can proceed to the next step, "range matching."

[0060] Step 2: Check if the shard data corresponding to the requested range exists.

[0061] If the target file exists in the local integrity table, the local integrity table will record the storage information of the target file's fragment data (including the file ID of the fragment file to which the fragment data belongs, the byte range of each fragment data, the storage path, etc.). The node performs an exact match based on the "range dimension" to find the corresponding fragment data. Specifically, by comparing the request range in the client request with the byte range of all fragment data of the target file in the local integrity table, the following three typical matching results can be obtained: Exact match: If the requested range is exactly equal to the complete range of one or more shard files (e.g., requesting bytes 0-1048575, and the local machine has shard data 0-1048575 bytes of shard file 1), then it can be determined that "the local machine has all the data corresponding to the request"; Partial matching: If the request range spans multiple fragment files (e.g., requesting 500,000-1,500,000 bytes, and the local machine has fragment data 0-1,048,575 bytes of fragment data from fragment file 1, but no fragment data from fragment file 2 (1,048,576-2,097,151 bytes)), then it can be determined that "only partial data is available locally". No match: If the data corresponding to the requested range is not recorded in the local integrity table (e.g., requesting shard file 3, but only shard files 1 and 2 are available locally), then it can be determined that "there is no data for this range locally".

[0062] Step 3: Verify the validity of the sharded data (e.g., version and integrity verification).

[0063] In this implementation, even after range matching is completed, the node still needs to verify the validity of the sharded data to avoid returning expired or corrupted data.

[0064] Version verification refers to whether the latest version number of the compared shard data is consistent with the version number of the local shard data. Only if the versions are consistent is it considered valid.

[0065] Integrity verification refers to comparing the hash value of the fragmented data stored in the local integrity table with the hash value of the recalculated fragmented data. If the two match, it is confirmed that the fragmented data has not been tampered with or damaged.

[0066] Step S204 If only a portion of the target fragment data is stored in the target edge node, the missing target fragment data is requested from other edge nodes.

[0067] If the target edge node is determined to store only a portion of the target fragment data, the target edge node can filter out other edge nodes storing the missing fragment data based on the node topology information of the edge computing architecture. This can be achieved in two ways: First, the target edge node broadcasts a query request for the missing shard data to all edge nodes in the cluster, and the node storing the corresponding shard data responds proactively. Secondly, the target edge node pre-maintains a local integrity view, which records the integrity information of all files stored by each neighboring edge node. This integrity information includes file identification information and storage information of the file's fragment data. The identified neighboring edge nodes are designated as the other edge nodes. Thus, by querying this local integrity view, it is possible to identify which edge nodes have missing fragment data. Then, a targeted request can be sent to the identified edge nodes to retrieve the missing fragment data.

[0068] The target edge node sends a fragment data retrieval request to the other selected edge nodes. The request carries the file ID of the fragment file to which the missing fragment data belongs and the file ID of the target file. After receiving the request, the other edge nodes verify the validity of the request. If the verification is successful, they retrieve the corresponding fragment data stored locally and return the data to the target edge node.

[0069] In one embodiment, when the target edge node stores all target fragment data corresponding to the file retrieval request, all target fragment data will be directly returned to the client.

[0070] In one embodiment, if the target edge node does not store any target fragment data corresponding to the file retrieval request, then it will directly retrieve all target fragment data corresponding to the file retrieval request from the origin server and return it to the client.

[0071] In an optional implementation, see [link to relevant documentation]. Figure 3 The step of requesting missing target fragment data from other edge nodes includes: Step S300: Determine the neighboring edge nodes that store the missing target fragment data based on the local integrity view maintained in the target edge node.

[0072] Step S302: Request the missing target fragment data from the identified neighbor edge nodes.

[0073] In this embodiment, the local integrity view records the integrity information of all files stored by each neighboring edge node. The integrity information includes the file's identification information and the storage information of the file's fragment data. The storage information may include the file ID of the fragment file to which the fragment data belongs, the byte range of the fragment data (start address, end address), storage address, fragment verification information, fragment version number, fragment data size, update time, etc.

[0074] The integrity information may also include the integrity of the file (number of cached fragments / total number of fragments).

[0075] In this embodiment, the target edge node, based on the local integrity view, matches the file ID of the fragment file to which the missing target fragment data to be acquired belongs with the storage information of the fragment data of each neighboring edge node in the view, filters out the neighboring edge nodes that store the corresponding missing fragment data, and uses these filtered neighboring edge nodes as other edge nodes.

[0076] As an example, if the missing fragment data of the target file is fragment 003 and fragment 005, after the target edge node queries the local integrity view, it finds that neighboring edge node A stores fragment 003 and neighboring edge node B stores fragment 005. Then, edge nodes A and B are determined to be the objects to be retrieved for this missing fragment.

[0077] Based on the filtering results, the target edge node sends targeted fragment retrieval requests to the determined neighbor edge nodes via P2P (point-to-point) to obtain the missing target fragment data. The request may carry information such as the target file identifier, the file ID of the fragment file to which the missing fragment data belongs, the byte range of the fragment data, and the data transmission protocol version.

[0078] Furthermore, to ensure the reliability of the request, the target edge node can carry authentication information in the request. After receiving the request, the neighboring edge node first verifies the legitimacy of the request. If the verification is successful, it retrieves the corresponding missing fragment data from its local storage and returns the data to the target edge node according to the preset transmission protocol.

[0079] In this embodiment, target neighbor edge nodes are filtered based on the local integrity view maintained by the target edge node to improve the efficiency and accuracy of acquiring missing fragment data.

[0080] In one implementation, the local integrity view can use three modes—timed synchronization, event-driven, and on-demand query—to synchronously update the integrity information of files in the local integrity view.

[0081] Scheduled synchronization: After a node caches a new shard, it periodically broadcasts a notification to neighboring edge nodes to update their local integrity view.

[0082] Event-driven: After a node caches a new shard, it generates an "integrity update event" and immediately notifies neighboring edge nodes to update their local integrity views.

[0083] On-demand query: A node proactively initiates a query request to neighboring edge nodes to obtain file integrity information and update its local integrity view.

[0084] Step S206 The target edge node stores a portion of the target fragment data, and the target fragment data returned by the other edge nodes are returned to the client.

[0085] In one implementation, after receiving the missing target fragment data returned by other edge nodes, the target edge node can integrate it with the partial target fragment data stored by the target edge node and complete the data reassembly according to the fragment order of the target file. Afterwards, the target edge node returns the integrated complete target fragment data to the client through the original communication interface, completing a file acquisition process.

[0086] In another implementation, after obtaining some target fragment data from other edge nodes, the target edge node can first return it to the client. Then, after receiving the missing target fragment data returned by other edge nodes, it can return it to the client.

[0087] In one implementation, when a target edge node requests a missing shard from other edge nodes, it can set a request timeout. If an edge node does not respond within the timeout period, the target edge node can automatically switch to another edge node that stores the same shard data to initiate the request, thereby improving the success rate of shard acquisition. At the same time, the target edge node can cache the missing shard data acquired this time and update its local integrity table so that when it receives the same shard data acquisition request in the future, it can directly retrieve the data from its local table, further improving response efficiency.

[0088] In an optional implementation, see [link to relevant documentation]. Figure 4 The method further includes: Step S400: If the request to the other edge nodes fails, request the source station to obtain all missing target fragment data, wherein the request failure means that it is impossible to obtain all missing target fragment data from the other edge nodes.

[0089] Step S402: Return the target fragment data returned by the source station to the client.

[0090] In this embodiment, the source site serves as the original source of the user's requirement file, and it pre-stores all the fragment data of the target file.

[0091] In this embodiment, the inability to obtain all missing target fragment data from the other edge nodes includes situations where the other edge nodes do not store all missing target fragment data; that is, the other edge nodes store some missing target fragment data, or the other edge nodes do not store any missing target fragment data. For example, the missing target fragment data includes fragment data 1 and fragment data 2, but the other edge nodes only store fragment data 1 and do not store fragment data 2.

[0092] In another embodiment, the inability to obtain all missing target fragment data from the other edge nodes also includes situations where, although the other edge nodes store all missing target fragment data, the process of requesting to obtain the missing target fragment data from other edge nodes fails. For example, the missing target fragment data includes fragment data 1 and fragment data 2, and the other edge nodes store fragment data 1 and fragment data 2, but the process of requesting to obtain fragment data 1 and / or fragment data 2 from other edge nodes fails due to some unexpected circumstances.

[0093] In this embodiment, if the request to other edge nodes fails, the pre-configured source station communication address and access protocol will be directly retrieved to send a targeted fragment retrieval request to the source station to obtain all missing target fragment data. The request may carry core information such as the unique identifier of the target file, the byte range of the missing fragment data, and the identifier of the target edge node, so that the source station can quickly locate and retrieve the corresponding fragment data.

[0094] After receiving a request from the target edge node, the origin server can verify the legality and validity of the request (such as verifying the node's identity and whether the target file exists). Once the verification is successful, the origin server retrieves all the missing target fragment data specified in the request and returns the data to the target edge node according to the preset transmission protocol.

[0095] After receiving the missing fragment data returned by the source station, the target edge node returns it to the client.

[0096] In this embodiment, by introducing the source station as the final acquisition channel for missing fragment data, the integrity and reliability of file acquisition can be guaranteed.

[0097] In one implementation, the target edge node can set a timeout threshold for the origin server request. If the origin server does not respond within the timeout threshold, it can re-initiate the request according to the preset retry policy, or send an alarm message to the administrator to avoid client request failure due to origin server response delay.

[0098] In an optional implementation, see [link to relevant documentation]. Figure 5 The method further includes: Step S500: If the missing target fragment data is obtained from the other edge nodes, request the source station to obtain the missing remaining target fragment data, wherein the missing remaining target fragment data refers to the missing target fragment data that cannot be obtained from the other edge nodes.

[0099] Step S502: Return the target fragment data returned by the source station to the client.

[0100] In this embodiment, when some target fragment data is stored in the target edge node and the missing target fragment data is obtained from the other edge nodes, the pre-configured source station communication address and access protocol will be retrieved to send a targeted fragment retrieval request to the source station to obtain the missing remaining target fragment data. The request may carry core information such as the unique identifier of the target file, the byte range of the missing fragment data, and the identifier of the target edge node, so that the source station can quickly locate and retrieve the corresponding fragment data.

[0101] It should be noted that when other edge nodes store missing target fragment data, the missing target fragment data will be retrieved from those other edge nodes first. Only when the missing target fragment data cannot be successfully retrieved from the other edge nodes will the missing target fragment data be requested from the origin server.

[0102] In this embodiment, fragmented data is obtained by combining edge node priority acquisition with source station backup, which ensures the integrity of file acquisition while maximizing the advantage of edge computing for nearby services.

[0103] In one implementation, the target edge node can set a timeout threshold for the origin server request. If the origin server does not respond within the timeout threshold, it can re-initiate the request according to the preset retry policy, or send an alarm message to the administrator to avoid client request failure due to origin server response delay.

[0104] In an optional implementation, see [link to relevant documentation]. Figure 6 The method further includes: Step S600: After obtaining the target fragment data returned by the other edge nodes or the source station, store it in the target edge node.

[0105] Step S602: Update the local integrity table. The local integrity table records the integrity information of all files stored in the target edge node. The integrity information includes the file's identification information and the storage information of the file's fragment data.

[0106] The storage information may include the file ID of the fragment file to which the fragment data belongs, the byte range of the fragment data (start address, end address), storage address, fragment verification information, fragment version number, fragment data size, update time, etc.

[0107] The integrity information may also include the integrity of the file (number of cached fragments / total number of fragments).

[0108] In this embodiment, after obtaining target fragment data returned by other edge nodes or the origin server, the obtained fragment data can be cached in the local disk of the target edge node, and the local integrity table maintained in the target edge node can be updated. This way, when a subsequent request to obtain the same file is received, the target edge node can directly retrieve the fragment data from its local target edge node without needing to send another request to other edge nodes or the origin server, further improving file retrieval efficiency.

[0109] In an optional implementation, see [link to relevant documentation]. Figure 7 The method further includes: Step S700: Synchronize the integrity information of the changed file to neighboring edge nodes, whereby the neighboring edge nodes are other edge nodes that have established connections with the target edge node.

[0110] Step S702: Report the integrity information of the changed files to the scheduling center.

[0111] The scheduling center is used to determine the target edge nodes to provide download services to clients.

[0112] In this embodiment, after the target edge node completes the update of its local integrity table, it will synchronize the integrity information of the changed files to the neighboring edge nodes, so that each neighboring edge node can update its local integrity view maintained in its local storage based on the integrity information.

[0113] In one implementation, the target edge node can immediately generate a change event after updating its local integrity table, so that the target edge node can immediately broadcast the integrity information of the changed file to each neighboring edge node via P2P based on the change event, thereby synchronizing the integrity information.

[0114] In another implementation, the target edge node can also periodically (e.g., every 30 seconds) broadcast the integrity information of the changed files to each neighboring edge node via P2P, thereby synchronizing the integrity information.

[0115] In this embodiment, after the target edge node completes the update of its local integrity table, it can immediately report the integrity information of the changed files to the scheduling center so that the scheduling center can update the global integrity view based on the integrity information.

[0116] In another implementation, the target edge node may also periodically (e.g., every 30 seconds) report the integrity information of the changed files to the scheduling center so that the scheduling center can update the global integrity view based on the integrity information.

[0117] It should be noted that in other implementations, the entire local integrity table can also be directly synchronized to neighboring edge nodes that have established a connection with the target edge node, and the entire local integrity table can be reported to the scheduling center.

[0118] In this embodiment, after the target edge node completes operations such as acquiring fragmented data, caching, or cleaning up invalidation, the local integrity information of the file will change. At this time, the changed information is synchronized to the neighboring edge nodes with established connections. This allows each neighboring node to update its maintained integrity view in real time, accurately grasp the fragmented storage status of the target edge node. When a neighboring node needs to acquire the corresponding fragment, it can directly initiate a request without traversing the cluster nodes through broadcast queries, which greatly reduces the interaction overhead and query latency between edge nodes and improves the scheduling efficiency of fragmented data within the edge cluster. At the same time, the changed integrity information is reported to the scheduling center, which allows the scheduling center to have a global grasp of the fragmented data distribution of the entire edge cluster. Based on this global data, combined with factors such as the load status and geographical location of each edge node, the scheduling center can optimize the initial distribution strategy of subsequent file fragments, avoiding the problem of fragmented data being overly concentrated on some nodes or the scarcity of fragmented resources in some areas, and achieving a balanced allocation of storage resources in the edge cluster.

[0119] In an optional implementation, refer to Figure 8 The target edge node establishes connections with each of its neighboring edge nodes in the following manner: In step S800, the target edge node registers with the service discovery component, wherein the registration information includes the node address of the target edge node.

[0120] In step S802, the target edge node obtains an edge node list from the service discovery component, the edge node list including the node addresses of multiple neighboring edge nodes.

[0121] In step S804, the target edge node establishes a connection with each neighboring edge node one by one according to the node address of each neighboring edge node.

[0122] In this embodiment, the service discovery component serves as a component for edge nodes to register and for providing a list of edge nodes. The service discovery component can be a standalone component or a functional component of the scheduling center.

[0123] In this embodiment, each edge node registers its node address and metadata with the service discovery component upon startup. The metadata includes the node ID, storage capacity, and current load status. The node address includes the IP address and port number.

[0124] After receiving a registration request, the service discovery component can verify the legitimacy of the node's identity. If the verification is successful, the registration information of the target edge node will be entered into the cluster node information database, and an available node record containing the node's address will be generated, thus completing the registration process.

[0125] In one implementation, after the target edge node completes registration, it can send a request to the service discovery component to obtain a list of neighboring nodes. The service discovery component treats all edge nodes in the node information database as multiple edge nodes that are compatible with the target edge node, generates a list of neighboring edge nodes containing the network addresses of these nodes, and returns it to the target edge node.

[0126] In another implementation, after the target edge node completes registration, it can send a request to the service discovery component to obtain a list of neighboring nodes. The service discovery component can filter multiple edge nodes that are compatible with the target edge node from the node information database based on preset neighbor node filtering rules (such as the principle of proximity based on node geographical distance, the principle of filtering based on node load threshold, and the principle of matching node service capabilities), generate a list of neighboring edge nodes containing the network addresses of these nodes, and return it to the target edge node.

[0127] The target edge node parses and obtains a list of neighboring edge nodes, extracts the node address of each neighboring edge node, and initiates connection establishment requests to each neighboring edge node in sequence according to a preset communication protocol (such as TCP protocol or edge node dedicated P2P communication protocol).

[0128] In this embodiment, node registration, node discovery, and connection establishment are completed through the service discovery component, ensuring the standardization and effectiveness of communication links between edge nodes.

[0129] Example 2 Figure 9 A flowchart illustrating a file scheduling method according to Embodiment 2 of this application is shown schematically.

[0130] In this embodiment, the file scheduling method is applied to a scheduling center, which is a functional system in a content delivery network used to determine the target edge nodes for providing download services to clients. In this embodiment, the scheduling center can perform comprehensive scheduling based on node load and integrity, or it can perform scheduling based solely on integrity.

[0131] like Figure 9 As shown, the method may include steps S900~S904, wherein: Step S900: Receive a file retrieval request sent by the client, the file retrieval request being used to retrieve at least one target fragment of the target file.

[0132] Step S902: Query the global integrity view according to the file acquisition request, and determine the target edge node according to the node table of multiple edge nodes contained in the global integrity view. The node table of each edge node includes the node information of the edge node and the integrity information of all files stored by the edge node. The integrity information includes the file identification information and the storage information of the file's fragment data.

[0133] Step S904: Return the node address of the target edge node to the client.

[0134] The file scheduling method provided in this embodiment, after receiving a file retrieval request from a client, does not blindly allocate edge nodes. Instead, it retrieves a pre-maintained global integrity view. This view integrates the node information of each edge node and the integrity information of all files stored on the edge node. Based on the target file's identification information and integrity information, the scheduling center can quickly match the edge node storing the corresponding target fragment data, select the optimal target edge node, and return its address to the client. This process abandons the traditional single strategy of "allocation based on proximity" and realizes intelligent scheduling based on file integrity awareness, improving the file hit rate, avoiding the client from making invalid requests to edge nodes without corresponding fragment data, reducing the overhead of invalid interaction between edge nodes and the client's request latency.

[0135] The following combination Figure 9 The steps in steps S900 to S904, as well as other optional steps, are described in detail.

[0136] Step S900 The system receives a file retrieval request sent by the client, the file retrieval request being used to retrieve at least one target fragment of the target file.

[0137] In this embodiment, the file acquisition request can be a request to acquire partial data of the target file or a request to acquire all data of the target file. The file acquisition request may carry the target file's identification information (such as file ID, file hash value) and the requested range of the target file, indicating at least one target fragment of data that needs to be acquired. The target edge node receives the request through a preset communication interface (such as a TCP / IP interface, a dedicated edge node interaction interface) and parses the target file identification information and range data in the request.

[0138] The requested range can be determined by the file's byte offset range, typically in the format [start byte]-[end byte], where the byte count starts from 0. For example, if the total file size is 3MB (3,145,728 bytes), a client requesting 0-1048,575 means requesting the range of data from the 1st to the 104,857th byte of the file.

[0139] It should be noted that the target fragment data in this embodiment can be a complete fragment file or a portion of the data in a complete fragment file.

[0140] Step S902 The system queries the global integrity view based on the file acquisition request, and determines the target edge node based on the node table of multiple edge nodes contained in the global integrity view. The node table of each edge node includes the node information of the edge node and the integrity information of all files stored by the edge node. The integrity information includes the file's identification information and the storage information of the file's fragment data.

[0141] The node information may include node name, node ID, node address, node load information, node network status, etc.

[0142] The integrity information includes the file's identification information (e.g., file ID) and the storage information of the file's fragmented data. The storage information may include the file ID of the fragmented file to which the fragmented data belongs, the byte range of the fragmented data (start address, end address), storage address, fragment verification information, fragment version number, fragmented data size, update time, etc.

[0143] The integrity information may also include the integrity of the file (number of cached fragments / total number of fragments).

[0144] The scheduling center can perform a matching query in the global integrity view based on the target file's identification information and the request range in the request, and filter out edge nodes that meet the following conditions as candidate edge nodes: the candidate edge node stores at least one target shard data to be acquired. Then, the scheduling center can select the optimal edge node from the candidate edge nodes as the target edge node corresponding to this file acquisition request according to a preset optimal node selection strategy (such as "shard integrity first, load balancing second, latency last").

[0145] It should be noted that when a matching query is performed based on the global completeness view and no edge node that meets the above conditions is found, the edge node with the lowest load can be directly selected as the target edge node.

[0146] In an optional implementation, determining the target edge node based on the node table of multiple edge nodes included in the global integrity view includes: The target edge node is determined based on the integrity information of all files stored at each edge node; Among the multiple edge nodes, the target edge stores the largest number of target fragment data.

[0147] In this embodiment, when selecting target edge nodes, the number of target fragment data that each edge node has is directly used as the selection criterion, thereby selecting the edge node with the most target fragment data as the target edge node.

[0148] In one implementation, when multiple edge nodes simultaneously possess the largest number of target shard data, other selection strategies can be combined to determine the final target edge node. For example, selection can be based on proximity. Alternatively, selection can be based on load conditions, network conditions, whether it is the first request, or whether session persistence exists. The specific selection method is not limited in this embodiment.

[0149] In this embodiment, after receiving the client's file retrieval request, the scheduling center selects the edge node with the largest number of target fragment data stored when filtering target edge nodes based on the global integrity view. This strategy can maximize the hit on target fragment data and reduce the number of cross-node interactions for the client to obtain fragment data in the future. Compared with the method of random allocation or only selecting the nearest node, it significantly shortens the data transmission path and reduces the latency and network bandwidth consumption caused by cross-node data interaction.

[0150] In an optional implementation, the node information may further include load information. See also... Figure 10 The step of determining the target edge node based on the node table of multiple edge nodes included in the global integrity view includes: Step S1000: Based on the integrity information of all files stored in each edge node, select multiple candidate edge nodes from multiple edge nodes, wherein each candidate edge node stores at least one target fragment data.

[0151] Step S1002: Select the target edge node from multiple candidate edge nodes based on the load information of each candidate edge node.

[0152] The load information includes specific quantitative indicators such as CPU utilization, memory usage, current concurrent requests, and bandwidth utilization.

[0153] In this embodiment, the scheduling center can perform a matching query on the integrity information of all files stored on each edge node based on the identification information and request range of the target file in the request, and filter out all edge nodes that store at least one target fragment data as candidate edge nodes.

[0154] Afterwards, the scheduling center extracts the load information of each candidate edge node and quantitatively evaluates the current operating status of each candidate edge node according to the preset load evaluation rules (such as the load comprehensive scoring algorithm).

[0155] The load assessment rules can be configured according to the actual application scenario. For example, when prioritizing response speed, nodes with CPU utilization and memory usage both below the preset threshold are selected; when prioritizing cluster stability, nodes with the current number of concurrent requests below the threshold and bandwidth usage within a reasonable range are selected.

[0156] The scheduling center selects the node with the best load status from the candidate edge nodes and determines it as the target edge node for this file retrieval request.

[0157] As an example, candidate edge node A has a CPU utilization of 65% and a concurrent request count of 120; candidate edge node B has a CPU utilization of 30% and a concurrent request count of 45; and candidate edge node C has a CPU utilization of 75% and a concurrent request count of 150. Based on the evaluation rule of "low load priority", the scheduling center selects candidate edge node B as the target edge node.

[0158] It should be noted that multiple target edge nodes can also be selected in other methods.

[0159] In this embodiment, after receiving a client request, the scheduling center first selects candidate edge nodes that store at least one target shard data by using the integrity information of all files stored on each edge node. This ensures that the selected target node has basic sharding service capabilities, avoids invalid interactions caused by allocating requests to nodes without relevant shard storage, and reduces client request latency. On this basis, the center further selects the node with the optimal load by combining the load information of the candidate nodes. This effectively avoids the centralized allocation of requests to edge nodes with excessive load, and prevents some nodes from experiencing service lag or even crashes due to excessive concurrent requests. This achieves load balancing within the edge cluster and improves the overall stability of the cluster.

[0160] Step S904 The node address of the target edge node is returned to the client.

[0161] After identifying the target edge node, the dispatch center can extract the node's network address information, generate a node address return message according to a preset response format, and send the message to the client through the original communication link.

[0162] After receiving the returned message, the client can initiate a targeted fragment data retrieval request based on the address of the target edge node to complete the subsequent file retrieval process.

[0163] Example 3 Figure 11 The diagram schematically illustrates a file acquisition apparatus 1100 according to Embodiment 3 of this application. This apparatus can be divided into one or more program modules. One or more program modules are stored in a storage medium and executed by one or more processors to complete the embodiments of this application. The program module referred to in the embodiments of this application refers to a series of computer program instruction segments capable of performing a specific function. The following description will specifically introduce the functions of each program module in this embodiment. For example... Figure 11 As shown, the device 1100 is applied to a target edge node. The device 1100 may include: a receiving module 1110, a detection module 1120, a request module 1130, and a return module 1140, wherein: The receiving module 1110 is used to receive a file acquisition request sent by the client, wherein the file acquisition request is used to acquire at least one target fragment data of the target file; The detection module 1120 is used to detect whether the target edge node stores all target fragment data corresponding to the file acquisition request; The request module 1130 is used to request the missing target fragment data from other edge nodes when only part of the target fragment data is stored in the target edge node. The return module 1140 is used to return a portion of the target fragment data stored in the target edge node and the target fragment data returned by the other edge nodes to the client.

[0164] In an optional embodiment, the request module 1130 is further configured to: The neighboring edge nodes storing missing target fragment data are determined based on the local integrity view maintained in the target edge node. The local integrity view records the integrity information of all files stored by each neighboring edge node. The integrity information includes the file's identification information and the storage information of the file's fragment data. The neighboring edge nodes are edge nodes that have established a connection with the target edge node, and the determined neighboring edge nodes are referred to as the other edge nodes. The missing target fragment data is requested from the determined neighboring edge nodes.

[0165] In an optional embodiment, the device 1100 is further configured to: If the request to the other edge nodes fails, the system requests the source server to retrieve all missing target fragment data; the target fragment data returned by the source server is then returned to the client; wherein, the request failure means that it is impossible to retrieve all missing target fragment data from the other edge nodes.

[0166] In an optional embodiment, the device 1100 is further configured to: If the missing target fragment data is obtained from the other edge nodes, the client requests the missing remaining target fragment data from the origin server; the client then returns the target fragment data returned by the origin server to the client; wherein, the missing remaining target fragment data refers to the missing target fragment data that cannot be obtained from the other edge nodes.

[0167] In an optional embodiment, the device 1100 is further configured to: After obtaining the target fragment data returned by the other edge nodes or the source station, it is stored in the target edge node; the local integrity table is updated, which records the integrity information of all files stored in the target edge node, including the file's identification information and the storage information of the file's fragment data.

[0168] In an optional embodiment, the device 1100 is further configured to: The integrity information of the changed files is synchronized to neighboring edge nodes, which are other edge nodes that have established connections with the target edge node; the integrity information of the changed files is reported to the scheduling center.

[0169] In an optional embodiment, the target edge node establishes connections with each of its neighboring edge nodes in the following manner: The target edge node registers with the service discovery component, wherein the registration information includes the node address of the target edge node; the target edge node obtains an edge node list from the service discovery component, the edge node list including the node addresses of multiple neighboring edge nodes; the target edge node establishes a connection with each neighboring edge node one by one according to the node address of each neighboring edge node.

[0170] Example 4 Figure 12The diagram schematically illustrates a file scheduling device 1200 according to Embodiment 4 of this application. This device can be divided into one or more program modules. One or more program modules are stored in a storage medium and executed by one or more processors to complete the embodiments of this application. The program module referred to in the embodiments of this application refers to a series of computer program instruction segments capable of performing a specific function. The following description will specifically introduce the functions of each program module in this embodiment. For example... Figure 12 As shown, the device 1200 is applied in a dispatch center. The device 1200 may include: a receiving module 1210, a determining module 1220, and a returning module 1230, wherein: The receiving module 1210 is used to receive a file acquisition request sent by the client, wherein the file acquisition request is used to acquire at least one target fragment data of the target file; The determination module 1220 is used to query the global integrity view according to the file acquisition request, and determine the target edge node according to the node table of multiple edge nodes contained in the global integrity view. The node table of each edge node includes the node information of the edge node and the integrity information of all files stored in the edge node. The integrity information includes the file's identification information and the storage information of the file's fragment data. The return module 1230 is used to return the node address of the target edge node to the client.

[0171] In an optional implementation, the determining module 1220 is further configured to: The target edge node is determined based on the integrity information of all files stored at each edge node, wherein the target edge node stores the largest number of target fragment data among the plurality of edge nodes.

[0172] In an optional implementation, the determining module 1220 is further configured to: Based on the integrity information of all files stored in each edge node, multiple candidate edge nodes are selected from multiple edge nodes, wherein each candidate edge node stores at least one target fragment data; the target edge node is selected from multiple candidate edge nodes based on the load information of each candidate edge node.

[0173] Example 5 Figure 13 The diagram illustrates the architecture of a content delivery network according to Embodiment 5 of this application.

[0174] like Figure 13 As shown, the content delivery network may include multiple edge nodes 1300 (taking four edge nodes as an example), a scheduling center 1310, a service discovery component 1320, and an origin server 1330, wherein: Each edge node 1300 is used to execute the file acquisition method described in Embodiment 1 above.

[0175] The scheduling center 1310 is used to execute the file scheduling method described in Embodiment 2 above.

[0176] Service discovery component 1320 is used for edge nodes to register and to provide the edge nodes with a list of edge nodes, the list of edge nodes including the node addresses of multiple neighboring edge nodes.

[0177] Origin station 1330 is used to respond to the origin request from edge node 1300 and return the requested fragment data to the edge node.

[0178] Example 6 Figure 14 This illustration schematically depicts the hardware architecture of a computer device 10000 suitable for implementing a file acquisition or file scheduling method according to Embodiment Six of this application. In some embodiments, the computer device 10000 may be a terminal device such as a smartphone, wearable device, tablet computer, personal computer, in-vehicle terminal, game console, virtual device, workbench, digital assistant, set-top box, or robot. In other embodiments, the computer device 10000 may be a rack server, blade server, tower server, or cabinet server (including standalone servers or server clusters composed of multiple servers), etc. Figure 14 As shown, the computer device 10000 includes, but is not limited to: a memory 10010, a processor 10020, and a network interface 10030 that can communicate with each other via a system bus. Wherein: The memory 10010 includes at least one type of computer-readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 10010 may be an internal storage module of a computer device 10000, such as the hard disk or memory of the computer device 10000. In other embodiments, the memory 10010 may also be an external storage device of the computer device 10000, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 10000. Of course, the memory 10010 may also include both the internal storage module and the external storage device of the computer device 10000. In this embodiment, the memory 10010 is typically used to store the operating system and various application software installed on the computer device 10000, such as program code for file acquisition or file scheduling methods. In addition, the memory 10010 can also be used to temporarily store various types of data that have been output or will be output.

[0179] In some embodiments, processor 10020 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other chip. Processor 10020 is typically used to control the overall operation of computer device 10000, such as performing control and processing related to data interaction or communication with computer device 10000. In this embodiment, processor 10020 is used to run program code stored in memory 10010 or process data.

[0180] Network interface 10030 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between computer device 10000 and other computer devices. For example, network interface 10030 is used to connect computer device 10000 to an external terminal via a network, establishing a data transmission channel and communication connection between computer device 10000 and the external terminal. The network may be an intranet, the Internet, Global System for Mobile Communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, or other wireless or wired networks.

[0181] It should be pointed out that, Figure 14 Only computer devices with components 10010-10030 are shown; however, it should be understood that it is not required to implement all of the shown components, and more or fewer components may be implemented instead.

[0182] In this embodiment, the file acquisition or file scheduling method stored in memory 10010 can be further divided into one or more program modules and executed by one or more processors (such as processor 10020) to complete the embodiments of this application.

[0183] Example 7 This application also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the file acquisition or file scheduling method in the embodiments.

[0184] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device. Of course, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the computer device. In this embodiment, the computer-readable storage medium is typically used to store the operating system and various application software installed on the computer device, such as the program code of the file acquisition or file scheduling method in the embodiment. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or will be output.

[0185] Example 8 This application also provides a computer program product, including a computer program that, when executed by a processor, implements the methods described in the above embodiments.

[0186] Obviously, those skilled in the art should understand that the modules or steps of the embodiments of this application described above can be implemented using general-purpose computer devices. They can be centralized on a single computer device or distributed across a network of multiple computer devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computer device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of this application are not limited to any particular combination of hardware and software.

[0187] It should be noted that the above are merely preferred embodiments of this application and do not limit the scope of patent protection of this application. Any equivalent structural or procedural changes made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of this application.

Claims

1. A file acquisition method, applied to a target edge node, characterized in that, The method includes: Receive a file retrieval request sent by a client, the file retrieval request being used to retrieve at least one target fragment of a target file; Detect whether the target edge node stores all target fragment data corresponding to the file acquisition request; If only a portion of the target fragment data is stored in the target edge node, request the missing target fragment data from other edge nodes. The target fragment data stored in the target edge node and the target fragment data returned by the other edge nodes are returned to the client.

2. The method according to claim 1, characterized in that, The step of requesting missing target fragment data from other edge nodes includes: The neighboring edge nodes that store missing target fragment data are determined based on the local integrity view maintained in the target edge node. The local integrity view records the integrity information of all files stored by each neighboring edge node. The integrity information includes the file's identification information and the storage information of the file's fragment data. The neighboring edge nodes are edge nodes that have established a connection with the target edge node, and the determined neighboring edge nodes are referred to as the other edge nodes. Request the missing target fragment data from the identified neighbor edge nodes.

3. The method according to claim 1, characterized in that, The method further includes: If requests to other edge nodes fail, a request will be made to the origin server to retrieve all missing target fragment data. The target fragment data returned by the source station is returned to the client. The failure of the request refers to the inability to obtain all missing target fragment data from the other edge nodes.

4. The method according to claim 1, characterized in that, The method further includes: If the missing target fragment data is obtained from the other edge nodes, request the source station to obtain the remaining missing target fragment data; The target fragment data returned by the source station is returned to the client. The missing remaining target fragment data refers to the missing target fragment data that cannot be obtained from the other edge nodes.

5. The method according to claim 4, characterized in that, The method further includes: After obtaining the target fragment data returned by the other edge nodes or the source station, it is stored in the target edge node; The local integrity table is updated. The local integrity table records the integrity information of all files stored in the target edge node. The integrity information includes the file's identification information and the storage information of the file's fragment data.

6. The method according to claim 5, characterized in that, The method further includes: The integrity information of the changed file is synchronized to neighboring edge nodes, where the neighboring edge nodes are other edge nodes that have established a connection with the target edge node. The integrity information of the changed files is reported to the dispatch center.

7. The method according to claim 6, characterized in that, The target edge node establishes connections with each of its neighboring edge nodes in the following manner: The target edge node registers with the service discovery component, wherein the registration information includes the node address of the target edge node; The target edge node obtains an edge node list from the service discovery component, the edge node list including the node addresses of multiple neighboring edge nodes; The target edge node establishes connections with each of its neighboring edge nodes one by one based on the node addresses of each neighboring edge node.

8. A file scheduling method, applied in a scheduling center, characterized in that, The method includes: Receive a file retrieval request sent by a client, the file retrieval request being used to retrieve at least one target fragment of a target file; The global integrity view is queried according to the file acquisition request. The target edge node is determined according to the node table of multiple edge nodes contained in the global integrity view. The node table of each edge node includes the node information of the edge node and the integrity information of all files stored in the edge node. The integrity information includes the file identification information and the storage information of the file's fragment data. The node address of the target edge node is returned to the client.

9. The method according to claim 8, characterized in that, The step of determining the target edge node based on the node table of multiple edge nodes contained in the global integrity view includes: The target edge node is determined based on the integrity information of all files stored at each edge node; Among the multiple edge nodes, the target edge stores the largest number of target fragment data.

10. The method according to claim 8, characterized in that, The node information includes load information, and determining the target edge node based on the node table of multiple edge nodes included in the global integrity view includes: Based on the integrity information of all files stored in each edge node, multiple candidate edge nodes are selected from multiple edge nodes, wherein each candidate edge node stores at least one target fragment data; The target edge node is selected from multiple candidate edge nodes based on the load information of each candidate edge node.

11. A file acquisition device, applied to a target edge node, characterized in that, The device: The receiving module is used to receive a file acquisition request sent by the client, wherein the file acquisition request is used to acquire at least one target fragment of the target file; The detection module is used to detect whether the target edge node stores all target fragment data corresponding to the file acquisition request; The request module is used to request the missing target fragment data from other edge nodes when only a portion of the target fragment data is stored in the target edge node. The return module is used to return a portion of the target fragment data stored in the target edge node and the target fragment data returned by other edge nodes to the client.

12. A file scheduling device, applied in a scheduling center, characterized in that, The device includes: The receiving module is used to receive a file acquisition request sent by the client, wherein the file acquisition request is used to acquire at least one target fragment of the target file; The determination module is used to query the global integrity view according to the file acquisition request, and determine the target edge node according to the node table of multiple edge nodes contained in the global integrity view. The node table of each edge node includes the node information of the edge node and the integrity information of all files stored in the edge node. The integrity information includes the file's identification information and the storage information of the file's fragment data. The return module is used to return the node address of the target edge node to the client.

13. A content delivery network, characterized in that, include: Multiple edge nodes, each edge node being used to perform the file acquisition method according to any one of claims 1-7; A scheduling center for executing the file scheduling method according to any one of claims 8-10; A service discovery component is used for edge nodes to register and to provide the edge nodes with a list of edge nodes, which includes the node addresses of multiple neighboring edge nodes; The origin server is used to respond to the origin requests from the edge nodes and return the requested fragment data to the edge nodes.

14. A computer device, characterized in that, include: At least one processor; and A memory communicatively connected to the at least one processor; wherein: The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 10.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 10.

16. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 10.