Embodiment
In order that those skilled in the art more fully understand the technical scheme in the application, below in conjunction with this
Apply for the accompanying drawing in embodiment, the technical scheme in the embodiment of the present application be clearly and completely described,
Obviously, described embodiment is only some embodiments of the present application, rather than whole embodiments.Base
Embodiment in the application, those of ordinary skill in the art are obtained under the premise of creative work is not paid
The every other embodiment obtained, it should all belong to the scope of the application protection.
Fig. 1 is the flow chart of the file designation method provided in the embodiment of the application one.In the present embodiment, institute
File designation method is stated to comprise the following steps:
S110:When increasing file under detecting destination path newly, at least two text under the destination path is obtained
The filename of part.
Can be that file designation method is realized on any form of terminal device in present specification, the end
Executive agent of the end equipment as above-mentioned file designation method, it may, for example, be personal computer (PC), just
Take formula computer, smart mobile phone, tablet personal computer (PAD) etc..
The destination path can be user download file after store path or synchronous documents after
Store path, it can also be the store path after file transfer.
The file used interchangeably can refer to the text that may be present in computer based environment herein
Shelves (such as word, txt, excel, pdf), image, audio, the text of video or any other form
Part.
S120:Identify between the filename whether there is identical naming rule.
Terminal device by analyzing the filename of above-mentioned at least two file, identify the filename it
Between whether there is identical naming rule.
Specifically, the step S120:Identify between the filename whether there is identical naming rule,
It can include:
Identify the naming rule that whether there is numerical value inference between the filename.
In the present embodiment, the numerical value reasoning is names according to numerical order, i.e., described in terminal device identification
With the presence or absence of the rule on numerical order between filename..For example, first file is entitled " xx01 ",
Second file is entitled " xx02 ", because " 01 " and " 02 " have numerically incremental rule, then
The terminal device can identifies the naming rule that numerical value inference between the filename be present, and institute
It is " xx " addend value afterwards to state naming rule.
Specifically, the step S120:Identify between the filename whether there is identical naming rule,
It can include:
Identify the naming rule that whether there is alphabetical inference between the filename.
In the present embodiment, the alphabetical inference is names in alphabetical order, i.e., described in terminal device identification
With the presence or absence of the rule in lexicographic order between filename.For example, first file it is entitled " monkey a ",
Second file it is entitled " monkey b ", the rule in lexicographic order due to " a " and " b " be present, then
The terminal device can identifies the naming rule that alphabetical inference between the filename be present, and institute
It is female for " monkey " back word adding to state naming rule.
S130:If having identical naming rule between the filename, according to the naming rule by institute
State and do not meet the filename of the naming rule under destination path in original file and be changed to meet the name
The filename of rule.
Original file is already present file, i.e., described mesh before file is increased under detecting destination path newly
Mark the file in addition to the newly-increased file in path.
Some scenes are exemplified below to be illustrated.The embodiment of the present application can apply to file download scene
In, there is former documentary filename under the store path (destination path) of download:Monkey, Monkey001,
Assuming that user has downloaded the entitled Monkey002 of file file to the store path again.Terminal device exists
When detecting newly-increased file Monkey002 under the store path, the file under the store path is obtained
File it is entitled:Monkey, Monkey001, Monkey002, further identify between the filename
Whether there is identical naming rule, due to the naming rule of filename " monkey " be only Chinese " monkey ",
The naming rule of filename " Monkey001 " is English " Monkey " addend value " 001 ", filename
The naming rule of " Monkey002 " is English " Monkey " addend value " 002 ";So identify
" Monkey001 " and " Monkey002 " has identical naming rule, i.e., English " Monkey "
Plus numerical value.The filename for not meeting the naming rule in original file under the store path only has " monkey
Son ", filename " monkey " so according to the naming rule, can be changed to meet the naming rule
Filename " Monkey003 ".In this way, the file of the file under store path is entitled:Monkey001、
Monkey002、Monkey003。
The embodiment of the present application can also be applied to synchronous documents scene in, including from first terminal synchronous documents to
In second terminal, or synchronous documents are first-class to terminal from server.The synchronous documents may be considered
The file in A equipment is copied in B device.For example, in mobile phone (first terminal) file text
Part name has:" monkey ", " Monkey001 ", " Monkey002 ", if user is synchronously in the mobile phone
Three above-mentioned files are into PAD (second terminal), and per a synchronous file, the PAD can
Detect and increase file under store path newly, so as to perform step S110 to S130.Synchronous first filename
After the file of " monkey ", due to there was only a file in store path, subsequent step can not be performed;It is synchronous
After the file of second filename " Monkey001 ", due to filename " monkey " and " Monkey001 "
Without identical naming rule, subsequent step can not be performed;Synchronous 3rd filename " Monkey002 "
File after, it is because " Monkey001 ", " Monkey002 " have identical naming rule, i.e., English
" Monkey " adds numerical value, then does not meet the naming rule in original file under the store path
Filename only have " monkey ", so according to the naming rule, filename " monkey " can be changed to
Meet the filename " Monkey003 " of the naming rule.In this way, the filename of the file under store path
For:Monkey001、Monkey002、Monkey003.In the same manner, for the synchronous text from server
Example on part to terminal, similar with above-mentioned example, here is omitted.
The embodiment of the present application can also be applied in file transfer scene, including never literary with being shifted between path
Part.The different paths can be in same equipment or on distinct device.For example, from U
Copied files are on personal computer on disk, or, replicate or cut from the A files of personal computer
File is cut into the B files of the personal computer.For example, the filename that file in USB flash disk be present has:" monkey
Son ", " Monkey001 ", " Monkey002 ", if user shifts above three file from USB flash disk
In on to personal computer, a file is often shifted, the personal computer may detect that storage distance
Newly-increased file down, so as to perform step S110 to S130.Shift the file of first filename " monkey "
Afterwards, due to due to there was only a file in store path, subsequent step can not be performed;Shift second file
After the file of name " Monkey001 ", because filename " monkey " and " Monkey001 " do not have phase
Same naming rule, can not perform subsequent step;Shift the file of the 3rd filename " Monkey002 "
Afterwards, because " Monkey001 ", " Monkey002 " have identical naming rule, i.e., English " Monkey "
Plus numerical value, then the filename for not meeting the naming rule in original file under the store path only has
" monkey ", so according to the naming rule, filename " monkey " can be changed to meet name rule
Filename " Monkey003 " then.In this way, the file of the file under store path is entitled:Monkey001、
Monkey002、Monkey003.In the same manner, for from the A files of personal computer replicate or
File is sheared to the example in the B files of the personal computer, it is similar with above-mentioned example, it is no longer superfluous herein
State.
In actual applications, if the filename for not meeting naming rule exists multiple, it is changed to meet described
The filename of naming rule can be random.
In any scene as described above, it is assumed that except file entitled " monkey ", " Monkey001 ",
There is the file of filename " XX " outside the file of " Monkey002 ".In this way, naming rule is not met
Filename is just " monkey " and " XX " two;So, both of these documents name is changed to meet described
The filename of naming rule.Specific, can be random, you can be to be changed to " monkey "
" Monkey003 ", " XX " are changed to " Monkey004 ", or " monkey " is changed to " Monkey004 ",
" XX " is changed to " Monkey003 ".
It is noted that for the file increased newly in destination path, can also be according to the name of the acquisition
Rule changes filename to it.For example, in the scene of download file, if the filename for downloading file is not inconsistent
Naming rule is closed, terminal device can also be changed to the filename for meeting naming rule.
In file scene is downloaded, usually require to be named file to be downloaded when downloading file, at this
Can be symbol directly by the file designation to be downloaded according to the naming rule of the acquisition in embodiment
Close the filename of naming rule.By the present embodiment, terminal device identifies the filename of file under destination path
Between there is identical naming rule, the file of the naming rule will not be met further according to the naming rule
Name is changed to the filename for meeting the naming rule.In this way, user enters file directory servant without oneself
Work changes the filename for the file for not meeting naming rule one by one, improves efficiency, the lifting of change filename
Consumer's Experience.
In the specific embodiment of the application, in the step S130, according to the naming rule
The filename for not meeting the naming rule in original file under the destination path is changed to meet described
The filename of naming rule, it can specifically include:
The naming rule will not be met according to the naming rule in original file under the destination path
Filename is changed to the filename for meeting the naming rule according to creation time order.
In the present embodiment, the creation time can be the creation time of file.Creation time morning,
It is located in time sequencing above, creation time evening, positioned at later in time sequencing.For example, first
Time is 00 second January 1 day 22 point 20 minute in 2016 and the second time was January 1 day 22: 00 in 2016
Divide 00 point, because the second time is earlier than the very first time, so when the second time was located at first in time sequencing
Between before.
Still continue to use previous example, i.e., there are under store path file entitled " monkey ", " Monkey001 ",
" Monkey002 " and " XX " file, it is original under the store path after file is increased newly
The file entitled " monkey " and " XX " of naming rule are not met in file.During the establishment of " if monkey "
Between prior to " XX ", then according to naming rule, filename " monkey " can be changed to " Monkey003 ",
And filename " XX " is changed to " Monkey004 ";, whereas if the creation time of " XX " is prior to " monkey
Son, then according to naming rule, filename " XX " can be changed to " Monkey003 ", and file
Name " monkey " is changed to " Monkey004 ".
The present embodiment implements difference with upper one and is, by creation time change can be controlled multiple
The priority change order during filename of naming rule is not met.
As shown in Fig. 2 in the specific embodiment of the application, the step S110 obtains target
The filename of at least two files, specifically may include steps of under path:
S111:Obtain the filename at least two files for meeting preparatory condition under destination path.
Correspondingly, the step S130, can specifically include:
S131:If having identical naming rule between the filename, according to the naming rule by institute
State the filename change that the naming rule is not met in the original file for meet under destination path preparatory condition
To meet the filename of the naming rule.
In actual applications, user is not necessarily wanted all naming rules of not meeting under destination path
Filename is modified.For example, the file user long ago downloaded under destination path is not intended to change text
Part name, and only wish to change in this downloading process the file for not meeting naming rule.So this implementation
The scope of application of the present embodiment to file under the destination path is limited by preparatory condition in example.
The preparatory condition can be including in being increased newly in increased newly in preset duration, this start at least one
Kind.Specifically, the preset duration can be the empirical value being manually set.For example, obtain under destination path
The filename of at least two files increased newly in half an hour (preset duration).
By the present embodiment, preparatory condition is set to be changed to limit this document naming method under the destination path
The scope of application of the filename of file, for not meeting the file of preparatory condition even if not meeting naming rule
Filename will not be modified to it.
As shown in figure 3, in the specific embodiment of the application, after the step S120,
Before step S130, it can also comprise the following steps:
S121:If having identical naming rule between the filename, judge whether to receive confirmation by
Button is triggered generated change directive.
In actual applications, will be directly inconsistent according to the naming rule under the destination path in original file
The filename for closing the naming rule is changed to the filename for meeting the naming rule, and is selected without user
Select determination, it will usually allow user to produce resentment, so as to reduce Consumer's Experience.In the present embodiment, terminal
Equipment predeterminated position can export after having identical naming rule between identifying filename on screen
One confirming button, for prompting user.If user clicks on confirming button, it is considered as user and agrees to change
The filename of naming rule is not met, and a change directive can be produced.
Correspondingly, the step S130, can specifically include:
S132:If receive ACK button to be triggered generated change directive, according to the naming rule
The filename for not meeting the naming rule in original file under the destination path is changed to meet described
The filename of naming rule.
Terminal device is triggered after generated change directive receiving confirming button, just can be according to the life
The filename that the naming rule is not met in original file under the destination path is changed to accord with by name rule
Close the filename of the naming rule.
It is not direct after there is identical naming rule between identifying filename by the present embodiment
Change does not meet the filename of naming rule, but needs to receive user and click on what is generated after ACK button
Change directive, it can just change the filename for not meeting naming rule.Consumer's Experience can be so improved, is kept away
Exempt from user to be not desired to change filename originally, and terminal device directly change does not meet the filename institute of naming rule
The problem of generation.
The embodiment of the present application provides and also provides a kind of device, it is possible to achieve above-mentioned method and step, and the device
It can be realized, can also be realized by way of hardware or software and hardware combining by software.It is implemented in software
Exemplified by, as the device on logical meaning, be by the CPU of server (Central Process Unit,
Central processing unit) corresponding computer program instructions are read and run what is formed in internal memory.
Fig. 4 is the module diagram of the file designation device provided in the embodiment of the application one.In the present embodiment,
The file designation device includes:
Acquiring unit 210, when increasing file under detecting destination path newly, obtain under the destination path extremely
The filename of few two files;
Judging unit 220, identify between the filename whether there is identical naming rule;
Unit 230 is named, when there is identical naming rule between the filename, according to the name
The filename that the naming rule is not met in original file under the destination path is changed to meet by rule
The filename of the naming rule.
By the present embodiment, there is identical life between the filename of file under terminal device identification destination path
Name rule, the filename for not meeting the naming rule is changed to meet further according to the naming rule described
The filename of naming rule.In this way, user does not meet without oneself entering artificial change one by one under file directory
The filename of the file of naming rule, improve the efficiency of change filename, improve Consumer's Experience.
Preferably, the acquiring unit 210, can specifically include:
Subelement is obtained, obtains the filename at least two files for meeting preparatory condition under destination path;
Correspondingly, the name unit 230, can specifically include:
When there is identical naming rule between the filename, according to the naming rule by the target
Meet under path and the filename of the naming rule is not met in original file of preparatory condition be changed to meet
The filename of the naming rule.
By the present embodiment, preparatory condition is set and changed to limit this document name device under the destination path
The scope of application of the filename of file, for not meeting the file of preparatory condition even if not meeting naming rule
Filename will not be modified to it.
Preferably, during the preparatory condition can be including increasing newly in increased newly in preset duration, this start
It is at least one.
It is for the file increased newly not in preset duration or new not in this start by the present embodiment
The file of increasing also will not be modified filename even if not meeting naming rule to it.
Preferably, the recognition unit 220, is specifically included:
First identification subelement, identifies the naming rule that whether there is numerical value inference between the filename;Its
In, the numerical value reasoning is to be named according to numerical order;
Or the second identification subelement, identify that the name between the filename with the presence or absence of alphabetical inference is advised
Then;Wherein, trifling alphabetical inference is to name in alphabetical order.
By the present embodiment, terminal device identifies the opinion that existing numerical value pushes away between filename under destination path
Naming rule or alphabetical inference naming rule, further according to the numerical value inference or the life of alphabetical inference
The filename for the naming rule for not meeting the numerical value inference or alphabetical inference is changed to meet by name rule
The filename of the naming rule of numerical value inference or alphabetical inference.In this way, user enters file mesh without oneself
The lower artificial change one by one of record does not meet the filename of the file of the naming rule of numerical value inference or alphabetical inference,
Improve the efficiency of change filename, improve Consumer's Experience.
Preferably, the name unit 230, can specifically include:
Subelement is named, when there is identical naming rule between the filename, is advised according to the name
Then the filename of the naming rule will not be met in original file under the destination path according to creation time
Order is changed to the filename for meeting the naming rule.
The present embodiment implements difference with upper one and is, by creation time change can be controlled multiple
The priority change order during filename of naming rule is not met.
Preferably, after the recognition unit 220, before the name unit 230, can also wrap
Include:
Confirmation unit, when there is identical naming rule between the filename, judge whether to receive really
Recognize button to be triggered generated change directive;
Correspondingly, the name unit 230, can specifically include:
Receive ACK button be triggered generated change directive when, according to the naming rule will described in
The filename for not meeting the naming rule under destination path in original file is changed to meet the name rule
Filename then.
It is not direct after there is identical naming rule between identifying filename by the present embodiment
Change does not meet the filename of naming rule, but needs to receive user and click on what is generated after ACK button
Change directive, it can just change the filename for not meeting naming rule.Consumer's Experience can be so improved, is kept away
Exempt from user to be not desired to change filename originally, and terminal device directly change does not meet the filename institute of naming rule
The problem of generation.
In the 1990s, it is changing on hardware that the improvement for a technology, which can be distinguished clearly,
The improvement entered on (for example, improvement to circuit structures such as diode, transistor, switches) or software is (right
In the improvement of method flow).However, with the development of technology, the improvement of current many method flows is
Through directly improving for hardware circuit can be considered as.Designer is nearly all by by improved method flow
It is programmed into hardware circuit to obtain corresponding hardware circuit.Therefore, it cannot be said that method flow
Improvement cannot be realized with hardware entities module.For example, PLD (Programmable
Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate Array,
FPGA it is exactly)) such a integrated circuit, its logic function is determined by user to device programming.By setting
Meter personnel are voluntarily programmed a digital display circuit " integrated " on a piece of PLD, without asking chip system
Manufacturer is made to design and make special IC chip.Moreover, nowadays, substitution manually makes integrated
Circuit chip, this programming also use " logic compiler (logic compiler) " software instead to realize mostly,
Software compiler used is similar when it writes with program development, and the source code before compiling also obtains
Write with specific programming language, this is referred to as hardware description language (Hardware Description
Language, HDL), and HDL is also not only a kind of, but have many kinds, such as ABEL (Advanced
Boolean Expression Language)、AHDL(Altera Hardware Description Language)、
Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL
(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL
(Ruby Hardware Description Language) etc., most generally uses VHDL at present
(Very-High-Speed Integrated Circuit Hardware Description Language) with
Verilog.Those skilled in the art, which also will be apparent to the skilled artisan that, only to be needed method flow with above-mentioned several hardware descriptions
Language slightly programming in logic and is programmed into integrated circuit, it is possible to is readily available and is realized the logical method stream
The hardware circuit of journey.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor
Or processor and storage can be by computer readable program code (such as the softwares of (micro-) computing device
Or firmware) computer-readable medium, gate, switch, application specific integrated circuit (Application Specific
Integrated Circuit, ASIC), the form of programmable logic controller (PLC) and embedded microcontroller, controller
Example include but is not limited to following microcontroller:ARC 625D、Atmel AT91SAM、Microchip
PIC18F26K20 and Silicone Labs C8051F320, Memory Controller are also implemented as depositing
A part for the control logic of reservoir.It is also known in the art that except with pure computer-readable program
Code means are realized beyond controller, completely can be by the way that method and step is carried out into programming in logic come control
Device is with the shape of gate, switch, application specific integrated circuit, programmable logic controller (PLC) and embedded microcontroller etc.
Formula realizes identical function.Therefore this controller is considered a kind of hardware component, and to being wrapped in it
What is included is used to realize that the device of various functions can also to be considered as the structure in hardware component.Or even, can be with
It not only can will be the software module of implementation method for realizing that the device of various functions is considered as but also can be hardware
Structure in part.
System, device, module or the unit that above-described embodiment illustrates, specifically can be by computer chip or reality
Body is realized, or is realized by the product with certain function.
For convenience of description, it is divided into various units during description apparatus above with function to describe respectively.Certainly,
The function of each unit can be realized in same or multiple softwares and/or hardware when implementing the application.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or meter
Calculation machine program product.Therefore, the present invention can use complete hardware embodiment, complete software embodiment or knot
The form of embodiment in terms of conjunction software and hardware.Wherein wrapped in one or more moreover, the present invention can use
Containing computer usable program code computer-usable storage medium (include but is not limited to magnetic disk storage,
CD-ROM, optical memory etc.) on the form of computer program product implemented.
The present invention is produced with reference to method according to embodiments of the present invention, equipment (system) and computer program
The flow chart and/or block diagram of product describes.It should be understood that can by computer program instructions implementation process figure and
/ or each flow in block diagram and/or square frame and flow in flow chart and/or block diagram and/
Or the combination of square frame.These computer program instructions can be provided to all-purpose computer, special-purpose computer, insertion
Formula processor or the processor of other programmable data processing devices are to produce a machine so that pass through calculating
The instruction of the computing device of machine or other programmable data processing devices is produced for realizing in flow chart one
The device for the function of being specified in individual flow or multiple flows and/or one square frame of block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable datas to handle and set
In the standby computer-readable memory to work in a specific way so that be stored in the computer-readable memory
Instruction produce and include the manufacture of command device, command device realization is in one flow or multiple of flow chart
The function of being specified in one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices, made
Obtain and series of operation steps is performed on computer or other programmable devices to produce computer implemented place
Reason, so as to which the instruction that is performed on computer or other programmable devices is provided for realizing in flow chart one
The step of function of being specified in flow or multiple flows and/or one square frame of block diagram or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/defeated
Outgoing interface, network interface and internal memory.
Internal memory may include the volatile memory in computer-readable medium, random access memory
(RAM) and/or the form such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).
Internal memory is the example of computer-readable medium.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by appointing
What method or technique realizes that information stores.Information can be computer-readable instruction, data structure, program
Module or other data.The example of the storage medium of computer includes, but are not limited to phase transition internal memory
(PRAM), static RAM (SRAM), dynamic random access memory (DRAM), its
Random access memory (RAM), read-only storage (ROM), the electrically erasable of his type are read-only
Memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage
(CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic cassette tape, tape magnetic
Disk storage or other magnetic storage apparatus or any other non-transmission medium, it can be calculated available for storage
The information that equipment accesses.Defined according to herein, computer-readable medium does not include temporary computer-readable matchmaker
The data-signal and carrier wave of body (transitory media), such as modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to non-row
His property includes, so that process, method, commodity or equipment including a series of elements not only include
Those key elements, but also the other element including being not expressly set out, or also include for this process,
Method, commodity or the intrinsic key element of equipment.In the absence of more restrictions, by sentence " including
One ... " limit key element, it is not excluded that in the process including the key element, method, commodity or set
Other identical element also be present in standby.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer journey
Sequence product.Therefore, the application can use complete hardware embodiment, complete software embodiment or combine software and
The form of the embodiment of hardware aspect.Moreover, the application can use wherein includes calculating in one or more
Machine usable program code computer-usable storage medium (include but is not limited to magnetic disk storage, CD-ROM,
Optical memory etc.) on the form of computer program product implemented.
The application can be described in the general context of computer executable instructions, example
Such as program module.Usually, program module includes performing particular task or realizes particular abstract data type
Routine, program, object, component, data structure etc..This can also be put into practice in a distributed computing environment
Application, in these DCEs, by by communication network and connected remote processing devices come
Execution task.In a distributed computing environment, program module can be located at the local including storage device
In remote computer storage medium.
Each embodiment in this specification is described by the way of progressive, identical phase between each embodiment
As part mutually referring to, what each embodiment stressed be it is different from other embodiment it
Place.For system embodiment, because it is substantially similar to embodiment of the method, so description
Fairly simple, the relevent part can refer to the partial explaination of embodiments of method.
Embodiments herein is the foregoing is only, is not limited to the application.For this area skill
For art personnel, the application can have various modifications and variations.All institutes within spirit herein and principle
Any modification, equivalent substitution and improvements of work etc., should be included within the scope of claims hereof.