Summary of the invention
For this reason, the object of the present invention is to provide the method for fast finding same file content in a kind of mobile phone, needing by manually distinguishing one by one to solve same file content under the multiple catalogue of current mobile phone or same catalogue, backup and the very troublesome problem of arrangement.
The object of the invention is to be achieved through the following technical solutions.
A method for fast finding same file content in mobile phone, comprises step:
The summary info of All Files in A, acquisition mobile phone;
B, analyzing and processing is carried out to summary info, obtain the All Files of identical or similar summary info;
C, com-parison and analysis is carried out to above-mentioned file content, judge that whether its content is identical.
Preferably, comprise before steps A:
According to the summary info of content of text correspondence establishment and text content Corresponding matching.
Preferably, according to message digest algorithm, analytical calculation is carried out to content of text, obtain the informative abstract with this file content Corresponding matching, and correspondence carries out record.
Preferably, according to cyclic redundancy check (CRC) algorithm, analytical calculation is carried out to content of text, obtain the informative abstract with this file content Corresponding matching, and correspondence carries out record.
Preferably, step B specifically comprises:
Analyzing and processing is carried out to the summary info of texts all in mobile phone, obtain the All Files of identical or similar summary info, and correspondence is sorted out, form a file path set.
Preferably, step C specifically comprises:
Under being in identical file set of paths, and the same or similar file content of summary info carries out com-parison and analysis, and identical according to analysis judged result determination file content.
The present invention compared with prior art, beneficial effect is: the method for fast finding same file content in mobile phone provided by the invention, by extracting the summary info of mobile phone All Files, the file of identical or similar summary info is sorted out, form file path set, and in this file set of paths, com-parison and analysis is carried out to file content, reach the object determining that file content is identical.Under the present invention efficiently solves the multiple catalogue of current mobile phone or same catalogue, same file content needs by manually distinguishing one by one, and backup and the very troublesome problem of arrangement, greatly improve the search efficiency of identical content file in mobile phone.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Shown in Figure 1, Fig. 1 is operation principle flow chart of the present invention.The invention provides the method for fast finding same file content in a kind of mobile phone, under it is mainly used in solving the multiple catalogue of current mobile phone or same catalogue, same file content needs by manually distinguishing one by one, existing backup and the very troublesome problem of arrangement.
The wherein method of fast finding same file content in this mobile phone, specifically comprises step as follows:
First will according to the summary info of content of text correspondence establishment and text content Corresponding matching, the mode specifically setting up summary info here has following two kinds;
One, according to message digest algorithm, analytical calculation is carried out to content of text, obtain the informative abstract with this file content Corresponding matching, and correspondence carries out record.
Message digest algorithm (MD5, Message-digest Algorithm 5), develops through MD2, MD3 and MD4.Its effect allows Large Copacity information be ' compressed ' into a kind of secret form before with digital signature software signature private key, exactly the byte serial of a random length is transformed into the big integer of a fixed length.No matter be MD2, MD4 or MD5, they all need the information of an acquisition random-length and produce the informative abstract of 128.
Because MD5 adds the concept of " safety-belt " (safety-belts) on the basis of MD4, although therefore MD5 is slower, safer a little than MD4.In MD5 algorithm, the size of information-summary is identical with MD5 with the necessary condition of filling.
Two, according to cyclic redundancy check (CRC) algorithm, analytical calculation is carried out to content of text, obtain the informative abstract with this file content Corresponding matching, and correspondence carries out record.
Cyclic redundancy check (CRC) algorithm (CRC, Cyclic Redundancy Check/Code) verifies a transmission block, is a kind of error control method efficiently.
CRC check adopts polynomial code method, and multinomial multiplication and division calculating process is identical with the polynomial multiplication and division of common algebra, and polynomial signed magnitude arithmetic(al), is not entered during plus-minus for mould with 2, and dislocation, as logic XOR.
The summary info of All Files in A, acquisition mobile phone;
Obtain the summary info of All Files in mobile phone according to above-mentioned algorithm correspondence, and correspondence carries out record, searches in order to follow-up.
B, analyzing and processing is carried out to summary info, obtain the All Files of identical or similar summary info;
Analyzing and processing is carried out to the summary info of texts all in mobile phone, obtain the All Files of identical or similar summary info, and correspondence is sorted out, form a file path set.
C, com-parison and analysis is carried out to above-mentioned file content, judge that whether its content is identical.
Under being in identical file set of paths, and the same or similar file content of summary info carries out com-parison and analysis, and identical according to analysis judged result determination file content.
The present invention is by extracting the summary info of mobile phone All Files, the file of identical or similar summary info is sorted out, form file path set, and in this file set of paths, com-parison and analysis is carried out to file content, reach the object determining that file content is identical.Under the present invention efficiently solves the multiple catalogue of current mobile phone or same catalogue, same file content needs by manually distinguishing one by one, and backup and the very troublesome problem of arrangement, greatly improve the search efficiency of identical content file in mobile phone.
The method of same file content under the multiple catalogue of fast detecting of the present invention or a catalogue: first according to " summary info ", file is sorted out, the file so again in each class compares between two, determines whether identical.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.