CN103823640B - A kind of high efficiency storage method of flash storage - Google Patents
A kind of high efficiency storage method of flash storage Download PDFInfo
- Publication number
- CN103823640B CN103823640B CN201410074367.8A CN201410074367A CN103823640B CN 103823640 B CN103823640 B CN 103823640B CN 201410074367 A CN201410074367 A CN 201410074367A CN 103823640 B CN103823640 B CN 103823640B
- Authority
- CN
- China
- Prior art keywords
- data
- page
- buffering
- address
- buffer stopper
- 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.)
- Active
Links
Abstract
A kind of high efficiency storage method of flash storage of the present invention, belong to the technical field of the date storage method of flash storage;The technical problem of solution is:There is provided it is a kind of data volume is small and data storage number more frequently in the case of, the high efficiency storage method of the higher flash storage of the storage efficiency of memory can be made;The technical scheme used for:A kind of high efficiency storage method of flash storage, flash storage is divided into different data storage areas in units of block, each data storage areas is divided into multiple buffer stoppers and multiple data blocks again, wherein, each buffer stopper is divided into multiple buffering pages again, each data block is divided into multiple data pages again, after data are received, first write data into the buffering page of buffer stopper in corresponding data storage areas, when buffering page writes Man Houzai by the data page of the data storage of this page to data block;Suitable for fire-fighting field of data storage.
Description
Technical field
A kind of high efficiency storage method of flash storage of the present invention, belongs to the date storage method of flash storage
Technical field.
Background technology
Now, flash storage, either in civilian, industrial or military industry field, is obtained for as main flow memory
Substantial amounts of application, the mode that flash storage carries out data storage at present mainly have two kinds, and one kind is that data are deposited with file system
The mode of storage, another kind are data in the way of physical block and page store, and the storage of file system is entered by least unit of cluster
The storage of row data, it is the storage that data are carried out using page as least unit by physical block and page;
Data volume is smaller and data storage number more frequently in the case of, often write a data(Such as several bytes), extremely
A cluster is taken less(Minimum 4KB)Or one page(Minimum 512 bytes)So that the utilization rate of flash storage is significantly
Reduce, reduce the storage efficiency and service life of flash storage;In addition, flash storage is according to traditional storage method
During data storage, want to write data into page, after one page page is write completely, just all can together store to storage and remember
Device is recorded, in the event of the situation of accident power-off, then newest data will not be preserved in time, cause shortage of data, especially
For fire-fighting domain, the missing of fire-fighting data will cause can not reducing for fire-fighting scene, to enterprises and institutions and police service portion
Door brings greatly inconvenience and loss.
The content of the invention
The present invention overcomes the shortcomings of the prior art, and technical problem to be solved is:There is provided a kind of small in data volume
With data storage number more frequently in the case of, the high efficiency of the higher flash storage of the storage efficiency of memory can be made
Storage method.
In order to solve the above-mentioned technical problem, the technical solution adopted by the present invention is:A kind of high efficiency of flash storage is deposited
Method for storing, flash storage is divided into different data storage areas in units of block, then each data storage areas is equal
Multiple buffer stoppers and multiple data blocks are divided into, wherein, each buffer stopper is divided into multiple buffering pages again, and each data block is divided into again
Multiple data pages, after data are received, first write data into the buffering page of buffer stopper in corresponding data storage areas, when
Buffering page writes Man Houzai by the data page of the data storage of this page to data block, specifically includes following steps:
(1.1)Receive data;
(1.2)Write data into the buffering page of buffer stopper;
(1.3)Judge whether the buffering page of buffer stopper is write completely;
(1.4)It is as full in write, then into step(1.5), otherwise, into step(1.8);
(1.5)Deposited after the previous buffering page data of the buffer stopper newly created is added into new data to the data page of data block;
Judge whether the remaining empty caching number of blocks of buffer stopper is more than or equal to 2, such as less than 2, then into step(1.6), otherwise, into step
(1.7);
(1.6)Erasing is not the content of empty buffer stopper, and caching block address is changed into initial value(Caching block address is put
0), buffer page address and set to 0, data page address+1, be then back to step(1.1);
(1.7)Block address+2 is buffered, buffering page address is set to 0, and data page address+1, is then back to step(1.1);
(1.8)Deposited after the previous buffering page data of buffer stopper is added into new data to buffering corresponding to next buffer stopper
Page, page address+1 is buffered, finally returns to step(1.1).
Step(1.8)In, deposited after the previous buffering page data of buffer stopper is added into new data to next buffer stopper, buffering
After page address+1, first judge whether Current buffer page is the last page of buffer stopper, if so, then backing up last buffering page
Content, then check whether remaining empty caching number of blocks is more than or equal to 2, by the caching of occupancy if quantity is less than 2
Block is unified to be cleared up, and caching block address is changed into initial value(Caching block address is set to 0), buffer page address and set to 0, data page address+
1, then Backup Data is preserved to the first page of buffering block address 0, buffering page address and set to 0, finally just return to step(1.1),
Otherwise,)Block address+2 is buffered, buffering page address is set to 0, data page address+1, direct return to step(1.1).Step(1.7)In,
Buffering block address+1, buffering page address are set to 0, after data page address+1, first judge whether the data page of data block is write completely, such as
Write completely, then by ability return to step after data block address+1(1.1), otherwise, direct return to step(1.1).One data storage area
In domain, the previous logical address and latter logical address of the logical address of a data block be different buffer stoppers logically
Location, the previous logical address and latter logical address of the logical address of a buffer stopper are the logical address of different pieces of information block.
The present invention has the advantages that compared with prior art:
1st, the storage method in the present invention employs the mode stored in time to data, first will storage in units of block
Device is divided into different data storage areas, stores different types of data in different data storage areas, then by each number
It is divided into two types according to the block in storage region:Data block and buffer stopper, and be divided into page by each piece, i.e. data block includes more
Individual data page, buffer stopper include multiple buffering pages, after data are received, first write data into corresponding data storage areas
The buffering page of buffer stopper, if preserved data in buffering page and the buffering page do not write it is full, by newest data together with
Data before write in a new buffering page together, if the buffering page write it is full, by newest data together with before
Data preserve into the data page of data block together, and in this case, the utilization rate and storage efficiency of flash storage carry significantly
Height, even if accident power-off, the total data of newest discontented one page can also be found in newest page, both ensure that data
Integrality, security, also improve the service life of memory.
2nd, the storage method in the present invention employs the mode that dynamically distributes are carried out to memory block, a data storage areas
In, the previous logical address and latter logical address of the logical address of a data block are the logical address of different buffer stoppers,
The previous logical address and latter logical address of the logical address of one buffer stopper are the logical address of different pieces of information block, that is, are counted
It is always adjacent according to the logical address of block and the logical address of buffer stopper, if data block is last of currently stored region
Block, then first piece of currently stored region is pointed in the address of buffer stopper, if data block is first piece of currently stored region,
So address of buffer stopper points to second piece of currently stored region, and this mode has been averaged the service life of all memory blocks,
Extend the Acceptable life of memory.
Brief description of the drawings
The present invention will be further described in detail below in conjunction with the accompanying drawings.
Fig. 1 is flow chart of the method for the present invention.
Embodiment
Flash storage, is divided into different numbers by a kind of high efficiency storage method of flash storage in units of block
Multiple buffer stoppers and multiple data blocks are divided into according to storage region, then by each data storage areas, wherein, each buffer stopper
It is divided into multiple buffering pages again, each data block is divided into multiple data pages again, after data are received, first writes data into corresponding
In data storage areas in the buffering page of buffer stopper, when buffering page writes Man Houzai by the data of the data storage of this page to data block
In page, as shown in figure 1, specifically including following steps:
(1.1)Receive data;
(1.2)Write data into the buffering page of buffer stopper;
(1.3)Judge whether the buffering page of buffer stopper is write completely;
(1.4)It is as full in write, then into step(1.5), otherwise, into step(1.8);
(1.5)Deposited after the previous buffering page data of the buffer stopper newly created is added into new data to the data page of data block;
Judge whether the remaining empty caching number of blocks of buffer stopper is more than or equal to 2, such as less than 2, then into step(1.6), otherwise, into step
(1.7);
(1.6)Erasing is not the content of empty buffer stopper, and caching block address is changed into initial value(Caching block address is put
0), buffer page address and set to 0, data page address+1, be then back to step(1.1);
(1.7)Block address+2 is buffered, buffering page address is set to 0, and data page address+1, is then back to step(1.1);
(1.8)Deposited after the previous buffering page data of buffer stopper is added into new data to buffering corresponding to next buffer stopper
Page, page address+1 is buffered, finally returns to step(1.1).
Step(1.8)In, deposited after the previous buffering page data of buffer stopper is added into new data to next buffer stopper, buffering
After page address+1, first judge whether Current buffer page is the last page of buffer stopper, if so, then backing up last buffering page
Content, then check whether remaining empty caching number of blocks is more than or equal to 2, by the caching of occupancy if quantity is less than 2
Block is unified to be cleared up, and caching block address is changed into initial value(Caching block address is set to 0), buffer page address and set to 0, data page address+
1, then Backup Data is preserved to the first page of buffering block address 0, buffering page address and set to 0, finally just return to step(1.1),
Otherwise,)Block address+2 is buffered, buffering page address is set to 0, data page address+1, direct return to step(1.1).
Specifically, step(1.7)In, buffering block address+1, buffering page address are set to 0, after data page address+1, are first judged
It is full whether the data page of data block is write, and has such as write completely, then by ability return to step after data block address+1(1.1), otherwise, directly return
Return step(1.1).
Specifically, in a data storage areas, the previous logical address of the logical address of a data block and latter patrol
Volume address is the logical address of different buffer stoppers, the previous logical address of the logical address of a buffer stopper and it is latter logically
Location is the logical address of different pieces of information block.
In one data storage areas, the previous logical address and latter logical address of the logical address of a data block are equal
For the logical address of different buffer stoppers, the previous logical address and latter logical address of the logical address of a buffer stopper are not
With the logical address of data block, i.e., the logical address of each data block and the logical address of each buffer stopper are always adjacent, false
Last block such as currently stored region is data block, then first piece of currently stored region is buffer stopper, if currently deposit
First piece of storage area domain is data block, then second piece of currently stored region is buffer stopper.
Usually, the utilization rate of memory module(R)The space-consuming of=effective memory space/reality, when data volume is smaller
With data storage number it is more frequent when, by traditional file system storage mode and the present invention in storage method timely storage skill
Art is contrasted, and by taking one page 32KB as an example, is stored the information of 32 bytes every time, Coutinuous store 1500 times, can be obtained following
Table 1:
Be not difficult to find out from table 1, data volume is small and data storage number more frequently in the case of, storage side in the present invention
The timely memory technology of method is significantly better than the storage mode of file system in memory module utilization rate.
And memory module Acceptable life=(Total page number in total block data × storage region in storage region)/(2 × storage
The effective access times of module), it is known that, the Acceptable life of memory module and effective access times of memory module are inversely proportional,
After the timing of memory module size one, the memory block dynamically distributes technology using storage method in the present invention, effectively reduce
The access times of memory module, the Acceptable life of memory module is extended, reached the mesh for improving memory service efficiency
's.
A kind of high efficiency storage method of flash storage of the present invention, by test, demonstrating it has extension storage mould
The effect of the service life of block, the storage efficiency of raising memory module, has prominent substantive distinguishing features and significant progress;On
Face is explained in detail with reference to accompanying drawing to the present invention, but the present invention is not limited to above-described embodiment, it is noted that in this area
, can also various changes can be made on the premise of present inventive concept is not departed from those of ordinary skill's possessed knowledge.
Claims (3)
- A kind of 1. high efficiency storage method of Flash memories, it is characterised in that:Flash memories are drawn in units of blockIt is divided into different data storage areas, then each data storage areas is divided into multiple buffer stoppers and multiple data Block, itsIn, in a data storage areas, the previous logical address and latter logical address of the logical address of a data block are equal For notWith the logical address of buffer stopper, the previous logical address and latter logical address of the logical address of a buffer stopper are not With numberAccording to the logical address of block, each buffer stopper is divided into multiple buffering pages again, and each data block is divided into multiple data pages again, when connecing After receiving new data, first write new data into the buffering page of buffer stopper in corresponding data storage areas, when buffering page is write completely Specifically include following steps by the data page of the data storage of this page to data block again afterwards:(1.1)Receive data;(1.2)Write data into the buffering page of buffer stopper;(1.3)Judge whether the buffering page of buffer stopper is write completely;(1.4)It is as full in write, then into step(1.5), otherwise, into step(1.8);(1.5)Deposited after the previous buffering page data of buffer stopper is added into new data to the data page of data block;(1.6)Wipe the content of whole buffer stopper;(1.7)Block address+1 is buffered, buffering page address is set to 0, and data page address+1, is then back to step(1.1);(1.8)Deposited after the previous buffering page data of buffer stopper is added into new data to Current buffer page, buffer page address+1, finallyReturn to step(1.1).
- A kind of 2. high efficiency storage method of Flash memories according to claim 1, it is characterised in that:Step(1.8)In, deposited after the previous buffering page data of buffer stopper is added into new data to Current buffer page, buffering page address+1 Afterwards, first judge whether Current buffer page is the last page of buffer stopper, if so, the content of last buffering page is then backed up, And the content of whole buffer stopper is wiped, then Backup Data is preserved to the first page of new buffer stopper, buffering page address and put 0, last just return to step(1.1), otherwise, direct return to step(1.1).
- A kind of 3. high efficiency storage method of Flash memories according to claim 1, it is characterised in that:Step(1.7)In, buffering block address+1, buffering page address are set to 0, after data page address+1, first judge the data page of data block Whether write completely, such as write completely, then by ability return to step after data block address+1(1.1), otherwise, direct return to step(1.1).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410074367.8A CN103823640B (en) | 2014-03-03 | 2014-03-03 | A kind of high efficiency storage method of flash storage |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410074367.8A CN103823640B (en) | 2014-03-03 | 2014-03-03 | A kind of high efficiency storage method of flash storage |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103823640A CN103823640A (en) | 2014-05-28 |
CN103823640B true CN103823640B (en) | 2017-12-01 |
Family
ID=50758730
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410074367.8A Active CN103823640B (en) | 2014-03-03 | 2014-03-03 | A kind of high efficiency storage method of flash storage |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103823640B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103823766B (en) * | 2014-03-03 | 2017-03-22 | 山西科泰航天防务技术股份有限公司 | high-efficiency storage method of Flash memory |
CN107967121B (en) * | 2017-10-25 | 2020-04-14 | 华为技术有限公司 | Data writing method and storage device |
CN108446077A (en) * | 2018-03-21 | 2018-08-24 | 华立科技股份有限公司 | Electric energy meter communication data storage method, device and electric energy meter |
CN112162936B (en) * | 2020-09-30 | 2023-06-30 | 武汉天喻信息产业股份有限公司 | Method and system for dynamically enhancing FLASH erasing times |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102306124A (en) * | 2011-08-01 | 2012-01-04 | 深圳市文鼎创数据科技有限公司 | Method for implementing hardware driver layer of Nand Flash chip |
US8219764B2 (en) * | 2006-11-20 | 2012-07-10 | Siliconmotion Inc. | System and apparatus for enhancing data storage efficiency of a flash memory by reducing time for reorganizing data |
CN103425596A (en) * | 2012-05-18 | 2013-12-04 | 慧荣科技股份有限公司 | Data storage device and method for flash block management |
-
2014
- 2014-03-03 CN CN201410074367.8A patent/CN103823640B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8219764B2 (en) * | 2006-11-20 | 2012-07-10 | Siliconmotion Inc. | System and apparatus for enhancing data storage efficiency of a flash memory by reducing time for reorganizing data |
CN102306124A (en) * | 2011-08-01 | 2012-01-04 | 深圳市文鼎创数据科技有限公司 | Method for implementing hardware driver layer of Nand Flash chip |
CN103425596A (en) * | 2012-05-18 | 2013-12-04 | 慧荣科技股份有限公司 | Data storage device and method for flash block management |
Also Published As
Publication number | Publication date |
---|---|
CN103823640A (en) | 2014-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104636285B (en) | A kind of flash-memory storage system and read-write thereof, delet method | |
CN103823640B (en) | A kind of high efficiency storage method of flash storage | |
CN104317742B (en) | Automatic thin-provisioning method for optimizing space management | |
CN106708427A (en) | Storage method suitable for key value pair data | |
CN102981963B (en) | A kind of implementation method of flash translation layer (FTL) of solid-state disk | |
CN103473150B (en) | A kind of fragment rewrite method in data deduplication system | |
CN104238962B (en) | The method and device of data is write into caching | |
CN102158349B (en) | A kind of log management apparatus and method | |
CN103885728A (en) | Magnetic disk cache system based on solid-state disk | |
CN104156317A (en) | Wiping and writing management method and system for non-volatile flash memory | |
CN102521269A (en) | Index-based computer continuous data protection method | |
CN103823766B (en) | high-efficiency storage method of Flash memory | |
CN102147768B (en) | Memory, solid caching system and caching data processing method | |
CN105930097B (en) | The distribution of small write operation verifies formula disk array in a kind of elimination local parallel | |
CN105389376B (en) | Fragmentation-free multimedia data storage method and system based on continuous blocks | |
CN103164528B (en) | A kind of index establishing method of audio, video data | |
CN110196818A (en) | Data cached method, buffer memory device and storage system | |
CN104050057B (en) | Historical sensed data duplicate removal fragment eliminating method and system | |
CN109815005A (en) | A kind of method, apparatus and storage system of managing internal memory | |
CN103544124B (en) | The access method of Nand flash storages | |
CN102999441A (en) | Fine granularity memory access method | |
CN104965793B (en) | A kind of cloud storage data node device | |
CN105183868A (en) | Storage method and device for logs of file system | |
CN101594201B (en) | Method for integrally filtering error data in linked queue management structure | |
US20130254511A1 (en) | Improving Storage Lifetime Using Data Swapping |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 030006 Taiyuan province high tech Zone, digital road, No. 3, No. Applicant after: KOTEL SPACEFLIGHT DEFENSE TECHNOLOGY CO., LTD., SHANXI Address before: 030006 No. 3, digital road, hi tech Development Zone, Shanxi, Taiyuan, China Applicant before: Ketai Microtechnology Co., Ltd., Shanxi Prov. |
|
COR | Change of bibliographic data | ||
GR01 | Patent grant | ||
GR01 | Patent grant |