CN102402470A - Method and device for automatically correcting error of program of flash memory and repairing program of flash memory - Google Patents

Method and device for automatically correcting error of program of flash memory and repairing program of flash memory Download PDF

Info

Publication number
CN102402470A
CN102402470A CN2011104258860A CN201110425886A CN102402470A CN 102402470 A CN102402470 A CN 102402470A CN 2011104258860 A CN2011104258860 A CN 2011104258860A CN 201110425886 A CN201110425886 A CN 201110425886A CN 102402470 A CN102402470 A CN 102402470A
Authority
CN
China
Prior art keywords
program
flash memory
original program
original
test value
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.)
Pending
Application number
CN2011104258860A
Other languages
Chinese (zh)
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.)
Hisense TransTech Co Ltd
Qingdao Hisense Network Technology Co Ltd
Original Assignee
Qingdao Hisense Network 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 Qingdao Hisense Network Technology Co Ltd filed Critical Qingdao Hisense Network Technology Co Ltd
Priority to CN2011104258860A priority Critical patent/CN102402470A/en
Publication of CN102402470A publication Critical patent/CN102402470A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a method and a device for automatically correcting an error of a program of a flash memory and repairing the program of the flash memory. The method comprises the following steps of: before an original program which is stored in the flash memory runs, checking the integrity of the original program; and if the original program is incomplete, covering the original program which is stored in the flash memory with a standby program which is pre-stored. By checking the integrity of the original program before the original program runs and covering the original program with the standby program when the original program is incomplete, embedded equipment can be normally started to run, abnormal running, caused by damage of the original program, of the embedded equipment is avoided, and the reliability of a program system of the embedded equipment is improved.

Description

Flash memory Automatic Program error correction restorative procedure and device
Technical field
The present invention relates to technical field of data storage, relate in particular to a kind of flash memory Automatic Program error correction restorative procedure and device.
Background technology
At present, a lot of embedded devices adopt flash chip to come stored programme and data, though flash memory is the device that data can not be lost after a kind of power down; But still have the corrupted data that causes being stored in flush memory device of some abnormal conditions; If this thing happens, will make equipment work unusual, if this damage occurs in the program; System can't be started, cause the programming system reliability of embedded device lower.
Summary of the invention
The present invention provides a kind of flash memory Automatic Program error correction restorative procedure and device, in order to solve the lower defective of programming system reliability of embedded device in the prior art, realizes improving the programming system reliability of embedded device.
The present invention provides a kind of flash memory Automatic Program error correction restorative procedure, comprising:
Before the original program operation of in flash memory, storing, original program is carried out completeness check;
If original program is imperfect, the stand-by program that then will store in advance covers the original program of storing in the flash memory.
Flash memory Automatic Program error correction restorative procedure provided by the invention; Through before the original program operation, earlier original program being carried out completeness check; And when confirming that original program is imperfect, stand-by program is covered original program, can guarantee that embedded device can normally start operation; Avoid occurring causing embedded device normally to move, realize having improved the programming system reliability of embedded device because of original program damages.
Aforesaid flash memory Automatic Program error correction restorative procedure; Original program is carried out completeness check; Be specially: adopt Message Digest 5 or hash algorithm that original program is carried out completeness check with the acquisition proof test value, and judge whether proof test value is identical with the former proof test value of storage in advance; If identical, confirming that original program is complete; If inequality, confirm that then original program is imperfect.
Aforesaid flash memory Automatic Program error correction restorative procedure also comprises: if original program is complete, judge then whether the proof test value of original program is identical with the backup proof test value of stand-by program corresponding stored; If different, then original program covered stand-by program, and will back up proof test value and change to proof test value.
Aforesaid flash memory Automatic Program error correction restorative procedure; If original program is imperfect; The stand-by program that then will store in advance covers the original program of storing in the flash memory; Be specially: if original program is imperfect, then earlier original program is backed up, and then the stand-by program that will store in advance covers the original program of storing in the flash memory.
On the External memory equipment that aforesaid flash memory Automatic Program error correction restorative procedure, stand-by program are stored in the flash memory or are stored in flash memory is connected.
The present invention provides a kind of flash memory Automatic Program error correction prosthetic device, comprising:
The verification module is used for before the original program operation that flash memory is stored, original program being carried out completeness check;
Processing module is used for if original program is imperfect, and the stand-by program that then will store in advance covers the original program of storing in the flash memory.
Flash memory Automatic Program error correction prosthetic device provided by the invention; Through before the original program operation, earlier original program being carried out completeness check; And when confirming that original program is imperfect, stand-by program is covered original program, can guarantee that embedded device can normally start operation; Avoid occurring causing embedded device normally to move, realize having improved the programming system reliability of embedded device because of original program damages.
Aforesaid flash memory Automatic Program error correction prosthetic device, verification module also are used to adopt Message Digest 5 or hash algorithm that original program is carried out completeness check with the acquisition proof test value, and judge whether proof test value is identical with the former proof test value of storage in advance; If identical, confirming that original program is complete; If inequality, confirm that then original program is imperfect.
Aforesaid flash memory Automatic Program error correction prosthetic device also comprises: judge module is used for judging then whether the proof test value of original program is identical with the backup proof test value of stand-by program corresponding stored if original program is complete; If update module is used for then original program being covered stand-by program different, and will back up proof test value and change to proof test value.
Aforesaid flash memory Automatic Program error correction prosthetic device, processing module also are used for if original program is imperfect, then earlier original program is backed up, and then the stand-by program that will store in advance cover the original program of storing in the flash memory.
On the External memory equipment that aforesaid flash memory Automatic Program error correction prosthetic device, stand-by program are stored in the flash memory or are stored in flash memory is connected.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do one to the accompanying drawing of required use in embodiment or the description of the Prior Art below introduces simply; Obviously, the accompanying drawing in describing below is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work property, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the process flow diagram of flash memory Automatic Program error correction restorative procedure embodiment of the present invention;
Fig. 2 is the structural representation of flash memory Automatic Program error correction prosthetic device embodiment of the present invention.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer; To combine the accompanying drawing in the embodiment of the invention below; Technical scheme in the embodiment of the invention is carried out clear, intactly description; Obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, the every other embodiment that those of ordinary skills are obtained under the prerequisite of not making creative work belongs to the scope that the present invention protects.
Fig. 1 is the process flow diagram of flash memory Automatic Program error correction restorative procedure embodiment of the present invention.As shown in Figure 1, present embodiment flash memory Automatic Program error correction restorative procedure comprises:
Before step 1, the original program of in flash memory, storing move, original program is carried out completeness check.
Concrete, step 1 will be carried out completeness check to original program in advance before the original program in its flash memory of built-in equipment operation, thereby will judge whether original program damages.
Step 2, imperfect as if original program, the stand-by program that then will store in advance covers the original program of storing in the flash memory.
Concrete, if step 1 verification learns that the original program in the flash memory is imperfect, then can the stand-by program of storing in advance be covered original program, thereby guarantee that embedded device can normally start through step 2, improved the programming system reliability of embedded device.Preferably, step 1 can for: if original program is imperfect, then earlier original program is backed up, and then the stand-by program that will store in advance covers the original program of storing in the flash memory, thus the error reason of handled easily man analysis original program.
Wherein, on the External memory equipment that the stand-by program in the present embodiment flash memory Automatic Program error correction restorative procedure is stored in the flash memory or is stored in flash memory is connected.
Present embodiment flash memory Automatic Program error correction restorative procedure can adopt multiple mode that the original program in the flash memory is carried out verification; Preferably; Step 1 in the present embodiment is specially: adopt Message Digest 5 or hash algorithm that original program is carried out completeness check with the acquisition proof test value, and judge whether proof test value is identical with the former proof test value of storage in advance; If identical, confirming that original program is complete; If inequality, confirm that then original program is imperfect.Concrete, the principal character of Message Digest 5 is that ciphering process does not need key, and can't be deciphered through ciphered data, has only the identical clear data of input just can obtain identical ciphertext through identical Message Digest 5.There is not the management and the distribution problem of key in Message Digest 5, is suitable for mutually the same use of distributed network.Because the workload of its computations is considerable, so former this algorithm only is used for the encryption under the data volume condition of limited usually, for example the irreversible encryption algorithm for encryption used in the password of computing machine.In recent years, along with the improvement at full speed of the identical performance of computing machine, enciphering rate no longer becomes the yoke of this encryption technology development of restriction, thereby the field that Message Digest 5 is used constantly increases.And the hash algorithm hash algorithm is mapped as the less binary value of regular length with the binary value of random length, and this little binary value is called cryptographic hash.Cryptographic hash is the unique and extremely compact numeric representation form of one piece of data.If one section plaintext of hash and even only change a letter of this paragraph, Hash subsequently all will produce different values.Finding hash is two different inputs of same value, on calculating, is impossible, so the integrality that the cryptographic hash of data can check data.Whether step 1 is identical with the former proof test value of prior storage through the proof test value of original program in the verification flash memory, just can make things convenient for and judge accurately whether original program is complete.Wherein, former proof test value is the value corresponding with original program of user's in flash memory, copy original program time storage.
Present embodiment flash memory Automatic Program error correction restorative procedure; Through before the original program operation, earlier original program being carried out completeness check; And when confirming that original program is imperfect; Stand-by program is covered original program, can guarantee that embedded device can normally start operation, avoid occurring causing embedded device normally to move because of original program damages.
Based on technique scheme, optional, present embodiment flash memory Automatic Program error correction restorative procedure also comprises:
Step 3, complete as if original program judges then whether the proof test value of original program is identical with the backup proof test value of stand-by program corresponding stored.
Concrete, after step 1 verification confirmed that original program is complete, whether the proof test value of the original program that obtains through step 3 determining step 1 was identical with the backup proof test value of stand-by program corresponding stored.
Step 4, if different, then original program is covered stand-by program, and will back up proof test value and change to proof test value.
Concrete, if judge through step 3 and to learn proof test value and to back up proof test value different, explain that then original program upgraded; Then original program is covered stand-by program through step 4; Simultaneously, will back up proof test value and change to proof test value, thus the stand-by program after obtaining to upgrade.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be accomplished through the relevant hardware of programmed instruction; Aforesaid program can be stored in the computer read/write memory medium; This program the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
Fig. 2 is the structural representation of flash memory Automatic Program error correction prosthetic device embodiment of the present invention.As shown in Figure 2, present embodiment flash memory Automatic Program error correction prosthetic device comprises: verification module 1 and processing module 2.
Verification module 1 is used for before the original program operation that flash memory is stored, original program being carried out completeness check.Concrete, the verification module 1 in the present embodiment can also be used to adopt Message Digest 5 or hash algorithm that original program is carried out completeness check with the acquisition proof test value, and judges whether proof test value is identical with the former proof test value of storage in advance; If identical, confirming that original program is complete; If inequality, confirm that then original program is imperfect.
Processing module 2 is used for if original program is imperfect, and the stand-by program that then will store in advance covers the original program of storing in the flash memory.Concrete, processing module 2 can also be used for if original program is imperfect, then earlier original program is backed up, and then the stand-by program that will store in advance covers the original program of storing in the flash memory.
Further, present embodiment flash memory Automatic Program error correction prosthetic device can also comprise: judge module 3 is used for judging then whether the proof test value of original program is identical with the backup proof test value of stand-by program corresponding stored if original program is complete; If update module 4 is used for then original program being covered stand-by program different, and will back up proof test value and change to proof test value.
Wherein, on the External memory equipment that the stand-by program in the present embodiment is stored in the flash memory or is stored in flash memory is connected.
Present embodiment flash memory Automatic Program error correction prosthetic device; Through before the original program operation, earlier original program being carried out completeness check; And when confirming that original program is imperfect; Stand-by program is covered original program, can guarantee that embedded device can normally start operation, avoid occurring causing embedded device normally to move because of original program damages.
What should explain at last is: above embodiment is only in order to explaining technical scheme of the present invention, but not to its restriction; Although with reference to previous embodiment the present invention has been carried out detailed explanation, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these are revised or replacement, do not make the spirit and the scope of the essence disengaging various embodiments of the present invention technical scheme of relevant art scheme.

Claims (10)

1. a flash memory Automatic Program error correction restorative procedure is characterized in that, comprising:
Before the original program operation of in flash memory, storing, original program is carried out completeness check;
If original program is imperfect, the stand-by program that then will store in advance covers the original program of storing in the flash memory.
2. flash memory Automatic Program error correction restorative procedure according to claim 2 is characterized in that, original program is carried out completeness check, is specially:
Adopt Message Digest 5 or hash algorithm that original program is carried out completeness check with the acquisition proof test value, and judge whether proof test value is identical with the former proof test value of storage in advance; If identical, confirming that original program is complete; If inequality, confirm that then original program is imperfect.
3. flash memory Automatic Program error correction restorative procedure according to claim 2 is characterized in that, also comprises:
If original program is complete, judge then whether the proof test value of original program is identical with the backup proof test value of stand-by program corresponding stored;
If different, then original program covered stand-by program, and will back up proof test value and change to proof test value.
4. flash memory Automatic Program error correction restorative procedure according to claim 1 is characterized in that, if original program is imperfect, the stand-by program that then will store in advance covers the original program of storing in the flash memory, is specially:
If original program is imperfect, then earlier original program is backed up, and then the stand-by program that will store in advance covers the original program of storing in the flash memory.
5. flash memory Automatic Program error correction restorative procedure according to claim 1 is characterized in that, on the External memory equipment that stand-by program is stored in the flash memory or is stored in flash memory is connected.
6. a flash memory Automatic Program error correction prosthetic device is characterized in that, comprising:
The verification module is used for before the original program operation that flash memory is stored, original program being carried out completeness check;
Processing module is used for if original program is imperfect, and the stand-by program that then will store in advance covers the original program of storing in the flash memory.
7. flash memory Automatic Program error correction prosthetic device according to claim 1; It is characterized in that; The verification module also is used to adopt Message Digest 5 or hash algorithm that original program is carried out completeness check with the acquisition proof test value, and judges whether proof test value is identical with the former proof test value of storage in advance; If identical, confirming that original program is complete; If inequality, confirm that then original program is imperfect.
8. flash memory Automatic Program error correction prosthetic device according to claim 7 is characterized in that, also comprises:
Judge module is used for judging then whether the proof test value of original program is identical with the backup proof test value of stand-by program corresponding stored if original program is complete;
If update module is used for then original program being covered stand-by program different, and will back up proof test value and change to proof test value.
9. flash memory Automatic Program error correction prosthetic device according to claim 6 is characterized in that, processing module also is used for if original program is imperfect, then earlier original program is backed up, and then the stand-by program that will store in advance covers the original program of storing in the flash memory.
10. flash memory Automatic Program error correction prosthetic device according to claim 6 is characterized in that, on the External memory equipment that stand-by program is stored in the flash memory or is stored in flash memory is connected.
CN2011104258860A 2011-12-19 2011-12-19 Method and device for automatically correcting error of program of flash memory and repairing program of flash memory Pending CN102402470A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011104258860A CN102402470A (en) 2011-12-19 2011-12-19 Method and device for automatically correcting error of program of flash memory and repairing program of flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011104258860A CN102402470A (en) 2011-12-19 2011-12-19 Method and device for automatically correcting error of program of flash memory and repairing program of flash memory

Publications (1)

Publication Number Publication Date
CN102402470A true CN102402470A (en) 2012-04-04

Family

ID=45884698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011104258860A Pending CN102402470A (en) 2011-12-19 2011-12-19 Method and device for automatically correcting error of program of flash memory and repairing program of flash memory

Country Status (1)

Country Link
CN (1) CN102402470A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544026A (en) * 2012-07-11 2014-01-29 国基电子(上海)有限公司 Electronic device capable of being safely upgraded and upgrading method
CN104239163A (en) * 2013-06-19 2014-12-24 腾讯科技(深圳)有限公司 Software repair method and software repair device
CN104298935A (en) * 2014-09-25 2015-01-21 广东欧珀移动通信有限公司 Embedded device firmware protecting method and device
CN107480007A (en) * 2017-08-15 2017-12-15 南京南瑞继保电气有限公司 A kind of method of program redundancy check and error correction
CN108304140A (en) * 2017-01-12 2018-07-20 中兴通讯股份有限公司 Flash data management method, device and microcontroller
CN109885342A (en) * 2019-02-25 2019-06-14 深圳警翼智能科技股份有限公司 A kind of system program restorative procedure of law-enforcing recorder
CN116775145A (en) * 2023-05-04 2023-09-19 合芯科技(苏州)有限公司 Method, device, equipment and storage medium for starting and recovering server

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040172426A1 (en) * 2003-02-27 2004-09-02 Fujitsu Limited Method of and apparatus for taking back-up and checking alteration of data, and computer product
CN1991779A (en) * 2005-12-30 2007-07-04 联想(北京)有限公司 Safety chip based virus prevention method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040172426A1 (en) * 2003-02-27 2004-09-02 Fujitsu Limited Method of and apparatus for taking back-up and checking alteration of data, and computer product
CN1991779A (en) * 2005-12-30 2007-07-04 联想(北京)有限公司 Safety chip based virus prevention method

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544026A (en) * 2012-07-11 2014-01-29 国基电子(上海)有限公司 Electronic device capable of being safely upgraded and upgrading method
CN103544026B (en) * 2012-07-11 2016-12-21 国基电子(上海)有限公司 Can the electronic installation of safety upgrade and upgrade method
CN104239163A (en) * 2013-06-19 2014-12-24 腾讯科技(深圳)有限公司 Software repair method and software repair device
CN104239163B (en) * 2013-06-19 2016-04-13 腾讯科技(深圳)有限公司 Software repair and device
CN104298935A (en) * 2014-09-25 2015-01-21 广东欧珀移动通信有限公司 Embedded device firmware protecting method and device
CN108304140A (en) * 2017-01-12 2018-07-20 中兴通讯股份有限公司 Flash data management method, device and microcontroller
CN108304140B (en) * 2017-01-12 2023-04-07 中兴通讯股份有限公司 Flash memory data management method and device and microcontroller
CN107480007A (en) * 2017-08-15 2017-12-15 南京南瑞继保电气有限公司 A kind of method of program redundancy check and error correction
CN107480007B (en) * 2017-08-15 2020-09-08 南京南瑞继保电气有限公司 Program redundancy check and error correction method
CN109885342A (en) * 2019-02-25 2019-06-14 深圳警翼智能科技股份有限公司 A kind of system program restorative procedure of law-enforcing recorder
CN116775145A (en) * 2023-05-04 2023-09-19 合芯科技(苏州)有限公司 Method, device, equipment and storage medium for starting and recovering server

Similar Documents

Publication Publication Date Title
CN102402470A (en) Method and device for automatically correcting error of program of flash memory and repairing program of flash memory
US9621549B2 (en) Integrated circuit for determining whether data stored in external nonvolative memory is valid
US10205747B2 (en) Protection for computing systems from revoked system updates
CN102163268B (en) The term of execution verifying software code the method and apparatus of integrality
US20130198523A1 (en) Method and apparatus for checking field replaceable unit, and communication device
CN100562859C (en) The method and apparatus of the operational scheme of test procedure
CN103164523A (en) Inspection method, device and system of data consistency inspection
CN107770622A (en) The method and operating method of file in a kind of renewal linux system
CN104268291A (en) Data consistency processing method and system
CN101923476A (en) File installation system and file installation method
CN109766140A (en) A kind of localization method and device that set-top box starting is abnormal
CN104765652A (en) Data backup and data recovery method and device
CN103093130A (en) Hardware binding information encryption method and network device
CN110704236B (en) On-line checking method for chip flash data and computer storage medium
CN110007956A (en) A kind of method and device of dynamic configuration log
CN103425932A (en) Signature calibration method and terminal device
CN102662871A (en) Trusted cryptography module based system and method for protection of virtual disk completeness
CN102520223A (en) Software anti-interference method used for electric energy meter
CN110851821A (en) Android intelligent device APK safety management and control method
CN109933351A (en) A kind of method and apparatus of reparation and upgrading linux system
CN109800579A (en) A kind of integrity checking method of software, device and electronic equipment
CN104898985A (en) Storage device, controller, and data writing method
CN109063468A (en) A kind of installation kit integrity verification and the method for reparation
CN107545185A (en) Android mobile terminal administration authority detection method, device, terminal and storage medium
CN104935650A (en) File transmission method, system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20120404

RJ01 Rejection of invention patent application after publication