The content of the invention
In view of this, the main purpose of the embodiment of the present invention is to provide a kind of date storage method and device, Neng Gouti
High storage speed, saves carrying cost.
To reach above-mentioned purpose, the technical proposal of the invention is realized in this way:
A kind of date storage method provided by the invention, applied to the mixing for including at least two Nand flash storages
Solid state hard disc, each Nand flash storages include some pieces, the described method includes:
In garbage collection procedure, block described in selected section is as recycling block;
When the mobile number of the recycling active page in the block reaches the first carrying threshold value, the active page is carried to
In Nand flash storages than current Nand flash storage short lifes.
It is preferred that the method further includes:
When the mobile number for recycling active page in the block is not up to the first carrying threshold value but reaches the second carrying threshold value, and
When the utilization rate of current Nand flash storages reaches preset value, the active page is carried to than current Nand
In the Nand flash storages of flash storage short life.
It is preferred that the method further includes:
When the mobile number for recycling active page in the block is not up to second threshold, the active page is moved to current
In non-recycled piece of Nand flash storages, and the mobile number of the active page is weighted.
It is preferred that the method further includes:
The mobile number of the page of overriding is subtracted into power.
It is preferred that the method further includes:
The data preserved for the first time are stored in and are lasted a long time and idleness meets that the Nand Flash of default storage threshold value are deposited
In reservoir.
A kind of hybrid solid-state hard disk provided by the invention, the hybrid solid-state hard disk is including flash translation layer (FTL) FTL and at least
Two kinds of Nand flash storages, each Nand flash storages include some pieces;Wherein,
The flash translation layer (FTL) FTL, in garbage collection procedure, block described in selected section to be as recycling block;Work as institute
State when recycling the mobile number of active page in the block and reaching the first carrying threshold value, the active page is carried to than current Nand
In the Nand flash storages of flash storage short life.
It is preferred that the flash translation layer (FTL) FTL, is additionally operable to when the mobile number for recycling active page in the block is not up to first
Carry threshold value but when reaching the second carrying threshold value, and when the utilization rate of current Nand flash storages reaches preset value, will
The active page is carried in the Nand flash storages than current Nand flash storage short lifes.
It is preferred that the flash translation layer (FTL) FTL, is additionally operable to when the mobile number for recycling active page in the block is not up to second
During threshold value, the active page is moved in non-recycled piece of current Nand flash storages, and by the active page
Mobile number weighting.
It is preferred that the flash translation layer (FTL) FTL, is additionally operable to the mobile number of the page of overriding subtracting power.
It is preferred that the flash translation layer (FTL) FTL, the data for being additionally operable to preserve for the first time, which are stored in, to be lasted a long time and idleness
In the Nand flash storages for meeting default storage threshold value.
From the foregoing, it will be observed that the technical solution of the embodiment of the present invention includes:The method is applied to include at least two Nand
The hybrid solid-state hard disk of flash storage, each Nand flash storages include some pieces, the described method includes:In rubbish
In rubbish removal process, block described in selected section is as recycling block;When the mobile number of recycling active page in the block reaches the
During one carrying threshold value, the active page is carried to the Nand Flash storages than current Nand flash storage short lifes
In device.Thus, the data by will infrequently be operated in garbage collection procedure(Cold data)It is carried to than current Nand
In the Nand flash storages of flash storage short life, so both the free time goes out the good memory space of performance(Of high cost, appearance
Measure small, long lifespan Nand flash storages), and take full advantage of the memory space of poor-performing(Cost is low, capacity is big,
The Nand flash storages of short life), and storage speed can be improved, save carrying cost.
Embodiment
The first embodiment of date storage method provided by the invention, stores applied to including at least two Nand Flash
The hybrid solid-state hard disk of device, each Nand flash storages include some pieces;As shown in Figure 1, the described method includes:
Step 101, in garbage collection procedure, described in selected section block as recycling block.
Step 102, when the mobile number of recycling active page in the block reaches the first carrying threshold value, will be described effective
Page is carried in the Nand flash storages than current Nand flash storage short lifes.
Thus, the present embodiment utilizes the data that will infrequently be operated in garbage collection procedure(What is do not changed
In the case of the more more data infrequently operated of allochthonous number)It is carried to than the current Nand flash storage longevity
Order in short Nand flash storages, so both the free time goes out the good memory space of performance(It is of high cost, capacity is small, long lifespan
Nand flash storages), and take full advantage of the memory space of poor-performing(Cost is low, capacity is big, the Nand of short life
Flash storage), and storage speed can be improved, save carrying cost.
The second embodiment of date storage method provided by the invention, stores applied to including at least two Nand Flash
The hybrid solid-state hard disk of device, each Nand flash storages include some pieces;As shown in Fig. 2, the described method includes:
Step 201, in garbage collection procedure, described in selected section block as recycling block.
Step 202, when the mobile number for recycling active page in the block is not up to the first carrying threshold value but reaches the second carrying
During threshold value, and when the utilization rate of current Nand flash storages reaches preset value, the active page is carried to than current
Nand flash storage short lifes Nand flash storages in.
Here, the preset value can be set to 80% to 90% grade numerical value, in practical applications, can be according to Nand Flash
The concrete condition of memory is set.
Thus, the present embodiment is when carrying recycling active page in the block, it is also contemplated that current Nand flash storages
Utilization rate, when the mobile number for recycling active page in the block is not up to the first carrying threshold value but reaches the second carrying threshold value, according to
So carry and recycle active page in the block, so can reasonable layout storage data, and then in more reasonable employment hybrid solid-state hard disk
Various Nand flash storages.
The 3rd embodiment of date storage method provided by the invention, stores applied to including at least two Nand Flash
The hybrid solid-state hard disk of device, each Nand flash storages include some pieces;As shown in figure 3, the described method includes:
Step 301, in garbage collection procedure, described in selected section block as recycling block.
Step 302, when the mobile number for recycling active page in the block is not up to second threshold, the active page is moved
Weighted into non-recycled piece of current Nand flash storages, and by the mobile number of the active page.
Thus, the present embodiment is by will be moved into the non-recycled active pages in the block of current Nand flash storages
Mobile number is weighted to count the mobile number of active page, can so obtain the mobile number of accurate active page.
The fourth embodiment of date storage method provided by the invention, stores applied to including at least two Nand Flash
The hybrid solid-state hard disk of device, each Nand flash storages include some pieces;As shown in figure 4, the described method includes:
Step 401, in garbage collection procedure, described in selected section block as recycling block.
Step 402, when the mobile number for recycling active page in the block is not up to second threshold, the active page is moved
Weighted into non-recycled piece of current Nand flash storages, and by the mobile number of the active page.
Step 403, by the mobile number of the page of overriding subtract power.
Here, step 403 is not limited to perform after step 402, is carried out at any time in data handling procedure is stored.
Thus, the present embodiment so can more accurately determine making for page by the way that the mobile number of the page of overriding is subtracted power
Use situation.
5th embodiment of date storage method provided by the invention, stores applied to including at least two Nand Flash
The hybrid solid-state hard disk of device, each Nand flash storages include some pieces;As shown in figure 5, the described method includes:
The data preserved for the first time, be stored in and to last a long time and idleness meets the Nand of default storage threshold value by step 501
In flash storage.
Step 502, in garbage collection procedure, described in selected section block as recycling block.
Step 503, judge when whether the mobile number for recycling active page in the block reaches the first carrying threshold value, when not reaching
When carrying threshold value to first, 504 are entered step;When reaching the first carrying threshold value, 506 are entered step.
Step 504, judge when whether the mobile number for recycling active page in the block reaches the second carrying threshold value, when reaching the
During two carrying threshold values, 505 are entered step;When being not reaching to the second carrying threshold value, 507 are entered step.
Here, described first threshold value is carried more than the second carrying threshold value.
Step 505, judge whether the utilization rate of current Nand flash storages reaches preset value, when reaching preset value
When, enter step 506;When being not reaching to preset value, 507 are entered step.
The active page, is carried to the Nand Flash than current Nand flash storage short lifes by step 506
In memory, terminate this flow.
The active page, be moved in non-recycled piece of current Nand flash storages by step 507, and will described in
The mobile number weighting of active page.
Step 508, by the mobile number of the page of overriding subtract power or clearing.
Here, step 509 is not limited to perform after step 508, is carried out at any time in data handling procedure is stored.
Thus, the data preserved for the first time are stored in by the present embodiment lasts a long time and idleness meets default storage threshold value
In Nand flash storages, the number that storage data are carried can be reduced, and corresponding place is made for different situations
Reason, can reasonable layout storage data, and then various Nand flash storages in more reasonable employment hybrid solid-state hard disk.
The embodiment of hybrid solid-state hard disk provided by the invention, as shown in fig. 6, the hybrid solid-state hard disk turns including flash memory
Layer FTL601 and at least two Nand flash storages 602 are changed, each Nand flash storages 602 include some pieces;
Wherein,
The flash translation layer (FTL) FTL601, in garbage collection procedure, block described in selected section to be as recycling block;When
When the mobile number of the recycling active page in the block reaches the first carrying threshold value, the active page is carried to than current
In the Nand flash storages 602 of 602 short life of Nand flash storages.
In this way, utilize the data that will infrequently be operated in garbage collection procedure(The quilt in the case of not by modification
The more more cold datas of the number moved)It is carried to the Nand Flash than current 602 short life of Nand flash storages
In memory, both it is idle go out the good memory space of performance(It is of high cost, capacity is small, the Nand flash storages of long lifespan), again
Take full advantage of the memory space of poor-performing(Cost is low, capacity is big, the Nand flash storages of short life), and can
Storage speed is improved, saves carrying cost.
Preferably, the flash translation layer (FTL) FTL601, is additionally operable to when the mobile number for recycling active page in the block is not up to
First carrying threshold value but when reaching the second carrying threshold value, and the utilization rate of current Nand flash storages reaches preset value
When, the active page is carried in the Nand flash storages than current Nand flash storage short lifes.
In this way, when carrying recycling active page in the block, it is also contemplated that the utilization rate of current Nand flash storages,
When recycling the mobile number of active page in the block and being not up to the first carrying threshold value but reach the second carrying threshold value, recycling is still carried
Active page in the block, can reasonable layout storage data, and then various Nand in more reasonable employment hybrid solid-state hard disk
Flash storage.
Preferably, the flash translation layer (FTL) FTL601, is additionally operable to when the mobile number for recycling active page in the block is not up to
During second threshold, the active page is moved in non-recycled piece of current Nand flash storages 602, and have described
Imitate the mobile number weighting of page.
In this way, the movement of the non-recycled active page in the block by will be moved into current Nand flash storages 602
Number is weighted to count the mobile number of active page, can obtain the mobile number of accurate active page.
Preferably, the flash translation layer (FTL) FTL601, is additionally operable to the mobile number of the page of overriding subtracting power.
In this way, by the way that the mobile number of the page of overriding is subtracted power, the service condition of page can be more accurately determined.
Preferably, the flash translation layer (FTL) FTL601, the data for being additionally operable to preserve for the first time, which are stored in, to be lasted a long time and empty
Not busy rate meets in the Nand flash storages 602 of default storage threshold value.
Lasted a long time and idleness meets the Nand of default storage threshold value in this way, the data preserved for the first time are stored in
In flash storage 602, the number that storage data are carried can be reduced, and can reasonable layout storage data, and then more close
Reason uses the various Nand flash storages 602 in hybrid solid-state hard disk.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, can pass through it
Its mode is realized.Apparatus embodiments described above are only schematical, for example, the division of the unit, is only
A kind of division of logic function, can have other dividing mode, such as when actually realizing:Multiple units or component can combine, or
Another system is desirably integrated into, or some features can be ignored, or do not perform.In addition, shown or discussed each composition portion
Point mutual coupling or direct-coupling or communication connection can be the INDIRECT COUPLINGs by some interfaces, equipment or unit
Or communication connection, can be electrical, mechanical or other forms.
The above-mentioned unit illustrated as separating component can be or may not be physically separate, be shown as unit
The component shown can be or may not be physical location;Both a place can be located at, multiple network lists can also be distributed to
In member;Partly or entirely unit therein can be selected to realize the purpose of this embodiment scheme according to the actual needs.
In addition, each functional unit in various embodiments of the present invention can be fully integrated into a processing unit, also may be used
To be each unit individually as a unit, can also two or more units integrate in a unit;It is above-mentioned
Integrated unit can both be realized in the form of hardware, can also be realized in the form of hardware adds SFU software functional unit.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through
The relevant hardware of programmed instruction is completed, and foregoing program can be stored in computer read/write memory medium, which exists
During execution, execution the step of including above method embodiment;And foregoing storage medium includes:Movable storage device, read-only deposit
Reservoir(ROM, Read-Only Memory), random access memory(RAM, Random Access Memory), magnetic disc or
CD etc. is various can be with the medium of store program codes.
If alternatively, the above-mentioned integrated unit of the present invention is realized in the form of software function module and is used as independent product
Sale in use, can also be stored in a computer read/write memory medium.Based on such understanding, the present invention is implemented
The part that the technical solution of example substantially in other words contributes the prior art can be embodied in the form of software product,
The computer software product is stored in a storage medium, including some instructions are used so that a computer equipment(Can be with
It is personal computer, server or network equipment etc.)Perform all or part of each embodiment the method for the present invention.
And foregoing storage medium includes:Movable storage device, read-only storage(ROM, Read-Only Memory), arbitrary access deposits
Reservoir(RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained
Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.