Method and device for writing data
A data writing and data technology, applied in the field of communications, can solve the problems of wasting the storage performance of the rewritable memory and failing to give full play to the storage capacity of the rewritable memory, so as to effectively utilize the storage performance and avoid excessive wear and tear. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0027] refer to figure 1 , shows a flow chart of steps of a data writing method according to Embodiment 1 of the present invention.
[0028] The data writing method of the present embodiment includes the following steps:
[0029] Step S102: Receive a data write instruction for writing data into the rewritable memory, and determine a first data block in the rewritable memory to write data according to the data write instruction.
[0030] The data write instruction usually includes the address of the data block to be written, such as the logical address of the data block to be written, and then the physical address of the corresponding data block can be determined according to the logical address.
[0031] Step S104: Obtain the number of times of erasing / writing of the first data block, and when the number of times of erasing / writing of the first data block reaches the set threshold, select the eraser from other data blocks of the rewritable memory The second data block whose ...
Embodiment 2
[0040] refer to figure 2 , shows a flow chart of steps of a data writing method according to Embodiment 2 of the present invention.
[0041] In this embodiment, taking the rewritable NAND memory as an example, the data blocks of the NAND memory are linked in the form of a linked list, and the erasure of the data block is recorded in the OOB (Out Of Band, out-of-band data) area of each data block. Number of times to divide / write. According to the number of erasing / writing of each data block of the NAND memory, use a linked list to link each data block of the NAND memory from small to large; after writing data to the data block, according to the erasure of the data block of the written data / times of writing, move the data block in which the data is written to after the data block whose erasing / writing times is less than or equal to the erasing / writing times of the data block in which the data is written.
[0042] The following is a simple example to illustrate the linked l...
Embodiment 3
[0058] refer to image 3 , shows a flow chart of steps of a data writing method according to Embodiment 3 of the present invention.
[0059] In this embodiment, the file description sector stored in the NAND memory is taken as an example. The 512 bytes of this sector will be frequently erased and written, and the wear will be serious. In this embodiment, in the OOB area of the data block corresponding to the sector, the number of times of erasing / writing the data block is recorded, and when the number of times exceeds the set threshold, this data block is exchanged with other available data blocks, so that It becomes a "new data block".
[0060] The data writing method of the present embodiment includes the following steps:
[0061] Step S302: the LTE data card outputs LOG information, the device where the LTE data card is located sends a data write command, and the corresponding software module of the device where the LTE data card is located prepares to write data into t...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 