Method, device, electronic equipment and storage medium for data recovery
By monitoring the resource status of the distributed storage system in real time and dynamically adjusting the data recovery strategy, the problem of low data recovery efficiency in large-scale distributed storage environments is solved, and resource utilization is optimized and business stability is improved.
Patent Information
- Application Number
- CN202511199561.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-08-26
AI Technical Summary
Existing technologies are inefficient for data recovery in large-scale distributed storage environments, cannot effectively utilize resources, and lead to business continuity and system performance instability.
By monitoring the resource status of the distributed storage system in real time, the data recovery strategy is dynamically adjusted, including selecting the number of participating nodes, physical scope, encoding method and memory resources, optimizing resource utilization, and using erasure coding technology for data recovery.
It improved data recovery efficiency, optimized resource utilization, ensured business stability and system performance, and achieved a dynamic balance between data recovery efficiency and business continuity.
Smart Images

Figure CN120723542B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to a method, apparatus, electronic device, computer-readable storage medium, and computer program product for data recovery. Background Technology
[0002] In distributed storage systems, data redundancy and recovery mechanisms are key components for ensuring data security and system reliability. When a storage node fails or data is lost, the ability to quickly and accurately recover data from other nodes is crucial.
[0003] In related technologies, a pre-set fixed data recovery strategy is usually used for data recovery.
[0004] However, current data recovery technologies are generally inefficient when dealing with large-scale distributed storage environments. Summary of the Invention
[0005] This application provides methods, apparatus, electronic devices, computer-readable storage media, and computer program products for data recovery, in order to at least address the problem of low efficiency in data recovery in related technologies.
[0006] This application provides a data recovery method applied to a distributed storage system, which includes multiple nodes. The method includes: upon receiving a data recovery request from a node to be recovered, monitoring the resource status of the distributed storage system, wherein the resource status includes network resource status, hardware resource status, and load status; determining, based on the network resource status, hardware resource status, and load status, the number of nodes simultaneously participating in data recovery, the physical range of the nodes called for data recovery, the encoding method used for data recovery, and the memory resources occupied by data recovery; determining a data recovery strategy based on the number of nodes simultaneously participating in data recovery, the physical range of the nodes called for data recovery, the encoding method used for data recovery, and the memory resources occupied by data recovery; and executing the determined data recovery strategy to recover the data of the node to be recovered.
[0007] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of the above-described data recovery method.
[0008] The data recovery method described in this application, through comprehensive real-time monitoring of resource status, allows the system to accurately grasp the current resource situation, which is a prerequisite for data recovery strategy decision-making. The monitoring results will be used for resource sensitivity dimension analysis in subsequent steps, guiding the adjustment of the strategy offset function parameters, thereby optimizing resource utilization and improving recovery efficiency. Dynamic strategy selection based on the storage system's resource status can intelligently adjust the data recovery method according to resource occupancy, significantly improving data recovery efficiency. For example, efficient utilization of CPU and network bandwidth will reduce data reconstruction time, while flexible encoding methods and data acquisition strategies will reduce network overhead, ensuring business continuity and stability. By monitoring the distributed storage system's resource status in real time and dynamically adjusting the data recovery strategy, the method effectively solves problems such as resource conflicts, efficiency bottlenecks, and strategy rigidity that may be encountered during data recovery in distributed storage systems. It optimizes resource utilization, ensures business stability and system performance, and achieves a dynamic balance between data recovery efficiency and business continuity. The method can consider the storage system's resource status and combine the most suitable recovery strategies based on the current resource status of the storage system, improving data recovery efficiency. Attached Figure Description
[0009] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a hardware structure block diagram of a server device for a data recovery method according to an embodiment of this application;
[0011] Figure 2 This is one of the flowcharts of a data recovery method according to an embodiment of this application;
[0012] Figure 3 This is a second flowchart of a data recovery method according to an embodiment of this application;
[0013] Figure 4 This is a third flowchart of a data recovery method according to an embodiment of this application;
[0014] Figure 5 This is a flowchart of a data recovery method according to an embodiment of this application;
[0015] Figure 6 This is the fifth flowchart of a data recovery method according to an embodiment of this application;
[0016] Figure 7This is a flowchart of a data recovery method according to an embodiment of this application;
[0017] Figure 8 This is flowchart seven of a data recovery method according to an embodiment of this application;
[0018] Figure 9 This is the eighth flowchart of a data recovery method according to an embodiment of this application;
[0019] Figure 10 This is flowchart nine of a data recovery method according to an embodiment of this application;
[0020] Figure 11 This is a structural block diagram of a data recovery apparatus according to an embodiment of this application. Detailed Implementation
[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0022] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0023] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0024] The specific application environment architecture or specific hardware architecture on which the execution of the data recovery method depends is described here.
[0025] The data recovery method embodiments provided in this application can be executed on a server device or similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure block diagram of a server device for a data recovery method according to an embodiment of this application. Figure 1 As shown, the server device may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor or programmable logic device) and a memory 104 for storing data are also shown. The server device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server equipment described above. For example, the server equipment may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0026] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the data recovery method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the aforementioned method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to server devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0027] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the server device. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0028] Embodiments of this application provide a data recovery method applied to the aforementioned server equipment (e.g., a distributed storage system). The distributed storage system includes multiple nodes. The method is described in detail below, in conjunction with its execution flow. Figure 2 As shown, the method includes the following steps S200-220:
[0029] Step S200: Upon receiving a data recovery request from a node to be recovered, monitor the resource status of the distributed storage system.
[0030] The resource status includes network resource status, hardware resource status, and load status.
[0031] Specifically, in distributed storage, when the system detects data loss on a node and requires data recovery, it first initiates a resource monitoring mechanism. Resource status monitoring covers network resource status, hardware resource status (such as the Central Processing Unit (CPU) and memory), and system load status. This step provides real-time data support for subsequent strategy decisions, ensuring that the data recovery plan can be customized based on the current system condition, avoiding inefficiency or resource waste that may result from blind execution.
[0032] For example, network bandwidth utilization and packet loss rate between nodes can be continuously monitored using the iftop command or a custom network monitoring tool, updated every 5 seconds to ensure data real-time performance and accuracy. System monitoring tools, including but not limited to top and htop, can be used to obtain real-time metrics such as CPU utilization and memory utilization of each node, providing information on hardware resource usage for policy decisions. The ratio of real-time input / output operations per second (IOPS) to the configured IOPS limit is used to assess the load status of storage nodes, while also considering the overall system load trend.
[0033] Network bandwidth utilization is the ratio of the actual amount of data transmitted in a network link to its maximum transmission capacity, used to measure the utilization of network resources. CPU utilization is the proportion of CPU time occupied by processing tasks, reflecting the CPU's workload. IOPS is the number of input / output operations that can be processed per second, a key indicator for measuring storage performance.
[0034] Step S210: Based on the network resource status, hardware resource status, and load status, determine the number of nodes participating in data recovery simultaneously, the physical range of the nodes called for data recovery, the encoding method used for data recovery, and the memory resources occupied by data recovery.
[0035] Specifically, based on the resource status data collected in step S200, the system adaptively selects a data recovery strategy through built-in decision-making logic, including the number of nodes involved in the repair, the physical scope of data acquisition, the encoding method, and the computing resource allocation mode. This decision-making process ensures efficient resource utilization, avoids resource conflicts, and considers both network stability and data recovery efficiency.
[0036] Step S220: Determine the data recovery strategy based on the number of nodes participating in data recovery simultaneously, the physical range of the nodes called by the data recovery, the encoding method used in the data recovery, and the memory resources occupied by the data recovery.
[0037] Step S230: Execute the determined data recovery strategy to recover the data of the node to be recovered.
[0038] Specifically, based on the data recovery strategy determined in step S220, the system performs corresponding data recovery operations, including data block acquisition, encoding / decoding, data reconstruction, and final verification. This step ensures the effective implementation of the strategy, achieving fast and reliable data recovery by optimizing the matching between the strategy and system resources.
[0039] It should be noted that the distributed storage system in this application uses erasure coding technology to store data. Erasure coding is a type of coding technology originating from channel transmission. Because it can tolerate the loss of multiple data frames, it has been introduced into the field of distributed storage, making erasure coding-based fault tolerance technology the most commonly used coding-based fault tolerance technology capable of tolerating the simultaneous failure of multiple data blocks. The steps of using erasure coding for data fault tolerance are as follows: First, data segmentation: the data object to be stored is divided into several data blocks of equal size. Second, data block encoding: the above data blocks are encoded to obtain some encoded blocks. Depending on the encoding method, they can be divided into Reed-Solomon codes, parity array codes, parity-check codes, and low-density parity-check codes, etc. Reed-Solomon coding (RS coding), a commonly used channel coding method, is effective for polynomials generated by correcting oversampled data. The coding process first redundancy-checks these polynomials at multiple points, then transmits or stores them. This sampling beyond the necessary values of the polynomial causes it to become overdetermined (over-limited). When the receiver correctly receives enough points, it can recover the original polynomial, even if many points on the received polynomial are distorted by noise. Reed-Solomon erasure coding is currently the most widely used multi-level coding system, capable of correcting random and burst errors. Its characteristics are: firstly, it has a strong ability to correct random and burst errors with the same coding redundancy; secondly, it has the strongest error correction capability with the same coding efficiency, achieving a large coding gain; thirdly, it approaches the limit in short and medium code lengths, and when combined with data interleaving technology, it can greatly improve the performance of burst error correction; finally, it has a strict algebraic structure, manifested as a linear cyclic polynomial. The third step is data decoding. When reading data, as long as any sufficient number of encoded data blocks are obtained, the original data can be decoded.
[0040] Erasure coding technology is used to reconstruct information in lossy channels, merging information from multiple data blocks into less redundant information. Its advantages include high storage space utilization. However, its disadvantages include the need for separate encoding and decoding operations for data reading and writing, leading to high demands on the computing power and network of the distributed system. Furthermore, erasure coding does not reconstruct damaged encoded information. Additionally, when data becomes corrupted, at least k data blocks of the same size need to be downloaded to decode and recover the original data.
[0041] In this embodiment, by comprehensively and in real-time monitoring network bandwidth, CPU, and storage load, the system can accurately grasp the current resource status, which is a prerequisite for data recovery strategy decisions. The monitoring results will be used for resource sensitivity dimension analysis in subsequent steps, guiding the adjustment of the strategy offset function parameters, thereby optimizing resource utilization and improving recovery efficiency. Dynamic strategy selection based on the storage system's resource status can intelligently adjust the data recovery method according to resource occupancy, significantly improving data recovery efficiency. For example, efficient utilization of CPU and network bandwidth will reduce data reconstruction time, while flexible encoding methods and data acquisition strategies will reduce network overhead, ensuring business continuity and stability. By monitoring the distributed storage system's resource status in real-time and dynamically adjusting the data recovery strategy, the system effectively solves problems such as resource conflicts, efficiency bottlenecks, and strategy rigidity that may be encountered during data recovery in distributed storage systems. This improves the data recovery efficiency of the distributed storage system, optimizes resource utilization, and simultaneously ensures business stability and system performance, achieving a dynamic balance between data recovery efficiency and business continuity.
[0042] In one embodiment, such as Figure 3 As shown, step S210 determines the physical range of the nodes invoked for data recovery based on network resource status, hardware resource status, and load status. This includes steps S300-S330:
[0043] Step S300: Determine multiple associated nodes based on the data blocks to be recovered of the node to be recovered.
[0044] In this context, the data blocks stored in multiple associated nodes are associated with the data blocks to be recovered in the node to be recovered.
[0045] Specifically, in a distributed storage system, when a data block on a node (i.e., the node to be recovered) is detected to need repair, the first step is to determine the set of nodes associated with that data block. Associated nodes are nodes that store information (such as the data block itself or a checksum block) that can help recover the data block on the node to be recovered.
[0046] For example, examine the data distribution table or metadata in the system to identify the nodes that store copies of the data blocks to be recovered or their associated checksum blocks. Construct a list of associated nodes, including information on all nodes that might provide the data needed for recovery.
[0047] Step S310: When the network resource status meets the first preset condition, determine multiple target nodes from multiple associated nodes, wherein the physical distance between the target nodes and the node to be restored is within a first preset range.
[0048] Specifically, if the monitored network resource status (including network bandwidth utilization and network packet loss rate) meets certain threshold conditions (i.e., the first preset condition), the system will prioritize selecting data from physically close associated nodes to reduce network latency during the repair process. Here, "physical distance" usually refers to distance on the network, such as across racks or within the same rack.
[0049] For example, when the network bandwidth utilization is lower than a first threshold and the network packet loss rate is lower than a second threshold, nodes whose physical distance to the node to be recovered is within a first preset range are selected from the list of associated nodes, and these nodes are set as "target nodes". The first preset range refers to the maximum physical distance range within which data transmission delay and packet loss rate are controllable under normal network conditions.
[0050] Step S320: If the network resource status does not meet the first preset condition, determine multiple target nodes from multiple associated nodes, wherein the physical distance between the target nodes and the node to be restored is within a second preset range.
[0051] The first preset range is greater than the second preset range, and the first preset condition includes the network bandwidth utilization rate of the distributed storage system being lower than the first threshold and the network packet loss rate being lower than the second threshold.
[0052] Specifically, under high network load or unstable network conditions, i.e. when the network resource status does not meet the first preset condition, the system will reduce the physical distance limitation and select data from a smaller range of associated nodes. This is because high network load or unstable network conditions mean higher network latency, so it is necessary to reduce the distance of data transmission to ensure the feasibility of data recovery.
[0053] For example, when the network resource status does not meet the first preset condition, the system narrows the selection range of associated nodes. The second preset range is smaller than the first preset range, which means that when the network conditions are poor, the system obtains data from the nearest node to complete the recovery.
[0054] For example, local repair (physical scope within the second preset range) acquires data within the fault domain, consuming only 15%-20% of local network bandwidth. Cross-topology repair, however, requires data transmission across racks (physical scope within the first preset range), placing higher demands on network bandwidth and topology connection stability, potentially consuming 60% of network bandwidth. Cross-rack repair (physical scope within the first preset range) is enabled when the network bandwidth utilization of the distributed storage system is below a first threshold and the network packet loss rate is below a second threshold, for example (network bandwidth utilization < 60%, packet loss rate < 0.1%). If the network or topology status is abnormal (does not meet the first preset condition), local repair (physical scope within the second preset range) is enabled to avoid transmission bottlenecks.
[0055] Based on real-time network bandwidth utilization and packet loss rate, the system dynamically selects the data acquisition path. Specifically, when network bandwidth utilization is below 60% and packet loss rate is below 0.1%, the system will activate cross-topology repair. This fully utilizes system-wide resources, improving repair efficiency. Simultaneously, because bandwidth utilization is low, this strategy does not significantly increase network load. If network bandwidth utilization or packet loss rate becomes abnormal (i.e., exceeds the set threshold), the system will automatically switch to a local repair strategy, potentially in conjunction with a topology reorganization algorithm, to avoid network bottlenecks caused by large amounts of cross-rack data transmission. The local repair strategy provides a conservative repair solution when resources are scarce or the network is unstable. Although the repair speed may be slower, it ensures system stability and the reliability of data repair.
[0056] Cross-topology repair strategy refers to the repair process that considers not only data from nodes within the fault domain but also data from nodes in other racks (non-fault domains). This strategy requires higher network bandwidth and good topology connectivity throughout the system. Cross-topology repair can utilize more data node resources across the entire system, ensuring sufficient data and verification information for repair even when node resources within the fault domain are limited.
[0057] The local repair strategy refers to prioritizing the search for and utilization of data and verification information from other nodes within the same rack (fault domain) where the faulty node resides during the data repair process. This strategy reduces cross-rack data transmission, thus consuming relatively little network bandwidth, typically only 15%-20% of the local network bandwidth.
[0058] In this embodiment, by dynamically adjusting the physical range of data acquisition, the relationship between network load and data recovery efficiency is effectively balanced. When network conditions are good, the control over data transmission distance is relaxed because network latency is lower, allowing data blocks to be acquired from a wider range of target nodes, thus improving data recovery speed. Conversely, when network conditions are poor, the system automatically reduces the physical range to avoid low data recovery efficiency due to poor long-distance transmission caused by network issues, ensuring the feasibility of data recovery.
[0059] In one embodiment, such as Figure 4 As shown, step S210 determines the number of nodes simultaneously participating in data recovery based on network resource status, hardware resource status, and load status. This includes steps S400-S410:
[0060] Step S400: When the network resource status and hardware resource status meet the second preset conditions, control multiple target nodes to simultaneously transmit data blocks associated with the data blocks to be recovered of the node to be recovered.
[0061] Specifically, in a distributed storage system, if the real-time monitored network and hardware resource status (such as network bandwidth utilization and processor utilization) meets a specific second preset condition—that is, network bandwidth utilization is lower than a third threshold and processor utilization is lower than a fourth threshold, and the third threshold is less than the first threshold (used for data recovery strategy selection)—then the system will control multiple target nodes to transmit data simultaneously to accelerate the data block recovery process of the node to be recovered. This strategy utilizes the surplus of resources and greatly improves the efficiency of data recovery through parallel transmission.
[0062] For example, when network bandwidth utilization is below a third threshold (e.g., 40%) and processor utilization is below a fourth threshold (e.g., 50%), the system scheduling module sends transmission instructions to multiple target nodes, requiring them to simultaneously transmit the data blocks associated with the data blocks to be recovered. During transmission, the system monitors the real-time status of the network and processors, and once it detects that resource usage is approaching the preset threshold, it immediately adjusts the transmission strategy to avoid resource contention.
[0063] In this context, the target node is selected in the data recovery strategy and is used to transmit data blocks associated with the data block to be recovered. Simultaneous transmission means that multiple target nodes transmit data to the node to be recovered at the same time to achieve parallel data recovery.
[0064] Step S410: If the network resource status and hardware resource status do not meet the second preset conditions, control multiple target nodes to transmit data blocks associated with the data blocks to be recovered of the node to be recovered in a time-sharing manner.
[0065] The second preset condition includes that the network bandwidth utilization of the distributed storage system is lower than the third threshold and the processor utilization is lower than the fourth threshold, wherein the third threshold is less than the first threshold.
[0066] Specifically, when the network and hardware resource status do not meet the second preset condition—that is, network bandwidth utilization exceeds the third threshold or processor utilization exceeds the fourth threshold—the system will control multiple target nodes to transmit data in a time-sharing manner to prevent resource contention and ensure normal service operation. This mechanism, through time segmentation, rationally allocates network and processor resources, avoiding data recovery delays caused by resource bottlenecks and achieving tiered data recovery. Time-sharing transmission means that target nodes transmit data sequentially within different time slices to avoid resource contention and guarantee service performance.
[0067] For example, when network bandwidth utilization is high (e.g., exceeding 40%) or processor utilization is high (e.g., exceeding 50%), the system scheduling module will limit the transmission time of the target node and use time-slicing to transmit data blocks associated with the data block to be recovered in turn. When implementing this strategy, the system will prioritize business load and resource usage, dynamically adjust the transmission window, and ensure a balance between data recovery and business operation.
[0068] In this embodiment, by real-time monitoring of network bandwidth utilization and processor utilization, the system can intelligently select between parallel or time-sharing data transmission, and thus choose between parallel or tiered data repair, avoiding resource contention and ensuring service continuity and stability. When network and processor resources are sufficient, the parallel transmission data repair strategy can significantly accelerate data recovery and reduce the impact of data loss. When resources are scarce, the time-sharing tiered data repair strategy rationally allocates transmission time, reducing the impact on service performance and avoiding service delays or interruptions caused by data recovery. Dynamically adjusting the transmission strategy allows the system to better cope with fluctuations in network and processor resources, enhancing the applicability and robustness of the distributed storage system in different environments.
[0069] In one embodiment, such as Figure 5 As shown, step S210 determines the encoding method used for data recovery based on network resource status, hardware resource status, and load status. This includes steps S500-S510:
[0070] Step S500: When the network resource status and hardware resource status meet the third preset conditions, the target data blocks transmitted by multiple target nodes and associated with the data blocks to be recovered of the node to be recovered are processed using the first encoding method.
[0071] The first encoding method is used to perform inverse matrix operations on multiple target data blocks to calculate the data block to be recovered based on the multiple target data blocks.
[0072] Specifically, in a distributed storage system, if the network resource status (such as network bandwidth utilization) and hardware resource status (such as processor utilization) meet the third preset condition—that is, the network bandwidth utilization is lower than the first threshold and the processor utilization is higher than the fifth threshold—then the system will use the first encoding method for data recovery. The first encoding method is a direct inverse matrix operation method used to calculate the data block to be recovered based on associated data blocks received from multiple target nodes. This method can improve the speed of data recovery when network resources are abundant, but it requires a large amount of data to be transmitted (full data transmission is required, such as 12TB of faulty data generating 21.6TB of traffic).
[0073] For example, when network bandwidth utilization is below a first threshold (e.g., 40%) and processor utilization is above a fifth threshold (e.g., 60%), the scheduling module selects a first encoding method. The first encoding method performs an inverse matrix operation to recover the data block to be recovered from the target data blocks associated with the data block to be recovered transmitted from multiple target nodes.
[0074] The first encoding method can be the standard Reed-Solomon (RS) encoding, which recovers lost data through inverse matrix operations. Inverse matrix operations are a mathematical method used to solve systems of linear equations and are the core algorithm in the RS-encoded data recovery process.
[0075] Step S510: If the network resource status and hardware resource status do not meet the third preset conditions, the second encoding method is used to process the target data blocks transmitted by multiple target nodes that are associated with the data blocks to be recovered of the node to be recovered.
[0076] The second encoding method is used to combine multiple target data blocks to obtain multiple amplified data blocks, and to perform inverse matrix operations on the multiple target data blocks and multiple amplified data blocks to calculate the data block to be recovered based on the multiple target data blocks and multiple amplified data blocks.
[0077] The third preset condition includes the network bandwidth utilization of the distributed storage system being lower than the first threshold and the processor utilization being higher than the fifth threshold.
[0078] Specifically, if the network resource status and hardware resource status do not meet the third preset condition (i.e., high network bandwidth utilization or low processor utilization), the system will use a second encoding method for data recovery. Unlike the first encoding method, the second encoding method first obtains an expanded data block by combining multiple target data blocks, and then performs an inverse matrix operation on the target data block and the expanded data block together to recover the data block to be recovered. This method can reduce data transmission and save network resources when network resources are scarce. Then, by combining and expanding layers with fewer data blocks, more data blocks are obtained. Thus, when repairing failed nodes, it is not necessary to obtain complete data blocks from all surviving nodes, but only a portion of the data blocks are needed to reconstruct the lost data. This encoding method can effectively reduce the network bandwidth requirements during the repair process, but it has a large computational load and consumes a lot of CPU resources (the regeneration code reduces network traffic by 30% but increases CPU overhead by 35% through linear calculation).
[0079] The second encoding method can be regenerating code, an optimized erasure coding technique designed to reduce network traffic while maintaining high availability and redundancy during data repair. Compared to RS encoding, regenerating code not only recovers lost blocks from the original data blocks but also reduces the amount of original data that needs to be transmitted through linear combinations of existing check blocks and data blocks. RS standard encoding and regenerating code are two different erasure coding techniques used for data repair in distributed storage systems. RS encoding requires the transmission of complete data during repair and is suitable for environments with ample bandwidth. Regenerating code, on the other hand, reduces network pressure by decreasing data transmission volume but increases the CPU's computational burden, making it more suitable for scenarios with limited bandwidth but relatively abundant CPU resources.
[0080] In this embodiment, by real-time assessment of network and hardware resource status, the system can employ a first encoding method to improve data recovery speed when network resources are sufficient, and switch to a second encoding method when network resources are scarce but processor resources are sufficient. This second encoding method generates expanded data blocks to reduce the amount of data that needs to be transmitted, thereby reducing network resource consumption, ensuring the feasibility of data recovery, and minimizing the impact on service performance. Under conditions of sufficient network resources, the first encoding method (such as RS encoding) can recover data faster. When network resources are scarce, the second encoding method is used, and even with limited network resources, processor resources can be utilized to expand data blocks, ensuring the continuity of data recovery. By dynamically adjusting the encoding method, the system can intelligently respond to resource changes, flexibly adapting to both improved network conditions and processor resource constraints, ensuring the effectiveness and efficiency of the data recovery strategy.
[0081] In one embodiment, such as Figure 6 As shown, step S210 determines the memory resources required for data recovery based on network resource status, hardware resource status, and load status. This includes steps S600-S610:
[0082] Step S600: If the hardware resource status and load status meet the fourth preset condition, set up an independent cache area in the distributed storage system.
[0083] The independent cache area is used to cache multiple target data blocks.
[0084] Specifically, in a distributed storage system, if processor utilization is below the sixth threshold and storage node utilization is below the seventh threshold, it means the system has sufficient computing power and storage space to perform more efficient data recovery operations. In this case, an independent cache is set up specifically to cache data blocks associated with the data blocks to be recovered, transmitted from multiple target nodes. This measure can significantly improve the efficiency and speed of data recovery because the independent cache can reduce data access latency and improve read / write speeds, making it particularly suitable for data reconstruction processes, providing faster data access and processing capabilities.
[0085] For example, when processor utilization falls below the sixth threshold (e.g., 70%) and storage node utilization falls below the seventh threshold (e.g., 80%), the scheduling module will decide to enable a separate cache. A separate cache is created or allocated to store and cache all target data blocks. This cache can be a hardware-level cache, such as part of a solid-state drive (SSD), or a software-implemented virtual cache; the key is that it can provide faster access speeds than regular storage. The utilization and performance metrics of the separate cache are monitored in real time to ensure its efficient operation while avoiding cache overflow or performance bottlenecks.
[0086] The independent cache area is a cache area specifically set up for data recovery operations. It is used to store data blocks transmitted from the target node to improve data processing speed and reduce access latency.
[0087] In step S610, if the hardware resource status and load status do not meet the fourth preset condition, multiple target data blocks are stored in the hybrid memory of the distributed storage system.
[0088] The hybrid memory stores multiple target data blocks as well as other business data.
[0089] The fourth preset condition includes the processor utilization rate of the distributed storage system being lower than the sixth threshold and the storage node utilization rate being lower than the seventh threshold.
[0090] Specifically, if processor utilization is high or storage node utilization is close to full load—meaning the hardware resource status and load status do not meet the fourth preset condition—the system will adopt another strategy: storing the target data block alongside other business data in hybrid memory. The hybrid memory strategy is more practical in resource-constrained environments because it balances the needs of data recovery with those of daily business operations, preventing excessive resource consumption during data recovery from impacting the operation of other critical services.
[0091] For example, when processor utilization exceeds the sixth threshold or storage node utilization is high, the system will no longer allocate a separate cache area, but will instead use a regular hybrid memory space to store the target data block. The hybrid memory space simultaneously stores data required for data recovery and daily business data, ensuring efficient management and access to data blocks through memory management strategies, enabling data recovery to be completed as quickly as possible even under resource constraints. The usage of hybrid memory is monitored, and memory garbage collection or data compression is performed as needed to improve storage efficiency and data access speed.
[0092] Hybrid memory is a shared memory space used to simultaneously store the target data blocks needed for data recovery and other business data, aiming to balance resource usage and ensure business continuity.
[0093] Independent caches facilitate the isolation of CPU-intensive and memory-intensive tasks, based on their different priorities in system resource requirements. CPU-intensive tasks typically involve a large number of computational operations, such as encoding and decoding data blocks, which consumes a significant amount of CPU time. Memory-intensive tasks, on the other hand, focus more on fast data reading, writing, and caching, such as storing and accessing intermediate results of data reconstruction, which primarily rely on sufficient memory resources.
[0094] In this embodiment, by setting up an independent cache to store the target data blocks, data access latency can be significantly reduced and data processing speed improved when processor and storage resources are sufficient. Conversely, data blocks are stored in hybrid memory to avoid resource bottlenecks and impact on critical business operations. The existence of the independent cache ensures that data blocks can be accessed and processed quickly during data reconstruction, which is particularly important for large data recovery operations and can significantly shorten recovery time. Under resource constraints, the hybrid memory strategy avoids excessive consumption of processor and storage resources even during data recovery, thereby ensuring the continuous and stable operation of business. This dynamic adjustment strategy flexibly selects the data storage method based on real-time resource status and load conditions, enhancing the adaptability and flexibility of the distributed storage system under different workloads and resource conditions. When resources are sufficient, the use of an independent cache can significantly improve the speed of data recovery because data access latency is reduced and data processing capabilities are enhanced. In resource-constrained environments, although the data recovery speed of the hybrid memory strategy may not be as fast as the independent cache mode, the shared storage space with business data avoids resource contention, ensuring that business operations are not affected by data recovery operations and maintaining business stability and continuity.
[0095] In one embodiment, such as Figure 7 As shown, the method further includes steps S700-S720:
[0096] Step S700: Detect the physical extent of the node distribution currently included in the distributed storage system.
[0097] Specifically, in the management of distributed storage systems, detecting the physical distribution range of the current nodes is a crucial step in ensuring the effectiveness of data recovery strategies. This detection aims to assess the current topology of the system and determine whether the data recovery strategy needs to be adjusted to optimize resource utilization and recovery efficiency.
[0098] The physical range of node distribution refers to the physical or network distance between nodes in a distributed storage system.
[0099] Step S710: If the physical range of the nodes currently included in the distributed storage system is less than the third preset range, increase the number of nodes participating in data recovery simultaneously.
[0100] Specifically, if the assessment reveals that the physical distribution range of nodes is small, it means that the network latency and distance between nodes are short. In this case, a parallel recovery strategy can be adopted to increase the number of nodes participating in data recovery simultaneously, thereby improving the data recovery speed. This is because the data transmission efficiency between nodes is high, which can effectively utilize network resources and reduce the overall data recovery time.
[0101] For example, when the physical range of node distribution is smaller than a third preset range (e.g., the average distance across racks is lower than a preset standard), the scheduling module will decide to increase the number of nodes participating in data recovery simultaneously. By optimizing the repair scheduling algorithm, an appropriate number of nodes are intelligently selected for data recovery, avoiding resource bottlenecks while ensuring the efficiency of data recovery. Real-time monitoring of network resource status ensures that the parallel recovery strategy does not excessively consume network bandwidth, thus affecting service performance.
[0102] Step S720: If the physical range of the nodes currently included in the distributed storage system is greater than or equal to the third preset range, reduce the physical range of the nodes called for data recovery.
[0103] Specifically, if the physical range of the node distribution is large or equal to the third preset range, it means that the network latency and distance between nodes may increase. In this case, the system will adopt a local recovery strategy, that is, try to obtain data from nodes that are physically closer to each other, so as to reduce the latency and overhead of network transmission during data recovery. This can avoid data transmission across long-distance nodes, reduce network congestion, and improve the efficiency and reliability of data recovery.
[0104] For example, when the physical range of the node distribution is greater than or equal to a third preset range, the system prioritizes the node with the closer physical distance for data recovery. Through a topology reorganization algorithm, the data acquisition path is dynamically adjusted to avoid data transmission between distant nodes and reduce network latency. Real-time monitoring of network status ensures data transmission efficiency under the local recovery strategy while avoiding impact on service performance.
[0105] In this embodiment, when the physical distribution range of nodes is small, the number of nodes participating in data recovery is increased, and a parallel recovery strategy is used to improve the data recovery speed while maintaining a reasonable allocation of network resources to avoid excessive resource consumption. When the physical distribution range of nodes is large, the system adopts a local recovery strategy to reduce data transmission across long-distance nodes, effectively reducing network latency and overhead, and improving the efficiency and reliability of data recovery. This dynamic strategy adjustment based on the physical distribution range of nodes allows the system to flexibly select a data recovery strategy according to the current topology, enhancing the system's adaptability under different network conditions and ensuring the efficiency of data recovery and the continuity of services.
[0106] In one embodiment, such as Figure 8 As shown, the method further includes steps S800-S810:
[0107] Step S800: If it is detected that the current processor of the distributed storage system supports hardware acceleration instruction sets, increase the computing resources that can be called by the encoding method used for data recovery.
[0108] Specifically, during data recovery operations in a distributed storage system, if the current processor supports hardware-accelerated instruction sets, the system will increase the computational resources allocated to the encoding methods used for data recovery, fully utilizing hardware acceleration capabilities. The focus of this step is to improve the processing speed during data recovery and reconstruction, particularly the encoding and decoding speeds, thereby reducing the overall time required for data recovery. Hardware-accelerated instruction sets refer to a series of instructions built into the processor used to accelerate specific types of data processing, such as encryption, decryption, and data compression.
[0109] And, in step S810, adjust the memory resources occupied by data recovery according to the read and write speed of the storage medium used by the storage nodes of the distributed storage system.
[0110] Specifically, the performance of a distributed storage system depends not only on the processor's computing power but also on the read and write speeds of the storage media. For different storage media (such as SSDs or Hard Disk Drives (HDDs)), the system will adjust the memory resources used during data recovery to optimize data read and write speeds and reduce latency.
[0111] For example, the system obtains the read and write speeds of the storage media by reading the configuration information of the storage nodes or running read and write tests. Based on the type and speed of the storage media, the size and strategy of the memory cache during data recovery are adjusted. For high-speed storage media (such as SSDs), the size of the memory cache is reduced because SSDs have lower access latency and higher data read and write speeds; reducing the cache can lower memory usage and avoid additional latency caused by caching. For low-speed storage media (such as HDDs), the size of the memory cache is increased because HDDs have higher access latency; increasing the cache can effectively reduce frequent disk accesses, thereby reducing read and write latency and improving data recovery efficiency.
[0112] In this embodiment, when the processor supports hardware acceleration instruction sets, increasing the computational resources for data recovery encoding methods can significantly improve data processing speed and shorten data recovery time, especially in large-scale data recovery scenarios. Adjusting memory resource usage strategies during data recovery based on the read / write speed of the storage medium—reducing memory caching for SSDs to lower system overhead, and increasing caching for HDDs to reduce read / write latency—balances storage medium performance and improves data recovery efficiency. By dynamically adjusting the use of computational and memory resources, the system can fully utilize hardware acceleration capabilities while optimizing data read / write strategies based on the storage medium's read / write speed, achieving a balance between resource utilization and performance improvement. This resource adjustment mechanism based on processor characteristics and storage medium read / write speed enhances the system's adaptability and flexibility, enabling efficient data recovery operations under different hardware configurations and improving the overall performance and user experience of the distributed storage system.
[0113] In one embodiment, such as Figure 9 As shown, step S220 determines the data recovery strategy based on the number of nodes participating in data recovery simultaneously, the physical range of the nodes called for data recovery, the encoding method used for data recovery, and the memory resources occupied by data recovery. This includes steps S900-S930:
[0114] Step S900: Identify multiple target nodes associated with the node to be recovered within the physical range of the node invoked for data recovery.
[0115] In this process, the data blocks stored in multiple target nodes are associated with the data blocks to be recovered in the node to be recovered.
[0116] Specifically, before data recovery, the primary task is to determine which nodes store data blocks that are associated with the data blocks to be recovered from the node to be recovered. These nodes are called target nodes. Selecting appropriate target nodes ensures a smooth data recovery process while minimizing unnecessary network transmission and wasted computing resources.
[0117] For example, in a distributed storage system, a metadata service or directory service is responsible for recording the distribution location of data blocks. When it is detected that a data block on a certain node needs to be recovered, the system queries the metadata service to find all target nodes that store backups or verification information for this data block. The process of determining target nodes may include searching based on the unique identifier of the data block, or it may include analyzing the correlation of data blocks, such as in an erasure coding system, finding the complete set of data blocks required to participate in the data recovery. Target nodes are the nodes used to transfer data blocks associated with the data block to be recovered during the data recovery process.
[0118] Step S910: Based on the determined number of nodes participating in data recovery simultaneously, select multiple target nodes from among the multiple target nodes to simultaneously transmit the data blocks associated with the data blocks to be recovered of the node to be recovered.
[0119] Specifically, once the set of target nodes that can participate in data recovery is determined, the system will select a certain number of target nodes to transmit data blocks simultaneously based on the current computing and network resource status, in order to accelerate the data recovery process and avoid excessive resource consumption.
[0120] For example, assuming the system determines that the number of nodes that can be invoked simultaneously is N, then N nodes are selected from the target nodes for parallel transmission. The system monitors network bandwidth and processor utilization in real time to ensure that parallel transmission does not lead to resource bottlenecks, such as network congestion or CPU overload.
[0121] When selecting a target node for transmission, factors such as the node's network location, current load, and the size and type of data blocks can be considered to achieve the optimal transmission strategy.
[0122] Step S920: Based on the determined data recovery, the memory resources occupied are allocated from the memory of the distributed storage system to store the data blocks transmitted by multiple target nodes.
[0123] Specifically, to ensure efficient data processing during data recovery, the system allocates specific memory space based on available memory resources and the requirements of the data recovery strategy to store data blocks transferred from the target node. This step helps reduce disk read / write operations, improves data access speed, and thus accelerates the data recovery process.
[0124] Step S930: Encode the data blocks transmitted by multiple target nodes according to the encoding method used for data recovery to calculate the data blocks to be recovered.
[0125] Specifically, the system processes the transmitted data blocks according to a pre-determined encoding method to calculate the data blocks to be recovered. The choice of encoding method depends on various factors, including whether the processor supports hardware acceleration instruction sets and the read / write speed of the storage medium, aiming to optimize data recovery.
[0126] For example, if a first encoding method (such as hardware-accelerated RS encoding) is determined to be used, the encoding operation is performed using an accelerated instruction set. Alternatively, a second encoding method (such as regenerative encoding) can be selected based on the resource status, the data block is preprocessed to generate an expanded data block, and then the encoding operation is performed. During the encoding process, the system monitors the status of computing resources in real time and adjusts the encoding strategy as necessary to ensure optimal resource utilization while guaranteeing the efficiency of data recovery.
[0127] In this embodiment, by precisely matching computing, network, and memory resources, efficient data recovery operations are ensured while avoiding resource contention or waste, thus guaranteeing normal business operations. Dynamically adjusting memory space size based on actual data recovery needs improves data access speed and processing efficiency, especially when processing large numbers of data blocks. The choice of encoding method considers hardware characteristics and storage media performance differences, enabling the system to implement optimal data recovery strategies for different scenarios, enhancing its adaptability and robustness in complex environments. Before data recovery, the system intelligently determines the target nodes associated with the data blocks to be recovered, optimizing the starting point of data recovery. Subsequently, by rationally scheduling node transmission time and parallel processing, rapid aggregation of data blocks is achieved. In terms of memory resource management, dynamically allocating memory space to store data blocks reduces disk access and accelerates data processing. Finally, the choice of encoding method fully considers the differences in hardware characteristics and storage media, ensuring the optimization of the data recovery process. The entire process, through dynamic adjustment of resources and strategies, not only significantly improves the speed of data recovery but also maintains stable system operation and efficient processing capabilities even in resource-constrained or load-fluctuating environments.
[0128] In one embodiment, such as Figure 10 As shown, after executing the determined data recovery strategy in step S220 to recover the data of the node to be recovered, the method further includes: steps S1000-S1010:
[0129] Step S1000: During the execution of the determined data recovery strategy, monitor the current resource status of the distributed storage system.
[0130] Specifically, during the execution of the data recovery strategy, the system continuously monitors resource status, including network bandwidth utilization, CPU utilization, storage node utilization, and memory usage, to ensure that the execution of the strategy does not cause resource bottlenecks or affect business performance.
[0131] For example, the real-time resource probe module continuously tracks key indicators such as network bandwidth utilization, CPU utilization, storage load rate, and packet loss rate. At fixed time intervals (e.g., 5 seconds), the system collects resource status data. If the resource status exceeds a preset threshold, a notification is immediately sent to the decision-making module.
[0132] Step S1010: Adjust the data recovery strategy according to the current resource status of the distributed storage system.
[0133] The adjustments to the data recovery strategy include adjusting the physical scope, the number of nodes, the size of the allocated memory space, and the encoding method used.
[0134] Specifically, based on the real-time monitored resource status, the system dynamically adjusts the data recovery strategy to cope with resource shortages and ensure a balance between data recovery operations and system performance.
[0135] For example, when network bandwidth utilization exceeds 40% or CPU utilization exceeds 50%, the strategy switches from parallel repair to tiered repair to reduce resource contention between the network and CPU. If network bandwidth utilization reaches 60% or packet loss exceeds 0.1%, the data acquisition path is adjusted from cross-rack repair to local repair, triggering a topology reorganization algorithm to optimize data transmission paths and avoid network bottlenecks. When CPU utilization approaches 70%, the use of dedicated core group isolation is reduced, and a hybrid processing mode is switched to avoid CPU overload. The memory caching strategy is dynamically adjusted based on the read / write speed of the storage medium to optimize memory usage efficiency during data recovery. For example, if the initial state shows bandwidth at 25%, CPU at 30%, storage load at 20%, and packet loss at 0.05%, the data recovery strategy could be parallel repair + cross-topology node calls + RS encoding + isolation using an independent cache area. After data repair is executed, bandwidth rises to 55% and CPU reaches 55%. After a period of time, the storage load jumped to 85%, exceeding the threshold. The strategy was adjusted to use local call nodes for repair and regeneration code encoding, which constrained the repair traffic within the fault domain. When the CPU utilization reached the 95% limit, the system enabled full-policy protection, adjusted the repair strategy to tiered repair, adjusted the data acquisition path dimension to local call nodes, switched the encoding algorithm to RS standard encoding, and adjusted the computing resource allocation to a hybrid mode, so that the resources fell back to a safe level.
[0136] In this embodiment, data recovery strategies are monitored and dynamically adjusted in real time to ensure that strategy execution matches resource status, avoiding resource bottlenecks and contention, and improving resource utilization. The strategy adjustment mechanism can select the optimal data recovery strategy based on the current resource status of the system, such as using parallel repair to improve speed when resources are sufficient, and switching strategies to avoid performance impact when resources are scarce. Dynamic strategy adjustment avoids business delays or interruptions caused by excessive resource consumption, maintaining business continuity and system stability. The system can adaptively adjust data recovery strategies according to changes in resource status, improving the flexibility and adaptability of the distributed storage system in the face of resource fluctuations and changes in business needs. When executing data recovery strategies, by monitoring resource status in real time (including network bandwidth, CPU and storage node utilization, and memory usage), the system can promptly detect signs of resource bottlenecks. Once resource scarcity is detected, the system immediately adjusts the data recovery strategy, such as switching from parallel repair to tiered repair to reduce resource contention, shifting from cross-rack repair to local repair and triggering topology reorganization to optimize data transmission paths, or switching from dedicated core group isolation to a hybrid processing mode to avoid CPU overload. This dynamic adjustment mechanism ensures that data recovery operations can be performed efficiently when resources are plentiful, while intelligently adjusting strategies when resources are scarce to avoid impacting business performance.
[0137] In one embodiment, step S1010 involves adjusting the data recovery strategy based on the current resource status of the distributed storage system. This includes:
[0138] Adjust the physical range based on the current network bandwidth utilization and network packet loss rate of the distributed storage system.
[0139] For example, when network bandwidth utilization is below 60% and packet loss rate is below 0.1%, a cross-rack data acquisition path is selected to reduce repair traffic. If network bandwidth is strained or packet loss rate exceeds the threshold, a fallback to a local repair path is implemented, prioritizing the use of local resources for data recovery, and potentially triggering topology reconfiguration to optimize transmission.
[0140] Additionally, the number of nodes can be adjusted based on the current network bandwidth utilization and processor utilization of the distributed storage system.
[0141] For example, when network bandwidth utilization is below 40% and CPU utilization is below 50%, a parallel repair strategy is enabled to accelerate data recovery. If network bandwidth utilization and CPU utilization are close to the threshold, a tiered repair strategy is switched to avoid resource contention.
[0142] Furthermore, the encoding method is adjusted based on the current network bandwidth utilization and processor utilization of the distributed storage system.
[0143] For example, when network bandwidth utilization is below 40% and CPU utilization is below 60%, standard RS encoding is used to reduce data transmission volume. In situations of limited network resources, regenerable code encoding is switched to reduce network load through linear computation, while avoiding excessive CPU consumption.
[0144] In addition, the size of the allocated memory space is adjusted based on the current processor utilization and storage node utilization of the distributed storage system.
[0145] For example, when CPU utilization is below 70%, a dedicated core group is allocated for encoding and decoding processing to optimize computational efficiency. When storage node utilization is below 80%, a dedicated memory buffer is created to accelerate data reconstruction and improve performance. When CPU and storage resources are strained, the system automatically switches to a hybrid mode to ensure reasonable allocation and application of resources and avoid system overload.
[0146] In this embodiment, the resource status of the distributed storage system is monitored in real time, including changes in network bandwidth, CPU utilization, storage node utilization, and packet loss rate, enabling accurate identification of resource bottlenecks and the root causes of efficiency problems. Based on intelligent analysis of resource status, the system can dynamically adjust data recovery strategies. For example, it can enable parallel repair to improve speed when resources are sufficient, switch to tiered repair to avoid contention when resources are scarce, select cross-rack or local repair paths to optimize data acquisition, and adopt standard RS encoding or regenerated code encoding under appropriate conditions to ensure that data recovery efficiency is not affected by resource limitations. Simultaneously, through adaptive computing resource allocation, CPU and memory resources are rationally utilized to avoid system overload and maintain normal business operations. This dynamic strategy adjustment mechanism not only improves the speed and efficiency of data recovery but also enhances system stability.
[0147] In one embodiment, the method further includes:
[0148] During the data recovery process, the resource status of the distributed storage system is continuously monitored.
[0149] If fluctuations in the resource status of the distributed storage system exceed a preset range, the current data recovery strategy will remain unchanged for a preset period of time.
[0150] Specifically, during the execution of the data recovery strategy, if fluctuations in the resource status of the distributed storage system are detected (such as sudden changes in network bandwidth, CPU utilization, and storage node utilization, such as a sudden 25% increase in bandwidth usage after enabling parallel repair), the system will enter observation mode. For a preset duration (such as 5 minutes), the current data recovery strategy will remain unchanged, and no fault will be reported, in order to avoid frequent adjustments to the strategy causing system oscillations or unstable data processing.
[0151] For example, resource status is monitored, and once fluctuations are detected, the resource status stabilizer component is activated, setting a quiet period. During the quiet period, even if the resource status continues to fluctuate, the data recovery strategy remains unchanged, and data recovery tasks continue to be executed according to the original strategy. System logs, threshold monitoring, and resource management modules are used to continuously track and record resource status, ensuring that reasonable strategy adjustments are made after the quiet period ends.
[0152] After a preset time period, the data recovery strategy is adjusted based on the current resource status of the distributed storage system.
[0153] Specifically, after a preset period of silent observation, if the resource status continues to fluctuate or reaches a preset threshold, the system will reassess the current data recovery strategy and make necessary adjustments based on the resource status. This step ensures that the strategy adjustment is based on stable and continuous changes in resource status, rather than short-lived transient fluctuations.
[0154] For example, after the quiet period ends, the resource status stabilizer module analyzes the monitoring data of the resource status to determine whether the conditions for policy adjustment have been met. Based on the analysis results, the decision module outputs new data recovery policy parameters, such as changing the repair strategy, data acquisition path, encoding method, or computing resource allocation. The execution layer adjusts the data recovery operation according to the new policy parameters to ensure optimal utilization of system resources while maintaining business stability and data recovery efficiency.
[0155] In this embodiment, a preset quiet period is introduced to temporarily freeze data recovery strategy adjustments when resource status fluctuates. This avoids system oscillations that may be caused by frequent strategy changes, ensuring the stability and continuity of the data recovery process. After the quiet period, the system can intelligently adjust the data recovery strategy based on continuous changes in resource status, ensuring optimal resource utilization and improving data recovery efficiency under resource constraints. The combination of the quiet observation mechanism and resource status responsiveness effectively avoids interference from short-term resource fluctuations on the data recovery strategy while ensuring timely adjustment of the strategy when long-term resource changes occur, achieving a dynamic balance between system performance and stability.
[0156] In one embodiment, the method further includes: dynamically constructing optimal neighbor node transmission links based on node connection heatmaps.
[0157] Initialize the node connection heatmap.
[0158] Specifically, a node connectivity heatmap is a chart that reflects the connection strength and data transmission efficiency between nodes in a distributed storage system. Initializing the heatmap is the first step in building the transmission link, which requires collecting real-time data such as network latency, bandwidth usage, and packet loss rate between all nodes.
[0159] For example, when the system starts up, network topology data is collected using network probing tools or network monitoring software. Data such as network latency, bandwidth utilization, and packet loss rate between all nodes are integrated into a node connection heatmap, where the intensity of color or numerical value indicates the quality of connection.
[0160] Update the node connection heatmap.
[0161] Specifically, the network state between nodes changes over time. Regularly updating the node connection heatmap to reflect the latest network connectivity is crucial for dynamically building optimal transmission links.
[0162] For example, an update frequency (e.g., every 200 milliseconds) is set to periodically remeasure network latency, bandwidth, and packet loss rate between nodes. The data in the heatmap is then updated to reflect the latest state of connectivity between nodes.
[0163] Analyze the node connection heatmap.
[0164] Specifically, the purpose of analyzing the heatmap is to find the neighboring node with the highest data transmission efficiency under the current network conditions, so as to provide basic data for data recovery strategies.
[0165] For example, image processing algorithms or machine learning models can be applied to analyze heatmaps to identify node pairs with the lowest network latency, highest bandwidth utilization, and lowest packet loss rate. For each data block to be recovered, a network state score for its associated neighboring nodes is calculated; this score can be a weighted average or a comprehensive score of the aforementioned network metrics.
[0166] Construct the optimal neighbor node transmission link based on the analysis results.
[0167] Specifically, based on the analysis results of the node connection heatmap, the system can intelligently select the neighboring node with the best data transmission efficiency during the data recovery process, build a transmission link, and improve the speed and success rate of data recovery.
[0168] Perform data transmission.
[0169] Specifically, once the optimal neighbor node transmission link is established, the system will begin transmitting data blocks through this link to achieve efficient data recovery.
[0170] The optimal neighbor node transmission link refers to the data transmission path between neighbor nodes with the highest data transmission efficiency, which is intelligently selected by the system based on network status analysis, in order to accelerate the data recovery process.
[0171] In this embodiment, the selection of the optimal transmission link significantly reduces data transmission latency and packet loss, accelerates data block recovery, and reduces the total data recovery time. The dynamically constructed transmission link can intelligently avoid network congestion nodes, rationally utilize network resources, prevent resource waste, and maintain high-efficiency system operation.
[0172] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0173] Embodiments of this application also provide a data recovery apparatus. Figure 11 This is a structural block diagram of a data recovery apparatus according to an embodiment of this application. The apparatus includes:
[0174] The resource monitoring module 1101 is used to monitor the resource status of the distributed storage system when a data recovery request is received from a node to be recovered. The resource status includes network resource status, hardware resource status, and load status.
[0175] The condition determination module 1102 is used to determine the number of nodes participating in data recovery simultaneously, the physical range of the nodes called by data recovery, the encoding method used for data recovery, and the memory resources occupied by data recovery based on the network resource status, hardware resource status, and load status.
[0176] The strategy determination module 1103 is used to determine the data recovery strategy based on the number of nodes participating in data recovery at the same time, the physical range of the nodes called by data recovery, the encoding method used in data recovery, and the memory resources occupied by data recovery.
[0177] The strategy execution module 1104 is used to execute a determined data recovery strategy to recover the data of the node to be recovered.
[0178] In an exemplary embodiment, the condition determination module 1102 is further configured to determine multiple associated nodes based on the data blocks to be recovered of the node to be recovered, wherein the data blocks stored in the multiple associated nodes are associated with the data blocks to be recovered of the node to be recovered. When the network resource status meets a first preset condition, multiple target nodes are determined from the multiple associated nodes, wherein the physical distance between the target nodes and the node to be recovered is within a first preset range. When the network resource status does not meet the first preset condition, multiple target nodes are determined from the multiple associated nodes, wherein the physical distance between the target nodes and the node to be recovered is within a second preset range. The first preset range is greater than the second preset range, and the first preset condition includes a network bandwidth utilization rate of the distributed storage system that is lower than a first threshold and a network packet loss rate that is lower than a second threshold.
[0179] In an exemplary embodiment, the condition determination module 1102 is further configured to control multiple target nodes to simultaneously transmit data blocks associated with the data blocks to be recovered of the node to be recovered, provided that the network resource status and hardware resource status meet a second preset condition. If the network resource status and hardware resource status do not meet the second preset condition, the module controls multiple target nodes to transmit data blocks associated with the data blocks to be recovered of the node to be recovered in a time-sharing manner. The second preset condition includes that the network bandwidth utilization of the distributed storage system is lower than a third threshold and the processor utilization is lower than a fourth threshold, wherein the third threshold is less than a first threshold.
[0180] In an exemplary embodiment, the condition determination module 1102 is further configured to, when the network resource status and hardware resource status meet a third preset condition, process target data blocks associated with the data blocks to be recovered of the node to be recovered transmitted by multiple target nodes using a first encoding method, wherein the first encoding method is used to perform inverse matrix operations on the multiple target data blocks to calculate the data block to be recovered based on the multiple target data blocks. When the network resource status and hardware resource status do not meet the third preset condition, a second encoding method is used to process target data blocks associated with the data blocks to be recovered of the node to be recovered transmitted by multiple target nodes using a second encoding method, wherein the second encoding method is used to combine the multiple target data blocks to obtain multiple amplified data blocks, and perform inverse matrix operations on the multiple target data blocks and the multiple amplified data blocks to calculate the data block to be recovered based on the multiple target data blocks and the multiple amplified data blocks. The third preset condition includes that the network bandwidth utilization of the distributed storage system is lower than a first threshold and the processor utilization is higher than a fifth threshold.
[0181] In an exemplary embodiment, the condition determination module 1102 is further configured to set up an independent cache area in the distributed storage system when the hardware resource status and load status meet a fourth preset condition, wherein the independent cache area is used to cache multiple target data blocks. When the hardware resource status and load status do not meet the fourth preset condition, the multiple target data blocks are stored in the hybrid memory of the distributed storage system, wherein the hybrid memory stores the multiple target data blocks and other business data. The fourth preset condition includes the processor utilization rate of the distributed storage system being lower than a sixth threshold and the storage node utilization rate being lower than a seventh threshold.
[0182] In one exemplary embodiment, the apparatus is further configured to detect the physical extent of the node distribution currently included in the distributed storage system. If the physical extent of the node distribution currently included in the distributed storage system is less than a third preset range, the number of nodes simultaneously participating in data recovery is increased. If the physical extent of the node distribution currently included in the distributed storage system is greater than or equal to the third preset range, the physical extent of the nodes invoked for data recovery is decreased.
[0183] In one exemplary embodiment, the apparatus is further configured to increase the computing resources available for the encoding method used in data recovery when it is detected that the current processor of the distributed storage system supports a hardware-accelerated instruction set. Additionally, it adjusts the memory resources used for data recovery based on the read / write speed of the storage medium used by the storage nodes of the distributed storage system.
[0184] In an exemplary embodiment, the strategy determination module 1103 is further configured to determine multiple target nodes associated with the node to be recovered within the physical range of the node invoked for data recovery, wherein the data blocks stored on the multiple target nodes are associated with the data blocks to be recovered of the node to be recovered. Based on the determined number of nodes simultaneously participating in data recovery, multiple target nodes are selected from the multiple target nodes to simultaneously transmit the data blocks associated with the data blocks to be recovered of the node to be recovered. Based on the determined memory resources occupied by data recovery, corresponding memory space is allocated from the memory of the distributed storage system to store the data blocks transmitted by the multiple target nodes. The data blocks transmitted by the multiple target nodes are encoded according to the determined encoding method used for data recovery to calculate the data blocks to be recovered.
[0185] In one exemplary embodiment, the apparatus is further configured to monitor the current resource status of the distributed storage system during the execution of a determined data recovery strategy. The data recovery strategy is adjusted based on the current resource status of the distributed storage system, wherein the adjustment methods include adjusting the physical scope, adjusting the number of nodes, adjusting the size of the allocated memory space, and adjusting the encoding method used.
[0186] For a description of the features in the embodiment of the data recovery apparatus, please refer to the relevant description in the embodiment of the data recovery method, which will not be repeated here.
[0187] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above-described data recovery method embodiments.
[0188] Embodiments of this application also provide a computer-readable storage medium storing a computer program configured to execute the steps in any of the above-described data recovery method embodiments at runtime.
[0189] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0190] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described data recovery method embodiments.
[0191] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described data recovery method embodiments.
[0192] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0193] The foregoing has provided a detailed description of a data recovery method, apparatus, electronic device, computer-readable storage medium, and computer program product provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to aid in understanding the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A data recovery method, characterized in that, Applied to a distributed storage system, the distributed storage system comprising multiple nodes, the method includes: Upon receiving a data recovery request from a node to be recovered, the resource status of the distributed storage system is monitored, including network resource status, hardware resource status, and load status. Based on the network resource status, hardware resource status, and load status, determine the number of nodes simultaneously participating in data recovery, the physical range of the nodes invoked for data recovery, the encoding method used for data recovery, and the memory resources occupied by data recovery; wherein, determining the encoding method used for data recovery based on the network resource status, hardware resource status, and load status includes: When the network resource status and the hardware resource status meet the third preset condition, a first encoding method is used to process the target data blocks transmitted by multiple target nodes that are associated with the data blocks to be recovered of the node to be recovered. The first encoding method is used to perform inverse matrix operations on the multiple target data blocks to calculate the data blocks to be recovered based on the multiple target data blocks. If the network resource status and the hardware resource status do not meet the third preset condition, the target data blocks transmitted by the multiple target nodes and associated with the data blocks to be recovered of the node to be recovered are processed by the second encoding method. The second encoding method is used to combine the multiple target data blocks to obtain multiple amplified data blocks, and to perform inverse matrix operations on the multiple target data blocks and the multiple amplified data blocks to calculate the data blocks to be recovered based on the multiple target data blocks and the multiple amplified data blocks. The third preset condition includes the network bandwidth utilization of the distributed storage system being lower than the first threshold and the processor utilization being higher than the fifth threshold. The data recovery strategy is determined based on the number of nodes participating in the data recovery simultaneously, the physical range of the nodes called by the data recovery, the encoding method used by the data recovery, and the memory resources occupied by the data recovery. The data recovery strategy is executed to recover the data of the node to be recovered.
2. The data recovery method according to claim 1, characterized in that, Based on the network resource status, the hardware resource status, and the load status, the physical range of the nodes invoked for data recovery is determined, including: Based on the data blocks to be recovered of the node to be recovered, multiple associated nodes are determined, wherein the data blocks stored in the multiple associated nodes are associated with the data blocks to be recovered of the node to be recovered; When the network resource status meets the first preset condition, the plurality of target nodes are determined from the plurality of associated nodes, wherein the physical distance between the target node and the node to be restored is within a first preset range; If the network resource status does not meet the first preset condition, multiple target nodes are determined from the multiple associated nodes, wherein the physical distance between the target nodes and the node to be restored is within a second preset range; Wherein, the first preset range is greater than the second preset range, and the first preset condition includes the network bandwidth utilization rate of the distributed storage system being lower than a first threshold and the network packet loss rate being lower than a second threshold.
3. The data recovery method according to claim 2, characterized in that, Determining the number of nodes simultaneously participating in data recovery based on the network resource status, the hardware resource status, and the load status also includes: When the network resource status and the hardware resource status meet the second preset conditions, the multiple target nodes are controlled to simultaneously transmit data blocks associated with the data blocks to be recovered of the node to be recovered; If the network resource status and the hardware resource status do not meet the second preset condition, the multiple target nodes are controlled to transmit data blocks associated with the data blocks to be recovered of the node to be recovered in a time-sharing manner. The second preset condition includes that the network bandwidth utilization of the distributed storage system is lower than a third threshold and the processor utilization is lower than a fourth threshold, wherein the third threshold is less than the first threshold.
4. The data recovery method according to claim 1, characterized in that, Based on the network resource status, the hardware resource status, and the load status, determine the memory resources required for data recovery, including: When the hardware resource status and the load status meet the fourth preset condition, an independent cache area is set in the distributed storage system, wherein the independent cache area is used to cache multiple target data blocks; If the hardware resource status and the load status do not meet the fourth preset condition, multiple target data blocks are stored in the hybrid memory of the distributed storage system, wherein the hybrid memory stores multiple target data blocks and other business data. The fourth preset condition includes the processor utilization rate of the distributed storage system being lower than the sixth threshold and the storage node utilization rate being lower than the seventh threshold.
5. The data recovery method according to any one of claims 1-4, characterized in that, The method further includes: Detect the physical extent of the node distribution currently included in the distributed storage system; If the physical range of the nodes currently included in the distributed storage system is less than a third preset range, the number of nodes participating in data recovery simultaneously will be increased. If the physical range of the nodes currently included in the distributed storage system is greater than or equal to the third preset range, the physical range of the nodes called for data recovery is reduced.
6. The data recovery method according to any one of claims 1-4, characterized in that, The method further includes: If it is detected that the current processor of the distributed storage system supports hardware acceleration instruction sets, increase the computing resources that can be called by the encoding method used for data recovery; Furthermore, the memory resources used for data recovery are adjusted according to the read / write speed of the storage medium used by the storage nodes of the distributed storage system.
7. The data recovery method according to any one of claims 1-4, characterized in that, The step of determining the data recovery strategy based on the number of nodes simultaneously participating in data recovery, the physical range of the nodes called by the data recovery, the encoding method used in the data recovery, and the memory resources occupied by the data recovery includes: Within the physical range of the node invoked for data recovery, identify multiple target nodes associated with the node to be recovered, wherein the data blocks stored in the multiple target nodes are associated with the data blocks to be recovered of the node to be recovered; Based on the determined number of nodes participating in data recovery simultaneously, multiple target nodes are selected from the plurality of target nodes to simultaneously transmit data blocks associated with the data blocks to be recovered of the node to be recovered; Based on the memory resources occupied by the determined data recovery, the corresponding memory space is allocated from the memory of the distributed storage system to store the data blocks transmitted by the multiple target nodes; The data blocks transmitted by the multiple target nodes are encoded according to the encoding method used for data recovery to calculate the data block to be recovered.
8. The data recovery method according to claim 7, characterized in that, After executing the data recovery strategy to recover the data of the node to be recovered, the method further includes: During the execution of the determined data recovery strategy, the current resource status of the distributed storage system is monitored; The data recovery strategy is adjusted according to the current resource status of the distributed storage system. The adjustment methods for the data recovery strategy include adjusting the physical scope, adjusting the number of nodes, adjusting the size of the allocated memory space, and adjusting the encoding method used.
9. The data recovery method according to claim 8, characterized in that, The step of adjusting the data recovery strategy according to the current resource status of the distributed storage system includes: The physical range is adjusted based on the current network bandwidth utilization and network packet loss rate of the distributed storage system. Furthermore, the number of nodes is adjusted based on the current network bandwidth utilization and processor utilization of the distributed storage system; Furthermore, the encoding method is adjusted based on the current network bandwidth utilization and processor utilization of the distributed storage system; Furthermore, the size of the allocated memory space is adjusted based on the current processor utilization and storage node utilization of the distributed storage system.
10. The data recovery method according to any one of claims 1-4, characterized in that, The method further includes: During the data recovery process, the resource status of the distributed storage system is continuously monitored. If the fluctuation of the resource status of the distributed storage system exceeds the preset range, the current data recovery strategy shall remain unchanged for a preset period of time.
11. A data recovery apparatus, characterized in that, include: The resource monitoring module is used to monitor the resource status of the distributed storage system when a data recovery request is received from a node to be recovered. The resource status includes network resource status, hardware resource status, and load status. The condition determination module is used to determine, based on the network resource status, the hardware resource status, and the load status, the number of nodes simultaneously participating in data recovery, the physical range of the nodes invoked for data recovery, the encoding method used for data recovery, and the memory resources occupied by data recovery; wherein, determining the encoding method used for data recovery based on the network resource status, the hardware resource status, and the load status includes: when the network resource status and the hardware resource status meet a third preset condition, using a first encoding method to process target data blocks transmitted by multiple target nodes that are associated with the data blocks to be recovered of the node to be recovered, wherein the first encoding method is used to perform inverse matrix operations on the multiple target data blocks, based on the... The data block to be recovered is calculated from multiple target data blocks. If the network resource status and the hardware resource status do not meet a third preset condition, a second encoding method is used to process the target data blocks transmitted by the multiple target nodes that are associated with the data block to be recovered of the node to be recovered. The second encoding method is used to combine multiple target data blocks to obtain multiple amplified data blocks, and to perform inverse matrix operations on the multiple target data blocks and the multiple amplified data blocks to calculate the data block to be recovered. The third preset condition includes that the network bandwidth utilization of the distributed storage system is lower than a first threshold and the processor utilization is higher than a fifth threshold. The strategy determination module is used to determine the data recovery strategy based on the number of nodes participating in the data recovery simultaneously, the physical range of the nodes called by the data recovery, the encoding method used by the data recovery, and the memory resources occupied by the data recovery. The strategy execution module is used to execute the data recovery strategy to recover the data of the node to be recovered.
12. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the method as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 10.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 10.
Citation Information
Patent Citations
Service deployment method and system in network computing environment
CN113422789A
Data recovery method, distributed storage system, device and program product
CN118394560A