CN113360092A - Data storage method, data storage device and electronic equipment - Google Patents

Data storage method, data storage device and electronic equipment Download PDF

Info

Publication number
CN113360092A
CN113360092A CN202110533340.0A CN202110533340A CN113360092A CN 113360092 A CN113360092 A CN 113360092A CN 202110533340 A CN202110533340 A CN 202110533340A CN 113360092 A CN113360092 A CN 113360092A
Authority
CN
China
Prior art keywords
data block
mode
target data
data
data storage
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.)
Pending
Application number
CN202110533340.0A
Other languages
Chinese (zh)
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202110533340.0A priority Critical patent/CN113360092A/en
Publication of CN113360092A publication Critical patent/CN113360092A/en
Priority to PCT/CN2022/093321 priority patent/WO2022242640A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0616Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Abstract

The application discloses a data storage method, a data storage device and electronic equipment, and belongs to the technical field of electronic data storage. The data storage method comprises the following steps: acquiring a life parameter of a target data block in a memory, wherein the target data block is a data block for storing data in a first mode; under the condition that the service life parameter is in a first preset interval, converting the target data block into a data block for storing data in a second mode; and the data storage density in the first mode is greater than that in the second mode.

Description

Data storage method, data storage device and electronic equipment
Technical Field
The application belongs to the technical field of electronic data storage, and particularly relates to a data storage method, a data storage device and electronic equipment.
Background
With the development of scientific technology, the user's access demand for electronic data is increasing.
Among them, Flash memory (Flash memory) is an electrically erasable programmable read-only memory, which allows to be erased and written many times in operation, and can be used for storing general data and performing exchange transmission of data.
How to improve the service life of the flash memory products is a technical problem to be solved in the field.
Disclosure of Invention
An object of the embodiments of the present application is to provide a data storage method, a data storage apparatus, and an electronic device, which can solve the problem of how to effectively improve the service life of a memory.
In a first aspect, an embodiment of the present application provides a data storage method, where the method includes: acquiring a life parameter of a target data block in a memory, wherein the target data block is a data block for storing data in a first mode; under the condition that the service life parameter is in a first preset interval, converting the target data block into a data block for storing data in a second mode; and the data storage density in the first mode is greater than that in the second mode.
In a second aspect, an embodiment of the present application provides a data storage device, including: the device comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring the service life parameter of a target data block in the storage, and the target data block is a data block for storing data in a first mode; the first conversion module is used for converting the target data block into a data block storing data in a second mode under the condition that the service life parameter acquired by the acquisition module is in a first preset interval; and the data storage density in the first mode is greater than that in the second mode.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the application, the life condition of the target data block can be obtained by obtaining the life parameter of the target data block in the memory. The target data block is a data block storing data in a first mode. When the life parameter is in the first preset interval, it may be determined that a storage mode of the target data block needs to be changed, that is, the target data block storing data in the first mode is converted into a data block storing data in the second mode. And the data storage density in the first mode is greater than that in the second mode. By converting the storage mode of the target data block under the condition that the service life parameter of the target data block is in the first preset interval, the service life of the target data block can be effectively prolonged, and the whole service life of the memory is prolonged accordingly.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating a data storage method according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a data storage device according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 4 is a second schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The data storage method, the data storage device, and the electronic device provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
In the related art, the types of flash memories mainly include the following: Single-Level Cell (SLC) flash memory, Multi-Level Cell (MLC) flash memory, triple-Level Cell (TLC) flash memory, and Quad-Level Cell (QLC) flash memory. In the above type of flash memory, the cost price of the flash memory gradually decreases as the number of layers of cells increases, but the writing speed and the lifetime also decrease.
Each cell of a single-layer cell flash memory, which has both voltage variations of 0 and 1, is capable of storing 1 bit of information. The single-layer unit flash memory is expensive, simple in structure, fast in voltage control, fast in speed and long in service life. Single layer cell flash memories have about 10 ten thousand erase lifetimes.
Each cell of the multi-level cell flash memory, which has four voltage variations of 00, 01, 10, and 11, is capable of storing 2 bits of information. The price of the multi-layer cell flash memory is lower than that of the single-layer cell flash memory, but the life time is also lower than that of the single-layer cell flash memory. The mlc flash memory has about 1 ten thousand erase/write lifetimes.
The three level cell flash memory, which is capable of storing 3 bits of information per cell, has 8 voltage variations from 000 to 001, is less costly but has a slower write speed. The erasing life of the three-layer unit flash memory is more than 3000 times.
There are 16 variations in the four-layer cell flash memory, the price of which is the greatest among the four cell flash memories, and the lifetime of which is the shortest among the four cell flash memories. The erasing life of the four-layer unit flash memory is more than 1000 times.
Among the above types of flash memories, the reason why different types of flash memories have different memory life spans is that the larger the memory cell of the flash memory is, the more frequently electrons come out into the silicon dioxide layer and thus the exhaustion of the memory cell is accelerated.
In the related art, the service life of the flash memory can be prolonged in an erasing balance mode, and the purpose of prolonging the whole service life of the memory can be achieved in a mode of dividing the memory into a plurality of areas and then storing electronic data in a partition mode.
However, although the memory in the related art can implement the partition storage, in the process of processing the electronic data by the memory, due to the space scheduling, the effective electronic data needs to be gathered together to save space. Accordingly, the memory needs to move the electronic data stored in the partition many times. In the case of a memory, the process of moving electronic data corresponds to the process of writing electronic data. Therefore, the way of storing electronic data by partitioning and aggregating together inevitably increases the data writing amount of each storage area of the memory. It can be seen that the way of dividing the memory into a plurality of areas cannot increase the number of times of erasing/writing each memory area (i.e. each data block) per se.
In addition, for the related memory, when a certain number of data blocks (about 2%) become bad data blocks, the whole memory enters a write-protected state and cannot be erased any more, so that the whole memory fails.
In order to solve the above problems in the related art, embodiments of the present application provide a data storage method. In the embodiment of the application, the life condition of the target data block can be obtained by obtaining the life parameter of the target data block in the memory. The target data block is a data block storing data in a first mode. When the life parameter is in the first preset interval, it may be determined that a storage mode of the target data block needs to be changed, that is, the target data block storing data in the first mode is converted into a data block storing data in the second mode. And the data storage density in the first mode is greater than that in the second mode. By converting the storage mode of the target data block under the condition that the service life parameter of the target data block is in the first preset interval, the service life of the target data block can be effectively prolonged, and the whole service life of the memory is prolonged accordingly.
An execution main body of the data storage method provided in the embodiment of the present application may be a data storage device, and the device may be an electronic device, and may also be a functional module and/or a functional main body in the electronic device, which may be specifically determined according to actual use requirements, and the embodiment of the present application is not limited. In order to more clearly describe the data storage method provided by the embodiment of the present application, the following method embodiment takes an execution subject of the data storage method as an example of a data storage device.
The following will take various examples as examples to explain the methods provided in the examples of the present application in detail.
As shown in fig. 1, an embodiment of the present application provides a data storage method, which includes the following S101 and S102:
s101, the data storage device acquires the service life parameters of the target data block in the memory.
In the embodiment of the present application, the target data block is a data block storing data in the first mode.
In the embodiment of the present application, the memory may be a flash memory.
It is understood that a plurality of data blocks, which are storage units in the memory, are included in the memory.
In the embodiment of the present application, the target data block may be all data blocks or a part of data blocks in the memory.
In the embodiment of the present application, the lifetime parameter may be used to measure the lifetime of the target data block.
In one example, the lifetime parameter may be used to measure the lifetime that a target data block has used or has consumed.
In another example, a lifetime parameter may be used to measure the remaining lifetime of a target data block.
For example, the lifetime parameter may be characterized by a length of time or a percentage of use, and the lifetime parameter may also be characterized by a number of erasures.
S102, the data storage device converts the target data block into a data block storing data in a second mode under the condition that the service life parameter is in a first preset interval.
In the embodiment of the present application, the data storage density in the first mode is greater than the data storage density in the second mode.
It is understood that the storage mode of the data block characterizes the kind of the data block (the data blocks of different unit layer numbers can be understood as data blocks of different kinds or different storage modes). The categories of data blocks may generally include the following: data blocks of single-layer cells (SLC data blocks), data blocks of multi-layer cells (MLC data blocks), data blocks of three-layer cells (TLC data blocks), and data blocks of four-layer cells (QLC data blocks). The data storage density of the SLC data blocks is 1 bit/cell, the data storage density of the MLC data blocks is 2 bits/cell, the data storage density of the TLC data blocks is 3 bits/cell, and the data storage density of the QLC data blocks is 4 bits/cell. In other words, the data storage density of the QLC data blocks is the greatest, the data storage density of the TLC data blocks is the next, the data storage density of the MLC data blocks is the next, and the data storage density of the SLC data blocks is the least. As mentioned above, the writing speed and the lifetime of the data blocks in the above various storage modes are reduced in the order of SLC data block, MLC data block, TLC data block, and QLC data block.
It can be understood that the value of the first preset interval may be specifically determined according to actual use requirements, and the embodiment of the present invention is not limited.
In one example, assuming that a target data block storing data in the first mode is a QLC data block, in case that the lifetime parameter is in a first preset interval, the target data block may be converted into one of the following items; TLC data block, MLC data block, SLC data block.
In another example, assuming that the target data chunk storing data in the first mode is a TLC data chunk, the target data chunk may be converted to one of the following items if the lifetime parameter is in a first preset interval; MLC data blocks, SLC data blocks.
In yet another example, assuming that the target data block storing data in the first mode is an MLC data block, the target data block may be converted to an SLC data block if the age parameter is within a first preset interval.
It will be appreciated that where the target data block is an MLC data block, the target data block may be converted directly to an SLC data block. In the case where the target data block is a TLC data block, the target data block may be converted to an MLC data block before the MLC data block is converted to an SLC data block. In one example, where the target data block is a QLC data block, the QLC data block may be converted to a TLC data block, and then the TLC data block may be converted to an MLC data block, and then the MLC data block may be converted to an SLC data block.
It will be appreciated that the data storage device includes a controller and a register, and that a target data block for storing data in the first mode can be converted to a data block for storing data in the second mode by setting the register by the controller.
Illustratively, the controller may issue a Setfeature command to the register according to a standard flow of Joint Electron Device Engineering Council (JEDEC) to implement the conversion of the storage mode.
Optionally, in this embodiment of the application, in order to timely convert the target data block into a data block storing data in the second mode when the lifetime parameter is in the first preset interval, the lifetime parameter may be monitored or recorded.
Alternatively, in the embodiment of the present application, the lifetime parameter may be determined according to a number of times of erasing or a Bit Error Rate (BER).
Illustratively, S101 includes S101 a:
s101a, the data storage device reads the erasing times of the target data block recorded in the register, and determines the life parameter of the target data block according to the erasing times.
In one example, the limit value of the number of times of erasing and writing is 1 ten thousand, and the lifetime parameter is determined to be in the first preset interval when the number of times of erasing and writing reaches 8 thousand or 7 thousand.
In another example, the limit of the erase/write times is 3 thousand times, and the lifetime parameter is determined to be in the first predetermined interval when the erase/write times reaches 2 or 1 thousand times.
Illustratively, S101 includes S101 b:
s101b, the data storage device monitors the bit error rate of the target data block and determines the life parameter of the target data block according to the bit error rate.
It is understood that the bit error rate of the data block increases with the number of erasures, so that the bit error rate of the target data block can be monitored and the lifetime parameter can be determined based thereon.
When the bit Error rate of the target data block reaches the limit bit Error rate, the bit Error rate of the target data block may exceed the checking capability of an Error Correction Code (ECC) of the controller, and thus, the target data block may be marked as a bad data block. Accordingly, the bit error rate of the target data block may be monitored and used as a lifetime parameter.
Exemplarily, assuming that the limit bit error rate of the target data block (i.e., the correction threshold of the error correction code of the controller) is 64 bits/page, it may be determined that the lifetime parameter is in the first preset interval in case that the bit error rate reaches 50 bits/page.
In one example, assume that the MLC data block corresponds to a limit erase count of 1 ten thousand, and the SLC data block corresponds to a limit erase count of 10 ten thousand. Accordingly, in the case where the number of times of erasing the MLC data block reaches 8 thousand times (i.e. the target data block has an erase life of 20%), the target data block may be converted into a data block of SLC cells. After the target data block is converted from the MLC data block to the SLC data block, the remaining number of erasability of the target data block is changed from the original 2 thousand times (i.e., 1 ten thousand times × 20%) to 2 ten thousand times (i.e., 10 ten thousand times × 20%).
In another example, assume that the TLC data block corresponds to 3 thousand erasures and the MLC data block corresponds to 1 ten thousand erasures. Accordingly, in the case where the number of times of erasing and writing of the TLC data block reaches 2400 times (i.e. in the case where the erasing and writing life of the target data block remains 20%), the target data block is converted into the MLC data block. After the target data block is converted from the TLC data block to the MLC data block, the remaining number of erasability of the target data block is changed from the original 600 times (i.e. 3 thousand times × 20%) to 2 thousand times (i.e. 1 ten thousand times × 20%).
Optionally, in this embodiment of the application, after the data storage mode of the target data block is converted, the voltage of the target data block is used for discrimination, and the data stored in the target data block is read, written or erased.
In the embodiment of the application, the life condition of the target data block can be obtained by obtaining the life parameter of the target data block in the memory. The target data block is a data block storing data in a first mode. When the life parameter is in the first preset interval, it may be determined that a storage mode of the target data block needs to be changed, that is, the target data block storing data in the first mode is converted into a data block storing data in the second mode. And the data storage density in the first mode is greater than that in the second mode. By converting the storage mode of the target data block under the condition that the service life parameter of the target data block is in the first preset interval, the service life of the target data block can be effectively prolonged, and the whole service life of the memory is prolonged accordingly.
In addition, in the embodiment of the application, the data blocks in the memory are not converted in a large area, and only when the service life parameter is in the first preset interval, the target data block storing data in the first mode is converted into the data block storing data in the second mode, so that the storage capacity of the memory is not sharply or obviously reduced due to the conversion of the target data block.
Finally, the larger the storage density (i.e., the larger the number of cell layers) of a data block, the larger the number of times it can be erased and written, the stronger the data retention ability. In other words, for a data block having a larger storage density, the lifetime and the storage time of the data are longer. Therefore, in the embodiment of the present application, when the lifetime parameter of the target data block is in the first preset interval, the target data block with a low storage density is converted into the data block with a high storage density, which not only increases the available space in the storage device, but also prevents the target data block from becoming a bad data block or delays the time for the target data block to become a bad data block. Since the possibility or probability that a data block becomes a bad block is killed in advance, the reliability of data saving can be improved.
Optionally, in this embodiment of the application, in order to further effectively improve the service life of the target data block, the target data block may be converted multiple times.
After S102, the following S103 may be further included:
s103, the data storage device converts the target data block storing the data in the second mode into the data block storing the data in the third mode under the condition that the service life parameter is in the second preset interval.
Wherein the second preset interval and the first preset interval are not overlapped with each other.
Exemplarily, in the case that the life parameter is a consumed life parameter, any parameter value in the second preset interval is larger than any parameter value in the first preset interval; and under the condition that the service life parameter is the rest service life parameter, any parameter value in the second preset interval is smaller than any parameter value in the first preset interval.
It can be understood that the value of the second preset interval may be specifically determined according to actual use requirements, and the embodiment of the present invention is not limited.
In this way, by converting the target data block at least twice, the service life of the target data block can be further effectively prolonged, and thus the overall service life of the memory can be further prolonged to a greater extent.
Optionally, in this embodiment of the application, the first mode is a TLC mode, the second mode is an MLC mode, and the third mode is an SLC mode.
Illustratively, the target data block is assumed to be a TLC data block. Correspondingly, in the case that the life parameter of the target data block reaches 80%, the TLC data block is converted into an MLC data block; in the event that the age parameter of the MLC data block reaches 90%, the data block with MLC is converted to an SLC data block.
In one example, it is assumed that the limit erase/write times for TLC data blocks are 3 thousand, 1 ten thousand for MLC data blocks, and 10 ten thousand for SLC data blocks. Accordingly, when the TLC data block reached 2 thousand erasures, its lifetime was 2/3 (i.e., 1/3 remained). In the above case, the TLC data block is converted into an MLC data block. In the case where the lifetime of the MLC data block has been used 8/9 (i.e., 1/9 remains), the MLC data block is converted to an SLC data block. Since the SLC data block corresponds to a limit erase count of 10 ten thousand, the erase count of the SLC data block with the remaining 1/9 lifetime is about 1.1 ten thousand.
In this way, by converting the TLC data blocks into SLC data blocks, the lifespan of the target data blocks can be further effectively increased, and thus the overall lifespan of the memory can be further increased.
Optionally, in this embodiment of the application, in order to completely save the data stored in the memory, the target data stored in the target data block may be transferred before the number of unit layers of the target data block is converted.
Illustratively, before the step S102, the data storage method further includes:
s100, the data storage device transfers the target data stored in the target data block to a blank data block.
It is understood that the blank data block may be a data block in which no data is stored, or a data block in which a part of data is stored but storage space is still available.
It will be appreciated that the target data may be transferred to one blank data block, and the target data may also be transferred to multiple blank data blocks.
In the case where no data is stored in the target data block (i.e., in the case where no target data is stored in the target data block), the number of unit layers of the target data block may be directly converted.
Therefore, the target data stored in the target data block is transferred to the blank data block before the conversion of the unit layer number of the target data block, so that the data loss can be effectively avoided, and the data stored in the memory can be completely stored.
It should be noted that, in the data storage method provided in the embodiment of the present application, the execution main body may be a data storage device, or a control module in the data storage device for executing the data storage method. In the embodiment of the present application, a method for executing data storage by a data storage device is taken as an example, and the data storage device provided in the embodiment of the present application is described.
As shown in fig. 2, an embodiment of the present application provides a data storage device 200, where the data storage device 200 includes:
the obtaining module 210 is configured to obtain a lifetime parameter of a target data block in a memory, where the target data block is a data block storing data in a first mode.
The first conversion module 220 is configured to, when the lifetime parameter acquired by the acquisition module 210 is in a first preset interval, convert the target data block into a data block storing data in a second mode.
And the data storage density in the first mode is greater than that in the second mode.
In the embodiment of the present application, the data storage device 200 may obtain the lifetime condition of the target data block by obtaining the lifetime parameter of the target data block in the memory. The target data block is a data block storing data in a first mode. When the life parameter is in the first preset interval, it may be determined that a storage mode of the target data block needs to be changed, that is, the target data block storing data in the first mode is converted into a data block storing data in the second mode. And the data storage density in the first mode is greater than that in the second mode. The data storage device 200 may effectively improve the service life of the target data block by converting the storage mode of the target data block when the life parameter of the target data block is in the first preset interval, and thus improve the overall service life of the memory.
Optionally, in this embodiment of the present application, the data storage device further includes:
the second conversion module 230 is configured to, after the target data block is converted into the data block for storing data in the second mode when the lifetime parameter acquired by the acquisition module 210 is in the first preset interval, convert the target data block for storing data in the second mode into the data block for storing data in the third mode when the lifetime parameter acquired by the acquisition module 210 is in the second preset interval.
Wherein the second preset interval and the first preset interval are not overlapped with each other.
Optionally, in this embodiment of the application, the first mode is a TLC mode, the second mode is an MLC mode, and the third mode is an SLC mode.
Optionally, in this embodiment of the present application, the obtaining module 210 is specifically configured to:
and reading the erasing times of the target data block recorded in the register, and determining the life parameter of the target data block according to the erasing times.
Optionally, in this embodiment of the present application, the obtaining module 210 is specifically configured to:
and monitoring the bit error rate of the target data block, and determining the life parameter of the target data block according to the bit error rate.
Optionally, in this embodiment of the present application, the data storage device 200 further includes:
a transfer module 240, configured to transfer the target data stored in the target data block to a blank data block before converting the target data block into a data block having M-layer units.
The data storage device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. Illustratively, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The data storage device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The data storage device provided in the embodiment of the present application can implement each process implemented by the method embodiment of fig. 1, and is not described here again to avoid repetition.
Optionally, as shown in fig. 3, an electronic device 300 is further provided in this embodiment of the present application, and includes a processor 301, a memory 302, and a program or an instruction stored in the memory 302 and capable of running on the processor 301, where the program or the instruction is executed by the processor 301 to implement each process of the data storage method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 4 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 400 includes, but is not limited to: radio unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, and processor 410.
Those skilled in the art will appreciate that the electronic device 400 may further include a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 4 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The memory 409 is configured to obtain a lifetime parameter of a target data block in the memory, where the target data block is a data block storing data in the first mode. And under the condition that the service life parameter is in a first preset interval, converting the target data block into a data block for storing data in a second mode. And the data storage density in the first mode is greater than that in the second mode.
In the embodiment of the present application, the memory 409 may obtain the lifetime condition of the target data block by obtaining the lifetime parameter of the target data block in the memory. The target data block is a data block storing data in a first mode. When the life parameter is in the first preset interval, it may be determined that the storage mode of the target data block needs to be changed, that is, the target data block is converted into a data block storing data in the second mode. And the data storage density in the first mode is greater than that in the second mode. The memory 409 can effectively prolong the service life of the target data block by converting the storage mode of the target data block under the condition that the life parameter of the target data block is in the first preset interval, and thus, the service life of the whole memory is prolonged.
Optionally, in this embodiment of the present application, the memory 409 is further configured to: and converting the target data block into a data block for storing data in a second mode under the condition that the life parameter is in a first preset interval, and converting the target data block for storing data in the second mode into a data block for storing data in a third mode under the condition that the life parameter acquired by the acquisition module is in a second preset interval.
Wherein the second preset interval and the first preset interval are not overlapped with each other.
Optionally, in this embodiment of the application, the first mode is a TLC mode, the second mode is an MLC mode, and the third mode is an SLC mode.
Optionally, in this embodiment of the application, the obtaining module is specifically configured to:
and reading the erasing times of the target data block recorded in the register, and determining the life parameter of the target data block according to the erasing times.
Optionally, in this embodiment of the application, the obtaining module is specifically configured to:
and monitoring the bit error rate of the target data block, and determining the life parameter of the target data block according to the bit error rate.
Optionally, in this embodiment of the present application, the memory 409 is further configured to: target data stored in the target data block is transferred to a blank data block before the target data block is converted into a data block having M-layer units.
It should be understood that in the embodiment of the present application, the input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 407 includes a touch panel 4071 and other input devices 4072. A touch panel 4071, also referred to as a touch screen. The touch panel 4071 may include two parts, a touch detection device and a touch controller. Other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 409 may be used to store software programs as well as various data including, but not limited to, application programs and an operating system. The processor 410 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the data storage method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the data storage method embodiment, and can achieve the same technical effect, and the details are not repeated here to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (12)

1. A method of data storage, the method comprising:
acquiring a life parameter of a target data block in a memory, wherein the target data block is a data block for storing data in a first mode;
under the condition that the service life parameter is in a first preset interval, converting the target data block into a data block for storing data in a second mode;
wherein the data storage density in the first mode is greater than the data storage density in the second mode.
2. The data storage method of claim 1, wherein after converting the target data block into a data block storing data in a second mode if the lifetime parameter is within a first preset interval, the method further comprises:
under the condition that the service life parameter is in a second preset interval, converting the target data block storing data in a second mode into a data block storing data in a third mode;
the second preset interval and the first preset interval are not overlapped with each other.
3. The data storage method of claim 2, wherein the first mode is a TLC mode, the second mode is an MLC mode, and the third mode is an SLC mode.
4. The data storage method of claim 1,
the acquiring the life parameter of the target data block in the memory comprises the following steps:
reading the erasing times of the target data block recorded in a register, and determining the life parameter of the target data block according to the erasing times;
or monitoring the bit error rate of the target data block, and determining the life parameter of the target data block according to the bit error rate.
5. The data storage method of any of claims 1 to 4, wherein prior to said converting the target data block into a data block storing data in the second mode, the method further comprises:
and transferring the target data stored in the target data block to a blank data block.
6. A data storage device, characterized in that the data storage device comprises:
the device comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring the service life parameter of a target data block in the storage, and the target data block is a data block for storing data in a first mode;
the first conversion module is used for converting the target data block into a data block storing data in a second mode under the condition that the service life parameter acquired by the acquisition module is in a first preset interval;
wherein the data storage density in the first mode is greater than the data storage density in the second mode.
7. The data storage device of claim 6, further comprising:
a second conversion module, configured to, after the target data block is converted into a data block storing data in a second mode when the lifetime parameter acquired by the acquisition module is in a first preset interval, convert the target data block storing data in the second mode into a data block storing data in a third mode when the lifetime parameter acquired by the acquisition module is in a second preset interval;
the second preset interval and the first preset interval are not overlapped with each other.
8. The data storage device of claim 7, wherein the first mode is a TLC mode, the second mode is an MLC mode, and the third mode is an SLC mode.
9. The data storage device of claim 6, wherein the acquisition module is specifically configured to:
reading the erasing times of the target data block recorded in a register, and determining the life parameter of the target data block according to the erasing times;
or monitoring the bit error rate of the target data block, and determining the life parameter of the target data block according to the bit error rate.
10. The data storage device of any of claims 6 to 9, further comprising:
a transfer module for transferring the target data stored in the target data block to a blank data block before the target data block is converted into a data block storing data in a second mode.
11. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the data storage method of any one of claims 1 to 5.
12. A readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the data storage method of any one of claims 1 to 5.
CN202110533340.0A 2021-05-17 2021-05-17 Data storage method, data storage device and electronic equipment Pending CN113360092A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110533340.0A CN113360092A (en) 2021-05-17 2021-05-17 Data storage method, data storage device and electronic equipment
PCT/CN2022/093321 WO2022242640A1 (en) 2021-05-17 2022-05-17 Data storage method, data storage apparatus, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110533340.0A CN113360092A (en) 2021-05-17 2021-05-17 Data storage method, data storage device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113360092A true CN113360092A (en) 2021-09-07

Family

ID=77526471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110533340.0A Pending CN113360092A (en) 2021-05-17 2021-05-17 Data storage method, data storage device and electronic equipment

Country Status (2)

Country Link
CN (1) CN113360092A (en)
WO (1) WO2022242640A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022242640A1 (en) * 2021-05-17 2022-11-24 维沃移动通信有限公司 Data storage method, data storage apparatus, and electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103927262A (en) * 2014-03-21 2014-07-16 深圳市硅格半导体有限公司 Flash memory physical block control method and flash memory physical block control device
CN104461379A (en) * 2014-10-31 2015-03-25 上海华为技术有限公司 Method for improving stability of NAND and NAND
CN110399094A (en) * 2019-06-06 2019-11-01 浙江大华技术股份有限公司 Block processing method, device, solid state hard disk and the storage medium of solid state hard disk
CN110569002A (en) * 2019-09-18 2019-12-13 深圳市得一微电子有限责任公司 Flash memory device variable capacity device and method based on mixed mode
CN111240578A (en) * 2018-11-28 2020-06-05 深圳市江波龙电子股份有限公司 Multi-bit storage device and electronic equipment
US20210064249A1 (en) * 2019-09-04 2021-03-04 Seagate Technology Llc Extending the life of a solid state drive by using mlc flash blocks in slc mode

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103116550A (en) * 2013-01-11 2013-05-22 深圳市硅格半导体有限公司 Method and device for switching physical block work mode in flash memory
TWI630540B (en) * 2017-07-13 2018-07-21 慧榮科技股份有限公司 Data storage device and method for operating non-volatile memory
CN113467706A (en) * 2020-03-30 2021-10-01 华为技术有限公司 Solid state disk management method and solid state disk
CN113360092A (en) * 2021-05-17 2021-09-07 维沃移动通信有限公司 Data storage method, data storage device and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103927262A (en) * 2014-03-21 2014-07-16 深圳市硅格半导体有限公司 Flash memory physical block control method and flash memory physical block control device
CN104461379A (en) * 2014-10-31 2015-03-25 上海华为技术有限公司 Method for improving stability of NAND and NAND
CN111240578A (en) * 2018-11-28 2020-06-05 深圳市江波龙电子股份有限公司 Multi-bit storage device and electronic equipment
CN110399094A (en) * 2019-06-06 2019-11-01 浙江大华技术股份有限公司 Block processing method, device, solid state hard disk and the storage medium of solid state hard disk
US20210064249A1 (en) * 2019-09-04 2021-03-04 Seagate Technology Llc Extending the life of a solid state drive by using mlc flash blocks in slc mode
CN110569002A (en) * 2019-09-18 2019-12-13 深圳市得一微电子有限责任公司 Flash memory device variable capacity device and method based on mixed mode

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王春海著: "《VMware虚拟化与云计算 故障排除卷》" *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022242640A1 (en) * 2021-05-17 2022-11-24 维沃移动通信有限公司 Data storage method, data storage apparatus, and electronic device

Also Published As

Publication number Publication date
WO2022242640A1 (en) 2022-11-24

Similar Documents

Publication Publication Date Title
CN102375788B (en) Method and device for dynamic allocation of power budget for a system having non-volatile memory
CN109783017B (en) Storage device bad block processing method and device and storage device
US10101914B2 (en) Memory management method, memory control circuit unit and memory storage device
US8392649B2 (en) Memory storage device, controller, and method for responding to host write commands triggering data movement
US20070245064A1 (en) Method Of Flash Memory Management
US20100161885A1 (en) Semiconductor storage device and storage controlling method
US8516184B2 (en) Data updating using mark count threshold in non-volatile memory
US8595523B2 (en) Data writing method for non-volatile memory, and controller and storage system using the same
US8667210B2 (en) Memory management method, memory controller and memory storage apparatus
US20110271032A1 (en) Access device and memory controller
US9383929B2 (en) Data storing method and memory controller and memory storage device using the same
KR20130021625A (en) Operating method and portable device supporting the same
CN112711387B (en) Buffer capacity adjustment method and device, electronic equipment and readable storage medium
KR20210030599A (en) Memory system for supporting distributed read of data and method operation thereof
US8352807B2 (en) Semiconductor memory device, host device and semiconductor memory system
US11693567B2 (en) Memory performance optimization method, memory control circuit unit and memory storage device
CN102193871B (en) Nonvolatile memory access method, system and nonvolatile memory controller
CN113360092A (en) Data storage method, data storage device and electronic equipment
CN110874184B (en) Flash memory controller and related electronic device
US20180081587A1 (en) Garbage Collection in Storage System
US20150186058A1 (en) Data storing method, memory control circuit unit and memory storage apparatus
CN114327246B (en) Method for storing data in storage medium, storage medium and computer device
US9009389B2 (en) Memory management table processing method, memory controller, and memory storage apparatus
CN106021124B (en) A kind of storage method and storage system of data
US10191659B2 (en) Buffer memory management method, memory control circuit unit and memory storage device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210907