Operation method, memory system, electronic device and computer-readable storage medium

By identifying and utilizing available sub-regions in the storage area marked as bad blocks in the memory system, and storing data according to the health level, the problem of low utilization of the memory system is solved, and the overall efficiency and life of the memory is improved.

WO2024234347A1PCT designated stage expired Publication Date: 2024-11-21YANGTZE MEMORY TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/094887
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-05-17
Publication Date
2024-11-21

AI Technical Summary

Technical Problem

Existing memory systems have problems with inefficiency when utilizing memory devices, especially in the memory areas marked as bad blocks, which result in low overall memory utilization.

Method used

The data to be stored is written to the subregions with a high health level in the memory device to be improved by determining available subregions in the memory device and prioritizing the health level of these subregions.

Benefits of technology

Effectively utilize some defective storage areas, improve the overall utilization of the memory, extend the service life of the memory, and reduce the wear of the memory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023094887_21112024_PF_FP_ABST
    Figure CN2023094887_21112024_PF_FP_ABST
Patent Text Reader

Abstract

An operation method for a memory system. The memory system comprises a memory controller and one or more memory apparatuses, which are coupled to the memory controller. The operation method comprises: determining one or more available sub-regions in a storage region, which is marked as a bad block, in a memory apparatus (S701); and writing, into the one or more available sub-regions, first data to be stored (S702). Further provided are a memory system, an electronic device and a computer-readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Operating method, memory system, electronic device, and computer-readable storage medium Technical Field

[0001] The present disclosure relates to the field of memory technology, and in particular to an operating method of a memory system, a memory system, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the development of memory system technology, the memory devices included in memory systems are widely used to store data based on requests from hosts such as computers, servers, smartphones, tablet PCs, and other electronic devices. However, how to use memory devices more efficiently has always been a major challenge in the industry.

[0003] Summary of the Invention

[0004] In view of this, the present disclosure provides a memory system operating method, a memory system, an electronic device, and a computer-readable storage medium, which can improve the utilization rate of the memory device.

[0005] To achieve the above objectives, the technical solution of the present disclosure is implemented as follows:

[0006] In a first aspect, an embodiment of the present disclosure provides an operating method for a memory system, wherein the memory system includes one or more memory devices; the operating method includes:

[0007] determining one or more usable sub-regions in a storage region marked as a bad block in the memory device;

[0008] The first data to be stored is written into the one or more available sub-areas.

[0009] In the above solution, each of the available sub-areas has a corresponding health level; and writing the first data to be stored into the one or more available sub-areas includes:

[0010] The first data to be stored is written into the one or more available sub-areas in descending order of priority of the health levels of the available sub-areas.

[0011] In the above solution, each of the available sub-areas has a corresponding health level; and writing the first data to be stored into the one or more available sub-areas includes:

[0012] determining a storage level corresponding to the first data to be stored;

[0013] The first data to be stored is written into the available sub-area of ​​the corresponding health level according to the storage level.

[0014] In the above solution, the operation method further includes:

[0015] evaluating each of the available sub-areas to determine a health status of each of the available sub-areas;

[0016] The health level of each available sub-area is determined according to the health status of each available sub-area.

[0017] In the above solution, the step of determining the storage level corresponding to the first data to be stored includes one of the following:

[0018] determining the storage level to which the first data to be stored belongs according to its importance;

[0019] determining the storage level to which the first data to be stored belongs according to a reading frequency;

[0020] The storage level to which the first to-be-stored data belongs is determined according to a writing order.

[0021] In the above solution, the step of writing the first data to be stored into the available sub-area of ​​the corresponding health level according to the storage level includes:

[0022] Obtaining a first mapping relationship; the first mapping relationship includes a correspondence between storage levels and health levels;

[0023] The first data to be stored is written into the available sub-area of ​​the corresponding health level based on the first mapping relationship and the storage level corresponding to the first data to be stored.

[0024] In the above solution, the step of evaluating each available sub-area and determining the health status of each available sub-area includes:

[0025] Determining the number of times each of the available sub-areas has been erased and / or the service life of the available sub-areas;

[0026] Determining the health status according to the number of erasures and / or the service life;

[0027] The smaller the number of erasures and / or the longer the service life, the better the health status.

[0028] In the above solution, the step of determining the health level of each available sub-area according to the health status of each available sub-area includes:

[0029] Obtaining a second mapping relationship; wherein the second mapping relationship includes a correspondence between health status and health level;

[0030] The health level of each of the available sub-areas is determined according to the second mapping relationship and the health status of each of the available sub-areas.

[0031] In the above solution, the operation method further includes:

[0032] A maintenance management table; wherein the management table is configured to record management information of available sub-areas in a storage area marked as bad blocks; the management information includes at least address information of the available sub-areas.

[0033] In the above solution, the maintenance management table includes:

[0034] Updating the management information of the newly added available sub-area into the management table;

[0035] The management information of the available sub-area that meets the set conditions in the management table is deleted from the management table.

[0036] In the above solution, the capacity of the available sub-area includes the capacity of one storage block.

[0037] In the above solution, the management table is stored in at least one of a memory of the memory controller and the memory device.

[0038] In the above solution, wherein, wherein, the operation method further includes:

[0039] Determining storage requirements of second data to be stored;

[0040] When it is determined that the storage requirement of the second data to be stored is that the second data to be stored needs to be stored in the available sub-area, checking the management table;

[0041] When the available sub-area exists in the management table, storing the second data to be stored in the available sub-area;

[0042] When the available sub-area does not exist in the management table, the second data to be stored is stored in the first storage area without a bad block mark.

[0043] In the above solution, the operation method further includes:

[0044] If it is determined that the storage requirement of the second data to be stored is that the second data to be stored is not stored in the available sub-area, the second data to be stored is stored in the second storage area without a bad block mark.

[0045] In the above solution, the storage mode of the first data to be stored in the memory device includes one of the following: a single-level cell (SLC) mode and a multi-level cell (MLC) mode.

[0046] In a second aspect, embodiments of the present disclosure disclose a memory system, comprising: a memory device configured to: store data;

[0047] The memory controller is coupled to the memory device and is configured to: determine one or more available sub-areas in a storage area marked as a bad block in the memory device; and write first data to be stored into the one or more available sub-areas.

[0048] In the above scheme, each of the available sub-areas has a corresponding health level; the memory controller is further configured to: write the first data to be stored into the one or more available sub-areas in a descending order of priority of the health levels of the available sub-areas.

[0049] In the above solution, each of the available sub-areas has a corresponding health level; the memory controller is further configured to:

[0050] determining a storage level corresponding to the first data to be stored;

[0051] The first data to be stored is written into the available sub-area of ​​the corresponding health level according to the storage level.

[0052] In the above solution, the memory controller is further configured to:

[0053] evaluating each of the available sub-areas to determine a health status of each of the available sub-areas;

[0054] The health level of each available sub-area is determined according to the health status of each available sub-area.

[0055] In the above solution, the memory controller is further configured as one of the following:

[0056] determining the storage level to which the first data to be stored belongs according to its importance;

[0057] determining the storage level to which the first data to be stored belongs according to a reading frequency;

[0058] The storage level to which the first to-be-stored data belongs is determined according to a writing order.

[0059] In the above solution, the memory controller is further configured to:

[0060] Obtaining a first mapping relationship; the first mapping relationship includes a correspondence between storage levels and health levels;

[0061] The first data to be stored is written into the available sub-area of ​​the corresponding health level based on the first mapping relationship and the storage level corresponding to the first data to be stored.

[0062] In the above scheme, the memory controller is further configured to: determine the number of times each of the available sub-areas has been erased and / or the service life of the available sub-areas; determine the health status based on the number of times it has been erased and / or the service life; wherein, the smaller the number of times it has been erased and / or the greater the service life, the better the health status.

[0063] In the above solution, the memory controller is further configured to:

[0064] Obtaining a second mapping relationship; wherein the second mapping relationship includes a correspondence between health status and health level;

[0065] The health level of each of the available sub-areas is determined according to the second mapping relationship and the health status of each of the available sub-areas.

[0066] In the above scheme, the memory controller is further configured to: maintain a management table; wherein the management table is configured to record management information of available sub-areas in the storage area marked as bad blocks; the management information includes at least address information of the available sub-areas.

[0067] In the above solution, the memory controller is further configured to: update the management information of the newly added available sub-area into the management table; and delete the management information of the available sub-area that meets the set conditions in the management table from the management table.

[0068] In the above solution, the memory system is included in one of the following: a solid state drive SSD, a memory card.

[0069] In a third aspect, an embodiment of the present disclosure discloses an electronic device, comprising: a memory system; the memory system comprises: one or more memory devices; the memory devices are configured to: store data;

[0070] and a memory controller coupled to the memory device and configured to control the memory device; wherein,

[0071] The memory controller is configured to: determine one or more available sub-areas in a storage area marked as a bad block in the memory device; write the first data to be stored into the one or more available sub-areas;

[0072] and a host coupled to the memory system and configured to control the memory system.

[0073] In a fourth aspect, an embodiment of the present disclosure discloses a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-described method when executed by a processor.

[0074] Embodiments of the present disclosure provide a method for operating a memory system, a memory system, an electronic device, and a computer-readable storage medium. The memory system includes one or more memory devices; the operating method includes: determining one or more available sub-regions in a storage region marked as a bad block in the memory device; and writing first data to be stored into the one or more available sub-regions. The operating method provided by the present disclosure improves memory utilization by determining one or more available sub-regions in a storage region marked as a bad block and writing the first data to be stored into the one or more available sub-regions, that is, utilizing available portions of partially defective storage regions. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] In the accompanying drawings, which are not necessarily drawn to scale, like reference numerals may describe similar components in different views. Like numerals with different letter suffixes may represent different instances of similar components. The accompanying drawings generally illustrate various embodiments discussed in this document by way of example and not limitation.

[0076] FIG1 illustrates a block diagram of an exemplary electronic device having a memory system;

[0077] FIG2 is a schematic diagram showing the structure of a memory controller in a memory system;

[0078] FIG3 shows an exemplary block diagram of a memory device;

[0079] FIG4 shows another exemplary block diagram of a memory device;

[0080] FIG5 shows a schematic structural diagram of a super storage block provided by an embodiment of the present disclosure;

[0081] FIG6 shows another schematic structural diagram of a super storage block provided by an embodiment of the present disclosure;

[0082] FIG7 is a schematic flow chart showing a method for operating a memory system according to an embodiment of the present disclosure;

[0083] FIG8 is a schematic diagram showing available sub-areas in a super memory block provided by an embodiment of the present disclosure;

[0084] FIG9 is a schematic diagram showing the use of available sub-areas contained in a super memory block according to an embodiment of the present disclosure.

[0085] FIG10 shows the available sub-areas managed in the management table at a first time provided by an embodiment of the present disclosure;

[0086] FIG11 shows the available sub-areas managed in the management table at a second time provided by an embodiment of the present disclosure;

[0087] FIG12 shows an embodiment of the present disclosure providing an available sub-area managed in the management table at a third time;

[0088] FIG13 shows a schematic diagram of a storage process of second data to be stored according to an embodiment of the present disclosure;

[0089] FIG14 shows a schematic structural diagram of a memory card provided by an embodiment of the present disclosure;

[0090] FIG15 shows a schematic structural diagram of an SSD provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0091] The following describes various embodiments of the present disclosure in more detail with reference to the accompanying drawings. Other embodiments that can be used as variations of any disclosed embodiment can be formed by configuring or arranging the elements and features in the embodiments of the present disclosure in different ways. Therefore, the embodiments of the present disclosure are not limited to the embodiments set forth herein. On the contrary, the described embodiments are provided so that the embodiments of the present disclosure are thorough and complete, and the scope of the embodiments of the present disclosure is fully conveyed to those skilled in the art of the technical field to which the embodiments of the present disclosure belong. It should be noted that references to "embodiment", "another embodiment" and the like do not necessarily represent only one embodiment, and different references to any such phrases are not necessarily for the same embodiment. It should be understood that although the terms "first", "second", "third" and the like may be used herein to identify various elements, these elements are not limited by these terms. These terms are used to distinguish one element from another element with the same or similar name. Therefore, without departing from the spirit and scope of the embodiments of the present disclosure, the first element in one embodiment may also be referred to as the second or third element in another embodiment.

[0092] The accompanying drawings are not necessarily drawn to scale, and in some cases, the scale may be exaggerated to clearly illustrate the features of the embodiments. When an element is referred to as being connected or coupled to another element, it should be understood that the former may be directly connected or coupled to the latter, or may be electrically connected or coupled to the latter via one or more intermediate elements therebetween. In addition, it should be understood that when an element is referred to as being "between" two elements, the element may be the only element between the two elements, or one or more intermediate elements may be present.

[0093] The terms used in this article are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure. As used herein, the singular form is intended to include the plural form, unless the context clearly indicates otherwise. Unless otherwise specified or can be clearly understood from the context to be singular, the articles "one" and / or "an" used in the embodiments of the present disclosure and the appended claims should be collectively interpreted as meaning "one or more". It should be further understood that the terms "include", "include", "include" and "include" used in the embodiments of the present disclosure specify the presence of the elements and do not exclude the presence or addition of one or more other elements. The term "and / or" used in the embodiments of the present disclosure includes any and all combinations of one or more associated listed items. Unless otherwise defined, all terms including technology and science used in the embodiments of the present disclosure have the same meaning as those of ordinary skill in the art to which the present disclosure belongs in view of the embodiments of the present disclosure. It should be further understood that, unless the embodiments of the present disclosure are clearly defined, terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the embodiments of the present disclosure and the related art, and should not be interpreted in an idealized or overly formal manner.

[0094] In the following description, many specific details are set forth to provide a thorough understanding of the present disclosure, and the present disclosure can be practiced without some or all of these specific details. In other cases, well-known processing structures and / or processes are not described in detail to avoid unnecessarily obscuring the present disclosure. It should also be understood that in some cases, unless otherwise specified, it will be apparent to those skilled in the relevant art that features or elements described with respect to one embodiment may be used alone or in combination with other features or elements of another embodiment. Hereinafter, various embodiments of the present disclosure are described in detail with reference to the accompanying drawings. The following description focuses on details to facilitate understanding of the embodiments of the present disclosure. Well-known technical details may be omitted to avoid obscuring the features and aspects of the embodiments of the present disclosure.

[0095] The embodiments of the present disclosure are further described in detail below with reference to the accompanying drawings and specific embodiments.

[0096] FIG1 shows a block diagram of an exemplary electronic device with a memory system. In FIG1 , the electronic device 100 may be a mobile phone, a desktop computer, a laptop computer, a tablet computer, a vehicle computer, a game console, a printer, a positioning device, a wearable electronic device, a smart sensor, a virtual reality (VR) device, an augmented reality (AR) device, or any other suitable electronic device having a memory system therein. As shown in FIG1 , the electronic device 100 may include a host 108 and a memory system 102, wherein the host 108 may include a processor such as a central processing unit (CPU) or a system on a chip (SoC), wherein the system on a chip may be, for example, an application processor (AP). The host 108 also includes at least one operating system (OS) that can generally manage and control the functions and operations performed in the host 108. The OS can enable the host 108 coupled to the memory system 102 and a user who needs and uses the memory system 102 to operate with each other. The OS can support functions and operations corresponding to user requests. For example, and not limitation, depending on whether the host 102 is a mobile host, the OS can be categorized as a general-purpose operating system or a mobile operating system. General-purpose operating systems can include personal operating systems and enterprise operating systems. Personal operating systems can be operating systems such as Windows and Chrome that are generally used to support services; enterprise operating systems can be operating systems such as Windows Server, Linux, and Unix that are specifically designed to ensure and support high performance. Mobile operating systems can refer to operating systems that provide services or functions specific to mobility (such as power saving functions). Generally, mobile operating systems can include operating systems such as Android, iOS, and Windows Mobile. In some embodiments, the host 108 can include multiple OSs; accordingly, the host 108 can run multiple operating systems associated with the memory system 102. In other embodiments, the host 108 converts the user's request into one or more commands and transmits the one or more commands to the memory system 102, causing the memory system 102 to perform operations associated with the one or more commands.

[0097] The memory system 102 can operate or perform specific functions or perform various internal operations in response to a request from the host 108. In some embodiments, the memory system 102 can store data accessed by the host 108. The memory system 102 can be used as a primary memory system or an auxiliary memory system of the host 108. The memory system 102 and the host 108 can be electrically connected and communicated according to corresponding protocols. The memory system 102 can be implemented and packaged into different types of terminal electronic products, such as, but not limited to: solid state drive (SSD), multimedia card (MMC), embedded MMC (eMMC), reduced size MMC (RSMMC), micro MMC, secure digital (SD) card, mini SD, micro SD, universal serial bus (USB) storage device, universal flash memory (UFS) device, compact flash (CF) card, smart media (SM) card and memory stick, etc.

[0098] In some embodiments, the memory system 102 may also be configured as part of, for example, a computer, an ultra-mobile PC (UMPC), a workstation, a netbook, a personal digital assistant (PDA), a portable computer, a web tablet, a tablet computer, a wireless phone, a mobile phone, a smart phone, an e-book, a portable multimedia player (PMP), a portable game console, a navigation system, a black box, a digital camera, a digital multimedia broadcasting (DMB) player, a three-dimensional (3D) television, a smart TV, a digital audio recorder, a digital audio player, a digital photo recorder, a digital photo player, a digital video recorder, a digital video player, a storage device configured in a data center, a device capable of transmitting and receiving information in a wireless environment, one of various electronic devices configured in a home network, one of various electronic devices configured in a computer network, one of various electronic devices configured in a telematics network, a radio frequency identification (RFID) device, or one of various components configured in a computing system.

[0099] Returning to FIG. 1 , the memory system 102 includes one or more memory devices 104 and a memory controller 106. The memory controller 106 can respond to requests from the host 108 and thereby control the memory devices 104. For example, the memory controller 106 can read data from the memory devices 104 and transmit the read data to the host 108. It can also receive data to be stored from the host 108 and store the data to be stored in the memory devices 104. In other words, the memory controller 106 can control write (or program) operations, read operations, erase operations, background operations, and the like of the memory devices 104.

[0100] Specifically, as shown in FIG2 , the memory controller 106 may include a front-end interface 201, a back-end interface 202, a processor 203, and a memory 204. The components 201, 202, 203, and 204 in the memory controller 106 may share transmission signals within the memory controller 106 via an internal bus. In some embodiments, the front-end interface 201 may interface the host 108 with the memory system 102 in response to a protocol of the host 108, and the front-end interface 201 may exchange transmission commands and data operations between the host 108 and the memory system 102. The front-end interface 201 may process commands and data sent by the host 108 and may include at least one of the following: a universal serial bus (USB), a multimedia card (MMC), a peripheral component interconnect express (PCI-e or PCIe), a small computer system interface (SCSI), serial SCSI (SAS), serial advanced technology attachment (SATA), parallel advanced technology attachment (PATA), a small computer system interface (SCSI), an enhanced small disk interface (ESDI), and integrated drive electronics (IDE). In some embodiments, the front-end interface 201 is a component used by the memory system 102 to exchange data with the host 108 and may be implemented by firmware called a host interface layer (HIL).

[0101] The backend interface 202 may be an interface for commands and data transmitted between the memory controller 106 and the memory device 104, allowing the memory controller 106 to control the memory device 104 in response to requests transmitted from the host 108. The backend interface 202 may generate control signals for controlling the memory device 104. In some embodiments, if the memory device 104 may be a NAND flash memory, the backend interface 202 may write data to the memory device 104 or read data from the memory device 104 under the control of the processor 203. The backend interface 202 may process commands and data between the memory controller 106 and the memory device 104, such as operations of a NAND flash memory interface, and in particular operations between the memory controller 106 and the memory device 104. According to an embodiment, the backend interface 202 may be implemented as a component for exchanging data with the memory device 104 via firmware referred to as a flash interface layer (FIL).

[0102] The processor 203 may be implemented as a microprocessor or a central processing unit (CPU). The memory system 102 may include one or more processors 203. The processor 203 may control all operations of the memory system 102. As an example and not a limitation, the processor 203 may control programming operations or read operations of the memory device 104 in response to a write request or a read request from the host 108. According to an embodiment, the processor 203 may use or run firmware to control all operations of the memory system 102. In the present disclosure, the firmware may be referred to as a flash translation layer (FTL). The FTL may perform operations as an interface between the host 108 and the memory device 104. The host 108 may transmit requests related to write operations and read operations to the memory device 104 through the FTL. For example, when executing an operation requested by the host 108 in the memory device 104, the memory controller 106 uses the processor 203. The processor 203 coupled to the memory device 104 may process instructions or commands related to commands from the host 108. The memory controller 106 may perform foreground operations such as command operations corresponding to commands input from the host 108, for example, a program operation corresponding to a write command, a read operation corresponding to a read command, an erase / discard operation corresponding to an erase / discard command, and a parameter setting operation corresponding to a set parameter command or a set feature command having a set command.

[0103] For another example, the memory controller 106 may perform background operations on the memory device 104 via the processor 203. By way of example and not limitation, the background operations of the memory device 104 include garbage collection (GC) operations, wear leveling (WL) operations, map cleanup operations, and bad block management operations for checking or searching for bad blocks. The garbage collection operation may include copying and processing data stored in one of the memory blocks MEMORY Block <0, 1, 2, ...> of the memory device 104 (as shown in FIG. 3 ) to another memory block. The wear leveling operation may include exchanging and processing stored data between the memory blocks MEMORY Block <0, 1, 2, ...> of the memory device 104. The map cleanup operation may include storing map data stored in the memory controller 106 in the memory blocks MEMORY Block <0, 1, 2, ...> of the memory device 104. The bad block management operation may include checking and processing bad blocks in the memory blocks MEMORY Block <0, 1, 2, ...> of the memory device 104. It should be noted that the bad block management operation described herein may refer to a management operation for bad blocks in the memory blocks MEMORY Block <0, 1, 2, ...>. The identification of bad blocks should comply with industry standards. For example, in an optional manner, during sequential writing, if one of the pages P <0, 1, 2, 3, 4, ...> contained in any memory block in MEMORY Block <0, 1, 2, ...> is bad, the block may be identified as a bad block. There are other methods, and the present disclosure does not limit the method in which a block is marked as a bad block. The memory controller 106 may respond to an operation accessing the memory blocks MEMORY Block <0, 1, 2, ...> of the memory device 104. The operation accessing the memory blocks MEMORY Block <0, 1, 2, ...> of the memory device 104 may include a foreground operation or a background operation performed on the memory blocks MEMORY Block <0, 1, 2, ...> of the memory device 104.

[0104] The memory 204 may be a working memory of the memory system 102 and the memory controller 106, and is configured to store data for driving the memory system 102 and the memory controller 106. More specifically, when the memory controller 106 controls the memory device 104 in response to a request from the host 108, the memory 204 may store firmware driven by the processor 203 and data (e.g., metadata) required to drive the firmware.

[0105] The memory 204 may also be a buffer memory for the memory system 102 and the memory controller 106, and is configured to temporarily store write data transferred from the host 108 to the memory device 104 and read data transferred from the memory device 104 to the host 108. The memory 204 may include a program memory, a data memory, a write buffer / cache, a read buffer / cache, a data buffer / cache, and a mapping buffer / cache for storing write data and read data. The memory 204 may be implemented using a volatile memory. The memory 204 may be implemented using static random access memory (SRAM), dynamic random access memory (DRAM), or both.

[0106] 2 shows that memory 204 is included in memory controller 106, the present disclosure is not limited thereto. In an embodiment, memory 204 may be included outside memory controller 106, and memory controller 106 may input and output data to memory 204 through a separate memory interface (not shown).

[0107] The memory device 104 may be a non-volatile memory device that retains data stored therein even when power is not supplied. The memory device 104 may store data provided by the host 108 through a write operation; the memory device 104 may also provide the stored data to the host 108 through a read operation. In embodiments of the present disclosure, the memory device 104 may be any disclosed memory, such as a volatile memory device such as a dynamic random access memory (DRAM) and a static RAM (SRAM), or a non-volatile memory device such as a read-only memory (ROM), a mask ROM (MROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a ferroelectric RAM (FRAM), a phase change RAM (PRAM), a magnetoresistive RAM (MRAM), a resistive RAM (RRAM or ReRAM), and a flash memory (e.g., a three-dimensional NAND flash memory).

[0108] As shown in Figure 3, the memory device 104 may include multiple memory blocks MEMORY BLOCK<0, 1, 2, ...>. Each memory block may include multiple pages P<0, 1, 2, 3, 4, ...>. In addition, although not specifically shown in the figure, each of the pages P<0, 1, 2, 3, 4, ...> may include multiple memory cells. Among them, according to the number of bits that can be stored or represented in a single memory cell, the memory cells are classified into any of different types of memory blocks such as single-level cell (SLC) memory blocks and multi-level cell (MLC) memory blocks. Here, the SLC memory block includes multiple pages implemented by each memory cell storing one bit of data. The SLC memory block can have higher data I / O operation performance and higher durability. The MLC memory block includes multiple pages implemented by each memory cell storing multiple bits of data (for example, two or more bits). Compared with the SLC memory block, the MLC memory block can have a larger storage capacity for the same space. In terms of storage capacity, the MLC memory block can be highly integrated. In an embodiment, the memory device 104 may be implemented using MLC memory blocks such as MLC memory blocks, tri-level cells (TLC), quad-level cells (QLC), and combinations thereof. An MLC memory block may include multiple pages implemented by memory cells each capable of storing 2 bits of data. A tri-level cell (TLC) memory block may include multiple pages implemented by memory cells each capable of storing 3 bits of data. A quad-level cell (QLC) memory block may include multiple pages implemented by memory cells each capable of storing 4 bits of data. In other embodiments, the memory device 104 may include a memory block consisting of memory cells each capable of storing 5 or more bits of data.

[0109] According to an embodiment, the memory controller 106 may store data in a plurality of memory blocks MEMORY Block <0, 1, 2, ...> in a certain manner (such as an interleaved manner) through the processor 203. In other words, the memory controller 106 may write data to a super memory block (Super Block).

[0110] For understanding super memory blocks, as shown in FIG4 , an exemplary block diagram of a memory device is shown. Referring to FIG4 , a memory device 400 (which may be a NAND Flash) may include multiple memory dies (Die), for example, Die0-410, Die1-420, Die2-430, and Die3-440. Each of Die 0, Die 1, Die 2, and Die 3 may include multiple memory planes. That is, Die0-410 may include memory plane 0 (plane 0) 412, memory plane 1 (plane 1) 414, memory plane 2 (plane 2) 416, and memory plane 3 (plane 3) 418. Die1-420 may include memory plane 0 (plane 0) 422, memory plane 1 (plane 1) 424, memory plane 2 (plane 2) 426, and memory plane 3 (plane 3) 428. Die 2-430 may include a memory plane 0 432, a memory plane 1 434, a memory plane 2 436, and a memory plane 3 438. Die 3-440 may include a memory plane 0 442, a memory plane 1 444, a memory plane 2 446, and a memory plane 3 448. Each of the memory planes 412, 414, 416, 418, 422, 424, 426, 428, 432, 434, 436, 438, 442, 444, 446, and 448 included in Die 0, Die 1, Die 2, and Die 3 may include a plurality of memory blocks. Each memory block described herein may correspond to one of the memory blocks MEMORY Block <0, 1, 2, . . . > including a plurality of pages P <0, 1, 2, 3, 4, . . . > shown in FIG. 3 .

[0111] It should be noted that each Die shown in FIG4 includes four storage planes, which is only an example. In practice, each Die may also include six storage planes or other numbers of storage planes. This disclosure does not limit the number of storage planes contained in a Die.

[0112] The plurality of memory blocks included in the memory device 104 as shown in FIG4 can be divided into a plurality of super memory blocks. Furthermore, in a write operation, data corresponding to a write command received from a host 108, such as the aforementioned host, can be written and stored in a super memory block by a one-shot procedure. An exemplary structure of each super memory block is shown in FIG5 , for example, a super memory block 0 (Super Block 0) 500 can include a zeroth memory block (Block0) 510 included in Die0-410, a first memory block (Block1) 520 included in Die1-420, a second memory block (Block2) 530 included in Die2-430, and a third memory block (Block3) 540 included in Die3-440. Although FIG5 shows that super memory blocks 0-550 include four memory blocks, the present disclosure is not limited thereto.

[0113] The above-described division of multiple memory blocks included in a memory device into super memory blocks is merely exemplary. Different division methods may be employed depending on the performance of the memory device and user requirements. For example, super memory blocks may be formed by extracting blocks with the same number from the dies included in the memory device.

[0114] For example, assume that the memory device 600 includes four dies (Die0, Die1, Die2, and Die3) as shown in FIG6 , each of which includes four storage planes (plane0, plane1, plane2, plane3); each plane includes multiple storage blocks (Block0, Block1, Block2, ..., Block n), and each block includes multiple pages P (Page). In this structure, super storage blocks are formed by extracting blocks with the same number from the dies included in the memory device. Super Block 0 610 shown in FIG6 includes Block 0 of each plane in each of Die0, Die1, Die2, and Die3. The remaining super blocks are similarly structured.

[0115] In actual applications, no matter how the super blocks are divided, a super block containing too many bad blocks is usually marked as a super bad block.

[0116] For example, assume that a super storage block is constructed as shown in FIG6 . In this case, one way to mark a super storage block as a bad block may include marking a super storage block as a super bad block if the number of bad storage blocks in the super storage block exceeds 2 / 3 of the total number of storage blocks in the super storage block. For another example, using the super storage block shown in FIG6 as an example, if the number of bad blocks in a super storage block exceeds 4 / 5 of the total number of storage blocks in the super storage block, the super storage block is marked as a super bad block. It should be understood that the number of bad blocks in a super storage block that will result in it being marked as a super bad block can be selected based on actual circumstances and is not limited by this disclosure.

[0117] Currently, super storage blocks marked as super bad blocks are usually discarded and no longer used. However, research has found that although these super storage blocks marked as super bad blocks cannot be used as a whole, some of them are not bad and can still be used.

[0118] Based on this, an embodiment of the present disclosure provides an operating method for a memory system, which utilizes available storage areas in super storage blocks marked as super bad blocks, thereby improving the utilization efficiency of NAND Flash.

[0119] Specifically, as shown in FIG7 , an embodiment of the present disclosure provides an operating method for a memory system. The memory system may include one or more memory devices. In this structure, the operating method may include:

[0120] S701: Determine one or more available sub-areas in a storage area marked as a bad block in the memory device;

[0121] S702: Writing the first data to be stored into the one or more available sub-areas.

[0122] It should be noted that the structures of the memory system and memory device mentioned here may be such as the structures of the aforementioned memory system 102 and memory device 104, or may be other structural forms actually used. The storage area mentioned here may refer to the super storage block described above, and correspondingly, the bad block mentioned here may refer to the super bad block, and in the following description of this disclosure, it is not specifically stated that the bad blocks mentioned here refer to super bad blocks. That is: when the storage area is marked as a super bad block, determine one or more available sub-areas contained in the storage area. The capacity of the available sub-area includes the capacity of a storage block. Based on this, for S701, that is, determine one or more available storage blocks in the super storage block marked as a super bad block in the memory device.

[0123] Regardless of which of the above division methods is used to form the super memory block, the technical solution of the present disclosure is applicable to how to use the available sub-areas in the super memory block marked as a super bad block. Therefore, in order to clearly illustrate the technical solution of the present disclosure, unless otherwise specified, the super memory block is formed according to the method shown in Figure 6.

[0124] Based on the above description, the technical solution of the present disclosure is to determine one or more available sub-areas (one or more storage blocks) in a super storage block marked as a super bad block in the memory device.

[0125] Specifically, as shown in Figures 8 and 9, Figure 8 shows an example diagram of one or more available sub-areas contained in a super storage block marked as a super bad block in an embodiment of the present disclosure; Figure 9 shows a schematic diagram of one or more available sub-areas contained in a super storage block marked as a super bad block in an embodiment of the present disclosure being used. In Figure 8, the super storage block involves three Dies (Die0, Die1, Die2), wherein each Die contains four storage planes (plane0, plane1, plane2, plane3), and the super storage block may include storage blocks with the same number in each storage plane in each Die. Based on this, the super storage block may include 12 storage blocks with the same number in different storage planes. 8 may include the following: a super memory block is marked as a super bad block, wherein, in the super memory block, there are no available sub-areas in Die0, that is, all blocks in Die0 contained in the super memory block are bad, that is, there are no available memory blocks in Die0 belonging to the super memory block; plane1 belonging to Die1 in the super memory block contains available memory blocks; and plane1 and plane2 belonging to Die2 in the super memory block contain available memory blocks. In FIG9 , the memory controller uses a certain algorithm to use the available memory blocks contained in plane1 belonging to Die1 in the super memory block and the available memory blocks contained in plane1 and plane2 in Die2, thereby increasing the utilization rate of the memory device.

[0126] Here, the first data to be stored can be some data that the user thinks are not so important and need to be stored, such as, log data (log) generated by the serial port (uart), log data (deug log) generated by debugging, some system data that the reading frequency is not very high, etc. The above data can also be referred to as non-critical data. Correspondingly, the data stored in the memory device also includes some key data that some users think are more important, such as data written by the user through the host, backup data, etc. It should be understood that which data is important and which data is non-critical data is different for electronic devices or memory systems with different purposes. In other words, the division of non-critical data and critical data is designed according to actual conditions, and the present disclosure does not limit the division method of critical data and non-critical data.

[0127] In some embodiments, a storage mode of the first data to be stored in the memory device includes one of the following: a single-level cell mode and a multi-level cell mode.

[0128] It should be noted that the multi-level cell mode may include any of the following: double-level cell (DLC), triple-level cell, quad-level cell, etc., or a storage mode each capable of storing 5 or more bits of data.

[0129] Specifically, in some embodiments, each of the available sub-areas has a corresponding health level; and writing the first data to be stored into the one or more available sub-areas may include:

[0130] The first data to be stored is written into the one or more available sub-areas in descending order of priority of the health levels of the available sub-areas.

[0131] It should be noted that when there is one available sub-area, the first data to be stored can be directly written to the available sub-area without knowing the health level of the available sub-area. It should be understood that the situation where there is only one available sub-area is relatively rare, because the number of super storage blocks marked as super bad blocks in the memory device gradually increases with the use of the memory device. Moreover, the super storage blocks marked as super bad blocks contain multiple storage blocks. When more than a certain number of storage blocks cannot be used, the super storage block will be marked as a super bad block. Therefore, the available sub-areas in the super storage block marked as a super bad block in the memory device generally include multiple available sub-areas. When there are multiple available sub-areas, the health level of each available sub-area is taken into consideration and the first data to be stored is written to the one or more available sub-areas in descending order of the health level of the available sub-areas.

[0132] Here, the higher the health level of the available sub-area, the better the performance of the available sub-area, and the higher the stability of the data stored therein. For the first data to be stored, although it is non-critical data, it is not completely useless data. It is still hoped that the stability of the first data to be stored can be guaranteed to a certain extent. Therefore, when storing the first data to be stored, the first data to be stored is written into the one or more available sub-areas in the order of priority from high to low according to the health level of the available sub-areas. That is: first select the available sub-area with a high health level to store the first data to be stored. When the capacity of the available sub-area with a high health level is insufficient, the remaining data in the first data to be stored is written into the available sub-area with the second highest health level, and so on.

[0133] Here, the term "first data to be stored" is used to describe the data to be stored only to facilitate differentiation from the later-described data to be stored (second data to be stored), and does not limit the quantity. That is, the number of the first data to be stored may be one or more. Therefore, when writing the first data to be stored into the memory device, one or more available sub-areas are required.

[0134] Here, the process of writing the first data to be stored into the one or more available sub-areas may include: a memory controller (Controller) sending a write command to the memory device; the write command carries information about the first data to be stored and the storage location of the first data to be stored; the memory device receives the write command, and writes the first data to be stored into the one or more available sub-areas based on the write command.

[0135] In some other embodiments, each of the available sub-areas has a corresponding health level; and writing the first data to be stored into the one or more available sub-areas may include:

[0136] determining a storage level corresponding to the first data to be stored;

[0137] The first data to be stored is written into the available sub-area of ​​the corresponding health level according to the storage level.

[0138] It should be noted that this is another way to write the first data to be stored into the available sub-area. In this way, the data to be written into the available sub-area is also classified into storage levels, and the data of each storage level can be stored in the available sub-area of ​​the corresponding health level, wherein the corresponding relationship between the storage level and the health level can be: one storage level can correspond to one or more health levels; one health level corresponds to one or more storage levels. In other words, since in actual application, the classification standards of storage levels and the classification standards of health levels may be different, then the number of storage levels and the number of health levels may be the same or different, then the corresponding relationship between the storage level and the health level described above is also diverse, and can be selected according to actual conditions.

[0139] One possible correspondence is as follows: Health levels can correspond one-to-one with storage levels. For example, assume the data to be stored in the available sub-areas has storage levels of primary, secondary, and tertiary storage, and the available sub-areas have health levels of primary, secondary, and tertiary. If the storage levels correspond one-to-one with the health levels, then the correspondence could be: primary storage corresponds to primary health; secondary storage corresponds to secondary health; and tertiary storage corresponds to tertiary health. Alternatively, other one-to-one correspondences can be used.

[0140] Another possible implementation method of the corresponding relationship may be as follows: the first-level storage corresponds to the first-level health, the second-level health, and the third-level health; the second-level storage corresponds to the second-level health and the third-level health; the third-level storage corresponds to the third-level health according to a pre-stored corresponding relationship. This corresponding relationship may be: if the levels of the first-level storage, the second-level storage, and the third-level storage decrease in sequence, that is, the level of the first-level storage is the highest, and the higher the storage level, the more important the data; if the levels of the first-level health, the second-level health, and the third-level health also decrease in sequence, that is: the level of the first-level health is the highest. In this case, the data in the third-level storage can be stored in any of the three health levels. The data in the second-level storage can be stored in the first-level health or the second-level health; and so on, the data in the first-level storage can be stored in the first-level health.

[0141] It should be noted that the above two correspondences are only examples, and in a specific memory device, planning can be performed according to actual conditions.

[0142] Regarding some rules for planning storage levels, in some embodiments, determining the storage level corresponding to the first data to be stored may include one of the following:

[0143] determining the storage level to which the first data to be stored belongs according to its importance;

[0144] determining the storage level to which the first data to be stored belongs according to a reading frequency;

[0145] The storage level to which the first to-be-stored data belongs is determined according to a writing order.

[0146] It should be noted that, first, the data to be stored in the available sub-area needs to be divided into different storage levels according to the storage level division standard, and then the storage level of the first data to be stored is determined. The division of storage levels is not limited to the above-mentioned methods: the division of storage levels is performed according to importance, according to reading frequency, and according to writing order. Correspondingly, the methods for determining the storage level of the first data to be stored include but are not limited to: determining the storage level of the first data to be stored according to the importance of the first data to be stored, determining the storage level of the first data to be stored according to the reading frequency of the first data to be stored, and determining the storage level of the first data to be stored according to the writing order of the first data to be stored. Among them, when the storage level is divided according to the importance, the greater the importance of the data, the higher its corresponding storage level. When the storage level is divided according to the reading frequency, the faster the reading frequency of the data, the higher its corresponding storage level. When the storage level is divided according to the writing order, the earlier the writing order of the data, the higher its corresponding storage level.

[0147] Based on this, in some embodiments, writing the first to-be-stored data into the available sub-area of ​​the corresponding health level according to the storage level may include:

[0148] Obtaining a first mapping relationship; the first mapping relationship includes a correspondence between storage levels and health levels;

[0149] The first data to be stored is written into the available sub-area of ​​the corresponding health level based on the first mapping relationship and the storage level corresponding to the first data to be stored.

[0150] It should be noted that the first mapping relationship can be a pre-stored mapping table, for example, a mapping relationship in the form of a table in which the primary storage corresponds to the primary health level, the secondary storage corresponds to the secondary health level, the tertiary storage corresponds to the tertiary health level, and so on in the aforementioned example. The first mapping relationship can also be a mapping relationship dynamically established between the storage level of the data according to a preset rule based on the health level corresponding to each of the available sub-areas currently existing in the memory device. For example, assuming that the health levels corresponding to the available sub-areas in the memory device include the primary health level, the secondary health level, and the tertiary health level in descending order; the storage levels include the primary storage, the secondary storage, and the tertiary storage in descending order, and the preset rule may be that the data in the primary storage must be stored in the available sub-area with the highest health level, the data in the secondary storage must be stored in the available sub-area with a health level higher than the lowest health level, and the data in the tertiary storage must be stored in the available sub-area with any health level. In this case, the first mapping relationship includes: the primary storage corresponds to the primary health level; the secondary storage corresponds to the primary health level and the secondary health level; and the tertiary storage corresponds to the tertiary health level, the secondary health level, and the primary health level. For another example, if the health levels corresponding to the available sub-areas in the memory device include level one health and level two health in descending order, the storage levels and the preset rules are the same as the previous example. At this time, the first mapping relationship includes: level one storage corresponds to level two health; the level two storage corresponds to level two health; the level three storage corresponds to the level two health and level one health.

[0151] It should be understood that the first mapping relationship, whether a preset (fixed) mapping table or a dynamic mapping table, is described above as an example only. Specifically, the correspondence between storage levels and health levels included in the first mapping relationship is designed based on actual conditions. In other words, any technical solution that implements data storage in available sub-areas based on the first mapping relationship including the correspondence between storage levels and health levels should also include the technical solution described in this disclosure, and will not be detailed here.

[0152] After obtaining the first mapping relationship, the first data to be stored is written into the available sub-area of ​​the corresponding health level according to the first mapping relationship.

[0153] The above describes how to divide the storage levels of data and how to obtain the corresponding relationship between the storage levels and health levels. Regarding the acquisition of the health level of the available sub-area mentioned above, in some embodiments, the operation method may further include:

[0154] evaluating each of the available sub-areas to determine a health status of each of the available sub-areas;

[0155] The health level of each available sub-area is determined according to the health status of each available sub-area.

[0156] The step of evaluating each of the available sub-areas and determining the health status of each of the available sub-areas may include: determining the number of times each of the available sub-areas has been erased and / or the service life of the available sub-areas;

[0157] Determining the health status according to the number of erasures and / or the service life;

[0158] The smaller the number of erasures and / or the longer the service life, the better the health status.

[0159] It should be noted that, in actual application, the evaluation of the health status of the available sub-regions includes but is not limited to the above-mentioned methods, which are only examples. The above-mentioned methods are described below.

[0160] Method 1: Evaluate the health status of the available sub-region based on the erase count (EC) of the available sub-region. The more erase counts of the available sub-region, the worse the health status of the corresponding available sub-region; the fewer erase counts of the available sub-region, the better the health status of the corresponding available sub-region. The recording of the erase count can be achieved based on a counter in the memory controller counting the erase commands sent by the memory controller to the corresponding available sub-region. The counter can be set specifically for recording the erase count, or it can be shared with counters in other functions. The present disclosure does not limit the method for obtaining the erase count.

[0161] Method 2: Evaluate the health status of the available sub-region based on its service life (or remaining life). The longer (larger) the service life, the better the health status of the corresponding available sub-region; the shorter (smaller) the service life, the worse the health status of the corresponding available sub-region. The service life of the available sub-region can be obtained by the memory controller reading the area storing internal parameters in the memory device, that is, directly reading. In actual application, since the service life of the available sub-region can be measured based on the number of times the available sub-region can be erased, based on this, the service life of the available sub-region can also first obtain the total life of the memory device of this type (the total number of times it can be erased), and then determine it based on the difference between the total life and the obtained number of erasures.

[0162] Method 3: Evaluate the health status of the available sub-area based on both the number of erases and the usable lifespan. The steps for evaluating the number of erases and the usable lifespan separately can be the same as above. Here, the evaluations of the number of erases and the usable lifespan can check each other. In other words, if the number of erases and the usable lifespan are both obtained correctly, then the health status of the available sub-area evaluated using the above two methods will be consistent. If the number of erases and the usable lifespan are obtained incorrectly, then the health status of the available sub-area evaluated using the above two methods will be inconsistent. Therefore, Method 3 can reduce false positives.

[0163] After the health status of each available sub-area is obtained, the health level of the available sub-area is determined according to the health status of each available sub-area.

[0164] Specifically, determining the health level of the available sub-area according to the health status of each available sub-area may include: obtaining a second mapping relationship; the second mapping relationship includes a correspondence between the health status and the health level;

[0165] The health level of each of the available sub-areas is determined according to the second mapping relationship and the health status of each of the available sub-areas.

[0166] It should be noted that the second mapping relationship, like the first mapping relationship, can also be a pre-stored mapping table. For example, the mapping table includes the correspondence between the number of erasures and the health level. For example: if the number of erasures is 0, the corresponding health level is level one health; if the number of erasures is 1, the corresponding health level is level two health, and so on; wherein level one health, level two health, ..., the levels decrease in sequence. For another example, the mapping table may include the correspondence between the intervals composed of the number of erasures and the health levels. For example: if the number of erasures is 0 to 5, the corresponding health level is level one health; if the number of erasures is 6 to 10, the corresponding health level is level two health, and so on. wherein level one health, level two health, ..., the levels decrease in sequence. The division intervals here can be equally spaced or unequally spaced, and are designed according to actual needs.

[0167] Based on the above description of the first mapping relationship, the second mapping relationship can be dynamically established according to the corresponding health loading of each available sub-area currently existing in the memory device and the corresponding health level according to the set rules. For example, the set rules can be that the health level of the available sub-area currently existing in the memory device whose percentage between the number of erase times and the total life is less than 20% (healthy state is better) is level one health, the health level of the available sub-area whose percentage between the number of erase times and the total life is between 20% and 80% is level two health, and the health level of the available sub-area whose percentage between the number of erase times and the total life is greater than 80% is level three health, wherein the levels are level one health, level two health, ..., and so on, decreasing in sequence.

[0168] It should be understood that the second mapping relationship, whether it is a preset (fixed) mapping table or a dynamic mapping table, is described above as an example only. Specifically, the correspondence between the health status and the health level contained in the second mapping relationship is designed according to the actual situation. That is to say, any technical solution for storing data in the available sub-area based on the second mapping relationship containing the correspondence between the health status and the health level should include the technical solution described in the present disclosure, which will not be repeated here. It should be noted that the health level of each available sub-area is not fixed. As the available sub-area is used, the number of erasures of the available sub-area increases and the lifespan decreases. The health status of the available sub-area changes dynamically. Then, the health level of the available sub-area can be periodically re-determined according to the second mapping relationship.

[0169] In some embodiments, the operating method further includes:

[0170] A maintenance management table; wherein the management table is configured to record management information of available sub-areas in a storage area marked as bad blocks; the management information includes at least address information of the available sub-areas.

[0171] It should be noted that the number of bad blocks in the memory device increases as the memory device is used. Correspondingly, the number of available sub-regions will also increase. That is, when the memory device is initially used, there are no super storage blocks marked as super bad blocks, and at this time, there are no available sub-regions. As the memory device is used, the number of super storage blocks marked as super bad blocks increases, and the number of available sub-regions in these super storage blocks also increases. To facilitate the use of these available sub-regions, the present disclosure provides an implementable method for maintaining a management table that is configured to record management information of available sub-regions in the storage area marked as super bad blocks, wherein the management information includes at least address information of the available sub-regions. A memory controller (Controller) can write the first data to be stored into the available sub-region based on the address information. The address information may include: the address number corresponding to the bad block to which the available sub-region belongs and the offset address of the available sub-region in the bad block to which it belongs.

[0172] Specifically, the dynamic maintenance of the management table can be illustrated as shown in Figures 10 to 12, wherein Figure 10 shows the available sub-areas managed in the management table at a first time according to an embodiment of the present disclosure; Figure 11 shows the available sub-areas managed in the management table at a second time according to an embodiment of the present disclosure; and Figure 12 shows the available sub-areas managed in the management table at a third time according to an embodiment of the present disclosure. The first time is before the second time; and the second time is before the third time. That is to say, at the first time, since the memory device has just started to be used or has just been used, there are not many super storage blocks marked as super bad blocks. For example, as shown in Figure 10, the super storage blocks marked as super bad blocks include super storage block 0, and only the storage blocks contained in plane 0 of Die0 in the super storage block 0 are usable. The storage blocks contained in other planes belonging to Die0 in the super storage block 0 and the storage blocks belonging to other Dies are bad and cannot be used; thereafter, as shown in Figure 11, as the memory device is used, the number of super storage blocks marked as super bad blocks increases, thereby increasing the number of available sub-areas. Therefore, at the second time, the number of available sub-areas increases, so that the available sub-areas to be managed in the management table also increase, for example, the storage blocks contained in plane 1 belonging to Die0 in super storage block 1 and the storage blocks contained in plane 1 & plane 2 belonging to Die1 are added. Under the technical solution of the present disclosure, when set conditions are met, available sub-regions are also removed from management, reducing the number of available sub-regions in the management table. That is, at the third time, as shown in FIG12 , only the memory blocks within Super Memory Block 1 that belong to planes 1 and 2 in Die 1 (i.e., the memory blocks within planes 1 and 2) remain as available sub-regions. The set conditions are described in detail below and are not repeated here.

[0173] In some embodiments, the maintenance management table may include:

[0174] Updating the management information of the newly added available sub-area into the management table;

[0175] The management information of the available sub-area that meets the set conditions in the management table is deleted from the management table.

[0176] It should be noted that the newly added available sub-areas mentioned here may refer to one or more available sub-areas in the storage area that has just been marked as bad blocks. The available sub-areas that meet the set conditions mentioned here may include, but are not limited to: unusable available sub-areas, available sub-areas whose data storage time exceeds a certain threshold, etc., wherein the unusable available sub-areas may refer to available sub-areas that cannot correctly store data, for example, available sub-areas whose number of erases exceeds a certain threshold and / or whose service life is less than a certain threshold. In other words, the management table is a dynamically changing table that manages newly added available sub-areas and deletes available sub-areas that meet the set conditions. In other words, the available sub-areas included in the management table may include: newly added unused available sub-areas and available sub-areas that have been used but whose number of erases does not exceed a certain threshold and / or whose service life is greater than a certain threshold and whose data storage time does not exceed a certain threshold. That is, for an available sub-region that has stored data in the management table, each time the stored data is erased, the method described above is used to determine whether the number of erases for the available sub-region exceeds a certain threshold and / or whether the usable life is less than a certain threshold. If the number of erases exceeds the certain threshold and / or the usable life is less than the certain threshold, the management information for the available sub-region is deleted from the management table. If the number of erases does not exceed the certain threshold and / or the usable life is greater than the certain threshold, and the data storage time does not exceed the certain threshold, the management information for the available sub-region remains in the management table, i.e., the available sub-region is still managed in the management table.

[0177] Here, the management table may be a linked list. The linked list may be non-contiguous in physical storage, and the logical order of the stored data elements is connected by pointers in the linked list to implement a linear storage structure. The structure may be composed of a series of nodes, each of which includes two parts: the first part is a data field for storing management information; the second part is a pointer field for storing the first address of the location where the management information is stored at the next node.

[0178] Regarding the storage of the management table, in some embodiments, the management table is stored in the memory controller and / or the memory device, that is, the management table can be stored in the cache of the memory controller and / or the storage array included in the memory device.

[0179] In some embodiments, the operating method further includes:

[0180] Determining storage requirements of second data to be stored;

[0181] If it is determined that the storage requirement of the second data to be stored is that the second data to be stored needs to be stored in the available sub-area, checking the management table;

[0182] If the available sub-area exists in the management table, storing the second data to be stored in the available sub-area;

[0183] If the available sub-area does not exist in the management table, the second data to be stored is stored in the first storage area without a bad block mark.

[0184] It should be noted that the aforementioned steps of assessing the health level of available sub-regions and classifying data storage levels are performed after the storage requirements of the first data to be stored have been determined to be stored in the available sub-regions. Subsequently, the first data to be stored is processed to determine how to write it to the available sub-regions. For any second data to be stored in the memory controller, the storage requirements of the second data to be stored are first determined, and then, depending on the storage requirements, the corresponding storage processing is performed. Here, storage requirements can be broadly categorized as: storage in the available sub-regions; and not storage in the available sub-regions.

[0185] Specifically, if it is determined that the storage requirement of the second data to be stored is that the second data to be stored needs to be stored in the available sub-area, the management table is checked; if the available sub-area exists in the management table, the second data to be stored is stored in the available sub-area; if the available sub-area does not exist in the management table, the second data to be stored is stored in the first storage area that does not contain a super bad block mark. The first storage area here is a storage area in the memory device that is not marked as a super bad block, which can be a super storage block. That is to say, if there is an available sub-area in the management table, the second data to be stored is stored in the available sub-area. If there is no available sub-area in the management table, the second data to be stored is stored in the first storage area in the unmarked super bad block (good) memory in the memory device.

[0186] In some embodiments, the operating method may further include:

[0187] If it is determined that the storage requirement of the second data to be stored is that the second data to be stored should not be stored in the available sub-area, the second data to be stored is stored in the second storage area without a bad block mark.

[0188] That is, when the storage requirements of the second data to be stored cannot be stored in the available sub-area of ​​the super bad block, the second data to be stored is stored in the second storage area of ​​the memory device that is not marked as a super bad block. The second storage area and the first storage area are only for the convenience of distinguishing the storage areas in two different processes. The second storage area and the first storage area can be the same storage area or different storage areas, and the present disclosure does not limit this. It should be noted that the first storage area and the second storage area can have the same meaning as the aforementioned storage area marked as a super bad block, that is, the capacity of the first storage area and the second storage area can be one or more of the super storage blocks. The first storage area and the second storage area can also have different meanings from the aforementioned storage area marked as a super bad block, that is: the capacity of the first storage area and the second storage area can be different from the capacity of the aforementioned super storage block, and can be greater or less than its capacity, and can be designed according to actual conditions.

[0189] In order to understand the above-described storage process for any second data to be stored, as shown in FIG13 , the specific process is as follows:

[0190] S1301: Determine storage requirements for second data to be stored;

[0191] S1302: If it is determined that the storage requirement of the second data to be stored is that the second data to be stored needs to be stored in the available sub-area, check the management table;

[0192] S1303: When the available sub-area exists in the management table, storing the second data to be stored in the available sub-area;

[0193] S1304: When the available sub-area does not exist in the management table, storing the second data to be stored in the first storage area without a bad block mark;

[0194] S1305: When it is determined that the storage requirement of the second data to be stored is that the second data to be stored should not be stored in the available sub-area, the second data to be stored is stored in a second storage area that does not contain a bad block mark.

[0195] It should be noted that the specific implementation of each step from step S1301 to step S1305 has been described in detail above and will not be repeated here.

[0196] The present disclosure provides a method for operating a memory system. This method improves memory utilization by determining one or more available sub-regions within a memory region marked as a super bad block and writing first data to be stored into these one or more available sub-regions. This method, which can be implemented solely within a memory controller using an algorithm, repurposes super memory blocks marked as super bad blocks that should have been discarded, thereby improving the utilization efficiency of memory devices (such as NAND flash memory), increasing memory device utilization, and reducing memory device wear.

[0197] The present disclosure also provides a memory system, which may include: a memory device configured to: store data;

[0198] The memory controller is coupled to the memory device and is configured to: determine one or more available sub-areas in a storage area marked as a bad block in the memory device; and write first data to be stored into the one or more available sub-areas.

[0199] In some embodiments, each of the available sub-areas has a corresponding health level; the memory controller is further configured to: write the first data to be stored into the one or more available sub-areas in a descending order of priority of the health levels of the available sub-areas.

[0200] In some embodiments, each of the available sub-regions has a corresponding health level; the memory controller is further configured to:

[0201] determining a storage level corresponding to the first data to be stored;

[0202] The first data to be stored is written into the available sub-area of ​​the corresponding health level according to the storage level.

[0203] In some embodiments, the memory controller is further configured to:

[0204] evaluating each of the available sub-areas to determine a health status of each of the available sub-areas;

[0205] The health level of each available sub-area is determined according to the health status of each available sub-area.

[0206] In some embodiments, the memory controller is further configured as one of the following:

[0207] determining the storage level to which the first data to be stored belongs according to its importance;

[0208] determining the storage level to which the first data to be stored belongs according to a reading frequency;

[0209] The storage level to which the first to-be-stored data belongs is determined according to a writing order.

[0210] In some embodiments, the memory controller is further configured to:

[0211] Obtaining a first mapping relationship; the first mapping relationship is a correspondence between storage levels and health levels formed according to a first preset rule;

[0212] The first data to be stored is written into the available sub-area of ​​the corresponding health level based on the first mapping relationship and the storage level corresponding to the first data to be stored.

[0213] In some embodiments, the memory controller is further configured to: determine the number of times each of the available sub-areas has been erased and / or the service life of the available sub-areas; determine the health status based on the number of times erased and / or the service life; wherein, the smaller the number of times erased and / or the longer the service life, the better the health status.

[0214] In some embodiments, the memory controller is further configured to:

[0215] Obtaining a second mapping relationship; wherein the second mapping relationship includes a correspondence between health status and health level;

[0216] The health level of each of the available sub-areas is determined according to the second mapping relationship and the health status of each of the available sub-areas.

[0217] In some embodiments, the memory controller is further configured to: maintain a management table; wherein the management table is configured to record management information of available sub-areas in a storage area marked as bad blocks; and the management information includes at least address information of the available sub-areas.

[0218] In some embodiments, the memory controller is further configured to: update the management information of the newly added available sub-area into the management table; and delete the management information of the available sub-area that meets the set conditions in the management table from the management table.

[0219] In some embodiments, the memory system is included in one of the following: a solid state drive (SSD) or a memory card.

[0220] It should be noted that the memory system is used to execute the aforementioned operating method. Here, the explanation of the steps in the operation has been explained in detail above and will not be repeated here.

[0221] Specifically, as shown in Figures 14 and 15, Figure 14 shows a schematic structural diagram of a memory card provided by an embodiment of the present disclosure; Figure 15 shows a schematic structural diagram of an SSD provided by an embodiment of the present disclosure.

[0222] In FIG14 , a memory controller 1402 and a single memory device 1404 may be integrated into a memory card 1400. Memory cards may include PC cards (PCMCIA, Personal Computer Memory Card International Association), CF cards, Smart Media (SM) cards, memory sticks, multimedia cards (MMC, RS-MMC, MMCmicro), SD cards (SD, miniSD, microSD, SDHC), UFS, etc. The memory card 1400 may further include a memory card connector 1406 for coupling the memory card to a host (e.g., the host 108 in FIG1 ).

[0223] 15 , a memory controller 1502 and a plurality of memory devices 1504 may be integrated into an SSD 1500. The SSD may also include an SSD connector 1506 that couples the SSD to a host (e.g., host 108 in FIG. 1 ). In some embodiments, the storage capacity and / or operating speed of the SSD is greater than the storage capacity and / or operating speed of a memory card.

[0224] The present disclosure also provides an electronic device, including: a memory system; the memory system includes: one or more memory devices; the memory devices are configured to: store data;

[0225] and a memory controller coupled to the memory device and configured to control the memory device; wherein,

[0226] The memory controller is configured to: determine one or more available sub-areas in a storage area marked as a bad block in the memory device; write the first data to be stored into the one or more available sub-areas;

[0227] and a host coupled to the memory system and configured to control the memory system.

[0228] It should be noted that the electronic device and the power supply circuit and power supply method of the aforementioned memory belong to the same inventive concept. The electronic device includes the aforementioned storage system. Therefore, the nouns appearing here have been explained in detail in the above and are also applicable here, and will not be repeated here. It should be understood that only the structures most relevant to the technical solution of the present disclosure are described here. The electronic device provided by the present disclosure also includes and is applicable to the structure and description of the electronic device shown in Figure 1. The electronic device also includes structures that are not shown but are required for the normal operation of the electronic device. In view of the length of the application document, the present disclosure will not repeat them one by one.

[0229] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above methods. The aforementioned storage medium includes various media capable of storing program code, such as a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0230] It should be noted that in the several embodiments provided in the present disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0231] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0232] In addition, all functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0233] Those skilled in the art will appreciate that all or part of the steps of the above-mentioned method embodiments may be implemented by hardware associated with program instructions, and the aforementioned program may be stored in a computer-readable storage medium. When the program is executed, the program executes the steps of the above-mentioned method embodiments. The aforementioned storage medium includes various media that can store program codes, such as mobile storage devices, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.

[0234] Alternatively, if the above-mentioned integrated unit of the present disclosure is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present disclosure is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0235] The above description is intended to be illustrative, not restrictive. For example, the above examples (or one or more aspects thereof) can be used in combination with each other. Other embodiments may be used, such as those available to a person of ordinary skill in the art upon reading the above description. It should be understood that it will not be used to interpret or limit the scope or meaning of the claims. In addition, in the above detailed description, various features may be combined together to simplify the present disclosure. This should not be interpreted as meaning that unclaimed disclosed features are essential to any claim. On the contrary, the disclosed subject matter may be less than all the features of a particular disclosed embodiment. Therefore, the appended claims are hereby incorporated into the detailed description, with each claim independently serving as a separate embodiment, and it is expected that these embodiments may be combined with each other in various combinations or permutations. The scope of the present disclosure should be determined with reference to the appended claims and the full scope of equivalents to which these claims are assigned.

Claims

1. A method for operating a memory system, the memory system comprising one or more memory devices; the method comprising: determining one or more available sub-regions in a storage region marked as a bad block in the memory device; The first data to be stored is written into the one or more available sub-areas.

2. The operating method according to claim 1, wherein: Each of the available sub-areas has a corresponding health level; and writing the first data to be stored into the one or more available sub-areas includes: The first data to be stored is written into the one or more available sub-areas in a descending priority order of the health levels of the available sub-areas.

3. The operating method according to claim 1, wherein: Each of the available sub-areas has a corresponding health level; Writing the first data to be stored into the one or more available sub-areas includes: Determining a storage level corresponding to the first data to be stored; The first data to be stored is written into the available sub-area of ​​the corresponding health level according to the storage level.

4. The operating method according to claim 2 or 3, wherein: The operation method also includes: Evaluate each of the available sub-areas to determine a health status of each of the available sub-areas; The health level of each available sub-area is determined according to the health status of each available sub-area.

5. The operating method according to claim 3, wherein: The determining the storage level corresponding to the first data to be stored includes one of the following: Determining the storage level to which the first data to be stored belongs according to the importance; determining the storage level to which the first data to be stored belongs according to a reading frequency; The storage level to which the first to-be-stored data belongs is determined according to a writing order.

6. The operating method according to claim 5, wherein: The step of writing the first to-be-stored data into the available sub-area of ​​the corresponding health level according to the storage level includes: Obtaining a first mapping relationship; the first mapping relationship includes a correspondence between storage levels and health levels; The first data to be stored is written into the available sub-area of ​​the corresponding health level based on the first mapping relationship and the storage level corresponding to the first data to be stored.

7. The operating method according to claim 4, wherein: The step of evaluating each of the available sub-areas and determining the health status of each of the available sub-areas includes: Determine the number of times each of the available sub-areas has been erased and / or the usable service life of the available sub-areas; Determine the health status according to the number of erasures and / or the usable life; The smaller the number of erasures and / or the longer the service life, the better the health status.

8. The operating method according to claim 4, wherein: The step of determining the health level of each available sub-area according to the health status of each available sub-area includes: Obtaining a second mapping relationship; wherein the second mapping relationship includes a correspondence between a health state and a health level; The health level of each of the available sub-areas is determined according to the second mapping relationship and the health status of each of the available sub-areas.

9. The operating method according to claim 1, wherein: The operation method also includes: A maintenance management table; wherein the management table is configured to record management information of available sub-areas in a storage area marked as a bad block; the management information at least includes address information of the available sub-areas.

10. The operating method according to claim 9, wherein: The maintenance management table includes: Updating the management information of the newly added available sub-area into the management table; The management information of the available sub-area satisfying the set condition in the management table is deleted from the management table.

11. The operating method according to claim 1, wherein: The capacity of the available sub-area includes the capacity of one storage block.

12. The operating method according to claim 10, wherein: The management table is stored in at least one of a memory of the memory controller and the memory device.

13. The operating method according to claim 9, wherein: The operation method also includes: Determining storage requirements of second data to be stored; When it is determined that the storage requirement of the second data to be stored is that the second data to be stored can be stored in the available sub-area, checking the management table; When the available sub-area exists in the management table, storing the second data to be stored in the available sub-area; When the available sub-area does not exist in the management table, the second data to be stored is stored in the first storage area without a bad block mark.

14. The operating method according to claim 13, wherein: The operation method also includes: When it is determined that the storage requirement of the second data to be stored is that the second data to be stored should not be stored in the available sub-area, the second data to be stored is stored in the second storage area without a bad block mark.

15. The operating method according to claim 1, wherein: A storage mode of the first to-be-stored data in the memory device includes one of the following: a single-level cell (SLC) mode and a multi-level cell (MLC) mode.

16. A memory system comprising: A memory device configured to: store data; A memory controller, coupled to the memory device, configured to: determine one or more available sub-regions in a storage region marked as a bad block in the memory device; The first data to be stored is written into the one or more available sub-areas.

17. The memory system of claim 16, wherein: Each of the available sub-areas has a corresponding health level; the memory controller is further configured to: write the first data to be stored into the one or more available sub-areas in a descending priority order of the health levels of the available sub-areas.

18. The memory system of claim 16, wherein: Each of the available sub-areas has a corresponding health level; the memory controller is further configured to: Determining a storage level corresponding to the first data to be stored; The first data to be stored is written into the available sub-area of ​​the corresponding health level according to the storage level.

19. The memory system according to claim 17 or 18, wherein: The memory controller is further configured to: Evaluate each of the available sub-areas to determine a health status of each of the available sub-areas; The health level of each available sub-area is determined according to the health status of each available sub-area.

20. The memory system of claim 18, wherein: The memory controller is further configured as one of the following: Determining the storage level to which the first data to be stored belongs according to the importance; determining the storage level to which the first data to be stored belongs according to a reading frequency; The storage level to which the first to-be-stored data belongs is determined according to a writing order.

21. The memory system of claim 20, wherein: The memory controller is further configured to: Obtaining a first mapping relationship; the first mapping relationship includes a correspondence between storage levels and health levels; The first data to be stored is written into the available sub-area of ​​the corresponding health level based on the first mapping relationship and the storage level corresponding to the first data to be stored.

22. The memory system of claim 19, wherein: The memory controller is further configured to: determine the number of times each of the available sub-areas has been erased and / or the serviceable life of the available sub-areas; determine the health status based on the number of times the erased times and / or the serviceable life; wherein, the smaller the number of times the erased times and / or the larger the serviceable life, the better the health status.

23. The memory system of claim 19, wherein: The memory controller is further configured to: Obtaining a second mapping relationship; wherein the second mapping relationship includes a correspondence between a health state and a health level; The health level of each of the available sub-areas is determined according to the second mapping relationship and the health status of each of the available sub-areas.

24. The memory system of claim 16, wherein: The memory controller is further configured to: maintain a management table; wherein the management table is configured to record management information of available sub-areas in the storage area marked as bad blocks; and the management information at least includes address information of the available sub-areas.

25. The memory system of claim 24, wherein: The memory controller is further configured to: update the management information of the newly added available sub-area into the management table; and delete the management information of the available sub-area that meets the set conditions in the management table from the management table.

26. The memory system according to any one of claims 16 to 18, 20 to 25, wherein: The memory system includes one of the following: a solid state drive SSD, a memory card.

27. An electronic device comprising: Memory system; The memory system comprises: one or more memory devices; the memory devices are configured to: store data; and a memory controller coupled to the memory device and used to control the memory device; wherein, The memory controller is configured to: determine one or more available sub-areas in a storage area marked as a bad block in the memory device; write the first data to be stored into the one or more available sub-areas; Multiple available sub-regions; and a host coupled to the memory system and configured to control the memory system.

28. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • Data storage method and device based on flash memory and flash memory chip

    CN107203341A

  • Data storage method, device and flash memory chip based on flash memory

    CN107220185A

  • Memory system and operation method thereof

    CN110362270A

  • Data writing method and device of solid state disk, computer equipment and storage medium

    CN111722803A

  • Data storage device, operation method thereof and storage system having the same

    US20210333999A1