CN105760112B - Extend date storage method, read method and the system of memory use time - Google Patents

Extend date storage method, read method and the system of memory use time Download PDF

Info

Publication number
CN105760112B
CN105760112B CN201610071036.8A CN201610071036A CN105760112B CN 105760112 B CN105760112 B CN 105760112B CN 201610071036 A CN201610071036 A CN 201610071036A CN 105760112 B CN105760112 B CN 105760112B
Authority
CN
China
Prior art keywords
data
storage region
stored
storage
module
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
Application number
CN201610071036.8A
Other languages
Chinese (zh)
Other versions
CN105760112A (en
Inventor
徐文赋
任素云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou Blueway New Energy Technology Co Ltd
Original Assignee
Huizhou Blueway New Energy Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou Blueway New Energy Technology Co Ltd filed Critical Huizhou Blueway New Energy Technology Co Ltd
Priority to CN201610071036.8A priority Critical patent/CN105760112B/en
Publication of CN105760112A publication Critical patent/CN105760112A/en
Application granted granted Critical
Publication of CN105760112B publication Critical patent/CN105760112B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0616Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Abstract

The invention discloses a kind of extend the date storage method of memory use time, read method and system, date storage method includes:(1) it is the more than one storage region of data distribution to be stored in advance in memory;(2), in data storage procedure, data to be stored are stored in memory in the way of switching storage region in turn.Method for reading data includes:A reads the indexed variable FLAG in each storage region;B judges the storage region that latest data is located according to the indexed variable FLAG of each storage region;C reads the data of the corresponding storage region of above-mentioned judged result as valid data.Storage system includes storage region distribute module and data processing module.Reading system includes indexed variable read module, judge module and performing module.The utilization rate of memory is made to reach maximization by the method, even if requirement of system design can be reached still when from operable number of times relatively low memory, so as to reduces cost.

Description

Extend date storage method, read method and the system of memory use time
Technical field
The present invention relates to the technical field of electric automobile, more specifically, is to be related to a kind of prolongation memory use time Date storage method, read method and system.
Background technology
In recent years, with the development of information technology, the security of the data of storage and the recovery of data in storage medium Ability increasingly draws attention, this for the service life of the storage medium of data storage is proposed higher and higher requirement ensureing The data for wherein storing are without damage, and also want to, in the case where maloperation or virus are invaded and harassed, to recover by accident The data of deletion.In the prior art, erasable operation is frequently repeated in a certain piece of region in during data storage to memory, and its His storage region is few even never to carry out erasable operation, and causes low to memory utilization rate, and ultimately resulting in memory makes Shorter with the time, for the data flow for needing frequently to be stored, the life-span of memory may not reach requirement of system design.Separately Outward, need, in the application for changing hardware, the loss of data in original system after changing hardware, may be caused at some.
Content of the invention
It is an object of the invention to overcoming drawbacks described above of the prior art, there is provided a kind of prolongation memory use time Date storage method, read method and system, change storage region dividing condition in the case of supporting not changing software and meet The storage of different parameters, reduces the loaded down with trivial details of modification software.
For achieving the above object, the technical scheme that the present invention is provided is as follows:
The invention provides a kind of date storage method for extending memory use time, the method comprises the following steps:
(1) it is the more than one storage region of data distribution to be stored in advance in memory;
(2), in data storage procedure, data to be stored are stored in memory in the way of switching storage region in turn.
Used as preferred technical scheme, step (2) comprise the following steps:
(21) it is one indexed variable FLAG of data setting to be stored;
(22), when writing data, determine which data to be stored write and deposited by currently stored operation according to indexed variable FLAG Storage area domain;
(23) storage region that will be determined in data to be stored and its indexed variable FLAG write steps (22).
Used as preferred technical scheme, in step (21), indexed variable FLAG initial values are 0, often store a secondary data Front mark scalar FLAG cumulative 1;
Determine in step (22) that the process which storage region is data to be stored write is by currently stored operation:
The storage region that data to be stored are write by the currently stored operation of note is n-th storage region, and wherein, n is equal to mark Remainder of the value of will scalar FLAG divided by the number of pre-assigned storage region.
Present invention also offers a kind of extend memory use time method for reading data, it is characterised in that include with Lower step:
A reads the indexed variable FLAG in each storage region;
B judges the storage region that latest data is located according to the indexed variable FLAG of each storage region;
C reads the data of the corresponding storage region of above-mentioned judged result as valid data.
Used as preferred technical scheme, the process of step B is as follows:
The size of the indexed variable FLAG of each storage region of comparison, using the maximum storage regions of indexed variable FLAG as most The storage region that new data is located.
Present invention also offers a kind of data-storage system for extending memory use time, the system includes storage region Distribute module and data processing module;
The storage region distribute module, for being in advance the more than one storage of data distribution to be stored in memory Region;
The data processing module, in data storage procedure, by data to be stored switching storage region in turn Mode store in memory.
Used as preferred technical scheme, the data processing module includes that indexed variable setting module, storage region are selected Module and writing module;
The indexed variable setting module, for for one indexed variable FLAG of data setting to be stored;
The storage region selecting module, for writing during data, determines currently stored operation according to indexed variable FLAG Which storage region is data to be stored are write;
Said write module, for will be in data to be stored and its indexed variable FLAG write storage region selecting modules really Fixed storage region.
As preferred technical scheme, in the indexed variable setting module, indexed variable FLAG initial values are 0, often deposit Store up mark scalar FLAG cumulative 1 before a secondary data;
In the storage region selecting module, determine which storage region is data to be stored are write by currently stored operation Process is:
The storage region that data to be stored are write by the currently stored operation of note is n-th storage region, and wherein, n is equal to mark Remainder of the value of will scalar FLAG divided by the number of pre-assigned storage region.
Present invention also offers a kind of data reading system for extending memory use time, the system includes indexed variable Read module, judge module and performing module;
The read module, for reading the indexed variable FLAG in each storage region;;
The judge module, judges the memory block that latest data is located for the indexed variable FLAG according to each storage region Domain;
The performing module, for reading the data of the corresponding storage region of above-mentioned judged result as valid data.
Used as preferred technical scheme, the deterministic process of the judge module is as follows:
The size of the indexed variable FLAG of each storage region of comparison, using the maximum storage regions of indexed variable FLAG as most The storage region that new data is located.
Compared with prior art, the beneficial effects of the present invention is:
1st, the present invention makes storage by by data to be stored to store by way of switching storage region in turn in memory The utilization rate of device reaches maximization, and changes storage region dividing condition in the case of supporting not changing software and meet different ginsengs Several storages, reduces the loaded down with trivial details of modification software.
Even if the 2, still requirement of system design can be reached by the method when from operable number of times relatively low memory, So as to reduces cost.
3rd, the present invention can support data inspection function, meet commissioning requirements;In the application for needing to change hardware, can After importing and exporting data guarantee hardware replacement, it is consistent with system legacy data.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing Accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can be with basis These accompanying drawings obtain other accompanying drawings.
Fig. 1 is the flow chart of the date storage method of the prolongation memory use time that the embodiment of the present invention one is provided;
Fig. 2 is to determine in the embodiment of the present invention one that data to be stored are write showing for which storage region by currently stored operation It is intended to;
Fig. 3 is the flow chart of the method for reading data of the prolongation memory use time that the embodiment of the present invention two is provided;
Fig. 4 is the structure square frame of the data-storage system of the prolongation memory use time that the embodiment of the present invention three is provided Figure;
Fig. 5 is the structure square frame of the data reading system of the prolongation memory use time that the embodiment of the present invention four is provided Figure;
Specific embodiment
Purpose, technical scheme and advantage for making the embodiment of the present invention is clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, to the embodiment of the present invention in technical scheme be clearly and completely described, it is clear that described embodiment is The a part of embodiment of the present invention, rather than whole embodiments.Embodiment in based on the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Embodiment one
Embodiments of the invention one provide a kind of method for extending memory use time and data storage inquiry, Fig. 1 It is the method flow diagram of the embodiment of the present invention one, refer to Fig. 1, the method for the embodiment of the present invention is comprised the following steps:
Step S101, it is in advance the more than one storage region of data distribution to be stored in memory;
In step S102, data storage procedure, data to be stored are stored in the way of switching storage region in turn and are deposited In reservoir.
For preferably implementing the present invention, the step 102 comprises the steps:
Step S1021, be one indexed variable FLAG of data setting to be stored;
When step S1022, write data, determine that data to be stored are write by currently stored operation according to indexed variable FLAG Which storage region;
Step S1023, the storage region that will be determined in data to be stored and its indexed variable FLAG write steps S1022.
In step S1021, indexed variable FLAG initial values are 0, and before often storing a secondary data, mark scalar FLAG tires out Plus 1;
As shown in Fig. 2 determining in step S1022 which storage region is data to be stored are write by currently stored operation Process be:
The storage region that data to be stored are write by the currently stored operation of note is n-th storage region, and wherein, n is equal to mark Remainder of the value of will scalar FLAG divided by the number of pre-assigned storage region.
The present invention makes memory by by data to be stored to store by way of switching storage region in turn in memory Utilization rate reach maximization, and change storage region dividing condition in the case of supporting not changing software and enable different parameters Storage, reduce modification software loaded down with trivial details.
Embodiment two
Embodiments of the invention two provide a kind of method for reading data for extending memory use time, are in embodiment The further technical scheme carried out on one basis.Fig. 3 is the method flow diagram of the embodiment of the present invention two, refer to Fig. 3, The method of the embodiment of the present invention is comprised the following steps:
Step S201, the indexed variable FLAG read in each storage region;
Step S202, the storage region for judging latest data place according to the indexed variable FLAG of each storage region;
Step S203, the data of the corresponding storage region of the above-mentioned judged result of reading are used as valid data.
The detailed process of step S202 is as follows:
The size of the indexed variable FLAG of each storage region of comparison, using the maximum storage regions of indexed variable FLAG as most The storage region that new data is located.
Embodiment three
Embodiments of the invention three provide a kind of data-storage system for extending memory use time, and Fig. 4 is this The structured flowchart of bright embodiment three, refer to Fig. 4, and the more new system of the embodiment of the present invention includes 1 He of storage region distribute module Data processing module 2;
The storage region distribute module 1, for depositing for data distribution to be stored is more than one in memory in advance Storage area domain;
The data processing module 2, in data storage procedure, by data to be stored switching storage region in turn Mode store in memory.
The data processing module 2 includes indexed variable setting module 21, storage region selecting module 22 and write mould Block 23;
The indexed variable setting module 21, for for one indexed variable FLAG of data setting to be stored;
The storage region selecting module 22, for writing during data, determines currently stored behaviour according to indexed variable FLAG Make which storage region is data to be stored are write;
Said write module 23, for by data to be stored and its indexed variable FLAG write storage region selecting modules The storage region of determination.
21 in the indexed variable setting module, indexed variable FLAG initial values are 0, often store the mark before a secondary data Scalar FLAG cumulative 1;
22 in the storage region selecting module, determine which storage region is data to be stored are write by currently stored operation Process be:
The storage region that data to be stored are write by the currently stored operation of note is n-th storage region, and wherein, n is equal to mark Remainder of the value of will scalar FLAG divided by the number of pre-assigned storage region.
Example IV
Embodiments of the invention four provide a kind of data reading system for extending memory use time, are in embodiment The further technical scheme carried out on three basis.Fig. 5 is refer to, the data reading system of the embodiment of the present invention four includes Indexed variable read module 3, judge module 4 and performing module 5;
The indexed variable read module 3, for reading the indexed variable FLAG in each storage region;;
The judge module 4, judges the storage that latest data is located for the indexed variable FLAG according to each storage region Region;
The performing module 5, for reading the data of the corresponding storage region of above-mentioned judged result as valid data.
The deterministic process of the judge module 4 is as follows:
The size of the indexed variable FLAG of each storage region of comparison, using the maximum storage regions of indexed variable FLAG as most The storage region that new data is located.
Here is it should be noted that a kind of digital independent system of prolongation memory use time of above-described embodiment offer System, is only illustrated with the division of above-mentioned each functional module, in practical application, can as desired by above-mentioned functions point With being completed by different functional modules, will the internal structure of system be divided into different functional modules, to complete above description All or part of function.
One of ordinary skill in the art will appreciate that realize that all or part of step in above-described embodiment method is can be with Instruct related hardware to complete by program, described program can be stored in a computer read/write memory medium In, described storage medium, such as ROM/RAM, disk, CD etc..
Above-described embodiment is the present invention preferably embodiment, but embodiments of the present invention are not by above-described embodiment Limit, other any Spirit Essences without departing from the present invention and the change, modification, replacement that is made under principle, combine, simplification, Equivalent substitute mode is should be, is included within protection scope of the present invention.

Claims (8)

1. the date storage method of memory use time is extended, it is characterised in that comprised the following steps:
(1) it is the more than one storage region of data distribution to be stored in advance in memory;
(2), in data storage procedure, data to be stored are stored in memory in the way of switching storage region in turn.
Step (2) comprise the following steps:
(21) it is one indexed variable FLAG of data setting to be stored;
(22), when writing data, determine which memory block is data to be stored are write by currently stored operation according to indexed variable FLAG Domain;
(23) storage region that will be determined in data to be stored and its indexed variable FLAG write steps (22).
2. as requested described in 1 prolongation memory use time date storage method, it is characterised in that step (21) Middle indexed variable FLAG initial values are 0, often store mark scalar FLAG cumulative 1 before a secondary data;
Determine in step (22) that the process which storage region is data to be stored write is by currently stored operation:
The storage region that data to be stored are write by the currently stored operation of note is n-th storage region, and wherein, n is equal to mark mark Remainder of the value of amount FLAG divided by the number of pre-assigned storage region.
3. the method for reading data based on the date storage method of the prolongation memory use time described in claim 1, which is special Levy and be, comprise the following steps:
A reads the indexed variable FLAG in each storage region;
B judges the storage region that latest data is located according to the indexed variable FLAG of each storage region;
C reads the data of the corresponding storage region of above-mentioned judged result as valid data.
4. method for reading data according to claim 3, it is characterised in that the process of step B is as follows:
The size of the indexed variable FLAG of each storage region of comparison, using the maximum storage regions of indexed variable FLAG as newest number According to the storage region being located.
5. the data-storage system of memory use time is extended, it is characterised in that the system includes storage region distribute module And data processing module;
The storage region distribute module, for being in advance the more than one memory block of data distribution to be stored in memory Domain;
The data processing module, in data storage procedure, by data to be stored switching the side of storage region in turn Formula is stored in memory, and the data processing module includes indexed variable setting module, storage region selecting module and writes Enter module;
The indexed variable setting module, for for one indexed variable FLAG of data setting to be stored;
According to indexed variable FLAG, the storage region selecting module, for writing during data, determines that currently stored operation will be treated Which storage region is data storage write;
Said write module, for writing determination in storage region selecting module by data to be stored and its indexed variable FLAG Storage region.
6. according to claim 5 extend memory use time data-storage system, it is characterised in that the mark In specification of variables module, indexed variable FLAG initial values are 0, often store mark scalar FLAG cumulative 1 before a secondary data;
In the storage region selecting module, the currently stored process for operating and which storage region being data to be stored write is determined For:
The storage region that data to be stored are write by the currently stored operation of note is n-th storage region, and wherein, n is equal to mark mark Remainder of the value of amount FLAG divided by the number of pre-assigned storage region.
7. the data reading system based on the data-storage system of the prolongation memory use time described in claim 5, which is special Levy and be, the system includes indexed variable read module, judge module and performing module;
The read module, for reading the indexed variable FLAG in each storage region;;
The judge module, judges the storage region that latest data is located for the indexed variable FLAG according to each storage region;
The performing module, for reading the data of the corresponding storage region of above-mentioned judged result as valid data.
8. data reading system according to claim 7, it is characterised in that the deterministic process of the judge module is as follows:
The size of the indexed variable FLAG of each storage region of comparison, using the maximum storage regions of indexed variable FLAG as newest number According to the storage region being located.
CN201610071036.8A 2016-02-01 2016-02-01 Extend date storage method, read method and the system of memory use time Active CN105760112B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610071036.8A CN105760112B (en) 2016-02-01 2016-02-01 Extend date storage method, read method and the system of memory use time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610071036.8A CN105760112B (en) 2016-02-01 2016-02-01 Extend date storage method, read method and the system of memory use time

Publications (2)

Publication Number Publication Date
CN105760112A CN105760112A (en) 2016-07-13
CN105760112B true CN105760112B (en) 2017-03-15

Family

ID=56343023

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610071036.8A Active CN105760112B (en) 2016-02-01 2016-02-01 Extend date storage method, read method and the system of memory use time

Country Status (1)

Country Link
CN (1) CN105760112B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108121663B (en) * 2016-11-29 2022-05-03 群联电子股份有限公司 Data storage method, memory storage device and memory control circuit unit
CN106847341A (en) * 2016-12-23 2017-06-13 鸿秦(北京)科技有限公司 The memory bank self-checking unit and method of a kind of pure electric automobile integrated information storage device
CN108776627B (en) * 2018-05-29 2021-08-24 青岛海尔科技有限公司 Data storage method and device, and data reading method and device
WO2021120068A1 (en) * 2019-12-18 2021-06-24 深圳市汇顶科技股份有限公司 Method for managing power supply state of memory, and chip

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1258921C (en) * 2002-07-30 2006-06-07 中兴通讯股份有限公司 Distributive video interactive system and its data recording and accessing method
CN103620543A (en) * 2011-08-04 2014-03-05 株式会社日立制作所 Data storage system using method for dynamically allocating physical data storage space
CN103268201B (en) * 2013-04-19 2016-02-17 北京经纬恒润科技有限公司 A kind of date storage method, memory storage and read method

Also Published As

Publication number Publication date
CN105760112A (en) 2016-07-13

Similar Documents

Publication Publication Date Title
CN105760112B (en) Extend date storage method, read method and the system of memory use time
US7882300B2 (en) Apparatus and method for managing nonvolatile memory
CN109753443B (en) Data processing method and device and electronic equipment
EP1906311B1 (en) Mapping apparatus and method for non-volatile memory supporting different cell types
CN101777026B (en) Memory management method, hard disk and memory system
CN103092766B (en) A kind of loss equalizing implementation method for NAND FLASH
EP2921963A1 (en) Memory recycling method and device
CN105159915A (en) Dynamically adaptive LSM (Log-structured merge) tree combination method and system
CN103593436A (en) File merging method and device
CN104298681B (en) A kind of date storage method and device
CN101369252A (en) Method for static data loss equalization based on NAND flash memory file system
CN105224237A (en) A kind of date storage method and device
CN111324303B (en) SSD garbage recycling method, SSD garbage recycling device, computer equipment and storage medium
CN106339324B (en) A kind of method and device selecting garbage reclamation block
CN103440207A (en) Caching method and caching device
CN105787037B (en) A kind of delet method and device of repeated data
CN102201259A (en) Wear leveling method for nonvolatile memory
CN101398749B (en) Static state attrition balancing method, device and system
CN103559139B (en) A kind of date storage method and device
CN109086141B (en) Memory management method and device and computer readable storage medium
CN105404691A (en) File storage method and apparatus
CN103970669A (en) Method for accelerating physical-to-logic address mapping of recycling operation in solid-state equipment
CN102253985B (en) File system data management method and system
CN104199784A (en) Data migration method and device based on hierarchical storage
CN109918234A (en) A kind of metadata restoration methods, device, equipment and medium based on SSD

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant