Bad list compression method and device, equipment and storage medium

By scanning and compressing Flash to merge bad lists, the data write errors caused by insufficient RAM space are solved, and the stability of Flash and the optimization of RAM space are achieved.

CN120386489APending Publication Date: 2025-07-29SHENZHEN SANDIYIXIN ELECTRONICS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510479323.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

Due to the limited RAM space of the storage control chip, it is impossible to fully store the bad list of Flash, resulting in an error during data writing.

Method used

By scanning Flash, the bad list of each Plane is read and compressed and merged according to the preset merge rules, and the bad list after compressed merge is stored.

Benefits of technology

Reduces the use of RAM space by bad lists, avoids data write errors, and improves the stability of Flash.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386489A_ABST
    Figure CN120386489A_ABST
Patent Text Reader

Abstract

The invention provides a bad list compression method and device, equipment and a storage medium. The method comprises the following steps of: scanning the Flash; reading the bad lists of the planes, and compressing and merging the bad lists according to a preset merging rule; and storing the compressed and merged bad list. The bad lists are compressed and merged according to the preset merging rule, so that the Flash bad lists are compressed and simplified, and the problem that the bad lists occupy excessive RAM space resources is solved as much as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of flash memory, and in particular, to a method, device, equipment and storage medium for compressing a bad list. Background Art

[0002] NANDFlash (hereinafter referred to as Flash for short) is one of the mainstream storage media, and its function is to implement data storage. For storage products, Flash is almost always the first choice as the core storage medium. However, due to the physical characteristics of Flash, Flash needs to be mass-produced with a storage control chip. In mass production, the firmware for managing Flash can be "burned" into Flash. When Flash needs to write or read data, the storage control chip reads and loads the firmware for managing Flash, and relies on data such as various attribute characteristics and management tables of Flash recorded in the firmware to implement operations such as reading, writing, and erasing of Flash.

[0003] The various data recorded in the firmware are formed by scanning with the computing power of the host during the mass production stage of Flash. The bad list (Bad Column Table, BCT) is one of the key data to ensure the stable storage of data in Flash, and this table will be stored in the RAM of the storage control chip. However, due to the limited length of the RAM space of the storage control chip, it may happen that the BCT cannot be completely stored. If this situation occurs, it may affect the write operation of Flash, that is, due to the incompleteness of the BCT, all bad columns of Flash cannot be identified, resulting in errors when data is written into Flash. Summary of the Invention

[0004] The purpose of the present invention is to overcome the deficiencies in the prior art, and provide a method, device, equipment and storage medium for compressing a bad list, which can compress and simplify the bad list of Flash and reduce the RAM space resources occupied by the bad list.

[0005] The first aspect of the present application provides a method for compressing a bad list, including:

[0006] Performing a scan of Flash;

[0007] Reading the bad lists of each Plane, and compressing and merging the bad lists according to a preset merging rule;

[0008] Storing the bad list after compression and merging.

[0009] Preferably, in one embodiment, before the step of reading the bad lists of each Plane and compressing and merging the bad lists according to a preset merging rule, it further includes:

[0010] Obtaining the length of the RAM space;

[0011] Determine whether the length of the RAM space reaches the length capable of storing each of the bad lists before compression and merging. If so, skip the compression and merging of each of the bad lists and directly store each of the bad lists; if not, perform compression and merging on each of the bad lists according to a preset merging rule.

[0012] Preferably, in one embodiment, the performing the scan of the Flash includes:

[0013] Perform read and write operations on the Flash twice successively, and perform exclusive OR processing on the results of the two read and write operations successively;

[0014] According to the exclusive OR processing result, parse out the bad list corresponding to each Plane in the Flash.

[0015] Preferably, in one embodiment, the preset merging rule includes:

[0016] Load the bit templates of each of the bad lists;

[0017] Calculate the similarity between each of the bad lists;

[0018] Compress and merge the bad lists that reach the similarity threshold.

[0019] A second aspect of the present application provides a bad list compression device, including:

[0020] A scan module, configured to perform a scan of the Flash;

[0021] A compression and merging module, configured to read the bad lists of each Plane and perform compression and merging on each of the bad lists according to a preset merging rule;

[0022] A storage module, configured to store the bad lists after compression and merging.

[0023] Preferably, in one embodiment, it further includes:

[0024] An acquisition module, configured to acquire the length of the RAM space;

[0025] A judgment module, configured to judge whether the length of the RAM space reaches the length capable of storing each of the bad lists before compression and merging. If so, skip the compression and merging of each of the bad lists and directly store each of the bad lists; if not, perform compression and merging on each of the bad lists according to a preset merging rule.

[0026] Preferably, in one embodiment, the scan module includes:

[0027] A read-write unit, configured to perform two read-write operations on the Flash successively, and perform an exclusive OR operation on the results of the two read-write operations successively;

[0028] An exclusive OR unit, configured to parse out the bad list corresponding to each Plane in the Flash according to the result of the exclusive OR operation.

[0029] Preferably, in one embodiment, the preset merging rule includes:

[0030] Loading the bit column templates of each of the bad lists;

[0031] Calculating the similarity between each of the bit column templates;

[0032] Compressively merging the bit column templates that reach the similarity threshold.

[0033] A third aspect of the present application provides an electronic device, including:

[0034] A processor; and

[0035] A memory, on which executable code is stored, characterized in that when the executable code is executed by the processor, the processor is caused to execute the bad list compression method as described above.

[0036] A fourth aspect of the present application provides a computer-readable storage medium, characterized in that executable code is stored, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the bad list compression method as described above.

[0037] The technical solution of the present application includes: performing a scan of the Flash; reading the bad lists of each Plane, and compressively merging the bad lists according to a preset merging rule; storing the compressively merged bad lists. By compressively merging the bad lists according to the preset merging rule, the compression and simplification of the Flash bad list are realized, and the problem that the bad list occupies too much RAM space resources is reduced as much as possible. Description of the Drawings

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative efforts.

[0039] Figure 1 It is a flowchart showing the bad list compression method according to an embodiment of the present application;

[0040] Figure 2It is a schematic flowchart of a bad list compression method shown in another embodiment of the present application;

[0041] Figure 3 Shown is a schematic structural diagram of a bad list compression device in an embodiment of the present application;

[0042] Figure 4 Shown is a schematic structural diagram of a bad list compression device in another embodiment of the present application;

[0043] Figure 5 Shown is a schematic structural diagram of an electronic device in an embodiment of the present application. Detailed implementation manners

[0044] To facilitate the understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. The preferred embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided so that the disclosure of the present invention can be understood more thoroughly and comprehensively.

[0045] It should be noted that when an element is referred to as "fixed to" another element, it can be directly on the other element or there can also be a middle element. When an element is considered to be "connected" to another element, it can be directly connected to the other element or there may be a middle element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are only for the purpose of illustration and do not represent the only embodiments.

[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs. The terms used herein in the description 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 herein includes any and all combinations of one or more of the related listed items.

[0047] In the related art, due to the limited length of the RAM space of the storage control chip, it may happen that the BCT cannot be completely stored. If this happens, it may affect the write operation of the Flash, that is, due to the incompleteness of the BCT, all the bad columns of the Flash cannot be recognized, resulting in errors when data is written into the Flash.

[0048] Therefore, in order to solve the above technical problems, the present application discloses a bad list compression method and corresponding embodiments, which can compress and simplify the bad list of the Flash and reduce the RAM space resources occupied by the bad list.

[0049] The technical solutions of the present application will be described in detail below with reference to the drawings.

[0050] Figure 1 The flowchart of the bad list compression method in an embodiment of the present application is shown.

[0051] Please refer to Figure 1 , a bad list compression method, including the following steps:

[0052] Step S110: Perform a scan of the Flash.

[0053] It should be noted that Flash, as a data storage medium, has a special physical architecture inside. Divided according to the physical hierarchy, they are LUN / DIE, Plane, Block, Page, and Bit in sequence. Among them, LUN / DIE is the basic unit for Flash to receive and execute commands, Block is the smallest erasure unit of Flash, and Page is the smallest read / write unit of Flash. Each Flash includes at least 1 Plane, and there are differences between each Plane. In firmware design, in order to minimize the management resources of the storage control chip as much as possible, for the Blocks and Pages in the same Plane, a common page template and a bad list are used to manage the Blocks and Pages in the same Plane. If a dedicated template management is established for each Block and Page in the same Plane, most of the Flash capacity will be used to store exclusive templates for internal management, which is unreasonable.

[0054] Performing a scan of the Flash, that is, performing a full disk read / write operation on the Flash, the purpose is to parse out the attribute data of the Flash, including identifying the bad columns, common page templates, management tables, etc. of the Flash. These attribute data are all data required for the subsequent storage control chip to control the read / write operations of the Flash. Before the storage control chip controls the read / write operations of the Flash, it is necessary to pre-read and load these attribute data, and rely on these attribute data to "understand" the internal architecture of the Flash to achieve the read / write operations of the Flash.

[0055] When performing a full - disk scan of the Flash, the storage control chip needs to perform write and read operations on the Flash in sequence, compare the written data with the read data, and parse the attribute data of the Flash according to the comparison result. Considering the unique write characteristic of the Flash, that is, the initial state of the Bit is "1", if the data written for the first time is "1", the initial state of the Bit will not change. At this time, it is impossible to parse whether the current Bit is damaged according to the comparison result of the written data and the read data. Therefore, in this embodiment, when the storage control chip controls the Flash to perform write and read operations, it will perform 2 write and read operations successively, and perform an exclusive - OR operation on the results of the two reads, so as to know the quality of the current Bit.

[0056] For example, if the initial data of the current Bit is "1", during the first write and read operations, the data written is still "1", and the data read is also "1". During the second write and read operations, the data written is "0", and the data read is "0". After performing an exclusive - OR operation on "1" and "0", the output is "1", indicating that the current Bit is good. If the initial data of the current Bit is "1", during the first write and read operations, the data written is still "1", and the data read is also "1". During the second write and read operations, the data written is "0", and the data read is "1". After performing an exclusive - OR operation on "1" and "1", the output is "0", indicating that the current Bit is bad. In this embodiment, combined with the unique operation mechanism of the exclusive - OR operation, it can stably judge the correct and incorrect situations of all Bits of the Flash. If only the comparison result of the written data and the read data for 1 time is used for parsing, there is a high probability of misjudging the Bits of the Flash.

[0057] Step S120: Read the bad lists of each Plane, and compress and merge the bad lists according to a preset merging rule.

[0058] After parsing and analyzing the attribute data of the Flash, the storage control chip can read the bad lists corresponding to each Plane in the Flash. It should be noted that not all Flashes have more than 1 Plane inside. If the Flash has only 1 Plane, then just read the bad list corresponding to the current Plane. Subsequently, compress and merge the bad lists according to a preset merging rule to complete the compression and simplification of the bad lists.

[0059] In this embodiment, the preset merging rule can be carried out in the following way: load the bit - column templates of each bad list; calculate the similarity between the bit - column templates; compress and merge the bit - column templates that reach the similarity threshold.

[0060] It should be noted that since each Plane has a corresponding bad list, and the bad lists of each Plane are unique. However, in the attribute characteristics of Flash, the attribute characteristics of each Plane under the same piece of Flash overlap. For example, after the storage control chip reads, the following bad lists of 4 Planes are obtained:

[0061] Plane0: 1110 1111 1111 0111 1110 1111 1111 1010;

[0062] Plane1: 1010 1111 1111 0111 1110 1111 1111 1011;

[0063] Plane2: 1001 1111 1110 0110 1111 1101 1101 1010;

[0064] Plane3: 1000 1111 1111 0110 1111 1101 1101 1010;

[0065] From the above bad lists, it can be seen that the bad lists of all Planes have 16 bit positions. Among them, "1" represents that the bit column is good and can store data normally, and "0" represents that the bit column is bad and cannot store data normally. Further observation shows that the bad lists of Plane0 and Plane1 have a certain similarity. The bad columns of Plane0 are located at the 3rd, 12th, 19th, 29th, and 31st positions, while the bad columns of Plane1 are located at the 1st, 3rd, 12th, 19th, and 29th positions. Subsequently, the similarity between each bad list is calculated through formula (1).

[0066] Similarity = Number of identical bit columns / Total number of bit columns * 100%; (1)

[0067] It is calculated that the similarity between the bad lists of Plane0 and Plane1 reaches 29 / 32 = 90%, reaching the preset similarity threshold of 60% (this value can be configured according to actual requirements and is not specifically limited). The bad lists of Plane0 and Plane1 can be merged, and the merged bad list can be expressed as follows:

[0068] Merged bad list 1 = 1010 1111 1111 0111 1110 1111 1111 1010;

[0069] It can be seen that the merged bad list is actually changed based on the bad list of Plane0. It is equivalent to marking the originally good bit columns in the bad list of Plane0 as bad points, so as to achieve the sharing of the bad lists of Plane0 and Plane1. Similarly, for the bad lists of Plane2 and Plane3, they can also be merged and shared according to the same usage method.

[0070] The merged bad list 2 = 1000 1111 1110 0110 1101 1101 1010.

[0071] Step S130: Store the compressed and merged bad list.

[0072] It should be noted that in this embodiment, by compressing and merging each bad list according to the preset merging rule, the compression and simplification of the Flash bad list are realized, and the problem that the bad list occupies too much RAM space resource is reduced as much as possible. According to the above steps, two merged bad lists are obtained, namely the merged bad list 1 and the merged bad list 2. When the RAM stores these two merged bad lists, in terms of the space allocation of the RAM, the pointer 1 is used to direct Plane0 and 1 to the merged bad list 1, and the pointer 2 is used to direct Plane2 and 3 to the merged bad list 2, so as to achieve the sharing of the merged bad lists. Moreover, the original 4 bad lists are compressed and simplified into 2 merged bad lists, which can reduce the space occupation of the original bad list on the RAM space resource.

[0073] Figure 2 The flowchart of the bad list compression method in another embodiment of the present application is shown.

[0074] Please refer to Figure 2 , a bad list compression method, including the following steps:

[0075] Step S210: Perform two read and write operations on the Flash successively, and perform an exclusive OR operation on the results of the two read and write operations successively.

[0076] When performing a full - disk scan of the Flash, the storage control chip needs to perform write and read operations on the Flash in sequence, compare the written data with the read data, and parse the attribute data of the Flash according to the comparison result. Considering the unique write characteristic of the Flash, that is, the initial state of a Bit is "1", if the data written for the first time is "1", the initial state of the Bit will not change. At this time, it is impossible to parse whether the current Bit is damaged according to the comparison result of the written data and the read data. Therefore, in this embodiment, when the storage control chip controls the Flash to perform write and read operations, it will perform 2 write and read operations successively, and perform an exclusive - OR operation on the results of the two reads, then it can know the quality of the current Bit.

[0077] Step S220: According to the exclusive - OR processing result, parse out the bad list corresponding to each Plane in the Flash.

[0078] For example, if the initial data of the current Bit is "1", during the first write and read operations, the written data is still "1", and the read data is also "1". During the second write and read operations, the written data is "0", and the read data is "0". After performing an exclusive - OR operation on "1" and "0", the output is "1", indicating that the current Bit is good. If the initial data of the current Bit is "1", during the first write and read operations, the written data is still "1", and the read data is also "1". During the second write and read operations, the written data is "0", and the read data is "1". After performing an exclusive - OR operation on "1" and "1", the output is "0", indicating that the current Bit is bad. In this embodiment, combined with the unique operation mechanism of the exclusive - OR operation, it can stably judge the correct and incorrect situations of all Bits in the Flash. If only the comparison result of the written data and the read data for 1 time is used for parsing, there is a high probability of misjudging the Bits in the Flash.

[0079] Step S230: Obtain the length of the RAM space.

[0080] It should be noted that the purpose of obtaining the length of the RAM space of the storage control chip is to determine whether the current RAM space length can store all the bad lists in the next step. If so, there is no need to perform the operation of compressing and merging the bad lists; if not, the operation of compressing and merging the bad lists is performed.

[0081] Step S240: Judge whether the RAM space length can store each bad list before compression and merging. If so, skip the compression and merging of each bad list and directly store each bad list; if not, perform compression and merging on each bad list according to the preset merging rules.

[0082] It should be noted that before compressing and merging the bad lists, the length of the RAM space of the current storage control chip can be judged first. If the length of the RAM space can already meet the condition of storing 4 bad lists simultaneously, the operation of step S250 does not need to be performed, and the operation of step S260 can be directly skipped. The reason is that the compression process of the bad lists is carried out considering the limited RAM space length. In principle, it is still necessary to store the most complete bad lists as much as possible.

[0083] Step S250: Read the bad lists of each Plane, and compress and merge the bad lists according to the preset merging rules.

[0084] After analyzing and obtaining the attribute data of the Flash, the storage control chip can read the bad lists corresponding to each Plane in the Flash. It should be noted that not all Flash devices have more than 1 Plane inside. If the Flash has only 1 Plane, then only read the bad list corresponding to the current Plane. Subsequently, compress and merge the bad lists according to the preset merging rules to complete the compression and simplification of the bad lists.

[0085] In this embodiment, the preset merging rules can be carried out in the following manner: load the bit column templates of each bad list; calculate the similarity between each bit column template; compress and merge the bit column templates that reach the similarity threshold.

[0086] It should be noted that since each Plane has a corresponding bad list, and the bad lists of each Plane are unique. However, in the attribute characteristics of the Flash, the attribute characteristics of each Plane under the same Flash chip overlap. For example, after the storage control chip reads, the following 4 bad lists of Planes are obtained:

[0087] Plane0: 1110 1111 1111 0111 1110 1111 1111 1010;

[0088] Plane1: 1010 1111 1111 0111 1110 1111 1111 1011;

[0089] Plane2: 1001 1111 1110 0110 1111 1101 1101 1010;

[0090] Plane3: 1000 1111 1111 0110 1111 1101 1101 1010;

[0091] As can be seen from the above bad lists, all the bad lists of the planes have 16 bits. Among them, "1" indicates that the bit column is good and can store data normally, while "0" indicates that the bit column is bad and cannot store data normally. Further observation shows that the bad lists of Plane0 and Plane1 have a certain similarity. The bad columns of Plane0 are located at positions 3, 12, 19, 29, and 31, while the bad columns of Plane1 are located at positions 1, 3, 12, 19, and 29. Subsequently, the similarity between the bad lists is calculated using formula (1).

[0092] The calculated similarity between the bad lists of Plane0 and Plane1 reaches 29 / 32 = 90%, reaching the preset similarity threshold of 60% (this value can be configured according to actual requirements and is not specifically limited). The bad lists of Plane0 and Plane1 can be merged. The merged bad list can be expressed as follows:

[0093] Merged bad list 1 = 1010 1111 1111 0111 1110 1111 1111 1010;

[0094] It can be seen that the merged bad list is actually changed based on the bad list of Plane0, which is equivalent to marking the originally good bit columns in the bad list of Plane0 as bad points to achieve the sharing of the bad lists of Plane0 and Plane1. Similarly, for the bad lists of Plane2 and Plane3, they can also be merged and shared in the same way.

[0095] Merged bad list 2 = 1000 1111 1110 0110 1101 1101 1010.

[0096] Step S260: Store the compressed and merged bad list.

[0097] It should be noted that in this embodiment, by compressing and merging each bad list according to the preset merging rules, the compression and simplification of the Flash bad list are realized, and the problem that the bad list occupies too much RAM space resource is reduced as much as possible. According to the above steps, two merged bad lists are obtained, namely Merged bad list 1 and Merged bad list 2. When the RAM stores these two merged bad lists, in the space allocation of the RAM, pointer 1 directs Plane0 and 1 to Merged bad list 1, and pointer 2 directs Plane2 and 3 to Merged bad list 2, so as to achieve the sharing of the merged bad lists. Moreover, the original 4 bad lists are compressed and simplified into 2 merged bad lists, which can reduce the space occupied by the original bad list in the RAM space resource.

[0098] In addition, before performing the compression and merging of the bad list in the technical solution of this embodiment, the length of the RAM space of the storage control chip is obtained in advance, and it is determined whether to perform the compression and merging of the bad list according to the length of the RAM space. If there is enough space to store the bad list, there is no need to perform the compression and merging of the bad list, and the most complete bad list is directly stored, which can maximize the capacity of the Flash.

[0099] Corresponding to the foregoing method embodiment, the present application also discloses a bad list compression device and corresponding embodiments.

[0100] Figure 3 The structural schematic diagram of the bad list compression device in an embodiment of the present application is shown.

[0101] Please refer to Figure 3 , a bad list compression device 300, including a scanning module 310, a compression and merging module 320, and a storage module 330. Among them:

[0102] The scanning module 310 is used to perform a scan of the Flash.

[0103] The compression and merging module 320 is used to read the bad lists of each Plane and perform compression and merging on each bad list according to a preset merging rule.

[0104] In this embodiment, the preset merging rule can be carried out in the following manner: load the bit column templates of each bad list; calculate the similarity between each bit column template; compress and merge the bit column templates that reach the similarity threshold.

[0105] The storage module 330 is used to store the bad list after compression and merging.

[0106] It should be noted that the bad list compression method implemented by the pre-analysis optimization device disclosed in this embodiment is as described in the foregoing embodiment, so it will not be elaborated here in detail. Optionally, each module in this embodiment and the above other operations or functions are respectively for implementing the method in the foregoing embodiment.

[0107] Figure 4 The structural schematic diagram of the bad list compression device in another embodiment of the present application is shown.

[0108] A bad list compression device 300, including a scanning module 310, an acquisition module 340, a judgment module 350, a compression and merging module 320, and a storage module 330. For the functions of the scanning module 310, the compression and merging module 320, and the storage module 330, please refer to Figure 3 , which will not be elaborated here.

[0109] The acquisition module 340 is used to acquire the length of the RAM space.

[0110] The determination module 350 is configured to determine whether the length of the RAM space reaches the capacity to store each bad list before compression and merging. If so, it skips the compression and merging of each bad list and directly stores each bad list; if not, it compresses and merges each bad list according to a preset merging rule.

[0111] Further, in this embodiment, the scanning module 310 includes: a reading and writing unit 311 and an exclusive OR unit 312. Among them:

[0112] The reading and writing unit 311 is configured to perform two reading and writing operations on the Flash successively and perform an exclusive OR operation on the results of the two reading and writing operations.

[0113] The exclusive OR unit 312 is configured to parse out the bad list corresponding to each Plane in the Flash according to the exclusive OR processing result.

[0114] It should be noted that the bad list compression method implemented by the pre-analysis optimization device disclosed in this embodiment is as described in the above embodiment, so it will not be elaborated here in detail. Optionally, each module in this embodiment and the above other operations or functions are respectively for implementing the method in the foregoing embodiment.

[0115] Refer to Figure 5 , another embodiment of the present application shows a computing electronic device 500 including: a processor 510 and a memory 520.

[0116] The processor 510 may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0117] The general-purpose processor may be a microprocessor or the processor may also be any conventional processor. The memory 510 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices.

[0118] Among them, the ROM can store static data or instructions required by the processor 520 or other modules of the computer. The permanent storage device can be a read-write storage device. The permanent storage device can be a non-volatile storage device that does not lose the stored instructions and data even when the computer is powered off. In some embodiments, the permanent storage device uses a mass storage device (such as a magnetic or optical disk, flash memory) as the permanent storage device.

[0119] In some other embodiments, the permanent storage device can be a removable storage device (such as a floppy disk, optical drive). The system memory can be a read-write storage device or a volatile read-write storage device, such as dynamic random access memory. The system memory can store some or all of the instructions and data required by the processor during operation.

[0120] In addition, the memory 520 can include any combination of computer-readable storage media, including various types of semiconductor memory chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and magnetic disks and / or optical disks can also be used.

[0121] In some embodiments, the memory 520 can include a removable storage device that is readable and / or writable, such as a compact disc (CD), a read-only digital versatile disc (such as DVD-ROM, dual-layer DVD-ROM), a read-only Blu-ray disc, a super density disc, a flash memory card (such as SD card, min SD card, and Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and instantaneous electronic signals transmitted wirelessly or by wire. Executable code is stored on the memory 520, and when the executable code is processed by the processor 510, it can cause the processor 510 to execute some or all of the methods described above.

[0122] In addition, the method according to the present application can also be implemented as a computer program or a computer program product, and the computer program or the computer program product includes computer program code instructions for executing some or all of the steps of the above method of the present application.

[0123] Alternatively, the present application can also be implemented as a computer-readable storage medium (or a non-transitory machine-readable storage medium or a machine-readable storage medium), on which executable code (or a computer program or computer instruction code) is stored. When the executable code (or the computer program or computer instruction code) is executed by a processor of an electronic device (or a server, etc.), it causes the processor to execute some or all of the steps of the above method according to the present application.

[0124] The embodiments of the present application have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, the practical application, or the improvement of the technology in the market, or to enable other ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A bad list compression method, characterized in that, Including: Perform a scan of the Flash; Read the bad lists of each Plane, and compressively merge the bad lists according to a preset merging rule; Store the bad lists after compressive merging.

2. The bad list compression method according to claim 1, wherein Before reading the bad lists of each Plane and compressively merging the bad lists according to a preset merging rule, it further includes: Obtain the length of the RAM space; Judge whether the length of the RAM space reaches the capacity to store the bad lists before uncompressed merging. If so, skip the compressive merging of the bad lists and directly store the bad lists; if not, compressively merge the bad lists according to a preset merging rule.

3. The bad list compression method according to claim 1, wherein The performing a scan of the Flash includes: Perform two read and write operations on the Flash successively, and perform an exclusive OR operation on the results of the two read and write operations; According to the result of the exclusive OR operation, parse out the bad lists corresponding to each Plane in the Flash.

4. The bad list compression method according to any one of claims 1 to 3, characterized in that The preset merging rule includes: Load the bit templates of the bad lists; Calculate the similarity between the bad lists; Compressively merge the bad lists that reach the similarity threshold.

5. A bad list compression device, characterized in that, Including: A scanning module for performing a scan of the Flash; A compressive merging module for reading the bad lists of each Plane and compressively merging the bad lists according to a preset merging rule; A storage module for storing the bad lists after compressive merging.

6. The bad list compression device according to claim 5, characterized in that It further includes: An obtaining module for obtaining the length of the RAM space; A judging module for judging whether the length of the RAM space reaches the capacity to store the bad lists before uncompressed merging. If so, skip the compressive merging of the bad lists and directly store the bad lists; if not, compressively merge the bad lists according to a preset merging rule.

7. The bad list compression device according to claim 5, characterized in that, The scanning module includes: A read and write unit for performing two read and write operations on the Flash successively and performing an exclusive OR operation on the results of the two read and write operations; An exclusive OR unit for parsing out the bad lists corresponding to each Plane in the Flash according to the result of the exclusive OR operation.

8. The bad list compression device according to any one of claims 5 to 7, characterized in that The preset merging rule includes: Load the bit column templates of the bad lists; Calculate the similarity between the bit column templates; Compressively merge the bit column templates that reach the similarity threshold.

9. An electronic device, including: A processor; And A memory on which executable code is stored. It is characterized in that when the executable code is executed by the processor, the processor executes the bad list compression method according to any one of claims 1 to 3.

10. A computer-readable storage medium, characterized in that, Store executable code. When the executable code is executed by the processor of the electronic device, the processor executes the bad list compression method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Data processing method and device and computer readable storage medium

    CN112099725A

  • Storage device control method and device, storage device and hard disk array card

    CN117075824A

  • Apparatus, system, and method for bad block remapping

    US20090282301A1