Data recovery method, storage medium, electronic device, and program product

By dividing and cacheing the target data of the RAID card in the backup control device, the problem of low data recovery and backup efficiency in the event of abnormal power failure is solved, and rapid data recovery and improved backup efficiency are achieved.

CN118860747BActive Publication Date: 2025-03-14SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411333526.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-03-14
Estimated Expiration
2044-09-24

AI Technical Summary

Technical Problem

In the prior art, when RAID cards are powered off abnormally, data recovery and data backup efficiency are low, and the power supply capacity of the backup power supply module is attenuated, resulting in the demand for replacing modules, which increases cost and efficiency problems.

Method used

By dividing the target data into a plurality of sub-data in the backup control device and buffering these sub-data into a plurality of backup cache units, the target data in the cache device is quickly restored after the RAID card is restored to power.

Benefits of technology

It realizes the rapid cache and recovery of data when the power supply of the backup power supply module is constant, improves the efficiency of data recovery and data backup, and reduces the cost and replacement frequency of the backup power supply module.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118860747B_ABST
    Figure CN118860747B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method for data recovery and a storage medium, an electronic device, and a program product, wherein the method includes: when it is determined that the RAID card is powered off and the backup power supply module is in a state of supplying power to the RAID card, dividing the target data into N sub-data, wherein the target data is data cached in a cache device, and the cache device is deployed in the RAID card; caching the N sub-data into the N backup cache units respectively; when it is determined that the RAID card is powered on again and the target data cached in the cache device is abnormal, restoring the N sub-data cached in the N backup cache units to the cache device. Through the present application, the problem of low efficiency of data recovery and data backup when using a RAID card for data backup in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data processing, and specifically, to a data recovery method and storage medium, electronic device, and program product. Background Art

[0002] When a Redundant Array of Independent Disks (RAID) card loses power abnormally, the power supply of the RAID card is switched to the backup power supply module (for example, a super capacitor), which can provide power for a limited time. When the backup power supply module is supplying power, the data in the cache of the RAID card will be backed up to the non-volatile storage medium with the power supply support of the backup power supply module. When the RAID card is powered on normally next time, the cache data backed up to the non-volatile storage medium during the last abnormal power failure will be restored to the cache, and then the data in the cache will be stored in the disk.

[0003] However, the cache of RAID cards in the current related technologies is generally a dynamic random access memory (DRAM), and the non-volatile storage medium is a solid state drive (SSD). The data backup time is long, and the power supply capacity of the backup power supply module is high. A large-capacity backup power supply module is required, which is expensive. When the power supply capacity of the backup power supply module decays and does not meet the power supply requirements of the RAID card, the backup power supply module needs to be replaced, resulting in a relatively low efficiency of data recovery and data backup. Summary of the invention

[0004] The embodiments of the present application provide a data recovery method and storage medium, electronic device, and program product to at least solve the problem of low efficiency of data recovery and data backup when using a RAID card for data backup in the related art.

[0005] According to an embodiment of the present application, a method for data recovery is provided, which is applied to a backup control device, wherein the backup control device is connected to a RAID card, the RAID card is connected to a backup power supply module, and the RAID card includes N backup cache units, the backup power supply module is a module for supplying power to the RAID card, and N is a positive integer greater than 1. The method includes: when it is determined that the RAID card is powered off and the backup power supply module is in a state of supplying power to the RAID card, dividing target data into N sub-data, wherein the target data is data cached in a cache device, and the cache device is deployed in the RAID card; caching the N sub-data into the N backup cache units respectively; when it is determined that the RAID card is powered on again and an abnormality occurs to the target data cached in the cache device, restoring the N sub-data cached in the N backup cache units to the cache device.

[0006] In an exemplary embodiment, the backup control device also includes a power supply monitoring service. When it is determined that the RAID card is powered off and the backup power supply module is in a state of supplying power to the RAID card, before dividing the target data into N sub-data, the method includes: obtaining a first monitoring result of the power supply monitoring service on the RAID card, wherein the power supply monitoring service is used to monitor the power supply status of the RAID card, and the first monitoring result includes a first power supply status of the RAID card; when it is determined from the first monitoring result that the RAID card is in a power-off state, controlling the backup power supply module to supply power to the RAID card.

[0007] In an exemplary embodiment, the backup control device further includes a power detection service, which is connected to the power supply monitoring service. When it is determined from the monitoring results that the RAID card is in the power-off state, the backup power supply module is controlled to supply power to the RAID card, including: when it is determined from the monitoring results that the RAID card is in the power-off state, the detection result of the power detection service is obtained, and the detection result is recorded in the power meter of the backup power supply module, wherein the power detection service is used to detect the power state of the backup power supply module, and the detection result includes the power information of the backup power supply module; when it is determined from the detection results that the power of the backup power supply module is greater than a first preset power, the power supply monitoring service sends a first switching instruction to the power supply switching service, wherein the power supply switching service is deployed in the backup control device; the power supply switching service responds to the first switching instruction to turn on the power supply circuit between the backup power supply module and the RAID card, so that the backup power supply module supplies power to the RAID card through the power supply circuit.

[0008] In an exemplary embodiment, when it is determined that the RAID card is powered off and the backup power supply module is in a state of supplying power to the RAID card, the target data is divided into N sub-data, including: obtaining the starting physical address of the target data, and reading the target data from the cache device according to the starting physical address of the target data; dividing the target data into N sub-data based on the number of the N backup cache units, and storing the starting physical addresses of the N sub-data in the data address table in the cache device.

[0009] In an exemplary embodiment, the N sub-data are cached in the N backup cache units respectively, including: when it is determined that the power of the backup power supply module is less than the second preset power, the N sub-data are cached in the N backup cache units respectively; when it is determined that the power of the backup power supply module is restored to be greater than the second preset power, the N-1 sub-data are cached in the N backup cache units respectively, so that each backup cache unit caches the complete target data, wherein the N-1 sub-data are other sub-data among the N sub-data except the sub-data that have been cached in the N backup cache units.

[0010] In an exemplary embodiment, each of the above-mentioned backup cache units includes multiple cache partitions. When it is determined that the power of the above-mentioned backup power supply module is less than the second preset power, the N sub-data are cached in the N above-mentioned backup cache units respectively, including: respectively obtaining the starting physical addresses of the N above-mentioned sub-data; respectively transmitting the N above-mentioned sub-data to the first data buffer according to the above-mentioned starting physical addresses and through the first data transmission bus; respectively transmitting the N above-mentioned sub-data cached in the above-mentioned first data buffer to the first cache partitions in the N above-mentioned backup cache units through the second data transmission bus, wherein the above-mentioned first cache partition is any cache partition among the multiple above-mentioned cache partitions.

[0011] In an exemplary embodiment, when it is determined that the power level of the backup power supply module has recovered to be greater than the second preset power level, the N-1 sub-data are cached in the N backup cache units respectively, so that each of the backup cache units has cached the complete target data, including: transmitting the N-1 sub-data cached in the first data buffer to the first cache partition in the N backup cache units respectively through the second data transmission bus.

[0012] In an exemplary embodiment, the backup control device further includes a power supply monitoring service, and when it is determined that the power supply of the RAID card is restored and the target data cached in the cache device is abnormal, the N sub-data cached in the N backup cache units are restored to the cache device, including: obtaining a second monitoring result of the RAID card by the power supply monitoring service, wherein the second monitoring result includes a second power supply state of the RAID card; when it is determined from the second monitoring result that the RAID card is in a state where the power supply has been restored, detecting a data state of the target data cached in the cache device; when it is determined from the data state that the target data cached in the cache device is abnormal, reading the backed-up N sub-data from the N backup cache units; and transmitting the N sub-data cached in the N backup cache units to the cache device to restore the target data in the cache device.

[0013] In an exemplary embodiment, after obtaining the second monitoring result of the power supply monitoring service on the RAID card, the method includes: when it is determined from the second monitoring result that the RAID card is in a state where power supply has been restored, the power supply monitoring service sends a first disconnection instruction to the power supply switching service, wherein the power supply switching service is deployed in the backup control device; the power supply switching service responds to the first disconnection instruction to disconnect the power supply circuit between the backup power supply module and the RAID card, so that the backup power supply module stops supplying power to the RAID card.

[0014] In an exemplary embodiment, the N sub-data cached in the N backup cache units are transferred to the cache device to restore the target data in the cache device, including: transferring the N sub-data read from the first backup cache unit to the second data buffer via a third data transfer bus, wherein the first backup cache unit is any one of the N backup cache units; transferring the N sub-data in the second data buffer to the cache device via a fourth data transfer bus to restore the target data in the cache device.

[0015] In an exemplary embodiment, each of the above-mentioned backup cache units includes multiple cache partitions, and the N above-mentioned sub-data read from the above-mentioned first backup cache unit are transmitted to the second data buffer through the third data transmission bus, including: reading the N above-mentioned sub-data from the first cache partition, wherein the N above-mentioned sub-data in the first cache partition are the sub-data transmitted by the first backup cache unit; and transmitting the N above-mentioned sub-data read from the above-mentioned first cache partition to the above-mentioned second data buffer through the third data transmission bus.

[0016] In an exemplary embodiment, when it is determined from the data state that the target data cached in the cache device is abnormal, before reading the backed-up N sub-data from the first backup cache unit, the method further includes: when it is determined from the data state that the target data cached in the cache device is abnormal and the first backup cache unit is abnormal, detecting whether the N sub-data have been cached in the second backup cache unit, wherein the second backup cache unit is any backup cache unit in the N backup cache units that is in a normal state; when it is determined that the N sub-data have been cached in the second backup cache unit, reading the backed-up N sub-data from the second backup cache unit; and transferring the N sub-data cached in the second backup cache unit to the cache device to restore the target data in the cache device.

[0017] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.

[0018] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0019] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0020] Through the present application, after the backup control device determines that the RAID card is powered off and the backup power supply module supplies power to the RAID card, by dividing the data to be backed up into multiple sub-data, and caching the multiple sub-data into multiple backup cache units in the RAID card respectively, it is possible to quickly cache the complete target data in multiple backup cache units when the power supply of the backup power supply module is constant. When an abnormality occurs to the target data cached in the cache device, the complete target data cached in the multiple backup cache units can be quickly restored to the cache device after the RAID card resumes power. Therefore, the problems of long data backup time, low data recovery and data backup efficiency when using a RAID card for data backup in the related art can be solved, thereby achieving the effect of improving data recovery and data backup efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a schematic diagram of a hardware environment of a data recovery method according to an embodiment of the present application;

[0022] Figure 2 is a flow chart of a method for data recovery according to an embodiment of the present application;

[0023] Figure 3 is a schematic diagram of caching target data according to an embodiment of the present application;

[0024] Figure 4 is a schematic diagram of a backup cache unit partition according to an embodiment of the present application;

[0025] Figure 5 is a hardware block diagram of a RAID card backup power supply according to an embodiment of the present application;

[0026] Figure 6 is a schematic diagram of a target data caching process according to an embodiment of the present application;

[0027] Figure 7 It is a structural block diagram of a data recovery device according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0030] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 Schematic diagram of the hardware environment of a data recovery method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0031] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for data recovery in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0032] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0033] In this embodiment, a method for data recovery is provided. Figure 2 is a flow chart of a method for data recovery according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0034] Step S202, when it is determined that the RAID card is powered off and the backup power supply module is in a state of supplying power to the RAID card, dividing the target data into N sub-data, wherein the target data is data cached in a cache device, and the cache device is deployed in the RAID card;

[0035] Step S204, caching the N sub-data into N backup cache units respectively;

[0036] Step S206, when it is determined that the RAID card is powered on again and the target data cached in the cache device is abnormal, the N sub-data cached in the N backup cache units are restored to the cache device.

[0037] Optionally, in this embodiment, the backup power supply module is a module used to temporarily power the RAID card when the RAID card is powered off, including but not limited to: a super capacitor, a lithium battery, a backup power supply group, a backup battery group, etc.

[0038] Optionally, in this embodiment, the backup cache unit in the RAID card is a non-volatile storage medium, including but not limited to: Flash, NAND Flash in Flash, NOR Flash in Flash, Electrically Erasable Programmable Read-Only Memory (EEPROM), etc.

[0039] Optionally, in this embodiment, the method of dividing the target data into N sub-data includes but is not limited to: dividing the target data according to a preset data size, dividing according to the storage address of the target data, etc.

[0040] For example, Figure 3 is a schematic diagram of caching target data according to an embodiment of the present application, such as Figure 3 As shown in the figure, in a cache static random access memory (SRAM), the data is divided into two parts according to the storage address. Specifically, the storage space of SRAM is 16MB, and the starting physical address of its storage is 0x01000000H, then its last physical address is 0x01FFFFFFFH, and the target data is divided into two parts according to the storage address of the data, that is, the data with the physical address within 0x01000000H~0x01800000H is the first part of the data, and the data with the physical address within 0x01800000H~0x01FFFFFFFH is the second part of the data.

[0041] Through the present application, after the backup control device determines that the RAID card is powered off and the backup power supply module supplies power to the RAID card, by dividing the data to be backed up into multiple sub-data, and caching the multiple sub-data into multiple backup cache units in the RAID card respectively, it is possible to quickly cache the complete target data in multiple backup cache units when the power supply of the backup power supply module is constant. When an abnormality occurs to the target data cached in the cache device, the complete target data cached in the multiple backup cache units can be quickly restored to the cache device after the RAID card resumes power. Therefore, the problems of long data backup time, low data recovery and data backup efficiency when using a RAID card for data backup in the related art can be solved, thereby achieving the effect of improving data recovery and data backup efficiency.

[0042] In an exemplary embodiment, the backup control device also includes a power supply monitoring service. When it is determined that the RAID card is powered off and the backup power supply module is in a state of supplying power to the RAID card, before dividing the target data into N sub-data, the method includes: obtaining a first monitoring result of the power supply monitoring service on the RAID card, wherein the power supply monitoring service is used to monitor the power supply status of the RAID card, and the first monitoring result includes a first power supply status of the RAID card; when it is determined from the first monitoring result that the RAID card is in a power-off state, controlling the backup power supply module to supply power to the RAID card.

[0043] Optionally, in this embodiment, a power supply monitoring service is used to monitor the power supply status of the above-mentioned RAID card. The power supply monitoring service includes but is not limited to: voltage sensors, current sensors, pulse signal sensors, etc. The power supply monitoring service will predetermine the minimum voltage threshold required for the normal operation of the RAID card, and then use the voltage sensor to monitor the voltage level on the power supply-related lines in real time, and compare the real-time monitored voltage value with the preset threshold. If the monitored voltage is lower than the threshold and lasts for a period of time, it can be determined that the RAID card is in a power-off state; the power supply monitoring service monitors the pulse signal on the power supply-related lines in real time through the pulse signal sensor. When the pulse signal changes from high to low and the pulse signal is in a low pulse for a period of time, it can be determined that the RAID card is in a power-off state.

[0044] Optionally, in this embodiment, the first monitoring result includes but is not limited to recording the number of the current RAID card, the power supply status of the RAID card, the monitoring time, etc.

[0045] Through the above steps, the power supply status of the RAID card is monitored in real time according to the power supply monitoring service, and the monitoring results are sent. The power supply status of the RAID card is determined according to the monitoring results. If the RAID card is in a power-off state, the standby power supply module is controlled to supply power to the RAID card, thereby ensuring the normal operation of the RAID card when the RAID card is in an abnormal power-off state.

[0046] In an exemplary embodiment, the backup control device further includes a power detection service, which is connected to the power supply monitoring service. When it is determined from the monitoring results that the RAID card is in the power-off state, the backup power supply module is controlled to supply power to the RAID card, including: when it is determined from the monitoring results that the RAID card is in the power-off state, the detection result of the power detection service is obtained, and the detection result is recorded in the power meter of the backup power supply module, wherein the power detection service is used to detect the power state of the backup power supply module, and the detection result includes the power information of the backup power supply module; when it is determined from the detection results that the power of the backup power supply module is greater than a first preset power, the power supply monitoring service sends a first switching instruction to the power supply switching service, wherein the power supply switching service is deployed in the backup control device; the power supply switching service responds to the first switching instruction to turn on the power supply circuit between the backup power supply module and the RAID card, so that the backup power supply module supplies power to the RAID card through the power supply circuit.

[0047] Optionally, in this embodiment, the power detection service is used to detect the power status of the backup power supply module. The methods used by the power detection service during detection include but are not limited to: load testing, connecting the backup power supply module to a stable load (for example, a resistor), and measuring the change in current over a certain period of time, thereby estimating the power status of the backup power supply module; using a tester corresponding to the backup power supply module to determine the power status of the backup power supply module, etc.

[0048] Optionally, in this embodiment, in addition to recording the power information of the standby power supply module, the power meter may also record the serial number of the standby power supply module, power detection time, etc.

[0049] Optionally, in this embodiment, the first preset power is a preset power that meets the minimum power requirement for powering the RAID card. The first preset power is determined according to a value provided by the RAID card manufacturer or a minimum power value required when powering the RAID card in a pre-test.

[0050] Optionally, in this embodiment, the first switching instruction is an instruction for turning on the power supply circuit between the backup power supply module and the RAID card. The first switching instruction includes but is not limited to the number of the backup power supply module, the number of the RAID card, and an instruction code indicating turning on the power supply circuit between the backup power supply module and the RAID card.

[0051] Through the above steps, it is determined that the power of the backup power supply module is sufficient to power the RAID card, the need for power switching is determined through the first switching instruction, and the backup power supply module is used to power the RAID, thereby protecting the data in the RAID card and cache and preventing data loss or damage in the event of a power failure or accidental power outage.

[0052] In an exemplary embodiment, when it is determined that the RAID card is powered off and the backup power supply module is in a state of supplying power to the RAID card, the target data is divided into N sub-data, including: obtaining the starting physical address of the target data, and reading the target data from the cache device according to the starting physical address of the target data; dividing the target data into N sub-data based on the number of the N backup cache units, and storing the starting physical addresses of the N sub-data in the data address table in the cache device.

[0053] Optionally, in this embodiment, the method of dividing the target data into N sub-data has been described above and will not be repeated here.

[0054] Optionally, in this embodiment, in addition to storing the starting physical addresses of the N sub-data, the data address table also stores the serial number of the first stored backup cache unit corresponding to the starting physical address of each sub-data.

[0055] Through the above steps, the starting physical address of the target data is obtained and the data is read, the target data is divided into N sub-data, and the actual physical locations of the N sub-data are recorded at the same time, which provides the necessary conditions for parallel transmission for subsequent target data caching to N backup cache units and target data recovery, thereby achieving the purpose of improving data caching efficiency.

[0056] In an exemplary embodiment, the N sub-data are cached in the N backup cache units respectively, including: when it is determined that the power of the backup power supply module is less than the second preset power, the N sub-data are cached in the N backup cache units respectively; when it is determined that the power of the backup power supply module is restored to be greater than the second preset power, the N-1 sub-data are cached in the N backup cache units respectively, so that each backup cache unit caches the complete target data, wherein the N-1 sub-data are other sub-data among the N sub-data except the sub-data that have been cached in the N backup cache units.

[0057] Optionally, in this embodiment, the second preset power is the power that is not sufficient to back up all the target data in the cache device to N cache units (each cache unit has a complete copy of the target data). The second preset power can be determined based on the value provided by the RAID card manufacturer, or by pre-testing the minimum power value required to back up all the target data in the cache device to N cache units (each cache unit has a complete copy of the target data).

[0058] Through the above steps, whether to cache all target data into N backup cache units is determined according to the power status of the backup power supply module, and different data caching schemes are selected, which can effectively improve the target data caching efficiency. At the same time, it also enables data caching to continue when the backup power supply module is insufficient, thereby improving the utilization rate of the backup power supply module.

[0059] In an exemplary embodiment, each of the above-mentioned backup cache units includes multiple cache partitions. When it is determined that the power of the above-mentioned backup power supply module is less than the second preset power, the N sub-data are cached in the N above-mentioned backup cache units respectively, including: respectively obtaining the starting physical addresses of the N above-mentioned sub-data; respectively transmitting the N above-mentioned sub-data to the first data buffer according to the above-mentioned starting physical addresses and through the first data transmission bus; respectively transmitting the N above-mentioned sub-data cached in the above-mentioned first data buffer to the first cache partitions in the N above-mentioned backup cache units through the second data transmission bus, wherein the above-mentioned first cache partition is any cache partition among the multiple above-mentioned cache partitions.

[0060] Optionally, in this embodiment, the multiple cache partitions in the backup cache unit are divided by software, and the multiple cache partitions in each backup cache unit are divided according to the size of the target data in the cache device. The total size of the same partition of the N backup cache units should be larger than the size of the target data. Considering the actual usage of the backup cache unit and the usage characteristics of the backup cache unit itself, the same size of space can also be reserved in the N backup cache units;

[0061] For example, Figure 4 is a schematic diagram of a backup cache unit partition according to an embodiment of the present application, such as Figure 4 As shown in the figure, a partition operation is performed on a Quad Serial Peripheral Interface NAND Flash Memory (QSPI NAND Flash) and it is divided into 10 partitions, namely, partition 0 to partition 9. The total size of the same partition of two Flash slices is larger than the size of the target data. Meanwhile, considering the possible bad blocks of NAND, a certain space is reserved for the bad blocks.

[0062] Optionally, in this embodiment, the types of the first data transmission bus and the second data transmission bus can be determined according to the unit or partition actually transmitted to. The first data transmission bus can be a DMA bus, which is a data transmission bus that can realize high-speed data transmission; the second data transmission bus can be a high-speed serial bus, for example, Peripheral Component Interconnect Express (PCIe), etc.

[0063] Optionally, in this embodiment, the data buffer is used to solve the problem of data transmission speed mismatch when the target data in the cache device is transferred to the target cache unit. The type of the data buffer may be random access memory (RAM) and the like.

[0064] For example, Figure 5 is a hardware block diagram of a RAID card backup power supply according to an embodiment of the present application, such as Figure 5 As shown, the backup power supply module is a super capacitor, the first data transmission bus is a DMA bus, the second data transmission bus is a QSPI bus, and the data buffer is a First In First Out (FIFO) module in the QSPI Controller, wherein the QSPI Controller is a subsystem responsible for the backup power business integrated in the management software (MS), i.e., the RAID card control chip, and the target cache unit is the QSPI NAND Flash. When performing the target data cache operation, the DMA bus transfers the data stored in the SRAM to the FIFO module in the QSPI Controller, and then the QSPI bus reads the N sub-data stored in the QSPINAND Flash and transfers them to the QSPI NAND Flash respectively to realize the backup of the target data.

[0065] Through the above steps, the sub-data is read according to the starting physical addresses of N sub-data and transferred to the corresponding data buffer, and then the data is read from the data buffer and transferred to the target cache unit, which solves the problem of data transmission speed mismatch when the target data in the cache device is transferred to the target cache unit, and realizes data backup.

[0066] In an exemplary embodiment, when it is determined that the power level of the backup power supply module has recovered to be greater than the third preset power level, the N-1 sub-data are cached in the N backup cache units respectively, so that each of the backup cache units has cached the complete target data, including: transmitting the N-1 sub-data cached in the first data buffer to the first cache partition in the N backup cache units respectively through the second data transmission bus.

[0067] Optionally, in this embodiment, the type of the second data transmission bus has been described above and will not be repeated here.

[0068] Optionally, in this embodiment, the type of the data buffer has been described above and will not be repeated here.

[0069] Through the above steps, the N-1 sub-data in the data buffer that were not previously stored in the corresponding backup cache unit are cached, and each of the N backup buffers stores a complete copy of the target data, achieving the effect of RAID1 redundant backup.

[0070] In an exemplary embodiment, the backup control device further includes a power supply monitoring service, and when it is determined that the power supply of the RAID card is restored and the target data cached in the cache device is abnormal, the N sub-data cached in the N backup cache units are restored to the cache device, including: obtaining a second monitoring result of the RAID card by the power supply monitoring service, wherein the second monitoring result includes a second power supply state of the RAID card; when it is determined from the second monitoring result that the RAID card is in a state where the power supply has been restored, detecting a data state of the target data cached in the cache device; when it is determined from the data state that the target data cached in the cache device is abnormal, reading the backed-up N sub-data from the N backup cache units; and transmitting the N sub-data cached in the N backup cache units to the cache device to restore the target data in the cache device.

[0071] Optionally, in this embodiment, the power supply monitoring service is used to monitor the power supply status of the above-mentioned RAID card. The components included in the power supply monitoring service have been described above and will not be repeated here.

[0072] Optionally, in this embodiment, the second monitoring result includes but is not limited to recording the number of the current RAID card, the power supply status of the RAID card, the monitoring time, etc.

[0073] Optionally, in this embodiment, the method for detecting the data state of the target data cached in the cache device includes but is not limited to using software for detection. For example, when the target data in the cache device is cached in SRAM, the SRAM is detected by software to determine whether there are other problems such as data errors caused by damage to the storage unit during use, and the data state of the target data cached in the cache device is detected.

[0074] Through the above steps, when the RAID card is in a state where power is restored and the target data cached in the cache device is abnormal, data recovery is performed, and the N sub-data cached in the N backup cache units are transferred to the cache device, so that the cache device stores complete target data, thereby realizing recovery of the target data. By judging the relevant situation and then performing data recovery, unnecessary data recovery operations are avoided, and the consumption of related hardware resources is reduced.

[0075] In an exemplary embodiment, after obtaining the second monitoring result of the power supply monitoring service on the RAID card, the method includes: when it is determined from the second monitoring result that the RAID card is in a state where power supply has been restored, the power supply monitoring service sends a first disconnection instruction to the power supply switching service, wherein the power supply switching service is deployed in the backup control device; the power supply switching service responds to the first disconnection instruction to disconnect the power supply circuit between the backup power supply module and the RAID card, so that the backup power supply module stops supplying power to the RAID card.

[0076] Optionally, in this embodiment, the content included in the second monitoring result has been described above and will not be repeated here.

[0077] Optionally, in this embodiment, the first disconnect instruction is an instruction for disconnecting the power supply circuit between the backup power supply module and the RAID card. The first disconnect instruction includes but is not limited to the number of the backup power supply module, the number of the RAID card, and an instruction code indicating disconnecting the power supply circuit between the backup power supply module and the RAID card.

[0078] Through the above steps, when it is determined that the RAID card has restored to a normal power supply state, the first disconnection instruction determines that an operation of disconnecting the power supply circuit between the backup power supply module and the RAID card needs to be executed, thereby achieving timely cutting off the power supply of the RAID card by the backup power supply module when the RAID card is in a normal power supply state, reducing the power consumption of the backup power supply module and increasing the number of times the backup power supply module is used.

[0079] In an exemplary embodiment, the N sub-data cached in the N backup cache units are transferred to the cache device to restore the target data in the cache device, including: transferring the N sub-data read from the first backup cache unit to the second data buffer via a third data transfer bus, wherein the first backup cache unit is any one of the N backup cache units; transferring the N sub-data in the second data buffer to the cache device via a fourth data transfer bus to restore the target data in the cache device.

[0080] Optionally, in this embodiment, the types of the third data transmission bus and the fourth data transmission bus are the same as the types of the first data transmission bus and the second data transmission bus, which have been described above and will not be repeated here.

[0081] Optionally, in this embodiment, the type of the data buffer has been described above and will not be repeated here.

[0082] The process of restoring target data in the cache device in this embodiment is as follows: Figure 5 As shown, when performing a data recovery operation, the QSPI bus first reads the first sub-data stored in the QSPI NAND Flash and transfers it to the FIFO module in the QSPI Controller. Then, the complete target data stored in the FIFO module in the QSPI Controller is transferred to the SRAM through the DMA bus, thereby realizing the recovery of the target data.

[0083] Through the above steps, when it is determined from the data status that the target data cached in the cache device is abnormal, the data is read from the backup cache unit and transferred to the second data buffer, and then transferred to the cache device, thereby realizing the recovery of the target data and ensuring the normal execution of related operations.

[0084] In an exemplary embodiment, each of the above-mentioned backup cache units includes multiple cache partitions, and the N above-mentioned sub-data read from the above-mentioned first backup cache unit are transmitted to the second data buffer through the third data transmission bus, including: reading the N above-mentioned sub-data from the first cache partition, wherein the N above-mentioned sub-data in the first cache partition are the sub-data transmitted by the first backup cache unit; and transmitting the N above-mentioned sub-data read from the above-mentioned first cache partition to the above-mentioned second data buffer through the third data transmission bus.

[0085] Optionally, in this embodiment, the type of the third data transmission bus has been described above and will not be repeated here.

[0086] Optionally, in this embodiment, the type of the data buffer has been described above and will not be repeated here.

[0087] Through the above steps, a complete copy of the target data is read from the cache partition in the cache unit and transferred to the second data buffer, which provides the necessary conditions for reading data from the backup cache unit and transferring it to the cache device when it is determined from the data status that an abnormality has occurred in the target data cached in the cache device.

[0088] In an exemplary embodiment, when it is determined from the data state that the target data cached in the cache device is abnormal, before reading the backed-up N sub-data from the first backup cache unit, the method further includes: when it is determined from the data state that the target data cached in the cache device is abnormal and the first backup cache unit is abnormal, detecting whether the N sub-data have been cached in the second backup cache unit, wherein the second backup cache unit is any backup cache unit in the N backup cache units that is in a normal state; when it is determined that the N sub-data have been cached in the second backup cache unit, reading the backed-up N sub-data from the second backup cache unit; and transferring the N sub-data cached in the second backup cache unit to the cache device to restore the target data in the cache device.

[0089] Optionally, in this embodiment, the abnormalities that occur in the target data cached in the cache device include, but are not limited to, data corruption, data loss, and other issues.

[0090] Optionally, in this embodiment, the abnormality of the backup cache unit may be: an error occurs in the backup cache unit during data erasing and writing, and the partition of the cached data is damaged; a verification error occurs when reading data in the backup cache unit, and the data cannot be read normally, etc.

[0091] Optionally, in this embodiment, the method for detecting whether N sub-data have been cached in the second backup cache unit may be: detecting the size of data stored in the second backup cache unit; if it is consistent with the size of the target data, N sub-data have been cached in the second backup cache unit, that is, a complete copy of the target data has been cached in the second backup cache unit.

[0092] Through the above steps, when it is determined from the data status that the target data cached in the cache device is abnormal and the first backup cache unit is also abnormal, other normal backup cache units are selected for data recovery, so that data recovery can be performed even in special circumstances, thereby protecting the integrity and availability of the data.

[0093] The following is a specific operation flow to illustrate the specific operation flow of caching the target sub-data into N backup cache units in this application. In this specific embodiment, the target data is stored in SRAM, the backup cache unit is two QSPI NAND Flash, and the backup power supply module is a super capacitor, such as Figure 6 As shown, it is a flowchart of the target data cache in this specific embodiment. Flash0 backs up the first part of the cache data, and Flash1 backs up the second part of the cache data. The data is backed up to two QSPI NAND Flashes. Both QSPI NAND Flashes have completed partitioning and are divided into ten partitions. The specific cache backup steps of the target data are as follows:

[0094] S601, assuming that the cache data size is x MB, the software divides the cache data into two parts, the first part of the data and the second part of the data, according to the cache address of the cache data, and the size of each part is x / 2 MB. It is backed up to QSPI NAND Flash0 and QSPI NAND Flash1 synchronously through DMA0 and DMA1. Assuming that the DMA transfers y KB of data each time (y is an even number), the number of transfers required to back up x / 2 MB of data is: (x / 2) * 1024 / y = 512x / y times.

[0095] After confirming that the RAID card is in a power-off state and the supercapacitor can supply power, initialize the variable SRAM_ADDR0 to the cache SRAM start address, SRAM_ADDR1 to the cache SRAM middle address, and i to 0 (variable i controls the number of backup times); configure DMA0 to back up y KB of data from the cache address SRAM_ADDR0 to the partition N of Flash0, and add y KB to the address offset of SRAM_ADDR0 to prepare for the next data backup; then configure DMA1 to back up y KB of data from the cache address SRAM_ADDR1 to the partition N of Flash1, and add y KB to the address offset of SRAM_ADDR1 to prepare for the next data backup, and add 1 to the backup times variable i; judge the backup times variable i, and after determining that 512x / y data backups are completed, the first stage of data backup is completed.

[0096] S602, when it is determined that the supercapacitor can supply power and has sufficient power, enter the second stage of data backup: Flash0 backs up the second part of the cache data, Flash1 backs up the first part of the cache data, and the data is backed up to partition N (0<= N <= 9, and N here is the same value as the N used in the first stage of data backup), reinitialize the variable SRAM_ADDR0 to the middle address of the cache SRAM, SRAM_ADDR1 to the starting address of the cache SRAM, and i is 0; configure DMA0 to back up y KB of data from the cache address SRAM_ADDR0 to partition N of Flash0, and the address offset of SRAM_ADDR0 is increased by y KB to prepare for the next data backup; configure DMA1 to back up y KB of data from the cache address SRAM_ADDR1 to partition N of Flash1, and the address offset of SRAM_ADDR1 is increased by y KB to prepare for the next data backup, the backup number variable i is incremented by 1, and the value of the backup number variable i is judged. When it is determined that 512x / y data backups are completed, the entire cache data backup process ends.

[0097] It should be noted that, through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0098] In this embodiment, a device for data recovery is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0099] Figure 7 is a structural block diagram of a data recovery device according to an embodiment of the present application, such as Figure 7 As shown, the device comprises:

[0100] A division module 72 is used to divide the target data into N sub-data when it is determined that the RAID card is powered off and the backup power supply module is in a state of supplying power to the RAID card, wherein the target data is data cached in a cache device, and the cache device is deployed in the RAID card;

[0101] A cache module 74, used for caching the N sub-data into the N backup cache units respectively;

[0102] The recovery module 76 is used to restore the N sub-data cached in the N backup cache units to the cache device when it is determined that the RAID card is powered on again and the target data cached in the cache device is abnormal.

[0103] In an exemplary embodiment, the division module 72 includes: a first acquisition unit, used to obtain the first monitoring result of the power supply monitoring service on the RAID card, wherein the power supply monitoring service is used to monitor the power supply condition of the RAID card, and the first monitoring result includes the first power supply state of the RAID card; a first control unit, used to control the backup power supply module to supply power to the RAID card when it is determined from the first monitoring result that the RAID card is in a power-off state.

[0104] In an exemplary embodiment, the backup control device further includes a power detection service, which is connected to the power monitoring service. When it is determined from the monitoring result that the RAID card is in the power-off state, the backup power supply module is controlled to supply power to the RAID card. The device further includes: a first recording unit, which is used to obtain the detection result of the power detection service when it is determined from the monitoring result that the RAID card is in the power-off state, and record the detection result in the power meter of the backup power supply module, wherein the power detection service is used to detect the power state of the backup power supply module, and the detection result includes the power information of the backup power supply module; a first sending unit, which is used to send a first switching instruction to the power switching service by the power monitoring service when it is determined from the detection result that the power of the backup power supply module is greater than a first preset power, wherein the power switching service is deployed in the backup control device; a first responding unit, which is used for the power switching service to respond to the first switching instruction, and conduct the power supply circuit between the backup power supply module and the RAID card, so that the backup power supply module supplies power to the RAID card through the power supply circuit.

[0105] In an exemplary embodiment, the above-mentioned partitioning module 72 includes: a second acquisition unit, used to obtain the starting physical address of the above-mentioned target data, and read the above-mentioned target data from the above-mentioned cache device according to the starting physical address of the above-mentioned target data; a first partitioning unit, used to divide the above-mentioned target data into N above-mentioned sub-data based on the number of the above-mentioned N backup cache units, and store the starting physical addresses of the N above-mentioned sub-data in the data address table in the above-mentioned cache device.

[0106] In an exemplary embodiment, the first cache module 74 includes: a first cache unit, which is used to cache the N sub-data in the N backup cache units respectively when it is determined that the power of the backup power supply module is less than the second preset power; a second cache unit, which is used to cache the N-1 sub-data in the N backup cache units respectively when it is determined that the power of the backup power supply module is restored to be greater than the second preset power, so that each of the backup cache units caches the complete target data, wherein the N-1 sub-data are other sub-data in the N sub-data except the sub-data that have been cached in the N backup cache units.

[0107] In an exemplary embodiment, each of the above-mentioned backup cache units includes multiple cache partitions. When it is determined that the power of the above-mentioned backup power supply module is less than the second preset power, the N above-mentioned sub-data are cached in the N above-mentioned backup cache units respectively. The above-mentioned device also includes: a third acquisition unit, used to respectively acquire the starting physical addresses of the N above-mentioned sub-data; a first transmission unit, used to transmit the N above-mentioned sub-data to the first data buffer according to the above-mentioned starting physical address and through the first data transmission bus; a second transmission unit, used to transmit the N above-mentioned sub-data cached in the above-mentioned first data buffer to the first cache partition in the N above-mentioned backup cache units through the second data transmission bus, wherein the above-mentioned first cache partition is any cache partition among the multiple above-mentioned cache partitions.

[0108] In an exemplary embodiment, the apparatus further includes: a third transmission unit, configured to transmit the N-1 sub-data cached in the first data buffer to the first cache partitions in the N backup cache units respectively through the second data transmission bus.

[0109] In an exemplary embodiment, the first recovery module 76 includes: a fourth acquisition unit, used to obtain the second monitoring result of the power supply monitoring service on the RAID card, wherein the second monitoring result includes the second power supply state of the RAID card; a first detection unit, used to detect the data state of the target data cached in the cache device when it is determined from the second monitoring result that the RAID card is in a state where power supply has been restored; a first reading unit, used to read the N backed-up sub-data from the N backup cache units when it is determined from the data state that the target data cached in the cache device is abnormal; and a fourth transmission unit, used to transmit the N sub-data cached in the N backup cache units to the cache device, so as to restore the target data in the cache device.

[0110] In an exemplary embodiment, the first recovery module 76 also includes: a second sending unit, used for, when it is determined from the second monitoring result that the RAID card is in a state where power supply has been restored, the power supply monitoring service sends a first disconnection instruction to the power supply switching service, wherein the power supply switching service is deployed in the backup control device; and a second response unit, used for the power supply switching service to respond to the first disconnection instruction to disconnect the power supply circuit between the backup power supply module and the RAID card, so that the backup power supply module stops supplying power to the RAID card.

[0111] In an exemplary embodiment, the first recovery module 76 also includes: a fifth transmission unit, used to transfer the N sub-data read from the above-mentioned first backup cache unit to the second data buffer through a third data transmission bus; a sixth transmission unit, used to transfer the N sub-data in the above-mentioned second data buffer to the above-mentioned cache device through a fourth data transmission bus, so as to restore the above-mentioned target data in the above-mentioned cache device.

[0112] In an exemplary embodiment, the first recovery module 76 also includes: a first reading unit, used to read the N sub-data from the above-mentioned first cache partition; a seventh transmission unit, used to transmit the N sub-data read from the above-mentioned first cache partition to the above-mentioned second data buffer through a third data transmission bus.

[0113] In an exemplary embodiment, the first recovery module 76 also includes: a second detection unit, which is used to detect whether N of the above-mentioned sub-data have been cached in the above-mentioned second backup cache unit when it is determined from the above-mentioned data state that the above-mentioned target data cached in the above-mentioned cache device is abnormal and the above-mentioned first backup cache unit is abnormal, wherein the above-mentioned second backup cache unit is any backup cache unit in the N above-mentioned backup cache units that is in a normal state; a second reading unit, which is used to read the backed-up N above-mentioned sub-data from the second backup cache unit when it is determined that N of the above-mentioned sub-data have been cached in the above-mentioned second backup cache unit; an eighth transmission unit, which is used to transmit the N above-mentioned sub-data cached in the above-mentioned second backup cache unit to the above-mentioned cache device, so as to restore the above-mentioned target data in the above-mentioned cache device.

[0114] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0115] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0116] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0117] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0118] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0119] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0120] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0121] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.

[0122] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0123] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0124] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for data recovery, characterized in that: Applied to a backup control device, the backup control device is connected to a RAID card, the RAID card is connected to a backup power supply module, and the RAID card includes N backup cache units, the backup power supply module is a module for supplying power to the RAID card, and N is a positive integer greater than 1. The method includes: When it is determined that the RAID card is powered off and the backup power supply module is in a state of supplying power to the RAID card, dividing the target data into N sub-data, wherein the target data is data cached in a cache device, and the cache device is deployed in the RAID card; Cache the N sub-data into the N backup cache units respectively; When it is determined that the RAID card is powered on again and an abnormality occurs to the target data cached in the cache device, the N sub-data cached in the N backup cache units are restored to the cache device.

2. The method according to claim 1, characterized in that: The backup control device also includes a power supply monitoring service. When it is determined that the RAID card is powered off and the backup power supply module is in a state of supplying power to the RAID card, before dividing the target data into N sub-data, the method includes: Obtaining a first monitoring result of the power supply monitoring service on the RAID card, wherein the power supply monitoring service is used to monitor the power supply status of the RAID card, and the first monitoring result includes a first power supply status of the RAID card; When it is determined from the first monitoring result that the RAID card is in a power-off state, the backup power supply module is controlled to supply power to the RAID card.

3. The method according to claim 2, characterized in that The backup control device also includes a power detection service, which is connected to the power monitoring service. When it is determined from the monitoring result that the RAID card is in a power-off state, the backup power supply module is controlled to supply power to the RAID card, including: In the case where it is determined from the monitoring result that the RAID card is in the power-off state, obtaining the detection result of the power detection service, and recording the detection result in the power meter of the backup power supply module, wherein the power detection service is used to detect the power state of the backup power supply module, and the detection result includes the power information of the backup power supply module; In the case where it is determined from the detection result that the power of the backup power supply module is greater than a first preset power, the power supply monitoring service sends a first switching instruction to the power supply switching service, wherein the power supply switching service is deployed in the backup control device; The power supply switching service responds to the first switching instruction and switches on the power supply circuit between the backup power supply module and the RAID card, so that the backup power supply module supplies power to the RAID card through the power supply circuit.

4. The method according to claim 1, characterized in that: When it is determined that the RAID card is powered off and the backup power supply module is in a state of supplying power to the RAID card, the target data is divided into N sub-data, including: Acquire a starting physical address of the target data, and read the target data from the cache device according to the starting physical address of the target data; The target data is divided into N sub-data based on the number of the N backup cache units, and the starting physical addresses of the N sub-data are stored in a data address table in the cache device.

5. The method according to claim 1, characterized in that The N sub-data are cached in the N backup cache units respectively, including: When it is determined that the power of the backup power supply module is less than a second preset power, the N sub-data are cached in the N backup cache units respectively; When it is determined that the power of the backup power supply module has recovered to a level greater than or equal to the second preset power, the N-1 sub-data are cached in the N backup cache units respectively, so that each backup cache unit has cached the complete target data, wherein the N-1 sub-data are the other sub-data among the N sub-data except the sub-data that have been cached in the N backup cache units.

6. The method according to claim 5, characterized in that Each of the backup cache units includes a plurality of cache partitions. When it is determined that the power of the backup power supply module is less than a second preset power, the N sub-data are cached in the N backup cache units respectively, including: respectively obtaining the starting physical addresses of the N sub-data; According to the starting physical address, respectively transmitting the N sub-data to the first data buffer through the first data transmission bus; The N sub-data cached in the first data buffer are respectively transmitted to the first cache partitions in the N backup cache units through the second data transmission bus, wherein the first cache partition is any cache partition among the multiple cache partitions.

7. The method according to claim 5, characterized in that When it is determined that the power of the backup power supply module is restored to be greater than the second preset power, the N-1 sub-data are cached in the N backup cache units respectively, so that each backup cache unit caches the complete target data, including: The N-1 sub-data cached in the first data buffer are respectively transmitted to the first cache partitions in the N backup cache units through the second data transmission bus.

8. The method according to claim 1, characterized in that The backup control device also includes a power supply monitoring service, which, when it is determined that the RAID card has restored power and the target data cached in the cache device is abnormal, restores the N sub-data cached in the N backup cache units to the cache device, including: Obtaining a second monitoring result of the power supply monitoring service on the RAID card, wherein the second monitoring result includes a second power supply state of the RAID card; When it is determined from the second monitoring result that the RAID card is in a state where power is restored, detecting a data state of the target data cached in the cache device; When it is determined from the data state that the target data cached in the cache device is abnormal, reading the backed-up N sub-data from the N backup cache units; The N sub-data cached in the N backup cache units are transferred to the cache device, so as to restore the target data in the cache device.

9. The method according to claim 8, characterized in that After obtaining the second monitoring result of the power supply monitoring service on the RAID card, the method includes: When it is determined from the second monitoring result that the RAID card is in a state where power supply has been restored, the power supply monitoring service sends a first disconnection instruction to the power supply switching service, wherein the power supply switching service is deployed in the backup control device; The power switching service responds to the first disconnection instruction to disconnect the power supply circuit between the backup power supply module and the RAID card, so that the backup power supply module stops supplying power to the RAID card.

10. The method according to claim 8, characterized in that The method further comprises: transferring the N sub-data cached in the N backup cache units to the cache device to restore the target data in the cache device, comprising: Transmitting the N sub-data read from the first backup cache unit to the second data buffer through a third data transmission bus, wherein the first backup cache unit is any backup cache unit among the N backup cache units; The N sub-data in the second data buffer are transmitted to the cache device via a fourth data transmission bus, so as to restore the target data in the cache device.

11. The method according to claim 10, characterized in that Each of the backup cache units includes a plurality of cache partitions, and the N sub-data read from the first backup cache unit are transmitted to the second data buffer through the third data transmission bus, including: Reading N sub-data from the first cache partition, wherein the N sub-data in the first cache partition are sub-data transmitted by the first backup cache unit; The N sub-data read from the first cache partition are transmitted to the second data buffer via a third data transmission bus.

12. The method according to claim 10, characterized in that In the case where it is determined from the data state that the target data cached in the cache device is abnormal, before reading the backed-up N sub-data from the first backup cache unit, the method further includes: When it is determined from the data state that the target data cached in the cache device is abnormal and the first backup cache unit is abnormal, detecting whether N sub-data have been cached in the second backup cache unit, wherein the second backup cache unit is any backup cache unit in a normal state among the N backup cache units; When it is determined that the second backup cache unit has cached the N sub-data, reading the backed-up N sub-data from the second backup cache unit; The N sub-data cached in the second backup cache unit are transferred to the cache device to restore the target data in the cache device.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 12 when executed by a processor.

14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 12 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Method of permanent protection of cache data of serial attached scsi (SAS) redundant array of independent disks (RAID) card

    CN103093157A

  • RAID design method based on SSD caching acceleration and backup

    CN103150427A