An image management method suitable for multi-cluster idle time computing power scheduling

By constructing a three-level image storage architecture and a hierarchical reverse lookup mechanism in a multi-cluster environment, the problems of image file loss and resource waste in container image management are solved, and flexible scheduling and efficient resource utilization across clusters are achieved.

CN122111566APending Publication Date: 2026-05-29BEIJING GONGJI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610084522.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-22
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, container image management suffers from problems such as image file loss, resource waste, startup delay, and inflexible resource scheduling in multi-cluster environments. Especially in scenarios with frequent node online/offline cycles and cross-cluster scheduling, the binding of images to nodes leads to low resource utilization efficiency.

Method used

A three-tier mirror storage architecture is adopted, including a persistent cloud-based main mirror site, cluster cache sub-sites, and node distributed cache. Through hierarchical reverse lookup and incremental update mechanisms, the persistence and reusability of the images are ensured, enabling flexible scheduling across nodes and clusters.

Benefits of technology

It significantly improves the reusability and reliability of images, shortens container instance startup time, enhances the flexibility of resource scheduling and overall computing power utilization, and solves the problems of resource waste and startup delay caused by binding images to nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122111566A_ABST
    Figure CN122111566A_ABST
Patent Text Reader

Abstract

The application discloses a kind of mirror management methods suitable for multiple cluster idle time computing power scheduling, including respectively constructing cloud persistent total mirror station, the cache substation in each cluster, the local distributed cache on each node in cluster, the application is guaranteed by three-level mirror storage architecture, redundancy and persistent storage between multiple levels, even if a node is offline, mirror can still be quickly back to source by substation or total station, significantly improve the reusability and reliability of mirror;The hierarchical reverse lookup mechanism used, preferentially use local cache and cluster substation, only back to source total station when necessary, significantly shorten the start-up time of container instance;Decouple image and node, so that the image can be freely reused between different nodes and different clusters, container instance can be flexibly migrated, greatly improve the flexibility of resource scheduling and overall computing power utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of cloud computing, and specifically relates to an image management method applicable to the scheduling of idle computing power in multiple clusters. Background Technology

[0002] During the process of creating containers in a distributed cluster, it is necessary to obtain images for image creation. Images can be stored locally or in an image repository.

[0003] In existing multi-cluster computing power scheduling environments, container image management generally relies on local node storage. When cluster nodes frequently go online or offline, or when the entire cluster expands or shrinks, locally stored image files are often lost along with the nodes, preventing container instances from quickly starting on new nodes and severely restricting the continuity and availability of computing power. Furthermore, because images are bound to nodes, the running location of container instances is restricted, lacking the ability to flexibly schedule them across different nodes or even different clusters. This hinders efficient resource utilization and limits the elastic scaling of user instances to the remaining resources of the nodes, preventing large-scale, cross-cluster dynamic scaling. Additionally, in existing solutions, images are typically distributed only when an instance is created, and are not returned to the source when the instance is shut down, resulting in insufficient incremental updates and reuse capabilities. When starting a new node, the complete image needs to be fetched again, leading to low transmission efficiency and further extending container startup time.

[0004] For image repositories, container image management is a core component for achieving efficient system delivery and scheduling in large-scale container clusters and multi-region deployments. As a core component for centralized image storage and distribution, image repositories often become performance bottlenecks during cluster expansion or concurrent task startup. For example, in some container clusters, if a new node lacks a local image cache, it needs to pull images on a large scale, causing delays or heavy loads on the central repository, directly impacting business startup efficiency and system stability. To alleviate this problem, the industry widely adopts a multi-repository deployment + synchronous replication strategy, or a combination of P2P (peer-to-peer) distribution. The repeated pulling and storage of image data leads to resource waste. On the one hand, the same image is repeatedly downloaded on multiple nodes, consuming significant network bandwidth and storage space; on the other hand, the central image repository is easily overloaded under high concurrency requests. Network file systems used for unified image storage also have performance and reliability bottlenecks. Although such systems can avoid local storage copies on nodes, each startup still requires pulling images from the network file system, increasing startup latency, relying on long-lived connections, and potentially causing the entire system to become unavailable due to concentrated failures.

[0005] Based on this, the purpose of this invention is to address the shortcomings of the prior art by providing an image management method suitable for multi-cluster idle computing power scheduling. Through a new image management mechanism, the persistence and reusability of images can be guaranteed in environments where nodes and clusters change frequently. At the same time, the binding relationship between images and nodes is broken, enabling flexible scheduling and elastic scaling across nodes and clusters. Furthermore, through efficient incremental transmission and multi-level caching mechanisms, the startup speed during container instance switching is accelerated. Summary of the Invention

[0006] To address the shortcomings of existing technologies, the purpose of this invention is to provide an image management method suitable for multi-cluster idle computing power scheduling. This overcomes the limitations of traditional solutions proposed in the background, which are not applicable to situations where nodes within a cluster frequently go online or offline, leading to frequent additions or removals of nodes from the cluster itself. Such node online / offline behavior can result in the loss of image files stored on those nodes. Furthermore, traditional solutions bind images to nodes, thus depriving the platform of the space for computing power binning and scheduling, which is not conducive to efficient resource utilization and also prevents users from making significant upgrades or downgrades of instance configurations.

[0007] Specifically, the technical problem to be solved by the present invention is to address the shortcomings of the prior art. In the first aspect, the present invention provides an image management method suitable for multi-cluster idle-time computing power scheduling, comprising the following steps: a) Construct a persistent cloud-based master mirror site, cache sub-sites within each cluster, and local distributed caches on each node within the cluster; b) When the container instance starts, the Agent on the node searches the cache at each level in reverse. If the cache is hit, it reads directly from the local distributed cache; otherwise, it reads from the next higher level cache sub-site until it returns to the main image site. c) When a container instance changes, the Agent on the node saves the user's changes to the container instance as a new image layer. The new image layer is first stored in the local distributed cache, and then automatically pushed to the cache sub-site, and finally synchronized to the main image site.

[0008] In one embodiment of the image management method for multi-cluster idle computing power scheduling according to the present invention, the main image station is used to centrally store and manage global container image files. As the highest-level image source station, it ensures the persistence and integrity of the images and receives image layer updates pushed from cache substations in each cluster.

[0009] In one embodiment of the image management method for multi-cluster idle computing power scheduling according to the present invention, the cache substation is deployed on the core node or control node of each cluster, serving as a proxy cache for the main image station. It is responsible for storing commonly used image layers within the cluster, and can respond quickly when a node requests it, receive image layer updates from nodes within the cluster, and synchronize them back to the main image station.

[0010] In one embodiment of the image management method for multi-cluster idle computing power scheduling according to the present invention, the distributed cache is deployed on each computing node and includes a distributed cache module and a node agent. The node agent has a built-in image format detection module that can automatically identify whether the container image is in OCI format or Nydus format. When pulling or saving the image, the corresponding parsing and storage method is adopted according to the image format.

[0011] In one embodiment of the image management method for multi-cluster idle computing power scheduling according to the present invention, step c) employs an incremental update synchronization mechanism to update the image when the container instance is shut down.

[0012] In one embodiment of the image management method applicable to multi-cluster idle computing power scheduling according to the present invention, step c) adopts a real-time update synchronization mechanism. In situations with high real-time requirements, image updates are achieved by capturing and transmitting file changes in real time; or, step c) adopts a timed snapshot synchronization mechanism. In situations with relatively abundant resources, image updates are achieved by capturing and transmitting file changes using timed snapshots.

[0013] In one embodiment of the image management method for multi-cluster idle computing power scheduling according to the present invention, the distributed storage device used for the local distributed cache is replaced by a centralized storage server, a cloud storage system, or an embedded high-speed cache device.

[0014] In one embodiment of the mirror management method for multi-cluster idle computing power scheduling according to the present invention, in resource-constrained situations, cache substations within each cluster are removed, and the main mirror station interacts directly with the local distributed cache on the node.

[0015] In a second aspect, the present invention provides an electronic device, comprising: at least one processor; and a memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform the image management method described above for multi-cluster idle computing power scheduling.

[0016] Thirdly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the image management method applicable to multi-cluster idle computing power scheduling as described above.

[0017] Compared with the prior art, the positive effects of the present invention are: 1. To address the problem that existing container images often rely on single-node or single-cluster caching, and that once a node goes offline or the cache expires, the image needs to be downloaded again, resulting in wasted resources, the image management method proposed in this invention, which is suitable for multi-cluster idle computing power scheduling, ensures the redundancy and persistent preservation of images across multiple levels through a three-level image storage architecture. Even if a node goes offline, the image can still be quickly retrieved from the source by the branch station or the main station, significantly improving the reusability and reliability of the image.

[0018] 2. To address the issue that existing technologies often require containers to pull complete images from remote repositories during startup, causing startup delays, the image management method proposed in this invention, applicable to multi-cluster idle computing power scheduling, adopts a hierarchical reverse lookup mechanism. It prioritizes the use of local cache and cluster sub-sites, only returning to the source main station when necessary, significantly shortening the startup time of container instances.

[0019] 3. To address the problem that existing technologies have images that are tightly bound to nodes and are not suitable for cross-node computing power scheduling scenarios, the image management method proposed in this invention, which is suitable for multi-cluster idle computing power scheduling, decouples images from nodes, allowing images to be reused freely between different nodes and different clusters, and container instances to be flexibly migrated, thereby greatly improving the flexibility of resource scheduling and the overall computing power utilization. Attached Figure Description

[0020] Figure 1 This is a flowchart of the mirror management method in this invention; Figure 2 For the present invention Figure 1 A flowchart illustrating the specific steps involved in querying and loading the image layer during container instance startup; Figure 3 For the present invention Figure 1 A flowchart showing the specific steps of the storage mechanism for updating the mirror layer of the flowchart. Detailed Implementation

[0021] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.

[0022] It is understood that the term "a" should be understood as "at least one" or "one or more," meaning that in one embodiment, the number of an element can be one, while in another embodiment, the number of the element can be multiple. The term "a" should not be construed as a limitation on the quantity. "Multiple" means two or more.

[0023] While ordinal numbers such as “first,” “second,” etc., will be used to describe various components, there is no limitation on which components are used herein. The term is used only to distinguish one component from another. For example, a first component may be referred to as a second component, and similarly, a second component may be referred to as a first component, without departing from the teachings of this application. The term “and / or” as used herein includes any and all combinations of one or more of the associated listed items.

[0024] The terminology used herein is for the purpose of describing various embodiments only and is not intended to be limiting. As used herein, the singular form also includes the plural form, unless the context clearly indicates otherwise. It will also be understood that the terms “comprising” and / or “having” as used in this specification specify the presence of the described features, numbers, operations, components, elements or combinations thereof, without excluding the presence or addition of one or more other features, numbers, operations, components, elements or combinations thereof.

[0025] The following is combined with Figures 1-3 The present invention will be further described with reference to specific embodiments.

[0026] This invention proposes an image management method and system suitable for multi-cluster idle computing power scheduling. By establishing a persistent master image station in the cloud, deploying cache substations in each cluster, and deploying distributed cache and image management agents on each node, a three-level cache and origin-fetching system is formed, thereby realizing persistent storage, incremental updates and free scheduling of images across clusters.

[0027] The system of this invention mainly consists of the following parts: Cloud-based persistent central image repository: Used for centralized storage and management of global container image files. As the highest-level image source repository, it ensures the persistence and integrity of images and receives image layer updates pushed from various cluster cache sub-sites.

[0028] Cluster Cache Subsite: Deployed on the core or control node of each cluster, it acts as a proxy cache for the cloud-based main mirror site. It is responsible for storing commonly used image layers within the cluster, can respond quickly to node requests, reduce cross-regional network transmission, receive image layer updates from nodes within the cluster, and synchronize them back to the main site.

[0029] Node-based distributed cache: Deployed on each compute node, it includes a distributed cache module and an agent. The node agent has a built-in image format detection module that can automatically identify whether a container image is in OCI or Nydus format. When pulling or saving an image, it uses the corresponding parsing and storage method based on the image format, thereby achieving cross-format compatibility and unified scheduling.

[0030] When a user requests to start a container instance, the image management agent on the node first searches for the required image layer in the local distributed cache. If a match is found, the cached image layer is loaded directly and the container is started; if not, a request is sent to the cluster cache sub-site. If the target image layer exists in the cluster sub-site, it is distributed to the requesting node; if still not found, it is retrieved from the cloud persistent central site until the image is fully loaded. This hierarchical search and origin retrieval mechanism effectively reduces the number of cross-region image fetches and speeds up container startup.

[0031] During container instance operation, users may modify the container file system. When the container instance is shut down, the image management agent on the node automatically captures the user's changes and saves them as a new incremental image layer. The newly added image layer is first stored in the node's distributed cache, then automatically pushed to the cluster cache sub-site, and finally synchronized to the cloud central station, thus ensuring that image updates are not lost due to node shutdown. Therefore, the image management method and system for multi-cluster idle computing power scheduling in this invention includes the following features: (1) Three-level image storage and caching system: including persistent main image station in the cloud, cache sub-station in the cluster, and distributed cache on the node, forming a hierarchical origin return mechanism to ensure the persistence and reusability of the image under the condition of frequent node online and offline.

[0032] (2) Hierarchical reverse lookup mechanism when container instance starts: When the node starts the container, it searches the image layer in the order of "local cache, cluster sub-site, cloud main station" to maximize the use of existing cache and speed up the startup speed of container instance.

[0033] (3) Image incremental saving and return mechanism when container instance is shut down: The node agent can automatically capture the changed parts during the container operation, generate a new image incremental layer, and push it back to the cluster substation and main station in sequence to realize the automatic update and persistent storage of the image.

[0034] (4) Decoupling scheduling mechanism between image and node: The image is no longer bound to the node, and the container instance can be freely scheduled and run in different nodes or even different clusters, which significantly improves the flexibility of computing power scheduling and the overall resource utilization.

[0035] (5) Automatic image format recognition and compatibility mechanism: The node agent has a built-in automatic detection function that can recognize and be compatible with different image formats such as OCI and Nydus, adapting to the diverse needs in multi-cluster environments.

[0036] Example 1: A mirror management method applicable to idle computing power scheduling in multi-cluster environments includes the following steps: a) Construct a persistent cloud-based master mirror site, cache sub-sites within each cluster, and local distributed caches on each node within the cluster; The central image station is used to centrally store and manage global container image files. As the highest-level image source station, it ensures the persistence and integrity of images and receives image layer updates pushed from cache substations in various clusters.

[0037] The cache substations are deployed on the core nodes or control nodes of each cluster. As proxy caches of the main mirror station, they are responsible for storing commonly used mirror layers within the cluster. They can respond quickly when a node requests, receive mirror layer updates from nodes within the cluster, and synchronize them back to the main mirror station.

[0038] The distributed cache is deployed on each computing node and includes a distributed cache module and a node agent. The node agent has a built-in image format detection module that can automatically identify whether the container image is in OCI format or Nydus format. When pulling or saving the image, it adopts the corresponding parsing and storage method according to the image format.

[0039] b) When a container instance starts, the Agent on the node first looks for the required image layer in the local distributed cache. If it is found, the cached image layer is loaded directly and the container is started. If it is not found, a request is sent to the cache sub-site in the cluster. If the target image layer exists in the cache sub-site, it is distributed to the requesting node. If it is still not found, the request is sent back to the main image site until the image is fully loaded. c) When a container instance is shut down, the image management agent on the node automatically captures the user's changes and saves them as a new incremental image layer. The newly added image layer is first stored in the node's distributed cache, and then automatically pushed to the cluster cache sub-site, and finally synchronized to the cloud main station, thus ensuring that image updates are not lost due to node shutdown.

[0040] Example 2: A mirror management method applicable to idle computing power scheduling in multi-cluster environments includes the following steps: a) Construct a persistent cloud-based master mirror site, cache sub-sites within each cluster, and local distributed caches on each node within the cluster; The central image station is used to centrally store and manage global container image files. As the highest-level image source station, it ensures the persistence and integrity of images and receives image layer updates pushed from cache substations in various clusters.

[0041] The cache substations are deployed on the core nodes or control nodes of each cluster. As proxy caches of the main mirror station, they are responsible for storing commonly used mirror layers within the cluster. They can respond quickly when a node requests, receive mirror layer updates from nodes within the cluster, and synchronize them back to the main mirror station.

[0042] The distributed cache is deployed on each computing node and includes a distributed cache module and a node agent. The node agent has a built-in image format detection module that can automatically identify whether the container image is in OCI format or Nydus format. When pulling or saving the image, it adopts the corresponding parsing and storage method according to the image format.

[0043] b) When a container instance starts, the Agent on the node first looks for the required image layer in the local distributed cache. If it is found, the cached image layer is loaded directly and the container is started. If it is not found, a request is sent to the cache sub-site in the cluster. If the target image layer exists in the cache sub-site, it is distributed to the requesting node. If it is still not found, the request is sent back to the main image site until the image is fully loaded. c) When a container instance changes, a real-time synchronization mechanism or a scheduled snapshot mechanism is used to update the image. In situations with high real-time requirements, image updates can be achieved by capturing and transmitting file changes in real time. In situations with relatively abundant resources, scheduled snapshots can be used to reduce system complexity.

[0044] Example 3: A mirror management method applicable to idle computing power scheduling in multi-cluster environments includes the following steps: a) Construct a persistent cloud-based main mirror site, cache sub-sites within each cluster, and local caches on each node within the cluster, wherein the local cache is a centralized storage server, a cloud storage system, or an embedded high-speed cache device. The central image station is used to centrally store and manage global container image files. As the highest-level image source station, it ensures the persistence and integrity of images and receives image layer updates pushed from cache substations in various clusters.

[0045] The cache substations are deployed on the core nodes or control nodes of each cluster. As proxy caches of the main mirror station, they are responsible for storing commonly used mirror layers within the cluster. They can respond quickly when a node requests, receive mirror layer updates from nodes within the cluster, and synchronize them back to the main mirror station.

[0046] The local cache is deployed on each compute node and includes a cache module and a node agent. The node agent has a built-in image format detection module that can automatically identify whether the container image is in OCI format or Nydus format. When pulling or saving the image, it adopts the corresponding parsing and storage method according to the image format.

[0047] b) When a container instance starts, the Agent on the node first looks for the required image layer in the local cache. If it is found, the cached image layer is loaded directly and the container is started. If it is not found, a request is sent to the cache sub-site in the cluster. If the target image layer exists in the cache sub-site, it is distributed to the requesting node. If it is still not found, the request is sent back to the main image site until the image is fully loaded. c) When a container instance is shut down, the image management agent on the node automatically captures the user's changes and saves them as a new incremental image layer. The newly added image layer is first stored in the node's distributed cache, then automatically pushed to the cluster cache sub-site, and finally synchronized to the cloud central station, thus ensuring that image updates are not lost due to node shutdown.

[0048] Example 4: A mirror management method applicable to idle computing power scheduling in multi-cluster environments includes the following steps: a) Construct a persistent cloud-based main mirror site, cache sub-sites within each cluster, and local caches on each node within the cluster, wherein the local cache is a centralized storage server, a cloud storage system, or an embedded high-speed cache device. The central image station is used to centrally store and manage global container image files. As the highest-level image source station, it ensures the persistence and integrity of images and receives image layer updates pushed from cache substations in various clusters.

[0049] The cache substations are deployed on the core nodes or control nodes of each cluster. As proxy caches of the main mirror station, they are responsible for storing commonly used mirror layers within the cluster. They can respond quickly when a node requests, receive mirror layer updates from nodes within the cluster, and synchronize them back to the main mirror station.

[0050] The local cache is deployed on each compute node and includes a cache module and a node agent. The node agent has a built-in image format detection module that can automatically identify whether the container image is in OCI format or Nydus format. When pulling or saving the image, it adopts the corresponding parsing and storage method according to the image format.

[0051] b) When a container instance starts, the Agent on the node first looks for the required image layer in the local cache. If it is found, the cached image layer is loaded directly and the container is started. If it is not found, a request is sent to the cache sub-site in the cluster. If the target image layer exists in the cache sub-site, it is distributed to the requesting node. If it is still not found, the request is sent back to the main image site until the image is fully loaded. c) When a container instance changes, a real-time synchronization mechanism or a scheduled snapshot mechanism is used to update the image. In situations with high real-time requirements, image updates can be achieved by capturing and transmitting file changes in real time. In situations with relatively abundant resources, scheduled snapshots can be used to reduce system complexity.

[0052] Example 5: A mirror management method applicable to idle computing power scheduling in multi-cluster environments includes the following steps: a) Construct a persistent master mirror site in the cloud and a local distributed cache on each node in the cluster; The central image station is used to centrally store and manage global container image files. As the highest-level image source station, it ensures the persistence and integrity of images and receives image layer updates pushed from distributed caches within various clusters.

[0053] The distributed cache is deployed on each computing node and includes a distributed cache module and a node agent. The node agent has a built-in image format detection module that can automatically identify whether the container image is in OCI format or Nydus format. When pulling or saving the image, it adopts the corresponding parsing and storage method according to the image format.

[0054] b) When a container instance starts, the Agent on the node first looks up the required image layer in the local distributed cache. If it is found, the cached image layer is loaded directly and the container is started. If it is not found, the source image is retrieved from the main image station until the image is fully loaded. c) When a container instance is shut down, the image management agent on the node automatically captures the user's changes and saves them as a new incremental image layer. The newly added image layer is first stored in the node's distributed cache and then automatically pushed to the central cloud server, thus ensuring that image updates are not lost due to node shutdown.

[0055] Example 6: A mirror management method applicable to idle computing power scheduling in multi-cluster environments includes the following steps: a) Construct a persistent cloud-based master mirror site, cache sub-sites within each cluster, and local distributed caches on each node within the cluster; The central image station is used to centrally store and manage global container image files. As the highest-level image source station, it maintains all base images and user historical images, receives image layer updates pushed from cache substations in various clusters, and performs cross-regional data disaster recovery backups.

[0056] The cache substations are deployed on the core nodes or control nodes of each cluster. As a proxy cache for the main mirror station, they are responsible for storing commonly used image layers and metadata within the cluster. They can respond quickly to node requests, receive image layer updates from nodes within the cluster, and synchronize them back to the main mirror station asynchronously.

[0057] The distributed cache is deployed on each computing node and includes a distributed cache module and a node agent. The node agent has a built-in image layer analysis module and a format detection module, which can identify OCI and Nydus formats, and has the ability to monitor the image layer depth in real time and automatically perform layer merging.

[0058] b) When a container instance starts, the Agent on the node first identifies the image format. For Nydus format images, an on-demand loading strategy is adopted: a small amount of metadata layer is first pulled from the local or cache sub-site to start the container instantly, and subsequent file access requests are interrupted by a page fault mechanism (only the required data blocks are pulled from the nearest cache node), thus avoiding full download waiting; for OCI format images, a standard layered parallel download and decompression process is executed; c) When a container instance is shut down or exits abnormally, the image management agent on the node automatically executes the intelligent commit and maintenance process: First, it freezes the current container read / write layer and generates a new incremental layer, assigning it an internal identifier; then, it detects the layer stacking depth of the current image. If the number of layers exceeds a preset threshold, it triggers an automatic merging mechanism to merge all incremental layers with the base image into a single physical layer; finally, it pushes the generated incremental layer or the merged new image layer to the cluster cache sub-site and eventually synchronizes it to the cloud main station, completing the lifecycle loop.

[0059] Example 7: A Guangdong cluster mirror management method applicable to multi-cluster idle computing power scheduling includes the following steps: a) The main mirror site is persistently built on Tencent Cloud, the cache sub-site is built on machine 1 of the Guangdong cluster, and the local distributed cache is built on each node in the cluster. The central image station is used to centrally store and manage global container image files. As the highest-level image source station, it ensures the persistence and integrity of images and receives image layer updates pushed from cache substations in various clusters.

[0060] The cache substations are deployed on the core nodes or control nodes of each cluster. As proxy caches of the main mirror station, they are responsible for storing commonly used mirror layers within the cluster. They can respond quickly when a node requests, receive mirror layer updates from nodes within the cluster, and synchronize them back to the main mirror station.

[0061] The distributed cache is deployed on each computing node and includes a distributed cache module and a node agent. The node agent has a built-in image format detection module that can automatically identify whether the container image is in OCI format or Nydus format. When pulling or saving the image, it adopts the corresponding parsing and storage method according to the image format.

[0062] b) When a container instance starts, the Agent on the Guangdong cluster node first searches for the required image layer in the local distributed cache. If it is found, the cached image layer is loaded directly and the container is started. If it is not found, a request is sent to the cache substation of machine 1 in the cluster. If the target image layer exists in the cache substation, it is distributed to the requesting node. If it is still not found, the request is sent back to the main image station until the image is fully loaded. c) When a container instance is shut down, the image management agent on the node automatically captures the user's changes and saves them as a new incremental image layer. The newly added image layer is first stored in the node's distributed cache, and then automatically pushed to the cache sub-site of machine 1 in the cluster, and finally synchronized to the Tencent Cloud main site, thus ensuring that image updates are not lost due to node shutdown.

[0063] Through the above embodiments, the present invention provides a complete and operable solution for image management of multi-cluster idle computing power scheduling.

[0064] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0065] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.

[0066] It should be understood that in this invention, "at least one (item)" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0067] It should also be noted that, in this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0068] The steps of the methods or algorithms described in conjunction with the embodiments disclosed in this invention can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0069] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined in this invention may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A mirror management method suitable for multi-cluster idle computing power scheduling, characterized in that, Includes the following steps: a) Construct a persistent cloud-based master mirror site, cache sub-sites within each cluster, and local distributed caches on each node within the cluster; b) When the container instance starts, the Agent on the node searches the cache at each level in reverse. If the cache is hit, it reads directly from the local distributed cache; otherwise, it reads from the next higher level cache sub-site until it returns to the main image site. c) When a container instance changes, the Agent on the node saves the user's changes to the container instance as a new image layer. The new image layer is first stored in the local distributed cache, and then automatically pushed to the cache sub-site, and finally synchronized to the main image site.

2. The image management method for multi-cluster idle computing power scheduling as described in claim 1, characterized in that, The central image station is used to centrally store and manage global container image files. As the highest-level image source station, it ensures the persistence and integrity of images and receives image layer updates pushed from cache substations in various clusters.

3. The image management method for multi-cluster idle computing power scheduling as described in claim 1, characterized in that, The cache substations are deployed on the core nodes or control nodes of each cluster. As proxy caches of the main mirror station, they are responsible for storing commonly used mirror layers within the cluster. They can respond quickly when a node requests, receive mirror layer updates from nodes within the cluster, and synchronize them back to the main mirror station.

4. The image management method for multi-cluster idle computing power scheduling as described in claim 1, characterized in that, The distributed cache is deployed on each computing node and includes a distributed cache module and a node agent. The node agent has a built-in image format detection module that can automatically identify whether the container image is in OCI format or Nydus format. When pulling or saving the image, it adopts the corresponding parsing and storage method according to the image format.

5. The image management method for multi-cluster idle computing power scheduling as described in claim 1, characterized in that, Step c) employs an incremental update synchronization mechanism to update the image when the container instance is shut down.

6. The image management method for multi-cluster idle computing power scheduling as described in claim 1, characterized in that, Step c) employs a real-time update synchronization mechanism. In situations with high real-time requirements, mirror updates are achieved by capturing and transmitting file changes in real time. Alternatively, in step c), a timed snapshot synchronization mechanism can be used. In situations where resources are relatively abundant, timed snapshots can be used to capture and transmit file changes to achieve image updates.

7. The image management method for multi-cluster idle computing power scheduling as described in claim 1, characterized in that, The distributed storage device used for the local distributed cache can be replaced by a centralized storage server, a cloud storage system, or an embedded cache device.

8. The image management method for multi-cluster idle computing power scheduling as described in claim 1, characterized in that, In resource-constrained scenarios, the cache substations within each cluster are removed, and the main mirror site interacts directly with the local distributed cache on the nodes.

9. An electronic device, characterized in that, include: At least one processor; And a memory that stores instructions that, when executed by the at least one processor, cause the at least one processor to perform the image management method for multi-cluster idle computing power scheduling as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the image management method for multi-cluster idle computing power scheduling as described in any one of claims 1 to 8.