Optimization methods, devices, and storage media for flash memory remapping
By optimizing the flash memory hard drive through reread point partitioning, region filtering, and frequency sorting, the problem of incomplete remapping coverage of flash memory hard drives is solved, thereby improving query efficiency and data reliability.
Patent Information
- Application Number
- CN202311588987.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-23
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-11-23
AI Technical Summary
The existing flash drive remapping process suffers from incomplete coverage and low query efficiency, resulting in low remapping efficiency.
By performing reread point partitioning, region filtering, frequency sorting, and remapping on the flash hard drive, the remapping method is optimized, target region groups are generated, and the distribution of RRT is adjusted to cover more error areas and improve query efficiency.
It improves the remapping coverage and query efficiency of flash drives, optimizes the resource distribution of RRT, and enhances data reliability and read success rate.
Smart Images

Figure CN117539400B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of flash memory hard drives, and more particularly to an optimization method, apparatus, and storage medium for flash memory remapping. Background Technology
[0002] In flash memory hard drives, the Read Retry Table (RRT) is a technique used in storage devices to correct read errors. It stores statistics about read errors and correction strategies. Data read errors can occur when reading from storage devices (such as hard disk drives or solid-state drives). These errors can be caused by factors such as head misalignment, media damage, and circuit interference. To improve data reliability and read success rate, storage devices typically use read retry mechanisms.
[0003] However, RRT error correction mapping cannot cover all reread points of flash memory chips; it can only provide partial RRT coverage. This partial RRT may not cover error scenarios in use. Furthermore, using the same RRT for various scenarios and rewrite point distributions limits RTT remapping. Overly even distribution of RRT remapping processing across the coverage area can cause some rewrite points on the flash drive to fail to obtain the appropriate group and decoded data within the specified time. Therefore, to meet the effective decoding, error correction, and deletion requirements of flash drives, the number of RRT groups has always been limited, resulting in incomplete coverage and uneven distribution of RRT modified resources, leading to low remapping efficiency. Therefore, a new technology is needed to address the current technical problems of incomplete coverage and low query efficiency in flash drive RRT remapping. Summary of the Invention
[0004] The main objective of this invention is to address the technical problems of incomplete coverage and low query efficiency in the current remapping RRT process of flash hard drives.
[0005] The first aspect of this invention provides an optimization method for flash memory remapping, the optimization method for flash memory remapping comprising: The pre-configured flash memory hard drive is reread, and the flash memory hard drive is divided into reread points according to the pre-configured region partitioning algorithm to generate a region grouping set; Based on the reread point density, the region grouping set is subjected to region filtering processing to obtain the target region grouping; Using a preset bit sorting algorithm, the target region group is sorted by frequency to obtain the rereading point sorting data in the target region group; Based on the rereading point sorting data, the rereading points in the target region group are remapped to generate a remapped target region group.
[0006] Optionally, in a first implementation of the first aspect of the present invention, the step of performing reread point partitioning on the flash memory disk according to a preset region partitioning algorithm to generate a region group set includes: Read the current temperature, write temperature, erase / write count at each reread point, read count at each reread point, and word line location in the flash memory block; Based on the current temperature, the write temperature, the number of erase / write operations at each reread point, the number of read operations at each reread point, and the position of the word line in the flash memory block, the flash hard disk is divided into reread points using preset region division rules to generate a region group set.
[0007] Optionally, in a second implementation of the first aspect of the present invention, the step of remapping the rereading points in the target region group according to the rereading point sorting data to generate a remapped target region group includes: Read the reread frequency data and error frequency data of each reread point in the reread point sorting data; Based on the reread frequency data and error frequency data of each reread point, the reread points in the target region group are remapped to generate a remapped target region group.
[0008] Optionally, in a third implementation of the first aspect of the present invention, the step of remapping the rereading points in the target region grouping based on the rereading frequency data and error frequency data of each rereading point to generate a remapped target region grouping includes: The maximum value is selected from the reread frequency data and error frequency data of each reread point to obtain the reread point corresponding to the maximum reread frequency data and the reread point corresponding to the maximum error frequency data. Based on the preset RRT mapping algorithm, the rereading points corresponding to the maximum rereading frequency data and the rereading points corresponding to the maximum error frequency data are remapped to generate target area groups for remapping.
[0009] Optionally, in a fourth implementation of the first aspect of the present invention, the bit sorting algorithm includes: bubble sort algorithm, selection sort algorithm, insertion sort algorithm, or quicksort algorithm.
[0010] Optionally, in a fifth implementation of the first aspect of the present invention, the step of performing region filtering processing on the region grouping set according to the reread point density to obtain the target region grouping includes: The region with the highest reread point density is selected from the grouped regions to obtain the maximum reread point value; Determine whether the value of the maximum reread point exceeds a preset analysis threshold; If the preset analysis threshold is exceeded, bit reduction processing is performed on the region with the highest reread point density to generate target region groups; If the preset analysis threshold is not exceeded, the region with the highest reread point density is determined as the target region group.
[0011] Optionally, in a sixth implementation of the first aspect of the present invention, the step of performing bit reduction processing on the region with the maximum number of reread points to generate target region groups includes: Based on the preset bitmask and operators, bit reduction processing is performed on the region with the highest reread density to generate target region groups.
[0012] Optionally, in the seventh implementation of the first aspect of the present invention, the rereading process of the preset flash memory hard drive includes: The frequency of use of the reread points in the flash memory is read and sorted. Based on the frequency of use, the reread points in the preset flash memory are reread.
[0013] A second aspect of the present invention provides an optimization apparatus for flash memory remapping, comprising: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a circuit; the at least one processor invokes the instructions in the memory to cause the optimization apparatus for flash memory remapping to perform the above-described optimization method for flash memory remapping.
[0014] A third aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the above-described optimized method for flash memory remapping.
[0015] In this embodiment of the invention, based on the frequency and number of times the flash memory is reread, the distribution of the Rewrite Rate Calculation (RRT) is optimized under the reread density state. The RRT calculation is performed on reread points with more errors in the flash memory, while the RRT calculation is performed on reread points with fewer errors in the flash memory. The priority order for retaining rewrite points is to first retain rewrite points near the decoding capability, then retain points with an error probability lower than the decoding capability, and finally retain points with an error probability higher than the decoding capability. The RRT calculation distribution is adjusted according to different scenarios in the reread process, which solves the technical problems of incomplete coverage and low query efficiency in the current flash hard disk remapping RRT process. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of an embodiment of the optimization method for flash memory remapping in this invention; Figure 2 This is a schematic diagram of flash memory reread region grouping in an embodiment of the present invention; Figure 3 This is a schematic diagram of a specific embodiment of step 101 in the present invention; Figure 4 This is a schematic diagram of a specific embodiment of step 102 in the present invention; Figure 5 This is a schematic diagram of an embodiment of the optimized device for flash memory remapping in this invention. Detailed Implementation
[0017] This invention provides an optimization method, device, and storage medium for flash memory remapping.
[0018] The embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the accompanying drawings and embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0019] In the description of the embodiments disclosed in this invention, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0020] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the flash memory remapping optimization method in this invention includes: 101. Perform rereading processing on the preset flash memory hard drive. According to the preset region partitioning algorithm, perform rereading point partitioning processing on the flash memory hard drive to generate a region grouping set. In this embodiment, the rereading of the flash memory hard drive is region-based. Some regions of the flash memory hard drive store more data and are reread more frequently, while other regions store less data and are reread less frequently. (See reference...) Figure 2 , Figure 2 This is a schematic diagram of flash memory reread region grouping in an embodiment of the present invention. Figure 2In the PE (Program / Erase) reread process, PE100 belongs to group A, containing 100 reread points, and PE1000 belongs to group B, containing 1000 reread points. The classification of groups A and B is based on certain rules and defined regions under the current state. The density of reread points determines the number of regions to be divided, and this density is related to the deletion capability. If all points in group A can be deleted, and all points in group B can be deleted, then the reread points in group A can be omitted, and only the reread points in group B can be retained. The method of retention needs to be determined based on the reread status of the flash drive, the hard drive's operating temperature, and other conditions.
[0021] For details, please refer to Figure 3 , Figure 3 This is a schematic diagram of a specific embodiment of step 101 in this invention. Step 101 includes the following specific implementation methods: 1011. Read the current temperature, write temperature, erase / write count at each reread point, read count at each reread point, and word line location in the flash memory block; 1012. Based on the current temperature, the write temperature, the number of erase / write operations at each reread point, the number of read operations at each reread point, and the position of the word line in the flash memory block, the flash hard disk is divided into reread points using a preset region division rule to generate a region group set.
[0022] In steps 1011-1012, PE (Programming Existence) processing refers to programming and erasing operations on the data in the flash memory. In this scenario, different data blocks and pages need to be considered, along with their status, usage frequency, and other factors. Data blocks can be sorted according to their usage frequency, placing frequently used blocks first. This allows for faster location of the data blocks to be processed in subsequent PE operations, thus improving processing efficiency. Therefore, by reading the current temperature, write temperature, the number of erase / write operations at each reread point, the number of read operations at each reread point, and the word line's position in the flash memory block, and based on pre-set partitioning rules, the flash hard drive's reread points are divided into regions. These regions should not be too large; instead, they can be divided into many smaller regions based on different conditions. The coverage area of such smaller regions may be the same as, or even larger than, the original large regions.
[0023] It's important to note that a word line (WL) is a wire in a flash memory chip used to select and activate a specific memory cell. Flash memory chips are organized and manipulated in blocks. Each block consists of several rows and columns. A word line selects the memory cell to read from or write to by activating a specific row. Once a word line is activated, the memory cell in the corresponding row can interact with the data bus. Within a block, word lines can connect different rows to form a word line network. By manipulating the word lines, specific rows can be selected for memory operations. For example, when reading data, the required word line is activated, while word lines in other rows remain inactive. Therefore, the position of the WL within a block refers to the layout and connection method of the word lines within the block. Different chips and architectures may have different word line layouts, depending on design and manufacturing requirements. The rationality of the word line layout has a certain impact on the performance and reliability of flash memory chips.
[0024] Specifically, the "rereading process of the pre-installed flash hard drive" in step 101 includes the following specific implementation methods: 1013. Read the usage frequency sort of the reread points in the flash memory hard drive, and perform reread processing on the reread points in the preset flash memory hard drive based on the usage frequency sort.
[0025] In step 1013, the PE (Print Execution) reread process is a relatively time-consuming operation because rereading and programming each memory cell requires a specific amount of time. Furthermore, flash memory chips have a limit on the number of erase cycles; each memory cell can only be reread and programmed a certain number of times. To improve the lifespan and reliability of flash memory chips, reread operations are typically performed on a block-by-block basis. A block contains multiple memory cells, and during a PE reread, the entire block is erased and reprogrammed. Data blocks are sorted according to their usage frequency, with more frequently used blocks placed first. This allows for faster location of the data blocks to be processed in subsequent PE operations, thereby improving processing efficiency.
[0026] 102. Based on the reread point density, perform region filtering on the region grouping set to obtain the target region grouping; In this embodiment, there are multiple regions in the region grouping set. Based on the reread point density, Group A and Group B are filtered to obtain a group for deletion processing. For example, if the reread point density of Group A is larger, then Group A is determined as the target region group.
[0027] For details, please refer to Figure 4 , Figure 4 This is a schematic diagram of a specific embodiment of step 102 in this invention. Step 102 includes the following specific implementation methods: 1021. Select the region with the highest reread point density from the grouped areas to obtain the maximum reread point value; 1022. Determine whether the value of the maximum reread point exceeds a preset analysis threshold; 1023. If the preset analysis threshold is exceeded, bit reduction processing is performed on the region with the highest reread density to generate target region groups; 1024. If the preset analysis threshold is not exceeded, the region with the highest reread point density is determined as the target region group.
[0028] In steps 1021-1024, the region with the highest reread point density can be filtered from the region grouping set to obtain all reread point values in that region. The reread point values cannot exceed a preset threshold. If they do, a bit reduction method is used to delete specific points, generating the target region group. If the reread point values in the region with the highest reread point density do not exceed the preset threshold, then that region is identified as the target region group.
[0029] Specifically, step 1023 includes the following specific implementation methods: 10231. Based on the preset bitmask and operators, perform bit reduction processing on the region with the highest reread density to generate target region groups.
[0030] In step 10231, bit reduction of data can reduce storage space and transmission bandwidth, improve computational efficiency and resource utilization. Bitwise operators (such as AND, OR, XOR, NOT, etc.) are used to manipulate the bits of the data, extracting the required bits or discarding unnecessary bits, thus achieving data reduction. For example, a right shift operator can be used to reduce a 32-bit integer to a 16-bit integer. In bit operations, bitmasks and bit clearing operations can be used to delete specified bits. To delete a specific bit from a bit sequence, a bitmask can be created, where the target bit is set to 0 and the remaining bits are set to 1. Then, a bit clearing operation is used to set that bit to 0. Bit clearing operations are typically implemented using the AND operator combined with a bitmask.
[0031] 103. Using a preset bit sorting algorithm, the target region group is sorted by frequency to obtain the rereading point sorting data in the target region group; In this embodiment, there are many points in group A. In order to further improve efficiency, these points will be sorted, with those used more frequently placed first. This is because RRT is used in a traversal manner. For example, if 0 cannot correct the error, 1 will be used to remove it, and so on. If the error and usage frequency are sorted, the group that suits us can be found quickly, which can greatly improve efficiency.
[0032] Furthermore, the bit sorting algorithm includes: bubble sort, selection sort, insertion sort, or quicksort. The sorting algorithm can be selected based on computational requirements; any algorithm can be used to sort the data based on frequency of use.
[0033] 104. Based on the rereading point sorting data, remap the rereading points in the target region group to generate a remapped target region group.
[0034] In this embodiment, Remapping Timer (RRT) technology is used to remove and remap bad blocks in the target area group. The RRT consists of two parts: 1. Remapping Table: This table maintains the mapping relationship between logical addresses and physical addresses. When a bad block is detected, the RRT removes the bad block's mapping from the logical address and remaps it to a good physical address to ensure data continuity and correctness. 2. Redundancy Table: This table records information such as bad blocks and erase counts in specific areas within the flash memory chip. Using this information, the system can dynamically identify and process bad blocks, performing appropriate data remapping and bad block management.
[0035] Specifically, step 104 includes the following specific implementation methods: 1041. Read the reread frequency data and error frequency data of each reread point in the reread point sorting data; 1042. Based on the reread frequency data and error frequency data of each reread point, perform remapping processing on the reread points in the target region group to generate a remapped target region group.
[0036] In steps 1041-1042, the reread frequency data and error frequency data of the reread points in the reread point sorting data are analyzed. The RRT deleting resources are distributed more in the reread points with higher reread frequency and error frequency, and the mapping relationship of the reread points with higher error probability is modified to obtain the target area grouping after deletion.
[0037] Specifically, step 1041 includes the following specific implementation methods: 10411. Filter out the maximum value from the reread frequency data and error frequency data of each reread point to obtain the reread point corresponding to the maximum reread frequency data and the reread point corresponding to the maximum error frequency data; 10412. Based on the preset RRT mapping algorithm, remap the rereading points corresponding to the maximum rereading frequency data and the rereading points corresponding to the maximum error frequency data to generate target area groups for remapping.
[0038] In steps 10411-10412, each RRT process selects the reread point with the highest error probability and reread frequency from each reread point. Using the RRT mapping method, the reread point is remapped to reduce or correct errors. After obtaining the reduced or corrected reread points, the target area grouping of the mapping is modified.
[0039] In this embodiment of the invention, based on the frequency and number of times the flash memory is reread, the distribution of the Rewrite Rate Calculation (RRT) is optimized under the reread density state. The RRT calculation is performed on reread points with more errors in the flash memory, while the RRT calculation is performed on reread points with fewer errors in the flash memory. The priority order for retaining rewrite points is to first retain rewrite points near the decoding capability, then retain points with an error probability lower than the decoding capability, and finally retain points with an error probability higher than the decoding capability. The RRT calculation distribution is adjusted according to different scenarios in the reread process, which solves the technical problems of incomplete coverage and low query efficiency in the current flash hard disk remapping RRT process.
[0040] Figure 5 This is a schematic diagram of the structure of an optimized flash memory remapping device 500 provided in an embodiment of the present invention. The optimized flash memory remapping device 500 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) storing application programs 533 or data 532. The memory 520 and storage media 530 can be temporary or persistent storage. The program stored in the storage media 530 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the optimized flash memory remapping device 500. Furthermore, the processor 510 may be configured to communicate with the storage media 530 and execute the series of instruction operations in the storage media 530 on the optimized flash memory remapping device 500.
[0041] The flash remapping-based optimization device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input / output interfaces 560, and / or one or more operating systems 531, such as Windows Server, Mac OS X, Unix, Linux, Free BSD, etc. Those skilled in the art will understand that... Figure 5 The illustrated optimized device structure for flash remapping does not constitute a limitation on optimized devices based on flash remapping, and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0042] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the optimized method for flash memory remapping.
[0043] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0044] Furthermore, although the operations are described in a specific order, this should be understood as requiring that such operations be performed in the specific order shown or in sequential order, or requiring that all illustrated operations be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.
[0045] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. An optimization method for flash memory remapping, characterized in that, Including the following steps: The pre-configured flash memory hard drive is reread, and the flash memory hard drive is divided into reread points according to the pre-configured region partitioning algorithm to generate a region grouping set; Based on the reread point density, the region grouping set is subjected to region filtering processing to obtain the target region grouping; Using a preset bit sorting algorithm, the target region group is sorted by frequency to obtain the rereading point sorting data in the target region group; Based on the sorted data of the rereading points, the rereading points in the target region group are remapped to generate a remapped target region group. The step of performing region filtering on the region grouping set based on the reread point density to obtain the target region grouping includes: The region with the highest reread point density is selected from the grouped regions to obtain the maximum reread point value; Determine whether the value of the maximum reread point exceeds a preset analysis threshold; If the preset analysis threshold is exceeded, bit reduction processing is performed on the region with the highest reread point density to generate target region groups; If the preset analysis threshold is not exceeded, the region with the highest reread point density is determined as the target region group.
2. The optimization method for flash memory remapping according to claim 1, characterized in that, The step of performing reread point partitioning on the flash memory hard drive according to a preset region partitioning algorithm to generate a region group set includes: Read the current temperature, write temperature, erase / write count at each reread point, read count at each reread point, and word line location in the flash memory block; Based on the current temperature, the write temperature, the number of erase / write operations at each reread point, the number of read operations at each reread point, and the position of the word line in the flash memory block, the flash hard disk is divided into reread points using preset region division rules to generate a region group set.
3. The optimization method for flash memory remapping according to claim 1, characterized in that, The step of remapping the reread points in the target region group based on the reread point sorting data to generate the remapped target region group includes: Read the reread frequency data and error frequency data of each reread point in the reread point sorting data; Based on the reread frequency data and error frequency data of each reread point, the reread points in the target region group are remapped to generate a remapped target region group.
4. The optimization method for flash memory remapping according to claim 3, characterized in that, The step of remapping the rereading points in the target region group based on the rereading frequency data and error frequency data of each rereading point, and generating the remapped target region group, includes: The maximum value is selected from the reread frequency data and error frequency data of each reread point to obtain the reread point corresponding to the maximum reread frequency data and the reread point corresponding to the maximum error frequency data. Based on the preset RRT mapping algorithm, the rereading points corresponding to the maximum rereading frequency data and the rereading points corresponding to the maximum error frequency data are remapped to generate target area groups for remapping.
5. The optimization method for flash memory remapping according to claim 1, characterized in that, The bit sorting algorithms include: bubble sort, selection sort, insertion sort, or quicksort.
6. The optimization method for flash memory remapping according to claim 1, characterized in that, The step of performing bit reduction processing on the region with the highest reread point density to generate target region groups includes: Based on the preset bitmask and operators, bit reduction processing is performed on the region with the highest reread density to generate target region groups.
7. The optimization method for flash memory remapping according to claim 1, characterized in that, The rereading process of the pre-installed flash memory hard drive includes: The frequency of use of the reread points in the flash memory is read and sorted. Based on the frequency of use, the reread points in the preset flash memory are reread.
8. An optimization device for flash memory remapping, characterized in that, The optimized device for flash remapping includes: a memory and at least one processor, wherein the memory stores instructions and the memory and the at least one processor are interconnected via lines; The at least one processor invokes the instructions in the memory to cause the flash remapping optimization device to perform the flash remapping optimization method as described in any one of claims 1-7.
9. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the optimized method for flash memory remapping as described in any one of claims 1-7.
Citation Information
Patent Citations
Mirror image mapping optimization processing method for specific rule data in storage device
CN113094004A
Memory system with a weighted read retry table
US20180046527A1
