CN107341155B - File naming method and device - Google Patents

File naming method and device Download PDF

Info

Publication number
CN107341155B
CN107341155B CN201610282095.XA CN201610282095A CN107341155B CN 107341155 B CN107341155 B CN 107341155B CN 201610282095 A CN201610282095 A CN 201610282095A CN 107341155 B CN107341155 B CN 107341155B
Authority
CN
China
Prior art keywords
file
naming rule
naming
file names
target path
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.)
Active
Application number
CN201610282095.XA
Other languages
Chinese (zh)
Other versions
CN107341155A (en
Inventor
柳林东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610282095.XA priority Critical patent/CN107341155B/en
Publication of CN107341155A publication Critical patent/CN107341155A/en
Application granted granted Critical
Publication of CN107341155B publication Critical patent/CN107341155B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/164File meta data generation
    • G06F16/166File name conversion

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

The embodiment of the application discloses a file naming method and device. The file naming method comprises the following steps: when detecting a newly added file under a target path, acquiring file names of at least two files under the target path; identifying whether the file names have the same naming rule; and if the file names have the same naming rule, changing the file name which does not accord with the naming rule in the original file under the target path into the file name which accords with the naming rule according to the naming rule. By utilizing the embodiment of the application, the efficiency of changing the file name can be improved.

Description

File naming method and device
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for naming a downloaded file.
Background
When browsing web page contents, users often download some interesting files from the browsing web page.
Generally, a user will download files of the same material to the same file directory. For example, a user browses a set of pictures about monkeys, which might be downloaded if the user is very interested in them. Typically, the system will automatically name the downloaded file (e.g., 201601011000 depending on the time of download, i.e., 2015, 1 month, 1 day, 11 point 00 min 00 s). However, the system names automatically only by expressing time and cannot highlight the content of the file. For example, when the user downloads a picture about a monkey, the user can name the picture as the picture is saved, so that the downloaded picture can be intuitively known about the content from the file name. However, the user does not necessarily follow the same naming rule when downloading the file, and even if the file has the same theme, the naming rule of the file downloaded first and the file downloaded later may be different. For example, if the user downloads the first picture, the name may be "Monkey", but if the user still names "Monkey" when downloading the second picture, the system will prompt the file name to be duplicated with the file (i.e. the first downloaded picture), so the user may be named "Monkey", and when downloading the third picture, the user may be named "Monkey 002". When downloading multiple files, the user's desire to rename files that have inconsistent naming rules becomes more and more demanding. However, at this time, the user can only enter the file directory to manually change the file names of the files which do not conform to the naming rule one by one.
In summary, the prior art has a problem of low efficiency in changing the file name.
Disclosure of Invention
An embodiment of the present application provides a file naming method and device, so as to solve the problem in the prior art that the efficiency of changing a file name is low.
In order to solve the above technical problem, the file naming method and apparatus provided in the embodiments of the present application are implemented as follows:
a file naming method, comprising:
when detecting a newly added file under a target path, acquiring file names of at least two files under the target path;
identifying whether the file names have the same naming rule;
and if the file names have the same naming rule, changing the file name which does not accord with the naming rule in the original file under the target path into the file name which accords with the naming rule according to the naming rule.
A file naming apparatus, comprising:
the acquisition unit is used for acquiring file names of at least two files under a target path when detecting a newly added file under the target path;
the identification unit is used for identifying whether the file names have the same naming rule or not;
and the naming unit is used for changing the file names which do not accord with the naming rule in the original files under the target path into the file names which accord with the naming rule according to the naming rule when the file names have the same naming rule.
According to the technical scheme provided by the embodiment of the application, the file names of the files under the target path are identified to have the same naming rule, and the file names which do not accord with the naming rule are changed into the file names which accord with the naming rule according to the naming rule. Therefore, the user does not need to manually change the file names of the files which do not accord with the naming rule one by one under the condition of entering the file directory, the efficiency of changing the file names is improved, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a flowchart of a file naming method provided in an embodiment of the present application;
FIG. 2 is a flowchart of a file naming method provided in an embodiment of the present application;
FIG. 3 is a flowchart of a file naming method provided in an embodiment of the present application;
fig. 4 is a block diagram of a file naming apparatus according to an embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without inventive step, shall fall within the scope of protection of the present application.
Fig. 1 is a flowchart of a file naming method provided in an embodiment of the present application. In this embodiment, the file naming method includes the following steps:
s110: and when detecting that a new file is added under a target path, acquiring file names of at least two files under the target path.
In this document, the file naming method may be implemented on any form of terminal device, and the terminal device may be, for example, a Personal Computer (PC), a portable computer, a smart phone, a tablet computer (PAD), or the like as an execution subject of the file naming method.
The target path may be a storage path after the user downloads the file, may also be a storage path after synchronizing the file, and may also be a storage path after the file is transferred.
The files may be used interchangeably herein to refer to documents (e.g., word, txt, excel, pdf, etc.), images, audio, video, or any other form of file that may be present in a computer-based environment.
S120: it is identified whether the file names have the same naming rule therebetween.
And the terminal equipment identifies whether the file names have the same naming rule or not by analyzing the file names of the at least two files.
Specifically, the step S120: identifying whether the file names have the same naming rule may include:
and identifying whether a naming rule of numerical inference exists between the file names.
In this embodiment, the numerical reasoning is named according to a numerical sequence, that is, the terminal device identifies whether there is a rule in the numerical sequence between the file names. . For example, the first file name is "xx 01", the second file name is "xx 02", and since there is a rule that numerical values increase progressively between "01" and "02", the terminal device can recognize that there is a naming rule of numerical value inference between the file names, and the naming rule is "xx" and then adds numerical values.
Specifically, the step S120: identifying whether the file names have the same naming rule may include:
naming rules identifying whether letter inferences exist between the file names.
In this embodiment, the letter inference is named according to the letter sequence, that is, the terminal device identifies whether there is a rule in the letter sequence between the file names. For example, the first file name is "monkey a", the second file name is "monkey b", and since there is a rule in alphabetical order for "a" and "b", the terminal device can recognize that there is a naming rule deduced by letters between the file names, and the naming rule is "monkey" followed by letters.
S130: and if the file names have the same naming rule, changing the file name which does not accord with the naming rule in the original file under the target path into the file name which accords with the naming rule according to the naming rule.
The original file is a file existing before a new file is added under the condition of detecting a target path, namely, a file in the target path except the new file.
Some scenarios are listed below for illustration. The embodiment of the application can be applied to a file downloading scene, and the file name of an original file under a downloaded storage path (target path) is as follows: monkey, Monkey001, assume that the user downloaded the file with the file name Monkey002 to the storage path. When detecting that the file Monkey002 is newly added under the storage path, the terminal device acquires the file name of the file under the storage path as follows: monkey, Monkey001, Monkey002, further identify whether there are the same naming rules between the filenames, because the naming rule of filename "Monkey" is only Chinese, "Monkey" plus value "001" is the naming rule of English, "Monkey" plus value "001" is the naming rule of filename "Monkey 002" is English, "Monkey" plus value "002"; so it is recognized that "Monkey 001" and "Monkey 002" have the same naming convention, i.e., English "Monkey" plus a numerical value. The file name which does not accord with the naming rule in the original file under the storage path is only 'Monkey', so the file name 'Monkey' can be changed into the file name 'Monkey 003' which accords with the naming rule according to the naming rule. Thus, the file names of the files under the storage path are: monkey001, Monkey002, Monkey 003.
The embodiment of the application can also be applied to a synchronous file scene, including the synchronization of a file from a first terminal to a second terminal, or the synchronization of a file from a server to a terminal, and the like. The synchronization file may be considered to be a file on the a device copied to the B device. For example, the file names of the files in the mobile phone (first terminal) are: "Monkey", "Monkey 001", and "Monkey 002", if the user synchronizes the above three files in the mobile phone to the PAD (second terminal), and each time a file is synchronized, the PAD can detect the newly added file in the storage path, thereby executing steps S110 to S130. After synchronizing the files with the first file name 'monkey', the subsequent steps can not be executed because only one file exists in the storage path; after synchronizing the file with the second file name Monkey001, the subsequent steps cannot be executed because the file names Monkey and Monkey do not have the same naming rule; after synchronizing the files of the third file name "Monkey 002", since "Monkey 001" and "Monkey 002" have the same naming rule, that is, the english "Monkey" is added with a numerical value, the file name which does not conform to the naming rule in the original file under the storage path is only "Monkey", so that the file name "Monkey" can be changed into the file name "Monkey 003" which conforms to the naming rule according to the naming rule. Thus, the file names of the files under the storage path are: monkey001, Monkey002, Monkey 003. Similarly, for the example of synchronizing the file from the server to the terminal, the description is omitted here, similarly to the above example.
The embodiment of the application can also be applied to a file transfer scene, including transferring files from different paths. The different paths may be on the same device or on different devices. For example, files are copied from a USB flash disk to a personal computer, or files are copied or cut from the A folder of the personal computer to the B folder of the personal computer. For example, the file names of files existing in the usb disk include: "Monkey", "Monkey 001", and "Monkey 002", if the user transfers the above three files from the usb disk to the personal computer, the personal computer can detect the newly added file at the storage distance every time transferring one file, so as to execute steps S110 to S130. After transferring the file with the first file name 'monkey', because only one file exists in the storage path, the subsequent steps can not be executed; after the file with the second file name 'Monkey 001' is transferred, because the file names 'Monkey' and 'Monkey 001' do not have the same naming rule, the subsequent steps cannot be executed; after the file with the third file name "Monkey 002" is transferred, "Monkey 001" and "Monkey 002" have the same naming rule, that is, the addition of a numerical value to english "Monkey", the file name that does not conform to the naming rule in the original file in the storage path is only "Monkey", so that the file name "Monkey" can be changed to the file name "Monkey 003" that conforms to the naming rule according to the naming rule. Thus, the file names of the files under the storage path are: monkey001, Monkey002, Monkey 003. Similarly, for the example of copying or cutting files from the folder a of the personal computer to the folder B of the personal computer, the description is omitted here, similarly to the above example.
In practical applications, if there are multiple filenames that do not comply with the naming convention, the filenames that are modified to comply with the naming convention may be random.
In any of the scenarios described above, it is assumed that there is a file with the file name "XX" in addition to files with file names "Monkey", "Monkey 001", and "Monkey 002". Thus, the file names which do not conform to the naming rule are two, namely 'monkey' and 'XX'; then both file names are changed to file names that comply with the naming rules. Specifically, the method may be random, that is, the "Monkey" may be changed to "Monkey 003", "XX" may be changed to "Monkey 004", or the "Monkey" may be changed to "Monkey 004", and "XX" may be changed to Monkey003 ".
It should be noted that, for the newly added file in the target path, the file name may also be changed according to the obtained naming rule. For example, in a scenario of downloading a file, if the file name of the downloaded file does not meet the naming rule, the terminal device may change the file name of the downloaded file to the file name meeting the naming rule.
In a scene of downloading a file, the file to be downloaded is usually named when the file is downloaded, and in this embodiment, the file to be downloaded may be directly named as a file name that meets the naming rule according to the obtained naming rule. According to the embodiment, the terminal equipment identifies that the file names of the files under the target path have the same naming rule, and then changes the file names which do not accord with the naming rule into the file names which accord with the naming rule according to the naming rule. Therefore, the user does not need to manually change the file names of the files which do not accord with the naming rule one by one under the condition of entering the file directory, the efficiency of changing the file names is improved, and the user experience is improved.
In a specific embodiment of the present application, in the step S130, changing a file name of the original file in the target path that does not meet the naming rule into a file name that meets the naming rule according to the naming rule may specifically include:
and changing the file names which do not accord with the naming rule in the original files under the target path into the file names which accord with the naming rule according to the creation time sequence.
In this embodiment, the creation time may be the creation time of the file. The creation time is early, preceding in chronological order, the creation time is late, and following in chronological order. For example, the first time is 20 minutes 00 seconds at 22 o 'clock 1 month 1 day 2016 and the second time is 20 minutes 00 minutes at 22 o' clock 1 month 1 day 2016, and since the second time is earlier than the first time, the second time is chronologically before the first time.
Still follow the above example, that is, there exist files with file names "Monkey", "Monkey 001", "Monkey 002" and "XX" in the storage path, and after a file is newly added, the file names that do not conform to the naming rule in the original file in the storage path are "Monkey" and "XX". If the creation time of "Monkey" precedes "XX", then the filename "Monkey" can be changed to "Monkey 003" and the filename "XX" to "Monkey 004" according to the naming rules; on the contrary, if the creation time of "XX" precedes "Monkey, the file name" XX "can be changed to" Monkey003 "and the file name" Monkey "to" Monkey004 "according to the naming rule.
The embodiment is different from the previous embodiment in that the sequence of changing a plurality of file names which do not conform to the naming rule can be controlled by the creation time.
As shown in fig. 2, in a specific embodiment of the present application, the step S110 of obtaining file names of at least two files in the target path may specifically include the following steps:
s111: and acquiring file names of at least two files meeting preset conditions under the target path.
Correspondingly, the step S130 may specifically include:
s131: and if the file names have the same naming rule, changing the file names which do not accord with the naming rule in the original files which accord with the preset conditions under the target path into the file names which accord with the naming rule according to the naming rule.
In practical applications, a user does not necessarily want to change all file names under the target path that do not meet the naming rules. For example, a user of a file downloaded long before the target path does not want to change the file name, but only wants to change the file that does not meet the naming rules during the downloading process. Therefore, in the present embodiment, the application range of the present embodiment to the file under the target path is limited by the preset condition.
The preset condition may include at least one of newly increased in a preset time length and newly increased in the current startup. Specifically, the preset time period may be an empirical value set by a human. For example, file names of at least two newly added files within half an hour (preset duration) next to the target path are obtained.
According to the embodiment, the preset condition is set to limit the application range of the file naming method for changing the file name of the file under the target path, and the file name of the file which does not accord with the preset condition can not be changed even if the file does not accord with the naming rule.
As shown in fig. 3, in a specific embodiment of the present application, after the step S120 and before the step S130, the following steps may be further included:
s121: and if the file names have the same naming rule, judging whether a change instruction generated by triggering the confirmation button is received.
In practical application, the file name which does not accord with the naming rule in the original file under the target path is directly changed into the file name which accords with the naming rule according to the naming rule, and the user usually generates a conflicting emotion without being selected and determined by the user, so that the user experience is reduced. In this embodiment, after recognizing that the file names have the same naming rule, the terminal device may output a determination button at a preset position on the screen to prompt the user. If the user clicks the ok button, it is considered that the user agrees to change the file name that does not comply with the naming rule, and a change instruction is generated.
Correspondingly, the step S130 may specifically include:
s132: and if a change instruction generated by triggering the confirmation button is received, changing the file name which does not accord with the naming rule in the original file under the target path into the file name which accords with the naming rule according to the naming rule.
And after receiving a change instruction generated by triggering the determined button, the terminal equipment changes the file name which does not accord with the naming rule in the original file under the target path into the file name which accords with the naming rule according to the naming rule.
According to the embodiment, after the same naming rule is identified among the file names, the file names which do not accord with the naming rule are not directly changed, but the file names which do not accord with the naming rule can be changed only by receiving the change instruction generated after the user clicks the confirmation button. Therefore, the user experience can be improved, and the problem that the file name which does not accord with the naming rule is directly changed by the terminal equipment when the user does not want to change the file name is solved.
The embodiments of the present application also provide an apparatus, which can implement the above method steps, and the apparatus can be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, the logical device is formed by reading a corresponding computer program instruction into a memory by a Central Processing Unit (CPU) of a server to run.
Fig. 4 is a block diagram of a file naming apparatus according to an embodiment of the present application. In this embodiment, the file naming apparatus includes:
the obtaining unit 210 is configured to obtain file names of at least two files in a target path when a newly added file in the target path is detected;
an identifying unit 220 that identifies whether the file names have the same naming rule therebetween;
and the naming unit 230 is configured to change the file name which does not conform to the naming rule in the original file under the target path to the file name which conforms to the naming rule according to the naming rule when the file names have the same naming rule.
According to the embodiment, the terminal equipment identifies that the file names of the files under the target path have the same naming rule, and then changes the file names which do not accord with the naming rule into the file names which accord with the naming rule according to the naming rule. Therefore, the user does not need to manually change the file names of the files which do not accord with the naming rule one by one under the condition of entering the file directory, the efficiency of changing the file names is improved, and the user experience is improved.
Preferably, the obtaining unit 210 may specifically include:
the acquisition subunit acquires file names of at least two files meeting preset conditions under the target path;
accordingly, the naming unit 230 may specifically include:
and when the file names have the same naming rule, changing the file names which do not accord with the naming rule in the original files which accord with the preset conditions under the target path into the file names which accord with the naming rule according to the naming rule.
According to the embodiment, the preset condition is set to limit the application range of the file naming device for changing the file name of the file under the target path, and the file name of the file which does not accord with the preset condition can not be changed even if the file does not accord with the naming rule.
Preferably, the preset condition may include at least one of newly increased conditions within a preset time length and newly increased conditions within the current boot.
According to the embodiment, the file name of the file which is not newly added in the preset time length or the file which is not newly added in the starting process cannot be changed even if the file does not accord with the naming rule.
Preferably, the identification unit 220 specifically includes:
the first identification subunit is used for identifying whether a naming rule of numerical inference exists between the file names; wherein, the numerical reasoning is named according to numerical sequence;
or, the second identifying subunit identifies whether a naming rule deduced by letters exists between the file names; where trivial letters are inferred to be named in alphabetical order.
Through the embodiment, the terminal equipment identifies the naming rule of the numerical inference theory or the naming rule of the letter inference existing between the file names under the target path, and then changes the file name which does not conform to the naming rule of the numerical inference or the letter inference into the file name which conforms to the naming rule of the numerical inference or the letter inference according to the naming rule of the numerical inference or the letter inference. Therefore, the user does not need to manually change the file names of the files which do not accord with the naming rule of numerical inference or letter inference one by one under the condition of entering the file directory, the efficiency of changing the file names is improved, and the user experience is improved.
Preferably, the naming unit 230 may specifically include:
and the naming subunit is used for changing the file names which do not accord with the naming rule in the original file under the target path into the file names which accord with the naming rule according to the creating time sequence when the file names have the same naming rule.
The embodiment is different from the previous embodiment in that the sequence of changing a plurality of file names which do not conform to the naming rule can be controlled by the creation time.
Preferably, after the identifying unit 220 and before the naming unit 230, the method further includes:
the confirming unit is used for judging whether a change instruction generated by triggering a confirmation button is received or not when the file names have the same naming rule;
accordingly, the naming unit 230 may specifically include:
and when a change instruction generated by triggering a confirmation button is received, changing the file name which does not accord with the naming rule in the original file under the target path into the file name which accords with the naming rule according to the naming rule.
According to the embodiment, after the same naming rule is identified among the file names, the file names which do not accord with the naming rule are not directly changed, but the file names which do not accord with the naming rule can be changed only by receiving the change instruction generated after the user clicks the confirmation button. Therefore, the user experience can be improved, and the problem that the file name which does not accord with the naming rule is directly changed by the terminal equipment when the user does not want to change the file name is solved.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core unified Programming Language), HDCal, JHDL (Java Hardware Description Language), langue, Lola, HDL, laspam, hardsradware (Hardware Description Language), vhjhd (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A file naming method is characterized by comprising the following steps:
when detecting a newly added file under a target path, acquiring file names of at least two files under the target path;
identifying whether the file names have the same naming rule;
if the file names have the same naming rule, changing the file name which does not accord with the naming rule in the original file under the target path into the file name which accords with the naming rule according to the naming rule;
the identifying whether the file names have the same naming rule specifically comprises:
identifying whether a naming rule of numerical inference exists between the file names; wherein, the numerical reasoning is named according to numerical sequence;
or identifying whether a naming rule of letter inference exists between the file names; wherein the letters are inferred to be named in alphabetical order.
2. The method according to claim 1, wherein obtaining filenames of at least two files under the target path specifically comprises:
acquiring file names of at least two files meeting preset conditions under a target path;
correspondingly, changing the file name which does not accord with the naming rule in the original file under the target path into the file name which accords with the naming rule according to the naming rule comprises the following steps:
and changing the file name which does not accord with the naming rule in the original file which accords with the preset condition under the target path into the file name which accords with the naming rule according to the naming rule.
3. The method of claim 2, wherein the predetermined condition comprises at least one of a new addition within a predetermined duration and a new addition within the current boot.
4. The method according to claim 1, wherein changing a file name that does not comply with the naming rule in the original file under the target path to a file name that complies with the naming rule according to the naming rule specifically comprises:
and changing the file names which do not accord with the naming rule in the original files under the target path into the file names which accord with the naming rule according to the creation time sequence.
5. The method according to claim 1, wherein after identifying whether the file names have the same naming rule, before changing the file name which does not conform to the naming rule in the original file under the target path to the file name which conforms to the naming rule according to the naming rule if the file names have the same naming rule, further comprising:
if the file names have the same naming rule, judging whether a change instruction generated by triggering a confirmation button is received;
correspondingly, if the file names have the same naming rule, changing the file name which does not accord with the naming rule in the original file under the target path into the file name which accords with the naming rule according to the naming rule, and the method comprises the following steps:
and if a change instruction generated by triggering the confirmation button is received, changing the file name which does not accord with the naming rule in the original file under the target path into the file name which accords with the naming rule according to the naming rule.
6. A file naming apparatus, comprising:
the acquisition unit is used for acquiring file names of at least two files under a target path when detecting a newly added file under the target path;
the identification unit is used for identifying whether the file names have the same naming rule or not;
the naming unit is used for changing the file names which do not accord with the naming rule in the original files under the target path into the file names which accord with the naming rule according to the naming rule when the file names have the same naming rule;
wherein, the identification unit specifically includes:
the first identification subunit is used for identifying whether a naming rule of numerical inference exists between the file names; wherein, the numerical reasoning is named according to numerical sequence;
or, the second identifying subunit identifies whether a naming rule deduced by letters exists between the file names; wherein the letters are inferred to be named in alphabetical order.
7. The apparatus according to claim 6, wherein the obtaining unit specifically includes:
the acquisition subunit acquires file names of at least two files meeting preset conditions under the target path;
correspondingly, the naming unit specifically includes:
and when the file names have the same naming rule, changing the file names which do not accord with the naming rule in the original files which accord with the preset conditions under the target path into the file names which accord with the naming rule according to the naming rule.
8. The apparatus of claim 7, wherein the predetermined condition comprises at least one of a new addition within a predetermined duration and a new addition within the current boot.
9. The apparatus according to claim 6, wherein the naming unit specifically comprises:
and the naming subunit is used for changing the file names which do not accord with the naming rule in the original file under the target path into the file names which accord with the naming rule according to the creating time sequence when the file names have the same naming rule.
10. The apparatus of claim 6, wherein after the identifying unit and before the naming unit, further comprising:
the confirming unit is used for judging whether a change instruction generated by triggering a confirmation button is received or not when the file names have the same naming rule;
correspondingly, the naming unit specifically includes:
and when a change instruction generated by triggering a confirmation button is received, changing the file name which does not accord with the naming rule in the original file under the target path into the file name which accords with the naming rule according to the naming rule.
CN201610282095.XA 2016-04-29 2016-04-29 File naming method and device Active CN107341155B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610282095.XA CN107341155B (en) 2016-04-29 2016-04-29 File naming method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610282095.XA CN107341155B (en) 2016-04-29 2016-04-29 File naming method and device

Publications (2)

Publication Number Publication Date
CN107341155A CN107341155A (en) 2017-11-10
CN107341155B true CN107341155B (en) 2020-07-07

Family

ID=60221882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610282095.XA Active CN107341155B (en) 2016-04-29 2016-04-29 File naming method and device

Country Status (1)

Country Link
CN (1) CN107341155B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111027290A (en) * 2019-11-22 2020-04-17 贝壳技术有限公司 Data report naming method and device, electronic equipment and storage medium
CN112015702A (en) * 2020-09-15 2020-12-01 支付宝(杭州)信息技术有限公司 Message file name processing method, device and equipment
CN113760249A (en) * 2021-01-05 2021-12-07 北京沃东天骏信息技术有限公司 Program file processing method, device and equipment
CN113448927B (en) * 2021-06-29 2024-06-21 维沃软件技术有限公司 File naming method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1746884A (en) * 2004-09-06 2006-03-15 英保达股份有限公司 Automatic naming method and system for digital image file
CN103514231A (en) * 2012-06-29 2014-01-15 联想(北京)有限公司 File naming method and electronic device
CN103902559A (en) * 2012-12-26 2014-07-02 中兴通讯股份有限公司 File name conversion method and device
CN104077285A (en) * 2013-03-26 2014-10-01 联想(北京)有限公司 File designation method and first electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011258092A (en) * 2010-06-11 2011-12-22 Fujitsu Ltd Logical description difference extracting method, logical design support apparatus, and logical description difference extracting program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1746884A (en) * 2004-09-06 2006-03-15 英保达股份有限公司 Automatic naming method and system for digital image file
CN103514231A (en) * 2012-06-29 2014-01-15 联想(北京)有限公司 File naming method and electronic device
CN103902559A (en) * 2012-12-26 2014-07-02 中兴通讯股份有限公司 File name conversion method and device
CN104077285A (en) * 2013-03-26 2014-10-01 联想(北京)有限公司 File designation method and first electronic equipment

Also Published As

Publication number Publication date
CN107341155A (en) 2017-11-10

Similar Documents

Publication Publication Date Title
CN107562467B (en) Page rendering method, device and equipment
CN107391526B (en) Data processing method and device based on block chain
CN107341155B (en) File naming method and device
CN108628688B (en) Message processing method, device and equipment
CN107066519B (en) Task detection method and device
CN108959341B (en) Data synchronization method, device and equipment
CN111475142B (en) Method, device and equipment for generating applet file package
TW201911165A (en) Business processing method and device
CN111796821A (en) Page updating method and device
CN107479868B (en) Interface loading method, device and equipment
CN111240788A (en) Method, device and equipment for generating small program page
CN110781192B (en) Verification method, device and equipment of block chain data
CN112597013A (en) Online development and debugging method and device
CN111273965B (en) Container application starting method, system and device and electronic equipment
CN111753328B (en) Private data leakage risk detection method and system
CN113556260A (en) Flow monitoring method and device, storage medium and electronic equipment
CN106610830B (en) Page element drag-and-drop method and device
CN112035117A (en) Page display system, method and device
CN116501317A (en) Page generation method and device, storage medium and electronic equipment
CN112579938B (en) Page loading method and device, storage medium and electronic equipment
CN109144948B (en) Application file positioning method and device, electronic equipment and memory
CN112181798B (en) Data recording method and device
CN106570032B (en) Method and device for controlling webpage
CN110968580B (en) Method and device for creating data storage structure
CN115017915B (en) Model training and task execution method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1246433

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200921

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200921

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.

TR01 Transfer of patent right