Cache data recovery method and electronic equipment

By establishing a communication connection between the cache manager and multiple backup nodes, reliable backup and rapid recovery of cache data are achieved, solving the problem of data loss caused by power outages or hardware failures and improving the stability and security of the system.

CN120653492AActive Publication Date: 2025-09-16INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511135879.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-14
Publication Date
2025-09-16
Estimated Expiration
2045-08-14

AI Technical Summary

Technical Problem

In the prior art, power failure or hardware failure of the cache manager causes cache data to be lost, affecting normal system operation, and the stability of external capacitor devices is poor.

Method used

A communication connection is established between the cache manager and multiple backup nodes. In response to abnormal events, the data to be backed up is broadcast to the backup node storage, and the data is restored from the backup node in the event of a recovery event. A multi-node backup mechanism and remote direct memory access connection are used for data recovery.

Benefits of technology

It achieves reliable backup and rapid recovery of cached data, reduces the risk of data loss, improves stability and security, avoids the instability of external capacitors, and ensures system continuity and availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653492A_ABST
    Figure CN120653492A_ABST
Patent Text Reader

Abstract

The invention provides a cache data recovery method and electronic equipment, which can be applied to the technical field of data storage and data calculation. The method comprises the following steps: establishing communication connection between a server where a cache manager is located and a plurality of backup nodes; in response to the detected abnormal event of the cache manager, determining to-be-backed-up data in a cache of the cache manager; broadcasting the to-be-backed-up data to a plurality of backup nodes through the communication connection, and storing the to-be-backed-up data as backup data in the plurality of backup nodes; and in response to the detected recovery event of the cache manager, receiving backup data from the plurality of backup nodes through the communication connection, and recovering the backup data to the cache of the cache manager.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data storage and data computing, and in particular to a cache data recovery method and electronic device. Background Art

[0002] In computer systems, cache is a key component that improves data access speed. It serves as a data access medium between memory and processors, improving data access efficiency and being crucial to system performance. During use, the cache manager can experience power outages and other anomalies, resulting in cached data loss or corruption, impacting normal system operation. In related technologies, power-off protection for the cache manager is typically implemented by providing an external power supply, such as a capacitor.

[0003] During the implementation of this application, it was found that the relevant technology has at least the following problems: since high temperature, vibration and other environments may cause the electrolyte of the capacitor device to leak and the device to explode, there are risks in using external capacitor devices as power supplies and the stability is poor. Summary of the Invention

[0004] In view of the above problems, the present application provides a cache data recovery method and an electronic device.

[0005] According to a first aspect of the present application, a cache data recovery method is provided, comprising: establishing a communication connection between a server where a cache manager is located and a plurality of backup nodes; in response to detecting an abnormal event of the cache manager, determining the data to be backed up in the cache of the cache manager; broadcasting the data to be backed up to the plurality of backup nodes via the communication connection to be stored as backup data in the plurality of backup nodes; and in response to detecting a recovery event of the cache manager, receiving the backup data from the plurality of backup nodes via the communication connection and restoring the backup data to the cache of the cache manager.

[0006] The second aspect of the present application provides a cache data recovery device, including: a connection establishment module for establishing a communication connection between a server where a cache manager is located and multiple backup nodes; a data determination module for determining the data to be backed up in the cache of the cache manager in response to detecting an abnormal event of the cache manager; a data storage module for broadcasting the data to be backed up to the multiple backup nodes through a communication connection to be stored as backup data in the multiple backup nodes; and a data recovery module for receiving the backup data from the multiple backup nodes through a communication connection in response to detecting a recovery event of the cache manager, and restoring the backup data to the cache of the cache manager.

[0007] The third aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0008] The fourth aspect of the present application further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.

[0009] The fifth aspect of the present application further provides a computer program product, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The above contents and other objects, features and advantages of the present application will become more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings, in which:

[0011] Figure 1 A diagram showing an application scenario of a cache data recovery method and an electronic device according to an embodiment of the present application is shown;

[0012] Figure 2 A flowchart of a cache data recovery method according to an embodiment of the present application is shown;

[0013] Figure 3 The communication topology constructed according to the cache data recovery method of the embodiment of the present application is shown;

[0014] Figure 4 A flow chart showing a connection topology establishment method according to an embodiment of the present application for recovering cached data is shown;

[0015] Figure 5 A flowchart of a cache data recovery method according to an embodiment of the present application is shown;

[0016] Figure 6 A structural block diagram of a cache data recovery device according to an embodiment of the present application is shown;

[0017] Figure 7 A block diagram of an electronic device suitable for implementing a cache data recovery method according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0018] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present application. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.

[0019] The terms used herein are only for describing specific embodiments and are not intended to limit this application. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0020] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0021] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0022] An embodiment of the present application provides a cache data recovery method, including: establishing a communication connection between a server where a cache manager is located and multiple backup nodes; in response to detecting an abnormal event of the cache manager, determining the data to be backed up in the cache of the cache manager; broadcasting the data to be backed up to the multiple backup nodes through the communication connection to be stored as backup data in the multiple backup nodes; and in response to detecting a recovery event of the cache manager, receiving the backup data from the multiple backup nodes through the communication connection and restoring it to the cache of the cache manager.

[0023] Figure 1 A diagram showing an application scenario of a cache data recovery method and an electronic device according to an embodiment of the present application is shown.

[0024] like Figure 1As shown, the application scenario 100 according to this embodiment may include a first processor 101, a second processor 102, a cache manager 103, a first memory 104, a second memory 105, and a third memory 106. The above components may be provided within the same server. Although two processors and three memories are shown here, the present application is not limited thereto and may include more or fewer processors and / or memories. In addition, the application scenario 100 may also include other components.

[0025] The first processor 101 and the second processor 102 can be any processor capable of data processing. In this example, the first processor 101 is a central processing unit (CPU) and the second processor 102 is a graphics processing unit (GPU). The first memory 104, the second memory 105, and the third memory 106 can include various non-volatile memories, such as hard disks and flash memory. The first memory 104, the second memory 105, and the third memory 106 can be deployed as a redundant array of independent disks (RAID). RAID combines multiple independent physical hard disks to form a logical storage unit.

[0026] During server operation, there is a need to use the first processor 101 and the second processor 102 to process data stored in the first memory 104, the second memory 105, and the third memory 106. Due to the difference between the processing speed of the first processor 101 and the second processor 102 and the access speed of the first memory 104, the second memory 105, and the third memory 106, the overall efficiency of the server is reduced.

[0027] Therefore, the cache manager 103 can be used as a data access medium between the first processor 101, the second processor 102 and the first memory 104, the second memory 105, and the third memory 106. The cache manager 103 pre-fetches data from the first memory 104, the second memory 105, and the third memory 106 so as to provide it to the first processor 101, the second processor 102 for processing in a timely manner. The cache manager 103 also organizes the data processed by the first processor 101, the second processor 102 according to a certain strategy so as to more efficiently transmit it to the first memory 104, the second memory 105, and the third memory 106 for storage. For example, the cache manager 103 may include a RAID card, which may include components such as a RAID controller chip, a cache, and an interface controller to manage the coordinated operation of multiple disks in the RAID.

[0028] The following will be based on Figure 1 The scene described by Figures 2 to 5 The cache data recovery method of the application embodiment is described in detail.

[0029] Figure 2 A flow chart of a cache data recovery method according to an embodiment of the present application is shown.

[0030] like Figure 2 As shown, the cache data recovery method of this embodiment includes operations S210 to S240.

[0031] In operation S210, a communication connection is established between a server where a cache manager is located and a plurality of backup nodes.

[0032] In operation S220 , in response to detecting an abnormal event of the cache manager, data to be backed up in the cache of the cache manager is determined.

[0033] In operation S230 , the data to be backed up is broadcasted to the plurality of backup nodes through a communication connection, so as to be stored in the plurality of backup nodes as backup data.

[0034] In operation S240 , in response to detecting a restore event of the cache manager, backup data is received from a plurality of backup nodes through communication connections and restored to the cache of the cache manager.

[0035] According to embodiments of the present application, a cache manager can serve as a data access medium between the memory and processor of the server in which it resides. For example, the cache manager can pre-fetch data from the server's memory and pass the data to the processor. After the processor completes the calculation, the calculation result is passed to the cache manager, which then passes the result to the memory for storage. For example, the cache manager can be a RAID card, which includes a cache.

[0036] According to an embodiment of the present application, the backup node may be another server other than the server where the cache manager is located. A communication connection is established between the server where the cache manager is located and the other servers, so that the server where the cache manager is located and the other servers can transfer data.

[0037] According to an embodiment of the present application, abnormal events of the cache manager may include power failure of the cache manager, hardware failure of the cache manager, etc., wherein the power failure of the cache manager can be determined by monitoring the power supply voltage of the cache manager, and the hardware failure of the cache manager can be determined by parsing the log file of the cache manager.

[0038] For example, the power supply voltage of the cache manager is monitored. If the power supply voltage of the cache manager is determined to be lower than a voltage threshold, an abnormal event of the cache manager is triggered. The voltage threshold can be set between the voltage at which the cache manager operates normally and the voltage at which the cache manager fails to operate, thereby ensuring that data in the cache manager is backed up before the cache manager fails to operate.

[0039] For another example, the log file of the cache manager may be parsed, and when it is determined that a hardware failure of the cache manager occurs, especially an unrecoverable failure, an abnormal event of the cache manager is triggered.

[0040] According to embodiments of the present application, rather than simply backing up all cached data in the cache manager to a backup node, a portion of the cached data ("to-be-backed-up data") is backed up. The to-be-backed-up data may refer to data temporarily stored in the cache manager that has been calculated by the processor but has not yet been stored in memory.

[0041] According to an embodiment of the present application, after the data to be backed up is determined, the data to be backed up is broadcast to multiple backup nodes through a communication connection to ensure that the data to be backed up has been sent to multiple backup nodes and stored as backup data in multiple backup nodes.

[0042] According to an embodiment of the present application, a recovery event may correspond to an abnormal event, including the cache manager restoring power, the cache manager hardware returning to normal, etc.

[0043] For example, when the abnormal event is triggered in response to power failure of the cache manager, after monitoring the power supply voltage of the cache manager and finding that the power supply voltage of the cache manager reaches the voltage for normal operation of the cache manager, a recovery event of the cache manager is triggered.

[0044] For another example, in the case where the abnormal event is triggered in response to a hardware failure of the cache manager, after the hardware failure of the cache manager is repaired, the log file of the cache manager is parsed, and after it is determined that the cache manager has resumed normal operation, a recovery event of the cache manager is triggered.

[0045] According to an embodiment of the present application, in response to detecting a cache manager recovery event, a data recovery request is sent to multiple backup nodes via a communication connection. After receiving the data retrieval request, the backup node sends the backup data via the communication connection. The server where the cache manager resides receives the backup data from the multiple backup nodes and restores the backup data to the cache manager's cache, allowing the cache manager to complete subsequent operations such as flushing the data to disk.

[0046] According to an embodiment of the present application, by pre-establishing a communication connection between a server and multiple backup nodes, the data to be backed up is distributed to the backup nodes in parallel via broadcast when the cache manager is abnormal, and the data is retrieved from the backup nodes during recovery, thereby achieving reliable backup and rapid recovery of cached data. The multi-node backup mechanism improves data redundancy, reduces the risk of data loss, ensures that the cache manager can quickly resume normal operation after an abnormality, and guarantees the continuity and availability of system data. In addition, establishing the above-mentioned communication connection and using the above-mentioned communication connection for data transmission and reception can also achieve cached data backup and restoration without using capacitors as external power sources, avoiding the instability and danger of capacitors, and improving the stability, security, and reliability of cached data restoration.

[0047] According to an embodiment of the present application, the backup node can be determined in the following manner: discovering multiple alternative nodes that can communicate with the server; and based on the respective performance parameters of the multiple alternative nodes, determining a preset number of alternative nodes from the multiple alternative nodes as multiple backup nodes, and using the other alternative nodes as backup nodes.

[0048] According to an embodiment of the present application, the server where the cache manager is located may be in a local area network or the Internet, and other servers in the local area network or the Internet that can communicate with the server may be determined as candidate nodes.

[0049] According to an embodiment of the present application, the performance of each of the multiple candidate nodes is analyzed, and the performance parameters of each of the multiple candidate nodes are determined by weighted summing attribute information such as node network quality, node storage space availability, and node historical transmission reliability.

[0050] For a certain alternative node, the node network quality of the node can be determined based on information such as the delay and packet loss rate in communication between the alternative node and the above-mentioned server. The node storage space availability of the node can be determined based on the ratio of the available capacity of the node's hard disk to the total capacity of the hard disk. The node historical transmission reliability of the node can be determined based on the ratio of the number of successful transmissions in the node's historical transmission behavior to the total number of transmissions.

[0051] According to an embodiment of the present application, after obtaining the performance parameters of multiple candidate nodes, a preset number (e.g., five or more) of the candidate nodes with the best performance parameters can be selected as backup nodes, and the remaining candidate nodes can be used as standby nodes. Standby nodes may not be used for data backup or recovery, but rather to replace failed backup nodes in the event of a backup node failure.

[0052] According to the embodiments of the present application, a preset number of backup nodes is determined based on the performance parameters of candidate nodes, enabling the selection of nodes with better performance as backup nodes, thereby improving the efficiency of the backup and recovery process. Furthermore, the provision of backup nodes provides a replacement guarantee in the event of a backup node failure, enhancing the stability and fault tolerance of the backup system and ensuring the continued effectiveness of the backup mechanism.

[0053] If backup and standby nodes are fixed and only replaced when a backup node fails, there is a possibility that the backup node may not fail but may have degraded performance, resulting in poor cache data backup and recovery performance using the backup node. Therefore, backup and standby nodes can be rediscovered and confirmed periodically.

[0054] For example, a detection signal may be broadcasted at a first preset time period, and multiple backup nodes and standby nodes may be re-determined based on responses received to the detection signal. This may be done under normal conditions, i.e., during normal operation of the cache manager.

[0055] According to an embodiment of the present application, a server may periodically scan the network and broadcast a detection signal each time a first preset time period is reached. Upon receiving the detection signal, surrounding available nodes may respond to the detection signal and send their respective attribute information used to calculate performance parameters to the server. For example, attribute information may include hardware configuration information such as storage type, free capacity, and network bandwidth. The server may maintain a dynamic node registry, recording information such as the IP addresses, capacity, and status of available nodes.

[0056] According to an embodiment of the present application, the server discovers multiple candidate nodes capable of communicating with the server based on responses to received probe signals, calculates the latest performance parameters of the multiple candidate nodes, and reorders the multiple candidate nodes based on the latest performance parameters, so as to determine a preset number of candidate nodes from the multiple candidate nodes as multiple backup nodes and use the remaining candidate nodes as standby nodes. If the number of candidate nodes is less than the preset number, all candidate nodes may be used as backup nodes.

[0057] According to the embodiments of the present application, by broadcasting a detection signal and re-determining backup and standby nodes according to a first preset time period, node status changes can be promptly detected and the backup node pool dynamically updated. This mechanism ensures that backup nodes are always currently available and have suitable performance, preventing backup failures due to node failures or performance degradation, and improving the adaptability and reliability of the backup system.

[0058] According to an embodiment of the present application, the cache data recovery method may further include: detecting whether there is a faulty backup node by sending heartbeat signals to multiple backup nodes at a second preset time period and detecting responses to the heartbeat signals, where when the number of times the target backup node fails to correctly respond to the heartbeat signal reaches a preset failure number, it is determined that the target backup node has failed; in response to determining that the target backup node has failed, determining at least one standby node as a replacement node based on the respective performance parameters of the standby nodes to replace the target backup node. This can be carried out under the normal state of the cache manager, that is, when it is operating normally.

[0059] According to an embodiment of the present application, at each time when the second preset time period is reached, heartbeat signals are sent to multiple backup nodes, and responses of the multiple backup nodes to the heartbeat signals are obtained respectively. The responses of each backup node to the heartbeat signal are analyzed and counted to determine the situation where each backup node fails to correctly respond to the heartbeat signal and the number of consecutive times of failing to correctly respond to the heartbeat signal. In the case where it is determined that there is a target backup node whose number of times of failing to correctly respond to the heartbeat signal reaches the preset failure number, it is determined that the target backup node has failed. For example, the preset failure number can be taken as 3, that is, in the case where there is a backup node that fails to correctly respond to the heartbeat signal three times consecutively, this backup node is determined as the target backup node.

[0060] According to an embodiment of the present application, based on the respective performance parameters of the standby nodes, the standby node with the optimal performance is selected from the backup nodes as the replacement node, and the replacement node is used to replace the above-mentioned target backup node.

[0061] According to an embodiment of the present application, by periodically sending heartbeat signals to detect backup node failures and determining replacement nodes based on the performance parameters of standby nodes, pre-connected connections are directly reused in case of abnormal events, saving handshake time, and realizing real-time monitoring and rapid replacement of backup nodes. Faulty nodes are discovered and replaced in a timely manner to ensure that the number of backup nodes remains at a preset level, avoid incomplete data backups caused by node failures, and guarantee the security and recoverability of backup data.

[0062] Figure 3 The communication topology constructed by the cache data recovery method according to an embodiment of the present application is shown.

[0063] As Figure 3 shown, taking the preset number as 5 for example, the communication topology includes a server 301, a first backup node 302, a second backup node 303, a third backup node 304, a fourth backup node 305, a fifth backup node 306, a first standby node 307, a k-th standby node 308, and an n-th standby node 309, where n and k are positive integers and k < n. In Figure 3In the figure, the backup nodes between the first backup node 307 and the kth backup node 308, and the backup nodes between the kth backup node 308 and the nth backup node 309 are not shown.

[0064] There are n+5 candidate nodes capable of communicating with server 301. The performance parameters of each of these n+5 candidate nodes are calculated, and the five with the best performance are selected as backup nodes. This results in first backup node 302, second backup node 303, third backup node 304, fourth backup node 305, and fifth backup node 306. The remaining candidate nodes are used as standby nodes. This one-to-many topology between server 301 and first backup node 302, second backup node 303, third backup node 304, fourth backup node 305, and fifth backup node 306 is called a broadcast tree.

[0065] According to the first preset time period, the server 301 broadcasts a detection signal to the network and receives responses to the detection signal from available nodes in the network. Based on the responses, the server 301 rediscovers the alternative nodes, recalculates the performance parameters of each alternative node, obtains the latest performance parameters, and reselects the five alternative nodes with the best performance as backup nodes based on the latest performance parameters.

[0066] For example, when it is determined that there is no new alternative node based on the response of the available nodes in the network to the detection signal, the five alternative nodes with the best performance are determined to be the first backup node 302, the third backup node 304, the fourth backup node 305, the fifth backup node 306 and the first backup node 307 according to the latest performance parameters. Then the above five alternative nodes are used as backup nodes, and the second backup node 303 is replaced by the first backup node 307.

[0067] For example, when it is determined that there is a new alternative node based on the response of available nodes in the network to the detection signal, the performance parameters of the new alternative node can be calculated. If the performance parameters indicate that the new alternative node is one of the five alternative nodes with the best performance among all alternative nodes, the new alternative node can be used as a backup node.

[0068] Server 301 broadcasts a heartbeat signal to all backup nodes within a second preset time period and receives responses from each backup node to the heartbeat signal to determine whether a backup node has failed. For example, if the preset number of failures is 3 and third backup node 304 has failed to correctly respond to heartbeat signals three times in a row, it is determined that third backup node 304 has failed. The second preset time period may be shorter than the first preset time period.

[0069] If a target backup node fails, a replacement node is determined based on the performance parameters of the backup nodes, and the replacement node is used to replace the target backup node. In this example, after the failure of third backup node 304, the performance parameters of the backup nodes determine that kth backup node 308 is the best performing backup node among first backup node 307 to nth backup node 309. Therefore, kth backup node 308 is selected as the replacement node and replaces third backup node 304.

[0070] In another example, if there is more than one failed backup node, replacement nodes equal in number to the failed backup nodes are determined from the spare nodes, and the failed backup nodes are replaced respectively with the replacement nodes.

[0071] According to an embodiment of the present application, the cache data recovery method may further include: when the cache manager is in normal operation, that is, when the cache manager is operating normally, sending the configuration parameters of the cache manager to multiple backup nodes through a communication connection.

[0072] According to an embodiment of the present application, unlike the data cached in the cache manager, the configuration parameters of the cache manager are relatively fixed. Therefore, after the backup node is determined in the above manner, the configuration parameters of the cache manager can be sent to multiple backup nodes through a communication connection.

[0073] According to an embodiment of the present application, after the backup node changes, that is, the backup node is replaced by a substitute node, or a new backup node is determined based on the latest performance parameters, the configuration parameters of the cache manager can be sent to the new backup node through a communication connection.

[0074] According to an embodiment of the present application, after the selection and determination of the backup node is completed, the configuration parameters of the cache manager are sent to the backup node in advance, so that after an abnormal event is triggered, there is no need to send the configuration parameters, and only the data to be backed up needs to be sent to complete the backup, thereby reducing the amount of data that needs to be sent after the abnormal event is triggered.

[0075] According to an embodiment of the present application, the communication connection includes a Remote Direct Memory Access (RDMA) connection. The RDMA connection means that multiple nodes participating in the connection can directly access their respective memories.

[0076] According to an embodiment of the present application, by establishing a remote direct memory access connection, a one-to-many communication topology can be constructed between the server where the cache manager is located and multiple backup nodes, so as to utilize the communication topology to complete subsequent data backup and data recovery processes.

[0077] According to the embodiments of this application, remote direct memory access (RDMA) connections are used as communication links, allowing participating servers to directly access their respective memories, reducing intervention and data copying during data transmission. This significantly improves data backup and recovery speeds, shortens data synchronization and recovery time, and improves the efficiency of cached data recovery.

[0078] Figure 4 A flow chart of establishing a connection topology according to a cache data recovery method according to an embodiment of the present application is shown.

[0079] like Figure 4 The process includes operations S401 to S412.

[0080] In operation S401, a server broadcasts a detection signal, and based on received responses to the detection signal, a plurality of candidate nodes capable of communicating with the server are determined.

[0081] In operation S402 , performance parameters of each of the multiple candidate nodes are determined based on the attribute information of each of the multiple candidate nodes.

[0082] In operation S403 , a plurality of backup nodes and standby nodes other than the backup nodes are selected from the plurality of candidate nodes according to respective performance parameters of the plurality of candidate nodes.

[0083] In operation S404, a remote direct memory access connection is established between the backup node and the server.

[0084] In operation S405 , the configuration parameters of the cache manager are sent to the backup node.

[0085] In operation S406, it is determined whether the second preset time period is satisfied. If the second preset time period is satisfied, operation S407 is executed; if the second preset time period is not satisfied, the process returns to operation S406.

[0086] In operation S407, a heartbeat signal is sent to the backup node.

[0087] In operation S408, based on the responses of the multiple backup nodes to the heartbeat signal, it is determined whether there is a backup node that fails to correctly respond to the heartbeat signal. If so, operation S409 is executed; if not, the process returns to operation S406.

[0088] In operation S409 , the incorrect response count of the backup node that fails to correctly respond to the heartbeat signal is increased by 1.

[0089] In operation S410, it is determined whether there is a backup node whose incorrect response count reaches a preset number of failures. If so, operation S411 is executed; if not, the process returns to operation S406.

[0090] In operation S411 , it is determined that a backup node whose incorrect response count reaches a preset failure number has failed.

[0091] In operation S412, a replacement node is selected based on the performance parameters of each backup node to replace the failed backup node, and the process returns to operation S404.

[0092] According to an embodiment of the present application, the cache data recovery method further includes: scanning the data in the cache during normal operation of the cache manager, and marking the data as one of the following states: modified but not yet stored in a non-volatile storage medium, stored in a non-volatile storage medium and discardable, and unmodified. The data to be backed up only includes cached data in the cache that has been modified but not yet stored in a non-volatile storage medium.

[0093] According to an embodiment of the present application, the server's memory includes a non-volatile storage medium. When a cache manager is used as a data access medium between the memory and the processor, the data flow path includes: pre-fetching from the memory into the cache, a cache hit by the processor, reading from the processor and storing in the cache, and then sending from the cache to the memory. The flow path of the data stored in the cache can be analyzed, and the data can be marked with a corresponding state based on the state of the most recent step in the current flow path of the data.

[0094] For example, if the state of the most recent step in the current flow path is prefetching from the memory to the cache, or the processor hitting from the cache, the data is marked as unmodified. If the state of the most recent step in the current flow path is reading from the processor and storing in the cache, the data is marked as modified but not yet stored in the non-volatile storage medium. If the state of the most recent step in the current flow path is sending from the cache to the memory, the data is marked as having been stored in the non-volatile storage medium and can be discarded.

[0095] Among the above three types of data, for the unmodified data, this type of data has not been processed or modified by the processor. Therefore, if the cache manager triggers an exception event at this time, the data can be re-prefetched from the memory after the exception event is repaired. Therefore, there is no need to rely on the above cache data recovery to ensure data correctness and integrity.

[0096] For data that has been stored in non-volatile storage media and can be discarded, this type of data has been processed by the processor and stored in the memory. Therefore, during the cache data backup process, even if this type of data is not backed up, it will not affect the data correctness and integrity.

[0097] For data that has been modified but not yet stored in the non-volatile storage medium, this type of data has been processed or modified by the processor but has not yet been stored in the non-volatile storage medium. If an abnormal event occurs at this time, this data will be lost. Therefore, this type of data can be treated as backup data and backed up in a timely manner. After the abnormal event is repaired and a recovery event is triggered, this data can be restored to the cache and sent to the storage for storage.

[0098] According to the embodiments of the present application, cached data is marked as such, and the data to be backed up only includes cached data that has been modified but not yet stored on non-volatile storage media, reducing the amount of data that needs to be backed up. This targeted backing up of critical data reduces resource consumption for data transmission and storage, while also avoiding repeated backups of already stably stored data, thereby improving backup efficiency.

[0099] According to an embodiment of the present application, after executing a recovery event, the unmodified data lost in the cache can be rebuilt by rereading the unmodified data from the memory, and the discarded data stored in the non-volatile storage medium can be read from the memory to rebuild the discarded data lost in the cache. The data stored in the non-volatile storage medium and discarded can be rebuilt only when the data stored in the non-volatile storage medium and discarded is hot data, that is, when it is frequently used. Otherwise, the reconstruction process can be omitted to reduce the number of cache accesses.

[0100] According to another embodiment of the present application, after completing the backup of data that has been modified but not yet stored in the non-volatile storage medium, if the cache manager has not been disconnected or damaged, the unmodified data and the discarded data that has been stored in the non-volatile storage medium can be backed up using the same backup method. When executing a recovery event, the data that has been modified but not yet stored in the non-volatile storage medium can be restored first, and then the recovery of the remaining data blocks can be performed asynchronously in the background.

[0101] For example, after all data that has been modified but not yet stored in the non-volatile storage medium has been verified with a checksum and confirmed to be complete and correct, the data is stored in the cache manager's cache at one time, completing the backup of the data that has been modified but not yet stored in the non-volatile storage medium. At this point, the cache manager can be controlled to perform subsequent operations normally, and the recovery of unmodified data and discarded data that has been stored in the non-volatile storage medium can be handed over to the background asynchronous execution, thereby reducing the number of memory accesses and improving the overall efficiency of the system. In addition, by using the background asynchronous method to recover data blocks other than those that have been modified but not yet stored in the non-volatile storage medium, the impact on the normal operation of the cache manager can be reduced.

[0102] According to an embodiment of the present application, broadcasting the data to be backed up to multiple backup nodes via a communication connection for storage as backup data in the multiple backup nodes includes: dividing the data to be backed up into blocks according to a preset block size (e.g., 256KB / block), obtaining backup blocks and verification codes corresponding to the backup blocks; and broadcasting the backup blocks and the corresponding verification codes to the multiple backup nodes. Each backup block may have its own identity document (ID).

[0103] According to an embodiment of the present application, the check code corresponding to the backup block can be used to verify the data integrity of the backup block and ensure that the data has not been tampered with during the backup process. For example, it can be obtained by calculating the hash value of the backup block.

[0104] According to an embodiment of the present application, the backup blocks, the corresponding check codes, and the corresponding IDs are used as a group of data (for example, packaged into a data packet), and are broadcasted to multiple backup nodes respectively.

[0105] According to the embodiments of the present application, the backup data is segmented and a checksum is generated. The segments and checksum are then broadcast to the backup nodes, thus establishing a foundation for data segmentation management and integrity verification. By segmenting the backup data, the backup nodes can process multiple segments of data in parallel after receiving the segmented data, improving backup efficiency. The checksum provides a basis for integrity verification during subsequent data recovery, ensuring the accuracy of the backup data. Each backup node does not need to provide a return response after receiving the data.

[0106] According to an embodiment of the present application, in response to detecting a recovery event of the cache manager, receiving backup data from multiple backup nodes through a communication connection and restoring it to the cache of the cache manager includes: in response to detecting a recovery event of the cache manager, broadcasting a data recovery request to multiple backup nodes through a communication connection; receiving backup blocks and corresponding verification codes sent by multiple backup nodes in response to the data recovery request; in response to receiving more than one copy of the same backup block from more than one backup node, sequentially selecting the copies received from the backup nodes arranged in descending order according to performance parameters, and verifying them using the corresponding verification codes until they pass the verification, and storing the backup blocks that pass the verification code verification in the non-volatile cache area; after all the backup blocks obtained by blocking the data to be backed up are stored in the non-volatile cache area, they are written to the cache of the cache manager.

[0107] According to an embodiment of the present application, the data recovery request is also sent in the form of broadcasting, thereby ensuring that multiple backup nodes can obtain the data recovery request, and based on the data recovery request, send multiple backup blocks and verification codes corresponding to the multiple backup blocks to the server.

[0108] According to an embodiment of the present application, after the server obtains multiple backup blocks sent by multiple backup nodes and the verification codes corresponding to the multiple backup blocks, for the backup blocks of each ID, the backup blocks of the ID sent by multiple backup nodes are treated as different copies, and the backup blocks verified by the verification code are selected from the multiple copies of the backup blocks of the same ID.

[0109] In the process of selecting a backup block that passes the verification code verification from multiple copies of the backup block with the same ID, the copies sent by multiple backup nodes can be arranged in order of performance parameters from high to low, and the verification code corresponding to each copy can be used to verify the copy in turn, and the first copy that passes the verification can be determined as the backup block.

[0110] For each ID's backup block, the process described above determines the backup block that passes verification code verification and then stores it in the non-volatile cache. After all backup blocks are stored in the non-volatile cache, the data stored in the non-volatile cache is written to the cache manager's cache, completing the cache data recovery process.

[0111] According to an embodiment of the present application, during recovery, backup blocks are retrieved from multiple backup nodes and verified using checksums. Blocks from high-performance nodes are prioritized and written to the cache after all blocks are complete. This ensures the integrity and accuracy of the recovered data. The establishment of multiple backup nodes provides appropriate redundancy, meaning that in the event of a backup node failure or data transmission delay, subsequent data completion operations can be completed using backup blocks provided by other backup nodes, further ensuring the reliability of cached data recovery.

[0112] Figure 5 A flow chart of cache data recovery according to a cache data recovery method according to an embodiment of the present application is shown.

[0113] like Figure 5 The process includes operations S501 to S515.

[0114] In operation S501 , a power supply voltage and a log file of a cache manager are monitored.

[0115] In operation S502, it is determined whether the power supply voltage is lower than the power supply threshold or the log file indicates that the cache manager hardware has failed. If so, operation S503 is executed; if not, the process returns to operation S501.

[0116] In operation S503 , based on the marking result of the cached data, the cached data that has been modified in the cache but has not yet been stored in the non-volatile storage medium is used as data to be backed up.

[0117] In operation S504, the data to be backed up is divided into blocks according to a preset block size to obtain backup blocks, check codes corresponding to the backup blocks, and IDs.

[0118] In operation S505 , the backup blocks, the verification codes corresponding to the backup blocks, and the ID broadcast are sent to multiple backup nodes.

[0119] In operation S506 , the power supply voltage and the log file of the cache manager continue to be monitored.

[0120] In operation S507, it is determined whether the power supply voltage has recovered to the power supply threshold or the log file indicates that the hardware failure of the cache manager has been repaired. If so, operation S508 is executed; if not, the process returns to operation S506.

[0121] In operation S508 , a data recovery request is broadcast to multiple backup nodes.

[0122] In operation S509, for each backup block, it is determined whether there are multiple copies received from multiple backup nodes. If so, operation S510 is executed; if not, operation S511 is executed.

[0123] In operation S510, a backup block sent by a backup node with better performance is selected.

[0124] In operation S511, the backup block is verified according to a verification code corresponding to the backup block.

[0125] In operation S512, it is determined whether the backup block passes verification. If so, operation S514 is executed; if not, operation S513 is executed.

[0126] In operation S513, the backup block is discarded and the process returns to operation S510.

[0127] In operation S514 , the backup blocks are stored in the non-volatile cache area.

[0128] In operation S515 , after all backup blocks of the data to be backed up are stored in the non-volatile cache area, the data to be backed up is written into the cache of the cache manager.

[0129] Based on the above cache data recovery method, this application also provides a cache data recovery device. Figure 6 The device is described in detail.

[0130] Figure 6 The figure shows a structural block diagram of a cache data recovery device according to an embodiment of the present application.

[0131] like Figure 6 As shown, the cache data recovery device 600 of this embodiment includes a connection establishment module 610 , a data determination module 620 , a data storage module 630 and a data recovery module 640 .

[0132] The connection establishment module 610 is used to establish a communication connection between the server where the cache manager is located and the multiple backup nodes. In one embodiment, the connection establishment module 610 can be used to perform the operation S210 described above, which will not be repeated here.

[0133] The data determination module 620 is used to determine the data to be backed up in the cache of the cache manager in response to detecting an abnormal event of the cache manager. In one embodiment, the data determination module 620 can be used to perform the operation S220 described above, which will not be repeated here.

[0134] The data storage module 630 is used to broadcast the data to be backed up to multiple backup nodes via a communication connection so as to be stored in the multiple backup nodes as backup data. In one embodiment, the data storage module 630 can be used to perform the operation S230 described above, which will not be repeated here.

[0135] The data recovery module 640 is configured to, in response to detecting a recovery event of the cache manager, receive backup data from the plurality of backup nodes via a communication connection and restore the backup data to the cache of the cache manager. In one embodiment, the data recovery module 640 may be configured to perform operation S240 described above, which will not be further described herein.

[0136] According to an embodiment of the present application, the cache data recovery device 600 further includes a node determination module and a node screening module.

[0137] The node determination module is used to discover multiple candidate nodes that can communicate with the server.

[0138] The node screening module is used to determine a preset number of candidate nodes from the multiple candidate nodes as multiple backup nodes based on the performance parameters of the multiple candidate nodes, and to use the other candidate nodes as standby nodes.

[0139] According to an embodiment of the present application, the cache data recovery device 600 further includes a first signal broadcasting module and a node re-screening module.

[0140] The first signal broadcasting module is configured to broadcast a detection signal according to a first preset time period.

[0141] The node re-screening module is used to re-determine multiple backup nodes and standby nodes based on the received responses to the detection signal.

[0142] According to an embodiment of the present application, the cache data recovery device 600 further includes a second signal broadcast module and a node replacement module.

[0143] The second signal broadcast module is used to detect whether there is a faulty backup node by sending heartbeat signals to multiple backup nodes according to a second preset time period and detecting the response to the heartbeat signals. When the number of times the target backup node fails to correctly respond to the heartbeat signal reaches a preset fault number, it is determined that the target backup node has a fault.

[0144] The node replacement module is configured to, in response to determining that a target backup node fails, determine at least one backup node as a substitute node based on respective performance parameters of the backup nodes to replace the target backup node.

[0145] According to an embodiment of the present application, the cache data recovery device 600 further includes a configuration synchronization module.

[0146] The configuration synchronization module is used to send the configuration parameters of the cache manager to multiple backup nodes through communication connections when the cache manager is operating normally.

[0147] According to an embodiment of the present application, the cache data recovery device 600 further includes a data marking module.

[0148] The data marking module is used to scan the data in the cache when the cache manager is operating normally, and mark the data as one of the following states: modified but not yet stored in the non-volatile storage medium, stored in the non-volatile storage medium and can be discarded, or not modified.

[0149] According to an embodiment of the present application, the data storage module 630 includes a data segmentation submodule and a data broadcasting submodule.

[0150] The data block submodule is used to block the backup data according to the preset block size, and obtain the backup blocks and the check codes corresponding to the backup blocks.

[0151] The data broadcast submodule is used to broadcast the backup blocks and the corresponding check codes to multiple backup nodes.

[0152] According to an embodiment of the present application, the data recovery module 640 includes a broadcast request submodule, a data receiving submodule, a data storage submodule, and a data writing submodule.

[0153] The request broadcast submodule is used to broadcast a data recovery request to multiple backup nodes through a communication connection in response to detecting a recovery event of the cache manager.

[0154] The data receiving submodule is used to receive backup blocks and corresponding check codes sent by multiple backup nodes in response to data recovery requests.

[0155] The data storage submodule is used to, in response to receiving more than one copy of the same backup block from more than one backup node, sequentially select the copies received from the backup nodes arranged in descending order according to the performance parameters, and verify them using the corresponding check codes until they pass the verification, and store the backup blocks that pass the check code verification in the non-volatile cache area.

[0156] The data writing submodule is used to write all backup blocks obtained by dividing the data to be backed up into the cache of the cache manager after they are stored in the non-volatile cache area.

[0157] According to embodiments of the present application, any multiple modules among the connection establishment module 610, data determination module 620, data storage module 630, and data recovery module 640 may be combined into a single module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present application, at least one of the connection establishment module 610, data determination module 620, data storage module 630, and data recovery module 640 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented in hardware or firmware by any other reasonable means of circuit integration or packaging, or may be implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of these. Alternatively, at least one of the connection establishing module 610 , the data determining module 620 , the data storage module 630 and the data recovery module 640 may be at least partially implemented as a computer program module, which may perform corresponding functions when executed.

[0158] Figure 7 A block diagram of an electronic device suitable for implementing a cache data recovery method according to an embodiment of the present application is shown.

[0159] like Figure 7 As shown, an electronic device 700 according to an embodiment of the present application includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage unit 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present application.

[0160] Various programs and data required for the operation of the electronic device 700 are stored in the RAM 703. The processor 701, ROM 702, and RAM 703 are connected to each other via a bus 704. The processor 701 performs various operations of the method flow according to the embodiment of the present application by executing the programs in the ROM 702 and / or RAM 703. It should be noted that the programs may also be stored in one or more memories other than the ROM 702 and the RAM 703. The processor 701 may also perform various operations of the method flow according to the embodiment of the present application by executing the programs stored in the one or more memories.

[0161] According to an embodiment of the present application, electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to bus 704. Electronic device 700 may also include one or more of the following components connected to I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 708 including a hard disk; and a communication section 709 including a network interface card such as a LAN card or modem. Communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to I / O interface 705 as needed. Removable media 711, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 710 as needed, so that computer programs read from the removable media can be installed into storage section 708 as needed.

[0162] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of this application is implemented.

[0163] According to an embodiment of the present application, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.

[0164] The embodiments of the present application also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided in the embodiments of the present application.

[0165] The computer program executes the above functions defined in the system / device of the embodiment of the present application when the computer program is executed by the processor 701. According to the embodiment of the present application, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0166] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 709, and / or installed from a removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0167] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from a removable medium 711. When the computer program is executed by the processor 701, the above-described functions defined in the system of the embodiment of the present application are performed. According to the embodiment of the present application, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.

[0168] According to an embodiment of the present application, the program code for executing the computer program provided by the embodiment of the present application can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0169] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0170] Those skilled in the art will appreciate that the features described in the various embodiments of this application may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in this application. In particular, the features described in the various embodiments of this application may be combined and / or coupled in various ways without departing from the spirit and teachings of this application. All such combinations and / or couplings fall within the scope of this application.

[0171] The embodiments of the present application have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present application. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present application, those skilled in the art may make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present application.

Claims

1. A cache data recovery method, characterized in that: The cache data recovery method includes: Establishing a communication connection between the server where the cache manager is located and the multiple backup nodes; In response to detecting an abnormal event of the cache manager, determining data to be backed up in the cache of the cache manager; broadcasting the data to be backed up to the multiple backup nodes via the communication connection, so as to be stored in the multiple backup nodes as backup data; and In response to detecting a restore event of the cache manager, the backup data is received from the plurality of backup nodes via the communication connection and restored to the cache of the cache manager.

2. The cache data recovery method according to claim 1, wherein: The multiple backup nodes are determined in the following manner: discovering a plurality of candidate nodes capable of communicating with the server; as well as According to the respective performance parameters of the multiple candidate nodes, a preset number of candidate nodes are determined from the multiple candidate nodes as the multiple backup nodes, and the other candidate nodes are used as standby nodes.

3. The cache data recovery method according to claim 2, wherein: The cache data recovery method further includes: broadcasting a detection signal according to a first preset time period; and The plurality of backup nodes and the standby node are re-determined based on the received responses to the detection signal.

4. The cache data recovery method according to claim 2, wherein: The cache data recovery method further includes: detecting whether a backup node has failed by sending heartbeat signals to the plurality of backup nodes at a second preset time period and detecting responses to the heartbeat signals, wherein the target backup node is determined to have failed when the number of times the target backup node fails to correctly respond to the heartbeat signals reaches a preset number of failures; In response to determining that the target backup node fails, at least one of the backup nodes is determined as a substitute node based on the performance parameters of each of the backup nodes to replace the target backup node.

5. The cache data recovery method according to claim 1, wherein: The cache data recovery method further includes: When the cache manager operates normally, the configuration parameters of the cache manager are sent to the multiple backup nodes through the communication connection.

6. The cache data recovery method according to claim 1, wherein: The communication connection includes a remote direct memory access connection.

7. The cache data recovery method according to claim 1, characterized in that: The data to be backed up only includes cache data in the cache that has been modified but has not yet been stored in the non-volatile storage medium. The cache data recovery method further includes: When the cache manager operates normally, it scans the data in the cache and marks the data as one of the following states: modified but not yet stored in the non-volatile storage medium, stored in the non-volatile storage medium and discarded, and unmodified.

8. The cache data recovery method according to claim 1, wherein: Broadcasting the data to be backed up to the multiple backup nodes through the communication connection to store the data as backup data in the multiple backup nodes includes: Dividing the data to be backed up into blocks according to a preset block size to obtain backup blocks and check codes corresponding to the backup blocks; and The backup blocks and corresponding check codes are broadcasted to the multiple backup nodes.

9. The cache data recovery method according to claim 8, characterized in that: In response to detecting a recovery event of the cache manager, receiving the backup data from the plurality of backup nodes through the communication connection and restoring the backup data to the cache of the cache manager comprises: In response to detecting a recovery event of the cache manager, broadcasting a data recovery request to the plurality of backup nodes via the communication connection; receiving backup blocks and corresponding check codes sent by the plurality of backup nodes in response to the data recovery request; In response to receiving more than one copy of the same backup block from more than one backup node, sequentially selecting the copies received from the backup nodes ranked in descending order by the performance parameter, and verifying them using corresponding check codes until they pass the verification, and storing the backup blocks that pass the verification by the check code in a non-volatile cache area; After all backup blocks obtained by dividing the data to be backed up into blocks are stored in the non-volatile cache area, they are written into the cache of the cache manager.

10. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the cache data recovery method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Cache data power failure protection method and computer equipment

    CN103049070A

  • Cache data processing method, device and equipment and readable storage medium

    CN109491609A

  • Data caching method, system and device and medium

    CN112131046A

  • Backup method and device of distributed database, equipment and storage medium

    CN119493692A