Check Bit Data Update System, Method, Device, Electronic Device and Storage Medium

By determining the associated data block sets of different verification policies in the RAID-5 solid-state drive and calculating the access operation cost, selecting the optimal verification strategy for update, the problem of load imbalance is solved, the performance and stability of the storage system are improved, and the life of the hard disk is extended.

CN120085813BActive Publication Date: 2025-08-01INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510562348.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-01
Estimated Expiration
2045-04-30

AI Technical Summary

Technical Problem

In the prior art, RAID-5 solid-state drives do not consider load imbalance when updating the check bit data, resulting in data block congestion and affecting high concurrency performance and user experience.

Method used

By determining the associated data block set of different verification policies, obtaining the access operation data of each data block and calculating the access operation cost, selecting the optimal verification strategy for updates, avoiding unnecessary additional write operations, reducing data migration and garbage collection, and balancing the data block load.

Benefits of technology

It realizes uniform loading of data blocks, fully utilizes the advantages of high parallelism, improves the performance and stability of the storage system, and extends the service life of the hard disk.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120085813B_ABST
    Figure CN120085813B_ABST
Patent Text Reader

Abstract

The present disclosure provides a parity bit data update system and method, device, electronic device and storage medium. In response to a request to update target data, the controller calls a parity bit data update program preloaded in the memory; the controller determines the target data block to be written to the target data in the disk array through the parity bit data update program, and determines the associated data block set corresponding to different parity strategies based on the target data block and its storage stripe; the controller calculates the access operation cost of different parity strategies based on the access operation data; the controller selects a target parity strategy from different parity strategies based on the access operation cost, and controls the disk array to update the parity bit data of the storage stripe according to the target parity strategy. Compared with the related art, the present disclosure determines the associated data block set of different parity strategies, calculates the access operation cost, and selects the target parity strategy. This can avoid increasing the system burden due to unreasonable update strategies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of server technology, and in particular to a check digit data updating system and method, device, electronic device, and storage medium. Background Art

[0002] Redundant Array of Independent Disks (RAID) 5 effectively mitigates the risk of data loss caused by a single flash chip failure by distributing data across different hard drives and adding parity information, significantly improving data security. During the data write process, to maintain data consistency and parity bit accuracy, the system must simultaneously update the parity bit data of the RAID-5 drives when updating the target data. Traditional parity bit update mechanisms select a parity bit update method based solely on the number of additional read requests, ignoring the real-time load conditions within the SSD. This can easily lead to congestion in some data blocks while leaving others idle, effectively limiting the SSD's high concurrency performance. To ensure stripe validity within RAID-5 SSDs, all updated data must be written back to the original data blocks, further exacerbating the imbalanced load within the SSD. Highly congested data blocks can severely hinder the timely completion of user requests, resulting in long-tail latencies that exceed average latency and significantly degrade the user experience. Therefore, improving the speed of parity bit data updates is a pressing issue. Summary of the Invention

[0003] The present disclosure provides a parity bit data update system and method, apparatus, electronic device, and storage medium. The main purpose is to solve the problem of high parity bit data update delay caused by not considering the influence of other loads in the related art when updating parity bit data.

[0004] According to a first aspect of the present disclosure, a parity bit data update system is provided, comprising: a controller, a disk array, and a memory; the controller is connected to the disk array and the memory respectively;

[0005] In response to a target data update request, the controller calls a check digit data update program preloaded in the memory, the check digit data update program being embedded in a program for executing target data update storage;

[0006] The controller determines the target data block to be written to the target data in the disk array through the check bit data update program, and determines the associated data block sets corresponding to different check strategies based on the target data block and its storage stripe.

[0007] The controller obtains access operation data of data blocks in each associated data block set to calculate access operation costs of different verification strategies;

[0008] The controller selects a target verification policy from different verification policies according to the access operation cost, and controls the disk array to update the verification bit data of the storage stripe according to the target verification policy.

[0009] According to a second aspect of the present disclosure, there is provided a method for updating verification bit data, including:

[0010] In response to an update request for target data, determine a target data block to which the target data is to be written;

[0011] Based on the target data block and the storage stripe to which it belongs, determine the set of associated data blocks corresponding to different verification policies when updating the verification bit data according to different verification policies;

[0012] Obtain the access operation data of each data block in each set of associated data blocks, and calculate the access operation cost required for updating the verification bit data according to different verification policies respectively;

[0013] According to the access operation cost, select a target verification policy from different verification policies, and update the verification bit data of the storage stripe according to the target verification policy.

[0014] Optionally, based on the target data block and the storage stripe to which it belongs, determining the set of associated data blocks corresponding to different verification policies when updating the verification bit data according to different verification policies includes:

[0015] Based on the data distribution rule of the target data block and the storage stripe, determine the set of unmodified data blocks and historical verification data blocks that have a verification association with the target data block;

[0016] According to the types of different verification policies, divide the set of unmodified data blocks and historical verification data blocks to obtain the set of associated data blocks corresponding to different verification policies respectively.

[0017] Optionally, different verification policies include: a first verification policy and a second verification policy; the set of associated data blocks includes a first set of associated data blocks and a second set of associated data blocks;

[0018] According to the types of different verification policies, dividing the set of unmodified data blocks and historical verification data blocks to obtain the set of associated data blocks corresponding to different verification policies respectively includes:

[0019] If the first verification policy is adopted, select the historical verification data block and the target data block to generate a first set of associated data blocks;

[0020] If the second verification policy is adopted, select the set of unmodified data blocks to generate a second set of associated data blocks.

[0021] Optionally, obtain the access operation data of each data block in each associated data block set, and calculate the respective access operation costs required when updating the parity bit data according to different verification policies, including:

[0022] Calculate the verification update time required when updating the parity bit data according to different verification policies;

[0023] According to the access operation data, calculate the delay time caused to other requests when updating the parity bit data according to different verification policies, where the other requests are access requests unrelated to updating the parity bit data;

[0024] Based on the verification update time and the delay time, calculate the respective access operation costs corresponding to different verification policies.

[0025] Optionally, calculate the verification update time required when updating the parity bit data according to different verification policies, including:

[0026] Based on the associated data block sets corresponding to different verification policies, obtain the read request queue length of each data block in each associated data block set;

[0027] According to the read request queue length, find the longest read request queue corresponding to different verification policies respectively, and calculate the verification update time corresponding to different verification policies respectively.

[0028] Optionally, according to the read request queue length, find the longest read request queue corresponding to different verification policies respectively, and calculate the verification update time corresponding to different verification policies respectively, including:

[0029] Find the longest read request queue corresponding to the first verification policy, and calculate the verification update time corresponding to the first verification policy according to the number of read requests in the longest read request queue;

[0030] Find the longest read request queue corresponding to the second verification policy, and calculate the verification update time corresponding to the second verification policy according to the number of read requests in the longest read request queue.

[0031] Optionally, according to the access operation data, calculate the delay time caused to other requests when updating the parity bit data according to different verification policies, including:

[0032] Count the number of write requests in the associated data block sets corresponding to different verification policies respectively;

[0033] Based on the number of write requests, calculate the delay time caused to other requests when updating the parity bit data according to different verification policies respectively.

[0034] Optionally, based on the number of write requests, calculate the latency time caused to other requests when updating the parity bit data according to different verification strategies respectively, including:

[0035] Based on the number of write requests and read request time in the first associated data block set, calculate the latency time caused by the first verification strategy to other requests;

[0036] According to the number of write requests and read request time in the second associated data block set, calculate the latency time caused by the second verification strategy to other requests.

[0037] Optionally, based on the verification update time and latency time, calculate the access operation cost corresponding to different verification strategies respectively, including:

[0038] Based on the verification update time and latency time of the first verification strategy, calculate the access operation cost of the first verification strategy;

[0039] According to the verification update time and latency time of the second verification strategy, calculate the access operation cost of the second verification strategy.

[0040] Optionally, according to the access operation cost, select a target verification strategy from different verification strategies, including:

[0041] If the access operation cost of the first verification strategy is greater than or equal to that of the second verification strategy, determine the second verification strategy as the target verification strategy;

[0042] If the access operation cost of the first verification strategy is less than that of the second verification strategy, determine the first verification strategy as the target verification strategy.

[0043] Optionally, before selecting a target verification strategy from different verification strategies according to the access operation cost and updating the parity bit data of the storage stripe according to the target verification strategy, the parity bit data update method further includes:

[0044] Set the original data corresponding to the target data to an invalid state, and write the target data into the target data block to replace the original data.

[0045] According to the third aspect of the present disclosure, there is provided a parity bit data update device, including:

[0046] A first determination unit, configured to determine a target data block to which target data is to be written in response to an update request for the target data;

[0047] A second determination unit, configured to determine, based on the target data block and the storage stripe to which it belongs, the associated data block sets corresponding to different verification strategies respectively when performing parity bit data update according to different verification strategies;

[0048] A calculation unit for obtaining access operation data of each data block in each associated data block set, and calculating the respective access operation costs required when updating parity bit data according to different verification strategies.

[0049] A selection unit for selecting a target verification strategy from different verification strategies according to the access operation cost, and updating the parity bit data of the storage stripe according to the target verification strategy.

[0050] Optionally, the second determination unit includes:

[0051] A first determination module for determining an unmodified data block set and a historical parity data block that have a parity association with the target data block based on the data distribution rules of the target data block and the storage stripe.

[0052] A partitioning module for partitioning the unmodified data block set and the historical parity data block according to the types of different verification strategies to obtain associated data block sets corresponding to different verification strategies respectively.

[0053] Optionally, different verification strategies include: a first verification strategy and a second verification strategy; the associated data block sets include a first associated data block set and a second associated data block set;

[0054] The partitioning module is further configured to:

[0055] If the first verification strategy is adopted, select the historical parity data block and the target data block to generate a first associated data block set;

[0056] If the second verification strategy is adopted, select the unmodified data block set to generate a second associated data block set.

[0057] Optionally, the calculation unit includes:

[0058] A first calculation module for calculating the parity update time required when updating parity bit data according to different verification strategies respectively;

[0059] A second calculation module for calculating the delay time caused to other requests when updating parity bit data according to different verification strategies based on the access operation data, where the other requests are access requests unrelated to updating parity bit data;

[0060] A third calculation module for calculating the respective access operation costs corresponding to different verification strategies based on the parity update time and the delay time.

[0061] Optionally, the first calculation module is further configured to:

[0062] Based on the associated data block sets corresponding to different verification strategies, obtain the read request queue lengths of each data block in each associated data block set;

[0063] Based on the read request queue length, find the longest read request queues corresponding to different verification policies respectively, and calculate the verification update times corresponding to different verification policies respectively.

[0064] Optionally, based on the read request queue length, find the longest read request queues corresponding to different verification policies respectively, and calculate the verification update times corresponding to different verification policies respectively, including:

[0065] Find the longest read request queue corresponding to the first verification policy, and calculate the verification update time corresponding to the first verification policy according to the number of read requests in the longest read request queue;

[0066] Find the longest read request queue corresponding to the second verification policy, and calculate the verification update time corresponding to the second verification policy according to the number of read requests in the longest read request queue.

[0067] Optionally, the second calculation module is further configured to:

[0068] Count the number of write requests in the associated data block sets corresponding to different verification policies respectively;

[0069] Based on the number of write requests, calculate the delay times caused to other requests when updating the parity bit data according to different verification policies respectively.

[0070] Optionally, based on the number of write requests, calculate the delay times caused to other requests when updating the parity bit data according to different verification policies respectively, including:

[0071] Based on the number of write requests and the read request time in the first associated data block set, calculate the delay time caused by the first verification policy to other requests;

[0072] According to the number of write requests and the read request time in the second associated data block set, calculate the delay time caused by the second verification policy to other requests.

[0073] Optionally, the third calculation module is further configured to:

[0074] Based on the verification update time and the delay time of the first verification policy, calculate the access operation cost of the first verification policy;

[0075] According to the verification update time and the delay time of the second verification policy, calculate the access operation cost of the second verification policy.

[0076] Optionally, the selection unit includes:

[0077] A second determination module, configured to determine the second verification policy as the target verification policy when the access operation cost of the first verification policy is greater than or equal to that of the second verification policy;

[0078] A third determination module, configured to determine the first verification policy as the target verification policy when the access operation cost of the first verification policy is less than that of the second verification policy.

[0079] Optionally, the parity bit data update device further includes:

[0080] A writing unit, configured to, before selecting a target verification policy from different verification policies according to the access operation cost and updating the parity bit data of the storage stripe according to the target verification policy, set the original data corresponding to the target data to an invalid state, and write the target data into the target data block to replace the original data.

[0081] According to a fourth aspect of the present disclosure, there is provided an electronic device, including:

[0082] At least one processor; and

[0083] A memory communicatively connected to the at least one processor; wherein,

[0084] The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the parity bit data update method described in the foregoing second aspect.

[0085] According to a fifth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the parity bit data update method described in the foregoing second aspect.

[0086] According to a sixth aspect of the present disclosure, there is provided a computer program product, including a computer program, where the computer program, when executed by a processor, implements the parity bit data update method described in the foregoing second aspect.

[0087] The present disclosure provides a check bit data update system, method, device, electronic device, and storage medium, relating to the field of storage technology. Compared with the related art, the present disclosure determines the associated data block sets of different check strategies, obtains the access operation data of each data block, and calculates the access operation cost. The target check strategy is selected based on the access operation cost. This enables the system to flexibly select the optimal update method according to the actual load conditions, avoiding overloading the data blocks due to unreasonable update strategies. By accurately calculating the access operation costs of different check strategies, unnecessary additional write operations are avoided. By reasonably selecting the check strategy, redundant data migration and garbage collection operations caused by updating the check bits are reduced, the write times of the storage unit are decreased, effectively delaying the hard disk aging and prolonging its service life. Considering the access operation data of each associated data block set comprehensively, over-concentration on certain data blocks for data access and update is avoided. In this way, the workloads of each data block are more uniform, giving full play to its high parallelism advantage and improving the overall performance and stability of the storage system.

[0088] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:

[0090] Figure 1 is a schematic structural diagram of a check bit data update system provided by an embodiment of the present disclosure;

[0091] Figure 2 is a schematic flowchart of a check bit data update method provided by an embodiment of the present disclosure;

[0092] Figure 3 is a schematic flowchart of another check bit data update method provided by an embodiment of the present disclosure;

[0093] Figure 4 is a schematic structural diagram of a check bit data update device provided by an embodiment of the present disclosure;

[0094] Figure 5 is a schematic structural diagram of another check bit data update device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0095] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0096] The following describes the parity bit data updating system and method, apparatus, electronic device, and storage medium according to embodiments of the present disclosure with reference to the accompanying drawings.

[0097] Figure 1 This is a schematic diagram of the structure of a check bit data update system provided by an embodiment of the present disclosure. Figure 1 As shown, the system includes: a controller 11, a disk array 12, and a memory 13; the controller 11 is connected to the disk array 12 and the memory 13 respectively.

[0098] In response to a target data update request, the controller 11 calls a check digit data update program preloaded in the memory 13 , where the check digit data update program is embedded in a program stored for executing target data update.

[0099] In the disclosed embodiment, the parity bit data update system primarily consists of a controller 11, a disk array 12, and memory 13, all interconnected to enable data interaction and collaborative operation. Disk array 12 is built based on RAID-5 technology and employs a striped data storage mechanism, distributing data across multiple disk media. Each storage stripe contains N user data blocks and one parity bit data block, enabling data redundancy and fault tolerance. Memory 13 stores program instructions and temporary data, providing fast data access support for system operation. Controller 11, serving as the system's core control unit, coordinates data transmission and operation execution between memory 13 and disk array 12. When the system receives a request to update target data, controller 11 triggers the corresponding processing flow. First, controller 11 accesses memory 13 and invokes a preloaded parity bit data update program. This parity bit data update program does not run independently, but is embedded within the program that executes the target data update and storage, ensuring that the parity bit update operation is tightly integrated and synchronously executed with the data write operation throughout the entire target data update and storage process.

[0100] The controller 11 uses a parity bit data update program to determine the target data block to which the target data is to be written in the disk array 12. Based on the target data block and its associated storage stripe, the controller 11 determines the associated data block sets corresponding to different parity strategies. The controller 11 obtains access operation data for the data blocks in each associated data block set to calculate the access operation costs for different parity strategies.

[0101] In an embodiment of the present disclosure, the controller 11 performs a series of operations through a parity data update program. Based on the target data address information carried in the update request and in combination with the address mapping rule of the disk array 12, the controller 11 calculates and determines the specific location of the target data block to be written in the disk array 12. This process involves the address conversion module mapping and converting the logical address to the physical address, and by querying the pre-constructed address mapping table, obtaining the stripe number where the target data block is located and the offset within the stripe.

[0102] After determining the target data block, the controller 11, based on the target data block and its affiliated storage stripe, implements the logic according to the parity principle of RAID-5 and different parity strategies, and identifies and determines the set of associated data blocks corresponding to different parity strategies. Taking the common read-modify-write (RMW) and reconstruct-write (RCW) strategies as examples, for the RMW strategy, the controller 11 filters out the data blocks related to parity bit update from the stripe where the target data block is located, including the target data block, some unmodified data blocks, and historical parity data blocks; for the RCW strategy, it determines the set of data blocks used to reconstruct the parity bit from the stripe and other stripes that may be involved.

[0103] The controller 11 further obtains the access operation data of the data blocks in each set of associated data blocks. By monitoring the read request queue status and write request queue status of each disk channel of the disk array 12, it obtains data such as the number of read request queues, the number of write request queues, and the execution time of a single read request in the channel where each data block is located. Based on this data, the controller 11 uses a preset calculation model and logic to calculate the access operation cost required to update the parity data under different parity strategies respectively. For example, for the RMW strategy, considering the stripe update delay time and the delay time caused to other requests, it comprehensively calculates the increased value of its total response time as the access operation cost; the RCW strategy uses a similar calculation logic to obtain the corresponding cost.

[0104] The controller 11 selects the target parity strategy from different parity strategies according to the access operation cost, and controls the disk array 12 to update the parity data of the storage stripe according to the target parity strategy.

[0105] In an embodiment of the present disclosure, the controller 11 makes a decision based on the calculated access operation costs of different parity strategies. By comparing the costs of each strategy, if the access operation cost of the read-modify-write (RMW) strategy is lower than that of the reconstruct-write (RCW) strategy, the RMW is selected as the target parity strategy; otherwise, the RCW is selected. After determining the target parity strategy, the controller 11 sends a control instruction to the disk array 12, and controls the disk array 12 to complete the update operation of the parity data of the storage stripe according to the execution logic of the target parity strategy, ensuring data consistency and the reliability of the storage system.

[0106] Figure 2 A flowchart of a method for updating checksum data provided by an embodiment of the present disclosure.

[0107] As Figure 2 shown, the method includes the following steps:

[0108] Step 201, in response to an update request for target data, determine the target data block to which the target data is to be written.

[0109] In an embodiment of the present disclosure, during the operation of a RAID-5 based storage system, when the system receives an update request for target data, a series of data processing operations are triggered. The update request is received and preliminarily parsed by the input / output (I / O) module of the system. The I / O module determines the specific location of the target data block corresponding to the target data in the solid-state drive storage architecture based on key data such as the address information in the request. The target data block to which the target data is to be written may include more than one data block.

[0110] The solid-state drive uses flash chips for data storage. The data is organized in stripes, and each stripe contains N user data blocks and 1 checksum data block. The location information of the target data block, as a part of the stripe, is accurately identified. The system transfers the updated target data to the corresponding flash chip storage area through an internal data transfer bus. During the process of determining the target data block, the system also checks the status of the flash chip where the target data block is located and the availability of the data block. If the flash chip where the target data block is located is in a normal working state and the data block is not marked as damaged or unavailable, the system confirms that the target data block is a legitimate write target; if the flash chip fails or there is a problem with the data block, the system will, according to the fault tolerance mechanism of RAID-5, find an alternative storage location to ensure the normal writing of data and the reliability of the storage system. After the above series of operations, the system finally determines the target data block to which the target data is to be written, preparing for the subsequent data writing operation.

[0111] Step 202, based on the target data block and the storage stripe to which it belongs, determine the set of associated data blocks corresponding to different checksum strategies when updating the checksum data according to different checksum strategies.

[0112] In an embodiment of the present disclosure, after completing the operation of writing target data into its corresponding target data block, the system enters a crucial stage of determining the associated data block sets under different parity checking strategies. The storage stripe to which the target data block belongs is an important data organization unit in the RAID-5 storage mechanism, which consists of N data blocks and 1 parity bit data block. Based on the parity checking principle of RAID-5 and the implementation logic of different parity checking strategies, the system identifies and constructs sets of data blocks related to the update of the parity bit data. Taking two common parity checking strategies, namely Read Modify Write (RMW) and Reconstruct write (RCW), as examples: For the Read Modify Write (RMW) strategy: The system determines all the data blocks that need to be read and modified when updating the parity bit from the storage stripe to which the target data block belongs. Since the RMW strategy needs to obtain the original value of the target data block and the original value of the current parity block (Old Parity) when updating the parity bit, and then perform the parity bit update operation, the associated data block set usually includes the target data block. For the Reconstruct write (RCW) strategy: The system determines the data blocks required for reconstructing the parity bit from the storage stripe according to the characteristics of the RCW strategy. When the RCW strategy updates the parity bit, it generates a new parity bit by recalculating the data of the entire stripe. Therefore, the associated data block set corresponding to the RCW strategy may include multiple data blocks in the storage stripe in addition to the target data block.

[0113] During the process of determining the associated data block sets, the system utilizes the internal data management module to accurately screen out the associated data blocks corresponding to each parity checking strategy based on the metadata information of the storage stripe, the parity bit calculation rules, and the algorithm requirements of different parity checking strategies, and organizes them into corresponding set forms for subsequent acquisition of access operation data and calculation of access operation costs.

[0114] Step 203: Obtain the access operation data of each data block in each associated data block set, and calculate the respective access operation costs required when updating the parity bit data according to different parity checking strategies.

[0115] In an embodiment of the present disclosure, in a storage system based on RAID-5, after completing the determination of the associated data block sets, the system enters step 103. The core task of this step is to obtain the access operation data of each data block in each associated data block set and calculate the respective access operation costs required for updating the parity bit data under different parity checking strategies. This process is a key link in optimizing the parity bit update strategy and directly relates to the performance of the entire storage system.

[0116] The system comprehensively scans each set of associated data blocks through its internal data acquisition module. During the scanning process, for each data block within the set, the system extracts its access operation data from the relevant stored data blocks. This data includes key information such as the read request queue status and the write request queue status. For example, the read request queue status involves the number of read requests currently in the waiting-to-execute state, and the write request queue status includes the number of write requests waiting to be processed. After obtaining this data, the system calculates the access operation costs for different verification strategies respectively according to the pre-set calculation rules and logical models. In the scenario of updating parity bits in RAID-5, common verification strategies such as read-modify-write (RMW) and reconstruct-write (RCW) each have their unique calculation methods. The system will separately consider factors such as the occupancy of storage data block resources by read requests and write requests, the operation execution order, and the resulting time overhead during the process of updating parity bit data for different strategies, so as to accurately calculate the access operation costs required for each verification strategy to update parity bit data, providing accurate data support for subsequent selection of the optimal verification strategy.

[0117] Step 204, select a target verification strategy from different verification strategies according to the access operation costs, and update the parity bit data of the storage stripe according to the target verification strategy.

[0118] In the embodiments of the present disclosure, after completing the calculation of the access operation costs under different verification strategies, the system processes the calculated access operation cost data of each verification strategy. The internal decision-making mechanism of the system will screen among multiple verification strategies (such as read-modify-write (RMW) and reconstruct-write (RCW)) based on these cost data. Through comparative analysis of the costs of each strategy, the decision-making mechanism will select the strategy with the lowest access operation cost as the target verification strategy. After determining the target verification strategy, the system will perform corresponding operations to update the parity bit data of the storage stripe. The system will mobilize each component in the storage system to work together according to the established execution process and rules of the selected target verification strategy. From data reading, processing to writing, the system will sequentially complete a series of operations to ensure that the update of the parity bit data is consistent with the change of the target data, maintaining the data integrity and reliability of the storage system.

[0119] The present disclosure provides a method for updating check bit data. Compared with the related art, the present disclosure determines the associated data block sets of different check strategies, obtains the access operation data of each data block and calculates the access operation cost, and selects the target check strategy based on the access operation cost. This enables the system to flexibly select the optimal update method according to the actual load situation, avoiding overloading the data blocks due to unreasonable update strategies. By accurately calculating the access operation costs of different check strategies, unnecessary extra write operations are avoided. By reasonably selecting the check strategy, redundant data migration and garbage collection operations caused by updating the check bits are reduced, the write times of the storage unit are decreased, the hard disk aging is effectively delayed, and its service life is prolonged. By comprehensively considering the access operation data of each associated data block set, excessive concentration on certain data blocks for data access and update is avoided. In this way, the workloads of each data block are made more uniform, giving full play to its high parallelism advantage and improving the overall performance and stability of the storage system.

[0120] To clearly illustrate the embodiments of the present disclosure, this embodiment provides a schematic flowchart of another method for updating check bit data.

[0121] As Figure 3 shown, the method includes the following steps:

[0122] Step 301, in response to an update request for target data, determine the target data block to which the target data is to be written.

[0123] Specifically in step 301, the system first parses the update request and extracts the key address information therefrom. This address information follows a specific logical and physical address mapping rule and is the core basis for determining the location of the target data block. The address conversion module of the system performs an address conversion operation based on the pre-constructed address mapping table. The address mapping table details the correspondence between the logical address and the physical address. By querying this table, the system can accurately convert the logical address in the update request into a physical address, thereby obtaining the location clue of the target data in the storage stripe, that is, determining the stripe number where the target data block is located and the specific offset within the stripe.

[0124] Step 302, based on the data distribution rule of the target data block and the storage stripe, determine the set of unmodified data blocks and the historical check data blocks that have a check association with the target data block.

[0125] Specifically in step 302, when updating the target data block, it is necessary to clarify which other data blocks participate in the verification calculation to ensure data consistency and the correctness of verification update. First, according to the data distribution rules of the storage stripe (such as RAID stripe layout, erasure code row and column distribution, etc.), locate the physical or logical position of the target data block. Then, through rule parsing, identify the following two types of data that have verification association with the target data block: Set of unmodified data blocks: Other data blocks in the same storage stripe that are not affected by this update (for example, the RCW policy needs to read these data to regenerate the verification); Historical verification data blocks: The existing old verification blocks in the current storage stripe (for example, the RMW policy needs to read the old verification blocks for differential update).

[0126] Example: In a RAID 5 stripe (including data blocks D1, D2, D3 and verification block P), if D1 is updated: Set of unmodified data blocks = {D2, D3} (the RCW policy needs to read them to reconstruct the verification); Historical verification data block = {P} (the RMW policy needs to read P and calculate the difference).

[0127] Step 303, according to the types of different verification policies, divide the set of unmodified data blocks and the set of historical verification data blocks to obtain the set of associated data blocks corresponding to each different verification policy.

[0128] If the first verification policy is adopted, select the historical verification data block and the target data block to generate the first set of associated data blocks; if the second verification policy is adopted, select the set of unmodified data blocks to generate the second set of associated data blocks.

[0129] Specifically in step 303, the first verification policy is the RMW policy, and the second verification policy is the RCW policy. Step 303 allocates the required set of data blocks for different verification policies (such as RMW, RCW) to adapt to the calculation logic of different policies. Then, according to the type of verification policy, determine the division of the set of data blocks according to the policy requirements: RMW policy: Set of associated data blocks = {old target data block, historical verification data block}; RCW policy: Set of associated data blocks = {set of unmodified data blocks, new target data block}.

[0130] Suppose a stripe consists of K data blocks, which are successively , , …, . When performing stripe update, the number of read queues on each data block is successively , , …, , and the corresponding number of write queues is successively , , …, . Denote ω as the index set of all data blocks corresponding to the stripe, i.e., ω = {0, 1, …, K - 1}. is the set of associated data blocks involved in read - rewrite update, is the set of associated data blocks involved in reconstruction - rewrite update, then there is: ,

[0131] Step 304, calculate the checksum update time required when updating the checksum bit data according to different checksum strategies.

[0132] Furthermore, calculating the checksum update time required when updating the checksum bit data according to different checksum strategies includes: based on the set of associated data blocks corresponding to different checksum strategies, obtain the read request queue length of each data block in each set of associated data blocks; according to the read request queue length, find the longest read request queue corresponding to different checksum strategies respectively, and calculate the checksum update time corresponding to different checksum strategies respectively.

[0133] As a refinement of the above - mentioned embodiment, finding the longest read request queue corresponding to different checksum strategies according to the read request queue length and calculating the checksum update time corresponding to different checksum strategies respectively includes: finding the longest read request queue corresponding to the first checksum strategy, and calculating the checksum update time corresponding to the first checksum strategy according to the number of read requests in the longest read request queue; finding the longest read request queue corresponding to the second checksum strategy, and calculating the checksum update time corresponding to the second checksum strategy according to the number of read requests in the longest read request queue.

[0134] Specifically in step 304, in the RAID - 5 architecture, data is stored in multiple flash chips and organized and managed through striping. When different checksum strategies update the checksum bit data, they need to access the data blocks in their respective sets of associated data blocks, and the access efficiency of these data blocks is affected by the read request queue length. Whether using the read - rewrite (RMW) or reconstruction - rewrite (RCW) method for checksum update, it will cause the overall system response time to increase. This increased time consists of two parts: one is the direct time required to complete the stripe update, which is the time spent in the checksum update process itself; the other is the additional increase in the completion time of other requests due to the execution of the stripe update operation, that is, the delay time of other requests.

[0135] Therefore, the direct time consumed for completing stripe updates calculated in step 304. The system first initiates a process to obtain the length of the data block read request queue for the associated data block sets corresponding to different verification policies. Taking two common verification policies, read-modify-write (RMW) and reconstructive write (RCW), as examples, for the associated data block set corresponding to the RMW policy, the system traverses each data block in the set and queries the read request queue of each data block. The number of read requests waiting to be processed in each read request queue, that is, the length of the read request queue, is obtained. Similarly, for the associated data block set corresponding to the RCW policy, the system uses the same method to query the length of the read request queue of each data block in the set one by one.

[0136] After obtaining the length of the read request queue for each data block in each associated data block set, the system searches for the longest read request queue corresponding to different verification policies based on this data. For the first verification policy (assumed to be the RMW policy), the system compares in the read request queues involved in the RMW policy associated data block set. From the obtained data of the length of each read request queue, the read request queue with the largest value is found, and this queue is the longest read request queue corresponding to the RMW policy. For the second verification policy (assumed to be the RCW policy), the system searches in the read request queues of all data blocks involved in the RCW policy associated data block set in the same way to determine the longest read request queue among them.

[0137] Calculate the verification update time corresponding to the RMW policy according to the number of read requests in the longest read request queue. When calculating, assume that the execution time of a single read request is , The number of read requests in the waiting state in the i-th data block. Denote and as the stripe update delay times corresponding to read-modify-write and reconstructive write respectively. Then there is:

[0138]

[0139] During the entire calculation process, the system uses internal data management and calculation modules and operates strictly according to the above steps and formulas. The data management module is responsible for storing and providing key parameters such as the data block association information, the length data of the read request queue, and the execution time of a single read request for each data block. The calculation module then accurately calculates the verification update time corresponding to different verification policies. By accurately calculating the verification update time of different verification policies, the system provides a quantitative basis for subsequently selecting the optimal verification policy according to the time cost, which helps to optimize the verification bit update process of the RAID-5 solid-state drive and improve the overall performance and data processing efficiency of the storage system.

[0140] Step 305: Calculate the latency time caused to other requests when updating parity bit data according to different verification policies, where the other requests are access requests unrelated to the update of parity bit data.

[0141] Furthermore, calculating the latency time caused to other requests when updating parity bit data according to different verification policies includes: respectively counting the number of write requests in the associated data block sets corresponding to different verification policies; based on the number of write requests, calculating the latency time caused to other requests when updating parity bit data according to different verification policies respectively.

[0142] As a refinement of this embodiment, calculating the latency time caused to other requests when updating parity bit data according to different verification policies respectively includes: calculating the latency time caused by the first verification policy to other requests based on the number of write requests and read request time in the first associated data block set; calculating the latency time caused by the second verification policy to other requests according to the number of write requests and read request time in the second associated data block set.

[0143] Specifically in Step 305, based on the access operation data, accurately calculate the latency time caused to other requests when updating parity bit data according to different verification policies. The other requests mentioned here refer to other access requests in each data block except the current parity bit update request. When performing parity bit update, whether using the read-modify-write (RMW) or reconstructive write (RCW) policy, it will affect other access requests waiting to be processed.

[0144] The system first respectively counts the number of write requests in the associated data block sets corresponding to different verification policies. For the read-modify-write (RMW) policy, the system traverses each data block in the associated data block set corresponding to the RMW policy. Since each data block is associated with a specific stored data block, the system obtains the number of write requests currently waiting to be processed in the write request queue of the data block through the queue management module of the data block, and accumulates these numbers to obtain the total number of write requests in the associated data block set of the RMW policy. Similarly, for the reconstructive write (RCW) policy, the system performs the same operation on its corresponding associated data block set, obtains and accumulates the number of write requests in the write request queues of the data blocks where each data block is located, and obtains the total number of write requests in the associated data block set of the RCW policy.

[0145] After obtaining the number of write requests, the system calculates the latency time caused to other requests when updating parity bit data according to different verification policies based on these data. Assume that the execution time of a single read request is $t_R$, which is a key parameter for measuring the latency time.

[0146] For the first verification strategy (RMW strategy), based on the number of write requests and the read request time in the first associated data block set, calculate the delay time caused by the RMW strategy to other requests. During the execution of the RMW strategy, newly inserted read requests will cause delays to all subsequent write requests, and the delay time for each write request is exactly equal to the execution time of a read request. For the second verification strategy (RCW strategy), based on the number of write requests and the read request time in the second associated data block set, calculate the delay time caused by the RCW strategy to other requests. .

[0147] is the execution time of a single read request, is the number of write requests in the waiting state in the i-th data block. Then we have:

[0148]

[0149] Step 306: Based on the verification update time and the delay time, calculate the access operation cost corresponding to each different verification strategy.

[0150] Furthermore, based on the verification update time and the delay time, calculate the access operation cost corresponding to each different verification strategy, including: based on the verification update time and the delay time of the first verification strategy, calculate the access operation cost of the first verification strategy; according to the verification update time and the delay time of the second verification strategy, calculate the access operation cost of the second verification strategy.

[0151] Specifically in Step 306, the parity bit update operation will have various impacts on the system's operating efficiency, and the access operation cost comprehensively reflects these impacts. The system will use the previously calculated verification update time and delay time data to calculate the access operation cost for different verification strategies respectively.

[0152] For the first verification strategy (read-modify-write (RMW) strategy): In Step 304, the system has calculated the verification update time corresponding to the RMW strategy, and in Step 305, it has also obtained the delay time caused by the RMW strategy to other requests. The system comprehensively calculates these two time values according to the pre-set calculation rules to obtain the access operation cost of the RMW strategy. For the second verification strategy (reconstruct-write (RCW) strategy): Similarly, the system has obtained the verification update time corresponding to the RCW strategy and the delay time caused to other requests in the previous steps. According to the same calculation logic, add these two times to obtain the access operation cost of the RCW strategy.

[0153]

[0154] During the entire calculation process, the internal data processing module of the system will operate strictly in accordance with the above calculation logic. The data processing module will obtain the check update time and delay time data from the calculation result storage area of the previous step, and then perform operations according to the corresponding calculation formula to finally obtain the access operation costs corresponding to different check strategies. These access operation cost data will provide key quantitative basis for the subsequent system to select the target check strategy, contribute to the optimization of the check bit update process of the RAID-5 solid-state drive, and improve the overall performance and stability of the storage system.

[0155] Step 307: Select the target check strategy from different check strategies according to the access operation cost, and update the check bit data of the storage stripe according to the target check strategy.

[0156] If the access operation cost of the first check strategy is greater than or equal to that of the second check strategy, determine the second check strategy as the target check strategy; if the access operation cost of the first check strategy is less than that of the second check strategy, determine the first check strategy as the target check strategy.

[0157] Specifically in step 307, the system has separately calculated the access operation costs of the first check strategy (RMW) and the second check strategy (RCW). The decision-making module inside the system will conduct a comparative analysis of these two access operation costs. When this is the case, determine the second check strategy (RCW) as the target check strategy. This is because in this situation, when using the reconstruct write (RCW) strategy for check bit update, its occupation of system resources and impact on other requests are relatively small, and it can complete the check bit update operation more efficiently while reducing the negative impact on the overall performance of the system. On the contrary, when this is the case, the decision-making module determines that the first check strategy (RMW) is more optimal in the current situation, and thus determines the first check strategy (RMW) as the target check strategy. Selecting the read-modify-write (RMW) strategy means that during this check bit update process, the system resources it consumes and the delay it causes to other requests are relatively lower than those of the reconstruct write (RCW) strategy, which is more conducive to maintaining the efficient operation of the storage system. Once the target check strategy is determined, the system will start the update process of the storage stripe check bit data according to the execution logic of this strategy.

[0158] Furthermore, before selecting the target check strategy from different check strategies according to the access operation cost and updating the check bit data of the storage stripe according to the target check strategy, data replacement can be carried out in the following ways but not limited to: set the original data corresponding to the target data to the invalid state, and write the target data into the target data block to replace the original data.

[0159] It should be noted that multiple steps may be included in the embodiments of the present disclosure. For ease of description, these steps are numbered, but these numbers do not limit the execution time slots and execution orders between the steps; these steps can be implemented in any order, and the embodiments of the present disclosure do not make any limitations in this regard.

[0160] Corresponding to the above check bit data update method, the present disclosure also proposes a check bit data update device. Since the device embodiments of the present disclosure correspond to the above method embodiments, for the details not disclosed in the device embodiments, reference may be made to the above method embodiments, and the present disclosure will not repeat them here.

[0161] Figure 4 As shown in the structure diagram of a check bit data update device provided by an embodiment of the present disclosure, Figure 4 as shown, it includes:

[0162] A first determination unit 41, configured to determine a target data block to which target data is to be written in response to an update request of the target data;

[0163] A second determination unit 42, configured to determine, based on the target data block and the storage stripe to which it belongs, an associated data block set corresponding to each different check policy when updating check bit data according to different check policies;

[0164] A calculation unit 43, configured to obtain access operation data of each data block in each associated data block set, and calculate the access operation cost required for updating check bit data according to different check policies respectively;

[0165] A selection unit 44, configured to select a target check policy from different check policies according to the access operation cost, and update the check bit data of the storage stripe according to the target check policy.

[0166] The present disclosure provides a check bit data update device. Compared with the related art, the present disclosure determines the associated data block sets of different check policies, obtains the access operation data of each data block and calculates the access operation cost, and selects the target check policy based on the access operation cost. This enables the system to flexibly select the optimal update method according to the actual load situation, avoiding overloading the data blocks due to unreasonable update policies. By accurately calculating the access operation cost of different check policies, unnecessary additional write operations are avoided. By reasonably selecting the check policy, redundant data migration and garbage collection operations caused by updating the check bit are reduced, the write times of the storage unit are reduced, the hard disk aging is effectively delayed, and its service life is extended. By comprehensively considering the access operation data of each associated data block set, excessive concentration on certain data blocks for data access and update is avoided. In this way, the workloads of each data block are more uniform, giving full play to its high parallelism advantage, and improving the overall performance and stability of the storage system.

[0167] Further, in a possible implementation manner of this embodiment, as Figure 5 shown, the second determination unit 42 includes:

[0168] A first determination module 421, configured to determine an unmodified data block set and a historical check data block that have a check association with the target data block based on the data distribution rule of the target data block and the storage stripe;

[0169] A division module 422, configured to divide the unmodified data block set and the historical check data block according to the types of different check policies, so as to obtain an associated data block set corresponding to each different check policy.

[0170] Further, in a possible implementation manner of this embodiment, different check policies include: a first check policy and a second check policy; the associated data block set includes a first associated data block set and a second associated data block set;

[0171] The division module 422 is further configured to:

[0172] If the first check policy is adopted, select the historical check data block and the target data block to generate a first associated data block set;

[0173] If the second check policy is adopted, select the unmodified data block set to generate a second associated data block set.

[0174] Further, in a possible implementation manner of this embodiment, as Figure 5 shown, the calculation unit 43 includes:

[0175] A first calculation module 431, configured to calculate the check update time required for updating the check bit data according to different check policies respectively;

[0176] A second calculation module 432, configured to calculate the delay time caused to other requests when updating the check bit data according to different check policies respectively based on the access operation data, where the other requests are access requests unrelated to updating the check bit data;

[0177] A third calculation module 433, configured to calculate the access operation cost corresponding to each different check policy based on the check update time and the delay time.

[0178] Further, in a possible implementation manner of this embodiment, the first calculation module 431 is further configured to:

[0179] Based on the associated data block sets corresponding to different check policies, obtain the read request queue lengths of the data blocks in each associated data block set;

[0180] According to the length of the read request queue, find the longest read request queues corresponding to different verification policies respectively, and calculate the verification update times corresponding to different verification policies respectively.

[0181] Further, in a possible implementation manner of this embodiment, according to the length of the read request queue, finding the longest read request queues corresponding to different verification policies respectively, and calculating the verification update times corresponding to different verification policies respectively includes:

[0182] Find the longest read request queue corresponding to the first verification policy, and calculate the verification update time corresponding to the first verification policy according to the number of read requests in the longest read request queue;

[0183] Find the longest read request queue corresponding to the second verification policy, and calculate the verification update time corresponding to the second verification policy according to the number of read requests in the longest read request queue.

[0184] Further, in a possible implementation manner of this embodiment, the second calculation module 332 is further configured to:

[0185] Count the number of write requests in the associated data block sets corresponding to different verification policies respectively;

[0186] Based on the number of write requests, calculate the delay times caused to other requests when updating the parity bit data according to different verification policies respectively.

[0187] Further, in a possible implementation manner of this embodiment, based on the number of write requests, calculating the delay times caused to other requests when updating the parity bit data according to different verification policies respectively includes:

[0188] Based on the number of write requests and the read request time in the first associated data block set, calculate the delay time caused by the first verification policy to other requests;

[0189] According to the number of write requests and the read request time in the second associated data block set, calculate the delay time caused by the second verification policy to other requests.

[0190] Further, in a possible implementation manner of this embodiment, the third calculation module 433 is further configured to:

[0191] Based on the verification update time and the delay time of the first verification policy, calculate the access operation cost of the first verification policy;

[0192] According to the verification update time and the delay time of the second verification policy, calculate the access operation cost of the second verification policy.

[0193] Further, in a possible implementation manner of this embodiment, as Figure 5 shown, the selection unit 44 includes:

[0194] A second determination module 441, configured to determine the second verification policy as the target verification policy when the access operation cost of the first verification policy is greater than or equal to that of the second verification policy;

[0195] A third determination module 442, configured to determine the first verification policy as the target verification policy when the access operation cost of the first verification policy is less than that of the second verification policy.

[0196] Further, in a possible implementation manner of this embodiment, as Figure 5 shown, the parity bit data update device further includes:

[0197] A writing unit 45, configured to set the original data corresponding to the target data to an invalid state and write the target data into the target data block to replace the original data before selecting the target verification policy from different verification policies according to the access operation cost and updating the parity bit data of the storage stripe according to the target verification policy.

[0198] It should be noted that the foregoing explanations of the method embodiments are also applicable to the device in this embodiment, with the same principle, and will not be limited in this embodiment.

[0199] For the descriptions of the features in the embodiments corresponding to the parity bit data update device, reference can be made to the relevant descriptions in the embodiments corresponding to the parity bit data update method, which will not be elaborated here one by one.

[0200] An embodiment of the present application further provides an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the foregoing embodiments of the parity bit data update method.

[0201] An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the steps in any one of the foregoing embodiments of the parity bit data update method when running.

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

[0203] An embodiment of the present application further provides a computer program product, where the computer program product includes a computer program, and the computer program, when executed by a processor, implements the steps in any one of the foregoing embodiments of the parity bit data update method.

[0204] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in any of the above-described embodiments of the check bit data update method are implemented.

[0205] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner 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 to exceed the scope of the present application.

[0206] The above has introduced in detail a check bit data update system, method, device, electronic device, and storage medium provided by the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A check bit data update system, characterized in that, The system includes: a controller, a disk array, and a memory, wherein the disk array is configured as a RAID-5 architecture; the controller is connected to the disk array and the memory respectively; In response to a target data update request, the controller calls a check digit data update program preloaded in the memory, the check digit data update program being embedded in a program for executing the target data update storage; The controller determines, through the check bit data update program, a target data block to be written by the target data in the disk array, and determines, based on the target data block and its corresponding storage stripe, a set of associated data blocks corresponding to different check strategies; The controller obtains access operation data of data blocks in each associated data block set to calculate access operation costs of the different verification strategies, including: Calculating the check update time required when updating the check bit data according to the different check strategies; Calculating, based on the access operation data, delay times caused to other requests when updating the check bit data according to the different check strategies, wherein the other requests are access requests unrelated to updating the check bit data; Calculating access operation costs corresponding to the different verification strategies based on the verification update time and the delay time; The controller selects a target check strategy from the different check strategies according to the access operation cost, and controls the disk array to update the check bit data of the storage stripe according to the target check strategy.

2. A method for updating check bit data, characterized in that, include: In response to a request to update target data, determining a target data block to which the target data is to be written; Based on the target data block and the storage stripe to which it belongs, determining associated data block sets corresponding to the different verification strategies when updating the verification bit data according to the different verification strategies; Obtaining access operation data of each data block in each of the associated data block sets, and calculating the respective access operation costs required when updating the check bit data according to the different check strategies; The obtaining of access operation data of each data block in each associated data block set and calculating the respective access operation costs required when updating the check bit data according to the different check strategies respectively include: Calculating the check update time required when updating the check bit data according to the different check strategies; Calculating, based on the access operation data, delay times caused to other requests when updating the check bit data according to the different check strategies, wherein the other requests are access requests unrelated to updating the check bit data; Calculating access operation costs corresponding to the different verification strategies based on the verification update time and the delay time; A target check strategy is selected from the different check strategies according to the access operation cost, and the check bit data of the storage stripe is updated according to the target check strategy.

3. The check bit data update method according to claim 2, wherein, The determining, based on the target data block and the storage stripe to which it belongs, sets of associated data blocks corresponding to the different verification strategies when updating the verification bit data according to the different verification strategies includes: Determine an unmodified data block set and historical parity data blocks that have parity association with the target data block based on the data distribution rule of the target data block and the storage stripe; Divide the unmodified data block set and historical parity data blocks according to the types of different parity strategies to obtain the associated data block sets corresponding to the different parity strategies respectively.

4. The check bit data update method according to claim 3, wherein The different parity strategies include: a first parity strategy and a second parity strategy; the associated data block sets include a first associated data block set and a second associated data block set; The dividing the unmodified data block set and historical parity data blocks according to the types of different parity strategies to obtain the associated data block sets corresponding to the different parity strategies respectively includes: If the first parity strategy is adopted, select the historical parity data blocks and the target data block to generate the first associated data block set; If the second parity strategy is adopted, select the unmodified data block set to generate the second associated data block set.

5. The check bit data update method according to claim 4, wherein The calculating the parity update time required for updating the parity bit data according to the different parity strategies respectively includes: Based on the associated data block sets corresponding to the different parity strategies, obtain the read request queue lengths of each data block in each associated data block set; According to the read request queue lengths, find the longest read request queues corresponding to the different parity strategies respectively, and calculate the parity update times corresponding to the different parity strategies respectively.

6. The check bit data update method according to claim 5, wherein The according to the read request queue lengths, finding the longest read request queues corresponding to the different parity strategies respectively, and calculating the parity update times corresponding to the different parity strategies respectively includes: Find the longest read request queue corresponding to the first parity strategy, and calculate the parity update time corresponding to the first parity strategy according to the number of read requests in the longest read request queue; Find the longest read request queue corresponding to the second parity strategy, and calculate the parity update time corresponding to the second parity strategy according to the number of read requests in the longest read request queue.

7. The check bit data update method according to claim 6, characterized in that, The calculating the delay time caused to other requests when updating the parity bit data according to the different parity strategies respectively based on the access operation data includes: Count the number of write requests in the associated data block sets corresponding to the different parity strategies respectively; Based on the number of write requests, calculate the delay time caused to other requests when updating the parity bit data according to the different parity strategies respectively.

8. The check bit data update method according to claim 7, wherein The based on the number of write requests, calculating the delay time caused to other requests when updating the parity bit data according to the different parity strategies respectively includes: Based on the number of write requests and read request time in the first associated data block set, calculate the delay time caused by the first parity strategy to other requests; According to the number of write requests and read request time in the second associated data block set, calculate the delay time caused by the second parity strategy to other requests.

9. The check bit data update method according to any one of claims 5-8, characterized in that, The calculating the access operation costs corresponding to the different parity strategies respectively based on the parity update time and the delay time includes: Calculate the access operation cost of the first verification policy based on the verification update time and delay time of the first verification policy; Calculate the access operation cost of the second verification policy according to the verification update time and delay time of the second verification policy.

10. The check bit data update method according to claim 9, wherein The selecting the target verification policy from the different verification policies according to the access operation cost includes: If the access operation cost of the first verification policy is greater than or equal to that of the second verification policy, determine the second verification policy as the target verification policy; If the access operation cost of the first verification policy is less than that of the second verification policy, determine the first verification policy as the target verification policy.

11. The check bit data update method according to claim 2, characterized in that, Before selecting the target verification policy from the different verification policies according to the access operation cost and updating the parity bit data of the storage stripe according to the target verification policy, the parity bit data updating method further includes: Set the original data corresponding to the target data to an invalid state, and write the target data into the target data block to replace the original data.

12. A check bit data update device, characterized in that Includes: The first determination unit is configured to determine the target data block to which the target data is to be written in response to an update request of the target data; The second determination unit is configured to determine the associated data block sets corresponding to the different verification policies respectively when updating the parity bit data according to different verification policies based on the target data block and the storage stripe to which it belongs; The calculation unit is configured to obtain the access operation data of each data block in each associated data block set, and calculate the access operation cost required for updating the parity bit data according to the different verification policies respectively; The obtaining the access operation data of each data block in each associated data block set and calculating the access operation cost required for updating the parity bit data according to the different verification policies respectively includes: Calculate the verification update time required for updating the parity bit data according to the different verification policies respectively; According to the access operation data, calculate the delay time caused to other requests when updating the parity bit data according to the different verification policies respectively, where the other requests are access requests unrelated to updating the parity bit data; Based on the verification update time and the delay time, calculate the access operation cost corresponding to each of the different verification policies; The selection unit is configured to select a target verification policy from the different verification policies according to the access operation cost, and update the parity bit data of the storage stripe according to the target verification policy.

13. An electronic device, characterized in that, Includes: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the parity bit data updating method according to any one of claims 2-11.

14. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the parity bit data updating method according to any one of claims 2-11.

Citation Information

Patent Citations

  • Method and device for updating check block

    CN108717383A