CN101772207A - Method for mobile terminal equipment to identify file - Google Patents

Method for mobile terminal equipment to identify file Download PDF

Info

Publication number
CN101772207A
CN101772207A CN200810208134A CN200810208134A CN101772207A CN 101772207 A CN101772207 A CN 101772207A CN 200810208134 A CN200810208134 A CN 200810208134A CN 200810208134 A CN200810208134 A CN 200810208134A CN 101772207 A CN101772207 A CN 101772207A
Authority
CN
China
Prior art keywords
file
result
hash algorithm
filename
hash
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
CN200810208134A
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 Wingtech Electronic Technology 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 CN200810208134A priority Critical patent/CN101772207A/en
Publication of CN101772207A publication Critical patent/CN101772207A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

The invention discloses a method for mobile terminal equipment to identify a file. The method is characterized in that: A. a file name to be identified is obtained when in storage and is then processed by a hash algorithm, a result obtained by the hash algorithm is used as an identification of the file, and the identification is stored into a set storage space; B. the known file name is processed by the hash algorithm when in use, and comparison with the stored result obtained by the hash algorithm is carried out to obtain the file specified by the identification. The method has the following advantages: the storage space of the mobile terminal equipment can be well saved, and the using of an RAM is reduced as well.

Description

A kind of method of mobile terminal equipment to identify file
Technical field
The present invention relates generally to moving communicating field, refers to the method at the mobile terminal equipment to identify file in this field especially.
Background technology
Communication terminal has possessed the ability of operation mass-memory unit mostly at present, and what the mass-memory unit that uses on communication terminal was common comprises: built-in memory space, T card, SD card, mmc card etc.The ability of operation mass-memory unit makes communication terminal can be easy to play MP3, play functions such as MP4 and reading electronic book, these functions have become indispensable function on the communication terminal, have enriched the amusement function of communication terminal greatly.The management of above-mentioned mass-memory unit all is to carry out in popular file system mode, common file system mode is FAT16 and two kinds of forms of FAT32, its management to file all is based on catalogue and file name PC operating system that carry out and common compatibility.
Communication terminal is when carrying out storage device management, a common action is exactly to identify or describe a file, for example: when a mp3 file is set at incoming ring tone, this is the sign of a mp3 file to be write of communication terminal inside set in the storage area and realize; The e-book function of communication terminal is wanted can write down the position of each e-book reading last time and can set bookmark, similarly this last time reading position and bookmark description also be of communication terminal inside to be write in the sign of an e-book and position establish present communication terminal just is to use file system to the identification method of file file name, the maximum filename degree of common FAT16 file system is 255 uincode codings, and the sign of using filename to make file can consume very big system's shelf space.With the e-book is example, if we have 100 e-book, each e-book need write down one last time reading position and four bookmarks, the memory space of its required use is
5×100×(255×2+4)=257000(byte)
Calculation specifications:
5: one previous position and 4 bookmarks
This book of 100:100
255 * 2: unicode accounts for two bytes to be decided to realize in the storage area
4: location expression.
Communication terminal is set memory space and is commonly realized with FLASH equipment, generally smaller, the space of the 250K that calculates above can take the resource of a large amount of preciousnesses, and the information that when operation preserves also will be read earlier among the RAM, also can expend a large amount of ram spaces, because the content that reads is more, the speed of read-write also has certain influence simultaneously.
Summary of the invention
One object of the present invention is to provide a kind of method of mobile terminal equipment to identify file, can use memory space identification document seldom.
To achieve these goals, technical scheme of the present invention is as follows: a kind of method of mobile terminal equipment to identify file, it is characterized in that: during preservation, behind the filename that obtains to identify, filename is handled with the hash algorithm, obtain the sign of result with the hash algorithm, this sign is saved in the setting memory space as file; In use, the result to known file masterpiece hash algorithm and preservation hash relatively obtains identifying specified file.
Because how many characters no matter the characteristics of hash algorithm import, the result who calculates is a regular length, is generally 4 byte.And it has good randomness, in numerical space 2 32Size does not have the result of calculation of repetition down substantially.So original needs 255 * 2byte (filename) just can identify a file, only need 4byte just passable now, 100 files were wanted the memory space of 257000byte originally, now as long as 4000byte, the invention has the advantages that can fine saving mobile terminal device memory space, also reduced the use of RAM simultaneously.
Description of drawings
Fig. 1 preserves the bookmark flow chart during the e-book of the embodiment of the invention is used.
Fig. 2 uses the bookmark flow chart during the e-book of the embodiment of the invention is used.
Embodiment
Below in conjunction with drawings and Examples the present invention is elaborated.
A kind of method of mobile terminal equipment to identify file, it is characterized in that: when A, preservation, behind the filename that obtains to identify, filename is handled with the hash algorithm, obtain the sign of result with the hash algorithm, this sign is saved in the setting memory space as file; B, when using, known file masterpiece hash algorithm and the result that preserves hash are relatively obtained identifying specified file.
According to one embodiment of present invention, steps A comprises: a, user set bookmark to the book of current reading; B, obtain the filename of the book of current reading; C, to the computing of file masterpiece hash algorithm, obtain 32 result, as file identification; The sign of d, this document and the position of current reading save as bookmark data.Step B comprises: e, read e-book tabulation; F, user select a bookmark; G, read bookmark data from memory space, this bookmark data comprises file identification and reading position; H, from e-book tabulation, read a filename; The hash arithmetic result of i, calculating this document name; J, with file identification relatively; K, then read next filename for unequal, and change i as the result of j; L, then open file and jump to corresponding reading position for equating by this document name as the result of j.
Need obtain handling the tabulation of file when using this method earlier, for most of mobile communication terminal device, the application file fixed placement of a class is in one or several catalogues, and for example, the file of e-book may be placed in the catalogue of ebook.And on user's use flow process, also be will see listed files earlier, just can select a file to read afterwards.
The method that obtains listed files can be used general file system interface function, and present file system is all supported.
For mobile communication terminal device, its operational capability is not strong, in order to reduce the time of HASH computing, the function of hash is not selected too complicated, simultaneously in order to reduce hash result's replication problem, can use two different hash functions to calculate respectively, two are compared together in the time of relatively, can effectively solve replication problem.Adoptable hash algorithm is as MD2, N-Hash, RIPE-MD, HAVAL etc., and its value of calculating all is inequality, adopts same hash algorithm when therefore in general preserving and when using.
After the flow process of pressing Fig. 1 produces the result of hash, can be saved in setting data zone commonly used according to the different choice of own system during preservation, because a storage area seldom can be selected more freely in the space of using at present.The form of preserving can be that file also can be a blocks of data, and the medium of preservation also can be arbitrarily.
Though should be noted that the be treated to embodiment of the present invention, be not limited to the application of e-book with e-book.

Claims (3)

1. the method for a mobile terminal equipment to identify file, it is characterized in that: when A, preservation, behind the filename that obtains to identify, filename is handled with the hash algorithm, obtain the sign of result with the hash algorithm, this sign is saved in the setting memory space as file; B, when using, known file masterpiece hash algorithm and the result that preserves hash are relatively obtained identifying specified file.
2. the method for mobile terminal equipment to identify file as claimed in claim 1 is characterized in that steps A comprises: a, user set bookmark to the book of current reading; B, obtain the filename of the book of current reading; C, to the computing of file masterpiece hash algorithm, obtain 32 result, as file identification; The sign of d, this document and the position of current reading save as bookmark data; Step B comprises: e, read e-book tabulation; F, user select a bookmark; G, read bookmark data from memory space, this bookmark data comprises file identification and reading position; H, from e-book tabulation, read a filename; The hash arithmetic result of i, calculating this document name; J, with file identification relatively; K, then read next filename for unequal, and change i as the result of j; L, then open file and jump to corresponding reading position for equating by this document name as the result of j.
3. the method for mobile terminal equipment to identify file as claimed in claim 1 is characterized in that the hash algorithm comprises MD2, N-Hash, RIPE-MD, HAVAL.
CN200810208134A 2008-12-29 2008-12-29 Method for mobile terminal equipment to identify file Pending CN101772207A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200810208134A CN101772207A (en) 2008-12-29 2008-12-29 Method for mobile terminal equipment to identify file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200810208134A CN101772207A (en) 2008-12-29 2008-12-29 Method for mobile terminal equipment to identify file

Publications (1)

Publication Number Publication Date
CN101772207A true CN101772207A (en) 2010-07-07

Family

ID=42504674

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200810208134A Pending CN101772207A (en) 2008-12-29 2008-12-29 Method for mobile terminal equipment to identify file

Country Status (1)

Country Link
CN (1) CN101772207A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014161308A1 (en) * 2013-07-19 2014-10-09 中兴通讯股份有限公司 Ring tone setting method, device and terminal
CN107172265A (en) * 2017-05-12 2017-09-15 北京安云世纪科技有限公司 A kind of call blocking method, device and mobile terminal
WO2019019341A1 (en) * 2017-07-27 2019-01-31 平安科技(深圳)有限公司 File storage method, terminal and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030200A (en) * 2006-03-02 2007-09-05 海尔集团公司 Method for searching number mark in mobile terminal
CN101051913A (en) * 2007-01-12 2007-10-10 北京时代亮点科技发展有限公司 Reciprocal network transmission method facing moving terminal
CN101174264A (en) * 2006-10-31 2008-05-07 英业达股份有限公司 Multimedia bookmark producing system and method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030200A (en) * 2006-03-02 2007-09-05 海尔集团公司 Method for searching number mark in mobile terminal
CN101174264A (en) * 2006-10-31 2008-05-07 英业达股份有限公司 Multimedia bookmark producing system and method thereof
CN101051913A (en) * 2007-01-12 2007-10-10 北京时代亮点科技发展有限公司 Reciprocal network transmission method facing moving terminal

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014161308A1 (en) * 2013-07-19 2014-10-09 中兴通讯股份有限公司 Ring tone setting method, device and terminal
CN104301503A (en) * 2013-07-19 2015-01-21 中兴通讯股份有限公司 Ringtone setting method and device and terminal
CN104301503B (en) * 2013-07-19 2019-07-16 中兴通讯股份有限公司 A kind of the tinkle of bells setting method, device and terminal
CN107172265A (en) * 2017-05-12 2017-09-15 北京安云世纪科技有限公司 A kind of call blocking method, device and mobile terminal
WO2019019341A1 (en) * 2017-07-27 2019-01-31 平安科技(深圳)有限公司 File storage method, terminal and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN102768662B (en) A kind of method and apparatus Loaded Image
US9323756B2 (en) Audio book and e-book synchronization
CN106874348B (en) File storage and index method and device and file reading method
CN103152430B (en) A kind of reduce the cloud storage method that data take up room
CN103020317A (en) Device and method for data compression based on data deduplication
CN107919943A (en) Coding, coding/decoding method and the device of binary data
CN106557571A (en) A kind of data duplicate removal method and device based on K V storage engines
TWI634421B (en) Electronic apparatus for data access and data access method therefor
CN101382876A (en) Data storage method
CN111488556A (en) Nested document extraction method and device, electronic equipment and storage medium
CN104298695B (en) Data caching method and device and server
CN103294507A (en) Method and device for providing information of downloading resources
CN101772207A (en) Method for mobile terminal equipment to identify file
CN105320669B (en) Data storage, read method and data storage, reading device
CN104050251A (en) File management method and management system
CN103049387B (en) A kind of Compression manager method of Fragmentation device and device
CN101089842A (en) Method for duplicating file in embedded equipment
CN107992456B (en) Format data stream file multiple terminals localizes flash memory system, method and electronic equipment
CN101345945A (en) Short message storage method and apparatus
CN204315231U (en) A kind of USB storage device for storing temporary file
CN103942186A (en) Method and system for managing documents
CN103312821A (en) Method and device for information pushing of receiver
US9535566B2 (en) Method, apparatus and system of displaying a file
CN102376021A (en) Book management system
CN105824829B (en) Compression method, decompression method and device for order record

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20100707