CN115658616A - File name modification method, device, equipment and storage medium - Google Patents

File name modification method, device, equipment and storage medium Download PDF

Info

Publication number
CN115658616A
CN115658616A CN202211338404.2A CN202211338404A CN115658616A CN 115658616 A CN115658616 A CN 115658616A CN 202211338404 A CN202211338404 A CN 202211338404A CN 115658616 A CN115658616 A CN 115658616A
Authority
CN
China
Prior art keywords
file
target
name
preset
attributes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211338404.2A
Other languages
Chinese (zh)
Inventor
丁俊豪
张伟彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Voiceai Technologies Co ltd
Original Assignee
Voiceai Technologies Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Voiceai Technologies Co ltd filed Critical Voiceai Technologies Co ltd
Priority to CN202211338404.2A priority Critical patent/CN115658616A/en
Publication of CN115658616A publication Critical patent/CN115658616A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

The application discloses a method, a device, equipment and a storage medium for modifying file names, wherein the method comprises the following steps: responding to a file name modification request aiming at a target file, and acquiring a target naming rule corresponding to the target file, wherein the target naming rule is acquired based on file attributes of different levels of the target file; determining a target name of a corresponding target file through a target naming rule; and modifying the name of the target file according to the target name to obtain the target file with the modified name. By the method, the target name of the target file is modified based on the target naming rule obtained by the file attributes of different levels, so that the name of the file is modified more quickly and effectively, and the efficiency of modifying the name of the file is improved.

Description

File name modification method, device, equipment and storage medium
Technical Field
The present application relates to the field of file management technologies, and in particular, to a method and an apparatus for modifying a name of a file, an electronic device, and a computer-readable storage medium.
Background
With the development of multimedia file processing software, various types of files, such as multimedia files, document files, and the like, emerge, and a user can modify the file name of a file, so that the user can distinguish different files according to the modified file name.
Currently, a user may manually edit a file name of a target file to modify the file name of the target file. However, the existing method is inefficient in name modification of the target file.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and an apparatus for modifying a file name, an electronic device, and a computer-readable storage medium to solve the above problem.
In a first aspect, an embodiment of the present application provides a method for modifying a name of a file, where the method includes: responding to a file name modification request aiming at a target file, and acquiring a target naming rule corresponding to the target file, wherein the target naming rule is acquired based on file attributes of different levels of the target file; determining a target name corresponding to the target file through a target naming rule; and modifying the name of the target file according to the target name to obtain the target file with the modified name.
In a second aspect, an embodiment of the present application provides a device for modifying names of files, where the device includes: the first response module is used for responding to a file name modification request aiming at the target file, and acquiring a target naming rule corresponding to the target file, wherein the target naming rule is acquired based on file attributes of different levels of the target file; the determining module is used for determining the target name of the corresponding target file according to the target naming rule; and the first modification module is used for modifying the name of the target file according to the target name to obtain the target file with the modified name.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium storing program code, where the program code may be called by a processor to execute the method described above.
According to the file name modification method and device, the electronic equipment and the computer readable storage medium, the target naming rule corresponding to the target file is obtained according to the file attributes of the target file in different levels, the target file is subjected to name modification through the target naming rule, the target file with the modified name is obtained, the name of the file is not required to be manually edited by a user, the file name modification is quicker and more effective, and the file name modification efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a method for modifying a name of a file according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for obtaining a preset rule table in the embodiment of the present application;
FIG. 3 is a diagram illustrating a preset file type in an embodiment of the present application;
FIG. 4 is a diagram illustrating yet another preset file type in an embodiment of the present application;
FIG. 5 is a flow chart of a method for modifying the name of a file according to another embodiment of the present application;
fig. 6 is a block diagram illustrating a structure of a device for modifying a name of a document according to an embodiment of the present application;
fig. 7 shows a block diagram of an electronic device according to an embodiment of the present application;
fig. 8 is a block diagram illustrating a structure of a computer-readable storage medium according to an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It should be noted that: reference to "at least one" herein means one, two or more.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
referring to fig. 1, fig. 1 is a flowchart illustrating a method for modifying a file name according to an embodiment of the present application, where the method includes:
s110: and responding to the file name modification request aiming at the target file, and acquiring a target naming rule corresponding to the target file, wherein the target naming rule is acquired based on file attributes of different levels of the target file.
In this embodiment, the target file may be a file that needs name modification, and the target file may be an audio file, an image file, a video file, a text file, or the like, or may be a file in the form of a folder, a compressed file, or the like.
The file name modification request may be a request sent by a user to modify the name of the target file, for example, in a file management application program on a computer, the user may select a file by using a mouse, and select a "rename" operation on the target file to obtain the file name modification request. The file name modification request may be a modification request for a certain file, or may be a batch modification request for file names of a plurality of files.
The name modification request may be for a file origin name, which may be an initial file name of a file that has not been subjected to name modification when the file is imported into the file management application, or may be for a file name displayed in an application other than the file management application, and the file name may be a name for identifying the file displayed in the file management application. In some scenarios, the file name of the target file needs to be modified to identify the target file, but the alias of the target file can be modified without destroying the original file name; in some scenarios where the file original name does need to be modified, the file original name can also be directly modified. The modification of the file original name and the modification of the file alias can be independent, the modification of the file alias cannot influence the file original name, and the modification of the file original name cannot influence the file alias.
The target naming rule can be obtained by classifying and sequencing file attributes of different levels corresponding to the target file, and the level and sequencing of the file attributes in the target naming rule can be manually adjusted by a user or preset. For example, in different application scenarios, the file attributes concerned by the user are different, and the file attributes may be classified according to different attention degrees of the user to the file attributes, and may be divided into a first-level attribute and a second-level attribute, where the first-level attribute is an attribute with the highest user attention degree and highest application context correlation degree, and the second-level attribute is an attribute with low correlation degree with the current application context, such as file size, modification time, hash value, and the like.
The file attribute may be a position number of the target file in the file list, a character string and a substring of the file name (e.g., the first n characters and the last n characters), a time of file creation, a modification time, a file size, a file hash value, and the like. For example, if the target file is an audio file, the file attribute may be channel number, encoding format, duration, sampling frequency, bit width, etc., and may also be characteristic information of the speech, such as the effective duration of the speech, the average energy of noise, the signal-to-noise ratio, the clipping ratio, the language of the speech, the text length, the gender of the speaker, etc.; if the target file is a video file, the file attribute may be a file format, duration, resolution, and the like.
As an embodiment, S110 may include: the method comprises the steps of obtaining a target naming rule corresponding to a file type of a target file from a preset rule table, wherein the preset rule table comprises at least one preset file type and a naming rule corresponding to each preset file type, and the naming rule corresponding to each preset file type is obtained based on file attributes of files of different levels under the preset file type.
In this embodiment, the preset rule table may include one or more preset file types and a naming rule corresponding to each preset file type, and the user may select a preset file type in the preset rule table, so that the name of the target file is modified according to the preset file type selected by the user and the naming rule corresponding to the preset file type.
The preset file type can be a file type preset by a system or a file type defined by a user, and the file type defined by the user can also be set as the preset file type, so that the user can conveniently and directly use the defined file type next time. Each preset file type may have a naming rule corresponding to the preset file type, and the naming rule may be obtained based on file attributes of different levels in the preset file type.
As an implementation mode, a target naming rule corresponding to a file type corresponding to a target file of which the file name needs to be modified is obtained from a preset rule table.
S120: and determining the target name of the corresponding target file through the target naming rule.
It should be noted that, determining the target name of the target file according to the target naming rule may include a mechanism for avoiding duplicate file names, for example, avoiding files with the same file name in the same directory, may prompt the user to correct duplicate file names by himself or herself, and may also correct duplicate file names automatically.
When the target name of the corresponding target file is determined through the target naming rule, the corresponding file attribute in the target file can be extracted through the file attribute in the target naming rule to be used as a component in the target name of the target file. Illustratively, if the file attributes and the sequence thereof in the target naming rule are "speech signal to noise ratio snr", "speech effective duration st" and "file list number No", the corresponding file attributes in the extracted target file are "20dB", "120s" and "No-1", and the target name of the obtained target file may be "snr-20db _st-120s _no-1.Wav".
Further, after step S120, the method may further include: acquiring the file name of the target file before modification; and obtaining a name modification record corresponding to the target file according to the file name before modification of the target file and the target name.
In this embodiment, the file name before the target file is modified may be an initial file name before the target file is not subjected to any name modification operation, or may be a file name before the target file is not subjected to the name modification operation but the initial file name is modified. For example, the initial file name of the target file is "audio file. Mp3", the name before the present name modification operation is "snr-20dB st-120s _No-1.mp3", and the file name before the modification of the target file may be one of the two.
As an implementation mode, the file name of the target file before modification is obtained, and a name modification record corresponding to the target file is generated and stored according to the file name of the target file before modification and the target name of the target file determined by the target naming rule. It can be understood that, by storing the name modification record of the target file, the file name before the target file is modified can be conveniently retrieved later, and the file name before the target file is modified can be restored.
The name modification records corresponding to the modification times can be saved by modifying the name of the target file for multiple times, for example, two name modification records corresponding to the target file can be saved after the target file is modified twice, and the two name modification records are identified and sorted by the modification time, so that when the unmodified initial file name of the target file needs to be retrieved, the initial file name of the target file can be traced back through the two name modification records.
S130: and modifying the name of the target file according to the target name to obtain the target file with the modified name.
As an implementation manner, according to a target name obtained by a target naming rule corresponding to a target file, name modification is performed on the target file to obtain the target file after name modification. Illustratively, if the file name of the target file before modification is "123456.Wav", the target name obtained by the target naming rule is "snr-20dB _st-120s _No-1.Wav", and the file name of the target file is modified into the target name "snr-20dB _st-120s _No-1.wav", so as to obtain the target file with the modified name.
Optionally, the display mode of the original file name and the alias file name corresponding to the file name of the target file may adopt different display styles, for example, different fonts, colors, or background colors may be used for display. The file original name and the file alias can be displayed respectively or simultaneously through free switching, and the display styles of the file original name and the file alias can be distinguished and identified during simultaneous display.
According to the file name modification method provided by the embodiment, the target naming rule corresponding to the target file is obtained according to the file attributes of the target file at different levels, the name of the target file is modified through the target naming rule, the target file with the modified name is obtained, and the file name is not required to be manually edited by a user, so that the file name is modified more quickly and effectively, and the file name modification efficiency is improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for obtaining a preset rule table in an embodiment of the present application, where the method includes:
s210, acquiring at least one preset file type.
As an embodiment, one or more preset file types are obtained. For example, the preset file types in the preset rule table may include a preset file type for a voice noise reduction scene, a preset file type for a voiceprint authentication scene, a preset file type for a face recognition scene, a preset file type for a text cutting scene, a preset file type for a video clip scene, and the like.
And S220, determining a plurality of levels of file attributes corresponding to each preset file type.
In one embodiment, file attributes of a plurality of levels corresponding to each different preset file type are determined. Each preset file type can have a plurality of levels, the file attributes of the plurality of levels can be one or more, and the file attributes of the plurality of levels can be different in different preset file types.
Referring to fig. 3 and 4, fig. 3 is a schematic diagram illustrating a preset file type in an embodiment of the present application, and fig. 4 is a schematic diagram illustrating another preset file type in the embodiment of the present application. The preset file type can be obtained according to the preset file types and file attributes of different scenes, and can also be obtained through self setting of a user.
For example, fig. 3 shows a preset file type in a voice denoising scene, where the preset file type corresponds to two levels of file attributes, for example, the first-level attributes may include file attributes such as a voice signal-to-noise ratio snr and a voice validity duration st, and the second-level attributes may include file attributes such as a file size, an audio duration dur, a channel number ch, and a file list number No.
For example, fig. 4 shows a preset file type in a voiceprint authentication scenario, where the preset file type corresponds to two levels of file attributes, for example, the first level attribute may include file attributes such as gender, language, text length tl, and the second level attribute may include file attributes such as file size, audio duration dur, channel number ch, and file list number No.
As an embodiment, S220 may include: acquiring file attributes of a plurality of preset levels corresponding to each preset file type; and responding to the attribute adjustment operation aiming at the file attributes of a plurality of preset levels to obtain the file attributes of a plurality of levels corresponding to each preset file type.
In this embodiment, the preset level may be a level division of the file attribute in the preset file type obtained by classifying the file attribute according to different attention degrees of the file attribute in different application scenarios. For example, in the application scenario of voice noise reduction in fig. 3, the file attributes of the voice signal-to-noise ratio snr and the voice effective duration st corresponding to the target file are more important in the voice noise reduction scenario, and therefore are set as first-level attributes in the preset level, and the other attributes may be preset as second-level attributes; in the application scenario of voiceprint authentication in fig. 4, the file attributes of the gender, language, and text length tl corresponding to the target file are more important in the voiceprint authentication scenario, and therefore, the file attributes are set as the primary attributes in the preset level, and the other attributes may be preset as the secondary attributes.
The attribute adjustment operation may be an attribute adjustment operation performed by a user for file attributes at multiple preset levels, for example, the user may change an arrangement order among the file attributes by dragging a position of the file attribute in a current preset file type window. The attribute adjustment operation may be adjustment of file attributes between the same level attributes, or adjustment of file attributes between different levels of attributes, for example, in fig. 4, "file list number No" in the second level attribute may be dragged to the rear or other position of "voice validity duration st" in the first level attribute, or "voice validity duration st" in the first level attribute may be dragged to the front of "voice signal-to-noise ratio snr".
For the file attributes of multiple levels corresponding to the preset file type, some file attributes in the levels can be selected by default, for example, the file attributes in the level attributes can be selected by default, and the user can also cancel the default selected file attributes manually and select other file attributes needing to be selected manually. The user may also set to ignore the same file attribute, e.g., a file attribute may be not checked by default if the file attribute of all audio files in the current file list is the same.
As an implementation manner, the file attributes of a plurality of preset levels corresponding to the preset file type are obtained, and an attribute adjustment operation is performed on the file attributes of the preset file type in the plurality of preset levels to obtain the file attributes of the preset file type in the plurality of levels.
The priorities of the file attributes of the plurality of levels are determined S230.
In this embodiment, the determination of the priorities of the file attributes of the multiple levels may be determination of the priorities of file attributes of different levels, or determination of the priorities of file attributes in the same level. For example, the determination of the priority of the file attribute in different levels may be determined according to a preset level of the file attribute, where the higher the preset level is, the higher the priority is, for example, the priority of the first-level attribute in the preset level is higher than that of the second-level attribute; for the determination of the priority of the file attributes in the same level, the priority may be determined according to differences of corresponding attributes of multiple files, for example, all the multiple files have a certain differentiated file attribute and all the multiple files have no differentiated file attribute, and the differentiated file attribute has a priority higher than the non-differentiated file attribute; the determination of the priority of the file attributes may also be determined according to the position order of the plurality of file attributes in the corresponding preset file types, for example, the priority of the file attribute with the front position order is higher than the priority of the file attribute with the back position order.
S240, determining the naming rule of the preset file type according to the file attributes of multiple levels corresponding to each preset file type and the priority of the file attributes of the multiple levels.
As an implementation manner, the naming rule of each preset file type is determined according to the file attribute selected in the multiple levels corresponding to each preset file type and the priority of the file attributes of the multiple levels. For example, in the preset file type in the voice noise reduction scenario in fig. 3, a naming rule of the preset file type is obtained according to a default selected first-level attribute "voice signal-to-noise ratio snr", "voice valid time st", a file list number No in a second-level attribute manually selected by a user, and priorities of the first-level attribute and the second-level attribute, where the naming rule may be obtained according to a position order of each file attribute in each-level attribute and a priority of the first-level attribute higher than a priority of the second-level attribute. For example, the naming rule of the preset file type obtained in the voice noise reduction scene may be "voice signal to noise ratio snr _ voice effective duration st _ file list number No", and the target name of the target file obtained by the naming rule is "snr-20db _st-120s _no-1.wav".
For example, in the preset file type in the voiceprint identification scenario in fig. 4, a naming rule of the preset file type is obtained according to a default selected primary attribute "gender", "language", "text length tl", a "file list number No" in a manually selected secondary attribute of the user, and priorities of the primary attribute and the secondary attribute, where the naming rule may be obtained according to a position order of each file attribute in each level of attributes and a priority of the primary attribute higher than a priority of the secondary attribute. For example, the naming rule of the preset file type obtained in the voiceprint identification scenario may be "gender _ language-text length tl _ file list number No", and the target name of the target file obtained by the naming rule is "child _ mandarin _ tl-523_no-2. Wav".
And S250, obtaining a preset rule table according to the at least one preset file type and the naming rule corresponding to the at least one preset file type.
And obtaining a preset rule table according to one or more preset file types and the naming rules corresponding to the preset file types.
According to the method for acquiring the preset rule table, the naming rule of the preset file type is determined according to the file attributes of the multiple levels corresponding to the preset file type and the priorities of the file attributes of the multiple levels, and the preset rule table is finally acquired according to the at least one preset file type and the corresponding naming rule, so that the efficiency of acquiring the preset rule table and the convenience of operation are effectively improved.
Referring to fig. 5, fig. 5 is a flowchart illustrating a file name modification method according to another embodiment of the present application, where the method includes:
s310: and responding to a file name modification request aiming at the target file, processing the target file through a name modification model to obtain a new target name corresponding to the target file, and training the name modification model according to the historical file and the modified file name of the historical file.
In this embodiment, the name modification model may be a model based on Deep Learning, and Deep Learning (DL) is an intrinsic rule and a representation hierarchy of Learning sample data, information obtained in these Learning processes greatly helps to interpret data such as text, images, and sounds, and a final goal is to make a machine have an analytic Learning capability like a human being, and can recognize data such as text, images, and sounds. The deep learning algorithm is mainly based on Neural Networks (NN), which is a complex network system formed by widely interconnecting a large number of simple processing units (called neurons), reflects many basic features of human brain functions, and is a highly complex nonlinear dynamical learning system. The neural network has the capabilities of large-scale parallel, distributed storage and processing, self-organization, self-adaptation and self-learning, and is suitable for processing inaccurate and fuzzy information processing problems which need to consider many factors and conditions simultaneously. At present, the common models of the neural network include a BP (back propagation) neural network, an RBF (radial basis function) neural network, a perceptron neural network, a linear neural network, and the like, so as to solve the actual problems of different scenes.
The name modification model may be a name modification method for a file obtained by training through a neural network algorithm according to the history file and a modified file name of the history file, and the name modification model may be obtained based on a logical relationship between an original file name of the history file and a modified file alias of the history file. The name modification model can be a model obtained by training a plurality of historical files after the user modifies names for a plurality of times, or a model trained in advance through other scenes.
The history file may be a file whose file name has been modified before the current modification, and the history file may be one or more files. The modified file name of the history file may be a new history file name obtained after modifying the file name of the history file.
Optionally, in the application program with a file name modification function for multiple users, the historical files modified by different users and the modified file names corresponding to the historical files may be trained separately, and the name modification model obtained through separate training may implement an operation of modifying file names personalized for different users.
Optionally, for a new user, the file name of the target file may be modified according to the target naming rule, and when the number of the file names of the history file modified by the user reaches a certain scale, the name modification model corresponding to the user is trained through the history file modified by the user and the modified file name corresponding to the history file.
It can be understood that as the number of modified history files and the number of modified file names corresponding to the history files are increased, the name modification model is trained continuously, so that the file names obtained through the name modification model are more and more in line with the user name modification habit.
It should be noted that the new target name of the target file obtained through the name modification model may include a mechanism for avoiding duplicate file names, for example, files with the same file name are avoided in the same directory, so that the user may be prompted to correct the duplicate file name by himself or automatically.
In one embodiment, when a new target name corresponding to the target file is determined through the name modification model, the corresponding file attribute in the target file may be extracted through the file attribute in the name modification model as a component in the new target name corresponding to the target file. Illustratively, the file attributes and the sequence thereof in the name modification model are "gender", "language", "text length tl" and "file list number No", the corresponding file attributes in the extracted target file are "fe", "mandarin", "tl-532" and "No-1", and the target name of the obtained target file can be "fe _ mandarin _ tl-523 u No-2.Wav".
As an implementation manner, in response to a file name modification request for a target file, the target file is processed through a name modification model, one or more new file names of the target file obtained after processing may be obtained, and a user may select a new target name by himself or herself, or a new target name generated automatically.
S320: and modifying the name of the target file according to the new target name to obtain the target file with the modified name.
And as an implementation mode, according to the new target name obtained by the name modification model, carrying out name modification on the target file to obtain the target file with the modified name.
According to the another file name modification method provided by the embodiment, the target file is processed through the name modification model obtained by training the historical file and the modified file name of the historical file, so that a new target name is obtained, the target file is subjected to name modification, and the target file with the modified name is finally obtained, so that the name modification of the target file is more convenient and faster, and the file name modification efficiency is improved.
In an embodiment, the file name modification request is for at least one of a file alias and a file original name of the target file.
Referring to fig. 6, fig. 6 is a block diagram illustrating a file name modification apparatus 400 according to an embodiment of the present application, where the apparatus includes:
a first response module 410, configured to, in response to a file name modification request for a target file, obtain a target naming rule corresponding to the target file, where the target naming rule is obtained based on file attributes of different levels of the target file;
a determining module 420, configured to determine, according to a target naming rule, a target name of a corresponding target file;
the first modifying module 430 is configured to modify a name of the target file according to the target name, so as to obtain a target file with a modified name.
Optionally, the first response module 410 is further configured to obtain a target naming rule corresponding to a file type of the target file from a preset rule table, where the preset rule table includes at least one preset file type and a naming rule corresponding to each preset file type, and the naming rule corresponding to each preset file type is obtained based on file attributes of different levels of the file under the preset file type.
Optionally, the apparatus further includes a preset rule table obtaining module, configured to obtain at least one preset file type; determining file attributes of multiple levels corresponding to each preset file type; determining priorities of file attributes of a plurality of levels; determining a naming rule of each preset file type according to the file attributes of multiple levels corresponding to each preset file type and the priority of the file attributes of the multiple levels; and obtaining a preset rule table according to the at least one preset file type and the naming rule corresponding to the at least one preset file type.
Optionally, the preset rule table obtaining module is further configured to obtain file attributes of a plurality of preset levels corresponding to each preset file type; and responding to the attribute adjustment operation aiming at the file attributes of a plurality of preset levels to obtain the file attributes of a plurality of levels corresponding to each preset file type.
Optionally, the apparatus 400 further includes a second response module and a second modification module, where the second response module is configured to respond to a file name modification request for the target file, process the target file through a name modification model to obtain a new target name corresponding to the target file, and the name modification model is obtained by training according to the history file and the modified file name of the history file; and the second modification module is used for modifying the name of the target file according to the new target name to obtain the target file with the modified name.
Optionally, the apparatus 400 is further configured to obtain a file name of the target file before modification; and obtaining a name modification record corresponding to the target file according to the file name before modification of the target file and the target name.
It should be noted that the device embodiment and the method embodiment in the present application correspond to each other, and specific principles in the device embodiment may refer to the contents in the method embodiment, which is not described herein again.
Referring to fig. 7, fig. 7 shows a block diagram of an electronic device 500 according to an embodiment of the present application, where the embodiment of the present application provides an electronic device 500 including a processor 502 capable of executing the foregoing method, and the electronic device 500 may be a terminal device, and the terminal device may be a smart phone, a tablet computer, a wearable device, smart furniture, a smart robot, or the like.
The electronic device 500 also includes memory 504. The memory 504 stores programs that can execute the content of the foregoing embodiments, and the processor 502 can execute the programs stored in the memory 504.
Processor 502 may include one or more cores for processing data and a message matrix unit, among other things. The processor 502 interfaces with various interfaces and circuitry throughout the electronic device 500 to perform various functions of the electronic device 500 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 504 and by invoking data stored in the memory 504. Alternatively, the processor 502 may be implemented in hardware using at least one of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 502 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 502, but may be implemented by a communication chip.
The Memory 504 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 504 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 504 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described below, and the like. The storage data area may also store data (e.g., data to be recommended and operating mode) acquired by the electronic device 500 during use, and the like.
The electronic device 500 may further include a network module and a screen, wherein the network module is configured to receive and transmit electromagnetic waves, and to perform interconversion between the electromagnetic waves and the electrical signals, so as to communicate with a communication network or other devices, for example, an audio playing device. The network module may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The network module may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices via a wireless network. The wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network. The screen can be used for displaying interface content and carrying out data interaction.
In some embodiments, the electronic device 500 may further include: a peripheral interface 506 and at least one peripheral device. The processor 502, memory 504, and peripheral interface 506 may be connected by buses or signal lines. Each peripheral device may interface with the peripheral devices through a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency component 508, a positioning component 512, a camera 514, an audio component 516, a display 518, and a power supply 522, among others
Peripheral interface 506 may be used to connect at least one peripheral associated with an I/O (Input/Output) to processor 502 and memory 504. In some embodiments, processor 502, memory 504, and peripheral interface 506 are integrated on the same chip or circuit board; in some other embodiments, any one or both of the processor 502, the memory 504, and the peripheral interface 506 may be implemented on separate chips or circuit boards, which are not limited in this application.
The Radio Frequency assembly 508 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency component 508 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency assembly 508 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency component 508 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency component 508 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf component 508 may further include NFC (Near Field Communication) related circuitry, which is not limited in this application.
The positioning component 512 is used to locate the current geographic location of the electronic device 500 for navigation or LBS (location based Service). The positioning component 512 may be a positioning component based on the united states GPS (global positioning System), the beidou System or the galileo System.
The camera 514 is used to capture images or video. Optionally, the camera 514 includes a front camera and a rear camera. Generally, the front camera is disposed on the front panel of the electronic apparatus 500, and the rear camera is disposed on the rear panel of the electronic apparatus 500. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera 514 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
Audio components 516 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 502 for processing or inputting the electric signals to the radio frequency component 508 to realize voice communication. For stereo capture or noise reduction purposes, the microphones may be multiple and disposed at different locations of the electronic device 500. The microphone may also be an array microphone or an omni-directional acquisition microphone. The speaker is used to convert electrical signals from the processor 502 or the radio frequency components 508 into sound waves. The loudspeaker can be a traditional film loudspeaker and can also be a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio component 514 may also include a headphone jack.
The display 518 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 518 is a touch display screen, the display screen 518 also has the ability to acquire touch signals on or over the surface of the display screen 518. The touch signal may be input to the processor 502 as a control signal for processing. At this point, the display 518 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 518 may be one, providing a front panel of the electronic device 500; in other embodiments, the number of the display screens 518 may be at least two, and each of the at least two display screens may be disposed on a different surface of the electronic device 500 or may be in a foldable design; in still other embodiments, the display 518 may be a flexible display disposed on a curved surface or on a folded surface of the electronic device 500. Even further, the display 518 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display 518 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or other materials.
The power supply 522 is used to provide power to various components in the electronic device 500. The power source 522 may be alternating current, direct current, disposable or rechargeable. When the power source 522 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charge technology.
Referring to fig. 8, fig. 8 is a block diagram illustrating a structure of a computer-readable storage medium according to an embodiment of the present application. The computer-readable medium 600 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 600 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 600 includes a non-transitory computer-readable storage medium. The computer readable storage medium 600 has storage space for program code 610 for performing any of the method steps of the method described above. The program code can be read from and written to one or more computer program products. Program code 610 may be compressed in a suitable form.
In summary, according to the file name modification method, device, electronic device and computer-readable storage medium provided by the application, the target naming rules corresponding to the target files are obtained according to the file attributes of different levels of the target files, the target files are subjected to name modification through the target naming rules, the target files with modified names are obtained, and the file names do not need to be manually edited by a user, so that the file names can be modified more quickly and effectively, and the file name modification efficiency is improved.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method for modifying a name of a file, the method comprising:
responding to a file name modification request aiming at a target file, and acquiring a target naming rule corresponding to the target file, wherein the target naming rule is acquired based on file attributes of different levels of the target file;
determining a target name corresponding to the target file according to the target naming rule;
and modifying the name of the target file according to the target name to obtain the target file with the modified name.
2. The method of claim 1, wherein obtaining the target naming rule corresponding to the target file comprises:
and acquiring a target naming rule corresponding to the file type of the target file from a preset rule table, wherein the preset rule table comprises at least one preset file type and a naming rule corresponding to each preset file type, and the naming rule corresponding to each preset file type is acquired based on file attributes of different levels of files under the preset file type.
3. The method according to claim 2, wherein the obtaining method of the preset rule table comprises:
acquiring at least one preset file type;
determining a plurality of levels of file attributes corresponding to each preset file type;
determining a priority of the plurality of levels of file attributes;
determining a naming rule of each preset file type according to the file attributes of the multiple levels corresponding to each preset file type and the priority of the file attributes of the multiple levels;
and obtaining the preset rule table according to the at least one preset file type and the naming rule corresponding to the at least one preset file type.
4. The method of claim 3, wherein said determining a plurality of levels of file attributes corresponding to each of said preset file types comprises:
acquiring file attributes of a plurality of preset levels corresponding to each preset file type;
and responding to the attribute adjustment operation aiming at the file attributes of the preset levels to obtain the file attributes of the levels corresponding to each preset file type.
5. The method of claim 1, further comprising:
responding to a file name modification request aiming at the target file, processing the target file through a name modification model to obtain a new target name corresponding to the target file, wherein the name modification model is obtained through training according to a history file and the modified file name of the history file;
and modifying the name of the target file according to the new target name to obtain the target file with the modified name.
6. The method of claim 1, wherein after determining the target name corresponding to the target file, the method further comprises:
acquiring the file name of the target file before modification;
and obtaining a name modification record corresponding to the target file according to the file name before the target file is modified and the target name.
7. The method of any of claims 1-6, wherein the file name modification request is for at least one of a file alias and a file original name of the target file.
8. An apparatus for modifying a name of a file, the apparatus comprising:
the first response module is used for responding to a file name modification request aiming at the target file, and acquiring a target naming rule corresponding to the target file, wherein the target naming rule is acquired based on file attributes of different levels of the target file;
the determining module is used for determining a target name corresponding to the target file according to the target naming rule;
and the first modification module is used for modifying the name of the target file according to the target name to obtain the target file with the modified name.
9. An electronic device, comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that it stores a program code that can be called by a processor to execute the method according to any one of claims 1-7.
CN202211338404.2A 2022-10-28 2022-10-28 File name modification method, device, equipment and storage medium Pending CN115658616A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211338404.2A CN115658616A (en) 2022-10-28 2022-10-28 File name modification method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211338404.2A CN115658616A (en) 2022-10-28 2022-10-28 File name modification method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115658616A true CN115658616A (en) 2023-01-31

Family

ID=84992430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211338404.2A Pending CN115658616A (en) 2022-10-28 2022-10-28 File name modification method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115658616A (en)

Similar Documents

Publication Publication Date Title
JP7414842B2 (en) How to add comments and electronic devices
CN109189950B (en) Multimedia resource classification method and device, computer equipment and storage medium
US20200258517A1 (en) Electronic device for providing graphic data based on voice and operating method thereof
US20150213127A1 (en) Method for providing search result and electronic device using the same
CN111104980B (en) Method, device, equipment and storage medium for determining classification result
KR20160015727A (en) Method and apparatus for visualizing music information
CN111539443A (en) Image recognition model training method and device and storage medium
CN109657236B (en) Guidance information acquisition method, apparatus, electronic apparatus, and storage medium
WO2022017006A1 (en) Video processing method and apparatus, and terminal device and computer-readable storage medium
CN114816610B (en) Page classification method, page classification device and terminal equipment
CN111984803B (en) Multimedia resource processing method and device, computer equipment and storage medium
WO2021088790A1 (en) Display style adjustment method and apparatus for target device
CN111325220B (en) Image generation method, device, equipment and storage medium
CN110837557B (en) Abstract generation method, device, equipment and medium
CN105139848A (en) Data conversion method and apparatus
CN114117269B (en) Memo information collection method and device, electronic equipment and storage medium
CN110929159A (en) Resource delivery method, device, equipment and medium
CN114333774A (en) Speech recognition method, speech recognition device, computer equipment and storage medium
CN114489422A (en) Display method of sidebar and electronic equipment
CN115543145A (en) Folder management method and device
CN112133319A (en) Audio generation method, device, equipment and storage medium
CN109948095B (en) Method, device, terminal and storage medium for displaying webpage content
CN113032560B (en) Sentence classification model training method, sentence processing method and equipment
CN112149653B (en) Information processing method, information processing device, electronic equipment and storage medium
CN115658616A (en) File name modification method, device, equipment and storage medium

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