WO2009103182A1 - Device for implementing u-disk function on nand flash memory of mobile terminal - Google Patents

Device for implementing u-disk function on nand flash memory of mobile terminal Download PDF

Info

Publication number
WO2009103182A1
WO2009103182A1 PCT/CN2008/000362 CN2008000362W WO2009103182A1 WO 2009103182 A1 WO2009103182 A1 WO 2009103182A1 CN 2008000362 W CN2008000362 W CN 2008000362W WO 2009103182 A1 WO2009103182 A1 WO 2009103182A1
Authority
WO
WIPO (PCT)
Prior art keywords
file system
file
disk
flash memory
unit
Prior art date
Application number
PCT/CN2008/000362
Other languages
French (fr)
Chinese (zh)
Inventor
王志慧
谢仁艿
徐金禄
张欣
祁麟
段红乐
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to CN200880109710A priority Critical patent/CN101809544A/en
Priority to PCT/CN2008/000362 priority patent/WO2009103182A1/en
Publication of WO2009103182A1 publication Critical patent/WO2009103182A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0664Virtualisation aspects at device level, e.g. emulation of a storage device or system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory

Definitions

  • the present invention relates to the field of mobile terminal technologies, and in particular, to a non-linear flash memory of a mobile terminal.
  • the present invention has been made in view of the above problems. Accordingly, it is a primary object of the present invention to provide an apparatus for implementing a U disk function on a non-linear flash memory of a mobile terminal, including a FAT file system, including: A file system transfer unit, located between the FAT file system and the non-linear flash memory, for storing files in non-linear flash memory in FAT format and managing files, and for external computers to access non-linear flash memory through file system transfer units U disk area on.
  • the file system transmission unit may include: a file system transmission interface layer for providing an interface with the FAT file system; a file system transmission implementation layer for mapping the logical sector provided by the FAT file system to a physical fan on the non-linear flash memory And a non-linear flash interface layer for providing an interface to the non-linear flash memory to store files in a U disk area on the non-linear flash memory.
  • the apparatus according to the present invention may further comprise: a device identification unit for identifying a USB mass storage standard class device before the external computer accesses the U disk area on the non-linear flash memory.
  • the apparatus of the present invention may further comprise: a USB mass storage protocol unit for causing the file system transmission unit to communicate with an external computer via the USB mass storage protocol module.
  • the apparatus may further include: a U disk packet processing unit, configured to provide data received by the external computer to the data exchange unit and transmit the data processed by the data exchange unit to the external computer; and a data exchange unit, It is used to extract a small computer interface transmission command set from the received data, and perform corresponding processing according to the small computer interface transmission command set.
  • the received data and the transmitted data are in the form of command block packets. If the small computer interface transfers the command set to read and write operations, the logical sector of the FAT file system is read and written, and the logical sector is mapped to the physical sector of the non-linear flash memory by the file system transmission unit.
  • the device of the present invention may further include: a multi-file system implementation unit, configured to: when the mobile terminal has multiple file systems including the U disk file system and the main file system, hang the U disk file in an empty space of the main file system In the directory, specify the starting address of the U disk area, and map the file written to the logical address of the FAT file system to the U disk area through the file system transport layer to perform multiple file systems through the interface layer of the non-linear flash memory. access.
  • a multi-file system implementation unit configured to: when the mobile terminal has multiple file systems including the U disk file system and the main file system, hang the U disk file in an empty space of the main file system In the directory, specify the starting address of the U disk area, and map the file written to the logical address of the FAT file system to the U disk area through the file system transport layer to perform multiple file systems through the interface layer of the non-linear flash memory. access.
  • the device of the present invention may further include: an application layer access unit, configured to: when the application layer of the mobile terminal accesses the U disk area, specify a hanging directory of the U disk file, if the U disk file system determines that the mounted directory is U
  • the mount directory of the disk file is mapped to the physical address of the U extent i or the logical address of the file read and written by the file system transport layer in the FAT file system.
  • FIG. 1 is a block diagram showing an apparatus for implementing a U disk function on a non-linear flash memory of a mobile terminal according to the present invention
  • FIG. 2 is a diagram showing nonlinearity at a mobile terminal according to an embodiment of the present invention.
  • a flowchart of a method of implementing a USB flash drive function on a flash memory FIG. 3 is a flow chart showing an implementation of a user equipment side file system according to an embodiment of the present invention.
  • FIG. 4 is a diagram showing a PC in accordance with an embodiment of the present invention. Flowchart for data exchange with a USB flash drive;
  • FIG. 5 is a diagram showing common management of multiple file systems according to an embodiment of the present invention;
  • FIG. 6 is a flow chart showing a file operation of the U disk file system by the application layer in the embodiment of the present invention.
  • an apparatus for implementing a u disk function on a non-linear flash memory of a mobile terminal including a FAT file system 101, including: a file system transmission unit 10 2 disposed in the FAT file system 101 and the non-linear flash memory 103 For storing the file in the FAT format into the non-linear flash memory 103 and managing the file, and causing the external computer to access the U disk area on the non-linear flash memory 103 through the file system transfer unit 102.
  • the file system transmission unit 102 may include: a file system transmission interface layer for providing an interface with the FAT file system; a file system transmission implementation layer for mapping a logical sector provided by the FAT file system to a physics on the non-linear flash memory a sector; and a non-linear flash interface layer for providing an interface to the non-linear flash memory to store the file in a U disk area on the non-linear flash memory.
  • the apparatus according to the present invention may further comprise: a device identification unit for identifying a USB mass storage standard class device before the external computer accesses the U disk area on the non-linear flash memory.
  • the device may further comprise: a USB mass storage protocol unit for causing the file system transmission unit to communicate with an external computer through the USB mass storage protocol module.
  • the apparatus of the present invention may further include: a U disk packet processing unit, configured to: provide data received by the external computer to the data exchange unit and transmit the data processed by the data exchange unit to the external computer; and a data exchange unit, A small computer interface transmission command set is extracted from the received data, and corresponding processing is performed according to the small computer interface transmission command set.
  • the received data and the transmitted data are in the form of command block packets.
  • the device may further include: a multi-file system implementation unit, configured to mount the U disk file in the main file system when the mobile terminal has multiple file systems including the U disk file system and the main file system In an empty directory, specify the starting address of the U disk i or the file, and map the file written to the logical address of the FAT file system to the U disk area through the file system transport layer to interface multiple layers through the non-linear flash memory.
  • the file system is accessed in 4 pages.
  • the device may further include: an application layer access unit, configured to: when the application layer of the mobile terminal accesses the U disk area, specify a hanging directory of the U disk file, if the U disk file system
  • the system determines that the mount directory is the mount directory of the u disk file, and the logical address of the file read and written by the file system transport layer in the FAT file system is mapped to the physical address of the U disk area.
  • 2 is a flow chart showing a method of implementing a u disk function on a non-linear flash memory of a mobile terminal in accordance with an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps: S202.
  • the FAT file system mainly organizes and manages files according to the FAT format, and presents them to the FTL layer in the form of logical sectors.
  • the FTL 4 bar logical sector is mapped into the physical sector of NANDFLASH, and at the same time, garbage collection, bad block detection, etc., read and write operations on NANDFLASH.
  • FIG. 3 is a flow chart showing an implementation of a user equipment side file system according to an embodiment of the present invention. As shown in FIG. 3, the method includes the following steps:
  • the mobile terminal needs to store files and organizes them through the FAT file system.
  • the specific implementation layer of FTL maps the logical block address provided by the file system to the actual physical address, garbage collection, bad block detection, etc., and 4 bar file information is stored in NANDFLASH.
  • a flow chart of data exchange between a PC and a USB flash drive according to an embodiment of the present invention is shown. As shown in FIG. 4, the method includes the following steps: USB and PC are connected normally before implementing the following steps, USB The USB mass storage device is properly enumerated.
  • the U disk data packet processing module receives the data from the PC on the one hand, and sends the processed result to the USB 4 mobile layer on the other hand.
  • the data packet sent by the PC to the mobile terminal is presented in the form of a command block wrapper (CBW, Command Block Wrapper).
  • CBW command Block Wrapper
  • the CBW package is a command sent from the USB Host to the device, here the SCSI transfer command set.
  • the USB device needs to extract the SCSI command from the CBW, execute the corresponding command, and send a response to the Host after completion.
  • the terminal is transferred to the physical sector address through the FTL layer.
  • NANDFLASH performs read and write operations.
  • NANDFLASH reads and writes, returns the correct result. S416. If it is not a read or write operation, it returns the correct result after executing the command.
  • FIG. 5 is a flow chart showing the common management of NAND FLASH by various file systems in accordance with an embodiment of the present invention. As shown in FIG. 5, the method includes the following steps: First, the U disk file system coexists with other file systems, so two logical devices are presented on the NANDFLASH, and the U disk file is mounted in an empty directory of the main file system. under.
  • FIG. 6 is a flow chart showing a file operation of a U disk file system by an application layer according to an embodiment of the present invention.
  • the application layer accesses the U disk through the file manager to perform related operations on the file.
  • S602. When performing related operations on the file, you need to specify the mount directory of the USB flash drive. This directory is created by the primary file system.
  • S604. The file system judges according to the path. If it is a hanging directory of the U disk, the file is organized and managed according to the FAT file system.
  • the logical address of the FTL layer is read and converted into the actual physical address, and the information about the 4 bar file is stored in the NANDFLASH physical space.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A device for implementing U-disk (USB flash drive disk) function on the NAND flash memory of mobile terminal is provided. The device includes a FAT file system, and a file system transport unit between the FAT file system and the NAND flash memory for saving the files on the NAND flash memory by FAT format and managing the files, and making the external computer access the U-disk area on NAND flash memory by the file system transport unit. Then, the effectiveness of the NAND flash memory of the mobile terminal is improved, and the practicability of the mobile telephone is increased.

Description

在移动终端的非线性闪存上实现 U盘功能的装置 技术领域 本发明涉及移动终端技术领域, 尤其是涉及移动终端的非线性闪存 TECHNICAL FIELD The present invention relates to the field of mobile terminal technologies, and in particular, to a non-linear flash memory of a mobile terminal.
( NANDFLASH ) 上 U盘的实现方法。 背景技术 随着现代信息社会的飞速发展, 手机等移动终端设备逐渐成为人们工 作、 生活中必不可少的通信工具, U盘做为移动终端的一种功能也越来越成 为人们的需求。 移动终端除了在 T卡、 SD卡上实现 U盘的功能, 还可以在移动终端本 地闪存上提供 U盘存储功能。 NANDFLASH因为其大容量、 低成本等特性, 得到越来越广泛的应用。 目前移动终端 U盘的实现方法主要为: (NANDFLASH) The implementation method of the U disk. BACKGROUND OF THE INVENTION With the rapid development of the modern information society, mobile terminal devices such as mobile phones have gradually become an indispensable communication tool for people's work and life, and U disk as a function of mobile terminals has become more and more demanded by people. In addition to realizing the function of the U disk on the T card and the SD card, the mobile terminal can also provide the U disk storage function on the local flash memory of the mobile terminal. NANDFLASH is getting more and more widely used because of its large capacity and low cost. At present, the implementation methods of the mobile terminal U disk are mainly as follows:
1 )多媒体芯片上外挂存储卡的形式。 这样手机要依赖存储卡才能和 PC 机进行数据交互。 2 )多媒体芯片自带 NAND控制器, 实现 NANDFLASH上的 U盘功能。 但是这种方法存在以下问题: 1) The form of an external memory card on the multimedia chip. In this way, the mobile phone relies on the memory card to perform data interaction with the PC. 2) The multimedia chip comes with a NAND controller to realize the U disk function on NANDFLASH. However, this method has the following problems:
1.受到多媒体芯片的限制; 1. Limited by multimedia chips;
2.会造成 NANDFLASH的利用率低; 2. Will cause low utilization of NANDFLASH;
3.针对 NANDFLASH的文件***, 例如 jffs2, yaffs等, PC机无法识 别, 而 FAT文件***本身无法直接管理 NANDFLASH这种存储设备。 发明内容 考虑到上述问题而做出本发明, 为此, 本发明的主要目的在于, 提供一 种在移动终端的非线性闪存上实现 U盘功能的装置, 包括 FAT文件系,统, 其 包括: 文件***传输单元, 设置在 FAT 文件***与非线性闪存之间, 用于将 文件以 FAT格式存储到非线性闪存中并对文件进行管理, 以及使外部计算机 通过文件***传输单元来访问非线性闪存上的 U盘区域。 该文件***传输单元可以包括: 文件***传输接口层, 用于提供与 FAT 文件***的接口; 文件***传输实现层, 用于将 FAT文件***提供的逻辑扇 区映射成非线性闪存上的物理扇区; 以及非线性闪存接口层, 用于提供与非 线性闪存的接口, 来将文件存储到非线性闪存上的 U盘区域中。 才艮据本发明的装置还可以包括: 装置识别单元, 用于在外部计算机访问 非线性闪存上的 U盘区域之前, 识别出 USB海量存储标准类设备。 居本发明的装置还可以包括: USB 海量存储协议单元, 用于使文件 ***传输单元通过 USB海量存储协议模块与外部计算机进行通信。 才艮据本发明的装置还可以包括: U盘数据包处理单元, 用于将外部计算 机接收的数据提供给数据交换单元并将数据交换单元处理后的数据发送回外 部计算机; 以及数据交换单元, 用于从所接收的数据中提取小型计算机接口 传输命令集, 并根据小型计算机接口传输命令集执行相应处理。 接收的数据和发送的数据均为命令块包的形式。 如果小型计算机接口传输命令集为读写操作, 则对 FAT 文件***的逻 辑扇区进行读写操作, 并通过文件***传输单元将逻辑扇区映射成非线性闪 存的物理扇区。 居本发明的装置还可以包括: 多文件***实现单元, 用于当移动终端 存在包括 U盘文件***和主文件***的多个文件***时,将 U盘文件挂栽在 主文件***的一个空目录下, 指定 U盘区域的起始地址, 并通过文件***传 输层将写入到 FAT文件***的逻辑地址的文件映射到 U盘区域,以通过非线 性闪存的接口层对多个文件***进行访问。 居本发明的装置还可以包括: 应用层访问单元, 用于当移动终端的应 用层对 U盘区域进行访问时, 指定 U盘文件的挂栽目录, 如果 U盘文件系 统确定挂载目录为 U盘文件的挂载目录, 则通过文件***传输层将进行读写 操作的文件在 FAT文件***中的逻辑地址映射成 U盘区 i或的物理地址。 通过上述技术方案, 在移动终端上的 NANDFLASH上实现了 U盘的功 能, 根据 NANDFLASH大容量的特性, 把 NANDFLASH上一部分区域做为 U盘管理区域。 移动终端可以通过 FAT格式对文件进行存储, 这样 PC机可 以识别 U 盘管理区域的文件格式, 实现 U 盘的功能。 这样, 移动终端对 NANDFLASH 利用率增加了, 又提高了手机的实用性。 本发明的其它特征和优点将在随后的说明书中阐述, 并且, 部分地从说 明书中变得显而易见, 或者通过实施本发明而了解。 本发明的目的和其他优 点可通过在所写的说明书、 权利要求书、 以及附图中所特别指出的结构来实 现和获得。 附图说明 附图用来提供对本发明的进一步理解, 并且构成说明书的一部分, 与本 发明的实施例一起用于解释本发明, 并不构成对本发明的限制。 在附图中: 图 1是示出了根据本发明的在移动终端的非线性闪存上实现 U盘功能 的装置的方框图; 图 2 是示出了 居本发明实施例的在移动终端的非线性闪存上实现 U 盘功能的方法的流程图; 图 3 是示出了根据本发明实施例的用户设备侧文件***的实现的流程 图; 图 4是示出了根据本发明实施例的在 PC机和 U盘之间进行数据交流的 流程图; 图 5 是示出 了 ^据本发明实施例的多种文件***共同管理3. For NANDFLASH file systems, such as jffs2, yaffs, etc., PCs are not recognized, and the FAT file system itself cannot directly manage NANDFLASH storage devices. SUMMARY OF THE INVENTION The present invention has been made in view of the above problems. Accordingly, it is a primary object of the present invention to provide an apparatus for implementing a U disk function on a non-linear flash memory of a mobile terminal, including a FAT file system, including: A file system transfer unit, located between the FAT file system and the non-linear flash memory, for storing files in non-linear flash memory in FAT format and managing files, and for external computers to access non-linear flash memory through file system transfer units U disk area on. The file system transmission unit may include: a file system transmission interface layer for providing an interface with the FAT file system; a file system transmission implementation layer for mapping the logical sector provided by the FAT file system to a physical fan on the non-linear flash memory And a non-linear flash interface layer for providing an interface to the non-linear flash memory to store files in a U disk area on the non-linear flash memory. The apparatus according to the present invention may further comprise: a device identification unit for identifying a USB mass storage standard class device before the external computer accesses the U disk area on the non-linear flash memory. The apparatus of the present invention may further comprise: a USB mass storage protocol unit for causing the file system transmission unit to communicate with an external computer via the USB mass storage protocol module. The apparatus according to the present invention may further include: a U disk packet processing unit, configured to provide data received by the external computer to the data exchange unit and transmit the data processed by the data exchange unit to the external computer; and a data exchange unit, It is used to extract a small computer interface transmission command set from the received data, and perform corresponding processing according to the small computer interface transmission command set. The received data and the transmitted data are in the form of command block packets. If the small computer interface transfers the command set to read and write operations, the logical sector of the FAT file system is read and written, and the logical sector is mapped to the physical sector of the non-linear flash memory by the file system transmission unit. The device of the present invention may further include: a multi-file system implementation unit, configured to: when the mobile terminal has multiple file systems including the U disk file system and the main file system, hang the U disk file in an empty space of the main file system In the directory, specify the starting address of the U disk area, and map the file written to the logical address of the FAT file system to the U disk area through the file system transport layer to perform multiple file systems through the interface layer of the non-linear flash memory. access. The device of the present invention may further include: an application layer access unit, configured to: when the application layer of the mobile terminal accesses the U disk area, specify a hanging directory of the U disk file, if the U disk file system determines that the mounted directory is U The mount directory of the disk file is mapped to the physical address of the U extent i or the logical address of the file read and written by the file system transport layer in the FAT file system. Through the above technical solution, the U disk is implemented on the NANDFLASH on the mobile terminal. Yes, according to the large-capacity characteristics of NANDFLASH, a part of the NANDFLASH area is used as the U disk management area. The mobile terminal can store the file in the FAT format, so that the PC can recognize the file format of the U disk management area and realize the function of the U disk. In this way, the NANDFLASH utilization rate of the mobile terminal is increased, and the practicality of the mobile phone is improved. Other features and advantages of the invention will be set forth in the description which follows, and The objectives and other advantages of the invention will be realized and attained by the <RTI The drawings are intended to provide a further understanding of the invention, and are intended to be a part of the description of the invention. In the drawings: FIG. 1 is a block diagram showing an apparatus for implementing a U disk function on a non-linear flash memory of a mobile terminal according to the present invention; FIG. 2 is a diagram showing nonlinearity at a mobile terminal according to an embodiment of the present invention. A flowchart of a method of implementing a USB flash drive function on a flash memory; FIG. 3 is a flow chart showing an implementation of a user equipment side file system according to an embodiment of the present invention; FIG. 4 is a diagram showing a PC in accordance with an embodiment of the present invention. Flowchart for data exchange with a USB flash drive; FIG. 5 is a diagram showing common management of multiple file systems according to an embodiment of the present invention;
NANDFLASH的 程图; 以及 图 6是示出了 居本发明实施例的应用层对 u盘文件***进行文件操 作的流程图。 具体实施方式 以下结合附图对本发明的优选实施例进行说明, 应当理解, 此处所描述 的优选实施例仅用于说明和解释本发明, 并不用于限定本发明。 参照图 1 , 提供一种在移动终端的非线性闪存上实现 u盘功能的装置, 包括 FAT文件*** 101 , 其包括: 文件***传输单元 102, 设置在 FAT文件*** 101 与非线性闪存 103 之间, 用于将文件以 FAT格式存储到非线性闪存 103中并对文件进行管理, 以及使外部计算机通过文件***传输单元 102来访问非线性闪存 103上的 U 盘区域。 该文件***传输单元 102可以包括: 文件***传输接口层, 用于提供与 FAT文件***的接口; 文件***传输实现层, 用于将 FAT文件***提供的逻 辑扇区映射成非线性闪存上的物理扇区; 以及非线性闪存接口层, 用于提供 与非线性闪存的接口, 来将文件存储到非线性闪存上的 U盘区域中。 才艮据本发明的装置还可以包括: 装置识别单元, 用于在外部计算机访问 非线性闪存上的 U盘区域之前, 识别出 USB海量存储标准类设备。 才艮据本发明的装置还可以包括: USB 海量存储协议单元, 用于使文件 ***传输单元通过 USB海量存储协议模块与外部计算机进行通信。 居本发明的装置还可以包括: U盘数据包处理单元, 用于将外部计算 机接收的数据提供给数据交换单元并将数据交换单元处理后的数据发送回外 部计算机; 以及数据交换单元, 用于从所接收的数据中提取小型计算机接口 传输命令集, 并根据小型计算机接口传输命令集执行相应处理。 接收的数据和发送的数据均为命令块包的形式。 如果小型计算机接口传输命令集为读写操作, 则对 FAT 文件***的逻 辑扇区进行读写操作, 并通过文件***传输单元将逻辑扇区映射成非线性闪 存的物理扇区。 才艮据本发明的装置还可以包括: 多文件***实现单元, 用于当移动终端 存在包括 U盘文件***和主文件***的多个文件***时,将 U盘文件挂载在 主文件***的一个空目录下, 指定 U盘区 i或的起始地址, 并通过文件***传 输层将写入到 FAT文件***的逻辑地址的文件映射到 U盘区域,以通过非线 性闪存的接口层对多个文件***进 4亍访问。 才艮据本发明的装置还可以包括: 应用层访问单元, 用于当移动终端的应 用层对 U盘区域进行访问时, 指定 U盘文件的挂栽目录, 如果 U盘文件系 统确定挂栽目录为 u盘文件的挂栽目录, 则通过文件***传输层将进行读写 操作的文件在 FAT文件***中的逻辑地址映射成 U盘区域的物理地址。 图 2 是示出了 居本发明实施例的在移动终端的非线性闪存上实现 u 盘功能的方法的流程图。 如图 2所示, 该方法包括以下步骤: S202. FAT文件***主要是按照 FAT格式对文件进行组织管理, 以逻辑 扇区的形式呈现给 FTL层。 A flowchart of NANDFLASH; and FIG. 6 is a flow chart showing a file operation of the U disk file system by the application layer in the embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The preferred embodiments of the present invention are described with reference to the accompanying drawings. Referring to FIG. 1, an apparatus for implementing a u disk function on a non-linear flash memory of a mobile terminal is provided, including a FAT file system 101, including: a file system transmission unit 10 2 disposed in the FAT file system 101 and the non-linear flash memory 103 For storing the file in the FAT format into the non-linear flash memory 103 and managing the file, and causing the external computer to access the U disk area on the non-linear flash memory 103 through the file system transfer unit 102. The file system transmission unit 102 may include: a file system transmission interface layer for providing an interface with the FAT file system; a file system transmission implementation layer for mapping a logical sector provided by the FAT file system to a physics on the non-linear flash memory a sector; and a non-linear flash interface layer for providing an interface to the non-linear flash memory to store the file in a U disk area on the non-linear flash memory. The apparatus according to the present invention may further comprise: a device identification unit for identifying a USB mass storage standard class device before the external computer accesses the U disk area on the non-linear flash memory. The device according to the present invention may further comprise: a USB mass storage protocol unit for causing the file system transmission unit to communicate with an external computer through the USB mass storage protocol module. The apparatus of the present invention may further include: a U disk packet processing unit, configured to: provide data received by the external computer to the data exchange unit and transmit the data processed by the data exchange unit to the external computer; and a data exchange unit, A small computer interface transmission command set is extracted from the received data, and corresponding processing is performed according to the small computer interface transmission command set. The received data and the transmitted data are in the form of command block packets. If the small computer interface transfers the command set to read and write operations, the logical sector of the FAT file system is read and written, and the logical sector is mapped to the physical sector of the non-linear flash memory by the file system transmission unit. The device according to the present invention may further include: a multi-file system implementation unit, configured to mount the U disk file in the main file system when the mobile terminal has multiple file systems including the U disk file system and the main file system In an empty directory, specify the starting address of the U disk i or the file, and map the file written to the logical address of the FAT file system to the U disk area through the file system transport layer to interface multiple layers through the non-linear flash memory. The file system is accessed in 4 pages. The device according to the present invention may further include: an application layer access unit, configured to: when the application layer of the mobile terminal accesses the U disk area, specify a hanging directory of the U disk file, if the U disk file system The system determines that the mount directory is the mount directory of the u disk file, and the logical address of the file read and written by the file system transport layer in the FAT file system is mapped to the physical address of the U disk area. 2 is a flow chart showing a method of implementing a u disk function on a non-linear flash memory of a mobile terminal in accordance with an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps: S202. The FAT file system mainly organizes and manages files according to the FAT format, and presents them to the FTL layer in the form of logical sectors.
S204. FTL 4巴逻辑扇区映射成 NANDFLASH的物理扇区, 同时进行垃 圾回收, 坏块检测等, 对 NANDFLASH进行读写操作。 S204. The FTL 4 bar logical sector is mapped into the physical sector of NANDFLASH, and at the same time, garbage collection, bad block detection, etc., read and write operations on NANDFLASH.
S206. 当移动终端以存储设备的形式和 PC机通讯的时候, U盘数据包 处理模块分析来自 PC机的数据包,通过分析出来的 SCSI指令进行相应的操 作, 然后 4巴执行状态通过 USB返回给 PC机。 其中, 移动终端作为存储设备和 PC 机进行通讯的时候, 首先要保证 USB芯片的正常工作, 识别出 USB mass storage标准类设备。 图 3 是示出了根据本发明实施例的用户设备侧文件***的实现的流程 图。 如图 3所示, 该方法包括以下步骤: S206. When the mobile terminal communicates with the PC in the form of a storage device, the U disk data packet processing module analyzes the data packet from the PC, performs corresponding operations through the analyzed SCSI command, and then returns the status of the 4 bar through the USB. Give the PC. Among them, when the mobile terminal communicates as a storage device and a PC, it is first necessary to ensure the normal operation of the USB chip and identify the USB mass storage standard device. FIG. 3 is a flow chart showing an implementation of a user equipment side file system according to an embodiment of the present invention. As shown in FIG. 3, the method includes the following steps:
S302. 移动终端需要进行文件的存储,是通过 FAT文件***进行组织管 理的。 S302. The mobile terminal needs to store files and organizes them through the FAT file system.
S304至 S306. 提供了 FAT文件***和 FTL的接口层管理。 S304 to S306. Interface layer management of FAT file system and FTL is provided.
S308和 S310. FTL的具体的实现层, 把文件***提供的逻辑块地址映 射成实际的物理地址, 进^ "垃圾回收, 坏块检测等, 同时 4巴文件信息存储到 NANDFLASH中。 图 4是示出了根据本发明实施例的在 PC机和 U盘之间进行数据交流的 流程图。 如图 4所示, 该方法包括以下步骤: 在实施以下步骤之前, USB和 PC机连接正常, USB正确枚举出 USB mass storage设备。 S308 and S310. The specific implementation layer of FTL maps the logical block address provided by the file system to the actual physical address, garbage collection, bad block detection, etc., and 4 bar file information is stored in NANDFLASH. A flow chart of data exchange between a PC and a USB flash drive according to an embodiment of the present invention is shown. As shown in FIG. 4, the method includes the following steps: USB and PC are connected normally before implementing the following steps, USB The USB mass storage device is properly enumerated.
S402. U盘数据包处理模块, 一方面接收来自于 PC机的数据, 另一方 面向 USB 4区动层发送处理之后的结果。 S404. PC 机向移动终端发送的数据包以命令块包 (CBW , Command Block Wrapper ) 的形式呈现。 S402. The U disk data packet processing module receives the data from the PC on the one hand, and sends the processed result to the USB 4 mobile layer on the other hand. S404. The data packet sent by the PC to the mobile terminal is presented in the form of a command block wrapper (CBW, Command Block Wrapper).
S406. CBW包是从 USB Host 发送到设备的命令, 这里为 SCSI传输命 令集。 USB设备需要将 SCSI命令从 CBW中提取出来, 执行相应的命令, 完成以后, 向 Host发出反映。 S406. The CBW package is a command sent from the USB Host to the device, here the SCSI transfer command set. The USB device needs to extract the SCSI command from the CBW, execute the corresponding command, and send a response to the Host after completion.
S408. 如果需要进行读写的操作, 读写的是逻辑扇区。 S408. If a read/write operation is required, the logical sector is read and written.
S410. 终端通过 FTL层转^ ^成物理扇区地址。 S410. The terminal is transferred to the physical sector address through the FTL layer.
S412. NANDFLASH进行读写操作。 S412. NANDFLASH performs read and write operations.
S414. NANDFLASH读写完毕, 返回正确结果 S416. 如果不是读写操作, 执行完命令后返回正确结果。 S414. NANDFLASH reads and writes, returns the correct result. S416. If it is not a read or write operation, it returns the correct result after executing the command.
S418. 以 CSW包的形式向 PC机返回执行结果, Host根据 CSW来决定 是否继续发送下一个 CBW或是数据。 图 5 是示出 了根据本发明实施例的多种文件***共同管理 NANDFLASH的流程图。 如图 5所示, 该方法包括以下步骤: 首先 U盘文件***和其他文件***并存 , 因此在 NANDFLASH上呈现 的是两个逻辑设备, U盘文件系挂载在主文件***的某个空目录下。 S418. The execution result is returned to the PC in the form of a CSW package, and the Host determines whether to continue to send the next CBW or data according to the CSW. Figure 5 is a flow chart showing the common management of NAND FLASH by various file systems in accordance with an embodiment of the present invention. As shown in FIG. 5, the method includes the following steps: First, the U disk file system coexists with other file systems, so two logical devices are presented on the NANDFLASH, and the U disk file is mounted in an empty directory of the main file system. under.
S502. 指定 U盘管理区域的起始块地址,把上层传过来的地址映射到 U 盘区域。 S502. Specify the starting block address of the U disk management area, and map the address transmitted from the upper layer to the U disk area.
S504. 通过统一的 NANDFLASH的驱动接口访问闪存上不同的逻辑设 备区域。 图 6是示出了根据本发明实施例的应用层对 U盘文件***进行文件操 作的流程图。 如图 6所示, 当终端上层应用层需要对 U盘的文件进行访问的 时候, 按照以下步骤处理: 首先: 应用层通过文件管理器, 访问 U盘, 进行文件的相关的操作。 S602. 在进行文件的相关操作的时候, 需要指定 U盘的挂栽目录, 此目 录是通过主文件***创建的。 S604. 文件***根据路径判断, 如果是 U盘的挂栽目录, 根据 FAT文 件***进行文件的组织管理。 S504. Accessing different logical device areas on the flash memory through a unified NANDFLASH drive interface. 6 is a flow chart showing a file operation of a U disk file system by an application layer according to an embodiment of the present invention. As shown in Figure 6, when the upper layer application layer of the terminal needs to access the files of the U disk, the following steps are processed: First: The application layer accesses the U disk through the file manager to perform related operations on the file. S602. When performing related operations on the file, you need to specify the mount directory of the USB flash drive. This directory is created by the primary file system. S604. The file system judges according to the path. If it is a hanging directory of the U disk, the file is organized and managed according to the FAT file system.
S606. 通过 FTL 层^ 读写扇区的逻辑地址转化成实际的物理地址, 4巴 文件的相关信息存储到 NANDFLASH物理空间上。 通过以上几个部分, 实现移动终端的 NANDFLASH上 U盘的功能, 此 发明方便了移动终端用户, 增加了移动终端对 NANDFLASH 利用率, 又提 高了手机的实用性。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本 领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和 原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护 范围之内。 S606. The logical address of the FTL layer is read and converted into the actual physical address, and the information about the 4 bar file is stored in the NANDFLASH physical space. Through the above parts, the function of the U disk on the NANDFLASH of the mobile terminal is realized, and the invention facilitates the mobile terminal user, increases the utilization ratio of the NAND FLASH of the mobile terminal, and improves the practicability of the mobile phone. The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims

权 利 要 求 书 一种在移动终端的非线性闪存上实现 U盘功能的装置, 包括 FAT文件系 统, 其特征在于, 还包括: A device for implementing a USB flash drive function on a non-linear flash memory of a mobile terminal, including a FAT file system, further comprising:
文件***传输单元, 设置在所述 FAT 文件***与所述非线性闪存 之间, 用于^ 1文件以 FAT格式存储到所述非线性闪存中并对所述文件进 行管理, 以及使外部计算机通过所述文件***传输单元来访问所述非线 性闪存上的 U盘区域。 根据权利要求 1所述的装置, 其特征在于, 所述文件***传输单元包括: 文件***传输接口层, 用于提供与所述 FAT文件***的接口; 文件***传输实现层, 用于将所述 FAT 文件***提供的逻辑扇区 映射成所述非线性闪存上的物理扇区; 以及 File transfer system unit is disposed between the FAT file system and the linear flash memory, for 1 ^ to the file storage flash memory and said non-linear file managed in the FAT format, and the external computer through The file system transport unit accesses a U disk area on the non-linear flash memory. The device according to claim 1, wherein the file system transmission unit comprises: a file system transmission interface layer for providing an interface with the FAT file system; a file system transmission implementation layer, The logical sectors provided by the FAT file system are mapped to physical sectors on the non-linear flash memory;
非线性闪存接口层, 用于提供与所述非线性闪存的接口, 来将所述 文件存储到所述非线性闪存上的所述 U盘区域中。 根据权利要求 2所述的装置, 其特征在于, 还包括:  A non-linear flash interface layer for providing an interface with the non-linear flash memory to store the file in the U disk area on the non-linear flash memory. The device according to claim 2, further comprising:
装置识别单元,用于在所述外部计算机访问所述非线性闪存上的所 述 U盘区域之前, 识别出 USB海量存储标准类设备。 根据权利要求 3所述的装置, 其特征在于, 还包括:  And a device identification unit, configured to identify a USB mass storage standard class device before the external computer accesses the U disk area on the non-linear flash memory. The device according to claim 3, further comprising:
USB 海量存储协议单元, 用于使所述文件***传输单元通过所述 USB海量存储协议模块与所述外部计算机进行通信。 根据权利要求 4所述的装置, 其特征在于, 还包括:  And a USB mass storage protocol unit, configured to enable the file system transmission unit to communicate with the external computer through the USB mass storage protocol module. The device according to claim 4, further comprising:
U盘数据包处理单元,用于将所述外部计算机接收的数据提供给数 据交换单元并将所述数据交换单元处理后的数据发送回所述外部计算 机; 以及  a U disk packet processing unit for providing data received by the external computer to the data exchange unit and transmitting the data processed by the data exchange unit back to the external computer;
所述数据交换单元,用于从所接收的数据中提取小型计算机接口传 输命令集, 并根据所述小型计算机接口传输命令集执行相应处理。 根据权利要求 5所述的装置, 其特征在于, 所述接收的数据和所述发送 的数据均为命令块包的形式。 根据权利要求 6所述的装置, 其特征在于, 如果所述小型计算机接口传 输命令集为读写操作,则对所迷 FAT文件***的逻辑扇区进行读写操作, 并通过所述文件***传输单元将所述逻辑扇区映射成所述非线性闪存的 所述物理扇区。 根据权利要求 2所迷的装置, 其特征在于, 还包括: The data exchange unit is configured to extract a small computer interface transmission command set from the received data, and perform corresponding processing according to the small computer interface transmission command set. The apparatus according to claim 5, wherein said received data and said transmitted data are in the form of a command block packet. The apparatus according to claim 6, wherein if the small computer interface transmission command set is a read/write operation, the logical sector of the FAT file system is read and written, and transmitted through the file system. A unit maps the logical sector to the physical sector of the non-linear flash. The device according to claim 2, further comprising:
多文件***实现单元, 用于当所述移动终端存在包括 U 盘文件系 统和主文件***的多个文件***时, 将 U盘文件挂载在所述主文件*** 的一个空目录下, 指定所述 U盘区域的起始地址, 并通过所述文件*** 传输层将写入到所述 FAT文件***的所述逻辑地址的所述文件映射到所 述 U盘区域,以通过所述非线性闪存的接口层对多个文件***进行访问。 根据权利要求 8所迷的装置, 其特征在于, 还包括:  a multi-file system implementation unit, configured to: when the mobile terminal has multiple file systems including a U disk file system and a main file system, mount the U disk file in an empty directory of the primary file system, Determining a starting address of the U disk area, and mapping the file written to the logical address of the FAT file system to the U disk area by the file system transport layer to pass the non-linear flash memory The interface layer accesses multiple file systems. The device according to claim 8, further comprising:
应用层访问单元, 用于当所述移动终端的应用层对所述 U 盘区域 进行访问时, 指定所述 U盘文件的挂载目录, 如果所述 U盘文件***确 定所述挂载目录为所述 U盘文件的挂载目录, 则通过所述文件***传输 层将进行读写操作的所述文件在所述 FAT文件***中的所述逻辑地址映 射成所述 U盘区域的物理地址。  An application layer access unit, configured to: when the application layer of the mobile terminal accesses the U disk area, specify a mount directory of the U disk file, if the U disk file system determines that the mount directory is The mount directory of the U disk file is mapped to the physical address of the U disk area by the file system to perform read and write operations on the logical address of the file in the FAT file system.
PCT/CN2008/000362 2008-02-18 2008-02-18 Device for implementing u-disk function on nand flash memory of mobile terminal WO2009103182A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN200880109710A CN101809544A (en) 2008-02-18 2008-02-18 Device for implementing u-disk function on nand flash memory of mobile terminal
PCT/CN2008/000362 WO2009103182A1 (en) 2008-02-18 2008-02-18 Device for implementing u-disk function on nand flash memory of mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2008/000362 WO2009103182A1 (en) 2008-02-18 2008-02-18 Device for implementing u-disk function on nand flash memory of mobile terminal

Publications (1)

Publication Number Publication Date
WO2009103182A1 true WO2009103182A1 (en) 2009-08-27

Family

ID=40985034

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2008/000362 WO2009103182A1 (en) 2008-02-18 2008-02-18 Device for implementing u-disk function on nand flash memory of mobile terminal

Country Status (2)

Country Link
CN (1) CN101809544A (en)
WO (1) WO2009103182A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109697030A (en) * 2018-12-12 2019-04-30 江西电力职业技术学院 USB flash disk restoring method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1632765A (en) * 2004-12-31 2005-06-29 大唐微电子技术有限公司 A flash memory file system management method
CN1300711C (en) * 2003-04-30 2007-02-14 日商.萩原科技股份有限公司 Usb storage device and program
CN101002274A (en) * 2004-07-22 2007-07-18 赛普拉斯半导体公司 Method and device to improve USB flash write performance

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1300711C (en) * 2003-04-30 2007-02-14 日商.萩原科技股份有限公司 Usb storage device and program
CN101002274A (en) * 2004-07-22 2007-07-18 赛普拉斯半导体公司 Method and device to improve USB flash write performance
CN1632765A (en) * 2004-12-31 2005-06-29 大唐微电子技术有限公司 A flash memory file system management method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109697030A (en) * 2018-12-12 2019-04-30 江西电力职业技术学院 USB flash disk restoring method

Also Published As

Publication number Publication date
CN101809544A (en) 2010-08-18

Similar Documents

Publication Publication Date Title
US8521949B2 (en) Data deleting method and apparatus
US7515500B2 (en) Memory device performance enhancement through pre-erase mechanism
JP4155463B2 (en) System having flash management system using only sequential writing and method thereof
TWI594121B (en) Caching technologies employing data compression
CN101789019B (en) Method for controlling removable disk under Windows
CN101297276A (en) A mass storage device having both xip function and storage function
US10585589B2 (en) Data collation method, storage device, storage controller, and storage array
TWI459202B (en) Data processing method, memory controller and memory storage device
JP5068754B2 (en) Improved host interface
WO2008093961A1 (en) System and method for processing read request
TW201329712A (en) Data processing method, memory controller and memory storage device
KR20140093505A (en) Method and apparatus for extending memory in terminal
CN112764669B (en) Hardware accelerator
CN112765055B (en) Control unit of storage device
US8631166B2 (en) Storage devices with bi-directional communication techniques and method of forming bi-directional communication layer between them
WO2009103181A1 (en) Device for implementing file system on nandflash of mobile terminal
US8275932B2 (en) Method for transmitting special commands to flash storage device
TW201001421A (en) Memory device and data storing method
WO2009103182A1 (en) Device for implementing u-disk function on nand flash memory of mobile terminal
TWI407327B (en) Method and system for processing data, and storage device controller
US11188511B2 (en) Offloading file-indexing to memory card firmware
US8544424B2 (en) System, controller and method thereof for transmitting and distributing data stream
US8656059B2 (en) Methods for exchanging administrative information through a communication interface with limited administrative information exchange features
WO2018165950A1 (en) Emv implementation method and device
CN103186812B (en) Intelligent memory card and the method accessing intelligent memory card

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200880109710.0

Country of ref document: CN

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

Ref document number: 08706534

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 08706534

Country of ref document: EP

Kind code of ref document: A1