Data backup method and computing device
Patent Information
- Application Number
- CN202610560302.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-24
- Publication Date
- 2026-08-28
AI Technical Summary
然而,从存储介质读取数据耗时较大,从而导致数据备份的效率低
[0084] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by an electronic device, implements the data backup method involved in the first aspect and any possible implementation.
Smart Images

Figure CN122653910A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computing device technology, and in particular to a data backup method and a computing device. Background Technology
[0002] Backup is a crucial means of preventing data loss and disaster recovery. With the explosive growth of data volume, backup window and backup efficiency have become important indicators for measuring the performance of backup systems. Especially in hyper-converged infrastructure (HCI) architectures, virtual machine disk data backup operations are frequent and involve large amounts of data, placing higher demands on backup performance.
[0003] In related technologies, the backup process of virtual machine disk data typically requires reading the storage medium. However, reading data from the storage medium is time-consuming, resulting in low data backup efficiency.
[0004] Therefore, improving the data reading speed and data backup efficiency during the backup process has become an urgent problem to be solved. Summary of the Invention
[0005] This application provides a data backup method and computing device that can improve the data reading speed during the backup process, thereby improving data backup efficiency.
[0006] In a first aspect, embodiments of this application provide a data backup method, including:
[0007] In response to a backup request for target data, obtain the bitmap information of the target data;
[0008] Based on the bitmap information, at least a portion of the data blocks in the target data are pre-read from the storage medium into the cache;
[0009] In response to a read request for a target data block in the target data, query whether the target data block exists in the cache;
[0010] If the target data block exists in the cache, then the target data block is read from the cache.
[0011] This application provides a data backup method implemented through caching. When a backup request for target data is received, the bitmap information of the target data is first obtained. Using this bitmap information, a pre-read operation can be performed, pre-reading at least a portion of the data blocks from the storage medium into the cache, thus achieving data pre-reading and caching. When a read request for the target data block is received, the cache is first checked to see if the target data block exists. If it exists, it is read directly from the cache. When a cache hit occurs, the method of this application can convert the data read request into a memory access. Due to the high access latency of the storage medium, reading data blocks from the cache improves the data read speed compared to reading data blocks directly from the storage medium, thereby improving data backup efficiency.
[0012] In one possible implementation, pre-reading at least a portion of the target data blocks from the storage medium into a cache includes:
[0013] The bitmap information is parsed to generate multiple pre-read tasks;
[0014] The pre-read task is added to the task queue and the task queue is consumed to pre-read the corresponding data block from the storage medium to the cache according to the pre-read task.
[0015] This application embodiment generates multiple pre-read tasks by parsing bitmap information and adds these pre-read tasks to a task queue. By consuming the pre-read tasks in the task queue, the corresponding data blocks are pre-read from the storage medium to the cache. By introducing a task queue, bitmap parsing, task generation, and task execution are decoupled. The queue can smooth out bursts of pre-read requests, ensuring that pre-read operations are performed in an orderly manner, further improving pre-read efficiency, thereby improving the efficiency of data reading and data backup.
[0016] In one possible implementation, the task queue includes a first queue and a second queue;
[0017] Accordingly, adding the pre-read task to the task queue and consuming the task queue to pre-read the corresponding data block from the storage medium to the cache according to the pre-read task includes:
[0018] Add the pre-read task to the first queue;
[0019] Consume the second queue to pre-read the corresponding data blocks from the storage medium into the cache according to the pre-read task.
[0020] In this embodiment, a dual-queue architecture is used to implement data pre-reading, physically isolating the reading and writing operations of the queues. During pre-reading, pre-reading tasks are added to the first queue, while pre-reading tasks in the second queue are consumed simultaneously. By restricting the operations of producers and consumers to different queues, read-write separation is achieved, avoiding lock contention caused by producers and consumers operating on the same queue simultaneously. This improves the concurrency efficiency of task distribution, enhances the efficiency of data pre-reading, and further improves the efficiency of data backup.
[0021] In one possible implementation, after consuming the second queue to pre-read the corresponding data blocks from the storage medium into the cache according to the pre-read task, the method further includes:
[0022] If the second queue is empty, then switch the read / write status of the first queue and the second queue.
[0023] Building upon the aforementioned dual-queue architecture, this application also introduces a dynamic queue switching mechanism. When the second queue is empty, the read / write states of the first and second queues are switched, transforming the original write-only queue into a new read-only queue, and vice versa. This role switching ensures that producers and consumers always operate on different queues, realizing a lock-free producer-consumer model, eliminating read / write conflicts, guaranteeing the continuity of pipeline operations, further improving the distribution efficiency of pre-read tasks, and thus enhancing data backup efficiency.
[0024] In one possible implementation, the task queue includes a read-only queue and at least one write-only queue;
[0025] Accordingly, adding the pre-read task to the task queue and consuming the task queue to pre-read the corresponding data block from the storage medium to the cache according to the pre-read task includes:
[0026] Add the read-ahead task to the write-only queue;
[0027] Consume the read-only queue to pre-read the corresponding data blocks from the storage medium into the cache according to the pre-read task.
[0028] For scenarios where production speed far exceeds consumption speed, this application provides a multi-queue architecture for reading and writing simultaneously. Specifically, the task queue includes a read-only queue and at least one write-only queue. Pre-read tasks are added to the write-only queue, while consumption operations retrieve pre-read tasks from the read-only queue. This allows producers to write concurrently to multiple write-only queues, avoiding blocking due to a single queue being full, improving the generation rate of pre-read tasks, effectively matching the speed difference between high-speed parsing and low-speed disk reading, improving overall throughput, and further enhancing data backup efficiency.
[0029] In one possible implementation, after consuming the read-only queue to pre-read the corresponding data block from the storage medium into the cache according to the pre-read task, the method further includes:
[0030] If the read-only queue is empty, then release the read-only queue;
[0031] A new read-only queue is determined from the at least one write-only queue.
[0032] In the aforementioned multi-queue architecture, this embodiment further implements dynamic queue switching. When a read-only queue is consumed and becomes empty, it is released, and a new read-only queue is determined from at least one write-only queue. This ensures the continuous operation of the read-multiple-write model without introducing complex locking mechanisms or requiring switching between two queues. It only requires unidirectional switching from a read-only queue to a write-only queue, reducing the complexity of queue processing. At the same time, it promptly reclaims memory resources, improves the efficiency of pre-read task processing, and enhances resource utilization.
[0033] In one possible implementation, adding the pre-read task to the task queue includes:
[0034] In response to a write operation on the task queue, the current value of a predefined tail pointer in the task queue is obtained through an atomic operation; wherein the predefined tail pointer is used to point to the next writable position in the task queue.
[0035] Use the current value of the tail pointer as the write position, and increment the value of the tail pointer;
[0036] Add the pre-read task to the array element corresponding to the write position.
[0037] To achieve high-performance concurrent writes, this application embodiment employs a lock-free design for write operations in the task queue. Specifically, in response to a write operation, the current value of a predefined tail pointer in the task queue is obtained through an atomic operation. This tail pointer points to the next writable position. The current value is then used as the write position, the tail pointer is incremented, and finally, the pre-read task is added to the array element corresponding to the write position. Atomic operations ensure the uniqueness and correctness of position allocation during concurrent writes by multiple producers, eliminate write lock contention, and improve the write speed of pre-read tasks.
[0038] In one possible implementation, consuming the task queue includes:
[0039] In response to a read operation on the task queue, the current value of a predefined current position pointer in the task queue is obtained through an atomic operation; wherein the predefined current position pointer is used to point to the next position to be read in the task queue;
[0040] Use the current value of the current position pointer as the read position, and increment the value of the current position pointer;
[0041] The pre-read task is read from the array element corresponding to the read position.
[0042] This application embodiment also implements a lock-free design for the read operation of the task queue. In response to a read operation, an atomic operation is used to obtain the current value of a predefined current position pointer in the task queue. This current position pointer points to the next position to be read. The current value is then used as the read position, and the current position pointer is incremented. Finally, the pre-read task is read from the array element corresponding to that read position. Atomic operations ensure that tasks are not duplicated or missed during concurrent reads by multiple consumers, achieving lock-free concurrency in read operations. Combined with lock-free write operations, this gives the entire task queue extremely high concurrent processing capabilities and improves the efficiency of data pre-reading.
[0043] In one possible implementation, pre-reading at least a portion of the target data blocks from the storage medium into the cache includes:
[0044] Based on the bitmap information, at least one read-ahead coroutine is generated;
[0045] The at least one read-ahead coroutine is executed asynchronously and concurrently to read the corresponding data block from the storage medium into the cache.
[0046] This application employs coroutines and asynchronous input / output (I / O) technology to implement prefetching. Specifically, at least one prefetch coroutine is generated based on bitmap information and executed asynchronously and concurrently to prefetch the corresponding data blocks from the storage medium into the cache. The coroutines proactively yield the Central Processing Unit (CPU) while waiting for I / O, enabling high-concurrency I / O operations within a single thread. This avoids the context switching overhead of multi-threading and the limitations of the Global Interpreter Lock (GIL), improving prefetching efficiency and making it suitable for high-performance backup systems.
[0047] Thirdly, embodiments of this application provide a data backup device, comprising:
[0048] The acquisition module is used to acquire bitmap information of the target data in response to a backup request for the target data;
[0049] The pre-read module is used to pre-read at least a portion of the data blocks in the target data from the storage medium into the cache based on the bitmap information;
[0050] The query module is used to query whether the target data block exists in the cache in response to a read request for the target data block in the target data;
[0051] The read module is used to read the target data block from the cache if the target data block exists in the cache.
[0052] In one possible implementation, the pre-read module includes:
[0053] The parsing submodule is used to parse the bitmap information to generate multiple pre-read tasks;
[0054] The read / write submodule is used to add the pre-read task to the task queue and consume the task queue to pre-read the corresponding data block from the storage medium to the cache according to the pre-read task.
[0055] In one possible implementation, the task queue includes a first queue and a second queue;
[0056] Accordingly, the read / write submodule is specifically used for:
[0057] Add the pre-read task to the first queue;
[0058] Consume the second queue to pre-read the corresponding data blocks from the storage medium into the cache according to the pre-read task.
[0059] In one possible implementation, after consuming the second queue to pre-read the corresponding data block from the storage medium into the cache according to the pre-read task, the read / write submodule is further configured to:
[0060] If the second queue is empty, then switch the read / write status of the first queue and the second queue.
[0061] In one possible implementation, the task queue includes a read-only queue and at least one write-only queue;
[0062] Accordingly, the read / write submodule is specifically used for:
[0063] Add the read-ahead task to the write-only queue;
[0064] Consume the read-only queue to pre-read the corresponding data blocks from the storage medium into the cache according to the pre-read task.
[0065] In one possible implementation, after consuming the read-only queue to pre-read the corresponding data block from the storage medium into the cache according to the pre-read task, the read-write submodule is further configured to:
[0066] If the read-only queue is empty, then release the read-only queue;
[0067] A new read-only queue is determined from the at least one write-only queue.
[0068] In one possible implementation, the read / write submodule is specifically used for:
[0069] In response to a write operation on the task queue, the current value of a predefined tail pointer in the task queue is obtained through an atomic operation; wherein the predefined tail pointer is used to point to the next writable position in the task queue.
[0070] Use the current value of the tail pointer as the write position, and increment the value of the tail pointer;
[0071] Add the pre-read task to the array element corresponding to the write position.
[0072] In one possible implementation, the read / write submodule is specifically used for:
[0073] In response to a read operation on the task queue, the current value of a predefined current position pointer in the task queue is obtained through an atomic operation; wherein the predefined current position pointer is used to point to the next position to be read in the task queue;
[0074] Use the current value of the current position pointer as the read position, and increment the value of the current position pointer;
[0075] The pre-read task is read from the array element corresponding to the read position.
[0076] In one possible implementation, the pre-read module is specifically used for:
[0077] Based on the bitmap information, at least one read-ahead coroutine is generated;
[0078] The at least one read-ahead coroutine is executed asynchronously and concurrently to read the corresponding data block from the storage medium into the cache.
[0079] Thirdly, embodiments of this application provide a computing device, which includes a memory and a processor;
[0080] Memory and processor are coupled;
[0081] Memory is used to store program instructions;
[0082] The processor is used to invoke program instructions to cause the computing device to perform the data backup method as described in the first aspect and any possible implementation.
[0083] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a first computing device, are used to implement the data backup method as described in the first aspect and any possible implementation.
[0084] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by an electronic device, implements the data backup method involved in the first aspect and any possible implementation.
[0085] The data backup method and computing device provided in this application, when receiving a backup request for target data, first obtain the bitmap information of the target data. Using this bitmap information, a pre-read operation can be performed, pre-reading at least a portion of the data blocks from the storage medium into a cache, thus realizing data pre-reading and caching. When a read request for the target data block is received, the system first checks if the target data block exists in the cache. If it exists, it reads directly from the cache. When a cache hit occurs, the method in this application can convert the data read request into a memory access. Due to the high access latency of the storage medium, reading data blocks from the cache improves the data read speed compared to reading data blocks directly from the storage medium, thereby improving data backup efficiency. Attached Figure Description
[0086] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0087] Figure 1 A schematic diagram of a data backup system architecture provided in an embodiment of this application;
[0088] Figure 2 Flowchart of the data backup method provided in the embodiments of this application Figure 1 ;
[0089] Figure 3 Flowchart of the data backup method provided in the embodiments of this application Figure 2 ;
[0090] Figure 4 A schematic diagram of the caching process provided in the embodiments of this application. Figure 1 ;
[0091] Figure 5 A schematic diagram of the caching process provided in the embodiments of this application. Figure 2 ;
[0092] Figure 6 A schematic diagram of the caching process provided in the embodiments of this application. Figure 3 ;
[0093] Figure 7 This is a schematic diagram of a task queue structure provided in an embodiment of this application;
[0094] Figure 8 A schematic diagram of a write-only queue and a tail pointer provided in an embodiment of this application;
[0095] Figure 9 This application provides a schematic diagram of a read-only queue and a current position pointer, as shown in the embodiments of the present application.
[0096] Figure 10 This is a schematic diagram of the structure of a data backup device provided in an embodiment of this application;
[0097] Figure 11 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation
[0098] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0099] In related technologies, data backup methods require reading the data blocks to be backed up from the storage medium and returning them to the backup product. This results in a significant time consumption when reading data from the storage medium, leading to low data backup efficiency. To address this issue, the data backup method and computing device provided in this application can perform a data pre-read operation, pre-reading the data to be backed up into a cache. When a read request for a target data block is received, the system first checks the cache to see if the target data block exists; if it does, it reads it directly from the cache.
[0100] The following is combined with Figure 1 The system architecture involved in the embodiments of this application will be described.
[0101] Figure 1 This is a schematic diagram of a data backup system architecture provided in an embodiment of this application. Figure 1 As shown, the data backup system includes a backup product 10, a backup service 12, and a storage medium 30.
[0102] This data backup system can be applied to disk data backup scenarios of virtual machines (VMs) under a hyper-converged infrastructure (HCI) architecture. It achieves optimized integration with third-party backup products and solves the problem of time-consuming storage media reading in the traditional backup process by adding caching capabilities.
[0103] Optionally, backup product 10 can be backup software or a backup server independent of the hyperconverged system. Backup product 10 is responsible for managing backup policies, scheduling backup tasks, and ultimately receiving backup data. Optionally, backup product 10 can be third-party backup software, a backup scheduling platform developed by the user based on an open-source framework, or a backup-as-a-service platform in a cloud environment.
[0104] The backup product 10 and backup service 12 can complete data interaction and request / response based on the HTTP protocol. The backup service 12 works in conjunction with the storage medium 30 to read, pre-read, and cache data. Specifically, the backup product 10 initiates a backup request for target data (such as a virtual machine disk volume) by calling the application programming interface (API) of the backup service 12, and in subsequent stages sends data read requests one by one based on the obtained bitmap information to pull the actual data blocks.
[0105] Optionally, backup service 12 can be a functional module deployed within the hyperconverged system, acting as a bridge between backup product 10 and the underlying storage. Backup service 12 is responsible for receiving various requests (including backup requests and data read requests) from backup product 10 and coordinating internal components to complete data read, pre-read, and caching operations. Backup service 12 can run as an independent process on the management or compute nodes of the hyperconverged cluster, or it can be deployed in a container orchestration platform in a containerized manner. Backup service 12 provides a unified API interface externally and interacts with storage medium 30 internally through standard storage protocols.
[0106] In this embodiment, the backup service 12 further includes a cache 121. The cache 121 is used to temporarily store data blocks pre-read from the storage medium 30 to quickly respond to subsequent data read requests from the backup product 10. Optionally, the cache 121 can be implemented using the memory of the backup service 12, for example, using Dynamic Random Access Memory (DRAM) as the cache medium. Memory access latency is typically in the nanosecond range, far lower than the millisecond-level access latency of the storage medium, thus significantly improving data read speed.
[0107] Optionally, Cache 121 can also be used in conjunction with various storage media to implement multi-level caching, such as storing hot data in memory and storing warm data in a high-performance solid-state drive (SSD). In practice, the size and levels of the cache can be flexibly configured according to system resource conditions and performance requirements.
[0108] Optionally, storage medium 30 is a persistent storage device at the bottom layer of the hyperconverged system, used to store virtual machine disk data and its snapshot data. Storage medium 30 can include various types of storage devices, such as hard disk drives, solid-state drives, and non-volatile memory. Storage medium 30 is typically connected to the hyperconverged node via a Storage Area Network (SAN) or Direct-Attached Storage (DAS). Backup service 12 interacts with storage medium 30 through the underlying storage driver and I / O stack.
[0109] In one possible implementation, the backup service 12 of this application embodiment may be configured with a main process 1201 and a cache process 1202, wherein the main process 1201 and the cache process 1202 may be virtual units implemented by software programs, such as independent processes or threads running in the operating system.
[0110] Optionally, the main process 1201 internally maintains a pool of worker threads, containing at least one worker thread. When the main process 1201 receives a request, it distributes it according to the request type: For backup requests, the main process 1201 triggers operations such as creating a snapshot of the target volume and obtaining bitmap information, and returns the bitmap information to the backup product 10. Simultaneously, the main process 1201 passes the bitmap information to the caching process 1202 to initiate background pre-reading. For data read requests, the main process 1201 dispatches the request to an idle worker thread, which then performs the actual data read task.
[0111] Optionally, the cache process 1202 is the core part of this application embodiment, responsible for data pre-reading, cache management, and fast querying. The cache process 1202 usually runs as an independent process and interacts with the main process 1201 through an inter-process communication mechanism.
[0112] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the architecture of a data backup system. In other feasible embodiments of this application, the above architecture may include more or fewer components than illustrated, or combine some components, or split some components, or arrange different components, which can be determined according to the actual application scenario and is not limited here. Figure 1 The components shown can be implemented in hardware, software, or a combination of both.
[0113] Figure 2 Flowchart of the data backup method provided in the embodiments of this application Figure 1 ,like Figure 2As shown, embodiments of this application provide a data backup method, the execution subject of which can be... Figure 1 Backup service 12 in the document describes the method in detail as follows:
[0114] S201. In response to a backup request for the target data, obtain the bitmap information of the target data.
[0115] Optionally, the backup request is sent by the backup product to the backup service by calling the HCI interface of the backup product.
[0116] Optionally, the backup request can be an HTTP-based request message containing identification information for the target data.
[0117] Optionally, the target data can be a virtual machine disk volume, file system, or a specified set of data blocks in a hyperconverged environment. Identification information for the target data may include volume identifiers, snapshot identifiers, or uniform resource identifiers, etc.
[0118] Optionally, upon receiving a backup request, a snapshot of the volume is first taken, followed by the acquisition of the volume's bitmap. The purpose of creating a snapshot is to ensure the consistency of the backup data and prevent inconsistencies caused by modifications to the source data by the business system during the backup process.
[0119] Optionally, after taking a snapshot of the volume, if the data backup is successful, the snapshot can be deleted. Specifically, after a snapshot is successfully created, its identification information can be recorded for subsequent deletion or management. The snapshot will be deleted after the backup task is completed to free up storage space.
[0120] Alternatively, bitmap information can be obtained by querying the storage system, from a metadata service, or based on incremental logs.
[0121] S202. Based on the bitmap information, at least a portion of the data blocks in the target data are pre-read from the storage medium into the cache.
[0122] The task of pre-reading at least a portion of the target data from the storage medium into the cache can be executed as a background task.
[0123] Combination Figure 1 In the embodiments described in this application, the data can be pre-read in the background through a caching process and loaded into memory.
[0124] The background task here refers to a task that runs concurrently with the main process, without blocking the current thread or coroutine, and without affecting the backup service's response to subsequent requests.
[0125] S203. In response to a read request for a target data block in the target data, query whether the target data block exists in the cache.
[0126] Optionally, after obtaining the bitmap information, the backup service sends the bitmap information to the backup product. The read request can be generated by the backup product based on the bitmap information.
[0127] S204. If the target data block exists in the cache, then read the target data block from the cache.
[0128] In one possible implementation, combining Figure 1 After receiving the request, the main process of the backup service dispatches it to the worker thread, which then sends a request to the cache module corresponding to the cache thread to read the data.
[0129] If the cache is hit, the result is returned to the backup service's worker thread; if the cache is not hit, the worker thread reads the data from the storage medium. The main process then returns the data to the backup product.
[0130] This application provides a data backup method implemented through caching. When a backup request for target data is received, the bitmap information of the target data is first obtained. Using this bitmap information, a pre-read operation can be performed, pre-reading at least a portion of the data blocks from the storage medium into the cache, thus achieving data pre-reading and caching. When a read request for the target data block is received, the cache is first checked to see if the target data block exists. If it exists, it is read directly from the cache. When a cache hit occurs, the method of this application can convert the data read request into a memory access. Due to the high access latency of the storage medium, reading data blocks from the cache improves the data read speed compared to reading data blocks directly from the storage medium, thereby improving data backup efficiency.
[0131] In one possible implementation, embodiments of this application utilize a task queue for data pre-reading. Accordingly, Figure 3 Flowchart of the data backup method provided in the embodiments of this application Figure 2 .like Figure 3 As shown, the method includes:
[0132] S301. In response to a backup request for the target data, obtain the bitmap information of the target data.
[0133] S302. Parse the bitmap information to generate multiple pre-read tasks.
[0134] In one possible implementation, Figure 4 A schematic diagram of the caching process provided in the embodiments of this application. Figure 1 ,like Figure 4 As shown, the caching process 1202 provided in this application embodiment also includes a bitmap parsing coroutine 401, a task queue 402, multiple coroutines 403, and a message processing coroutine 404.
[0135] Among them, the bitmap parsing coroutine 401, task queue 402, multi-coroutine 403 and message processing coroutine 404 are all virtual functional modules built based on software program logic, not physical hardware units. Each virtual module relies on the running environment of the cache process 1202 to achieve functional collaboration and jointly complete the background pre-reading, cache storage and data interaction capabilities of backup data.
[0136] Bitmap parsing coroutine 401 serves as the data parsing entry point for the cache pre-read process. This coroutine runs continuously in the background asynchronously to receive bitmaps from the hyperconverged HCI architecture, parse the valid data block identifiers recorded in them, extract the metadata related to the backup data blocks that need to be pre-read, and push the parsed metadata to the task queue 402 according to preset rules, providing accurate task basis for subsequent asynchronous data reading.
[0137] Task queue 402 serves as a data buffer and task scheduling carrier between bitmap parsing coroutine 401 and multiple coroutines 403. It adopts a first-in-first-out (FIFO) queue scheduling rule to temporarily store the pre-read tasks output by bitmap parsing coroutine 401, thereby decoupling the parsing tasks from the reading tasks. At the same time, task queue 402 provides a unified task acquisition entry point for multiple coroutines 403, supporting concurrent reading operations of multiple coroutines 403. It is an intermediate module for realizing parallel processing of tasks within the cache process.
[0138] The multi-coroutine 403 serves as the data reading execution unit for the cache pre-read process. It consists of at least one asynchronous read coroutine. Each read coroutine can concurrently obtain pre-read tasks from the task queue 402 and access the underlying storage medium through asynchronous I / O based on the metadata to read the corresponding backup data block. This enables the effective data in the underlying storage medium to be quickly loaded into the memory (or cache) of the cache process, thus completing the initialization and update of the cache data.
[0139] The message processing coroutine 404 is used to receive cache data read requests sent by worker threads in the backup service. After parsing the request, it matches the corresponding cache data in the cache process's cache. If the cache is hit, the data is fed back to the worker thread.
[0140] S303. Add the pre-read task to the task queue and consume the task queue to pre-read the corresponding data block from the storage medium to the cache according to the pre-read task.
[0141] In one possible implementation, such as Figure 4 As indicated by the reference numerals, the data pre-reading method in this application embodiment is as follows:
[0142] Step 4.1: Bitmap parsing coroutine 401 continuously parses the bitmap of the data to be pre-read in the background and stores the parsed bitmap in task queue 402.
[0143] Step 4.2: Multiple read coroutines read the bitmap from task queue 402.
[0144] Step 4.3: Multiple read coroutines read the data corresponding to the bitmap concurrently through asynchronous I / O.
[0145] Step 4.4: Store the read data in the cache.
[0146] Step 4.5: When the main thread receives the backup message, it hands it over to the worker thread for processing. The worker thread retrieves the data from the cache process 1202 through a pipe.
[0147] The above method adds a read cache. When the backup service receives a backup request, it will first look up the data in the cache. If the data is found, it will be returned immediately, thus improving read performance.
[0148] The bitmap parsed using the above method is placed in a task queue, and multiple read processes need to read from this queue. Therefore, for concurrent operations, whether reading or writing, a lock must be acquired before the operation can be performed on the task queue. This may result in multiple concurrent read / write operations being mutually exclusive.
[0149] In some embodiments, the task queue includes a first queue and a second queue; accordingly, pre-read tasks are added to the task queue and the task queue is consumed to pre-read the corresponding data blocks from the storage medium into the cache according to the pre-read tasks, including:
[0150] Add the prefetch task to the first queue; consume the second queue to prefetch the corresponding data block from the storage medium to the cache according to the prefetch task.
[0151] Accordingly, Figure 5 A schematic diagram of the caching process provided in the embodiments of this application. Figure 2 ,like Figure 5 As shown, this embodiment of the application configures two task queues. The caching process 1202 is configured with two states:
[0152] State 1: When multiple coroutines read, they consume elements of task queue A, and the bitmap parsing result is placed into task queue B.
[0153] State 2: When multiple coroutines read, they consume elements of task queue B, and the bitmap parsing result is placed into task queue A.
[0154] In this embodiment, two queues, A and B, are used. One queue acts as a producer, storing newly generated data, while the other queue acts as a consumer, consuming data from the other queue. Read-only queues and write-only queues are used respectively, reducing read and write conflicts and improving pre-read speed.
[0155] Optionally, the two queues can be switched, and the switch is performed after consumption is complete.
[0156] In one possible implementation, after consuming the second queue to pre-read the corresponding data blocks from the storage medium into the cache according to the pre-read task, the method further includes:
[0157] If the second queue is empty, switch the read / write status between the first and second queues.
[0158] The switching condition is as follows: if the read-only queue is empty, a queue switch is triggered. The write-only queue is replaced with a read-only queue, and the original read-only queue, if empty, becomes a write-only queue. If the write-only queue is full first, it waits for a switch. Bitmap parsing is much faster than asynchronous reading; therefore, being a producer on a write-only queue is much faster than being a consumer on a read-only queue.
[0159] Building upon the aforementioned dual-queue architecture, this application also introduces a dynamic queue switching mechanism. When the second queue is empty, the read / write states of the first and second queues are switched, transforming the original write-only queue into a new read-only queue, and vice versa. This role switching ensures that producers and consumers always operate on different queues, realizing a lock-free producer-consumer model, eliminating read / write conflicts, guaranteeing the continuity of pipeline operations, further improving the distribution efficiency of pre-read tasks, and thus enhancing data backup efficiency.
[0160] Two queues are used, one for read-only and the other for write-only. No mutex lock is needed, allowing for efficient access to and from the queues.
[0161] In this embodiment, a dual-queue architecture is used to implement data pre-reading, physically isolating the reading and writing operations of the queues. During pre-reading, pre-reading tasks are added to the first queue, while pre-reading tasks in the second queue are consumed simultaneously. By restricting the operations of producers and consumers to different queues, read-write separation is achieved, avoiding lock contention caused by producers and consumers operating on the same queue simultaneously. This improves the concurrency efficiency of task distribution, enhances the efficiency of data pre-reading, and further improves the efficiency of data backup.
[0162] In some embodiments, the task queue includes a read-only queue and at least one write-only queue; accordingly, adding a pre-read task to the task queue and consuming the task queue to pre-read the corresponding data block from the storage medium to the cache according to the pre-read task includes: adding the pre-read task to the write-only queue; consuming the read-only queue to pre-read the corresponding data block from the storage medium to the cache according to the pre-read task.
[0163] In one possible implementation, after consuming the read-only queue to pre-read the corresponding data block from the storage medium into the cache according to the pre-read task, the method further includes: releasing the read-only queue if it is empty; and determining a new read-only queue from at least one write-only queue.
[0164] In the aforementioned multi-queue architecture, this embodiment further implements dynamic queue switching. When a read-only queue is consumed and becomes empty, it is released, and a new read-only queue is determined from at least one write-only queue. This ensures the continuous operation of the read-multiple-write model without introducing complex locking mechanisms or requiring switching between two queues. It only requires unidirectional switching from a read-only queue to a write-only queue, reducing the complexity of queue processing. At the same time, it promptly reclaims memory resources, improves the efficiency of pre-read task processing, and enhances resource utilization.
[0165] Accordingly, Figure 6 A schematic diagram of the caching process provided in the embodiments of this application. Figure 3 ,like Figure 6 As shown, this embodiment of the application is configured with multiple task queues. The caching process 1202 is configured with two states:
[0166] State 3: In the initial state, the bitmap parsing coroutine places the parsing result into a write-only queue A. When task queue A is full, or an asynchronous read coroutine reads data from the queue, a new write-only queue B is added. A becomes a read-only queue, and the asynchronous read coroutine reads data from task queue A. At this time, the bitmap parsing coroutine writes the parsing result into task queue B.
[0167] State 4: When write-only queue B is full, or an asynchronous read thread reads the queue and empties task queue A, a new write-only queue C will be added. If queue A is empty, then queue A will be released and deleted. This is when bitmap parsing coroutine 401 writes the parsing result to write-only queue C. Similarly, queues D, E, etc., can be added.
[0168] In this scenario, there is only one read-only queue, but multiple write-only queues. For handling multiple task queues, a task queue using a single queue is defined as a queue whose elements constitute the entire queue. For example... Figure 7 As shown, Figure 7This is a schematic diagram of a task queue structure provided in an embodiment of this application. Originally, there are four queues. When task queue A begins to be read, it is dequeued from the original write-only queue. Task queue A becomes a read-only queue. When task queue A is empty, it is released.
[0169] This application embodiment uses a read-only queue and uses the queue to manage multiple write-only queues.
[0170] For scenarios where production speed far exceeds consumption speed, this application provides a multi-queue architecture for reading and writing simultaneously. Specifically, the task queue includes a read-only queue and at least one write-only queue. Pre-read tasks are added to the write-only queue, while consumption operations retrieve pre-read tasks from the read-only queue. This allows producers to write concurrently to multiple write-only queues, avoiding blocking due to a single queue being full, improving the generation rate of pre-read tasks, effectively matching the speed difference between high-speed parsing and low-speed disk reading, improving overall throughput, and further enhancing data backup efficiency.
[0171] Based on the above embodiments, in order to achieve an efficient write-only queue, this application embodiment implements multi-concurrency through atomic operations. Accordingly, in one possible implementation, adding a pre-read task to the task queue includes: in response to a write operation on the task queue, obtaining the current value of a predefined tail pointer in the task queue through an atomic operation; using the current value of the tail pointer as the write position, and incrementing the value of the tail pointer; adding the pre-read task to the array element corresponding to the write position.
[0172] The predefined tail pointer is used to point to the next writable position in the task queue.
[0173] Optionally, such as Figure 8 As shown, Figure 8 This is a schematic diagram illustrating a write-only queue and a tail pointer, provided as an embodiment of this application. (Combined with...) Figure 8 The implementation of a queue is as follows:
[0174] Define a fixed-length or variable-length array to record the position after the last data element, i.e., the tail pointer Tail. In an empty array, Tail is the position of the first element (e.g., the array index of the first element in a C / C++ array is 0).
[0175] A PUT operation is provided. When the PUT operation is called, it first checks if the data is full. If not, it calls the fetch_and_add function to get the value of Tail, and Tail is incremented by 1. The Tail value obtained in the PUT operation indicates the position to be written, and the value is written to the corresponding position.
[0176] Because fetch_and_add is an atomic operation, it supports high concurrency.
[0177] Because bitmap parsing coroutines are much faster than asynchronous I / O reads, only single-threaded parsing is actually used, meaning single-threaded writing. A write-only lock-free queue is implemented in a simple way, allowing data to be written to the queue concurrently without the need for locks.
[0178] To achieve high-performance concurrent writes, this application embodiment employs a lock-free design for write operations in the task queue. Specifically, in response to a write operation, the current value of a predefined tail pointer in the task queue is obtained through an atomic operation. This tail pointer points to the next writable position. The current value is then used as the write position, the tail pointer is incremented, and finally, the pre-read task is added to the array element corresponding to the write position. Atomic operations ensure the uniqueness and correctness of position allocation during concurrent writes by multiple producers, eliminate write lock contention, and improve the write speed of pre-read tasks.
[0179] Based on the above embodiments, in order to achieve an efficient read-only queue, this application embodiment implements multi-concurrency through atomic operations. Accordingly, in one possible implementation, consuming the task queue includes: in response to a read operation on the task queue, obtaining the current value of a predefined current position pointer in the task queue through an atomic operation; wherein the predefined current position pointer is used to point to the next position to be read in the task queue; using the current value of the current position pointer as the read position, and incrementing the value of the current position pointer; and reading the pre-read task from the array element corresponding to the read position.
[0180] Optionally, such as Figure 9 As shown, Figure 9 This is a schematic diagram illustrating the structure of a read-only queue and a current position pointer, provided as an embodiment of this application. (Combined with...) Figure 9 The read-only queue is implemented as follows:
[0181] The read-only array is filled with data and the position of the last element is recorded, which is the current position pointer Cur corresponding to the current position accessed in the array (the array index of the first position in a C / C++ array is 0).
[0182] For example Figure 9 In the array, Cur points to 10. When GET is called, the position of 10 (array index) is obtained. Based on this position, the corresponding value 10 is read out, and the index is incremented to point to position 11.
[0183] A GET operation is provided. When the GET operation is called, it first checks if the array is empty (the array contains elements, Cur is less than the length of the data and less than or equal to the value of Tail). If these conditions are met, fetch_and_add(cur) is called to get the current position to be read, and Cur is incremented by 1. The Cur value obtained in the GET operation indicates the position to be written or read (array index), and the value at that position is read. Because fetch_and_add is an atomic operation, it supports high concurrency.
[0184] This application embodiment implements a read-only lock-free queue in a simple way, enabling concurrent data reading without the need for locking.
[0185] This application embodiment also implements a lock-free design for the read operation of the task queue. In response to a read operation, an atomic operation is used to obtain the current value of a predefined current position pointer in the task queue. This current position pointer points to the next position to be read. The current value is then used as the read position, and the current position pointer is incremented. Finally, the pre-read task is read from the array element corresponding to that read position. Atomic operations ensure that tasks are not duplicated or missed during concurrent reads by multiple consumers, achieving lock-free concurrency in read operations. Combined with lock-free write operations, this gives the entire task queue extremely high concurrent processing capabilities and improves the efficiency of data pre-reading.
[0186] S304. In response to a read request for a target data block in the target data, query whether the target data block exists in the cache.
[0187] S305. If the target data block exists in the cache, then read the target data block from the cache.
[0188] The implementation of step S301 is the same as that of step S201, and the implementation of steps S304 and S305 is the same as that of steps S203 and S204, which will not be described in detail here.
[0189] This application embodiment generates multiple pre-read tasks by parsing bitmap information and adds these pre-read tasks to a task queue. By consuming the pre-read tasks in the task queue, the corresponding data blocks are pre-read from the storage medium to the cache. By introducing a task queue, bitmap parsing, task generation, and task execution are decoupled. The queue can smooth out bursts of pre-read requests, ensuring that pre-read operations are performed in an orderly manner, further improving pre-read efficiency, thereby improving the efficiency of data reading and data backup.
[0190] In one possible implementation, pre-reading at least a portion of the target data from the storage medium into the cache includes: generating at least one pre-read coroutine based on bitmap information; and asynchronously and concurrently executing at least one pre-read coroutine to pre-read the corresponding data block from the storage medium into the cache.
[0191] Optionally, this implementation case provides a caching solution implemented using Python.
[0192] In Python, when encountering blocking or asynchronous operations, coroutines need to use the `await` keyword in the code to release the CPU. This includes the following processes: when a message processing coroutine is waiting for message processing; when reading data using asynchronous I / O; when a timer is waiting; when `await` is called inside a function; and other time-consuming operations, such as seeking.
[0193] This application's embodiments employ coroutines and asynchronous I / O technology to implement prefetching. Specifically, at least one prefetch coroutine is generated based on bitmap information, and these prefetch coroutines are executed asynchronously and concurrently to prefetch the corresponding data blocks from the storage medium into the cache. The coroutines actively yield the CPU while waiting for I / O, enabling high-concurrency I / O operations to be achieved within a single thread. This avoids the context switching overhead and GIL limitations of multi-threaded systems, improves prefetching efficiency, and is suitable for high-performance backup systems.
[0194] Figure 10 This is a schematic diagram of a data backup device provided in an embodiment of this application. The data backup device is used for backup services and includes: an acquisition module 1001, a pre-read module 1002, a query module 1003, and a reading module 1004.
[0195] The acquisition module is used to acquire bitmap information of the target data in response to a backup request for the target data;
[0196] The prefetch module is used to prefetch at least a portion of the data blocks in the target data from the storage medium into the cache based on the bitmap information;
[0197] The query module is used to respond to a read request for a target data block in the target data and check whether the target data block exists in the cache.
[0198] The read module is used to read the target data block from the cache if the target data block exists in the cache.
[0199] In one possible implementation, the pre-read module includes:
[0200] The parsing submodule is used to parse bitmap information to generate multiple pre-read tasks;
[0201] The read / write submodule is used to add pre-read tasks to the task queue and consume the task queue to pre-read the corresponding data blocks from the storage medium into the cache according to the pre-read tasks.
[0202] In one possible implementation, the task queue includes a first queue and a second queue;
[0203] Accordingly, the read / write submodule is specifically used for:
[0204] Add the pre-read task to the first queue;
[0205] Consume the second queue to pre-read the corresponding data blocks from the storage medium into the cache according to the pre-read task.
[0206] In one possible implementation, after consuming the second queue to pre-read the corresponding data blocks from the storage medium into the cache according to the pre-read task, the read / write submodule is further configured to:
[0207] If the second queue is empty, switch the read / write status between the first and second queues.
[0208] In one possible implementation, the task queue includes a read-only queue and at least one write-only queue;
[0209] Accordingly, the read / write submodule is specifically used for:
[0210] Add the read-ahead task to the write-only queue;
[0211] Consume the read-only queue to pre-read the corresponding data blocks from the storage medium into the cache according to the pre-read task.
[0212] In one possible implementation, after consuming the read-only queue to pre-read the corresponding data blocks from the storage medium into the cache according to the pre-read task, the read-write submodule is further configured to:
[0213] If the read-only queue is empty, then release the read-only queue;
[0214] A new read-only queue is determined from at least one write-only queue.
[0215] In one possible implementation, the read / write submodule is specifically used for:
[0216] In response to a write operation to the task queue, the current value of the predefined tail pointer in the task queue is obtained through an atomic operation; the predefined tail pointer is used to point to the next writable position in the task queue.
[0217] Use the current value of the tail pointer as the write position, and increment the value of the tail pointer;
[0218] Add the pre-read task to the array element corresponding to the write position.
[0219] In one possible implementation, the read / write submodule is specifically used for:
[0220] In response to a read operation on the task queue, the current value of the predefined current position pointer in the task queue is obtained through an atomic operation; where the predefined current position pointer is used to point to the next position to be read in the task queue.
[0221] Use the current value of the current position pointer as the read position, and increment the value of the current position pointer;
[0222] Read the pre-read task from the array element corresponding to the read position.
[0223] In one possible implementation, the pre-read module is specifically used for:
[0224] Generate at least one read-ahead coroutine based on the bitmap information;
[0225] At least one read-ahead coroutine is executed asynchronously and concurrently to read the corresponding data block from the storage medium into the cache.
[0226] Figure 11 This is a schematic diagram of a computing device provided in an embodiment of this application. The computing device can be a main server or a server to be upgraded.
[0227] like Figure 11 As shown, the computing device 110 may include a processor 111 and a memory 112, wherein the processor 111 and the memory 112 are coupled and can communicate with each other; for example, the processor 111 and the memory 112 communicate through a communication bus 113, the memory 112 is used to store computer execution instructions, and the processor 111 is used to call the computer execution instructions in the memory to execute the firmware upgrade method shown in the above method embodiment.
[0228] Optionally, the computing device 110 may also include a communication interface, which may include a transmitter and / or a receiver.
[0229] Optionally, the aforementioned processor can be a central processing unit (CPU), a graphics processing unit (GPU), other general-purpose processors, a digital signal processor (DSP), or an application-specific integrated circuit (ASIC), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0230] This application provides a computer-readable storage medium storing computer program instructions; when the program instructions are executed by an electronic device or a computing device, the computing electronic device or computing device performs the above-described firmware upgrade method.
[0231] This application provides a computer program product, which includes computer program instructions. When the computer program instructions are executed, they cause a computing electronic device or computing device to perform the firmware upgrade method described above.
[0232] All or part of the steps in the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.
[0233] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable terminal device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.
[0234] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable terminal device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0235] These computer program instructions can also be loaded onto a computer or other programmable terminal device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0236] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, the embodiments of this application are also intended to include these modifications and variations.
[0237] In the embodiments of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. The term "or" and its variations can mean "and / or." In the embodiments of this application, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In the embodiments of this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0238] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of this application, and are not intended to limit them; although the embodiments of this application have been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A data backup method, characterized in that, include: In response to a backup request for target data, obtain the bitmap information of the target data; Based on the bitmap information, at least a portion of the data blocks in the target data are pre-read from the storage medium into the cache; In response to a read request for a target data block in the target data, query whether the target data block exists in the cache; If the target data block exists in the cache, then the target data block is read from the cache.
2. The method according to claim 1, characterized in that, The step of pre-reading at least a portion of the data blocks in the target data from the storage medium into the cache based on the bitmap information includes: The bitmap information is parsed to generate multiple pre-read tasks; The pre-read task is added to the task queue and the task queue is consumed to pre-read the corresponding data block from the storage medium to the cache according to the pre-read task.
3. The method according to claim 2, characterized in that, The task queue includes a first queue and a second queue; Accordingly, adding the pre-read task to the task queue and consuming the task queue to pre-read the corresponding data block from the storage medium to the cache according to the pre-read task includes: Add the pre-read task to the first queue; Consume the second queue to pre-read the corresponding data blocks from the storage medium into the cache according to the pre-read task.
4. The method according to claim 3, characterized in that, After consuming the second queue to pre-read the corresponding data blocks from the storage medium into the cache according to the pre-read task, the method further includes: If the second queue is empty, then switch the read / write status of the first queue and the second queue.
5. The method according to claim 2, characterized in that, The task queue includes a read-only queue and at least one write-only queue; Accordingly, adding the pre-read task to the task queue and consuming the task queue to pre-read the corresponding data block from the storage medium to the cache according to the pre-read task includes: Add the read-ahead task to the write-only queue; Consume the read-only queue to pre-read the corresponding data blocks from the storage medium into the cache according to the pre-read task.
6. The method according to claim 5, characterized in that, After consuming the read-only queue to pre-read the corresponding data block from the storage medium into the cache according to the pre-read task, the method further includes: If the read-only queue is empty, then release the read-only queue; A new read-only queue is determined from the at least one write-only queue.
7. The method according to any one of claims 2 to 6, characterized in that, Adding the pre-read task to the task queue includes: In response to a write operation on the task queue, the current value of a predefined tail pointer in the task queue is obtained through an atomic operation; wherein the predefined tail pointer is used to point to the next writable position in the task queue. Use the current value of the tail pointer as the write position, and increment the value of the tail pointer; Add the pre-read task to the array element corresponding to the write position.
8. The method according to any one of claims 2 to 6, characterized in that, The consumption of the task queue includes: In response to a read operation on the task queue, the current value of a predefined current position pointer in the task queue is obtained through an atomic operation; wherein the predefined current position pointer is used to point to the next position to be read in the task queue; Use the current value of the current position pointer as the read position, and increment the value of the current position pointer; The pre-read task is read from the array element corresponding to the read position.
9. The method according to any one of claims 1 to 6, characterized in that, The step of pre-reading at least a portion of the target data from the storage medium into the cache includes: Based on the bitmap information, at least one read-ahead coroutine is generated; The at least one read-ahead coroutine is executed asynchronously and concurrently to read the corresponding data block from the storage medium into the cache.
10. A computing device, characterized in that, The computing device includes a memory and a processor; The memory and the processor are coupled; The memory is used to store program instructions; The processor is used to invoke the program instructions to cause the computing device to perform the method as described in any one of claims 1-9.
