Data protection method, solid state hard disk controller and solid state hard disk
By allocating and grouping verification dies and data dies in solid-state drives, we ensure that there is verification die in each group and use XOR to recover the wrong data, the problem of reducing the protection strength of verification dies after the capacity of the solid-state drive is increased, and the improvement of the improvement of the protection of the verification dies is improved. Data protection strength and adapt to customer needs.
Patent Information
- Application Number
- CN202111628557.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-12-28
AI Technical Summary
In the prior art, with the increase in the capacity of the solid-state hard disk, the protection strength of the verification die on data is reduced, and it is impossible to effectively protect multiple dies from errors.
By determining the allocation ratio of the number of verification dies and data dies in the solid-state hard disk, grouping and determining the location of verification dies, there is a verification die in each group, and using XOR operation to restore the wrong data dies to ensure that the capacity is increased Maintain stable data protection strength under the circumstances.
It improves the protection strength of data, can adjust the proportion of verification dies according to customer needs, and achieves appropriate data protection effects.
Smart Images

Figure CN114297737B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of solid state hard disks, and in particular to a data protection method, a solid state hard disk controller and a solid state hard disk. Background Art
[0002] A large number of NAND particles are used in solid-state drives. Due to the nature of NAND particles themselves, data in the die may be wrong. It is necessary to use independent disk redundant arrays RAID (Redundant Arrays of Independent Disks) to protect the data and recover the data when the data is read incorrectly. Specifically, when the data of a die in a page of the solid-state drive is wrong, the data can be recovered through the check die in the RAID. With the development of solid-state drive related technologies, the capacity of solid-state drives has increased, and the number of dies has also increased significantly. In this way, the probability of die errors in a stripe has increased significantly. If there are two or more die data errors in a stripe, data recovery cannot be performed through the check die. That is, in the prior art, the protection strength of the check die for data decreases with the increase of the capacity of the solid-state drive. Summary of the invention
[0003] The main technical problem solved by the embodiments of the present invention is that the protection strength of the check die for data in the prior art decreases as the capacity of the solid-state hard disk increases.
[0004] To solve the above technical problems, a technical solution adopted in an embodiment of the present invention is: to provide a data protection method, applied to a solid state drive, wherein the solid state drive is vertically divided into a plurality of sequentially numbered dies, the method comprising: determining the distribution ratio of the number of check dies and data dies in the solid state drive, including determining the protection strength of the check dies, wherein the protection strength of the check dies is a first number n of data dies protected by a check die; grouping the dies in the solid state drive based on the distribution ratio so that the ratio of the check dies to the data dies in each page satisfies the distribution ratio; determining the position of the check dies in a corresponding group so that there is a check die for each page in a group; generating a check die according to the data dies in the corresponding group and in combination with the position of the check die; wherein determining the position of the check die in the corresponding group comprises: taking n+1 pages as a cycle of a position model, in each of the cycles, the position of the first die in the group is the position of the check die of the first page, and as the number of pages increases, the position of the check die increases accordingly.
[0005] Optionally, determining the distribution ratio of the number of check dies and data dies in the solid state drive further includes: calculating a second number m of the check dies in a page of the solid state drive based on the protection strength of the check dies.
[0006] Optionally, the second number m of verification dies is calculated as follows: m=number of dies in the solid state drive / (n+1).
[0007] Optionally, determining the position of the verification die in the corresponding group includes: selecting a die number in the group, and using the position of the die with the number as the position of the verification die in each page in the corresponding group.
[0008] Optionally, determining the position of the check die in the corresponding group includes: taking 2n pages as a cycle of the position model, in each of the cycles, the position of the first die in the group is the position of the check die of the first page, and the position of the check die increases accordingly with the increase of pages until the position of the last die in the group, and the position of the check die decreases accordingly with the increase of pages.
[0009] Optionally, the method further includes: when an erroneous data die is detected, recovering the erroneous data die according to the check die in the group corresponding to the erroneous data die.
[0010] Optionally, recovering the erroneous data die according to the check die in the group corresponding to the erroneous data die includes: obtaining the group and the corresponding page corresponding to the erroneous data die according to the position of the erroneous data die; obtaining other data dies and corresponding check dies except the erroneous data die in the corresponding page of the corresponding group; performing XOR calculation on the check die and the other data dies to obtain recovery data of the erroneous data die, so as to recover the erroneous data die.
[0011] To solve the above technical problems, another technical solution adopted by the embodiment of the present invention is: to provide a solid-state hard disk firmware system, including: a ratio allocation module, used to determine the allocation ratio of the number of check dies and data dies in the solid-state hard disk, including determining the protection strength of the check die, wherein the protection strength of the check die is the first number n of data dies protected by a check die; a die grouping module; used to group the dies in the solid-state hard disk based on the allocation ratio so that the ratio of the check die to the data die in each page satisfies the allocation ratio; a position determination module, used to determine the position of the check die in the corresponding group so that there is a check die in each page in a group; a check die generation module, used to generate a check die according to the data die in the corresponding group and the position of the check die; wherein the position determination module is specifically used to: take n+1 pages as a cycle of a position model, in each of the cycles, the position of the first die in the group is the position of the check die of the first page, and as the pages increase, the positions of the check dies increase accordingly.
[0012] To solve the above technical problems, another technical solution adopted in the implementation mode of the present application is: to provide a solid-state hard disk controller, comprising: the solid-state hard disk firmware system described above; 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 executes the data protection method described above.
[0013] To solve the above technical problems, another technical solution adopted in the implementation of the present application is: to provide a solid state drive, comprising: the solid state drive controller mentioned above, and at least one flash memory medium communicatively connected to the solid state drive controller.
[0014] In order to solve the above technical problems, another technical solution adopted in the implementation mode of the present application is: providing a non-volatile computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the solid-state hard disk to execute the data protection method as described above.
[0015] Different from the related art, the present invention provides a data protection method, which is applied to a solid-state drive, wherein the solid-state drive is vertically divided into a plurality of sequentially numbered dies, and the method comprises: determining the distribution ratio of the number of check dies and data dies in the solid-state drive; grouping the dies in the solid-state drive based on the distribution ratio; determining the position of the check die in the corresponding group; and generating a check die according to the data die in the corresponding group and the position of the check die. The embodiment of the present invention ensures that the data protection strength can be maintained stably when the capacity of the solid-state drive is increased by setting the ratio of the check die to the data die, thereby improving the protection strength of the data, and can adjust the ratio of the check die according to the customer's own needs to achieve a suitable data protection effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] One or more embodiments are exemplarily described by corresponding drawings, which do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and the figures in the drawings do not constitute proportional limitations unless otherwise stated.
[0017] Figure 1 This is a schematic diagram of the distribution of dies in the NAND particles of the solid-state drive;
[0018] Figure 2 is a flow chart of a data protection method provided by an embodiment of the present invention;
[0019] Figure 3 is a schematic diagram of a method for determining an allocation ratio of the number of check dies to data dies provided by an embodiment of the present invention;
[0020] Figure 4 The embodiment of the present invention is compared with Figure 1 A schematic diagram of the position of the check die in the corresponding group provided in the case of
[0021] Figure 5a This is another schematic diagram for verifying the position of the die. Figure 5b The embodiment of the present invention is compared with Figure 5a A schematic diagram of the position of the check die in the corresponding group provided in the case of
[0022] Figure 6a This is another schematic diagram for checking the position of the die. Figure 6b The embodiment of the present invention is compared with Figure 6a A schematic diagram of the position of the check die in the corresponding group provided in the case of
[0023] Figure 7 is a schematic diagram of a method for recovering an erroneous data die according to a check die provided by an embodiment of the present invention;
[0024] Figure 8 is a schematic diagram of the structure of a solid state drive firmware system provided by an embodiment of the present invention;
[0025] Fig. 9 It is a structural schematic diagram of a solid state hard disk provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention 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 invention and are not used to limit the present invention.
[0027] It should be noted that, if there is no conflict, the various features in the embodiments of the present invention can be combined with each other, and all are within the protection scope of the present invention. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order from the module division in the device schematic diagram or the order in the flow chart.
[0028] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.
[0029] See also Figure 1 , Figure 1It is a schematic diagram of the data layout in the NAND particles of the solid-state drive. According to the needs of the logic layer, it is abstractly divided into the arrangement shown in the figure. It is divided horizontally into multiple sblks (superBlocks), each sblk contains multiple pages; it is divided vertically into multiple dies numbered in sequence. For example, the solid-state drive shown in the figure is divided vertically into 8 dies, namely DIE0, DIE1, ..., DIE7, and the 8th die (DIE7) is used as a check die. The check die is distinguished by dark color in the figure. Taking the Nth sblk as an example, there are N pages in the sblk, among which the check die corresponding to each page can be obtained by performing XOR operation on the data die. For example, taking the sblk Taking any page of N as an example, it can be seen from the figure that the page corresponds to 7 data dies (die0, die1, die2, die3, die4, die5 and die6) and a check die (die7). Based on the calculation rules of the check die data, the Parity check die data of die7 = die0^die1^die2^die3^die4^die5^die6, where "^" is the exclusive OR operator (xor).
[0030] It should be noted that if Figure 1 As shown in the figure, in addition to being vertically divided into multiple dies, the vertical division of the NAND particles in actual situations also includes division into multiple LUNs (Logical Unit Number), CEs (Chip Enable), CHs (Channels) or planes, etc. Since these divisions are basically not involved in the embodiments of the present invention, they are only explained from the perspective of die in the embodiments of the present invention.
[0031] An embodiment of the present invention provides a data protection method, which is applied to a solid state drive. The solid state drive is vertically divided into a plurality of sequentially numbered dies, see Figure 2 , the method comprising:
[0032] S11. Determine the distribution ratio of the number of check dies and data dies in the solid state drive. For each page of data, the check die can protect the data dies in this page to a certain extent. Figure 1 Take any page of sblk N in as an example, assuming that the data in die1 is wrong, and the SSD backend firmware checks and reports an error. At this time, the error data die (die1) can be recovered by verifying die (die7). The specific recovery calculation method is die1 = die0^die2^die3^die4^die5^die6^die7 (parity).
[0033] If the capacity of the solid-state drive increases, the number of dies will also increase significantly accordingly. For example, if the SSD has 64 dies, die63 is a check die. Taking a page as an example, assuming that there is a problem reading the die0 data, that is, die0 is an erroneous data die, then the above recovery calculation rule is used for data recovery: data die0 = die1^die2^die3…die63; for another example, if the SSD has 64 dies, die127 is a check die. Taking a page as an example, assuming that there is a problem reading the die0 data, then the above recovery calculation rule is used for data recovery: data die0 = die1^die2^die3…die127. According to the above data recovery calculation rules, it can be seen that the more dies there are in the SSD, the more times a check die needs to be XOR calculated, and data recovery can only be performed if there is a data error in one die. If there are two or more data dies with errors, the erroneous data die will not be able to be recovered. Therefore, Figure 1 The protection strength of the check die for the data die will decrease as the number of dies increases, that is, the protection strength of the check die for the data die in the SSD is inversely proportional to the total number of dies in the SSD.
[0034] Please combine Figure 3 , the determining of the distribution ratio of the number of check dies and data dies in the solid state drive includes:
[0035] S111. Determine the protection strength of the check die, wherein the protection strength of the check die is a first number n of data dies protected by one check die.
[0036] S112. Calculate a second number m of the check dies in a page of the solid state drive based on the protection strength of the check dies.
[0037] Specifically, the calculation method of the second number m of the verification dies may be:
[0038] m = the number of dies in the SSD / (n+1).
[0039] Among them, the protection strength n of the check die can be set by the staff. For example, if the protection strength of the check die is expected to be very high, the value of n can be set to a smaller value, such as setting n to 3, indicating that a check die can protect 3 data dies in addition to itself; if the protection strength of the check die is not expected to be very high, the value of n can be set to a slightly larger value, such as setting n to 15, indicating that a check die can protect 15 data dies in addition to itself. In some cases, for the convenience of calculation, the value of n is usually (2^a)-1, that is, the total number of check dies plus the data dies it can protect is 2 to the power of a, where a is an integer greater than or equal to 2. It should be noted that this solution sacrifices part of the capacity of the solid-state drive to enhance the protection strength of the data, that is, in some cases, the value of n is not suitable to be too small.
[0040] S12, grouping the dies in the SSD based on the allocation ratio so that the ratio of the check die to the data die in each page satisfies the allocation ratio. After determining the allocation ratio of the check die to the data die according to the above step S11, the number of the check die in each page can be calculated. Figure 1 and Figure 4 For example, Figure 1 This is a schematic diagram of the distribution of check dies in the prior art, that is, there is only one check die (indicated as DIE7) among the 8 dies of the solid-state drive. The check die of each page can protect other data dies in the page. When a data die in a page fails, data can be recovered through the check die corresponding to the page according to the above recovery calculation rules. Figure 4 , Figure 4 The corresponding allocation ratio is one check die protecting three data dies, and the second number of the check dies in one page of the solid state drive is 2, that is, specifically, the 8 dies in the solid state drive are divided into two groups, each group including one check die and 3 data dies.
[0041] S13, determine the position of the verification die in the corresponding group so that each page in a group has a verification die. The determination of the position of the verification die in the corresponding group may be: select a die number in the group, and use the position of the die with the number as the position of the verification die in each page in the corresponding group. Figure 4 For example, Figure 4The 8 dies of the SSD are divided into two groups. The first group includes DIE0, DIE1, DIE2 and DIE3, and DIE3 is selected as the check die; the second group includes DIE4, DIE5, DIE6 and DIE7, and DIE7 is selected as the check die. Specifically, the check die (DIE3) of each page in the first group protects the data of the other three data dies (DIE0, DIE1 and DIE2) of the page; the check die (DIE7) of each page in the second group protects the data of the other three data dies (DIE4, DIE5 and DIE6) of the page. Figure 4 The position regularity of the check die is shown, and this check die position distribution mode can be called same-die distribution.
[0042] In some other embodiments, the position of the verification die in the corresponding group may also be determined by: taking (n+1) pages as a cycle of a position model, in each of the cycles, the position of the first die in the group is the position of the verification die on the first page, and as the number of pages increases, the position of the verification die increases accordingly.
[0043] Please combine Figure 5a and Figure 5b The SSD in this example includes 16 dies, and the check dies in each page are shown in the figure. Figure 5a The figure shows the ungrouped situation, that is, there is only one check die in each page, and the position of the check die is distributed as follows: starting from the first die of the first page, after the page number is increased by 1, the position of the check die is increased by 1 until the position of the last die, and then it is increased cyclically from the first die. Specifically, in a certain sblk, there is one check die per page, and each check die protects the data of the other 15 data dies on the page. The position of the check die is as follows: Figure 5a shown.
[0044] by Figure 5a For example, the solid-state drive includes 16 dies, combined with Figure 5b After the process of steps S11 to S13, the allocation ratio is set to one check die protecting three data dies, the second number of the check die in a page of a certain sblk of the solid state drive is 4, and the 16 dies are divided into 4 groups, with 4 pages as a cycle of a position model (in this example, one check die protects the data of three data dies, that is, n is 3, and the cycle is 3+1=4). In each cycle, the position of the first die in the group is the position of the check die of the first page. As the number of pages increases, the position of the check die increases accordingly. That is Figure 5bThe first group includes DIE0, DIE1, DIE2 and DIE3; the second group includes DIE4, DIE5, DIE6 and DIE7; the third group includes DIE8, DIE9, DIE10 and DIE11; the fourth group includes DIE12, DIE13, DIE14 and DIE15. The position of the check die in each group is shown in the figure. As the page increases in the cycle, the position of the check die increases accordingly. Figure 5a and Figure 5b The position regularity of the check die is shown, and this check die position distribution mode can be called growth distribution.
[0045] It should be noted that the terms "first group", "second group", "third group" and "fourth group" are only used to distinguish the grouping of dies in the solid-state drive, and are not used to indicate or imply the relative importance relationship between the groups.
[0046] In some other embodiments, the position of the check die in the corresponding group may also be determined by: taking 2n pages as a cycle of a position model, in each of the cycles, the position of the first die in the group is the position of the check die of the first page, and the position of the check die increases accordingly with the increase of pages until the position of the last die in the group, and the position of the check die decreases accordingly with the increase of pages.
[0047] Please combine Figure 6a and Figure 6b The SSD in this example includes 16 dies, and the check dies in each page are shown in the figure. Figure 6a The figure shows the ungrouped situation, that is, there is only one check die in each page, and the position of the check die is distributed as follows: starting from the first die of the first page, the page number is increased by 1, and the position of the check die is increased by 1 until the position of the last die. As the number of pages increases, the position of the check die decreases until the position of the first die, and so on. Specifically, in a certain sblk, each page has a check die, and each check die protects the data of the other 15 data dies of the page. The position of the check die is as follows: Figure 6a shown.
[0048] by Figure 6a For example, the solid-state drive includes 16 dies, combined with Figure 6b, after the process of steps S11 to S13, the allocation ratio is set to one check die protecting three data dies, the second number of the check die in a page of a certain sblk of the solid-state drive is 4, and the 16 dies are divided into 4 groups, with 6 pages as a cycle of the position model (similarly, in this example, one check die protects the data of three data dies, that is, n is 3, and the cycle is 2*3=6). In each of the cycles, the position of the first die in the group is the position of the check die of the first page. As the number of pages increases, the position of the check die increases accordingly, but when it grows to the end, as the number of pages increases, the position of the check die decreases accordingly. Specifically, Figure 6b The first group includes DIE0, DIE1, DIE2 and DIE3; the second group includes DIE4, DIE5, DIE6 and DIE7; the third group includes DIE8, DIE9, DIE10 and DIE11; the fourth group includes DIE12, DIE13, DIE14 and DIE15. The position of the check die in each group is shown in the figure. Figure 6a and Figure 6b The position regularity of the check die is shown, and this check die position distribution mode can be called rotation distribution. As the pages increase in the cycle, the position of the check die increases accordingly until it increases to the position of the last die in the group. As the pages increase, the position of the check die decreases accordingly, thereby realizing the rotation of the check die position in the group.
[0049] It should be noted that the embodiments of the present invention list the three verification die position distribution methods, namely the same die distribution, growth distribution and rotation distribution, but are not used to limit the verification die position to be determined only according to these three distribution methods. In some embodiments, other suitable methods other than the above three methods can also be used to determine the position of the verification die in each group, and the embodiments of the present invention do not limit this.
[0050] S14. Generate a check die according to the data die in the corresponding group and the position of the check die.
[0051] The calculation method of the check die is to perform XOR operation on the data dies in the same group and page to obtain the corresponding check die. Figure 4 , the embodiment of the present invention is based on Figure 4For example, the check die (DIE3) of each page in the first group protects the data of the other three data dies (DIE0, DIE1 and DIE2) of the page; the check die (DIE7) of each page in the second group protects the data of the other three data dies (DIE4, DIE5 and DIE6) of the page. According to the calculation rule of the check die data, the Parity check die data of die3 = die0^die1^die2; the Parity check die data of die7 = die4^die5^die6.
[0052] Please combine Figure 5b , the embodiment of the present invention is based on Figure 5b For example, similarly, the check die of each page in each group protects the other three data dies of the page. The calculation method of the check die is to perform XOR operation on the data dies of the same group and the same page to obtain the corresponding check die. Since the positions of the check dies of different pages are different, the calculation of the check die data is different from the above-mentioned Figure 4 For example, Figure 5b In the first group, the check die0 in the first page (page0) is die1^die2^die3; the check die1 in the second page (page1) is die0^die2^die3; the check die2 in the third page (page2) is die0^die1^die3, and so on. The calculation method of the check die in the second to fourth groups is the same, which will not be repeated here.
[0053] In some embodiments, the method further includes S15, when an error data die is detected, recovering the error data die according to the check die in the group corresponding to the error data die. Figure 7 , the recovering the erroneous data die according to the check die in the corresponding group of the erroneous data die comprises:
[0054] S151, acquiring the group and page corresponding to the error data die according to the position of the error data die. Figure 6b For example, suppose the backend firmware of the solid-state drive detects that the data in a data die of a certain sblk is wrong. First, the position of the wrong data die is obtained. For example, the data die6 in the first page is wrong. The group corresponding to the wrong data die6 is the second group, and the corresponding page is page0. Among them, the die number of the wrong data die6 is 6, and each group contains 4 dies, 6 / 4=1...2. Specifically, the position of the wrong data die6 can be recorded as 1*4+2. Since the die number starts from 0, it is known that the position of the wrong data die6 is the third one in the second group.
[0055] S152, obtaining other data dies and corresponding check dies except the error data die in the corresponding page of the corresponding group. Taking the error data die6 as an example, obtaining the remaining data dies (die5 and die7) and the corresponding check die (die4) in the second group page0. Specifically, the positions of these three dies are determined as follows: 1*4+1; 1*4+3 and 1*4+0.
[0056] S153, perform XOR calculation on the check die and the other data die to obtain the recovery data of the error data die to recover the error data die. Taking the error data die6 as an example, die6 is calculated based on die5, die7 and die4, that is, die6=die4^die5^die7. Thus, the recovery data of die6 is calculated to recover the error data die6.
[0057] The embodiment of the present invention ensures that stable data protection strength can be maintained when the capacity of the solid-state hard disk is increased by setting the ratio of check die to data die, thereby improving the protection strength of data. In addition, the ratio of check die can be adjusted according to the customer's own needs to achieve a suitable data protection effect.
[0058] The present invention provides a solid state drive firmware system. Figure 8 , the SSD firmware system includes: a ratio allocation module 21, a die grouping module 22, a position determination module 23 and a check die generation module 24. The ratio allocation module 21 is used to determine the allocation ratio of the number of check dies and data dies in the SSD; the die grouping module 22 is used to group the dies in the SSD based on the allocation ratio so that the ratio of the check die to the data die in each page meets the allocation ratio; the position determination module 23 is used to determine the position of the check die in the corresponding group so that each page in a group has a check die; the check die generation module 24 is used to generate a check die according to the data die in the corresponding group and the position of the check die.
[0059] In some other embodiments, the solid state drive firmware system further includes: a data die recovery module 25, wherein the data die recovery module 25 is used to recover the erroneous data die according to the check die in the corresponding group of the erroneous data die when an erroneous data die is detected.
[0060] It should be noted that the above-mentioned solid-state drive firmware system can execute the data protection method provided in the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in the embodiment of the solid-state drive firmware system, please refer to the data protection method provided in the embodiment of the present invention.
[0061] See also Fig. 9 , Fig. 9 300 is a schematic diagram of a solid state drive controller provided by an embodiment of the present invention. The solid state drive controller 300 can be used to execute the above data protection method. The solid state drive controller 300 includes:
[0062] The solid state drive firmware system as described above; one or more processors 31 and memory 32, Fig. 9 A processor 31 is taken as an example.
[0063] The processor 31 and the memory 32 may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.
[0064] The memory 32 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the data protection method in the embodiment of the present invention. The processor 31 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 32, that is, implements the data protection method in the above method embodiment.
[0065] The memory 32 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created according to the use of the firmware system, etc. In addition, the memory 32 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 32 may optionally include a memory remotely arranged relative to the processor 31, and these remote memories may be connected to the firmware system via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0066] The one or more modules are stored in the memory 32, and when executed by the one or more processors 31, execute the data protection method in any of the above method embodiments, for example, execute the data protection method described above. Figure 2 , Figure 3 or Figure 7 Method steps and implementation in Figure 8 The functions of the modules in .
[0067] An embodiment of the present invention further provides a solid state drive, which is vertically divided into a plurality of sequentially numbered dies, and includes the above-mentioned solid state drive controller and at least one flash memory medium communicatively connected to the solid state drive controller.
[0068] The above product can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0069] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Under the idea of the present disclosure, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A data protection method, characterized in that: Applied to a solid state drive, the solid state drive is divided vertically into a plurality of sequentially numbered dies, the method comprising: Determining a distribution ratio of the number of check dies and data dies in a solid state drive includes: determining a protection strength of the check die, wherein the protection strength of the check die is a first number n of data dies protected by one check die; grouping the dies in the solid state drive based on the allocation ratio so that the ratio of the check die to the data die in each page satisfies the allocation ratio; Determine the position of the check die in the corresponding group so that there is a check die for each page in a group; Generate a check die according to the data die in the corresponding group and in combination with the position of the check die; Wherein, determining the position of the check die in the corresponding group includes: Taking n+1 pages as a cycle of the position model, in each cycle, the position of the first die in the group is the position of the verification die of the first page, and as the number of pages increases, the position of the verification die increases accordingly.
2. The method according to claim 1, characterized in that: Determining the distribution ratio of the number of check dies and data dies in the solid state drive also includes: A second number m of the check dies in a page of the solid state drive is calculated based on the protection strength of the check dies.
3. The method according to claim 2, characterized in that The calculation method of the second number m of the verification dies is: m = the number of dies in the SSD / (n+1).
4. The method according to claim 1, characterized in that: The alternative way of determining the position of the check die in the corresponding group includes: A die number is selected in the group, and the position of the die with the number is used as the position of the verification die in each page of the corresponding group.
5. The method according to claim 1, characterized in that The alternative way of determining the position of the check die in the corresponding group includes: Taking 2n pages as a cycle of the position model, in each cycle, the position of the first die in the group is the position of the verification die of the first page, and the position of the verification die increases accordingly with the increase of pages until the position of the last die in the group, and the position of the verification die decreases accordingly with the increase of pages.
6. The method according to claim 1, characterized in that The method further includes: when an erroneous data die is detected, recovering the erroneous data die according to the check die in the group corresponding to the erroneous data die.
7. The method according to claim 6, characterized in that The recovering the error data die according to the check die in the corresponding group of the error data die comprises: Acquire a group and a page corresponding to the error data die according to the position of the error data die; Obtaining other data dies and corresponding check dies except the error data die in the corresponding page of the corresponding group; The check die and the other data die are XOR-ed to obtain the recovery data of the error data die to recover the error data die.
8. A solid state drive firmware system, characterized in that: include: a ratio allocation module, configured to determine an allocation ratio of the number of check dies and data dies in the solid state drive, including determining a protection strength of the check die, wherein the protection strength of the check die is a first number n of data dies protected by one check die; A die grouping module; used to group the dies in the solid-state drive based on the allocation ratio so that the ratio of the check die to the data die in each page meets the allocation ratio; A position determination module, used to determine the position of the check die in the corresponding group so that each page in a group has a check die; A check die generation module, used to generate a check die according to the data die in the corresponding group and in combination with the position of the check die; Among them, the position determination module is specifically used to: take n+1 pages as a cycle of the position model, in each cycle, the position of the first die in the group is the position of the verification die of the first page, and as the pages increase, the position of the verification die increases accordingly.
9. A solid state hard disk controller, characterized in that: include: The solid state drive firmware system as claimed in claim 8; at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the data protection method described in any one of claims 1-7.
10. A solid state hard disk, characterized in that: include: The solid state drive controller of claim 9, and at least one flash memory medium communicatively connected to the solid state drive controller.
