Movatterモバイル変換


[0]ホーム

URL:


WO2015096496A1 - Method for data storage and storage device - Google Patents

Method for data storage and storage device
Download PDF

Info

Publication number
WO2015096496A1
WO2015096496A1PCT/CN2014/084595CN2014084595WWO2015096496A1WO 2015096496 A1WO2015096496 A1WO 2015096496A1CN 2014084595 WCN2014084595 WCN 2014084595WWO 2015096496 A1WO2015096496 A1WO 2015096496A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage unit
data
blank
blank storage
health level
Prior art date
Application number
PCT/CN2014/084595
Other languages
French (fr)
Chinese (zh)
Inventor
辜多艮
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司filedCritical华为技术有限公司
Publication of WO2015096496A1publicationCriticalpatent/WO2015096496A1/en

Links

Classifications

Definitions

Landscapes

Abstract

A method for data storage and a storage device. The method is used for the storage device wherein there are at least three health levels in empty storage units, and comprises: selecting an empty storage unit in the storage device according to the size of data to be stored; encoding the data to be stored according to an encoding mode corresponding to the health level of the empty storage unit, to obtain check data for the data, wherein the health levels are used for indicating the size of data that can be stored in the empty storage unit on the basis of ensuring the reliability of the stored data; and storing the data and the check data in the empty storage unit. Through the method described above, the rate of utilization of the storage units can be improved, the service life and reliability of the storage device can be increased, and the cost of the storage device can be cut down.

Description

存储数据的方法及存储装置 技术领域 Method and storage device for storing data
本发明涉及存储技术领域, 特别是涉及一种存储数据的方法及存储 装置。 背景技术 The present invention relates to the field of storage technologies, and in particular, to a method and a storage device for storing data. Background technique
固态硬盘一般釆用与非门闪存( NAND Flash )来实现。 NAND Flash 芯片的使用寿命一般釆用擦写次数(P/E Cycle )来确定。 单层式储存单 元类型的 NAND Flash 芯片可 10 万次擦写, 多层式储存单元类型的 NAND Flash芯片一般小于 1万次擦写, 三层式存储单元类型的 NAND Flash芯片一般小于 1千次擦写。 P/E Cycle次数降低, 表明固态硬盘的 寿命降低, 同时在接近 P/E Cycle寿命时, 固态硬盘的可靠性也会急剧 衰减。 SSDs are typically implemented using NAND Flash. The lifetime of a NAND Flash chip is generally determined by the number of erases (P/E Cycle). The NAND Flash chip of the single-layer storage unit type can be erased 100,000 times, the NAND Flash chip of the multi-layer storage unit type is generally less than 10,000 erasing, and the NAND Flash chip of the three-layer storage unit type is generally less than 1,000 times. erase. The reduced number of P/E cycles indicates that the life of the SSD is reduced, and the reliability of the SSD is drastically reduced near the P/E Cycle life.
提高固态硬盘寿命的方法主要是坏块管理技术和坏页管理技术, 两 者本质上都是按照厂商标准配置的冗余比(即有效数据与校验数据的比 值), 将存储芯片内的块和页划分为健康块及坏块, 将存储芯片内的页 划分为健康页及坏页, 其中, 健康块和健康页可以继续使用, 坏块和坏 页禁止使用。 The methods to improve the life of SSDs are mainly bad block management technology and bad page management technology. Both are essentially the redundancy ratio configured according to the manufacturer's standard (that is, the ratio of valid data to parity data), and the blocks in the memory chip will be stored. The page and the page are divided into healthy blocks and bad blocks, and the pages in the memory chip are divided into healthy pages and bad pages, wherein the health block and the health page can continue to be used, and the bad blocks and bad pages are prohibited from being used.
本申请的发明人在长期的研发中发现, 上述两种提高固态硬盘寿命 的方法中, Flash芯片存储单元利用率低, 简单地将 Flash芯片内部的存 储单元划为可用与不可用, 已经不能满足固态硬盘长寿命、 高容量和低 成本的发展需求。 发明内容 The inventor of the present application found in the long-term research and development that in the above two methods for improving the life of the solid state hard disk, the utilization rate of the flash chip memory unit is low, and simply the memory cells inside the flash chip are made available and unavailable, which cannot be satisfied. SSDs have long life, high capacity and low cost development needs. Summary of the invention
本发明主要解决的技术问题是提供一种存储数据的方法及存储装 置, 能够提高存储单元利用率, 提高存储装置的使用寿命和可靠性, 降 低存储装置的成本。The technical problem to be solved by the present invention is to provide a method and a storage device for storing data, which can improve the utilization ratio of the storage unit, improve the service life and reliability of the storage device, and reduce the The cost of low storage devices.
第一方面, 本发明提供一种存储数据的方法, 所述方法用于空白存 储单元的健康等级至少分为三级的存储装置, 包括: 根据待存储数据的 大小在存储装置中选择空白存储单元; 根据与所述空白存储单元的健康 的校验数据, 其中所述健康等级用于指示所述空白存储单元在保证存储 的数据可靠性的基础上能够存储的数据的大小; 将所述数据以及所述校 验数据存储在所述空白存储单元中。 In a first aspect, the present invention provides a method for storing data, wherein the method is used for a storage device whose health level of a blank storage unit is at least three levels, and includes: selecting a blank storage unit in the storage device according to the size of the data to be stored. According to the health check data with the blank storage unit, wherein the health level is used to indicate the size of data that the blank storage unit can store on the basis of ensuring the reliability of the stored data; The verification data is stored in the blank storage unit.
在第一方面的第一种可能的实现方式中, 所述空白存储单元至少包 括第一空白存储单元以及第二空白存储单元, 其中所述第一空白存储单 元的健康等级高于所述第二空白存储单元的健康等级; 所述将所述数据 以及所述校验数据存储在所述空白存储单元中包括: 将所述数据以及所 述校验数据分别存储到第一空白存储单元以及第二空白存储单元中, 且 所述第一空白存储单元的校验区中存储有存储于第二空白存储单元的 数据区中数据的校验数据。 In a first possible implementation manner of the first aspect, the blank storage unit includes at least a first blank storage unit and a second blank storage unit, wherein the first blank storage unit has a higher health level than the second The health level of the blank storage unit; storing the data and the verification data in the blank storage unit includes: storing the data and the verification data to a first blank storage unit and a second In the blank storage unit, the check data of the data stored in the data area of the second blank storage unit is stored in the check area of the first blank storage unit.
结合第一方面或第一方面的第一种可能的实现方式, 在第一方面的 第二种可能的实现方式中, 所述根据待存储数据的大小在存储装置中选 择空白存储单元的步骤之前, 还包括: 确定所述空白存储单元的健康等 级。 With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the step of selecting a blank storage unit in the storage device according to the size of the data to be stored And the method further includes: determining a health level of the blank storage unit.
结合第一方面的第二种可能的实现方式, 在第一方面的第三种可能 的实现方式中, 所述确定所述空白存储单元的健康等级包括: 记录所述 空白存储单元的读状态参数、 写状态参数以及擦状态参数三者中的一种 或一种以上; 获取所述空白存储单元所属的存储空间的健康等级; 根据 所述空白存储单元的读状态参数、 写状态参数、 擦状态参数三者中的一 种或一种以上以及所述空白存储单元所属的存储单元的健康等级, 计算 所述空白存储单元的健康值; 根据所述空白存储单元的健康值以及预设 的健康等级门限值, 确定所述空白存储单元的健康等级。 In conjunction with the second possible implementation of the first aspect, in a third possible implementation manner of the first aspect, the determining a health level of the blank storage unit includes: recording a read status parameter of the blank storage unit And one or more of the write status parameter and the wipe status parameter; acquiring a health level of the storage space to which the blank storage unit belongs; reading status parameters, writing status parameters, and rubbing according to the blank storage unit Calculating a health value of the blank storage unit according to one or more of the status parameters and a health level of the storage unit to which the blank storage unit belongs; according to the health value of the blank storage unit and the preset A health level threshold value that determines the health level of the blank storage unit.
结合第一方面或第一方面的第一种至第三种中任何一种可能的实 现方式, 在第一方面的第四种可能的实现方式中, 所述空白存储单元包 括下述存储单元中的至少一个: 页 Page、 块 Block或面 Plane。With reference to the first aspect, or any one of the first to the third possible implementation manners of the first aspect, in a fourth possible implementation manner of the first aspect, the blank storage unit package At least one of the following storage units is included: Page Page, Block Block, or Face Plane.
第二方面, 本发明提供一种存储装置, 所述存储装置的空白存储单 元的健康等级至少分为三级, 所述存储装置包括: 选择模块, 用于根据 待存储数据的大小在存储装置中选择空白存储单元; 处理模块, 用于根 据与所述空白存储单元的健康等级对应的编码方式对所述待存储数据 进行编码处理, 以获得所述数据的校验数据, 其中所述健康等级用于指 示所述空白存储单元在保证存储的数据可靠性的基础上能够存储的数 据的大小; 存储模块, 用于将所述数据以及所述校验数据存储在所述空 白存储单元中。 In a second aspect, the present invention provides a storage device, wherein a health level of a blank storage unit of the storage device is at least three levels, and the storage device includes: a selection module, configured to be in a storage device according to a size of data to be stored. Selecting a blank storage unit, the processing module, configured to perform encoding processing on the data to be stored according to an encoding manner corresponding to a health level of the blank storage unit, to obtain verification data of the data, where the health level is used And a storage module, configured to store the data and the verification data in the blank storage unit, to indicate a size of data that can be stored by the blank storage unit on the basis of ensuring reliability of stored data.
在第二方面的第一种可能的实现方式中, 所述空白存储单元至少包 括第一空白存储单元以及第二空白存储单元, 其中所述第一空白存储单 元的健康等级高于所述第二空白存储单元的健康等级; 所述存储模块具 及第二空白存储单元中, 且所述第一空白存储单元的校验区中存储有存 储于第二空白存储单元的数据区中数据的校验数据。 In a first possible implementation manner of the second aspect, the blank storage unit includes at least a first blank storage unit and a second blank storage unit, wherein the first blank storage unit has a higher health level than the second a health level of the blank storage unit; the storage module has a second blank storage unit, and the checksum of the data stored in the data area of the second blank storage unit is stored in the check area of the first blank storage unit data.
结合第二方面或第二方面的第一种可能的实现方式, 在第二方面的 第二种可能的实现方式中, 所述存储装置还包括确定模块, 所述确定模 块用于确定所述空白存储单元的健康等级。 With reference to the second aspect, or the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the storage device further includes a determining module, where the determining module is configured to determine the blank The health level of the storage unit.
结合第二方面的第二种可能的实现方式, 在第二方面的第三种可能 的实现方式中, 所述确定模块包括: 记录单元, 用于记录所述空白存储 单元的读状态参数、 写状态参数以及擦状态参数三者中的一种或一种以 上;获取单元,用于获取所述空白存储单元所属的存储空间的健康等级; 计算单元, 用于根据所述空白存储单元的读状态参数、 写状态参数、 擦 状态参数三者中的一种或一种以上以及所述空白存储单元所属的存储 单元的健康等级, 计算所述空白存储单元的健康值; 确定单元, 用于根 据所述空白存储单元的健康值以及预设的健康等级门限值, 确定所述空 白存储单元的健康等级。 With reference to the second possible implementation of the second aspect, in a third possible implementation manner of the second aspect, the determining module includes: a recording unit, configured to record a read status parameter of the blank storage unit, and write One or more of a status parameter and an erasing status parameter; an obtaining unit, configured to acquire a health level of a storage space to which the blank storage unit belongs; and a calculating unit, configured to read according to the blank storage unit Calculating a health value of the blank storage unit by one or more of a status parameter, a write status parameter, and an erasing status parameter, and a health level of the storage unit to which the blank storage unit belongs; Determining a health level of the blank storage unit according to a health value of the blank storage unit and a preset health level threshold.
结合第二方面或第二方面的第一种至第三种中任何一种可能的实 现方式, 在第二方面的第四种可能的实现方式中, 所述空白存储单元包 括下述存储单元中的至少一个: 页 Page、 块 Block或面 Plane。With reference to the second aspect, or any one of the first to the third possible implementation manners of the second aspect, in a fourth possible implementation manner of the second aspect, the blank storage unit package At least one of the following storage units is included: Page Page, Block Block, or Face Plane.
本发明的有益效果是: 区别于现有技术的情况, 本发明用于空白存 储单元的健康等级至少分为三级, 由于空白存储单元的健康等级用于指 示空白存储单元在保证存储的数据可靠性的基础上能够存储的数据的 大小, 这使得每个空白存储单元在保证存储数据可靠性的基础上得到充 分的利用, 且健康等级至少包括三级, 对空白存储单元进行精细化的分 级, 通过这种方式, 能够提高存储单元利用率, 提高存储装置的使用寿 命和可靠性, 降低存储装置的成本。 附图说明 The beneficial effects of the present invention are: Different from the prior art, the health level of the blank storage unit of the present invention is divided into at least three levels, because the health level of the blank storage unit is used to indicate that the blank storage unit is reliable in ensuring stored data. The size of the data that can be stored on the basis of sex, which makes each blank storage unit fully utilized on the basis of ensuring the reliability of the stored data, and the health level includes at least three levels, and the hierarchical classification of the blank storage unit is performed. In this way, the utilization of the storage unit can be improved, the service life and reliability of the storage device can be improved, and the cost of the storage device can be reduced. DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将 对实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见 地, 下面描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技 术人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获 得其他的附图。 In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.
图 1是本发明实施例提供的一种存储数据的方法的流程图; 图 2是本发明实施例提供的另一种存储数据的方法的流程图; 图 3是本发明实施例提供的一种在存储装置中存储数据的方法中使 用的存储单元健康状态表的示意图; 1 is a flowchart of a method for storing data according to an embodiment of the present invention; FIG. 2 is a flowchart of another method for storing data according to an embodiment of the present invention; Schematic diagram of a storage unit health status table used in a method of storing data in a storage device;
图 4是本发明实施例提供的一种存储数据的方法中健康等级不同的 空白存储空间页的组合示意图; FIG. 4 is a schematic diagram of a combination of blank storage space pages with different health levels in a method for storing data according to an embodiment of the present invention; FIG.
图 5是本发明实施例提供的一种存储数据的方法中页存储空间分配 示意图; FIG. 5 is a schematic diagram of page storage space allocation in a method for storing data according to an embodiment of the present invention; FIG.
图 6是本发明实施例提供的一种存储装置的结构示意图; 6 is a schematic structural diagram of a storage device according to an embodiment of the present invention;
图 7是本发明实施例提供的另一种存储装置的结构示意图; 图 8是本发明提供的一种存储装置的物理结构示意图。 具体实施方式 FIG. 7 is a schematic structural diagram of another storage device according to an embodiment of the present invention; FIG. 8 is a schematic diagram of a physical structure of a storage device provided by the present invention. detailed description
为了使本技术领域的人员更好地理解本发明方案, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描 述, 显然, 所描述的实施例仅仅是本发明一部分的实施例, 而不是全部 的实施例。In order to enable a person skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are only a part of the embodiments of the invention, rather than all of the embodiments.
下面结合附图和实施例对本发明进行详细说明。 The invention will now be described in detail in conjunction with the drawings and embodiments.
参阅图 1 , 图 1是本发明实施例提供的一种存储数据的方法的流程 图, 该方法用于空白存储单元的健康等级至少分为三级的存储装置, 包 括: Referring to FIG. 1 , FIG. 1 is a flow chart of a method for storing data according to an embodiment of the present invention. The method is used for a storage device whose health level of a blank storage unit is at least three levels, including:
步骤 S101 : 根据待存储数据的大小在存储装置中选择空白存储单 元。 Step S101: Select a blank storage unit in the storage device according to the size of the data to be stored.
本发明实施例的存储装置的主要功能是存储各种数据, 并能在计算 机运行过程中高速、 自动地完成数据的存取。 The main function of the storage device of the embodiment of the present invention is to store various data, and to complete data access at high speed and automatically during the running of the computer.
在计算机中最小的信息单位是比特 bit, 也就是一个二进制位, 8个 bit组成一个 Byte,也就是字节。计算机的存储装置容量是以字节为最小 单位来计算的, 存储单元是指理论上能够存储一定数量字节的存储空 间, 空白存储单元是指未存储数据的空白的存储单元。 The smallest unit of information in a computer is the bit bit, which is a binary bit, and 8 bits form a Byte, which is a byte. The storage capacity of the computer is calculated in units of bytes. The storage unit refers to a storage space that can theoretically store a certain number of bytes, and the blank storage unit refers to a storage unit that does not store data.
其中, 空白存储单元可以是下述存储单元中的至少一个: 页 Page、 块 Block或面 Plane。 例如: NAND Flash芯片通常由一个内部寄存器和 存储矩阵组成, 存储矩阵包括若干块, 每个块又包含若干页, 每个页包 含若干字节; 每种 NAND Flash芯片的存储矩阵大小定义不同, 例如有 一种 NAND Flash 以 8640个字节组成一个页, 256个页组成一个块, 2048 个块组成一个面, 2个面组成一个逻辑单元 LU ( Logical Unit ), 再由 一个或者若干逻辑单元组成整个闪存( Flash )存储装置。在每页中前 8192 个字节是用于存储数据, 后 448 个字节用于存放数据的校验码(Error Correction Code, ECC ), 即校验数据。 The blank storage unit may be at least one of the following storage units: a page, a block, or an area Plane. For example: A NAND Flash chip usually consists of an internal register and a memory matrix. The memory matrix consists of several blocks, each block containing several pages, each page containing several bytes. Each NAND Flash chip has a different definition of the memory matrix size, for example There is a kind of NAND Flash that makes a page with 8640 bytes, 256 pages form a block, 2048 blocks form a face, 2 faces form a logical unit LU (Logical Unit), and then one or several logical units make up the entire flash memory. (Flash) storage device. The first 8192 bytes in each page are used to store data, and the last 448 bytes are used to store the data's Error Correction Code (ECC), which is the check data.
随着存储装置的反复使用, 特别是擦和写的反复使用, 存储装置在 保证所存储数据可靠性的基础上实际能够存储的数据的大小在不断地 下降, 所谓存储数据的可靠性是指写入存储装置中的数据和从存储装置 中读出的数据是一致的, 没有错误。 例如, 对存储装置的同一个存储单 元, 在第一次使用时, 它能够存储的数据的大小基本和理论上能够存储 的数据的大小相同, 也可以保证所存储数据的可靠性, 存储同样大小的 数据, 需要很少的校验数据或者根本不需要校验数据; 随着擦写次数的 增多, 写入存储装置时发生错误的比特数增加, 此时为了保证所存储数 据的可靠性, 需要增加校验数据, 校验数据占据的空间也增加, 数据占 据的空间自然减少, 所以该存储单元在保证所存储数据的可靠性的基础 上实际能够存储的数据减小。With the repeated use of the storage device, especially the repeated use of erasing and writing, the size of the data that the storage device can actually store on the basis of ensuring the reliability of the stored data is continuously decreasing, and the reliability of the so-called stored data refers to writing. The data entered into the storage device is identical to the data read from the storage device, with no errors. For example, for the same storage unit of the storage device, when it is used for the first time, the size of the data that can be stored is basically the same as the size of the data that can theoretically be stored, and the reliability of the stored data can be ensured, and the same size can be stored. of Data, requires very little parity data or does not need to verify data at all; As the number of erasures increases, the number of errors that occur when writing to the storage device increases. In this case, in order to ensure the reliability of the stored data, it is necessary to increase The data is verified, the space occupied by the verification data is also increased, and the space occupied by the data is naturally reduced. Therefore, the storage unit can actually reduce the data that can be stored on the basis of ensuring the reliability of the stored data.
空白存储单元的健康等级可以指示空白存储单元在保证所存储的 数据可靠性的基础上能够存储的数据的大小。 因此, 不同健康等级的空 白存储单元在保证所存储的数据可靠性的基础上能够存储的数据的大 小是不一样的; 在保证所存储数据可靠性的基础上, 健康等级高的空白 存储单元能够存储的数据多, 健康等级低的空白存储单元能够存储的数 据少。 The health level of the blank storage unit may indicate the size of the data that the blank storage unit can store based on the reliability of the stored data. Therefore, the blank storage units of different health levels can store different amounts of data on the basis of ensuring the reliability of the stored data; on the basis of ensuring the reliability of the stored data, the blank storage unit with high health level can There are many stored data, and a blank storage unit with a low health level can store less data.
在本发明实施例中, 空白存储单元的健康等级的数目至少包括三 级, 可以实现对存储装置的空白存储单元的精细化划分, 合理且充分地 利用空白存储单元。例如, 空白存储单元的健康等级可以划分为第 0级、 第 -1级、 第 -2级以及第 -3级, 其中, 第 0级表示健康状况最好的存储单 元, 第 -1级、 第 -2级以及第 -3级的空不存储单元的健康品质依次降低。 In the embodiment of the present invention, the number of health levels of the blank storage unit includes at least three levels, which can implement fine division of the blank storage unit of the storage device, and utilize the blank storage unit reasonably and fully. For example, the health level of a blank storage unit can be divided into level 0, level -1, level -2, and level -3, where level 0 represents the best health storage unit, level -1, The health qualities of the empty storage units of -2 and -3 are sequentially reduced.
在本步骤中, 当需要存储数据时, 可以根据待存储数据的大小选择 空白存储单元, 以使得空白存储单元的存储空间的大小能够存储待存储 数据。 例如,待存储数据的大小是 14K, 现有的空白的存储单元有 4个, 健康等级分别是第 0级、 第 -1级、 第 -2级以及第 -3级, 在保证所存储数 据可靠性的基础上能够存储的数据的大小分别是 8K、 7.5Κ、 7Κ 以及 6.5Κ, 此时, 选择的空白存储单元可以是第 0级和第 -1级, 或第 0级和 第 -2级, 或第 -1级和第 -2级、 或第 -1级和第 -3级等等; 又如待存储数据 的大小是 8Κ, 此时, 选择的空白存储单元可以是第 0级、 或第 -1级和 第 -3级等等。 In this step, when data needs to be stored, a blank storage unit may be selected according to the size of the data to be stored, so that the size of the storage space of the blank storage unit can store the data to be stored. For example, the size of the data to be stored is 14K, and there are 4 existing blank storage units, and the health levels are level 0, level -1, level -2, and level -3, ensuring reliable storage of data. The size of the data that can be stored on the basis of sex is 8K, 7.5Κ, 7Κ, and 6.5Κ, respectively. At this time, the selected blank storage unit can be level 0 and level-1, or level 0 and level-2. , or level -1 and -2, or level -1 and -3, etc.; and if the size of the data to be stored is 8 Κ, at this time, the selected blank storage unit may be level 0, or Levels -1 and -3, etc.
步骤 S102:根据与空白存储单元的健康等级对应的编码方式对待存 储数据进行编码处理, 以获得数据的校验数据, 其中健康等级用于指示 空白存储单元在保证存储的数据可靠性的基础上能够存储的数据的大 小。 在选择空白存储单元后, 根据空白存储单元的健康等级, 选择与该 空白存储单元的健康等级对应的编码方法, 对待存储数据进行编码处 理, 以获得所述数据的校验数据。Step S102: Perform encoding processing on the data to be stored according to an encoding manner corresponding to the health level of the blank storage unit, to obtain verification data of the data, where the health level is used to indicate that the blank storage unit can ensure the reliability of the stored data. The size of the stored data. After selecting the blank storage unit, according to the health level of the blank storage unit, an encoding method corresponding to the health level of the blank storage unit is selected, and the stored data is encoded to obtain the verification data of the data.
步骤 S 103: 将数据以及校验数据存储在空白存储单元中。 Step S103: Store the data and the verification data in a blank storage unit.
在将数据以及校验数据存储到空白存储单元时, 有两种方式可以选 择: 第一种是在空白存储单元中将数据和校验数据分开存储, 例如前面 存储数据, 后面存储校验数据; 第二种是在空白存储单元中将数据和校 验数据混合存储, 即不区分哪些是数据, 哪些是校验数据, 将数据和校 验数据混合在一起进行存储。 When storing data and verification data to a blank storage unit, there are two ways to choose: The first is to store the data and the verification data separately in a blank storage unit, such as storing the data in the front, and then storing the verification data; The second is to store the data and the check data in a blank storage unit, that is, to distinguish which data is the data, which is the check data, and the data and the check data are mixed and stored.
总之, 本发明实施例用于空白存储单元的健康等级至少分为三级, 由于空白存储单元的健康等级用于指示空白存储单元在保证所存储的 数据可靠性的基础上存储不同大小的数据, 这使得每个空白存储单元在 保证存储数据可靠性的基础上得到充分的利用, 且健康等级至少包括三 级, 对空白存储单元进行精细化的分级, 通过这种方式, 能够提高存储 单元利用率, 提高存储装置的使用寿命和可靠性, 从而降低存储装置的 成本。 In summary, the health level of the blank storage unit in the embodiment of the present invention is at least three levels, because the health level of the blank storage unit is used to indicate that the blank storage unit stores different sizes of data on the basis of ensuring the reliability of the stored data. This allows each blank storage unit to be fully utilized on the basis of ensuring the reliability of the stored data, and the health level includes at least three levels, and the grading of the blank storage unit is refined, thereby improving the utilization of the storage unit. Improve the life and reliability of the storage device, thereby reducing the cost of the storage device.
参阅图 2, 图 2是本发明实施例提供的另一种存储数据的方法的流 程图, 本实施例和图 1的实施例基本相同, 相同之处请参见图 1和相应 的文字说明, 不同之处在于本实施例还包括步骤 S201 , 具体不同之处请 参见如下内容: Referring to FIG. 2, FIG. 2 is a flowchart of another method for storing data according to an embodiment of the present invention. This embodiment is basically the same as the embodiment of FIG. 1. For the similarities, please refer to FIG. 1 and corresponding text descriptions. The embodiment further includes step S201, and the specific differences are as follows:
步骤 S201 : 确定空白存储单元的健康等级。 Step S201: Determine a health level of the blank storage unit.
例如, 存储单元包括页、 块以及面。 根据实际应用情况可以将页、 块以及面划分为若干个健康等级, 具体的健康等级的数目可以根据实际 需要进行设置, 如: 将页一共划为 0至 -5共 6个健康等级, 健康品质依 次降低。 同理, 块与面的健康等级数目也可以参照页的划分情况进行划 分; 如: 可以将块内健康品质为最佳状态的页与块内页的总数的比例设 为 k, k>90%的块设置为健康块, 80%<k<90%的块设置为次健康块, 依 次类推, 可以根据实际情况确定块的健康等级的数目。 按照类似的方法 可以得到面的健康等级的划分规则和数目。 其中, 步骤 S201具体包括: 子步骤 S201a、 子步骤 S201b、 子步骤 S201c以及子步骤 S201d。For example, a storage unit includes pages, blocks, and faces. According to the actual application, the page, block and face can be divided into several health levels. The number of specific health levels can be set according to actual needs, such as: The page is divided into 0 to 5 total 6 health levels, health quality Decrease in turn. Similarly, the number of health levels of blocks and faces can also be divided according to the division of pages; for example: the ratio of the page with the best health quality in the block to the total number of pages in the block can be set to k, k>90% The block is set to a healthy block, 80% <k<90% of the block is set to the secondary health block, and so on, and the number of health levels of the block can be determined according to the actual situation. In a similar way, the rules and number of divisions of the health level of the face can be obtained. The step S201 specifically includes: a sub-step S201a, a sub-step S201b, a sub-step S201c, and a sub-step S201d.
子步骤 S201a: 记录空白存储单元的读状态参数 re^、 写状态参数 wv'te以及擦状态参数 erase三者中的一种或一种以上。 Sub-step S201a: One or more of the read state parameter re^, the write state parameter wv'te, and the erase state parameter erase of the blank storage unit are recorded.
空白存储单元在读、 写或擦操作后, 可以返回读、 写或擦各自的状 态参数 0或 1 , 可以分别代表读、 写或擦操作的成功或失败。 例如: 读 状态参数 re^、写状态参数 te以及擦状态参数 era 分别是 0、 0以及 1 , 表明该空白存储单元读成功、 写成功以及擦失败。 记录空白存储单元的 读状态参数、 写状态参数以及擦状态参数三者中任意一种或一种以上, 都可以用于确定空白存储单元的健康等级。 记录的状态参数越多, 对于 空白存储单元健康等级的精细化划分越有利。 After a read, write or erase operation, a blank memory location can return to read, write or erase its respective status parameter 0 or 1 to represent the success or failure of a read, write or erase operation, respectively. For example: The read status parameter re^, the write status parameter te, and the erase status parameter era are 0, 0, and 1, respectively, indicating that the blank memory unit has successfully read, successfully written, and erased. Any one or more of the read status parameter, the write status parameter, and the wipe status parameter of the blank memory unit can be used to determine the health level of the blank memory unit. The more state parameters are recorded, the better the fine-grained division of the health level of the blank storage unit.
子步骤 S201b: 获取空白存储单元所属的存储空间的健康等级。 如果空白存储单元是页, 则空白存储单元页所属的存储空间是块和 面,例如: 页所属的块的健康等级是 0级, 所属的面的健康等级是 -1级。 Sub-step S201b: Obtain the health level of the storage space to which the blank storage unit belongs. If the blank storage unit is a page, the storage space to which the blank storage unit page belongs is a block and a face, for example: the health level of the block to which the page belongs is level 0, and the health level of the associated face is -1 level.
子步骤 S201c: 根据空白存储单元的读状态参数、 写状态参数、 擦 状态参数三者中的一种或一种以上以及空白存储单元所属的存储单元 的健康等级, 计算空白存储单元的健康值。 Sub-step S201c: calculating the health value of the blank storage unit according to one or more of the read state parameter, the write state parameter, and the wipe state parameter of the blank storage unit and the health level of the storage unit to which the blank storage unit belongs .
空白存储单元的健康值是指在保证所存储数据可靠性的基础上存 储装置的空白存储单元实际能够存储的数据的大小。 The health value of the blank storage unit refers to the size of the data that the blank storage unit of the storage device can actually store on the basis of ensuring the reliability of the stored data.
例如, 在实际应用中一种计算空白存储单元的健康值的方法是: 以空白存储单元页为例, 计算当前空白存储单元页的健康值 For example, in a practical application, a method for calculating the health value of a blank storage unit is: Using a blank storage unit page as an example, calculating the health value of the current blank storage unit page
F(ecc, pe, read, write, erase, b, p) , 其中,F(ecc, pe, read, write, erase, b, p) , where
F(ecc, pe, read, write, erase, b, p) = α · ecc + β · pe + δ · read + ε · write F(ecc, pe, read, write, erase, b, p) = α · ecc + β · pe + δ · read + ε · write
+ η · erase + φ(ρ, p) + η · erase + φ(ρ, p)
φ{δ, ρ) = σ · δ + ω· ρ , ecc是指当前空白存储单元最近一次发生错误的 比特数, pe是指空白存储单元的擦写次数, 空白存储单元页所属的块和 面的健康等级 6和 p , 系数 是加权因子。 Φ{δ, ρ) = σ · δ + ω· ρ , ecc is the number of bits of the most recent error in the current blank memory cell, pe is the number of erases of the blank memory cell, and the block and face to which the blank memory cell page belongs. The health levels 6 and p, the coefficients are weighting factors.
在实际应用时, 可以结合存储装置的纠错能力、 PE Cycle等参数和 实际需求设置各个加权因子的权值和输入参数。 子步骤 S201d: 根据空白存储单元的健康值以及预设的健康等级门 限值, 确定空白存储单元的健康等级。In practical applications, the weights and input parameters of each weighting factor can be set in combination with the error correction capability of the storage device, the PE Cycle and other parameters and actual requirements. Sub-step S201d: determining the health level of the blank storage unit according to the health value of the blank storage unit and the preset health level threshold.
门限值也可以称为阔值或临界点。 健康等级门限值指示在保证所存 储的数据可靠性的基础上空白存储单元能够存储的数据的大小的门限 值。 例如页的第 0级和第 -1级的健康等级门限值分别是 15和 25。 Threshold values can also be referred to as thresholds or critical points. The health level threshold value indicates a threshold value of the size of data that the blank memory unit can store on the basis of ensuring the reliability of the stored data. For example, the health level thresholds for levels 0 and -1 of the page are 15 and 25, respectively.
比较空白存储单元的健康值和预设的健康等级门限值, 确定空白存 储单元的健康等级。 The health value of the blank storage unit and the preset health level threshold are compared to determine the health level of the blank storage unit.
例如: 页的健康等级则参照如下公式: For example: The health level of the page refers to the following formula:
ίθ, F(ecc, pe, read, write , erase, b, p)≤ AO Θθ, F(ecc, pe, read, write, erase, b, p) ≤ AO
-1, F(ecc, pe, read, write , erase, b, p) < Al -1, F(ecc, pe, read, write, erase, b, p) < Al
-2, F ecc,pe,read, write, erase ,δ,ρ)≤ A2 -2, F ecc,pe,read, write, erase ,δ,ρ)≤ A2
-3, F{ecc, pe, read, write, erase, b, p) < A3 -3, F{ecc, pe, read, write, erase, b, p) < A3
-4, F ecc,pe,read, write, erase ,δ,ρ)≤ A4 -4, F ecc,pe,read, write, erase ,δ,ρ)≤ A4
- 5, F{ecc, pe, read, write , ΙΛ ΙΛ erase, b, p) < A5 - 5, F{ecc, pe, read, write , ΙΛ ΙΛ erase, b, p) < A5
o o
O o O o
AO, A A2, A3, A4, A5是划分页的健康等级门限值 AO, A A2, A3, A4, A5 are the health level thresholds for the page
公司出厂配置的页的纠错能力ecc为 32bits, 那么ecc的加权因子可以设 置为 1;其它参数的加权因子设置为 0; 0,Α 2, 3, 4, ^分另 又 15, 25, 32, 50, 100, 150, 页的健康等级计算公式可等效为:The error correction capabilityeCC of the factory-configured page is 32 bits, then the weighting factor ofecc can be set to 1; the weighting factor of other parameters is set to 0; 0, Α 2, 3, 4, ^ and 15 25, 32 , 50, 100, 150, page health level calculation formula can be equivalent to:
0, F(ecc)≤\5 0, F(ecc)≤\5
-1, F(ecc) < 25 -1, F(ecc) < 25
-2, F(ecc)≤ 32 -2, F(ecc)≤ 32
-3, F(ecc) < 50 -3, F(ecc) < 50
-4, -4,
"5, "5,
通过上述方式, 根据空白存储单元的读写擦等使用状态, 及时地调 整空白存储单元的健康等级, 保证充分利用空白存储单元的同时, 也保 证所存储数据的可靠性。 In the above manner, the health level of the blank storage unit is adjusted in time according to the use state of the blank storage unit, such as reading and writing, so as to ensure that the reliability of the stored data is ensured while fully utilizing the blank storage unit.
在实际应用中, 可以使用存储单元健康状态表(如图 3所示) 的形 式存储空白存储单元的健康等级、 健康状态信息等等。 存储单元健康状 态表可以按照如下方式实现: 用表或数组索引形式来建立与存储装置内 所有空白存储单元的——对应关系, 各空白存储单元的健康等级则可以 用数字或字符串来表示, 具体釆用哪种实现方式本文不做任何限制, 这 点取决于存储装置使用的处理器和硬件架构。In practical applications, the health status, health status information, etc. of the blank storage unit may be stored in the form of a storage unit health status table (shown in FIG. 3). The storage unit health status table can be implemented as follows: a table or array index form is used to establish a correspondence with all blank storage units in the storage device, and the health level of each blank storage unit can be represented by a number or a string. The specific implementation of this article does not impose any restrictions, this The point depends on the processor and hardware architecture used by the storage device.
存储单元健康状态表的初始值一般在存储装置出厂时确定, 可以将 存储装置数据区的部分冗余空间用于保存初始状态值, 初始状态值可以 根据存储装置芯片品质进行设定, 也可以按照上述空白存储单元的健康 值的算法确定。 在存储装置通电后, 将上次掉电时的存储单元健康状态 表从数据区读到存储装置内存中; 存储装置运行过程中, 可以通过上述 空白存储单元的健康值的算法进行时时更新, 从而保证存储单元健康状 态表的时效性; 存储装置掉电时, 将存储单元健康状态表从内存中写到 存储装置数据区的冗余空间。 The initial value of the storage unit health status table is generally determined when the storage device is shipped, and a part of the redundant space of the storage device data area may be used to save the initial state value, and the initial state value may be set according to the quality of the storage device chip, or may be The algorithm of the health value of the above blank storage unit is determined. After the storage device is powered on, the storage unit health status table at the time of the last power failure is read from the data area into the storage device memory; during the operation of the storage device, the health value algorithm of the blank storage unit may be updated from time to time, thereby The timeliness of the storage unit health status table is guaranteed; when the storage device is powered off, the storage unit health status table is written from the memory to the redundant space of the storage device data area.
步骤 S202: 根据待存储数据的大小在存储装置中选择空白存储单 元。 本步骤的具体描述可以参见步骤 S101。 Step S202: Select a blank storage unit in the storage device according to the size of the data to be stored. For a detailed description of this step, refer to step S101.
步骤 S203:根据与空白存储单元的健康等级对应的编码方式对待存 储数据进行编码处理, 以获得数据的校验数据, 其中健康等级用于指示 空白存储单元在保证存储的数据可靠性的基础上能够存储的数据的大 小。 Step S203: Perform encoding processing on the data to be stored according to the coding mode corresponding to the health level of the blank storage unit, to obtain verification data of the data, where the health level is used to indicate that the blank storage unit can ensure the reliability of the stored data. The size of the stored data.
步骤 S204: 将数据以及校验数据存储在空白存储单元中。 Step S204: The data and the verification data are stored in a blank storage unit.
其中, 空白存储单元至少包括第一空白存储单元以及第二空白存储 单元, 其中第一空白存储单元的健康等级高于第二空白存储单元的健康 等级; 此时, 步骤 S204可以具体是: The blank storage unit includes at least a first blank storage unit and a second blank storage unit. The health level of the first blank storage unit is higher than the health level of the second blank storage unit. In this case, step S204 may be specifically:
将数据以及校验数据分别存储到第一空白存储单元以及第二空白 存储单元中, 且第一空白存储单元的校验区中存储有存储于第二空白存 储单元的数据区中数据的校验数据。 The data and the verification data are respectively stored in the first blank storage unit and the second blank storage unit, and the checksum of the data stored in the data area of the second blank storage unit is stored in the check area of the first blank storage unit. data.
本实现方式主要是通过组合健康等级高的空白存储单元和健康等 级低的空白存储单元来实现对数据的存储, 从而充分合理地利用存储单 元。 The present implementation mainly implements storage of data by combining a blank storage unit with a high health level and a blank storage unit with a low health level, thereby fully utilizing the storage unit.
例如: 参见图 4的健康等级不同的空白存储空间页的组合示意图, 每个空白存储单元页实际的存储空间为 8K+448Byte,页的组合方式共分 为 2步, 第一步: 将健康等级为 0的页与健康等级为 -1的页组合, 或者 将健康等级为 0的页与健康等级为 -2的页组合; 第二步: 将健康等级高 的页的部分校验数据区域用于存储健康等级低的校验数据, 具体分配区 域大小由页的实际存储空间决定, 在一实例中将健康等级高的页的For example: See Figure 4 for a combination of blank storage space pages with different health levels. The actual storage space of each blank storage unit page is 8K+448Byte. The combination of pages is divided into 2 steps. Step 1: Health level A page with 0 is combined with a page with a health rating of -1, or a page with a health rating of 0 is combined with a page with a health rating of -2; Step 2: A high health rating The partial check data area of the page is used to store the check data with low health level, and the specific allocation area size is determined by the actual storage space of the page, and in an example, the page with high health level is
224Byte 分配给健康等级低的页用于存储校验数据。 本实施例对不同健 康等级的页的组合方式不做任何限制, 例如: 可以全都使用健康等级最 好的页; 同理, 对于健康等级高的页分配多少字节给健康等级低的页也 不做任何限制, 只要保证数据可靠性即可。224Byte is assigned to a page with a low health level for storing checksum data. This embodiment does not impose any restrictions on the combination of pages of different health levels, for example: All pages with the best health level can be used; Similarly, how many bytes are allocated to pages with high health level to pages with low health level Make any restrictions, as long as the data reliability is guaranteed.
通过上述方式, 可以合理利用健康等级高的存储单元空余的校验数 据区域的空间,从而提高存储单元的利用率,提高存储装置的使用寿命, 降低存储装置的成本。 In the above manner, the space of the verification data area of the storage unit with high health level can be reasonably utilized, thereby improving the utilization ratio of the storage unit, improving the service life of the storage device, and reducing the cost of the storage device.
在实际应用中, 也可以将数据和校验数据分开存储, 参见图 5的页 存储空间分配示意图, 其中, Data表示数据区域, ECC表示校验数据区 域, 随着健康等级由 0到 -5的下降, 数据区域的大小变小, 校验数据区 域的大小变大。 In practical applications, the data and the check data may also be stored separately. See the page storage space allocation diagram of FIG. 5, where Data represents a data area, and ECC represents a check data area, with a health level ranging from 0 to -5. As the size of the data area decreases, the size of the check data area becomes larger.
总之, 本发明实施例由于空白存储单元的健康等级用于指示空白存 储单元在保证所存储的数据可靠性的基础上能够存储的数据的大小, 这 使得空白存储单元在保证存储的数据可靠性的基础上得到充分的利用, 且健康等级至少包括三级, 对空白存储单元进行精细化的分级, 通过这 种方式,能够提高存储单元利用率,提高存储装置的使用寿命和可靠性, 从而降低存储装置的成本。 In summary, the embodiment of the present invention uses the health level of the blank storage unit to indicate the size of data that the blank storage unit can store on the basis of ensuring the reliability of the stored data, which makes the blank storage unit ensure the reliability of the stored data. It is fully utilized on the basis, and the health level includes at least three levels, and the grading of the blank storage unit is refined. In this way, the utilization of the storage unit can be improved, the service life and reliability of the storage device can be improved, and the storage can be reduced. The cost of the device.
参阅图 6,图 6是本发明实施例提供的一种存储装置的结构示意图, 该存储装置的空白存储单元的健康等级至少分为三级, 该存储装置包 括: 选择模块 101、 处理模块 102以及存储模块 103。 Referring to FIG. 6 , FIG. 6 is a schematic structural diagram of a storage device according to an embodiment of the present invention. The health level of the blank storage unit of the storage device is at least three levels, and the storage device includes: a selection module 101, a processing module 102, and Storage module 103.
需要说明的是本实施例的存储装置可以执行图 1、 图 2中的步骤。 选择模块 101用于根据待存储数据的大小在存储装置中选择空白存 储单元。 It should be noted that the storage device of this embodiment can perform the steps in FIGS. 1 and 2. The selection module 101 is configured to select a blank storage unit in the storage device according to the size of the data to be stored.
本发明实施例的存储装置的主要功能是存储各种数据, 并能在计算 机运行过程中高速、 自动地完成数据的存取。 计算机的存储装置容量是 以字节为最小单位来计算的, 存储单元是指理论上能够存储一定数量字 节的存储空间, 空白存储单元是指未存储数据的空白的存储单元。 其中, 空白存储单元可以是下述存储单元中的至少一个: 页 Page、 块 Block或面 Plane„The main function of the storage device of the embodiment of the present invention is to store various data, and to complete data access at high speed and automatically during the running of the computer. The storage capacity of the computer is calculated in units of bytes. The storage unit refers to a storage space that can theoretically store a certain number of bytes, and the blank storage unit refers to a storage unit that does not store data. Wherein, the blank storage unit may be at least one of the following storage units: Page Page, Block Block or Face Plane
例如: NAND Flash芯片通常由一个内部寄存器和存储矩阵组成, 存储矩阵包括若干块, 每个块又包含若干页, 每个页包含若干字节; 每 种 NAND Flash芯片的存储矩阵大小定义不同,例如有一种 NAND Flash 以 8640个字节组成一个页, 256个页组成一个块, 2048个块组成一个 面, 2个面组成一个逻辑单元 LU ( Logical Unit ), 再由一个或者若干 逻辑单元组成整个闪存(Flash )存储装置。 在每页中前 8192个字节是 用于存储数据, 后 448个字节用于存放数据的校验码 ( Error Correction Code, ECC ), 即校验数据。 For example: A NAND Flash chip usually consists of an internal register and a memory matrix. The memory matrix consists of several blocks, each block containing several pages, each page containing several bytes. The storage matrix size of each NAND Flash chip is defined differently, for example. There is a NAND Flash that makes a page with 8640 bytes, 256 pages form a block, 2048 blocks form a face, 2 faces form a logical unit LU (Logical Unit), and then one or several logical units make up the entire flash memory. (Flash) storage device. The first 8192 bytes in each page are used to store data, and the last 448 bytes are used to store the Data Error Correction Code (ECC), which is the check data.
随着存储装置的反复使用, 特别是擦和写的反复使用, 存储装置在 保证所存储数据可靠性的基础上实际能够存储的数据的大小在不断地 下降, 所谓存储数据的可靠性是指写入存储装置中的数据和从存储装置 中读出的数据是一致的, 没有错误。 例如, 对存储装置的同一个存储单 元, 在第一次使用时, 它能够存储的数据的大小基本和理论上能够存储 的数据的大小相同, 也可以保证所存储数据的可靠性, 存储同样大小的 数据, 需要很少的校验数据或者根本不需要校验数据; 随着擦写次数的 增多, 写入存储装置时发生错误的比特数增加, 此时为了保证所存储数 据的可靠性, 需要增加校验数据, 校验数据占据的空间也增加, 数据占 据的空间自然减少, 所以该存储单元在保证所存储数据的可靠性的基础 上实际能够存储的数据减小。 With the repeated use of the storage device, especially the repeated use of erasing and writing, the size of the data that the storage device can actually store on the basis of ensuring the reliability of the stored data is continuously decreasing, and the reliability of the so-called stored data refers to writing. The data entered into the storage device is identical to the data read from the storage device, with no errors. For example, for the same storage unit of the storage device, when it is used for the first time, the size of the data that can be stored is basically the same as the size of the data that can theoretically be stored, and the reliability of the stored data can be ensured, and the same size can be stored. The data requires little or no verification data. As the number of erasures increases, the number of errors that occur when writing to the storage device increases. In order to ensure the reliability of the stored data, When the check data is increased, the space occupied by the check data is also increased, and the space occupied by the data is naturally reduced. Therefore, the storage unit can actually reduce the data that can be stored on the basis of ensuring the reliability of the stored data.
空白存储单元的健康等级可以指示空白存储单元在保证所存储的 数据可靠性的基础上能够存储的数据的大小。 因此, 不同健康等级的空 白存储单元在保证所存储的数据可靠性的基础上能够存储的数据的大 小是不一样的; 在保证所存储数据可靠性的基础上, 健康等级高的空白 存储单元能够存储的数据多, 健康等级低的空白存储单元能够存储的数 据少。 The health level of the blank storage unit may indicate the size of the data that the blank storage unit can store based on the reliability of the stored data. Therefore, the blank storage units of different health levels can store different amounts of data on the basis of ensuring the reliability of the stored data; on the basis of ensuring the reliability of the stored data, the blank storage unit with high health level can There are many stored data, and a blank storage unit with a low health level can store less data.
空白存储单元的健康等级的数目至少包括三级, 可以实现对存储装 置的空白存储单元的精细化划分, 合理且充分地利用空白存储单元。 根据待存储数据的大小即可选择空白存储单元, 以使得空白存储单 元的存储空间的大小能够存储待存储数据。The number of health levels of the blank storage unit includes at least three levels, and fine division of the blank storage unit of the storage device can be realized, and the blank storage unit can be utilized reasonably and fully. The blank storage unit can be selected according to the size of the data to be stored, so that the storage space of the blank storage unit can store the data to be stored.
处理模块 102用于根据与空白存储单元的健康等级对应的编码方式 对待存储数据进行编码处理, 以获得数据的校验数据, 其中健康等级用 于指示空白存储单元在保证存储的数据可靠性的基础上能够存储的数 据的大小。 The processing module 102 is configured to perform encoding processing on the data to be stored according to an encoding manner corresponding to the health level of the blank storage unit, to obtain verification data of the data, where the health level is used to indicate the basis of the reliability of the blank storage unit in ensuring the stored data. The size of the data that can be stored.
在选择空白存储单元后, 根据空白存储单元的健康等级, 选择与该 空白存储单元的健康等级对应的编码方法, 对待存储数据进行编码处 理, 以获得所述数据的校验数据。 After the blank storage unit is selected, according to the health level of the blank storage unit, an encoding method corresponding to the health level of the blank storage unit is selected, and the stored data is subjected to encoding processing to obtain verification data of the data.
存储模块 103用于将数据以及校验数据存储在空白存储单元中。 在将数据以及校验数据存储到空白存储单元时, 有两种方式可以选 择: 第一种是在空白存储单元中将数据和校验数据分开存储, 例如前面 存储数据, 后面存储校验数据; 第二种是在空白存储单元中将数据和校 验数据混合存储, 即不区分哪些是数据, 哪些是校验数据, 将数据和校 验数据混合在一起进行存储。 The storage module 103 is configured to store data and verification data in a blank storage unit. When storing data and verification data to a blank storage unit, there are two ways to choose: The first is to store the data and the verification data separately in a blank storage unit, such as storing the data in the front, and then storing the verification data; The second is to store the data and the check data in a blank storage unit, that is, to distinguish which data is the data, which is the check data, and the data and the check data are mixed and stored.
总之, 本发明实施例用于空白存储单元的健康等级至少分为三级, 由于空白存储单元的健康等级用于指示空白存储单元在保证所存储的 数据可靠性的基础上存储不同大小的数据, 这使得每个空白存储单元在 保证存储数据可靠性的基础上得到充分的利用, 且健康等级至少包括三 级, 对空白存储单元进行精细化的分级, 通过这种方式, 能够提高存储 单元利用率, 提高存储装置的使用寿命和可靠性, 从而降低存储装置的 成本。 In summary, the health level of the blank storage unit in the embodiment of the present invention is at least three levels, because the health level of the blank storage unit is used to indicate that the blank storage unit stores different sizes of data on the basis of ensuring the reliability of the stored data. This allows each blank storage unit to be fully utilized on the basis of ensuring the reliability of the stored data, and the health level includes at least three levels, and the grading of the blank storage unit is refined, thereby improving the utilization of the storage unit. Improve the life and reliability of the storage device, thereby reducing the cost of the storage device.
参阅图 7 , 图 7是本发明实施例提供的另一种存储装置的结构示意 图, 本实施例和图 6的实施例基本相同, 相同之处请参见图 6和相应的 文字说明, 不同之处在于本实施例还包括确定模块 201 , 具体不同之处 请参见如下内容: Referring to FIG. 7, FIG. 7 is a schematic structural diagram of another storage device according to an embodiment of the present invention. This embodiment is basically the same as the embodiment of FIG. 6. For the similarities, refer to FIG. 6 and corresponding text descriptions. In this embodiment, the determining module 201 is further included, and the specific differences are as follows:
该存储装置包括: 选择模块 201、 处理模块 202、 存储模块 203以 及确定模块 204。 The storage device includes: a selection module 201, a processing module 202, a storage module 203, and a determination module 204.
需要说明的是, 本实施例的存储装置可以执行图 2中的步骤。 确定模块 204用于确定所述空白存储单元的健康等级。It should be noted that the storage device of this embodiment can perform the steps in FIG. 2. The determining module 204 is configured to determine a health level of the blank storage unit.
例如, 存储装置空白存储单元包括页、 块以及面。 根据实际应用情 况可以将页、 块以及面划分为若干个健康等级, 具体的健康等级的数目 可以根据实际需要进行设置。 For example, a storage device blank storage unit includes pages, blocks, and faces. According to the actual application, pages, blocks and faces can be divided into several health levels. The number of specific health levels can be set according to actual needs.
其中, 确定模块 204 包括: 记录单元 2041、 获取单元 2042、 计算 单元 2043以及确定单元 2044。 The determining module 204 includes: a recording unit 2041, an obtaining unit 2042, a calculating unit 2043, and a determining unit 2044.
记录单元 2041 用于记录空白存储单元读状态参数、 写状态参数以 及擦状态参数三者中的一种或一种以上。 The recording unit 2041 is configured to record one or more of a blank storage unit read status parameter, a write status parameter, and a wipe status parameter.
空白存储单元在读写擦操作后,返回读写擦各自的状态参数 0或 1 , 可以分别代表读写擦成功或读写擦失败。 记录空白存储单元的读状态参 数、 写状态参数以及擦状态参数三者中任意一种或一种以上, 都可以用 于确定空白存储单元的健康等级。 记录的状态参数越多, 对于空白存储 单元健康等级的精细化划分越有利。 After the read/write erase operation, the blank storage unit returns to read and write each state parameter 0 or 1, which can represent the success of the read/write erase or the read/write erase failure. Any one or more of the read status parameter, the write status parameter, and the wipe status parameter of the blank memory unit can be used to determine the health level of the blank memory unit. The more state parameters recorded, the better the fine-grained partitioning of the blank storage unit health level.
获取单元 2042用于获取空白存储单元所属的存储空间的健康等级。 例如: 空白存储单元页所属的块的健康等级是 0级, 所属的面的健康等 级是 -1级。 The obtaining unit 2042 is configured to acquire the health level of the storage space to which the blank storage unit belongs. For example: The health level of the block to which the blank storage unit page belongs is level 0, and the health level of the associated face is -1 level.
计算单元 2043用于根据空白存储单元的读状态参数、 写状态参数、 擦状态参数三者中的一种或一种以上以及空白存储单元所属的存储单 元的健康等级, 计算空白存储单元的健康值。 The calculating unit 2043 is configured to calculate the health of the blank storage unit according to one or more of the read state parameter, the write state parameter, the wipe state parameter of the blank storage unit, and the health level of the storage unit to which the blank storage unit belongs. value.
空白存储单元的健康值是指在保证所存储数据可靠性的基础上存 储装置的空白存储单元实际能够存储的数据的大小。 The health value of the blank storage unit refers to the size of the data that the blank storage unit of the storage device can actually store on the basis of ensuring the reliability of the stored data.
例如, 在实际应用中一种计算空白存储单元的健康值的方法是: 以空白存储单元页为例, 计算当前空白存储单元页的健康值 F(ecc, pe, read, write, erase, b, p) , 其中, For example, in a practical application, a method for calculating the health value of a blank storage unit is: using a blank storage unit page as an example, calculating a health value F (ecc, pe, read, write, erase, b, of the current blank storage unit page, p) , where,
F(ecc, pe, read, write, erase, b, p) = α · ecc + β · pe + δ · read + ε · write F(ecc, pe, read, write, erase, b, p) = α · ecc + β · pe + δ · read + ε · write
+ η · erase + φ(ρ, p) + η · erase + φ(ρ, p)
φ{δ, ρ) = σ · δ + ω· ρ , ecc是指当前空白存储单元最近一次发生错误的 比特数, pe是指空白存储单元的擦写次数, 空白存储单元页所属的块和 面的健康等级 6和 p , 系数 是加权因子。 在实际应用时, 可以结合存储装置的纠错能力、 PE Cycle等参数和 实际需求设置各个加权因子的权值和输入参数。φ{δ, ρ) = σ · δ + ω· ρ , ecc is the number of bits of the most recent error in the current blank memory cell, pe is the number of erases of the blank memory cell, and the block and face to which the blank memory cell page belongs. The health levels 6 and p, the coefficients are weighting factors. In practical applications, the weights and input parameters of each weighting factor can be set in combination with the error correction capability of the storage device, the PE Cycle and other parameters and actual requirements.
确定单元 2044 用于根据空白存储单元的健康值以及预设的健康等 级门限值, 确定空白存储单元的健康等级。 The determining unit 2044 is configured to determine the health level of the blank storage unit according to the health value of the blank storage unit and the preset health level threshold.
门限值也就是阔值, 临界点。 健康等级门限值指示在保证所存储的 数据可靠性的基础上空白存储单元能够存储的数据的大小的门限值。 The threshold is also the threshold, the critical point. The health level threshold value indicates a threshold value of the size of data that the blank storage unit can store based on the reliability of the stored data.
比较空白存储单元的健康值和预设的健康等级门限值, 确定空白存 储单元的健康等级。 The health value of the blank storage unit and the preset health level threshold are compared to determine the health level of the blank storage unit.
通过上述方式, 根据空白存储单元的读写擦等使用状态, 及时地调 整空白存储单元的健康等级, 保证充分利用空白存储单元的同时, 也保 证所存储数据的可靠性。 In the above manner, the health level of the blank storage unit is adjusted in time according to the use state of the blank storage unit, such as reading and writing, so as to ensure that the reliability of the stored data is ensured while fully utilizing the blank storage unit.
选择模块 201用于根据待存储数据的大小在存储装置中选择空白存 储单元。 The selection module 201 is configured to select a blank storage unit in the storage device according to the size of the data to be stored.
处理模块 202用于根据与空白存储单元的健康等级对应的编码方式 对待存储数据进行编码处理, 以获得数据的校验数据, 其中健康等级用 于指示空白存储单元在保证存储的数据可靠性的基础上能够存储的数 据的大小。 The processing module 202 is configured to perform encoding processing on the data to be stored according to an encoding manner corresponding to a health level of the blank storage unit, to obtain verification data of the data, where the health level is used to indicate the basis of the reliability of the blank storage unit in ensuring the stored data. The size of the data that can be stored.
存储模块 203用于将数据以及校验数据存储在空白存储单元中。 空白存储单元至少包括第一空白存储单元以及第二空白存储单元, 其中第一空白存储单元的健康等级高于第二空白存储单元的健康等级; 储单元以及第二空白存储单元中, 且第一空白存储单元的校验区中存储 有存储于第二空白存储单元的数据区中数据的校验数据。 The storage module 203 is for storing data and verification data in a blank storage unit. The blank storage unit includes at least a first blank storage unit and a second blank storage unit, wherein the first blank storage unit has a higher health level than the second blank storage unit; the storage unit and the second blank storage unit, and the first The verification data of the data stored in the data area of the second blank storage unit is stored in the check area of the blank storage unit.
通过上述方式, 可以合理利用健康等级高的存储单元空余的校验数 据区域的空间,从而提高存储单元的利用率,提高存储装置的使用寿命, 降低存储装置的成本。 In the above manner, the space of the verification data area of the storage unit with high health level can be reasonably utilized, thereby improving the utilization ratio of the storage unit, improving the service life of the storage device, and reducing the cost of the storage device.
总之, 本发明实施例由于空白存储单元的健康等级用于指示空白存 储单元在保证所存储的数据可靠性的基础上能够存储的数据的大小, 这 使得空白存储单元在保证存储的数据可靠性的基础上得到充分的利用, 且健康等级至少包括三级, 对空白存储单元进行精细化的分级, 通过这 种方式,能够提高存储单元利用率,提高存储装置的使用寿命和可靠性, 从而降低存储装置的成本。In summary, the embodiment of the present invention uses the health level of the blank storage unit to indicate the size of data that the blank storage unit can store on the basis of ensuring the reliability of the stored data, which makes the blank storage unit ensure the reliability of the stored data. Make full use on the basis, And the health level includes at least three levels, and the grading of the blank storage unit is refined. In this way, the utilization of the storage unit can be improved, the service life and reliability of the storage device can be improved, and the cost of the storage device can be reduced.
参阅图 8, 图 8是本发明提供的一种存储装置的物理结构示意图, 该存储装置可以是具有 Flash芯片的固态硬盘、 U盘或手机等等, 在此 并不做特别限定。 如图 8所示, 所述存储装置 40包括: Referring to FIG. 8, FIG. 8 is a schematic diagram of a physical structure of a storage device provided by the present invention. The storage device may be a solid state hard disk having a Flash chip, a USB flash drive or a mobile phone, etc., and is not particularly limited herein. As shown in FIG. 8, the storage device 40 includes:
处理器(processor ) 410, 存储器(memory ) 420, 通信总线 430。 处理器 410和存储器 420通过通信总线 430完成相互间的通信。 处理器 410 , 用于执行程序 432, 具体可以执行上述图 1、 图 2所示 的方法实施例中的相关步骤。 A processor 410, a memory 420, and a communication bus 430. The processor 410 and the memory 420 communicate with each other via the communication bus 430. The processor 410 is configured to execute the program 432, and specifically, the related steps in the method embodiment shown in FIG. 1 and FIG. 2 above may be performed.
具体地, 程序 432可以包括程序代码, 所述程序代码包括计算机操 作指令。 In particular, program 432 can include program code, the program code including computer operating instructions.
处理器 410可能是一个中央处理器 CPU,或者是特定集成电路 ASIC ( Application Specific Integrated Circuit ), 或者是被配置成实施本发明实 施例的一个或多个集成电路。 Processor 410 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
存储器 420, 用于存放程序 432。 存储器 420可能包含高速 RAM存 储器, 也可能还包括非易失性存储器 (non-volatile memory ), 例如至少 一个磁盘存储器。 The memory 420 is configured to store the program 432. Memory 420 may include high speed RAM memory and may also include non-volatile memory, such as at least one disk memory.
程序 432中各功能模块的具体实现可以参见上述图 5至图 6所示实 施例中的相应模块和单元, 在此不再赘述。 For the specific implementation of each function module in the program 432, reference may be made to the corresponding modules and units in the embodiments shown in FIG. 5 to FIG. 6 , and details are not described herein again.
总之, 本发明实施例由于空白存储单元的健康等级用于指示空白存 储单元在保证所存储的数据可靠性的基础上能够存储的数据的大小, 这 使得每个空白存储单元在保证存储的数据可靠性的基础上得到充分的 利用, 且健康等级至少包括三级, 对空白存储单元进行精细化的分级, 通过这种方式, 能够提高存储单元利用率, 提高存储装置的使用寿命和 可靠性, 从而降低存储装置的成本。 In summary, the embodiment of the present invention uses the health level of the blank storage unit to indicate the size of data that the blank storage unit can store on the basis of ensuring the reliability of the stored data, which makes each blank storage unit reliable in ensuring stored data. Fully utilized on the basis of sex, and the health level includes at least three levels, and the grading of the blank storage unit is refined. In this way, the utilization of the storage unit can be improved, and the service life and reliability of the storage device can be improved. Reduce the cost of storage devices.
在本发明所提供的几个实施方式或实施例中, 应该理解到, 所揭露 的系统, 装置和方法, 可以通过其它的方式实现。 例如, 以上所描述的 装置实施方式或实施例仅仅是示意性的,例如,所述模块或单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可以有另外的划分方式, 例如多 个单元或组件可以结合或者可以集成到另一个系统, 或一些特征可以忽 略, 或不执行。 另一点, 所显示或讨论的相互之间的耦合或直接耦合或 通信连接可以是通过一些接口, 装置或单元的间接耦合或通信连接, 可 以是电性, 机械或其它的形式。 的, 作为单元显示的部件可以是或者也可以不是物理单元, 即可以位于 一个地方, 或者也可以分布到多个网络单元上。 可以根据实际的需要选 择其中的部分或者全部单元来实现本实施方式方案的目的。In the several embodiments or embodiments provided by the present invention, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments or embodiments described above are merely illustrative, such as the division of the modules or units, For the division of only one logical function, the actual implementation may have another division manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form. The components displayed as the unit may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
另外, 在本发明各个实施方式或实施例中的各功能单元可以集成在 一个处理单元中, 也可以是各个单元单独物理存在, 也可以两个或两个 以上单元集成在一个单元中。 上述集成的单元既可以釆用硬件的形式实 现, 也可以釆用软件功能单元的形式实现。 In addition, each functional unit in each embodiment or embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产 品销售或使用时, 可以存储在一个计算机可读取存储介质中。 基于这样 的理解, 本发明的技术方案本质上或者说对现有技术做出贡献的部分或 者该技术方案的全部或部分可以以软件产品的形式体现出来, 该计算机 软件产品存储在一个存储介质中, 包括若干指令用以使得一台计算机设 备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor ) 的存储介质包括: U盘、 移动硬盘、 只读存储装置 (ROM, Read-Only Memory ). 随机存取存储装置 ( RAM, Random Access Memory ). 磁碟 或者光盘等各种可以存储程序代码的介质。 The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. The storage medium including a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor includes: a USB flash drive, a removable hard disk, a read only storage device (ROM, Read- Only Memory ). Random Access Memory (RAM). A variety of media that can store program code, such as a disk or an optical disk.
以上所述仅为本发明的实施方式, 并非因此限制本发明的专利范 围, 凡是利用本发明说明书及附图内容所作的等效结构或等效流程变 换, 或直接或间接运用在其他相关的技术领域, 均同理包括在本发明的 专利保护范围内。 The above description is only the embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformation using the specification and the drawings of the present invention may be directly or indirectly applied to other related technologies. The scope of the invention is included in the scope of patent protection of the present invention.

Claims

权 利 要 求 书 Claim
1.一种存储数据的方法, 其特征在于, 所述方法用于空白存储单元 的健康等级至少分为三级的存储装置, 所述方法包括:A method for storing data, wherein the method is used for a storage device in which a health level of a blank storage unit is at least three levels, and the method includes:
根据待存储数据的大小在存储装置中选择空白存储单元; 根据与所述空白存储单元的健康等级对应的编码方式对所述待存 储数据进行编码处理, 以获得所述数据的校验数据, 其中所述健康等级 用于指示所述空白存储单元在保证存储的数据可靠性的基础上能够存 储的数据的大小; Selecting a blank storage unit in the storage device according to the size of the data to be stored; encoding the data to be stored according to an encoding manner corresponding to the health level of the blank storage unit, to obtain verification data of the data, where The health level is used to indicate a size of data that the blank storage unit can store on the basis of ensuring reliability of stored data;
将所述数据以及所述校验数据存储在所述空白存储单元中。 The data and the verification data are stored in the blank storage unit.
2.根据权利要求 1所述的方法, 其特征在于, 所述空白存储单元至 少包括第一空白存储单元以及第二空白存储单元, 其中所述第一空白存 储单元的健康等级高于所述第二空白存储单元的健康等级; The method according to claim 1, wherein the blank storage unit comprises at least a first blank storage unit and a second blank storage unit, wherein the first blank storage unit has a higher health level than the first The health level of the two blank storage units;
所述将所述数据以及所述校验数据存储在所述空白存储单元中包 括: The storing the data and the verification data in the blank storage unit includes:
将所述数据以及所述校验数据分别存储到第一空白存储单元以及 第二空白存储单元中, 且所述第一空白存储单元的校验区中存储有存储 于第二空白存储单元的数据区中数据的校验数据。 The data and the check data are respectively stored in the first blank storage unit and the second blank storage unit, and the data stored in the second blank storage unit is stored in the check area of the first blank storage unit. The verification data of the data in the area.
3.根据权利要求 1或 2所述的方法, 其特征在于, 所述根据待存储 数据的大小在存储装置中选择空白存储单元的步骤之前, 还包括: 确定所述空白存储单元的健康等级。 The method according to claim 1 or 2, wherein before the step of selecting a blank storage unit in the storage device according to the size of the data to be stored, the method further comprises: determining a health level of the blank storage unit.
4.根据权利要求 3所述的方法, 其特征在于, 所述确定所述空白存 储单元的健康等级包括: The method according to claim 3, wherein the determining the health level of the blank storage unit comprises:
记录所述空白存储单元的读状态参数、 写状态参数以及擦状态参数 三者中的一种或一种以上; Recording one or more of a read status parameter, a write status parameter, and an erase status parameter of the blank storage unit;
获取所述空白存储单元所属的存储空间的健康等级; Obtaining a health level of the storage space to which the blank storage unit belongs;
根据所述空白存储单元的读状态参数、 写状态参数、 擦状态参数三 者中的一种或一种以上以及所述空白存储单元所属的存储单元的健康 等级, 计算所述空白存储单元的健康值; 根据所述空白存储单元的健康值以及预设的健康等级门限值, 确定 所述空白存储单元的健康等级。Calculating the blank storage unit according to one or more of a read status parameter, a write status parameter, and an erase status parameter of the blank storage unit and a health level of the storage unit to which the blank storage unit belongs Health value Determining a health level of the blank storage unit according to a health value of the blank storage unit and a preset health level threshold.
5.根据权利要求 1至 4任一项所述的方法, 其特征在于, 所述空白 存储单元包括下述存储单元中的至少一个:页 Page、块 Block或面 Plane。 The method according to any one of claims 1 to 4, wherein the blank storage unit comprises at least one of the following storage units: a page block, a block block or an area Plane.
6.—种存储装置, 其特征在于, 所述存储装置的空白存储单元的健 康等级至少分为三级, 所述存储装置包括: A storage device, wherein the storage unit has a health level of at least three levels, and the storage device includes:
选择模块, 用于根据待存储数据的大小在存储装置中选择空白存储 单元; a selection module, configured to select a blank storage unit in the storage device according to the size of the data to be stored;
处理模块, 用于根据与所述空白存储单元的健康等级对应的编码方 式对所述待存储数据进行编码处理, 以获得所述数据的校验数据, 其中 所述健康等级用于指示所述空白存储单元在保证存储的数据可靠性的 基础上能够存储的数据的大小; a processing module, configured to perform encoding processing on the data to be stored according to an encoding manner corresponding to a health level of the blank storage unit, to obtain verification data of the data, where the health level is used to indicate the blank The size of the data that the storage unit can store on the basis of ensuring the reliability of the stored data;
存储模块, 用于将所述数据以及所述校验数据存储在所述空白存储 单元中。 And a storage module, configured to store the data and the verification data in the blank storage unit.
7.根据权利要求 6所述的存储装置, 其特征在于, 所述空白存储单 元至少包括第一空白存储单元以及第二空白存储单元, 其中所述第一空 白存储单元的健康等级高于所述第二空白存储单元的健康等级; 第一空白存储单元以及第二空白存储单元中, 且所述第一空白存储单元 的校验区中存储有存储于第二空白存储单元的数据区中数据的校验数 据。 The storage device according to claim 6, wherein the blank storage unit comprises at least a first blank storage unit and a second blank storage unit, wherein a health level of the first blank storage unit is higher than the a health level of the second blank storage unit; the first blank storage unit and the second blank storage unit, and the data stored in the data area of the second blank storage unit is stored in the check area of the first blank storage unit Verify the data.
8.根据权利要求 6或 7所述的存储装置, 其特征在于, 所述存储装 置还包括确定模块, 所述确定模块用于确定所述空白存储单元的健康等 级。 The storage device according to claim 6 or 7, wherein the storage device further comprises a determining module, wherein the determining module is configured to determine a health level of the blank storage unit.
9.根据权利要求 8所述的存储装置, 其特征在于, 所述确定模块包 括: The storage device according to claim 8, wherein the determining module comprises:
记录单元, 用于记录所述空白存储单元的读状态参数、 写状态参数 以及擦状态参数三者中的一种或一种以上; a recording unit, configured to record one or more of a read status parameter, a write status parameter, and a wipe status parameter of the blank storage unit;
获取单元, 用于获取所述空白存储单元所属的存储空间的健康等 级;An obtaining unit, configured to acquire health of a storage space to which the blank storage unit belongs, and the like Level
计算单元,用于根据所述空白存储单元的读状态参数、写状态参数、 擦状态参数三者中的一种或一种以上以及所述空白存储单元所属的存 储单元的健康等级, 计算所述空白存储单元的健康值; a calculating unit, configured to calculate, according to one or more of a read state parameter, a write state parameter, and an erase state parameter of the blank storage unit, and a health level of the storage unit to which the blank storage unit belongs Describe the health value of the blank storage unit;
确定单元, 用于根据所述空白存储单元的健康值以及预设的健康等 级门限值, 确定所述空白存储单元的健康等级。 And a determining unit, configured to determine a health level of the blank storage unit according to a health value of the blank storage unit and a preset health level threshold.
10.根据权利要求 6至 9任一项所述的存储装置, 其特征在于, 所述 空白存储单元包括下述存储单元中的至少一个: 页 page、 块 block或面 plane。 The storage device according to any one of claims 6 to 9, wherein the blank storage unit comprises at least one of the following storage units: a page page, a block block or a plane plane.
PCT/CN2014/0845952013-12-242014-08-18Method for data storage and storage deviceWO2015096496A1 (en)

Applications Claiming Priority (2)

Application NumberPriority DateFiling DateTitle
CN201310724078.32013-12-24
CN201310724078.3ACN103713857B (en)2013-12-242013-12-24 Method and storage device for storing data

Publications (1)

Publication NumberPublication Date
WO2015096496A1true WO2015096496A1 (en)2015-07-02

Family

ID=50406872

Family Applications (1)

Application NumberTitlePriority DateFiling Date
PCT/CN2014/084595WO2015096496A1 (en)2013-12-242014-08-18Method for data storage and storage device

Country Status (2)

CountryLink
CN (1)CN103713857B (en)
WO (1)WO2015096496A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103713857B (en)*2013-12-242017-06-27华为技术有限公司 Method and storage device for storing data
CN105159602B (en)*2015-08-032019-04-09北京联想核芯科技有限公司Data processing method and storage equipment
CN105224254B (en)*2015-09-292019-01-22北京联想核芯科技有限公司A kind of data processing method and electronic equipment
CN105892946A (en)*2016-03-302016-08-24联想(北京)有限公司Data storage method and electronic equipment
CN106775481B (en)*2016-12-232019-11-05华为技术有限公司Method for reading data and equipment
CN110401582B (en)*2019-08-232020-11-10苏州浪潮智能科技有限公司 Detection method, device and storage medium for storage health distress of cloud computing system
CN117742614B (en)*2023-12-292024-06-18深圳市安信达存储技术有限公司Method for combining RIAD arrays of flash memory in chip

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102722340A (en)*2012-04-272012-10-10华为技术有限公司Data processing method, apparatus and system
CN103713857A (en)*2013-12-242014-04-09华为技术有限公司Data storage method and storage device
US20140157078A1 (en)*2012-12-032014-06-05Western Digital Technologies, Inc.Methods, solid state drive controllers and data storage devices having a runtime variable raid protection scheme

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US5404485A (en)*1993-03-081995-04-04M-Systems Flash Disk Pioneers Ltd.Flash file system
US7512847B2 (en)*2006-02-102009-03-31Sandisk Il Ltd.Method for estimating and reporting the life expectancy of flash-disk memory
US8261158B2 (en)*2009-03-132012-09-04Fusion-Io, Inc.Apparatus, system, and method for using multi-level cell solid-state storage as single level cell solid-state storage

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102722340A (en)*2012-04-272012-10-10华为技术有限公司Data processing method, apparatus and system
US20140157078A1 (en)*2012-12-032014-06-05Western Digital Technologies, Inc.Methods, solid state drive controllers and data storage devices having a runtime variable raid protection scheme
CN103713857A (en)*2013-12-242014-04-09华为技术有限公司Data storage method and storage device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LUAN, ZHIBIN: "Solid State Hard Disk Based on TrueFFS Theory Applied in Correspondence Domain", MASTER DEGREE DISSERTATIONS OF JILIN UNIVERSITY, 31 December 2006 (2006-12-31), pages 42 - 47*

Also Published As

Publication numberPublication date
CN103713857B (en)2017-06-27
CN103713857A (en)2014-04-09

Similar Documents

PublicationPublication DateTitle
US10713178B2 (en)Mapping table updating method, memory controlling circuit unit and memory storage device
CN103348330B (en)dynamic higher-level redundancy mode management with independent silicon elements
JP6285709B2 (en) Program failure recovery of non-volatile memory by redundant array
US10310739B2 (en)Memory management method, memory control circuit unit and memory storage device
KR102101650B1 (en)Mixed granularity higher-level redundancy for non-volatile memory
KR101564569B1 (en)Higher-level redundancy information computation
WO2015096496A1 (en)Method for data storage and storage device
US20150349805A1 (en)Method of Handling Error Correcting Code in Non-volatile Memory and Non-volatile Storage Device Using the Same
CN104866429B (en)Memory management method, memory control circuit unit and memory storage device
CN104765569B (en)Data writing method, memory control circuit unit and memory storage device
US9812194B1 (en)Decoding method, memory storage device and memory control circuit unit
US11169873B2 (en)Method and system for extending lifespan and enhancing throughput in a high-density solid state drive
US9778862B2 (en)Data storing method for preventing data losing during flush operation, memory control circuit unit and memory storage apparatus
CN116954491A (en)Method of operation for a memory controller and memory system including a memory controller
CN101308706B (en) Data writing method and error correction encoding/decoding method suitable for flash memory
CN109273033B (en)Memory management method, memory control circuit unit and memory storage device
CN109669620A (en)Storage management method, memorizer control circuit unit and memorizer memory devices
TWI763310B (en)Memory control method, memory storage device and memory control circuit unit
CN111143253A (en) Data storage method, memory control circuit unit, and memory storage device
CN115454346A (en)SSD RAID optimization method, device, equipment and storage medium
CN107643876A (en)Storage management method, memory storage apparatus and memorizer control circuit unit
CN117762347A (en)Cross-cell encoding method and memory storage device
CN117785545A (en)Decoding method, memory storage device and memory control circuit unit
CN117912522A (en) Decoding parameter updating method, storage device and memory control circuit
CN112445416A (en)Cold region judgment method, memory control circuit unit and memory storage device

Legal Events

DateCodeTitleDescription
121Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number:14873400

Country of ref document:EP

Kind code of ref document:A1

NENPNon-entry into the national phase

Ref country code:DE

122Ep: pct application non-entry in european phase

Ref document number:14873400

Country of ref document:EP

Kind code of ref document:A1


[8]ページ先頭

©2009-2025 Movatter.jp