CN101408864B - Data protection method for current failure and controller using the same - Google Patents

Data protection method for current failure and controller using the same Download PDF

Info

Publication number
CN101408864B
CN101408864B CN2007101629951A CN200710162995A CN101408864B CN 101408864 B CN101408864 B CN 101408864B CN 2007101629951 A CN2007101629951 A CN 2007101629951A CN 200710162995 A CN200710162995 A CN 200710162995A CN 101408864 B CN101408864 B CN 101408864B
Authority
CN
China
Prior art keywords
data
physical blocks
relation
update information
new
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.)
Active
Application number
CN2007101629951A
Other languages
Chinese (zh)
Other versions
CN101408864A (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.)
Phison Electronics Corp
Original Assignee
Phison Electronics Corp
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 Phison Electronics Corp filed Critical Phison Electronics Corp
Priority to CN2007101629951A priority Critical patent/CN101408864B/en
Publication of CN101408864A publication Critical patent/CN101408864A/en
Application granted granted Critical
Publication of CN101408864B publication Critical patent/CN101408864B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention provides a data protection method which is suitable for being used in a plurality of physical blocks corresponding to a logic block in a nonvolatile memory. The data protection method comprises the steps as follows: data updating information is recorded in each physical block and is used for identifying data updating relation in the physical block; the updating relation of the physical block is regained according to the data updating information, wherein, the data updating information consists of a plurality of characters with circular relation, and the number of the characters is more than the number of the physical blocks; wherein, the data updating information is recorded in each physical block in sequence according to the updating relation and the circular relation.

Description

The controller of the data guard method when being used to cut off the power supply and use the method
Technical field
The present invention relates to a kind of data guard method, and particularly relate to a kind of when being used to cut off the power supply data guard method and use the controller of the method.
Background technology
Digital camera, mobile phone camera and MP3 are very rapid in growth over the years, make the consumer also increase rapidly to the demand of Storage Media, because flash memory (Flash Memory) has that data are non-volatile, power saving, volume is little and the characteristic of no mechanical structure etc., be fit to portable use, the most suitable being used on the portable battery-powered product of this class.Except the portable product built-in storage needs, wait the circumscribed product for mini memory card and carry-on dish, everyone may have a plurality of carry-on dishes and mini memory card simultaneously, so market scale is bigger than those equipment.Therefore, the flash memory industry becomes in the electronic industry quite popular a kind of in recent years.
The management of flash memory generally is to be unit with block (block), if under the situation of a plurality of physical blocks of unity logic block mapping and undesired outage occur in data and write fashionablely, then might cause the incorrect or unsettled phenomenon of data.That is to say that system can't identification raw data physical blocks and new data physical blocks after recovering electric power again.
For addressing the above problem, traditionally can be in a byte of the redundant area of each page of physical blocks tag-related.For example, with 1 logical blocks of 3 physical blocks mappings is example, each can become 0 characteristic by 1 to utilize flash memory, in selected byte with the different mark of the filling of writing mode several times, for example write down when the phase one, write down when FF is changed into 0F and is illustrated in subordinate phase with the FF representative and with 0F change into 00 be illustrated in the phase III in time institute's record.Just, if this represents it is up-to-date data and 0F represents time old data and the oldest data of 00 expression when being labeled as FF.
Yet there is following problems in known technology.When employed storer is that (Multi Level Cell during MLC) with non-(NAND) flash memory, because this type of flash memory can only write once, therefore can't use the above-mentioned method that writes several times to come mark to the multilayer storage unit.That is to say that in the case of MLC and non-flash memory, this mark just can't change once writing the back again.
Based on this, be necessary to develop a kind of data guard method, after outage, to distinguish the more new relation of block effectively again.
Summary of the invention
The invention provides a kind of data guard method that is used for nonvolatile memory, after outage, distinguish new legacy data again effectively.
The invention provides a kind of controller, it can carry out the data guard method that is used for nonvolatile memory, and it can distinguish new legacy data effectively again after outage.
The present invention proposes a kind of data guard method, it is applicable to a plurality of physical blocks of logical blocks institute mapping in the nonvolatile memory, this data guard method comprises: record data lastest imformation in each physical blocks, and Data Update information is in order to the more new relation of data in the identification physical blocks; And the more new relation that rebulids physical blocks according to Data Update information, wherein Data Update information is made up of a plurality of character with recurrence relation, and the number of described character is greater than the number of described physical blocks, and wherein the record data lastest imformation is according to more new relation and recurrence relation are come record in order in each physical blocks.
In one embodiment of this invention, above-mentioned character is a plurality of numerals or a plurality of literal.
In one embodiment of this invention, above-mentioned reconstruction more new relation comprises that the physical blocks of discerning the Data Update information that comprises character late according to the character late of the character that has used since the recurrence relation is the physical blocks with legacy data, and discerns the more new relation of other physical blocks in order according to recurrence relation.
In one embodiment of this invention, above-mentioned reconstruction more new relation comprises that the physical blocks of discerning the Data Update information that comprises character late with the character late of untapped character according to recurrence relation is the physical blocks with latest data, and discerns the more new relation of other physical blocks in order according to recurrence relation.
In one embodiment of this invention, above-mentioned record data lastest imformation in each physical blocks is the redundant area that Data Update information is recorded in each physical blocks.
In one embodiment of this invention, above-mentioned nonvolatile memory is one page (Program) flash memory once of can only programming.
In one embodiment of this invention, above-mentioned flash memory is SLC (Single Level Cell) or MLC (Multi Level Cell) and non-(NAND) flash memory.
The invention provides a kind of data protecting device, it is applicable to a plurality of physical blocks of logical blocks institute mapping in the nonvolatile memory, this data protecting device comprises: the A module, it writes down a Data Update information in each described physical blocks, this Data Update information is in order to discern the more new relation of data in the described physical blocks; The B module, it judges among the described physical blocks whether have the physical blocks that can't discern new and old relation; And C module, its the B module judge have can't the new and old relation of identification physical blocks the time according to described Data Update information acquisition can't the new and old relation of identification this new relation more of physical blocks, wherein said Data Update information is made up of a plurality of character with a recurrence relation, and the number of described character is greater than the number of described physical blocks, and wherein the A module of this Data Update information of record is that more new relation and this recurrence relation are come record in order according to this in each described physical blocks.
The present invention proposes a kind of data guard method, and the more new relation that it can write down the Data Update information of one-to-many block effectively and obtain block after undesired outage from Data Update information avoids data to lose after undesired outage thus.
For above-mentioned feature and advantage of the present invention can be become apparent, preferred embodiment cited below particularly, and be described with reference to the accompanying drawings as follows.
Description of drawings
Figure 1A illustrates the main frame that uses the non-volatile memory storage device according to the embodiment of the invention.
Figure 1B shows the detailed block diagram of the device of non-volatile memory storage shown in Figure 1A.
Fig. 1 C is the calcspar that illustrates controller according to another embodiment of the present invention.
Fig. 2 A and 2B are the detailed block diagram that illustrates nonvolatile memory and running thereof according to the embodiment of the invention.
Fig. 3 is the detailed block diagram that illustrates the redundant area R of page or leaf among Figure 1B according to the embodiment of the invention.
Fig. 4 A is the synoptic diagram of Data Update information when illustrating a logical blocks to three physical blocks according to the embodiment of the invention.
Fig. 4 B is the synoptic diagram that illustrates another Data Update information according to Fig. 4 A.
Fig. 5 is the process flow diagram that illustrates data guard method according to first embodiment of the invention.
Fig. 6 is the process flow diagram that illustrates data guard method according to second embodiment of the invention.
Fig. 7 is the applicable schematic representation of apparatus of average abrasion method that illustrates the embodiment of the invention.
The reference numeral explanation
100: main frame
102: microprocessor
104: random access memory
106: input/output device
108: system bus
110: data transmission interface
120: the non-volatile memory storage device
122,122 ': controller
122a: memory management module
122b: non-volatile memory interface
122c: host computer transmission interface
122d: memory buffer
122e: programmable memory
122f: error correction module
122g: power management module
122h: microprocessing unit
124: nonvolatile memory
124-0,124-1,124-2,124-N: block
202: system region
204: the data field
206: the spare area
208: replace the district
210: instantaneous district
M, C, T: block
302: the addressing mark
304: upgrade relation mark
306: the block status indication
308: other mark
310: the byte of stocking system information
320: the byte that stores error-correcting code (error correcting code)
401: logical blocks
402,403,404: physical blocks
S501, S503, S505, S507, S509: step
S601, S603, S605, S607, S609: step
The 702:USB flash disks
704: digital still camera
The 704a:SD card
The 704b:MMC card
The 704c:CF card
704d: memory stick
706: solid state hard disc
Embodiment
Generally speaking nonvolatile memory storage system comprises nonvolatile memory and controller (control chip).Usually nonvolatile memory storage system can be used with host computer system, so that host computer system can write to data nonvolatile memory storage system or reading of data from nonvolatile memory storage system.In addition, nonvolatile memory storage system also being arranged is to comprise embedded non-volatile memory and can be executed on the host computer system with substantially as the software of the controller of this embedded flash storer.
Figure 1A illustrates the main frame that uses the non-volatile memory storage device according to the embodiment of the invention.
Please refer to Figure 1A, main frame 100 generally comprise microprocessor 102, random access memory (randomaccess memory, RAM) 104, I/O (input/output, I/O) device 106, system bus 108 and data transmission interface 110.It must be appreciated that main frame 100 can also comprise other assembly, for example display equipment or network equipment etc.
Main frame 100 can be systems such as computing machine, digital camera, video camera, communicator, audio player or video signal player.Generally speaking, but main frame 100 can be any system of storage data substantially.
Non-volatile memory storage device 120 is connected with other electrical component of main frame 100 by data transmission interface 110 in embodiments of the present invention.Data can be write to non-volatile memory storage device 120 or reading of data from non-volatile memory storage device 120 by microprocessor 102, random access memory 104 with the processing of input/output device 106.Non-volatile memory storage device 120 comprise carry-on dish, storage card or solid state hard disc (Solid State Drive, SSD).
Figure 1B shows the detailed block diagram of the device of non-volatile memory storage shown in Figure 1A.
Please refer to Figure 1B, non-volatile memory storage device 120 generally comprises controller 122 and nonvolatile memory 124.
Controller 122 is in order to the overall operation of control non-volatile memory storage device 120, for example storage of data, reads and wipes etc.Controller 122 comprises memory management module 122a, non-volatile memory interface 122b, memory buffer 122d and microprocessing unit 122h.
Memory management module 122a for example carries out average abrasion (wear leveling) method, bad block management, safeguards mapping table (mapping table) etc. in order to managing non-volatile memory 124.
Non-volatile memory interface 122b is in order to access nonvolatile memory 124, and just main frame 100 data that will write to can be converted to 124 receptible forms of nonvolatile memory via non-volatile memory interface 122b.
Memory buffer 122d is in order to stocking system data (for example mapping table) temporarily or data that main frame read or write.In the present embodiment, memory buffer 122d be static RAM (static random access memory, SRAM).Yet, it must be appreciated that the invention is not restricted to this, dynamic RAM (DRAM), reluctance type storer (MRAM), Ovonics unified memory (PRAM) or other storer that is fit to also can be applicable to the present invention.
Microprocessing unit 122h is in order to the overall operation of control controller 122.
In another embodiment of the present invention, please refer to Fig. 1 C, controller 122 ' also comprises host computer transmission interface 122c, programmable memory 122e, error correction module 122f and power management module 122g.
Host computer transmission interface 122c in order to main frame 100 communications, host computer transmission interface 122c can be USB interface, IEEE 1394 interfaces, SATA interface, PCI Express interface, MS interface, MMC interface, SD card, CF card or ide interface.
Programmable memory 122e is in order to the performed programming code in order to control non-volatile memory storage device 120 of store controller.
Error correction module 122f checks and proofreaies and correct the data that main frame reads or writes in order to miscount correcting code (error correcting code).
Power management module 122g is in order to the power supply of managing non-volatile memory storage device 120.
Nonvolatile memory 124 is in order to storage data.Nonvolatile memory 124 is a flash memory in this enforcement, and more particularly, nonvolatile memory 124 is that (Multi LevelCell is MLC) with non-(NAND) flash memory for the multilayer storage unit.But it must be appreciated, the invention is not restricted to this, for example nonvolatile memory 124 also can be the individual layer storage unit (Single Level Cell, SLC) and non-flash memory.
Nonvolatile memory 124 is divided into a plurality of physical blocks (physical block) 124-0 to 124-N usually in fact, followingly for convenience of description abbreviates physical blocks as block.Generally speaking, block is the least unit of wiping in flash memory.That is each block contains the storage unit that is wiped free of in the lump of minimal amount.Each block can be divided into a plurality of pages or leaves (page) usually.Page or leaf is generally the minimum unit of programming (program), but what specify is in some different flash designs, minimum unit of program also can be a sector (sector) size, a plurality of sectors are promptly arranged in one page and is the minimum unit of programming with a sector.In other words, page or leaf is for writing the minimum unit of data meeting reading of data.Each page or leaf generally includes user data field D and redundant area R.The user data field is in order to storing user's data, and redundant area is in order to the data of stocking system (for example, above-mentioned ECC code).
Be sector (sector) size corresponding to disc driver, generally speaking, user data field D is generally 512 bytes, and redundant area R is generally 16 bytes.Just, one page is a sector.Yet, also can form one page in a plurality of sectors, for example one page comprises 4 sectors.
Generally speaking, block can be formed for example 64 pages, 128 pages, 256 pages etc. by the page or leaf of arbitrary number.Block 124-0 to 124-N also can be grouped into a plurality of zones (zone) usually, and coming diode-capacitor storage with the zone is to operate independently of one another with the parallel degree of increase operation execution and the complexity of streamlining management in a way.
Below will be and be described with reference to the accompanying drawings the running of nonvolatile memory according to the present invention.It must be appreciated that using speech such as " extraction ", " moving ", " exchange " to operate the flash memory block in the following description is in logic notion.That is to say that the physical location of flash memory block is not changed, but in logic the flash memory block is operated.
Fig. 2 A and 2B are the detailed block diagram that illustrates nonvolatile memory 124 and running thereof according to the embodiment of the invention.
Please refer to Fig. 2 A, in embodiments of the present invention, for (promptly write and the wipe) nonvolatile memory 124 of programming efficiently, the block 124-1 to 124-N of nonvolatile memory 124 can logically be grouped into a system region 202, a data field 204 and a spare area 206.In general, the block that belongs to data field 204 in the nonvolatile memory 124 can account for more than 90%, remaining system region 202 and the spare area 206 of being only.
Block in the system region 202 is in order to the register system data, and system data for example is about the number of pages of the number of regions of nonvolatile memory 124, block counts that each is regional, each block, logical physical mapping table etc.
Block in the data field 204 is in order to store user's data, in general is exactly the operated pairing block of logical block addresses of main frame 100.
Therefore block in the spare area 206 is in order to the block in the replacement data district 204, and the block in spare area 206 be sky or spendable block, i.e. no record data or be labeled as invalid data useless.Specifically, because if will be when writing Data Position and write data once more, the operation that execution is earlier wiped.Yet the flash memory unit of writing is a page or leaf as previously mentioned, and erase unit is a block.A unit of wiping is greater than the unit that writes, and this expression be if will carry out block erase operation, must be earlier active page in will erase blocks just can carry out after being copied to other block.Therefore, when writing new data among the block M that will in data field 204, write Data Position, generally can in spare area 206, extract a block C, after then the valid data among the block M being copied to block C and new data being write block C, move to the spare area 206 after block M wiped and simultaneously block C is moved to the data field 204.It must be appreciated that moving to the spare area 206 after block M is wiped, simultaneously block C to be moved to the data field 204 be in logic block M to be associated with spare area 206 and block C is associated with data field 204.Wherein those skilled in the art's logical relation that all can understand block in the data field 204 can be safeguarded by logical physical mapping table.
In embodiments of the present invention, in order to use nonvolatile memory 124 more efficiently, block 124-1 to 124-N logically also is divided into one and replaces district 208 and time zone 210 at a flash.
Please refer to Fig. 2 B, replacing district 208 is in order to temporarily to deposit the block of the block of preparing replacement data district 204.In more detail, when the block C of above-mentioned spare area 206 is extracted the block M that replaces data field 204, new data can be write to block C in embodiments of the present invention, but can at once the valid data among the block M not moved to block C and erase blocks M.Therefore this is because it is invalid that the valid data among the block M might become in next operation, at once the valid data among the block M moved to physical blocks C and can be caused meaningless moving.In embodiments of the present invention, the block C that can will write new data temporarily is associated as and replaces the district, and in the mapping of logical block addresses and physical blocks address, can write down the situation that a plurality of physical blocks address corresponds to a logical block addresses, just the content integration of block M and block C gets up to be only the content of institute's mapping logical blocks, promotes the service efficiency of block thus.The relation of these mother and child blocks (block M and block C) can be decided according to the size of memory buffer 122d in the controller 122, is to do in fact with five groups in embodiments of the present invention.
The function in instantaneous district 210 is similar with replacement district 208.As mentioned above, be to use MLC NAND flash memory in embodiments of the present invention.This MLC NAND flash memory is the multilayer storage unit, can comprise 4 sectors in its 1 page, the sector of 4 512 bytes is promptly arranged, totally 2048 bytes in 1 page.As mentioned above, flash memory is to be unit with the page or leaf writing fashionable, and the waste of resource can be caused in 4 sectors of therefore at every turn must programming under the situation of using MLC NAND flash memory therefore when writing the small amount of data of discontented one page.In embodiments of the present invention, instantaneous district 210 is in order to temporarily to deposit this type of small amount of data.Specifically, when the data that will write the block C that replaces district 208 are the small amount of data of discontented one page, can from spare area 206, extract a block T as mentioned above, then this small amount of data be write to block T and block T is associated as instantaneous district 210.Afterwards, when the follow-up data volume that writes enough writes one page, more described data are write to block C, and then block T is wiped and from instantaneous district 210, move to the spare area 206.
As mentioned above, for fear of frequent erase blocks, can use block C and block T to carry out the renewal of the data of block M.Yet system is in instantaneous time that has block M, C and T during non-volatile memory storage device 120 running, if when undesired outage takes place, the more new relation between block M, C and the T will be lost.Specifically, during 120 runnings of non-volatile memory storage device, the instantaneous relation of block M, C and T can be stored among the memory buffer 122d of controller 122, and when the 120 undesired outages of non-volatile memory storage device, the data among the memory buffer 122d will be lost.Therefore, after non-volatile memory storage device 120 recovers electric power again, though controller 122 can obtain the information of block M, C and the same logical blocks of T mapping from the logical physical mapping table that rebulids, can't distinguish the more new relation of block M, C and T.
In order to solve the above problems, the present invention in the redundant area of the page or leaf of block mark about this block information of new relation more.Fig. 3 is the detailed block diagram that illustrates the redundant area R of page or leaf among Figure 1B according to the embodiment of the invention.
As mentioned above, redundant area R is generally 16 bytes, wherein is divided into 6 bytes 310 of stocking system information and 10 bytes 320 of storage error-correcting code (error correcting code).And the byte 310 of stocking system information comprises addressing mark 302, upgrades relation mark 304, block status indication 306 and other mark 308.
Addressing mark 302 comprises 3 bytes, and wherein 2 bytes are in order to the zone (zone) under this block of mark, and 1 byte is in order to the logical blocks of this block mapping of mark.
Upgrade relation mark 304 and comprise 1 byte, it is in order to the Data Update information of this block data of mark under the state of the instantaneous relation that has block M, C and T, and this Data Update information can be represented the more new relation (being new and old relation) of block.
According to the present invention, when having instantaneous relation of block M, C and T in the system, memory management module 122a can be in upgrading relation mark 304 the record data lastest imformation.Data Update information is made up of a plurality of character with a recurrence relation, and the number of described character is the number greater than the block of this instantaneous relation of composition, that is to say, if when forming the block of this instantaneous relation and having n, represent that then the character of Data Update information must have n+1 at least.In addition, the record data lastest imformation is to come record in order according to the more new relation of block and the recurrence relation of character in each physical blocks.
Fig. 4 A is the synoptic diagram of Data Update information when illustrating a logical blocks to three physical blocks according to the embodiment of the invention.
Please refer to Fig. 4 A, logical blocks 401 mapping physical blocks 402,403 and 404.Wherein physical blocks 402 has the oldest data, and physical blocks 403 has time old data, and physical blocks 404 has up-to-date data.
Be with the character of digital 0-3 that circulate in Fig. 4 A as expression Data Update information.The renewal relation mark of supposing physical blocks 402 is 0 o'clock, and the more new relation of physical blocks 403 can be marked as 1 and when the physical blocks 404 that renewal is arranged again produced, the more new relation of physical blocks 404 can be marked as 2 when newer physical blocks produces.Controller 122 can be 3 according to the untapped character of Data Update information Recognition after the 120 undesired outages of non-volatile memory storage device, and the character late of character 3 is 0 in the circulation of 0-3, therefore the block that has legacy data is a physical blocks 402, and circulation identification physical blocks 403 has time old data according to this, and identification physical blocks 404 has up-to-date data.
Fig. 4 B is the synoptic diagram that illustrates another Data Update information according to Fig. 4 A.
Please refer to Fig. 4 B, is with the character of digital 0-3 as expression Data Update information that circulate equally.The renewal relation mark of supposing physical blocks 402 is 2 o'clock, and the more new relation of physical blocks 403 can be marked as 3 and when the physical blocks 404 that renewal is arranged again produced, the more new relation of physical blocks 404 can be marked as 0 when newer physical blocks produces.Controller 122 can be 1 according to the untapped character of Data Update information Recognition after the 120 undesired outages of non-volatile memory storage device, and the character late of character 1 is 2 in the circulation of 0-3, therefore the block that has legacy data is a physical blocks 402, and circulation identification physical blocks 403 has time old data according to this, and identification physical blocks 404 has up-to-date data.
Present embodiment be with numeral as Data Update information, yet, the invention is not restricted to this, other symbol also can be applicable to the present invention, for example makes literal (for example A, B, C, the D of apparatus recurrence relation ...).
Be as the block that indicates the legacy data of tool in the present embodiment with the character late that do not use character in the Data Update information, yet, be not use in Data Update information the character late of character in this another embodiment as the block that indicates the tool latest data.
Please with reference to figure 3, block status indication 306 comprises 1 byte, and whether it is normal blocks or bad block in order to this block of mark.
Other mark 308 comprises 1 byte, and it is in order to other system information of mark.
Present embodiment is to dispose with the redundant area of 16 bytes and byte thereof to explain the present invention.But must be appreciated that, the invention is not restricted to this, the redundant area of other byte number or other byte configuration mode are also applicable to the present invention.
Fig. 5 is the process flow diagram that illustrates data guard method according to first embodiment of the invention, and it is that memory management module 122a by controller 122 carries out, to obtain the relation between above-mentioned instantaneous block M, C and the T again after undesired outage.
Please refer to Fig. 5, data guard method is divided into two parts, and step S501 can write down a Data Update information in each physical blocks that one-to-many (i.e. 1 a plurality of physical blocks of logical blocks mapping) takes place in (a) of Fig. 5.The composition of Data Update information and mode described in detail as before, do not repeat them here.
In (b) of Fig. 5, after undesired outage takes place, can whether there be a plurality of physical blocks (step S503) that to discern new and old relation in the decision logic physics mapping table.If in step S503, judge have can't identification physical blocks the time, then in step S505, from the redundant area of the page or leaf of described physical blocks, read the renewal relation mark.Afterwards, in step S507, judge block with the oldest (or up-to-date) data according to the character of data streams read lastest imformation from upgrade relation mark.Judge the oldest (or up-to-date) data block mode with describe in conjunction with Fig. 4 A and Fig. 4 B as before, do not repeat them here.Afterwards, in step S509, discern the more new relation of the physical blocks that other can't identification according to the recurrence relation of Data Update information.
Fig. 6 is the process flow diagram that illustrates data guard method according to second embodiment of the invention.The controller hardware structure of carrying out the data guard method of second embodiment is to be same as first embodiment, in this no longer repeat specification.
Please refer to Fig. 6; data guard method also is to be divided into two parts, and step S601 can write data in physical blocks and write down a Data Update information in simultaneously to each physical blocks that one-to-many (i.e. 1 a plurality of physical blocks of logical blocks mapping) takes place in (a) of Fig. 6.The composition of Data Update information and mode described in detail as before, do not repeat them here.
In another embodiment of the present invention, the Data Update information in the physical blocks is only to write once.That is to say that in one page can only be programmed the case of (Program) flash memory once, data to write once, could be programmed after must wiping earlier only again in the time must programming again.
In (b) of Fig. 6, after undesired outage takes place, can whether there be a plurality of physical blocks (step S603) that to discern new and old relation in the decision logic physics mapping table.If in step S603, judge have can't identification physical blocks the time, then in step S605, from the redundant area of the page or leaf of described physical blocks, read the renewal relation mark.Afterwards, judge the block with the oldest (or up-to-date) data according to a plurality of circulation characters of data streams read lastest imformation from upgrade relation mark in step S607, for example, the number of circulation character is between 3-5.The mode of judging the block of the oldest (or up-to-date) data cooperated Fig. 4 A and Fig. 4 B to describe as before, do not repeat them here.Afterwards, in step S609 according to the circulation character recognition of Data Update information other can't identification the more new relation of physical blocks.
Be to be applicable to nonvolatile memory according to data guard method proposed by the invention, therefore data guard method proposed by the invention can be used various with the device of nonvolatile memory as Storage Media.USB flash disks 702 for example shown in Figure 7, digital camera (video camera) 704 employed SD card 704a, mmc card 704b, CF card 704c and memory stick (memory stick) 704d and solid state hard disc 706 etc.
In sum, the data guard method that is used for nonvolatile memory proposed by the invention can obtain the more new relation of one-to-many block effectively after undesired outage.Thus, avoid the loss of undesired outage back data.
Though the present invention discloses as above with preferred embodiment; right its is not in order to qualification the present invention, those skilled in the art, under the premise without departing from the spirit and scope of the present invention; when can doing some changes and modification, so protection scope of the present invention should be as the criterion with claim of the present invention.

Claims (14)

1. data guard method, it is applicable to a plurality of physical blocks of logical blocks institute mapping in the nonvolatile memory, this data guard method comprises:
Record one Data Update information in each described physical blocks, this Data Update information is in order to discern the more new relation of data in the described physical blocks;
Judge among the described physical blocks and whether have the physical blocks that to discern new and old relation; And
When judgement have can't the new and old relation of identification physical blocks the time according to described Data Update information acquisition can't the new and old relation of identification this new relation more of physical blocks,
Wherein said Data Update information is made up of a plurality of character with a recurrence relation, and the number of described character is greater than the number of described physical blocks,
Wherein this Data Update information of record is that more new relation and this recurrence relation are come record in order according to this in each described physical blocks.
2. data guard method as claimed in claim 1, wherein said character are a plurality of numerals or a plurality of literal.
3. data guard method as claimed in claim 1; wherein obtain this more new relation comprise that the physical blocks of discerning this Data Update information that comprises this character late with the character late of untapped described character according to this recurrence relation is the physical blocks with legacy data, and this new relation more of discerning other described physical blocks in order according to this recurrence relation.
4. data guard method as claimed in claim 1; wherein obtain this more new relation comprise that the physical blocks of discerning this Data Update information that comprises this character late with the character late of untapped described character according to this recurrence relation is the physical blocks with latest data, and this new relation more of discerning other described physical blocks in order according to this recurrence relation.
5. data guard method as claimed in claim 1, wherein this Data Update information of record is a redundant area that this Data Update information is recorded in each described physical blocks in each described physical blocks.
6. data guard method as claimed in claim 1, wherein this nonvolatile memory is can only programme once a flash memory of one page.
7. data guard method as claimed in claim 6, wherein this flash memory is a SLC and non-flash memory or a MLC and non-flash memory.
8. data protecting device, it is applicable to a plurality of physical blocks of logical blocks institute mapping in the nonvolatile memory, this data protecting device comprises:
The A module, it writes down a Data Update information in each described physical blocks, and this Data Update information is in order to discern the more new relation of data in the described physical blocks;
The B module, it judges among the described physical blocks whether have the physical blocks that can't discern new and old relation; And
The C module, its B module judge have can't the new and old relation of identification physical blocks the time according to described Data Update information acquisition can't the new and old relation of identification this new relation more of physical blocks,
Wherein said Data Update information is made up of a plurality of character with a recurrence relation, and the number of described character is greater than the number of described physical blocks,
Wherein the A module of this Data Update information of record is that more new relation and this recurrence relation are come record in order according to this in each described physical blocks.
9. data protecting device as claimed in claim 8, wherein said character are a plurality of numerals or a plurality of literal.
10. data protecting device as claimed in claim 8; wherein obtain this more the C module of the new relation physical blocks of discerning this Data Update information that comprises this character late with the character late of untapped described character according to this recurrence relation be physical blocks with legacy data, and this new relation more of discerning other described physical blocks in order according to this recurrence relation.
11. data protecting device as claimed in claim 8; wherein obtain this more the C module of the new relation physical blocks of discerning this Data Update information that comprises this character late with the character late of untapped described character according to this recurrence relation be physical blocks with latest data, and this new relation more of discerning other described physical blocks in order according to this recurrence relation.
12. data protecting device as claimed in claim 8, the A module that wherein writes down this Data Update information in each described physical blocks is recorded in this Data Update information one redundant area of each described physical blocks.
13. data protecting device as claimed in claim 8, wherein this nonvolatile memory is can only programme once a flash memory of one page.
14. data protecting device as claimed in claim 13, wherein this flash memory is a SLC and non-flash memory or a MLC and non-flash memory.
CN2007101629951A 2007-10-09 2007-10-09 Data protection method for current failure and controller using the same Active CN101408864B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101629951A CN101408864B (en) 2007-10-09 2007-10-09 Data protection method for current failure and controller using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101629951A CN101408864B (en) 2007-10-09 2007-10-09 Data protection method for current failure and controller using the same

Publications (2)

Publication Number Publication Date
CN101408864A CN101408864A (en) 2009-04-15
CN101408864B true CN101408864B (en) 2011-08-24

Family

ID=40571884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101629951A Active CN101408864B (en) 2007-10-09 2007-10-09 Data protection method for current failure and controller using the same

Country Status (1)

Country Link
CN (1) CN101408864B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102110121B (en) * 2009-12-24 2015-09-23 阿里巴巴集团控股有限公司 A kind of data processing method and system thereof
CN102375779B (en) * 2010-08-16 2015-08-19 深圳市朗科科技股份有限公司 A kind of data processing method and data processing module
CN103678162B (en) * 2012-09-12 2020-02-28 群联电子股份有限公司 System data storage method, memory controller and memory storage device
TWI520153B (en) * 2013-11-05 2016-02-01 威盛電子股份有限公司 Non-volatile memory device and operation method thereof
CN105630404A (en) * 2015-04-02 2016-06-01 上海磁宇信息科技有限公司 Solid-state drive using MRAM and read-write method
CN105630704A (en) * 2015-06-10 2016-06-01 上海磁宇信息科技有限公司 Storage device and read-write method applying block-based logic physical address comparison table
CN105608016B (en) * 2015-08-05 2018-11-23 上海磁宇信息科技有限公司 Solid state hard disk of the DRAM in conjunction with MRAM and the storage card using MRAM
CN107092563B (en) * 2017-04-20 2021-02-26 新华三信息技术有限公司 Garbage recovery method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1290014A (en) * 1999-09-29 2001-04-04 三星电子株式会社 Flash memory and control method
CN1567256A (en) * 2003-06-20 2005-01-19 深圳市朗科科技有限公司 Protection method for data in flash memory media

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1290014A (en) * 1999-09-29 2001-04-04 三星电子株式会社 Flash memory and control method
CN1567256A (en) * 2003-06-20 2005-01-19 深圳市朗科科技有限公司 Protection method for data in flash memory media

Also Published As

Publication number Publication date
CN101408864A (en) 2009-04-15

Similar Documents

Publication Publication Date Title
CN102135942B (en) Method for realizing wear-leveling in storage equipment as well as the storage equipment
CN101408864B (en) Data protection method for current failure and controller using the same
CN101494085B (en) Prevent nonvolatile memory from method and the controller thereof of interference occurring to read
CN102157202B (en) Method and controller for preventing nonvolatile memory from occurring read interference
CN101414282B (en) Average abrasion method and controller using the same
CN101625897B (en) Data write-in method, storage system and controller used for quick flash memory
CN101499315B (en) Average abrasion method of flash memory and its controller
CN103377129A (en) Data writing-in method, memory controller and memory storage device
CN101425338B (en) Writing method for nonvolatile memory and controller using the method
CN102193869A (en) Memory management and write-in method, memory controller and storage system
CN102890655A (en) Memory storage device, memory controller and valid data recognition method thereof
CN101527169A (en) Data write-in method for flash memory and controller thereof
CN101661431B (en) Block management method for flash memory, flash storage system and controller
CN103136111A (en) Data writing method, memorizer controller and memorizer storage device
CN102968385B (en) Method for writing data, Memory Controller and storage device
CN101409108B (en) Average abrasion method and controller using the same
CN101727397B (en) Block management and change method, flash memory storage system and controller thereof
CN103678162A (en) System data storage method, memorizer controller and memorizer storing device
CN102567221A (en) Data management method, memory controller and memory storage device
CN102129353A (en) Flash storage system, flash controller and data writing method
CN102800357A (en) Program code loading and accessing methods, memory controller and storage device of memory
CN102999437A (en) Data transfer method, memory controller and memory storage device
CN102110056B (en) Flash memory management method, flash memory controller and flash memory storage system
CN102841853B (en) Memory management table disposal route, Memory Controller and memorizer memory devices
CN101661432B (en) Flash memory block management method, flash memory storage system and controller

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