A method of writing data to a storage device

A storage device and data writing technology, applied in the storage field, can solve the problems of unbalanced erasing and writing, data loss of storage devices, damage to storage devices, etc., and achieve the effect of achieving wear balance, reducing the number of erasing and writing, and ensuring service life.

Active Publication Date: 2016-04-06
FEITIAN TECHNOLOGIES
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] With the development of science and technology, the market for smart cards continues to expand. In the process of using smart cards, the smart card cannot work normally due to power failure, power loss or power quality not meeting the requirements under unknown circumstances. If the smart card is in During the erasing and writing operation of the storage device (that is, the non-volatile storage area, including EEPROM, FLASH, etc.), the original data in the storage device will be lost, which greatly reduces the security of the smart card.
[0003] In addition, when writing data to a storage device, data needs to be erased and written. In the actual process of erasing and writing, a certain page in the storage device is often erased and written frequently, so that the erase and write cannot be balanced. , and the erasing and writing life cycle of the storage device is generally 100,000 times. Due to excessive erasing and writing of some pages, the storage device will be damaged early, which seriously affects the service life of the storage device.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method of writing data to a storage device
  • A method of writing data to a storage device
  • A method of writing data to a storage device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0067] Embodiment 1 of the present invention provides a method for writing data to a storage device, such as figure 1 As shown, including: In this embodiment, the situation that the fast exchange page is one page and the cache page is also one page is used as an example to illustrate: when writing data to be written to the storage device, perform the following operations:

[0068] Step S1: Calculate the logical page number and page offset of the data to be written according to the logical address of the data to be written;

[0069] Step S2: According to the logical page number of the data to be written, search the first mapping table to obtain the physical page number of the data to be written;

[0070] In this embodiment, the first mapping table is used to store the corresponding relationship between the physical page number and the logical page number of the data page;

[0071] Step S3: Determine whether there is a cache page corresponding to the physical page number of the...

Embodiment 2

[0093] Embodiment 2 of the present invention provides a method for writing data to a storage device, such as figure 2 As shown, this embodiment is described with the situation that the fast swap page and the cache page are multiple pages: specifically: when writing data to be written to the storage device, perform the following operations:

[0094]For example, in this embodiment, the data to be written is AABBCC, the logical address of the data to be written is 0x65, and the length of the data to be written is 0x03;

[0095] Step 101: Calculate the logical page number and the offset within the page according to the logical address of the data to be written;

[0096] Specifically: divide the logical address of the data to be written by the page size, use the obtained quotient as the logical page number, and use the obtained remainder as the page offset, preferably, the page size is 0x64;

[0097] For example, in this embodiment, the calculated logical page number is 0x01, and...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for writing data into storage equipment and belongs to the technical field of storage. The method comprises the step of when data to be written is written to the storage equipment, writing the data to be written into the storage equipment by the processing on a cache area, a fast change area, a first mapping table, a second mapping table and a mark area according to the data to be written, the length of the data to be written and the logic address of the data to be written. The erasing times of the storage equipment are reduced by adopting cache; the data loss during power off is prevented by adopting the mark area; the abrasion balance of the storage equipment in the use process is realized by adopting the fast change area, and the service life of the storage equipment is ensured; the space of the storage equipment is saved by adopting the mode of storing the mapping tables into the cache area.

Description

technical field [0001] The invention relates to the technical field of storage, in particular to a method for writing data into a storage device. Background technique [0002] With the development of science and technology, the market for smart cards continues to expand. In the process of using smart cards, the smart card cannot work normally due to power failure, power loss or power quality not meeting the requirements under unknown circumstances. If the smart card is in During the operation of erasing and writing the storage device (that is, the non-volatile storage area, including EEPROM, FLASH, etc.), the original data in the storage device will be lost, which greatly reduces the security of the smart card. [0003] In addition, when writing data to a storage device, data needs to be erased and written. In the actual process of erasing and writing, a certain page in the storage device is often erased and written frequently, so that the erase and write cannot be balanced....

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F3/06G06F12/0873G06F12/0882G06F12/1009
Inventor 陆舟于华章
Owner FEITIAN TECHNOLOGIES
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products