[go: up one dir, main page]

CN107203341A - Date storage method, device and flash chip based on flash memory - Google Patents

Date storage method, device and flash chip based on flash memory Download PDF

Info

Publication number
CN107203341A
CN107203341A CN201710369970.2A CN201710369970A CN107203341A CN 107203341 A CN107203341 A CN 107203341A CN 201710369970 A CN201710369970 A CN 201710369970A CN 107203341 A CN107203341 A CN 107203341A
Authority
CN
China
Prior art keywords
data
stored
physical block
flash memory
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
CN201710369970.2A
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.)
Jian Rong Semiconductor (shenzhen) Co Ltd
Original Assignee
ZHUHAI HUANGRONG INTEGRATED CIRCUIT TECHNOLOGY Co Ltd
Jian Rong Semiconductor (shenzhen) Co Ltd
Jianrong Integrated Circuit Technology Zhuhai 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 ZHUHAI HUANGRONG INTEGRATED CIRCUIT TECHNOLOGY Co Ltd, Jian Rong Semiconductor (shenzhen) Co Ltd, Jianrong Integrated Circuit Technology Zhuhai Co Ltd filed Critical ZHUHAI HUANGRONG INTEGRATED CIRCUIT TECHNOLOGY Co Ltd
Priority to CN201710369970.2A priority Critical patent/CN107203341A/en
Publication of CN107203341A publication Critical patent/CN107203341A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/062Securing storage systems
    • G06F3/0622Securing storage systems in relation to access
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The present invention relates to technical field of memory, more particularly to date storage method, device and flash chip based on flash memory.This method includes:The health status of each free physical block is determined according to R/B signal waiting times of physical block the last time when accessed;The important level of mark determination data to be stored according to the data type for judging data to be stored on one's own initiative or according to user;According to the health status of the important level of the data to be stored, and the physical block, by the data storage to be stored into corresponding physical block.The embodiment can improve security during significant data storage by important data storage into the good physical block of health status.

Description

Data storage method and device based on flash memory and flash memory chip
[ technical field ] A method for producing a semiconductor device
The present invention relates to the field of storage technologies, and in particular, to a data storage method and apparatus based on a flash memory, and a flash memory chip.
[ background of the invention ]
Nonvolatile memories, such as Solid State Drives (SSDs), have been widely used in recent years due to their nonvolatile storage characteristics and high-speed read/write performance.
In the data storage process of the SSD, the mapping algorithm usually stores data according to the number of usage times of the physical blocks, and the data is stored evenly in each physical block to ensure that the number of usage times and frequency of each physical block are close.
In the process of implementing the invention, the inventor finds that the following problems exist in the related art: in the process of storing data according to the method, the importance degree of the data is not considered, so that some important data are stored in physical blocks with poor health states, and the important data are easy to lose or damage.
[ summary of the invention ]
The invention aims to provide a data storage method and device based on a flash memory and a flash memory chip, and solve the problem that important data are easy to lose or damage.
In one aspect of the embodiments of the present invention, a data storage method based on a flash memory is provided, where the flash memory includes a plurality of physical blocks, and the method includes: acquiring the health state of each idle physical block; determining the importance level of data to be stored; and storing the data to be stored into the corresponding physical block according to the importance level of the data to be stored and the health state of the physical block.
Optionally, the health status of the physical block is specifically determined according to the R/B signal waiting time length when the physical block was accessed last time.
Optionally, the physical block being accessed the last time comprises: a read operation or a write operation.
Optionally, the determining the importance level of the data to be stored includes: determining the importance level of the data to be stored according to the data type of the data to be stored; or determining the importance level of the data to be stored according to the user identification of the data to be stored.
Optionally, before determining the health status of each idle physical block, the method further includes: receiving a data storage request corresponding to data to be stored, wherein the data storage request comprises at least one logic number; searching for a free physical block according to the data storage request;
after the data to be stored is stored into the corresponding physical block according to the importance level of the data to be stored and the health state of the physical block, the method further includes:
and establishing mapping between the physical block in which the data to be stored is stored and the logic number contained in the data storage request corresponding to the data to be stored.
In another aspect of the embodiments of the present invention, there is provided a data storage device based on a flash memory, the flash memory including a plurality of physical blocks, the device including: an obtaining module, configured to obtain a health state of each idle physical block; the determining module is used for determining the importance level of the data to be stored; and the storage module is used for storing the data to be stored into the corresponding physical block according to the importance level of the data to be stored and the health state of the physical block.
Optionally, the health status of the physical block is specifically determined according to the R/B signal waiting time length when the physical block was accessed last time.
Optionally, the physical block being accessed the last time comprises: a read operation or a write operation.
Optionally, the determining module is specifically configured to: determining the importance level of the data to be stored according to the data type of the data to be stored; or determining the importance level of the data to be stored according to the user identification of the data to be stored.
Optionally, the apparatus further comprises: the receiving module is used for receiving a data storage request corresponding to data to be stored, wherein the data storage request comprises at least one logic number; the searching module is used for searching for the idle physical block according to the data storage request; and the establishing module is used for establishing mapping between the physical block in which the data to be stored is stored and the logic number contained in the data storage request corresponding to the data to be stored.
In another aspect of the embodiments of the present invention, a flash memory chip is provided, which includes: a controller; and a memory communicatively coupled to the controller; wherein the memory stores instructions executable by the controller to enable the controller to perform the method as described above.
In the embodiment of the invention, the health state of the idle physical block and the importance level of the data to be stored are obtained, and then the data to be stored is stored according to the importance level of the data to be stored and the health state of the physical block. According to the embodiment, important data can be stored in the physical block with a good health state, and the safety of the important data during storage is improved.
[ description of the drawings ]
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1 is a schematic diagram illustrating an internal structure of a flash memory device according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a method for storing data based on a flash memory according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for determining a health status of a physical block in a flash-based data storage method according to an embodiment of the present invention;
fig. 4 is a logic diagram of a FAT file system in a data storage method based on a flash memory according to an embodiment of the present invention;
FIG. 5 is a flow chart illustrating a method for storing data based on a flash memory according to another embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a flash-based data storage device according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a data storage device based on flash memory according to another embodiment of the present invention;
fig. 8 is a schematic structural diagram of a flash memory chip according to an embodiment of the present invention.
[ detailed description ] embodiments
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 embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
At present, a flash memory device mainly includes a flash memory medium and a flash memory controller, as shown in fig. 1, fig. 1 is a schematic diagram of an internal structure of a flash memory device according to an embodiment of the present invention.
The flash memory operation takes a page (page) as a read-write unit and a physical block (block) as an erasing unit, and medium access inside the device provides multiple levels of parallelism such as channels, particle encapsulation, particle flash memory chips and the like. The flash memory particle packages are organized in a multi-channel mode inside the device, each channel can be connected with a plurality of particle packages, and the transmission channels are shared among the particle packages but can independently execute instructions. Each particle package contains two or more particles therein, each particle being independently selectable to execute an instruction. The interior of the particle can be divided into a plurality of slices, and each slice comprises a register buffer with the size of one page and is used for temporarily storing read-write data.
The flash memory controller is mainly responsible for address mapping, garbage recovery and wear leveling. The flash memory relieves the erasing delay of the flash memory unit before writing in a remote updating mode, because the erasing times of the flash memory unit are limited, the flash memory controller balances the erasing times among the physical blocks in the device through a wear-leveling algorithm, and simultaneously, the garbage recovery algorithm selects the physical blocks with high erasing efficiency as much as possible to recover so as to control the writing amplification.
It is understood that the flash memory controller of the flash memory device can store data evenly into the different physical blocks, thereby improving the health status of the flash memory device as a whole. However, the importance of data is not considered during the data storage process, resulting in some important data (such as file system data) being allocated to the physical blocks with poor health status, resulting in the important data being lost. Since some data itself is far more valuable than the flash memory device itself, it is more cost effective to improve the protection of the data itself.
Based on this, please refer to fig. 2, fig. 2 is a schematic flow chart of a data storage method based on a flash memory according to an embodiment of the present invention. The flash memory may specifically be a device such as a USB disk (USB flash disk) or an SSD, and may specifically be composed of a flash memory controller and a flash memory medium, where the function of the flash memory controller may specifically be implemented by a control chip, the function of the flash memory medium may specifically be implemented by a memory chip, and the memory chip may be a flash chip, and the flash type chip may specifically be a NAND flash chip. As shown in fig. 2, the method includes:
s101, acquiring the health state of each idle physical block.
The physical block is a physical area on the flash memory medium, where data is stored, and the physical block is a unit of storage of data on a disk and is a minimum unit of operation used when a file is operated in upper software. The physical block is composed of sectors, and one physical block is read from the hardware device, and one or more sectors are actually read from the hardware device. The physical blocks correspond to logical blocks, and the logical blocks correspond to files. In this embodiment, the health status of each physical block is predetermined, and when there is a data storage request, the health status of the free physical block is obtained.
The health status of the physical block can reflect the service life of the flash memory device executing the method and the working performance of the flash memory device in reading/writing data to a certain extent.
As shown in fig. 3, the specific process of determining the health status of the physical block includes:
s11, acquiring historical access times of the physical block;
s12, when the historical access times are larger than or equal to preset times, acquiring the R/B signal waiting time when the physical block is accessed for the last time;
and S13, determining the health state of the physical block according to the R/B signal waiting time.
In this embodiment, each physical block has a corresponding area record history access number. When the historical access times are larger than or equal to the preset times, checking the R/B signal waiting time length, judging the health state of the physical block according to the length of the time length, when the waiting time length is longer, indicating that the health state of the physical block is worse, and when the waiting time length is shorter, indicating that the health state of the physical block is better. When the historical access times of the physical block are less, the physical block is relatively new, the difference between the R/B signal waiting time lengths of the physical block is relatively small, and the R/B signal waiting time length when the physical block is accessed for the first time can be directly used to reduce the calculation steps.
The R/B signal represents ready/busy, the output of the R/B can display the state of the flash memory chip, when the R/B is at low level, the R/B signal represents that programming, erasing or random reading operation is in progress, and after the operation is finished, the R/B signal automatically returns to high level. Whether the program, erase or random read operation is completed can be determined by the R/B signal, and if it is "busy", it indicates that the program, erase or random read operation is in progress, and if it is "ready", it indicates that the operation is completed.
Wherein the R/B signal waiting duration is checked, i.e. the R/B signal waiting duration when the physical block was last accessed is checked.
Wherein, the latest R/B signal waiting time comprises: the R/B signal waiting time of the last time when the data is written into the physical block; or the R/B signal waiting time of the last time when the physical block is read. That is, when the last operation of the physical block is to read data, the R/B signal waiting time in the process of reading data is checked, and when the last operation of the physical block is to write data, the R/B signal waiting time in the process of writing data is checked.
The health state of the physical block is determined according to the R/B signal waiting time, the longer the R/B signal waiting time is, the longer the operation time is, the longer the R/B signal waiting time is, along with the increase of the number of write operations of the flash memory chip, the longer the R/B signal waiting time is, and therefore the health state of the physical block is deteriorated. Conversely, the shorter the R/B signal latency, the better the health of the physical block.
In this embodiment, some data (such as the total capacity, the storage space occupied by the file system, the storage space occupied by the system overhead, the user habit, and the like) may be combined, the specific health state of the physical block may be determined according to the obtained R/B signal waiting duration, and the corresponding relationship between the R/B signal waiting duration and the specific health state of the physical block may be recorded. For example, the R/B signal latency is 10 CPU clock cycles, the corresponding physical block health status is at a first level, the R/B signal latency is 7 CPU clock cycles, the corresponding physical block health status is at a second level, the R/B signal latency is 4 CPU clock cycles, the corresponding physical block health status is at a third level, and so on. The first level indicates that the R/B signal waiting time of the physical block is greater than the initial R/B signal waiting time of the physical block and the redundant time is within a first preset range, the second level indicates that the R/B signal waiting time of the physical block is greater than the initial R/B signal waiting time of the physical block and the redundant time is within a second preset range, and the third level indicates that the R/B signal waiting time of the physical block is greater than the initial R/B signal waiting time of the physical block and the redundant time is within a third preset range. The duration of the first preset range is greater than that of the second preset range, and the duration of the second preset range is greater than that of the third preset range.
It should be noted that, since the R/B signal waiting duration when the physical block is accessed last time is obtained, and the health status of the physical block is determined by using the last R/B signal waiting duration, the determination result of the health status of the physical block is a dynamic updating process, and the health status of the physical block is dynamically updated according to the number of times of use of the physical block and the last R/B signal waiting duration.
S102, determining the importance level of the data to be stored.
In this embodiment, the flash memory device executing the method may actively identify the data type of the data to be stored, so as to determine the importance level of the data to be stored according to the data type. For example, when the data to be stored belongs to metadata of a file system, the data to be stored is important data by default. Among them, the file system is a method and a data structure used by an operating system to specify files on a storage device (usually a disk, and also a NAND Flash based solid state disk) or a partition, that is, a method of organizing files on a storage device. For example, the storage file system of the NAND flash memory is mainly classified by its structure into a conventional file system based on a block device and a log-structured file system, which are the most commonly used file systems for a disk memory, such as the FAT file system and the EXT2 file system; log-structured file systems include JFFS2, YAFFS, CFFS, and the like.
In this embodiment, the flash memory device executing the method may further determine the importance level of the data to be stored according to the user identifier of the data to be stored. Only after the user performs the user-defined labeling on the importance level of the data to be stored, the flash memory device can judge the importance level of the data according to the label labeled by the user during the data storage, and the process is a passive process for determining the importance level of the data to be stored.
It should be noted that, in addition to the two methods for determining the level of the data to be stored, the importance level of the data to be stored may be determined by other methods.
S103, storing the data to be stored into the corresponding physical block according to the importance level of the data to be stored and the health state of the physical block.
In this embodiment, after determining the importance level of the data to be stored and the health status of the free physical blocks, the most important data to be stored is written into the free physical block with the best health status, and the second most important data to be stored is written into the free physical block with the better health status. The correspondence between the importance levels of the data to be stored and the health states of the physical blocks may be preset, for example, the first-level important data to be stored corresponds to the physical block with the best health state, the second-level important data to be stored corresponds to the physical block with the better health state, the third-level important data to be stored corresponds to the physical block with the general health state, and the fourth-level important data to be stored corresponds to the physical block with the worse health state, where the first-level important data, the second-level important data, the third-level important data, and the fourth-level important data are sorted from high to low according to the importance levels of the data. After the importance level of the data to be stored is determined, the corresponding physical block is automatically searched according to the importance level.
In the following, a common file system FAT is taken as an example, as shown in fig. 4, where data such as a super block, a block description, a bit table, a node table, and the like are used as metadata, and a data block is used for storing real data. Since the access efficiency of metadata has an important influence on the performance of the entire file system, and its corruption can cause data access failure, metadata is important data, and accordingly, the metadata is stored into a physical block in a good health state. Further, after a predetermined time, when it is detected that the health status of the physical block stored in the metadata is degraded, the physical block stored in the metadata may be adjusted to match the metadata with other physical blocks with good health status.
The embodiment of the invention provides a data storage method based on a flash memory, which comprises the steps of acquiring the health state of an idle physical block and the important level of data to be stored, and storing the data to be stored according to the important level of the data to be stored and the health state of the physical block. According to the embodiment, important data can be stored in the physical block with a good health state, and the safety of the important data during storage is improved.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating a data storage method based on a flash memory according to another embodiment of the present invention. As shown in fig. 5, the method includes:
s201, receiving a data storage request corresponding to data to be stored, wherein the data storage request comprises at least one logic number;
s202, searching for a free physical block according to the data storage request;
s203, acquiring the health state of each idle physical block;
s204, determining the importance level of the data to be stored;
s205, storing the data to be stored into a corresponding physical block according to the importance level of the data to be stored and the health state of the physical block;
s206, establishing mapping between the physical block stored by the data to be stored and the logic number contained in the data storage request corresponding to the data to be stored.
The main difference between this embodiment and the above-mentioned embodiment is that after data storage is completed according to the importance level of the data to be stored and the health status of the physical block, a mapping between the physical block and the logical number of the data to be stored is also established according to the storage result. The mapping may be used, when there is a data reading request, to find a physical block corresponding to the logical number according to the logical number carried in the data reading request and by combining a mapping relationship between the physical block and the logical number, and then read data in the physical block.
It should be noted that, in the above data reading process, the health status of the physical block may also be updated according to the waiting time of the R/B signal in the data reading process, and when the health status of the physical block is updated and the location of the data storage is changed, the mapping table is updated accordingly.
Wherein, the logic number is a number corresponding to the logic block. The specific file system manages a logical space, which is similar to a large array, each element in the array is the basic unit of file system operation, i.e. a logical block, generally the logical block is numbered from 0, and the logical block is continuous and corresponds to the logical block, i.e. a physical block.
The embodiment of the invention provides a data storage method based on a flash memory, which comprises the steps of acquiring the health state of an idle physical block and the important level of data to be stored, storing the data to be stored according to the important level of the data to be stored and the health state of the physical block, and establishing corresponding mapping according to the storage result. On one hand, the embodiment can store important data into a physical block with a good health state, so that the safety of the important data during storage is improved, and on the other hand, corresponding data is obtained according to the mapping relation during reading data.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a data storage device based on a flash memory according to an embodiment of the present invention. As shown in fig. 6, the apparatus 30 includes: an acquisition module 33, a determination module 34 and a storage module 35.
The obtaining module 33 is configured to obtain a health state of each idle physical block; a determining module 34 for determining the importance level of the data to be stored; and the storage module 35 is configured to store the data to be stored into the corresponding physical block according to the importance level of the data to be stored and the health state of the physical block.
In this embodiment, the obtaining module 33 and the determining module 34 are respectively connected to the storage modules, the obtaining module 33 sends the obtained health status of each idle physical block to the storage module 35, the determining module 34 sends the determined importance level of the data to be stored to the storage module 35, and the storage module 35 stores the data to be stored according to the health status of the physical block and the importance level of the data to be stored.
The health state of the physical block is specifically determined according to the R/B signal waiting time when the physical block is accessed last time.
Wherein the physical block was accessed the last time comprises: a read operation or a write operation.
In some embodiments, referring to fig. 7, the main difference between fig. 7 and fig. 6 is that the apparatus 30 further includes: a receiving module 31, a searching module 32 and a establishing module 36.
The receiving module 31 is configured to receive a data storage request corresponding to data to be stored, where the data storage request includes at least one logic number; a searching module 32, configured to search for a free physical block according to the data storage request; the establishing module 36 is configured to establish a mapping between the physical block in which the data to be stored is stored and the logic number included in the data storage request corresponding to the data to be stored.
It should be noted that, as the contents of information interaction, execution process, and the like between the modules in the flash memory-based data storage device in the embodiment of the present invention are based on the same concept as the method embodiment of the present invention, the specific contents are also applicable to the flash memory-based data storage device. The respective modules in the embodiments of the present invention can be implemented as separate hardware or software, and the combination of the functions of the respective units can be implemented using separate hardware or software as necessary.
The embodiment of the invention provides a data storage device based on a flash memory, which stores data to be stored according to the important level of the data to be stored and the health state of a physical block by acquiring the health state of an idle physical block and the important level of the data to be stored, and establishes a corresponding mapping table according to the storage result. On one hand, the embodiment can store important data into a physical block with a good health state, so that the safety of the important data during storage is improved, and on the other hand, corresponding data is obtained according to the mapping table during reading data, so that the data reading speed is higher to a certain extent due to the fact that the data storage is combined with the health state of the physical block.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a flash memory chip according to an embodiment of the present invention. As shown in fig. 8, the flash memory chip 40 includes: the controller 41 and the memory 42 are electrically connected, and the controller 41 and the memory 42 are electrically connected.
The memory 42, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the flash-based data storage method in the embodiment of the present invention (for example, the obtaining module 33, the determining module 34, and the storing module 35 shown in fig. 6). The controller 41 executes various functional applications of the server and data processing, i.e., implements the flash-based data storage method of the above-described method embodiment, by running the non-volatile software programs, instructions, and modules stored in the memory 42.
The memory 42 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the flash memory-based data storage device, and the like.
The one or more modules are stored in the memory 42 and, when executed by the one or more controllers 41, perform the flash-based data storage method of any of the method embodiments described above, e.g., performing the functions of method steps S101-S103 of fig. 2, method steps S11-S13 of fig. 3, method steps S201-S206 of fig. 5, modules 33-35 of fig. 6, and modules 31-36 of fig. 7, described above.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
Embodiments of the present invention provide a non-volatile computer-readable storage medium storing computer-executable instructions for an electronic device to perform any of the above-described method embodiments of the flash-based data storage method, for example, performing the above-described functions of method steps S101 to S103 in fig. 2, method steps S11 to S13 in fig. 3, method steps S201 to S206 in fig. 5, modules 33 to 35 in fig. 6, and modules 31 to 36 in fig. 7.
Embodiments of the present invention provide a computer program product comprising a computer program stored on a non-volatile computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform a flash-based data storage method of any of the above-described method embodiments, e.g., to perform the functions of method steps S101-S103 of fig. 2, method steps S11-S13 of fig. 3, method steps S201-S206 of fig. 5, modules 33-35 of fig. 6, and modules 31-36 of fig. 7, described above.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (11)

1. A method for data storage based on a flash memory, the flash memory comprising a plurality of physical blocks, the method comprising:
acquiring the health state of each idle physical block;
determining the importance level of data to be stored;
and storing the data to be stored into the corresponding physical block according to the importance level of the data to be stored and the health state of the physical block.
2. The method of claim 1, wherein the health status of the physical block is determined based on, in particular, a latency of the R/B signal when the physical block was last accessed.
3. The method of claim 2, wherein the physical block was accessed the last time comprises: a read operation or a write operation.
4. The method of claim 1, wherein determining the importance level of the data to be stored comprises:
determining the importance level of the data to be stored according to the data type of the data to be stored; or,
and determining the importance level of the data to be stored according to the user identification of the data to be stored.
5. The method according to any one of claims 1 to 4,
before the obtaining the health status of each idle physical block, the method further includes:
receiving a data storage request corresponding to data to be stored, wherein the data storage request comprises at least one logic number;
searching for a free physical block according to the data storage request;
after the data to be stored is stored into the corresponding physical block according to the importance level of the data to be stored and the health state of the physical block, the method further includes:
and establishing mapping between the physical block in which the data to be stored is stored and the logic number contained in the data storage request corresponding to the data to be stored.
6. A data storage device based on a flash memory, said flash memory containing a plurality of physical blocks, said device comprising:
an obtaining module, configured to obtain a health state of each idle physical block;
the determining module is used for determining the importance level of the data to be stored;
and the storage module is used for storing the data to be stored into the corresponding physical block according to the importance level of the data to be stored and the health state of the physical block.
7. The apparatus of claim 6, wherein the health status of the physical block is determined based on, in particular, a latency of the R/B signal when the physical block was last accessed.
8. The apparatus of claim 7, wherein the physical block was accessed the last time comprises: a read operation or a write operation.
9. The apparatus of claim 6, wherein the determining module is specifically configured to:
determining the importance level of the data to be stored according to the data type of the data to be stored; or,
and determining the importance level of the data to be stored according to the user identification of the data to be stored.
10. The apparatus of any one of claims 6 to 9, further comprising:
the receiving module is used for receiving a data storage request corresponding to data to be stored, wherein the data storage request comprises at least one logic number;
the searching module is used for searching for the idle physical block according to the data storage request;
and the establishing module is used for establishing mapping between the physical block in which the data to be stored is stored and the logic number contained in the data storage request corresponding to the data to be stored.
11. A flash memory chip, comprising: a controller; and a memory communicatively coupled to the controller; wherein the memory stores instructions executable by the controller to enable the controller to perform the method of any one of claims 1 to 5.
CN201710369970.2A 2017-05-23 2017-05-23 Date storage method, device and flash chip based on flash memory Pending CN107203341A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710369970.2A CN107203341A (en) 2017-05-23 2017-05-23 Date storage method, device and flash chip based on flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710369970.2A CN107203341A (en) 2017-05-23 2017-05-23 Date storage method, device and flash chip based on flash memory

Publications (1)

Publication Number Publication Date
CN107203341A true CN107203341A (en) 2017-09-26

Family

ID=59905338

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710369970.2A Pending CN107203341A (en) 2017-05-23 2017-05-23 Date storage method, device and flash chip based on flash memory

Country Status (1)

Country Link
CN (1) CN107203341A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108920095A (en) * 2018-06-06 2018-11-30 深圳市脉山龙信息技术股份有限公司 A kind of data store optimization method and apparatus based on CRUSH
CN109324763A (en) * 2018-10-18 2019-02-12 王梅 Method and system for identifying low-importance files in mobile terminals in mobile Internet
CN110364216A (en) * 2018-04-09 2019-10-22 合肥沛睿微电子股份有限公司 Solid state hard disk and its operation method
CN114003175A (en) * 2021-11-02 2022-02-01 青岛海信日立空调系统有限公司 Air conditioner and control system thereof
CN115966240A (en) * 2021-10-08 2023-04-14 中山市江波龙电子有限公司 Storage device and data recovery method thereof
WO2024234347A1 (en) * 2023-05-17 2024-11-21 长江存储科技有限责任公司 Operation method, memory system, electronic device and computer-readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163165A (en) * 2011-05-26 2011-08-24 忆正储存技术(武汉)有限公司 Error estimation module and estimation method thereof for flash memory
CN103049389A (en) * 2012-12-14 2013-04-17 锐迪科科技有限公司 NAND flash memory controller and writing control method thereof
CN103370686A (en) * 2010-09-15 2013-10-23 净睿存储股份有限公司 Scheduling of reconstructive I/O read operations in a storage environment
CN103377130A (en) * 2012-04-13 2013-10-30 日立(中国)研究开发有限公司 Data storage equipment and corresponding data storage method
US20140149619A1 (en) * 2010-10-19 2014-05-29 Samsung Electronics Co., Ltd. Bus system including an interconnector, a master device, a slave device, and an operating method thereof
CN104731523A (en) * 2013-12-24 2015-06-24 国际商业机器公司 Method and controller for collaborative management of non-volatile hierarchical storage system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103370686A (en) * 2010-09-15 2013-10-23 净睿存储股份有限公司 Scheduling of reconstructive I/O read operations in a storage environment
US20140149619A1 (en) * 2010-10-19 2014-05-29 Samsung Electronics Co., Ltd. Bus system including an interconnector, a master device, a slave device, and an operating method thereof
CN102163165A (en) * 2011-05-26 2011-08-24 忆正储存技术(武汉)有限公司 Error estimation module and estimation method thereof for flash memory
CN103377130A (en) * 2012-04-13 2013-10-30 日立(中国)研究开发有限公司 Data storage equipment and corresponding data storage method
CN103049389A (en) * 2012-12-14 2013-04-17 锐迪科科技有限公司 NAND flash memory controller and writing control method thereof
CN104731523A (en) * 2013-12-24 2015-06-24 国际商业机器公司 Method and controller for collaborative management of non-volatile hierarchical storage system

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110364216A (en) * 2018-04-09 2019-10-22 合肥沛睿微电子股份有限公司 Solid state hard disk and its operation method
CN110364216B (en) * 2018-04-09 2022-03-01 合肥沛睿微电子股份有限公司 Solid state disk and operation method thereof
CN108920095A (en) * 2018-06-06 2018-11-30 深圳市脉山龙信息技术股份有限公司 A kind of data store optimization method and apparatus based on CRUSH
CN108920095B (en) * 2018-06-06 2021-06-29 深圳市脉山龙信息技术股份有限公司 Data storage optimization method and device based on CRUSH
CN109324763A (en) * 2018-10-18 2019-02-12 王梅 Method and system for identifying low-importance files in mobile terminals in mobile Internet
CN109324763B (en) * 2018-10-18 2022-01-07 爱云保(上海)科技有限公司 Method and system for identifying low-importance files in mobile terminal in mobile internet
CN115966240A (en) * 2021-10-08 2023-04-14 中山市江波龙电子有限公司 Storage device and data recovery method thereof
CN114003175A (en) * 2021-11-02 2022-02-01 青岛海信日立空调系统有限公司 Air conditioner and control system thereof
WO2024234347A1 (en) * 2023-05-17 2024-11-21 长江存储科技有限责任公司 Operation method, memory system, electronic device and computer-readable storage medium
CN119678129A (en) * 2023-05-17 2025-03-21 长江存储科技有限责任公司 Operating method, memory system, electronic device and computer readable storage medium

Similar Documents

Publication Publication Date Title
US10761780B2 (en) Memory system
KR102663661B1 (en) Apparatus and method for controlling data stored in memory system
US10739996B1 (en) Enhanced garbage collection
CN106448737B (en) Method and device for reading flash memory data and solid state drive
US9229876B2 (en) Method and system for dynamic compression of address tables in a memory
US8438361B2 (en) Logical block storage in a storage device
US8626986B2 (en) Pre-emptive garbage collection of memory blocks
KR101759811B1 (en) Memory controller, method, and solid state memory system for formatting solid state memory
CN112765006B (en) Solid state disk log generation method and solid state disk thereof
US9448946B2 (en) Data storage system with stale data mechanism and method of operation thereof
CN107203341A (en) Date storage method, device and flash chip based on flash memory
US20180089074A1 (en) Techniques to Manage Key-Value Storage at a Memory or Storage Device
US10990325B2 (en) Write control method, associated data storage device and controller thereof
US9465537B2 (en) Memory system and method of controlling memory system
KR20150118778A (en) Storage controller, storage device, storage system and method of operation of the storage controller
KR101561546B1 (en) Method for managing memory apparatus, associated memory apparatus thereof and associated controller thereof
US20180121092A1 (en) Method and apparatus for improving read performance of a solid state drive
KR102430198B1 (en) A method of organizing an address mapping table in a flash storage device
CN112463647A (en) Reducing the size of the forward mapping table using hashing
US10339045B2 (en) Valid data management method and storage controller
US11226738B2 (en) Electronic device and data compression method thereof
CN110968527B (en) FTL provided caching
US9312011B1 (en) Data writing method, memory storage device and memory control circuit unit
US12511054B2 (en) Methods of operating memory controllers, devices and storage media
CN119440428B (en) Shared buffer data management method and storage system based on counting information

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
TA01 Transfer of patent application right

Effective date of registration: 20191224

Address after: 518000 District 652, district a, huameiju business center, Xinhu Road, Haiyu community, Xin'an street, Bao'an District, Shenzhen City, Guangdong Province

Applicant after: Jian Rong semiconductor (Shenzhen) Co., Ltd.

Address before: 518000 Guangdong city of Shenzhen province Nanshan District Gao Xin Road No. 013 Fu technology building B block 5 layer 505

Applicant before: Jian Rong semiconductor (Shenzhen) Co., Ltd.

Applicant before: Jianrong Integrated Circuit Technology (Zhuhai) Co., Ltd.

Applicant before: ZHUHAI HUANGRONG INTEGRATED CIRCUIT TECHNOLOGY CO., LTD.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20170926

RJ01 Rejection of invention patent application after publication