CN107329850A - It is a kind of to meet memory and date storage method that magnanimity reads and writes number of operations - Google Patents

It is a kind of to meet memory and date storage method that magnanimity reads and writes number of operations Download PDF

Info

Publication number
CN107329850A
CN107329850A CN201710385008.8A CN201710385008A CN107329850A CN 107329850 A CN107329850 A CN 107329850A CN 201710385008 A CN201710385008 A CN 201710385008A CN 107329850 A CN107329850 A CN 107329850A
Authority
CN
China
Prior art keywords
data
district
memory
sub
write
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
Application number
CN201710385008.8A
Other languages
Chinese (zh)
Other versions
CN107329850B (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.)
HANGZHOU HEZHI ELECTRONIC TECHNOLOGY Co Ltd
Original Assignee
HANGZHOU HEZHI ELECTRONIC 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 HANGZHOU HEZHI ELECTRONIC TECHNOLOGY Co Ltd filed Critical HANGZHOU HEZHI ELECTRONIC TECHNOLOGY Co Ltd
Priority to CN201710385008.8A priority Critical patent/CN107329850B/en
Publication of CN107329850A publication Critical patent/CN107329850A/en
Application granted granted Critical
Publication of CN107329850B publication Critical patent/CN107329850B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum

Abstract

Memory and date storage method that magnanimity reads and writes number of operations are met the invention provides a kind of, the memory of the completely the same initial data sub-district of data structure contents and Backup Data sub-district is included by devising, digital independent is performed when using, information is exported to internal memory, when receiving writing events, whether the data that memory first compares in the data and memory of internal memory are changed, and write operation is then performed in the event of changing.The present invention takes that two-region redundancy technique meets power down or other fortuitous event data are not lost, and the read-write operation of mass data is met using virtual multi-region rotation, it is therefore prevented that repetition is write, and extends access times.

Description

It is a kind of to meet memory and date storage method that magnanimity reads and writes number of operations
Technical field
The present invention relates to field of storage, more particularly to a kind of memory and data storage for meeting magnanimity read-write number of operations Method.
Background technology
With developing rapidly for science and technology, networked devices are more and more, and equipment is more and more intelligent, between the Internet of things era equipment Connection is interacted with each other, the reading and write operation to networked devices become very frequently, and high performance memory has widely Demand.
Following demand is mainly met for the memory of internet of things equipment:Certain service life, reading and write operation Frequent and power down or other unexpected reset data are not lost.The storage performance of current general memory on the market, be usually Epprom 1000000 times, flash 100000 times, for digital independent more than ten million rank, write, on current market Memory can not meet, it is seen that a kind of common access method need to be designed and meet requirements above.
The content of the invention
To overcome problem of the prior art, the present invention provides a kind of memory and data for meeting magnanimity read-write number of operations Storage method, digital independent that can be more than the rank of numeral ten million, write-in frequent operation, and power down or other unexpected reset numbers According to not losing.
The technical proposal for solving the technical problem of the invention is:It is a kind of to meet the storage that magnanimity reads and writes number of operations Device, the memory includes multiple logic areas, the logic area by the completely the same initial data sub-district of data structure contents and Backup Data sub-district is constituted, for operationally backuping each other and recovering;
The initial data sub-district includes storage control zone and data storage area;
The storage control zone includes mask field, CRC16 check fields, access times field.
The mask field is fixed sequence, for carrying out overflow checking, the mask field to write-in data length On the head of the data structure of logic area.
The CRC16 check fields are used to store validity check.
Further, the initial data sub-district and Backup Data sub-district are independent page, sector or full storage medium, For preventing while damaging.
A kind of date storage method realized based on the memory, its step is included:
1)Electricity completes memory initialization on memory, performs digital independent, information is exported to internal memory;
2)The pending data writing events states such as memory entrance;
3)If receiving writing events, whether the data that memory first compares in the data and memory of internal memory change;
4)If data change, write operation is performed;Without write-in if not changing.
The step 1)In, the execution digital independent includes:
Memory reads data from last area of logic area;
Verified by CRC16 check fields and mask field and judge whether original sub-district and backup sub-district are effective;
Change to next area and re-read if two sub-districts are invalid;If two sub-districts are effective, the big area of access times is chosen New sub-district is backuped in old sub-district;If there is a sub-district effectively, effective sub-district is backuped in invalid sub-district.
During being verified using mask field, when writing excessive data or logic error, then mask field will Data storage is covered as, if variable store detects mask field and write that data are excessive or logic by unexpected modification i.e. explanation Mistake simultaneously notifies user to carry out abnormality processing.
The step 3)In, data and the storage of internal memory are judged by the access times of relatively more original sub-district and backup sub-district Whether the data of device change.
The step 4)Before write operation is performed, judge the write-in number of times in current logic area whether up to specified write-in time Number.
The step 4)In, the execution write operation step includes:
Inquire about the read-write number of times in current logic area;
Whether decision logic area data write-in access times reach predetermined number of times, are changed if reaching to next logic area, if not Arrival is then kept;
Backup sub-district and original sub-district are write data into, validity is verified by CRC and mask;
Write and complete if twoth area are effective, change to next area and re-write if invalid.
The step 4)In, after write operation is performed, update access times.
Beneficial effects of the present invention are mainly shown as:The completely the same original number of data structure contents is included by devising According to the memory of sub-district and Backup Data sub-district, digital independent is performed when using, information is exported to internal memory, when receiving write-in thing During part, whether the data that memory first compares in the data and memory of internal memory change, and are write in the event of changing then to perform Enter operation.Take that two-region redundancy technique meets power down or other fortuitous event data are not lost, met using virtual multi-region rotation The read-write operation of mass data, it is therefore prevented that repetition is write, and extends access times.
Brief description of the drawings
Fig. 1 is the structure chart for the memory for meeting magnanimity read-write number of operations that the present invention is provided;
Fig. 2 is the flow chart for the memory overall operation logic that the present invention is provided;
Fig. 3 is the flow chart that method for reading data is realized based on memory that the present invention is provided;
Fig. 4 is the flow chart that method for writing data is realized based on memory that the present invention is provided.
Embodiment
The present invention is described in further detail with embodiment below in conjunction with the accompanying drawings.
It is the knot for the memory for meeting magnanimity read-write number of operations that embodiments in accordance with the present invention are provided referring to the drawings 1 Composition.
Memory includes n logic area 101, and the logic area 101 is by initial data sub-district 102 and Backup Data sub-district The data structure contents of 103 compositions, initial data sub-district 102 and Backup Data sub-district 103 are completely the same, for operationally mutual To back up and recovering;
The actual physical address mapping of initial data sub-district 102 is page, sector or the full storage medium of physical storage 104, the actual physical address mapping of Backup Data sub-district 103 is page, sector or the full storage medium of physical storage 105, page, the page of sector or full storage medium 104 and physical storage, sector or the full storage of physical storage are situated between Both are separate for matter 105, for preventing both from damaging simultaneously;
Initial data sub-district 102 includes storage control zone 106 and data storage area 107, and storage control zone 106 is used for control data Read-write and inspection;
Storing control zone 106 includes mask field 108, CRC16 check fields 109, access times field 110, mask field 108 be fixed sequential value, on the head of logic area data structure, for carrying out overflow checking, CRC16 to write-in data length Check field 109 is used to store validity check.
Fig. 2 is the flow chart of memory overall operation logic.
S201, memory is first powered up completing memory initialization;
S202, performs digital independent and the information in memory is exported into internal memory;
S203, memory judge complete digital independent after, into etc. pending data writing events state;
Also include memory state field in the storage control zone in memory logic area, when memory state field is set to 0, Memory logic area can not be written into, when memory state field is set to 1, memory will enter etc. pending data writing events State, logic area can be now written into.When memory judge complete digital independent after, then can will when memory state field from 0 is set to 1.
S204, if receiving writing events, whether the data that memory first compares in the data and memory of internal memory occur Change.
Judge whether the data of internal memory and the data of memory change, be by relatively more original sub-district and backup sub-district Access times realize.
S205, if data change, performs write operation;Without write-in if not changing.
Fig. 3 is the flow chart that method for reading data is realized based on memory.
S301, reads sub-district data since last area of logic area;
S302, reads the mask field and CRC16 check fields in the original sub-district and backup sub-district in current logic area;
S303, judges whether original sub-district and backup sub-district are effective according to mask field and CRC16 check fields, if two Sub-district is invalid, then gives up current logic area, is re-read from next logic area, goes to step S301;If in two sub-districts There is a sub-district effectively, then go to step S304;If two sub-districts are effective, step S305 is gone to;
Mask field is fixed sequential value, and being, for example, can be with 16 bit binary data.
During being verified using mask field, when writing excessive data or logic error, then mask field will Data storage is covered as, if variable store detects mask field and write that data are excessive or logic by unexpected modification i.e. explanation Mistake simultaneously notifies user to carry out abnormality processing.
S304, invalid sub-district is backuped to from effective sub-district;
By through examining the data cover in effective sub-district into invalid sub-district.
S305, the access times of relatively more original sub-district and backup sub-district;
S306, the small sub-district of access times is backuped to by the big sub-district of access times, recovers latest data;
S307, completes export data.
Fig. 4 is the flow chart that method for writing data is realized based on memory.
S401, the read-write number of times in inquiry current logic area;
S402, judges whether data write-in access times reach the predetermined number of times of logic area, if having reached the access times upper limit Step S403 is then gone to, step S404 is gone to if the access times upper limit is not reaching to;
S403, is changed to next logic area, and go to step S401;
S404, writes data into backup sub-district and original sub-district;
S405, reads the CRC16 fields and mask field in sub-district, write-in validity is verified by CRC16 and mask;
S406, writes if twoth area are effective and completes, change to next logic area and re-write if invalid, and go to step 403。
Above-described embodiment is used for that the invention will be further described, but does not limit the invention to these specific embodiment parties Formula.One skilled in the art would recognize that all alternative present invention encompasses what is potentially included in Claims scope Scheme, improvement project and equivalents.

Claims (10)

1. a kind of meet the memory that magnanimity reads and writes number of operations, it is characterised in that the memory includes:
Multiple logic areas, the logic area includes the completely the same initial data sub-district of data structure contents and Backup Data Area, can backup each other and recover between initial data sub-district and Backup Data sub-district;
The initial data sub-district includes storage control zone and data storage area;
The storage control zone includes mask field, CRC16 check fields, access times field.
2. a kind of memory for meeting magnanimity read-write number of operations as claimed in claim 1, it is characterised in that the mask word Section is fixed sequence, for carrying out overflow checking, data structure of the mask field in logic area to write-in data length Head, the CRC16 check fields be used for store validity check.
3. a kind of memory for meeting magnanimity read-write number of operations as claimed in claim 1, it is characterised in that the original number It is independent page, sector or full storage medium according to sub-district and the Backup Data sub-district, for preventing while damaging.
4. a kind of meet the date storage method that magnanimity reads and writes number of operations, the date storage method is based on claim 1-3 institutes The memory stated, and comprise the following steps:
1)Electricity completes memory initialization on memory, performs digital independent, information is exported to internal memory;
2)The pending data writing events states such as memory entrance;
3)If receiving writing events, whether the data that memory first compares in the data and memory of internal memory change;
4)If data change, write operation is performed;Without write-in if not changing.
5. date storage method as claimed in claim 4, it is characterised in that the step 1)In, the execution digital independent Including:
Memory reads data from last area of logic area;
Verified by CRC16 check fields and mask field and judge initial data sub-district and whether Backup Data sub-district has Effect;
Change to next area and re-read if initial data sub-district and Backup Data sub-district are invalid;If initial data sub-district and Backup Data sub-district is effective, then chooses the big area of access times and backup to new sub-district in old sub-district;If there is original data One in area and Backup Data sub-district effectively, then backups to effective sub-district in invalid sub-district.
6. date storage method as claimed in claim 5, it is characterised in that in the process verified using mask field In, when writing excessive data or logic error, then mask field will be covered as data storage, if variable store is detected Mask field writes excessive data or logic error by unexpected modification i.e. explanation and notifies user to carry out abnormality processing.
7. date storage method as claimed in claim 4, it is characterised in that the step 3)In, by comparing initial data The access times of sub-district and Backup Data sub-district judge whether the data of internal memory and the data of memory change.
8. date storage method as claimed in claim 4, it is characterised in that the step 4)Before write operation is performed, sentence Whether the write-in number of times in disconnected current logic area is up to specified write-in number of times.
9. date storage method as claimed in claim 4, it is characterised in that the step 4)In, the execution write operation Step includes:
Inquire about the read-write number of times in current logic area;
Whether decision logic area data write-in access times reach predetermined number of times, are changed if reaching to next logic area, if not Arrival is then kept;
Backup Data sub-district and initial data sub-district are write data into, validity is verified by CRC and mask;
Write and complete if twoth area are effective, change to next area and re-write if invalid.
10. date storage method as claimed in claim 4, it is characterised in that the step 4)In, when execution write operation Afterwards, access times are updated.
CN201710385008.8A 2017-05-26 2017-05-26 Memory satisfying mass read-write frequency operation and data storage method Active CN107329850B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710385008.8A CN107329850B (en) 2017-05-26 2017-05-26 Memory satisfying mass read-write frequency operation and data storage method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710385008.8A CN107329850B (en) 2017-05-26 2017-05-26 Memory satisfying mass read-write frequency operation and data storage method

Publications (2)

Publication Number Publication Date
CN107329850A true CN107329850A (en) 2017-11-07
CN107329850B CN107329850B (en) 2021-05-14

Family

ID=60193079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710385008.8A Active CN107329850B (en) 2017-05-26 2017-05-26 Memory satisfying mass read-write frequency operation and data storage method

Country Status (1)

Country Link
CN (1) CN107329850B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108459930A (en) * 2018-04-02 2018-08-28 深圳臻迪信息技术有限公司 Data back up method, device and storage medium
CN111984457A (en) * 2019-05-23 2020-11-24 华为技术有限公司 Method and device for updating storage information
CN112215986A (en) * 2020-09-09 2021-01-12 苏州工业园区凌志软件股份有限公司 Internet of things control system and method of intelligent lock

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251826A (en) * 2007-02-27 2008-08-27 深圳市同洲电子股份有限公司 Flash memory, method and apparatus for data management of flash memory
CN101634957A (en) * 2008-07-23 2010-01-27 佛山市顺德区顺达电脑厂有限公司 Method and system for managing data of flash memory
CN103914393A (en) * 2014-04-11 2014-07-09 四川华拓光通信股份有限公司 MCU-based (microprogrammed control unit-based) non-loss FLASH storage update method
US20160085667A1 (en) * 2014-09-22 2016-03-24 Hong Fu Jin Precision Industry (Wuhan) Co., Ltd. Spi rom with built-in mask rom for bios
CN106681855A (en) * 2015-11-10 2017-05-17 澜起科技(上海)有限公司 One-time programmable memory device and data verification method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251826A (en) * 2007-02-27 2008-08-27 深圳市同洲电子股份有限公司 Flash memory, method and apparatus for data management of flash memory
CN101634957A (en) * 2008-07-23 2010-01-27 佛山市顺德区顺达电脑厂有限公司 Method and system for managing data of flash memory
CN103914393A (en) * 2014-04-11 2014-07-09 四川华拓光通信股份有限公司 MCU-based (microprogrammed control unit-based) non-loss FLASH storage update method
US20160085667A1 (en) * 2014-09-22 2016-03-24 Hong Fu Jin Precision Industry (Wuhan) Co., Ltd. Spi rom with built-in mask rom for bios
CN106681855A (en) * 2015-11-10 2017-05-17 澜起科技(上海)有限公司 One-time programmable memory device and data verification method thereof

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108459930A (en) * 2018-04-02 2018-08-28 深圳臻迪信息技术有限公司 Data back up method, device and storage medium
CN108459930B (en) * 2018-04-02 2020-09-11 深圳臻迪信息技术有限公司 Data backup method, device and storage medium
CN111984457A (en) * 2019-05-23 2020-11-24 华为技术有限公司 Method and device for updating storage information
WO2020233203A1 (en) * 2019-05-23 2020-11-26 华为技术有限公司 Method and device for updating stored information
CN111984457B (en) * 2019-05-23 2022-09-02 华为技术有限公司 Method and device for updating storage information
US11914895B2 (en) 2019-05-23 2024-02-27 Huawei Technologies Co. Ltd. Method for updating stored information and apparatus
CN112215986A (en) * 2020-09-09 2021-01-12 苏州工业园区凌志软件股份有限公司 Internet of things control system and method of intelligent lock

Also Published As

Publication number Publication date
CN107329850B (en) 2021-05-14

Similar Documents

Publication Publication Date Title
US8046528B2 (en) Data writing method for flash memory, and flash memory controller and storage device thereof
JP5675954B2 (en) Detection of irregular parity distribution via metadata tag
US8589766B2 (en) Codeword remapping schemes for non-volatile memories
KR101405741B1 (en) Stripe-based non-volatile multilevel memory operation
US10613943B2 (en) Method and system for improving open block data reliability
US8533385B2 (en) Method for preventing read-disturb happened in non-volatile memory and controller thereof
TWI343001B (en) Data preserving method and data accessing method for non-volatile memory
US8631310B2 (en) Method for reducing uncorrectable errors of a memory device regarding error correction code, and associated memory device and controller thereof
US20120198123A1 (en) Systems and methods for redundantly storing metadata for non-volatile memory
TW200951979A (en) Data writing method for flash memory and storage system and controller using the same
TWI479314B (en) Method of storing system data, and memory controller and memory storage apparatus using the same
US10467074B2 (en) Conditional journal for storage class memory devices
US11733895B2 (en) Control method of flash memory controller and associated flash memory controller and storage device
TW201133498A (en) Error correcting method, and memory controller and memory storage system using the same
US20180157428A1 (en) Data protection of flash storage devices during power loss
TW201535382A (en) DRAM row sparing
CN107329850A (en) It is a kind of to meet memory and date storage method that magnanimity reads and writes number of operations
TWI509615B (en) Data storing method, and memory controller and memory storage apparatus using the same
US11809328B2 (en) Control method of flash memory controller and associated flash memory controller and storage device
CN111522684A (en) Method and device for simultaneously correcting soft and hard errors of phase change memory
TWI516934B (en) Data storing method, memory control circuit unit and memory stoarge apparatus
CN104252317A (en) Data writing method, memory controller and memory storage device
US20130067141A1 (en) Data writing method, and memory controller and memory storage apparatus using the same
JP2010128697A (en) Memory system
US11137944B1 (en) Combined QLC programming method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant