CN106909512A - The application method and system of storage device - Google Patents
The application method and system of storage device Download PDFInfo
- Publication number
- CN106909512A CN106909512A CN201510979983.2A CN201510979983A CN106909512A CN 106909512 A CN106909512 A CN 106909512A CN 201510979983 A CN201510979983 A CN 201510979983A CN 106909512 A CN106909512 A CN 106909512A
- Authority
- CN
- China
- Prior art keywords
- page
- allocation index
- data
- erasable
- read
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0238—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
- G06F12/0246—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1032—Reliability improvement, data loss prevention, degraded operation etc
- G06F2212/1036—Life time enhancement
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention relates to the application method and system of a kind of storage device.The described method comprises the following steps:Allocation index and erasable counting how many times position are obtained after power-up initializing;Erasable counting how many times position is increased by 1;Judge new erasable counting how many times position whether less than erasable frequency threshold value;If so, then by data and new erasable counting how many times position update to the page corresponding to the allocation index neutralize the allocation index add 1 corresponding to page in;If it is not, erasable counting how many times position then is entered as into 1, judge whether the allocation index subtracts 2 less than total page number, if so, then the allocation index is added 2, as new allocation index, if it is not, the allocation index is then entered as 2, as new allocation index;And by data and erasable counting how many times position update to the page corresponding to the new allocation index neutralize the new allocation index add 1 corresponding to page in, and the new allocation index is updated to zero page and first page.Extend the service life of storage device.
Description
Technical field
The present invention relates to storage device management field, the application method of more particularly to a kind of storage device and it is
System.
Background technology
Storage device may include FLASH, SD (Secure Digital Memory Card, secure digital storage
Card) card etc..By taking FLASH as an example, FLASH is one kind of internal memory, but has RAM (Random-Access concurrently
Memory, random access devices) and ROM (read-only memory, read only memory devices) advantage,
It is that one kind can carry out electric erasable, the memory that information is not lost after power down in system.Traditional FLASH makes
In, data storage is in data FLASH regions.It is first right to be needed when writing data toward data FLASH regions
Data FLASH is wiped in region, then writes the data to data FLASH regions.But data FLASH
There is certain erasable number of times in region, when data FLASH regions Zhong Moukuai regions it is erasable more than certain number of times after,
This block region will be damaged can not be reused, it is necessary to change chip, shorten the service life of storage device.
The content of the invention
Based on this, it is necessary to frequently contracted more than number of times by erasable certain data area for traditional storage device
A kind of short problem of the service life of storage device, there is provided application method of storage device, can extend storage
The service life of equipment.
Additionally, there is a need to the use system for providing a kind of storage device, the use longevity of storage device can be extended
Life.
A kind of application method of storage device, comprises the following steps:
Allocation index and erasable counting how many times position are obtained after power-up initializing;
When the data in the page for updating storage device, erasable counting how many times position is increased by 1 and obtains new erasable
Counting how many times position;
Judge new erasable counting how many times position whether less than erasable frequency threshold value;
If new erasable counting how many times position is less than erasable frequency threshold value, by data and new erasable counting how many times
Position is updated to the page neutralization allocation index corresponding to the allocation index in the page corresponding to adding 1;
If new erasable counting how many times position is not less than erasable frequency threshold value, erasable counting how many times position is entered as
1, and wipe the data in the page corresponding to the allocation index and the allocation index plus 1 corresponding to page in
Data, then judge whether the allocation index subtracts 2 less than total page number, if so, then adding the allocation index
2, as new allocation index, if it is not, the allocation index is then entered as 2, as new allocation index;
And data and erasable counting how many times position are updated described new to the page neutralization corresponding to the new allocation index
Allocation index add 1 corresponding to page in, and the new allocation index is updated to zero page and first page.
A kind of use system of storage device, including:
Acquisition module, for obtaining allocation index and erasable counting how many times position after power-up initializing;
From increase module, for when update storage device page in data when, by erasable counting how many times position increase by 1
Obtain new erasable counting how many times position;
Judge module, for judging new erasable counting how many times position whether less than erasable frequency threshold value;
First update module, if being less than erasable frequency threshold value for new erasable counting how many times position, by data
The page updated corresponding to the allocation index with new erasable counting how many times position neutralizes the allocation index and adds 1
In corresponding page;
Second update module, if being not less than erasable frequency threshold value for new erasable counting how many times position, will wipe
Write counting how many times position and be entered as 1, and wipe the data in the page corresponding to the allocation index and the address rope
Draw the data in the page corresponding to Jia 1, then judge whether the allocation index subtracts 2 less than total page number, if so,
Then the allocation index is added 2, as new allocation index, if it is not, the allocation index is then entered as 2,
As new allocation index, and data and erasable counting how many times position are updated to the new allocation index institute
Corresponding page neutralize the new allocation index add 1 corresponding to page in, and by the new allocation index more
Newly to zero page and first page.
The application method and system of above-mentioned storage device, obtain allocation index and erasable counting how many times position, update
During data, erasable counting how many times position is increased by 1, by judging erasable counting how many times position whether less than erasable number of times
Threshold value, if being less than, data and new erasable counting how many times position is updated in the corresponding page of allocation index,
If erasable counting how many times position is not less than erasable frequency threshold value, erasable counting how many times position is entered as 1, then judge
Allocation index whether the value for subtracting 2 less than total page number, if so, after then adding 2 by allocation index, by data and wiping
Counting how many times position is write to update in the page corresponding to new allocation index, if it is not, allocation index is then entered as 2,
Data and erasable counting how many times position are updated in the page corresponding to new allocation index, by by erasable number of times
When reaching erasable frequency threshold value, data are updated to other pages, so reuse different data pages, kept away
Exempted from it is each it is erasable cause this page of erasable number of times to reach maximum erasable number of times and damage for same one page, extend
The service life of storage device.
Brief description of the drawings
Fig. 1 is the flow chart of the application method of storage device in one embodiment;
Fig. 2 is the schematic diagram of the initial address of each paging of storage device in one embodiment;
Fig. 3 is the particular flow sheet of the power-up initializing step in one embodiment;
Fig. 4 is the structured flowchart of the use system of storage device in one embodiment;
Fig. 5 is the structured flowchart of the use system of storage device in another embodiment;
Fig. 6 is the structured flowchart of the use system of storage device in another embodiment.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, below in conjunction with accompanying drawing and reality
Example is applied, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only
Only it is used to explain the present invention, is not intended to limit the present invention.
It is appreciated that term " first " used in the present invention, " second " etc. can be used to describe herein
Various elements, but these elements should not be limited by these terms.These terms be only used for by first element with it is another
One element is distinguished.For example, without departing from the scope of the invention, can be by the first client
End is referred to as the second client, and similarly, the second client can be referred to as into the first client.
Fig. 1 is the flow chart of the application method of storage device in one embodiment.As shown in figure 1, one kind is deposited
The application method of storage equipment, comprises the following steps:
Step 102, obtains allocation index and erasable counting how many times position after power-up initializing.
In the present embodiment, step 102 includes:Power-up initializing reads zero page, obtains ground from the zero page
Location is indexed, then obtains the page corresponding to the allocation index, and erasing times meter digital is read from the page.
First, the data area to storage device carries out paging treatment, obtains multiple pagings.Such as storage sets
Standby is FLASH.The space size in data FLASH regions is 4KB, and erasure unit is 512 bytes, with
512 bytes are one page, then data FLASH regions can be divided into page 8 (4 × 1024/512=8).Data
The initial address of FLASH is 0x01_F000, and termination address is 0x01_FFFF.As shown in Fig. 2 the 0th
The initial address of page Zero page is 0x01_F000, and the initial address of first page First page is
The initial address of 0x01_F200, second page Second page is 0x01_F400, the Third page of page three
Initial address be 0x01_F600, page four initial address of Fourth page is 0x01_F800, page five
The initial address of Fifth page is 0x01_FA00, and the initial address of Six page of page six is 0x01_FC00,
The initial address of Seventh page of page seven is 0x01_FE00.
Allocation index Addr_index is the page for searching current data storage, and allocation index is stored the 0th
In page (i.e. in Zero-page).In order to prevent damage and the loss of data, by the data backup in zero page
To in first page.
The storage of data is also carried out backup, and the data of data page where current data are backuped into current data institute
In lower one page of data page, in page 2, then backup data store is in page 3 for such as data storage.It is erasable
The storage of counting how many times position for indicating this page of erasable number of times, is updated the data, erasable number of times every time in every page
Meter digital Count also and then updates.
The initial address of each page can be deposited using an array, facilitates subsequent calls.Such as Uint32_t
PAGE_ADDR [8]=0x01_F000,0x01_F200,0x01_F400,0x01_F600,0x01_F800,
0x01_FA00,0x01_FC00,0x01_FE00 }.
Step 104, when the data in the page for updating storage device, increases by erasable counting how many times position 1 and obtains
New erasable counting how many times position.
Specifically, during data in each refresh page, the erasable counting how many times position of this page increases by 1 time, obtains
New erasable counting how many times position.
Whether step 106, judge new erasable counting how many times position less than erasable frequency threshold value, if so, then performing
Step 108, if it is not, then performing step 110.
Specifically, erasable frequency threshold value determines as needed, such as can be that 512 times or 300 are inferior.
When new erasable counting how many times position is judged less than erasable frequency threshold value, then by data and new erasable time
Counting number position update to the page corresponding to allocation index neutralize the allocation index plus 1 corresponding to page in.
Allocation index add 1 corresponding to page be backed-up pages to data in the page corresponding to allocation index.
When the erasable counting how many times position for judging new is not less than erasable frequency threshold value, then the allocation index will be wiped
Data in corresponding page and the allocation index add 1 corresponding to page in data.
Step 108, data and new erasable counting how many times position are updated to the page corresponding to the allocation index and neutralized
The allocation index add 1 corresponding to page in, terminate.
Specifically, data and new erasable counting how many times position Count are updated the page corresponding to allocation index
PAGE_ADDR [Addr_index] neutralize allocation index add 1 corresponding to page
In PAGE_ADDR [Addr_index+1].
Step 110,1 is entered as by erasable counting how many times position, and wipes the page corresponding to the allocation index
Data and the allocation index add 1 corresponding to page in data, then perform step 112.
Specifically, the data and ground in the page PAGE_ADDR [Addr_index] corresponding to erasing allocation index
Location indexes the data in the page PAGE_ADDR [Addr_index+1] corresponding to Jia 1.
Step 112, judges whether the allocation index subtracts 2 less than total page number, if so, step 114 is then performed,
If it is not, then performing step 116.
Specifically, total page number refers to total number of pages that storage device divided after paging treatment.Address rope
Draw corresponding page for total page number subtract 2 page when, represent each page erasable counting how many times position reached it is erasable
Frequency threshold value, it is necessary to again repeating query to data page homepage (i.e. page 2), i.e., allocation index be 2 corresponding to
Page, carry out data renewal.
Step 114, adds 2 by the allocation index, as new allocation index, then performs step 118.
Step 116,2 are entered as by the allocation index, as new allocation index, then perform step 118.
Allocation index is corresponded with page.When such as allocation index is 2, its corresponding page is second page.
Step 118, data and erasable counting how many times position are updated to the page corresponding to the new allocation index and neutralized
The new allocation index add 1 corresponding to page in.
Specifically, data and erasable counting how many times position Count are updated to PAGE_ADDR [Addr_index]
In in address and PAGE_ADDR [Addr_index+1] address.
Step 120, the new allocation index is updated to zero page and first page.
Specifically, new allocation index is updated to zero page, i.e. in PAGE_ADDR [0], while also more
Newly arrive in first page PAGE_ADDR [1].
The application method of above-mentioned storage device, obtains allocation index and erasable counting how many times position, when updating the data,
Erasable counting how many times position is increased by 1, by whether judging erasable counting how many times position less than erasable frequency threshold value, if
It is less than, then updates in the corresponding page of allocation index data and new erasable counting how many times position, if erasable time
Counting number position is not less than erasable frequency threshold value, then erasable counting how many times position is entered as into 1, then judge allocation index
Whether the value for subtracting 2 less than total page number, if so, after then adding 2 by allocation index, by data and erasable number of times meter
Numerical digit is updated in the page corresponding to new allocation index, if it is not, allocation index is then entered as 2, by data
Updated in the page corresponding to new allocation index with erasable counting how many times position, wiping is reached by by erasable number of times
When writing frequency threshold value, data are updated to other pages, so reuse different data pages, it is to avoid be every
It is secondary it is erasable cause this page of erasable number of times to reach maximum erasable number of times and damage for same one page, extend storage
The service life of equipment.
Assuming that there is 6 page datas page, it is divided into original data page and Backup Data page, the erasable maximum of page per page data
Number of times be 100,000 times, if every time carried out just for same data page it is erasable, then erasable 100,000 times afterwards this
Data page will be damaged, and must be changed chip or be recompiled erasable to unspoiled data page.And use
The application method of above-mentioned storage device, carries out repeating query and uses, and the erasable frequency threshold value of every page data page is (such as
512 times) other data page will be moved down into afterwards, different data pages are so reused, per page data
Page is all erasable 100,000 times, calculates and understands that erasable number of times is original three times, is 300,000 times.
In one embodiment, the application method of above-mentioned storage device also includes:By the data in the zero page
Backup is in first page.
The step of allocation index and erasable counting how many times position are obtained after the power-up initializing includes:Power-up initializing
Zero page or first page are read, allocation index is obtained from the zero page or first page, then obtain the address rope
Draw corresponding page, erasing times meter digital is read from the page.
Specifically, allocation index is obtained from zero page or first page, because of data phase in zero page and first page
Together.
Fig. 3 is that the power-up initializing reads zero page or first page in one embodiment, from the zero page or the
Allocation index is obtained in one page, then obtains the page corresponding to the allocation index, erasing times are read from the page
The particular flow sheet of the step of meter digital.As shown in figure 3, power-up initializing reads zero page or first page,
Allocation index is obtained from the zero page or first page, then obtains the page corresponding to the allocation index, from the page
The step of middle reading erasing times meter digital, includes:
Step 302, power-up initializing reads zero page, and allocation index is read from the zero page.
Specifically, zero page PAGE_ADDR [0] address acquisition allocation index is read after power-up initializing
Addr_index。
Step 304, judges to read whether allocation index succeeds, if so, step 312 is then performed, if it is not, holding
Row step 306.
Specifically, when allocation index failure is read from zero page, then from first page PAGE_ADDR [1]
Read allocation index Addr_index in location.
Step 306, allocation index is read from first page, then performs step 308.
Step 308, judges to read whether allocation index succeeds, if so, step 310 is performed, if it is not, terminating.
Step 310, the data of the first page are updated the data of zero page, then perform step 312.
Specifically, allocation index success is read from first page, data are not damaged in representing first page, can be by the
The data of one page update the data of zero page.
Step 312, reads the erasing times meter digital in the page corresponding to the allocation index, then performs step
314。
Specifically, the erasing times in the page PAGE_ADDR [Addr_index] corresponding to allocation index are read
Meter digital Count.
Step 314, judges to read whether erasing times meter digital succeeds, if so, terminate, if it is not, performing step
Rapid 316.
Step 316, read the allocation index plus 1 corresponding to page in erasing times meter digital.
Specifically, read allocation index add 1 corresponding to page PAGE_ADDR [Addr_index+1] in wiping
Except counting how many times position Count.
Step 318, judges to read whether erasing times meter digital succeeds, if so, step 320 is performed, if it is not,
Terminate.
Step 320, the allocation index is added 1 corresponding to page in data update corresponding to the allocation index
Data in page.
Above-mentioned power-up initializing obtains allocation index, is failed by obtaining allocation index in zero page, then the
One page obtains allocation index, and the data of zero page are backed up by first page, can improve allocation index and obtain
The probability for taking.
Fig. 4 is the structured flowchart of the use system of storage device in one embodiment.As shown in figure 4, a kind of
The use system of storage device, including acquisition module 410, from increase module 420, judge module 430, first
The update module 450 of update module 440 and second.Wherein:
Acquisition module 410 obtains allocation index and erasable counting how many times position after being used for power-up initializing.
In the present embodiment, acquisition module 410 is additionally operable to power-up initializing and reads zero page, is obtained from the zero page
Allocation index is taken, then obtains the page corresponding to the allocation index, erasing times meter digital is read from the page.
It is used to during when the data in the page for updating storage device, erasable counting how many times position be increased from module 420 is increased
Plus 1 and obtain new erasable counting how many times position.
Whether judge module 430 is used to judge new erasable counting how many times position less than erasable frequency threshold value.
If the first update module 440 is used for new erasable counting how many times position is less than erasable frequency threshold value, by number
The allocation index plus 1 institute are neutralized according to the page updated corresponding to the allocation index with new erasable counting how many times position
In corresponding page.
If the second update module 450 is used for new erasable counting how many times position is not less than erasable frequency threshold value, will
Erasable counting how many times position is entered as 1, and wipes the data in the page corresponding to the allocation index and the allocation index
The data in page corresponding to plus 1, then judge whether the allocation index subtracts 2 less than total page number, if so, then will
The allocation index adds 2, as new allocation index, if it is not, the allocation index is then entered as 2, as new
Allocation index, and data and erasable counting how many times position are updated to the page corresponding to the new allocation index
Neutralize the new allocation index plus 1 corresponding to page in, and the new allocation index is updated to zero page and
First page.
The use system of above-mentioned storage device, obtains allocation index and erasable counting how many times position, when updating the data,
Erasable counting how many times position is increased by 1, by whether judging erasable counting how many times position less than erasable frequency threshold value, if
It is less than, then updates in the corresponding page of allocation index data and new erasable counting how many times position, if erasable time
Counting number position is not less than erasable frequency threshold value, then erasable counting how many times position is entered as into 1, then judge allocation index
Whether the value for subtracting 2 less than total page number, if so, after then adding 2 by allocation index, by data and erasable number of times meter
Numerical digit is updated in the page corresponding to new allocation index, if it is not, allocation index is then entered as 2, by data
Updated in the page corresponding to new allocation index with erasable counting how many times position, wiping is reached by by erasable number of times
When writing frequency threshold value, data are updated to other pages, so reuse different data pages, it is to avoid be every
It is secondary it is erasable cause this page of erasable number of times to reach maximum erasable number of times and damage for same one page, extend storage
The service life of equipment.
Fig. 5 is the structured flowchart of the use system of storage device in another embodiment.As shown in figure 5, one
The use system of kind of storage device, except including acquisition module 410, from increase module 420, judge module 430,
First update module 440 and the second update module 450, also including backup module 460.Wherein:
Backup module 460 is used for the data backup in the zero page in first page.
Acquisition module 410 is additionally operable to power-up initializing and reads zero page or first page, from the zero page or first
Allocation index is obtained in page, then obtains the page corresponding to the allocation index, erasing times meter is read from the page
Numerical digit.
In the present embodiment, acquisition module 410 is additionally operable to power-up initializing and reads zero page, reads from the zero page
Allocation index is taken, judges to read whether allocation index succeeds;
If reading allocation index success from the zero page, the wiping in the page corresponding to the allocation index is read
Except counting how many times position, judge read erasing times meter digital whether succeed, if reading erasing times meter digital into
Work(, then terminate, if reading the failure of erasing times meter digitals, read the allocation index plus 1 corresponding to page
In erasing times meter digital, then judge read erasing times meter digital whether succeed, if read erasing times
Meter digital success, then the allocation index is added 1 corresponding to page in data update corresponding to the allocation index
Page in data, if reading the failure of erasing times meter digitals, terminate;
If reading allocation index failure from the zero page, allocation index is read from first page, judge to read
Whether allocation index succeeds, if so, the data of the first page then to be updated the data of zero page, reads the ground
Erasing times meter digital in the corresponding page of location index, judges to read whether erasing times meter digital succeeds,
If reading the success of erasing times meter digital, terminate, if reading the failure of erasing times meter digital, reading should
Allocation index add 1 corresponding to page in erasing times meter digital, then judge read erasing times meter digital be
No success, if reading the success of erasing times meter digitals, the allocation index is added 1 corresponding to page in number
According to the data in the page updated corresponding to the allocation index, if reading the failure of erasing times meter digital, terminate.
Fig. 6 is the structured flowchart of the use system of storage device in another embodiment.As shown in figure 5, one
The use system of kind of storage device, except including acquisition module 410, from increase module 420, judge module 430,
First update module 440 and the second update module 450, also including pagination module 470.Wherein:
Pagination module 470 is used to for the data area of storage device to carry out paging treatment.
In other embodiments, the use system of storage device may include acquisition module 410, from increase module 420,
Judge module 430, the first update module 440, the second update module 450, backup module 460 and paging mould
Any possible combination in block 470.
One of ordinary skill in the art will appreciate that all or part of flow in realizing above-described embodiment method,
Computer program be can be by instruct the hardware of correlation to complete, it is non-easy that described program can be stored in one
In the property lost computer read/write memory medium, the program is upon execution, it may include such as the implementation of above-mentioned each method
The flow of example.Wherein, described storage medium can be magnetic disc, CD, read-only memory (Read-Only
Memory, ROM) etc..
Embodiment described above only expresses several embodiments of the invention, and its description is more specific and detailed,
But therefore can not be interpreted as the limitation to the scope of the claims of the present invention.It should be pointed out that for this area
Those of ordinary skill for, without departing from the inventive concept of the premise, can also make it is some deformation and
Improve, these belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be with appended
Claim is defined.
Claims (10)
1. a kind of application method of storage device, it is characterised in that comprise the following steps:
Allocation index and erasable counting how many times position are obtained after power-up initializing;
When the data in the page for updating storage device, erasable counting how many times position is increased by 1 and obtains new erasable
Counting how many times position;
Judge new erasable counting how many times position whether less than erasable frequency threshold value;
If new erasable counting how many times position is less than erasable frequency threshold value, by data and new erasable counting how many times
Position is updated to the page neutralization allocation index corresponding to the allocation index in the page corresponding to adding 1;
If new erasable counting how many times position is not less than erasable frequency threshold value, erasable counting how many times position is entered as
1, and wipe the data in the page corresponding to the allocation index and the allocation index plus 1 corresponding to page in
Data, then judge whether the allocation index subtracts 2 less than total page number, if so, then adding the allocation index
2, as new allocation index, if it is not, the allocation index is then entered as 2, as new allocation index;
And data and erasable counting how many times position are updated described new to the page neutralization corresponding to the new allocation index
Allocation index add 1 corresponding to page in, and the new allocation index is updated to zero page and first page.
2. the application method of storage device according to claim 1, it is characterised in that the upper electricity is just
The step of allocation index and erasable counting how many times position are obtained after beginningization includes:
Power-up initializing reads zero page, obtains allocation index from the zero page, then obtain the address rope
Draw corresponding page, erasing times meter digital is read from the page.
3. the application method of storage device according to claim 1, it is characterised in that methods described is also
Including:By the data backup in the zero page in first page;
The step of allocation index and erasable counting how many times position are obtained after the power-up initializing includes:
Power-up initializing reads zero page or first page, and allocation index is obtained from the zero page or first page,
The page corresponding to the allocation index is obtained again, and erasing times meter digital is read from the page.
4. the application method of storage device according to claim 3, it is characterised in that the upper electricity is just
Beginningization reads zero page or first page, allocation index is obtained from the zero page or first page, then obtain institute
The page corresponding to allocation index is stated, is included the step of reading erasing times meter digital from the page:
Power-up initializing reads zero page, and allocation index is read from the zero page, judges to read allocation index
Whether succeed;
If reading allocation index success from the zero page, in reading the page corresponding to the allocation index
Erasing times meter digital, judge read erasing times meter digital whether succeed, if read erasing times count
Position success, then terminate, if reading the failure of erasing times meter digitals, reads the allocation index and plus 1 institute is right
Erasing times meter digital in the page answered, then judge to read whether erasing times meter digital succeeds, if read wiping
Except the success of counting how many times position, then the allocation index is added 1 corresponding to page in data update the address
Data in the corresponding page of index, if reading the failure of erasing times meter digital, terminate;
If reading allocation index failure from the zero page, allocation index is read from first page, judge to read
Take whether allocation index succeeds, if so, the data of the first page then to be updated the data of zero page, read
Whether erasing times meter digital in page corresponding to the allocation index, judges read erasing times meter digital
Success, if reading the success of erasing times meter digital, terminates, if reading the failure of erasing times meter digital,
Read the allocation index plus 1 corresponding to page in erasing times meter digital, then judge read erasing times
Whether meter digital succeeds, if reading the success of erasing times meter digitals, the allocation index is added 1 corresponding to
Page in data update data in the page corresponding to the allocation index, if reading erasing times meter digital
Failure, then terminate.
5. the application method of storage device according to claim 1, it is characterised in that methods described is also
Including:
The data area of storage device is carried out into paging treatment.
6. the use system of a kind of storage device, it is characterised in that including:
Acquisition module, for obtaining allocation index and erasable counting how many times position after power-up initializing;
From increase module, for when update storage device page in data when, by erasable counting how many times position increase by 1
Obtain new erasable counting how many times position;
Judge module, for judging new erasable counting how many times position whether less than erasable frequency threshold value;
First update module, if being less than erasable frequency threshold value for new erasable counting how many times position, by data
The page updated corresponding to the allocation index with new erasable counting how many times position neutralizes the allocation index and adds 1
In corresponding page;
Second update module, if being not less than erasable frequency threshold value for new erasable counting how many times position, will wipe
Write counting how many times position and be entered as 1, and wipe the data in the page corresponding to the allocation index and the address rope
Draw the data in the page corresponding to Jia 1, then judge whether the allocation index subtracts 2 less than total page number, if so,
Then the allocation index is added 2, as new allocation index, if it is not, the allocation index is then entered as 2,
As new allocation index, and data and erasable counting how many times position are updated to the new allocation index institute
Corresponding page neutralize the new allocation index add 1 corresponding to page in, and by the new allocation index more
Newly to zero page and first page.
7. the use system of storage device according to claim 6, it is characterised in that the acquisition mould
Block is additionally operable to power-up initializing and reads zero page, obtains allocation index from the zero page, then obtain describedly
The corresponding page of location index, reads erasing times meter digital from the page.
8. the use system of storage device according to claim 6, it is characterised in that the system is also
Including:
Backup module, for by the data backup in the zero page in first page;
The acquisition module is additionally operable to power-up initializing and reads zero page or first page, from the zero page or the
Allocation index is obtained in one page, then obtains the page corresponding to the allocation index, erasing is read from the page
Counting how many times position.
9. the use system of storage device according to claim 8, it is characterised in that the acquisition mould
Block is additionally operable to power-up initializing and reads zero page, and allocation index is read from the zero page, judges to read address
Whether index succeeds;
If reading allocation index success from the zero page, in reading the page corresponding to the allocation index
Erasing times meter digital, judge read erasing times meter digital whether succeed, if read erasing times count
Position success, then terminate, if reading the failure of erasing times meter digitals, reads the allocation index and plus 1 institute is right
Erasing times meter digital in the page answered, then judge to read whether erasing times meter digital succeeds, if read wiping
Except the success of counting how many times position, then the allocation index is added 1 corresponding to page in data update the address
Data in the corresponding page of index, if reading the failure of erasing times meter digital, terminate;
If reading allocation index failure from the zero page, allocation index is read from first page, judge to read
Take whether allocation index succeeds, if so, the data of the first page then to be updated the data of zero page, read
Whether erasing times meter digital in page corresponding to the allocation index, judges read erasing times meter digital
Success, if reading the success of erasing times meter digital, terminates, if reading the failure of erasing times meter digital,
Read the allocation index plus 1 corresponding to page in erasing times meter digital, then judge read erasing times
Whether meter digital succeeds, if reading the success of erasing times meter digitals, the allocation index is added 1 corresponding to
Page in data update data in the page corresponding to the allocation index, if reading erasing times meter digital
Failure, then terminate.
10. the use system of storage device according to claim 6, it is characterised in that the system
Also include:
Pagination module, for the data area of storage device to be carried out into paging treatment.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510979983.2A CN106909512B (en) | 2015-12-23 | 2015-12-23 | Storage device using method and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510979983.2A CN106909512B (en) | 2015-12-23 | 2015-12-23 | Storage device using method and system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN106909512A true CN106909512A (en) | 2017-06-30 |
| CN106909512B CN106909512B (en) | 2021-08-13 |
Family
ID=59200537
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510979983.2A Active CN106909512B (en) | 2015-12-23 | 2015-12-23 | Storage device using method and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106909512B (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107863127A (en) * | 2017-10-31 | 2018-03-30 | 杭州迪普科技股份有限公司 | A kind of storage device memory cell selecting method and device |
| CN108334279A (en) * | 2017-12-26 | 2018-07-27 | 金卡智能集团股份有限公司 | Data read-write method based on load-sharing mode |
| CN112233715A (en) * | 2019-07-15 | 2021-01-15 | 美光科技公司 | Maintenance operations for memory systems |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102135942A (en) * | 2010-12-31 | 2011-07-27 | 北京握奇数据系统有限公司 | Method for realizing wear-leveling in storage equipment as well as the storage equipment |
| US20110258369A1 (en) * | 2010-04-16 | 2011-10-20 | Silicon Motion, Inc. | Data Writing Method and Data Storage Device |
| CN102394114A (en) * | 2011-11-14 | 2012-03-28 | 清华大学 | BCH code error correction method capable of adaptive error correction |
| US20130013874A1 (en) * | 2011-07-08 | 2013-01-10 | Goetz Graefe | Data store page recovery |
| CN103064792A (en) * | 2012-12-26 | 2013-04-24 | 北京创毅讯联科技股份有限公司 | Method and device for writing data |
| KR20130111057A (en) * | 2012-03-30 | 2013-10-10 | 유비벨록스(주) | Method for managing flash based memory |
| CN103514101A (en) * | 2012-06-18 | 2014-01-15 | 慧荣科技股份有限公司 | Method for accessing flash memory and related memory device |
| CN103914393A (en) * | 2014-04-11 | 2014-07-09 | 四川华拓光通信股份有限公司 | MCU-based (microprogrammed control unit-based) non-loss FLASH storage update method |
| CN104111897A (en) * | 2013-04-16 | 2014-10-22 | 华为技术有限公司 | Data processing method, data processing device and computer system |
-
2015
- 2015-12-23 CN CN201510979983.2A patent/CN106909512B/en active Active
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110258369A1 (en) * | 2010-04-16 | 2011-10-20 | Silicon Motion, Inc. | Data Writing Method and Data Storage Device |
| CN102135942A (en) * | 2010-12-31 | 2011-07-27 | 北京握奇数据系统有限公司 | Method for realizing wear-leveling in storage equipment as well as the storage equipment |
| US20130013874A1 (en) * | 2011-07-08 | 2013-01-10 | Goetz Graefe | Data store page recovery |
| CN102394114A (en) * | 2011-11-14 | 2012-03-28 | 清华大学 | BCH code error correction method capable of adaptive error correction |
| KR20130111057A (en) * | 2012-03-30 | 2013-10-10 | 유비벨록스(주) | Method for managing flash based memory |
| CN103514101A (en) * | 2012-06-18 | 2014-01-15 | 慧荣科技股份有限公司 | Method for accessing flash memory and related memory device |
| CN103064792A (en) * | 2012-12-26 | 2013-04-24 | 北京创毅讯联科技股份有限公司 | Method and device for writing data |
| CN104111897A (en) * | 2013-04-16 | 2014-10-22 | 华为技术有限公司 | Data processing method, data processing device and computer system |
| CN103914393A (en) * | 2014-04-11 | 2014-07-09 | 四川华拓光通信股份有限公司 | MCU-based (microprogrammed control unit-based) non-loss FLASH storage update method |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107863127A (en) * | 2017-10-31 | 2018-03-30 | 杭州迪普科技股份有限公司 | A kind of storage device memory cell selecting method and device |
| CN108334279A (en) * | 2017-12-26 | 2018-07-27 | 金卡智能集团股份有限公司 | Data read-write method based on load-sharing mode |
| CN108334279B (en) * | 2017-12-26 | 2021-04-06 | 金卡智能集团股份有限公司 | Data reading and writing method based on load balancing mode |
| CN112233715A (en) * | 2019-07-15 | 2021-01-15 | 美光科技公司 | Maintenance operations for memory systems |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106909512B (en) | 2021-08-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9355028B2 (en) | Data-storage device and flash memory control method | |
| CN109783017B (en) | Method, device and storage device for processing bad block of storage device | |
| CN105760199B (en) | A kind of application resource loading method and its equipment | |
| CN111324303B (en) | SSD garbage recycling method, SSD garbage recycling device, computer equipment and storage medium | |
| CN105224478A (en) | A kind of formation of mapping table, renewal and restoration methods and electronic equipment | |
| CN101526927B (en) | Data processing method and data processing device of Flash file system | |
| CN109976669B (en) | Edge storage method, device and storage medium | |
| US9213634B2 (en) | Efficient reuse of segments in nonoverwrite storage systems | |
| KR20150095781A (en) | Memory recycling method and device | |
| EP3196767B1 (en) | Method for writing data into flash memory device, flash memory device and storage system | |
| CN109918234B (en) | A kind of metadata recovery method, device, device and medium based on SSD | |
| CN108475230A (en) | A storage system and system garbage collection method | |
| CN115495025B (en) | Method and device for managing abnormal memory block | |
| CN104933051A (en) | File storage space recovery method and device | |
| CN106909512A (en) | The application method and system of storage device | |
| US11385967B2 (en) | Method for managing backup data by having space recycling operations on executed backup data blocks | |
| CN111880745A (en) | Data processing method, device and equipment based on solid-state disk array and storage medium | |
| CN108053034A (en) | Model parameter processing method, device, electronic equipment and storage medium | |
| CN107678686B (en) | Method for realizing FTL function of flash memory based on hardware and data storage device thereof | |
| CN104408126B (en) | A kind of persistence wiring method of database, device and system | |
| CN107391030A (en) | Date storage method, device, computer-readable recording medium and computer equipment | |
| JP2007220107A (en) | Apparatus and method for managing mapping information of nonvolatile memory | |
| CN110688065A (en) | Storage space management method, system, electronic equipment and storage medium | |
| CN112905496A (en) | Garbage recycling method and device, readable storage medium and electronic equipment | |
| CN108228340B (en) | Terminal control method and device, terminal equipment and computer readable storage medium |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20230710 Address after: B2, Floor 20, Yanxiang Science and Technology Building, No. 31, Gaoxin Middle Fourth Road, Maling Community, Yuehai Street, Nanshan District, Shenzhen, Guangdong 518057 Patentee after: Shenzhen Jiuniuyimao Intelligent Internet of Things Technology Co.,Ltd. Address before: 518107 5th floor, No.1, Yanxiang Zhigu chuangxiangdi, No.11, Gaoxin Road, Guangming New District, Shenzhen City, Guangdong Province Patentee before: EVOC INTELLIGENT TECHNOLOGY Co.,Ltd. |