[go: up one dir, main page]

CN101493794B - Flash memory data processing method and device - Google Patents

Flash memory data processing method and device Download PDF

Info

Publication number
CN101493794B
CN101493794B CN2009100055431A CN200910005543A CN101493794B CN 101493794 B CN101493794 B CN 101493794B CN 2009100055431 A CN2009100055431 A CN 2009100055431A CN 200910005543 A CN200910005543 A CN 200910005543A CN 101493794 B CN101493794 B CN 101493794B
Authority
CN
China
Prior art keywords
data
page
block
preset
level
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
CN2009100055431A
Other languages
Chinese (zh)
Other versions
CN101493794A (en
Inventor
张宗全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Huawei Technology Co Ltd
Original Assignee
Huawei Symantec Technologies Co Ltd
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 Huawei Symantec Technologies Co Ltd filed Critical Huawei Symantec Technologies Co Ltd
Priority to CN2009100055431A priority Critical patent/CN101493794B/en
Publication of CN101493794A publication Critical patent/CN101493794A/en
Application granted granted Critical
Publication of CN101493794B publication Critical patent/CN101493794B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例公开了一种闪存数据处理方法及装置,用于提高随机写入性能。本发明实施例方法包括:根据获取到的目标数据查询待更新的源数据;将所述目标数据写入预置空白数据块的第一数据页中,将所述源数据所在的数据页标注为无效页;将预置的页级逻辑映射表中的所述无效页的表项替换为所述预置空白数据块的第一数据页的表项。本发明实施例还提供了一种闪存数据处理装置。本发明实施例能够有效地提高随机写入性能。

Figure 200910005543

The embodiment of the invention discloses a flash memory data processing method and device for improving random write performance. The method in the embodiment of the present invention includes: querying the source data to be updated according to the obtained target data; writing the target data into the first data page of the preset blank data block, and marking the data page where the source data is located as An invalid page: replacing the entry of the invalid page in the preset page-level logical mapping table with the entry of the first data page of the preset blank data block. The embodiment of the present invention also provides a flash memory data processing device. The embodiments of the present invention can effectively improve random write performance.

Figure 200910005543

Description

一种闪存数据处理方法及装置A flash memory data processing method and device

技术领域 technical field

本发明涉及数据处理领域,尤其涉及一种闪存数据处理方法及装置。  The invention relates to the field of data processing, in particular to a flash memory data processing method and device. the

背景技术 Background technique

固态硬盘(SSD,Solid State Disk)由控制单元与存储单元组成,其中,存储单元多采用非易失性的闪存(Flash)芯片构成,由于不具有机械转动装置,因而SSD具有抗震能力强,电源开销小等优势,并得到广泛应用。  Solid State Disk (SSD, Solid State Disk) is composed of a control unit and a storage unit. Among them, the storage unit is mostly composed of a non-volatile flash memory (Flash) chip. Since it does not have a mechanical rotation device, the SSD has strong shock resistance. It has the advantages of small overhead and is widely used. the

闪存在物理上由若干个数据块组成,每个数据块又由若干个页组成,现有技术中,对于闪存的管理均基于数据块的管理,即目前闪存的最小管理单位为数据块,例如,当需要改变某一数据块内的一页数据时,会对该数据块进行完全擦除,之后再全部重新写入。  Flash memory is physically composed of several data blocks, and each data block is composed of several pages. In the prior art, the management of flash memory is based on the management of data blocks, that is, the smallest management unit of flash memory is data block, for example , when a page of data in a certain data block needs to be changed, the data block will be completely erased, and then all rewritten. the

由上述流程可以看出,现有技术中的方案中,在写入某一页数据时,会将该页所在的数据块完全擦除,之后再重新写入该数据块,所以导致更新数据时需要进行大量的数据擦除和写入操作,从而降低了数据随机写入的性能。  It can be seen from the above process that in the scheme of the prior art, when writing a certain page of data, the data block where the page is located will be completely erased, and then the data block is rewritten, so that when updating data A large number of data erasing and writing operations are required, thereby reducing the performance of random data writing. the

发明内容 Contents of the invention

本发明实施例提供了一种闪存数据处理方法及装置,能够提高数据随机写入的性能。  The embodiment of the present invention provides a flash memory data processing method and device, which can improve the performance of random data writing. the

本发明实施例提供的闪存数据处理方法,包括:根据获取到的目标数据查询待更新的源数据;将所述目标数据写入预置空白数据块的第一数据页中,将所述源数据所在的数据页标注为无效页;将预置的页级逻辑映射表中的所述无效页的表项替换为所述预置空白数据块的第一数据页的表项。  The flash memory data processing method provided by the embodiment of the present invention includes: querying the source data to be updated according to the obtained target data; writing the target data into the first data page of the preset blank data block, and writing the source data to The data page is marked as an invalid page; the entry of the invalid page in the preset page-level logical mapping table is replaced with the entry of the first data page of the preset blank data block. the

本发明实施例提供的闪存数据处理方法,包括:获取待写入数据的长度信息;根据所述长度信息以及一个数据块所包含的扇区的数目将所述待写入数据拆分为块级数据以及页级数据;按照块写入方式写入所述块级数据,按照页写入方式写入所述页级数据并对预置的页级逻辑映射表进行更新。  The flash memory data processing method provided by the embodiment of the present invention includes: obtaining the length information of the data to be written; splitting the data to be written into block levels according to the length information and the number of sectors contained in a data block data and page-level data; write the block-level data in a block-writing manner, write the page-level data in a page-writing manner, and update the preset page-level logical mapping table. the

本发明实施例提供的闪存数据处理装置,包括:源数据查询单元,用于根据获取到的目标数据查询待更新的源数据;写入单元,用于将所述目标数据写入预置空白数据块的第一数据页中;标注单元,用于所述源数据所在的数据页标注为无效页;替换单元,用于将预置的页级逻辑映射表中的所述无效页的表项替换为所述预置空白数据块的第一数据页的表项。  The flash memory data processing device provided by the embodiment of the present invention includes: a source data query unit, configured to query source data to be updated according to the acquired target data; a writing unit, configured to write the target data into preset blank data In the first data page of the block; the marking unit is used to mark the data page where the source data is located as an invalid page; the replacement unit is used to replace the entry of the invalid page in the preset page-level logical mapping table It is an entry of the first data page of the pre-set blank data block. the

本发明实施例提供的闪存数据处理装置,包括:长度信息获取单元,用于获取待写入数据的长度信息;数据拆分单元,用于根据所述长度信息以及一个数据块所包含的扇区的数目将所述待写入数据拆分为块级数据以及页级数据;数据写入单元,用于按照块写入方式写入所述块级数据,按照页写入方式写入所述页级数据并对预置的页级逻辑映射表进行更新。  The flash memory data processing device provided by the embodiment of the present invention includes: a length information acquisition unit, configured to acquire the length information of data to be written; Split the data to be written into block-level data and page-level data; the data writing unit is used to write the block-level data according to the block writing method, and write the page according to the page writing method Level data and update the preset page-level logical mapping table. the

从以上技术方案可以看出,本发明实施例具有以下优点:  As can be seen from the above technical solutions, the embodiments of the present invention have the following advantages:

本发明实施例中,获取到目标数据之后,将目标数据写入预置空白数据块的第一数据页中,并将源数据所在的数据页标注为无效页,同时还将预置的页级逻辑映射表中的无效页的表项替换为第一数据页的表项,因此,在数据更新的过程中,无需对无效页所在的数据块进行擦除,而直接采用空白数据块中的第一数据页替代该无效页进行数据存储,因此节省了数据更新的操作,从而提高了数据随机写入的性能。  In the embodiment of the present invention, after the target data is acquired, the target data is written into the first data page of the preset blank data block, and the data page where the source data is located is marked as an invalid page, and the preset page level The entry of the invalid page in the logical mapping table is replaced by the entry of the first data page. Therefore, in the process of data updating, there is no need to erase the data block where the invalid page is located, and directly use the first data block in the blank data block. A data page replaces the invalid page for data storage, thus saving the operation of data updating, thereby improving the performance of random writing of data. the

附图说明Description of drawings

图1为本发明实施例中闪存数据处理方法第一实施例流程图;  Fig. 1 is the flowchart of the first embodiment of the flash memory data processing method in the embodiment of the present invention;

图2(a)为本发明实施例中闪存数据处理方法第二实施例流程图;  Fig. 2 (a) is the flow chart of the second embodiment of flash memory data processing method in the embodiment of the present invention;

图2(b)为本发明实施例中页级逻辑映射表示意图;  Figure 2 (b) is a schematic diagram of a page-level logical mapping table in an embodiment of the present invention;

图3为本发明实施例中闪存数据处理方法第三实施例流程图;  Fig. 3 is the flowchart of the third embodiment of the flash memory data processing method in the embodiment of the present invention;

图4为本发明实施例中页写入方式示意图;  Fig. 4 is a schematic diagram of the page writing method in the embodiment of the present invention;

图5为本发明实施例中块写入方式示意图;  Fig. 5 is a schematic diagram of block writing mode in the embodiment of the present invention;

图6为本发明实施例中闪存数据处理装置第一实施例示意图;  Fig. 6 is a schematic diagram of the first embodiment of the flash memory data processing device in the embodiment of the present invention;

图7为本发明实施例中闪存数据处理装置第二实施例示意图。  FIG. 7 is a schematic diagram of a second embodiment of a flash memory data processing device in an embodiment of the present invention. the

具体实施方式Detailed ways

本发明实施例提供了一种闪存数据处理方法及装置,用于提高数据随机写入的性能。  Embodiments of the present invention provide a flash memory data processing method and device, which are used to improve the performance of random writing of data. the

请参阅图1,本发明实施例中闪存数据处理方法第一实施例包括:  Please refer to Fig. 1, the first embodiment of flash memory data processing method in the embodiment of the present invention comprises:

101、根据获取到的目标数据查询待更新的源数据;  101. Query the source data to be updated according to the acquired target data;

 本实施例中,当需要对闪存数据块中某一页的数据进行更新时,首先会获取新的数据,即目标数据,之后再根据该目标数据所需存储的位置查询待更新的源数据。  In this embodiment, when the data of a certain page in the flash memory data block needs to be updated, new data, that is, target data, is first obtained, and then the source data to be updated is queried according to the storage location of the target data. the

例如,当用户在操作系统中需要替换一个文件时(具体可以为用户粘贴了一个文件名相同的文件,并选择了“覆盖”),则操作系统可以从用户粘贴的位置获知该文件在闪存中对应的位置,并且读取原先存储于闪存中该位置的数据,即可获得待更新的源数据。  For example, when the user needs to replace a file in the operating system (specifically, the user can paste a file with the same file name and select "overwrite"), the operating system can learn from the pasted position of the user that the file is in the flash memory The corresponding location, and read the data originally stored in this location in the flash memory, the source data to be updated can be obtained. the

102、将所述目标数据写入预置空白数据块的第一数据页中,将所述源数据所在的数据页标注为无效页;  102. Write the target data into the first data page of the preset blank data block, and mark the data page where the source data is located as an invalid page;

当确定了待更新的源数据之后,在预置的空白数据块组中获取一个空白数据块,将目标数据写入该空白数据块的某一个数据页中,记录为第一数据页。  After the source data to be updated is determined, a blank data block is obtained from the preset blank data block group, and the target data is written into a certain data page of the blank data block, which is recorded as the first data page. the

并将源数据所在的数据页标注为无效页,具体的标注方式可以为:在该数据页的标签或属性字段中插入无效标志,该无效标志用于指示该数据页无效,即暂时不会对该数据页进行读写操作,需要说明的是,在实际应用中,具体标注无效页的方式还可以有很多种,此处不作限定。  And mark the data page where the source data is located as an invalid page. The specific marking method can be: insert an invalid mark in the label or attribute field of the data page, and the invalid mark is used to indicate that the data page is invalid, that is, it will not be The data page performs read and write operations. It should be noted that in practical applications, there may be many ways to specifically mark invalid pages, which are not limited here. the

103、将预置的页级逻辑映射表中的所述无效页的表项替换为所述第一数据页的表项。  103. Replace the entry of the invalid page in the preset page-level logical mapping table with the entry of the first data page. the

由于步骤102中将源数据所在的数据页标注为无效页,为保证原先与该数据页有关联的数据页中的数据保持完整,则可以在预置的页级逻辑映射表中将该无效页的表项替换为第一数据页的表项。  Since the data page where the source data is located is marked as an invalid page in step 102, in order to ensure that the data in the data page associated with the data page remains intact, the invalid page can be stored in the preset page-level logical mapping table The table entries of the first data page are replaced with the table entries of the first data page. the

本实施例中的页级逻辑映射表中记录有各存储有数据的数据页的逻辑地址,物理地址,以及各数据页之间的关联关系。  The page-level logical mapping table in this embodiment records the logical address and physical address of each data page storing data, and the association relationship between each data page. the

本实施例中,将页级逻辑映射表中的无效页的表项替换为第一数据页的表项,即可使得第一数据页中的数据代替无效页中的数据,且原先各数据页之间的关联关系保持不变,即实现了数据的更新。  In this embodiment, the entry of the invalid page in the page-level logical mapping table is replaced with the entry of the first data page, so that the data in the first data page can replace the data in the invalid page, and each data page The association relationship between remains unchanged, that is, the data update is realized. the

本实施例中,获取到目标数据之后,将目标数据写入预置空白数据块的第一数据页中,并将源数据所在的数据页标注为无效页,同时还将预置的页级逻辑映射表中的无效页的表项替换为第一数据页的表项,因此,在数据更新的过程中,无需对无效页所在的数据块进行擦除,而直接采用空白数据块中的第一数据页替代该无效页进行数据存储,因此节省了数据更新的操作,从而提高了数据随机写入的性能。 In this embodiment, after the target data is acquired, the target data is written into the first data page of the preset blank data block, and the data page where the source data is located is marked as an invalid page, and the preset page-level logic The entry of the invalid page in the mapping table is replaced by the entry of the first data page. Therefore, in the process of data updating, there is no need to erase the data block where the invalid page is located, and directly use the first data block in the blank data block. The data page replaces the invalid page for data storage, thus saving the operation of updating data, thereby improving the performance of random writing of data.

请参阅图2(a),本发明实施例中闪存数据处理方法第二实施例包括:  Please refer to Fig. 2 (a), the second embodiment of the flash memory data processing method in the embodiment of the present invention includes:

201、搜索空白数据块,建立页级逻辑映射表;  201. Search for blank data blocks, and establish a page-level logical mapping table;

本实施例中,当系统上电时,对各物理数据块进行遍历,查询未记录数据的物理数据块以及已被擦除的物理数据块,将所述未记录数据的物理数据块以及已被擦除的物理数据块作为预置空白数据块。  In this embodiment, when the system is powered on, each physical data block is traversed, the physical data block with unrecorded data and the physical data block that has been erased are queried, and the physical data block with unrecorded data and the physical data block that has been erased The erased physical data block is used as a preset blank data block. the

假设共有3个数据块,分别为X,Y以及Z,其中X中原先已记录有数据且未被擦除,Y和Z中未记录数据,则通过遍历可以查询到Y和Z为空白数据块。  Assuming that there are 3 data blocks in total, namely X, Y and Z, where data has been recorded in X and has not been erased, and no data has been recorded in Y and Z, then Y and Z can be found to be blank data blocks by traversing . the

需要说明的是,本实施例中,还可以预先建立页级逻辑映射表,该页级逻辑映射表中记录有各存储有数据的数据页的逻辑地址,物理地址,以及各数据页之间的关联关系,本实施例中的页级逻辑映射表可以采用二叉树,或B+树等数据存储方式以记录数据。  It should be noted that in this embodiment, a page-level logical mapping table can also be established in advance, and the logical address and physical address of each data page storing data are recorded in the page-level logical mapping table, as well as the relationship between each data page. As for the association relationship, the page-level logical mapping table in this embodiment may use a data storage method such as a binary tree or a B+ tree to record data. the

本实施例中以二叉树为例对页级逻辑映射表进行说明,可以理解的是,同样可以为其他类型的数据存储方式:  In this embodiment, a binary tree is taken as an example to illustrate the page-level logical mapping table. It can be understood that other types of data storage methods can also be used:

请参阅图2(b),图中的共包含6个节点,分别为A,B,C,D,E,F,其中每个节点代表一个数据页,每个节点由四部分内容组成,从左到右分别是“左节点标识”,“逻辑地址”,“物理地址”以及“右节点标识”,本实施例中的每个节点可以由16个字节组成,四个部分中每部分占用4个字节。  Please refer to Figure 2(b). There are 6 nodes in the figure, namely A, B, C, D, E, and F. Each node represents a data page, and each node is composed of four parts. From From left to right are "left node identifier", "logical address", "physical address" and "right node identifier". Each node in this embodiment can be composed of 16 bytes, and each of the four parts occupies 4 bytes. the

图2(b)中,若某节点的“左节点标识”或“右节点标识”为“NULL”,则表示该节点没有左节点,或没有右节点。  In Fig. 2(b), if the "left node identifier" or "right node identifier" of a node is "NULL", it means that the node has no left node or no right node. the

202、根据获取到的目标数据查询待更新的源数据;  202. Query the source data to be updated according to the acquired target data;

本实施例中,当需要对闪存数据块中某一页的数据进行更新时,首先会获取新的数据,即目标数据,之后再根据该目标数据所需存储的位置查询待更新的源数据。  In this embodiment, when the data of a certain page in the flash memory data block needs to be updated, new data, ie target data, is obtained first, and then the source data to be updated is queried according to the storage location of the target data. the

假设用户希望用目标数据“500”替换源数据“300”,则可确定目标数据为“500”,源数据为“300”。  Assuming that the user wishes to replace the source data "300" with the target data "500", it can be determined that the target data is "500" and the source data is "300". the

203、将所述目标数据写入预置空白数据块的第一数据页中,将所述源数据所在的数据页标注为无效页;  203. Write the target data into the first data page of the preset blank data block, and mark the data page where the source data is located as an invalid page;

当确定了待更新的源数据之后,在预置的空白数据块组中获取一个空白数据块,将目标数据写入该空白数据块的某一个数据页中,记录为第一数据页。  After the source data to be updated is determined, a blank data block is obtained from the preset blank data block group, and the target data is written into a certain data page of the blank data block, which is recorded as the first data page. the

并将源数据所在的数据页标注为无效页,具体的标注方式可以为:在该数据页的标签或属性字段中插入无效标志,该无效标志用于指示该数据页无效,即暂时不会对该数据页进行读写操作,需要说明的是,在实际应用中,具体标注无效页的方式还可以有很多种,此处不作限定。  And mark the data page where the source data is located as an invalid page. The specific marking method can be: insert an invalid mark in the label or attribute field of the data page, and the invalid mark is used to indicate that the data page is invalid, that is, it will not be The data page performs read and write operations. It should be noted that in practical applications, there may be many ways to specifically mark invalid pages, which are not limited here. the

假设源数据“300”存储于数据页由节点E表示(如图2(b)所示),则可知该数据页的逻辑地址为70,物理地址为8,左节点为D,右节点为F,由于该数据页内的源数据“300”已经失效,则将该数据页标注为无效页。  Assuming that the source data "300" is stored in the data page represented by node E (as shown in Figure 2(b)), it can be known that the logical address of the data page is 70, the physical address is 8, the left node is D, and the right node is F , because the source data "300" in the data page is invalid, mark the data page as an invalid page. the

当前的空白数据块为Y和Z,可任意选取一个,例如选取Y为空白数据块以写入数据,则可以将目标数据“500”写入空白数据块Y中的某一个数据页(即第一数据页)内,假设该第一数据页的物理地址为9。  The current blank data blocks are Y and Z, and one can be selected arbitrarily. For example, if Y is selected as a blank data block to write data, then the target data "500" can be written into a certain data page in the blank data block Y (that is, the first A data page), assuming that the physical address of the first data page is 9. the

204、将预置的页级逻辑映射表中的所述无效页的表项替换为所述第一数据页的表项;  204. Replace the entry of the invalid page in the preset page-level logical mapping table with the entry of the first data page;

由于步骤203中将源数据所在的数据页标注为无效页,为保证原先与该数据页有关联的数据页中的数据保持完整,则可以在预置的页级逻辑映射表中将该无效页的表项替换为第一数据页的表项。  Since the data page where the source data is located is marked as an invalid page in step 203, in order to ensure that the data in the data page associated with the data page remains intact, the invalid page can be stored in the preset page-level logical mapping table The table entries of the first data page are replaced with the table entries of the first data page. the

具体的替换的方式可以为:查询所述无效页所在的表项,将表项中的物理地址修改为第一数据页的物理地址,保留表项原有的关联信息,该关联信息用于表示该表项与其他表项之间的关联关系。  A specific replacement method may be: query the entry where the invalid page is located, modify the physical address in the entry to the physical address of the first data page, and retain the original associated information of the entry, which is used to represent The association relationship between this entry and other entries. the

即,无效页所在的表项为节点E,获取第一数据页的物理地址9,将节点E中的物理地址由8修改为9,并且保持该节点E原先的“左节点标识”以及“右节点标识”,则实现了第一数据页对无效页的替换。  That is, the entry where the invalid page is located is node E, obtain the physical address 9 of the first data page, modify the physical address in node E from 8 to 9, and keep the original "left node ID" and "right node ID" of the node E. Node ID", then the replacement of the invalid page by the first data page is realized. the

205、判断是否满足预置的更新条件,若是,则执行步骤206,若否,则持续进行判断;  205. Judging whether the preset update condition is satisfied, if yes, execute step 206, if not, continue to judge;

本实施例中,由于步骤203中会将数据块中的某些数据页标注为无效页,则这些无效页暂时不能进行读写操作,为提高存储资源的利用率,在某些情 况下需要对这些数据块中的数据进行更新,以消除无效页,具体情况可以包括:  In this embodiment, because some data pages in the data block will be marked as invalid pages in step 203, then these invalid pages cannot be read and written temporarily. In order to improve the utilization rate of storage resources, in some cases it is necessary to Update the data in these data blocks to eliminate invalid pages. The specific situations can include:

(1)、某一数据块中的无效页的数目达到预置数值:  (1), the number of invalid pages in a data block reaches the preset value:

当某一数据块内的无效页的数目达到某一门限值(该门限值可以根据用户需求进行设定,一般设置为一个大于或等于2的数字)时,可能会使得存储空间减少,则在此情况下可以根据第一数据页中的目标数据对无效页所在的数据块进行更新。  When the number of invalid pages in a data block reaches a certain threshold (the threshold can be set according to user needs, generally set to a number greater than or equal to 2), the storage space may be reduced, In this case, the data block where the invalid page is located can be updated according to the target data in the first data page. the

(2)、系统处于空闲状态:  (2), the system is idle:

当系统未进行读写操作,即处于空闲状态时,同样可以利用这段空闲时间根据第一数据页中的目标数据对无效页所在的数据块进行更新。  When the system is not performing read or write operations, that is, it is in an idle state, the idle time can also be used to update the data block where the invalid page is located according to the target data in the first data page. the

需要说明的是,上述仅以两个例子对预置的更新条件进行了说明,可以理解的是,在实际应用中,同样可以为其他的预置更新条件,此处不作限定。  It should be noted that the preset update conditions are described above with only two examples, and it can be understood that in practical applications, other preset update conditions may also be used, which are not limited here. the

206、根据第一数据页中的目标数据对无效页所在的数据块进行更新。  206. Update the data block where the invalid page is located according to the target data in the first data page. the

本实施例中,具体的更新过程可以为:  In this embodiment, the specific update process can be:

将数据块中除无效页外的其他数据页中的数据保存到缓存;  Save the data in other data pages in the data block except invalid pages to the cache;

对数据块进行擦除;  Erase the data block;

获取第一数据页中的目标数据;  Obtain the target data in the first data page;

将所述目标数据写入原先的无效页中得到修改页;  Write the target data into the original invalid page to obtain the modified page;

将包含目标数据的修改页以及缓存中保存的数据内容写入擦除之后的数据块中;  Write the modified page containing the target data and the data content stored in the cache into the data block after erasing;

将预置的页级逻辑映射表中的第一数据页的表项替换为所述修改页的表项。  The entry of the first data page in the preset page-level logical mapping table is replaced with the entry of the modified page. the

上述更新流程中,由于闪存的特性,因此最小擦除单位为数据块,为将目标数据重新写入原先的数据页中,则可以先将数据块中其他数据页的内容拷贝至缓存,再重新写入新的数据,从而实现数据块的更新,该数据块更新的过程与现有技术中数据更新的过程类似,此处不再赘述。  In the above update process, due to the characteristics of flash memory, the minimum erasing unit is a data block. In order to rewrite the target data into the original data page, you can first copy the contents of other data pages in the data block to the cache, and then rewrite New data is written, so as to realize the update of the data block. The process of updating the data block is similar to the process of updating data in the prior art, and will not be repeated here. the

当数据更新完之后,修改页(即写入了目标数据的原先的无效页)中即保存有目标数据,此时可以再对页级逻辑映射表进行调整,用修改页的表项替换原先的第一数据页的表项,具体的替换过程与前述替换过程类似,此处 不再赘述,替换完成之后,则节点E中的物理地址再次被修改为8。  After the data is updated, the target data is stored in the modified page (that is, the original invalid page where the target data is written). At this time, the page-level logical mapping table can be adjusted to replace the original The entry of the first data page, the specific replacement process is similar to the aforementioned replacement process, and will not be repeated here. After the replacement is completed, the physical address in node E is changed to 8 again. the

需要说明的是,由于本实施例中设置了页级逻辑映射表,则可能会占用一定的系统资源,为减少资源占用,当系统空闲时,或该页级逻辑映射表占用的资源达到预置的门限值时,可以对该页级逻辑映射表进行整理,具体的整理方式可以为:  It should be noted that since the page-level logical mapping table is set in this embodiment, certain system resources may be occupied. In order to reduce resource occupation, when the system is idle, or the resources occupied by the page-level logical mapping table reach the preset When the threshold value is higher, the page-level logical mapping table can be sorted out, and the specific sorting method can be as follows:

首先获取属于同一个数据块的待整理的数据页,将该数据块内的有效数据和待整理的数据页中的数据进行合并,具体的合并可以通过COPY_BACK操作实现,可以理解的是,在实际应用中同样可以采用其他类似的操作实现数据合并,此处不作限定。  First obtain the data page to be sorted belonging to the same data block, and merge the valid data in the data block with the data in the data page to be sorted. The specific merge can be realized through the COPY_BACK operation. It is understandable that in practice In the application, other similar operations can also be used to realize data merging, which is not limited here. the

合并完成后,将合并后的数据拷贝至空白块中,同时在页级逻辑映射表中删除待整理的数据页的表项。  After the merging is completed, the merging data is copied to a blank block, and at the same time, the entry of the data page to be sorted is deleted in the page-level logical mapping table. the

通过上述的整理操作,可以对数据页中的数据以及该数据页所属数据块中的数据进行合并,从而减少了数据页的数量,即减少了页级逻辑映射表中的内容。  Through the above sorting operation, the data in the data page and the data in the data block to which the data page belongs can be merged, thereby reducing the number of data pages, that is, reducing the content in the page-level logical mapping table. the

需要说明的是,上述的整理方式仅为整理页级逻辑映射表的一个例子,在实际应用中,同样还可以采用其他的整理方式,此处不作限定。  It should be noted that the above sorting manner is only an example of sorting the page-level logical mapping table, and in practical applications, other sorting ways can also be used, which are not limited here. the

本实施例中,由于在满足预置的更新条件之后,才对无效页所在的数据块进行更新,则能够保证无需在每次数据更新时都对数据块进行擦除,从而节省了数据更新的流程,提高了数据随机写入的性能;  In this embodiment, since the data block where the invalid page is located is not updated until the preset update condition is satisfied, it can be ensured that the data block does not need to be erased every time the data is updated, thereby saving the cost of data update. The process improves the performance of random data writing;

其次,由于本实施例中采用二叉树作为页级逻辑映射表的存储方式,因此能够有效地提高页级逻辑映射表的查询效率;  Secondly, since the binary tree is used as the storage method of the page-level logical mapping table in this embodiment, the query efficiency of the page-level logical mapping table can be effectively improved;

再次,由于本实施例中可以对页级逻辑映射表进行整理,因此能够有效地减少系统资源的占用。  Thirdly, since the page-level logical mapping table can be organized in this embodiment, the occupation of system resources can be effectively reduced. the

综上所述,本实施例中,由于存在预置的页级逻辑映射表,且该页级逻辑映射表中包含有各数据页的物理地址,逻辑地址,以及各数据页之间的关联关系,所以在对某一数据页的内容进行更新时,只需要在该页级逻辑映射表中对该数据页的物理地址进行替换即可实现数据的更新,而无需擦除该数据页所在的整个数据块,因此本实施例可以利用该页级逻辑映射表以提高数据随机写入的性能。  To sum up, in this embodiment, since there is a preset page-level logical mapping table, and the page-level logical mapping table contains the physical address of each data page, the logical address, and the association relationship between each data page , so when updating the content of a data page, it is only necessary to replace the physical address of the data page in the page-level logical mapping table to update the data without erasing the entire Therefore, this embodiment can use the page-level logical mapping table to improve the performance of random writing of data. the

下面介绍本发明实施例中闪存数据处理方法的另一实施例:  Introduce another embodiment of flash memory data processing method in the embodiment of the present invention below:

首先,需要说明的是,在现有技术中的闪存数据存储过程中,最小的存储单位为数据页,同样还可以以数据块为单位进行存储,但是现有技术中只建立有数据块之间的逻辑关系表,即块级逻辑映射表,当用户需要多次存储少量数据时,可能会使得每次存储均占用一个数据块,而该数据块的大部分空间可能仍然是空白的,因此会浪费大量的存储空间。  First of all, it needs to be explained that in the flash memory data storage process in the prior art, the smallest storage unit is the data page, and it can also be stored in the unit of the data block, but in the prior art, only the inter-block between the data blocks is established. The logical relationship table, that is, the block-level logical mapping table, when the user needs to store a small amount of data multiple times, it may cause each storage to occupy a data block, and most of the space of the data block may still be blank, so it will Waste a lot of storage space. the

本发明实施例中提供了一种闪存数据处理方法,用以解决上述缺陷,具体请参阅图3,本发明实施例中闪存数据处理方法第三实施例包括:  An embodiment of the present invention provides a flash memory data processing method to solve the above defects. Please refer to FIG. 3 for details. The third embodiment of the flash memory data processing method in the embodiment of the present invention includes:

301、获取待写入数据的长度信息;  301. Obtain the length information of the data to be written;

当用户需要写入数据时,首先获取待写入数据的长度,该长度的单位可以以扇区为单位,假设一个数据块内包含64个数据页,每个数据页内包含4个扇区。  When the user needs to write data, first obtain the length of the data to be written. The unit of the length can be a sector. Assume that a data block contains 64 data pages, and each data page contains 4 sectors. the

302、根据长度信息以及一个数据块所包含的扇区的数目将待写入数据拆分为块级数据以及页级数据;  302. Split the data to be written into block-level data and page-level data according to the length information and the number of sectors contained in a data block;

本实施例中,将待写入数据的长度信息转换为对应所需占用的扇区数目L(若待写入数据原先即以扇区为单位计算长度,则无需转换),具体的转换方式此处不作限定;  In this embodiment, the length information of the data to be written is converted into the corresponding number of sectors L to be occupied (if the length of the data to be written is originally calculated in units of sectors, no conversion is required), the specific conversion method is as follows without limitation;

获取一个数据块所包含的扇区的数目N;  Get the number N of sectors contained in a data block;

将L与N进行取整运算,根据取整运算的结果B确定块级数据;  Perform rounding operation on L and N, and determine the block-level data according to the result B of the rounding operation;

将L与N进行取余运算,根据取余运算的结果确定页级数据。  The remainder operation is performed on L and N, and the page-level data is determined according to the result of the remainder operation. the

假设上述的L=260,N=64*4=256,则L div N=1,L mod N=4,则B=1,则块级数据为一个完整的空白数据块所能存储的数据,页级数据为4个扇区(即一个数据页)所能存储的数据。  Suppose the above L=260, N=64*4=256, then L div N=1, L mod N=4, then B=1, then the block-level data is the data that can be stored in a complete blank data block, The page-level data is data that can be stored in 4 sectors (that is, a data page). the

303、按照块写入方式写入块级数据,按照页写入方式写入页级数据并对预置的页级逻辑映射表进行更新。  303. Write block-level data in a block writing manner, write page-level data in a page writing manner, and update a preset page-level logical mapping table. the

为便于理解,下面首先介绍本实施例中的预先设置流程:  For ease of understanding, the following first introduces the preset process in this embodiment:

首先可以建立四张数据表,分别为:  First, four data tables can be created, namely:

块级逻辑映射表:用于记录数据块的逻辑映射关系,逻辑地址与物理地址一一对应关系;  Block-level logical mapping table: used to record the logical mapping relationship of data blocks, and the one-to-one correspondence between logical addresses and physical addresses;

页级逻辑映射表:用于记录数据页的逻辑映射关系,采用二叉树的方式记录,包括数据页的逻辑地址,物理地址以及各数据页之间的关联关系;  Page-level logical mapping table: used to record the logical mapping relationship of the data page, recorded in the form of a binary tree, including the logical address of the data page, the physical address and the relationship between each data page;

块擦除次数列表:用于记录各数据块的擦除次数;  List of block erasure times: used to record the erasure times of each data block;

未擦除块列表:用于记录未被擦除的数据块。  Unerased block list: used to record data blocks that have not been erased. the

需要说明的是,具体的块级逻辑映射表可以如下表所示:  It should be noted that the specific block-level logical mapping table can be shown in the following table:

表1  Table 1

  块级映射表项 Block-level mapping table entry   对应的逻辑地址 The corresponding logical address   对应的物理地址 Corresponding physical address   0 0   0*n 0*n   0x00000000 0x00000000   1 1   1*n 1*n   0x00000005 0x00000005   2 2   2*n 2*n   0x80000010 0x80000010   … ...   … ...   … ...   N N   N*n N*n   0xFFFFFFFF 0xFFFFFFFF   N+1 N+1   (N+1)*n (N+1)*n   0xFFFFFFFF 0xFFFFFFFF   … ...   … ...   … ...

上述表1中的每一项由4个字节实现,每一项都标识一个数据块的逻辑地址与物理地址之间的对应关系。  Each item in the above Table 1 is implemented by 4 bytes, and each item identifies the correspondence between the logical address and the physical address of a data block. the

完成上述设置后即可进行数据的写入操作,下面对块级数据写入以及页级数据写入分别进行说明:  After the above settings are completed, the data writing operation can be performed. The following describes the block-level data writing and page-level data writing respectively: 

(1)块级数据写入,具体如图4所示:  (1) Block-level data writing, as shown in Figure 4:

a、从预置的空白数据块中选取B个空白数据块;  a. Select B blank data blocks from the preset blank data blocks;

系统上电时,对各数据块进行遍历即可查询到未写入数据的空白数据块,或者还可以对未擦除块列表中的数据块进行擦除得到空白数据块。  When the system is powered on, the blank data blocks that have not been written in data can be found by traversing each data block, or the data blocks in the unerased block list can be erased to obtain blank data blocks. the

需要说明的是,在对未擦除块列表中的数据块进行擦除之前还可以先通过块擦除次数列表查询每一个数据块被擦除的次数,优先选择被擦除次数少的数据块进行擦除,以使得各数据块被擦除的次数大致相当,从而提高闪存的整体寿命。  It should be noted that before erasing the data blocks in the unerased block list, you can first query the number of times each data block has been erased through the block erasure times list, and select the data blocks with fewer times to be erased first. Erasing is performed so that each data block is erased approximately the same number of times, thereby increasing the overall lifetime of the flash memory. the

b、将块级数据写入B个空白数据块中;  b. Write block-level data into B blank data blocks;

上述确定了需要一个空白数据块以存储数据,则可按顺序读取一部分数据,使得这部分数据刚好可以填充满一个数据块,并将这部分数据存储该数据块中。  If it is determined above that a blank data block is needed to store data, a part of the data can be read sequentially so that this part of data can just fill a data block, and this part of data can be stored in the data block. the

c、将B个空白数据块的逻辑地址以及物理地址填入预置的块级逻辑映射表;  c. Fill the logical addresses and physical addresses of B blank data blocks into the preset block-level logical mapping table;

当数据填充完成后,该数据块即保存有数据,则将该数据块的逻辑地址以及物理地址填入块级逻辑映射表中,用于指示该数据块中已存有数据。  After the data filling is completed, the data block contains data, and the logical address and the physical address of the data block are filled into the block-level logical mapping table, which is used to indicate that data has been stored in the data block. the

d、根据B个空白数据块的逻辑地址获取逻辑地址范围;  d. Obtain the logical address range according to the logical addresses of the B blank data blocks;

每个数据块对应一段逻辑地址,则此步骤获取该数据块对应的逻辑地址范围。  Each data block corresponds to a logical address, and this step obtains the logical address range corresponding to the data block. the

e、在预置的页级逻辑映射表中删除逻辑地址在该逻辑地址范围内的表项。  e. Delete entries with logical addresses within the logical address range in the preset page-level logical mapping table. the

由于该数据块中已存满数据,则无法继续在该数据块所包含的数据页中存储数据,则可以从页级逻辑映射表中删除逻辑地址在该逻辑地址范围内的表项。  Since the data block is full of data, it is impossible to continue storing data in the data page included in the data block, and the entry whose logical address is within the logical address range can be deleted from the page-level logical mapping table. the

(2)块级数据写入,具体如图5所示:  (2) Block-level data writing, as shown in Figure 5:

a、从预置的空白数据块中选取一个空白数据块;  a. Select a blank data block from the preset blank data blocks;

系统上电时,对各数据块进行遍历即可查询到未写入数据的空白数据块,或者还可以对未擦除块列表中的数据块进行擦除得到空白数据块。  When the system is powered on, the blank data blocks that have not been written in data can be found by traversing each data block, or the data blocks in the unerased block list can be erased to obtain blank data blocks. the

需要说明的是,在对未擦除块列表中的数据块进行擦除之前还可以先通过块擦除次数列表查询每一个数据块被擦除的次数,优先选择被擦除次数少的数据块进行擦除,以使得各数据块被擦除的次数大致相当,从而提高闪存的整体寿命。  It should be noted that before erasing the data blocks in the unerased block list, you can first query the number of times each data block has been erased through the block erasure times list, and select the data blocks with fewer times to be erased first. Erasing is performed so that each data block is erased approximately the same number of times, thereby increasing the overall lifetime of the flash memory. the

b、将页级数据按顺序写入该空白数据块中的数据页;  b. Write the page-level data to the data pages in the blank data block in sequence;

由上述步骤302可知,写入页级数据共需要4个扇区(即一个数据页)的空间,具体写入页级数据的过程与现有技术中按照数据页为单位写入数据的过程一致,此处不作限定。  From the above step 302, it can be seen that the space of 4 sectors (that is, one data page) is required to write page-level data, and the specific process of writing page-level data is consistent with the process of writing data in units of data pages in the prior art , is not limited here. the

c、在预置的页级逻辑映射表中写入该空白数据块中存有该页级数据的数据页的逻辑地址,物理地址以及该数据页与其他数据页之间的关联关系;  c. Write the logical address and physical address of the data page containing the page-level data in the blank data block in the preset page-level logical mapping table, as well as the relationship between the data page and other data pages;

当页级数据写入完成后,则该数据页即存有数据,则可以在页级逻辑映射表中新增一个节点,用于表示该数据页,具体新增的过程可以为:获取该数据页的逻辑地址以及物理地址,并根据该数据页中存储的数据与其他数据之间的关系确定该数据页的左节点以及右节点,之后形成新的节点插入页级逻辑映射表中。  After the page-level data is written, the data page contains data, and a node can be added in the page-level logical mapping table to represent the data page. The specific adding process can be: get the data The logical address and physical address of the page, and determine the left node and right node of the data page according to the relationship between the data stored in the data page and other data, and then form a new node and insert it into the page-level logical mapping table. the

d、在预置的块级逻辑映射表中修改空白数据块的标志,用于指示该空白数据块中存在页级逻辑映射表。  d. Modifying the flag of the blank data block in the preset block-level logical mapping table to indicate that the page-level logical mapping table exists in the blank data block. the

本实施例中,在某一空白数据块中的某数据页内写入数据之后,则仅通过块级逻辑映射表已无法完整读取该数据块的内容,则还需读取该数据块的页级逻辑映射表才能够完整读取该数据块的内容,因此,需要在块级逻辑映射表中对该数据块的物理地址进行调整,具体可以将该数据块的对应的物理地址的最高位修改为1以作标识。  In this embodiment, after data is written in a data page in a certain blank data block, the content of the data block cannot be completely read only through the block-level logical mapping table, and the content of the data block needs to be read. Only the page-level logical mapping table can fully read the content of the data block. Therefore, the physical address of the data block needs to be adjusted in the block-level logical mapping table. Specifically, the highest bit of the corresponding physical address of the data block can be Change to 1 for identification. the

例如表1中表项“2”所示的数据块的物理地址为0x80000010,转化为二进制数为:1000 0000 0000 0000 0000 0000 0000 0001 0000,则其最高位为1,表示该数据块包含有页级逻辑映射表,在读取该数据块的内容时,需要同时读取页级逻辑映射表才能够完整地获取该数据块的内容。  For example, the physical address of the data block shown in item "2" in Table 1 is 0x80000010, which is converted into a binary number: 1000 0000 0000 0000 0000 0000 0000 0001 0000, and its highest bit is 1, indicating that the data block contains pages When reading the content of the data block, the page-level logical mapping table needs to be read at the same time to completely obtain the content of the data block. the

本实施例中,由于设置了页级逻辑映射表,则可能会占用一定的系统资源,为减少资源占用,当系统空闲时,或该页级逻辑映射表占用的资源达到预置的门限值时,可以对该页级逻辑映射表进行整理,具体的整理方式与前述实施例中的整理方式一致,此处不再赘述。  In this embodiment, since the page-level logical mapping table is set, certain system resources may be occupied. In order to reduce resource occupation, when the system is idle, or the resource occupied by the page-level logical mapping table reaches a preset threshold value , the page-level logical mapping table can be sorted out, and the specific sorting method is the same as that in the foregoing embodiments, and will not be repeated here. the

本实施例中,由于待写入的数据可以被拆分为块级数据以及页级数据,因此能够在一次写入过程中同时分配数据块以及数据页进行数据写入,避免了少量数据占用一个完整数据块的情况,从而节约了存储空间;  In this embodiment, since the data to be written can be split into block-level data and page-level data, data blocks and data pages can be allocated for data writing at the same time during one write process, avoiding a small amount of data occupying a The case of a complete data block, thus saving storage space;

其次,本实施例中,可以记录每个数据块被擦除的次数,并优先选择被擦除次数少的数据块进行擦除,以使得各数据块被擦除的次数大致相当,从而提高闪存的整体寿命;  Secondly, in this embodiment, the number of times each data block is erased can be recorded, and the data blocks with a few times of erasing are preferentially selected for erasing, so that the number of times each data block is erased is approximately equal, thereby improving the performance of the flash memory. overall lifespan;

再次,由于本实施例中可以对页级逻辑映射表进行整理,因此能够有效地减少系统资源的占用。  Thirdly, since the page-level logical mapping table can be organized in this embodiment, the occupation of system resources can be effectively reduced. the

综上所述,本实施例中,由于存在预置的页级逻辑映射表,且该页级逻辑映射表中包含有各数据页的物理地址,逻辑地址,以及各数据页之间的关联关系,所以在向空白数据块写入页级数据时,可以在该空白数据块的页级逻辑映射表中相应增加对应的表项,从而使得该空白数据块中可以存储若干个数据页的页级数据,而不会出现每个数据页的数据都需要独立占用一个数据块的情况,因此能够有效地节约存储空间。  To sum up, in this embodiment, since there is a preset page-level logical mapping table, and the page-level logical mapping table contains the physical address of each data page, the logical address, and the association relationship between each data page , so when writing page-level data to a blank data block, corresponding entries can be added to the page-level logical mapping table of the blank data block, so that the page-level data of several data pages can be stored in the blank data block Data, instead of the situation that the data of each data page needs to independently occupy a data block, so the storage space can be effectively saved. the

上述实施例中介绍了两种闪存数据处理方法均是基于预置的页级逻辑映射表对页级数据(包括闪存中存储的页级数据以及向闪存写入的页级数据)进行管理,因此能够有效地提高闪存数据处理的性能。  The two flash data processing methods described in the above embodiments are based on the preset page-level logical mapping table to manage the page-level data (including the page-level data stored in the flash memory and the page-level data written to the flash memory), so The performance of flash memory data processing can be effectively improved. the

下面对本发明实施例中的闪存数据处理装置进行介绍:  The flash memory data processing device in the embodiment of the present invention is introduced below:

请参阅图6,本发明实施例中闪存数据处理装置第一实施例包括:  Please refer to Figure 6, the first embodiment of the flash memory data processing device in the embodiment of the present invention includes:

源数据查询单元601,用于根据获取到的目标数据查询待更新的源数据;  The source data query unit 601 is used to query the source data to be updated according to the acquired target data;

写入单元602,用于将所述目标数据写入预置空白数据块的第一数据页中;  Writing unit 602, for writing the target data into the first data page of the preset blank data block;

标注单元603,用于所述源数据所在的数据页标注为无效页;  Marking unit 603, used to mark the data page where the source data is located as an invalid page;

替换单元604,用于将预置的页级逻辑映射表中的所述无效页的表项替换为所述第一数据页的表项。  The replacement unit 604 is configured to replace the entry of the invalid page in the preset page-level logical mapping table with the entry of the first data page. the

本实施例中的闪存数据处理装置还可以进一步包括:  The flash memory data processing device in the present embodiment can also further include:

更新触发单元605,用于判断是否满足预置的更新条件,若是,则触发更新单元执行相应操作;  The update trigger unit 605 is used to judge whether the preset update condition is met, and if so, trigger the update unit to perform corresponding operations;

更新单元606,用于在所述更新触发单元的触发下,根据所述第一数据页中的目标数据对所述无效页所在的数据块进行更新。  The update unit 606 is configured to update the data block where the invalid page is located according to the target data in the first data page under the trigger of the update trigger unit. the

本实施例中的更新触发单元605包括:  The update trigger unit 605 in this embodiment includes:

第一触发单元6051,用于判断数据块内无效页的数目是否达到预置数值,若是,则触发更新单元执行相应操作;  The first trigger unit 6051 is used to judge whether the number of invalid pages in the data block reaches a preset value, and if so, trigger the update unit to perform corresponding operations;

或,  or,

第二触发单元6052,用于判断当前是否处于空闲状态,若是,则触发更新单元执行相应操作。  The second trigger unit 6052 is used to judge whether it is currently idle, and if so, trigger the update unit to perform corresponding operations. the

本实施例中的更新单元606包括:  The update unit 606 in this embodiment includes:

数据更新单元6061,用于将所述数据块中除无效页外的其他数据页中的数据保存到缓存,对所述数据块进行擦除,获取所述第一数据页中的目标数据,将包含所述目标数据的修改页以及缓存中保存的数据内容写入所述擦除之后的数据块中;  The data update unit 6061 is configured to save data in other data pages in the data block except the invalid page to the cache, erase the data block, obtain the target data in the first data page, and Write the modified page containing the target data and the data content stored in the cache into the data block after the erasure;

映射表更新单元6062,用于将预置的页级逻辑映射表中的所述第一数据页的表项替换为所述修改页的表项。  A mapping table updating unit 6062, configured to replace the entry of the first data page in the preset page-level logical mapping table with the entry of the modified page. the

本实施例中的闪存数据处理装置还可以进一步包括:  The flash memory data processing device in the present embodiment can also further include:

空白数据块搜索单元607,用于当系统上电时,对各物理数据块进行遍历,查询未记录数据的物理数据块以及已被擦除的物理数据块,将所述未记录数据的物理数据块以及已被擦除的物理数据块作为预置空白数据块。  Blank data block search unit 607, used for traversing each physical data block when the system is powered on, querying the physical data blocks of unrecorded data and the physical data blocks that have been erased, and searching the physical data blocks of the unrecorded data Blocks and erased physical data blocks are used as preset blank data blocks. the

本实施例中的闪存数据处理装置还可以进一步包括:  The flash memory data processing device in the present embodiment can also further include:

映射表生成单元608,用于建立页级逻辑映射表,所述页级逻辑映射表中包含各存有数据的数据页的逻辑地址,物理地址以及该数据页与其他数据页之间的关联关系。  The mapping table generating unit 608 is configured to establish a page-level logical mapping table, which includes the logical address of each data page storing data, the physical address, and the association relationship between the data page and other data pages . the

本实施例中的闪存数据处理装置还可以进一步包括:  The flash memory data processing device in the present embodiment can also further include:

映射表整理单元609,用于对所述页级逻辑映射表进行整理。  The mapping table organizing unit 609 is configured to organize the page-level logical mapping table. the

本实施例中,写入单元602将目标数据写入预置空白数据块的第一数据页中,标注单元603将源数据所在的数据页标注为无效页,替换单元604将预置的页级逻辑映射表中的无效页的表项替换为第一数据页的表项,因此,在数据更新的过程中,无需对无效页所在的数据块进行擦除,而直接采用空白数据块中的第一数据页替代该无效页进行数据存储,因此节省了数据更新的操作,从而提高了数据随机写入的性能。  In this embodiment, the writing unit 602 writes the target data into the first data page of the preset blank data block, the marking unit 603 marks the data page where the source data is located as an invalid page, and the replacing unit 604 writes the preset page level The entry of the invalid page in the logical mapping table is replaced by the entry of the first data page. Therefore, in the process of data updating, there is no need to erase the data block where the invalid page is located, and directly use the first data block in the blank data block. A data page replaces the invalid page for data storage, thus saving the operation of data updating, thereby improving the performance of random writing of data. the

请参阅图7,本发明实施例中闪存数据处理装置第二实施例包括:  Please refer to Figure 7, the second embodiment of the flash memory data processing device in the embodiment of the present invention includes:

长度信息获取单元701,用于获取待写入数据的长度信息;  The length information acquisition unit 701 is used to acquire the length information of the data to be written;

数据拆分单元702,用于根据所述长度信息以及一个数据块所包含的扇区的数目将所述待写入数据拆分为块级数据以及页级数据;  A data splitting unit 702, configured to split the data to be written into block-level data and page-level data according to the length information and the number of sectors contained in a data block;

数据写入单元703,用于按照块写入方式写入所述块级数据,按照页写入方式写入所述页级数据。  The data writing unit 703 is configured to write the block-level data in a block writing manner, and write the page-level data in a page writing manner. the

本实施例中的数据写入单元703包括:  The data writing unit 703 in the present embodiment comprises:

块写入单元7031,用于从预置的空白数据块中选取B个空白数据块,将所述块级数据写入所述B个空白数据块中,将所述B个空白数据块的逻辑地址以及物理地址填入预置的块级逻辑映射表,根据所述B个空白数据块的逻辑地址获取逻辑地址范围,在预置的页级逻辑映射表中删除逻辑地址在所述逻辑地址范围内的表项;  The block writing unit 7031 is configured to select B blank data blocks from the preset blank data blocks, write the block-level data into the B blank data blocks, and write the logic of the B blank data blocks to Fill in the address and physical address into the preset block-level logical mapping table, obtain the logical address range according to the logical addresses of the B blank data blocks, and delete the logical address within the logical address range in the preset page-level logical mapping table entries in the table;

页写入单元7032,用于从预置的空白数据块中选取一个空白数据块M, 将所述页级数据按顺序写入所述空白数据块M中的数据页,在预置的页级逻辑映射表中写入所述存有数据的数据页的逻辑地址,物理地址以及该数据页与其他数据页之间的关联关系,在预置的块级逻辑映射表中修改所述空白数据块M的标志,用于指示所述空白数据块M中存在页级逻辑映射表。  The page writing unit 7032 is used to select a blank data block M from the preset blank data blocks, and write the page-level data into the data pages in the blank data block M in sequence, at the preset page level Write the logical address and physical address of the data page containing the data in the logical mapping table, as well as the association between the data page and other data pages, and modify the blank data block in the preset block-level logical mapping table The flag of M is used to indicate that a page-level logical mapping table exists in the blank data block M. the

本实施例中,由于待写入的数据可以被数据拆分单元702拆分为块级数据以及页级数据,并且由数据写入单元703中的块写入单元7031以及页写入单元7032分别进行写入,因此能够在一次写入过程中同时分配数据块以及数据页进行数据写入,避免了少量数据占用一个完整数据块的情况,从而节约了存储空间。  In this embodiment, since the data to be written can be split into block-level data and page-level data by the data splitting unit 702, and the block writing unit 7031 and the page writing unit 7032 in the data writing unit 703 respectively Therefore, data blocks and data pages can be allocated for data writing in one write process at the same time, which avoids the situation that a small amount of data occupies a complete data block, thereby saving storage space. the

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括如下步骤:  Those of ordinary skill in the art can understand that all or part of the steps in the method of the above-mentioned embodiments can be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium, and the program can be executed when executed , including the following steps:

根据获取到的目标数据查询待更新的源数据;  Query the source data to be updated according to the obtained target data;

将所述目标数据写入预置空白数据块的第一数据页中,将所述源数据所在的数据页标注为无效页;  Write the target data into the first data page of the preset blank data block, and mark the data page where the source data is located as an invalid page;

将预置的页级逻辑映射表中的所述无效页的表项替换为所述预置空白数据块的第一数据页的表项。  and replacing the entry of the invalid page in the preset page-level logical mapping table with the entry of the first data page of the preset blank data block. the

上述提到的存储介质可以是只读存储器,磁盘或光盘等。  The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like. the

以上对本发明所提供的一种闪存数据处理方法及装置进行了详细介绍,对于本领域的一般技术人员,依据本发明实施例的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。  A flash memory data processing method and device provided by the present invention has been introduced in detail above. For those of ordinary skill in the art, according to the idea of the embodiment of the present invention, there will be changes in the specific implementation and application scope. In summary, the contents of this specification should not be construed as limiting the present invention. the

Claims (21)

1.一种闪存数据处理方法,其特征在于,包括:1. A flash memory data processing method, characterized in that, comprising: 根据获取到的目标数据查询待更新的源数据;Query the source data to be updated according to the acquired target data; 将所述目标数据写入预置空白数据块的第一数据页中,将所述源数据所在的数据页标注为无效页;writing the target data into the first data page of the preset blank data block, and marking the data page where the source data is located as an invalid page; 将预置的页级逻辑映射表中的所述无效页的表项替换为所述预置空白数据块的第一数据页的表项;replacing the entry of the invalid page in the preset page-level logical mapping table with the entry of the first data page of the preset blank data block; 所述预置的页级逻辑映射表的建立过程包括:The establishment process of the preset page-level logical mapping table includes: 获取各存有数据的数据页的逻辑地址,物理地址以及该数据页与其他数据页之间的关联关系;Obtain the logical address and physical address of each data page storing data, as well as the association between the data page and other data pages; 根据所述各存有数据的数据页的逻辑地址,物理地址以及该数据页与其他数据页之间的关联关系建立所述页级逻辑映射表;Establishing the page-level logical mapping table according to the logical address and physical address of each data page storing data and the association relationship between the data page and other data pages; 所述将预置的页级逻辑映射表中的所述无效页的表项替换为所述预置空白数据块的第一数据页的表项包括:The replacing the entry of the invalid page in the preset page-level logical mapping table with the entry of the first data page of the preset blank data block includes: 查询所述无效页所在的表项;Query the table entry where the invalid page is located; 将所述表项中的物理地址修改为所述第一数据页的物理地址;modifying the physical address in the entry to the physical address of the first data page; 保留所述表项原有的关联信息,所述关联信息用于表示所述表项与其他表项之间的关联关系。The original association information of the entry is retained, and the association information is used to represent the association relationship between the entry and other entries. 2.根据权利要求1所述的方法,其特征在于,所述将预置的页级逻辑映射表中的所述无效页的表项替换为所述第一数据页的表项之后包括:2. The method according to claim 1, wherein after replacing the entry of the invalid page in the preset page-level logical mapping table with the entry of the first data page, the step comprises: 判断是否满足预置的更新条件,若是,则根据所述第一数据页中的目标数据对所述无效页所在的数据块进行更新。Judging whether the preset update condition is satisfied, if yes, updating the data block where the invalid page is located according to the target data in the first data page. 3.根据权利要求2所述的方法,其特征在于,所述判断是否满足预置的更新条件包括:3. The method according to claim 2, wherein said judging whether a preset update condition is satisfied comprises: 判断数据块内无效页的数目是否达到预置数值,若是,则确定满足预置的更新条件。It is judged whether the number of invalid pages in the data block reaches a preset value, and if so, it is determined that a preset update condition is met. 4.根据权利要求2所述的方法,其特征在于,所述判断是否满足预置的更新条件包括:4. The method according to claim 2, wherein said judging whether a preset update condition is satisfied comprises: 判断当前是否处于空闲状态,若是,则确定满足预置的更新条件。It is judged whether it is currently in an idle state, and if so, it is determined that the preset update condition is satisfied. 5.根据权利要求2或3或4所述的方法,其特征在于,所述根据所述第一数据页中的目标数据对所述无效页所在的数据块进行更新包括:5. The method according to claim 2, 3 or 4, wherein updating the data block where the invalid page is located according to the target data in the first data page comprises: 将所述数据块中除无效页外的其他数据页中的数据保存到缓存;Save the data in other data pages in the data block except the invalid page to the cache; 对所述数据块进行擦除;Erase the data block; 获取所述第一数据页中的目标数据;Acquiring the target data in the first data page; 将所述目标数据写入所述无效页中得到修改页;Writing the target data into the invalid page to obtain a modified page; 将包含所述目标数据的修改页以及缓存中保存的数据内容写入所述擦除之后的数据块中;Writing the modified page containing the target data and the data content stored in the cache into the data block after the erasure; 将预置的页级逻辑映射表中的所述第一数据页的表项替换为所述修改页的表项。and replacing the entry of the first data page in the preset page-level logical mapping table with the entry of the modified page. 6.根据权利要求1至4中任一项所述的方法,其特征在于,所述预置空白数据块的获取过程包括:6. The method according to any one of claims 1 to 4, wherein the acquisition process of the preset blank data block comprises: 当系统上电时,对各物理数据块进行遍历;When the system is powered on, traverse each physical data block; 查询未记录数据的物理数据块以及已被擦除的物理数据块;Query the physical data blocks of unrecorded data and the physical data blocks that have been erased; 将所述未记录数据的物理数据块以及已被擦除的物理数据块作为预置空白数据块。The physical data blocks that have not recorded data and the physical data blocks that have been erased are used as preset blank data blocks. 7.根据权利要求1至4中任一项所述的方法,其特征在于,所述方法还包括:7. The method according to any one of claims 1 to 4, wherein the method further comprises: 对所述页级逻辑映射表进行整理。Organize the page-level logical mapping table. 8.根据权利要求7所述的方法,其特征在于,所述对页级逻辑映射表进行整理包括:8. The method according to claim 7, wherein said sorting out the page-level logical mapping table comprises: 确定属于同一数据块的待整理的数据页;Determine the data pages to be organized belonging to the same data block; 将获取的属于同一数据块的有效数据以及待整理的数据页中的数据进行合并;Merge the obtained valid data belonging to the same data block and the data in the data page to be sorted; 将合并后的数据拷贝至空白数据块中,并在所述页级逻辑映射表中删除所述待整理的数据页的表项。Copy the merged data into a blank data block, and delete the entry of the data page to be sorted in the page-level logical mapping table. 9.一种闪存数据处理方法,其特征在于,包括:9. A flash memory data processing method, characterized in that, comprising: 获取待写入数据的长度信息;Obtain the length information of the data to be written; 根据所述长度信息以及一个数据块所包含的扇区的数目将所述待写入数据拆分为块级数据以及页级数据;Splitting the data to be written into block-level data and page-level data according to the length information and the number of sectors included in a data block; 按照块写入方式写入所述块级数据,按照页写入方式写入所述页级数据并对预置的页级逻辑映射表进行更新;Writing the block-level data according to the block writing method, writing the page-level data according to the page writing method and updating the preset page-level logical mapping table; 所述预置的页级逻辑映射表的建立过程包括:The establishment process of the preset page-level logical mapping table includes: 获取各存有数据的数据页的逻辑地址,物理地址以及该数据页与其他数据页之间的关联关系;Obtain the logical address and physical address of each data page storing data, as well as the association between the data page and other data pages; 根据所述各存有数据的数据页的逻辑地址,物理地址以及该数据页与其他数据页之间的关联关系建立所述页级逻辑映射表。The page-level logical mapping table is established according to the logical address and physical address of each data page storing data and the association relationship between the data page and other data pages. 10.根据权利要求9所述的方法,其特征在于,所述根据长度信息以及一个数据块所包含的扇区的数目将所述待写入数据拆分为块级数据以及页级数据包括:10. The method according to claim 9, wherein the splitting the data to be written into block-level data and page-level data according to the length information and the number of sectors included in a data block comprises: 将所述待写入数据的长度信息转换为对应所需占用的扇区数目L;Converting the length information of the data to be written into the number L of sectors corresponding to the required occupation; 获取一个数据块所包含的扇区的数目N;Obtain the number N of sectors contained in a data block; 将所述L与N进行取整运算,根据所述取整运算的结果B确定块级数据;performing a rounding operation on the L and N, and determining block-level data according to the result B of the rounding operation; 将所述L与N进行取余运算,根据所述取余运算的结果确定页级数据。A remainder operation is performed on the L and N, and page-level data is determined according to a result of the remainder operation. 11.根据权利要求9所述的方法,其特征在于,所述按照块写入方式写入所述块级数据包括:11. The method according to claim 9, wherein the writing of the block-level data in a block writing manner comprises: 从预置的空白数据块中选取所述B个空白数据块;Selecting the B blank data blocks from the preset blank data blocks; 将所述块级数据写入所述B个空白数据块中;writing the block-level data into the B blank data blocks; 将所述B个空白数据块的逻辑地址以及物理地址填入预置的块级逻辑映射表。Filling the logical addresses and physical addresses of the B blank data blocks into a preset block-level logical mapping table. 12.根据权利要求11所述的方法,其特征在于,所述将B个空白数据块的逻辑地址以及物理地址填入预置的块级逻辑映射表之后包括:12. The method according to claim 11, characterized in that, after filling the logical addresses and physical addresses of B blank data blocks into the preset block-level logical mapping table, comprising: 根据所述B个空白数据块的逻辑地址获取逻辑地址范围;Acquiring a logical address range according to the logical addresses of the B blank data blocks; 在预置的页级逻辑映射表中删除逻辑地址在所述逻辑地址范围内的表项。Deleting entries with logical addresses within the logical address range in the preset page-level logical mapping table. 13.根据权利要求9所述的方法,其特征在于,所述按照页写入方式写入所述页级数据并对预置的页级逻辑映射表进行更新包括:13. The method according to claim 9, wherein the writing the page-level data according to the page writing method and updating the preset page-level logical mapping table comprises: 从预置的空白数据块中选取一个空白数据块M;Select a blank data block M from the preset blank data blocks; 将所述页级数据按顺序写入所述空白数据块M中的数据页;Writing the page-level data into data pages in the blank data block M in sequence; 在预置的页级逻辑映射表中写入所述空白数据块M中的所述页级数据的数据页的逻辑地址,物理地址以及该数据页与其他数据页之间的关联关系;Write the logical address of the data page of the page-level data in the blank data block M in the preset page-level logical mapping table, the physical address and the association relationship between the data page and other data pages; 在预置的块级逻辑映射表中修改所述空白数据块M的标志,用于指示所述空白数据块M中存在页级逻辑映射表。Modifying the flag of the blank data block M in the preset block-level logical mapping table is used to indicate that the page-level logical mapping table exists in the blank data block M. 14.一种闪存数据处理装置,其特征在于,包括:14. A flash memory data processing device, characterized in that, comprising: 源数据查询单元,用于根据获取到的目标数据查询待更新的源数据;a source data query unit, configured to query the source data to be updated according to the acquired target data; 写入单元,用于将所述目标数据写入预置空白数据块的第一数据页中;a writing unit, configured to write the target data into the first data page of the preset blank data block; 标注单元,用于所述源数据所在的数据页标注为无效页;A marking unit, used to mark the data page where the source data is located as an invalid page; 替换单元,用于将预置的页级逻辑映射表中的所述无效页的表项替换为所述预置空白数据块的第一数据页的表项,所述将预置的页级逻辑映射表中的所述无效页的表项替换为所述预置空白数据块的第一数据页的表项包括:查询所述无效页所在的表项;将所述表项中的物理地址修改为所述第一数据页的物理地址;保留所述表项原有的关联信息,所述关联信息用于表示所述表项与其他表项之间的关联关系;a replacement unit, configured to replace the entry of the invalid page in the preset page-level logic mapping table with the entry of the first data page of the preset blank data block, and the preset page-level logic Replacing the entry of the invalid page in the mapping table with the entry of the first data page of the preset blank data block includes: querying the entry of the invalid page; modifying the physical address in the entry is the physical address of the first data page; retain the original association information of the entry, and the association information is used to indicate the association relationship between the entry and other entries; 映射表生成单元,用于建立页级逻辑映射表,所述页级逻辑映射表中包含各存有数据的数据页的逻辑地址,物理地址以及该数据页与其他数据页之间的关联关系。The mapping table generation unit is used to establish a page-level logical mapping table, which includes the logical address and physical address of each data page storing data, and the association relationship between the data page and other data pages. 15.根据权利要求14所述的装置,其特征在于,所述装置还包括:15. The device according to claim 14, further comprising: 更新触发单元,用于判断是否满足预置的更新条件,若是,则触发更新单元执行相应操作;The update trigger unit is used to judge whether the preset update condition is satisfied, and if so, trigger the update unit to perform the corresponding operation; 更新单元,用于在所述更新触发单元的触发下,根据所述第一数据页中的目标数据对所述无效页所在的数据块进行更新。An update unit, configured to update the data block where the invalid page is located according to the target data in the first data page under the trigger of the update trigger unit. 16.根据权利要求15所述的装置,其特征在于,所述更新触发单元包括:16. The device according to claim 15, wherein the update trigger unit comprises: 第一触发单元,用于判断数据块内无效页的数目是否达到预置数值,若是,则触发更新单元执行相应操作;The first trigger unit is used to judge whether the number of invalid pages in the data block reaches a preset value, and if so, trigger the update unit to perform corresponding operations; 或,or, 第二触发单元,用于判断当前是否处于空闲状态,若是,则触发更新单元执行相应操作。The second trigger unit is used to judge whether it is currently in an idle state, and if so, trigger the update unit to perform a corresponding operation. 17.根据权利要求14或15或16所述的装置,其特征在于,所述更新单元包括:17. The device according to claim 14 or 15 or 16, wherein the updating unit comprises: 数据更新单元,用于将所述数据块中除无效页外的其他数据页中的数据保存到缓存,对所述数据块进行擦除,获取所述第一数据页中的目标数据,将所述目标数据写入所述无效页中得到修改页,将包含所述目标数据的修改页以及缓存中保存的数据内容写入所述擦除之后的数据块中;A data updating unit, configured to store data in other data pages in the data block except the invalid page in the cache, erase the data block, obtain target data in the first data page, and store the data in the first data page. Writing the target data into the invalid page to obtain a modified page, writing the modified page containing the target data and the data content stored in the cache into the data block after the erasing; 映射表更新单元,用于将预置的页级逻辑映射表中的所述第一数据页的表项替换为所述修改页的表项。A mapping table updating unit, configured to replace the entry of the first data page in the preset page-level logical mapping table with the entry of the modified page. 18.根据权利要求14或15或16所述的装置,其特征在于,所述装置还包括:18. The device according to claim 14 or 15 or 16, wherein the device further comprises: 空白数据块搜索单元,用于当系统上电时,对各物理数据块进行遍历,查询未记录数据的物理数据块以及已被擦除的物理数据块,将所述未记录数据的物理数据块以及已被擦除的物理数据块作为预置空白数据块。The blank data block search unit is used to traverse each physical data block when the system is powered on, query the physical data blocks of unrecorded data and the physical data blocks that have been erased, and search the physical data blocks of unrecorded data And the physical data block that has been erased is used as a preset blank data block. 19.根据权利要求14或15或16所述的装置,其特征在于,所述装置还包括:19. The device according to claim 14 or 15 or 16, wherein the device further comprises: 映射表整理单元,用于对所述页级逻辑映射表进行整理。The mapping table organizing unit is configured to organize the page-level logical mapping table. 20.一种闪存数据处理装置,其特征在于,包括:20. A flash memory data processing device, characterized in that, comprising: 长度信息获取单元,用于获取待写入数据的长度信息;a length information acquisition unit, configured to acquire length information of the data to be written; 数据拆分单元,用于根据所述长度信息以及一个数据块所包含的扇区的数目将所述待写入数据拆分为块级数据以及页级数据;A data splitting unit, configured to split the data to be written into block-level data and page-level data according to the length information and the number of sectors included in a data block; 数据写入单元,用于按照块写入方式写入所述块级数据,按照页写入方式写入所述页级数据并对预置的页级逻辑映射表进行更新;A data writing unit, configured to write the block-level data in a block writing manner, write the page-level data in a page writing manner, and update a preset page-level logical mapping table; 所述预置的页级逻辑映射表通过如下方式建立:The preset page-level logical mapping table is established in the following manner: 获取各存有数据的数据页的逻辑地址,物理地址以及该数据页与其他数据页之间的关联关系;根据所述各存有数据的数据页的逻辑地址,物理地址以及该数据页与其他数据页之间的关联关系建立所述页级逻辑映射表。Obtain the logical address and physical address of each data page storing data, as well as the association between the data page and other data pages; according to the logical address, physical address and the relationship between the data page and other The association relationship between data pages establishes the page-level logical mapping table. 21.根据权利要求20所述的装置,其特征在于,所述数据写入单元包括:21. The device according to claim 20, wherein the data writing unit comprises: 块写入单元,用于从预置的空白数据块中选取B个空白数据块,将所述块级数据写入所述B个空白数据块中,将所述B个空白数据块的逻辑地址以及物理地址填入预置的块级逻辑映射表,根据所述B个空白数据块的逻辑地址获取逻辑地址范围,在预置的页级逻辑映射表中删除逻辑地址在所述逻辑地址范围内的表项;The block writing unit is used to select B blank data blocks from the preset blank data blocks, write the block-level data into the B blank data blocks, and write the logical addresses of the B blank data blocks And the physical address is filled into the preset block-level logical mapping table, the logical address range is obtained according to the logical addresses of the B blank data blocks, and the logical address within the logical address range is deleted in the preset page-level logical mapping table table entry; 页写入单元,用于从预置的空白数据块中选取一个空白数据块M,将所述页级数据按顺序写入所述空白数据块M中的数据页,在预置的页级逻辑映射表中写入所述空白数据块M中存有所述页级数据的数据页的逻辑地址,物理地址以及该数据页与其他数据页之间的关联关系,在预置的块级逻辑映射表中修改所述空白数据块M的标志,用于指示所述空白数据块M中存在页级逻辑映射表。The page writing unit is used to select a blank data block M from the preset blank data blocks, and write the page-level data into the data pages in the blank data block M in sequence, in the preset page-level logic In the mapping table, the logical address of the data page storing the page-level data in the blank data block M, the physical address, and the association between the data page and other data pages are written in the preset block-level logical mapping Modifying the flag of the blank data block M in the table is used to indicate that a page-level logical mapping table exists in the blank data block M.
CN2009100055431A 2009-01-19 2009-01-19 Flash memory data processing method and device Expired - Fee Related CN101493794B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100055431A CN101493794B (en) 2009-01-19 2009-01-19 Flash memory data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100055431A CN101493794B (en) 2009-01-19 2009-01-19 Flash memory data processing method and device

Publications (2)

Publication Number Publication Date
CN101493794A CN101493794A (en) 2009-07-29
CN101493794B true CN101493794B (en) 2011-12-21

Family

ID=40924402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100055431A Expired - Fee Related CN101493794B (en) 2009-01-19 2009-01-19 Flash memory data processing method and device

Country Status (1)

Country Link
CN (1) CN101493794B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5708216B2 (en) * 2011-05-09 2015-04-30 ソニー株式会社 Flash memory device, memory control device, memory control method, and storage system
CN103176910B (en) * 2011-12-26 2015-10-14 群联电子股份有限公司 Data combination method, controller and storage device for non-volatile memory
CN103365786B (en) * 2012-04-01 2016-12-14 国民技术股份有限公司 Date storage method, device and system
CN102799535A (en) * 2012-06-29 2012-11-28 记忆科技(深圳)有限公司 Solid-state disk and data processing method thereof
CN102841851B (en) * 2012-07-19 2015-09-09 深圳市江波龙电子有限公司 Flash memory management method and flash memory device
CN103761193B (en) * 2013-12-17 2016-09-14 记忆科技(深圳)有限公司 The method and system that suppression logical page (LPAGE) fragment produces
CN104238962B (en) * 2014-09-16 2018-02-06 华为技术有限公司 The method and device of data is write into caching
KR20160075174A (en) * 2014-12-19 2016-06-29 에스케이하이닉스 주식회사 Memory system and operation method for the same
CN105808156B (en) * 2014-12-31 2020-04-28 华为技术有限公司 Method for writing data into solid state disk and solid state disk
CN105760776A (en) * 2016-02-04 2016-07-13 联想(北京)有限公司 Data processing method and electronic equipment
CN106598504B (en) * 2016-12-26 2019-12-17 华为机器有限公司 Data storage method and device
CN107844431B (en) * 2017-11-03 2022-01-25 合肥兆芯电子有限公司 Mapping table updating method, memory control circuit unit and memory storage device
CN108334457B (en) * 2018-02-12 2020-06-30 杭州宏杉科技股份有限公司 A kind of IO processing method and device
US11042490B2 (en) * 2018-11-15 2021-06-22 Micron Technology, Inc. Address obfuscation for memory
CN111324290A (en) * 2018-12-14 2020-06-23 北京兆易创新科技股份有限公司 Memory device
CN112988038B (en) * 2019-12-17 2024-08-06 国民技术股份有限公司 Data writing method of nonvolatile memory, terminal and readable storage medium
CN111427511B (en) * 2020-03-10 2023-10-27 青岛小鸟看看科技有限公司 Data storage method and device
CN112799972B (en) * 2021-01-27 2023-04-07 成都佰维存储科技有限公司 Implementation method and device of SSD mapping table, readable storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1512348A (en) * 2002-11-05 2004-07-14 松下电器产业株式会社 Apparatus and method for memory management
CN1728282A (en) * 2004-07-30 2006-02-01 深圳市朗科科技有限公司 Method for increasing speed of writing data into flash memory disk
CN1845082A (en) * 2006-04-29 2006-10-11 北京飞天诚信科技有限公司 Safety writing method for flash memory

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1512348A (en) * 2002-11-05 2004-07-14 松下电器产业株式会社 Apparatus and method for memory management
CN1728282A (en) * 2004-07-30 2006-02-01 深圳市朗科科技有限公司 Method for increasing speed of writing data into flash memory disk
CN1845082A (en) * 2006-04-29 2006-10-11 北京飞天诚信科技有限公司 Safety writing method for flash memory

Also Published As

Publication number Publication date
CN101493794A (en) 2009-07-29

Similar Documents

Publication Publication Date Title
CN101493794B (en) Flash memory data processing method and device
US11100071B2 (en) Key-value store tree data block spill with compaction
US10657047B2 (en) Data storage device and method of performing partial garbage collection
CN112395212B (en) Method and system for reducing garbage collection and write amplification in key-value separation storage systems
CN107066393B (en) A method for improving the density of mapping information in the address mapping table
US7844772B2 (en) Device driver including a flash memory file system and method thereof and a flash memory device and method thereof
KR100453053B1 (en) Flash memory file system
TWI398770B (en) Data accessing method for flash memory and storage system and controller using the same
US10120795B2 (en) Wear-leveling nandflash memory reading/writing method
CN103092766B (en) A kind of loss equalizing implementation method for NAND FLASH
CN108073522B (en) Garbage collection methods available for data storage devices
CN103365786B (en) Date storage method, device and system
JP2005222550A (en) Method of remapping flash memory
JP2016051481A (en) Non-transitory computer readable medium, storage device, and data management method
CN106598493A (en) Solid state disk address mapping table management method
CN117891415B (en) P2L data management method and device of storage device
CN102650972B (en) Date storage method, Apparatus and system
JP2021033945A (en) Memory system and control method
CN113253926A (en) Memory internal index construction method for improving query and memory performance of novel memory
TW201826125A (en) Memory control scheme for flash memory device
US8996786B2 (en) Nonvolatile memory system and block management method
CN113741799B (en) Memory device
KR100533683B1 (en) Data managing device and method for flash memory
KR100941423B1 (en) Method of allocating pages in memory and computer readable recording medium having recorded thereon a program for performing the same
KR100982440B1 (en) Data management system in single flash memory

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: HUAWEI DIGITAL TECHNOLOGY (CHENGDU) CO., LTD.

Free format text: FORMER NAME: CHENGDU HUAWEI SYMANTEC TECHNOLOGIES CO., LTD.

CP01 Change in the name or title of a patent holder

Address after: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Patentee after: HUAWEI DIGITAL TECHNOLOGIES (CHENG DU) Co.,Ltd.

Address before: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Patentee before: CHENGDU HUAWEI SYMANTEC TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right

Effective date of registration: 20220908

Address after: No. 1899 Xiyuan Avenue, high tech Zone (West District), Chengdu, Sichuan 610041

Patentee after: Chengdu Huawei Technologies Co.,Ltd.

Address before: 611731 Qingshui River District, Chengdu hi tech Zone, Sichuan, China

Patentee before: HUAWEI DIGITAL TECHNOLOGIES (CHENG DU) Co.,Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20111221

CF01 Termination of patent right due to non-payment of annual fee