Parallel block management method and device, computer equipment and storage medium

By dynamically managing composite blocks and parallel blocks in solid-state drives, the waste of storage space and performance imbalance caused by bad blocks is solved, and more efficient storage space utilization and performance balance is achieved.

CN119025439APending Publication Date: 2024-11-26SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411211246.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

Due to the existence of bad blocks in solid-state drives, spare blocks are reserved on each plane to avoid bad blocks, resulting in waste of storage space and write enlargement, and the use of storage space cannot be maximized.

Method used

By forming multiple planes on the same wafer into composite blocks, and counting the number of bad blocks when the solid-state drive is powered on for the first time, putting them into the classification pool, combining parallel blocks according to the number of bad blocks, and when the number of idle parallel blocks is Recombinate when it is less than the threshold, and decompose parallel blocks to re-place them into the resource pool during garbage collection, and dynamically manage bad blocks to achieve the balance of bad blocks.

Benefits of technology

The basic balance of the number of bad blocks on each parallel block is achieved, which avoids space reservation, improves the space utilization of solid-state drives, and reduces performance imbalance and space waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025439A_ABST
    Figure CN119025439A_ABST
Patent Text Reader

Abstract

The invention relates to a parallel block management method and device, computer equipment and a storage medium, and relates to the technical field of solid state disks. According to the method, the idle composite blocks on each wafer are placed in different idle resource pools according to the number of the bad blocks, when the parallel blocks are constructed, one idle composite block is selected from the idle resource pool of each channel according to the number of the bad blocks to be subjected to dislocation combination to obtain the new parallel blocks, and the dynamic parallel block management scheme is adopted, so that the dynamic parallel block management efficiency is improved. According to the scheme, the number of bad blocks on each parallel block can be basically balanced, so that performance balance is realized, and meanwhile, space reservation on a flash memory chip is not needed by applying the scheme, so that the space utilization rate of the solid state disk is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of solid-state hard disks, and in particular to a parallel block management method, apparatus, computer equipment, and storage medium. Background Art

[0002] In order to improve write performance, the design of solid-state drives (SSDs) usually distributes the host's write commands to different wafers (DIEs) of the flash memory to improve write concurrency, allowing all wafers to be programmed concurrently at the same time to improve read and write performance. A common method is to group the blocks with the same serial number on each wafer into a parallel block, and block management on the solid-state drive is performed in units of parallel blocks.

[0003] For flash memory chips, there will be more or less bad blocks when they leave the factory, and new bad blocks will be added during use. In order to solve the problem that the wafer (DIE) cannot be programmed on multiple planes due to the presence of bad blocks, some blocks are generally reserved on each plane as spare blocks. When bad blocks appear on the group, they are mapped using reserved blocks. However, reserving blank blocks in advance will waste a certain amount of reserved space, fail to maximize the use of storage space, and cause a certain amount of write amplification. Summary of the invention

[0004] Based on this, a parallel block management method, device, computer equipment and storage medium are provided to solve the technical problem that a solid-state hard disk reserves spare blocks on each plane to avoid bad blocks, which will waste a certain amount of reserved space, fail to maximize the use of storage space, and cause a certain amount of write amplification.

[0005] In one aspect, a parallel block management method is provided, the method comprising:

[0006] The blocks with the same serial number on multiple planes of the same wafer on all channels of the solid-state hard disk are grouped into a composite block, the number of bad blocks of all composite blocks in the data storage area of ​​the solid-state hard disk is counted when the solid-state hard disk is powered on for the first time, and the composite block number on each wafer is put into a corresponding classification pool according to the number of bad blocks;

[0007] Selecting one composite block from each wafer on each channel of the solid state drive and combining them into a parallel block;

[0008] When the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block.

[0009] In one embodiment, the step of counting the number of bad blocks of all composite blocks in the data storage area of ​​the solid state drive when the solid state drive is powered on for the first time and placing the composite block number on each wafer into a corresponding classification pool according to the number of bad blocks includes:

[0010] Let the number of planes on each wafer be N, then a classification pool with N + 1 idle blocks is set on each wafer;

[0011] Put the composite block with k bad blocks on wafer n of channel m into the classification pool C(m)_D(n)_Pool(k), where C() represents the channel, m is the channel number, D() represents the wafer, n is the wafer number, Pool() represents the classification pool, and k ≤ N + 1.

[0012] In one embodiment, the step of recombining parallel blocks when the number of combined idle parallel blocks is less than a preset threshold, and selecting one composite block from each wafer's classification pool to form a new parallel block includes:

[0013] Describe all the classification pools as a set of integers, where the integers in the set represent the numbers of composite blocks, and use P(i,k) to represent the set of numbers of composite blocks with k bad blocks on the target wafer of the i-th channel;

[0014] Statistically calculate the total number B of bad blocks in all classification pools. If there are idle blocks on each plane, then form parallel blocks. Denote the average number of bad blocks M on each parallel block, then

[0015] When constructing parallel blocks, select one idle composite block from the idle resource pools of each channel according to the number of bad blocks for staggered combination to obtain a new parallel block.

[0016] In one embodiment, the step of selecting one idle composite block from the idle resource pools of each channel according to the number of bad blocks for staggered combination to obtain a new parallel block when constructing parallel blocks includes:

[0017] Use C to represent the set of channels, and denote the total number of channels as N c , and denote the number of planes on each wafer as N p , initialize the remaining number of bad blocks b = M, initialize the number p of the current classification pool = N p , initialize the set of channels C = {1, 2,..., N c};

[0018] Use the set S to represent the parallel blocks composed of composite blocks, and initialize it as an empty set, where the elements are two-dimensional variables composed of channel numbers and composite block numbers;

[0019] If b ≥ p, traverse the elements i of the set of channels C, where the element i ∈ C, find the set with the largest number of elements in all sets P(i,p) as P(j,p), jump to the step where the set P(j,p) is not empty, otherwise jump to the step where 0 < b < p;

[0020] If the set P(j, p) is not empty, select the composite block (k) with the minimum number of erasure times, delete the element k from the set P(j, p), and at the same time delete the element j from the set C. Update b = b - p, add the element (j, k) to the set S. If the set P(j, p) is empty, update p = p - 1, and jump to the step where b ≥ p;

[0021] If 0 < b < p, traverse the elements i of the set C, where the element i ∈ C, and find the set P(j, b) with the largest number of elements in the set P(i, b). Otherwise, jump to the step where b = 0;

[0022] If the set P(j, b) is not empty, select the composite block (k) with the minimum number of erasure times, delete the element k from the set P(j, b), and at the same time delete the element j from the set C. Update b = 0, add the element (j, k) to the set S. If the set P(j, b) is empty, update p = p - 1, and jump to the step where b ≥ p;

[0023] If b = 0, traverse the elements i of the set C, where the element i ∈ C, select the composite block (k) with the minimum number of erasure times from the set P(i, 0), delete the element k from the set P(i, 0), and at the same time delete the element i from the set C, and add the element (j, k) to the set S.

[0024] In one embodiment, the step of describing all classification pools as a set of integers, where the integers in the set represent the numbers of composite blocks, and using P(i, k) to represent the set of numbers of composite blocks with k bad blocks on the target wafer of the i-th channel includes:

[0025] Taking the target wafers corresponding to the channels of the solid-state drive as columns and the classification pools as rows, form the classification pool distribution of free blocks before combination, and fill in the serial numbers of bad block composite blocks at the positions of the target wafers of the channels in the column direction and the classification pools in the row direction;

[0026] According to the classification pool distribution of free blocks before combination, use P(i, k) to represent the set of numbers of composite blocks with k bad blocks on the target wafer of the i-th channel.

[0027] In one embodiment, after the step of when the number of combined free parallel blocks is less than a preset threshold, performing parallel block recombination, and selecting one composite block from the classification pools of each wafer to form a new parallel block, it further includes:

[0028] Update the classification pool distribution of free blocks before combination, and obtain the classification pool distribution of all remaining uncombined composite blocks.

[0029] In one embodiment, the method further includes:

[0030] When garbage collection generates new idle parallel blocks, the idle parallel blocks are decomposed into idle composite blocks, and are respectively inserted into corresponding classification pools on each wafer according to the number of bad blocks in the composite blocks.

[0031] In another aspect, a parallel block management device is provided, the device comprising:

[0032] A bad block management module is used to group blocks with the same serial number on multiple planes of the same wafer on all channels of the solid-state hard disk into a composite block, count the number of bad blocks of all composite blocks in the data storage area of ​​the solid-state hard disk when the solid-state hard disk is powered on for the first time, and put the composite block number on each wafer into a corresponding classification pool according to the number of bad blocks;

[0033] A parallel block setting module, used to select one composite block from each wafer on each channel of the solid state drive and combine them into a parallel block;

[0034] The parallel block reorganization module is used to reorganize the parallel blocks when the number of idle parallel blocks after combination is less than a preset threshold value, and select a composite block from the classification pool of each wafer to form a new parallel block.

[0035] In another aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:

[0036] The blocks with the same serial number on multiple planes of the same wafer on all channels of the solid-state hard disk are grouped into a composite block, the number of bad blocks of all composite blocks in the data storage area of ​​the solid-state hard disk is counted when the solid-state hard disk is powered on for the first time, and the composite block number on each wafer is put into a corresponding classification pool according to the number of bad blocks;

[0037] Selecting one composite block from each wafer on each channel of the solid state drive and combining them into a parallel block;

[0038] When the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block.

[0039] In another aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0040] The blocks with the same serial number on multiple planes of the same wafer on all channels of the solid-state hard disk are grouped into a composite block, the number of bad blocks of all composite blocks in the data storage area of ​​the solid-state hard disk is counted when the solid-state hard disk is powered on for the first time, and the composite block number on each wafer is put into a corresponding classification pool according to the number of bad blocks;

[0041] Selecting one composite block from each wafer on each channel of the solid state drive and combining them into a parallel block;

[0042] When the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block.

[0043] The above-mentioned parallel block management method, device, computer equipment and storage medium place the free composite blocks on each wafer into different free resource pools according to the number of bad blocks. When constructing parallel blocks, one free composite block is selected from the free resource pool of each channel according to the number of bad blocks for staggered combination to obtain a new parallel block. Through this dynamic parallel block management scheme, it is possible to ensure that the number of bad blocks on each parallel block is basically balanced, thereby achieving performance balance. At the same time, because the application of this scheme does not require space reservation on the flash memory chip, the space utilization rate of the solid-state hard disk is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0045] Figure 1 A storage structure diagram of a solid state drive flash memory chip in the prior art;

[0046] Figure 2 It is a block combination schematic diagram of the prior art;

[0047] Figure 3 A schematic diagram of a free block classification pool of a target wafer in one embodiment of the present application;

[0048] Figure 4 This is a flowchart of a parallel block management method in one embodiment of the present application;

[0049] Figure 5 This is a schematic diagram of the distribution of composite blocks in the classification pool before combination in one embodiment of the present application;

[0050] Figure 6 This is a schematic diagram of the distribution of the combined composite blocks in the classification pool in one embodiment of the present application;

[0051] Figure 7 This is a structural block diagram of a parallel block management device in one embodiment of the present application;

[0052] Figure 8 This is a diagram of the internal structure of a computer device in one embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0054] like Figure 1 As shown, Figure 1 The storage structure diagram of a solid-state drive (SSD) flash memory chip includes multiple channels (Channel), and the figure shows four channels, namely Channel 0, Channel 1, Channel 2 and Channel 3; each channel includes multiple wafers (DIE), and the figure shows wafer 0 and wafer 1. Each wafer contains multiple planes (plane), and the figure shows four planes, namely plane 0, plane 1, plane 2 and plane 3; each plane includes multiple blocks (Block), such as blocks 0 to 99 as shown in the figure. There are often both good blocks and bad blocks in the same plane. A group of blocks with the same serial number on multiple planes on the same wafer is called a composite block (Multi Block). Block 0 on all planes of the channel in the figure constitutes a composite block. In the process of writing data to the data storage area, multiple channels write data from top to bottom at the same time, and blocks located at the same position in multiple planes on the same wafer of each channel write data at the same time. Figure 2 For example, data is written to block 0 of all planes of wafer 0 on all channels at the same time. Such a group of blocks that write data at the same time is called a parallel block (Supe Block).

[0055] The most widely used parallel block combination method is to select a wafer on each channel and combine the blocks at the same position on all planes of the selected wafer into a parallel block. Figure 2 For example, all composite blocks 0 of wafer 0 of all channels are combined into a parallel block. For parallel blocks with bad blocks, currently one of a skip strategy and a replacement strategy can be used to manage the bad blocks, thereby avoiding the use of the bad blocks during the process of writing data in the data storage area.

[0056] The implementation method of the above skip strategy is that once a bad block recorded in the bad block table is encountered during the data writing process, the bad block is skipped and the next block is written. This solution can easily lead to performance imbalance due to uneven distribution of bad blocks.

[0057] The implementation method of the above replacement strategy is that once a bad block recorded in the bad block table is encountered during data writing, the data is written to the target block located on the same plane as the bad block, and the target block is a pre-configured good block that replaces the bad block. In this strategy, each plane on the data storage area is divided into a user area and a reserved area, and the good blocks in the reserved area are used to replace the bad blocks in the user area. However, when the blocks in the reserved area are used up and some bad blocks cannot be replaced, when there are many bad blocks on some parallel blocks and some parallel blocks have no bad blocks, it will also cause performance imbalance.

[0058] The commonly used parallel block management schemes mentioned above can only use skip strategy and replacement strategy to manage bad blocks. The skip strategy will cause performance imbalance due to the uneven distribution of bad blocks in parallel blocks. The replacement strategy will waste space because a part of the space must be reserved as replacement blocks at the beginning, and performance imbalance will also occur when there are many bad blocks and the distribution is uneven. Both strategies have major defects.

[0059] In order to solve the performance imbalance and space waste problems caused by the bad block management strategy, a parallel block management method is creatively proposed in an embodiment of the present invention, and a "build-decompose" parallel block dynamic management scheme is applied to put the idle composite blocks on each wafer into different idle resource pools according to the number of bad blocks. When building parallel blocks, an idle composite block is selected from the idle resource pool of each channel according to the number of bad blocks for staggered combination to obtain a new parallel block, and the parallel blocks are decomposed after garbage collection and then put back into the idle resource pool. Through this dynamic parallel block management scheme, the number of bad blocks on each parallel block can be basically balanced, thereby achieving performance balance. At the same time, because the scheme is applied, there is no need to reserve space on the flash memory chip, which greatly improves the space utilization of the solid-state hard disk.

[0060] Assuming that the number of planes of each wafer is N, a classification pool of N+1 free blocks is set on each wafer, and the free blocks on each wafer are classified according to the number of bad blocks on the composite block. The structure of the storage unit of the solid-state hard disk data storage area in this embodiment of the solution is as follows Figure 1 As shown, there are 4 channels, 2 wafers on each channel, 4 planes on each wafer, and a classification pool of 5 free blocks is set on each wafer, such as Figure 3As shown, wafer 0 is taken as the target wafer, and the five free block classification pools on wafer 0 of channel 0 are C(0)_D(0)_Pool(0), C(0)_D(0)_Pool(1), C(0)_D(0)_Pool(2), C(0)_D(0)_Pool(3), and C(0)_D(0)_Pool(4). The same is true for other positions, where Pool(i) stores the block number with the number of bad blocks i in the composite block. For example, plane 2 corresponding to composite block 0 of wafer 0 of channel 2 is a bad block, and plane 0, plane 1, and plane 3 are good blocks, then block number 0 is placed in the free block classification pool C(2)_D(0)_Pool(1).

[0061] In one embodiment, Figure 4 As shown, a parallel block management method is provided, comprising the following steps:

[0062] Step S1, forming a composite block with blocks of the same serial number on multiple planes of the same wafer on all channels of the solid-state hard disk, counting the number of bad blocks of all composite blocks in the data storage area of ​​the solid-state hard disk when the solid-state hard disk is powered on for the first time, and placing the composite block number on each wafer into a corresponding classification pool according to the number of bad blocks;

[0063] Step S2, selecting one composite block from each wafer on each channel of the solid state drive and combining them into a parallel block;

[0064] Step S3, when the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block.

[0065] The present application places the idle composite blocks on each wafer into different idle resource pools according to the number of bad blocks. When constructing parallel blocks, an idle composite block is selected from the idle resource pool of each channel according to the number of bad blocks for staggered combination to obtain a new parallel block. Through this dynamic parallel block management scheme, it is possible to ensure that the number of bad blocks on each parallel block is basically balanced, thereby achieving performance balance. At the same time, because the application of this scheme does not require space reservation on the flash memory chip, the space utilization rate of the solid-state hard disk is greatly improved.

[0066] In this embodiment, the steps of counting the number of bad blocks of all composite blocks in the data storage area of ​​the solid state drive when the solid state drive is powered on for the first time and placing the composite block number on each wafer into a corresponding classification pool according to the number of bad blocks include:

[0067] Assuming the number of planes of each wafer is N, a classification pool of N+1 free blocks is set on each wafer;

[0068] Put the composite block with k bad blocks on wafer n of channel m into the classification pool C(m)_D(n)_Pool(k), where C() represents the channel, m is the channel number, D() represents the wafer, n is the wafer number, Pool() represents the classification pool, and k≤N+1.

[0069] The specific setting method of the classification pool is C(m)_D(n)_Pool(k), which can directly express the classification pool of wafer n corresponding to channel m, and k expresses the number of bad block composite blocks, which can be seen intuitively.

[0070] In this embodiment, when the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block. The steps include:

[0071] All classification pools are described as a set of integers, where the integers represent the numbers of the composite blocks, and P(i,k) represents the set of numbers of the composite blocks with the number of bad blocks k on the target wafer of the i-th channel;

[0072] Count the total number of bad blocks B in all classification pools. If there is a free block on each plane, it forms a parallel block. Record the average number of bad blocks M on each parallel block. Then

[0073] When constructing a parallel block, an idle composite block is selected from the idle resource pool of each channel according to the number of bad blocks, and the blocks are staggered and combined to obtain a new parallel block.

[0074] where P(i,k) can be directly based on Figure 5 The distribution diagram of the composite blocks in the classification pool before combination is shown in FIG. Figure 5 The distribution of composite blocks in the classification pool before the combination, the number of bad blocks on the composite block that can be obtained is the set of each pool:

[0075] P(0,0)={1,3,6,7}, P(0,1)={2,8}, P(0,2)={5,9}, P(0,3)={0}, P(0,4)={4},

[0076] P(1,0)={0,3,6,8}, P(1,1)={2}, P(1,2)={9}, P(1,3)={1,4}, P(1,4)={5}, P(2,0)={1,3,4,7}, P(2,1)={0,8}, P(2 ,2)={9}, P(2,3)={2,5}, P(2,4)={6}, P(3,0)={2,7}, P(3,1)={3}, P(3,2)={4,8,9}, P(3,3)={0,5}, P(3,4)={1,6}.

[0077] Specifically, when constructing parallel blocks, the step of obtaining a new parallel block by misaligned combination of one idle composite block selected from the idle resource pools of each channel according to the number of bad blocks includes:

[0078] Let C represent the set of channels, and the total number of channels is denoted as N c , and the number of planes on each wafer is denoted as N p , initialize the remaining number of bad blocks b = M, initialize the number p of the current classification pool to N p , initialize the channel set C = {1, 2, …, N c};

[0079] Let the set S represent the parallel blocks composed of composite blocks, initially an empty set, and its elements are two-dimensional variables composed of channel numbers and composite block numbers;

[0080] If b ≥ p, traverse the elements i of the channel set C, where i ∈ C, find the set with the largest number of elements in all sets P(i, p) as P(j, p), jump to the step where the set P(j, p) is not empty, otherwise jump to the step where 0 < b < p;

[0081] If the set P(j, p) is not empty, select the composite block (k) with the minimum number of program / erase (PE) cycles, delete the element k from the set P(j, p), and at the same time delete the element j from the set C, update b = b - p, add the element (j, k) to the set S, if the set P(j, p) is empty, update p = p - 1, and jump to the step where b ≥ p;

[0082] If 0 < b < p, traverse the elements i of the set C, where i ∈ C, find the set with the largest number of elements in the set P(i, b) as P(j, b), otherwise jump to the step where b = 0;

[0083] If the set P(j, b) is not empty, select the composite block (k) with the minimum number of program / erase (PE) cycles, delete the element k from the set P(j, b), and at the same time delete the element j from the set C, update b = 0, add the element (j, k) to the set S, if the set P(j, b) is empty, update p = p - 1, and jump to the step where b ≥ p;

[0084] If b = 0, traverse the elements i of the set C, where i ∈ C, select the composite block (k) with the minimum number of program / erase (PE) cycles from the set P(i, 0), delete the element k from the set P(i, 0), and at the same time delete the element i from the set C, and add the element (j, k) to the set S.

[0085] Among them, based on the step of obtaining a new parallel block by misaligned combination of one idle composite block selected from the idle resource pools of each channel according to the number of bad blocks when constructing parallel blocks, it is possible to Figure 5 The distribution of the composite blocks in the classification pool before the combination is transformed into Figure 6 The distribution of the combined composite blocks in the classification pool is shown.

[0086] In this embodiment, the step of describing all classification pools as a set of integers, in which the integers represent the numbers of the composite blocks, and using P(i, k) to represent the set of numbers of the composite blocks with the number of bad blocks k on the target wafer of the i-th channel includes:

[0087] The target wafers corresponding to the channels of the solid state drive are used as columns, and the classification pools are used as rows to form a classification pool distribution of the free blocks before combination, and the bad block composite block numbers are filled in the target wafers of the channels in the column direction and the classification pools in the row direction;

[0088] According to the classification pool distribution of the free blocks before combination, P(i,k) is used to represent the set of numbers of composite blocks with k bad blocks on the target wafer of the i-th channel.

[0089] In this embodiment, when the number of the combined idle parallel blocks is less than the preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block, and the step further includes:

[0090] Update the classification pool distribution of the free blocks before combination, and obtain the classification pool distribution of all remaining uncombined composite blocks.

[0091] like Figure 4 As shown, in this embodiment, the method further includes:

[0092] Step S4, when garbage collection generates new idle parallel blocks, the idle parallel blocks are decomposed into idle composite blocks, and are respectively inserted into corresponding classification pools on each wafer according to the number of bad blocks in the composite blocks.

[0093] Among them, after garbage collection, the parallel blocks are decomposed and then put back into the free resource pool. Through this dynamic parallel block management solution, the number of bad blocks on each parallel block can be basically balanced, thereby achieving performance balance. At the same time, because this solution is applied, there is no need to reserve space on the flash memory chip, which greatly improves the space utilization of the solid-state drive.

[0094] In this embodiment, when garbage collection generates new idle parallel blocks, decomposing the idle parallel blocks into idle composite blocks, and inserting them into the corresponding classification pools on each wafer according to the number of bad blocks in the composite blocks includes:

[0095] Real-time detection of whether there is a parallel block that has been processed by garbage collection. If so, the parallel block that has been processed by garbage collection will be used as a new free parallel block;

[0096] Decomposing the new idle parallel block into idle composite blocks, and obtaining the total number of bad blocks in the decomposed idle composite blocks;

[0097] The total number of bad blocks in the idle composite block is evenly divided into the current classification pool, and the bad blocks are respectively inserted into the corresponding classification pool on each wafer according to the number of bad blocks in the composite block.

[0098] When garbage collection generates new free parallel blocks, if there are bad blocks in the free composite blocks, the bad blocks will be evenly distributed in the current classification pool, which can ensure that the number of bad blocks on each parallel block is basically balanced, thereby achieving performance balance and avoiding storage space waste caused by space reservation. It can maximize the use of storage space and improve the space utilization of the solid-state drive.

[0099] In order to illustrate the above parallel block management method, a relatively simple example is given to further illustrate the parallel block management solution.

[0100] like Figure 5 As shown, Figure 5 The schematic diagram of the distribution of the composite block in the classification pool before combination. The steps of parallel block reorganization in the parallel block management method are as follows:

[0101] (1) Count the total number of bad blocks. There are B = 61 bad blocks in total, which can be grouped into K = 10 parallel blocks. On average, there are M = 6 bad blocks in each parallel block.

[0102] (2) Let C represent the set of channels, and P(i,k) represent the set of numbers of composite blocks with k bad blocks on wafer (0) of channel (i); when initialized, the set C = {0, 1, 2, 3} contains the numbers of all blocks, and the sets of each pool are obtained according to the number of bad blocks on the composite block:

[0103] P(0,0)={1,3,6,7}, P(0,1)={2,8}, P(0,2)={5,9}, P(0,3)={0}, P(0,4)={4},

[0104] P(1,0)={0,3,6,8}, P(1,1)={2}, P(1,2)={9}, P(1,3)={1,4}, P(1,4)={5},

[0105] P(2,0)={1,3,4,7},P(2,1)={0,8},P(2,2)={9},P(2,3)={2,5},P(2,4)={6},P(3,0)={2,7},P(3,1)={3},P(3,2)={4,8,9},P(3,3)={0,5},P(3,4)={1,6},initialize b=6,the number of the current classification pool is p=4.

[0106] (3) Satisfy \(b\geq p\), traverse the elements \(i\) of set \(C\), where the element \(i\in C\), and find that the set with the largest number of elements in all sets \(P(i, 4)\) is \(P(3, 4)\).

[0107] (4) Set \(P(3, 4)\) contains composite block (1) and composite block (6). Assume that the PE (PE: cyclic erasure count) of composite block (1) is smaller than that of composite block (6). Delete the number 1 from \(P(3, 4)\), \(P(3, 4)=\{6\}\), delete channel 3 from set \(C\), \(C = \{0, 1, 2\}\), update \(b = b - p = 2\), update \(p = p - 1 = 3\), set \(S=\{(3, 1)\}\), and jump to (3).

[0108] (5) Satisfy \(0 < b < p\), that is, \(0<2<3\), traverse the elements \(i\) of set \(C\), where the element \(i\in C\), and find that the set with the largest number of elements in set \(P(i, b)\) is \(P(0, 2)\).

[0109] (6) Set \(P(0, 2)\) is not empty and contains composite block (5) and composite block (9). Assume that the PE of composite block (5) is smaller than that of composite block (9). Delete the number 5 from \(P(0, 2)\), \(P(0, 2)=\{9\}\), delete channel 0 from set \(C\), \(C = \{1, 2\}\), update \(b = b - p = 0\), update \(p = p - 1 = 2\), set \(S=\{(3, 1),(0, 5)\}\). Where set \(S\) represents the parallel block composed of composite blocks, and a group of blocks that write data simultaneously is called a parallel block.

[0110] (7) Satisfy \(b = 0\), traverse the elements \(i\) of set \(C\), where the element \(i\in C\). First, select the composite block with the smallest PE from set \(P(1, 0)\), assume it is composite block (0), delete 0 from set \(P(1, 0)\), \(P(1, 0)=\{3, 6, 8\}\), delete channel 1 from set \(C\), \(C = \{2\}\); then select the composite block with the smallest PE from set \(P(2, 0)\), assume it is composite block (1), delete 1 from set \(P(2, 0)\), \(P(2, 0)=\{3, 4, 7\}\), delete channel 1 from set \(C\), and \(C\) is an empty set. Set \(S=\{(3, 1),(0, 5),(1, 0),(2, 1)\}\), and end the process.

[0111] After performing the above operations, the obtained parallel block is composed of composite block (5) of channel (0), composite block (0) of channel (1), composite block (1) of channel (2), and composite block (1) of channel (3) of the wafer 0. The distribution of all the remaining uncombined composite blocks in the classification pool is as Figure 6 shown.

[0112] According to the distribution of the combined composite blocks in the classification pool, it can be known that the number of bad blocks on the composite blocks obtains the sets of each pool:

[0113] P(0,0)={1,3,6,7}, P(0,1)={2,8}, P(0,2)={9}, P(0,3)={0}, P(0,4)={4},

[0114] P(1,0)={3,6,8}, P(1,1)={2}, P(1,2)={9}, P(1,3)={1,4}, P(1,4)={5}, P(2,0)={3,4,7}, P(2,1)={0,8}, P(2, 2)={9}, P(2,3)={2,5}, P(2,4)={6}, P(3,0)={2,7}, P(3,1)={3}, P(3,2)={4,8,9}, P(3,3)={0,5}, P(3,4)={6}.

[0115] The parallel block management method is a "build-decompose" type parallel block dynamic management scheme. On each wafer, an idle resource pool is set according to the number of bad blocks on the idle composite block. "Building" parallel blocks means selecting an idle composite block from the idle resource pool of each channel according to the number of bad blocks to obtain a new parallel block by staggered combination. "Decomposition" means decomposing the parallel block after garbage collection and then putting it back into the idle resource pool. Through this dynamic parallel block management scheme, it can ensure that the number of bad blocks on each parallel block is basically balanced, thereby achieving performance balance. At the same time, because the application of this scheme does not require space reservation on the flash memory chip, the space utilization rate of the solid-state hard disk is greatly improved.

[0116] In the above parallel block management method, the free composite blocks on each wafer are placed in different free resource pools according to the number of bad blocks. When constructing parallel blocks, one free composite block is selected from the free resource pool of each channel according to the number of bad blocks for staggered combination to obtain a new parallel block. Through this dynamic parallel block management scheme, it is possible to ensure that the number of bad blocks on each parallel block is basically balanced, thereby achieving performance balance. At the same time, because the application of this scheme does not require space reservation on the flash memory chip, the space utilization rate of the solid-state hard disk is greatly improved.

[0117] In one embodiment, Figure 7 As shown, a parallel block management device 10 is provided, comprising: a bad block management module 1, a parallel block setting module 2, and a parallel block reorganization module 3.

[0118] The bad block management module 1 is used to combine blocks with the same serial number on multiple planes of the same wafer on all channels of the solid-state hard disk into a composite block, count the number of bad blocks of all composite blocks in the data storage area of ​​the solid-state hard disk when the solid-state hard disk is powered on for the first time, and put the composite block number on each wafer into a corresponding classification pool according to the number of bad blocks.

[0119] The parallel block setting module 2 is used to select one composite block from each wafer on each channel of the solid state drive and combine them into a parallel block.

[0120] The parallel block reorganization module 3 is used to reorganize the parallel blocks when the number of the combined idle parallel blocks is less than a preset threshold, and select a composite block from the classification pool of each wafer to form a new parallel block.

[0121] In this embodiment, the steps of counting the number of bad blocks of all composite blocks in the data storage area of ​​the solid state drive when the solid state drive is powered on for the first time and placing the composite block number on each wafer into a corresponding classification pool according to the number of bad blocks include:

[0122] Assuming the number of planes of each wafer is N, a classification pool of N+1 free blocks is set on each wafer;

[0123] Put the composite block with k bad blocks on wafer n of channel m into the classification pool C(m)_D(n)_Pool(k), where C() represents the channel, m is the channel number, D() represents the wafer, n is the wafer number, Pool() represents the classification pool, and k≤N+1.

[0124] In this embodiment, when the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block. The steps include:

[0125] All classification pools are described as a set of integers, where the integers represent the numbers of the composite blocks, and P(i,k) represents the set of numbers of the composite blocks with the number of bad blocks k on the target wafer of the i-th channel;

[0126] Count the total number of bad blocks B in all classification pools. If there is a free block on each plane, it forms a parallel block. Record the average number of bad blocks M on each parallel block. Then

[0127] When constructing a parallel block, an idle composite block is selected from the idle resource pool of each channel according to the number of bad blocks, and the blocks are staggered and combined to obtain a new parallel block.

[0128] In this embodiment, when constructing parallel blocks, the steps of selecting an idle composite block from the idle resource pool of each channel according to the number of bad blocks to perform staggered combination to obtain a new parallel block include:

[0129] Let C represent the channel set, and the total number of channels is N c , the number of planes on each wafer is recorded as N p , initialize the number of remaining bad blocks b = M, initialize the number of the current classification pool p = N p, initialize the channel set \(C = \{1, 2, \ldots, N\}\) c};

[0130] Use the set \(S\) to represent the parallel blocks composed of composite blocks, and initialize it as an empty set, where the elements are two-dimensional variables composed of channel numbers and composite block numbers;

[0131] If \(b \geq p\), traverse the element \(i\) of the channel set \(C\), where the element \(i \in C\), find the set with the largest number of elements in all sets \(P(i, p)\) as \(P(j, p)\), jump to the step where the set \(P(j, p)\) is not empty, otherwise jump to the step \(0 < b < p\);

[0132] If the set \(P(j, p)\) is not empty, select the composite block \((k)\) with the minimum number of erase times (PE), delete the element \(k\) from the set \(P(j, p)\), and at the same time delete the element \(j\) from the set \(C\), update \(b = b - p\), add the element \((j, k)\) to the set \(S\). If the set \(P(j, p)\) is empty, update \(p = p - 1\), and jump to the step \(b \geq p\);

[0133] If \(0 < b < p\), traverse the element \(i\) of the set \(C\), where the element \(i \in C\), find the set with the largest number of elements in the set \(P(i, b)\) as \(P(j, b)\), otherwise jump to the step \(b = 0\);

[0134] If the set \(P(j, b)\) is not empty, select the composite block \((k)\) with the minimum number of erase times (PE), delete the element \(k\) from the set \(P(j, b)\), and at the same time delete the element \(j\) from the set \(C\), update \(b = 0\), add the element \((j, k)\) to the set \(S\). If the set \(P(j, b)\) is empty, update \(p = p - 1\), and jump to the step \(b \geq p\);

[0135] If \(b = 0\), traverse the element \(i\) of the set \(C\), where the element \(i \in C\), select the composite block \((k)\) with the minimum number of erase times (PE) from the set \(P(i, 0)\), delete the element \(k\) from the set \(P(i, 0)\), and at the same time delete the element \(i\) from the set \(C\), and add the element \((j, k)\) to the set \(S\).

[0136] In this embodiment, the step of describing all classification pools as a set of integers, where the integers in the set represent the numbers of composite blocks, and using \(P(i, k)\) to represent the set of numbers of composite blocks with the number of bad blocks equal to \(k\) on the target wafer of the \(i\)-th channel includes:

[0137] Taking the target wafers corresponding to the channels of the solid-state drive as columns and the classification pools as rows, form the classification pool distribution of the free blocks before combination, and fill in the serial numbers of the bad block composite blocks at the positions of the target wafers of the channels in the column direction and the classification pools in the row direction;

[0138] According to the classification pool distribution of the free blocks before combination, use \(P(i, k)\) to represent the set of numbers of composite blocks with the number of bad blocks equal to \(k\) on the target wafer of the \(i\)-th channel.

[0139] In this embodiment, when the number of the combined idle parallel blocks is less than the preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block, and the step further includes:

[0140] Update the classification pool distribution of the free blocks before combination, and obtain the classification pool distribution of all remaining uncombined composite blocks.

[0141] In this embodiment, if Figure 7 As shown, the parallel block management device 10 further includes: a recycling processing module 4 .

[0142] The recycling processing module 4 is used for decomposing new idle parallel blocks into idle composite blocks when garbage collection generates new idle parallel blocks, and inserting them into corresponding classification pools on each wafer according to the number of bad blocks in the composite blocks.

[0143] In the above-mentioned parallel block management device, the free composite blocks on each wafer are placed in different free resource pools according to the number of bad blocks. When constructing parallel blocks, one free composite block is selected from the free resource pool of each channel according to the number of bad blocks for staggered combination to obtain a new parallel block. Through this dynamic parallel block management scheme, it is possible to ensure that the number of bad blocks on each parallel block is basically balanced, thereby achieving performance balance. At the same time, because the application of this scheme does not require space reservation on the flash memory chip, the space utilization rate of the solid-state hard disk is greatly improved.

[0144] For the specific definition of the parallel block management device, please refer to the definition of the parallel block management method above, which will not be repeated here. Each module in the above parallel block management device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0145] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0146] The blocks with the same serial number on multiple planes of the same wafer on all channels of the solid-state hard disk are grouped into a composite block, the number of bad blocks of all composite blocks in the data storage area of ​​the solid-state hard disk is counted when the solid-state hard disk is powered on for the first time, and the composite block number on each wafer is put into a corresponding classification pool according to the number of bad blocks;

[0147] Selecting one composite block from each wafer on each channel of the solid state drive and combining them into a parallel block;

[0148] When the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block.

[0149] In one embodiment, the computer program further implements the following steps when executed by a processor:

[0150] The steps of counting the number of bad blocks of all composite blocks in the data storage area of ​​the solid state hard disk when the solid state hard disk is powered on for the first time and placing the composite block number on each wafer into a corresponding classification pool according to the number of bad blocks include:

[0151] Assuming the number of planes of each wafer is N, a classification pool of N+1 free blocks is set on each wafer;

[0152] Put the composite block with k bad blocks on wafer n of channel m into the classification pool C(m)_D(n)_Pool(k), where C() represents the channel, m is the channel number, D() represents the wafer, n is the wafer number, Pool() represents the classification pool, and k≤N+1.

[0153] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0154] When the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block. The steps include:

[0155] All classification pools are described as a set of integers, where the integers represent the numbers of the composite blocks, and P(i,k) represents the set of numbers of the composite blocks with the number of bad blocks k on the target wafer of the i-th channel;

[0156] Count the total number of bad blocks B in all classification pools. If there is a free block on each plane, it forms a parallel block. Record the average number of bad blocks M on each parallel block. Then

[0157] When constructing a parallel block, an idle composite block is selected from the idle resource pool of each channel according to the number of bad blocks, and the blocks are staggered and combined to obtain a new parallel block.

[0158] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0159] When constructing the parallel block, the steps of selecting an idle composite block from the idle resource pool of each channel according to the number of bad blocks to perform staggered combination to obtain a new parallel block include:

[0160] Let C represent the channel set, and the total number of channels is N c , the number of planes on each wafer is recorded as Np , initialize the number of remaining bad blocks \(b = M\), and initialize the number \(p = N\) of the current classification pool p , initialize the channel set \(C=\{1, 2, \ldots, N\}\) c}

[0161] Use the set \(S\) to represent the parallel blocks composed of composite blocks, and initialize it as an empty set, where the elements are two-dimensional variables composed of channel numbers and composite block numbers;

[0162] If \(b\geq p\), traverse the elements \(i\) of the channel set \(C\), where \(i\in C\), find the set \(P(j, p)\) with the largest number of elements in all sets \(P(i, p)\), and jump to the step where the set \(P(j, p)\) is not empty, otherwise jump to the step \(0 < b < p\);

[0163] If the set \(P(j, p)\) is not empty, select the composite block \((k)\) with the minimum number of program / erase (PE) cycles, delete the element \(k\) from the set \(P(j, p)\), and at the same time delete the element \(j\) from the set \(C\), update \(b = b - p\), add the element \((j, k)\) to the set \(S\). If the set \(P(j, p)\) is empty, update \(p = p - 1\), and jump to the step \(b\geq p\);

[0164] If \(0 < b < p\), traverse the elements \(i\) of the set \(C\), where \(i\in C\), find the set \(P(j, b)\) with the largest number of elements in the set \(P(i, b)\), otherwise jump to the step \(b = 0\);

[0165] If the set \(P(j, b)\) is not empty, select the composite block \((k)\) with the minimum number of program / erase (PE) cycles, delete the element \(k\) from the set \(P(j, b)\), and at the same time delete the element \(j\) from the set \(C\), update \(b = 0\), add the element \((j, k)\) to the set \(S\). If the set \(P(j, b)\) is empty, update \(p = p - 1\), and jump to the step \(b\geq p\);

[0166] If \(b = 0\), traverse the elements \(i\) of the set \(C\), where \(i\in C\), select the composite block \((k)\) with the minimum number of program / erase (PE) cycles from the set \(P(i, 0)\), delete the element \(k\) from the set \(P(i, 0)\), and at the same time delete the element \(i\) from the set \(C\), and add the element \((j, k)\) to the set \(S\).

[0167] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0168] The step of describing all classification pools as a set of integers, where the integers in the set represent the numbers of composite blocks, and using \(P(i, k)\) to represent the set of numbers of composite blocks with the number of bad blocks \(k\) on the target wafer of the \(i\)-th channel includes:

[0169] The target wafers corresponding to the channels of the solid state drive are used as columns, and the classification pools are used as rows to form a classification pool distribution of the free blocks before combination, and the bad block composite block numbers are filled in the target wafers of the channels in the column direction and the classification pools in the row direction;

[0170] According to the classification pool distribution of the free blocks before combination, P(i,k) is used to represent the set of numbers of composite blocks with k bad blocks on the target wafer of the i-th channel.

[0171] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0172] When the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block. The step also includes:

[0173] Update the classification pool distribution of the free blocks before combination, and obtain the classification pool distribution of all remaining uncombined composite blocks.

[0174] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0175] When garbage collection generates new idle parallel blocks, the idle parallel blocks are decomposed into idle composite blocks, and are respectively inserted into corresponding classification pools on each wafer according to the number of bad blocks in the composite blocks.

[0176] For specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the parallel block management method above, which will not be repeated here.

[0177] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store parallel block management data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a parallel block management method is implemented.

[0178] Those skilled in the art will understand that Figure 8The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0179] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0180] The blocks with the same serial number on multiple planes of the same wafer on all channels of the solid-state hard disk are grouped into a composite block, the number of bad blocks of all composite blocks in the data storage area of ​​the solid-state hard disk is counted when the solid-state hard disk is powered on for the first time, and the composite block number on each wafer is put into a corresponding classification pool according to the number of bad blocks;

[0181] Selecting one composite block from each wafer on each channel of the solid state drive and combining them into a parallel block;

[0182] When the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block.

[0183] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0184] The steps of counting the number of bad blocks of all composite blocks in the data storage area of ​​the solid state hard disk when the solid state hard disk is powered on for the first time and placing the composite block number on each wafer into a corresponding classification pool according to the number of bad blocks include:

[0185] Assuming the number of planes of each wafer is N, a classification pool of N+1 free blocks is set on each wafer;

[0186] Put the composite block with k bad blocks on wafer n of channel m into the classification pool C(m)_D(n)_Pool(k), where C() represents the channel, m is the channel number, D() represents the wafer, n is the wafer number, Pool() represents the classification pool, and k≤N+1.

[0187] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0188] When the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block. The steps include:

[0189] All classification pools are described as sets of integers, where the integers in the set represent the numbers of composite blocks. Let P(i,k) denote the set of numbers of composite blocks on the target wafer of the i-th channel with k defective blocks.

[0190] Statistical total number B of defective blocks in all classification pools. If there are idle blocks on each plane, then form parallel blocks. Denote the average number of defective blocks M on each parallel block, then

[0191] When constructing parallel blocks, select one idle composite block from the idle resource pools of each channel according to the number of defective blocks, and perform staggered combination to obtain new parallel blocks.

[0192] In one embodiment, when the processor executes a computer program, the following steps are further implemented:

[0193] The step of, when constructing parallel blocks, selecting one idle composite block from the idle resource pools of each channel according to the number of defective blocks and performing staggered combination to obtain new parallel blocks includes:

[0194] Use C to represent the set of channels, and denote the total number of channels as N c , and denote the number of planes on each wafer as N p , initialize the remaining number of defective blocks b = M, initialize the number p of the current classification pool = N p , initialize the set of channels C = {1, 2,..., N c};

[0195] Use the set S to represent the parallel blocks composed of composite blocks, and initialize it as an empty set, where the elements are two-dimensional variables composed of channel numbers and composite block numbers;

[0196] If b ≥ p, traverse the elements i of the set of channels C, where the element i ∈ C, find the set with the largest number of elements in all sets P(i,p) as P(j,p), jump to the step where the set P(j,p) is not empty, otherwise jump to the step 0 < b < p;

[0197] If the set P(j,p) is not empty, select the composite block (k) with the smallest number of program erase (PE) times, delete the element k from the set P(j,p), and at the same time delete the element j from the set C, update b = b - p, add the element (j,k) to the set S. If the set P(j,p) is empty, update p = p - 1, and jump to the step b ≥ p;

[0198] If 0 < b < p, traverse the elements i of the set C, where the element i ∈ C, find the set with the largest number of elements in the set P(i,b) as P(j,b), otherwise jump to the step b = 0;

[0199] If the set P(j,b) is not empty, select the composite block (k) with the minimum number of erasures (PE), delete the element k from the set P(j,b), and delete the element j from the set C, update b=0, add the element (j,k) to the set S, if the set P(j,b) is empty, update p=p-1, and jump to the step b≥p;

[0200] If b=0, traverse the element i of the set C, where element i∈C, select the composite block (k) with the smallest number of erasures (PE) from the set P(i,0), delete the element k from the set P(i,0), delete the element i from the set C, and add the element (j,k) to the set S.

[0201] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0202] The step of describing all classification pools as a set of integers, in which the integers represent the numbers of the composite blocks, and using P(i, k) to represent the set of numbers of the composite blocks with the number of bad blocks k on the target wafer of the i-th channel includes:

[0203] The target wafers corresponding to the channels of the solid state drive are used as columns, and the classification pools are used as rows to form a classification pool distribution of the free blocks before combination, and the bad block composite block numbers are filled in the target wafers of the channels in the column direction and the classification pools in the row direction;

[0204] According to the classification pool distribution of the free blocks before combination, P(i,k) is used to represent the set of numbers of composite blocks with k bad blocks on the target wafer of the i-th channel.

[0205] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0206] When the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block. The step also includes:

[0207] Update the classification pool distribution of the free blocks before combination, and obtain the classification pool distribution of all remaining uncombined composite blocks.

[0208] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0209] When garbage collection generates new idle parallel blocks, the idle parallel blocks are decomposed into idle composite blocks, and are respectively inserted into corresponding classification pools on each wafer according to the number of bad blocks in the composite blocks.

[0210] For specific limitations on the steps implemented when the processor executes a computer program, please refer to the limitations on the parallel block management method above, which will not be repeated here.

[0211] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0212] The blocks with the same serial number on multiple planes of the same wafer on all channels of the solid-state hard disk are grouped into a composite block, the number of bad blocks of all composite blocks in the data storage area of ​​the solid-state hard disk is counted when the solid-state hard disk is powered on for the first time, and the composite block number on each wafer is put into a corresponding classification pool according to the number of bad blocks;

[0213] Selecting one composite block from each wafer on each channel of the solid state drive and combining them into a parallel block;

[0214] When the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block.

[0215] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0216] The steps of counting the number of bad blocks of all composite blocks in the data storage area of ​​the solid state hard disk when the solid state hard disk is powered on for the first time and placing the composite block number on each wafer into a corresponding classification pool according to the number of bad blocks include:

[0217] Assuming the number of planes of each wafer is N, a classification pool of N+1 free blocks is set on each wafer;

[0218] Put the composite block with k bad blocks on wafer n of channel m into the classification pool C(m)_D(n)_Pool(k), where C() represents the channel, m is the channel number, D() represents the wafer, n is the wafer number, Pool() represents the classification pool, and k≤N+1.

[0219] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0220] When the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block. The steps include:

[0221] All classification pools are described as a set of integers, where the integers represent the numbers of the composite blocks, and P(i,k) represents the set of numbers of the composite blocks with the number of bad blocks k on the target wafer of the i-th channel;

[0222] Count the total number of bad blocks B in all classification pools. If there is a free block on each plane, it forms a parallel block. Record the average number of bad blocks M on each parallel block. Then

[0223] When constructing parallel blocks, one free composite block is selected from the free resource pools of each channel according to the number of bad blocks, and they are combined with dislocation to obtain new parallel blocks.

[0224] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0225] The step of, when constructing parallel blocks, selecting one free composite block from the free resource pools of each channel according to the number of bad blocks and combining them with dislocation to obtain new parallel blocks includes:

[0226] Use C to represent the set of channels, and the total number of channels is denoted as N c , and the number of planes on each wafer is denoted as N p , initialize the remaining number of bad blocks b = M, initialize the number p of the current classification pool = N p , initialize the channel set C = {1, 2,..., N c};

[0227] Use the set S to represent the parallel blocks composed of composite blocks, and initialize it as an empty set, where the elements are two-dimensional variables composed of channel numbers and composite block numbers;

[0228] If b ≥ p, traverse the elements i of the channel set C, where the element i ∈ C, find the set with the largest number of elements in all sets P(i, p) as P(j, p), jump to the step where the set P(j, p) is not empty, otherwise jump to the step where 0 < b < p;

[0229] If the set P(j, p) is not empty, select the composite block (k) with the smallest number of program erase (PE) times, delete the element k from the set P(j, p), and at the same time delete the element j from the set C, update b = b - p, add the element (j, k) to the set S, if the set P(j, p) is empty, update p = p - 1, and jump to the b ≥ p step;

[0230] If 0 < b < p, traverse the elements i of the set C, where the element i ∈ C, find the set with the largest number of elements in the set P(i, b) as P(j, b), otherwise jump to the b = 0 step;

[0231] If the set P(j, b) is not empty, select the composite block (k) with the smallest number of program erase (PE) times, delete the element k from the set P(j, b), and at the same time delete the element j from the set C, update b = 0, add the element (j, k) to the set S, if the set P(j, b) is empty, update p = p - 1, and jump to the b ≥ p step;

[0232] If b=0, traverse the element i of the set C, where element i∈C, select the composite block (k) with the smallest number of erasures (PE) from the set P(i,0), delete the element k from the set P(i,0), delete the element i from the set C, and add the element (j,k) to the set S.

[0233] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0234] 9. The step of describing all classification pools as a set of integers, in which the integers represent the numbers of the composite blocks, and using P(i, k) to represent the set of numbers of the composite blocks with the number of bad blocks k on the target wafer of the i-th channel includes:

[0235] The target wafers corresponding to the channels of the solid state drive are used as columns, and the classification pools are used as rows to form a classification pool distribution of the free blocks before combination, and the bad block composite block numbers are filled in the target wafers of the channels in the column direction and the classification pools in the row direction;

[0236] According to the classification pool distribution of the free blocks before combination, P(i,k) is used to represent the set of numbers of composite blocks with k bad blocks on the target wafer of the i-th channel.

[0237] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0238] When the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block. The step also includes:

[0239] Update the classification pool distribution of the free blocks before combination, and obtain the classification pool distribution of all remaining uncombined composite blocks.

[0240] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0241] When garbage collection generates new idle parallel blocks, the idle parallel blocks are decomposed into idle composite blocks, and are respectively inserted into corresponding classification pools on each wafer according to the number of bad blocks in the composite blocks.

[0242] For specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the parallel block management method above, which will not be repeated here.

[0243] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0244] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0245] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A parallel block management method, characterized in that: Including: Form a composite block by combining blocks with the same serial number on the same wafer on all channels of the solid-state drive. When the solid-state drive is powered on for the first time, count the number of bad blocks in all composite blocks in the data storage area of the solid-state drive, and put the composite block numbers on each wafer into the corresponding classification pools according to the number of bad blocks; Combine one composite block selected from each wafer on each channel of the solid-state drive to form a parallel block; When the number of idle parallel blocks after combination is less than a preset threshold, perform recombination of parallel blocks. Select one composite block from each wafer's classification pool to form a new parallel block.

2. The parallel block management method according to claim 1, characterized in that: The step of counting the number of bad blocks in all composite blocks in the data storage area of the solid-state drive when the solid-state drive is powered on for the first time, and putting the composite block numbers on each wafer into the corresponding classification pools according to the number of bad blocks includes: Assume the number of planes on each wafer is N, then set up N + 1 classification pools for idle blocks on each wafer; Put the composite block with the number of bad blocks k on the wafer n of channel m into the classification pool C(m)_D(n)_Pool(k), where C() represents the channel, m is the channel serial number, D() represents the wafer, n is the wafer serial number, Pool() represents the classification pool, and k ≤ N + 1.

3. The parallel block management method according to claim 2, characterized in that: The step of when the number of idle parallel blocks after combination is less than a preset threshold, performing recombination of parallel blocks, and selecting one composite block from each wafer's classification pool to form a new parallel block includes: Describe all the classification pools as a set of integers, where the integers in the set represent the composite block numbers, and use P(i,k) to represent the set of composite block numbers with the number of bad blocks k on the target wafer of the i-th channel; Count the total number of bad blocks B in all classification pools. If there are K free blocks on each plane, they form K parallel blocks. The average number of bad blocks on each parallel block is M. Then When constructing a parallel block, select one idle composite block from the idle resource pools of each channel according to the number of bad blocks for staggered combination to obtain a new parallel block.

4. The parallel block management method according to claim 3, characterized in that: The step of when constructing a parallel block, selecting one idle composite block from the idle resource pools of each channel according to the number of bad blocks for staggered combination to obtain a new parallel block includes: Let C represent the channel set, and the total number of channels is N c , the number of planes on each wafer is recorded as N p , initialize the number of remaining bad blocks b = M, initialize the number of the current classification pool p = N p , initialize the channel set C = {1,2,…,N c }; Use the set S to represent the parallel block composed of composite blocks, and initialize it as an empty set, where the elements are two-dimensional variables composed of channel numbers and composite block numbers; If b ≥ p, traverse the elements i of the channel set C, where the element i ∈ C, find the set P(j,p) with the largest number of elements in all sets P(i,p) as the target, jump to the step where the set P(j,p) is not empty, otherwise jump to the step 0 < b < p; If the set P(j,p) is not empty, select the composite block (k) with the minimum number of erase times, delete the element k from the set P(j,p), and at the same time delete the element j from the set C, update b = b - p, add the element (j,k) to the set S. If the set P(j,p) is empty, update p = p - 1, and jump to the step b ≥ p; If 0 < b < p, traverse the elements i of the set C, where the element i ∈ C, find the set P(j,b) with the largest number of elements in the set P(i,b) as the target, otherwise jump to the step b = 0; If the set P(j,b) is not empty, select the composite block (k) with the smallest number of erasures, delete the element k from the set P(j,b), and delete the element j from the set C, update b=0, add the element (j,k) to the set S, if the set P(j,b) is empty, update p=p-1, and jump to the step b≥p; If b = 0, traverse the element i of the set C, where element i∈C, select the composite block (k) with the smallest number of erasures from the set P(i,0), delete the element k from the set P(i,0), delete the element i from the set C, and add the element (j,k) to the set S.

5. The parallel block management method according to claim 3, characterized in that: The step of describing all classification pools as a set of integers, in which the integers represent the numbers of the composite blocks, and using P(i, k) to represent the set of numbers of the composite blocks with the number of bad blocks k on the target wafer of the i-th channel includes: The target wafers corresponding to the channels of the solid state drive are used as columns, and the classification pools are used as rows to form a classification pool distribution of the free blocks before combination, and the bad block composite block numbers are filled in the target wafers of the channels in the column direction and the classification pools in the row direction; According to the classification pool distribution of the free blocks before combination, P(i,k) is used to represent the set of numbers of composite blocks with k bad blocks on the target wafer of the i-th channel.

6. The parallel block management method according to claim 5, characterized in that: When the number of the combined idle parallel blocks is less than a preset threshold, the parallel blocks are recombined, and a composite block is selected from the classification pool of each wafer to form a new parallel block. The step also includes: Update the classification pool distribution of the free blocks before combination, and obtain the classification pool distribution of all remaining uncombined composite blocks.

7. The parallel block management method according to claim 1, characterized in that: The method further comprises: When garbage collection generates new idle parallel blocks, the idle parallel blocks are decomposed into idle composite blocks, and are respectively inserted into corresponding classification pools on each wafer according to the number of bad blocks in the composite blocks.

8. A parallel block management device, characterized in that: The device comprises: A bad block management module is used to group blocks with the same serial number on multiple planes of the same wafer on all channels of the solid-state hard disk into a composite block, count the number of bad blocks of all composite blocks in the data storage area of ​​the solid-state hard disk when the solid-state hard disk is powered on for the first time, and put the composite block number on each wafer into a corresponding classification pool according to the number of bad blocks; A parallel block setting module, used to select one composite block from each wafer on each channel of the solid state drive and combine them into a parallel block; The parallel block reorganization module is used to reorganize the parallel blocks when the number of idle parallel blocks after combination is less than a preset threshold value, and select a composite block from the classification pool of each wafer to form a new parallel block.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.