CN107391030A - Date storage method, device, computer-readable recording medium and computer equipment - Google Patents
Date storage method, device, computer-readable recording medium and computer equipment Download PDFInfo
- Publication number
- CN107391030A CN107391030A CN201710494335.7A CN201710494335A CN107391030A CN 107391030 A CN107391030 A CN 107391030A CN 201710494335 A CN201710494335 A CN 201710494335A CN 107391030 A CN107391030 A CN 107391030A
- Authority
- CN
- China
- Prior art keywords
- index
- user data
- address
- rom space
- written
- 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; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0616—Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
- Read Only Memory (AREA)
Abstract
The present invention proposes a kind of date storage method and device and computer-readable recording medium and computer equipment, index is stored in ROM Space inside processor, user data is stored in Flash spaces, processor ROM Space and Flash spaces are the storage that user data can be achieved, ROM Space and ram space storage user data are extended out without processor, hardware cost has been saved, particularly with the relatively low product occasion of operation cost, the market competitiveness can be improved;Judge whether the user data to be written write Flash spaces by way of searching and indexing, direct access index carries out user data retrieval, retrieved again without index is copied in RAM, substantially increase recall precision, especially in the product such as IC-card safety-protection system of a large number of users data, advantage becomes apparent;New user data is write into available external address in Flash spaces, improves Flash service life.
Description
Technical field
The present invention relates to field of data storage, more particularly to one kind is in date storage method, device, computer-readable storage
Medium and computer equipment
Background technology
Data storage includes the index storage and the storage of data of data, needs to deposit in the data that some have big quantity
The products application occasion of storage, such as IC-card safety-protection system, for storing the relevant information of subscriber card.
A kind of storage circuit of current data for storing big quantity is to use ARM9 processor chips or performance more
High processor chips, and the hardware plan of Large Copacity RAM memory and ROM memory is extended out, product cost is high.
The content of the invention
Based on this, the present invention proposes a kind of date storage method, device, computer-readable recording medium and computer
Equipment, it is possible to increase the service life of data storage circuitry.
A kind of date storage method, comprises the following steps:
User data to be written is obtained, its index is calculated according to user data to be written;
The index is searched in the inside ROM Space of processor, if described index the inside ROM skies for being not held in processor
Between in, and if in Flash spaces current-user data stored number be less than Flash spaces in default maximum can store user
Data bulk, and if available index entry is found in the ROM Space, in the available index item of the ROM Space
Corresponding first home address writes the index of the user data to be written;
Available first external address in Flash spaces corresponding to the first home address writes the use to be written
User data.
A kind of computer-readable recording medium, is stored thereon with computer program, and the computer program is held by processor
Date storage method as described above is realized during row.
A kind of computer equipment, including memory, processor and storage can be run on a memory and on a processor
Computer program, described date storage method is realized during the computing device described program.
A kind of data storage device, including:
Acquisition and computing module, for obtaining user data to be written, its rope is calculated according to user data to be written
Draw;
Searching modul, the index is searched for the inside ROM Space in processor;
Writing module is indexed, if being not held in for the index in the inside ROM Space of processor, and if Flash
Current-user data stored number, which is less than default maximum, in space can store amount of user data, and if empty in the ROM
Between in find available index entry, then corresponding to the available index item in the ROM Space the first home address write-in described in
The index of user data to be written;
User data writing module, outside available first in Flash spaces corresponding to the first home address
Address writes the user data to be written.
Above-mentioned date storage method and device and computer-readable recording medium and computer equipment, place is stored in by index
ROM Space inside device is managed, user data is stored in Flash spaces, and processor ROM Space and Flash spaces can be achieved to use
The storage of user data, ROM Space and ram space storage user data are extended out without processor, has saved hardware cost, it is especially right
In the relatively low product occasion of operation cost, the market competitiveness can be improved;Judge the use to be written by way of searching and indexing
Whether user data write Flash spaces, and direct access index carries out user data retrieval, without index is copied to
Retrieved again in RAM, substantially increase recall precision, especially the product such as IC-card safety-protection system in a large number of users data
In, advantage becomes apparent;If user data to be written is new user data, current-user data stores in Flash spaces
Quantity, which is less than default maximum in Flash spaces, can store amount of user data, then allows to write new user data to be written,
And new user data is write into available external address in Flash spaces, improve Flash service life.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet of date storage method of the present invention;
Fig. 2 is the structural representation of data storage circuitry in one embodiment;
Fig. 3 is the schematic flow sheet of user data storage method in one embodiment;
Fig. 4 is the schematic flow sheet of user data storage method in a specific embodiment;
Fig. 5 is the schematic flow sheet of user data corresponding to modification index in a specific embodiment;
The structural representation of Fig. 6 memory spaces of flash storage in one embodiment;
Fig. 7 is that the inside ROM Space address for being used to store index in single-chip microcomputer in one embodiment is deposited with Flash
Reservoir is used for the correspondence structural representation for storing the external address of user data;
Fig. 8 is the schematic flow sheet of user data method for deleting in one embodiment.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Referring to Fig. 1, Fig. 1 is a kind of schematic flow sheet of date storage method of the present invention;
Present embodiment, the date storage method, it may include following steps:
S11:User data to be written is obtained, its index is calculated according to user data to be written;
S12:The index is searched in the inside ROM Space of processor;
S13:If the index is not held in the inside ROM Space of processor, and if active user in Flash spaces
Data storage quantity, which is less than default maximum in Flash spaces, can store amount of user data, and if in the ROM Space
Available index entry is found, then the write-in of the first home address is described to be written corresponding to the available index item in the ROM Space
The index of the user data entered;
S14:Available first external address write-in in Flash spaces corresponding to the first home address is described to be written
User data.
Present embodiment, index is stored in ROM Space inside processor, user data is stored in Flash spaces, handles
Device ROM Space and Flash spaces are the storage that user data can be achieved, and extend out ROM Space without processor and ram space is deposited
User data is stored up, hardware cost has been saved, particularly with the relatively low product occasion of operation cost, the market competitiveness can be improved;It is logical
The mode for crossing lookup index judges whether the user data to be written write Flash spaces, and direct access index is used
User data is retrieved, and is retrieved again without index is copied in RAM, recall precision is substantially increased, especially a large amount of
In the product of user data such as IC-card safety-protection system, advantage becomes apparent;If user data to be written is new user data,
Current-user data stored number, which is less than default maximum in Flash spaces, in Flash spaces can store amount of user data,
Then allow to write new user data to be written, and new user data is write into available external address in Flash spaces, improve
Flash service life.
In one embodiment, if not finding available index entry in the ROM Space, by the nothing in ROM Space
Effect index erasing, and the user data corresponding to the invalid index in ROM Space in the Flash spaces is wiped, with
Make possess available index entry in the ROM Space.
The date storage method of the present invention, can be realized in such as Fig. 2 data storage circuitry, and Fig. 2 is an implementation
Data storage circuitry structural representation in example.The data storage circuitry include possess internal ROM Space processor and
Flash storage;The flash storage is used to store user data, and the internal ROM Space is used to store user data
Index;The flash storage can be SPI Flash, i.e. serial FLASH, be connected by spi bus with the processor.Institute
It can be single-chip microcomputer to state processor, concretely C51 single-chip microcomputers, Cortex-M0 microcontrollers, Cortex-M3 microcontrollers or
Cortex-M4 microcontrollers.C51 single-chip microcomputers, Cortex-M0 microcontrollers, Cortex-M3 microcontrollers or Cortex-M4 are micro-
Controller is provided with internal ROM memory spaces, and nothing extends out ROM memory and RAM memory.Wherein, Fig. 2 please be participate in,
The data storage circuitry also includes power module, and makes other modules of the data storage circuitry normal work.
In one embodiment, referring to Fig. 3, after the inside ROM Space of processor searches the index, described
First home address corresponding to the available index item of ROM Space is write before the index of the user data to be written, including
Following steps:
S131:If the index has been stored in the inside ROM Space of processor, obtains and be stored in ROM Space
The index corresponding to the first user data;
S132:If corresponding first user data differs with the user data to be written, will preserve
The index in ROM Space is invalid.
The present embodiment, by the index being stored in ROM Space is invalid will be stored in ROM Space described in
Index is reset, so that the first user data corresponding to the index preserved can not pass through index accesses success.Dynamic modification rope
Draw corresponding user data so that the life-span of data storage circuitry improves.
Fig. 4 is the schematic flow sheet of a specifically date storage method.
In one embodiment, the default maximum in the Flash spaces can store amount of user data less than described
The default maximum in Flash spaces can data storage quantity;First external address is that default maximum can store in Flash spaces
The address of user data is not write in the address of user data.
The present embodiment, it is less than the Flash because the default maximum in the Flash spaces can store amount of user data
The default maximum in space can data storage quantity so that the number of the corresponding user data of dynamic modification index greatly increases.Phase
Compared with flash storage fixed storage mode, flash storage dynamic memory mode is by changing the home address of index not
User data corresponding to disconnected change index, corresponding user data successively correspond to different external address so that flash storage
Service life greatly increase.
In one embodiment, it is in the index of the first home address write-in of the ROM Space:For the number to be written
New index or the index corresponding with the first user data according to establishment.
The modification process of user data corresponding to index is further illustrated below by way of a specific implementation.Refer to figure
5, index 1, index 2, index 3, index 4 write on the address of ROM memory spaces inside processor, accordingly, user data 1, use
User data 2, user data 3, user data 4 are encapsulated as data element form, by taking index 2 as an example, are used corresponding to modification index 2
Before user data, first index 2 is reset from 2 addresses of index, index 2 then is re-write into the inside ROM in figure such as deposits
Store up in the 0xff addresses of first, space, the original corresponding data element 2 of index 2 is still retained in original external address.Will be new
Second user data new data element 2 write in external memory space first 0xff address, wherein, external memory space the
One 0xff address is address corresponding to default idle storage space.
The principle that the service life of flash storage improves is exemplified below.Changing for the flash storage is secondary
Number>=(flash storage maximum can storage data quantity-flash storage maximum can store amount of user data) × Flash is deposited
Reservoir fixed storage mode changes number.
Referring to Fig. 6, flash storage is because user data is also possible to take in the flash storage
Maximum can be used for storing user data storage, i.e., in flash storage, currently stored amount of user data is less than or equal to
Flash storage maximum can store amount of user data, thus can change number be at least (flash storage maximum can store number
Amount of user data can be stored according to amount-flash storage maximum) × flash storage fixed storage mode changes number.
Such as flash storage maximum can storage data quantity can store 50000 data volumes, flash storage can store greatly
Amount of user data is 30000 amount of user data, and flash storage fixed storage mode changes number as 105.Wherein,
Data include user data.
For example, user data will change renewal 10 daily4It is secondary, then flash storage service life>=(50000-
30000)×105÷104÷ 365=548.
During flash storage fixed storage mode, flash storage service life 105÷104=10 days.
It can be seen that method of the date storage method of present embodiment for user data corresponding to dynamic modification index, i.e., one
Individual index successively can correspond to different data respectively, and the different data correspond to different external storage addresses respectively, by
In the presence of idle storage space so that the number of the corresponding user data of dynamic modification index greatly increases.Deposited compared to Flash
Reservoir fixed storage mode, flash storage dynamic memory mode are indexed by the home address and constantly change for changing index
Corresponding user data, corresponding user data successively correspond to different external address so that the service life of flash storage
Greatly increase.Amount of user data is smaller, and flash storage is longer for storing for maximum.
Index as the data for retrieving user data, concretely number, such as to retrieve the user data in IC-card,
The storage address of user data can be obtained by its index, so as to access user data content.The storage address of index and user
The linear corresponding relation of storage address of data, that is, the ground of user data corresponding with indexing can be obtained by obtaining the address of index
Location.In one embodiment, referring to Fig. 7, in Fig. 7, the processor is single-chip microcomputer, and the flash storage is SPI
FLASH memory, index are stored in ROM memory spaces inside single-chip microcomputer, and user data is stored in outside SPI FLASH memories
Memory space, index and user data storage mode is can be by address sequential storage from small to large, each index entry locations
Location and outside FLASH corresponding data element address are linear corresponding relation.It can be deposited by obtaining the ROM inside processor
The initial address that space is used to store index is stored up, obtains the initial address for storing user data, obtains the data length of index
Degree, the mode for obtaining the data length of user data establish the corresponding relation between them.Specifically, each index entry or use
Data length shared by user data is fixed and unanimously, length is 4 multiple, and each index entry takes length should be as far as possible short.Build
Found the corresponding relation of the address and the address for storing user data for storing index.
In one embodiment, outside first in Flash spaces corresponding to the first home address in the ROM Space
Portion address writes the user data to be written, comprises the following steps:
Obtain and be used for the initial address for storing index in ROM Space inside processor, obtain and be used in Flash spaces
The initial address of user data is stored, obtains the data length of the index of the user data to be written, and is obtained to be written
The data length of user data;
The first external address of user data to be written is calculated according to following linear corresponding relation:
The linear corresponding relation is:First external address of user data to be written is equal to the in the ROM Space
One home address subtract for store index initial address after, then divided by first index data length, multiplied by with to be written
The data length of user data, along with the initial address for being used to store user data in Flash spaces.
The present embodiment, the storage address of the index of user data are closed with the storage address of user data into such as lower linear is corresponding
System:The storage address of user data is:The storage address of index subtracts the difference divided by index of the initial address for storing index
Data length, multiplied by with the data length of user data, along with the initial address for storing user data.
Such as it is L that i-th of user data for being encapsulated as data element form, which takes data length, corresponding i-th of index
The data length of occupancy is l, i-th of user data address:
DATA_ELEMENT_ADDR=DATA_ELEMENT_START_ADDR+ ((Data_Index_START_ADDR-
Data_Index_START_ADDR)/l)*L。
Wherein, DATA_ELEMENT_START_ADDR represents the initial address for storing user data, Data_
Index_START_ADDR represents the initial address for storing index, and DATA_ELEMENT_ADDR is i-th of user data institute
In address, Data_Index_START_ADDR is i-th of index address.
In one embodiment, after writing second user data, comprise the following steps:
When the data storage circuitry is in and is not written into user data, whether calculating has currently stored amount of user data
Amount of user data can be stored more than or equal to default maximum, if user data can be stored more than or equal to default maximum
Memory space, then no longer write user data;
In the present embodiment, that is, ensure that the memory space of currently stored user data must not be higher than default maximum and can store use
The memory space of user data, if can store the memory space of user data more than or equal to default maximum, no longer write-in is used
User data;And wipe in the current memory space for having stored user data the corresponding user data of invalid index.To protect
The current amount of user data that stored of card can store amount of user data less than default maximum, to ensure flash memory
Life-span.
In one embodiment, referring to Fig. 8, in Flash spaces corresponding to the first home address available first outside
Portion address is write after the user data to be written, is comprised the following steps:
If the memory space that user data can be currently stored in the Flash spaces is less than preset critical, and does not perform
During user data write operation, then following erasing work twice is at least performed successively:
In the internal ROM memory spaces, since the initial address for storing index in order segment lookup without
Effect index;
Wipe the user data in the flash spaces corresponding to the invalid index found and invalid index;
If also new user data needs to write, index corresponding to new user data is write back to the invalid index institute being wiped free of
ROM Space address, new user data is write back in the flash spaces and is wiped free of user data address;Location
Location is corresponding with the ROM Space address at place.
Sector erasing operation need not be in most cases carried out during due to writing user data (time-consuming for erasing operation).When
Data run into take a substantial amount of time without writeable space when writing performs data erasing operation, therefore should try one's best and avoid this situation
Occur, system is completed when being in idle condition outside available first in Flash spaces corresponding to the first home address
Address is write after the user data to be written, writeable space data quantity is periodically detected, if the quantity is less than certain value
NOT_WR_COUNT_LIMIT then carries out erasing operation.
In one embodiment, the index is searched in the inside ROM Space of processor, is comprised the following steps:
The first index point and the second index point of index address are provided access to according to the index;
The odd number index entry in the ROM Space is traveled through, and travels through the even number index item in the ROM Space, utilizes institute
State the first index point and access odd number index entry in the ROM Space respectively, the rope is searched in the odd number index entry
Draw;And access the even number index item in the ROM Space respectively using second index point, institute is searched in the index
State index.
The present embodiment, index being stored in single-chip microcomputer ROM Space, program directly access index can carry out data retrieval, and
Index need not be copied in RAM and be retrieved again, substantially increase recall precision.
Such as 100 indexes, if traveled through from the first entry index to the 100th entry index, need at most retrieve 100 times.By 100
Individual index is divided into the 1st, 3,599 odd number entry indexs, and the 2nd, 4,6 the 100th even number entry index, is examining
The subcycle of subcycle and the setting traversal even item retrieval of two traversal odd number entry indexs is set simultaneously in Suo Xunhuan, only needed most
It is retrieve 50 times more, required index can be retrieved.Retrieval rate can be doubled.
Specifically, the mode of direct access index can be realized by following program.
A kind of computer-readable recording medium, is stored thereon with computer program, and the computer program is held by processor
Date storage method as described above is realized during row.
A kind of computer equipment, including memory, processor and storage can be run on a memory and on a processor
Computer program, described date storage method is realized during the computing device described program.
A kind of data storage device, including:
Acquisition and computing module, for obtaining user data to be written, its rope is calculated according to user data to be written
Draw;
Searching modul, the index is searched for the inside ROM Space in processor;
Writing module is indexed, if being not held in for the index in the inside ROM Space of processor, and if Flash
Current-user data stored number, which is less than default maximum, in space can store amount of user data, and if empty in the ROM
Between in find available index entry, then corresponding to the available index item in the ROM Space the first home address write-in described in
The index of user data to be written;
User data writing module, outside available first in Flash spaces corresponding to the first home address
Address writes the user data to be written.
Above-mentioned data storage device and computer-readable recording medium and computer equipment, index is stored in processor
Portion's ROM Space, user data are stored in Flash spaces, and user data can be achieved in processor ROM Space and Flash spaces
Storage, without processor extend out ROM Space and ram space storage user data, hardware cost has been saved, particularly with operation
Lower-cost product occasion, can improve the market competitiveness;Judge the user data to be written by way of searching and indexing
Whether Flash space was write, and direct access index carries out user data retrieval, without index is copied in RAM again
Retrieved, substantially increase recall precision, especially in the product such as IC-card safety-protection system of a large number of users data, advantage is more
To be obvious;If user data to be written is new user data, current-user data stored number is less than in Flash spaces
Default maximum can store amount of user data in Flash spaces, then allow to write new user data to be written, and will newly use
Available external address in user data write-in Flash spaces, improve Flash service life.
The data storage device and computer-readable recording medium and computer equipment and the data of the present invention of the present invention is deposited
Method for storing corresponds, the equally applicable data storage device of the invention of embodiment of date storage method of the invention and calculating
Machine readable storage medium storing program for executing and computer equipment, are declared hereby.
Each technical characteristic of embodiment described above can be combined arbitrarily, to make description succinct, not to above-mentioned reality
Apply each technical characteristic in example be possible to combination be all described, as long as but lance is not present in the combination of these technical characteristics
Shield, all should be the scope that this specification is recorded.
Embodiment described above only expresses several embodiments of the present invention, and its description is more specific and detailed, but not
Therefore the limitation to the scope of the claims of the present invention can be interpreted as.It should be pointed out that come for one of ordinary skill in the art
Say, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention
Scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.
Claims (11)
1. a kind of date storage method, it is characterised in that comprise the following steps:
User data to be written is obtained, its index is calculated according to user data to be written;
The index is searched in the inside ROM Space of processor, if described index the inside ROM Space for being not held in processor
In, and if current-user data stored number can store number of users less than default maximum in Flash spaces in Flash spaces
Data bulk, and if available index entry is found in the ROM Space, it is right in the available index item of the ROM Space
The first home address answered writes the index of the user data to be written;
Available first external address in Flash spaces corresponding to the first home address writes the number of users to be written
According to.
2. according to the method for claim 1, it is characterised in that search the index in the inside ROM Space of processor
Afterwards, the first home address corresponding to the available index item in the ROM Space writes the index of the user data to be written
Before, comprise the following steps:
If the index has been stored in the inside ROM Space of processor, the index being stored in ROM Space is obtained
Corresponding first user data;
If corresponding first user data differs with the user data to be written, ROM Space will be stored in
In the index it is invalid.
3. method according to claim 1 or 2, it is characterised in that
The default maximum in the Flash spaces can store the default maximum that amount of user data is less than the Flash spaces
Can data storage quantity;First external address can be stored for default maximum in Flash spaces and do not write in the address of user data
The address of access customer data.
4. method according to claim 1 or 2, it is characterised in that
If not finding available index entry in the ROM Space, the invalid index in ROM Space is wiped, and will
User data erasing corresponding to invalid index in ROM Space in the Flash spaces, so as to have in the ROM Space
Standby available index entry.
5. according to the method for claim 2, it is characterised in that in the rope that the first home address of the ROM Space writes
It is cited as:New index or the index corresponding with the first user data for the data creation to be written.
6. method according to claim 1 or 2, it is characterised in that the first home address in the ROM Space is corresponding
Flash spaces in the first external address write the user data to be written, comprise the following steps:
Obtain and be used for the initial address for storing index in ROM Space inside processor, obtain and be used to store in Flash spaces
The initial address of user data, obtains the data length of the index of the user data to be written, and obtains access customer to be written
The data length of data;
The first external address of user data to be written is calculated according to following linear corresponding relation:
The linear corresponding relation is:First external address of user data to be written is equal in first in the ROM Space
Portion address subtract for store index initial address after, then divided by first index data length, multiplied by with access customer to be written
The data length of data, along with the initial address for being used to store user data in Flash spaces.
7. method according to claim 1 or 2, it is characterised in that in Flash spaces corresponding to the first home address
Available first external address is write after the user data to be written, is comprised the following steps:
If the memory space that user data can be currently stored in the Flash spaces is less than preset critical, at least hold successively
Row following erasing work twice:
In the internal ROM memory spaces, the invalid rope of segment lookup in order since the initial address for storing index
Draw;
Wipe the user data in the flash spaces corresponding to the invalid index found and invalid index;
, will be where index writes back the invalid index being wiped free of corresponding to new user data if also new user data needs to write
ROM Space address, new user data is write back in the flash spaces and is wiped free of user data address;Address with
The ROM Space address at place is corresponding.
8. method according to claim 1 or 2, it is characterised in that search the rope in the inside ROM Space of processor
Draw, comprise the following steps:
The first index point and the second index point of index address are provided access to according to the index;
The odd number index entry in the ROM Space is traveled through, and travels through the even number index item in the ROM Space, utilizes described
One index point accesses the odd number index entry in the ROM Space respectively, and the index is searched in the odd number index entry;And
Access the even number index item in the ROM Space respectively using second index point, the rope is searched in the index
Draw.
A kind of 9. data storage device, it is characterised in that including:
Acquisition and computing module, for obtaining user data to be written, its index is calculated according to user data to be written;
Searching modul, the index is searched for the inside ROM Space in processor;
Writing module is indexed, if being not held in for the index in the inside ROM Space of processor, and if Flash spaces
Middle current-user data stored number, which is less than default maximum, can store amount of user data, and if in the ROM Space
Available index entry is found, then the write-in of the first home address is described to be written corresponding to the available index item in the ROM Space
The index of the user data entered;
User data writing module, for available first external address in Flash spaces corresponding to the first home address
Write the user data to be written.
10. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the computer program
The date storage method as described in claim any one of 1-8 is realized when being executed by processor.
11. a kind of computer equipment, including memory, processor and storage are on a memory and the meter that can run on a processor
Calculation machine program, it is characterised in that the number described in any one in claim 1-8 is realized during the computing device described program
According to storage method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710494335.7A CN107391030B (en) | 2017-06-26 | 2017-06-26 | Data storage method, data storage device, computer-readable storage medium and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710494335.7A CN107391030B (en) | 2017-06-26 | 2017-06-26 | Data storage method, data storage device, computer-readable storage medium and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107391030A true CN107391030A (en) | 2017-11-24 |
CN107391030B CN107391030B (en) | 2020-04-28 |
Family
ID=60333140
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710494335.7A Active CN107391030B (en) | 2017-06-26 | 2017-06-26 | Data storage method, data storage device, computer-readable storage medium and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107391030B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108520763A (en) * | 2018-04-13 | 2018-09-11 | 广州醇美电子有限公司 | A kind of date storage method, device, equipment and storage medium |
CN108647278A (en) * | 2018-05-03 | 2018-10-12 | 中北大学 | A kind of file management method and system |
CN108664577A (en) * | 2018-05-03 | 2018-10-16 | 中北大学 | A kind of file management method and system based on the free areas FLASH |
CN109979498A (en) * | 2019-01-24 | 2019-07-05 | 深圳市景阳信息技术有限公司 | The method and device of the write-in of disk video data, reading |
CN110427161A (en) * | 2019-08-09 | 2019-11-08 | 山东远大朗威教育科技股份有限公司 | A kind of date storage method for serial flash |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090043952A1 (en) * | 1995-07-31 | 2009-02-12 | Lexar Media, Inc. | Moving sectors within a block of information in a flash memory mass storage architecture |
CN104598161A (en) * | 2013-10-31 | 2015-05-06 | 腾讯科技(深圳)有限公司 | Data reading and writing method and device and data storage structure |
CN105512232A (en) * | 2015-11-30 | 2016-04-20 | 北京金山安全软件有限公司 | Data storage method and device |
-
2017
- 2017-06-26 CN CN201710494335.7A patent/CN107391030B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090043952A1 (en) * | 1995-07-31 | 2009-02-12 | Lexar Media, Inc. | Moving sectors within a block of information in a flash memory mass storage architecture |
CN104598161A (en) * | 2013-10-31 | 2015-05-06 | 腾讯科技(深圳)有限公司 | Data reading and writing method and device and data storage structure |
CN105512232A (en) * | 2015-11-30 | 2016-04-20 | 北京金山安全软件有限公司 | Data storage method and device |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108520763A (en) * | 2018-04-13 | 2018-09-11 | 广州醇美电子有限公司 | A kind of date storage method, device, equipment and storage medium |
CN108520763B (en) * | 2018-04-13 | 2021-07-16 | 广州醇美电子有限公司 | Data storage method, device, equipment and storage medium |
CN108647278A (en) * | 2018-05-03 | 2018-10-12 | 中北大学 | A kind of file management method and system |
CN108664577A (en) * | 2018-05-03 | 2018-10-16 | 中北大学 | A kind of file management method and system based on the free areas FLASH |
CN108647278B (en) * | 2018-05-03 | 2021-07-02 | 中北大学 | File management method and system |
CN109979498A (en) * | 2019-01-24 | 2019-07-05 | 深圳市景阳信息技术有限公司 | The method and device of the write-in of disk video data, reading |
CN110427161A (en) * | 2019-08-09 | 2019-11-08 | 山东远大朗威教育科技股份有限公司 | A kind of date storage method for serial flash |
Also Published As
Publication number | Publication date |
---|---|
CN107391030B (en) | 2020-04-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107391030A (en) | Date storage method, device, computer-readable recording medium and computer equipment | |
CN103425600B (en) | Address mapping method in a kind of solid-state disk flash translation layer (FTL) | |
Chiang et al. | Managing flash memory in personal communication devices | |
TWI312466B (en) | Computing systems,computer system,method including functions in a host control interface,method of memory error reporting, and article comprising a machine-readable storage medium containing instructions | |
CN101526927B (en) | Data processing method and data processing device of Flash file system | |
CN105980992B (en) | A kind of storage system, the method for identification data block stability and device | |
CN106448737A (en) | Flash memory data reading method and device and solid disk drive | |
US10503647B2 (en) | Cache allocation based on quality-of-service information | |
CN109976669B (en) | Edge storage method, device and storage medium | |
KR20130030238A (en) | Faster tree flattening for a system having non-volatile memory | |
CN103176916A (en) | Flash memory and address transfer approach thereof | |
CN105608016B (en) | Solid state hard disk of the DRAM in conjunction with MRAM and the storage card using MRAM | |
CN110347338B (en) | Hybrid memory data exchange processing method, system and readable storage medium | |
CN109918316B (en) | Method and system for reducing FTL address mapping space | |
CN109101437A (en) | Data storage method and terminal | |
CN111324427A (en) | Task scheduling method and device based on DSP | |
Jung et al. | Fass: A flash-aware swap system | |
CN109408416B (en) | Address mapping table entry page management method and device | |
KR100891009B1 (en) | Adaptive layout cache organization to enable optimal cache hardware performance | |
CN110008030A (en) | A kind of method of metadata access, system and equipment | |
CN104142979A (en) | Index method for realizing RFID (Radio Frequency Identification Devices) tag storage management | |
KR102321346B1 (en) | Data journaling method for large solid state drive device | |
CN202443462U (en) | Device for assisting upper computer to search free block in page mapping unit block | |
CN108804571B (en) | Data storage method, device and equipment | |
CN108717395B (en) | Method and device for reducing memory occupied by dynamic block mapping information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: Nanxiang three road, Science City high tech Industrial Development Zone, Guangzhou city of Guangdong Province, No. 2 510660 Applicant after: Hitachi building technologies (Guangzhou) Co. Ltd. Address before: Nanxiang Road three Guangzhou Science City 510660 high tech Industrial Development Zone, Guangdong city of Guangzhou province No. 2 Applicant before: Guangzhou Ropente Science and Technology Development Co., Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |