CN107273303A - A kind of flash data management system, method, flash chip and storage device - Google Patents

A kind of flash data management system, method, flash chip and storage device Download PDF

Info

Publication number
CN107273303A
CN107273303A CN201710368964.5A CN201710368964A CN107273303A CN 107273303 A CN107273303 A CN 107273303A CN 201710368964 A CN201710368964 A CN 201710368964A CN 107273303 A CN107273303 A CN 107273303A
Authority
CN
China
Prior art keywords
data
flash
continuous
working area
active page
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.)
Granted
Application number
CN201710368964.5A
Other languages
Chinese (zh)
Other versions
CN107273303B (en
Inventor
黄志铭
庞荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jian Rong semiconductor (Shenzhen) Co., Ltd.
Original Assignee
ZHUHAI HUANGRONG INTEGRATED CIRCUIT TECHNOLOGY Co Ltd
Jian Rong Semiconductor (shenzhen) Co Ltd
Jianrong Integrated Circuit Technology Zhuhai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZHUHAI HUANGRONG INTEGRATED CIRCUIT TECHNOLOGY Co Ltd, Jian Rong Semiconductor (shenzhen) Co Ltd, Jianrong Integrated Circuit Technology Zhuhai Co Ltd filed Critical ZHUHAI HUANGRONG INTEGRATED CIRCUIT TECHNOLOGY Co Ltd
Priority to CN201710368964.5A priority Critical patent/CN107273303B/en
Publication of CN107273303A publication Critical patent/CN107273303A/en
Application granted granted Critical
Publication of CN107273303B publication Critical patent/CN107273303B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/0253Garbage collection, i.e. reclamation of unreferenced memory
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7202Allocation control and policies

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Read Only Memory (AREA)
  • Memory System (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The present invention is applied to flash memory technology field, there is provided a kind of flash data management system, method, flash chip and storage device, the system includes flash controller and flash memory, the flash controller is used for when external data writes, external data is classified, continuous data and random data is distinguished;The flash memory includes system area, working area and data field, and the system area includes the randomized block for storing the random data and the continuous blocks for storing the continuous data;The working area, the active page, when effective number of pages in the working area meets the condition of setting, is dumped to the data field by storage to the active page in the randomized block when being arranged for the flash controller to the randomized block.Using technical scheme, the speed of data preparation and the compatibility of system can be improved.

Description

A kind of flash data management system, method, flash chip and storage device
Technical field
The invention belongs to technical field of memory, more particularly to a kind of flash data management system, method, flash chip and deposit Storage device.
Background technology
In existing flash translation layer (FTL) Flash Transfer Layer (FTL) algorithm, active block is reclaimed(Garbage Collection, GC) generally all it is that the block (Block) for selecting invalid page (Invalid Page) more does merging.So Cause a problem in that, when there is excessive invalid page (Invalid Page) in the flash block (Block Memory), meeting Useless much times can be consumed in the integration of data, some and the compatibility issue on main frame (Host) are also often derived.
The content of the invention
The embodiments of the invention provide a kind of flash data management system, method, flash chip and storage device, it is intended to solves Certainly existing the problem of.
In embodiments of the present invention there is provided a kind of flash data management system, the system include flash controller and Flash memory,
The flash controller be used for when external data writes, external data is classified, distinguish continuous data and with Machine data;
The flash memory includes system area, working area and data field,
The system area includes the randomized block for storing the random data and the continuous blocks for storing the continuous data;
The working area, stores effective in the randomized block when being arranged for the flash controller to the randomized block Page, when effective number of pages in the working area meets the condition of setting, the data field is dumped to by the active page.
In embodiments of the present invention, the flash controller distinguishes consecutive numbers according to the data length of the external data According to and random data.
In embodiments of the present invention, when the data in the continuous blocks are filled up, the flash controller is by the continuous blocks Data-moving to the data field, and discharge the continuous blocks.
In embodiments of the present invention, when the data in the randomized block are filled up, the flash controller is to the randomized block Active page arranged, and by active page storage into the working area.
In embodiments of the present invention, when the quantity of the active page in the working area is not reaching to the quantity of setting, institute State flash controller and discharge the randomized block, and the active page in the working area is moved to the randomized block.
In embodiments of the present invention, a kind of flash data management method is additionally provided, the flash memory includes system area, kept in Area and data field, methods described include:
Pre-treatment step:When external data writes, external data is classified, continuous data and random data is distinguished;
Data storing steps:Sorted external data is deposited into the system area, wherein, the system area includes random Block and continuous blocks, the random data are deposited into the randomized block, and the continuous data storage is into the continuous blocks;
Data preparation step:Active page in the randomized block is arranged, and the active page is deposited into described keep in Area;
Data conversion storage step:Judge whether the quantity of active page in the working area meets the condition of setting, when the active page Quantity meet setting condition when, the active page is dumped into the data field.
In the pre-treatment step, continuous data and random data are distinguished according to the data length of the external data.
In the data storing steps, when the data in the continuous blocks are filled up, by the data-moving in the continuous blocks To the data field, and discharge the continuous blocks.
In the data preparation step, the active page in the working area is moved to the data field, release is described Randomized block and the working area.
In the data conversion storage step, when the quantity of the active page in the working area is not reaching to the quantity of setting, The randomized block is discharged, and the active page in the working area is moved to the randomized block.
In embodiments of the present invention, a kind of flash chip is additionally provided, the flash chip includes an at least processor, deposited Reservoir and interface, at least a processor, memory and the interface are connected by bus;
The memory storage computer executed instructions;
The computer executed instructions of memory storage described at least one described computing device so that the flash chip is performed Above-mentioned flash data management method.
In embodiments of the present invention, the instruction that is stored with a kind of storage device, the storage device is additionally provided, it is described to refer to The step of order realizes above-mentioned flash data management method when being executed by processor.
Compared with prior art, in technical scheme, the memory space of flash memory is divided into system area, working area And data field, when external data writes, external data is classified, continuous data and random data is distinguished, and writing When entering data, system area is first write data into, and the active page of the random data in working area is arranged using working area, Finally reduced data is deposited into data field so that the data in the memory headroom are in good order, be not in compared with Many invalid pages, improve the speed of data preparation and the compatibility of system.
Brief description of the drawings
Fig. 1 is the structural representation for the flash data management system that the embodiment of the present invention one is provided;
Fig. 2 is the state that the flash data management system that the embodiment of the present invention one is provided is arranged to the randomized block in system area Schematic diagram;
Fig. 3 is the state that the flash data management system that the embodiment of the present invention one is provided is arranged to the randomized block in system area Schematic diagram;
Fig. 4 is the flow chart for the flash data management method that the embodiment of the present invention two is provided;
Fig. 5 is the structural representation for the flash chip that the embodiment of the present invention three is provided.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
The realization of the present invention is described in detail below in conjunction with specific embodiment:
Embodiment one
In the present embodiment, describe a kind of flash data management system and internally deposit the method being managed within the system.
Fig. 1 shows the structural representation for the flash data management system that the embodiment of the present invention one is provided, the system bag Flash controller 10 and flash memory 20 are included, the flash memory 20 is divided into system area 21, working area 22 and data field 23.Carry out below Describe in detail.
The flash controller 10, for when external data writes, classifying to external data, distinguishing consecutive numbers According to and random data.It should be noted that when external data writes, it is possible to which external data is scattered data, it is also possible to It is the data of continuous monoblock.The flash controller 10 to external data when classifying, according to the external data Data length distinguishes continuous data and random data, when external data is scattered data, is then classified as random data, When external data is the data of monoblock, then continuous data is classified as.
The system area 21 includes randomized block 211 and continuous blocks 212, and the randomized block 211 is used to store the random number According to the continuous blocks 212 are used to store the continuous data.External data is distinguished continuous data by the flash controller 10 After random data, the random data is write into the randomized block 211, the continuous data is write into the continuous blocks 212. When a continuous blocks 212 in system area 21 write full, the flash controller 10 is by the continuous data in the continuous blocks 212 Move in the data field 23, and discharge the continuous blocks 212.
The working area 22, stored when being arranged for 10 pairs of the flash controller randomized block 211 it is described with Active page in machine block 211, when effective number of pages in the working area 22 meets the condition of setting, by the active page unloading To the data field 23
The data field 23, it is continuous in the active page and the continuous blocks 212 that are sorted out from the randomized block 211 for storing Data.
Fig. 2, Fig. 3 show the embodiment of the present invention one provide flash data management system in the system area 21 with The process that machine block 221 is arranged.When the randomized block 211 in system area 21 writes full, write described in 10 pairs of the flash controller Full randomized block 211 is arranged, and the active page of the randomized block 211 is put into the working area 22, and count active page Quantity, when the quantity of the active page in the working area 22 is not reaching to the quantity of setting, the flash controller 10 discharges The randomized block 211, and the active page in the working area 22 is moved to the randomized block 211, the randomized block 211 continues Receive receipt.When the quantity of active page in the working area 22 meets the condition of setting, the flash controller 10 will be described Active page dumps to the data field 23, and discharges the working area 22.
Using above-mentioned flash data management system so that the data in the memory headroom are in good order, be not in compared with Many invalid pages, improve the speed of data preparation and the compatibility of system.
Embodiment two
In the flow for the flash data management method that the shown embodiment of the present invention two of Fig. 4 is provided, the present embodiment, flash memory includes System area, working area and data field, methods described are realized using step S1 to step S4.It is specifically described below.
Step S1, pre-treatment step:When external data writes, external data is classified, continuous data is distinguished And random data.
It should be noted that when external data writes, it is possible to which external data is scattered data, it is also possible to continuous Monoblock data, therefore, in the pre-treatment step, distinguished according to the data length of the external data continuous data and Random data, when external data is scattered data, is then classified as random data, when external data is the data of monoblock, Then it is classified as continuous data.
Step S2, data storing steps:Sorted external data is deposited into the system area.Wherein, the system System area includes randomized block and continuous blocks, and the random data is deposited into the randomized block, and the continuous data storage is described in In continuous blocks.
It should be noted that in the data storing steps, will be described continuous when the data in the continuous blocks are filled up Data-moving in block discharges the continuous blocks to the data field;When the data in the randomized block are filled up, start step Rapid S3, is arranged to the active page in the randomized block.
Step S3, data preparation step:Active page in the randomized block is arranged, and the active page is stored in To the working area.
It should be noted that in the data preparation step, the active page in the working area is moved to the data Qu Hou, discharges the randomized block and the working area.
Step S4, data conversion storage step:Judge whether the quantity of active page in the working area meets the condition of setting, when When the quantity of the active page meets the condition of setting, the active page is dumped into the data field.
It should be noted that in the data conversion storage step, when the quantity of the active page in the working area is not reaching to During the quantity of setting, the randomized block is discharged, and the active page in the working area is moved to the randomized block, it is described random Block continues to random external data.
Be not in more nothing after above-mentioned steps are handled so that the data in the memory headroom are in good order The page is imitated, the speed of data preparation and the compatibility of system is improved.
Embodiment three
As shown in figure 5, the embodiment of the present invention three is provided in embodiments of the present invention there is provided a kind of flash chip, it is included at least One processor 310, memory 320 and interface 330, at least a processor 310, memory 320 and the interface 330 are by total Line is connected;
The memory 320 stores computer executed instructions;
At least one described processor 310 performs the computer executed instructions that the memory 320 is stored so that the flash memory core Piece performs the flash data management method described in embodiment two.
In embodiments of the present invention, the instruction that is stored with a kind of storage device, the storage device is additionally provided, it is described to refer to The step of order realizes the flash data management method of embodiment two when being executed by processor.
In summary, using flash data management system, method, flash chip and the storage device of the present invention, by flash memory Memory space be divided into system area, working area and data field, when external data writes, external data is classified, distinguish Go out continuous data and random data, and when writing data, first write data into system area, and using working area to temporary The active page of random data in area is arranged, and finally reduced data is deposited into data field so that the memory headroom In data it is in good order, be not in more invalid page, improve the speed of data preparation and the compatibility of system.
It is worth noting that, one of ordinary skill in the art will appreciate that:The step of realizing above method embodiment or portion It can be completed step by step by the related hardware of programmed instruction, foregoing program can be stored in embodied on computer readable storage Jie In matter, the program upon execution, performs the step of including above method embodiment, and foregoing storage medium includes:ROM、 RAM, magnetic disc or CD etc. are various can be with the medium of store program codes.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention Any modifications, equivalent substitutions and improvements made within refreshing and principle etc., should be included in the scope of the protection.

Claims (12)

1. a kind of flash data management system, it is characterised in that the system includes flash controller and flash memory,
The flash controller be used for when external data writes, external data is classified, distinguish continuous data and with Machine data;
The flash memory includes system area, working area and data field,
The system area includes the randomized block for storing the random data and the continuous blocks for storing the continuous data;
The working area, stores effective in the randomized block when being arranged for the flash controller to the randomized block Page, when effective number of pages in the working area meets the condition of setting, the data field is dumped to by the active page.
2. flash data management system as claimed in claim 1, it is characterised in that
The flash controller distinguishes continuous data and random data according to the data length of the external data.
3. flash data management system as claimed in claim 1, it is characterised in that when the data in the continuous blocks are filled up, The data-moving of the continuous blocks to the data field, and is discharged the continuous blocks by the flash controller.
4. flash data management system as claimed in claim 1, it is characterised in that
When data in the randomized block are filled up, the flash controller is arranged to the active page of the randomized block, and will Active page is stored into the working area.
5. flash data management system as claimed in claim 4, it is characterised in that when the number of the active page in the working area Amount is when being not reaching to the quantity of setting, and the flash controller discharges the randomized block, and by the active page in the working area Move to the randomized block.
6. a kind of flash data management method, it is characterised in that the flash memory includes system area, working area and data field, described Method includes:
Pre-treatment step:When external data writes, external data is classified, continuous data and random data is distinguished;
Data storing steps:Sorted external data is deposited into the system area, wherein, the system area includes random Block and continuous blocks, the random data are deposited into the randomized block, and the continuous data storage is into the continuous blocks;
Data preparation step:Active page in the randomized block is arranged, and the active page is deposited into described keep in Area;
Data conversion storage step:Judge whether the quantity of active page in the working area meets the condition of setting, when the active page Quantity meet setting condition when, the active page is dumped into the data field.
7. flash data management method as claimed in claim 6, it is characterised in that in the pre-treatment step, according to described The data length of external data distinguishes continuous data and random data.
8. flash data management method as claimed in claim 6, it is characterised in that in the data storing steps, the company When data in continuous block are filled up, by the data-moving in the continuous blocks to the data field, and the continuous blocks are discharged.
9. flash data management method as claimed in claim 6, it is characterised in that in the data preparation step, will be described Active page in working area is moved to the data field, discharges the randomized block and the working area.
10. flash data management method as claimed in claim 6, it is characterised in that in the data conversion storage step, when described When the quantity of active page in working area is not reaching to the quantity of setting, the randomized block is discharged, and by the working area Active page is moved to the randomized block.
11. a kind of flash chip, it is characterised in that the flash chip includes at least a processor, memory and interface, described At least a processor, memory and interface are connected by bus;
The memory storage computer executed instructions;
The computer executed instructions of memory storage described at least one described computing device so that the flash chip is performed Flash data management method described in claim any one of 6-10.
12. a kind of storage device, it is characterised in that be stored with instruction on the storage device, the instruction is executed by processor The step of flash data management method described in Shi Shixian claim any one of 6-10.
CN201710368964.5A 2017-05-23 2017-05-23 Flash memory data management system and method, flash memory chip and storage device Active CN107273303B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710368964.5A CN107273303B (en) 2017-05-23 2017-05-23 Flash memory data management system and method, flash memory chip and storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710368964.5A CN107273303B (en) 2017-05-23 2017-05-23 Flash memory data management system and method, flash memory chip and storage device

Publications (2)

Publication Number Publication Date
CN107273303A true CN107273303A (en) 2017-10-20
CN107273303B CN107273303B (en) 2020-06-26

Family

ID=60064740

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710368964.5A Active CN107273303B (en) 2017-05-23 2017-05-23 Flash memory data management system and method, flash memory chip and storage device

Country Status (1)

Country Link
CN (1) CN107273303B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506442A (en) * 2020-12-22 2021-03-16 深圳市时创意电子有限公司 Flash memory chip data processing method and device, electronic equipment and storage medium
US11287989B2 (en) 2020-03-24 2022-03-29 Western Digital Technologies, Inc. Dynamic allocation of sub blocks

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419834A (en) * 2007-10-22 2009-04-29 群联电子股份有限公司 Average abrasion method and controller using the method
CN101630233A (en) * 2008-07-17 2010-01-20 群联电子股份有限公司 Data access method used for flash memory, storage system and controller
CN102521160A (en) * 2011-12-22 2012-06-27 上海交通大学 Write buffer detector, addressing method of written data and parallel channel write method
CN103456357A (en) * 2012-06-01 2013-12-18 三星电子株式会社 Storage device having nonvolatile memory device and write method
CN104903842A (en) * 2012-12-31 2015-09-09 桑迪士克科技股份有限公司 Method and system for asynchronous die operations in a non-volatile memory
US20170060738A1 (en) * 2015-08-25 2017-03-02 Sandisk Technologies Inc. Memory System and Method for Performing Garbage Collection on Blocks Based on Their Obsolescence Patterns
CN106569959A (en) * 2016-10-28 2017-04-19 郑州云海信息技术有限公司 Cache replacing method and system based on SSD

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419834A (en) * 2007-10-22 2009-04-29 群联电子股份有限公司 Average abrasion method and controller using the method
CN101630233A (en) * 2008-07-17 2010-01-20 群联电子股份有限公司 Data access method used for flash memory, storage system and controller
CN102521160A (en) * 2011-12-22 2012-06-27 上海交通大学 Write buffer detector, addressing method of written data and parallel channel write method
CN103456357A (en) * 2012-06-01 2013-12-18 三星电子株式会社 Storage device having nonvolatile memory device and write method
CN104903842A (en) * 2012-12-31 2015-09-09 桑迪士克科技股份有限公司 Method and system for asynchronous die operations in a non-volatile memory
US20170060738A1 (en) * 2015-08-25 2017-03-02 Sandisk Technologies Inc. Memory System and Method for Performing Garbage Collection on Blocks Based on Their Obsolescence Patterns
CN106569959A (en) * 2016-10-28 2017-04-19 郑州云海信息技术有限公司 Cache replacing method and system based on SSD

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11287989B2 (en) 2020-03-24 2022-03-29 Western Digital Technologies, Inc. Dynamic allocation of sub blocks
CN112506442A (en) * 2020-12-22 2021-03-16 深圳市时创意电子有限公司 Flash memory chip data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN107273303B (en) 2020-06-26

Similar Documents

Publication Publication Date Title
CN103902465B (en) Method and system for recycling solid state disk junk and solid state disk controller
CN104636285B (en) A kind of flash-memory storage system and read-write thereof, delet method
CN109522248B (en) Method for operating memory controller and method for operating memory device
CN103080911B (en) The pre-emptive garbage reclamation of memory block
CN103677977B (en) Method and device for cleaning temporary files in mobile terminal and the mobile terminal
US20150378888A1 (en) Controller, flash memory apparatus, and method for writing data into flash memory apparatus
CN104484283B (en) A kind of method for reducing solid state disk write amplification
CN101320351A (en) Internal memory distribution, cleaning and releasing method, and internal memory management apparatus
CN106201659B (en) A kind of method and host of live migration of virtual machine
CN107038131A (en) Solid state hard disc power-off protection apparatus and method
CN107506136A (en) A kind of method and apparatus of garbage reclamation
EP3196767B1 (en) Method for writing data into flash memory device, flash memory device and storage system
CN107209719A (en) A kind of array control unit, solid state hard disc and the method for controlling solid state disk write data
CN1996258A (en) Method for implementing dynamic memory pool
CN107273303A (en) A kind of flash data management system, method, flash chip and storage device
CN108536609B (en) Memory fragment management system and method
WO2019062231A1 (en) Garbage collection method and storage device
CN104375944B (en) A kind of date storage method and device
US20220100406A1 (en) Hard disk control method and related device
CN109189739B (en) Cache space recovery method and device
KR101626218B1 (en) Block based page mapping method
CN102486757B (en) The method of memorizer memory devices and Memory Controller thereof and response host command
CN105653466A (en) Data storage device and flash memory control method
CN106980475A (en) A kind of distributed cluster system
CN106990925B (en) The method and its system of rblock capacity in a kind of diminution solid state hard disk

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20191226

Address after: 518000 District 652, district a, huameiju business center, Xinhu Road, Haiyu community, Xin'an street, Bao'an District, Shenzhen City, Guangdong Province

Applicant after: Jian Rong semiconductor (Shenzhen) Co., Ltd.

Address before: 518000 Guangdong city of Shenzhen province science and Technology Park of Nanshan District high new technology building B505 Fu'an

Applicant before: Jian Rong semiconductor (Shenzhen) Co., Ltd.

Applicant before: Jianrong Integrated Circuit Technology (Zhuhai) Co., Ltd.

Applicant before: ZHUHAI HUANGRONG INTEGRATED CIRCUIT TECHNOLOGY CO., LTD.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant