CN1277213C - A flash memory file system management method - Google Patents
A flash memory file system management method Download PDFInfo
- Publication number
- CN1277213C CN1277213C CN 200410103980 CN200410103980A CN1277213C CN 1277213 C CN1277213 C CN 1277213C CN 200410103980 CN200410103980 CN 200410103980 CN 200410103980 A CN200410103980 A CN 200410103980A CN 1277213 C CN1277213 C CN 1277213C
- Authority
- CN
- China
- Prior art keywords
- file
- data
- block
- piece
- data block
- 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 - Lifetime
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Memory System (AREA)
Abstract
本发明公开一种闪存文件系统管理方法,将闪存划分为FAT表区和数据存储区,同时划分为多个块区;上电后,在内存中建立空间映射表,写入各文件包含的数据块所在块区号的信息;创建新文件时,在FAT表中追加一条新记录,将该新文件ID、所占块的数量、文件索引号写入该记录;然后依次将该文件的各数据块写入空闲块,并将各数据块所在块区号写入空间映射表中对应的位置;更新文件数据时,只对文件数据存储区进行操作;读取数据时,确定要读的数据在哪几个数据块中后,根据文件标识查询该数据块所在块区号,只在块区内查找该数据块。本发明方法可以减少文件索引区的更新次数,同时能够快速检索定位。
The invention discloses a flash memory file system management method, which divides the flash memory into a FAT table area and a data storage area, and divides it into a plurality of block areas at the same time; after power-on, a space mapping table is established in the memory, and the data contained in each file is written. The information of the block area number where the block is located; when creating a new file, add a new record in the FAT table, write the new file ID, the number of blocks occupied, and the file index number into the record; then each data block of the file in turn Write free blocks, and write the block number of each data block into the corresponding position in the space mapping table; when updating file data, only operate on the file data storage area; when reading data, determine where the data to be read is After entering a data block, query the block number of the data block according to the file ID, and only search for the data block in the block area. The method of the invention can reduce the update times of the file index area, and at the same time can quickly retrieve and locate.
Description
技术领域technical field
本发明涉及一种闪存(FLASH)文件系统,尤其涉及一种利用FAT(文件分配表)表区对存储的文件系统进行管理的方法。The invention relates to a flash memory (FLASH) file system, in particular to a method for managing a stored file system by using a FAT (file allocation table) table area.
背景技术Background technique
FLASH存储器是在20世纪80年代末逐渐发展起来的一种新型非易失性半导体存储器,它结合了以往EPROM结构简单、密度高和EEPROM在系统的电可擦除性的一些优点,实现了高密度、低成本和高可靠性。目前,越来越多的存储类产品为了降低成本而采用了FLASH作为存储介质。但FLASH在读写操作上要求独特,只能从“1”写到“0”,不能反向写,若要重写需先以扇区为单位进行擦除,擦除扇区的寿命也是有限制的,一般允许擦除次数在十万次左右。FLASH memory is a new type of non-volatile semiconductor memory gradually developed in the late 1980s. It combines the advantages of simple structure and high density of EPROM in the past and the electrical erasability of EEPROM in the system to achieve high density, low cost and high reliability. At present, more and more storage products use FLASH as a storage medium in order to reduce costs. However, FLASH has unique requirements in read and write operations. It can only be written from "1" to "0", and cannot be written in reverse. If you want to rewrite, you must first erase in units of sectors, and the life of the erased sectors is also limited. Restricted, the number of erases generally allowed is about 100,000 times.
为了保证FLASH上数据的安全性和一致性,并且尽量延长FLASH的使用寿命,需要对FLASH设计特定的文件管理系统实现对FLASH片上文件数据的管理。目前计算机和通信设备的存储领域已有不少基于FLASH的文件管理系统的发明。In order to ensure the security and consistency of the data on the FLASH, and prolong the service life of the FLASH as much as possible, it is necessary to design a specific file management system for the FLASH to manage the file data on the FLASH chip. At present, many FLASH-based file management systems have been invented in the field of storage of computers and communication equipment.
发明FLASH文件系统的技术点在于:将文件数据分散存储在FLASH片上,更新文件的时候并不是在该文件数据的原位置更新,而是另找新的地方存储修改后的数据,或者写日志信息,这样做是为保证数据的安全性,在更新的时候发生意外不会使数据丢失。为了延长FLASH的使用寿命,应尽量使FLASH片上的每一个擦除扇区擦除均衡。The technical point of inventing the FLASH file system is that the file data is scattered and stored on the FLASH chip. When updating the file, it is not updated at the original location of the file data, but to find a new place to store the modified data or write log information. , this is done to ensure the security of the data, and the data will not be lost if an accident occurs during the update. In order to prolong the service life of FLASH, each erase sector on the FLASH chip should be erased as balanced as possible.
申请号为01142240,名为《FLASH存储文件管理方法》的专利申请提出了一种较完整的FLASH文件系统管理方法。该方法将FLASH存储空间分为文件索引区和文件数据存储区两个区域,文件索引区用于记录文件目录和基本分配单元“块”的分配信息,文件数据存储区用于存储文件的具体内容,更新文件采用重写文件“块”的方式。该文件系统的发明在一定程度上解决了FLASH片上数据安全性和一致性问题。The application number is 01142240, and the patent application named "FLASH storage file management method" proposes a relatively complete FLASH file system management method. This method divides the FLASH storage space into two areas, the file index area and the file data storage area. The file index area is used to record the allocation information of the file directory and the basic allocation unit "block", and the file data storage area is used to store the specific content of the file. , update the file by rewriting the "block" of the file. The invention of the file system solves the problem of data security and consistency on the FLASH chip to a certain extent.
但是,现有的FLASH文件系统在文件索引区记录了文件数据区的信息(一般是文件第1块的位置信息),若文件被更新也需要更新文件索引区的相应内容,增加了文件索引区的磨损次数。文件数据区的损坏可能只破坏了该块所存储的文件,如果文件索引区损坏,有可能使文件系统崩溃。However, the existing FLASH file system records the information of the file data area (generally the position information of the first block of the file) in the file index area. If the file is updated, it also needs to update the corresponding content of the file index area, which increases the file index area. wear times. Damage to the file data area may only destroy the file stored in the block. If the file index area is damaged, the file system may crash.
另外,现有的FLASH文件系统管理方法不是针对智能卡平台的。由于智能卡平台及其应用的特殊性,即CPU速度较慢,要求文件系统能够快速检索定位;另外,为了给上层应用预留足够的RAM空间,文件系统的设计应尽量少的利用RAM空间,因此智能卡文件系统在检索查询的速度和占用的空间上比一般的文件管理系统要求更高,需要特别加以考虑。In addition, the existing FLASH file system management method is not aimed at the smart card platform. Due to the particularity of the smart card platform and its applications, that is, the slow speed of the CPU, the file system is required to be able to quickly retrieve and locate; in addition, in order to reserve enough RAM space for the upper application, the design of the file system should use as little RAM space as possible, so The smart card file system has higher requirements on the retrieval speed and occupied space than the general file management system, so it needs special consideration.
发明内容Contents of the invention
本发明要解决的技术问题是提供一种闪存文件系统管理方法,可以减少文件索引区的更新次数,同时能够快速检索定位。The technical problem to be solved by the present invention is to provide a flash memory file system management method, which can reduce the number of updates of the file index area, and can quickly search and locate at the same time.
为了解决上述技术问题,本发明提供了一种闪存文件系统管理方法,包括以下步骤:In order to solve the above technical problems, the present invention provides a flash file system management method, comprising the following steps:
(a)将闪存按功能划分为文件分配表区和文件数据存储区,同时将其划分为多个包含相同数量的块的块区并编号;(a) dividing the flash memory into a file allocation table area and a file data storage area by function, and simultaneously dividing it into a plurality of block areas containing the same number of blocks and numbering them;
(b)上电后,在内存中建立空间映射表,读取所述文件分配表中的有效记录和闪存中的数据块,在空间映射表中写入各文件包含的数据块所在块区号的信息;(b) after power-on, set up a space mapping table in internal memory, read the valid records in the file allocation table and the data block in the flash memory, write in the space mapping table the location of the block number of the data block that each file contains information;
(c)创建新文件时,根据新文件的大小计算需要占用多少数据块,并判断空闲块的数量是否够用,如果不够,先进行擦除整理操作;(c) When creating a new file, calculate how many data blocks need to be occupied according to the size of the new file, and judge whether the quantity of free blocks is enough, if not enough, first perform the erasing operation;
(d)在文件分配表中追加一条新记录,将该新文件的标识、文件所占块的数量、分配的文件索引号写入到该新记录中;(d) Add a new record in the file allocation table, and write the identifier of the new file, the number of blocks occupied by the file, and the allocated file index number into the new record;
(e)依次将该新文件的各个数据块写入空闲块中,并查询该各个数据块所在块区号在空间映射表中对应的位置,将各数据块所在块区号写入该空间映射表,完成一个新文件的创建;(e) each data block of this new file is written in the idle block successively, and inquire about the corresponding position of each data block place block area number in the space mapping table, the place block area number of each data block is written into this space mapping table, Complete the creation of a new file;
(f)更新文件数据时,只对文件数据存储区进行操作,将新的数据写入到新的数据块中或者添加在原数据块的剩余空间中,完成更新;(f) When updating file data, only the file data storage area is operated, and new data is written into a new data block or added in the remaining space of the original data block to complete the update;
(g)读取数据时,根据用户给出的偏移和长度确定要读的数据在文件的哪些数据块中,由文件标识和级联块号查询这些数据块所在块区号在空间映射表中的位置,并得到其所在块区号;(g) When reading data, determine which data blocks in the file the data to be read is in according to the offset and length given by the user, and use the file identifier and concatenated block number to query the block number of these data blocks in the space mapping table location, and get the block number where it is located;
(h)根据文件标识和级联块号在查到的块区内查找该文件的数据块,将数据读入内存,处理后交给用户。(h) Find the data block of the file in the found block area according to the file identifier and the concatenated block number, read the data into the memory, and hand it over to the user after processing.
进一步地,上述方法还可具有以下特点:所述步骤(a)中,是将闪存划分为16个或者256个块区,所述空间映射表中每个数据块所在块区号占用半个字节或者一个字节。Further, the above method can also have the following characteristics: in the step (a), the flash memory is divided into 16 or 256 block areas, and the block area number of each data block in the space mapping table occupies half a byte or a byte.
进一步地,上述方法还可具有以下特点:所述步骤(b)中,所述空间映射表中文件所包含的各数据块的块区号按数据块的级联顺序连续排列,块区号对应的文件的顺序与文件分配表中的顺序一致。Further, the above method can also have the following characteristics: in the step (b), the block numbers of the data blocks contained in the files in the space mapping table are arranged continuously according to the concatenation order of the data blocks, and the files corresponding to the block numbers The order of the files matches the order in the file allocation table.
进一步地,上述方法还可具有以下特点:所述步骤(b)进一步分为以下步骤:Further, the above method can also have the following characteristics: the step (b) is further divided into the following steps:
(b1)上电后,读取有效的文件分配表记录,计算所有有效文件占用的块的总数量N,在内存中建立N个块区号所用字节的空间映射表,同时在内存中建立一个项数等于或大于有效文件数的临时表项;(b1) After power-on, read the effective file allocation table records, calculate the total number N of blocks occupied by all valid files, set up a space mapping table for the bytes used by N block numbers in the memory, and set up a space mapping table in the memory at the same time Temporary entries whose number of entries is equal to or greater than the number of valid files;
(b2)逐条扫描文件分配表,每检索到一条有效记录,累加出该条记录之前的有效记录中数据块数量之和,作为该文件在空间映射表中的起址,填入到临时表项中;(b2) Scan the file allocation table one by one, and each time a valid record is retrieved, the sum of the number of data blocks in the valid records before the record is accumulated, and used as the starting address of the file in the space mapping table, and filled into the temporary entry middle;
(b3)扫描闪存上的数据块,读取有效数据块的文件索引和级联块号;(b3) scan the data block on the flash memory, read the file index and the concatenated block number of the valid data block;
(b4)根据文件索引在临时表项中找到该文件在空间映射表中的起址,再根据级联块号确定该数据块所在块区号在空间映射表中的位置并写入;(b4) find the starting address of the file in the space mapping table in the temporary entry according to the file index, then determine the position of the block area number where the data block is located in the space mapping table and write according to the concatenated block number;
(b5)对文件数据存储区所有数据块处理完成后,空间映射表建立完毕,释放临时表项所占空间。(b5) After the processing of all data blocks in the file data storage area is completed, the space mapping table is established, and the space occupied by the temporary table items is released.
进一步地,上述方法还可具有以下特点:所述文件索引号的分配由以下步骤实现:Further, the above method can also have the following characteristics: the allocation of the file index number is realized by the following steps:
(o)上电后,在内存中开辟一个文件索引管理区,该管理区的每一个二进制位对应于一个文件索引号,表示该索引号是否已有,初始值为0;(o) After power-on, open up a file index management area in memory, each binary bit of this management area is corresponding to a file index number, represents whether this index number already exists, initial value is 0;
(p)逐条扫描文件分配表,每检索到一条有效记录,将文件索引号管理区内该记录中的文件索引号对应的二进制位置“1”;(p) Scanning the file allocation table one by one, every time a valid record is retrieved, the binary position corresponding to the file index number in the record in the file index number management area is "1";
(q)创建一个新文件时,扫描文件索引管理区中的每一位,将扫描到的第一个为“0”的位对应的索引号分配给新文件,然后将该位置1;(q) When creating a new file, scan each bit in the file index management area, and assign the index number corresponding to the first "0" bit scanned to the new file, and then set the position to 1;
(r)删除一个文件后,把该文件索引号在文件索引管理区中对应的位置为0。(r) After deleting a file, set the corresponding position of the file index number in the file index management area to 0.
进一步地,上述方法还可具有以下特点:所述步骤(e)和(g)中,查询所述新文件的各数据块所在块区号在空间映射表中的位置由以下步骤实现:Further, the above method can also have the following characteristics: in the steps (e) and (g), querying the position of the block number of each data block of the new file in the space mapping table is realized by the following steps:
(u)根据文件标识从文件分配表区的起始地址开始逐条检索要找的文件;(u) Retrieve the files one by one from the starting address of the file allocation table area according to the file identification;
(v)检索到要查找的文件后,该条记录之前所有有效文件的块数量的累加值即为该文件在空间映射表中的起址;(v) After the file to be searched is retrieved, the accumulative value of the block numbers of all valid files before the record is the starting address of the file in the space mapping table;
(w)该起址在空间映射表中对应的位置即为该文件起始块所在块区号的位置,下一块区号的位置即为该文件第二块所在块区号的位置,依此确定该文件任一级联块号的数据块所在块区号的位置。(w) The corresponding position of the starting address in the space mapping table is the position of the block number of the starting block of the file, and the position of the next block number is the position of the block number of the second block of the file, so as to determine the file The location of the block number where the data block of any concatenated block number is located.
进一步地,上述方法还可具有以下特点:所述步骤(f)中,对于文件长度超过半块数据大小的大文件,按以下步骤进行更新操作:Further, the above method can also have the following characteristics: in the step (f), for a large file whose file length exceeds half the data size, the update operation is performed according to the following steps:
(f1)文件系统收到外部的更新文件数据的指令,读取要更新数据在文件中的偏移;(f1) The file system receives an external instruction to update file data, and reads the offset of the data to be updated in the file;
(f2)确定要更新的数据所在的数据块及其数量,若当前空间不够,先进行擦除整理操作;(f2) Determine the data block and its quantity where the data to be updated is located, if the current space is not enough, first perform the erasing operation;
(f3)在空闲扇区中顺序找到相同数量的新块,写入数据;(f3) find the same number of new blocks sequentially in the free sector, write data;
同时,对于文件长度小于半块数据大小的小文件,更新数据时直接在其所在块的有效数据的末端写入日志信息,如果该块日志区写满,则按上述步骤(f1)~(f3)进行更新操作。At the same time, for small files whose file length is less than half the data size of a block, log information is written directly at the end of the valid data of the block where the data is updated. If the log area of the block is full, follow the above steps (f1)~(f3) ) to perform an update operation.
进一步地,上述方法还可具有以下特点:所述步骤(h)中,先判断该文件是否小文件,如果是,将该文件块的数据读入内存,再扫描文件尾部的日志区,将日志区内最新的数据覆盖内存,然后根据用户给的偏移和长度把用户要读的那一部分数据取出给用户;如果是大文件,在各个块区内读出该文件的数据块,拼接好数据后给用户。Further, the above method can also have the following characteristics: in the step (h), first judge whether the file is a small file, if so, read the data of the file block into the memory, then scan the log area at the end of the file, and log The latest data in the area covers the memory, and then take out the part of the data that the user wants to read to the user according to the offset and length given by the user; if it is a large file, read the data blocks of the file in each block area, and splice the data to the user later.
由上可知,本发明方法在FLASH片上的文件FAT表记录中关于文件数据的信息只包含文件所占块的数量,没有块地址的相关信息。这样对于多数文件一旦创建后长度不会改变的文件系统而言,这种方式大大减少了文件FAT表区的擦除次数,保证了文件系统的安全性。同时,本发明采用FLASH文件FAT表和RAM空间映射表相结合的方式,大大提高了文件的检索效率。As can be seen from the above, the information about the file data in the file FAT table record on the FLASH chip of the present invention only includes the number of blocks occupied by the file, and there is no relevant information of the block address. In this way, for the file system whose length does not change after most files are created, this method greatly reduces the number of erasing times of the file FAT table area and ensures the security of the file system. At the same time, the present invention adopts the method of combining the FAT table of the FLASH file and the RAM space mapping table, which greatly improves the retrieval efficiency of the file.
进一步地,为了给上层应用预留足够的RAM空间,本发明还提出了一种建立高效的空间映射表的方法,可以尽量少的占用RAM空间。因此,本发明方法在保证了文件系统运行效率和性能的基础上更为简单、可行,降低了产品成本,对于CPU和RAM资源较小的智能卡类产品而言是一个很好的解决方案。但需要强调的是,本发明具有通用性,也可以用于其他产品。Furthermore, in order to reserve sufficient RAM space for upper-layer applications, the present invention also proposes a method for establishing an efficient space mapping table, which can occupy as little RAM space as possible. Therefore, the method of the invention is simpler and more feasible on the basis of ensuring the operating efficiency and performance of the file system, and reduces the product cost. It is a good solution for smart card products with less CPU and RAM resources. However, it should be emphasized that the present invention has universality and can also be used for other products.
附图说明Description of drawings
图1是本发明实施例建立RAM空间映射表的流程图。FIG. 1 is a flowchart of establishing a RAM space mapping table according to an embodiment of the present invention.
图2是本发明实施例进行文件索引号的分配的流程图。Fig. 2 is a flow chart of allocating file index numbers according to the embodiment of the present invention.
图3是本发明实施例创建一个文件的操作流程图。Fig. 3 is an operation flowchart of creating a file in the embodiment of the present invention.
图4是本发明实施例读取文件数据的流程图。Fig. 4 is a flow chart of reading file data according to an embodiment of the present invention.
具体实施方式Detailed ways
下面用一个实施例对本发明方法作详细的说明。该实施例FLASH文件系统管理方法应用于智能卡类产品。智能卡类的产品的硬件平台特点是:CPU速度较慢,要求文件系统能够快速检索定位;另外,为了给上层应用预留足够的RAM空间,文件系统的设计应尽量少的利用RAM空间。The method of the present invention will be described in detail below with an embodiment. The FLASH file system management method of this embodiment is applied to smart card products. The hardware platform characteristics of smart card products are: the CPU speed is relatively slow, requiring the file system to be able to quickly retrieve and locate; in addition, in order to reserve enough RAM space for upper-layer applications, the design of the file system should use as little RAM space as possible.
文件系统的存储方案File system storage scheme
将FLASH片上划分为文件FAT表区(即文件索引区)和文件数据存储区。文件存储的最小单元为“块”,文件数据存储区由数据“块”组成。块的大小由文件的大小以及擦除扇区(对FLASH作擦除操作的最小单元)的大小而定,为了保证文件的处理速度,每次操作最好不超过5个块。同时尽量保证擦除扇区的大小是“块”的整数倍。每个“块”的头n个字节用于存储该块的信息,包括:该块的当前状态、该块数据所属文件的文件索引和级联块号(表示该块是文件数据的第几块)。文件的第1块的头信息还包括文件在更新过程中可能会改变的属性信息,例如SIM卡中循环文件的指针等。The FLASH chip is divided into a file FAT table area (namely, a file index area) and a file data storage area. The smallest unit of file storage is "block", and the file data storage area is composed of data "blocks". The block size is determined by the size of the file and the size of the erase sector (the smallest unit for erasing the FLASH). In order to ensure the processing speed of the file, it is best not to exceed 5 blocks for each operation. At the same time, try to ensure that the size of the erased sector is an integer multiple of the "block". The first n bytes of each "block" are used to store the information of the block, including: the current state of the block, the file index of the file to which the block data belongs and the concatenated block number (indicating which block is the first file data of the file) piece). The header information of the first block of the file also includes attribute information that may change during the update process of the file, such as the pointer of the circular file in the SIM card.
本实施例文件FAT表区的内容如下表1所示:The content of the FAT table area of the present embodiment file is as shown in Table 1 below:
表1
可以看出,FAT表区由若干FAT表记录构成,每个文件对应一条FAT表记录,记录内容包括:该条FAT表记录的状态、目录索引、文件索引、文件ID、文件占用“块”的数量以及文件的其他基本属性。It can be seen that the FAT table area is composed of several FAT table records, each file corresponds to a FAT table record, and the record content includes: the state of the FAT table record, directory index, file index, file ID, and the number of "blocks" occupied by the file. Quantity and other basic properties of the file.
与现有方法不同的是,本实施例的FAT表记录中不包含块的位置信息,只是记录了文件占用块的数量,这样只有当文件创建、删除和文件大小改变时才涉及到FAT表的更新,如果只是更新文件数据则不需要修改文件的FAT表记录内容,因而可以大大减少FAT表区的擦除次数。Different from the existing method, the FAT table record of the present embodiment does not include the location information of the block, but only records the number of blocks occupied by the file, so that only when the file is created, deleted and the file size is changed, the FAT table is involved. Update, if you just update the file data, you don't need to modify the FAT table record content of the file, so you can greatly reduce the erasing times of the FAT table area.
在智能卡中目录文件和普通文件属于不同的文件类型,如果作为通用的文件系统,也可以没有目录区,不设置目录索引。In the smart card, directory files and ordinary files belong to different file types. If it is used as a general file system, there may be no directory area, and no directory index is set.
空间映射表的建立Create a spatial map
按照上面的存储方式,FAT表记录中没有文件数据块所在位置的信息,检索一个文件的数据就需要检索FLASH数据存储区的每一个块,通过文件索引和级联块号定位一块数据,这样检索文件消耗的时间是不可忍受的。为了提高检索速度,需要增添优化查询机制,利用RAM空间建立FLASH的空间映射表。According to the above storage method, there is no information about the location of the file data block in the FAT table record. To retrieve the data of a file, it is necessary to retrieve each block in the FLASH data storage area, and locate a piece of data through the file index and concatenated block number. The time consumed by the file is unbearable. In order to improve the retrieval speed, it is necessary to add an optimized query mechanism and use the RAM space to establish a FLASH space mapping table.
首先将FLASH全片划分为若干个区域,称作“块区”,每个块区所包含的块的数量是相同的。全片划分多少个块由空间映射表允许消耗的RAM空间而定,若允许消耗的RAM空间较小,则划分的块区包含的块的数量可能会较多;若RAM空间足够大,那么每个块区包含的块的数量相对较小。为了方便操作空间映射表,块区的数量尽量能以半字节或者1字节表示,例如全片划分16个块区或者256个块区等。Firstly, the whole FLASH film is divided into several areas, which are called "block areas", and the number of blocks contained in each block area is the same. The number of blocks divided into the whole slice depends on the RAM space allowed to be consumed by the space mapping table. If the RAM space allowed to be consumed is small, the number of blocks contained in the divided block area may be larger; if the RAM space is large enough, then each The number of blocks contained in a block area is relatively small. In order to facilitate the operation of the space mapping table, the number of blocks can be expressed in nibbles or 1 byte as much as possible, for example, the whole film is divided into 16 blocks or 256 blocks.
假定:硬件平台为64Ksmart flash,擦除扇区大小为64字节。文件存储的最小单元“块”的大小也是64字节,全片FLASH上共有1024个数据块,划分为16个块区。每个文件以一字节的文件索引为唯一标识,FLASH片上最多能存储254个文件。Assumption: the hardware platform is 64Ksmart flash, and the erase sector size is 64 bytes. The size of the smallest unit "block" of file storage is also 64 bytes. There are 1024 data blocks on the entire FLASH, which are divided into 16 block areas. Each file is uniquely identified by a one-byte file index, and a maximum of 254 files can be stored on a FLASH chip.
空间映射表中的基本元素就是每个数据块所在的块区号,16个块区号可以用半字节来区分,1024个数据块共需512字节的空间映射表。空间映射表中文件所包含的各数据块的块区号按数据块的级联顺序连续排列,块区号对应的文件的顺序与文件分配表中的顺序一致。如图1所示,本实施例建立RAM空间映射表的具体流程如下:The basic element in the space mapping table is the block area number where each data block is located. The 16 block area numbers can be distinguished by nibbles, and a space mapping table of 512 bytes is required for 1024 data blocks. The block number of each data block included in the file in the space mapping table is arranged continuously according to the concatenation order of the data block, and the order of the files corresponding to the block number is consistent with the order in the file allocation table. As shown in Figure 1, the specific process of establishing the RAM space mapping table in this embodiment is as follows:
步骤110,上电后,读取有效的FAT表记录,计算所有有效文件占用的块的总数量N,在RAM中建立N/2字节的空间映射表;同时,在RAM建立一个512字节共255项的临时表项(项数也可以根据计算出的有效文件数来确定),每项两个字节,表示该项代表的文件在空间映射表的偏移(以半字节为单位),初始值为“FF FF”;
步骤120,逐条扫描文件FAT表,每检索到一条“有效”状态的记录,累加出该条记录之前的有效记录中数据块数量之和,作为该文件在空间映射表中的半字节起址,填入到临时表项中,如表2所示:
表2
步骤130,扫描FLASH上的数据块,如果当前数据块有效,则读文件索引和级联块号;
步骤140,根据读取的文件索引在临时表项中找到该文件在空间映射表中的起址,再根据级联块号确定该数据块所在块区号在空间映射表中对应的半字节(第1块写在起址对应的半字节,第2块写在下一个半字节,依此类推),把该块所属的数据块区号填入;
步骤150,对数据存储区的所有数据块处理完成后,空间映射表建立完毕,释放临时表项所占空间。得到的空间映射表的排列如下表3所示:
表3
按照上述方法,可以建立起高效的空间映射表,占用RAM空间很少。不过也可以采用现有的空间映射表的建立方法。According to the above method, an efficient space mapping table can be established, occupying little RAM space. However, an existing method for establishing a spatial mapping table may also be used.
文件数据块所在块区号在空间映射表中的位置的查询Query the position of the block number of the file data block in the space mapping table
在空间映射表建立之后,通过以下步骤可查询到文件所包含的数据块所在块区号的位置:After the space mapping table is established, the location of the block number of the data block contained in the file can be queried through the following steps:
步骤一,根据文件标识从FAT区的起始地址开始逐条检索要找的文件,如果不是,则把该条FAT记录中的文件块数量进行累加,继续检索;如果检索到要查找的文件标识,执行下一步;Step 1, according to the file mark, from the starting address of the FAT district, retrieve the file one by one to find, if not, then add up the file block quantity in the FAT record, and continue to search; if the file mark to be searched is retrieved, Execute the next step;
步骤二,该条FAT记录之前所有文件的块数量的累加值即是该文件在空间映射表中的起址,该起址对应的半字节即为该文件起始块所在块区号的位置,下一半字节即为该文件第2块所在块区号的位置,这样,可确定该文件任一级联块号的数据块所在块区号的位置,进而可读出或写入相应的块区号。Step 2, the accumulative value of the block quantity of all files before this FAT record is the starting address of the file in the space mapping table, and the nibble corresponding to the starting address is the position of the block number where the starting block of the file is located, The next half byte is the position of the block number of the second block of the file, so that the position of the block number of any concatenated block number of the file can be determined, and then the corresponding block number can be read or written.
这样,本实施例在检索文件的数据时,只需要根据文件的标识就可以查询到文件数据块所在的块区,只需到相应块区进行检索,因此大大的加快了检索的速度。In this way, in this embodiment, when retrieving file data, only the block area where the file data block is located can be queried according to the file identification, and only the corresponding block area is searched, thus greatly speeding up the retrieval speed.
文件索引号的分配Assignment of file index numbers
对于新创建的文件,需要进行文件索引号的分配,文件索引号为一个字节。如图2所示,本实施例通过以下步骤来实现:For a newly created file, a file index number needs to be allocated, and the file index number is one byte. As shown in Figure 2, this embodiment is realized through the following steps:
步骤210,上电后,在RAM中开辟一个32字节的文件索引管理区,这些字节看作是一串二进制位,第n位用于表示索引n是否已用,初始为0;
步骤220,逐条扫描文件FAT表,每检索到一条有效记录,将文件索引号管理区内该记录中的文件索引号对应的位置“1”,那么若该位为0表示该索引号空闲;
步骤230,创建一个新文件时,扫描文件索引管理区中32字节的每一位,将扫描到的第一个为“0”的位对应的索引号分配给新文件,并将该BIT位置1;
步骤240,删除一个文件后,把该文件索引号对应的BIT位置为0。
上述分配方法可以有效管理文件索引号,并保证索引号的顺序使用,不冗余。但本发明也可以采用其它的索引号分配方法。The above allocation method can effectively manage file index numbers, and ensure that the index numbers are used sequentially without redundancy. But the present invention can also adopt other index number allocation methods.
假定初始化过程中,空间映射表和文件索引号管理区已按上述方法填写完成,基于以上的文件存储、索引号分配和块区号位置查询的方案,本实施例文件系统创建一个文件的操作流程如图3所示,包括以下步骤:Assuming that during the initialization process, the space mapping table and the file index number management area have been filled in according to the above method, based on the above schemes of file storage, index number allocation and block number location query, the operation process of the file system in this embodiment to create a file is as follows: As shown in Figure 3, it includes the following steps:
步骤310,文件系统收到外部的创建新文件的指令,获取要读的文件的标识和文件大小的信息;Step 310, the file system receives an external command to create a new file, and obtains the identification and file size information of the file to be read;
步骤320,根据新文件的大小计算需要占用多少数据块,并判断空闲块的数量是否够用,如果够,直接执行下一步,如果不够,先进行擦除整理操作,再执行下一步;Step 320, calculating how many data blocks need to be occupied according to the size of the new file, and judging whether the number of free blocks is enough, if enough, directly execute the next step, if not enough, first perform the erasing operation, and then execute the next step;
步骤330,在FAT表中追加一条新记录,记录状态设为“无效”,并将该文件的标识(ID)、所占块的数量和其它属性写入到该记录中;Step 330, add a new record in the FAT table, the record status is set to "invalid", and the identification (ID) of the file, the quantity and other attributes of the blocks are written into the record;
步骤340,检索文件索引号管理区,将扫描到的第一个空闲的索引号分配给新文件,并写入该文件的FAT表记录;Step 340, retrieve the file index number management area, assign the first free index number scanned to the new file, and write the FAT table record of the file;
步骤350,依次将文件的数据块写入空闲块中,并查询各数据块在空间映射表中对应的半字节,将各数据块所在块区号写入对应的半字节;Step 350, write the data blocks of the file in the free block in turn, and query the corresponding nibbles of each data block in the space mapping table, and write the block number of each data block into the corresponding nibbles;
步骤360,所有块写完后,将FAT表中表示该新记录的状态由“无效”改为“有效”,完成一个新文件的创建。Step 360, after all the blocks are written, change the state of the new record in the FAT table from "invalid" to "valid", and complete the creation of a new file.
创建文件时如果掉电,利用上述FAT表区的文件状态可以获知,并进行掉电处理。If the power is lost when creating the file, the file status in the above FAT table area can be used to know, and power-off processing is performed.
文件数据的更新Update of file data
因为更新文件数据不改变文件的大小,因而不需要修改文件的FAT表记录内容。Because updating file data does not change the size of the file, there is no need to modify the FAT table record content of the file.
下面将文件长度不足半块数据大小(除去块的头信息占用的空间)的文件称为小文件,反之就称为大文件。对于大文件,按照以下步骤完成文件数据的更新:Below, the file whose length is less than half the data size of the block (the space occupied by the header information of the block is removed) is called a small file, otherwise it is called a large file. For large files, follow the steps below to complete the update of file data:
步骤I,文件系统收到外部的更新文件数据的指令,读取要更新数据在文件中的偏移;Step 1, the file system receives an external instruction to update file data, and reads the offset of the data to be updated in the file;
步骤II,确定要更新的数据所属的数据块,假设需要找n个新块,若当前空间不够,先进行擦除整理操作;Step II, determine the data block to which the data to be updated belongs, assuming that n new blocks need to be found, if the current space is not enough, first perform the erasing operation;
步骤III,在空闲扇区中顺序找到n个新块,写入数据,数据更新过程完毕。Step III, find n new blocks sequentially in the free sector, write data, and the data update process is completed.
对于小文件的数据进行更新操作时,只需在其所在块的有效数据的末端写入日志信息,包括版本号和更新后的文件内容,可先写入更新后的文件内容,再写入版本号(非“FF”即可)。一旦该块日志区写满,则另找空白块存储该文件,流程与大文件更新流程相同。When updating the data of a small file, you only need to write log information at the end of the valid data of the block where it is located, including the version number and the updated file content. You can write the updated file content first, and then write the version number (not "FF"). Once the log area of the block is full, another blank block is found to store the file, and the process is the same as that of updating a large file.
上述方法根据智能卡类产品的文件特点,采用重写文件数据块和块内写更新日志相结合的方式,在保证擦除均衡的基础上尽量减少了擦除次数。According to the file characteristics of smart card products, the above method adopts the combination of rewriting the file data block and writing the update log in the block, and reduces the number of erasing as much as possible on the basis of ensuring the erasure balance.
文件数据的读取Reading of file data
文件创建后,读取文件数据的流程如图4所示,包括以下步骤:After the file is created, the process of reading file data is shown in Figure 4, including the following steps:
步骤410,文件系统收到外部的读取文件数据的指令,获取要读的文件的标识和要读的数据在该文件内部的偏移和长度;Step 410, the file system receives an external instruction to read file data, and obtains the identifier of the file to be read and the offset and length of the data to be read within the file;
步骤420,根据给出的偏移和长度确定要读的数据在文件的哪几个数据块中,根据文件标识和级联块号查询这些数据块所在块区号在空间映射表中的位置,并得到其所在块区号;Step 420, determine which data blocks in the file the data to be read is in according to the given offset and length, query the position of the block number of these data blocks in the space mapping table according to the file identifier and the concatenated block number, and Get the block number where it is located;
步骤430,根据文件标识和级联块号在查到的块区内查找该文件的数据块,并判断是否是存储在一个块中的小文件,如果是,执行下一步,否则执行步骤450;Step 430, search the data block of the file in the block area found according to the file identification and the concatenated block number, and judge whether it is a small file stored in a block, if yes, execute the next step, otherwise execute step 450;
步骤440,将该文件块的数据读入内存,再扫描文件尾部的日志区,将日志区内最新的数据覆盖内存,然后根据用户给的偏移和长度把用户要读的那一部分数据取出给用户,结束;Step 440, read the data of the file block into the memory, then scan the log area at the end of the file, overwrite the memory with the latest data in the log area, and then take out the part of the data that the user wants to read according to the offset and length given by the user. user, end;
步骤450,在各个块区内读出该文件的数据块,拼接好数据后给用户,结束。Step 450, read out the data blocks of the file in each block area, splice the data and send it to the user, and end.
本实施例文件系统的性能分析Performance analysis of the file system in this embodiment
如上所述,本实施例的硬件平台为64Ksmart flash,擦除扇区大小为64字节。文件存储的最小单元“块”的大小也是64字节,全片FLASH上共有1024个数据块,分为16个块区,每个块区有64个数据块。性能分析如下:As mentioned above, the hardware platform of this embodiment is 64Ksmart flash, and the erase sector size is 64 bytes. The size of the smallest unit "block" of file storage is also 64 bytes. There are 1024 data blocks in the whole FLASH, which are divided into 16 block areas, and each block area has 64 data blocks. The performance analysis is as follows:
A,文件存储方式的利用率A. Utilization of file storage methods
在本实施例中,一个块可存储4条FAT表记录,255个文件的FAT表区占用64块,FAT表区只占用了1个块区。In this embodiment, one block can store 4 FAT table records, the FAT table area of 255 files occupies 64 blocks, and the FAT table area only occupies 1 block area.
每个文件以一字节的文件索引为唯一标识,FLASH片上最多能存储254个文件,假设最极端的情况,一个文件浪费一个块,FLASH的存储利用率为(1024-254)/1024≈75%。B,文件系统管理占用RAM空间大小:Each file is uniquely identified by a one-byte file index, and a maximum of 254 files can be stored on a FLASH chip. Assuming the most extreme case, one file wastes one block, and the storage utilization ratio of FLASH is (1024-254)/1024≈75 %. B. The size of RAM space occupied by file system management:
空间映射表(最多的情况):1024/2=512字节Space mapping table (the most cases): 1024/2=512 bytes
文件索引号管理区:32(文件索引号)+1(目录索引号)=33字节File index number management area: 32 (file index number)+1 (directory index number)=33 bytes
共占用RAM空间545字节A total of 545 bytes of RAM space is occupied
C,系统运行速度C, system running speed
文件系统在上电进行系统初始化并进行掉电数据恢复操作过程中耗时最多。初始化过程需要扫描flash介质中的1024个数据块,填充空间映射表文件块信息,所需时间大约为2ms多。The file system consumes the most time during power-on system initialization and power-off data recovery. The initialization process needs to scan 1024 data blocks in the flash medium and fill the file block information of the space mapping table, and the required time is about 2ms.
由上可知,本发明方法在FLASH片上的文件FAT表记录中关于文件数据的信息只包含文件所占块的数量,没有块地址的相关信息。这样对于多数文件一旦创建后长度不会改变的文件系统而言,这种方式大大减少了文件FAT表区的擦除次数,保证了文件系统的安全性。同时,本发明采用FLASH文件FAT表和RAM空间映射表相结合的方式,提高了文件的检索效率。As can be seen from the above, the information about the file data in the file FAT table record on the FLASH chip of the present invention only includes the number of blocks occupied by the file, and there is no relevant information of the block address. In this way, for the file system whose length does not change after most files are created, this method greatly reduces the number of erasing times of the file FAT table area and ensures the security of the file system. At the same time, the present invention adopts the method of combining the FAT table of the FLASH file and the mapping table of the RAM space to improve the retrieval efficiency of the file.
本发明还提出了一种建立高效的空间映射表的方法,可以尽量少的占用RAM空间。因此,本发明方法在保证了文件系统运行效率和性能的基础上更为简单、可行,降低了产品成本,对于CPU和RAM资源较小的智能卡类产品而言是一个很好的解决方案。但需要强调的是,本发明具有通用性,也可以用于其他产品。The invention also proposes a method for establishing an efficient space mapping table, which can occupy as little RAM space as possible. Therefore, the method of the invention is simpler and more feasible on the basis of ensuring the operating efficiency and performance of the file system, and reduces the product cost. It is a good solution for smart card products with less CPU and RAM resources. However, it should be emphasized that the present invention has universality and can also be used for other products.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200410103980 CN1277213C (en) | 2004-12-31 | 2004-12-31 | A flash memory file system management method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200410103980 CN1277213C (en) | 2004-12-31 | 2004-12-31 | A flash memory file system management method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1632765A CN1632765A (en) | 2005-06-29 |
CN1277213C true CN1277213C (en) | 2006-09-27 |
Family
ID=34848198
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200410103980 Expired - Lifetime CN1277213C (en) | 2004-12-31 | 2004-12-31 | A flash memory file system management method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1277213C (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI417720B (en) * | 2009-05-06 | 2013-12-01 | Via Telecom Co Ltd | Flash memory managing methods and computing systems utilizing the same |
Families Citing this family (64)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100370445C (en) * | 2005-08-10 | 2008-02-20 | 北京中星微电子有限公司 | A data transmission apparatus and method based on file allocation table (FAT) |
CN100485681C (en) * | 2006-03-23 | 2009-05-06 | 北京握奇数据系统有限公司 | Smart card storage system and managing method for file creation in the system |
CN100517236C (en) | 2006-04-03 | 2009-07-22 | 北京握奇数据系统有限公司 | Smart card embedded operating system and its control method |
CN1936866A (en) * | 2006-08-18 | 2007-03-28 | 福昭科技(深圳)有限公司 | Flash memory body storing mechanism with data restoring function |
US8935302B2 (en) | 2006-12-06 | 2015-01-13 | Intelligent Intellectual Property Holdings 2 Llc | Apparatus, system, and method for data block usage information synchronization for a non-volatile storage volume |
US8266496B2 (en) * | 2006-12-06 | 2012-09-11 | Fusion-10, Inc. | Apparatus, system, and method for managing data using a data pipeline |
CN100535935C (en) | 2006-12-26 | 2009-09-02 | 北京握奇数据系统有限公司 | CPUCPU and logic encryption double-purpose smart card and its data synchronization method |
CN101241469B (en) * | 2007-02-05 | 2012-05-02 | 力博特公司 | Method and device for storing and reading data in embedded system |
KR100826654B1 (en) * | 2007-04-24 | 2008-05-06 | 주식회사 하이닉스반도체 | Operation method of flash memory device and control circuit for same |
CN101286157A (en) * | 2007-09-28 | 2008-10-15 | 深圳市天朗时代科技有限公司 | File retrieval method and apparatus and time stream file processor |
CN100517335C (en) * | 2007-10-25 | 2009-07-22 | 中国科学院计算技术研究所 | A file writing system and method for a distributed file system |
WO2009103182A1 (en) * | 2008-02-18 | 2009-08-27 | 中兴通讯股份有限公司 | Device for implementing u-disk function on nand flash memory of mobile terminal |
CN101751446A (en) | 2008-12-17 | 2010-06-23 | 深圳富泰宏精密工业有限公司 | File management system of flash memory and file management method thereof |
CN101783740B (en) * | 2009-01-21 | 2012-02-15 | 大唐移动通信设备有限公司 | Method and device for managing message file |
CN101526922B (en) * | 2009-04-03 | 2011-09-07 | 深圳市宝捷信科技有限公司 | Flash data access method and device thereof |
CN101539887B (en) * | 2009-05-06 | 2011-08-17 | 美商威睿电通公司 | Flash memory management method and computer system |
CN102103596B (en) * | 2009-12-18 | 2014-10-29 | 康佳集团股份有限公司 | method for implementing file system in embedded system |
CN101794306B (en) * | 2010-03-02 | 2012-10-24 | 华平信息技术股份有限公司 | Multi-type video file block storage system and method |
CN101853306A (en) * | 2010-06-11 | 2010-10-06 | 深圳市黄河数字技术有限公司 | Method for reading and writing hard disk storage |
CN102455982B (en) * | 2010-10-15 | 2014-12-03 | 慧荣科技股份有限公司 | Method for accessing data stored in a storage medium in an electronic device |
CN102004700A (en) * | 2010-11-26 | 2011-04-06 | 华为终端有限公司 | Memory space distribution method and device for flash memory |
WO2012083308A2 (en) | 2010-12-17 | 2012-06-21 | Fusion-Io, Inc. | Apparatus, system, and method for persistent data management on a non-volatile storage media |
TWI521343B (en) * | 2011-08-01 | 2016-02-11 | Toshiba Kk | An information processing device, a semiconductor memory device, and a semiconductor memory device |
CN102929884B (en) * | 2011-08-10 | 2016-05-04 | 阿里巴巴集团控股有限公司 | A kind of method and device that shrinks virtual disk image file |
CN102306125B (en) * | 2011-08-17 | 2016-04-06 | 深圳市共进电子股份有限公司 | A kind of data erasing-writing method of FLASH memory |
CN102508782B (en) * | 2011-09-29 | 2014-09-10 | 北京星网锐捷网络技术有限公司 | Data read-write method, data read-write device, memory bank and network equipment |
CN102567501B (en) * | 2011-12-22 | 2014-12-31 | 广州中大微电子有限公司 | File management system in small storage space |
CN103257831B (en) | 2012-02-20 | 2016-12-07 | 深圳市腾讯计算机系统有限公司 | The read/writing control method of memorizer and the memorizer of correspondence |
CN103714059B (en) * | 2012-09-28 | 2019-01-29 | 腾讯科技(深圳)有限公司 | A kind of method and device of more new data |
CN103257934B (en) * | 2013-04-12 | 2016-02-10 | 广东数字证书认证中心有限公司 | The storage of digital certificate, acquisition methods and device |
CN103258044B (en) * | 2013-05-24 | 2017-01-18 | 北京航天自动控制研究所 | Two-tuple NANDFLASH data file management method oriented to DSP |
CN103310008B (en) * | 2013-06-28 | 2018-06-01 | 安科智慧城市技术(中国)有限公司 | A kind of cloud control server and its file index method |
CN103678180B (en) * | 2013-11-29 | 2017-11-24 | 武汉天喻信息产业股份有限公司 | The management method of intelligent card nonvolatile memory |
CN103699337B (en) * | 2013-12-04 | 2017-01-18 | 华为技术有限公司 | Writing control method and system based on independent redundant array of independent disks (RAID) |
CN103645990B (en) * | 2013-12-24 | 2016-05-25 | 飞天诚信科技股份有限公司 | A kind of Data Update and read method based on large page Flash |
CN104156212A (en) * | 2014-08-08 | 2014-11-19 | 四川九成信息技术有限公司 | Program execution method |
CN104238962B (en) * | 2014-09-16 | 2018-02-06 | 华为技术有限公司 | The method and device of data is write into caching |
CN104281717B (en) * | 2014-10-31 | 2017-07-21 | 晶赞广告(上海)有限公司 | A kind of method for setting up magnanimity ID mapping relations |
CN105740287B (en) * | 2014-12-11 | 2019-09-10 | 中国航空工业集团公司第六三一研究所 | The creation method of the curable read-only file system in FLASH |
CN105808622A (en) * | 2014-12-31 | 2016-07-27 | 乐视网信息技术(北京)股份有限公司 | File storage method and device |
CN105159608B (en) * | 2015-08-28 | 2019-02-22 | 北京奇艺世纪科技有限公司 | It is a kind of for reading and writing the method and device of P2P data |
CN107544912B (en) * | 2016-06-29 | 2021-09-03 | 北京忆恒创源科技股份有限公司 | Log recording method, loading method and device |
CN106231252B (en) * | 2016-07-29 | 2019-04-05 | 银江股份有限公司 | A kind of extensive video monitoring storage method |
CN106776375A (en) * | 2016-12-27 | 2017-05-31 | 东方网力科技股份有限公司 | Data cache method and device inside a kind of disk |
CN113641630A (en) * | 2017-03-27 | 2021-11-12 | 珠海极海半导体有限公司 | FLASH memory |
CN107239526B (en) * | 2017-05-27 | 2020-11-13 | 河南思维轨道交通技术研究院有限公司 | File system implementation method, defragmentation method and operation position positioning method |
CN107908364B (en) * | 2017-11-13 | 2020-10-23 | 中国电子科技集团公司第三十研究所 | Embedded file system based on norflash |
CN114035749B (en) * | 2018-01-12 | 2023-02-28 | 珠海极海半导体有限公司 | Electronic equipment and Flash memory |
CN108228479B (en) * | 2018-01-29 | 2021-04-30 | 深圳市泰比特科技有限公司 | Embedded FLASH data storage method and system |
CN108681509B (en) * | 2018-04-20 | 2022-04-08 | 江苏华存电子科技有限公司 | A Method of Quickly Establishing Flash Mapping Table |
CN108710578B (en) * | 2018-04-20 | 2022-07-26 | 深圳市战音科技有限公司 | Data storage method and device based on flash memory |
CN108664577B (en) * | 2018-05-03 | 2021-03-12 | 中北大学 | A file management method and system based on FLASH free area |
CN108647278B (en) * | 2018-05-03 | 2021-07-02 | 中北大学 | A file management method and system |
CN111143284B (en) * | 2018-11-02 | 2023-06-20 | 浙江宇视科技有限公司 | Dynamic indexing method and device for file system |
CN109726176B (en) * | 2018-12-11 | 2022-12-06 | 河南辉煌科技股份有限公司 | Fast storage and query method of railway signal electrical equipment data |
CN110554842A (en) * | 2019-09-06 | 2019-12-10 | 华大半导体有限公司 | Method for simulating EEPROM (electrically erasable programmable read-Only memory) by using flash memory |
CN111324574B (en) * | 2020-02-25 | 2023-06-27 | 中国航空无线电电子研究所 | Block mapping file system supporting dynamic management |
CN114064093A (en) * | 2020-08-05 | 2022-02-18 | 卓品智能科技无锡有限公司 | A Recoverable Method Based on Flash to Simulate EEPROM Stored Data After Updating |
CN114546248A (en) * | 2020-11-26 | 2022-05-27 | 中移物联网有限公司 | A kind of memory file system and processing method of storage block |
CN112800005B (en) * | 2021-01-22 | 2023-01-03 | 中孚安全技术有限公司 | Deep inspection method, system, terminal and storage medium for file system |
CN113568868B (en) * | 2021-07-28 | 2024-02-06 | 重庆紫光华山智安科技有限公司 | File system management method, system, electronic equipment and medium |
CN113934371B (en) * | 2021-10-08 | 2024-04-12 | 福建星网视易信息系统有限公司 | Memory, data management method thereof and computer storage medium |
CN114327946A (en) * | 2021-12-24 | 2022-04-12 | 北京百度网讯科技有限公司 | Shared memory access control method and device, electronic equipment and automatic driving vehicle |
CN114327892B (en) * | 2021-12-28 | 2024-05-03 | 武汉天喻信息产业股份有限公司 | FLASH resource management method, storage medium, electronic equipment and device |
-
2004
- 2004-12-31 CN CN 200410103980 patent/CN1277213C/en not_active Expired - Lifetime
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI417720B (en) * | 2009-05-06 | 2013-12-01 | Via Telecom Co Ltd | Flash memory managing methods and computing systems utilizing the same |
Also Published As
Publication number | Publication date |
---|---|
CN1632765A (en) | 2005-06-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1277213C (en) | A flash memory file system management method | |
CN1195273C (en) | System and method for durable and firm allocation of storage device | |
CN1226687C (en) | Systems and methods for persistent and robust storage management | |
JP5350371B2 (en) | Method and system for storage address remapping for storage devices | |
CN1295622C (en) | Address mapping method and mapping information managing method for flash memory, and flash memory using the same | |
US7594062B2 (en) | Method for changing data of a data block in a flash memory having a mapping area, a data area and an alternative area | |
US7793068B2 (en) | Dual mode access for non-volatile storage devices | |
US7747837B2 (en) | Method and system for accessing non-volatile storage devices | |
JP4611024B2 (en) | Method and apparatus for grouping pages in a block | |
US20140068152A1 (en) | Method and system for storage address re-mapping for a multi-bank memory device | |
EP1988474A1 (en) | System and method of managing indexation of flash memory | |
CN1705936A (en) | Method and apparatus for splitting a logical block | |
US20070143570A1 (en) | Method and system for accessing non-volatile storage devices | |
CN1238846A (en) | Method for performing continuous over-write of file in nonvolatile memory | |
CN1658171A (en) | Faster writes to non-volatile memory by controlling frequently accessed sectors | |
CN1149487C (en) | Batch erasable nonvolatile memory and control method of flash memory | |
CN1967504A (en) | Device and method for controlling flash memory | |
CN1823327A (en) | Data area management method of information recording medium, information processing device using data area management method | |
CN1719422A (en) | Virtual access method of storage document data | |
CN1221888C (en) | Information processing device and program | |
CN1701300A (en) | Method and apparatus for decomposing physical blocks associated with a common logical block | |
CN1690983A (en) | System and method capable of sequentially writing data into flash memory | |
CN114398297A (en) | Storage method and storage device based on mixed address mapping | |
CN1213370C (en) | Non-volatile information storage management method | |
KR100801072B1 (en) | Flash memory, mapping device and method for same |
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 | ||
EE01 | Entry into force of recordation of patent licensing contract |
Application publication date: 20050629 Assignee: BEIJING DATANG SMART CARD TECHNOLOGY CO.,LTD. Assignor: DATANG MICROELECTRONICS TECHNOLOGY Co.,Ltd. Contract record no.: 2016110000008 Denomination of invention: A flash memory file system management method Granted publication date: 20060927 License type: Common License Record date: 20160422 |
|
LICC | Enforcement, change and cancellation of record of contracts on the licence for exploitation of a patent or utility model | ||
CX01 | Expiry of patent term | ||
CX01 | Expiry of patent term |
Granted publication date: 20060927 |