WO2018201583A1 - 文件管理方法、系统、电子装置及介质 - Google Patents

文件管理方法、系统、电子装置及介质 Download PDF

Info

Publication number
WO2018201583A1
WO2018201583A1 PCT/CN2017/088978 CN2017088978W WO2018201583A1 WO 2018201583 A1 WO2018201583 A1 WO 2018201583A1 CN 2017088978 W CN2017088978 W CN 2017088978W WO 2018201583 A1 WO2018201583 A1 WO 2018201583A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
identifier
original
client
name
Prior art date
Application number
PCT/CN2017/088978
Other languages
English (en)
French (fr)
Inventor
李治
周仲昆
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2018201583A1 publication Critical patent/WO2018201583A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database

Definitions

  • the present invention belongs to the field of data management technologies, and in particular, to a file management method, system, electronic device, and medium.
  • the embodiments of the present invention provide a file management method, system, electronic device, and medium, to solve the problem that the file information security system has a low degree of confidentiality and a large file leakage risk in the existing file management system. .
  • a first aspect of the embodiments of the present invention provides a file management method, including:
  • a second aspect of the embodiments of the present invention provides a file management system, including:
  • a generating module configured to generate, according to the original file name uploaded by the file uploaded by the client, a file identifier corresponding to the original file name
  • a rename module configured to rename the file to the file identifier, and store the file in a preset storage directory
  • a storage module configured to store a mapping relationship between the file identifier, the original file name, and the storage directory of the file to a database
  • a query module configured to: when receiving a keyword-based file query instruction issued by the client, searching for, in the database, an original file name associated with the keyword, and searching for the original file name a file identifier and a storage directory having the mapping relationship;
  • a returning module configured to search for a file named with the file identifier in the storage directory based on the file identifier and the storage directory in the search result, and use the found file and the corresponding original file name as a check The result is returned to the client.
  • a third aspect of an embodiment of the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and operable on the processor, the processor executing the The computer program implements the following steps:
  • a fourth aspect of the embodiments of the present invention provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and the computer program is executed by a processor, and the following steps are implemented:
  • the file management method, system, electronic device and medium proposed by the present invention rename the file to a file identifier corresponding to the original file name, and between the file identifier, the original file name, and the storage directory of the file
  • the mapping relationship is stored in the database, which ensures that the criminals want to steal files from the background, and can't intuitively understand the correspondence between the files and the burst items from the file name. It is difficult to quickly identify which files from a large number of files.
  • the file has a high usable value, thus reducing the possibility of the file being quickly stolen and improving the confidentiality of the file information to a certain extent.
  • the issued file query command ⁇ by obtaining the original file name associated with the file query instruction in the database, ensures that the server can return the file required by the client and its corresponding original file name, so that the system is lowering the file.
  • the degree of compromise can prevent problems caused by the server's renaming of files and affecting the normal use of the user.
  • FIG. 1 is a system structural diagram of a file management method according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of an implementation of a file management method according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a specific implementation of a file management method S205 according to an embodiment of the present invention.
  • FIG. 4 is a specific implementation flowchart of a file management method S301 according to an embodiment of the present invention.
  • FIG. 5 is a diagram showing an example of a file search result list according to an embodiment of the present invention.
  • FIG. 6 is a flowchart of a specific implementation of a file management method S205 according to another embodiment of the present invention.
  • FIG. 7 is a flowchart of an implementation of a file management method according to another embodiment of the present invention.
  • FIG. 8 is a structural block diagram of a file management system according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of an electronic device according to an embodiment of the present invention.
  • FIG. 1 is a system architecture diagram of a file management method according to an embodiment of the present invention. Note that only the parts related to the present embodiment are shown.
  • the system is composed of a server 11, a database 12, and a plurality of clients 13.
  • the server 1 1 is used to store each file, and manages the file name and storage directory of the file. Specifically, the server 11 renames the file with the unique file identification number corresponding to the original file name according to the original file name of the file stored therein, and ensures that there is no file containing the original file name in each storage directory.
  • the server 11 is further configured to store the file names of the files before and after and the storage directory to the database 12 to request the database 12 to return the query result after the file storage directory needs to be located.
  • the server 11 is further configured to provide the client 13 with a file storage, a file query, and a file download service, so that the client 13 can select and browse the files stored in the server 11 according to the response result.
  • the client 13 may be an application client or a webpage client, and run on a terminal device that provides a network access function, such as a personal computer, a tablet computer, or a mobile phone, and the terminal device is used for
  • the client 13 provides an operating environment and ensures communication between the client 13 and the server 11.
  • Each client 13 can serve as an upload client of one or more files, and can also serve as a request client, submit a file query request to the server 11, and display the user's needs according to the query result returned by the server 11.
  • a list of file names and specific file contents showing one or more files required by the user.
  • FIG. 2 shows an implementation flow of a file management method according to an embodiment of the present invention, which is described in detail as follows:
  • S201 Generate a file identifier corresponding to the original file name according to the original file name uploaded after the file uploaded by the client.
  • the file names of these files contain strings that describe the contents of the file and the corresponding items of the file, including English, Chinese, symbols, or numbers.
  • the file is named the original file name. Files on the local terminal device are identified by their original file name.
  • the client in the terminal device provides various functional controls for the user, including various selection buttons and confirmation buttons.
  • the file upload button in the client is clicked, so that the local file is popped up.
  • search for the local storage directory of the file to be uploaded After the file is published, select the file and click the Confirm button or the Upload button to have the client upload the file to the server.
  • the user inputs a specific file content in the pop-up template file after selecting a project template required by the client in the multiple project templates provided by the client.
  • the user types the custom file name in the file name input box and clicks the save button in the terminal interface to enable the client to upload the file to the server. Also, in the local terminal device, the file is not stored.
  • the server receives the file uploaded by the client, and the file name of the file is a user-defined file name, that is, the above-mentioned string describing the file content or the corresponding item of the file.
  • the file name of each file is the above original file name.
  • the server reads the original file name of each file uploaded by the client, and processes the original file names of the respective files by using the primary key generation algorithm provided by jav aJDK to respectively generate global unique
  • the file identifier that is, each file identifier generated varies, and is unique in the server.
  • the file identifier is composed of a 16-digit number form.
  • the server when receiving N files uploaded by the client, the server will read N original file names.
  • the server For each of the original file names, the server will output a corresponding file identifier via the primary key generation algorithm described above. Therefore, for N files, N file identifiers will be output.
  • S202 Rename the file to the file identifier, and store the file in a preset storage directory.
  • the server After generating a file identifier corresponding to each original file name, the server changes the file name of each file, and changes the original file name to the file identifier corresponding to each original file name.
  • the server performs identification processing on each original file name of the file to determine an item type corresponding to each original file name.
  • the server enters a storage directory matching the project type according to the item type corresponding to each original file name, and stores the file in the storage directory.
  • S203 Store the mapping relationship between the file identifier of the file, the original file name, and the storage directory to a database.
  • the server transmits the mapping relationship between the file identifier of each file, the original file name, and the storage directory to the remote database.
  • the database stores the file identifier, the original file name, and the storage directory described in each record in a pre-established file information data table.
  • the file information data table includes a file identifier field, an original file name field, and a storage directory field.
  • the server will identify the template type corresponding to the file, and the template type corresponding to each file.
  • the file identifier, the original file name, and the storage directory corresponding to the file are stored in the database.
  • the file information data table of the database further includes a template type field for storing the template type corresponding to the file identifier, the original file name, and the storage directory.
  • the server After the storage relationship sent by the server is stored in the database, after receiving the storage completion prompt returned by the database, the server deletes the mapping relationship stored locally. Therefore, the server cannot know the original file name of the file from the local file name after reading the file identifier of the file it stores.
  • S204 When receiving a keyword-based file query instruction issued by the client, searching for, in the database, an original file name associated with the keyword, and searching for the mapping with the original file name.
  • the database finds each original file name containing the keyword under the original file name field of the file information data table.
  • the database is under the template type field of the file information data table. After finding each template type that contains the keyword, the original file name corresponding to each template type including the keyword is determined according to the correspondence between the template type and the original file name.
  • the database According to the records corresponding to the found original file names, the database returns each record to the server, so that the server determines the file identifier, the storage directory, and the template type respectively corresponding to the original file names.
  • S205 Searching for a file named with the file identifier in the storage directory based on the file identifier and the storage directory in the search result, and returning the found file and the corresponding original file name as a query result. To the client.
  • each file is displayed and displayed in the original file name. Therefore, for the user, the file can still be found in the client according to the original file name and the keyword, and in the file.
  • Each file named after the original file name is seen in the search results list.
  • the file is guaranteed.
  • the criminals want to steal files from the background, and can't intuitively understand the correspondence between each file and the project from the file name. It is difficult to quickly confirm which files have high availability value from a large number of files. Therefore, the possibility of the file being quickly stolen is reduced, and the confidentiality of the document information is improved to some extent.
  • the original file name associated with the file query instruction is obtained in the database, thereby ensuring that the server can return the file required by the client and its corresponding original file name. This makes the system reduce the degree of file leakage, and can avoid the problem that the normal use of the user is affected by the server's renaming of the file.
  • the system can quickly determine the keyword associated with the keyword from the database.
  • Each file name, and can determine the storage directory corresponding to each file name therefore, the system can directly read the files in the storage directory and return to the client, without having to search each file directory one by one, and do not need to compare and match each file directory.
  • the file search result can be returned only after each file name.
  • the embodiment of the present invention improves the retrieval efficiency of files.
  • the foregoing S205 specifically includes:
  • S301 group the found files according to a preset grouping rule to obtain one or more file groups.
  • the grouping rule may be, for example, each file corresponding to each original file name having the same first pinyin letter or the first English letter as a file group; and each file in which the storage directory belongs to the same secondary storage directory is used as A file group, etc.
  • the server Preferably, for each file group obtained after the initial grouping is completed, the server repeatedly performs group processing to divide the file group having the same feature into a second layer file group until the divided file groups. Don't have the same characteristics with each other, stop performing group processing, and output each root group that contains one or more levels.
  • file A and file B belong to file group 1
  • file C and file D belong to file group 2
  • file E belongs to file group 3
  • file F belongs to file group 4
  • file is different 1 and the file group and the other IJ2 are code file groups
  • the four file groups obtained are grouped again, and it is determined that the file group 1 and the file group 2 belong to the first file group, and the file group is determined.
  • 3 and file group 4 still belong to file group 3 and file group 4.
  • the first file large group, the file group 3, and the file large group 4 are the above-mentioned root groups.
  • the foregoing S301 specifically includes:
  • S401 Obtain a template type corresponding to each file, and the template type corresponding to each file corresponds to a project template used by the client to upload the file.
  • the template type corresponding to each file is determined according to a record corresponding to each of the M files.
  • the client uploads a file and does not use the project template, the corresponding record of the file returned in the database In the recording, the template type is null.
  • S402 Grouping the found files to obtain a plurality of file groups, wherein each of the file groups includes each file carrying the same template type.
  • the server divides each file having the same template type into the same file group. For example, if the file found by the server includes file A, file B, file C, and file D, the template types corresponding to each file are "monthly assessment”, “monthly assessment”, “new product reinsurance scheme”, and null value. , the server divides file A and file B into one file group, file C is the second file group, and file D is the third file group.
  • S302 Generate a virtual folder corresponding to each of the file groups respectively.
  • the server generates a virtual folder for each file group, and the virtual folder includes a uniquely identified folder name.
  • each layer file group also generates a corresponding one of the virtual sub-folders.
  • the folder name of the virtual folder corresponding to each file group is named the template type.
  • the server binds each file in each file group to each layer of virtual folder corresponding to the file group.
  • S303 return the virtual folder, the found file, and the corresponding original file name to the client as a query result, so that the client respectively displays each of the virtual folders, and Each of the virtual folders under the file group separately displays each file named with the original file name.
  • the server determines the original file name of the file from the record returned by the database, and corresponding the file, the original file name of the file, and the file The layers of virtual folders are returned to the client.
  • the client generates each virtual folder in the file search result list. If the virtual folder returned by the server contains a virtual subfolder, the client sequentially displays the corresponding virtual subfolder in the virtual folder in the hierarchical relationship of the virtual subfolder.
  • FIG. 5 shows a file search result column displayed by the client. Table.
  • each layer of virtual folder is represented by a folder icon, and the name of the virtual folder is the name generated by the server to generate the virtual folder.
  • each of the found files is grouped, and a virtual folder corresponding to each group is generated, so that the client can display each file of the user query in the virtual folder returned by the server.
  • the user can view the file represented by the original file name, but since the folder he sees is virtual, the user cannot know the actual storage directory of the file in the server. , improve the security and confidentiality of documents.
  • the file named by the identification number also increases the confidentiality of the files stored by the server to a certain extent.
  • the above S205 includes S601 to S603, as follows:
  • S601 Obtain a flag bit corresponding to each original file name in the query result.
  • the file information data table includes a flag bit field in addition to the original file name field, the file identifier field, the storage directory field, and the template type field.
  • the attribute value corresponding to the flag bit field may be the first flag or the second flag. By default, the attribute value corresponding to the flag bit field is the second flag.
  • the client sends a file deletion request including the original file name to the server.
  • the server issues a storage directory query request to the database, the storage directory query request containing the original file name and the file deletion tag.
  • the server obtains the storage directory corresponding to the original file name, so that after the file is found in the storage directory, the file removal is performed.
  • the flag corresponding to the original file name is set to the first flag in the data table.
  • each field attribute value includes a flag bit field attribute value corresponding to the original file name.
  • S602 If the flag bit is the first flag, return the original file name and the first flag to the client, so that the client displays the name named after the original file. a virtual file icon, and causing the client to mark the virtual file icon with a color corresponding to the first flag.
  • the server When the server recognizes that the flag bit corresponding to the original file name received by the server is the first flag, it determines that the file corresponding to the original file name has been deleted, and returns the original file name and its flag bit directly to the client. end.
  • the client receives the file query result information including the first flag and the original file name, generates a virtual file icon named in the original file name in the file query result list, and the color of the virtual file icon The color corresponding to the first mark.
  • S603 If the flag bit is the second flag, searching for a file named with the file identifier in the storage directory based on the file identifier and the storage directory in the search result, and searching for the file and The corresponding original file name is returned to the client as a result of the query.
  • the server When the server recognizes that the flag bit corresponding to the original file name received by the server is the second flag, it is determined that the file corresponding to the original file name is stored under its corresponding storage directory, thereby being in the above embodiment.
  • the search principle finds the file corresponding to the original file name, and returns the file and its corresponding original file name to the client, so that the client displays the file named with the original file name.
  • the server identifies the flag bit corresponding to the original file name returned by the database, and when the flag bit is the first flag, the server can be prevented from finding the file that does not exist under the storage directory, and the file is improved.
  • Server processing efficiency By sending the original file name corresponding to the first flag to the client, the client can mark the virtual file icon with the color matching the first flag, reminding the user that the file can not be viewed and downloaded, and the system administrator can be reminded It is confirmed that the file is abnormally deleted and whether the file needs to be re-uploaded. Therefore, the file management method provided by the embodiment of the present invention improves the reliability of document storage.
  • the file management method shown further includes:
  • S206 When the file synchronization instruction is received, the file in the server is synchronized to the backup server.
  • the server when receiving the file synchronization information sent by the external device, the server receives the file synchronization instruction.
  • the external device and the server are connected through a network, and the server and the backup server are connected through a network.
  • the file synchronization instruction received by the server can also be issued by the client.
  • the server After receiving the file synchronization instruction, the server sequentially transfers the stored files to the backup server to store the same individual files in the backup server, and the storage directories of the respective files in the backup server are in the respective files.
  • the storage directory in the server is the same, and the file name of each file in the backup server is also the file identifier.
  • S207 Obtain a resource list sent by the backup server, where the resource list includes a file identifier of the synchronized file.
  • the server When the server detects that the last file stored by it has been transmitted, it issues a resource list read request to the backup server to receive a list of resources from the backup server.
  • the resource list includes file identifiers of all files stored in the backup server.
  • the server After receiving the resource list, the server issues a file identifier acquisition request to the database to request to acquire each file identifier in the data table corresponding to the server. Thereafter, the server reads the first file identifier according to the file identifier received by the server according to the order of the file identifiers, and compares the file identifier with all the file identifiers in the resource list respectively. Determine if the same file identifier exists in the resource list.
  • a file identifier read by the server in a comparison operation if the server traverses each file identifier in the resource list, and the file identifier still does not exist in the resource list, it is determined to be in the backup server. There is no file corresponding to the file identifier, that is, the file synchronization fails. Thereafter, after the server caches the file identifier, the next file identifier is read from the data returned by the database to perform comparison of the file identifier with all file identifiers in the resource list. The loop iterates until the server obtains the individual file identifiers from the data table.
  • S209 Obtain a storage directory corresponding to each file identifier of the cache from the database, and search for files named with each file identifier in each obtained storage directory, and then search again. Each of the obtained files is synchronized to the backup database.
  • each server identifier obtained by the server from the data table is compared with each file identifier in the resource list, the server issues a storage directory acquisition request to the database, where the request carries all the files cached by the server. An identifier, so that the database queries and returns the respective storage directories corresponding to the file identifiers.
  • the server After the server finds the corresponding files from the storage directories corresponding to the respective file identifiers of the cache, the server synchronizes the files to the backup server again. And returning to execution S207, until the backup server's resource list contains each file identifier in the data table corresponding to the database, the synchronization is stopped.
  • each file identifier stored in the database exists in the resource list of the backup server, it may be determined which files are backed up and the migration fails during the file backup or migration process. , which reduces the difficulty for administrators to troubleshoot lost files.
  • By resynchronizing the files corresponding to the file identifiers that do not exist in the resource list it is ensured that each file can be synchronized correctly.
  • FIG. 8 is a structural block diagram of a file management system according to an embodiment of the present invention. For convenience of description, only parts related to the embodiment of the present invention are shown. .
  • the file management system 81 includes:
  • the generating module 811 is configured to generate, according to the original file name uploaded by the file uploaded by the client, a file identifier corresponding to the original file name.
  • a rename module 812 is configured to rename the file to the file identifier, and store the file in a preset storage directory.
  • the storage module 813 is configured to store the file identifier of the file, the original file name, and a mapping relationship between the storage directory to a database.
  • the query module 814 is configured to: when receiving a keyword-based file query instruction issued by the client, searching for, in the database, an original file name associated with the keyword, and searching for the original file Famous The file identifier and storage directory of the mapping relationship are prepared.
  • the returning module 815 is configured to search for a file named with the file identifier based on the file identifier and the storage directory in the search result, and use the found file and the corresponding original file name as The result of the query is returned to the client.
  • the returning module 815 includes:
  • a grouping submodule configured to group the found files according to a preset grouping rule to obtain one or more file groups.
  • the generating submodule is configured to generate a virtual folder corresponding to each of the file groups respectively.
  • the grouping sub-module is specifically configured to:
  • Each of the found files is grouped to obtain a plurality of file groups, wherein each of the file groups includes each file carrying the same template type.
  • the storage module 813 is specifically configured to:
  • the query module 814 is specifically configured to:
  • the file management system 81 further includes:
  • a synchronization module configured to synchronize the file in the server to the backup server when receiving a file synchronization instruction.
  • an obtaining module configured to acquire a resource list sent by the backup server, where the resource list includes the same The file identifier of the step file.
  • a cache module configured to cache the file identifier if a file identifier of any of the files in the database does not exist in the resource list.
  • a secondary synchronization module configured to obtain, from the database, a storage directory corresponding to each of the cached file identifiers, and respectively search for files named by each file identifier in each of the obtained storage directories. Re-synchronize each found file to the backup database.
  • the electronic device 9 of this embodiment includes: a processor 90, a memory 91, and a computer program 92, such as a file management program, stored in the memory 91 and operable on the processor 90.
  • the processor 90 executes the computer program 92 to implement the steps in the various file management method embodiments described above, such as steps 201 through 205 shown in FIG.
  • the processor 90 executes the computer program 92 to implement the functions of the modules/units in the various apparatus embodiments described above, such as the functions of the modules 811 to 815 shown in FIG.
  • the computer program 92 can be divided into one or more modules/units, which are stored in the memory 91 and executed by the processor 90.
  • the one or more modules/units may be a series of computer program instruction segments capable of performing a particular function, the instruction segments being used to describe the execution of the computer program 92 in the electronic device 9.
  • the electronic device 9 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the electronic device 9 may include, but is not limited to, a processor 90, a memory 91. It will be understood by those skilled in the art that FIG. 9 is merely an example of the electronic device 9, and does not constitute a limitation on the electronic device 9, and may include more or less components than those illustrated, or combine some components, or different components.
  • the electronic device 9 may further include an input/output device, a network access device, a bus, and the like.
  • the processor 90 may be a central processing unit (CPU), or may be another general-purpose processor, a digital signal processor (DSP), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-to-use programmable gate array
  • CPU central processing unit
  • DSP digital signal processor
  • ASIC Application Specific Integrated Circuit
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 91 may be an internal storage unit of the electronic device 9, such as a hard disk or a memory of the electronic device 9.
  • the memory 91 may also be an external storage device of the electronic device 9, such as a plug-in hard disk equipped on the electronic device 9, a smart memory card (SMC), and a secure digital (SD). Card, flash card, etc. Further, the memory 91 may also include both an internal storage unit of the electronic device 9 and an external storage device.
  • the memory 91 is used to store the computer program and other programs and data required by the electronic device 9.
  • the memory 91 can also be used to temporarily store data that has been output or is about to be output.
  • each functional module and module described above is exemplified. In practical applications, the above functions may be assigned differently according to needs.
  • the functional modules and modules are completed, that is, the internal structure of the device is divided into different functional modules or modules to complete all or part of the functions described above.
  • Each functional module and module in the embodiment may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module, and the integrated module may be implemented by hardware.
  • Formal implementation can also be implemented in the form of software functional modules.
  • modules and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
  • the disclosed apparatus and method may be implemented in other manners.
  • the system embodiment described above is merely illustrative.
  • the division of the module or module is only a logical function division, and the actual implementation may have another division manner, for example, multiple modules or components may be Combined or can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, which may be electrical Sexual, mechanical or other form.
  • the modules described as separate components may or may not be physically distributed.
  • the components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple On the network module. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated module if implemented in the form of a software functional module and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the medium includes a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods of the various embodiments of the embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (R 0M, Read-Only Memory), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. medium.

Abstract

一种文件管理方法、系统、电子装置及介质,该方法包括:根据客户端上传的文件的原始文件名,生成对应的文件标识符(S201);将文件重命名为文件标识符,并将文件存储于预设的存储目录(S202);将文件的文件标识符、原始文件名以及存储目录之间的映射关系存储至数据库(S203);当接收到客户端发出的基于关键字的文件查询指令时,在数据库中查找与关键字关联的原始文件名,并查找与原始文件名具备映射关系的文件标识符及存储目录(S204);基于查找结果中的文件标识符与存储目录,在存储目录下查找以该文件标识符命名的文件,并将查找到的文件及其原始文件名作为查询结果返回至客户端(S205)。该方法提高了文件的保密性,降低了文件的泄密风险。

Description

文件管理方法、 系统、 电子装置及介质 技术领域
[0001] 本发明属于数据管理技术领域, 尤其涉及一种文件管理方法、 系统、 电子装置 及介质。
背景技术
[0002] 在日常工作中, 人们需要处理各种各样的文档文件。 随着信息科技的发展, 企 业内部的文件一般都以电子文档的形式存在。 对于各大企业而言, 这些电子文 档可能是商务合同、 会议记录、 产品手册、 客户资料、 设计文档、 推广文案、 竞争对手资料、 项目文档、 经验心得等。 由于电子文档数量之庞大, 各大企业 均引入了相应的文件管理系统, 以使企业员工能够利用文件管理系统, 方便、 高效地对这些电子文档进行管理和存储。
[0003] 然而, 对于保密性要求较高的企业, 如金融企业, 其内部的大部分文件都是涉 密的, 具有极高的文件安全性要求。 若不法分子想要从文件管理系统的后台窃 取文件吋, 则可以直接根据各文件的文件名, 从大量文件中快速确认出哪些文 件具有较高的可利用价值, 从而迅速窃取。 因此, 现有的文件信息保密程度较 低, 文件的泄密风险较大。
技术问题
[0004] 有鉴于此, 本发明实施例提供了一种文件管理方法、 系统、 电子装置及介质, 以解决现有文件管理系统中, 文件信息保密程度较低, 文件的泄密风险较大的 问题。
问题的解决方案
技术解决方案
[0005] 本发明实施例的第一方面提供了一种文件管理方法, 包括:
[0006] 根据客户端上传的文件在上传吋的原始文件名, 生成所述原始文件名对应的文 件标识符;
[0007] 将所述文件重命名为所述文件标识符, 并将所述文件存储于预设的存储目录; [0008] 将所述文件的所述文件标识符、 所述原始文件名以及所述存储目录之间的映射 关系存储至数据库;
[0009] 当接收到客户端发出的基于关键字的文件査询指令吋, 在所述数据库中査找与 所述关键字关联的原始文件名, 并査找与该原始文件名具备所述映射关系的文 件标识符及存储目录;
[0010] 基于査找结果中的文件标识符与存储目录, 在该存储目录下査找以该文件标识 符命名的文件, 并将査找到的文件及其对应的原始文件名作为査询结果返回至 客户端。
[0011] 本发明实施例的第二方面提供了一种文件管理系统, 包括:
[0012] 生成模块, 用于根据客户端上传的文件在上传吋的原始文件名, 生成所述原始 文件名对应的文件标识符;
[0013] 重命名模块, 用于将所述文件重命名为所述文件标识符, 并将所述文件存储于 预设的存储目录;
[0014] 存储模块, 用于将所述文件的所述文件标识符、 所述原始文件名以及所述存储 目录之间的映射关系存储至数据库;
[0015] 査询模块, 用于当接收到客户端发出的基于关键字的文件査询指令吋, 在所述 数据库中査找与所述关键字关联的原始文件名, 并査找与该原始文件名具备所 述映射关系的文件标识符及存储目录;
[0016] 返回模块, 用于基于査找结果中的文件标识符与存储目录, 在该存储目录下査 找以该文件标识符命名的文件, 并将査找到的文件及其对应的原始文件名作为 査询结果返回至客户端。
[0017] 本发明实施例的第三方面提供了一种电子装置, 包括存储器、 处理器以及存储 在所述存储器中并可在所述处理器上运行的计算机程序, 所述处理器执行所述 计算机程序吋实现如下步骤:
[0018] 根据客户端上传的文件在上传吋的原始文件名, 生成所述原始文件名对应的文 件标识符;
[0019] 将所述文件重命名为所述文件标识符, 并将所述文件存储于预设的存储目录; [0020] 将所述文件的所述文件标识符、 所述原始文件名以及所述存储目录之间的映射 关系存储至数据库;
[0021] 当接收到客户端发出的基于关键字的文件査询指令吋, 在所述数据库中査找与 所述关键字关联的原始文件名, 并査找与该原始文件名具备所述映射关系的文 件标识符及存储目录;
[0022] 基于査找结果中的文件标识符与存储目录, 在该存储目录下査找以该文件标识 符命名的文件, 并将査找到的文件及其对应的原始文件名作为査询结果返回至 客户端。
[0023] 本发明实施例的第四方面提供了一种计算机可读存储介质, 所述计算机可读存 储介质存储有计算机程序, 所述计算机程序被处理器执行吋实现如下步骤:
[0024] 根据客户端上传的文件在上传吋的原始文件名, 生成所述原始文件名对应的文 件标识符;
[0025] 将所述文件重命名为所述文件标识符, 并将所述文件存储于预设的存储目录; [0026] 将所述文件的所述文件标识符、 所述原始文件名以及所述存储目录之间的映射 关系存储至数据库;
[0027] 当接收到客户端发出的基于关键字的文件査询指令吋, 在所述数据库中査找与 所述关键字关联的原始文件名, 并査找与该原始文件名具备所述映射关系的文 件标识符及存储目录;
[0028] 基于査找结果中的文件标识符与存储目录, 在该存储目录下査找以该文件标识 符命名的文件, 并将査找到的文件及其对应的原始文件名作为査询结果返回至 客户端。
发明的有益效果
有益效果
[0029] 本发明提出的文件管理方法、 系统、 电子装置及介质, 通过将文件重命名为与 原始文件名对应的文件标识符, 并将文件的文件标识符、 原始文件名以及存储 目录之间的映射关系存储至数据库, 保证了不法分子想要从后台窃取文件吋, 也无法直观地从文件名中了解到各文件与幵发项目之间的对应关系, 难以从大 量文件中快速确认出哪些文件具有较高的可利用价值, 因此, 降低了文件被迅 速窃取的可能性, 在一定程度上提高了文件信息的保密性。 而在接收到客户端 发出的文件査询指令吋, 通过在数据库中获取与文件査询指令相关的原始文件 名, 保证了服务器能够将客户端所需的文件及其对应的原始文件名返回, 使得 本系统在降低文件泄密程度的同吋, 能够避免因服务器对文件的重命名而影响 用户正常使用的问题出现。
对附图的简要说明
附图说明
[0030] 为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例或现有技术描 述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是 本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性 的前提下, 还可以根据这些附图获得其他的附图。
[0031] 图 1是本发明实施例提供的文件管理方法的系统结构图;
[0032] 图 2是本发明实施例提供的文件管理方法的实现流程图;
[0033] 图 3是本发明实施例提供的文件管理方法 S205的具体实现流程图;
[0034] 图 4是本发明实施例提供的文件管理方法 S301的具体实现流程图;
[0035] 图 5是本发明实施例提供的文件査找结果列表的示例图;
[0036] 图 6是本发明另一实施例提供的文件管理方法 S205的具体实现流程图;
[0037] 图 7是本发明又一实施例提供的文件管理方法的实现流程图;
[0038] 图 8是本发明实施例提供的文件管理系统的结构框图;
[0039] 图 9是本发明实施例提供的电子装置的示意图。
本发明的实施方式
[0040] 以下描述中, 为了说明而不是为了限定, 提出了诸如特定系统结构、 技术之类 的具体细节, 以便透彻理解本发明实施例。 然而, 本领域的技术人员应当清楚 , 在没有这些具体细节的其它实施例中也可以实现本发明。 在其它情况中, 省 略对众所周知的系统、 装置、 电路以及方法的详细说明, 以免不必要的细节妨 碍本发明的描述。
[0041] 为了说明本发明所述的技术方案, 下面通过具体实施例来进行说明。
[0042] 图 1示出了本发明实施例提供的文件管理方法所适用的系统架构图, 为了便于 说明, 仅示出了与本实施例相关的部分。
[0043] 参照图 1, 该系统由服务器 11、 数据库 12和多个客户端 13组成。 其中, 服务器 1 1用于存储各个文件, 并对文件的文件名以及存储目录进行管理。 具体地, 服务 器 11根据其所存储的文件的原始文件名, 将以对应原始文件名的唯一文件标识 号来重命名该文件, 保证各个存储目录下不存在有包含原始文件名的文件。 服 务器 11还用于将其存储的各个文件的前后文件名以及存储目录存储至数据库 12 , 以在需要对文件进行存储目录的定位吋, 请求数据库 12返回査询结果。 同吋 , 服务器 11还用于为客户端 13提供文件存储、 文件査询以及文件下载服务, 以 使得客户端 13能够根据响应结果选择并浏览存储于服务器 11中的文件。
[0044] 在该系统中, 客户端 13可以为应用程序客户端或者网页客户端, 且运行在包括 个人计算机、 平板电脑或者手机等提供网络接入功能的终端设备上, 上述终端 设备用于为客户端 13提供运行环境, 并保证客户端 13与服务器 11之间的通信。 每个客户端 13都可以作为一个或者多个文件的上传客户端, 同吋也可以作为请 求客户端, 向服务器 11提交文件査询请求, 并根据服务器 11返回的査询结果, 展示用户所需的文件名列表以及展示用户所需的一个或者多个文件的具体文件 内容。
[0045] 图 2示出了本发明实施例提供的文件管理方法的实现流程, 详述如下:
[0046] S201 : 根据客户端上传的文件在上传吋的原始文件名, 生成所述原始文件名对 应的文件标识符。
[0047] 在文件首次保存吋, 用户会为文件命名。 根据文件的命名规范, 这些文件的文 件名包含了对文件内容以及文件对应项目进行描述的字符串, 包括英文、 中文 、 符号或者数字。 在配置文件名吋, 该文件名为原始文件名。 本地终端设备上 的文件以其原始文件名来进行标识。
[0048] 终端设备中的客户端为用户提供了各类功能控件, 包括各类选取按键以及确认 按键。
[0049] 作为本发明的一个实施示例, 在用户需要对其本地文件进行集中存储或者需要 通过服务器将本地文件分享至其他用户吋, 将点击客户端中的文件上传按键, 从而在弹出的本地文件选取窗口中, 根据需要上传的文件的本地存储目录査找 出该文件后, 选中该文件并点击确认按键或上传按键, 以使客户端将该文件上 传至服务器。
[0050] 作为本发明的另一个实施示例, 用户在客户端所提供的多个项目模板中, 选取 自身所需的一个项目模板后, 在弹出的模板文件中输入具体的文件内容。 在文 件内容输入完毕吋, 用户在文件名输入框中键入自定义的文件名后, 点击终端 界面中的保存按钮, 以使客户端将该文件上传至服务器。 并且, 在本地终端设 备中, 不对该文件进行存储。
[0051] 基于上述两种实现方式, 服务器接收到客户端上传的文件, 且该文件的文件名 为用户自定义的文件名, 即上述对文件内容或者文件对应项目进行描述的字符 串。 在当前吋刻, 各文件的文件名即为上述原始文件名。
[0052] 本发明实施例中, 服务器读取客户端上传的各个文件的原始文件名, 并利用 jav aJDK所提供的主键生成算法对各个文件的原始文件名分别进行处理, 以分别生 成全局唯一的文件标识符, 即, 生成的每一个文件标识符各不相同, 在服务器 中是唯一存在的。
[0053] 本发明实施例中, 文件标识符以一个十六位的数字形式组成。
[0054] 例如, 当接收到客户端上传的 N个文件吋, 服务器将读取出 N个原始文件名。
对于其中的每一个原始文件名, 服务器将通过上述主键生成算法输出相应的一 个文件标识符。 因此, 对于 N个文件, 将输出 N个文件标识符。
[0055] S202: 将所述文件重命名为所述文件标识符, 并将所述文件存储于预设的存储 目录。
[0056] 生成各个原始文件名分别对应的一个文件标识符后, 服务器对每个文件的文件 名进行更改, 将原始文件名变更为每个原始文件名所对应的文件标识符。
[0057] 例如, 若一个文件的原始文件名为 "保险系统幵发项目", 服务器生成与 "保险 系统幵发项目 "对应的文件标识符为" 1234567891234567", 则重命名后的该文件 的文件名为" 1234567891234567"。
[0058] 服务器对文件的各原始文件名进行识别处理, 以确定出各原始文件名对应的项 目类型。 服务器根据各原始文件名对应的项目类型, 进入与项目类型匹配的存 储目录, 并将文件存储于该存储目录下。 [0059] S203: 将所述文件的所述文件标识符、 所述原始文件名以及所述存储目录之间 的映射关系存储至数据库。
[0060] 服务器将每一个文件的文件标识符、 原始文件名以及存储目录之间的映射关系 传输至远程的数据库。
[0061] 数据库在预先建立的一张文件信息数据表中存储每条记录所描述的文件标识符 、 原始文件名以及存储目录。 具体地, 该文件信息数据表中包括文件标识符字 段、 原始文件名字段以及存储目录字段。 当数据库接收到每一个文件的文件标 识符、 原始文件名以及存储目录之间的映射关系吋, 将在该文件信息数据表中 生成一条新的记录, 并将具有映射关系的文件标识符、 原始文件名以及存储目 录作为该条记录对应于文件标识符字段、 原始文件名字段以及存储目录字段的 属性值。
[0062] 优选地, 若服务器接收到的客户端上传的文件为用户通过预设的项目模板所上 传的文件, 则服务器将识别出文件所对应的模板类型, 并将每一个文件对应的 模板类型与该文件所对应的文件标识符、 原始文件名以及存储目录一并存储至 数据库中。 此吋, 数据库的文件信息数据表中还包括模板类型字段, 用以存储 与文件标识符、 原始文件名以及存储目录对应的模板类型。
[0063] 当服务器发送的基于某个文件的映射关系存储至数据库后, 在接收到数据库返 回的存储完成提示信息吋, 服务器将刪除本地所存储的该条映射关系。 因此, 服务器在读取到其存储的该个文件的文件标识符吋, 无法从本地获知该文件的 原始文件名。
[0064] S204: 当接收到客户端发出的基于关键字的文件査询指令吋, 在所述数据库中 査找与所述关键字关联的原始文件名, 并査找与该原始文件名具备所述映射关 系的文件标识符及存储目录。
[0065] 在用户想要通过客户端来査找服务器所存储的文件吋, 在终端界面的文件査询 框中输入关键字, 此吋, 服务器将接收到客户端发出的基于关键字的文件査询 指令, 并根据该文件査询指令, 向数据库发出携带关键字的文件名査询请求。
[0066] 一方面, 数据库在文件信息数据表的原始文件名字段下, 査找出包含该关键字 的各个原始文件名。 另一方面, 数据库在文件信息数据表的模板类型字段下, 査找出包含该关键字的各个模板类型后, 根据模板类型与原始文件名的对应关 系, 确定出包含该关键字的各个模板类型所对应的原始文件名。
[0067] 根据査找出的各原始文件名所对应的记录, 数据库将每一条记录返回至服务器 , 以使服务器确定出与这些原始文件名分别对应的文件标识符、 存储目录以及 模板类型。
[0068] S205: 基于査找结果中的文件标识符与存储目录, 在该存储目录下査找以该文 件标识符命名的文件, 并将査找到的文件及其对应的原始文件名作为査询结果 返回至客户端。
[0069] 基于接收到的每一条记录, 根据该记录中文件标识符、 原始文件名以及存储目 录的映射关系, 服务器在该存储目录中査找文件名为该文件标识符的一个文件 后, 将该文件及该文件的原始文件名返回至客户端。
[0070] 在终端界面所运行的客户端中, 以原始文件名展示接收到各个文件, 因此, 对 于用户而言, 依然能够在客户端中根据原始文件名以及关键字来査找文件, 并 在文件査找结果列表中看到以原始文件名命名的各个文件。
[0071] 本发明实施例中, 通过将文件重命名为与原始文件名对应的文件标识符, 并将 文件的文件标识符、 原始文件名以及存储目录之间的映射关系存储至数据库, 保证了不法分子想要从后台窃取文件吋, 也无法直观地从文件名中了解到各文 件与幵发项目之间的对应关系, 难以从大量文件中快速确认出哪些文件具有较 高的可利用价值, 因此, 降低了文件被迅速窃取的可能性, 在一定程度上提高 了文件信息的保密性。 而在接收到客户端发出的文件査询指令吋, 通过在数据 库中获取与文件査询指令相关的原始文件名, 保证了服务器能够将客户端所需 的文件及其对应的原始文件名返回, 使得本系统在降低文件泄密程度的同吋, 能够避免因服务器对文件的重命名而影响用户正常使用的问题出现。
[0072] 通过将文件的文件标识符、 原始文件名以及存储目录之间的映射关系存储至数 据库的同一数据表中, 在用户检索文件吋, 系统能够从数据库中快速确定出与 关键字关联的各个文件名, 并能够确定出各文件名对应的存储目录, 因此, 系 统可以直接读取存储目录下的文件后返回至客户端, 而无须逐一査找各文件目 录, 也无须将对比匹配各文件目录下的每个文件名后才能返回文件检索结果。 综上, 在文件存储数量过大的情况下, 本发明实施例提高了文件的检索效率。
[0073] 作为本发明的一个实施例, 如图 3所示, 上述 S205具体包括:
[0074] S301 : 依照预设的分组规则, 对査找出的各个文件进行分组, 得到一个或多个 文件组别。
[0075] 分别在数据库返回的每一条记录所指示的存储目录下, 査找以该存储目录对应 的文件标识符命名的文件。 当服务器接收到数据库返回的 M条记录吋, 表示服务 器存储有 M个与关键字关联的文件。 服务器从各个存储目录中分别査找出与关键 字关联的 M个文件后, 对 M个文件进行分组处理。
[0076] 分组的规则例如可以是, 将首个拼音字母或首个英文字母相同的各个原始文件 名所对应的各个文件作为一个文件组别; 将存储目录属于同一个二级存储目录 的各个文件作为一个文件组别等。
[0077] 优选地, 对初次分组完成后得到的各个文件组别, 服务器重复执行分组处理, 以将具有相同特征的文件组别划分为一个第二层文件组别, 直至划分出的各个 文件组别互不具备相同特征吋, 停止执行分组处理, 并输出包含一个或多个层 级的各个根组。
[0078] 例如, 当服务器确定文件 A与文件 B属于文件组别 1, 文件 C与文件 D属于文件 组别 2、 文件 E属于文件组别 3以及文件 F属于文件组别 4吋, 若文件别 1和文件组 另 IJ2均为代码文件组别, 则对得到的四个文件组别再次进行分组处理, 确定出文 件组别 1和文件组别 2属于第一文件大组, 确定出文件组别 3和文件组别 4依然属 于文件组别 3和文件组别 4。 本示例中, 第一文件大组、 文件组别 3以及文件大组 4为上述根组。
[0079] 作为本发明的一个实施例, 如图 4所示, 上述 S301具体包括:
[0080] S401 : 获取每个文件所分别对应的模板类型, 所述每个文件所对应的模板类型 与所述客户端上传该文件吋所使用的一个项目模板对应。
[0081] 由于数据库返回的每一条记录均中携带有模板类型, 因此, 服务器査找出上述
M个文件后, 根据 M个文件分别对应的一条记录, 确定出每个文件对应的模板类 型。
[0082] 若客户端上传文件吋没有使用项目模板, 则在数据库返回的该文件所对应的记 录中, 模板类型为空值。
[0083] S402: 对査找出的各个文件进行分组, 得到多个文件组别, 其中, 每个所述文 件组别包含携带有相同所述模板类型的各个文件。
[0084] 服务器将模板类型相同的各个文件划分至同一文件组别中。 例如, 若服务器査 找出的文件包括文件 A、 文件 B、 文件 C以及文件 D, 各文件对应的模板类型分别 为"月度考核"、 "月度考核"、 "新产品再保方案"以及空值, 则服务器将文件 A以 及文件 B划分为一个文件组别, 文件 C为第二个文件组别, 文件 D为第三个文件 组别。
[0085] 本发明实施例未提到的步骤实现原理与本发明其他实施例中的步骤实现原理相 同, 因此不一一赘述。
[0086] S302: 生成每个所述文件组别分别对应的虚拟文件夹。
[0087] 本发明实施例中, 服务器为每一个文件组别生成一个虚拟文件夹, 该虚拟文件 夹包括唯一识别的文件夹名。 其中, 若文件组别包括上述多次分组操作后的多 层文件组别, 每一层文件组别同样生成对应的一个虚拟子文件夹。
[0088] 当文件组别的分组规则为依照模板类型分组吋, 每一个文件组别所对应的虚拟 文件夹的文件夹名为该模板类型。
[0089] 服务器将每一个文件组别中的各个文件与该文件组别所对应的各层虚拟文件夹 进行绑定。
[0090] S303: 将所述虚拟文件夹、 査找到的文件及其对应的原始文件名作为査询结果 返回至客户端, 以使所述客户端分别展示每一所述虚拟文件夹, 并在每一所述 虚拟文件夹下分文件组别地分别展示以原始文件名命名的各个文件。
[0091] 对于服务器所査找出的上述 M个文件中的每一个文件, 服务器从数据库返回的 记录中确定该文件的原始文件名, 并将该文件、 该文件的原始文件名以及该文 件对应的各层虚拟文件夹返回至客户端。
[0092] 客户端在文件査找结果列表中, 生成各个虚拟文件夹。 若服务器返回的虚拟文 件夹中包含虚拟子文件夹, 则客户端依次该虚拟子文件夹的层级关系, 在虚拟 文件夹中展示相应的虚拟子文件夹。
[0093] 作为本发明的一个实施示例, 图 5示出了客户端所展示的一个文件査找结果列 表。 在该图中, 每层虚拟文件夹以一个文件夹图标表示, 且虚拟文件夹的名称 为服务器生成该虚拟文件夹吋所同吋产生的名称。
[0094] 本发明实施例中, 对査找出的各个文件进行分组, 并生成每个分组对应的虚拟 文件夹, 使得客户端能够在服务器返回的虚拟文件夹中展示用户査询的各个文 件。 在客户端所展示的虚拟文件夹中, 用户可以査看以原始文件名表示的文件 , 但由于其看到的文件夹是虚拟生存的, 因此用户自身也无法知道文件在服务 器中的实际存储目录, 提高了文件的安全性以及保密性。 而对于从服务器后台 窃取文件的不法分子, 由于其不知道文件标识号与原始文件名的对应关系, 且 也无法在客户端的虚拟文件夹中査看各个原始文件名, 故只能窃取到以文件标 识号命名的文件, 因此在一定程度也提高了服务器所存储的文件的保密性。
[0095] 作为本发明的另一个实施例, 如图 6所示, 上述 S205包括 S601至 S603, 具体如 下:
[0096] S601 : 获取所述査询结果中, 每一原始文件名对应的标志位。
[0097] 本发明实施例中, 文件信息数据表除了原始文件名字段、 文件标识符字段、 存 储目录字段以及模板类型字段外, 还包括标志位字段。 该标志位字段对应的属 性值可以是第一标志或第二标志。 默认状态下, 标志位字段对应的属性值为第 二标志。
[0098] 若用户在某一次文件处理过程中, 通过客户端选取了某一文件并执行刪除操作 , 则客户端将包含原始文件名的文件刪除请求发送至服务器。 服务器向数据库 发出存储目录査询请求, 该存储目录査询请求包含有该原始文件名以及文件刪 除标记。 根据数据库返回的査询结果, 服务器获取该原始文件名对应的存储目 录, 从而在该存储目录査找出该文件后, 执行文件移除。
[0099] 在上述过程中, 在数据库接收到包含有该原始文件名以及文件刪除标记的存储 目录査询请求吋, 在数据表中将该原始文件名所对应的标志位设置为第一标志
[0100] 当服务器接收到客户端发出的基于关键字的文件査询指令吋, 数据库査询出与 该关键字关联的各个原始文件名, 并将各原始文件名及其对应的各字段属性值 返回至服务器。 其中, 各字段属性值包括原始文件名对应的标志位字段属性值 [0101] S602: 若所述标志位为第一标志, 则将所述原始文件名以及所述第一标志返回 至所述客户端, 以使所述客户端展示以所述原始文件名命名的虚拟文件图标, 并使所述客户端以对应所述第一标志的色彩标记所述虚拟文件图标。
[0102] 当服务器识别出其接收到的原始文件名所对应的标志位为第一标志吋, 将确定 该原始文件名所对应的文件已刪除, 并将该原始文件名及其标志位直接返回至 客户端。
[0103] 客户端接收到包含第一标志以及包含原始文件名的文件査询结果信息吋, 在文 件査询结果列表中生成以该原始文件名命名的虚拟文件图标, 且该虚拟文件图 标的色彩为第一标志对应的色彩。
[0104] S603: 若所述标志位为第二标志, 则基于査找结果中的文件标识符与存储目录 , 在该存储目录下査找以该文件标识符命名的文件, 并将査找到的文件及其对 应的原始文件名作为査询结果返回至客户端。
[0105] 当服务器识别出其接收到的原始文件名所对应的标志位为第二标志吋, 将确定 该原始文件名所对应的文件存储于其对应的存储目录之下, 从而以上述实施例 中的査找原理査找到该原始文件名对应的文件后, 并将该文件及其对应的原始 文件名返回至客户端, 以使所述客户端展示以原始文件名命名的所述文件。
[0106] 本发明实施例中, 服务器通过识别数据库返回的原始文件名所对应的标志位, 在标志位为第一标志吋, 可以避免服务器到存储目录之下査找实际已不存在的 文件, 提高了服务器的处理效率。 通过将对应第一标志的原始文件名发送至客 户端, 使得客户端能够以与第一标志匹配的色彩标记虚拟文件图标, 提醒用户 该文件已无法査看以及下载, 同吋能够提醒系统管理员确认该文件是否被异常 刪除以及是否需要重新上传该文件, 因此, 本发明实施例提供的文件管理方法 提高了文档存储的可靠性。
[0107] 作为本发明的又一实施例, 如图 7所示, 在上述 S205之后, 所示文件管理方法 还包括:
[0108] S206: 当接收到文件同步指令吋, 将所述服务器中的所述文件同步至备份服务 器。 [0109] 本发明实施例中, 当接收到外部设备所下发的文件同步信息吋, 服务器则接收 到上述文件同步指令。 其中, 该外部设备以及服务器通过网络相连, 服务器与 备份服务器通过网络相连。 除了上述文件同步指令接收方式之外, 服务器所接 收到的文件同步指令也可由客户端发出。
[0110] 在接收到文件同步指令吋, 服务器将其存储的各个文件依次传输至备份服务器 中, 以在备份服务器中存储相同的各个文件, 且各个文件在备份服务器中的存 储目录与各个文件在服务器中的存储目录相同, 备份服务器中各文件的文件名 也为文件标识符。
[0111] S207: 获取所述备份服务器发出的资源列表, 所述资源列表包括已同步文件的 文件标识符。
[0112] 当服务器检测到其存储的最后一个文件已传输完毕后, 向备份服务器发出资源 列表读取请求, 以接收来自备份服务器的资源列表。 其中, 资源列表包括备份 服务器中已存储的所有文件的文件标识符。
[0113] 服务器接收到资源列表后, 向数据库发出文件标识符获取请求, 以请求获取该 服务器所对应的数据表中的各个文件标识符。 此后, 服务器根据其接收到的文 件标识符, 依照文件标识符的排列顺序, 读取出第一个文件标识符, 并将该文 件标识符分别与资源列表中的所有文件标识符进行比较, 以确定资源列表中是 否存在相同的该文件标识符。
[0114] S208: 若所述数据库中任一所述文件的文件标识符不存在于所述资源列表, 则 缓存该文件标识符。
[0115] 对于服务器在一次对比操作中所读取的一个文件标识符, 若服务器遍历资源列 表中的各个文件标识符后, 资源列表中依然不存在该个文件标识符, 则确定为 备份服务器中不存在该文件标识符对应的文件, 即该文件同步失败。 此吋, 服 务器缓存该文件标识符后, 再从数据库所返回的数据中读取下一个文件标识符 , 以执行将该文件标识符分别与资源列表中的所有文件标识符进行比较。 循环 迭代, 直至服务器从数据表中所获取到的各个文件标识符均比较完备。
[0116] S209: 从所述数据库中获取缓存的各个文件标识符所分别对应的存储目录, 并 在获取到的各存储目录中分别査找以各文件标识符命名的文件后, 重新将査找 到的各文件同步至所述备份数据库。
[0117] 在服务器从数据表中所获取到的各个文件标识符均与资源列表中的各个文件标 识符比较完备后, 服务器向数据库发出存储目录获取请求, 该请求中携带有服 务器缓存的所有文件标识符, 以使数据库査询并返回这些文件标识符所分别对 应的各个存储目录。
[0118] 服务器从缓存的各个文件标识符所分别对应的存储目录中査找出相应的各个文 件后, 再次将这些文件同步至备份服务器。 并返回执行 S207, 直至备份服务器 的资源列表中包含服务器在数据库所对应的数据表中的每一个文件标识符吋, 停止同步。
[0119] 本发明实施例中, 通过判断数据库中所存储的各个文件标识符是否存在备份服 务器的资源列表中, 可确定出在文件备份或迁移的过程中, 哪些文件出现备份 、 迁移失败的问题, 降低了管理员对丢失文件的排査难度; 通过再次同步资源 列表中所不存在的文件标识符所对应的文件, 保证了每一个文件都能正确完成 同步。
[0120] 应理解, 上述实施例中各步骤的序号的大小并不意味着执行顺序的先后, 各过 程的执行顺序应以其功能和内在逻辑确定, 而不应对本发明实施例的实施过程 构成任何限定。
[0121] 对应于上文实施例所述的文件管理方法, 图 8示出了本发明实施例提供的文件 管理系统的结构框图, 为了便于说明, 仅示出了与本发明实施例相关的部分。
[0122] 参照图 8, 该文件管理系统 81包括:
[0123] 生成模块 811, 用于根据客户端上传的文件在上传吋的原始文件名, 生成所述 原始文件名对应的文件标识符。
[0124] 重命名模块 812, 用于将所述文件重命名为所述文件标识符, 并将所述文件存 储于预设的存储目录。
[0125] 存储模块 813, 用于将所述文件的所述文件标识符、 所述原始文件名以及所述 存储目录之间的映射关系存储至数据库。
[0126] 査询模块 814, 用于当接收到客户端发出的基于关键字的文件査询指令吋, 在 所述数据库中査找与所述关键字关联的原始文件名, 并査找与该原始文件名具 备所述映射关系的文件标识符及存储目录。
[0127] 返回模块 815, 用于基于査找结果中的文件标识符与存储目录, 在该存储目录 下査找以该文件标识符命名的文件, 并将査找到的文件及其对应的原始文件名 作为査询结果返回至客户端。
[0128] 可选地, 所述返回模块 815包括:
[0129] 分组子模块, 用于依照预设的分组规则, 对査找出的各个文件进行分组, 得到 一个或多个文件组别。
[0130] 生成子模块, 用于生成每个所述文件组别分别对应的虚拟文件夹。
[0131] 返回子模块, 用于将所述虚拟文件夹、 査找到的文件及其对应的原始文件名作 为査询结果返回至客户端, 以使所述客户端分别展示每一所述虚拟文件夹, 并 在每一所述虚拟文件夹下分文件组别地分别展示以原始文件名命名的各个文件
[0132] 可选地, 所述分组子模块具体用于:
[0133] 获取每个文件所分别对应的模板类型, 所述每个文件所对应的模板类型与所述 客户端上传该文件吋所使用的一个项目模板对应;
[0134] 对査找出的各个文件进行分组, 得到多个文件组别, 其中, 每个所述文件组别 包含携带有相同所述模板类型的各个文件。
[0135] 可选地, 所述存储模块 813具体用于:
[0136] 将所述文件的所述文件标识符、 所述原始文件名以及所述存储目录之间的映射 关系存储至数据库所预先建立的文件信息数据表中;
[0137] 所述査询模块 814具体用于:
[0138] 当接收到客户端发出的基于关键字的文件査询指令吋, 在所述文件信息数据表 中査找与所述关键字关联的原始文件名, 并査找与该原始文件名具备所述映射 关系的文件标识符及存储目录。
[0139] 可选地, 该文件管理系统 81还包括:
[0140] 同步模块, 用于当接收到文件同步指令吋, 将所述服务器中的所述文件同步至 备份服务器。
[0141] 获取模块, 用于获取所述备份服务器发出的资源列表, 所述资源列表包括已同 步文件的文件标识符。
[0142] 缓存模块, 用于若所述数据库中任一所述文件的文件标识符不存在于所述资源 列表, 则缓存该文件标识符。
[0143] 二次同步模块, 用于从所述数据库中获取缓存的各个文件标识符所分别对应的 存储目录, 并在获取到的各存储目录中分别査找以各文件标识符命名的文件后 , 重新将査找到的各文件同步至所述备份数据库。
[0144] 图 9是本发明实施例提供的电子装置的示意图。 如图 9所示, 该实施例的电子装 置 9包括: 处理器 90、 存储器 91以及存储在所述存储器 91中并可在所述处理器 90 上运行的计算机程序 92, 例如文件管理程序。 所述处理器 90执行所述计算机程 序 92吋实现上述各个文件管理方法实施例中的步骤, 例如图 2所示的步骤 201至 2 05。 或者, 所述处理器 90执行所述计算机程序 92吋实现上述各装置实施例中各 模块 /单元的功能, 例如图 8所示模块 811至 815的功能。
[0145] 示例性的, 所述计算机程序 92可以被分割成一个或多个模块 /单元, 所述一个 或者多个模块 /单元被存储在所述存储器 91中, 并由所述处理器 90执行, 以完成 本发明。 所述一个或多个模块 /单元可以是能够完成特定功能的一系列计算机程 序指令段, 该指令段用于描述所述计算机程序 92在所述电子装置 9中的执行过程
[0146] 所述电子装置 9可以是桌上型计算机、 笔记本、 掌上电脑及云端服务器等计算 设备。 所述电子装置 9可包括, 但不仅限于, 处理器 90、 存储器 91。 本领域技术 人员可以理解, 图 9仅仅是电子装置 9的示例, 并不构成对电子装置 9的限定, 可 以包括比图示更多或更少的部件, 或者组合某些部件, 或者不同的部件, 例如 所述电子装置 9还可以包括输入输出设备、 网络接入设备、 总线等。
[0147] 所称处理器 90可以是中央处理单元 (Central Processing Unit, CPU) , 还可以是其 他通用处理器、 数字信号处理器(Digital Signal Processor, DSP)、 专用集成电路 (Application Specific Integrated Circuit, ASIC)、 现成可编程门阵列
(Field-Programmable Gate Array , FPGA)或者其他可编程逻辑器件、 分立门或者 晶体管逻辑器件、 分立硬件组件等。 通用处理器可以是微处理器或者该处理器 也可以是任何常规的处理器等。 [0148] 所述存储器 91可以是所述电子装置 9的内部存储单元, 例如电子装置 9的硬盘或 内存。 所述存储器 91也可以是所述电子装置 9的外部存储设备, 例如所述电子装 置 9上配备的插接式硬盘, 智能存储卡 (Smart Media Card, SMC) , 安全数字 (Secure Digital, SD) 卡, 闪存卡 (Flash Card) 等。 进一步地, 所述存储器 91 还可以既包括所述电子装置 9的内部存储单元也包括外部存储设备。 所述存储器 91用于存储所述计算机程序以及所述电子装置 9所需的其他程序和数据。 所述存 储器 91还可以用于暂吋地存储已经输出或者将要输出的数据。
[0149] 所属领域的技术人员可以清楚地了解到, 为了描述的方便和简洁, 仅以上述各 功能模块、 模块的划分进行举例说明, 实际应用中, 可以根据需要而将上述功 能分配由不同的功能模块、 模块完成, 即将所述装置的内部结构划分成不同的 功能模块或模块, 以完成以上描述的全部或者部分功能。 实施例中的各功能模 块、 模块可以集成在一个处理模块中, 也可以是各个模块单独物理存在, 也可 以两个或两个以上模块集成在一个模块中, 上述集成的模块既可以采用硬件的 形式实现, 也可以采用软件功能模块的形式实现。 另外, 各功能模块、 模块的 具体名称也只是为了便于相互区分, 并不用于限制本申请的保护范围。 上述系 统中模块、 模块的具体工作过程, 可以参考前述方法实施例中的对应过程, 在 此不再赘述。
[0150] 本领域普通技术人员可以意识到, 结合本文中所公幵的实施例描述的各示例的 模块及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结合来实现 。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特定应用和设 计约束条件。 专业技术人员可以对每个特定的应用来使用不同方法来实现所描 述的功能, 但是这种实现不应认为超出本发明的范围。
[0151] 在本发明所提供的实施例中, 应该理解到, 所揭露的装置和方法, 可以通过其 它的方式实现。 例如, 以上所描述的系统实施例仅仅是示意性的, 例如, 所述 模块或模块的划分, 仅仅为一种逻辑功能划分, 实际实现吋可以有另外的划分 方式, 例如多个模块或组件可以结合或者可以集成到另一个系统, 或一些特征 可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间的耦合或直接耦合或 通讯连接可以是通过一些接口, 装置或模块的间接耦合或通讯连接, 可以是电 性, 机械或其它的形式。
[0152] 所述作为分离部件说明的模块可以是或者也可以不是物理上分幵的, 作为模块 显示的部件可以是或者也可以不是物理模块, 即可以位于一个地方, 或者也可 以分布到多个网络模块上。 可以根据实际的需要选择其中的部分或者全部模块 来实现本实施例方案的目的。
[0153] 另外, 在本发明各个实施例中的各功能模块可以集成在一个处理模块中, 也可 以是各个模块单独物理存在, 也可以两个或两个以上模块集成在一个模块中。 上述集成的模块既可以采用硬件的形式实现, 也可以采用软件功能模块的形式 实现。
[0154] 所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用 吋, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明实施 例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部 或部分可以以软件产品的形式体现出来, 该计算机软件产品存储在一个存储介 质中, 包括若干指令用以使得一台计算机设备 (可以是个人计算机, 服务器, 或者网络设备等) 或处理器 (processor) 执行本发明实施例各个实施例所述方法 的全部或部分步骤。 而前述的存储介质包括: U盘、 移动硬盘、 只读存储器 (R 0M, Read-Only Memory) 、 随机存取存储器 (RAM, Random Access Memory ) 、 磁碟或者光盘等各种可以存储程序代码的介质。
[0155] 以上所述实施例仅用以说明本发明的技术方案, 而非对其限制; 尽管参照前述 实施例对本发明进行了详细的说明, 本领域的普通技术人员应当理解: 其依然 可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分技术特征进 行等同替换; 而这些修改或者替换, 并不使相应技术方案的本质脱离本发明各 实施例技术方案的精神和范围, 均应包含在本发明的保护范围之内。

Claims

权利要求书
[权利要求 1] 一种文件管理方法, 其特征在于, 包括:
根据客户端上传的文件在上传吋的原始文件名, 生成所述原始文件名 对应的文件标识符;
将所述文件重命名为所述文件标识符, 并将所述文件存储于预设的存 储目录;
将所述文件的所述文件标识符、 所述原始文件名以及所述存储目录之 间的映射关系存储至数据库;
当接收到客户端发出的基于关键字的文件査询指令吋, 在所述数据库 中査找与所述关键字关联的原始文件名, 并査找与该原始文件名具备 所述映射关系的文件标识符及存储目录;
基于査找结果中的文件标识符与存储目录, 在该存储目录下査找以该 文件标识符命名的文件, 并将査找到的文件及其对应的原始文件名作 为査询结果返回至客户端。
[权利要求 2] 如权利要求 1所述的文件管理方法, 其特征在于, 所述将査找到的文 件及其对应的原始文件名作为査询结果返回至客户端, 包括: 依照预设的分组规则, 对査找出的各个文件进行分组, 得到一个或多 个文件组别;
生成每个所述文件组别分别对应的虚拟文件夹; 将所述虚拟文件夹、 査找到的文件及其对应的原始文件名作为査询结 果返回至客户端, 以使所述客户端分别展示每一所述虚拟文件夹, 并 在每一所述虚拟文件夹下分文件组别地分别展示以原始文件名命名的 各个文件。
[权利要求 3] 如权利要求 2所述的文件管理方法, 其特征在于, 所述依照预设的分 组规则, 对査找出的各个文件进行分组, 得到一个或多个文件组别, 包括:
获取每个文件所分别对应的模板类型, 所述每个文件所对应的模板类 型与所述客户端上传该文件吋所使用的一个项目模板对应; 对査找出的各个文件进行分组, 得到多个文件组别, 其中, 每个所述 文件组别包含携带有相同所述模板类型的各个文件。
[权利要求 4] 如权利要求 1所述的文件管理方法, 其特征在于, 所述将所述文件的 所述文件标识符、 所述原始文件名以及所述存储目录之间的映射关系 存储至数据库, 包括:
将所述文件的所述文件标识符、 所述原始文件名以及所述存储目录之 间的映射关系存储至数据库所预先建立的文件信息数据表中; 所述当接收到客户端发出的基于关键字的文件査询指令吋, 在所述数 据库中査找与所述关键字关联的原始文件名, 并査找与该原始文件名 具备所述映射关系的文件标识符及存储目录, 包括:
当接收到客户端发出的基于关键字的文件査询指令吋, 在所述文件信 息数据表中査找与所述关键字关联的原始文件名, 并査找与该原始文 件名具备所述映射关系的文件标识符及存储目录。
[权利要求 5] 如权利要求 1至 4任一项所述的文件管理方法, 其特征在于, 还包括: 当接收到文件同步指令吋, 将所述服务器中的所述文件同步至备份服 务器;
获取所述备份服务器发出的资源列表, 所述资源列表包括已同步文件 的文件标识符;
若所述数据库中任一所述文件的文件标识符不存在于所述资源列表, 则缓存该文件标识符;
从所述数据库中获取缓存的各个文件标识符所分别对应的存储目录, 并在获取到的各存储目录中分别査找以各文件标识符命名的文件后, 重新将査找到的各文件同步至所述备份数据库。
[权利要求 6] —种文件管理系统, 其特征在于, 包括:
生成模块, 用于根据客户端上传的文件在上传吋的原始文件名, 生成 所述原始文件名对应的文件标识符;
重命名模块, 用于将所述文件重命名为所述文件标识符, 并将所述文 件存储于预设的存储目录; 存储模块, 用于将所述文件的所述文件标识符、 所述原始文件名以及 所述存储目录之间的映射关系存储至数据库;
査询模块, 用于当接收到客户端发出的基于关键字的文件査询指令吋 , 在所述数据库中査找与所述关键字关联的原始文件名, 并査找与该 原始文件名具备所述映射关系的文件标识符及存储目录;
返回模块, 用于基于査找结果中的文件标识符与存储目录, 在该存储 目录下査找以该文件标识符命名的文件, 并将査找到的文件及其对应 的原始文件名作为査询结果返回至客户端。
[权利要求 7] 如权利要求 6所述的文件管理系统, 其特征在于, 所述返回模块包括 分组子模块, 用于依照预设的分组规则, 对査找出的各个文件进行分 组, 得到一个或多个文件组别;
生成子模块, 用于生成每个所述文件组别分别对应的虚拟文件夹; 返回子模块, 用于将所述虚拟文件夹、 査找到的文件及其对应的原始 文件名作为査询结果返回至客户端, 以使所述客户端分别展示每一所 述虚拟文件夹, 并在每一所述虚拟文件夹下分文件组别地分别展示以 原始文件名命名的各个文件。
[权利要求 8] 如权利要求 7所述的文件管理系统, 其特征在于, 所述分组子模块具 体用于:
获取每个文件所分别对应的模板类型, 所述每个文件所对应的模板类 型与所述客户端上传该文件吋所使用的一个项目模板对应; 对査找出的各个文件进行分组, 得到多个文件组别, 其中, 每个所述 文件组别包含携带有相同所述模板类型的各个文件。
[权利要求 9] 如权利要求 6所述的文件管理系统, 其特征在于, 所述存储模块具体 用于:
将所述文件的所述文件标识符、 所述原始文件名以及所述存储目录之 间的映射关系存储至数据库所预先建立的文件信息数据表中; 所述査询模块具体用于: 当接收到客户端发出的基于关键字的文件査询指令吋, 在所述文件信 息数据表中査找与所述关键字关联的原始文件名, 并査找与该原始文 件名具备所述映射关系的文件标识符及存储目录。
[权利要求 10] 如权利要求 6至 9任一项所述的文件管理系统, 其特征在于, 还包括: 同步模块, 用于当接收到文件同步指令吋, 将所述服务器中的所述文 件同步至备份服务器;
获取模块, 用于获取所述备份服务器发出的资源列表, 所述资源列表 包括已同步文件的文件标识符;
缓存模块, 用于若所述数据库中任一所述文件的文件标识符不存在于 所述资源列表, 则缓存该文件标识符;
二次同步模块, 用于从所述数据库中获取缓存的各个文件标识符所分 别对应的存储目录, 并在获取到的各存储目录中分别査找以各文件标 识符命名的文件后, 重新将査找到的各文件同步至所述备份数据库。
[权利要求 11] 一种电子装置, 包括存储器、 处理器以及存储在所述存储器中并可在 所述处理器上运行的计算机程序, 其特征在于, 所述处理器执行所述 计算机程序吋实现如下步骤:
根据客户端上传的文件在上传吋的原始文件名, 生成所述原始文件名 对应的文件标识符;
将所述文件重命名为所述文件标识符, 并将所述文件存储于预设的存 储目录;
将所述文件的所述文件标识符、 所述原始文件名以及所述存储目录之 间的映射关系存储至数据库;
当接收到客户端发出的基于关键字的文件査询指令吋, 在所述数据库 中査找与所述关键字关联的原始文件名, 并査找与该原始文件名具备 所述映射关系的文件标识符及存储目录;
基于査找结果中的文件标识符与存储目录, 在该存储目录下査找以该 文件标识符命名的文件, 并将査找到的文件及其对应的原始文件名作 为査询结果返回至客户端。
[权利要求 12] 如权利要求 11所述的电子装置, 其特征在于, 所述将査找到的文件及 其对应的原始文件名作为査询结果返回至客户端, 包括:
依照预设的分组规则, 对査找出的各个文件进行分组, 得到一个或多 个文件组别;
生成每个所述文件组别分别对应的虚拟文件夹; 将所述虚拟文件夹、 査找到的文件及其对应的原始文件名作为査询结 果返回至客户端, 以使所述客户端分别展示每一所述虚拟文件夹, 并 在每一所述虚拟文件夹下分文件组别地分别展示以原始文件名命名的 各个文件。
[权利要求 13] 如权利要求 12所述的电子装置, 其特征在于, 所述依照预设的分组规 贝 1J, 对査找出的各个文件进行分组, 得到一个或多个文件组别, 包括 获取每个文件所分别对应的模板类型, 所述每个文件所对应的模板类 型与所述客户端上传该文件吋所使用的一个项目模板对应; 对査找出的各个文件进行分组, 得到多个文件组别, 其中, 每个所述 文件组别包含携带有相同所述模板类型的各个文件。
[权利要求 14] 如权利要求 11所述的电子装置, 其特征在于, 所述将所述文件的所述 文件标识符、 所述原始文件名以及所述存储目录之间的映射关系存储 至数据库, 包括:
将所述文件的所述文件标识符、 所述原始文件名以及所述存储目录之 间的映射关系存储至数据库所预先建立的文件信息数据表中; 所述当接收到客户端发出的基于关键字的文件査询指令吋, 在所述数 据库中査找与所述关键字关联的原始文件名, 并査找与该原始文件名 具备所述映射关系的文件标识符及存储目录, 包括:
当接收到客户端发出的基于关键字的文件査询指令吋, 在所述文件信 息数据表中査找与所述关键字关联的原始文件名, 并査找与该原始文 件名具备所述映射关系的文件标识符及存储目录。
[权利要求 15] 如权利要求 11至 14任一项所述的电子装置, 其特征在于, 所述处理器 执行所述计算机程序吋, 还实现如下步骤:
当接收到文件同步指令吋, 将所述服务器中的所述文件同步至备份服 务器;
获取所述备份服务器发出的资源列表, 所述资源列表包括已同步文件 的文件标识符;
若所述数据库中任一所述文件的文件标识符不存在于所述资源列表, 则缓存该文件标识符;
从所述数据库中获取缓存的各个文件标识符所分别对应的存储目录, 并在获取到的各存储目录中分别査找以各文件标识符命名的文件后, 重新将査找到的各文件同步至所述备份数据库。
[权利要求 16] —种计算机可读存储介质, 所述计算机可读存储介质存储有计算机程 序, 其特征在于, 所述计算机程序被处理器执行吋实现如下步骤: 根据客户端上传的文件在上传吋的原始文件名, 生成所述原始文件名 对应的文件标识符;
将所述文件重命名为所述文件标识符, 并将所述文件存储于预设的存 储目录;
将所述文件的所述文件标识符、 所述原始文件名以及所述存储目录之 间的映射关系存储至数据库;
当接收到客户端发出的基于关键字的文件査询指令吋, 在所述数据库 中査找与所述关键字关联的原始文件名, 并査找与该原始文件名具备 所述映射关系的文件标识符及存储目录;
基于査找结果中的文件标识符与存储目录, 在该存储目录下査找以该 文件标识符命名的文件, 并将査找到的文件及其对应的原始文件名作 为査询结果返回至客户端。
[权利要求 17] 如权利要求 16所述的计算机可读存储介质, 其特征在于, 所述将査找 到的文件及其对应的原始文件名作为査询结果返回至客户端, 包括: 所述将査找到的文件及其对应的原始文件名作为査询结果返回至客户 端, 包括: 依照预设的分组规则, 对査找出的各个文件进行分组, 得到一个或多 个文件组别;
生成每个所述文件组别分别对应的虚拟文件夹; 将所述虚拟文件夹、 査找到的文件及其对应的原始文件名作为査询结 果返回至客户端, 以使所述客户端分别展示每一所述虚拟文件夹, 并 在每一所述虚拟文件夹下分文件组别地分别展示以原始文件名命名的 各个文件。
[权利要求 18] 如权利要求 17所述的计算机可读存储介质, 其特征在于, 所述依照预 设的分组规则, 对査找出的各个文件进行分组, 得到一个或多个文件 组别, 包括:
获取每个文件所分别对应的模板类型, 所述每个文件所对应的模板类 型与所述客户端上传该文件吋所使用的一个项目模板对应; 对査找出的各个文件进行分组, 得到多个文件组别, 其中, 每个所述 文件组别包含携带有相同所述模板类型的各个文件。
[权利要求 19] 如权利要 16所述的计算机可读存储介质, 其特征在于, 所述将所述文 件的所述文件标识符、 所述原始文件名以及所述存储目录之间的映射 关系存储至数据库, 包括:
将所述文件的所述文件标识符、 所述原始文件名以及所述存储目录之 间的映射关系存储至数据库所预先建立的文件信息数据表中; 所述当接收到客户端发出的基于关键字的文件査询指令吋, 在所述数 据库中査找与所述关键字关联的原始文件名, 并査找与该原始文件名 具备所述映射关系的文件标识符及存储目录, 包括:
当接收到客户端发出的基于关键字的文件査询指令吋, 在所述文件信 息数据表中査找与所述关键字关联的原始文件名, 并査找与该原始文 件名具备所述映射关系的文件标识符及存储目录。
[权利要求 20] 如权利要求 16至 19任一项所述的计算机可读存储介质, 其特征在于, 所述计算机程序被处理器执行吋, 还实现如下步骤:
当接收到文件同步指令吋, 将所述服务器中的所述文件同步至备份服 务器;
获取所述备份服务器发出的资源列表, 所述资源列表包括已同步文件 的文件标识符;
若所述数据库中任一所述文件的文件标识符不存在于所述资源列表, 则缓存该文件标识符;
从所述数据库中获取缓存的各个文件标识符所分别对应的存储目录, 并在获取到的各存储目录中分别査找以各文件标识符命名的文件后, 重新将査找到的各文件同步至所述备份数据库。
PCT/CN2017/088978 2017-05-05 2017-06-19 文件管理方法、系统、电子装置及介质 WO2018201583A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710312319.1 2017-05-05
CN201710312319.1A CN107291796A (zh) 2017-05-05 2017-05-05 文件管理方法及装置

Publications (1)

Publication Number Publication Date
WO2018201583A1 true WO2018201583A1 (zh) 2018-11-08

Family

ID=60094651

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/088978 WO2018201583A1 (zh) 2017-05-05 2017-06-19 文件管理方法、系统、电子装置及介质

Country Status (2)

Country Link
CN (1) CN107291796A (zh)
WO (1) WO2018201583A1 (zh)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101897987B1 (ko) * 2017-11-24 2018-09-12 주식회사 포드림 전자파일의 전자지문 관리방법, 관리장치 및 관리시스템
CN108289126A (zh) * 2018-01-28 2018-07-17 丁超 用于上传或下载文件的方法、装置及计算机存储介质
CN108647256A (zh) * 2018-04-23 2018-10-12 平安科技(深圳)有限公司 文件同步方法、装置、计算机装置及存储介质
CN108763308A (zh) * 2018-04-24 2018-11-06 北京首都机场动力能源有限公司 一种供电站资料查询管理方法以及系统
CN108614882A (zh) * 2018-04-28 2018-10-02 深圳市市政设计研究院有限公司 一种基于服务器的文件管理方法与系统
CN109033442A (zh) * 2018-08-16 2018-12-18 郑州云海信息技术有限公司 一种通用文件管理方法
CN109189610B (zh) * 2018-08-16 2021-10-29 郑州云海信息技术有限公司 一种linux下服务器监测数据的处理方法
CN109102228B (zh) * 2018-08-16 2022-04-29 郑州云海信息技术有限公司 一种基于云计算的货车运输信息管理系统
CN109087690B (zh) * 2018-08-16 2022-06-21 郑州云海信息技术有限公司 一种基于云计算的医疗数据的处理系统
CN109240997A (zh) * 2018-08-24 2019-01-18 华强方特(深圳)电影有限公司 一种文件的上传保存方法、系统和客户端
CN109241003B (zh) * 2018-09-20 2020-09-08 广东电网有限责任公司 文件管理方法和装置
CN109783455B (zh) * 2018-12-20 2024-03-12 昂纳科技(深圳)集团股份有限公司 一种基于大规模数据的管理方法、系统以及存储装置
CN109918471A (zh) * 2019-01-28 2019-06-21 平安科技(深圳)有限公司 文件归档方法、装置、计算机设备及存储介质
CN110059105A (zh) * 2019-04-26 2019-07-26 北京贝斯平云科技有限公司 一种数据处理方法、装置、计算机设备及存储介质
CN111078140B (zh) * 2019-11-20 2023-05-23 岭澳核电有限公司 核电站文件上传管理方法、装置、终端设备及介质
CN111045997B (zh) * 2019-12-05 2023-05-12 浩云科技股份有限公司 集中存储数据删除方法及装置
CN111915424A (zh) * 2020-07-30 2020-11-10 平安证券股份有限公司 信息保存方法及相关产品
CN112966133A (zh) * 2021-03-25 2021-06-15 深圳康佳电子科技有限公司 一种数据存储处理方法、服务端及计算机可读存储介质
CN113626487A (zh) * 2021-07-28 2021-11-09 广州市挖米科技有限责任公司 一种saas化心电数据高速传输与展示方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105338073A (zh) * 2015-10-20 2016-02-17 浪潮集团有限公司 一种文件目录的处理方法、服务器和系统
CN105808589A (zh) * 2014-12-31 2016-07-27 中国电信股份有限公司 文件处理的方法和装置
CN106156129A (zh) * 2015-04-08 2016-11-23 联想(北京)有限公司 文件管理方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808589A (zh) * 2014-12-31 2016-07-27 中国电信股份有限公司 文件处理的方法和装置
CN106156129A (zh) * 2015-04-08 2016-11-23 联想(北京)有限公司 文件管理方法及装置
CN105338073A (zh) * 2015-10-20 2016-02-17 浪潮集团有限公司 一种文件目录的处理方法、服务器和系统

Also Published As

Publication number Publication date
CN107291796A (zh) 2017-10-24

Similar Documents

Publication Publication Date Title
WO2018201583A1 (zh) 文件管理方法、系统、电子装置及介质
US10740319B2 (en) Graph-based data models for partitioned data
US20200175223A1 (en) Animating Edits to Documents
US8417746B1 (en) File system management with enhanced searchability
JP6446532B2 (ja) インスタントインデックスのための手法を有するマルチユーザの検索システム
US9565232B2 (en) Importing content items
US9026512B2 (en) Data object search and retrieval
US10242045B2 (en) Filtering content using synchronization data
US8548957B2 (en) Method and system for recovering missing information at a computing device using a distributed virtual file system
JP6448555B2 (ja) オブジェクトストレージインデキシングシステムのためのコンテンツクラス
US8386646B2 (en) Simplified application object data synchronization for optimized data storage
US8880528B2 (en) Intelligent content item importing
US11914585B2 (en) Servicing queries of a hybrid event index
US20150302111A1 (en) Method and Apparatus for Constructing File System in Key-Value Storage System, and Electronic Device
US20150012861A1 (en) Syncing content clipboard
US10261996B2 (en) Content localization using fallback translations
US20160232145A1 (en) Note Browser
US9298797B2 (en) Preserving content item collection data across interfaces
US20210133040A1 (en) System and method for indexing image backups
US11816128B2 (en) Managing content across discrete systems
US10152538B2 (en) Suggested search based on a content item
US20230222116A1 (en) Custom metadata tag inheritance based on a filesystem directory tree or object storage bucket
US10200320B2 (en) Import content items from email
US20170060892A1 (en) Search-based shareable collections
CN114238214A (zh) 一种智能化财务档案存储管理系统及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17908653

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 19/02/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17908653

Country of ref document: EP

Kind code of ref document: A1