WO2004114139A1 - Procede de protection de donnees pour support de memoire flash - Google Patents

Procede de protection de donnees pour support de memoire flash Download PDF

Info

Publication number
WO2004114139A1
WO2004114139A1 PCT/CN2004/000649 CN2004000649W WO2004114139A1 WO 2004114139 A1 WO2004114139 A1 WO 2004114139A1 CN 2004000649 W CN2004000649 W CN 2004000649W WO 2004114139 A1 WO2004114139 A1 WO 2004114139A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
block
page
storage
flash memory
Prior art date
Application number
PCT/CN2004/000649
Other languages
English (en)
French (fr)
Inventor
Guoshun Deng
Xiaohua Cheng
Feng Xiang
Zhixiang YE
Original Assignee
Netac Technology 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 Netac Technology Co., Ltd. filed Critical Netac Technology Co., Ltd.
Publication of WO2004114139A1 publication Critical patent/WO2004114139A1/zh

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/22Safety or protection circuits preventing unauthorised or accidental access to memory cells
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • G06F21/79Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data in semiconductor storage media, e.g. directly-addressable memories

Definitions

  • the present invention relates to the field of semiconductor storage, and in particular, to a data protection method in a flash memory shield.
  • a data protection method in a flash memory shield By using this method, even if an illegal power failure occurs at any time when data is written to the flash memory shield, the original in the flash memory medium The data file and the written data will not be lost, which guarantees the security of the data stored in the flash memory shield.
  • the invention patent application with application number 03104983.4 and invention name "Data Management Method in Flash Media” proposes a solution to the above disadvantages.
  • the idea is to set a status flag on the storage block of the flash media, Modification operation; after the power outage occurs, find the data by checking the status flag and perform data recovery, to ensure that even if an illegal power outage occurs in the process of writing data to the flash media, the original data in the flash memory shield will not be lost. Data, and can avoid the situation that the memory block is not completely erased, so that read and write errors occur again.
  • the object of the present invention is to propose a data protection method in a flash media, which can be used in Some kinds of flash media write data quickly and completely protect the data that has been written to the flash media before illegal power off.
  • Another object of the present invention is to provide a method for recovering data in a flash memory medium.
  • the present invention provides a data protection method in a flash memory medium.
  • the flash memory medium includes a plurality of storage blocks, each storage block is composed of multiple pages, and each page is divided into a data storage area and a redundant E.
  • the method includes the following steps: When performing a data operation on the storage block 900 according to a data operation instruction, adding annotation information to a page on which the data operation is performed.
  • performing data operations on the storage block 900 includes relocating data to be retained in another storage block 800 to the storage block 900 and / Or a step of writing new data in the storage block 900 according to a data operation instruction.
  • the label information mentioned in the above method may be the logical address of the memory block 800 pointed to by the specified address of the data operation instruction, or may be a symbol with a certain change rule or fixed, or may be a page of a page on which data operation is performed Numbers and numbers, characters, or a combination of numbers and characters.
  • the invention also provides a method for writing data in a flash memory device.
  • the flash memory device includes a controller for controlling data access and a flash memory medium for storing data.
  • the flash memory medium includes a plurality of storage blocks, and each storage block is composed of a plurality of storage blocks. A page is formed, and each page is divided into a data storage area and a redundant area.
  • the method includes the following steps:
  • the controller accepts the data operation instruction, and searches for the corresponding memory block 800 according to the designated address of the data operation instruction;
  • the label information may be the logical address of the memory block 800 pointed to by the address information in the data operation instruction, or it may have a certain change rule. Numeric value, character, or combination of numeric value and character.
  • the present invention also provides a data recovery method for a flash memory medium, which is suitable for performing data recovery on data corruption caused by an illegal power failure during the data writing process of the flash memory shield by using the foregoing method.
  • the steps include: The label information is checked to determine whether the data of the storage block in the flash memory is complete, and the data recovery operation is performed on the storage block with incomplete data.
  • the label information in the storage block is consistent with the predetermined label information, or conforms to a predetermined rule of change of the label information, it indicates that the data in the storage block is complete.
  • the above method further includes the step of erasing the memory block with incomplete data, and further includes the step of verifying the memory block with complete data by using a check code. If the verification result of the memory block is correct, then erasing any one of the memory blocks; if If the test result of a memory block is incorrect, the memory block whose test result is incorrect is erased.
  • Figure 1 schematically illustrates the organization of memory blocks and pages in an existing flash media shield
  • FIG. 4 is a flowchart of writing new data by a data protection method in a flash memory shield according to a first embodiment of the present invention
  • FIG. 5 illustrates a flowchart of a data recovery process of re-powering on after an illegal power failure occurs during the implementation of the method described in FIG. 4;
  • FIG. 6 is a flowchart of writing new data by a data protection method in a flash memory medium according to a second embodiment of the present invention.
  • FIG. 7 illustrates a flowchart of a data recovery process for re-powering on after an illegal power failure occurs during the implementation of the method described in FIG. 6.
  • FIG. 1 shows the physical structure of an existing flash memory medium.
  • the current general-purpose flash memory medium is generally divided into a plurality of storage blocks (blocks, that is, physical blocks), and each storage block is composed of multiple pages.
  • Each page includes several bytes of data storage area and several bytes of redundant area.
  • each page can contain 512 bytes of data storage area and 16 bytes of redundant area, or each page can contain 2K bytes.
  • the data storage area is generally used to record user data, and the redundant area generally records special information of the flash chip where the page is located, index information such as the address of the storage block where the page is located, and other information that can be set by the user. Areas can also be discarded without use.
  • a logical address of the block is stored in each memory block, and the address is usually stored in the first page of the memory block. This logical address is the basis for finding a memory block.
  • the storage block pointed to by the specified address in the write data control instruction (hereinafter referred to as The data to be retained in the original block) is relocated from the original block to another storage block (hereinafter referred to as a new block).
  • the above-mentioned data to be retained refers to the data in the original data recorded in the original block, which will not be overwritten by the new data to be written.
  • the data to be retained may be all the original data in the original block, or it may be a part of the original data.
  • Reading data from flash media requires reading file allocation tables, directory areas, etc. to obtain information about the files in the flash media. If during the above relocation process of the data to be retained, accidents or user misoperations cause illegal power outages, this relocation process may be unexpectedly interrupted. Be sure to protect at power outages The relocation work of the remaining data has not been completed. The logical addresses of this part of the data are not updated in a timely manner in the file allocation table, directory area, etc., so the data involved in the relocation cannot be read and become invalid data. In this way, the file containing this part of the data saved before it becomes an invalid file, that is, the data file is lost.
  • an erase operation is performed on the original memory block to make it "empty”; this operation is to set all bits in the memory block to logic "1". After the erase operation, all the internal bits are logical " ⁇ , and the block is called” empty block ". If the power is interrupted during the erase process, there may be some bits in the memory block that are already logical" ⁇ , and the remaining part A condition where the bit is still a logic "0". At this time, if new data is written to the memory block, an error occurs.
  • Figure 3 shows an example of the division of a redundant area within a page in a flash memory medium.
  • the page redundancy area includes an area for storing address information.
  • the label information of all pages in a memory block is the same, and are all logical addresses of the memory block.
  • the logical address of the memory block corresponds to the address information in the lookup table.
  • the specified logical address (hereinafter collectively referred to as the specified logical address) can be obtained through address conversion, and then a lookup table is found according to the specified logical address to find the logical address corresponding to the specified logical address. After finding out the physical address corresponding to the logical address, the specified storage block can be found from the flash memory.
  • the address conversion operation on the specified address may be performed by using an existing address conversion technology.
  • a check code area is also provided for storing the calibration code. Calculate the data in the data storage area of the page to get the check value. The check value is compared with the check code in the check code area, and according to the comparison result, it can be judged whether the data stored in the data storage area is correct and complete.
  • the controller calculates a check value based on the data in the data storage area of the page while performing data operations on each page of the memory block, and stores the check value in the check code area.
  • data operations can be performed between the storage blocks 800 and 900 shown in FIG. 2, where the storage block 800 is an original block and it is data The memory block pointed to by the address in the operation instruction.
  • the storage block 900 is a new block.
  • the flash memory medium receives a data operation instruction from an operating system, for example, a new data instruction is written (step 1), the controller of the flash memory device according to the specified address in the instruction Find the storage block to write data, which is the original block 800 (step 2).
  • step 3 it is determined whether the original block 800 pointed to by the specified address is found.
  • step 3 If the original block pointed to by the specified address in the data operation instruction does not exist, go to step 3. An empty block is found in the flash memory medium, and the empty block is virtualized into an original block 800 in which data is already stored.
  • the specific method is: write the specified logical address obtained according to the specified address conversion in the redundant area of the empty block, keep the remaining storage space of the empty block still empty, and then perform step 4 again.
  • step 4 find a blank new block 900.
  • step 5 the controller of the flash memory device determines which pages in the original block 800 will be overwritten by the new data and which pages of the original data need to be retained according to the page number of the data specified in the instruction. For the data to be retained in the original block 800, the controller copies it to the new block 900 on a page-by-page basis, that is, to the original data (that is, the data to be retained) in a part of the pages in the original block that is not covered by the new data. Relocation. Each time a page of data is written into the new block 900, the designated logical address (ie, the logical address of the original block 800) is marked in the redundant area of the page.
  • the original block 800 obtained in the foregoing step 3 is virtually performed, and the operations in steps 4 and 5 are also performed to prevent it from being overwritten by new data.
  • the data in some pages is copied into the new block 900 and the designated logical address is marked in the corresponding page of the new block 900.
  • the original block 800 of the specified write data cannot be found by the specified logical address, and step 3 should be performed, that is, find a blank storage
  • the block writes the designated address in the redundant area of each page, and virtualizes it as the original block 800.
  • a blank new block 900 is found, and the above-mentioned data migration operation is performed (step 5).
  • the data to be written is written into the new block 900, and each time a page is written, a designated logical address is marked in a redundant area of the page (step 6). Up to each page of the new block 900, there is stored data to be retained or newly written data. That is, all pages of the new block 900 are marked with the designated reverse address.
  • step 5 and step 6 are performed sequentially, that is, the data to be retained is first moved, the data to be retained in the original block 800 is moved to the corresponding page of the new block 900, and the designated address is marked on the page. Until all the data to be retained is moved; then write new data to the remaining pages of the new block 900 and mark the designated logical address on the corresponding page, until each page of the new block 900 stores data and is marked with the designated logic address.
  • step 5 and step 6 can also be performed at the same time, that is, while the data is moved from the original block 800 to some pages of the new block 900 and the corresponding pages are marked with the specified logical addresses, the new data is written to the new block 900 Specify the logical address on the other pages of the page.
  • Steps 5 and 6 may also be performed in a mixed manner, for example, according to the order of pages in the new block 900, data operations are performed page by page.
  • the controller judges which pages in the original block 800 will be overwritten by the new data and which pages of the original data need to be retained, according to the page number specified in the instruction. ⁇ According to the judgment result, if the current page in the new block 900 corresponds to the page where the data to be retained in the original block 800 is located, step 5 should be followed.
  • the data to be retained in the original block 800 is moved to the new block 900; if the current page in the new block corresponds to the new data to be written, the new data should be written according to step 6. This is done until the last page 4 of the new block is completed, at this time all pages of the new block 900 have undergone data operations.
  • step 5 After completing steps 5 and 6, all the data required to be retained in the original block 800 has been copied into the new block 900, and all the data to be written according to the data operation instruction is also written. At the same time, each page of the new block 900 is marked with a designated logical address. Next, step 7 is performed to erase the original block 800 completely.
  • step 8 Repeat the above operation until all new data to be written is written (step 8), and update the corresponding address information in the lookup table (step 9).
  • the update method is to modify the logical address of the storage block 900 in the lookup table to the specified logical address .
  • the operation of writing new data is completed.
  • the data protection method of the present invention is characterized in that during the data operation on the new block, for example, copying the data to be retained in the original block to and writing to the new block When new data is entered, the page of the new block is marked.
  • the flash memory medium can restore the data to be retained when the power is reapplied.
  • step 5 If an illegal power failure occurs in the process of step 5, or an illegal power failure occurs when step 5 is completed but step 6 has not yet started, it can be seen from the above description that in any case, only a part of the pages in the new block 900 are migrated into the data. And the designated logical address is marked. After the power is turned on again, the logical addresses of the pages in the new block 900 are checked. If the logical address of a page is found to be different from the specified logical address, the data operation on the new block 900 is in the data relocation stage. Incomplete. At this time, although the data of the new block 900 is incomplete, the data of the original block has not been erased, so the data to be retained will not be lost and can be recovered.
  • step 6 Since step 6 is still performing data operations on the new block 900 and the original block 800 has not been erased, the data to be retained in the original block will not be lost. If an illegal power failure occurs in the process of step 6, because step 6 has not been completed, only part of the page in the new block 900 is written with data and the designated logical address is marked. After the power is turned on again, the logical addresses of the pages in the new memory block 900 are checked. If it is found that the logical address of a page is different from the specified logical address, the data in the new block 900 is incomplete. As described above, since the original block 800 is not erased, the data in the original block 800 is retained. The data to be retained in the original block 800 can be restored before the power is turned on again.
  • step 6 If an illegal power failure occurs after step 6 is completed and before step 7 is performed, the new memory block 900 is now The moved-in data to be retained and the newly written data have been saved, and all pages are marked with the designated logical address.
  • the data in the original block has not yet started to be erased.
  • the logical address of each page of the two storage blocks is the same as the designated address, but the data stored in the internal data storage area of the two storage blocks is different.
  • either the original block 800 or the new block 900 may be erased.
  • a check code is required to check whether each page of data in each storage block is correct, find out the storage block with the wrong data, and erase it; if the data of both storage blocks is correct, any Erase one.
  • the method for verifying the data by using the check code is: In the process of writing data to the storage block, each time a page of data is written, the controller calculates the face correction code according to the data to be written according to an algorithm known in the prior art. , Save it in the redundant area of the page.
  • the same algorithm is used to calculate a check value based on the data stored in the data storage area on the page, and the value is compared with the check code stored in the redundant area of the page. The two are different, indicating that the data stored in the data storage area on the page is different from the data to be written, and the data on the page is wrong.
  • step 7 If an illegal power failure occurs in the process of step 7, at this time, some pages of the original memory block 800 may be erased, and the logical address is lost. If it is found that the logical address of a page in the original block 800 is different from the specified logical address, it means that The erase operation on the original block 800 is not completed, some pages have been erased, and some pages have data left. At this time, the data of each page of the original memory block 800 should be checked. If there are pages that are not completely erased, the original memory block 800 is completely erased to ensure that the original memory block 800 is empty.
  • the controller After the storage device is powered on again, or before data operation is performed again, the controller reads redundant area information of all storage blocks in the storage space of the storage device, and establishes a comparison table based on the read information (step 1);
  • the operation of establishing the look-up table can be performed by using the prior art.
  • the step of establishing the comparison table is interrupted, and the two steps are performed.
  • the memory block performs data recovery operation. (Step 2).
  • One of the two memory blocks 800 and 900 having the same logical address may contain incomplete data information.
  • check whether the logical address of each page in one of the found memory blocks 800/900 matches the specified logical address step 3
  • if there is a page whose logical address does not match the specified logical address, it means that the data in the memory block is incomplete Erase the memory block 800/900 (step 3). Otherwise, check whether the logical address of another memory block 900/800 matches the specified logical address.
  • step 4 If the logical address of another memory block 900/800 is checked (step 4), it is found that the logical address of a page does not match the specified logical address, indicating that the data in the memory block is incomplete, and the memory block 900/800 is erased ( Step 4,). If the logical addresses of the two storage blocks match, the data in both storage blocks is complete. However, the data stored in the internal data storage area of the two storage blocks may be different, and a check code needs to be performed on the two storage blocks to verify whether the data is correct.
  • the check value is calculated according to the data stored on each page in the storage block 900/800, and compared with the check code stored in the redundant area of the page (step 5); if the check code of a page is found to be different, it indicates that the If the memory block inspection result is incorrect and the internal data of the memory block is incomplete, then the memory block 900/800 is erased (step 5).
  • step 6 If all pages in the memory block 900/800 have the correct inspection result, the same check code is checked on the memory block 800/900 (step 6); if the check code in the memory block 800/900 is found to be different, it will be erased. Memory block 800/900 (step 6,); otherwise, it means that the data in both memory blocks are correct, and either one can be erased. Here, erase memory block 900/800 (step 6,).
  • This method eliminates the storage block data error, loss, or duplication that may be caused by the interruption of the operation of the storage block data, and then determines whether the comparison table is established at this time (step 7); if it is not completed, then the establishment of the comparison table is performed again. Step (step 1 :), until the storage block with the same logical address is no longer found, and the comparison table is created, the data recovery process ends (step 8).
  • the corresponding logical page is marked with a designated logical address on the operation.
  • the designated logical address is the same as the logical address of the original block 800.
  • each page of the virtual original block 800 is also marked with a designated logical address. With this label information, data can be recovered at any time when data is written even if the power is turned off illegally.
  • the content of the label information for the labeling of the memory block is not limited to the specified logical address in the above embodiment, and a numerical value, a character, or a combination of a numerical value and a character may also be used.
  • the setting method of the label information is not limited to labeling the same information on all pages, and can also be set to increment, decrement, accumulate, accumulate, and / or numerical values, characters, or combinations of numeric values and characters that change according to other rules or regulations.
  • the label information storage location is not unique either, it can be stored in the logical address area, it can also be stored in the reserved area or other areas; the number of bytes occupied by the label information is not unique.
  • an incremental value may be used as the labeling information.
  • labeling information is added to each page of the new block 900 in the order of page numbers and one by one. Set the first page to be labeled with a value of 1, and the second page to be labeled with a value of 2. This adds up to the last page of the block, and the last page's labeled value should be equal to the number of pages contained in the storage block.
  • performing data recovery requires checking the logical address of each page of a memory block that may have errors. As long as the logical address of one page does not match, the memory block is considered to have erroneous data.
  • the present invention is not limited to this. In a preferred embodiment, it is specified that data operations on the storage block are performed in the order of pages in the storage block, and may be performed sequentially from the first page to the last page in the storage block. Similarly, you can also start from the last page, follow the page number in reverse order, and finally operate on the next page.
  • steps 5 and 6 may need to be mixed and interleaved, and the data operation is performed page by page in the order of the pages in the new block 900.
  • the controller judges which pages in the original block 800 will be overwritten by the new data, and which pages of the original data need to be retained, according to the page number specified in the data operation instruction. According to the judgment result, if the current page in the new block 900 corresponds to the page where the data to be retained in the original block 800 is located, the data to be retained in the original block 800 should be relocated to the new block 900 according to step 5; The page corresponds to the new data to be written, and the new data should be written according to step 6. This is done until the operation of the last page of the new block is completed, at this time all pages of the new block 900 have been subjected to data operations.
  • the sequence of the above data operations may also be performed from the last page to the next page in reverse order.
  • the check of the marked information in the memory block during the data recovery stage can also check only the first and last pages.
  • the label information of the last page operated on by the memory block can be checked.
  • the labeling is performed according to the predefined labeling information and the data operation sequence; while in the data recovery stage, the controller still operates according to the labeling information and data.
  • Sequence check the label information on the page where the data operation should be last performed according to the data operation sequence in the storage block; for the case where the label information changes according to a certain rule, according to a predefined definition in the process of writing new data
  • the annotation information changes the rule, the initial content and the data operation order to mark.
  • the controller calculates the storage block according to the annotation information change rule, the initial content and the data operation order.
  • the content is consistent with the actual labeling information on the page in the storage block according to the data operation sequence and the last data multiplication.
  • the check of the storage block labeling is simplified. It only needs to check the label information on one page, which greatly reduces the inspection time.
  • each memory block contains 64 pages, and all 64 pages are numbered sequentially from 0, and the page number of the last page is 63.
  • This embodiment also provides the following data operation and labeling methods: The data operation on the storage block starts from the first page (page number 0) of the storage block, and proceeds to the last page in the order of the page numbers ( The page number is 63); the coding rule of the label information is "letter + value", and the value changes according to the increasing rule, that is, the initial label in the first page of the memory block (page number 0) is " ⁇ , ⁇ Two pages (page number 1) should be marked with " ⁇ 2" ... until the last page (page number is
  • FIG. 2 when the data protection method provided by this embodiment is adopted in a flash memory medium, data operations may be performed between storage blocks 800 and 900, where storage block 800 is an original block, which is a data operation instruction in a data operation instruction. The memory block pointed to by the specified address.
  • the storage block 900 is a new block. When data is moved, the data that should be retained in the original block 800 is moved to the corresponding page of the new block 900.
  • step 1 when the flash memory medium receives a data operation instruction from an operating system, for example, a write new data instruction (step 1), the controller of the flash memory device according to the specified address in the instruction Find the storage block to write data, which is the original block 800 (step 2).
  • step 2 when the flash memory medium receives a data operation instruction from an operating system, for example, a write new data instruction (step 1), the controller of the flash memory device according to the specified address in the instruction Find the storage block to write data, which is the original block 800 (step 2).
  • step 3 it is determined whether the original block 800 pointed to by the specified address is found.
  • step 3 find an empty block in the flash memory medium, and virtualize the empty block as an original block 800 with data already stored.
  • the specific method of the virtual original block 800 is similar to the previous embodiment. The difference is that in the redundant area of each page of the empty block, the annotation information obtained according to the encoding rule of the above annotation is written in sequence.
  • the first page (page number 0) Annotation " ⁇ ” the second page (page number 1) is labeled " ⁇ 2" ... so until the last page (page number 63) is labeled " ⁇ 63". Keep the remaining storage space of the empty block Still empty, go to step 4.
  • step 4 find a blank new block 900.
  • step 5 the controller of the flash memory device determines which pages in the original block 800 will be overwritten by the new data and which pages of the original data need to be retained according to the page number of the data specified in the instruction.
  • the controller copies it to the new block 900 on a page-by-page basis, that is, the data to be retained in a part of the pages in the original block that is not covered by the new data is relocated.
  • the labeling information of the page is calculated according to the above labeling information encoding rules, and written into the redundant area of the page.
  • the original block 800 virtually obtained in step 3 above is performed, and the operations in steps 4 and 5 are also performed to prevent it from being newly counted.
  • the part of the page covered is copied into the new block 900, the labeling information is calculated, and the labeling information is written in the corresponding page of the new block 900.
  • Step 3 For the flash memory chip that performs the data writing operation for the first time, according to the data writing method in this embodiment, the original block 800 of the specified write data cannot be found by the specified logical address. Step 3 should be performed to find a blank memory block. , Write corresponding labeling information in the redundant area of each page, and virtualize it as the original block 800; then find a blank new block 900, and perform the above-mentioned data relocation operation (step 5).
  • write the data to be written into the new block 900 calculate the annotation information every time a page is written, and write the annotation information in the redundant area of the page (step 6). Up to each page of the new block 900 stores relocated data to be retained or newly written data. That is, all pages of the new block 900 are labeled accordingly.
  • steps 5 and 6 may be performed in a mixed manner.
  • the data operation on the storage block should be performed page by page in a predefined order.
  • the controller judges which pages in the original block 800 will be overwritten by the new data and which pages of the original data need to be retained according to the page number specified in the instruction. According to the judgment result, if the current page in the new block 900 corresponds to the page where the data to be retained in the original block 800 is located, the data to be retained in the original block 800 should be moved to the new block 900 according to step 5;
  • the page corresponds to the new data to be written, and the new data should be written according to step 6. This is done until the operation of the last page (page number 63) is completed. At this time, all pages of the new block 900 have been data-operated and marked .
  • step 5 After completing steps 5 and 6, all the data required to be retained in the original block 800 has been copied into the new block 900, and all the data to be written according to the data operation instruction is also written. At the same time, each page of the new block 900 has been marked with corresponding labeling information. Next, step 7 is performed to erase the original block 800 completely.
  • step 8 Repeat the above operation until all new data to be written is written (step 8), and update the corresponding address information in the lookup table (step 9).
  • the update method is to modify the logical address of the storage block 900 in the lookup table to the specified logical address .
  • the operation of writing new data is completed.
  • the data protection method provided by this embodiment is implemented in a flash memory medium in detail with reference to FIG. 6 and FIG. 7.
  • the controller After the storage device is powered on again, or before data operation is performed again, the controller reads redundant area information of all storage blocks in the storage space of the storage device, and establishes a comparison table based on the read information (step 1); The operation of establishing the look-up table can be performed by using the prior art. During the reading operation of all the storage blocks and the establishment of the comparison table, if two storage blocks 800 and 900 in the storage space are found to have the same logical address, the step of establishing the comparison table is interrupted, and the two steps are performed. Storage block for data recovery operation (Step 2).
  • One of the two memory blocks 800 and 900 having the same logical address may contain incomplete data information.
  • the information on the last page (page number 63) of one of the storage blocks 800/900 found should be marked:
  • the coding rule of the predefined marking information is "letter + value", where the value changes according to the increasing rule and stored
  • the block contains 64 pages, and it can be concluded that the labeling information of the last page (page number 63) in the storage block should be "A64".
  • step 4 If the annotation information on the last page of another memory block 900/800 is checked (step 4), if the annotation information on the last page does not match the calculated annotation information, it means that the data in the memory block is incomplete, and Block 900/800 is erased (step 4,).
  • the data in both memory blocks is complete.
  • the data stored in the internal data storage area of the two storage blocks may be different. You need to verify the data by using a check code on the two storage blocks.
  • the check value is calculated according to the data stored on each page in the storage block 900/800, and compared with the check code stored in the redundant area of the page (step 5); if the check code of a page is found to be different, it indicates that the If the memory block inspection result is incorrect, erase the memory block 900/800 (step 5,).
  • step 6 If all pages in the memory block 900/800 have the correct inspection result, the same check code is checked on the memory block 800/900 (step 6); if the check code in the memory block 800/900 is found to be different, it will be erased. Memory block 800/900 (step 6,); otherwise, it means that the data in both memory blocks are correct, and either of them can be erased. Here, erase memory block 900/800 (step 6 ").
  • This method eliminates the storage block data error, loss, or duplication that may be caused by the interruption of the operation of the storage block data, and then determines whether the comparison table is established at this time (step 7); if it is not completed, then the establishment of the comparison table is performed again. Step (step 1), until the storage block with the same logical address is no longer found, and the comparison table is created, the data recovery process ends (step 8).
  • the corresponding labeling information when relocating and writing data to a new block, the corresponding labeling information should be marked on the page where the data operation is performed.
  • corresponding labeling information is also marked on each page of the virtual original block 800.
  • the flash memory medium is divided into several zones according to the SSFDC protocol, each zone is composed of a plurality of memory blocks, and each zone is provided with at least one empty memory block.
  • the data to be retained is copied to the storage block.
  • the reserved empty storage block is directly called, which saves the time of finding the empty storage block.
  • a data protection method similar to that of the previous embodiment is used to operate data in each zone.
  • the difference is that when writing data, the scope of finding a new block is limited to the zone where the original block is located.
  • the data operation phase since data read and write operations are only performed between two storage blocks in the same area, other areas of the flash memory shield will not make errors during the above data writing process, so it is only necessary to find the file based on the specified logical address.
  • the storage blocks in the area can be eliminated. Thereby, the speed of writing data in the flash memory medium and the speed of recovering data are improved.
  • zone Zero
  • the introduction of a zone (Zone) mechanism enables the storage blocks participating in data operations to be concentrated in a relatively compact storage space, which saves operation time during data read, write, and recovery.
  • the above is an exemplary description of the present invention.
  • Those of ordinary skill in the art can understand that the method for setting the label information in the page and the check code algorithm are not unique.
  • the search for the memory block can also adopt various known methods. technology.
  • the essence of the present invention is to set label information during data operation to identify the state of the storage block involved, and to verify the correctness of the data in the storage block by combining the check of the check code, so that it can effectively recover after an illegal power failure occurs.
  • the original data file guarantees the integrity of the data.
  • the essence of the data recovery method of the present invention is to check according to the flags in the storage blocks in the flash memory medium, and to check the check code of the page to determine the state of the storage block at the time of the interruption and the integrity of the data in the storage block, Find out the data to be retained, and perform the corresponding data recovery operation to eliminate the error of incomplete erasure of the memory block. Therefore, the changes in the data recovery method caused by the adjustment of the steps in the data writing method do not deviate from the idea of the present invention.

Description

闪存介质中数据保护方法 技术领域
本发明涉及半导体存储领域, 具体地说涉及闪存介盾中数据保护方法, 利 用该方法, 即使在向闪存介盾写入数据时的任一时刻发生非法断电, 所述闪存 介质中的原有数据文件以及已写入的数据都不会丟失,保证了闪存介盾存储数 据的安全。 背景技术
现阶段, 采用闪存介质进行数据存储的移动存储装置已获得广泛使用。 其 不足之处也为用户造成了诸多不便, 例如在向闪存介质中写入数据时, 或对 原来已存在的数据进行修改时, 若由于意外或用户误操作等情况造成非法断 电, 会造成数据丟失。
申请号为 03104983.4,发明名称为"闪存介质中的数据管理方法 "的发明专 利申请针对上述缺点提出了解决方案,其构思是对闪存介质的存储块设置状态 标志, 在写数据时对状态标志进行修改操作; 在断电情况发生后, 通过对状态 标志的检查寻找数据并进行数据恢复,可以确保在对闪存介质写入数据过程中 即使发生非法断电, 也不会丢失闪存介盾中原有的数据, 并且可以避免存储块 没有被完全擦除以致再次读写出错的情况。
在实践中发现上述方法也存在一些不足。 采用上述方法进行数据管理, 由 于要对闪存芯片进行多次读写,致使读写速度降低, 若要提高速度就需要硬件 的支持; 并且该方法不完全符合通用的规范标准, 不能为某些类型的闪存介质 所釆用, 兼容性不强。 发明内容
针对上述现有闪存介质中数据管理技术存在的读写速度低, 不符合规范, 兼容性不强等缺点, 本发明的目的在于提出一种在闪存介质中数据保护方法, 通过该方法可以在现有的各种闪存介质中快速的写入数据并且完整地保护在 非法断电前已写入到闪存介质中的数据。
本发明的另一个目的在于提出一种在闪存介质中恢复数据的方法。
为实现本发明的上述目的, 本发明提供了一种闪存介质中数据保护方法, 闪存介质包括多个存储块,每个存储块由多个页构成,每页划分为数据存储区 和冗余 E , 该方法包括以下步骤: 在根据数据操作指令对存储块 900执行数据 操作时, 对执行数据操作的页加注标注信息。 该方法中, 对存储块 900进行数 据操作包括将另一个存储块 800内要保留的数据搬迁到存储块 900的 骤和 / 或根据数据操作指令在存储块 900中写入新数据的步骤。上述方法中所说的标 注信息可以是数据操作指令的指定地址所指向的存储块 800的逻辑地址,或者 可以是具有一定变化规律或固定不变的符号,也可以是执行数据操作的页的页 号以及数值、 字符或数值和字符的组合。
本发明还提供了在闪存装置中写数据的方法, 闪存装置包括用于控制数据 存取的控制器和用于存储数据的闪存介质, 闪存介质包括多个存储块, 每个存 储块由多个页构成, 每页划分为数据存储区和冗余区, 该方法包括以下步骤:
( 1 )控制器接受数据操作指令, 并根据数据操作指令的指定地址查找相 应的存储块 800;
( 2 )将存储块 800中要保留的数据搬迁到另一个空白存储块 900中, 同 时在存储块 900中执行数据操作的页加注标注信息;
( 3 )根据上述所接受的数据操作指令, 在存储块 900中写入数据并在执 行数据操作的页加注标注信息;
( 4 )擦除存储块 800, 使其为空。
在如上所述的写数据方法中, 在执行步骤(2 )或(3 )时, 标注信息可以 是数据操作指令中的地址信息所指向的存储块 800的逻辑地址,或者是具有一 定变化规律的数值、 字符或数值与字符的组合。
本发明还提供了一种闪存介质的数据恢复方法,其适用于对所述闪存介盾 采用上述方法写数据过程中, 由于非法断电而产生的数据损坏情况进行数据恢 复, 其步骤包括: 通过检验标注信息判断闪存介质中存储块的数据是否完整, 并对数据不完整的存储块进行数据恢复操作。
上述方法中, 若存储块中的标注信息与预定的标注信息一致, 或符合预定 的标注信息变化规律, 就表明存储块中的数据是完整的。
上述方法进一步包括擦除数据不完整的存储块的步骤,还包括利用校验码 检验数据完整的存储块的步骤, 若存储块的检验结果都正确, 则擦除其中任意 一个存储块; 若其中一个存储块检验结果不正确, 则擦除该检验结果不正确的 存储块。
采用本发明提供的数据保护方法, 通过对存储块加注标注信息, 可以确保 在对大多数种类的闪存介质写入新数据过程中,无论是人为的非法操作或是意 外断电等情况, 都不会丟失闪存介质中原有的要保留的数据文件, 还可以避免 存储块没有被完全擦除以致再次读写出错的情况,在不影响读写速度的前提下 提高了数据安全性及系统稳定性。 、 , 、 、 , 、' 、 ― 普通技术人员理解本发明的思想。 附图的简要说明
图 1示意性地说明了现有闪存介盾中存储块和页的组织结构;
Figure imgf000005_0001
区的划分;
图 4是根据本发明第一个实施例的闪存介盾中数据保护方法写入新数据的 流程图;
图 5说明在实施图 4所述方法过程中发生非法断电后重新加电的数据恢复 过程流程图;
图 6是根据本发明第二个实施例的闪存介质中数据保护方法写入新数据的 流程图;
图 7说明在实施图 6所述方法过程中发生非法断电后重新加电的数据恢复 过程流程图。 本发明的具体实施方式
为便于理解本发明的闪存介质中数据保护方法,首先对目前的闪存介质数 据读写技术进行说明。 图 1示出了现有闪存介质的物理构造, 如图所示, 目 前通用的闪存介质一般划分为多个存储块(Block, 即物理块), 每个存储块由 多个页(Page )构成,每个页包括若干字节的数据存储区和若干字节的冗余区, 例如每页可以包含 512字节的数据存储区和 16字节的冗余区, 或者每页可以 包含 2K字节的数据存储区和 64字节的冗余区。所述数据存储区一般用于记录 用户数据,所述冗余区一般记录该页所在的闪存芯片的专用信息和该页所在存 储块地址等索引信息,以及其他可由用户自行设定的信息,该区域也可以弃而不 用。 根据现有技术规范, 每一个存储块中都保存有该块的逻辑地址, 该地址通 常保存在存储块的第一页中。 该逻辑地址是查找存储块的依据。
当用户向闪存介质中写入新数据或对原来已存在的数据进行修改时,根据 闪存介质特殊的读写特性,首先要将写数据控制指令中的指定地址所指向的存 储块(以下称之为原块)中的要保留的数据由原块"搬迁,,到另一个存储块中(以 下称之为新块) 中。
上述要保留的数据是指原块记录的原始数据中,不会被要写入的新数据覆 盖的页中的数据。要保留的数据可能是原块中的全部原始数据, 也可能是原始 数据中的一部分。
从闪存介质读取数据需要通过读文件分配表、 目录区等来获得闪存介盾内 文件的信息。 如果在将要保留的数据进行上述搬迁的过程中, 发生意外或用户 误操作等情况造成非法断电, 会使这个搬迁过程意外中断。 在断电时刻对要保 留的数据的搬迁工作尚未完成, 这部分数据的逻辑地址在文件分配表、 目录区 等内并没有及时的更新,那么这些参与搬迁的数据将无法读取,变为无效数据。 这样, 在此之前保存的含有这部分数据的文件成为无效文件, 即造成数据文件 丢失。
另夕卜,在数据搬迁工作完成后,要对原存储块进行擦除操作,使其为"空"; 该操作是将存储块中的所有位设置为逻辑 "1"。 经过擦除操作,内部所有位都为 逻辑 "Γ,的块称为"空块"。 如果在擦除过程中断电, 可能存在该存储块中一部 分位已经为逻辑" Γ, 而尚余部分位仍为逻辑" 0"的情况。 这时, 若再向该存储 块写入新数据就会出错。
如图 3示出了闪存介质中页内的冗余区的划分示例。 才艮据相关标准, 页冗 余区中包含有存放地址信息的区域,本实施例设置一个存储块内的所有页的标 注信息都一样, 都是该存储块的逻辑地址。 存储块的逻辑地址与对照表中的地 址信息具有对应关系。 根据数据操作指令中的指定地址, 通过地址变换可得出 相应的指定逻辑地址(以下统称为指定逻辑地址), 才 据该指定逻辑地址查找 对照表, 找出与指定逻辑地址相应的逻辑地址, 再找出该逻辑地址对应的物理 地址, 就可以从闪存介质中找到指定的存储块。 所述对指定地址的地址变换操 作可以采用现有的地址变换技术进行。
在冗余区中, 还设置有校验码区域, 用于存放校 码。 对页的数据存储区 内的数据进行计算, 可以得出校验值。 将该校验值与校验码区域内的校验码相 比较, 根据比较结果可以判断数据存储区内存放的数据是否正确完整。 在本发 明实施过程中, 对存储块的每一页进行数据操作的同时, 控制器根据该页的数 据存储区内的数据计算得出校验值, 存放在该校验码区域中。
接下来将根据图 2, 图 3和图 4说明本发明闪存介盾的数据保护方法的一 个具体实施例, 然而, 本领域普通技术人员可以理解, 该具体实施例并不是对 本发明的限定。
根据该实施例, 当在闪存介盾中采用本发明的数据保护方法时, 数据操作 可以在图 2所示的存储块 800和 900之间进行 ·, 其中存储块 800为原块, 其为 数据操作指令中的地址所指向的存储块。 存储块 900为新块, 在实施数据搬迁 时, 将原块 800中要保留的数据搬迁到新块 900相应的页。 具体来说, 如图 4所示, 当所述闪存介质接收到来自操作系统的数据操作 指令, 例如写入新数据指令(步骤 1 )后, 闪存装置的控制器根据所述指令中 的指定地址寻找要写入数据的存储块,即原块 800 (步糠 2 )。
在步骤 3中, 判断是否找到该指定地址所指向的原块 800。
如果数据操作指令中的指定地址所指向的原块不存在, 则进行步骤 3,, 在 所迷闪存介质中找出一个空块,将该空块虚拟为一个已经存有数据的原块 800。 具体做法是: 在该空块的冗余区写入根据指定地址变换得到的指定逻辑地址, 保持该空块的其余存储空间仍然为空, 再进行步橡 4。
如果能找到原块 800, 则直接进行步骤 4。
在步驟 4中, 找出一个空白的新块 900。
接下来在步骤 5中,闪存装置的控制器根据指令中指定要写入数据的页号, 判断原块 800中的哪些页将被新数据覆盖, 哪些页中的原始数据需要保留。 对 于所述原块 800中要保留的数据, 控制器将其按页复制到新块 900中, 即对原 块中的不被新数据覆盖的部分页中的原始数据(即要保留的数据)进行搬迁。 在每向新块 900 中写入一页数据的同时在该页的冗余区内标注指定逻辑地址 (即原块 800的逻辑地址)。
对于数据操作指令中的指定地址所指的原块不存在的情况,在前述步驟 3, 中进行虚拟得到的原块 800, 同样进行步骤 4及步骤 5的操作, 将其不被新数 据覆盖的部分页内的数据复制到新块 900中并在新块 900的相应页中标注指定 逻辑地址。
对于第一次进行数据写入操作的闪存芯片, 根据本实施例中的写数据方 法, 由指定逻辑地址无法找到指定写入数据的原块 800, 应进行步 3,, 即找 出一空白存储块, 在其每一页的冗余区中写入指定 辑地址, 将其虚拟为原块 800; 再找出一空白的新块 900, 进行上述数据搬迁的操作 (步骤 5 )。
接着, 将要写入的数据写入所述新块 900中, 在每写入一页的同时在该页 的冗余区内标注指定逻辑地址(步骤 6 )。直到新块 900的每一页都存储有迁入 的要保留的数据或新写入的数据。 也就是说, 新块 900的所有页都标注了指定 逆辑地址。
以上说明的是步骤 5与步骤 6顺序执行,即首先进行要保留的数据的搬迁, 将原块 800中要保留的数据搬迁到新块 900的对应页中, 同时在该页中标注指 定 辑地址, 直到要保留的数据全部搬迁完毕; 然后再向新块 900的其余页中 写入新数据并在相应页中标注指定逻辑地址,直到新块 900的每一页存储有数 据并标注有指定逻辑地址。
事实上, 步骤 5和步骤 6也可以同时进行, 即在将数据从原块 800搬迁到 新块 900的某些页并在相应页面标注指定逻辑地址的同时,将新数据写入到新 块 900的其他页中并在相应页面标注指定逻辑地址。
步骤 5和 6还可以混合交叉进行, 例如按照新块 900中页的顺序, 逐页进 行数据操作。 控制器根据指令中指定要写入新数据的页号, 判断原块 800中的 哪些页将被新数据覆盖, 哪些页中的原始数据需要保留。 ^据判断结果, 如果 新块 900中的当前页对应原块 800中要保留的数据所在的页,应按照步骤 5将 原块 800中的要保留的数据搬迁到新块 900; 如果新块中当前页对应要写入的 新数据, 应按照步骤 6写入新数据。 如此进行直到新块的最后一页 4喿作完成, 此时新块 900的所有页全部进行过数据操作。
在完成了步骤 5和 6之后,原块 800中要求保留的数据已全部复制到新块 900中, 根据数据操作指令要写入的数据也全部写入完成。 同时, 新块 900的 每一页都已标注了指定逻辑地址。 接下来, 执行步骤 7, 即将原块 800完全擦 除。
重复上述操作直至所有要写入的新数据全部写完(步驟 8 ),更新对照表中 的对应地址信息(步骤 9 ),更新方法是将对照表中存储块 900的逻辑地址修改 为指定逻辑地址。 写入新数据的操作完成。
从对本发明上迷实施例的描述可以理解,本发明的数据保护方法的特征在 于在对新块进行数据操作的过程中 ,例如将原块要保留的数据复制到新块和向 新块中写入新数据时, 对新块的页进行标注。
利用本发明上述的数据保护方法, 在对所述闪存介盾进行数据写入时, 即 使发生非法断电, 可以保证闪存介质中原有文件中的数据不会丟失。
也就是说, 通过上述的闪存介质的数据保护方法, 无论在操作过程的哪个 步骤发生非法断电, 该闪存介质在重新加电时都可以恢复要保留的数据。
例如, 非法断电如果发生在将要保留的数据复制到新块 900之前(步骤 5 进行之前), 或在原块 800被擦除之后(步骤 7完成之后), 由于数据读写操作 尚未开始或已经完成, 不需进行恢复操作。
如果在步骤 5进行过程中发生非法断电,或者步驟 5进行完毕但步骤 6还 未开始进行时发生非法断电, 从以上描述可知, 无论哪种情况, 新块 900中只 有部分页迁入数据并且标注了指定逻辑地址。再次上电后, 对新块 900内各页 的逻辑地址进行检查, 如果发现有某页的逻辑地址与指定逻辑地址不同,说明 对新块 900的数据操作处于数据搬迁阶段, 新块 900中数据不全。 这时, 尽管 新块 900的数据不全, 但原块的数据还未擦除, 所以要保留的数据不会丢失, 可以恢复。
由于步骤 6仍然是对新块 900进行数据操作,还未对原块 800进行擦除, 原块中的要保留的数据不会丢失。 若在步骤 6进行过程中发生非法断电, 由于 步骤 6还未完成,新块 900中还是只有部分页写入数据并且标注了指定逻辑地 址。 再次上电后, 对新存储块 900内各页的逻辑地址进行检查, 如果发现有某 页的逻辑地址与标注的指定逻辑地址不同,说明新块 900中数据不全。如上所 述, 由于未对原块 800进行擦除, 原块 800中的数据得以保留。 在重新上电之 前, 原块 800中的要保留的数据可以恢复。
如果在步骤 6完成之后、步骤 7进行之前发生非法断电,此时新存储块 900 已经保存有迁入的要保留的数据及新写入的数据,并且所有页都标注了指定逻 辑地址。 而原块中的数据尚未开始擦除, 两个存储块每一页的逻辑地址都与指 定 辑地址相同,但两个存储块内部数据存储区保存的数据不同。重新加电时, 擦除原块 800或新块 900的任一个即可。 为了进一步排除可能出错的数据, 需 要通过校验码检验各存储块中每页数据是否正确,找出数据有错的存储块并擦 除; 如果两个存储块的数据都是正确的, 则任意擦除一个。
利用校验码对数据的检验方法是: 在向存储块写数据过程中, 每写入一页 数据时, 控制器根据要写入的数据, 根据现有技术已知的算法计算出校臉码, 将其保存在该页冗余区中。在使用校验码对数据进行检验时,根据页内数据存 储区保存的数据, 采用相同的算法计算出校验值, 将该值与该页冗余区中的保 存的校验码比较, 如果两者不相同,说明该页内数据存储区保存的数据与要写 入的数据不同, 该页内的数据有错。
如果在步骤 7进行过程中发生非法断电,此时原存储块 800可能巳有部分 页被擦除,丢失逻辑地址; 若发现原块 800中有某页的逻辑地址与指定逻辑地 址不同, 说明对原块 800的擦除操作未完成, 部分页已经擦除, 部分页尚余数 据。 此时应对原存储块 800的每一页数据进行检查, 若发现有未完全擦除的页 就对原存储块 800进行完全擦除操作, 以保证原存储块 800为空;
以上是说明在实施本发明数据保护方法的闪存介质遭遇非法断电后数据 恢复的可 性。
接下来结合附图 5具体说明闪存介盾中实施了上述的数据保护方法, 当该 闪存介质因非法断电造成操作中断后, 对该闪存介质的数据恢复方法。
所述存储装置再次上电后, 或再次进行数据操作前,控制器读取所述存储 装置的存储空间中所有存储块的冗余区信息,根据读到的信息建立对照表(步 骤 1 );建立对照表的操作可采用现有技术进行。在对所有存储块进行读取操作、 建立对照表的过程中,若发现存储空间中有两个存储块 800和 900具有相同的 逻辑地址, 则中断建立对照表的步骤, 转到对这两个存储块进行数据恢复操作 . (步驟 2 )。
在逻辑地址相同的两个存储块 800和 900内,可能有一个含有不完整的数 据信息。 此时 :验找到的其中一个存储块 800/900中每页的逻辑地址是否与指 定逻辑地址相符(步骤 3 ),如果有某页逻辑地址与指定逻辑地址不符,说明该 存储块内数据不完整, 将存储块 800/900擦除(步骤 3,)。 否则检查另一个存 储块 900/800的逻辑地址是否与指定逻辑地址相符。
如果通过对另一个存储块 900/800的逻辑地址进行检查(步骤 4 ),发现有 某页逻辑地址与指定逻辑地址不符, 说明该存储块内数据不完整, 将存储块 900/800擦除(步骤 4,)。 如果两个存储块的逻辑地址都相符, 说明两个存储块内的数据都是完整 的。 但两个存储块内部数据存储区保存的数据可能不同, 需要分别对两个存储 块通过校验码来检验数据是否正确。 此时, 根据存储块 900/800中每页存储的 数据计算校验值, 并与该页冗余区内存储的校验码比较(步骤 5 ); 如果发现某 页校验码不符, 说明该存储块检验结果不正确, 该存储块内部数据不完整, 则 擦除存储块 900/800 (步骤 5,)。
如果存储块 900/800内所有页的检验结果都正确, 则对存储块 800/900进 行相同的校验码检查(步驟 6 ); 如发现存储块 800/900内校验码有不符则擦除 存储块 800/900 (步骤 6, ); 否则说明两个存储块内的数据都是正确的, 可以擦 除其中任一个, 此处擦除存储块 900/800 (步骤 6,,)。
通过该做法排除了对存储块数据操作中断可能造成的存储块数据错误、丟 失或重复情况, 然后判断此时对照表建立完毕与否 (步骤 7 ); 如果没有完毕, 则重新进行建立对照表的步驟(步骤 1:),直到不再发现逻辑地址相同的存储块, 对照表建立完毕为止, 数据恢复流程结束(步骤 8 )。
在上述实施例中, 在向新块搬迁和写入数据的时候, 要在所进行操作的相 应页面标注指定逻辑地址。 该指定逻辑地址与原块 800的逻辑地址相同。 如上 所述, 在写入数据阶段, 当未能找到原块 800而虛拟原块 800时(步骤 3,), 也要在所虚拟的原块 800的每一个页面标注指定逻辑地址。 通过该标注信息, 在写数据的任何时刻即使非法断电也能实现数据恢复。
根据本发明,对存储块所作的标注,其标注信息内容并不局限于上述实施例 中的指定逻辑地址, 还可以采用数值、 字符或数值与字符的组合。 标注信息的 设置方式也不仅限于对所有页标注同样信息,还可以设置成递增、递减、累加、 累乘和 /或按照其他规律或规则变化的数值、 字符或数值与字符的组合。 标注 信息存放的位置也不是唯一的, 可以存放在逻辑地址区, 也可以存放在保留区 或其他区域;标注信息所占字节数目也不是唯一的。本领域技术人员可以理解, 对标注信息的内容、存放位置以及变化规律的设置方法有多种可能, 只要是按 照某种规律或规则加注标注信息, 都将落入本发明的保护范围内。
例如,可采用递增的数值作为标注信息,在写入数据的过程中,对新块 900 的每一页按照页号顺序, 逐页加一的方式加注标注信息。 设置第一页标注数值 1, 第二页标注数值 2, 如此累加直至该块的最后一页, 最后一页的标注数值应 该等于该存储块中包含的页的数目。
在采用上述标注方法写数据的过程中如果发生非法断电, 可能存在新块 900的部分页已经被标注, 而剩余页无标注信息的情况。 才艮据本发明的思想, 通过对标注信息的检查, 可以判断存储块内数据是否完整。 进而结合对校验码 的检查, 找出完整正确的数据并进行恢复操作。 数据恢复操作的原理同上迷实施例,所述闪存装置的控制器根据写入新数 据栺令中的指定地址, 经过地址变换、 查找对照表, 在闪存介质中寻找所有地 址信息与该指定逻辑地址相符的存储块,再通过检查其每一页的标注信息来判 断存储块内数据是否完整; 结合校验码找出正确的数据进行恢复。
在上述实施例中,进行数据恢复需要对可能有错误的存储块的每一页检查 逻辑地址, 只要有一页的逻辑地址不符, 就认为该存储块存在错误数据。 然 而本发明不局限于此。在一个优选实施方案中,规定对存储块的数据操作都按 照存储块内页的次序进行, 可以从存储块中的第一页顺序进行到最后一页。 同 样地,也可以先从最后一页开始操作,按照页号倒序进行,最后对笫一页操作。
如果采用上述方法对存储块写入数据,步骤 5与步骤 6可能需要混合交叉 进行, 按照新块 900中页的顺序, 逐页进行数据操作。 控制器根据数据操作指 令中指定要写入新数据的页号, 判断原块 800中的哪些页将被新数据覆盖, 哪 些页中的原始数据需要保留。根据判断结果, 如果新块 900中的当前页对应原 块 800中要保留的数据所在的页,应按照步驟 5将原块 800中的要保留的数据 搬迁到新块 900; 如果新块中当前页对应要写入的新数据, 应按照步骤 6写入 新数据。 如此进行直到新块的最后一页操作完成, 此时新块 900的所有页全部 进行过数据操作。
由于在本实施例的写数据过程中,对存储块的所有数据操作, 包括数据搬 迁、 新数据的写入和标注都是从该块的第一页开始, 依次进行到最后一页的, 如果中途发生非法断电,数据操作未能进行到存储块的最后一页, 必然会造成 第一页和 /或最后一页的标注信息不完整。 因此在数据恢复过程中, 仅需对每 一个存储块的第一页和最后一页的标注信息进行检查,大大提高了数据恢复程 序的效率。
上述数据操作的次序也可以是从最后一页, 按照倒序进行到笫一页的。 其 恢复数据阶段对存储块内标注信息的检查, 也可以只检查第一页和最后一页。
为了进一步简化操作,可以只对存储块的最后一个进行操作的页的标注信 息进行检查。对于对所有页标注信息为同一内容的情况, 在写入新数据的过程 中根据预先定义好的标注信息以及数据操作顺序进行标注; 而在数据恢复阶 段, 控制器依旧根据该标注信息和数据操作顺序,检查存储块中按照该数据操 作顺序,应当最后进行数据操作的那一页中的标注信息; 对于标注信息按照某 规则进行变化的情况,在写入新数据的过程中根据预先定义好的标注信息变化 规则、 初始内容以及数据操作顺序进行标注; 在数据恢复阶段, 控制器根据标 注信息变化规则、 初始内容以及数据操作顺序, 计算得到该存储块中, 按照该 数据操作顺序最后应标注的内容, 与存储块中按照该数据操作顺序, 最后进行 数据乘作的那一页中的实际标注信息是否相符。 此时,对存储块标注的检查简 化到只需检查一页中的标注信息, 大大缩短了检查时间。
以下是本发明的另一个优选实施例,其具体体现了上述改进的数据保护方 法。
在本实施例中假设每个存储块包含 64个页,对所有 64个页从 0开始顺序 进行编号,最后一页页号为 63。本实施例还对执行的数据操作及标注的方法作 如下规定: 对存储块的数据操作从存储块的第一页 (页号为 0 )开始, 按照页 号的顺序依次进行到最后一页 (页号为 63 ); 标注信息的编码规则为"字母 +数 值", 其中的数值按照递增规则变化, 即在存储块的第一页(页号为 0 )中的初 始标注为" ΑΓ, 对笫二页(页号为 1 )应标注 "Α2" ......直至最后一页 (页号为
63 )应标注 "Α64"。
现参照图 2和图 6, 说明本实施例在闪存介质中数据保护的方法。 如图 2 所示, 当在闪存介质中采用本实施例提供的数据保护方法时, 数据操作可以在 存储块 800和 900之间进行, 其中存储块 800为原块, 其为数据操作指令中的 指定地址所指向的存储块。存储块 900为新块,在实施数据搬迁时,将原块 800 中应当保留的数据 ¾:迁到新块 900相应的页。
具体来说, 如图 6所示, 当所述闪存介质接收到来自操作系统的数据操作 指令, 例如写入新数据指令(步驟 1 )后, 闪存装置的控制器根据所述指令中 的指定地址寻找要写入数据的存储块,即原块 800 (步驟 2 )。
在步骤 3中, 判断是否找到该指定地址所指向的原块 800。
如果数据操作指令中的指定地址所指向的原块不存在, 则进行步骤 3,,在 所述闪存介质中找出一个空块,将该空块虚拟为一个已经存有数据的原块 800。 虚拟原块 800的具体方法与上一个实施例相似,其不同之处在于在所述空块每 页的冗余区依次写入根据上述标注的编码规则得到的标注信息, 第一页(页号 为 0 )标注" ΑΓ, 第二页 (页号为 1 )标注 "Α2" ......如此直到最后一页 (页号 为 63 )标注" Α63"。 保持该空块的其余存储空间仍然为空, 再进行步骤 4。
如果能找到原块 800, 则直接进行步骤 4。
在步骤 4中,.找出一个空白的新块 900。
接下来在步骤 5中,闪存装置的控制器根据指令中指定要写入数据的页号, 判断原块 800中的哪些页将被新数据覆盖, 哪些页中的原始数据需要保留。 对 于所述原块 800中要保留的数据, 控制器将其按页复制到新块 900中, 即对原 块中的不被新数据覆盖的部分页中的要保留的数据进行搬迁。 在每向新块 900 中写入一页数据的同时, 根据上述标注信息编码规则计算该页的标注信息, 并 写入该页的冗余区内。
对于数据操作指令中的指定地址所指的原块不存在的情况,在前述步驟 3, 中进行虚拟得到的原块 800, 同样进行步骤 4及步驟 5的操作, 将其不被新数 据覆盖的部分页复制到新块 900中,计算标注信息, 并在新块 900的相应页中 写入该标注信息。
对于第一次进行数据写入操作的闪存芯片, 根据本实施例中的写数据方 法, 由指定逻辑地址无法找到指定写入数据的原块 800, 应进行步骤 3,, 找出 一空白存储块,在其每一页的冗余区中写入相应的标注信息, 将其虚拟为原块 800; 再找出空白的新块 900, 进行上述数据搬迁的操作(步骤 5 )。
接着,将要写入的数据写入所述新块 900中, 在每写入一页的同时计算标 注信息,并在该页的冗余区内写入标注信息(步骤 6 )。直到新块 900的每一页 都存储有搬迁的要保留的数据或新写入的数据。 也就是说,新块 900的所有页 都进行了相应的标注。
上述操作中, 步驟 5和 6可以混合交叉进行。 此时对存储块的数据操作要 按照预先定义的顺序,逐页进行。控制器根据指令中指定要写入新数据的页号, 判断原块 800中的哪些页将被新数据覆盖,哪些页中的原始数据需要保留。根 据判断结果,如果新块 900中的当前页对应原块 800中要保留的数据所在的页, 应按照步骤 5将原块 800中的要保留的数据搬迁到新块 900; 如果新块中当前 页对应要写入的新数据,应按照步骤 6写入新数据,如此进行直到最后一页(页 号 63 )操作完成,此时新块 900的所有页全部进行过数据操作并且全部进行了 标注。
在完成了步骤 5和 6之后,原块 800中要求保留的数据已全部复制到新块 900中, 根据数据操作指令要写入的数据也全部写入完成。 同时, 新块 900的 每一页都已标注了相应的标注信息。 接下来, 执行步骤 7, 即将原块 800完全 擦除。
重复上述操作直至所有要写入的新数据全部写完(步骤 8 ),更新对照表中 的对应地址信息(步骤 9 ),更新方法是将对照表中存储块 900的逻辑地址修改 为指定逻辑地址。 写入新数据的操作完成。
如果在上述写操作过程中发生非法断电,存储块 800及 900中可能产生错 误的情况与实施例一中相似, 故不赘述。
现在结合附图 6及附图 7具体说明闪存介质中实施了本实施例提供的数据 保护方法, 当该闪存介质因非法断电造成操作中断后, 对该闪存介质再次加电 时的数据恢复方法。 '
所述存储装置再次上电后, 或再次进行数据操作前,控制器读取所述存储 装置的存储空间中所有存储块的冗余区信息, 根据读到的信息建立对照表 (步 驟 1 );建立对照表的操作可采用现有技术进行。在对所有存储块进行读取操作、 建立对照表的过程中,若发现存储空间中有两个存储块 800和 900具有相同的 逻辑地址, 则中断建立对照表的步骤, 转到对这两个存储块进行数据恢复操作 (步驟 2 )。
在逻辑地址相同的两个存储块 800和 900内,可能有一个含有不完整的数 据信息。 此时检验找到的其中一个存储块 800/900的最后一页(页号为 63 )应 标注的信息: 预定义标注信息的编码规则为"字母 +数值", 其中的数值按照递 增规则变化, 存储块中包含 64个页, 由此可得出, 该存储块中最后一页 (页 号为 63 )的标注信息应为" A64"。
将该计算结果与所述存储块中最后一页(页号为 63 )中的标注信息进行比 较,根据本发明的数据保护方法可知, 只要是所述最后一页(页号为 63 )内标 注信息与计算得出的标注信息不相符,就说明该存储块在中断前的数据操作中 使用过, 说明该块数据不完整, 将其擦除(步骤 3,), 否则采用同样方法检查 另一个存储块 900/800最后一页的标注信息。
如果通过对另一个存储块 900/800的最后一页标注信息进行检查(步骤 4 ), 若最后一页的标注信息与计算得出的标注信息不相符,说明该存储块内数据不 完整, 将存储块 900/800擦除(步骤 4,)。
如果第二个存储块内最后一页的标注信息也正确,说明两个存储块内的数 据都是完整的。但两个存储块内部数据存储区保存的数据可能不同, 需要分别 对两个存储块通过校验码来检验数据是否正确。 此时, 根据存储块 900/800中 每页存储的数据计算校验值, 并与该页冗余区内存储的校验码比较(步骤 5 ); 如果发现某页校验码不符, 说明该存储块检验结果不正确, 则擦除存储块 900/800 (步骤 5,)。
如果存储块 900/800内所有页的检验结果都正确, 则对存储块 800/900进 行相同的校验码检查(步骤 6 ); 如发现存储块 800/900内校验码有不符则擦除 存储块 800/900 (步骤 6, ); 否则说明两个存储块内的数据都是正确的, 可以擦 除其中任一个, 此处擦除存储块 900/800 (步骤 6" )。
通过该做法排除了对存储块数据操作中断可能造成的存储块数据错误、丟 失或重复情况, 然后判断此时对照表建立完毕与否 (步驟 7 ); 如果没有完毕, 则重新进行建立对照表的步骤(步骤 1 ),直到不再发现逻辑地址相同的存储块, 对照表建立完毕为止, 数据恢复流程结束(步骤 8 )。
在上述实施例中, 在向新块搬迁和写入数据的时候,要在进行数据操作的 页面标注相应标注信息。如上所述,当未能找到原块 800而虚拟原块 800时(步 骤 3' ), 也要在所虛拟的原块 800的每一个页面标注相应标注信息。 通过该标 注信息, 在写数据的任何时刻即使非法断电也能实现数据恢复。
根据本发明方法的又一个实施例, 按照 SSFDC协议将所述闪存介质分成 若干个区 (Zone ), 每个区由若干个存储块构成, 并且每个区都有设置至少一 个空存储块, 用于将要保留的数据复制到该存储块中。 在写入新数据阶段, 如 果需要查找新块 900, 则直接调用该预留的空存储块, 节省了查找空存储块的 时间。
在本实施例中,采用与前述实施例类似的数据保护方法对各区内的数据进 行操作, 其不同之处在于在写数据操作时, 寻找新块的范围局限在原块所在的 区中; 在恢复数据操作阶段, 由于数据读写操作只是在同一区内的两个存储块 之间进行, 所述闪存介盾的其他区在上述写数据过程中不会出错, 故只需根据 指定逻辑地址查找本区内的存储块并排除错误即可。 借此, 提高了在所述闪存 介质中写数据的速度及恢复数据的速度。
引入区(Zone )的机制, 使得参与数据操作的存储块集中在相对紧凑的存 储空间中, 在数据的读写和恢复过程中, 节省了操作时间。
以上是对本发明示例性地说明, 本领域普通技术人员可以理解, 对页内的 标注信息设置的方法, 以及校验码算法都不是唯一的, 搜寻存储块的途径也可 采用各种已知的技术。本发明的精髓是在数据操作时设置标注信息以鉴别所涉 及的存储块的状态, 结合对校验码的检验以鉴别存储块内数据的正确性, 从而 在发生非法断电后能有效地恢复原有数据文件, 保证数据的完整性。
而本发明的数据恢复方法的精髓在于根据闪存介质中存储块中的标志进 行检查, 结合对页的校验码的检查, 判断中断发生时刻存储块的状态及存储块 内数据的完整性, 进而找出要保留的数据,. 进行相应的数据恢复操作, 排除存 储块擦除不完全的错误。 因此, 对于写数据方法中的步骤调整而造成恢复数据 方法的改变, 是不偏离本发明思想的。
不偏离本发明思想的对本发明技术方案的各种改型将落入本发明权利要 求所限定的范围中。

Claims

权利要求:
1. 闪存介盾中数据保护方法,所述闪存介质包括多个存储块,每个存储块 由多个页构成, 每页划分为数据存储区和冗余区, 所述方法包括以下步骤: 根 据数据操作指令对所述存储块 ( 900 )执行数据操作时, 对执行数据操作的页 加注标注信息。
2.根据权利要求 1所述的方法, 其中对所述存储块(900 )进行数据操作 包括将另一个存储块( 800 )内要保留的数据搬迁到所述存储块( 900 )的步骤。
3.根据权利要求 1所述的方法, 其中对所述存储块(900 )进行数据操作 包括根据所述数据操作指令在所述存储块 ( 900 ) 中写入新数据的步骤。
4.根据权利要求 1-3任何一个权利要求所述的方法,其中所述的标注信息 可以是所述数据操作指令的指定地址所指向的存储块(800 )的逻辑地址。
5.根据权利要求 1-3任何一个权利要求所述的方法,其中所述的标注信息 可以是具有一定变化规律或固定不变的符号。
6.根据权利要求 5所述的方法,其中在所述执行数据操作的页中加注标注 信息时, 所述标注信息可以是执行数据操作的页的页号。
7.根据权利要求 5所述的方法,其中在所述执行数据操作的页中加注标注 信息时, 所述标注信息可以是数值、 字符或数值和字符的组合。
8.在闪存装置中写数据的方法,所述闪存装置包括用于控制数据存取的控 制器和用于存储数据的闪存介质, 所述闪存介质包括多个存储块, 每个存储块 由多个页构成, 每页划分为数据存储区和冗余区, 所述方法包括以下步骤:
( 1 )所述控制器接受数据操作指令, 并根据数据操作指令的指定地址查 找相应的存储块(800 );
( 2 )将所述存储块 ( 800 )中要保留的数据搬迁到另一个空白存储块 ( 900 ) 中, 同时在所述存储块 ( 900 ) 中对执行数据才喿作的页加注标注信息;
( 3 )根据上述所接受的数据操作指令, 在所述存储块(900 )中写入数据 并在执行数据操作的页加注标注信息;
( 4 )擦除存储块( 800 ), 使其为空。
9.根据权利要求 8所述的方法, 其中在执行步骤( 2 )或( 3 )时, 所述的 标注信息可以是数据操作指令中的指定地址所指向的存储块(800 )的逻辑地 址。
10.根据权利要求 8所述的方法, 其中在执行步骤(2 )或(3 )时, 所述 的标注信息可以是固定不变或具有一定变化规律的数值、字符或数值与字符的 组合。
11. 闪存介质的数据恢复方法, 其适用于在所述闪存介质采用如权利要求 8所迷方法写数据过程中 ,由于非法断电而产生的数据损坏情况进行数据恢复, 其步驟包括: 通过检验标注信息判断所述闪存介盾中存储块的数据是否完整, 并对数据不完整的存储块进行数据恢复操作。
12.根据权利要求 11所述的方法,若存储块中的标注信息与预定的标注信 息一致, 或符合预定的标注信息变化规律, 表明存储块中的数据是完整的。
13.根据权利要求 11所述的方法,进一步包括擦除数据不完整的存储块的 步骤。
14.根据权利要求 11所述的方法,进一步包括利用校验码检验数据完整的 存储块的步骤, 若存储块的检验结果都正确, 则擦除其中任意一个存储块; 若 其中一个存储块检验结果不正确, 则擦除该检验结果不正确的存储块。
PCT/CN2004/000649 2003-06-20 2004-06-18 Procede de protection de donnees pour support de memoire flash WO2004114139A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CNB031374239A CN100377119C (zh) 2003-06-20 2003-06-20 闪存介质中数据保护方法
CN03137423.9 2003-06-20

Publications (1)

Publication Number Publication Date
WO2004114139A1 true WO2004114139A1 (fr) 2004-12-29

Family

ID=33520374

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2004/000649 WO2004114139A1 (fr) 2003-06-20 2004-06-18 Procede de protection de donnees pour support de memoire flash

Country Status (2)

Country Link
CN (1) CN100377119C (zh)
WO (1) WO2004114139A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306379A (zh) * 2019-08-01 2021-02-02 北京兆易创新科技股份有限公司 数据搬移的恢复方法、装置、电子设备及存储介质
CN113890735A (zh) * 2021-11-10 2022-01-04 天宇鸿图应用技术研究院(重庆)有限公司 基于量子密钥分发的大质数累乘对称加密方法
CN112306379B (zh) * 2019-08-01 2024-05-17 兆易创新科技集团股份有限公司 数据搬移的恢复方法、装置、电子设备及存储介质

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070005874A1 (en) * 2005-07-01 2007-01-04 Dan Dodge File system storing transaction records in flash-like media
US7873683B2 (en) 2005-07-01 2011-01-18 Qnx Software Systems Gmbh & Co. Kg File system having transaction record coalescing
US7809777B2 (en) 2005-07-01 2010-10-05 Qnx Software Systems Gmbh & Co. Kg File system having deferred verification of data integrity
US8959125B2 (en) 2005-07-01 2015-02-17 226008 Ontario Inc. File system having inverted hierarchical structure
US7970803B2 (en) 2005-07-01 2011-06-28 Qnx Software Systems Gmbh & Co. Kg Optimized startup verification of file system integrity
US7908276B2 (en) 2006-08-25 2011-03-15 Qnx Software Systems Gmbh & Co. Kg Filesystem having a filename cache
US8566503B2 (en) 2006-08-25 2013-10-22 Qnx Software Systems Limited Multimedia filesystem having unified representation of content on diverse multimedia devices
CN101154447B (zh) * 2006-09-28 2010-08-18 北京握奇数据系统有限公司 一种闪存控制方法及闪存
CN100504814C (zh) 2007-01-17 2009-06-24 忆正存储技术(深圳)有限公司 闪存的区块管理方法
CN101408864B (zh) * 2007-10-09 2011-08-24 群联电子股份有限公司 用于断电时的数据保护方法及使用此方法的控制器
CN101763490B (zh) * 2009-12-18 2012-11-21 东信和平科技股份有限公司 闪存智能卡的数据移动方法
CN102541463B (zh) * 2010-12-28 2014-07-23 慧荣科技股份有限公司 快闪存储装置及其数据存取方法
TWI539282B (zh) * 2014-10-13 2016-06-21 慧榮科技股份有限公司 非揮發性儲存裝置與控制器
CN107391296B (zh) 2016-04-27 2020-11-06 慧荣科技股份有限公司 存取闪存模块的方法及相关的闪存控制器与记忆装置
US10289487B2 (en) 2016-04-27 2019-05-14 Silicon Motion Inc. Method for accessing flash memory module and associated flash memory controller and memory device
CN111679787B (zh) 2016-04-27 2023-07-18 慧荣科技股份有限公司 闪存装置、闪存控制器及闪存存储管理方法
US10019314B2 (en) 2016-04-27 2018-07-10 Silicon Motion Inc. Flash memory apparatus and storage management method for flash memory
CN107391026B (zh) 2016-04-27 2020-06-02 慧荣科技股份有限公司 闪存装置及闪存存储管理方法
CN108733586A (zh) * 2017-04-19 2018-11-02 北京兆易创新科技股份有限公司 一种保护方法和装置
CN107273233B (zh) * 2017-05-24 2020-06-19 浙江大华技术股份有限公司 一种数据读取方法和装置
TWI687930B (zh) * 2018-11-07 2020-03-11 慧榮科技股份有限公司 快閃記憶體控制器、管理快閃記憶體模組的方法及相關的電子裝置
CN109992443B (zh) * 2019-03-06 2023-03-10 珠海妙存科技有限公司 一种nand闪存数据检查方法
TWI704450B (zh) * 2019-07-23 2020-09-11 慧榮科技股份有限公司 瞬間斷電回復處理方法及電腦程式產品以及裝置
CN112306742A (zh) 2019-07-23 2021-02-02 慧荣科技股份有限公司 瞬间断电回复处理方法及计算机可读取存储介质以及装置
CN112286721A (zh) 2019-07-23 2021-01-29 慧荣科技股份有限公司 瞬间断电回复处理方法及计算机可读取存储介质以及装置
CN114242125B (zh) * 2021-11-15 2022-11-08 珠海妙存科技有限公司 Nand flash数据的掉电保护方法、装置及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08235028A (ja) * 1995-02-28 1996-09-13 Toshiba Corp フラッシュメモリカードのデータ管理方法およびそのデータ管理方法を使用したデータ処理装置
JPH11328982A (ja) * 1998-03-19 1999-11-30 Fuji Electric Co Ltd フラッシュメモリのデ―タ管理方式
JP2000222292A (ja) * 1999-02-04 2000-08-11 Nec Saitama Ltd フラッシュメモリを利用したデータ管理方法
CN1420440A (zh) * 2001-11-16 2003-05-28 三星电子株式会社 快闪存储器管理方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08235028A (ja) * 1995-02-28 1996-09-13 Toshiba Corp フラッシュメモリカードのデータ管理方法およびそのデータ管理方法を使用したデータ処理装置
JPH11328982A (ja) * 1998-03-19 1999-11-30 Fuji Electric Co Ltd フラッシュメモリのデ―タ管理方式
JP2000222292A (ja) * 1999-02-04 2000-08-11 Nec Saitama Ltd フラッシュメモリを利用したデータ管理方法
CN1420440A (zh) * 2001-11-16 2003-05-28 三星电子株式会社 快闪存储器管理方法

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306379A (zh) * 2019-08-01 2021-02-02 北京兆易创新科技股份有限公司 数据搬移的恢复方法、装置、电子设备及存储介质
CN112306379B (zh) * 2019-08-01 2024-05-17 兆易创新科技集团股份有限公司 数据搬移的恢复方法、装置、电子设备及存储介质
CN113890735A (zh) * 2021-11-10 2022-01-04 天宇鸿图应用技术研究院(重庆)有限公司 基于量子密钥分发的大质数累乘对称加密方法

Also Published As

Publication number Publication date
CN100377119C (zh) 2008-03-26
CN1567256A (zh) 2005-01-19

Similar Documents

Publication Publication Date Title
WO2004114139A1 (fr) Procede de protection de donnees pour support de memoire flash
TWI639917B (zh) 資料儲存裝置及映射表重建方法
US6970890B1 (en) Method and apparatus for data recovery
US5734816A (en) Nonvolatile memory with flash erase capability
JP5675954B2 (ja) メタデータタグを介した不規則なパリティ分布の検出
CN102880521B (zh) 非易失性存储器装置中管理块和存取数据页的方法及设备
JP4560408B2 (ja) 不揮発性記憶装置の制御方法
EP1739535B1 (en) File system storing transaction records in flash-like media
US8959125B2 (en) File system having inverted hierarchical structure
CA2818472C (en) Optimized startup verification of file system integrity
US8655927B2 (en) Memory device, electronic system, and methods associated with modifying data and a file of a memory device
EP1607867B1 (en) Data management method for flash memory medium
EP1550952A2 (en) Address mapping method and mapping information managing method for flash memory, and flash memory using the same
JP2002175211A (ja) データ管理システムおよびデータ管理方法
CN109582216B (zh) 数据储存装置与存储器装置的数据处理方法
CN101944386B (zh) 识别闪速存储器中错误数据的控制电路及存储系统与方法
JP2007012056A (ja) データ保全の先送りされた認証を有するファイルシステム
TWI486957B (zh) Nand快閃記憶體燒錄資料的處理、使用方法及裝置、運行系統
CN101281492B (zh) 恢复闪存的对照表的方法
TWI404071B (zh) 能識別快閃記憶體中錯誤資料的控制電路及儲存系統與方法
KR20160039153A (ko) 에러 정정 코드(ecc) 에러 핸들링을 위한 방법 및 디바이스
TW201015564A (en) Link table recovery method
WO2008022568A1 (fr) Structure de stockage à grande fiabilité de secteur de gestion de triage
JP2004062851A (ja) 直接重複書き込み可能で冗長フィールドの使用不要の非揮発性メモリの保存システム及びその書き込み方法
CN103092727B (zh) Flash存储介质上的数据纠错方法和装置

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
122 Ep: pct application non-entry in european phase