CN103188661A - Communication terminal and method for recovering file system in communication terminal - Google Patents

Communication terminal and method for recovering file system in communication terminal Download PDF

Info

Publication number
CN103188661A
CN103188661A CN2011104456433A CN201110445643A CN103188661A CN 103188661 A CN103188661 A CN 103188661A CN 2011104456433 A CN2011104456433 A CN 2011104456433A CN 201110445643 A CN201110445643 A CN 201110445643A CN 103188661 A CN103188661 A CN 103188661A
Authority
CN
China
Prior art keywords
communication terminal
file
external memory
storage
synchronous documents
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
CN2011104456433A
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.)
Shanghai Simcom Ltd
Original Assignee
Shanghai Simcom 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 Simcom Ltd filed Critical Shanghai Simcom Ltd
Priority to CN2011104456433A priority Critical patent/CN103188661A/en
Publication of CN103188661A publication Critical patent/CN103188661A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Telephone Function (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a communication terminal and a method for recovering a file system in the communication terminal. The method comprises the following steps that a storage space is established in an external memory of the communication terminal; the capacity of the storage space is not less than space capacity for storing file allocation table data in the communication terminal; a synchronization file is established in the storage space of the external memory and used for storing storage block numbers corresponding to internal files in the communication terminal; and when the internal files of the communication terminal is changed, the synchronization file in the external storage space is modified correspondingly. The method has the advantages that the synchronization file is set in the external memory of the communication terminal and used for storing file allocation tables in the communication terminal, and when the file allocation tables have failures, the external synchronization file can be called for recovery, so that the safety of the file system of the communication terminal is improved.

Description

Recover method and the communication terminal of communication terminal internal file system
Technical field
The present invention relates to moving communicating field, relate in particular to a kind of method and communication terminal that recovers communication terminal internal file system, be applicable to embedded systems such as mobile phone.
Background technology
Along with the development of mechanics of communication, be that the portable terminal of representative is more and more important in people's life with the mobile phone.The user can use mobile phone to carry out Internet chat, takes pictures, and e-book reading is watched operations such as film, the storage area of mobile phone mainly is divided into two parts, and the one, the storage area of mobile phone inside, the 2nd, exterior storage zone, as some outside cards that stores, as SD card, mmc card etc.The exterior storage zone mainly is to deposit some bigger files, as video file, and e-book, mp3 song etc.; The mobile phone internal storage areas mainly deposit mobile phone commonly used parameter is set.The handset starting picture, the charging picture, if under the situation that external memory space has been finished using, also can be some e-book, picture, song, video is put in the internal storage space of mobile phone.
Prior art problems is, embedded device all adopts the FAT file system basically, bad (fail safe of FAT file system is relatively poor) that if file system is done, in mobile phone internal storage space copied files, can destroy the FAT of mobile phone internal storage space table, can cause the file of mobile phone inside all to disappear.In this case, its real file still is stored in the internal storage space of mobile phone, and just the FAT table has destroyed, and can not read file, need have this time a kind of method can recover the file system of mobile phone inside, and mobile phone can normally be started.
Summary of the invention
Technical problem to be solved by this invention is, provides method and the communication terminal of a kind of supervisory communications terminal document system, the fail safe that can improve the communication terminal file system.
In order to address the above problem, the invention provides a kind of method of recovering communication terminal internal file system, comprise the steps: to set up memory space in the external memory storage of communication terminal, the capacity of described memory space is not less than the spatial content that is used for the storage file allocation table data in the communication terminal; Externally set up a synchronous documents in the memory space of memory, described synchronous documents is used for the corresponding memory block numbering of each internal file of storing communication terminal; When the internal file of communication terminal takes place to change, the synchronous documents in the external memory space is made corresponding the modification.
Optionally, describedly synchronous documents in the external memory storage is made the corresponding step of revising further comprise: in the file system read-write function of described communication terminal, write a call back function; When the internal file of communication terminal took place to change, the synchronization call call back function was numbered the current file of changing in the synchronous documents that is updated to external memory storage and is gone in the change corresponding memory block in back that finishes.
Optionally, describedly synchronous documents in the external memory storage is made the corresponding step of revising further comprise: set the one scan program; When communication terminal is idle, start described scanning imaging system, scan the All Files of communication terminal inside, the corresponding memory block of each file is numbered in the synchronous documents that is updated to external memory storage go.
Optionally, described scanning imaging system is set in communication terminal inside, perhaps is set in the external memory storage.
The present invention further provides a kind of communication terminal, the internal storage and the external memory storage that comprise communication terminal, has file allocation table in the described internal storage, have a memory space in the external memory storage, the capacity of described memory space is not less than the spatial content that is used for the storage file allocation table data in the communication terminal; Has a synchronous documents in the described memory space, described synchronous documents is used for the corresponding memory block numbering of each internal file of storing communication terminal, and described synchronous documents upgrades according to the variation of the corresponding memory block numbering of each internal file in the communication terminal internal storage.
Optionally, in the file system read-write function of described communication terminal, further comprise a call back function, when the internal file of communication terminal takes place to change, the synchronization call call back function is updated to the current file of changing in the synchronous documents of external memory storage and goes in the change corresponding memory block numbering in back that finishes.
Optionally, further comprise the one scan unit, when communication terminal is idle, start described scanning element, scan the All Files of communication terminal inside, the corresponding memory block of each file is numbered in the synchronous documents that is updated to external memory storage go.
Optionally, described scanning element is arranged on communication terminal inside, perhaps is arranged in the external memory storage.
The invention has the advantages that, by a synchronous documents is set in the external memory storage of communication terminal, be used for preserving the file allocation table of communication terminal inside, break down in file allocation table and to be, can recover by transferring outside synchronous documents, thereby strengthen the fail safe of communication terminal file system.
Description of drawings
Accompanying drawing 1 is the flow chart of the method embodiment of recovery communication terminal internal file of the present invention system.
Accompanying drawing 2 is a kind of typical file allocation list data structure of mentioning in the accompanying drawing 1.
Accompanying drawing 3 is structural representations of communication terminal embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing the method for recovery communication terminal internal file provided by the invention system and the embodiment of communication terminal are elaborated.
Provide the embodiment of the method for recovery communication terminal internal file of the present invention system at first by reference to the accompanying drawings.
It is the flow chart of the described method of this embodiment shown in the accompanying drawing 1, comprise: step S110, set up memory space in the external memory storage of communication terminal, the capacity of described memory space is not less than the spatial content that is used for the storage file allocation table data in the communication terminal; Step S120 externally sets up a synchronous documents in the memory space of memory, and described synchronous documents is used for the corresponding memory block numbering of each internal file of storing communication terminal; Step S130 when the internal file of communication terminal takes place to change, makes corresponding the modification to the synchronous documents in the external memory space.
Step S110 sets up memory space in the external memory storage of communication terminal, the capacity of described memory space is not less than the spatial content that is used for the storage file allocation table data in the communication terminal.The purpose of opening up a memory space is that the synchronous documents that guarantees follow-up foundation has relatively independent zone, prevents misoperation.Because this memory space is used for the storage file allocation table data, so the capacity of memory space obviously is not less than the spatial content that is used for the storage file allocation table data in the communication terminal, otherwise causes data to overflow easily.Described communication terminal can but to be not limited to be mobile phone, described external memory storage is such as but not limited to being SD card, mmc card etc.
Step S120 externally sets up a synchronous documents in the memory space of memory, and described synchronous documents is used for the corresponding memory block numbering of each internal file of storing communication terminal.
FAT table (File Allocation Table) claims file allocation table, is the document system that a kind of Microsoft at first proposes and adopts.Its principle roughly is that the corresponding memory block numbering of each internal file is the content that file allocation table (FAT table) records in fact.
2 is a kind of typical file allocation list data structure with reference to the accompanying drawings, and the file content of expression Test.logcat is stored in the data block that is numbered 0x123,0xFE, 0x396,0xF5 and 0x23.When file system is inner when upgrading Test.logcat, the callback data of upper strata registration can be saved in the address of these data blocks among the FAT.log goes, as following form:
Test.logcat:?0x123->0xFE->0x396->0xF5->0x23。
Just externally generate the synchronous documents that records above-mentioned file allocation table content in the memory space of memory when mobile phone dispatches from the factory start, filename for example can be FAT.log.
Step S130 when the internal file of communication terminal takes place to change, makes corresponding the modification to the synchronous documents in the external memory space.This step has two kinds of implementations, and a kind of is the mode of upgrading synchronously, a kind of mode of upgrading when being the free time.
Synchronously the mode of upgrading comprises the steps: to write a call back function in the file system read-write function of described communication terminal, for example can called after writefatlogCB (char * name, int * link); Internal file at communication terminal change (as newly-built, delete or append) time, bottom read synchronization call call back function writefatlogCB is updated to the current file of changing in the synchronous documents of external memory storage and goes in the change corresponding memory block numbering in back that finishes.The advantage of this mode is that the real-time update synchronous documents can be tackled the situation that communication terminal breaks down suddenly when changing internal file.
The mode of upgrading when idle comprises: set the one scan program; When communication terminal is idle, start described scanning imaging system, scan the All Files of communication terminal inside, the corresponding memory block of each file is numbered in the synchronous documents that is updated to external memory storage go.Described scanning imaging system can be set in communication terminal inside, also can be set in the external memory storage.When not being in idle condition, mobile phone can stop to upgrade.This kind mode only can be carried out work in the mobile phone idle condition, can not cause too much influence to user's use, can reduce system loading.
By in bad, need read synchronous documents in mobile phone internal file system, the file of losing be found by synchronous documents according to reverse software.
Said method is by arranging a synchronous documents in the external memory storage of communication terminal, be used for preserving the file allocation table of communication terminal inside, breaking down in file allocation table is, can recover by transferring outside synchronous documents, thereby strengthen the fail safe of communication terminal file system.
Next provide the embodiment of communication terminal of the present invention by reference to the accompanying drawings.
Be the structural representation of the described communication terminal of this embodiment shown in the accompanying drawing 3, comprise internal storage 31 and the external memory storage 32 of communication terminal.Have file allocation table 311 and data field 312 in the described internal storage 31, have a memory space 321 and data field 322 in the external memory storage 32, the capacity of described memory space 321 is not less than the spatial content that is used for storage file allocation table 311 data in the communication terminal.Has a synchronous documents in the described memory space, filename for example can be FAT.log, described synchronous documents is used for the corresponding memory block numbering of internal storage 31 each internal file of storing communication terminal, and described synchronous documents upgrades according to the variation of the corresponding memory block numbering of each internal file of communication terminal.Described renewal has two kinds of implementations, and a kind of is the mode of upgrading synchronously, a kind of mode of upgrading when being the free time.
The mode of upgrading is in the file system read-write function of described communication terminal a call back function to be set further synchronously, when the internal file of communication terminal takes place to change, the synchronization call call back function is updated to the current file of changing in the synchronous documents of external memory storage and goes in the change corresponding memory block numbering in back that finishes.
The mode of upgrading when idle is further to comprise the one scan unit, when communication terminal is idle, start described scanning element, scan the All Files of communication terminal inside, the corresponding memory block of each file is numbered in the synchronous documents that is updated to external memory storage go.Described scanning element is arranged on communication terminal inside, perhaps is arranged in the external memory storage.
Please refer in the last embodiment the explanation of step S130 about the content of above two kinds of update modes, repeat no more herein.
Below provide one embodiment of the invention.
The space size of setting the FAT table is 256kb, and externally memory space is opened up the space that is used for depositing FAT.log that a size is 800kb.
The chained list of in store following three files in the FAT.log file:
1111.txt?0x23665255->0x58452563->0x14587632->0xFE521436
2222.rvmb?0x23fd5255->0x58b52563->0x7d587632->0xF6B21436
flow.jpeg?0x23f32545->0x89852125->0x6e367632->0x12369652。
If the action that 2222.rvmb is deleted, such as the deletion of the content above the 0xF6B21436, then 2222.rvmb becomes at the chained list of FAT.log:
2222.rvmb?0x23fd5255->0x58b52563->0x7d587632。
When appending certain file, its principle is the same.
When the file system of mobile phone inside breaks down, by reading FAT.log, the storage data block of each file correspondence is read successively, and goes to read data to corresponding position, read finish after, file has just recovered.
The above only is preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (8)

1. method of recovering communication terminal internal file system, it is characterized in that, comprise the steps: to set up memory space in the external memory storage of communication terminal, the capacity of described memory space is not less than the spatial content that is used for the storage file allocation table data in the communication terminal; Externally set up a synchronous documents in the memory space of memory, described synchronous documents is used for the corresponding memory block numbering of each internal file of storing communication terminal; When the internal file of communication terminal takes place to change, the synchronous documents in the external memory space is made corresponding the modification.
2. the method for recovery communication terminal internal file according to claim 1 system, it is characterized in that, describedly synchronous documents in the external memory storage is made the corresponding step of revising further comprise: in the file system read-write function of described communication terminal, write a call back function; When the internal file of communication terminal took place to change, the synchronization call call back function was numbered the current file of changing in the synchronous documents that is updated to external memory storage and is gone in the change corresponding memory block in back that finishes.
3. the method for recovery communication terminal internal file according to claim 1 system is characterized in that, describedly synchronous documents in the external memory storage is made the corresponding step of revising further comprises: set the one scan program; When communication terminal is idle, start described scanning imaging system, scan the All Files of communication terminal inside, the corresponding memory block of each file is numbered in the synchronous documents that is updated to external memory storage go.
4. the method for recovery communication terminal internal file according to claim 3 system is characterized in that described scanning imaging system is set in communication terminal inside, perhaps is set in the external memory storage.
5. communication terminal, the internal storage and the external memory storage that comprise communication terminal, has file allocation table in the described internal storage, it is characterized in that, have a memory space in the external memory storage, the capacity of described memory space is not less than the spatial content that is used for the storage file allocation table data in the communication terminal; Has a synchronous documents in the described memory space, described synchronous documents is used for the corresponding memory block numbering of each internal file of storing communication terminal, and described synchronous documents upgrades according to the variation of the corresponding memory block numbering of each internal file in the communication terminal internal storage.
6. communication terminal according to claim 5, it is characterized in that, in the file system read-write function of described communication terminal, further comprise a call back function, when the internal file of communication terminal takes place to change, the synchronization call call back function is updated to the current file of changing in the synchronous documents of external memory storage and goes in the change corresponding memory block numbering in back that finishes.
7. communication terminal according to claim 5, it is characterized in that, further comprise the one scan unit, when communication terminal is idle, start described scanning element, scan the All Files of communication terminal inside, the corresponding memory block of each file is numbered in the synchronous documents that is updated to external memory storage go.
8. communication terminal according to claim 7 is characterized in that, described scanning element is arranged on communication terminal inside, perhaps is arranged in the external memory storage.
CN2011104456433A 2011-12-28 2011-12-28 Communication terminal and method for recovering file system in communication terminal Pending CN103188661A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011104456433A CN103188661A (en) 2011-12-28 2011-12-28 Communication terminal and method for recovering file system in communication terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011104456433A CN103188661A (en) 2011-12-28 2011-12-28 Communication terminal and method for recovering file system in communication terminal

Publications (1)

Publication Number Publication Date
CN103188661A true CN103188661A (en) 2013-07-03

Family

ID=48679548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011104456433A Pending CN103188661A (en) 2011-12-28 2011-12-28 Communication terminal and method for recovering file system in communication terminal

Country Status (1)

Country Link
CN (1) CN103188661A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101201765A (en) * 2006-12-13 2008-06-18 深圳市朗科科技有限公司 Device and method for data backup
CN101515276A (en) * 2008-12-29 2009-08-26 北京握奇数据系统有限公司 Method for write operation of file data, and recovery method and recovery system for file data
CN101572748A (en) * 2009-06-15 2009-11-04 北京握奇数据系统有限公司 Mobile phone card, mobile phone and method for starting mobile phone
CN101853275A (en) * 2010-05-05 2010-10-06 北京中星微电子有限公司 Data management method of FAT file system and system
CN201717003U (en) * 2009-12-30 2011-01-19 北京爱国者存储科技有限责任公司 Recording device with intelligent File Allocation Table ( FAT ) recovery function

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101201765A (en) * 2006-12-13 2008-06-18 深圳市朗科科技有限公司 Device and method for data backup
CN101515276A (en) * 2008-12-29 2009-08-26 北京握奇数据系统有限公司 Method for write operation of file data, and recovery method and recovery system for file data
CN101572748A (en) * 2009-06-15 2009-11-04 北京握奇数据系统有限公司 Mobile phone card, mobile phone and method for starting mobile phone
CN201717003U (en) * 2009-12-30 2011-01-19 北京爱国者存储科技有限责任公司 Recording device with intelligent File Allocation Table ( FAT ) recovery function
CN101853275A (en) * 2010-05-05 2010-10-06 北京中星微电子有限公司 Data management method of FAT file system and system

Similar Documents

Publication Publication Date Title
CN102457499B (en) The method that works offline of client and the client that works offline
CN101470645B (en) Method and device for recovering cache data
CN101729595A (en) Network backup device and backup method thereof
CN103473065A (en) Virtual machine creation method capable of rapidly restoring system disk
CN1829251A (en) Automatic backup method and device for mobile phone address list
CN107168818B (en) Terminal and machine-refreshing failure recovery method
EP2472996B1 (en) Method and system for operating telephone directory
CN103559276A (en) Method and device for clearing useless files
CN101789999A (en) Method and device for scene management and backup restoration of mobile terminal
US20130132347A1 (en) Backup method for portable device
CN103379476A (en) Terminal and contact information updating method
CN104216723A (en) Software starting method and mobile device
CN107908340A (en) Method, mobile terminal and the device with store function of factory reset
CN105657049A (en) Incremental data synchronization method and device and mobile terminal
CN103942126A (en) Electronic device and data backup method thereof
US20150052185A1 (en) File information system management system and method
CN103389905A (en) Plug-in loading method and plug-in loading system
CN104503659A (en) Intelligent terminal screen locking display method and system
CN102685304A (en) Address book synchronizing method and device
CN118120212A (en) File deduplication method, device and equipment
WO2023237047A1 (en) Data processing method and electronic device
CN103942120B (en) A kind of reading/writing method and system based on Intel Virtualization Technology
WO2014183711A1 (en) Multi-media data backup method, user terminal and synchronizer
CN103188661A (en) Communication terminal and method for recovering file system in communication terminal
CN1642190A (en) Method for delecting and recovering device in address book of mobile hand-set

Legal Events

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

Application publication date: 20130703