CN102075621A - Method for safely storing multimedia messages of mobile phone and performing power-off protection - Google Patents

Method for safely storing multimedia messages of mobile phone and performing power-off protection Download PDF

Info

Publication number
CN102075621A
CN102075621A CN2010106084892A CN201010608489A CN102075621A CN 102075621 A CN102075621 A CN 102075621A CN 2010106084892 A CN2010106084892 A CN 2010106084892A CN 201010608489 A CN201010608489 A CN 201010608489A CN 102075621 A CN102075621 A CN 102075621A
Authority
CN
China
Prior art keywords
index file
file
mailbox
multimedia message
mobile phone
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
CN2010106084892A
Other languages
Chinese (zh)
Other versions
CN102075621B (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.)
Jiangsu Rong Hui Electric Equipment Manufacturing Co., Ltd.
Original Assignee
Shanghai Wingtech 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 Shanghai Wingtech Electronic Technology Co Ltd filed Critical Shanghai Wingtech Electronic Technology Co Ltd
Priority to CN201010608489.2A priority Critical patent/CN102075621B/en
Publication of CN102075621A publication Critical patent/CN102075621A/en
Application granted granted Critical
Publication of CN102075621B publication Critical patent/CN102075621B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method for safely storing multimedia messages of a mobile phone and performing power-off protection, which is used for backing up an index file of a mailbox for the multimedia messages so as to prevent the loss of multimedia message data when the mobile phone is powered off. Therefore, if the mobile phone is powered off during the process of processing the multimedia messages of the mobile phone, the integrity and the consistency of multimedia message files and the index file can be ensured to the maximum extent by analyzing and utilizing the processed multimedia message files, the index file of the mailbox and the backup index file of the mailbox after rebooting, and the shutdown phenomenon of a system due to the loss of the multimedia messages and the incapability of realizing multimedia message space caused by data errors in the index file can be also avoided.

Description

A kind of safe storage cell phone multimedia message also carries out the method for power down protection
Technical field
The present invention relates to the mobile phone data security field of storage, particularly a kind of safe storage cell phone multimedia message also carries out the method for power down protection.
Background technology
In mobile phone, particularly some low and middle-end mobile phones in order to accelerate access, sort etc., and the storage of multimedia message often adopts multilevel data structure to exist on FLASH or the T card with the form of file.These files comprise:
(1) multimedia message mailbox (inbox, outbox ...): preserve all mailbox numbers, multimedia message mailbox title, index file name.
(2) index file of mailbox: preserve multimedia message number in the mailbox, and the header of each multimedia message, comprise timestamp, addressee, the filename of title and storage MMS content etc.
(3) MMS content file: store the file of concrete MMS content, hereinafter to be referred as multimedia message files.
In storing process (increasing deletion, change),, also need to upgrade the index file (2) of mailbox except storing multimedia message files (3) itself.Like this if power down suddenly in the storing process, though the mobile phone file system has simple Restoration Mechanism, but can inevitably can make multimedia message files (3) and index file (2) inconsistent, even multimedia message files, index file is destroyed.When doing deletion action, certain multimedia message files is deleted, unexpected power down when upgrading index file.May cause like this index file imperfect or even lose, thereby the multimedia message of some possibly can't indexedly but forever take file system space to causing multimedia message files to be read in this mailbox.Even just make mistakes when causing the access index file, cause system in case of system halt easily.
Summary of the invention
The purpose of this invention is to provide a kind of safe storage cell phone multimedia message and carry out the method for power down protection, it can realize that the safe storage of cell phone multimedia message and power down do not lose.
The invention provides a kind of safe storage cell phone multimedia message and carry out the method for power down protection, may further comprise the steps:
1.1, multimedia message stored content file in the described mobile phone mailbox is carried out operational processes;
1.2, the backup described step 1.1 in the pairing mailbox index file of multimedia message content file, it is write described mobile phone memory bank;
1.3, finish the operational processes of described step 1.1 after, upgrade the pairing mailbox index file of described MMS content file;
1.4, the deletion described step 1.2 in the backup the mailbox index file.
The operational processes of described step 1.1 comprises increase, deletion and change.
In the described step 1.3, file size by recomputating described mailbox index file and verification and, realize the renewal of the pairing mailbox index file of described MMS content file.
Calculate the verification of described mailbox index file and be meant by per 16 of the regular length filename in each multimedia message indexing head are carried out complement of one's summation.
Described method also comprises the step of recovering described multimedia message when described mobile phone after step 1.1 power down:
When described step 1.1 pair described MMS content file is deleted or changed operational processes,, then open the mailbox index file of described multimedia message and also the index of this multimedia message is deleted and renewal if read described MMS content file error behind the reopening machine;
When described step 1.1 pair described MMS content file carries out the deletion action processing,, then open the mailbox index file of described multimedia message and also the index of this multimedia message is deleted and renewal if do not find described MMS content file behind the reopening machine;
When described step 1.1 pair described MMS content file increases operational processes, if find behind the reopening machine that the MMS content file generates, but its index is not included in the described mailbox index file, then scans described mailbox index file, deletes not indexed MMS content file.
Described method also comprises the step of recovering described multimedia message when described mobile phone after step 1.2 power down:
Behind the reopening machine, do not find the mailbox index file of described backup, then read former mailbox index file and back up;
Behind the reopening machine, find the mailbox index file of described backup, then upgrade former mailbox index file.
Described method also comprises the step of recovering described multimedia message when described mobile phone after step 1.3 power down:
Detect behind the reopening machine that index file does not exist or file size and check code incorrect, then the mailbox index file with described backup recovers;
Behind the reopening machine, detect index file and exist, then upgrade the pairing mailbox index file of described MMS content file.
Described method also comprises the step of recovering described multimedia message when described mobile phone after step 1.4 power down:
Detect the check code and the file size of described mailbox index file and backup mailbox index file behind the reopening machine;
Be effective document if detect described mailbox index file and back up the mailbox index file, then keep described mailbox index file, delete described backup mailbox index file.
Adopt a kind of safe storage cell phone multimedia message of the present invention and carry out the method for power down protection, its multimedia message data when making the mobile phone power down is not lost, and the mailbox index file of described multimedia message is backed up.So, mobile phone is if cut off the power supply in the process of handling cell phone multimedia message, by behind the reopening machine to the analysis and the utilization of the mailbox index file of multimedia message files, mailbox index file and the backup handled, maximum integrality and the consistency that guarantees multimedia message files and index file to greatest extent avoided because the index file error in data causes multimedia message to be lost and the multimedia message space can not discharge the phenomenon that causes system in case of system halt.
Description of drawings
Fig. 1 is the flow chart of safe storage multimedia message in the method for the invention.
Embodiment
Further specify technical scheme of the present invention below in conjunction with drawings and Examples.
Introduce the storage organization of multimedia message earlier, form by the index file (table 1) and the MMS content file (table 2) of mailbox:
Table 1:
Figure BSA00000400326500031
Table 2:
Figure BSA00000400326500041
Referring to Fig. 1, Fig. 1 has shown the flow process 100 of safe storage multimedia message among the present invention, may further comprise the steps:
101, multimedia message stored content file in the described mobile phone mailbox is carried out operational processes.Operational processes comprises the operation of increase, deletion and change.
Can store the content of (increasing deletion, change) multimedia message earlier, such as multimedia message n; For deletion action, delete MMS content file itself earlier; Preserve the content of multimedia message earlier for increasing operation; For the change multimedia message, upgrade multimedia message files itself earlier.
102, the pairing mailbox index file of multimedia message content file in the described step 101 of backup writes described mobile phone memory bank with it.
For the mailbox index file that guarantees to back up can be updated on the module (FLASH, or T card) at once, need the Sync that calls of demonstration or implicit expression to operate.
103, finish the operational processes of described step 101 after, upgrade the pairing mailbox index file of described MMS content file.
Upgrade described mailbox index file, specifically be meant and recomputate index file length and verification and and it is write in the file.For ease of detecting file availability and accelerating the index file visit, the index of each multimedia message can adopt regular length, is 2m byte such as file name.Verification and calculating can be simply by per 16 of filename (regular length) in each multimedia message indexing head is carried out complement of one's summation.Promptly n multimedia message, each length is m 16 complements of one's summation.
104, the mailbox index file of backup in the described step 102 of deletion.
Whether start next time can exist by backup file judges that the multimedia message storing process has not unusually.
If mobile phone sudden power in above-mentioned four operating process, step 101,102,103 and 104 all might be interrupted:
If step 101 is interrupted, during mailbox, index file can normally be opened under start visit next time:
(i) for deletion or upgrade operation, if multimedia message n file exists but content is destroyed, content showed mistake when that read this multimedia message.But the user can also pass through deletion action, and the index that can remove this multimedia message in the indexed file is to guarantee the consistency of index file and multimedia message files.
(ii),, but also have in the index file if multimedia message n file is deleted for deletion action.When opening this mailbox, the file of this multimedia message index of system discovery does not exist, and just removes the index of multimedia message n in the index file and upgrades it.
(iii),, but in the index file of correspondence, there be not indexed arriving if multimedia message n file generates for increasing operation.In this case, when can be in system idle, remove to scan the index file of all mailbox, to do not have indexed to multimedia message files delete.Here be at idle scanning index file, and general cell phone multimedia message bar number is more limited, can very big load not arranged to system.
If be interrupted in step 102 backup procedure, can identify by detecting backup mailbox index file when start shooting next time.At this moment can be with the file of original index, the situation in producing (ii) takes (ii) the same way to upgrade index file; When the situation that produces (iii), take (iii) the same way to handle.Such as: behind the reopening machine, do not find the mailbox index file of described backup, then read former mailbox index file and back up; Behind the reopening machine, find the mailbox index file of described backup, then upgrade former mailbox index file.
If be interrupted in the mailbox index file process that step 103 is upgraded, can detect during the next time start that the mailbox index file does not exist or file size and check code incorrect.Mailbox index file with backup recovers, and the file of deletion backup.So also can produce (ii) or the situation (iii), so take (ii) or (iii) the same way is upgraded the mailbox index file.Such as: detect behind the reopening machine that index file does not exist or file size and check code incorrect, then the mailbox index file with described backup recovers; Behind the reopening machine, detect index file and exist, then upgrade the pairing mailbox index file of described MMS content file.
If be interrupted in step 104, next start can be checked through mailbox index file and backup mailbox index file file simultaneously.Check two files verification and and length field, serve as preferential under the situation effectively all at two files with the mailbox index file after upgrading, the mailbox index file is backed up in deletion.
Embodiment below by a concrete deletion multimedia message further sets forth the inventive method:
Such as deleting multimedia message MMSn in the multimedia message inbox, suppose that index file is called INBOX.BIN.
Delete procedure is as follows:
(1) finds in the index file MMSn corresponding file name among the INBOX.BIN, delete this file;
(2) backup INBOX.BIN generates INBOX_BK.BIN and writes module (FLASH, T card);
(3) in INBOX.BIN, remove the index information of MMSn, upgrade the multimedia message number, index file length, recomputate verification and, and write file;
(4) the backup file INBOX_BK.BIN in the deletion step (2).
After the mobile phone power down, recovery process is as follows when visiting multimedia message when reopening machine:
(1) check that inbox has or not index backup file INBOX_BK.BIN, and index file INBOX.BIN;
(i) if backup file INBOX_BK.BIN exists, index file INBOX.BIN does not exist then and recovers with INBOX_BK.BIN, and deletion INBOX_BK.BIN;
(ii) if both exist simultaneously, then by length and verification and their validity of inspection. if INBOX.BIN is effective, deletion INBOX_BK.BIN; Otherwise recover INBOX.BIN, and deletion INBOX_BK.BIN with INBOX_BK.BIN;
(iii) if INBOX.BIN exists, backup file does not exist and then shows the abnormal problem that does not have deletion.
When (2) opening file MMSn:
(i) the MMSn file does not exist, then upgrade the INBOX.BIN index file (remove the index entry of MMSn, upgrade the multimedia message number, file size, recomputate verification and).
(ii) the MMSn file exists but error in data, can optionally upgrade the INBOX.BIN index file (remove the index entry of MMSn, upgrade the multimedia message number, file size, recomputate verification and).
Those of ordinary skill in the art will be appreciated that, above embodiment is used for illustrating the present invention, and be not to be used as limitation of the invention, as long as in connotation scope of the present invention, all will drop in claims scope of the present invention variation, the modification of above embodiment.

Claims (8)

1. a safe storage cell phone multimedia message and carry out the method for power down protection is characterized in that, may further comprise the steps:
1.1, multimedia message stored content file in the described mobile phone mailbox is carried out operational processes;
1.2, the backup described step 1.1 in the pairing mailbox index file of multimedia message content file, it is write described mobile phone memory bank;
1.3, finish the operational processes of described step 1.1 after, upgrade the pairing mailbox index file of described MMS content file;
1.4, the deletion described step 1.2 in the backup the mailbox index file.
2. the method for claim 1 is characterized in that, the operational processes of described step 1.1 comprises increase, deletion and change.
3. method as claimed in claim 1 or 2 is characterized in that, in the described step 1.3, file size by recomputating described mailbox index file and verification and, realize the renewal of the pairing mailbox index file of described MMS content file.
4. method as claimed in claim 3 is characterized in that, calculates the verification of described mailbox index file and is meant by per 16 of the regular length filename in each multimedia message indexing head are carried out complement of one's summation.
5. method as claimed in claim 2 is characterized in that, described method also comprises the step of recovering described multimedia message when described mobile phone after step 1.1 power down:
When described step 1.1 pair described MMS content file is deleted or changed operational processes,, then open the mailbox index file of described multimedia message and also the index of this multimedia message is deleted and renewal if read described MMS content file error behind the reopening machine;
When described step 1.1 pair described MMS content file carries out the deletion action processing,, then open the mailbox index file of described multimedia message and also the index of this multimedia message is deleted and renewal if do not find described MMS content file behind the reopening machine;
When described step 1.1 pair described MMS content file increases operational processes, if find behind the reopening machine that the MMS content file generates, but its index is not included in the described mailbox index file, then scans described mailbox index file, deletes not indexed MMS content file.
6. method as claimed in claim 2 is characterized in that, described method also comprises the step of recovering described multimedia message when described mobile phone after step 1.2 power down:
Behind the reopening machine, do not find the mailbox index file of described backup, then read former mailbox index file and back up;
Behind the reopening machine, find the mailbox index file of described backup, then upgrade former mailbox index file.
7. method as claimed in claim 2 is characterized in that, described method also comprises the step of recovering described multimedia message when described mobile phone after step 1.3 power down:
Detect behind the reopening machine that index file does not exist or file size and check code incorrect, then the mailbox index file with described backup recovers;
Behind the reopening machine, detect index file and exist, then upgrade the pairing mailbox index file of described MMS content file.
8. method as claimed in claim 2 is characterized in that, described method also comprises the step of recovering described multimedia message when described mobile phone after step 1.4 power down:
Detect the check code and the file size of described mailbox index file and backup mailbox index file behind the reopening machine;
Be effective document if detect described mailbox index file and back up the mailbox index file, then keep described mailbox index file, delete described backup mailbox index file.
CN201010608489.2A 2010-12-23 2010-12-23 A kind of safe storage cell phone multimedia message also carries out the method for power down protection Expired - Fee Related CN102075621B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010608489.2A CN102075621B (en) 2010-12-23 2010-12-23 A kind of safe storage cell phone multimedia message also carries out the method for power down protection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010608489.2A CN102075621B (en) 2010-12-23 2010-12-23 A kind of safe storage cell phone multimedia message also carries out the method for power down protection

Publications (2)

Publication Number Publication Date
CN102075621A true CN102075621A (en) 2011-05-25
CN102075621B CN102075621B (en) 2015-10-07

Family

ID=44033958

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010608489.2A Expired - Fee Related CN102075621B (en) 2010-12-23 2010-12-23 A kind of safe storage cell phone multimedia message also carries out the method for power down protection

Country Status (1)

Country Link
CN (1) CN102075621B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981779A (en) * 2012-11-22 2013-03-20 华为技术有限公司 Data processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040111481A1 (en) * 2002-12-09 2004-06-10 Lg Electronics Inc. Method and apparatus to forward a multimedia message
CN1822174A (en) * 2005-12-08 2006-08-23 杭州海康威视数字技术有限公司 Method for protecting hardware key information area in embedded device
CN101610477A (en) * 2009-07-13 2009-12-23 中兴通讯股份有限公司 The treatment system of multimedia messaging service, MMS and method
CN101662760A (en) * 2009-07-31 2010-03-03 中兴通讯股份有限公司 Method and system for backing up terminal data
CN101763490A (en) * 2009-12-18 2010-06-30 东信和平智能卡股份有限公司 Data movement method for flash intelligent card

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040111481A1 (en) * 2002-12-09 2004-06-10 Lg Electronics Inc. Method and apparatus to forward a multimedia message
CN1822174A (en) * 2005-12-08 2006-08-23 杭州海康威视数字技术有限公司 Method for protecting hardware key information area in embedded device
CN101610477A (en) * 2009-07-13 2009-12-23 中兴通讯股份有限公司 The treatment system of multimedia messaging service, MMS and method
CN101662760A (en) * 2009-07-31 2010-03-03 中兴通讯股份有限公司 Method and system for backing up terminal data
CN101763490A (en) * 2009-12-18 2010-06-30 东信和平智能卡股份有限公司 Data movement method for flash intelligent card

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981779A (en) * 2012-11-22 2013-03-20 华为技术有限公司 Data processing method and device

Also Published As

Publication number Publication date
CN102075621B (en) 2015-10-07

Similar Documents

Publication Publication Date Title
US10671568B2 (en) De-duplicating attachments on message delivery and automated repair of attachments
AU2010347733B2 (en) Systems and methods for garbage collection in deduplicated data systems
CN103369003A (en) A method and a system for scanning redundancy files in a mobile device by using cloud computing
US20230205637A1 (en) Backup Recovery System and Method for Modern Application
CN111414362A (en) Data reading method, device, equipment and storage medium
CN103942126A (en) Electronic device and data backup method thereof
CN104965835A (en) Method and apparatus for reading and writing files of a distributed file system
CN106708960A (en) Restoration method for file system of NAS device and NAS device
CN104699823A (en) Method for restoring short messages deleted in cellphone
CN105022676B (en) A kind of memory database redoes log the restoration methods and device of file
CN101304454B (en) Method for rapidly inspecting short message history record
CN102298546B (en) Method and computer for restoring deleted joint picture group (JPG) file from disk
CN105022593A (en) Storage optimization method based on synergy of data compression and data redundancy removal
CN103207916B (en) The method and apparatus of metadata processing
CN102750202A (en) Data protection method and device
CN101697561A (en) Method and mobile terminal for recycling short messages
CN101340675A (en) Method and apparatus for implementing backup and recovery by mobile terminal
CN102737171B (en) Method and device for storing virus file and storage equipment
CN102075621A (en) Method for safely storing multimedia messages of mobile phone and performing power-off protection
CN109960608A (en) The processing method and processing system of office document
CN1710545A (en) Injured word file restoring method
CN103108070B (en) Telephone book backup system and method thereof
CN102065192B (en) Call ticket de-duplication method and device
KR101111400B1 (en) Apparatus and method for recovering the data of embeded system
CN101201882B (en) Operating system protection 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
C14 Grant of patent or utility model
GR01 Patent grant
CB03 Change of inventor or designer information

Inventor after: Zhong Mingle

Inventor before: Mao Zhongshan

CB03 Change of inventor or designer information
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20170908

Address after: 225400 Taixing City, Huangqiao Province Town Industrial Park, No. East victory road, No. 9

Patentee after: Zhong Mingle

Address before: 200001 G, 6B01, 666 Beijing East Road, Shanghai, Huangpu District

Patentee before: Shanghai Wentai Electronic Science & Technology Co., Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20171114

Address after: 221300, Pizhou Economic Development Zone, Jiangsu, Xuzhou, on the north side of Ring Road, Yimeng Mountain Road East

Patentee after: Jiangsu Rong Hui Electric Equipment Manufacturing Co., Ltd.

Address before: 225400 Taixing City, Huangqiao Province Town Industrial Park, No. East victory road, No. 9

Patentee before: Zhong Mingle

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20151007

Termination date: 20171223