CN102075621B - A kind of safe storage cell phone multimedia message also carries out the method for power down protection - Google Patents

A kind of safe storage cell phone multimedia message also carries out the method for power down protection Download PDF

Info

Publication number
CN102075621B
CN102075621B CN201010608489.2A CN201010608489A CN102075621B CN 102075621 B CN102075621 B CN 102075621B CN 201010608489 A CN201010608489 A CN 201010608489A CN 102075621 B CN102075621 B CN 102075621B
Authority
CN
China
Prior art keywords
index file
multimedia message
file
mailbox
mailbox index
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.)
Expired - Fee Related
Application number
CN201010608489.2A
Other languages
Chinese (zh)
Other versions
CN102075621A (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

Landscapes

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

Abstract

Present invention is disclosed a kind of safe storage cell phone multimedia message and carry out the method for power down protection, it is not lost in order to multimedia message data when making mobile phone power down, backs up the mailbox index file of described multimedia message.So, if mobile phone is at the process interrupt electricity of process cell phone multimedia message, by after boots to the analysis of the multimedia message files of process, the mailbox index file of mailbox index file and backup and utilization, ensure integrality and the consistency of multimedia message files and index file to greatest extent, avoid because index file error in data causes multimedia message loss and multimedia message space can not discharge the phenomenon causing system in case of system halt.

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 mobile phone data security field of storage, particularly a kind of safe storage cell phone multimedia message carry 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, sequence etc., the storage of multimedia message often adopts multilevel data structure to exist in the form of a file on FLASH or T card.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 mailbox, and the header of each multimedia message, comprise timestamp, addressee, the filename etc. of title and storage MMS content.
(3) MMS content file: the file storing concrete MMS content, hereinafter referred to as multimedia message files.
Except multimedia message files (3) itself will be stored in storing process (increase, delete, change), also need the index file (2) upgrading mailbox.If unexpected power down in storing process like this, although mobile phone file system has simple Restoration Mechanism, but can inevitably make multimedia message files (3) and index file (2) inconsistent, even multimedia message files, index file be destroyed.When such as doing deletion action, certain multimedia message files is deleted, the unexpected power down when upgrading index file.Index file may be caused so imperfect or even lose, in this mailbox some multimedia message may indexed to thus cause multimedia message files to be read but forever occupying file system space.Even cause during access index file and just make mistakes, easily cause system in case of system halt.
Summary of the invention
The object 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 the safe storage of cell phone multimedia message and power down is not lost.
The invention provides a kind of safe storage cell phone multimedia message and carry out the method for power down protection, comprising the following steps:
1.1, operational processes is carried out to the MMS content file stored in described mobile email;
1.2, back up the mailbox index file in described step 1.1 corresponding to multimedia message content file, write described mobile phone memory bank;
1.3, after completing the operational processes of described step 1.1, the mailbox index file corresponding to described MMS content file is upgraded;
1.4, the mailbox index file of backup in described step 1.2 is deleted.
The operational processes of described step 1.1 comprises increase, deletes and change.
In described step 1.3, by recalculating file size and the School Affairs of described mailbox index file, realize the renewal of the mailbox index file corresponding to described MMS content file.
The School Affairs calculating described mailbox index file refers to by carrying out complement of one's summation to every 16 of the regular length filename in each multimedia message indexing head.
Described method also comprises when described mobile phone recovers the step of described multimedia message after step 1.1 power down:
When described step 1.1 is deleted described MMS content file or changes operational processes, if read described MMS content file error after boots, then open the mailbox index file of described multimedia message and the index of this multimedia message deleted and upgrades;
When described step 1.1 carries out deletion action process to described MMS content file, if do not find described MMS content file after boots, then open the mailbox index file of described multimedia message and the index of this multimedia message deleted and upgrades;
When described step 1.1 carries out increase operational processes to described MMS content file, if find after boots, MMS content file generates, but its index is not included in described mailbox index file, then scan described mailbox index file, delete not indexed MMS content file.
Described method also comprises when described mobile phone recovers the step of described multimedia message after step 1.2 power down:
When not finding the mailbox index file of described backup after boots, then read former mailbox index file and back up;
When finding the mailbox index file of described backup after boots, then upgrade former mailbox index file.
Described method also comprises when described mobile phone recovers the step of described multimedia message after step 1.3 power down:
When detect after boots index file do not exist or file size and check code incorrect, then recover with the mailbox index file of described backup;
When detecting after boots that index file exists, then upgrade the mailbox index file corresponding to described MMS content file.
Described method also comprises when described mobile phone recovers the step of described multimedia message after step 1.4 power down:
Check code and the file size of described mailbox index file and backup mailbox index file is detected after boots;
If detect, described mailbox index file and backup mailbox index file are effective document, then retain 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, it is not lost in order to multimedia message data when making mobile phone power down, backs up the mailbox index file of described multimedia message.So, if mobile phone is at the process interrupt electricity of process cell phone multimedia message, by after boots to the analysis of the multimedia message files of process, the mailbox index file of mailbox index file and backup and utilization, maximum integrality and the consistency ensureing multimedia message files and index file to greatest extent, avoids because index file error in data causes multimedia message loss and multimedia message space can not discharge the phenomenon causing system in case of system halt.
Accompanying drawing explanation
Fig. 1 is the flow chart of safe storage multimedia message in the method for the invention.
Embodiment
Technical scheme of the present invention is further illustrated below in conjunction with drawings and Examples.
First introduce the storage organization of multimedia message, be made up of the index file (table 1) of mailbox and MMS content file (table 2):
Table 1:
Table 2:
Show the flow process 100 of safe storage multimedia message in the present invention see Fig. 1, Fig. 1, comprise the following steps:
101, operational processes is carried out to the MMS content file stored in described mobile email.The operation that operational processes comprises increase, deletes and change.
First can store the content of (increase, delete, change) multimedia message, such as multimedia message n; For deletion action, first delete MMS content file itself; Increase operation is first preserved to the content of multimedia message; For change multimedia message, first upgrade multimedia message files itself.
102, back up the mailbox index file in described step 101 corresponding to multimedia message content file, write described mobile phone memory bank.
In order to ensure that the mailbox index file backed up can be updated on module (FLASH, or T card) at once, the Sync that calls of display or implicit expression is needed to operate.
103, after completing the operational processes of described step 101, the mailbox index file corresponding to described MMS content file is upgraded.
Upgrade described mailbox index file, specifically refer to and recalculate index file length and School Affairs and by its writing in files.For ease of detecting file availability and accelerating index file access, the index of each multimedia message can adopt regular length, and such as file name is 2m byte.The calculating of School Affairs can carry out complement of one's summation simply by every 16 of each multimedia message indexing head file name (regular length).Namely n multimedia message, each length is m 16 complements of one's summation.
104, the mailbox index file of backup in described step 102 is deleted.
Start shooting next time whether can be existed by backup file and judge that multimedia message storing process has not extremely.
If mobile phone is unexpected power-off in above-mentioned four operating process, step 101,102,103 and 104 is all likely interrupted:
If step 101 is interrupted, belonging to start access next time during mailbox, index file can normally be opened:
I () is for deletion or renewal rewards theory, if multimedia message n file exists but content is destroyed, content display mistake when that reads this multimedia message.But user can also pass through deletion action, the index of this multimedia message can be removed in indexed file to ensure the consistency of index file and multimedia message files.
(ii) for deletion action, if multimedia message n file is deleted, but also have in index file.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 index file and upgrades it.
(iii) for increase operation, if multimedia message n file generates, but indexed arriving is not had in the index file of correspondence.In this case, can when system idles, remove the index file scanning all mailbox, to do not have indexed to multimedia message files delete.Here just at idle scan index file, and general cell phone multimedia message number is more limited, can not have very large load to system.
If be interrupted in step 102 backup procedure, can identify by detecting backup mailbox index file during start next time.At this moment can, with the file of original index, when producing the situation in (ii), the way that (ii) is the same be taked to upgrade index file; When producing the situation of (iii), (iii) the same way is taked to process.Such as: when not finding the mailbox index file of described backup after boots, then read former mailbox index file and back up; When finding the mailbox index file of described backup after boots, then upgrade former mailbox index file.
If step 103 upgrade mailbox index file process in be interrupted, next time start time can detect mailbox index file do not exist or file size and check code incorrect.Recover with the mailbox index file of backup, and delete the file of backup.So also can produce the situation in (ii) or (iii), so take the way that (ii) or (iii) is the same to upgrade mailbox index file.Such as: when detect after boots index file do not exist or file size and check code incorrect, then recover with the mailbox index file of described backup; When detecting after boots that index file exists, then upgrade the mailbox index file corresponding to described MMS content file.
If be interrupted at step 104, next start can be checked through mailbox index file and backup mailbox index file file simultaneously.Check the School Affairs of two files and length field, be preferential with the mailbox index file after upgrading in all effective situation of two files, delete and back up mailbox index file.
The embodiment of specifically deleting multimedia message below by one sets forth the inventive method further:
Such as to delete multimedia message MMSn in multimedia message inbox, suppose that index file is called INBOX.BIN.
Delete procedure is as follows:
(1) find the filename that in index file, in INBOX.BIN, MMSn is corresponding, delete this file;
(2) back up INBOX.BIN, generate INBOX_BK.BIN and write module (FLASH, T card);
(3) in INBOX.BIN, remove the index information of MMSn, upgrade multimedia message number, index file length, recalculates School Affairs, and writing in files;
(4) the backup file INBOX_BK.BIN in delete step (2).
When after mobile phone power down, during boots, during access multimedia message, recovery process is as follows:
(1) check that inbox is with or without index backup file INBOX_BK.BIN, and index file INBOX.BIN;
If i () backup file INBOX_BK.BIN exists, index file INBOX.BIN does not exist then with INBOX_BK.BIN recovery, and deletes INBOX_BK.BIN;
(ii) if both exist simultaneously, if then checked their validity by length and School Affairs. INBOX.BIN is effective, deletes INBOX_BK.BIN; Otherwise recover INBOX.BIN with INBOX_BK.BIN, and delete INBOX_BK.BIN;
(iii) if INBOX.BIN exists, backup file does not exist, and shows the abnormal problem not having to delete.
(2) open file MMSn time:
I () MMSn file does not exist, then upgrade INBOX.BIN index file (remove the index entry of MMSn, upgrade multimedia message number, file size, recalculates School Affairs).
(ii) MMSn file exists but error in data, optionally can upgrade INBOX.BIN index file (remove the index entry of MMSn, upgrade multimedia message number, file size, recalculates School Affairs).
Those of ordinary skill in the art will be appreciated that, above embodiment is only used to the present invention is described, and be not used as limitation of the invention, as long as in spirit of the present invention, all will drop in Claims scope of the present invention the change of above embodiment, modification.

Claims (6)

1. safe storage cell phone multimedia message carry out the method for power down protection, is characterized in that, comprise the following steps:
1.1, carry out operational processes to the MMS content file stored in described mobile email, described operational processes comprises increase, deletes and change;
1.2, back up the mailbox index file in described step 1.1 corresponding to multimedia message content file, write described mobile phone memory bank;
1.3, after completing the operational processes of described step 1.1, the mailbox index file corresponding to described MMS content file is upgraded;
1.4, the mailbox index file of backup in described step 1.2 is deleted;
Wherein, when described mobile phone recovers the step of described multimedia message after step 1.1 power down:
When described step 1.1 is deleted described MMS content file or changes operational processes, if read described MMS content file error after boots, then open the mailbox index file of described multimedia message and the index of this multimedia message deleted and upgrades;
When described step 1.1 carries out deletion action process to described MMS content file, if do not find described MMS content file after boots, then open the mailbox index file of described multimedia message and the index of this multimedia message deleted and upgrades;
When described step 1.1 carries out increase operational processes to described MMS content file, if find after boots, MMS content file generates, but its index is not included in described mailbox index file, then scan described mailbox index file, delete not indexed MMS content file.
2. the method for claim 1, is characterized in that, in described step 1.3, by recalculating file size and the School Affairs of described mailbox index file, realizes the renewal of the mailbox index file corresponding to described MMS content file.
3. method as claimed in claim 2, is characterized in that, the School Affairs calculating described mailbox index file refers to by carrying out complement of one's summation to every 16 of the regular length filename in each multimedia message indexing head.
4. the method for claim 1, is characterized in that, described method also comprises when described mobile phone recovers the step of described multimedia message after step 1.2 power down:
When not finding the mailbox index file of described backup after boots, then read former mailbox index file and back up;
When finding the mailbox index file of described backup after boots, then upgrade former mailbox index file.
5. the method for claim 1, is characterized in that, described method also comprises when described mobile phone recovers the step of described multimedia message after step 1.3 power down:
When detect after boots index file do not exist or file size and check code incorrect, then recover with the mailbox index file of described backup;
When detecting after boots that index file exists, then upgrade the mailbox index file corresponding to described MMS content file.
6. the method for claim 1, is characterized in that, described method also comprises when described mobile phone recovers the step of described multimedia message after step 1.4 power down:
Check code and the file size of described mailbox index file and backup mailbox index file is detected after boots;
If detect, described mailbox index file and backup mailbox index file are effective document, then retain 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 CN102075621A (en) 2011-05-25
CN102075621B true 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)

Families Citing this family (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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100511298B1 (en) * 2002-12-09 2005-08-31 엘지전자 주식회사 Messaging service method of multi-media

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN102075621A (en) 2011-05-25

Similar Documents

Publication Publication Date Title
US10671568B2 (en) De-duplicating attachments on message delivery and automated repair of attachments
CN102984357B (en) Contact person information managing method and managing device
CN103268270B (en) The management method of snapshot and device
CN103942126A (en) Electronic device and data backup method thereof
CN103019891A (en) Method and system for restoring deleted file
CN101304454B (en) Method for rapidly inspecting short message history record
CN107402870A (en) The processing method and processing device of daily record section in a kind of meta data server
CN101754138A (en) Method and system for automatically deleting message and mobile terminal
CN104699823A (en) Method for restoring short messages deleted in cellphone
CN103207916B (en) The method and apparatus of metadata processing
CN102096613B (en) Method and device for generating snapshot
CN105022676B (en) A kind of memory database redoes log the restoration methods and device of file
CN103176867A (en) Fast file differential backup method
CN103092768B (en) The method of data processing and device in a kind of application system
CN102937956A (en) Method and device for storing real-time messages in intelligent substation
CN102075621B (en) A kind of safe storage cell phone multimedia message also carries out the method for power down protection
CN102799583B (en) Object-oriented access method and system
CN104636218A (en) Data recovery method and device
US20230205637A1 (en) Backup Recovery System and Method for Modern Application
CN101697561A (en) Method and mobile terminal for recycling short messages
CN104156369A (en) Database mirror making method and database
CN102737171B (en) Method and device for storing virus file and storage equipment
CN103108070B (en) Telephone book backup system and method thereof
CN108459925B (en) Private cloud equipment, database repairing method thereof and device with storage function
CN102065192B (en) Call ticket de-duplication 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
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

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

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

Granted publication date: 20151007

Termination date: 20171223

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