CN117194342A - File renaming method, system and computing device - Google Patents

File renaming method, system and computing device Download PDF

Info

Publication number
CN117194342A
CN117194342A CN202311126248.8A CN202311126248A CN117194342A CN 117194342 A CN117194342 A CN 117194342A CN 202311126248 A CN202311126248 A CN 202311126248A CN 117194342 A CN117194342 A CN 117194342A
Authority
CN
China
Prior art keywords
file
name
index
indexes
keywords
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
CN202311126248.8A
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.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software Technology 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 Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202311126248.8A priority Critical patent/CN117194342A/en
Publication of CN117194342A publication Critical patent/CN117194342A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

The invention discloses a file renaming method, a file renaming system and computing equipment, and relates to the technical field of computers. The computing device is coupled with a file index storage device, wherein the file index storage device comprises a plurality of file indexes; the method comprises the following steps: acquiring various file indexes of one or more files from the file index storage device in response to a request for renaming the files; splicing to generate key information of the file according to various file indexes of the file and weights corresponding to each file index; and generating a recommended name of the file according to the key information of the file and the preset file information so as to rename the file according to the recommended name. According to the technical scheme of the invention, the file can be automatically and intelligently renamed, and the renamed file name is associated with the file content.

Description

File renaming method, system and computing device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a file renaming method, a file renaming system, and a computing device.
Background
In the use process of a computer, a read-write file is a necessary man-machine access interaction mode, a user needs to make a way with a large number of files every day, the file name is the most important attribute of the file, and the user can know the approximate content of the file according to the file name, so that most of users are used to naming the file as the file name which is easy to identify and meets the personalized requirement.
The currently popular operating systems, whether Windows, macOS or Android systems of mobile devices, all adopt a standard file naming mechanism, namely a mode of file name+suffix name. This file naming method makes a large number of files handled by a user usually adopt a random file name, for example, a file name adopting a timestamp or a hash value, and does not adopt a unified file naming rule, so that the user needs to manually rename each file before the file is readable.
In the prior art, in the file manager application of the Windows operating system, a function of renaming files in batches is provided, a user can select files completely through Ctrl+A, click right key to select a "rename" option in a pop-up menu bar, then input a file name, press an enter key, and rename operation is completed. The file sequence number selected for modification is (1), and the file sequence number of the subsequent automatic renaming is sequentially increased from the modified file. The method is simple and quick, and can be completed without downloading any software. By adopting the scheme, in the Windows batch renaming function, a user can only input a fixed file name, and then the system adds a serial number increasing mode, so that the system is very mechanized and cannot meet some custom naming scenes. In addition, a plurality of files are renamed to be a fixed file name, so that the relevance between the file content and the file name cannot be truly embodied, and the situation that many files need to be renamed again can exist, so that the actual operation of a user cannot be truly reduced.
In the file manager of the U0S, a batch file renaming function in a custom format is provided, the mode can allow a user to perform batch renaming of a plurality of selected files in the custom format, the format can define the contents of three parts of front part, middle part and back part, then the naming is sequentially increased by using an increment numbering mode, and the custom naming scene of the user can be basically met. However, in the batch renaming method, the user needs to specify the fixed content before, during and after, and cannot distinguish the file content of different files, so that the renamed files are basically identical in file name, and the association between the file name and the file content cannot be truly realized.
Therefore, a file renaming method is needed to solve the problems in the above technical solutions.
Disclosure of Invention
Accordingly, the present invention provides a file renaming method and file renaming system to solve or at least alleviate the above-mentioned problems.
According to one aspect of the present invention, there is provided a file renaming method, executed in a computing device coupled to a file index storage device, the file index storage device including a plurality of file indexes therein; the method comprises the following steps: acquiring various file indexes of one or more files from the file index storage device in response to a request for renaming the files; splicing to generate key information of the file according to various file indexes of the file and weights corresponding to each file index; and generating a recommended name of the file according to the key information of the file and the preset file information so as to rename the file according to the recommended name.
Optionally, in the file renaming method according to the present invention, the plurality of file indexes include: file name index, file content index, file attribute index, file tag index.
Optionally, in the file renaming method according to the present invention, generating a recommended name of the file according to the key information of the file and the predetermined file information includes: and generating a recommended name of the file according to the key information of the file and the preset file information and the preset format.
Optionally, in the file renaming method according to the present invention, the predetermined file information includes first predetermined file information and second predetermined file information, and the recommended name includes a first name part, a second name part, and a third name part; generating a recommended name of the file according to the key information of the file and the preset file information, wherein the recommended name comprises the following steps: and taking the first preset file information and the second preset file information of the file as a first name part and a second name part respectively, and taking the key information of the file as a third name part to generate the recommended name of the file.
Optionally, in the file renaming method according to the present invention, the first predetermined file information and the second predetermined file information are each one of a file time, a user name and a work file.
Optionally, in the file renaming method according to the present invention, key information of the file is generated by stitching according to multiple file indexes of the file and weights corresponding to each file index, including: selecting one or more name keywords from the file name index, selecting one or more content keywords from the file content index, selecting one or more tag keywords from the file tag index, and selecting one or more attribute keywords from the file attribute index to obtain a plurality of keywords in a plurality of file indexes; and selecting a part of keywords from the keywords in the plurality of file indexes according to the weight corresponding to each file index, and splicing to generate the key information of the file.
Optionally, in the file renaming method according to the present invention, further includes: in response to monitoring a file creation event, obtaining multiple information of the file to create multiple file indexes of the file; storing a plurality of file indexes of the file in the file index storage device.
Optionally, in the file renaming method according to the present invention, the obtaining multiple information of the file to create multiple file indexes of the file includes: acquiring an original file name of the file, and segmenting the original file name by utilizing a file name recognition segmentation algorithm to form one or more name keywords to obtain a file name index of the file; acquiring the full text content of the file, and segmenting the full text content by using a file content segmentation algorithm to form one or more content keywords to obtain a file content index of the file; acquiring file attributes of the file, and extracting one or more attribute keywords in the file attributes by using a file attribute keyword extraction algorithm to obtain file attribute indexes of the file; and acquiring file labels of the files, and extracting one or more label keywords in the file labels by using a file label keyword extraction algorithm to obtain file label indexes of the files.
Optionally, in the file renaming method according to the present invention, obtaining a file tag of the file includes: and if the file is a picture file, extracting text content from the picture file as a file tag by utilizing an OCR (optical character recognition) algorithm.
According to one aspect of the present invention, there is provided a file renaming system comprising: a file index storage device adapted to store a plurality of file indexes of each file; a file monitor adapted to monitor file creation events or file update events; a daemon coupled to the file monitor, file index storage means adapted to create and store multiple indexes of a file in response to a file creation event or a file update event monitored by the file monitor; the file management client is suitable for sending a request for renaming one or more files; and a file management server coupled to the file management client and the file index storage device, adapted to perform the method as described above in response to a request sent by the file management client to rename one or more files.
According to one aspect of the invention, there is provided a computing device comprising: at least one processor; a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the file renaming method as described above.
According to one aspect of the present invention, there is provided a readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform a file renaming method as described above.
According to the technical scheme of the invention, the file renaming method is provided, wherein a request of a user for renaming one or more files at a file management client can be responded, multiple file indexes of the files are obtained from a file index storage device, key information of the files is generated by splicing the multiple file indexes of the files and weights corresponding to the file indexes, and further, recommended names of the files are generated according to the key information of the files and preset file information, so that the files are renamed according to the recommended names. In this way, the invention realizes automatic and intelligent renaming of single files or batch files, realizes one-key automatic renaming, improves renaming efficiency, and the key information in the renamed file name (recommended name) is associated with file content, in particular with the original file name, file content, file attribute and file label of the file, so that for different files, users can distinguish the content of different files according to the renamed file name.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which set forth the various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to fall within the scope of the claimed subject matter. The above, as well as additional objects, features, and advantages of the present disclosure will become more apparent from the following detailed description when read in conjunction with the accompanying drawings. Like reference numerals generally refer to like parts or elements throughout the present disclosure.
FIG. 1 shows a schematic diagram of a file renaming system 100 in accordance with one embodiment of the invention;
FIG. 2 shows a schematic diagram of a computing device 200 according to one embodiment of the invention;
FIG. 3 illustrates a flow diagram of a file renaming method 300 according to one embodiment of the invention;
FIG. 4 illustrates a flow diagram for creating a file index according to one embodiment of the invention;
FIG. 5 illustrates a data structure diagram for creating a file name index using a deep-parsing file name recognition word segmentation algorithm in accordance with one embodiment of the present invention;
fig. 6 shows a schematic diagram of a first name part, a second name part, a third name part of a recommended name according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
FIG. 1 shows a schematic diagram of a file renaming system 100 in accordance with one embodiment of the invention. According to the file renaming system 100 of the present invention, automatic and intelligent renaming of files can be realized, and the renamed file names are associated with file contents.
As shown in fig. 1, the file renaming system 100 includes a file manager client 110 (i.e., a file manager client), a file manager server 120 (i.e., a file manager server), and a file index store 130. The venturi service 120 may be coupled with the venturi client 110, the file index storage 130.
In one embodiment, file index storage 130 may store a variety of file indexes for each file. The various file indexes may specifically include: file name index, file content index (i.e., full text retrieval index), file attribute index, file tag index, etc. Here, the file content index may include, for example, content in a text file, text content in a picture, and the file attribute index may include, for example, information of singer, album name, resolution, time length, and the like.
In some embodiments, the venturi service 120 includes a file renaming plug-in library to provide file renaming services to the venturi client 110 based on the file renaming plug-in library.
In some embodiments, the file renaming system 100 of the present invention may be deployed in a computing device (e.g., computing device 200 described below), and the venturi client 110 and the venturi server 120 may communicate via a D-Bus interface.
In some embodiments, the file renaming system 100 further includes a file monitor 140 (deployed in a computing device), through which file monitor 140 file creation events, file update events may be monitored, and a file creation signal sent when a file creation event is monitored, and a file update signal sent when a file update event is monitored. The computing device may obtain various information of the file in response to the file creation event or the file update event monitored through the file monitor 140 to create various file indexes of the file, and store the various file indexes of the created file into the file index storage 130 to enable updating of the various file indexes of the file in the file index storage 130.
In some embodiments, file renaming system 100 also includes daemon 150 (index and Chinese identification daemon), which daemon 150 may be coupled with file monitor 140, file index store 130. Daemon 150 may be deployed in an operating system of a computing device and may obtain various information of a file in response to a file creation event or a file update event monitored by file monitor 140 to create various file indexes of the file and store the various file indexes of the file in file index storage 130 to enable updating of the various file indexes of the file in file index storage 130. Among them, the daemon 150 is provided with a file index update service by which various file indexes of files can be created and stored in the file index storage 130 in response to a file creation signal transmitted by the file monitor 140 when a file creation event is monitored or a file update signal transmitted when a file update event is monitored, to update various file indexes of files in the file index storage 130.
In some embodiments, the file renaming system 100 further includes an algorithm layer 160 coupled to the daemon 150, where the algorithm layer 160 may be, for example, a chinese word segmentation algorithm layer, and may encapsulate algorithms for identifying a file name (original file name), file content, file attributes, file labels, and extracting keywords therefrom, including, for example, a file name identification word segmentation algorithm, a file content word segmentation algorithm, a file attribute keyword extraction algorithm, and a file label keyword extraction algorithm. Daemon 150 may utilize the above algorithm to extract corresponding keywords from file names (original file names), file contents, file attributes, file labels, respectively, to create corresponding file name indices, file content indices, file attribute indices, file label indices, and store the various file indices in file index storage 130.
In one embodiment, the management server 120 may communicate with the algorithm layer 160 via the daemon 150 to call a file name recognition word segmentation algorithm, a file content word segmentation algorithm, a file attribute keyword extraction algorithm, and a file tag keyword extraction algorithm of the algorithm layer 160, to extract corresponding name keywords, content keywords, attribute keywords, and tag keywords from file names (original file names), file contents, file attributes, and file tags of the files, respectively, to create corresponding file name indexes, file content indexes, file attribute indexes, and file tag indexes, and store the various file indexes in the file index storage 130.
In an embodiment of the present invention, a user may send a request to rename one or more files at the file management client 110, and the file management server 120 may respond to the request to rename one or more files sent by the client Yu Wenguan and be adapted to perform the file renaming method 300 of the present invention to generate a recommended name for each file, so as to rename the file according to the recommended name of the file. The file renaming method 300 of the present invention will be described in detail below.
In one embodiment of the invention, the venturi service 120 may be implemented as a computing device 200 as described below, such that the file renaming method 300 of the present invention may be performed in the computing device 200. The file renaming method 300 of the present invention is executed by the file management server 120, and the instruction may be generated based on natural language and sent to the corresponding application 115, so that the application 115 executes the instruction.
FIG. 2 shows a schematic diagram of a computing device 200 according to one embodiment of the invention. As shown in FIG. 2, in a basic configuration, computing device 200 includes at least one processing unit 202 and a system memory 204. According to one aspect, the processing unit 202 may be implemented as a processor, depending on the configuration and type of computing device. The system memory 204 includes, but is not limited to, volatile storage (e.g., random access memory), non-volatile storage (e.g., read only memory), flash memory, or any combination of such memories. According to one aspect, an operating system 205 is included in system memory 204.
According to one aspect, operating system 105 is suitable, for example, for controlling the operation of computing device 200. Further, examples are practiced in connection with a graphics library, other operating systems, or any other application program and are not limited to any particular application or system. This basic configuration is illustrated in fig. 2 by those components within the dashed line. According to one aspect, computing device 200 has additional features or functionality. For example, according to one aspect, computing device 200 includes additional data storage devices (removable and/or non-removable) such as, for example, magnetic disks, optical disks, or tape. Such additional storage is illustrated in fig. 2 by removable storage device 209 and non-removable storage device 210.
As set forth hereinabove, according to one aspect, program modules 203 are stored in system memory 204. According to one aspect, program module 203 may include one or more applications, the invention is not limited to the type of application, for example, the application may include: email and contacts applications, word processing applications, spreadsheet applications, database applications, slide show applications, drawing or computer-aided application, web browser applications, etc. In an embodiment according to the present invention, program module 203 includes a plurality of program instructions for performing file renaming method 300 of the present invention.
According to one aspect, the examples may be practiced in a circuit comprising discrete electronic components, a packaged or integrated electronic chip containing logic gates, a circuit utilizing a microprocessor, or on a single chip containing electronic components or a microprocessor. For example, examples may be practiced via a system on a chip (SOC) in which each or many of the components shown in fig. 2 may be integrated on a single integrated circuit. According to one aspect, such SOC devices may include one or more processing units, graphics units, communication units, system virtualization units, and various application functions, all of which are integrated (or "burned") onto a chip substrate as a single integrated circuit. When operating via an SOC, the functionality described herein may be operated via dedicated logic integrated with other components of computing device 200 on a single integrated circuit (chip). Embodiments of the invention may also be practiced using other techniques capable of performing logical operations (e.g., AND, OR, AND NOT), including but NOT limited to mechanical, optical, fluidic, AND quantum techniques. In addition, embodiments of the invention may be practiced within a general purpose computer or in any other circuit or system.
According to one aspect, the computing device 200 may also have one or more input devices 212, such as a keyboard, mouse, pen, voice input device, touch input device, and the like. Output device(s) 214 such as a display, speakers, printer, etc. may also be included. The foregoing devices are examples and other devices may also be used. Computing device 200 may include one or more communication connections 216 that allow communication with other computing devices 218. Examples of suitable communication connections 216 include, but are not limited to: RF transmitter, receiver and/or transceiver circuitry; universal Serial Bus (USB), parallel and/or serial ports.
The term computer readable media as used herein includes computer storage media. Computer storage media may include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information (e.g., computer readable instructions, data structures, or program modules). System memory 204, removable storage 209, and non-removable storage 210 are all examples of computer storage media (i.e., memory storage). Computer storage media may include Random Access Memory (RAM), read Only Memory (ROM), electrically erasable read only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other article of manufacture that can be used to store information and that can be accessed by computing device 200. According to one aspect, any such computer storage media may be part of computing device 200. Computer storage media does not include a carrier wave or other propagated data signal.
According to one aspect, communication media is embodied by computer readable instructions, data structures, program modules, or other data in a modulated data signal (e.g., carrier wave or other transport mechanism) and includes any information delivery media. According to one aspect, the term "modulated data signal" describes a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, radio Frequency (RF), infrared, and other wireless media.
In an embodiment in accordance with the invention, the computing device 200 is configured to perform a file renaming method 300 in accordance with the invention. The computing device 200 includes one or more processors and one or more readable storage media storing program instructions that, when configured to be executed by the one or more processors, cause the computing device 200 to perform the file renaming method 300 in embodiments of the invention.
FIG. 3 illustrates a flow diagram of a file renaming method 300 according to one embodiment of the invention. The method 300 is suitable for execution in a venturi service 120, such as the aforementioned computing device 200. The file renaming method 300 of the present invention is executed by the file management server 120, so that the file can be automatically and intelligently renamed, and the renamed file name is associated with the file content.
As described above, the file renaming system 100 according to the present invention includes a file management client 110, a file management server 120, and a file index storage 130. The file management server 120 (computing device 200) may be coupled to the file management client 110 and the file index storage 130, where the file index storage 130 includes various file indexes, and may specifically store various file indexes of each file.
In some embodiments, the plurality of file indexes may specifically include: file name index (corresponding to keywords in original file name), file content index, file attribute index, file tag index.
As shown in fig. 3, method 300 begins at step 310.
In step 310, in response to a request to rename one or more files, a plurality of file indexes for each file are obtained from a file index storage device. Specifically, a user may send a request at the messaging client 110 to rename one or more files to request that the messaging server 120 rename a single file or a batch of files. The file management server 120 (computing device 200) may respond to Yu Wenguan requests sent by the client 110 to rename one or more files and, for each file, retrieve the file index of the file from the file index store.
It should be noted that the file renamed according to the method 300 of the present invention may include one or more of a music file, a video file, a picture file, and a text file. That is, the file type may include one or more of music, video, pictures, text. The file content index may include, for example, content in a text file, text content in a picture file, and the file attribute index may include, for example, singer, album name, resolution, duration, etc.
Then, in step 320, for each file, the key information of the file is generated by stitching according to the multiple file indexes of the file and the weights corresponding to each file index. Specifically, keywords in multiple file indexes of a file can be spliced according to weights corresponding to each file index to generate key information of the file.
It will be appreciated that the key information of the file generated herein is associated with the file content, and in particular may be associated with the original file name, file content, file attributes, file labels of the file. In this way, for different files, the content of the different files may be distinguished based on the key information of each file.
Finally, in step 330, a recommended name for the file may be generated based on the key information of the file and the predetermined file information, and the recommended name may be returned to the administration client 110. In this way, the file may be renamed by the file management client 110 according to the recommended name, that is, the file may be renamed to the recommended name generated according to the above steps. It is understood that the file name generated here contains key information of the file and predetermined file information.
In some embodiments, the recommended name of the file may be generated according to a predetermined format (which may be a user-defined renaming format) based on key information of the file and predetermined file information.
It should be noted that, since the key information of the file is associated with the file content, the key information may be specifically associated with the original file name, the file content, the file attribute, and the file tag of the file. Therefore, the recommended name of the file generated according to the key information and the predetermined file information of the file is also associated with the file content, and may be specifically associated with the original file name, the file content, the file attribute, and the file tag of the file. In this way, for different files, the user can distinguish the content of the different files based on key information in the recommended name of each file (i.e., the renamed new file name).
In some embodiments, a variety of file indexes for each file may be created in advance and stored in a file index storage device prior to performing step 310. Specifically, various information (including, for example, an original file name, full text content, file attributes, file labels) of each file may be acquired, and various file indexes of the file are created according to the various information of the file.
In the method 300 of the present invention, file creation events, file update events may be monitored in real time. Specifically, the file creation event, the file update event may be monitored by the file monitor 140. When the file monitor 140 monitors a file creation event or a file update event, the computing device 200 may obtain various information of the file to create various file indexes of the file in response to monitoring the file creation event or the file update event, and may store the various file indexes of the file in the file index storage 130 to enable updating of the various file indexes of the file in the file index storage 130.
In one embodiment, daemon 150 is coupled with file monitor 140, file index store 130. The computing device 200 may obtain various information of the file through the daemon 150 in response to the file creation event or the file update event monitored through the file monitor 140 to create various file indexes of the file, and store the various file indexes of the file in the file index storage 130 to enable updating of the various file indexes of the file in the file index storage 130.
FIG. 4 shows a flow diagram of creating a file index according to one embodiment of the invention.
As shown in fig. 4, in response to a file creation event or a file update event monitored by the file monitor 140, various information of a file may be acquired by extracting keywords in each file index through the corresponding algorithm of the algorithm layer 160, thereby creating various file indexes of the file. Here, the algorithm layer 160 includes a file name recognition word segmentation algorithm, a file content word segmentation algorithm, a file attribute keyword extraction algorithm, and a file tag keyword extraction algorithm.
Firstly, the original file name of the file can be obtained, and the original file name is segmented into one or more name keywords (specifically, chinese keywords) by utilizing a file name recognition segmentation algorithm, so that the file name index of the file can be obtained according to the one or more name keywords. In other words, the file name index may include one or more name keywords formed by segmenting the original file name. Here, the filename recognition and word segmentation algorithm may be, for example, a deep-parsing filename recognition and word segmentation algorithm. Here, fig. 5 shows a schematic diagram of a data structure for creating a file name index using a deep-parsing file name recognition word segmentation algorithm according to an embodiment of the present invention.
In one embodiment, after the original file name of the file is obtained, whether the original file name is valid or not may be judged first, and if so, a file name recognition word segmentation algorithm (deep-parsing file name recognition word segmentation algorithm) is used to segment the original file name to form one or more name keywords, so as to obtain a file name index of the file, thereby completing creation/update of the file name index. If the original file name is invalid, it is determined that the file is invalid, and a process of creating various file indexes for the file is not performed.
Then, a file content word segmentation interface may be invoked to obtain the full text content (file content) of the file, and then the full text content of the file is segmented by using a file content word segmentation algorithm (specifically, the lucene file content word segmentation algorithm) to form one or more content keywords, so that a file content index of the file may be obtained according to the one or more content keywords. In other words, the file content index of the file may include one or more content keywords extracted from the full-text content of the file. In one embodiment, the document content word segmentation algorithm may be a lucene document content word segmentation algorithm, and the lucene document content word segmentation algorithm may be used to perform Chinese and English word segmentation on the full text of the document, and may further use a jieba word segmentation technique to perform word segmentation on the full text of the document through a text analysis engine.
In one embodiment, if the file is a picture file, text content may be extracted from the picture file by an OCR recognition algorithm as file content for the picture file.
In one embodiment, after the file content is obtained, whether the file content is valid or not may be judged first, if so, the full text content of the file is segmented by using a file content segmentation algorithm (lucene file content segmentation algorithm) to form one or more content keywords, so as to obtain a file content index of the file, thereby completing creation/update of the file content index. If the file content is not valid, the file content index for the file is no longer created and the following steps may be continued to obtain the file attributes.
Then, a file attribute word segmentation interface may be invoked to obtain file attributes of the file, and one or more attribute keywords in the file attributes may be extracted using a file attribute keyword extraction algorithm to obtain a file attribute index of the file. It is understood that a file attribute index for a file may include one or more attribute keywords extracted from the file attributes. In one embodiment, when acquiring the file attribute of the file, whether the file suffix name is valid or not may be judged first, if so, the file attribute of the file may be acquired according to the corresponding relationship between the file suffix name and the file attribute, and then one or more attribute keywords in the file attribute may be extracted by using a file attribute keyword extraction algorithm to obtain a file attribute index of the file, thereby completing creation/update of the file attribute index. If the file suffix name is invalid, the file attribute index for the file may not be created any more and the following steps may be continued to obtain the file tag.
It should be noted that, the file attribute may be a file attribute tag specific to the Linux operating system, related to the mimeotype of the file, and may be stored in metadata of the file, for use in a read and write manner of the specific attribute. For example, file attributes of a picture file include resolution, file attributes of a music file include singer, album name, and the like, and file attributes of a video file include playback time length.
Finally, a file tag word segmentation interface can be called to obtain file tags of the files, and one or more tag keywords in the file tags are extracted by utilizing a file tag keyword extraction algorithm to obtain file tag indexes of the files. It will be appreciated that one or more tag keywords extracted from the file tag may be included in the file tag index of the file. In one embodiment, when the file tag of the file is obtained, whether the file is a picture file may be determined first, if the file is a picture file, text content may be extracted from the picture file by using an OCR recognition algorithm as the file tag, and further, one or more tag keywords in the file tag (text content of the picture file) may be extracted by using a file tag keyword extraction algorithm to obtain a file tag index of the file, thereby completing creation/update of the file tag index. It will be appreciated that the file tag index may contain one or more tag keywords extracted from the textual content of the picture file. Here, the tag keyword may be a specific word in the text content in the picture file, for example, the tag keyword may include a specific word such as "an identification card", "an account book", or the like, which can identify user information.
In addition, if the file is not a picture file, the file tag index for the file is not created. Thus, the entire file index creation/update flow is completed.
In some embodiments, in step 320, a weight priority stitching algorithm may be utilized to stitch a plurality of keywords in a plurality of file indexes of a file according to a weight corresponding to each file index to generate key information of the file.
It should be noted that, first, one or more keywords may be selected from each file index, specifically, one or more name keywords may be selected from the file name index, one or more content keywords may be selected from the file content index, one or more tag keywords may be selected from the file tag index, one or more attribute keywords may be selected from the file attribute index, so as to obtain a plurality of keywords (for example, 20 keywords) in a plurality of file indexes. Further, a weight priority stitching algorithm may be used to stitch a part of keywords (a part of name keywords, a part of content keywords, a part of tag keywords, and a part of attribute keywords corresponding to the respective weights) as target keywords from among the plurality of keywords in the plurality of file indexes according to the weights corresponding to the respective file indexes, so as to generate the key information of the file.
In the process of splicing the target keywords, a plurality of name keywords in the target keywords can be combined into a character string, and the character string is connected with keywords in other file indexes by connectors. For example, a part of keywords (target keywords) selected from a plurality of keywords in a plurality of file indexes includes: a plurality of name keywords (browser, product, requirement), two content keywords (author name, company name), one attribute keyword (word), and the key information of the file generated by splicing the target keywords may be: browser product requirements-author name-company name-word.
In one embodiment, the file name index may be weighted 40%, the file content index may be weighted 45%, the file tag index may be weighted 45%, and the file attribute index may be weighted 25%.
It is assumed that N keywords are selected from among the plurality of file indexes, including a name keywords selected from the file name index, B content keywords selected from the file content index, C tag keywords selected from the file tag index, and D attribute keywords selected from the file attribute index. Then 40% of the A name keywords, 45% of the B content keywords, 45% of the C tag keywords and 25% of the D attribute keywords can be selected from the N keywords as target keywords according to the weight corresponding to each file index, and the selected target keywords are spliced to generate the key information of the file. Here, 40% a, 45% b, 45% c, 25% d are rounded up respectively.
For example, the finally selected target keywords include 1 name keyword (specifically, chinese keyword), 3 content keywords, 3 tag keywords, and 1 attribute keyword, and finally, the key information of the file may be spliced and generated according to the 1 name keyword, the 3 content keywords, the 3 tag keywords, and the 1 attribute keyword.
When the name keyword is selected from the file name index, whether the file name index contains non-numeric or English effective information can be judged, if so, the existence of the Chinese keyword in the file name index can be determined, and the Chinese keyword is obtained as the name keyword. When the content keywords are selected from the file content index, the method can be used for screening according to the probability of each noun in the file content (full-text content), and verbs and pronouns in the file content can be filtered, so that a plurality of selected content keywords are close to the real file content as much as possible, and the key information of the finally generated file is ensured to be closely related to the file content. In addition, for the file content of the picture file, text content extracted from the picture file may be used, and accordingly, the file content index of the picture file may be created from the text content extracted from the picture file.
Further, since file attribute information is relatively unimportant to renaming, a relatively low weight may be set for the file attribute index. In one embodiment, when the text length of the key information of the file generated by splicing exceeds the length threshold, the related information of the file attribute index can be deleted from the key information.
In one embodiment, the predetermined file information may include, for example, one or more of a file time, a user name, and a work file.
In one embodiment, the predetermined file information includes, for example, first predetermined file information and second predetermined file information. The recommended names may be divided into a first name part, a second name part, and a third name part according to a predetermined format. Here, the first name part, the second name part, and the third name part may correspond to one of the front, middle, and rear parts of the recommended name, respectively. For example, the first name part, the second name part, and the third name part may correspond to a front part, a middle part, and a rear part of the recommended name, respectively, or to a front part, a rear part, and a middle part of the recommended name, respectively, or to a middle part, a rear part, and a front part of the recommended name, respectively, or to a middle part, a front part, and a rear part of the recommended name, respectively, or to a rear part, a middle part, and a front part of the recommended name, respectively.
Here, fig. 6 shows a schematic diagram of a first name part, a second name part, and a third name part of a recommended name according to an embodiment of the present invention. The first name part, the second name part and the third name part shown in fig. 6 correspond to the front part, the middle part and the rear part respectively.
As shown in fig. 6, when generating a recommended name of a file according to key information and predetermined file information of the file, the first predetermined file information and the second predetermined file information of the file may be respectively used as a first name part and a second name part, and the key information of the file generated in step 320 may be used as a third name part, so that the recommended name of the file may be generated according to the first predetermined file information, the second predetermined file information, and the key information of the file.
In one embodiment, the first predetermined file information and the second predetermined file information may be one of a file time, a user name and a work file, respectively.
According to the file renaming method 300 of the present invention, a user may respond to a request for renaming one or more files at a file management client, obtain multiple file indexes of the files from a file index storage device, splice and generate key information of the files according to the multiple file indexes of the files and weights corresponding to each file index, and further generate a recommended name of the files according to the key information of the files and predetermined file information, so as to rename the files according to the recommended name. In this way, the invention realizes automatic and intelligent renaming of single files or batch files, realizes one-key automatic renaming, improves renaming efficiency, and the key information in the renamed file name (recommended name) is associated with file content, in particular with the original file name, file content, file attribute and file label of the file, so that for different files, users can distinguish the content of different files according to the renamed file name.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions of the methods and apparatus of the present invention, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U-drives, floppy diskettes, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the mobile terminal will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to perform the file renaming method of the invention in accordance with instructions in said program code stored in the memory.
By way of example, and not limitation, readable media comprise readable storage media and communication media. The readable storage medium stores information such as computer readable instructions, data structures, program modules, or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with examples of the invention. The required structure for a construction of such a system is apparent from the description above. In addition, the present invention is not directed to any particular programming language. It will be appreciated that the teachings of the present invention described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed invention requires more features than are expressly recited in each claim. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into a plurality of sub-modules.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Furthermore, some of the embodiments are described herein as methods or combinations of method elements that may be implemented by a processor of a computer system or by other means of performing the functions. Thus, a processor with the necessary instructions for implementing the described method or method element forms a means for implementing the method or method element. Furthermore, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is for carrying out the functions performed by the elements for carrying out the objects of the invention.
As used herein, unless otherwise specified the use of the ordinal terms "first," "second," "third," etc., to describe a general object merely denote different instances of like objects, and are not intended to imply that the objects so described must have a given order, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of the above description, will appreciate that other embodiments are contemplated within the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is intended to be illustrative, but not limiting, of the scope of the invention, which is defined by the appended claims.

Claims (12)

1. A method of renaming a file executing in a computing device coupled to a file index store, the file index store including a plurality of file indexes therein; the method comprises the following steps:
acquiring various file indexes of one or more files from the file index storage device in response to a request for renaming the files;
Splicing to generate key information of the file according to various file indexes of the file and weights corresponding to each file index;
and generating a recommended name of the file according to the key information of the file and the preset file information so as to rename the file according to the recommended name.
2. The method of claim 1, wherein the plurality of file indexes comprises: file name index, file content index, file attribute index, file tag index.
3. The method of claim 1 or 2, wherein generating the recommended name of the file according to the key information of the file and predetermined file information comprises:
and generating a recommended name of the file according to the key information of the file and the preset file information and the preset format.
4. The method of claim 1 or 2, wherein the predetermined file information includes first predetermined file information and second predetermined file information, and the recommended name includes a first name part, a second name part, and a third name part;
generating a recommended name of the file according to the key information of the file and the preset file information, wherein the recommended name comprises the following steps:
And taking the first preset file information and the second preset file information of the file as a first name part and a second name part respectively, and taking the key information of the file as a third name part to generate the recommended name of the file.
5. The method of claim 4, wherein the first and second predetermined file information are one of a file time, a user name, and a work file, respectively.
6. The method of claim 2, wherein the splicing to generate the key information of the file according to the multiple file indexes of the file and the weights corresponding to each file index comprises:
selecting one or more name keywords from the file name index, selecting one or more content keywords from the file content index, selecting one or more tag keywords from the file tag index, and selecting one or more attribute keywords from the file attribute index to obtain a plurality of keywords in a plurality of file indexes;
and selecting a part of keywords from the keywords in the plurality of file indexes according to the weight corresponding to each file index, and splicing to generate the key information of the file.
7. The method of any of claims 1-6, further comprising:
in response to monitoring a file creation event, obtaining multiple information of the file to create multiple file indexes of the file;
storing a plurality of file indexes of the file in the file index storage device.
8. The method of claim 7, wherein obtaining the plurality of information for the file to create the plurality of file indexes for the file comprises:
acquiring an original file name of the file, and segmenting the original file name by utilizing a file name recognition segmentation algorithm to form one or more name keywords to obtain a file name index of the file;
acquiring the full text content of the file, and segmenting the full text content by using a file content segmentation algorithm to form one or more content keywords to obtain a file content index of the file;
acquiring file attributes of the file, and extracting one or more attribute keywords in the file attributes by using a file attribute keyword extraction algorithm to obtain file attribute indexes of the file;
and acquiring file labels of the files, and extracting one or more label keywords in the file labels by using a file label keyword extraction algorithm to obtain file label indexes of the files.
9. The method of claim 8, wherein obtaining a file tag for the file comprises:
and if the file is a picture file, extracting text content from the picture file as a file tag by utilizing an OCR (optical character recognition) algorithm.
10. A file renaming system comprising:
a file index storage device adapted to store a plurality of file indexes of each file;
a file monitor adapted to monitor file creation events or file update events;
a daemon coupled to the file monitor, file index storage means adapted to create and store multiple indexes of a file in response to a file creation event or a file update event monitored by the file monitor;
the file management client is suitable for sending a request for renaming one or more files; and
a venturi server coupled to the venturi client, the file index store, adapted to perform the method of any of claims 1-9 in response to a request sent by the venturi client to rename one or more files.
11. A computing device, comprising:
at least one processor; and
A memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-9.
12. A readable storage medium storing program instructions which, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1-9.
CN202311126248.8A 2023-09-01 2023-09-01 File renaming method, system and computing device Pending CN117194342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311126248.8A CN117194342A (en) 2023-09-01 2023-09-01 File renaming method, system and computing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311126248.8A CN117194342A (en) 2023-09-01 2023-09-01 File renaming method, system and computing device

Publications (1)

Publication Number Publication Date
CN117194342A true CN117194342A (en) 2023-12-08

Family

ID=88989876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311126248.8A Pending CN117194342A (en) 2023-09-01 2023-09-01 File renaming method, system and computing device

Country Status (1)

Country Link
CN (1) CN117194342A (en)

Similar Documents

Publication Publication Date Title
US20190325024A1 (en) Method, System, and Apparatus for Validation
US7673235B2 (en) Method and apparatus for utilizing an object model to manage document parts for use in an electronic document
US8392472B1 (en) Auto-classification of PDF forms by dynamically defining a taxonomy and vocabulary from PDF form fields
US10353943B2 (en) Computerized system and method for automatically associating metadata with media objects
RU2328034C2 (en) Method and system of operations comparison with to semantic marks in electronic documents
US20160203115A1 (en) Intelligent text annotation
CN106919711B (en) Method and device for labeling information based on artificial intelligence
CN107391561B (en) Advertisement processing method in content source page, server and computer readable medium
US11636096B2 (en) Custom metadata tag inheritance based on a filesystem directory tree or object storage bucket
US9588952B2 (en) Collaboratively reconstituting tables
JP2020149686A (en) Image processing method, device, server, and storage medium
CN110826342A (en) Method, device, computer storage medium and terminal for realizing model management
CN109472540B (en) Service processing method and device
CN114880289A (en) File grouping display method and computing device
CN114328983A (en) Document fragmenting method, data retrieval device and electronic equipment
CN117194322A (en) File classification management method, system and computing device
US11704279B2 (en) Event driven migration, recall, and data placement optimization based on custom metadata
US20090063416A1 (en) Methods and systems for tagging a variety of applications
CN115080114B (en) Application program transplanting processing method, device and medium
CN112257005A (en) Form component generation method and device
CN116755688A (en) Component processing method, device, computer equipment and storage medium
US20200242178A1 (en) Search processing method and apparatus based on clipboard data
WO2023082817A1 (en) Application program recommendation method
US11023418B2 (en) Keyword-based data management system and method
CN107168627B (en) Text editing method and device for touch screen

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