CN106202423A - A kind of file ordering method and apparatus - Google Patents
A kind of file ordering method and apparatus Download PDFInfo
- Publication number
- CN106202423A CN106202423A CN201610547800.4A CN201610547800A CN106202423A CN 106202423 A CN106202423 A CN 106202423A CN 201610547800 A CN201610547800 A CN 201610547800A CN 106202423 A CN106202423 A CN 106202423A
- Authority
- CN
- China
- Prior art keywords
- file
- filename
- character
- ordering
- under
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Embodiments provide a kind of file ordering method and apparatus.A kind of file ordering method that the embodiment of the present invention provides, including: obtain the filename of All Files under the current file directory page;To the file of file entitled pure digi-tal character under the current file directory page, the first ordering strategy is used to be ranked up;It is not the file of pure digi-tal character to filename under the current file directory page, uses the second ordering strategy to be ranked up.Owing to using different ordering strategies to be ranked up the file of the filename under the current file directory page with different qualities in the embodiment of the present invention, file ordering is carried out according to the size of the ASCII value of the filename of each file compared to unification in prior art, ranking results more conforms to user and checks custom, contribute to user and quickly search the purpose needing file, save the lookup time of user.
Description
[technical field]
The present invention relates to technical field of electronic equipment, particularly relate to a kind of file ordering method and apparatus.
[background technology]
Increasingly faster along with people's rhythm of life, the electronic equipment including mobile phone, panel computer has become as people
Live in a necessary, electronic equipment would generally store multiple file, the title of file has Chinese, English also has
Digit symbol various ways combines.In prior art when carrying out file ordering, it is common that unified according to each file
The size of the ASCII value of filename arranges, and does not consider that the feature of each filename is ranked up, this sequence side
Formula checks custom it sometimes appear that ranking results does not meets user, such as, and the file 11 of numeral entitled for file and file 2,
Before during sequence, file 11 comes file 2, and generally checking of user is accustomed to coming after file 2 for file 11.
In realizing process of the present invention, inventor finds that in prior art, at least there are the following problems:
Prior art cannot be ranked up causing ranking results not meet use according to the feature of the filename of each file
Custom is checked at family, further results in that user requires to look up during a certain file cumbersome, and the time of consuming is longer, therefore, how
Allow user find the file of needs more efficiently, be a problem demanding prompt solution.
[summary of the invention]
In view of this, a kind of file ordering method and apparatus is embodiments provided, in order to solve in prior art
Cannot be ranked up causing ranking results not meet the problem that user checks custom according to the feature of the filename of each file.
Embodiments provide techniques below scheme:
An aspect according to embodiments of the present invention, it is provided that a kind of file ordering method, is receiving file ordering request
After, described method includes:
Obtain the filename of All Files under the current file directory page;
To the file of file entitled pure digi-tal character under the current file directory page, the first ordering strategy is used to arrange
Sequence;
It is not the file of pure digi-tal character to filename under the current file directory page, uses the second ordering strategy to arrange
Sequence;
Wherein, described second ordering strategy is different from described first ordering strategy.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, to current file
Under catalog page, filename is not the file of pure digi-tal character, uses the second ordering strategy to be ranked up including:
To filename under the current file directory page be not pure digi-tal character each file filename in each character
It is normalized, so that each character in the filename of each file described is converted into same type of character;
The putting in order of each character in filename according to each file described, the successively literary composition of each file the most described
Character after each normalized putting in order identical in part name, and according to comparative result, each file described is carried out
Sequence.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, to each file
Filename in each character be normalized, so that each character in the filename of each file described is converted into same
The character of type includes:
When the character in the filename of each file described includes letter, numeral and/or symbol, determine described respectively
The ASCII value that in the filename of each file, each letter, numeral and/or symbol are corresponding;
When the character in the filename of each file described includes Chinese character, obtain the first letter of pinyin of described Chinese character,
And determine the ASCII value that in the filename of each file described, the first letter of pinyin of each Chinese character is corresponding respectively.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, described according to institute
State putting in order of each character in the filename of each file, successively the filename of each file the most described puts in order
The identical character after each normalized, and according to comparative result, be ranked up including to each file described:
According to vertical each literary composition the most described successively that puts in order of the character in the filename of each file described
Put in order in the filename of part the ASCII value of identical character;
By literary composition corresponding for character bigger for ASCII value in the identical character that puts in order in the filename of each file described
Part comes forward position.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, the first file and
Second file is any two file of file entitled pure digi-tal character under the current file directory page, to current file directory page
The file of file entitled pure digi-tal character under face, uses the first ordering strategy to be ranked up including:
Add up the digit length of the filename of described first file and the number length of the filename of described second file respectively
Degree;
If the digit length of the filename of the digit length of the filename of described first file and described second file is not
With, file less for the digit length of filename is come forward position;
If the digit length phase of the filename of the digit length of the filename of described first file and described second file
With, the filename numerical value of the most described first file and the size of the filename numerical value of the second file, and by filename numerical value
Less file comes forward position.
For compared with prior art, technique scheme has the advantages that and the invention provides a kind of file
Sort method, under obtaining the current file directory page after the filename of All Files, according to filename under current file directory
In the character kind that comprises, use different ordering strategies to be ranked up, due to current file directory in the embodiment of the present invention
The file of the filename under the page with different qualities uses different ordering strategies to be ranked up, and unites compared in prior art
One carries out file ordering according to the size of the ASCII value of the filename of each file, and ranking results more conforms to user and checks habit
Used, contribute to user and quickly search the purpose needing file, save the lookup time of user.
Another aspect of the embodiment of the present invention, it is provided that a kind of file ordering equipment, described equipment includes:
Acquiring unit, after receiving file ordering request, for obtaining the literary composition of All Files under the current file directory page
Part name;
First sequencing unit, to the file of file entitled pure digi-tal character under the current file directory page, for employing
One ordering strategy is ranked up;
Second sequencing unit, is not the file of pure digi-tal character to filename under the current file directory page, is used for using
Second ordering strategy is ranked up;
Wherein, described second ordering strategy is different from described first ordering strategy.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, described second row
Sequence unit includes:
Normalizing module, for filename under the current file directory page not being the file of each file of pure digi-tal character
In Ming, each character is normalized, to be converted into same type of by each character in the filename of each file described
Character;
Sorting sub-module, for according to the putting in order of each character in the filename of each file described, comparing successively
Character after each normalized putting in order identical in the filename of each file described, and according to comparative result, right
Each file described is ranked up.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, described normalizing mould
Block specifically for:
When the character in the filename of each file described includes letter, numeral and/or symbol, determine described respectively
The ASCII value that in the filename of each file, each letter, numeral and/or symbol are corresponding;
When the character in the filename of each file described includes Chinese character, obtain the first letter of pinyin of described Chinese character,
And determine the ASCII value that in the filename of each file described, the first letter of pinyin of each Chinese character is corresponding respectively.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, described sequence
Module specifically for:
According to vertical each literary composition the most described successively that puts in order of the character in the filename of each file described
Put in order in the filename of part the ASCII value of identical character;
By literary composition corresponding for character bigger for ASCII value in the identical character that puts in order in the filename of each file described
Part comes forward position.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, the first file and
Second file is any two file of file entitled pure digi-tal character, described first sequencing unit under the current file directory page
Specifically for:
Add up the digit length of the filename of described first file and the number length of the filename of described second file respectively
Degree;
If the digit length of the filename of the digit length of the filename of described first file and described second file is not
With, file less for the digit length of filename is come forward position;
If the digit length phase of the filename of the digit length of the filename of described first file and described second file
With, the filename numerical value of the most described first file and the size of the filename numerical value of the second file, and by filename numerical value
Less file comes forward position.
For compared with prior art, technique scheme has the advantages that and embodiments provides one
Plant file ordering equipment, under acquiring unit obtains the current file directory page after the filename of All Files, order module root
According to the character kind comprised in filename under current file directory, using different ordering strategies to be ranked up, the present invention implements
Owing to using different ordering strategies to carry out the file of the filename under the current file directory page with different qualities in example
Sequence, carries out file ordering compared to unification in prior art according to the size of the ASCII value of the filename of each file, sequence
Result more conforms to user and checks custom, contributes to user and quickly searches the purpose needing file, saves the lookup time of user.
[accompanying drawing explanation]
In order to be illustrated more clearly that the technical scheme of the embodiment of the present invention, below by embodiment required use attached
Figure is briefly described, it should be apparent that, the accompanying drawing in describing below is only some embodiments of the present invention, for this area
From the point of view of those of ordinary skill, on the premise of not paying creative work, it is also possible to obtain the attached of other according to these accompanying drawings
Figure.
Fig. 1 is the flow chart of a kind of file ordering method according to the embodiment of the present invention one;
Fig. 2 is the flow chart of a kind of file ordering method according to the embodiment of the present invention two;
Fig. 3 is the structural representation of a kind of file ordering equipment according to the embodiment of the present invention three;
Fig. 4 is the structural representation of a kind of file ordering equipment according to the embodiment of the present invention four.
[detailed description of the invention]
In order to be better understood from technical scheme, below in conjunction with the accompanying drawings the embodiment of the present invention is retouched in detail
State.
It will be appreciated that described embodiment be only the present invention a part of embodiment rather than whole embodiments.Base
Embodiment in the present invention, those of ordinary skill in the art obtained under not making creative work premise all its
Its embodiment, broadly falls into the scope of protection of the invention.
The term used in embodiments of the present invention is only merely for describing the purpose of specific embodiment, and is not intended to be limiting
The present invention." a kind of ", " described " and " being somebody's turn to do " of singulative used in the embodiment of the present invention and appended claims
It is also intended to include most form, unless context clearly shows that other implications.
Should be appreciated that term "and/or" used herein is only a kind of incidence relation describing affiliated partner, represent
Three kinds of relations, such as, A and/or B can be there are, can represent: individualism A, there is A and B, individualism B these three simultaneously
Situation.It addition, character "/" herein, typically represent forward-backward correlation to as if the relation of a kind of "or".
Depend on linguistic context, word as used in this " if " can be construed to " ... time " or " when ...
Time " or " in response to determining " or " in response to detection ".Similarly, depend on linguistic context, phrase " if it is determined that " or " if detection
(condition of statement or event) " " when determining " or " in response to determining " can be construed to or " when the detection (condition of statement
Or event) time " or " in response to detection (condition of statement or event) ".
Embodiment one
As it is shown in figure 1, be the flow chart of a kind of file ordering method according to the embodiment of the present invention one, receiving file row
After sequence request, described method may comprise steps of:
The filename of All Files under S101, the acquisition current file directory page, if the current file directory page is hereafter
The file of part entitled pure digi-tal character, then perform step S102;If filename is not pure digi-tal under the current file directory page
The file of character, then perform step S103;Wherein, described second ordering strategy is different from described first ordering strategy.
When in needing equipment, the file of storage is ranked up according to filename, receive under the current file directory page
File ordering is asked, and wherein, the file ordering request received can be the request that user triggers that equipment generates, and is receiving literary composition
After part sequencing requests, in order to realize the sequence to file, need to obtain the filename of All Files under current file directory, with root
Select corresponding ordering strategy that file is ranked up according to the kind of the character comprised in the filename of each file.
S102, to the file of file entitled pure digi-tal character under the current file directory page, use the first ordering strategy to enter
Row sequence.
S103, it is not the file of pure digi-tal character to filename under the current file directory page, uses the second ordering strategy
It is ranked up.
Concrete, under the current file directory page, the filename of file can have multiple building form, such as, pure digi-tal word
The filename of symbol composition, the filename of pure alphabetic character composition, the filename of pure chinese character composition or numeral, letter, the Chinese
The filename that in word, symbol etc., at least two combines.
Concrete, owing to having particularity with the filename of pure digi-tal character, alternatively, filename is by pure digi-tal word
The file of symbol composition can determine the sequence of file according to the numerical value that the numerical character in filename forms.Therefore, for working as
Under preceding document catalog page, the file of file entitled pure digi-tal character, uses the first ordering strategy to be ranked up, wherein first row
Sequence strategy can be that file is ranked up by the size of the numerical value according to numerical character composition.
It is not the file of pure digi-tal character for filename under the current file directory page, such as, the entitled pure letter of file
The file that in character, pure chinese character or numeral, letter, Chinese character, symbol etc., at least two combines, uses the second sequence
Strategy is ranked up, and such as, uses the ASCII value of filename to be ranked up each file.
It should be noted that equipment involved in the embodiment of the present invention can include but not limited to personal computer
(Personal Computer, PC), personal digital assistant (Personal Digital Assistant, PDA), wireless handheld
Equipment, panel computer (Tablet Computer), mobile phone, MP3 player, MP4 player etc..
The embodiment of the present invention is by obtaining under the current file directory page after the filename of All Files, according to ought be above
The character kind comprised in filename under part catalogue, uses different ordering strategies to be ranked up, in the embodiment of the present invention due to
Use different ordering strategies to be ranked up the file of the filename under the current file directory page with different qualities, compare
In prior art, unification carries out file ordering according to the size of the ASCII value of the filename of each file, and ranking results is more
Meet user and check custom, contribute to user and quickly search the purpose needing file, save the lookup time of user.
Embodiment two
As in figure 2 it is shown, be the flow chart of a kind of file ordering method according to the embodiment of the present invention two, receiving file row
After sequence request, described method may comprise steps of:
The filename of All Files under S201, the acquisition current file directory page, if the current file directory page is hereafter
Part name is not the file of pure digi-tal character, then perform step S202;If the entitled pure digi-tal of file under the current file directory page
The file of character, then perform step S204, and wherein, the first file and the second file are that under the current file directory page, file is entitled
Any two file of pure digi-tal character.
In the embodiment of the present invention, about obtaining, the specific descriptions of the filename of All Files under the current file directory page are detailed
Seeing the description in S101 in above-described embodiment, in the embodiment of the present invention, its principle is with to realize process identical, and here is omitted.
S202, to filename under the current file directory page be not pure digi-tal character each file filename in each
Character is normalized, so that each character in the filename of each file described is converted into same type of character.
Concrete, just the character of only same type can effectively contrast, in order to ensure can be to current file mesh
Record the file that filename under the page is not pure digi-tal character to be ranked up, need to carry out the character in the filename of each file
Normalized, to be converted to same type of character by each character in the filename of each file.
The processing mode being normalized each character in the filename of each file includes following two mode:
Mode one: when the character in the filename of each file described includes letter, numeral and/or symbol, respectively
Determine the ASCII value that in the filename of each file described, each letter, numeral and/or symbol are corresponding.
Mode two: when the character in the filename of each file described includes Chinese character, obtain the phonetic of described Chinese character
Initial, and determine the ASCII value that in the filename of each file described, the first letter of pinyin of each Chinese character is corresponding respectively.
Concrete, the kind of the character comprised in filename at least can include one, it is also possible to includes at least two, nothing
Opinion includes the character of several types, is required for being converted to each character corresponding A SCII value, compares to facilitate.Due to letter, number
Word and symbol can be converted directly into ASCII value, therefore when having letter, numeral and/or symbol in the character comprised in filename
Time, can directly change, when character comprises Chinese character, owing to Chinese character does not has the ASCII value of correspondence, it is therefore desirable to pass through
Special mode is changed.Further, the first letter of pinyin of Chinese character has sequencing in alphabet, therefore at character
In when comprising Chinese character, can obtain the first letter of pinyin of this Chinese character, and determine the ASCII that the first letter of pinyin of this Chinese character is corresponding
Value, in order to compare.
S203, according to the putting in order of each character in the filename of each file described, each literary composition the most described successively
Character after each normalized putting in order identical in the filename of part, and according to comparative result, to each literary composition described
Part is ranked up.
Concrete, after character in the filename to each file is normalized, the filename of each file
In each character be unified into the character of same type, then to the filename of each file has aligned identical order
Character, compares successively according to putting in order of character in the filename of each file, is the character of first when putting in order
Time different, then can determine that and put in order, when putting in order be first character identical time, then continue to compare put in order into
The character of second, till comparing the situation that aligned identical sequentially character is different, then according to comparative result to file
It is ranked up.Such as: the file after a file is normalized is entitled: ABC, and the file of another file is entitled:
ADE, file is entitled: the filename of ABC put in order be first character be A, put in order be second character be B, row
Row order be the 3rd character be C, file is entitled: the filename of ADE put in order be first character be A, put in order
Be second character be D, put in order be the 3rd character be E, when comparing, be first the word on first to putting in order
Symbol compares, because putting in order is that the character on first is identical, therefore continues to be that the character on second enters to putting in order
Row compares, and now putting in order is that the character on second differs, thus may determine that go out comparative result, then compares according to this
File is ranked up by result, when there is multiple file, compares two-by-two also according to said method, and according to comparing knot
Multiple files are ranked up by fruit.
Alternatively, according to the putting in order of each character in the filename of each file described, successively the most described each
Character after each normalized putting in order identical in the filename of file, and according to comparative result, to described each
File is ranked up including:
According to vertical each literary composition the most described successively that puts in order of the character in the filename of each file described
Put in order in the filename of part the ASCII value of identical character;
By literary composition corresponding for character bigger for ASCII value in the identical character that puts in order in the filename of each file described
Part comes forward position.
Concrete, by after in the filename of each file, character is converted to ASCII value, in the filename of each file
There is the ASCII value corresponding to character of aligned identical order, according to the putting in order successively of character in the filename of each file
Comparing, concrete comparative approach is as described in above-mentioned comparative approach, after determining comparative result, by word bigger for ASCII value
The file that symbol is corresponding comes forward position, certainly puts in order and can also is that other modes, as by character pair less for ASCII value
The file answered comes forward position, and the purpose of the embodiment of the present invention is to be converted to according to character in the filename of each file
The size of ASCII value is ranked up, and concrete sortord can be set according to the actual requirements.
S204, to the file of file entitled pure digi-tal character under the current file directory page, use the first ordering strategy to enter
Row sequence.
Alternatively, under the current file directory page, the file of file entitled pure digi-tal character includes the first file and the second literary composition
Part, wherein, the first file and the second file are any two literary composition of file entitled pure digi-tal character under the current file directory page
Part, illustrates this example below as a example by the first file and the second file, and step S204 farther includes following steps:
Step S2041, the digit length adding up the filename of described first file respectively and the file of described second file
The digit length of name, if the number length of the filename of the digit length of the filename of described first file and described second file
Degree difference, then perform step S2042;If the digit length of the filename of described first file and the file of described second file
The digit length of name is identical, then perform step S2043.
Concrete, it is to start statistics, such as: file with the first character being not zero during the digit length of statistics file name
When entitled 000123, digit length is 3, and when file is 011234, digit length is 5, and when file is 11234, digit length is
5。
Step S2042, file less for the digit length of filename is come forward position.
Concrete, when the digit length of the digit length of filename of the first file and the filename of the second file is different
Time, the numerical value of the less numeral correspondence representing composition file name of the digit length of filename is less, therefore can be according to file
The digit length of name directly determines the sequence of file, naturally it is also possible to come forward by file bigger for the digit length of filename
Position, concrete condition determines according to the actual requirements.
The filename numerical value of the first file described in step S2043, comparison and the size of the filename numerical value of the second file, and
File less for filename numerical value is come forward position.
Concrete, when the digit length of the digit length of filename of the first file and the filename of the second file is identical
Time, can be directly according to numerical value corresponding to the numeral of the filename forming the first file and the number of the filename of composition the second file
The numerical value that word is corresponding compares, by file arrangements less for numerical value on forward position, and certainly can also be bigger by numerical value
File arrangements on forward position, concrete condition determines according to the actual requirements.
Any two file of file entitled pure digi-tal character under the current file directory page is all held by the embodiment of the present invention
Row above-mentioned steps S2041 is to step S2043, until completing the institute of file entitled pure digi-tal character under the current file directory page
Documentary sequence.
The embodiment of the present invention is by obtaining under the current file directory page after the filename of All Files, according to ought be above
The character kind comprised in filename under part catalogue, uses different ordering strategies to be ranked up, in the embodiment of the present invention due to
Have employed ordering strategy, and then after making the file under the current file directory page is ranked up, the current file directory page
Under file show according to certain rule, cause user search need file time, according to the literary composition of locating file
Part name, in conjunction with the sortord of file, it is possible to achieve quickly searching needs the purpose of file, saves the lookup time of user.
Embodiment three
As it is shown on figure 3, be the structural representation of a kind of file ordering equipment according to the embodiment of the present invention three, described file
Sequencing equipment specifically may include that acquiring unit the 31, first sequencing unit 32 and the second sequencing unit 33.
Acquiring unit 31, after receiving file ordering request, for obtaining All Files under the current file directory page
Filename;
First sequencing unit 32, to the file of file entitled pure digi-tal character under the current file directory page, is used for using
First ordering strategy is ranked up;
Second sequencing unit 33, is not the file of pure digi-tal character to filename under the current file directory page, is used for adopting
It is ranked up with the second ordering strategy;
Wherein, described second ordering strategy is different from described first ordering strategy.
The structural representation of a kind of file ordering equipment disclosed in the embodiment of the present invention three, may be used for performing shown in Fig. 1
The technical scheme of embodiment of the method, it is similar with technique effect that it realizes principle, and here is omitted.
Embodiments provide a kind of file ordering equipment, institute under acquiring unit obtains the current file directory page
After documentary filename, order module, according to the character kind comprised in filename under current file directory, uses different
Ordering strategy is ranked up, due to the filename under the current file directory page with different qualities in the embodiment of the present invention
File uses different ordering strategies to be ranked up, compared to unifying the filename according to each file in prior art
The size of ASCII value carries out file ordering, and ranking results more conforms to user and checks custom, contributes to user and quickly searches needs
The purpose of file, saves the lookup time of user.
Embodiment four
As shown in Figure 4, for the structural representation of a kind of file ordering equipment according to the embodiment of the present invention four, described file
Sequencing equipment specifically may include that acquiring unit 31, normalizing module 41, sorting sub-module 42 and the second sequencing unit 33.
Acquiring unit 31, after receiving file ordering request, for obtaining All Files under the current file directory page
Filename.
Normalizing module 41, for filename under the current file directory page not being the literary composition of each file of pure digi-tal character
In part name, each character is normalized, so that each character in the filename of each file described is converted into same type
Character;
Sorting sub-module 42, for according to the putting in order of each character in the filename of each file described, successively than
Character after each normalized putting in order identical in the filename of each file relatively described, and according to comparative result,
Each file described is ranked up.
Wherein, described normalizing module 41 specifically for:
When the character in the filename of each file described includes letter, numeral and/or symbol, determine described respectively
The ASCII value that in the filename of each file, each letter, numeral and/or symbol are corresponding;
When the character in the filename of each file described includes Chinese character, obtain the first letter of pinyin of described Chinese character,
And determine the ASCII value that in the filename of each file described, the first letter of pinyin of each Chinese character is corresponding respectively.
Described sorting sub-module 42 specifically for:
According to vertical each literary composition the most described successively that puts in order of the character in the filename of each file described
Put in order in the filename of part the ASCII value of identical character;
By literary composition corresponding for character bigger for ASCII value in the identical character that puts in order in the filename of each file described
Part comes forward position.
Alternatively, the first file and the second file are any of file entitled pure digi-tal character under the current file directory page
Two files, described first sequencing unit 33 specifically for:
Add up the digit length of the filename of described first file and the number length of the filename of described second file respectively
Degree;
If the digit length of the filename of the digit length of the filename of described first file and described second file is not
With, file less for the digit length of filename is come forward position;
If the digit length phase of the filename of the digit length of the filename of described first file and described second file
With, the filename numerical value of the most described first file and the size of the filename numerical value of the second file, and by filename numerical value
Less file comes forward position.
The structural representation of a kind of file ordering equipment disclosed in the embodiment of the present invention four, may be used for performing shown in Fig. 2
The technical scheme of embodiment of the method, it is similar with technique effect that it realizes principle, and here is omitted.
Embodiments provide a kind of file ordering equipment, institute under acquiring unit obtains the current file directory page
After documentary filename, order module, according to the character kind comprised in filename under current file directory, uses different
Ordering strategy is ranked up, and owing to have employed ordering strategy in the embodiment of the present invention, and then makes the current file directory page
Under file be ranked up after, the file under the current file directory page shows according to certain rule, causes user
When searching the file needed, according to the filename of locating file, in conjunction with the sortord of file, it is possible to achieve quickly search and need
Want the purpose of file, save the lookup time of user.
In several embodiments provided by the present invention, it should be understood that disclosed system, terminal and method, permissible
Realize by another way.Such as, terminal embodiment described above is only schematically, such as, and described unit
Dividing, be only a kind of logic function and divide, actual can have other dividing mode, such as, multiple unit or group when realizing
Part can in conjunction with or be desirably integrated into another system, or some features can be ignored, or does not performs.Another point, shown
Or the coupling each other discussed or direct-coupling or communication connection can be indirect by some interfaces, terminal or unit
Coupling or communication connection, can be electrical, machinery or other form.
The described unit illustrated as separating component can be or may not be physically separate, shows as unit
The parts shown can be or may not be physical location, i.e. may be located at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected according to the actual needs to realize the mesh of the present embodiment scheme
's.
It addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it is also possible to
It is that unit is individually physically present, it is also possible to two or more unit are integrated in a unit.Above-mentioned integrated list
Unit both can realize to use the form of hardware, it would however also be possible to employ hardware adds the form of SFU software functional unit and realizes.
The above-mentioned integrated unit realized with the form of SFU software functional unit, can be stored in an embodied on computer readable and deposit
In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions with so that a computer
Device (can be personal computer, server, or network equipment etc.) or processor (Processor) perform the present invention each
The part steps of method described in embodiment.And aforesaid storage medium includes: USB flash disk, portable hard drive, read only memory (Read-
Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. various
The medium of program code can be stored.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all essences in the present invention
Within god and principle, any modification, equivalent substitution and improvement etc. done, within should be included in the scope of protection of the invention.
Claims (10)
1. a file ordering method, it is characterised in that after receiving file ordering request, described method includes:
Obtain the filename of All Files under the current file directory page;
To the file of file entitled pure digi-tal character under the current file directory page, the first ordering strategy is used to be ranked up;
It is not the file of pure digi-tal character to filename under the current file directory page, uses the second ordering strategy to be ranked up;
Wherein, described second ordering strategy is different from described first ordering strategy.
2. as claimed in claim 1 method, it is characterised in that be not pure digi-tal character to filename under the current file directory page
File, use the second ordering strategy to be ranked up including:
Filename under the current file directory page is not carried out for each character in the filename of each file of pure digi-tal character
Normalized, to be converted into same type of character by each character in the filename of each file described;
The putting in order of each character in filename according to each file described, the successively filename of each file the most described
In put in order identical each normalized after character, and according to comparative result, each file described is ranked up.
3. method as claimed in claim 2, it is characterised in that each character in the filename of each file is normalized place
Reason, includes so that each character in the filename of each file described is converted into same type of character:
When the character in the filename of each file described includes letter, numeral and/or symbol, determine respectively described each
The ASCII value that in the filename of file, each letter, numeral and/or symbol are corresponding;
When the character in the filename of each file described includes Chinese character, obtain the first letter of pinyin of described Chinese character, and divide
Do not determine the ASCII value that in the filename of each file described, the first letter of pinyin of each Chinese character is corresponding.
4. method as claimed in claim 3, it is characterised in that each character in the filename of each file described in described basis
Put in order, the character after each normalized putting in order identical in the filename of each file the most described successively,
And according to comparative result, be ranked up including to each file described:
Each file described is compared successively according to vertical the putting in order of the character in the filename of each file described
Put in order in filename the ASCII value of identical character;
By file row corresponding for character bigger for ASCII value in the identical character that puts in order in the filename of each file described
In forward position.
5. as claimed in claim 1 method, it is characterised in that the first file and the second file be the current file directory page hereafter
Any two file of part entitled pure digi-tal character, to the file of file entitled pure digi-tal character under the current file directory page,
The first ordering strategy is used to be ranked up including:
Add up the digit length of the filename of described first file and the digit length of the filename of described second file respectively;
If the digit length of the filename of described first file is different with the digit length of the filename of described second file, will
The file that the digit length of filename is less comes forward position;
If the digit length of the filename of described first file is identical, then with the digit length of the filename of described second file
Compare the filename numerical value of described first file and the size of the filename numerical value of the second file, and by less for filename numerical value
File comes forward position.
6. a file ordering equipment, it is characterised in that described equipment includes:
Acquiring unit, after receiving file ordering request, for obtaining the filename of All Files under the current file directory page;
First sequencing unit, to the file of file entitled pure digi-tal character under the current file directory page, is used for using first row
Sequence strategy is ranked up;
Second sequencing unit, is not the file of pure digi-tal character to filename under the current file directory page, for employing second
Ordering strategy is ranked up;
Wherein, described second ordering strategy is different from described first ordering strategy.
7. equipment as claimed in claim 1, it is characterised in that described second sequencing unit includes:
Normalizing module, for not being in the filename of each file of pure digi-tal character to filename under the current file directory page
Each character is normalized, so that each character in the filename of each file described is converted into same type of word
Symbol;
Sorting sub-module, for according to the putting in order of each character in the filename of each file described, the most described successively
Character after each normalized putting in order identical in the filename of each file, and according to comparative result, to described
Each file is ranked up.
8. as claimed in claim 7 equipment, it is characterised in that described normalizing module specifically for:
When the character in the filename of each file described includes letter, numeral and/or symbol, determine respectively described each
The ASCII value that in the filename of file, each letter, numeral and/or symbol are corresponding;
When the character in the filename of each file described includes Chinese character, obtain the first letter of pinyin of described Chinese character, and divide
Do not determine the ASCII value that in the filename of each file described, the first letter of pinyin of each Chinese character is corresponding.
9. as claimed in claim 8 equipment, it is characterised in that described sorting sub-module specifically for:
Each file described is compared successively according to vertical the putting in order of the character in the filename of each file described
Put in order in filename the ASCII value of identical character;
By file row corresponding for character bigger for ASCII value in the identical character that puts in order in the filename of each file described
In forward position.
10. equipment as claimed in claim 6, it is characterised in that the first file and the second file are under the current file directory page
Any two file of file entitled pure digi-tal character, described first sequencing unit specifically for:
Add up the digit length of the filename of described first file and the digit length of the filename of described second file respectively;
If the digit length of the filename of described first file is different with the digit length of the filename of described second file, will
The file that the digit length of filename is less comes forward position;
If the digit length of the filename of described first file is identical, then with the digit length of the filename of described second file
Compare the filename numerical value of described first file and the size of the filename numerical value of the second file, and by less for filename numerical value
File comes forward position.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610547800.4A CN106202423A (en) | 2016-07-12 | 2016-07-12 | A kind of file ordering method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610547800.4A CN106202423A (en) | 2016-07-12 | 2016-07-12 | A kind of file ordering method and apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106202423A true CN106202423A (en) | 2016-12-07 |
Family
ID=57477761
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610547800.4A Pending CN106202423A (en) | 2016-07-12 | 2016-07-12 | A kind of file ordering method and apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106202423A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108133048A (en) * | 2018-01-16 | 2018-06-08 | 广东欧珀移动通信有限公司 | file ordering method, device and mobile terminal |
CN108804404A (en) * | 2018-05-29 | 2018-11-13 | 周宇 | Character text processing method and processing device |
CN113468122A (en) * | 2021-06-24 | 2021-10-01 | 广东全芯半导体有限公司 | TF card reading equipment with Bluetooth function |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104572685A (en) * | 2013-10-17 | 2015-04-29 | 纬创资通股份有限公司 | Data ranking method |
CN104615663A (en) * | 2015-01-07 | 2015-05-13 | 小米科技有限责任公司 | File sorting method and device and terminal |
-
2016
- 2016-07-12 CN CN201610547800.4A patent/CN106202423A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104572685A (en) * | 2013-10-17 | 2015-04-29 | 纬创资通股份有限公司 | Data ranking method |
CN104615663A (en) * | 2015-01-07 | 2015-05-13 | 小米科技有限责任公司 | File sorting method and device and terminal |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108133048A (en) * | 2018-01-16 | 2018-06-08 | 广东欧珀移动通信有限公司 | file ordering method, device and mobile terminal |
CN108133048B (en) * | 2018-01-16 | 2020-09-25 | Oppo广东移动通信有限公司 | File sorting method and device and mobile terminal |
CN108804404A (en) * | 2018-05-29 | 2018-11-13 | 周宇 | Character text processing method and processing device |
CN108804404B (en) * | 2018-05-29 | 2022-04-15 | 周宇 | Character text processing method and device |
CN113468122A (en) * | 2021-06-24 | 2021-10-01 | 广东全芯半导体有限公司 | TF card reading equipment with Bluetooth function |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9081812B2 (en) | System and method for information identification using tracked preferences of a user | |
US10210243B2 (en) | Method and system for enhanced query term suggestion | |
US10394839B2 (en) | Crowdsourcing application history search | |
US20110202533A1 (en) | Dynamic Search Interaction | |
CN102725759A (en) | Semantic table of contents for search results | |
US10083398B2 (en) | Framework for annotated-text search using indexed parallel fields | |
US20160188569A1 (en) | Generating a Table of Contents for Unformatted Text | |
CN111198936B (en) | Voice search method and device, electronic equipment and storage medium | |
CN107885826A (en) | Method for broadcasting multimedia file, device, storage medium and electronic equipment | |
CN104281275B (en) | The input method of a kind of English and device | |
CN105930505A (en) | Information search method and apparatus | |
CN106202423A (en) | A kind of file ordering method and apparatus | |
CN111160029A (en) | Information processing method and device, electronic equipment and computer readable storage medium | |
CN109657043B (en) | Method, device and equipment for automatically generating article and storage medium | |
US10592572B2 (en) | Application view index and search | |
CN106919593B (en) | Searching method and device | |
CN114297143A (en) | File searching method, file displaying device and mobile terminal | |
CN109545223B (en) | Voice recognition method applied to user terminal and terminal equipment | |
CN109451347A (en) | A kind of special effect making method, apparatus, terminal and computer readable storage medium | |
CN105354342A (en) | Retrieval method and mobile terminal | |
CN108108379B (en) | Keyword word expansion method and device | |
CN112148135A (en) | Input method processing method and device and electronic equipment | |
CN106611022B (en) | Method and device for improving search efficiency in website | |
CN116719843A (en) | Query method, storage medium and device for database system | |
CN105893614A (en) | Information recommendation method and device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20161207 |