CN102521084A - Data storage and reading method - Google Patents
Data storage and reading method Download PDFInfo
- Publication number
- CN102521084A CN102521084A CN2011104293224A CN201110429322A CN102521084A CN 102521084 A CN102521084 A CN 102521084A CN 2011104293224 A CN2011104293224 A CN 2011104293224A CN 201110429322 A CN201110429322 A CN 201110429322A CN 102521084 A CN102521084 A CN 102521084A
- Authority
- CN
- China
- Prior art keywords
- data
- district
- read
- success
- correct
- 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
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The invention relates to a data storage and reading method in an improvement scheme, which includes a data storage step and a data reading step. The data storage and reading method is used for storing, reading and recovering data by means of multi-redundant backup and successive writing, providing a multi-backup mechanism on a storage, ensuring reliable writing of the data and improving data reliability and destruction resistance. When the data are read, even if parts of the data are destructed, the destructed data can be recovered by the aid of normal data, so that accuracy of data reading is ensured.
Description
Technical field
The present invention relates to a kind of storage and read method improvement project of data.
Background technology
The normal EEPROM EEPROM that adopts carries out data storage in the battery management system, and has only an EEPROM in the battery management system usually.All important controlled variable of battery management system and service data all will be kept in this storer; In the initialized process of battery management system, need from EEPROM, read initiation parameter; The data of preserving before reading; In the process of battery management system operation, data such as the dump energy of the real-time preservation of needs battery, failure message.The reliable and stable operation of battery management system needs these parameters and data to do assurance, so reliability of data storage, and it is particularly important that restorability seems.
The battery management system data are kept in the single chip; If only preserve a piece of data or do not back up Restoration Mechanism reliably; So in the process that data write because power supply is unstable or be interfered and mistake might occur, if wrong this piece of data has just been lost and be irrecoverable.Same has damaged as if the chip subregion, and these regional data are just lost and be irrecoverable.These problems can directly cause battery management system normally not move.
Existing method of in EEPROM, preserving data is comparatively simple, and a kind of is only to preserve a piece of data, just can't obtain these data after these data are destroyed, and can not pass through other way restore data, its poor reliability.A kind of in addition method is to preserve two piece of data, copy of an original, and the data consistent of reserved copy and duplicate thinks that then data are correct when reading, and when data are inconsistent, can't distinguish which data and make mistakes, and also can't recover data.
Summary of the invention
In view of this, the present invention's technical matters that will solve provides a kind of data storage and reads data storage read method reliable, that have certain data recovery function.
The present invention adopts following scheme to realize:
A kind of data storage and read method comprise data storage step and data read step, and said data storage step comprises:
(11) on storer, tell a, b, c, four districts of d in advance, wherein a district is used to store the data original, and b, c, three districts of d are used to store data trnascription;
(12) data that need deposited in are stored in a, b, c, four districts of d successively, form a data original, three data copies;
Said data read step comprises:
(21) read a district data, b district data successively;
(22) judge whether a district, b district data be consistent, if unanimity then get into next step, if inconsistent then get into (25) step;
(23) read c district data, and judge whether a district, c district data be consistent, if unanimity then get into next step, if inconsistent then represent a district, b district data correctly and c district error in data, and correct data is write the c district, get into next step then;
(24) read d district data, and judge whether d district data are consistent with correct data, if unanimity then export correct data, data read success, otherwise expression d district error in data, and correct data is write the d district again, export correct data, and data read success;
(25) read c district data, and judge whether a district, c district data be consistent, if unanimity then represent b district error in data, a district, c district data are correct, and correct data is write the b district again, and if entering (24) step again is inconsistent then get into next step;
(26) judge whether b district, c district data be consistent, if unanimity then represent a district error in data, b district, c district data are correct, and correct data is write a district again, and if entering (24) step again is inconsistent then get into next step;
(27) read d district data, judge d district data whether with the data consistent in a district, b district, c district, if d district and district's data consistent wherein; These district's data of then representing d district and d district data consistent are correct, distinguish error in data for other two, and correct data is write other two districts again; The output correct data, data read success, if the data in d district and other three districts are all inconsistent; Error message is returned in then reading of data failure.
In addition, in the data storage step, (12) step wherein is specially:
(121) the storage data are to a district, and whether judgment data stores success, if success then get into next step, otherwise return data is stored failure information;
(122) the storage data are to b district, and whether judgment data stores success, if success then get into next step, otherwise return data is stored failure information;
(123) the storage data are to c district, and whether judgment data stores success, if success then get into next step, otherwise return data is stored failure information;
(124) the storage data are to d district, and whether judgment data stores success, if success then represent that the storage of data is entirely true returns success information, the data storage step is accomplished, otherwise return data is stored failure information.
Data storage read method provided by the invention; The mode that adopt many redundancy backups, writes is one by one stored and is read data, recovers, and many back mechanisms are provided on storer, guarantees that data write reliably; Data reliability and preventing destructing performance have been improved; During reading of data,, guarantee the correctness that data read even suffer also can utilize under the destruction situation normal data that the data of destroying are recovered at partial data.
Figure of description
Fig. 1 is an embodiment of the invention data storage flow chart of steps.
Fig. 2 reads flow chart of steps for the present embodiment data.
Embodiment
Below will combine accompanying drawing and embodiment that the present invention is described in further detail for the ease of it will be appreciated by those skilled in the art that:
The mode that data storage and the read method that present embodiment discloses adopted many redundancy backups, write is one by one stored data; Guarantee the correctness that data deposit in; And when partial data is destroyed; Utilize a plurality of Backup Data contrasts to read correct data, and misdata is had efficient recovery, improved the reliability of electric automobile data.
This method comprises data storage step and data read step, and shown in accompanying drawing 1, data storage step wherein is:
(11) on storer, tell a, b, c, four districts of d in advance, wherein a district is used to store the data original, and b, c, three districts of d are used to store data trnascription;
(12) data that need deposited in are stored in a, b, c, four districts of d successively, form a data original, three data copies.
(12) step wherein is specially:
(121) the storage data are to a district, and whether judgment data stores success, if success then get into next step, otherwise return data is stored failure information;
(122) the storage data are to b district, and whether judgment data stores success, if success then get into next step, otherwise return data is stored failure information;
(123) the storage data are to c district, and whether judgment data stores success, if success then get into next step, otherwise return data is stored failure information;
(124) the storage data are to d district, and whether judgment data stores success, if success then represent that the storage of data is entirely true returns success information, the data storage step is accomplished, otherwise return data is stored failure information.
Have following advantage at above-mentioned storage wiring method: 4 piece of data have been stored up in (1) coexistence, have improved the reliability of data, and when certain regional hardware damage can't reading of data, valid data can read and provide to other regional data still; (2) can contrast mutually between 4 piece of data that write, obtain proper data with affirmation, and data source is provided the recovery of improper value; (3) adopt the method that writes one by one; Guarantee that each zone only writes when correct; Just can carry out next regional operation; Even be interfered when writing data like this or reason such as system cut-off cause certain regional data write error mistake, ensuing write operation will stop, and has guaranteed that the data in other 3 zones still can remain the right value that the last time writes.
The data read step comprises shown in the accompanying drawing 2 for another example:
(21) read a district data, b district data successively;
(22) judge whether a district, b district data be consistent, if unanimity then get into next step, if inconsistent then get into (25) step;
(23) read c district data, and judge whether a district, c district data be consistent, if unanimity then get into next step, if inconsistent then represent a district, b district data correctly and c district error in data, and correct data is write the c district, get into next step then;
(24) read d district data, and judge whether d district data are consistent with correct data, if unanimity then export correct data, data read success, otherwise expression d district error in data, and correct data is write the d district again, export correct data, and data read success;
(25) read c district data, and judge whether a district, c district data be consistent, if unanimity then represent b district error in data, a district, c district data are correct, and correct data is write the b district again, and if entering (24) step again is inconsistent then get into next step;
(26) judge whether b district, c district data be consistent, if unanimity then represent a district error in data, b district, c district data are correct, and correct data is write a district again, and if entering (24) step again is inconsistent then get into next step;
(27) read d district data, judge d district data whether with the data consistent in a district, b district, c district, if d district and district's data consistent wherein; These district's data of then representing d district and d district data consistent are correct, distinguish error in data for other two, and correct data is write other two districts again; The output correct data, data read success, if the data in d district and other three districts are all inconsistent; Error message is returned in then reading of data failure.
In above-mentioned data read step, through the data comparative analysis in 4 zones, be that consistent just reading obtains proper data as long as two data are arranged in 4, other wrong data also can be recovered according to proper data.
More than be wherein concrete implementation of the present invention, it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to claim of the present invention.Should be pointed out that for the person of ordinary skill of the art under the prerequisite that does not break away from the present invention's design, can also make some distortion and improvement, these conspicuous replacement forms all belong to protection scope of the present invention.
Claims (2)
1. data storage and read method comprise data storage step and data read step, it is characterized in that said data storage step comprises:
(11) on storer, tell a, b, c, four districts of d in advance, wherein a district is used to store the data original, and b, c, three districts of d are used to store data trnascription;
(12) data that need deposited in are stored in a, b, c, four districts of d successively, form a data original, three data copies;
Said data read step comprises:
(21) read a district data, b district data successively;
(22) judge whether a district, b district data be consistent, if unanimity then get into next step, if inconsistent then get into (25) step;
(23) read c district data, and judge whether a district, c district data be consistent, if unanimity then get into next step, if inconsistent then represent a district, b district data correctly and c district error in data, and correct data is write the c district, get into next step then;
(24) read d district data, and judge whether d district data are consistent with correct data, if unanimity then export correct data, data read success, otherwise expression d district error in data, and correct data is write the d district again, export correct data, and data read success;
(25) read c district data, and judge whether a district, c district data be consistent, if unanimity then represent b district error in data, a district, c district data are correct, and correct data is write the b district again, and if entering (24) step again is inconsistent then get into next step;
(26) judge whether b district, c district data be consistent, if unanimity then represent a district error in data, b district, c district data are correct, and correct data is write a district again, and if entering (24) step again is inconsistent then get into next step;
(27) read d district data, judge d district data whether with the data consistent in a district, b district, c district, if d district and district's data consistent wherein; These district's data of then representing d district and d district data consistent are correct, distinguish error in data for other two, and correct data is write other two districts again; The output correct data, data read success, if the data in d district and other three districts are all inconsistent; Error message is returned in then reading of data failure.
2. data storage according to claim 1 and read method is characterized in that, in the data storage step, (12) step wherein is specially:
(121) the storage data are to a district, and whether judgment data stores success, if success then get into next step, otherwise return data is stored failure information;
(122) the storage data are to b district, and whether judgment data stores success, if success then get into next step, otherwise return data is stored failure information;
(123) the storage data are to c district, and whether judgment data stores success, if success then get into next step, otherwise return data is stored failure information;
(124) the storage data are to d district, and whether judgment data stores success, if success then represent that the storage of data is entirely true returns success information, the data storage step is accomplished, otherwise return data is stored failure information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011104293224A CN102521084B (en) | 2011-12-20 | 2011-12-20 | Data storage and reading method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011104293224A CN102521084B (en) | 2011-12-20 | 2011-12-20 | Data storage and reading method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102521084A true CN102521084A (en) | 2012-06-27 |
CN102521084B CN102521084B (en) | 2013-11-20 |
Family
ID=46292017
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011104293224A Active CN102521084B (en) | 2011-12-20 | 2011-12-20 | Data storage and reading method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102521084B (en) |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103246280A (en) * | 2012-12-04 | 2013-08-14 | 奇瑞汽车股份有限公司 | Electric automobile diagnostic system |
CN104317746A (en) * | 2014-10-27 | 2015-01-28 | 安徽江淮汽车股份有限公司 | Data redundancy access method for EEPROM (electrically erasable programmable read-only memory) |
CN104468793A (en) * | 2014-12-10 | 2015-03-25 | 北京奇虎科技有限公司 | Distributed data storage method and distributed data clustering system |
CN105259150A (en) * | 2015-11-02 | 2016-01-20 | 深圳市锦瑞电子有限公司 | Fluorescence analyzer calibration system |
CN105516230A (en) * | 2014-10-15 | 2016-04-20 | 深圳市腾讯计算机系统有限公司 | Data processing method and device |
CN105573676A (en) * | 2015-12-16 | 2016-05-11 | 浪潮(北京)电子信息产业有限公司 | Method for verifying data consistency in storage system |
CN105808388A (en) * | 2016-03-30 | 2016-07-27 | 苏州美天网络科技有限公司 | Hard disk data backup method |
CN105893182A (en) * | 2016-03-30 | 2016-08-24 | 苏州美天网络科技有限公司 | Backup method for data in hard disk |
CN103914667B (en) * | 2012-12-29 | 2017-05-24 | 北京谊安医疗系统股份有限公司 | Safety electrically erasable programmable read only memory (EEPROM) reading method and system thereof |
CN107368757A (en) * | 2017-06-02 | 2017-11-21 | 九阳股份有限公司 | A kind of date storage method of cooking equipment |
CN109062822A (en) * | 2018-07-18 | 2018-12-21 | 北京世纪东方通讯设备有限公司 | A kind of storage method and device of locomotive wireless communication data |
CN109542685A (en) * | 2018-11-20 | 2019-03-29 | 江门市兰格电子有限公司 | Checking memory data method, apparatus, equipment and medium based on more sectors |
CN109766212A (en) * | 2018-12-26 | 2019-05-17 | 贵州航天凯山石油仪器有限公司 | Data guard method and system in a kind of storaging medium |
CN110196680A (en) * | 2018-03-27 | 2019-09-03 | 腾讯科技(深圳)有限公司 | Data processing method, device and storage medium |
CN110554888A (en) * | 2018-05-30 | 2019-12-10 | 北京兆易创新科技股份有限公司 | Method and device for electrically reading parameters of nonvolatile semiconductor memory |
CN113760606A (en) * | 2021-08-23 | 2021-12-07 | 东莞新能安科技有限公司 | Data management method, device and system of battery management system and battery pack |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105302482A (en) * | 2015-10-15 | 2016-02-03 | 北京友信宏科电子科技有限公司 | Parameter storage method and apparatus as well as automobile controller |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101216795A (en) * | 2007-12-29 | 2008-07-09 | 哈尔滨工业大学 | TMR fault tolerant computer |
US20080320464A1 (en) * | 2004-07-08 | 2008-12-25 | Andrew Corporation | Radio Base Station and a Method of Operating a Radio Base Station |
CN101923112A (en) * | 2010-07-26 | 2010-12-22 | 珠海中慧微电子有限公司 | Method for managing high reliability of electric energy measurement data |
-
2011
- 2011-12-20 CN CN2011104293224A patent/CN102521084B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080320464A1 (en) * | 2004-07-08 | 2008-12-25 | Andrew Corporation | Radio Base Station and a Method of Operating a Radio Base Station |
CN101216795A (en) * | 2007-12-29 | 2008-07-09 | 哈尔滨工业大学 | TMR fault tolerant computer |
CN101923112A (en) * | 2010-07-26 | 2010-12-22 | 珠海中慧微电子有限公司 | Method for managing high reliability of electric energy measurement data |
Cited By (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103246280A (en) * | 2012-12-04 | 2013-08-14 | 奇瑞汽车股份有限公司 | Electric automobile diagnostic system |
CN103246280B (en) * | 2012-12-04 | 2016-06-08 | 奇瑞新能源汽车技术有限公司 | A kind of electric automobile diagnostic system |
CN103914667B (en) * | 2012-12-29 | 2017-05-24 | 北京谊安医疗系统股份有限公司 | Safety electrically erasable programmable read only memory (EEPROM) reading method and system thereof |
CN105516230A (en) * | 2014-10-15 | 2016-04-20 | 深圳市腾讯计算机系统有限公司 | Data processing method and device |
CN105516230B (en) * | 2014-10-15 | 2019-06-25 | 深圳市腾讯计算机系统有限公司 | A kind of data processing method and device |
CN104317746A (en) * | 2014-10-27 | 2015-01-28 | 安徽江淮汽车股份有限公司 | Data redundancy access method for EEPROM (electrically erasable programmable read-only memory) |
CN104468793B (en) * | 2014-12-10 | 2017-11-03 | 北京奇虎科技有限公司 | Distributed data storage method and distributed data group system |
CN104468793A (en) * | 2014-12-10 | 2015-03-25 | 北京奇虎科技有限公司 | Distributed data storage method and distributed data clustering system |
CN105259150A (en) * | 2015-11-02 | 2016-01-20 | 深圳市锦瑞电子有限公司 | Fluorescence analyzer calibration system |
CN105259150B (en) * | 2015-11-02 | 2019-01-18 | 深圳市锦瑞生物科技有限公司 | A kind of fluorescence analyser scaling system |
CN105573676A (en) * | 2015-12-16 | 2016-05-11 | 浪潮(北京)电子信息产业有限公司 | Method for verifying data consistency in storage system |
CN105893182A (en) * | 2016-03-30 | 2016-08-24 | 苏州美天网络科技有限公司 | Backup method for data in hard disk |
CN105808388A (en) * | 2016-03-30 | 2016-07-27 | 苏州美天网络科技有限公司 | Hard disk data backup method |
CN107368757A (en) * | 2017-06-02 | 2017-11-21 | 九阳股份有限公司 | A kind of date storage method of cooking equipment |
CN110196680A (en) * | 2018-03-27 | 2019-09-03 | 腾讯科技(深圳)有限公司 | Data processing method, device and storage medium |
CN110196680B (en) * | 2018-03-27 | 2021-10-26 | 腾讯科技(深圳)有限公司 | Data processing method, device and storage medium |
CN110554888A (en) * | 2018-05-30 | 2019-12-10 | 北京兆易创新科技股份有限公司 | Method and device for electrically reading parameters of nonvolatile semiconductor memory |
CN109062822A (en) * | 2018-07-18 | 2018-12-21 | 北京世纪东方通讯设备有限公司 | A kind of storage method and device of locomotive wireless communication data |
CN109062822B (en) * | 2018-07-18 | 2021-09-07 | 北京世纪东方通讯设备有限公司 | Storage method and device for locomotive wireless communication data |
CN109542685A (en) * | 2018-11-20 | 2019-03-29 | 江门市兰格电子有限公司 | Checking memory data method, apparatus, equipment and medium based on more sectors |
CN109766212A (en) * | 2018-12-26 | 2019-05-17 | 贵州航天凯山石油仪器有限公司 | Data guard method and system in a kind of storaging medium |
CN113760606A (en) * | 2021-08-23 | 2021-12-07 | 东莞新能安科技有限公司 | Data management method, device and system of battery management system and battery pack |
Also Published As
Publication number | Publication date |
---|---|
CN102521084B (en) | 2013-11-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102521084B (en) | Data storage and reading method | |
CN107608826A (en) | A kind of fault recovery method, device and the medium of the node of storage cluster | |
CN100498796C (en) | Logic log generation method, database backup/ restoration method and system | |
US8904229B1 (en) | Online recovery of a file system experiencing failure of redundant logical storage storing a single point of failure | |
CN101887351B (en) | Fault-tolerance method and system for redundant array of independent disk | |
CN103577121A (en) | High-reliability linear file access method based on nand flash | |
CN102999564B (en) | Write the method for data, device and equipment | |
WO2014028261A1 (en) | De-duplicating attachments on message delivery and automated repair of attachments | |
CN111045870B (en) | Method, device and medium for saving and restoring metadata | |
CN113626256B (en) | Virtual machine disk data backup method, device, terminal and storage medium | |
CN104133740A (en) | Method for recovering abnormal power failure data | |
CN102231137B (en) | Data memory system and method | |
CN103034564A (en) | Data disaster tolerance demonstration and practicing method and data disaster tolerance demonstration and practicing device and system | |
CN104899114A (en) | Continuous time data protection method on solid state drive | |
CN110399247A (en) | A kind of data reconstruction method, device, equipment and computer readable storage medium | |
CN107918568A (en) | A kind of method for preventing linux system from restarting failure | |
CN103984768A (en) | Data management method for database cluster, nodes and data management system for database cluster | |
CN103530242B (en) | Nand Flash memorizer write operation process power down means of defence | |
CN103514063B (en) | Method and device for processing FLASH data | |
CN103902227B (en) | It is a kind of to support the additional document storage mode write and share and read | |
CN105538917A (en) | Anti-error consumable chip and control method thereof | |
CN101848274A (en) | Methods and devices for backup and recovery of records in mobile terminal | |
CN106875977A (en) | A kind of solid state hard disc adjustment method and device | |
CN106528342A (en) | Disk array fault tolerance apparatus with cloud server backup function | |
CN106599006B (en) | Data recovery method and device |
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 |