Cloud disk cloning method, apparatus and electronic device

By using the snapshot chain to determine the target data block and adopting a delayed loading method during the cloud disk cloning process, the problem of low cloud disk cloning efficiency is solved, and the acceleration and efficiency of cloud disk cloning are achieved.

WO2025202737A1PCT designated stage Publication Date: 2025-10-02CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/IB2025/051390
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-27
Filing Date
2025-02-11
Publication Date
2025-10-02

AI Technical Summary

Technical Problem

In the Elastic Container Instance (ECI) service, when cloning a VM or container cloud disk based on full snapshot data, the cloning efficiency is low due to the limited bandwidth of accessing Object Storage Service (OSS) within the region.

Method used

By receiving the cloud disk cloning request initiated by the instance management service, the target block storage cluster is determined, the target cloud disk is created based on the snapshot chain, and the data blocks are imported using a delayed loading method to avoid downloading all data and only import the target data blocks determined by the snapshot chain.

Benefits of technology

This improves the efficiency of cloud disk cloning, avoids bandwidth exhaustion and delays caused by concurrent centralized access to OSS across multiple snapshots in multi-tenant scenarios, and accelerates cloud disk cloning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2025051390_02102025_PF_FP_ABST
    Figure IB2025051390_02102025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of cloud computing. Disclosed are a cloud disk cloning method, an apparatus and an electronic device. The method comprises: receiving a cloud disk cloning request initiated by an instance management and control service, and determining a target block storage cluster to be used for processing the cloud disk cloning request; according to the target block storage cluster, acquiring a target snapshot chain to which a snapshot ID belongs, and, on the basis of the target snapshot chain, creating a target cloud disk; returning cloud disk creation success information to the instance management and control service, so as to instruct the instance management and control service to mount the target cloud disk to an instance; and, according to the target block storage cluster, processing a data reading request, so as to import a target data block requested by the data reading request into the target cloud disk. The present application solves the technical problem of low cloud disk cloning efficiency due to performing virtual machine or container cloud disk cloning on the basis of full snapshot data in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Chinese patent application number 202410362472.5, filed with the Patent Office of China on March 27, 2024, entitled "CLOINING METHOD, DEVICE, AND ELECTRONIC APPLICATION FOR A CLOINING DISK," the entire contents of which are incorporated herein by reference. Technical Field This application relates to the field of cloud computing technology, and more specifically, to a cloud disk cloning method, device, and electronic device. Background: With the continuous evolution of container and serverless technologies, elastic computing, as an important component of cloud computing, is also booming. Currently, in the application scenarios of Elastic Container Instance (ECI) services, users have a need for batch cloud disk cloning. In related technologies, when cloning virtual machines or container cloud disks, cloning is performed based on full snapshot data. For example, the full snapshot data is downloaded from Object Storage Service (OSS) to a local cluster. However, due to the bandwidth and latency of accessing OSS within the entire region, cloud disk cloning efficiency is low. Currently, no effective solution has been proposed to address the aforementioned issues. SUMMARY OF THE INVENTION The present invention provides a cloud disk cloning method, apparatus, and electronic device to at least address the technical issue of low cloud disk cloning efficiency associated with cloning virtual machines or containers based on full snapshot data in related technologies. According to one aspect of an embodiment of the present application, a cloud disk cloning method is provided, comprising: receiving a cloud disk cloning request initiated by an instance management service, and determining a target block storage cluster to process the cloud disk cloning request, wherein the cloud disk cloning request includes at least a snapshot ID of a cloud disk snapshot to be used for cloning; obtaining, based on the target block storage cluster, a target snapshot chain to which the snapshot ID belongs, and creating a target cloud disk based on the target snapshot chain, wherein the target snapshot chain represents a parent-child relationship between the cloud disk snapshot corresponding to the snapshot ID and the cloud disk snapshots corresponding to the remaining snapshot IDs in the target snapshot chain; returning a cloud disk creation success message to the instance management service to instruct the instance management service to mount the target cloud disk to an instance, wherein, after detecting the target cloud disk, the instance initiates a data read request to the target block storage cluster where the target cloud disk is located; and processing, based on the target block storage cluster, the data read request to import a target data block requested by the data read request to the target cloud disk, wherein the address of the target data block is determined based on the target snapshot chain.Furthermore, the cloud disk cloning request also includes the number of cloud disks to be cloned. Determining a target block storage cluster to process the cloud disk cloning request includes: obtaining capacity information and information about the number of existing cloud disks of a block storage cluster from multiple block storage clusters; and determining the target block storage cluster from the multiple block storage clusters based on the capacity information of the block storage cluster, the number of existing cloud disks, and the number of cloud disks to be cloned. Furthermore, obtaining, from the target block storage cluster, a target snapshot chain to which the snapshot ID belongs includes: obtaining the target snapshot chain from a metadata server of the target block storage cluster. Furthermore, after obtaining, from the target block storage cluster, the target snapshot chain to which the snapshot ID belongs, the method further includes: determining, from the metadata server, a snapshot server corresponding to the snapshot ID and snapshot servers corresponding to other snapshot IDs; storing the target snapshot chain, the address of the snapshot server corresponding to the snapshot ID, and the addresses of the snapshot servers corresponding to other snapshot IDs; and sending the target snapshot chain and the cluster identifier of the target block storage cluster to a target node, so that the target node stores the target snapshot chain and the cluster identifier. The target node is configured to manage multiple block storage clusters. Furthermore, processing the data read request based on the target block storage cluster to import the target data block requested by the data read request to the target cloud disk includes: processing the data read request based on the target block storage cluster to obtain the target data block, and returning the target data block to the instance; downloading data blocks other than the target data block using a lazy loading method, composing a snapshot copy data file based on the target data block and the data blocks other than the target data block, and importing the snapshot copy data file to the target cloud disk. Furthermore, the data read request includes at least a target logical block address of the target cloud disk, and processing the data read request based on the target block storage cluster to obtain the target data block includes: determining, based on the target block storage cluster, a target snapshot server address and a target data block address corresponding to the target logical block address; and scheduling a target snapshot server corresponding to the target snapshot server address to obtain the target data block corresponding to the target data block address.Furthermore, scheduling the target snapshot server corresponding to the target snapshot server address to obtain the target data block corresponding to the target data block address includes: scheduling the target snapshot server to determine whether the target data block in the cache of the target snapshot server is a target load block, where the target load block is used to represent a data block with a delayed load flag; if the target data block in the cache of the target snapshot server is not a target load block, obtaining the target data block from the cache of the target snapshot server; if the target data block in the cache of the target snapshot server is a target load block, determining the parent snapshot of the cloud disk snapshot to which the target data block belongs based on the target snapshot chain, and initiating a delayed load request to the parent snapshot to obtain the target data block returned by the parent snapshot; if the target data block returned by the parent snapshot is not obtained, downloading the target data block from the object storage node. Furthermore, after downloading the target data block from the object storage node, the method also includes: scheduling the target snapshot server to write the target data block from the cache of the target snapshot server to the snapshot replica. Furthermore, downloading data blocks other than the target data block using a delayed loading method includes: determining, based on a metadata server, a snapshot server corresponding to a snapshot ID and snapshot servers corresponding to other snapshot IDs; and scheduling the snapshot server corresponding to the snapshot ID and snapshot servers corresponding to other snapshot IDs to download data blocks other than the target data block from the object storage node using a delayed loading method based on the target snapshot chain. Furthermore, after determining a target block storage cluster to process the cloud disk cloning request, the method further includes: if there are multiple target block storage clusters, determining a source target block storage cluster from the multiple target block storage clusters based on cluster identifiers corresponding to existing snapshot copies recorded in the target node, wherein the source target block storage cluster is used to store data blocks downloaded from the object storage node; and sending the snapshot ID and the cluster identifier corresponding to the snapshot ID recorded in the target node to metadata servers of target block storage clusters other than the source target block storage cluster among the multiple target block storage clusters, so that the metadata servers of the target block storage clusters other than the source target block storage cluster initiate data read requests to the source target block storage cluster.According to another aspect of an embodiment of the present application, a cloud disk cloning system is provided, comprising: a target node, configured to receive a cloud disk cloning request initiated by an instance management service and determine a target block storage cluster to process the cloud disk cloning request, wherein the cloud disk cloning request includes at least a snapshot ID of a cloud disk snapshot used for cloning; a block storage cluster, wherein a cloud disk is provided in the block storage cluster, the block storage cluster including a target block storage cluster, the target block storage cluster configured to obtain a target snapshot chain to which the snapshot ID belongs, create a target cloud disk based on the target snapshot chain, and return a cloud disk creation success message to the instance management service to instruct the instance management service to mount the target cloud disk to the instance; and, after receiving a data read request, process the data read request to import the target data block requested by the data read request to the target cloud disk; and an object storage node, configured to store cloud disk snapshots and snapshot chains corresponding to the cloud disk snapshots, wherein the snapshot chains include the target snapshot chain. According to another aspect of an embodiment of the present application, a cloud disk cloning device is provided, comprising: a receiving unit configured to receive a cloud disk cloning request initiated by an instance management service and determine a target block storage cluster to process the cloud disk cloning request, wherein the cloud disk cloning request includes at least a snapshot ID of a cloud disk snapshot to be used for cloning; an acquiring unit configured to acquire, from the target block storage cluster, a target snapshot chain to which the snapshot ID belongs, and create a target cloud disk based on the target snapshot chain, wherein the target snapshot chain represents a parent-child relationship between the cloud disk snapshot corresponding to the snapshot ID and the cloud disk snapshots corresponding to the remaining snapshot IDs in the target snapshot chain; a sending unit configured to return a cloud disk creation success message to the instance management service to instruct the instance management service to mount the target cloud disk to the instance, wherein, after detecting the target cloud disk, the instance is configured to initiate a data read request to the target block storage cluster where the target cloud disk is located; and a processing unit configured to process the data read request, based on the target block storage cluster, to import a target data block requested by the data read request to the target cloud disk, wherein the address of the target data block is determined based on the target snapshot chain. Furthermore, the receiving unit includes: a first obtaining subunit configured to obtain capacity information of a block storage cluster and information about the number of existing cloud disks from among the multiple block storage clusters; a first determining subunit configured to determine a target block storage cluster from among the multiple block storage clusters based on the capacity information of the block storage cluster, information about the number of existing cloud disks, and the number of cloud disks to be cloned. Furthermore, the obtaining unit includes: a second obtaining subunit configured to obtain a target snapshot chain from a metadata server of the target block storage cluster.Furthermore, the cloud disk cloning device further includes: a first determination unit configured to, after obtaining a target snapshot chain to which a snapshot ID belongs based on a target block storage cluster, determine, based on a metadata server, the snapshot server corresponding to the snapshot ID and the snapshot servers corresponding to the remaining snapshot IDs; a first processing unit configured to store the target snapshot chain, the address of the snapshot server corresponding to the snapshot ID, and the addresses of the snapshot servers corresponding to the remaining snapshot IDs; and a second processing unit configured to send the target snapshot chain and the cluster identifier of the target block storage cluster to a target node, so that the target node stores the target snapshot chain and the cluster identifier. The target node is configured to manage multiple block storage clusters. Furthermore, the processing unit includes: a first processing sub-unit configured to process a data read request based on the target block storage cluster, obtain a target data block, and return the target data block to the instance; and a second processing sub-unit configured to download data blocks other than the target data block using a lazy loading method, compose a data file of the snapshot copy based on the target data block and the data blocks other than the target data block, and import the data file of the snapshot copy into the target cloud disk. Furthermore, the data read request includes at least a target logical block address of a target cloud disk, and the first processing sub-unit includes: a first determination module, configured to determine a target snapshot server address and a target data block address corresponding to the target logical block address based on a target block storage cluster; and a first processing module, configured to schedule a target snapshot server corresponding to the target snapshot server address to obtain a target data block corresponding to the target data block address. Furthermore, the first processing module includes: a determination submodule configured to schedule a target snapshot server to determine whether a target data block in the target snapshot server's cache is a target load block, where a target load block represents a data block with a delayed load flag; an acquisition submodule configured to, if the target data block in the target snapshot server's cache is not a target load block, acquire the target data block from the target snapshot server's cache; a determination submodule configured to, if the target data block in the target snapshot server's cache is a target load block, determine the parent snapshot of the cloud disk snapshot to which the target data block belongs based on the target snapshot chain, and initiate a delayed load request to the parent snapshot to acquire the target data block returned by the parent snapshot; and a processing submodule configured to, if the target data block returned by the parent snapshot is not acquired, download the target data block from the object storage node. Furthermore, the cloud disk cloning device also includes: a third processing unit configured to, after downloading the target data block from the object storage node, schedule the target snapshot server to write the target data block from the target snapshot server's cache to the snapshot copy.Furthermore, the second processing sub-unit includes: a second determination module configured to determine, based on the metadata server, a snapshot server corresponding to the snapshot ID and snapshot servers corresponding to other snapshot IDs; a second processing module configured to schedule the snapshot server corresponding to the snapshot ID and snapshot servers corresponding to other snapshot IDs to download data blocks other than the target data block from the object storage node using a delayed loading method based on the target snapshot chain. Furthermore, the cloud disk cloning apparatus also includes: a second determination unit configured to, after determining a target block storage cluster to process the cloud disk cloning request, determine a source target block storage cluster from the multiple target block storage clusters based on cluster identifiers corresponding to existing snapshot copies recorded in the target node, if there are multiple target block storage clusters, wherein the source target block storage cluster is configured to store the data blocks downloaded from the object storage node; and a fourth processing unit configured to send the snapshot ID and the cluster identifier corresponding to the snapshot ID recorded in the target node to metadata servers of target block storage clusters other than the source target block storage cluster among the multiple target block storage clusters, so that the metadata servers of the target block storage clusters other than the source target block storage cluster initiate data read requests to the source target block storage cluster. According to another embodiment of the present application, an electronic device is provided, comprising: a memory storing an executable program; and a processor configured to execute the program, wherein when the program is executed, the program executes any of the aforementioned cloud disk cloning methods. According to another embodiment of the present application, a computer-readable storage medium is provided, wherein the storage medium stores the program, wherein when the program is executed, the device containing the storage medium is controlled to execute any of the aforementioned cloud disk cloning methods. According to another embodiment of the present application, a computer program product is provided, comprising the computer program, wherein when executed by the processor, the computer program implements any of the aforementioned cloud disk cloning methods.In an embodiment of the present application, a cloud disk cloning request initiated by an instance management service is received, and a target block storage cluster is determined to process the cloud disk cloning request, wherein the cloud disk cloning request includes at least the snapshot ID of the cloud disk snapshot to be used for cloning. A target snapshot chain to which the snapshot ID belongs is obtained from the target block storage cluster, and a target cloud disk is created based on the target snapshot chain. The target snapshot chain represents the parent-child relationship between the cloud disk snapshot corresponding to the snapshot ID and the cloud disk snapshots corresponding to the remaining snapshot IDs in the target snapshot chain. A cloud disk creation success message is returned to the instance management service to instruct the instance management service to mount the target cloud disk to the instance. After detecting the target cloud disk, the instance initiates a data read request to the target block storage cluster where the target cloud disk is located. The target block storage cluster processes the data read request to import the target data block requested by the data read request to the target cloud disk. The address of the target data block is determined based on the target snapshot chain. Based on the parent-child relationship between the cloud disk snapshots represented by the snapshot chain, cloud disk cloning is accelerated, that is, snapshot copies are uniquely downloaded across the entire region based on the snapshot chain. This avoids the OSS bandwidth usage caused by all snapshot copies downloading full data from OSS to the local cluster when using multiple snapshot copies for batch cloud disk cloning. This prevents bandwidth exhaustion and OSS data access timeouts caused by concurrent centralized access to OSS from multiple snapshots across clusters in multi-tenant scenarios. This effectively reduces the latency associated with downloading data from OSS, improves cloud disk cloning efficiency, and reduces contention for OSS bandwidth caused by sudden increases in batch tasks. This improves cloud disk cloning efficiency and addresses the technical issue of low cloud disk cloning efficiency in related technologies related to cloning virtual machines or containers based on full snapshot data. BRIEF DESCRIPTION OF THE DRAWINGS The drawings described herein are provided to provide a further understanding of the present application and constitute a part of this application. The illustrative embodiments of this application and their description are provided to explain the present application and do not constitute undue limitations thereon.In the accompanying drawings: FIG1 is a schematic diagram of a computer terminal provided according to an embodiment of the present application; FIG2 is a schematic diagram of the structure of a distributed block device provided according to an embodiment of the present application; FIG3 is a schematic diagram of the logical relationship of a logical storage unit provided according to an embodiment of the present application; FIG4 is a schematic diagram of the storage format of a physical file of a logical segment provided according to an embodiment of the present application; FIG5 is a schematic diagram of the data writing process of a logical segment provided according to an embodiment of the present application; FIG6 is a schematic diagram of the process of snapshot-based cloud disk cloning provided according to an embodiment of the present application; FIG7 is a flowchart of the cloud disk cloning method provided according to an embodiment of the present application; FIG8 is a schematic diagram of snapshot chain-based cloud disk cloning provided according to an embodiment of the present application; FIG9 is a schematic diagram of the incremental reference relationship of snapshot data provided according to an embodiment of the present application; FIG10 is a schematic diagram of the data of the snapshot chain management module in the control node provided according to an embodiment of the present application; FIG11 is a schematic diagram of the data of the snapshot chain management module in the metadata server provided according to an embodiment of the present application; FIG12 is a schematic diagram of the multi-level data delayed loading request and return process based on the snapshot chain provided according to an embodiment of the present application; FIG1 is a schematic diagram of an incremental storage method for a snapshot chain on a block storage cluster according to the first embodiment of the present application; FIG14 is a schematic diagram of a reference storage method after incremental import of a snapshot chain on a block storage cluster according to the first embodiment of the present application; FIG15 is a schematic diagram of a multi-level data cache and data request process based on a snapshot chain according to the first embodiment of the present application; FIG16 is a schematic diagram of a cloud disk cloning device according to the third embodiment of the present application; and FIG17 is a block diagram of an electronic device according to the fourth embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS To help those skilled in the art better understand the present invention, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings. It should be understood that the described embodiments are merely a portion of the embodiments of the present application, and are not exhaustive. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present application without inventive effort shall fall within the scope of protection of the present application. It should be noted that the terms "first," "second," and so on, in the specification and claims of this application and the accompanying drawings, are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein.Furthermore, the terms "including," "having," and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device comprising a series of steps or units need not be limited to the steps or units explicitly listed and may include other steps or units not explicitly listed or inherent to the process, method, product, or device. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, storage, and display, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. The collection, use, and processing of relevant data must comply with relevant laws, regulations, and standards in the relevant region, and corresponding operation portals are provided for users to choose to authorize or deny. First, some nouns or terms used in the description of the embodiments of this application are subject to the following interpretations: Delayed loading: When a virtual machine starts, disk data is slowly loaded from a disk snapshot. The virtual machine can run without the loading being completed. Example 1 According to an embodiment of the present application, a cloud disk cloning method is also provided. It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system, such as a set of computer-executable instructions. Furthermore, although the flowcharts illustrate a logical order, in some cases, the steps shown or described may be executed in a different order. The method embodiment provided in Example 1 of the present application can be executed in a mobile terminal, computer terminal, or similar computing device. Figure 1 shows a hardware block diagram of a computer terminal (or mobile device) for implementing the cloud disk cloning method. As shown in Figure 1, the computer terminal (or mobile device) 10 may include a processor assembly 102 (the processor assembly 102 may include, but is not limited to, a processing device such as a microprocessor (MCU) or a programmable logic device (FPGA), and the processor assembly 102 may include a processor assembly, as shown in Figure 1 by 102a, 102b, ..., 102n), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS), a network interface, a power supply and / or a camera.Those skilled in the art will appreciate that the structure shown in FIG1 is merely illustrative and does not limit the structure of the electronic device described above. For example, the computer terminal 10 may include more or fewer components than shown in FIG1 , or have a configuration different from that shown in FIG1 . It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry." This data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuitry may be a single, independent processing module, or may be fully or partially integrated into any of the other components of the computer terminal 10 (or mobile device). The memory 104 may be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the cloud disk cloning method in the embodiments of the present application. The processor 102 executes the software programs and modules stored in the memory 104 to execute various functional applications and data processing, thereby implementing the cloud disk cloning method described above. Memory 104 may include high-speed random access memory (RAM) and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, memory 104 may further include memory located remotely from processor 102, which can be connected to computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Transmission device 106 is used to receive or transmit data via a network. Specific examples of such networks may include a wireless network provided by the computer terminal 10's telecommunications provider. In one instance, transmission device 106 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In one instance, transmission device 106 may be a radio frequency (RF) module for wireless communication with the Internet. The display may be a touchscreen liquid crystal display, which enables a user to interact with the user interface of computer terminal 10 (or mobile device). With the continuous evolution of container and serverless technologies, elastic computing, a key component of cloud computing, is also booming. For example, in big data training scenarios built on public cloud elastic infrastructure, some optimization methods decouple image data from model data to speed up image pull and startup, addressing the slow startup of images caused by large model and training data volumes.During this process, model data is independently stored by the user on a separate data disk during the early stages of training. When needed, fast data access and container startup are achieved based on cloud disks and cloud disk snapshots. For example, in the ECI service application scenario, users can store model data on OSS, File Storage Network Attached Storage (NAS), and Elastic Block Storage (EBS) cloud disk snapshots. When used, they can be mounted onto containers using a universal container interface to achieve data sharing. During big data training and usage, user data cache disks can be created based on existing data disk snapshots. After minor modifications during training, the data on the current data disk is used as cache data for the next training session. Figure 2 is a schematic diagram of the distributed block device structure provided in accordance with the first embodiment of the present application. As shown in Figure 2, the log-structured distributed block device (LSBD) includes a metadata server cluster, block servers, and a distributed file system. LSBD data is written append-only. References to block device writes do not require updating the logical block reference addresses to disk. Instead, indexes of read data blocks are accumulated in memory. Once a certain number of indexes are reached, the newer indexes of partially updated data blocks in memory are asynchronously updated and merged with the fully stored indexes, enabling efficient data reading. In this distributed storage environment, the metadata and data access servers required by the storage units provided by the storage devices are distributed to multiple storage servers (block servers 1, 2, and 3, as shown in Figure 2) responsible for providing disk block devices. The block storage service cluster includes at least metadata servers 1, 2, and 3, as well as multiple block servers. The metadata servers store cloud disk and snapshot scheduling and configuration information, while the block servers store logical relationship data, logical segment groups, and logical segment information for logical storage units (LUNs). FIG3 is a schematic diagram of the logical relationship of logical storage units provided according to the first embodiment of the present application. For the logical segments in the distributed file system shown in FIG2 , as shown in FIG3 , multiple logical segments (such as segment #0, segment #1, segment #2, and segment #3) constitute a segment group, and multiple segment groups (such as segment group #0 and segment group #1) constitute a LUN.That is, a logical segment group is divided into fixed segments. A logical segment (Device Segment) represents a continuous logical storage address space. The metadata of the logical segment, including configuration information such as size, is stored on the metadata server. Physical files are stored in the directory corresponding to the logical segment on the shared storage service. For example, as shown in Figure 2, the storage directory corresponding to the logical segment contains: a data file (Data File) and an index file (Index File). Figure 4 is a schematic diagram of the storage format of the physical file of a logical segment according to the first embodiment of the present application. As shown in Figure 4, the application writes to the data file in an append manner. The offset of the file is continuously increasing and cannot be overwritten. The index file records the merge of all write locations of the application up to a certain point in time, representing the logical address space. The index file is loaded into memory when the logical segment is loaded. When the application reads the logical segment, it indicates the specific data file and offset within the data file corresponding to the logical block address (LBA) for actual data access. The entire logical data length indicated by the index file is consistent with the entire logical data length of the logical segment. The logical segments of a cloud disk consist of data files, index files, and log files. These files are distributed file types that can only be written to, not overwritten. The index file is responsible for recording the correspondence between the logical address range (Device LBA Range) and the physical address range of the data file. The data file is responsible for storing the data of the logical segment, and the log file records the transaction log of modifications to the logical segment. Figure 5 is a schematic diagram of the data writing process for a logical segment according to the first embodiment of the present application. As shown in Figure 5, for a write request initiated by an application, the application data carried in the write request is written to the data file in the form of a data block. The transaction log of the written data block is recorded in the log file, and the correspondence between the logical address range and the physical address range of the newly written data block is updated in the index file. When reading a data block, the index file can be loaded into the compression mapping table in memory. The index file in memory can be swapped in and out according to data reading needs.FIG6 is a schematic diagram of a process for snapshot-based cloud disk cloning according to the first embodiment of the present application. As shown in FIG6 , as the storage front end, the instance can be a virtual machine or a container. Containers are used as an example for the following description. The block storage back end can include a storage management node, an object storage node, a block storage cluster, and a distributed file system. The block service node can deploy at least one cloud disk. For example, after cloning the cloud disk based on a snapshot, it is mounted on the container instance (storage access shown in FIG6 ). As shown in FIG6 , after creating a container data disk based on a snapshot on OSS, access to the container instance on the storage access end can be provided by lazy loading data blocks. After the snapshot data is downloaded from OSS to the distributed file system on the cluster, the cloud disk data is directly referenced using the local snapshot copy, such as by referencing the snapshot copy data through hard links, enabling data file sharing of a single local snapshot copy. However, in scenarios where snapshots are used as container cache disks for data disks, downloading and cloning based on snapshots effectively ignores the data chain generation process. For example, when cloning a cloud disk based on snapshots 2 and 3, two full copies of data must be downloaded from OSS to the local cluster. Furthermore, when cloning across clusters (e.g., snapshot 2 corresponds to cluster 1, and snapshot 3 corresponds to cluster 2), the data downloaded from snapshot 3 on cluster 2 also downloads the full data to the local cluster. This results in single-tenant or multi-tenant input / output (I / O) latency being limited by the bandwidth and latency of accessing OSS within the entire region, resulting in low cloud disk cloning efficiency. Against this technical background, the present application provides a cloud disk cloning method as shown in Figure 7. Figure 7 is a flowchart of the cloud disk cloning method according to Embodiment 1 of the present application. The method includes: Step S701: Receive a cloud disk cloning request initiated by an instance management service and determine a target block storage cluster to process the cloud disk cloning request. The cloud disk cloning request includes at least the snapshot ID of the cloud disk snapshot used for cloning. Optionally, the instance can be a virtual machine or a container, the instance management service can be an Elastic Compute Service (ECS) or an ECI service, and the target block storage cluster can be one or more. For example, the block storage backend can include an Availability Zone (AZ) storage management node, an Object Storage (OSS) node, and a block storage cluster.The AZ storage management and control node can receive cloud disk cloning requests initiated by an instance management service (such as the ECI service), determine the target block storage cluster to process the cloud disk cloning request, and forward the cloud disk cloning request to the target block storage cluster. In an optional embodiment, the schematic diagram shown in FIG8 can be used to implement cloud disk cloning. Taking the use scenario of EBS cloud disks and snapshots as container data disks as an example, FIG8 is a schematic diagram of cloud disk cloning based on snapshot chains according to the first embodiment of the present application. As shown in step 1 of FIG8 , the AZ storage management and control node can receive a cloud disk cloning request initiated by the ECI service, determine an appropriate target block storage cluster based on cloud disk performance indicators, block storage cluster capacity information, the number of existing cloud disks, and the snapshot ID (such as snapshot 3) carried in the request, and forward the cloud disk cloning request to the metadata server (Block Master) of the target block storage cluster. One cloud disk corresponds to one backend storage cluster, or several cloud disks are located in one backend storage cluster. In step S702, the target snapshot chain to which the snapshot ID belongs is obtained from the target block storage cluster, and a target cloud disk is created based on the target snapshot chain. The target snapshot chain represents the parent-child relationship between the cloud disk snapshot corresponding to the snapshot ID and the cloud disk snapshots corresponding to the remaining snapshot IDs in the target snapshot chain. Since the snapshot data generated by the cloud disk data based on incremental changes to the task data has incremental characteristics, this is consistent with the incremental data generation process of the container image. Therefore, the parent-child relationship between cloud disk snapshots represented by the snapshot chain accelerates cloud disk cloning. Specifically, the snapshot chain enables unique downloading of snapshot copies across the entire region and multi-level storage node caching. This avoids the OSS bandwidth consumption caused by all snapshot copies downloading the full data from the OSS to the local cluster when using multiple snapshot copies with incremental relationships for batch cloud disk cloning. This avoids bandwidth exhaustion and OSS data access timeouts caused by concurrently accessing the OSS across multiple clusters in multi-tenant scenarios. This effectively reduces the delay caused by downloading data from the OSS and improves cloud disk cloning efficiency. For example, after forwarding a cloud disk cloning request to the target block storage cluster, the metadata server of the target block storage cluster can obtain the target snapshot chain corresponding to the snapshot ID (such as snapshot 3) from OSS, such as snapshot 1 - snapshot 2 - snapshot 3, and create the target cloud disk (i.e., a new cloud disk) based on the number of cloud disks to be cloned (such as 10 disks) and the target snapshot chain.For example, when a cloud disk clone request arrives at the target block storage cluster, the metadata server determines whether to download the snapshot chain locally. For example, for the first request, the metadata server can download the snapshot chain from OSS and simultaneously record the snapshot chain and the address of the corresponding snapshot server (Snapshot Server) in the metadata server's snapshot chain management module. After creation is complete, the metadata server returns the snapshot chain information to the AZ storage control node. The metadata server is equipped with a snapshot chain management module that records the address of the Snapshot Server (SS address). After obtaining the target snapshot chain to which the snapshot ID belongs from the metadata server, the metadata server determines the snapshot server corresponding to the snapshot ID and the snapshot servers corresponding to the remaining snapshot IDs. That is, the snapshot IDs are assigned to one or more Snapshot Servers. The metadata server stores the target snapshot chain, the address of the snapshot server corresponding to the snapshot ID, and the addresses of the snapshot servers corresponding to the remaining snapshot IDs. The target snapshot chain and the cluster identifier of the target block storage cluster are then sent to the AZ storage control node, which stores the target snapshot chain and cluster identifier, thereby creating the target cloud disk. Figure 9 is a schematic diagram of the incremental reference relationship of snapshot data provided in accordance with the first embodiment of the present application. As shown in Figure 9, disk snapshot Snapshot 1 mirrors earlier data, Snapshot 2 is an incremental update based on Snapshot 1, and Snapshot 3 is an incremental update relative to Snapshot 2. That is, both Snapshot 2 and Snapshot 3 inherit data blocks from Snapshot 1. Snapshot IDs in the snapshot chain, except for the first one, which represents the full data, represent incremental snapshot data. These snapshot IDs are assigned to one or more snapshot servers for subsequent data download. In step S703, a cloud disk creation success message is returned to the instance management service, instructing the instance management service to mount the target cloud disk to the instance. Upon detecting the target cloud disk, the instance initiates a data read request to the target block storage cluster where the target cloud disk resides.Optionally, after the new cloud disk is created, the information is returned to the instance management service. For example, after the metadata server of the target block storage cluster completes storage of the cloud disk information and snapshot chain, it returns the information to the AZ storage management node. The AZ storage management node then returns a cloud disk creation success message to the instance management service. The instance's application can then detect the target cloud disk and initiate a data read request to the target block storage cluster where the target cloud disk is located (as shown in step 2 of FIG. 8 ). In other words, cloud disk cloning includes both cloud disk creation and data import. In step S704, the target block storage cluster processes the data read request to import the target data block requested by the data read request into the target cloud disk. The address of the target data block is determined based on the target snapshot chain. After a cloud disk is created, the actual data on the cloud disk is empty. The missing LBAs are marked as data to be supplemented. When a container or virtual machine application needs to read cloud disk data (i.e., initiates an I / O request), the backend downloads the required data blocks from OSS or can read them from the already downloaded cache. The backend then slowly downloads the remaining data blocks from OSS to the snapshot copy. Therefore, the data read request is processed based on the target block storage cluster to import the target data blocks requested by the data read request to the target cloud disk. In this application, cloud disk cloning is accelerated by the parent-child relationship between cloud disk snapshots represented by a snapshot chain. Specifically, snapshot copies are downloaded uniquely across the entire region based on the snapshot chain. This avoids the OSS bandwidth consumption caused by all snapshot copies downloading the full data from OSS to the local cluster when using multiple snapshot copies for batch cloud disk cloning. This avoids bandwidth exhaustion and OSS data access timeouts caused by concurrently accessing OSS from multiple snapshots across clusters in multi-tenant scenarios. This effectively reduces the delay caused by downloading data from OSS and improves cloud disk cloning efficiency. How to determine the target block storage cluster to process the cloud disk cloning request is crucial. Therefore, in the cloud disk cloning method provided in the first embodiment of the present application, the cloud disk cloning request also includes the number of cloud disks to be cloned. Determining the target block storage cluster to process the cloud disk cloning request includes: obtaining capacity information of a block storage cluster and information about the number of existing cloud disks from multiple block storage clusters; and determining the target block storage cluster from the multiple block storage clusters based on the capacity information of the block storage cluster, the number of existing cloud disks, and the number of cloud disks to be cloned.Optionally, to accelerate data caching, the AZ storage management and control node is equipped with a snapshot replica balancing module and a snapshot chain management module. The snapshot replica balancing module records information such as the number of cloned cloud disks and cluster identifiers corresponding to the snapshot ID. When the AZ storage management and control node receives a batch cloud disk cloning request, it can obtain the block storage cluster's capacity information and the number of existing cloud disks from the snapshot replica balancing module. Based on the block storage cluster's capacity information, the number of existing cloud disks, and the number of cloud disks to be cloned, it can determine a target block storage cluster from multiple block storage clusters. For example, when the AZ storage management and control node receives a batch cloud disk cloning request, the snapshot replica balancing module determines whether to distribute the load across multiple block storage clusters based on the threshold for the number of cloud disks to be created in a single cluster. For example, the snapshot replica balancing module can compare the number of cloud disks to be cloned with the threshold for the number of cloud disks to be created in a single cluster. If the number of cloud disks to be cloned exceeds the threshold for the number of cloud disks to be created in a single cluster, multiple target block storage clusters (block storage cluster 1 and block storage cluster 2, as shown in FIG8 ) can be determined. The snapshot replica balancing module selects an appropriate block storage cluster from the available candidate clusters (i.e., multiple target block storage clusters) as the source for the entire snapshot chain (block storage cluster 1, as shown in FIG8 , is the source block storage cluster). Specifically, the snapshot source is selected within the entire region, and the full snapshot data is downloaded from the OSS to the local cluster. The snapshot chain management module records whether the snapshot is being used for the first time. When the target block storage cluster returns the backend storage snapshot chain information, it is recorded in the snapshot chain management module, along with the address of the source block storage cluster. FIG10 is a schematic diagram of data in the snapshot chain management module in the control node according to the first embodiment of the present application. As shown in FIG10 , the snapshot chain management module of the AZ storage control node stores the block storage cluster address of each snapshot in the snapshot chain, facilitating cross-cluster access. For example, snapshot replica Snap2 is in cluster 1, and snapshot replica Snap3 is in cluster 2. Therefore, the snapshot chain management module of the AZ storage control node can be used to select snapshot replicas in a snapshot chain across multiple block storage clusters. In addition, the snapshot chain management module of the AZ storage management node also stores the parent-child relationship of the snapshot chain. For example, for the snapshot chain: snapshot 1 - snapshot 2 - snapshot 3, the parent snapshot of snapshot copy Snap1 (snapshot ID of snapshot 1) is empty (NULL), the parent snapshot of snapshot copy Snap2 is snapshot copy Snap1, and the parent snapshot of snapshot copy Snap3 is snapshot copy Snap2.By providing a snapshot replica balancing module and a snapshot chain management module, the pressure of data I / O requests can be effectively distributed based on snapshot chain storage and caching, achieving multi-level snapshot data block caching, thereby accelerating the startup of single-tenant data disks. Furthermore, for cross-cluster requests, direct data requests to the source cluster effectively reduce overall OSS bandwidth usage while meeting the data caching speed requirements of multiple tenants, thereby ensuring the startup speed of multi-tenant images. To obtain the target snapshot chain to which the snapshot ID belongs, in the cloud disk cloning method provided in Example 1 of the present application, obtaining the target snapshot chain to which the snapshot ID belongs based on the target block storage cluster includes obtaining the target snapshot chain based on the metadata server of the target block storage cluster. To accelerate data caching, in the cloud disk cloning method provided in the first embodiment of the present application, after obtaining the target snapshot chain to which the snapshot ID belongs based on the target block storage cluster, the snapshot server corresponding to the snapshot ID and the snapshot servers corresponding to the remaining snapshot IDs are determined based on the metadata server; the target snapshot chain, the address of the snapshot server corresponding to the snapshot ID, and the addresses of the snapshot servers corresponding to the remaining snapshot IDs are stored; the target snapshot chain and the cluster identifier of the target block storage cluster are sent to the target node, so that the target node stores the target snapshot chain and the cluster identifier, wherein the target node is used to manage multiple block storage clusters. The metadata server of the target block storage cluster can obtain the target snapshot chain from the object storage node (i.e., OSS). For example, block storage cluster 1 shown in Figure 8 is the target block storage cluster. When a cloud disk clone request arrives at the metadata server of block storage cluster 1, the metadata server determines whether to download the snapshot chain locally based on the request from the AZ storage control node. For example, for the first request, the metadata server can download the snapshot chain from the OSS (steps 3 and 4 in Figure 8). Simultaneously, the metadata server's snapshot chain management module records the snapshot chain and the address of the corresponding snapshot server (Snapshot Server) from which the snapshot was downloaded. After creation is complete, the snapshot chain information is returned to the AZ storage control node. Figure 11 is a schematic diagram of the data in the snapshot chain management module of the metadata server provided in Example 1 of the present application. The metadata server of the EBS block storage cluster is equipped with a snapshot chain management module. However, the snapshot chain management module of the metadata server differs from the snapshot chain management module of the AZ storage control node. As shown in Figure 11, the snapshot chain management module of the metadata server records the address of the Snapshot Server (SS address).After obtaining the target snapshot chain to which the snapshot ID belongs from the metadata server, the metadata server determines the snapshot server corresponding to the snapshot ID and the snapshot servers corresponding to the remaining snapshot IDs. That is, the snapshot IDs are assigned to one or more Snapshot Servers. For example, snapshot copy Snap1 is assigned to Snapshot Server 1 shown in Figure 8, and snapshot copy Snap2 is assigned to Snapshot Server 2 shown in Figure 8. The target snapshot chain, the address of the snapshot server corresponding to the snapshot ID, and the addresses of the snapshot servers corresponding to the remaining snapshot IDs are stored (as shown in Figure 11). The target snapshot chain and the cluster identifier of the target block storage cluster are sent to the target node (i.e., the AZ storage management node) so that the target node stores the target snapshot chain and cluster identifier (as shown in Figure 10). It should be noted that cloud disk cloning acceleration based on snapshot chain increments avoids the OSS bandwidth occupation caused by all snapshot copies downloading full data from OSS to the local cluster when batch cloud disk cloning is performed using multiple snapshot copies. In the case of a single cluster or cross-storage clusters, data is cached in the cluster based on the incremental relationship of snapshots in the snapshot chain, effectively reducing the I / O latency caused by downloading data from OSS. Improved cloud disk cloning efficiency. To achieve data import, in the cloud disk cloning method provided in Example 1 of the present application, processing a data read request based on the target block storage cluster to import the target data block requested by the data read request to the target cloud disk includes: processing the data read request based on the target block storage cluster to obtain the target data block, and returning the target data block to the instance; downloading data blocks other than the target data block using a delayed loading method, and composing a snapshot copy of the data file based on the target data block and the data blocks other than the target data block, and importing the snapshot copy of the data file to the target cloud disk. Optionally, the snapshot cloning request adopts a delayed loading method, that is, the data blocks on the OSS are not provided for external services until all downloads are completed. Instead, they are downloaded according to the user's I / O request, and the download of unrequested increments and data blocks that need to be downloaded is deferred after the user's I / O request. In an optional embodiment, the data read request includes at least the target logical block address of the target cloud disk (e.g., LBA#3). During the process of processing the data read request based on the target block storage cluster to obtain the target data block, The target snapshot server address and target data block address corresponding to the target logical block address can be determined according to the target block storage cluster, and then the target snapshot server corresponding to the target snapshot server address is scheduled to obtain the target data block corresponding to the target data block address.For example, a data read request is to read LBA #3 of snapshot 3. When the cloud disk is created, the snapshot ID corresponding to the cloud disk clone is recorded in the cloud disk metadata. The requested LBA can be converted to the address of the snapshot server and the corresponding snapshot data block address (i.e., the target data block address). For example, based on the data information recorded in the snapshot chain management module of the Block Master, it can be determined that the target snapshot server address corresponding to snapshot 3 is the address of Snapshot Server 3. In an optional embodiment, when scheduling the target snapshot server corresponding to the target snapshot server address to obtain the target data block corresponding to the target data block address, the target snapshot server can be scheduled to determine whether the target data block in the target snapshot server's cache is the target load block. If the target data block in the target snapshot server's cache is not the target load block, the target data block is obtained from the target snapshot server's cache. If the target data block in the target snapshot server's cache is the target load block, the parent snapshot of the cloud disk snapshot to which the target data block belongs is determined based on the target snapshot chain, and a lazy load request is initiated to the parent snapshot to obtain the target data block returned by the parent snapshot. If the target data block returned by the parent snapshot is not obtained, the target data block is downloaded from the object storage node. During the cloud disk cloning process, before the snapshot is completely downloaded locally, data block reads are all lazy loaded. That is, data blocks are read from the cache of the Snapshot Server. If the current snapshot indicates that the data block is stored in the parent snapshot, a request is initiated to the parent snapshot. After the request, the data is stored in the cache of the local Snapshot Server. FIG12 is a schematic diagram of a multi-level data delayed loading request and return process based on a snapshot chain according to the first embodiment of the present application. The index information of all data blocks of the cloud disk is marked as delayed loading blocks (i.e., pending download status) in the block server. As shown in FIG12 , the data block marked as (-1) is a delayed loading block, which means that the data block has not been downloaded in the local cluster and needs to continue to access the snapshot server for download.For example, a data read request is to read LBA#3 of snapshot 3 (Snap3). Snap3 is in Snapshot Server 3, meaning the target snapshot server is Snapshot Server 3. Snapshot Server 3 determines that LBA#3 in its own cache is a delayed load block (i.e., the target load block), and based on the snapshot chain, determines the parent snapshot (Snap2) of the cloud disk snapshot (Snap3) to which the target data block belongs. It then initiates a delayed load request to Snap2. LBA#3 in Snapshot Server 2, where Snap2 is located, is also a delayed load block. Snapshot Server 2 determines the parent snapshot (Snap1) based on the snapshot chain and initiates a delayed load request to Snap1 to obtain the target data block returned by Snap1 (see VI in Figure 12). Snapshot Server 1, where Snap1 is located, returns VI to Snapshot Server 2, which then returns VI to Snapshot Server 3, causing LBA#3 of Snap3 to change from (-1) to VI. If the target data block returned by the parent snapshot is not retrieved, indicating that the Snapshot Server's cache does not contain a record of the data block, the data block can be downloaded from the OSS. By adopting a snapshot chain download approach, different data cache disks request different snapshot IDs as image IDs, achieving multi-level snapshot copy data caching and acceleration, effectively reducing the delay caused by downloading data from the OSS and improving cloud disk cloning efficiency. To improve cloud disk cloning efficiency, in the cloud disk cloning method provided in Example 1 of the present application, after downloading the target data block from the object storage node, the target snapshot server is scheduled to write the target data block from the target snapshot server's cache to the snapshot copy. To improve cloud disk cloning efficiency, in the cloud disk cloning method provided in Example 1 of the present application, a delayed loading approach is used to download data blocks other than the target data block, including: determining, based on the metadata server, the snapshot server corresponding to the snapshot ID and the snapshot servers corresponding to the remaining snapshot IDs; and scheduling the snapshot server corresponding to the snapshot ID and the snapshot servers corresponding to the remaining snapshot IDs to download data blocks other than the target data block from the object storage node using a delayed loading approach based on the target snapshot chain. The local cluster uses a snapshot chain-based data management method. Incremental snapshot storage only downloads the newly added data in the snapshot chain and uses a lazy loading method to reference the parent snapshot. That is, the cloud disk data references the full snapshot data.Snapshot chain data is uniquely stored in increments on the cluster. After downloading, it is completed using an incremental, iterative approach. This avoids data reading and copying while also meeting the complete data requirement for cloud disk cloning. Therefore, when downloading data blocks other than the target data block using a delayed loading approach, the Block Master determines the snapshot server corresponding to the snapshot ID and the snapshot servers corresponding to the remaining snapshot IDs. The snapshot server corresponding to the snapshot ID and the snapshot servers corresponding to the remaining snapshot IDs are scheduled to download data blocks other than the target data block from the OSS using a delayed loading approach based on the snapshot chain, completing the overall completion. Once the snapshots on the snapshot chain are downloaded, the Block Master's snapshot chain management module completes the incremental data based on the snapshot chain. The completion process is performed using a chained, iterative approach, avoiding full data reading and copying. Figure 13 is a schematic diagram of the incremental storage approach for a snapshot chain on a block storage cluster according to the first embodiment of the present application. As shown in Figure 13, snapshot increments are stored incrementally in the local cluster. The I / O read of the delayed loaded block requires initiating a data request to the parent snapshot. The method for requesting the parent snapshot is described in Figure 12 and is not further described here. Figure 14 is a schematic diagram of the reference storage method after incremental import of a snapshot chain on a block storage cluster, according to the first embodiment of the present application. As shown in Figure 14, after the snapshot download is complete, the Block Master's snapshot chain management module initiates a data import from the snapshot on Snap1 to Snap2, based on the snapshot's SS address recorded in the snapshot chain. This import utilizes a hard link mechanism, and the delayed-load block in Snap2 references the data file on Snap1. After Snap2 completes its data import, the Block Master's snapshot chain management module imports Snap2 to Snap3. The import operation completes the snapshot reference data for incremental snapshots Snap2 and Snap3, completing the iterative import process. Snapshots Snap1, Snap2, and Snap3 can each initiate data import to the cloud disk. The index file corresponding to the delayed-load block in the original incremental snapshot references the parent snapshot data file via a hard link mechanism, thereby completing the snapshot's incremental data and forming a complete full snapshot. This completes the cloud disk cloning process for the incremental snapshot within the cluster.Cloud disk cloning is achieved based on the incremental relationship of the snapshot chain, effectively improving the efficiency of cloud disk cloning. It enables a single tenant to leverage data caches across multiple nodes within a cluster and between clusters to accelerate startup, avoiding full data downloads from OSS. This also prevents concurrent centralized access to OSS across multiple snapshots in multi-tenant scenarios, which can lead to bandwidth exhaustion and OSS data access timeouts caused by downloading full data from OSS. Based on the snapshot chain, snapshot copies are downloaded uniquely within the entire region and cached at multiple storage nodes, effectively reducing the delay caused by downloading data from OSS and improving cloud disk cloning efficiency. In order to avoid concurrent centralized access to OSS for multiple snapshots across clusters in a multi-tenant scenario, in the cloud disk cloning method provided in Example 1 of the present application, after determining the target block storage cluster to process the cloud disk cloning request, if there are multiple target block storage clusters, a source target block storage cluster is determined from the multiple target block storage clusters based on the cluster identifier corresponding to the existing snapshot copy recorded in the target node, where the source target block storage cluster is used to store data blocks downloaded from the object storage node; and the snapshot ID recorded in the target node and the cluster identifier corresponding to the snapshot ID are sent to the metadata servers of the target block storage clusters other than the source target block storage cluster among the multiple target block storage clusters, so that the metadata servers of the target block storage clusters other than the source target block storage cluster initiate data read requests to the source target block storage cluster.

[0002] The snapshot replica balancing module in the AZ storage management node contains the cluster address of the source data end in the request sent to other Block Masters for cross-cluster cloning requests, which facilitates subsequent snapshot cloning data requests. That is, the AZ storage control node selects a suitable block storage cluster as the source end of the entire snapshot chain (block storage cluster 1 shown in FIG8 is the source end block storage cluster) in the candidate available clusters (i.e., multiple target block storage clusters) according to the snapshot copy balancing module, and then sends the snapshot ID and the cluster identifier corresponding to the snapshot ID to the metadata servers (i.e., other Block Masters) of the target block storage clusters other than the source target block storage cluster in the multiple target block storage clusters, so that the metadata servers of the target block storage clusters other than the source target block storage cluster initiate data read requests to the source target block storage cluster. For example, block storage cluster 2 does not need to download data from OSS, but only needs to initiate a data read request to block storage cluster 1, thereby avoiding overall OSS bandwidth occupation, thereby effectively improving the efficiency of cloud disk cloning. FIG15 is a schematic diagram of a multi-level data cache and data request process based on a snapshot chain provided in accordance with the first embodiment of the present application. In a cross-cluster manner, a full download and on-demand request manner is adopted. As shown in FIG15, cluster 1 is the source data end storing the snapshot chain, and cluster information is recorded in the AZ storage control node. For example, cluster 2 shown in FIG15, Clusters 3 and 4 correspond to Snapshot 3, and Cluster 5 corresponds to Snapshot 2. When Cluster 2 is heavily loaded, Cluster 2 serves as the source for Cluster 4. For example, when an I / O request requests data from Cluster 2 or Cluster 3 across clusters, the snapshot replica balancing module and snapshot chain management module of the AZ storage control node initiate a data request to Snap3 in source Cluster 1. After the read is complete, the cross-cluster data blocks are stored in the local cluster as new snapshot copies, implementing multi-level caching. Optionally, local memory caching is implemented to accelerate data access based on data proximity. For example, data caches are configured on Snapshot Servers _h, where Snap 1 and Snap 2 reside. Data read from the parent snapshot is cached on the corresponding Snapshot Server. For data blocks not downloaded by the parent snapshot, after the subsequent incremental snapshot is fully downloaded, the corresponding child snapshot index will reference the parent snapshot's data files to complete the overall completion.It should be noted that, through the embodiments of the present application, in scenarios where EBS cloud disks and snapshots are used as container data disks, users in the ECI service can use snapshot chain data to iterate container startup multiple times, thereby optimizing the latency of single-tenant and multi-tenant batch concurrent snapshot cloning based on container data disks, and reducing the contention for OSS bandwidth caused by sudden increases in batch tasks. Based on the incremental chain feature of the data disk image, multi-level caching is implemented to accelerate startup and reduce the impact on multi-tenant cloning latency. In an embodiment of the present application, a cloud disk cloning request initiated by an instance management service is received, and a target block storage cluster is determined to process the cloud disk cloning request, wherein the cloud disk cloning request includes at least the snapshot ID of the cloud disk snapshot to be used for cloning. A target snapshot chain to which the snapshot ID belongs is obtained from the target block storage cluster, and a target cloud disk is created based on the target snapshot chain. The target snapshot chain represents the parent-child relationship between the cloud disk snapshot corresponding to the snapshot ID and the cloud disk snapshots corresponding to the remaining snapshot IDs in the target snapshot chain. A cloud disk creation success message is returned to the instance management service to instruct the instance management service to mount the target cloud disk to the instance. After detecting the target cloud disk, the instance initiates a data read request to the target block storage cluster where the target cloud disk is located. The target block storage cluster processes the data read request to import the target data block requested by the data read request to the target cloud disk. The address of the target data block is determined based on the target snapshot chain. Based on the parent-child relationship between the cloud disk snapshots represented by the snapshot chain, cloud disk cloning is accelerated, that is, snapshot copies are uniquely downloaded across the entire region based on the snapshot chain. This avoids the OSS bandwidth usage caused by all snapshot copies downloading full data from the OSS to the local cluster when using multiple snapshot copies for batch cloud disk cloning. This avoids bandwidth exhaustion and OSS data access timeouts caused by concurrently accessing the OSS from multiple snapshots across clusters in multi-tenant scenarios. This effectively reduces the latency caused by downloading data from the OSS, improves cloud disk cloning efficiency, and reduces contention for OSS bandwidth caused by sudden increases in batch tasks. This improves cloud disk cloning efficiency and addresses the technical issue of low cloud disk cloning efficiency in related technologies when cloning virtual machines or containers based on full snapshot data. It should be noted that the aforementioned method embodiments are described as a series of actions for simplicity. However, those skilled in the art should be aware that this application is not limited by the order of the actions described, as certain steps may be performed in a different order or simultaneously. Furthermore, those skilled in the art should also be aware that the embodiments described in this specification are preferred embodiments, and the actions and modules involved are not necessarily required for this application.Through the above description of the embodiments, those skilled in the art will clearly understand that the methods according to the above embodiments can be implemented using software and a necessary general-purpose hardware platform. Hardware implementation is also possible, but in many cases the former is a more preferred implementation method. Based on this understanding, the technical solution of this application, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the methods of the various embodiments of this application. Embodiment 2 According to another aspect of the embodiments of the present application, a cloud disk cloning system is further provided, comprising: a target node, the target node being configured to receive a cloud disk cloning request initiated by an instance management service and determine a target block storage cluster to process the cloud disk cloning request, wherein the cloud disk cloning request includes at least a snapshot ID of a cloud disk snapshot used for cloning; a block storage cluster, the block storage cluster being provided with a cloud disk, the block storage cluster including a target block storage cluster, the target block storage cluster being configured to obtain a target snapshot chain to which the snapshot ID belongs, create a target cloud disk based on the target snapshot chain, and return a cloud disk creation success message to the instance management service to instruct the instance management service to mount the target cloud disk to the instance; and, after receiving a data read request, processing the data read request to import the target data block requested by the data read request to the target cloud disk; and an object storage node, the object storage node being configured to store cloud disk snapshots and snapshot chains corresponding to the cloud disk snapshots, wherein the snapshot chains include the target snapshot chain. The target node corresponds to the AZ storage control node shown in Figure 8 , the block storage cluster includes at least block storage cluster 1 and block storage cluster 2 shown in Figure 8 , and the object storage node corresponds to the object storage OSS shown in Figure 8 . In the cloud disk cloning system, the specific method for cloning a cloud disk is the same as that in Example 1 and will not be repeated here. It should be noted that for simplicity, the aforementioned method embodiments are presented as a series of combined actions. However, those skilled in the art should be aware that this application is not limited to the order of the actions described, as certain steps may be performed in a different order or simultaneously. Furthermore, those skilled in the art should also be aware that the embodiments described in this specification are preferred embodiments, and the actions and modules involved are not necessarily required for this application.Through the above description of the embodiments, those skilled in the art will clearly understand that the methods according to the above embodiments can be implemented using software and the necessary general-purpose hardware platform. Of course, hardware can also be used, but in many cases the former is the preferred implementation method. Based on this understanding, the technical solution of this application, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk) and includes instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application. Example 3: According to an embodiment of this application, a cloud disk cloning device for implementing the above-mentioned cloud disk cloning method is also provided. As shown in Figure 16, the device includes a receiving unit 1601, an acquiring unit 1602, a sending unit 1603, and a processing unit 1604. A receiving unit 1601 is configured to receive a cloud disk cloning request initiated by an instance management service and determine a target block storage cluster to process the cloud disk cloning request, wherein the cloud disk cloning request includes at least a snapshot ID of a cloud disk snapshot used for cloning. An acquiring unit 1602 is configured to acquire, based on the target block storage cluster, a target snapshot chain to which the snapshot ID belongs, and create a target cloud disk based on the target snapshot chain, wherein the target snapshot chain represents a parent-child relationship between the cloud disk snapshot corresponding to the snapshot ID and the cloud disk snapshots corresponding to the remaining snapshot IDs in the target snapshot chain. A sending unit 1603 is configured to return a cloud disk creation success message to the instance management service to instruct the instance management service to mount the target cloud disk to the instance. After detecting the target cloud disk, the instance initiates a data read request to the target block storage cluster where the target cloud disk is located. A processing unit 1604 is configured to process the data read request based on the target block storage cluster to import the target data block requested by the data read request to the target cloud disk, wherein the address of the target data block is determined based on the target snapshot chain.In the cloud disk cloning device provided in the third embodiment of the present application, a receiving unit 1601 receives a cloud disk cloning request initiated by an instance management service and determines a target block storage cluster to process the cloud disk cloning request, wherein the cloud disk cloning request includes at least a snapshot ID of a cloud disk snapshot used for cloning. An acquiring unit 1602 acquires a target snapshot chain to which the snapshot ID belongs based on the target block storage cluster and creates a target cloud disk based on the target snapshot chain. The target snapshot chain represents a parent-child relationship between the cloud disk snapshot corresponding to the snapshot ID and the cloud disk snapshots corresponding to the remaining snapshot IDs in the target snapshot chain. A sending unit 1603 returns a cloud disk creation success message to the instance management service to instruct the instance management service to mount the target cloud disk to the instance. After detecting the target cloud disk, the instance initiates a data read request to the target block storage cluster where the target cloud disk is located. A processing unit 1604 processes the data read request based on the target block storage cluster to import the target data block requested by the data read request to the target cloud disk. The address of the target data block is determined based on the target snapshot chain. In this application, cloud disk cloning is accelerated based on the parent-child relationship between cloud disk snapshots represented by a snapshot chain. That is, snapshot copies are downloaded uniquely in the entire region based on the snapshot chain. This avoids the OSS bandwidth occupation caused by all snapshot copies downloading full data from OSS to the local cluster when multiple snapshot copies are used for batch cloud disk cloning. This can avoid bandwidth exhaustion and OSS data access timeouts caused by concurrent centralized access to OSS by multiple snapshots across clusters in multi-tenant scenarios. This effectively reduces the delay caused by downloading data from OSS, improves cloud disk cloning efficiency, and achieves the purpose of reducing the contention for OSS bandwidth caused by sudden increases in batch tasks. This achieves the technical effect of improving cloud disk cloning efficiency, and further solves the technical problem of low cloud disk cloning efficiency in related technologies when performing cloud disk cloning of virtual machines or containers based on full snapshot data. Optionally, in the cloud disk cloning device provided in the third embodiment of the present application, the receiving unit 1601 includes: a first obtaining subunit configured to obtain capacity information of a block storage cluster and information about the number of existing cloud disks from among the multiple block storage clusters; and a first determining subunit configured to determine a target block storage cluster from among the multiple block storage clusters based on the capacity information of the block storage cluster, information about the number of existing cloud disks, and the number of cloud disks to be cloned. Optionally, in the cloud disk cloning device provided in the third embodiment of the present application, the obtaining unit 1602 includes: a second obtaining subunit configured to obtain a target snapshot chain from a metadata server of the target block storage cluster.Optionally, in the cloud disk cloning device provided in Example 3 of the present application, the cloud disk cloning device further includes: a first determination unit, configured to determine, based on the metadata server, a snapshot server corresponding to the snapshot ID and snapshot servers corresponding to other snapshot IDs after obtaining a target snapshot chain to which the snapshot ID belongs based on the target block storage cluster; a first processing unit, configured to store the target snapshot chain, the address of the snapshot server corresponding to the snapshot ID, and the addresses of the snapshot servers corresponding to the other snapshot IDs; and a second processing unit, configured to send the target snapshot chain and the cluster identifier of the target block storage cluster to the target node, so that the target node stores the target snapshot chain and the cluster identifier, wherein the target node is used to manage multiple block storage clusters. Optionally, in the cloud disk cloning device provided in Example 3 of the present application, the processing unit 1604 includes: a first processing sub-unit configured to process a data read request based on the target block storage cluster, obtain a target data block, and return the target data block to the instance; a second processing sub-unit configured to download data blocks other than the target data block using a lazy loading method, compose a snapshot copy data file based on the target data block and the data blocks other than the target data block, and import the snapshot copy data file into the target cloud disk. Optionally, in the cloud disk cloning device provided in Example 3 of the present application, the data read request includes at least a target logical block address of the target cloud disk, and the first processing sub-unit includes: a first determination module configured to determine, based on the target block storage cluster, a target snapshot server address and a target data block address corresponding to the target logical block address; and a first processing module configured to schedule a target snapshot server corresponding to the target snapshot server address to obtain the target data block corresponding to the target data block address. Optionally, in the cloud disk cloning device provided in Example 3 of the present application, the first processing module includes: a judgment submodule, configured to schedule a target snapshot server to determine whether a target data block in the cache of the target snapshot server is a target loading block, wherein the target loading block is used to represent a data block with a delayed loading identifier; an acquisition submodule, configured to obtain the target data block from the cache of the target snapshot server if the target data block in the cache of the target snapshot server is not a target loading block; a determination submodule, configured to determine the parent snapshot of the cloud disk snapshot to which the target data block belongs based on the target snapshot chain if the target data block in the cache of the target snapshot server is a target loading block, and initiate a delayed loading request to the parent snapshot to obtain the target data block returned by the parent snapshot; and a processing submodule, configured to download the target data block from the object storage node if the target data block returned by the parent snapshot is not obtained.Optionally, in the cloud disk cloning device provided in the third embodiment of the present application, the cloud disk cloning device further includes: a third processing unit configured to, after downloading the target data block from the object storage node, schedule the target snapshot server to write the target data block from the target snapshot server's cache to the snapshot replica. Optionally, in the cloud disk cloning device provided in the third embodiment of the present application, the second processing sub-unit includes: a second determination module configured to determine, based on the metadata server, the snapshot server corresponding to the snapshot ID and the snapshot servers corresponding to the remaining snapshot IDs; and a second processing module configured to schedule the snapshot server corresponding to the snapshot ID and the snapshot servers corresponding to the remaining snapshot IDs to download data blocks other than the target data block from the object storage node using a delayed loading method based on the target snapshot chain. Optionally, in the cloud disk cloning device provided in Example 3 of the present application, the cloud disk cloning device further includes: a second determination unit, configured to, after determining the target block storage cluster to process the cloud disk cloning request, determine a source target block storage cluster from the multiple target block storage clusters based on the cluster identifier corresponding to the existing snapshot copy recorded in the target node, if there are multiple target block storage clusters, wherein the source target block storage cluster is used to store data blocks downloaded from the object storage node; and a fourth processing unit, configured to send the snapshot ID recorded in the target node and the cluster identifier corresponding to the snapshot ID to metadata servers of target block storage clusters other than the source target block storage cluster in the multiple target block storage clusters, so that the metadata servers of the target block storage clusters other than the source target block storage cluster initiate data read requests to the source target block storage cluster. It should be noted that the aforementioned receiving unit 1601, acquiring unit 1602, sending unit 1603, and processing unit 1604 correspond to steps S701 to S704 in Example 1. The aforementioned units and corresponding steps implement the same examples and application scenarios, but are not limited to the content disclosed in Example 1. It should be noted that the aforementioned modules, as part of the apparatus, can be run in the computer terminal 10 provided in Example 1. It should be noted that the preferred implementation schemes involved in the aforementioned embodiments of this application are the same as the schemes, application scenarios, and implementation processes provided in Example 1, but are not limited to the schemes provided in Example 1. Example 4 The embodiments of this application may provide an electronic device, which may be any electronic device in a group of electronic devices. Optionally, in this embodiment, the aforementioned electronic device may be replaced with a terminal device such as a mobile terminal. Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of multiple network devices in a computer network.In this embodiment, the electronic device may execute program code for the following steps in a cloud disk cloning method: receiving a cloud disk cloning request initiated by an instance management service, and determining a target block storage cluster to process the cloud disk cloning request, wherein the cloud disk cloning request includes at least a snapshot ID of a cloud disk snapshot used for cloning; obtaining a target snapshot chain to which the snapshot ID belongs based on the target block storage cluster, and creating a target cloud disk based on the target snapshot chain, wherein the target snapshot chain represents a parent-child relationship between the cloud disk snapshot corresponding to the snapshot ID and the cloud disk snapshots corresponding to the remaining snapshot IDs in the target snapshot chain; returning a cloud disk creation success message to the instance management service to instruct the instance management service to mount the target cloud disk to the instance, wherein, after detecting the target cloud disk, the instance initiates a data read request to the target block storage cluster where the target cloud disk is located; and processing the data read request based on the target block storage cluster to import the target data block requested by the data read request to the target cloud disk, wherein the address of the target data block is determined based on the target snapshot chain. The electronic device may further execute program code for the following steps in the cloud disk cloning method: obtaining capacity information of a block storage cluster and information about the number of existing cloud disks in multiple block storage clusters; determining a target block storage cluster from the multiple block storage clusters based on the capacity information of the block storage cluster, the number of existing cloud disks, and the number of cloud disks to be cloned. The electronic device may further execute program code for the following steps in the cloud disk cloning method: obtaining a target snapshot chain from the metadata server of the target block storage cluster. The electronic device may further execute program code for the following steps in the cloud disk cloning method: after obtaining a target snapshot chain to which a snapshot ID belongs from the target block storage cluster, determining the snapshot server corresponding to the snapshot ID and the snapshot servers corresponding to the remaining snapshot IDs from the metadata server; storing the target snapshot chain, the address of the snapshot server corresponding to the snapshot ID, and the addresses of the snapshot servers corresponding to the remaining snapshot IDs; and sending the target snapshot chain and the cluster identifier of the target block storage cluster to a target node, so that the target node stores the target snapshot chain and the cluster identifier. The target node is configured to manage multiple block storage clusters. The electronic device may also execute the program code of the following steps in the cloud disk cloning method: processing a data read request based on a target block storage cluster to obtain a target data block, and returning the target data block to the instance; downloading data blocks other than the target data block using a delayed loading method, and forming a snapshot copy data file based on the target data block and the data blocks other than the target data block, and importing the snapshot copy data file to the target cloud disk.The electronic device may also execute program code for the following steps in the cloud disk cloning method: determining, based on the target block storage cluster, a target snapshot server address and a target data block address corresponding to the target logical block address; scheduling a target snapshot server corresponding to the target snapshot server address to obtain a target data block corresponding to the target data block address. The electronic device may also execute program code for the following steps in the cloud disk cloning method: scheduling the target snapshot server to determine whether the target data block in the target snapshot server's cache is a target load block, where the target load block represents a data block with a delayed load flag; if the target data block in the target snapshot server's cache is not a target load block, obtaining the target data block from the target snapshot server's cache; if the target data block in the target snapshot server's cache is a target load block, determining, based on the target snapshot chain, the parent snapshot of the cloud disk snapshot to which the target data block belongs, and initiating a delayed load request to the parent snapshot to obtain the target data block returned by the parent snapshot; if the target data block returned by the parent snapshot is not obtained, downloading the target data block from the object storage node. The electronic device may also execute program code for the following steps in the cloud disk cloning method: after downloading the target data block from the object storage node, scheduling the target snapshot server to write the target data block from the target snapshot server's cache to the snapshot copy. The electronic device may also execute program code for the following steps in the cloud disk cloning method: determining, based on the metadata server, the snapshot server corresponding to the snapshot ID and the snapshot servers corresponding to the remaining snapshot IDs; and scheduling the snapshot server corresponding to the snapshot ID and the snapshot servers corresponding to the remaining snapshot IDs to download data blocks other than the target data block from the object storage node using a delayed loading method based on the target snapshot chain. The electronic device may also execute program code for the following steps in the cloud disk cloning method: after determining the target block storage cluster to process the cloud disk cloning request, if there are multiple target block storage clusters, determining a source target block storage cluster from the multiple target block storage clusters based on the cluster identifier corresponding to the existing snapshot replica recorded in the target node, where the source target block storage cluster is used to store data blocks downloaded from the object storage node; and sending the snapshot ID and the cluster identifier corresponding to the snapshot ID recorded in the target node to metadata servers of target block storage clusters other than the source target block storage cluster in the multiple target block storage clusters, so that the metadata servers of the target block storage clusters other than the source target block storage cluster initiate data read requests to the source target block storage cluster. Optionally, FIG17 is a block diagram of the structure of an electronic device according to an embodiment of the present application. As shown in FIG17 , the electronic device 10 may include one or more (only one is shown in FIG17 ) processors 102 and a memory 104.The electronic device 10 may also include a storage controller to control and manage the memory 104. The electronic device 10 may also include a peripheral interface to connect to a radio frequency module, an audio module, and a display screen. The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the cloud disk cloning method and apparatus described in the embodiments of the present application. The processor executes the software programs and modules stored in the memory to perform various functional applications and data processing, thereby implementing the aforementioned cloud disk cloning method. The memory may include high-speed random access memory (RAM) and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory located remotely from the processor, which can be connected to the terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The processor may invoke information and applications stored in the memory through the transmission device to perform the following steps: receiving a cloud disk cloning request initiated by the instance management service and determining a target block storage cluster to process the cloud disk cloning request, wherein the cloud disk cloning request includes at least a snapshot ID of a cloud disk snapshot used for cloning; obtaining a target snapshot chain to which the snapshot ID belongs based on the target block storage cluster, and creating a target cloud disk based on the target snapshot chain, wherein the target snapshot chain represents a parent-child relationship between the cloud disk snapshot corresponding to the snapshot ID and the cloud disk snapshots corresponding to other snapshot IDs in the target snapshot chain; returning a cloud disk creation success message to the instance management service to instruct the instance management service to mount the target cloud disk to the instance, wherein the instance is configured to initiate a data read request to the target block storage cluster where the target cloud disk is located after detecting the target cloud disk; processing the data read request based on the target block storage cluster to import a target data block requested by the data read request to the target cloud disk, wherein the address of the target data block is determined based on the target snapshot chain. Optionally, the processor may further execute program code for the following steps: obtaining capacity information of a block storage cluster and information about the number of existing cloud disks from among the multiple block storage clusters; and determining a target block storage cluster from among the multiple block storage clusters based on the capacity information of the block storage cluster, the number of existing cloud disks, and the number of cloud disks to be cloned. Optionally, the processor may further execute program code for the following steps: obtaining a target snapshot chain from a metadata server of the target block storage cluster.Optionally, the processor may further execute program code for the following steps: after obtaining the target snapshot chain to which the snapshot ID belongs based on the target block storage cluster, determining the snapshot server corresponding to the snapshot ID and the snapshot servers corresponding to the remaining snapshot IDs based on the metadata server; storing the target snapshot chain, the address of the snapshot server corresponding to the snapshot ID, and the addresses of the snapshot servers corresponding to the remaining snapshot IDs; and sending the target snapshot chain and the cluster identifier of the target block storage cluster to the target node, so that the target node stores the target snapshot chain and the cluster identifier. The target node is configured to manage multiple block storage clusters. Optionally, the processor may further execute program code for the following steps: processing a data read request based on the target block storage cluster to obtain a target data block, and returning the target data block to the instance; downloading data blocks other than the target data block using a lazy loading method, composing a data file of the snapshot copy based on the target data block and the data blocks other than the target data block, and importing the data file of the snapshot copy to the target cloud disk. Optionally, the processor may further execute program code for the following steps: determining, based on the target block storage cluster, a target snapshot server address and a target data block address corresponding to the target logical block address; scheduling a target snapshot server corresponding to the target snapshot server address to obtain a target data block corresponding to the target data block address. Optionally, the processor may further execute program code for the following steps: scheduling the target snapshot server to determine whether the target data block in the cache of the target snapshot server is a target load block, where a target load block is used to represent a data block with a delayed load flag; if the target data block in the cache of the target snapshot server is not a target load block, obtaining the target data block from the cache of the target snapshot server; if the target data block in the cache of the target snapshot server is a target load block, determining, based on the target snapshot chain, the parent snapshot of the cloud disk snapshot to which the target data block belongs, and initiating a delayed load request to the parent snapshot to obtain the target data block returned by the parent snapshot; if the target data block returned by the parent snapshot is not obtained, downloading the target data block from the object storage node. Optionally, the processor may further execute program code for the following steps: after downloading the target data block from the object storage node, scheduling the target snapshot server to write the target data block from the cache of the target snapshot server to the snapshot replica. Optionally, the processor may further execute program code for the following steps: determining, based on the metadata server, a snapshot server corresponding to the snapshot ID and snapshot servers corresponding to other snapshot IDs; and scheduling the snapshot server corresponding to the snapshot ID and snapshot servers corresponding to other snapshot IDs to download data blocks other than the target data block from the object storage node using a lazy loading method based on the target snapshot chain.Optionally, the processor may further execute program code for the following steps: after determining the target block storage cluster to process the cloud disk cloning request, if there are multiple target block storage clusters, determining a source target block storage cluster from the multiple target block storage clusters based on the cluster identifier corresponding to the existing snapshot copy recorded in the target node, wherein the source target block storage cluster is used to store data blocks downloaded from the object storage node; sending the snapshot ID recorded in the target node and the cluster identifier corresponding to the snapshot ID to metadata servers of target block storage clusters other than the source target block storage cluster in the multiple target block storage clusters, so that the metadata servers of the target block storage clusters other than the source target block storage cluster initiate data read requests to the source target block storage cluster. It will be understood by those skilled in the art that the structure shown in FIG17 is for illustration only, and the electronic device may also be a terminal device such as a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile internet device (MID), or a PAD. FIG17 does not limit the structure of the electronic device. For example, the electronic device 10 may include more or fewer components (such as a network interface, a display device, etc.) than those shown in FIG17 , or may have a configuration different from that shown in FIG17 . Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware associated with the terminal device through a program. The program can be stored in a computer-readable storage medium, which may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. Example 5 An embodiment of the present application also provides a computer-readable storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the cloud disk cloning method provided in Example 1. Optionally, in this embodiment, the storage medium can be located in any electronic device in a group of electronic devices in a computer network, or in any mobile terminal in a group of mobile terminals. Example 6 An embodiment of the present application also provides a computer program product. Optionally, in this embodiment, the computer program product may include a computer program that, when executed by a processor, implements the cloud disk cloning method provided in the first embodiment. The serial numbers of the embodiments of this application are for descriptive purposes only and do not represent the merits of the embodiments.In the above embodiments of the present application, the descriptions of each embodiment are given with emphasis. For portions not described in detail in a particular embodiment, reference should be made to the relevant descriptions of other embodiments. In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is merely a logical functional division. In actual implementation, other divisions may be employed. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented. Furthermore, the coupling or direct coupling or communication connection shown or discussed between each other may be through interfaces, or indirect coupling or communication connection between units or modules may be electrical or other forms. Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units; that is, they may be located in one location or distributed across multiple network units. Some or all of these units may be selected to achieve the objectives of the present embodiment according to actual needs. Furthermore, the functional units in the various embodiments of the present application may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. These integrated units may be implemented in either hardware or software functional units. If these integrated units are implemented as software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the portion that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for enabling a computer device (such as a personal computer, server, or network device) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage media include various media capable of storing program code, such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), removable hard drives, magnetic disks, or optical disks. The above are only preferred embodiments of the present application. It should be noted that a person skilled in the art may make several improvements and modifications without departing from the principles of the present application, and such improvements and modifications should also be considered within the scope of protection of the present application.Industrial Applicability The cloud disk cloning method provided in an embodiment of the present application receives a cloud disk cloning request initiated by an instance management service and determines a target block storage cluster to process the cloud disk cloning request. The cloud disk cloning request includes at least the snapshot ID of the cloud disk snapshot to be cloned. The method obtains a target snapshot chain to which the snapshot ID belongs from the target block storage cluster and creates a target cloud disk based on the target snapshot chain. The target snapshot chain represents the parent-child relationship between the cloud disk snapshot corresponding to the snapshot ID and the cloud disk snapshots corresponding to the remaining snapshot IDs in the target snapshot chain. The method returns a cloud disk creation success message to the instance management service to instruct the instance management service to mount the target cloud disk to the instance. After detecting the target cloud disk, the instance initiates a data read request to the target block storage cluster where the target cloud disk is located. The method processes the data read request based on the target block storage cluster to import the target data block requested by the data read request to the target cloud disk. The address of the target data block is determined based on the target snapshot chain. Based on the parent-child relationship between cloud disk snapshots represented by the snapshot chain, cloud disk cloning is accelerated. That is, snapshot copies are uniquely downloaded across the entire region based on the snapshot chain. This avoids the OSS bandwidth usage caused by all snapshot copies downloading full data from OSS to the local cluster when using multiple snapshot copies for batch cloud disk cloning. This can avoid bandwidth exhaustion and OSS data access timeouts caused by concurrent centralized access to OSS by multiple snapshots across clusters in multi-tenant scenarios. This effectively reduces the delay caused by downloading data from OSS, improves cloud disk cloning efficiency, and achieves the goal of reducing the contention for OSS bandwidth caused by sudden increases in batch tasks, thereby achieving the technical effect of improving cloud disk cloning efficiency. This further solves the technical problem of low cloud disk cloning efficiency in related technologies when cloning virtual machines or containers on cloud disks based on full snapshot data.

Claims

Claims 1. A method for cloning a cloud disk, comprising: The method includes receiving a cloud disk cloning request initiated by an instance management service and determining a target block storage cluster to process the cloud disk cloning request, wherein the cloud disk cloning request includes at least a snapshot ID of a cloud disk snapshot used for cloning; obtaining a target snapshot chain to which the snapshot ID belongs based on the target block storage cluster, and creating a target cloud disk based on the target snapshot chain, wherein the target snapshot chain represents a parent-child relationship between the cloud disk snapshot corresponding to the snapshot ID and the cloud disk snapshots corresponding to the remaining snapshot IDs in the target snapshot chain; returning a cloud disk creation success message to the instance management service to instruct the instance management service to mount the target cloud disk to the instance; wherein, after detecting the target cloud disk, the instance initiates a data read request to the target block storage cluster where the target cloud disk is located; and processing the data read request based on the target block storage cluster to import a target data block requested by the data read request to the target cloud disk, wherein the address of the target data block is determined based on the target snapshot chain.

2. The method according to claim 1, wherein The cloud disk cloning request also includes the number of cloud disks to be cloned. Determining a target block storage cluster for processing the cloud disk cloning request includes: obtaining capacity information of a block storage cluster and information about the number of existing cloud disks from multiple block storage clusters; and determining the target block storage cluster from the multiple block storage clusters based on the capacity information of the block storage cluster, the information about the number of existing cloud disks, and the number of cloud disks to be cloned.

3. The method according to claim 1, wherein Acquiring the target snapshot chain to which the snapshot ID belongs according to the target block storage cluster includes: acquiring the target snapshot chain according to a metadata server of the target block storage cluster.

4. The method according to claim 3, wherein: After obtaining the target snapshot chain to which the snapshot ID belongs based on the target block storage cluster, the method further includes: determining, based on the metadata server, a snapshot server corresponding to the snapshot ID and snapshot servers corresponding to the remaining snapshot IDs; storing the target snapshot chain, the address of the snapshot server corresponding to the snapshot ID, and the addresses of the snapshot servers corresponding to the remaining snapshot IDs; and sending the target snapshot chain and the cluster identifier of the target block storage cluster to a target node, so that the target node stores the target snapshot chain and the cluster identifier, wherein the target node is used to manage multiple block storage clusters.

5. The method according to claim 1, wherein: The data read request is processed according to the target block storage cluster to import the target data block requested by the data read request into the target cloud disk package. 27 The method includes: processing the data read request according to the target block storage cluster to obtain the target data block, and returning the target data block to the instance; downloading data blocks other than the target data block by using a lazy loading method, and forming a data file of a snapshot copy according to the target data block and the data blocks other than the target data block, and importing the data file of the snapshot copy to the target cloud disk.

6. The method according to claim 5, wherein: The data read request includes at least a target logical block address of the target cloud disk. Processing the data read request according to the target block storage cluster to obtain the target data block includes: determining a target snapshot server address and a target data block address corresponding to the target logical block address according to the target block storage cluster; and scheduling a target snapshot server corresponding to the target snapshot server address to obtain the target data block corresponding to the target data block address.

7. The method according to claim 6, wherein: Scheduling the target snapshot server corresponding to the target snapshot server address to obtain the target data block corresponding to the target data block address includes: scheduling the target snapshot server to determine whether the target data block in the cache of the target snapshot server is a target loading block, wherein the target loading block is used to represent a data block with a delayed loading identifier; if the target data block in the cache of the target snapshot server is not the target loading block, obtaining the target data block from the cache of the target snapshot server; if the target data block in the cache of the target snapshot server is the target loading block, determining the parent snapshot of the cloud disk snapshot to which the target data block belongs based on the target snapshot chain, and initiating a delayed loading request to the parent snapshot to obtain the target data block returned by the parent snapshot; if the target data block returned by the parent snapshot is not obtained, downloading the target data block from the object storage node.

8. The method according to claim 7, wherein: After downloading the target data block from the object storage node, the method further includes: scheduling the target snapshot server to write the target data block from the cache of the target snapshot server into the snapshot copy.

9. The method according to claim 5, wherein: Downloading data blocks other than the target data block by using a delayed loading method includes: determining, based on a metadata server, a snapshot server corresponding to the snapshot ID and snapshot servers corresponding to the remaining snapshot IDs; scheduling the snapshot server corresponding to the snapshot ID and the snapshot servers corresponding to the remaining snapshot IDs to download data blocks other than the target data block by using a delayed loading method from an object storage node based on the target snapshot chain. Data blocks other than the marked data blocks.

10. The method according to claim 4, wherein: After determining a target block storage cluster to process the cloud disk cloning request, the method further includes: if there are multiple target block storage clusters, determining a source target block storage cluster from the multiple target block storage clusters based on a cluster identifier corresponding to an existing snapshot copy recorded in the target node, wherein the source target block storage cluster is used to store data blocks downloaded from the object storage node; and sending the snapshot ID recorded in the target node and the cluster identifier corresponding to the snapshot ID to metadata servers of target block storage clusters other than the source target block storage cluster among the multiple target block storage clusters, so that the metadata servers of the target block storage clusters other than the source target block storage cluster initiate data read requests to the source target block storage cluster.

11. A cloud disk cloning system, comprising: a target node, the target node being configured to receive a cloud disk cloning request initiated by the instance management service and determine a target block storage cluster to process the cloud disk cloning request, wherein the cloud disk cloning request includes at least a snapshot ID of a cloud disk snapshot used for cloning; a block storage cluster, the block storage cluster being configured to include a cloud disk, the block storage cluster including the target block storage cluster, the target block storage cluster being configured to obtain a target snapshot chain to which the snapshot ID belongs, create a target cloud disk based on the target snapshot chain, and return a cloud disk creation success message to the instance management service to instruct the instance management service to mount the target cloud disk to the instance; and after receiving a data read request, processing the data read request to import the target data block requested by the data read request to the target cloud disk; and an object storage node, the object storage node being configured to store the cloud disk snapshot and the snapshot chain corresponding to the cloud disk snapshot, wherein the snapshot chain includes the target snapshot chain.

12. A cloud disk cloning device, comprising: A receiving unit is configured to receive a cloud disk cloning request initiated by an instance management service and determine a target block storage cluster to process the cloud disk cloning request, wherein the cloud disk cloning request includes at least a snapshot ID of a cloud disk snapshot used for cloning; an acquiring unit is configured to acquire, based on the target block storage cluster, a target snapshot chain to which the snapshot ID belongs, and create a target cloud disk based on the target snapshot chain, wherein the target snapshot chain is used to represent a parent-child relationship between the cloud disk snapshot corresponding to the snapshot ID and the cloud disk snapshots corresponding to the remaining snapshot IDs in the target snapshot chain; a sending unit is configured to return a cloud disk creation success message to the instance management service to instruct the instance management service to mount the target cloud disk to the instance, wherein the instance is configured to initiate a data read request to the target block storage cluster where the target cloud disk is located after detecting the target cloud disk; a processing unit is configured to process the data read request based on the target block storage cluster, The target data block requested by the data read request is imported into the target cloud disk, wherein the address of the target data block is determined according to the target snapshot chain.

13. An electronic device, comprising: a memory storing an executable program; A processor is configured to run the program, wherein the program executes the cloud disk cloning method according to any one of claims 1 to 10 when running.

14. A computer-readable storage medium, comprising a stored executable program, wherein when the executable program is executed, the device where the storage medium is located is controlled to execute the cloud disk cloning method according to any one of claims 1 to 10.

15. A computer program product, comprising a computer program, wherein when executed by a processor, the computer program implements the cloud disk cloning method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • System and method for providing flexible storage and retrieval of snapshot archives

    CN103140842A

  • Data access method, system and device and storage medium

    CN114281791A

  • Composing a virtual disk using application delta disk images

    US20150089172A1

  • Block Map Cache

    US20200034052A1

  • Method for acquiring data during startup of virtual machine, and cloud computing system

    WO2018094649A1