CN110399094A - Block processing method, device, solid state hard disk and the storage medium of solid state hard disk - Google Patents

Block processing method, device, solid state hard disk and the storage medium of solid state hard disk Download PDF

Info

Publication number
CN110399094A
CN110399094A CN201910492020.8A CN201910492020A CN110399094A CN 110399094 A CN110399094 A CN 110399094A CN 201910492020 A CN201910492020 A CN 201910492020A CN 110399094 A CN110399094 A CN 110399094A
Authority
CN
China
Prior art keywords
flash block
memory module
flash
block
single layer
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
CN201910492020.8A
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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN201910492020.8A priority Critical patent/CN110399094A/en
Publication of CN110399094A publication Critical patent/CN110399094A/en
Pending legal-status Critical Current

Links

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/0629Configuration or reconfiguration of storage systems
    • 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/0647Migration mechanisms
    • 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

This application involves block processing method, device, solid state hard disk and the storage mediums of a kind of solid state hard disk.The described method includes: counting the erasable number of each flash block in multilayered memory unit area, whether the erasable number for judging flash block is more than preset threshold, when being more than, trigger preset pattern switching instruction, execution pattern switching command, the memory module of flash block is switched to single layer memory module, predetermined registration operation is carried out to flash block under single layer memory module.The service life that solid state hard disk can be increased using this method reduces the hardware cost of solid state hard disk.

Description

Block processing method, device, solid state hard disk and the storage medium of solid state hard disk
Technical field
This application involves technical field of data storage, more particularly to a kind of block processing method of solid state hard disk, device, consolidate State hard disk and storage medium.
Background technique
Solid state hard disk (Solid State Drives, SSD) is made of main control chip and flash memory, and flash memory is divided into NOR flash memory And nand flash memory, the storage unit in nand flash memory can be divided into single-layer memory cell (Single Level according to type Cell, SLC) and multilayered memory unit, multilayered memory unit again include MLC, TLC and QLC etc..Compared to multilayered memory unit, The performance of single-layer memory cell is good, it is erasable often, but single-layer memory cell is higher than multilayered memory unit cost.
Flash block mostly uses greatly multilayered memory unit, and with increasing for hard disk write-in data, the erasable number of flash block will Reach itself permitted erasable number of maximum, can not continue to use, the active volume inside SSD is caused to gradually decrease.Needle To above situation, SSD marks off a part of memory space as reserved space on flash memory, when some flash block reaches maximum can Erasable number and it is unavailable when, by the flash block in reserved space replace not available flash block continue work.However, pre- Flash block in spacing can be also gradually consumed.In particular, in real time solid-state is written in a large amount of monitoring data by monitoring device In hard disk, cause the solid state hard disk service life in monitoring device extremely limited.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of solid-state that can be improved solid state hard disk service life Block processing method, device, solid state hard disk and the storage medium of hard disk.
A kind of block processing method of solid state hard disk, which comprises
Count the erasable number of each flash block in multilayered memory unit area;
Whether the erasable number for judging the flash block is more than preset threshold;
When the erasable number of the flash block is more than the threshold value, preset pattern switching instruction is triggered;
The pattern switching instruction is executed, the memory module of the flash block is switched to single layer memory module;
Predetermined registration operation is carried out to the flash block under the single layer memory module.
It is described by the flash block in one of the embodiments, after the preset pattern switching instruction of the triggering Memory module the step of being switched to single layer memory module before, the method also includes:
It detects in the flash block with the presence or absence of valid data;
When, there are when valid data, the valid data being migrated to the multilayered memory unit area in the flash block In other interior flash blocks;
Erasing operation is carried out to the flash block after valid data has been migrated.
Described the step of erasing operation is carried out to the flash block in one of the embodiments, comprising:
The flash block is tentatively wiped with the multilayered memory mode;
It is described to be stored in the single layer after the memory module by the flash block is switched to single layer memory module Before the step of carrying out predetermined registration operation to the flash block under mode, the method also includes:
The flash block after memory module switching is wiped again with the single layer memory module.
The step for carrying out predetermined registration operation to the flash block under single layer memory module in one of the embodiments, Suddenly, comprising:
Read operation, write operation and/or erasing operation are carried out to the flash block with single layer memory module.
The step of single layer memory module is switched in the memory module by the flash block in one of the embodiments, After rapid, before described the step of carrying out predetermined registration operation to the flash block under the single layer memory module, the method is also Include:
Update the memory module mark of the flash block;
The method also includes:
When detecting that solid state hard disk powers on, the memory module of the flash block and the memory module of the flash block are judged It identifies whether consistent;
When the memory module of the memory module of the flash block and flash block mark is inconsistent, by the flash block Memory module be switched to the memory module and identify corresponding memory module.
Described the step of predetermined registration operation is carried out to the flash block under single layer memory module in one of the embodiments, Later, the method also includes:
When detecting that the predetermined registration operation is completed, the memory module of the flash block and the storage of the flash block are judged Whether pattern identification is consistent;
When the memory module of the memory module of the flash block and flash block mark is inconsistent, by the flash block Memory module be switched to the corresponding memory module of memory module mark.
A kind of block processing unit of solid state hard disk, described device include:
Number statistical module, for counting each piece in multilayered memory unit area of erasable number;
Number judgment module, for judging whether the erasable number of the flash block is more than preset threshold;
Instruction triggers module, for triggering preset mode when the erasable number of the flash block is more than the threshold value Switching command;
Mode switch module is used for execution pattern switching command, the memory module of the flash block is switched to single layer and is deposited Storage mode;And
Flash block operation module, for carrying out predetermined registration operation to the flash block under the single layer memory module.
A kind of solid state hard disk, the solid state hard disk include main control chip and flash memory, and the main control chip includes processor, institute Stating flash memory storage has computer program, and the processor performs the steps of when executing the computer program
Count the erasable number of each flash block in multilayered memory unit area;
Whether the erasable number for judging the flash block is more than preset threshold;
When the erasable number of the flash block is more than the threshold value, preset pattern switching instruction is triggered;
The pattern switching instruction is executed, the memory module of the flash block is switched to single layer memory module;
Predetermined registration operation is carried out to the flash block under the single layer memory module.
A kind of solid state hard disk, comprising:
Flash memory, the flash memory include multiple flash blocks, for storing data and are instructed;
Main control chip is attached, for counting each flash memory in multilayered memory unit area by bus with the flash memory The erasable number of block judges whether the erasable number of the flash block is more than preset threshold, when the erasable number of the flash block When more than the threshold value, preset pattern switching instruction is triggered, the pattern switching instruction is executed, by the storage of the flash block Pattern switching is single layer memory module, carries out predetermined registration operation to the flash block under the single layer memory module.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor It is performed the steps of when row
Count the erasable number of each flash block in multilayered memory unit area;
Whether the erasable number for judging the flash block is more than preset threshold;
When the erasable number of the flash block is more than the threshold value, preset pattern switching instruction is triggered;
The pattern switching instruction is executed, the memory module of the flash block is switched to single layer memory module;
Predetermined registration operation is carried out to the flash block under the single layer memory module.
Block processing method, device, solid state hard disk and the storage medium of above-mentioned solid state hard disk, when in multilayered memory unit area When the erasable number of flash block is more than preset threshold, mode switching command is triggered, by the memory module of flash block from multilayered memory Pattern switching is single layer memory module, increases the erasable number of maximum of flash block, and the hardware of no replacement is required flash block, from And the service life of solid state hard disk is increased, reduce the hardware cost of solid state hard disk.
Detailed description of the invention
Fig. 1 is the flow diagram of the block processing method of solid state hard disk in one embodiment;
Fig. 2 is the flow diagram of the block processing method of solid state hard disk in another embodiment;
Fig. 3 is the structural block diagram of the block processing unit of solid state hard disk in one embodiment;And
Fig. 4 is the structural schematic diagram of solid state hard disk in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
In one embodiment, as shown in Figure 1, providing a kind of block processing method of solid state hard disk, this method is applied to Solid state hard disk, comprising the following steps:
Step 102, the erasable number of each flash block in multilayered memory unit area is counted.
Wherein, the storage unit of each flash block is multilayered memory unit in multilayered memory unit area, and each flash block is deposited Storage mode is multilayered memory mode.The same time storage of the multilayered memory mode, that is, each storage unit at least data of 2bit, packet MLC mode, TLC mode and QLC mode etc. are included, for example, each storage unit same time stores the number of 2bit in MLC mode According to the data of each same time storage 3bit of storage unit in TLC mode.
Single-layer memory cell region also may be present in solid state hard disk, the storage unit of each flash block in single layer storage region For single-layer memory cell, the memory module of each flash block is single layer memory module.Single layer memory module, that is, each storage unit is same The data of one time storage 1bit.
Specifically, flash block carries out erasable counting how many times in every progress erasing operation or write operation.In real time or The erasable number of each flash memory block count in multilayered memory unit area is obtained, periodically to count and monitor multilayered memory unit The erasable number of each flash block in region.
Step 104, whether the erasable number for judging flash block is more than preset threshold.
Step 106, when the erasable number of flash block is more than the threshold value, preset pattern switching instruction is triggered.
Specifically, increasing with the erasable number of flash block, the service life of flash block continues decaying, when erasable number When reaching the maximum erasable number of flash block, flash block can not be reused.In order to improve the service life of flash block, set in advance Preset threshold is set, when the erasable number of flash block is more than preset threshold, mode switching command is triggered, to be more than to erasable number The flash block of the threshold value carries out memory module switching, otherwise continues the erasable number for counting flash block.Wherein, the tool of preset threshold Body value and the type of flash memory particle, quality etc. are information-related.
Step 108, the memory module of flash block is switched to single layer memory module by execution pattern switching command.
Specifically, number in multilayered memory unit area, erasable is more than preset threshold by execution pattern switching command Flash block is single layer memory module from multilayered memory pattern switching.Flash block is that single layer stores mould from multilayered memory pattern switching After formula, although memory space reduces but erasable number greatly increases, for example, maximum when flash block is using single layer memory module Erasable number is 30000 times, and the erasable number of maximum will dodge when using multilayered memory mode (such as TLC mode) for 1500 times For counterfoil from TLC pattern switching to single layer memory module, the capacity of flash block is reduced into original one third, the residue of flash block Erasable number improves general 20 times, in this way, the total amount of the writable data of flash block improves general 7 times.On the whole, it dodges The remaining erasable number of counterfoil and writable total amount of data greatly increase, and the service life of flash block is improved, and nothing Hardware replacement need to be carried out to solid state hard disk, reduce the cost of solid state hard disk.
Step 110, predetermined registration operation is carried out to flash block under single layer memory module.
Specifically, right under single layer memory module by flash block after from multilayered memory pattern switching to multilayer memory module Flash block carries out read operation, write operation and/or erasing operation.
In the block processing method of above-mentioned solid state hard disk, the erasable number of flash block is more than pre- in multilayered memory unit area If when threshold value, triggering mode switching command, the memory module of flash block being switched to single layer memory module, in switching memory module Predetermined registration operation is carried out in flash block afterwards, the erasable number of maximum of flash block greatly increases, the writable number of residue of flash block According to total amount be also improved, and the hardware of no replacement is required flash block reduces to increase the service life of solid state hard disk The cost of solid state hard disk.
In another embodiment, as shown in Fig. 2, providing a kind of block processing method of solid state hard disk, this method application In solid state hard disk, comprising the following steps:
Step 202, the erasable number of each flash block in multilayered memory unit area is counted.
Specifically, flash block carries out erasable counting how many times in every progress erasing operation or write operation.In real time or The erasable number of each flash memory block count in multilayered memory unit area is obtained, periodically to count and monitor multilayered memory unit The erasable number of each flash block in region.
Step 204, whether the erasable number for judging flash block is more than preset threshold.
Step 206, when the erasable number of flash block is more than the threshold value, preset pattern switching instruction is triggered.
Specifically, preset threshold is preset, when the erasable number of flash block is more than preset threshold, triggers pattern switching Instruction carries out memory module switching with the flash block for erasable number being more than the threshold value, otherwise continues to count the erasable of flash block Number.
Step 208, it detects in flash block and valid data is migrated to multilayer and are deposited when it is present with the presence or absence of valid data In other flash blocks in storage unit region.
Specifically, it after triggering mode switching command, needs to be implemented the memory module of flash block from multilayered memory mould Formula is switched to the operation of single layer memory module, original in flash block to store under multilayered memory mode after memory module switching Data, may there is a phenomenon where data entanglements when reading under single layer memory module.Therefore, before memory module switching, These valid data are migrated to multilayer memory cell region when it is present with the presence or absence of valid data in detection flash block Other flash blocks in, while updating the storage index of these valid data, the memory modules of these other flash blocks is multilayer Memory module, to guarantee that the storage format of valid data and the memory module of the flash block of write-in are consistent.
Step 210, erasing operation is carried out to having migrated the flash block after valid data.
Specifically, after the valid data in flash block migrate out, flash block is wiped using multilayered memory mode Operation carries out data erasing to flash block by erasing order that is, under multilayered memory mode.
Step 212, the memory module of flash block is switched to single layer memory module by execution pattern switching command.
Specifically, number in multilayered memory unit area, erasable is more than preset threshold by execution pattern switching command Flash block is single layer memory module from multilayered memory pattern switching.Flash block is that single layer stores mould from multilayered memory pattern switching After formula, although memory space reduces but erasable number greatly increases, and the total amount of the writable data of flash block is improved, from And the service life of flash block is improved, and without carrying out hardware replacement to solid state hard disk, reduce the cost of solid state hard disk.
Specifically, it when by the memory module of flash block from multilayered memory pattern switching to single layer memory module, can be used SET FEATURE order, SLC MODE ENABLE order or A2h order are realized.The different flash block pair of flash memory particle type The switching command answered is different, for example, the adoptable switching command of flash block that flash memory particle is magnesium light particle is SET FEATURE Order or SLC MODE ENABLE order, flash memory particle are that the adoptable switching command of flash block of Hynix particle is A2h life It enables.
Step 214, the flash block after memory module switching is wiped again with single layer memory module.
Specifically, by the memory module of flash block after from multilayered memory pattern switching to single layer memory module, with single layer Memory module wipes flash block again, i.e., carries out data wiping to flash block by erasing order under single layer memory module It removes, flash block is carried out again under single layer memory module by carrying out preliminary erasing to flash block under multilayered memory mode The cooperation of erasing improves the erasing effect of flash block.
Step 216, predetermined registration operation is carried out to the flash block under the single layer memory module.
Specifically, right under single layer memory module by flash block after from multilayered memory pattern switching to single layer memory module Flash block carries out read operation, write operation and/or erasing operation.
In one embodiment, it is equipped with memory module in flash block to identify, flash block is recorded by memory module mark Memory module, to solve the problems, such as that flash memory particle itself can not remember the memory module of flash block.For example, depositing when flash block When storage mode is multilayered memory mode, memory module is identified as 1, when the memory module of flash memory is single layer memory module, storage Pattern identification is 0.By the memory module of flash block from multilayered memory pattern switching be single layer memory module after, update the flash memory The memory module of block identifies.
In one embodiment, flash block is after from multilayered memory pattern switching to single layer memory module, when solid state hard disk is sent out When raw power-off, the memory module that solid state hard disk powers on rear flash block is possible to restore automatically to default storage mode, multilayered memory The default storage mode of flash block is multilayered memory mode in unit area.Therefore after detecting that solid state hard disk powers on, judgement The memory module of flash block and the memory module of flash block indicate whether unanimously in multilayered memory unit area, if inconsistent, The memory module of flash block is switched to memory module and identifies corresponding memory module, so that the memory module in flash block is unexpected Pattern switching is carried out to flash block in time when recovery to multilayer memory module, is avoided under multilayered memory mode to flash block in list The data stored under layer memory module are operated, and the effect of flash block pattern switching is improved.Since the data of flash block are disconnected It is stored under single layer memory module before electric, without carrying out data erasing to flash block before and after pattern switching at this time.
In one embodiment, read operation, write operation and/or wiping are carried out in the flash block for switching to single layer memory module After operation, flash block is possible to automatically switch to default storage mode (i.e. multilayered memory mode) from single layer memory module, because This judges the memory module of flash block and the memory module mark of flash block when detecting that the predetermined registration operation in flash block is completed Whether knowledge is consistent, when there is inconsistency, the memory module of flash block is switched to and is deposited corresponding to the memory module mark of flash block Storage mode is cut to carry out mode to flash block in time when the memory module of flash block is restored suddenly to multilayer memory module It changes, the data stored under single layer memory module under multilayered memory mode to flash block is avoided to operate, improve flash block The effect of pattern switching.
It should be understood that although each step in the flow chart of Fig. 1-2 is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 1-2 Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately It executes.
In one embodiment, as shown in figure 3, providing a kind of block processing unit 300 of solid state hard disk, comprising: number Statistical module 302, number judgment module 304, instruction triggers module 306, mode switch module 308 and flash block operation module 310, in which:
Number statistical module 302, for counting each piece in multilayered memory unit area of erasable number.
Number judgment module 304, for judging whether the erasable number of flash block is more than preset threshold.
Instruction triggers module 306, for triggering preset pattern switching when the erasable number of flash block is more than the threshold value Instruction.
Mode switch module 308 is used for execution pattern switching command, and the memory module of flash block is switched to single layer storage Mode.
Flash block operation module 310, for carrying out predetermined registration operation to flash block under single layer memory module.
Specifically, number statistical module 302, number judgment module 304, instruction triggers module 306, mode switch module 308 and flash block operation module 310 specific implementation content can refer to step 102 in the block processing method of above-mentioned solid state hard disk~ Step 110 or step 202~step 214 detailed description, details are not described herein.
In one embodiment, the block processing unit 300 of solid state hard disk further include:
Valid data detection module, for detecting in flash block with the presence or absence of valid data;
Data Migration module, for when, there are when valid data, valid data being migrated to multilayered memory list in flash block In other memory blocks in first region;And
Flash block wipes module, for carrying out erasing operation to having migrated the flash block after valid data.
Specifically, it after triggering mode switching command, needs to be implemented the memory module of flash block from multilayered memory mode It is switched to the operation of single layer memory module, after memory module switching, original number stored under multilayered memory mode in flash block According to may there is a phenomenon where data entanglements when being read under single layer memory module.Therefore, before memory module switching, inspection It surveys in flash block and when it is present migrates these valid data to multilayer memory cell region with the presence or absence of valid data In other flash blocks, while the storage index of these valid data is updated, the memory module of these other flash blocks is deposited for multilayer Storage mode, to guarantee that the storage format of valid data and the memory module of the flash block of write-in are consistent.Having in flash block After effect Data Migration is gone out, data erasing is carried out to flash block, to improve the pattern switching effect of subsequent flash block.
In one embodiment, flash block erasing module includes:
Preliminary erasing module, for tentatively being wiped with multilayered memory mode flash block.
Specifically, flash block carry out pattern switching before be multilayered memory mode, with multilayered memory mode to flash block into The preliminary erasing of row, i.e., carry out data erasing to flash block under multilayered memory mode, effectively to remove the data in flash block.
In one embodiment, the block processing unit 300 of solid state hard disk further include:
Module is wiped again, for being wiped again with single layer memory module the flash block after memory module switching.
Specifically, by the memory module of flash block after from multilayered memory pattern switching to single layer memory module, with single layer Memory module wipes flash block again, i.e., carries out data wiping to flash block by erasing order under single layer memory module It removes, flash block is carried out again under single layer memory module by carrying out preliminary erasing to flash block under multilayered memory mode The cooperation of erasing improves the erasing effect of flash block.
In one embodiment, the block processing unit 300 of solid state hard disk further include:
Pattern identification update module, the memory module for updating flash block identify;
First mode judgment module, for when detecting that solid state hard disk powers on, judging the memory module and sudden strain of a muscle of flash block The memory module of counterfoil identifies whether unanimously;
First mode identifies unified modules, and the memory module for the memory module and flash block of working as flash block identifies different When cause, the memory module of flash block is switched to memory module and identifies corresponding memory module.
Specifically, it is equipped with memory module in flash block to identify, the storage mould of flash block is recorded by memory module mark Formula, to solve the problems, such as that flash memory particle itself can not remember the memory module of flash block.By the memory module of flash block from more After layer memory module is switched to single layer memory module, the memory module mark of the flash block is updated.
Specifically, flash block is after from multilayered memory pattern switching to single layer memory module, when solid state hard disk powers off, The memory module that solid state hard disk powers on rear flash block is possible to restore automatically to default storage mode, in multilayered memory unit area The default storage mode of flash block is multilayered memory mode.Therefore after detecting that solid state hard disk powers on, judge multilayered memory list The memory module of flash block and the memory module of flash block indicate whether unanimously in first region, if inconsistent, by flash block Memory module is switched to memory module and identifies corresponding memory module, so that the memory module in flash block is restored suddenly to multilayer Pattern switching is carried out to flash block in time when memory module, is avoided under multilayered memory mode to flash block in single layer memory module The data of lower storage are operated, and the effect of flash block pattern switching is improved.In single layer before being powered off due to the data of flash block It is stored under memory module, without carrying out data erasing to flash block before and after pattern switching at this time.
In one embodiment, the block processing unit 300 of solid state hard disk further include:
Second mode judgment module, for judging the memory module and sudden strain of a muscle of flash block when detecting that predetermined registration operation is completed The memory module of counterfoil identifies whether unanimously;
Second mode identifies unified modules, and the memory module for the memory module and flash block of working as flash block identifies different When cause, the memory module of flash block is switched to the corresponding memory module of memory module mark.
Specifically, read operation, write operation and/or erasing operation are carried out in the flash block for switching to single layer memory module Afterwards, therefore flash block, which is possible to automatically switch to default storage mode (i.e. multilayered memory mode) from single layer memory module, is examining When measuring the predetermined registration operation completion in flash block, the memory module of the memory module and flash block that judge flash block identifies whether one It causes, when there is inconsistency, the corresponding memory module of the memory module mark that the memory module of flash block is switched into flash block, from And pattern switching is carried out to flash block in time when the memory module of flash block is restored suddenly to multilayer memory module, it avoids more The data stored under single layer memory module under layer memory module to flash block operate, and improve the effect of flash block pattern switching Fruit.
The specific of block processing unit about solid state hard disk limits the block processing that may refer to above for solid state hard disk The restriction of method, details are not described herein.Modules in the block processing unit of above-mentioned solid state hard disk can be fully or partially through Software, hardware and combinations thereof are realized.Above-mentioned each module can be embedded in the form of hardware or independently of the place in computer equipment It manages in device, can also be stored in a software form in the memory in computer equipment, in order to which processor calls execution or more The corresponding operation of modules.
In one embodiment, as shown in figure 4, providing a kind of solid state hard disk 400, including main control chip 402 and flash memory 404, main control chip 402 includes processor 406, and flash memory 404 is stored with computer program, which executes the computer The step of a kind of block processing method of the solid state hard disk provided in the various embodiments described above is provided when program.
In one embodiment, a kind of solid state hard disk is provided, comprising:
Flash memory, including multiple flash blocks for storing data and instruct;
Main control chip is attached with flash memory by bus, for counting each flash block in multilayered memory unit area Erasable number judges whether the erasable number of flash block is more than preset threshold, when being more than, triggers preset pattern switching and refers to It enables, the memory module of flash block is switched to single layer memory module, to sudden strain of a muscle under single layer memory module by execution pattern switching command Counterfoil carries out predetermined registration operation.
Wherein, a part of memory space has been reserved in flash memory in advance for storing the instruction of solid state hard disk, at runtime by Processor in main control chip reads and executes these instructions.
In one embodiment, after triggering mode switching command, the memory module of flash block is switched to single layer storage mould Before formula, main control chip is also used to detect in flash block with the presence or absence of valid data, when it is present, at most by valid data migration In other flash blocks in layer memory cell region, erasing operation is carried out to the flash block after valid data has been migrated, to avoid Because the memory module of legacy data storage format and flash block is inconsistent, there is a situation where data read errors after pattern switching.
In one embodiment, when carrying out erasing operation to flash block, main control chip is with multilayered memory mode to flash memory Block is tentatively wiped, and the flash block tentatively wiped is switched to single layer memory module, is stored with multilayered memory mode to switching Flash block after mode is wiped again, thus by carrying out preliminary erasing to flash block under multilayered memory mode and in list The cooperation wiped again under layer memory module flash block, improves the erasing effect of flash block.
In one embodiment, it is equipped with memory module in flash block to identify, sudden strain of a muscle can not be remembered to solve flash memory particle itself The problem of memory module of counterfoil.By the memory module of flash block from multilayered memory pattern switching be single layer memory module after, Main control chip updates the memory module mark of the flash block, and the memory module of flash block is recorded by memory module mark, real It is existing storage pattern identification and memory module it is consistent.
In one embodiment, main control chip is when detecting that solid state hard disk powers on, judge the memory module of flash block with The memory module of flash block identifies whether unanimously, if inconsistent, the memory module of flash block is switched to memory module mark pair The memory module answered, to carry out mould to flash block in time when the memory module of flash block is restored suddenly to multilayer memory module Formula switching, avoids the data stored under single layer memory module under multilayered memory mode to flash block from operating, and improves and dodges The effect of counterfoil pattern switching.
In one embodiment, main control chip judges flash block when detecting that the predetermined registration operation in flash block is completed The memory module of memory module and flash block identifies whether unanimously, if inconsistent, the memory module of flash block is switched to storage The corresponding memory module of pattern identification, thus when the memory module of flash block is restored suddenly to multilayer memory module in time to sudden strain of a muscle Counterfoil carries out pattern switching, and the data stored under single layer memory module under multilayered memory mode to flash block is avoided to grasp Make, improves the effect of flash block pattern switching.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated The step of a kind of block processing method of the solid state hard disk provided in the various embodiments described above is provided when machine program is executed by processor.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of block processing method of solid state hard disk, which is characterized in that the described method includes:
Count the erasable number of each flash block in multilayered memory unit area;
Whether the erasable number for judging the flash block is more than preset threshold;
When the erasable number of the flash block is more than the threshold value, preset pattern switching instruction is triggered;
The pattern switching instruction is executed, the memory module of the flash block is switched to single layer memory module;
Predetermined registration operation is carried out to the flash block under the single layer memory module.
2. the method according to claim 1, wherein after the triggering preset pattern switching instruction, institute Before stating the step of memory module of the flash block is switched to single layer memory module, the method also includes:
It detects in the flash block with the presence or absence of valid data;
When, there are when valid data, the valid data being migrated to the multilayered memory unit area in the flash block In other flash blocks;
Erasing operation is carried out to the flash block after valid data has been migrated.
3. method according to claim 2, which is characterized in that described the step of carrying out erasing operation to the flash block, packet It includes:
The flash block is tentatively wiped with the multilayered memory mode;
It is described in the single layer memory module after the memory module by the flash block is switched to single layer memory module Under to the flash block carry out predetermined registration operation the step of before, the method also includes:
The flash block after memory module switching is wiped again with the single layer memory module.
4. the method according to claim 1, wherein described carry out the flash block under single layer memory module The step of predetermined registration operation, comprising:
Read operation, write operation and/or erasing operation are carried out to the flash block with single layer memory module.
5. the method according to claim 1, wherein being switched to list in the memory module by the flash block After layer memory module, before described the step of carrying out predetermined registration operation to the flash block under the single layer memory module, institute State method further include:
Update the memory module mark of the flash block;
The method also includes:
When detecting that solid state hard disk powers on, the memory module of the memory module and the flash block that judge the flash block is identified It is whether consistent;
When the memory module of the memory module of the flash block and flash block mark is inconsistent, by depositing for the flash block Storing up pattern switching is that the memory module identifies corresponding memory module.
6. according to the method described in claim 5, it is characterized in that, described carry out the flash block under single layer memory module After the step of predetermined registration operation, the method also includes:
When detecting that the predetermined registration operation is completed, the memory module of the flash block and the memory module of the flash block are judged It identifies whether consistent;
When the memory module of the memory module of the flash block and flash block mark is inconsistent, by depositing for the flash block Storing up pattern switching is the corresponding memory module of memory module mark.
7. a kind of block processing unit of solid state hard disk, which is characterized in that described device includes:
Number statistical module, for counting each piece in multilayered memory unit area of erasable number;
Number judgment module, for judging whether the erasable number of the flash block is more than preset threshold;
Instruction triggers module, for triggering preset pattern switching when the erasable number of the flash block is more than the threshold value Instruction;
Mode switch module is used for execution pattern switching command, and the memory module of the flash block is switched to single layer storage mould Formula;And
Flash block operation module, for carrying out predetermined registration operation to the flash block under the single layer memory module.
8. a kind of solid state hard disk, the solid state hard disk includes main control chip and flash memory, and the main control chip includes processor, described Flash memory storage has computer program, which is characterized in that the processor realized when executing the computer program claim 1 to The step of any one of 6 the method.
9. a kind of solid state hard disk characterized by comprising
Flash memory, the flash memory include multiple flash blocks, for storing data and are instructed;
Main control chip is attached, for counting each flash block in multilayered memory unit area by bus with the flash memory Erasable number judges whether the erasable number of the flash block is more than preset threshold, when the erasable number of the flash block is more than When the threshold value, preset pattern switching instruction is triggered, the pattern switching instruction is executed, by the memory module of the flash block It is switched to single layer memory module, predetermined registration operation is carried out to the flash block under the single layer memory module.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claims 1 to 6 is realized when being executed by processor.
CN201910492020.8A 2019-06-06 2019-06-06 Block processing method, device, solid state hard disk and the storage medium of solid state hard disk Pending CN110399094A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910492020.8A CN110399094A (en) 2019-06-06 2019-06-06 Block processing method, device, solid state hard disk and the storage medium of solid state hard disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910492020.8A CN110399094A (en) 2019-06-06 2019-06-06 Block processing method, device, solid state hard disk and the storage medium of solid state hard disk

Publications (1)

Publication Number Publication Date
CN110399094A true CN110399094A (en) 2019-11-01

Family

ID=68323133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910492020.8A Pending CN110399094A (en) 2019-06-06 2019-06-06 Block processing method, device, solid state hard disk and the storage medium of solid state hard disk

Country Status (1)

Country Link
CN (1) CN110399094A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111273864A (en) * 2020-01-17 2020-06-12 济南浪潮高新科技投资发展有限公司 Method and system for reducing NAND FLASH erasing times
CN111309642A (en) * 2020-02-12 2020-06-19 合肥康芯威存储技术有限公司 Memory, control method thereof and memory system
CN112346664A (en) * 2020-11-30 2021-02-09 湖南国科微电子股份有限公司 Data storage method, device, equipment and medium
CN113360092A (en) * 2021-05-17 2021-09-07 维沃移动通信有限公司 Data storage method, data storage device and electronic equipment
WO2021196956A1 (en) * 2020-03-30 2021-10-07 华为技术有限公司 Solid-state drive management method and solid-state drive
CN113707206A (en) * 2021-05-17 2021-11-26 深圳市国微电子有限公司 Data protection method and device of FLASH memory, electronic equipment and storage medium
CN113821090A (en) * 2020-06-18 2021-12-21 宏碁股份有限公司 Solid state disk and operation method thereof
CN113918091A (en) * 2021-09-13 2022-01-11 北京得瑞领新科技有限公司 Control method and device for physical block in NAND flash memory and SSD (solid State disk) equipment

Citations (5)

* 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
US20150293809A1 (en) * 2014-04-10 2015-10-15 Phison Electronics Corp. Data storing method, memory control circuit unit and memory storage apparatus
JP2018063624A (en) * 2016-10-14 2018-04-19 京セラドキュメントソリューションズ株式会社 Memory system and image forming apparatus
US9971537B1 (en) * 2016-10-26 2018-05-15 Pure Storage, Inc. Hardware support to track and transition flash LUNs into SLC mode
CN109471594A (en) * 2018-10-09 2019-03-15 华中科技大学 A kind of MLC flash reading/writing method

Patent Citations (5)

* 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
US20150293809A1 (en) * 2014-04-10 2015-10-15 Phison Electronics Corp. Data storing method, memory control circuit unit and memory storage apparatus
JP2018063624A (en) * 2016-10-14 2018-04-19 京セラドキュメントソリューションズ株式会社 Memory system and image forming apparatus
US9971537B1 (en) * 2016-10-26 2018-05-15 Pure Storage, Inc. Hardware support to track and transition flash LUNs into SLC mode
CN109471594A (en) * 2018-10-09 2019-03-15 华中科技大学 A kind of MLC flash reading/writing method

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111273864A (en) * 2020-01-17 2020-06-12 济南浪潮高新科技投资发展有限公司 Method and system for reducing NAND FLASH erasing times
CN111273864B (en) * 2020-01-17 2023-08-08 山东浪潮科学研究院有限公司 Method and system for reducing NAND FLASH erasing times
CN111309642B (en) * 2020-02-12 2023-08-08 合肥康芯威存储技术有限公司 Memory, control method thereof and memory system
CN111309642A (en) * 2020-02-12 2020-06-19 合肥康芯威存储技术有限公司 Memory, control method thereof and memory system
WO2021196956A1 (en) * 2020-03-30 2021-10-07 华为技术有限公司 Solid-state drive management method and solid-state drive
CN113821090B (en) * 2020-06-18 2023-08-22 宏碁股份有限公司 Solid state disk and operation method thereof
CN113821090A (en) * 2020-06-18 2021-12-21 宏碁股份有限公司 Solid state disk and operation method thereof
CN112346664A (en) * 2020-11-30 2021-02-09 湖南国科微电子股份有限公司 Data storage method, device, equipment and medium
CN113360092A (en) * 2021-05-17 2021-09-07 维沃移动通信有限公司 Data storage method, data storage device and electronic equipment
WO2022242640A1 (en) * 2021-05-17 2022-11-24 维沃移动通信有限公司 Data storage method, data storage apparatus, and electronic device
CN113707206A (en) * 2021-05-17 2021-11-26 深圳市国微电子有限公司 Data protection method and device of FLASH memory, electronic equipment and storage medium
CN113707206B (en) * 2021-05-17 2024-03-22 深圳市国微电子有限公司 Data protection method and device of FLASH memory, electronic equipment and storage medium
CN113918091B (en) * 2021-09-13 2022-06-07 北京得瑞领新科技有限公司 Control method and device for physical block in NAND flash memory and SSD (solid State disk) equipment
CN113918091A (en) * 2021-09-13 2022-01-11 北京得瑞领新科技有限公司 Control method and device for physical block in NAND flash memory and SSD (solid State disk) equipment

Similar Documents

Publication Publication Date Title
CN110399094A (en) Block processing method, device, solid state hard disk and the storage medium of solid state hard disk
CN101770428B (en) Method for operating non-volatile memory and data storage system using the same
US11630583B2 (en) Operating parameters for non-volatile memory devices
CN107608908B (en) Wear leveling method for data storage device
TWI420303B (en) Method, non-transistory computer readable medium and apparatus for writing data to different portions of memory based on write frequency
US9355022B2 (en) Systems and methods for intelligent flash management
EP3588259B1 (en) Garbage collection method for storage media, storage medium, and program product
US7246268B2 (en) Method and apparatus for dynamic degradation detection
CN107247636B (en) Method and device for data reconstruction optimization in solid state disk
CN106776095B (en) Intelligent detection method and detection device for data reliability of SSD (solid State disk)
KR101996072B1 (en) Wear management for flash memory devices
US20110173484A1 (en) Solid-state mass storage device and method for failure anticipation
US20070208904A1 (en) Wear leveling method and apparatus for nonvolatile memory
EP3200085A1 (en) Data saving method and device and terminal
US10162561B2 (en) Managing backup of logical-to-physical translation information to control boot-time and write amplification
US20140359198A1 (en) Notification of storage device performance to host
JP2011070346A (en) Memory system
CN107515731B (en) Evolution storage system based on solid-state disk and working method thereof
CN108877863B (en) Flash memory storage device and operation method thereof
TW201618113A (en) Data storage device and flash memory control method
CN110660442A (en) High-temperature application method and system of NOR FLASH
KR20110001914A (en) Method and apparatus for dealing with write errors when writing information data into flash memory devices
CN115202579A (en) Memory data storage method and system
JP2013097575A (en) Semiconductor disk lifetime monitoring device
JP2013200919A (en) Nonvolatile semiconductor memory device and control method thereof

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

Effective date of registration: 20210222

Address after: 310053 room 512, building 2, 2930 South Ring Road, Puyan street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Zhejiang Dahua Technology Co.,Ltd.

Address before: No. 1187 Bin'an Road, Binjiang District, Hangzhou, Zhejiang Province

Applicant before: ZHEJIANG DAHUA TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 1202, Floor 12, Building 3, No. 126, Yueda Lane, Changhe Street, Binjiang District, Hangzhou City, Zhejiang Province, 310051

Applicant after: Zhejiang Huayi Core Technology Co.,Ltd.

Address before: 310053 room 512, building 2, 2930 South Ring Road, Puyan street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant before: Zhejiang Dahua Technology Co.,Ltd.

RJ01 Rejection of invention patent application after publication

Application publication date: 20191101