CN113434438B - Method for prolonging FLASH write-in life of smart card - Google Patents

Method for prolonging FLASH write-in life of smart card Download PDF

Info

Publication number
CN113434438B
CN113434438B CN202110661150.7A CN202110661150A CN113434438B CN 113434438 B CN113434438 B CN 113434438B CN 202110661150 A CN202110661150 A CN 202110661150A CN 113434438 B CN113434438 B CN 113434438B
Authority
CN
China
Prior art keywords
block
file
polling
space
writable
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
CN202110661150.7A
Other languages
Chinese (zh)
Other versions
CN113434438A (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.)
Wuhan Tianyu Information Industry Co Ltd
Original Assignee
Wuhan Tianyu Information Industry 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 Wuhan Tianyu Information Industry Co Ltd filed Critical Wuhan Tianyu Information Industry Co Ltd
Priority to CN202110661150.7A priority Critical patent/CN113434438B/en
Publication of CN113434438A publication Critical patent/CN113434438A/en
Application granted granted Critical
Publication of CN113434438B publication Critical patent/CN113434438B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1068Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices in sector programmable memories, e.g. flash disk
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7211Wear leveling
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention provides a method for prolonging the writing life of a FLASH of an intelligent card, which belongs to the technical field of data storage of the intelligent card, and comprises the steps that when a file system creates a file, a plurality of bytes are expanded at a file header to store the initial address and the polling page number of the file in the FLASH, a polling space comprising a plurality of physical pages is divided in the FLASH according to the initial address and the polling page number, and a file body and a mark header are written into the polling space as a data block; when the file system updates the file, the polling space is traversed by taking the block size of the data block as a unit until an effective block is found, the next continuous storage space of the effective block is judged to be a writable block, the updated file is written into the writable block, and the storage capacity of the next continuous storage space is the same as the block size of the data block. The invention can traverse the polling space by taking the block size of the data block as a unit until finding the effective block and the writable block through a polling mode in the FLASH page, and directly write new data in the writable block, thereby improving the writing efficiency and the writing life.

Description

Method for prolonging writing life of FLASH of smart card
Technical Field
The invention relates to the technical field of data storage of smart cards, in particular to a method for prolonging the FLASH write-in life of a smart card.
Background
Traditionally, the above file system is implemented in an extremely simple storage manner, and the file entries and the file contents are stored together and stored continuously on a physical medium. Since FLASH is generally used as the storage medium of the smart card file system, when updating the file content, the erase operation must be performed on the physical medium occupied by the file first, and then the write operation can be performed. Due to the physical limitations of FLASH, the erase operation takes a long time, thus reducing the efficiency of the file system write. Meanwhile, because the storage address of the file on the physical medium is fixed, when the file is written at a high frequency, the storage area occupied by the file is worn quickly, and the service life of the storage medium is reduced.
In order to improve the service life of the storage medium, a wear leveling algorithm needs to be adopted, and specifically, the writing of the file is distributed to a plurality of areas of the storage medium instead of being fixedly stored by using the same address. At present, various different wear leveling algorithms are developed aiming at a high-capacity FLASH medium, such as NANDFlash, and the effect is also excellent enough.
However, due to the particularity of the smart card storage scenario, most current wear leveling algorithms are not applicable. For example, patent application No. CN201811530906 discloses a method for improving FLASH write lifetime of a smart card file system, where a physical block (the physical block is a minimum erase unit of a FLASH storage medium) needs to be switched to rewrite every time data is updated, that is, every time data is updated, a page needs to be changed to rewrite, and if the file size is much smaller than the block size (or much smaller than the size of each physical block included in a physical page of a chip), every time a file is updated, the file occupies the entire physical block, which results in low space utilization. In the limited space of the smart card, more files need to be updated, fewer idle physical blocks need to be erased frequently to update data, and therefore, the effect of improving the write life by adopting the method is smaller, and the integrity and the effectiveness of the data cannot be guaranteed by adopting the method to write the data.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a method for prolonging the writing life of a smart card FLASH, which updates file data in a FLASH page polling mode, prolongs the service life of the FLASH, and simultaneously adds a Cyclic Redundancy Check (CRC) to ensure the integrity of the data.
In order to achieve the purposes, the technical scheme is as follows:
a method of improving smart card FLASH write life, the method comprising:
when a file system creates a file, a plurality of bytes are expanded at a file header to store the initial address and the polling page number of the file in a FLASH, a polling space comprising a plurality of physical pages is divided in the FLASH according to the initial address and the polling page number, a file body and a mark header are written into the polling space as a data block, and the mark header comprises a counter and a first CRC;
when the file system updates the file, the polling space is traversed by taking the block size of the data block as a unit until an effective block is found, the next continuous storage space of the effective block is judged to be a writable block, the updated file is written into the writable block, and the storage capacity of the next continuous storage space is the same as the block size of the data block.
Preferably, when the file system creates a file, after the file header is extended by 5 bytes, a start address of 4 bytes and a polling page number of 1 byte are written.
Preferably, the number of polling pages is the same as the number of physical pages in the polling space;
the storage capacity of the polling space is greater than the total number of bytes of the file.
Preferably, when the file system creates a file, a 16-byte flag header is configured for the file body, the 16-byte flag header includes a counter of 4 bytes and a first CRC of 2 bytes, and the remaining bytes are reserved.
Preferably, when the file system updates the file, the step of traversing the polling space by taking the block size of the data block as a unit until a valid block is found is as follows:
step a1, taking the block size of a data block as a unit, intercepting a current continuous storage space in the part which is not intercepted in the polling space of the file;
step a2, calculating a second CRC of the stored data in the current continuous storage space, and judging whether the first CRC and the second CRC in the mark head of the current continuous storage space are the same:
if yes, turning to the step a3;
if not, judging that the current continuous storage space is an invalid block, and then turning to the step a4;
step a3, judging whether the value of the counter of the current continuous storage space is larger than the value of the counter of the previous continuous storage space:
if yes, judging the current continuous storage space as a possible block, and then turning to the step a4;
if not, judging that the current continuous storage space is an invalid block, and then turning to the step a4;
step a4, judging whether the storage capacity of the part which is not intercepted in the polling space of the file is larger than the block size of the data block:
if yes, turning to the step a1;
and if not, the block with the maximum counter value in all the possible blocks is the valid block.
Preferably, the step of determining that the subsequent continuous storage space of the valid block is a writable block is as follows:
step b1, judging whether the storage capacity behind the effective block in the physical page where the effective block is located is larger than the storage capacity of the effective block according to the address sequence of the polling space:
if so, taking the storage address behind the effective block in the physical page of the effective block as the initial address of the next continuous storage space, and judging the next continuous storage space as a writable block;
if not, the header address of the next physical page is used as the starting address of the next continuous storage space, and the next continuous storage space is judged to be a writable block.
Preferably, if the physical page in which the valid block is located is the last page of the polling space, and the storage capacity of the physical page in which the valid block is located after the valid block is smaller than the storage capacity of the valid block, the page head address of the start page of the polling space is used as the start address of the next continuous storage space.
Preferably, when the valid block and the writable block are located in the same physical page, if there is storage data in the writable block, the next continuous storage space of the writable block is taken as the writable block and an updated file is written.
Preferably, when the valid block and the writable block are located in different physical pages, if the writable block has stored data, the data in the physical page where the writable block is located is erased and an updated file is written.
Preferably, the step of writing the updated file to the writable block is as follows:
step c1, acquiring a count value of a counter from an effective block, adding 1 to the count value, and writing the count value into a counter of a writable block;
step c2, calculating a CRC value of the updated file, and writing the CRC value into a first CRC of the writable block;
and c3, writing the file body of the updated file into the writable block.
The invention has the beneficial effects that: by the polling mode in the FLASH page, the polling space is traversed by taking the block size of the data block as a unit until a valid block and a writable block are found, and new data is directly written into the writable block, so that the method is much more efficient compared with the method that the page is firstly erased and then rewritten every time. The invention divides one page or a plurality of pages into a plurality of blocks, when the file is updated each time, only the blocks are updated in sequence, and the blocks occupy the polling space and then are erased, so that one physical page can be repeatedly used, and the service life of the Flash is prolonged.
The CRC of the tag header and the file body is calculated before updating the file, and then the writable block is written. If the power is abnormally lost when the writable block is written, the data is not completely written, the CRC stored in the writable block is different from the CRC value calculated by actual data, and the data is treated as an invalid block because the CRC is not compared sufficiently when a valid block is searched in a subsequent traversal. At this time, the valid data of the file is still stored in the valid block, and the integrity of the file data is ensured.
Drawings
Fig. 1 is a flowchart of a method for improving the FLASH write lifetime of a smart card in an embodiment of the present invention.
FIG. 2 is a flowchart illustrating finding valid blocks when a file system updates a file according to an embodiment of the present invention.
FIG. 3 is a flowchart illustrating determining writable blocks when a file system updates a file according to an embodiment of the present invention.
FIG. 4 is a flowchart illustrating writing of an updated file into a writable block when the file system updates the file according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific examples described herein are intended to be illustrative only and are not intended to be limiting. Moreover, all other embodiments that can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort belong to the protection scope of the present invention.
The present invention will be described in further detail with reference to the drawings and examples.
As shown in fig. 1, a method for improving FLASH write lifetime of a smart card includes:
step S1, when a file system creates a file, a plurality of bytes are expanded at a file header to store the initial address and the polling page number of the file in a FLASH, a polling space comprising a plurality of physical pages is divided in the FLASH according to the initial address and the polling page number, a file body and a marking header are written into the polling space as a data block, the marking header comprises a counter and a first CRC, and the first CRC is obtained by data in a calculation block.
And S2, when the file system updates the file, traversing the polling space by taking the block size of the data block as a unit until an effective block is found, judging that the next continuous storage space of the effective block is a writable block, writing the updated file into the writable block, wherein the storage capacity of the next continuous storage space is the same as the block size of the data block.
In this embodiment, after traversing the polling space to find the valid block, it is determined whether the remaining storage space of the page where the valid block is located can form a continuous storage space with the same storage capacity as the block size of the data block, if so, a data block located behind the valid block in the page where the valid block is located is a writable block, and if not, a first database located at the head of the page in the next page where the valid block is located is a writable block. Subsequently, the updated file is written into the writable block.
By the polling mode in the FLASH page, the polling space is traversed by taking the block size of the data block as a unit until a valid block and a writable block are found, and new data is directly written into the writable block, so that the method is much more efficient compared with the method that the page is firstly erased and then rewritten every time. The invention divides one page or a plurality of pages into a plurality of blocks, when updating the file each time, only the blocks are updated in sequence, and the blocks occupy the polling space and then are erased, so that one physical page can be repeatedly used, and the service life of the Flash is prolonged.
Further, when the file system creates a file, after the file header is extended by 5 bytes, a start address of 4 bytes and the polling page number of 1 byte are written.
Further, the storage capacity of the polling space is larger than the total number of bytes of the file.
Further, when the file system creates a file, a 16-byte flag header is configured for the file body, and the 16-byte flag header includes a counter of 4 bytes and a first CRC of 2 bytes.
Further, as shown in fig. 2, when the file system updates the file, the specific steps of traversing the polling space by using the block size of the data block as a unit until a valid block is found are as follows:
step a1, intercepting a current continuous storage space in the part which is not intercepted in the polling space of the file by taking the block size of a data block as a unit;
step a2, calculating a second CRC of the stored data in the current continuous storage space, and judging whether the first CRC and the second CRC in the mark head of the current continuous storage space are the same:
if yes, turning to the step a3;
if not, judging that the current continuous storage space is an invalid block, and then turning to the step a4;
step a3, judging whether the value of the counter of the current continuous storage space is larger than the value of the counter of the previous continuous storage space:
if yes, judging the current continuous storage space as a possible block, and then turning to the step a4;
if not, judging that the current continuous storage space is an invalid block, and then turning to the step a4;
step a4, judging whether the storage capacity of the part which is not intercepted in the polling space of the file is larger than the block size of the data block:
if yes, turning to the step a1;
and if not, the block with the maximum counter value in all the possible blocks is the valid block.
Specifically, when the file is updated every time, the file is searched from the start address backward in sequence by taking the block size of the data block as a unit according to the start address and the allocated polling page number, the second CRC of the data in the block is calculated in sequence, whether the second CRC is consistent with the first CRC in the marking head of the block where the second CRC is located is checked, and if the second CRC is consistent with the first CRC in the marking head of the block where the first CRC is located and the value of a counter in the marking head is larger than that in the previous block, the block is considered to be an effective block.
Further, as shown in fig. 3, the specific steps of determining that the next consecutive storage space of the valid block is a writable block are as follows:
step b1, judging whether the storage capacity behind the effective block in the physical page where the effective block is located is larger than the storage capacity of the effective block according to the address sequence of the polling space:
if so, taking the storage address behind the effective block in the physical page of the effective block as the initial address of the next continuous storage space, and judging the next continuous storage space as a writable block.
If not, the header address of the next physical page is used as the starting address of the next continuous storage space, and the next continuous storage space is judged to be a writable block.
Furthermore, if the physical page in which the valid block is located is the last page of the polling space, and the storage capacity of the physical page in which the valid block is located after the valid block is smaller than that of the valid block, the page head address of the start page of the polling space is used as the start address of the next continuous storage space.
And when the valid block and the writable block are located in the same physical page, if the writable block has stored data, using the next continuous storage space of the writable block as the writable block, and writing an updated file in the writable block.
And when the valid block and the writable block are located in different physical pages, if the writable block has stored data, performing data erasing on the physical page where the writable block is located, and writing an updated file into the writable block.
Specifically, the address of the valid block with the largest counter value is checked, the remaining space and the block size in the page where the valid block is located are checked, if the remaining space is enough, the tag head counter of the valid block is read, the counter value +1 is used for calculating the CRC of the file to be written, and then the CRC and the file body of the file to be written are written into the subsequent area of the block together, namely the writable block. If the remaining space is insufficient, checking whether the physical page of the effective block is the last page of the polling space, if so, erasing the first page of the polling space and then writing the data, if not, switching to the next page to write the data, and before writing, checking whether the area can be written, and if not, searching backwards.
Further, as shown in fig. 4, the specific steps of writing the updated file into the writable block are as follows:
and c1, acquiring the count value of the counter from the effective block, adding 1 to the count value, and writing the count value into the counter of the writable block.
And c2, calculating a CRC value for the updated file, and writing the CRC value into the first CRC of the writable block.
And c3, writing the file body of the updated file into the writable block.
Specifically, the CRC of the file to be written is calculated and then written as the first CRC in the writable block together with the file body of the file to be written in the subsequent area of the block.
In one embodiment, 2 physical pages are divided into FLASH of the smart card as a polling space to store the file body of the file with high updating frequency, and the initial address of the polling space is set to 0x0002000.
5 bytes (including a start address of 4 bytes and a polling page number of 1 byte) are extended in the file header. And simultaneously writing data of a data block in the polling space, wherein the data block comprises a 16-byte marking head (comprising a counter of 4 bytes and a first CRC of 2 bytes, and other bytes are not written temporarily) and a file body.
When updating the file content, the initial address and polling page number of the file in the polling space are read from the file header, and are 0x0002000 and 2 pages respectively. Assuming that the block size of a data block (including a tag header and a file body) is 0x32 bytes, the page size of a physical page is 0x200 bytes, traversal is performed in units of 0x32 bytes from addresses 0x0002000 to 0x0002400, the value of a counter included in the tag header in each block is read, a second CRC of data in the block of each block is calculated and compared with a first CRC in the tag header, if the same value and the value of the counter are larger than the value of a counter included in the tag header in a previous block, the current block is considered to be a valid block, the address of the current block is obtained after traversal, the current block is considered to be a valid block, and the address of the current block is the address of the valid block.
And then searching the address of the next writable block backwards according to the address of the effective block, for example, if the address of the effective block is 0x00020032, the address range of the next block is 0x 00020064-0 x00020096, if the ending address of the next block is not in the same page as the starting address of the effective block, the head address of the next page is used as the starting address of the next block, and if the ending address of the next block exceeds the polling space, the contents of the first page of the polling space are erased, and the head address of the first page of the polling space is used as the address of the next block.
Checking whether the space where the address of the next block is located can be written, if the space where the address of the next block is located can not be written, skipping the block, continuously searching backwards, if the space where the address of the next block is located can not be written, obtaining the value of the marking head counter of the effective block, adding the value of the counter to +1, then calculating the first CRC of the data in the block which needs to be updated and written into the writable block, and finally writing the file body content and the marking head content which need to be updated.
The CRC of the header and the body of the file is calculated before the file is updated, and then the writable block is written. If the power is abnormally lost when the writable block is written, the data is not completely written, the CRC stored in the writable block is different from the CRC value calculated by actual data, and the data is treated as an invalid block because the CRC is not compared sufficiently when a valid block is searched in a subsequent traversal. At this time, the valid data of the file is still stored in the valid block, and the integrity of the file data is ensured.
The present invention is not limited to the above-described embodiments, and it will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and such modifications and improvements are also considered to be within the scope of the present invention. Those not described in detail in this specification are within the skill of the art.

Claims (9)

1. A method for prolonging the writing life of a smart card FLASH is characterized by comprising the following steps:
when a file system creates a file, a plurality of bytes are expanded at a file header to store the initial address and the polling page number of the file in a FLASH, a polling space comprising a plurality of physical pages is divided in the FLASH according to the initial address and the polling page number, a file body and a mark header are written into the polling space as a data block, and the mark header comprises a counter and a first CRC;
when the file system updates the file, traversing the polling space by taking the block size of the data block as a unit until an effective block is found, judging that the next continuous storage space of the effective block is a writable block, and writing the updated file into the writable block, wherein the storage capacity of the next continuous storage space is the same as the block size of the data block;
the following steps of determining the next continuous storage space of the valid block as a writable block are as follows:
step b1, judging whether the storage capacity behind the effective block in the physical page where the effective block is located is larger than the storage capacity of the effective block according to the address sequence of the polling space:
if so, taking the storage address behind the effective block in the physical page of the effective block as the initial address of the next continuous storage space, and judging the next continuous storage space as a writable block;
if not, the header address of the next physical page is used as the starting address of the next continuous storage space, and the next continuous storage space is judged to be a writable block.
2. The method for improving FLASH write lifetime of a smart card according to claim 1, wherein when the file system creates the file, after the file header is extended by 5 bytes, a start address of 4 bytes and a polling page number of 1 byte are written.
3. The method for improving FLASH write lifetime of a smart card as claimed in claim 1 wherein the number of polling pages is the same as the number of physical pages in the polling space;
the storage capacity of the polling space is greater than the total number of bytes of the file.
4. The method for improving FLASH write lifetime of a smart card according to claim 1, wherein when the file system creates the file, a 16-byte flag header is configured for the file body, the 16-byte flag header comprises a counter of 4 bytes and a first CRC of 2 bytes, and the rest bytes are reserved.
5. The method for improving the FLASH write lifetime of a smart card according to claim 1, wherein when the file system updates the file, the step of traversing the polling space by taking the block size of the data block as a unit until a valid block is found is as follows:
step a1, taking the block size of a data block as a unit, intercepting a current continuous storage space in the part which is not intercepted in the polling space of the file;
step a2, calculating a second CRC of the storage data in the current continuous storage space, and judging whether the first CRC and the second CRC in the mark head of the current continuous storage space are the same:
if yes, turning to the step a3;
if not, judging that the current continuous storage space is an invalid block, and then turning to the step a4;
step a3, judging whether the value of the counter of the current continuous storage space is larger than the value of the counter of the previous continuous storage space:
if yes, judging the current continuous storage space as a possible block, and then turning to the step a4;
if not, judging that the current continuous storage space is an invalid block, and then turning to the step a4;
step a4, judging whether the storage capacity of the part which is not intercepted in the polling space of the file is larger than the block size of the data block:
if yes, turning to the step a1;
and if not, the block with the maximum counter value in all the possible blocks is the valid block.
6. The method according to claim 1, wherein if the physical page of the valid block is the last page of the polling space and the storage capacity of the physical page of the valid block after the valid block is smaller than that of the valid block, the header address of the start page of the polling space is used as the start address of the next continuous storage space.
7. The method for improving FLASH write lifetime of a smart card of claim 1, wherein when the valid block and the writable block are located in the same physical page, if there is storage data in the writable block, the next contiguous storage space of the writable block is used as the writable block and the updated file is written.
8. The method for improving the FLASH write lifetime of the smart card as claimed in claim 1, wherein when the valid block and the writable block are located in different physical pages, if the writable block has stored data, the physical page where the writable block is located is erased and an updated file is written.
9. The method for improving FLASH write lifetime of a smart card as claimed in claim 1 wherein the step of writing the updated file into the writable block is as follows:
step c1, acquiring a count value of a counter from an effective block, adding 1 to the count value, and writing the count value into a counter of a writable block;
step c2, calculating a CRC value of the updated file, and writing the CRC value into a first CRC of the writable block;
and c3, writing the file body of the updated file into the writable block.
CN202110661150.7A 2021-06-15 2021-06-15 Method for prolonging FLASH write-in life of smart card Active CN113434438B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110661150.7A CN113434438B (en) 2021-06-15 2021-06-15 Method for prolonging FLASH write-in life of smart card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110661150.7A CN113434438B (en) 2021-06-15 2021-06-15 Method for prolonging FLASH write-in life of smart card

Publications (2)

Publication Number Publication Date
CN113434438A CN113434438A (en) 2021-09-24
CN113434438B true CN113434438B (en) 2023-03-14

Family

ID=77755865

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110661150.7A Active CN113434438B (en) 2021-06-15 2021-06-15 Method for prolonging FLASH write-in life of smart card

Country Status (1)

Country Link
CN (1) CN113434438B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115743A (en) * 2021-11-29 2022-03-01 苏州迅镭激光科技有限公司 Method for prolonging service life of data storage chip

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577121A (en) * 2013-11-05 2014-02-12 中船重工(武汉)凌久电子有限责任公司 High-reliability linear file access method based on nand flash
CN105183392A (en) * 2015-09-18 2015-12-23 广州日滨科技发展有限公司 Method for storing fixed-length data on FLASH
CN105677383A (en) * 2015-12-28 2016-06-15 北京华大智宝电子系统有限公司 Method for updating data of smart card
CN106527969A (en) * 2016-09-21 2017-03-22 中国科学院地质与地球物理研究所 NandFlash memory read-write method capable of guaranteeing service life balance
CN110515798A (en) * 2019-08-08 2019-11-29 吉林大学 The storage system and its storage method of function life-span assessment are had based on SD card

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7647358B2 (en) * 2004-03-22 2010-01-12 Microsoft Corporation Computing device with relatively limited storage space and operating/file system thereof
JP2012068765A (en) * 2010-09-21 2012-04-05 Tdk Corp Memory controller, flash memory system with memory controller, and control method of flash memory

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577121A (en) * 2013-11-05 2014-02-12 中船重工(武汉)凌久电子有限责任公司 High-reliability linear file access method based on nand flash
CN105183392A (en) * 2015-09-18 2015-12-23 广州日滨科技发展有限公司 Method for storing fixed-length data on FLASH
CN105677383A (en) * 2015-12-28 2016-06-15 北京华大智宝电子系统有限公司 Method for updating data of smart card
CN106527969A (en) * 2016-09-21 2017-03-22 中国科学院地质与地球物理研究所 NandFlash memory read-write method capable of guaranteeing service life balance
CN110515798A (en) * 2019-08-08 2019-11-29 吉林大学 The storage system and its storage method of function life-span assessment are had based on SD card

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Flash智能卡文件系统的设计;尹伟等;《微计算机信息》;20091115(第32期);全文 *

Also Published As

Publication number Publication date
CN113434438A (en) 2021-09-24

Similar Documents

Publication Publication Date Title
CN107168647B (en) FLASH data read-write method and system
US6675281B1 (en) Distributed mapping scheme for mass storage system
US9229876B2 (en) Method and system for dynamic compression of address tables in a memory
CN110347336B (en) Key value storage system based on NVM (non volatile memory) and SSD (solid State disk) hybrid storage structure
US7702844B2 (en) Address mapping method and mapping information managing method for flash memory, and flash memory using the same
CN103257831B (en) The read/writing control method of memorizer and the memorizer of correspondence
US6865658B2 (en) Nonvolatile data management system using data segments and link information
CN108038002B (en) Embedded software memory management method
US20190114272A1 (en) Methods and apparatus for variable size logical page management based on hot and cold data
CN112486852B (en) Solid state disk and address mapping method thereof
US6742078B1 (en) Management, data link structure and calculating method for flash memory
US11726712B2 (en) Memory system with write modes based on an internal state of a memory controller
CN108399047B (en) Flash memory file system and data management method thereof
CN109558335B (en) Nor Flash memory based file storage format of embedded system
US20080183947A1 (en) Method for Enhancing Life Cycle of Memory
CN110134645B (en) File system storage management method, file system storage reading method, file system storage management device and file system storage reading device
CN105183392A (en) Method for storing fixed-length data on FLASH
US8261013B2 (en) Method for even utilization of a plurality of flash memory chips
CN110389712B (en) Data writing method and device, solid state disk and computer readable storage medium
CN113434438B (en) Method for prolonging FLASH write-in life of smart card
CN112597072A (en) Data updating method and device of Flash memory
CN112860594A (en) Solid-state disk address remapping method and device and solid-state disk
CN109408416B (en) Address mapping table entry page management method and device
CN108491290B (en) Data writing method and device
CN112527207A (en) Method and device for storing data in EEPROM

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant