[go: up one dir, main page]

CN103365996B - file management and processing method, device and system - Google Patents

file management and processing method, device and system Download PDF

Info

Publication number
CN103365996B
CN103365996B CN201310292209.5A CN201310292209A CN103365996B CN 103365996 B CN103365996 B CN 103365996B CN 201310292209 A CN201310292209 A CN 201310292209A CN 103365996 B CN103365996 B CN 103365996B
Authority
CN
China
Prior art keywords
file
time point
information table
path
files
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310292209.5A
Other languages
Chinese (zh)
Other versions
CN103365996A (en
Inventor
邵国强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201310292209.5A priority Critical patent/CN103365996B/en
Publication of CN103365996A publication Critical patent/CN103365996A/en
Application granted granted Critical
Publication of CN103365996B publication Critical patent/CN103365996B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The invention discloses a kind of file management and document handling method, device and system;File management method, it includes:File information table is set up, the file information table includes document base information;When file and/or file path change, the record of this document and/or file path in the file information table is correspondingly changed, and by the information record before this document and/or file path change in the file information table;Wherein, for file, the new file after source file and change before change is preserved respectively.According to the information before file and/or the file path change recorded in the file information table of the present invention, the file of random time point can be searched, history file catalogue can again be shown, thus solve user can not consult deleted, covered, Rename file the problem of, can obtain access, recover random time point respective file beneficial effect.

Description

文件管理及处理方法、装置和系统File management and processing method, device and system

技术领域technical field

本发明涉及通信技术领域,具体涉及一种文件管理及处理方法、装置和系统。The present invention relates to the field of communication technology, in particular to a file management and processing method, device and system.

背景技术Background technique

随着网络运用的普及,云存储越来越受到人们的欢迎,当人们大规模使用云存储时,不可避免的会进行文件的删除,覆盖,重命名等多种操作。现有的云盘(非同步云盘)存储方案,client(客户端)用户登录以后,client 首先会向server(服务器端)请求文件信息列表,server会根据登录帐号信息去数据库查询对应的文件信息列表。查询到数据后,将文件信息列表返回给 client。Client端根据获取到的文件信息列表,在云盘主界面创建出各个文件的快捷方式图标。并将文件名,大小和目录结构都创建出来。所以云盘最终展示给用户的是一个下载地址的快捷方式。当client端对文件进行增加、删除、修改或查找时,会将文件信息发送到server端,server端收到以后,会立即修改该文件在文件信息列表中的信息。With the popularization of network applications, cloud storage is becoming more and more popular. When people use cloud storage on a large scale, it is inevitable to perform various operations such as deleting, overwriting, and renaming files. In the existing cloud disk (asynchronous cloud disk) storage solution, after the client (client) user logs in, the client will first request the server (server) for a list of file information, and the server will query the database for the corresponding file information based on the login account information list. After querying the data, return the file information list to the client. The client side creates shortcut icons for each file on the main interface of the cloud disk according to the obtained file information list. And the file name, size and directory structure are created. Therefore, what the cloud disk finally displays to the user is a shortcut to the download address. When the client side adds, deletes, modifies or searches for a file, it will send the file information to the server side, and after the server side receives it, it will immediately modify the information of the file in the file information list.

现有的技术方案中,因为没有历史文件信息列表,所有无法有效的查看历史云盘文件信息和文件目录的功能。也无法有效的对比当前云盘文件与指定时间的文件差异,无法了解哪些文件进行了增加、删除、修改或查找的操作。In the existing technical solutions, because there is no historical file information list, it is impossible to effectively view the historical cloud disk file information and file directory functions. It is also impossible to effectively compare the difference between the current cloud disk file and the file at the specified time, and it is impossible to know which files have been added, deleted, modified, or searched.

现有的云盘存储方案,通过回收站,用户可以恢复主动删除的文件。当用户主动删除云盘中的文件后,在server端会将这些文件信息记录在已删除文件列表信息中,用户在规定的天数内,可以通过回收站的恢复功能,将该文件恢复到原来目录。当用户修改新文件,并上传覆盖源文件以后, server端更新文件信息列表外,还会在server端的数据库中,使用新文件覆盖掉原文件,只保留一份最新的文件。In the existing cloud disk storage solution, users can recover files that have been actively deleted through the recycle bin. When the user actively deletes files in the cloud disk, the server will record these file information in the deleted file list information, and the user can restore the file to the original directory through the recovery function of the recycle bin within the specified number of days . When the user modifies a new file and uploads it to overwrite the source file, the server will not only update the file information list, but will also overwrite the original file with the new file in the database on the server, leaving only one copy of the latest file.

现有的技术可以提供删除文件的恢复,但无法进行被覆盖文件的恢复功能。当用户误操作导致云存储中的文件被覆盖时,无法恢复历史记录。另外,现有的已删除文件恢复也是非常简单,无法根据日期批量的恢复已删除的文件。Existing technologies can provide recovery of deleted files, but cannot recover overwritten files. When the files in the cloud storage are overwritten due to user misoperation, the historical records cannot be restored. In addition, the existing deleted file recovery is also very simple, and the deleted files cannot be recovered in batches according to the date.

发明内容Contents of the invention

鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的文件管理及处理方法、装置和系统。In view of the above problems, the present invention is proposed to provide a file management and processing method, device and system that overcome the above problems or at least partially solve the above problems.

依据本发明的一个方面,提供了一种文件管理方法,其包括:According to one aspect of the present invention, a file management method is provided, which includes:

建立文件信息表,所述文件信息表包括文件基本信息;Establish a file information table, the file information table includes file basic information;

当文件和/或文件路径变化时,相应地修改该文件和/或文件路径在所述文件信息表中的记录,并将该文件和/或文件路径变化前的信息记录在所述文件信息表中;When the file and/or file path changes, correspondingly revise the record of the file and/or file path in the file information table, and record the information before the file and/or file path change in the file information table middle;

其中,对于文件而言,变化前的源文件和变化后的新文件分别进行保存。Wherein, for the files, the source file before the change and the new file after the change are respectively saved.

可选地,在所述文件信息表中记录该文件和/或文件路径变化前的信息,包括记录文件操作前对应的以下各项信息中的一项或多项:Optionally, recording information on the file and/or file path before the change in the file information table includes recording one or more of the following information corresponding to the file operation:

文件路径、文件路径哈希值、文件路径版本、文件创建时间、文件大小和文件版本。File path, file path hash, file path version, file creation time, file size, and file version.

可选地,所述文件基本信息包括以下各项中的一项或多项:Optionally, the basic file information includes one or more of the following:

文件路径、文件名、文件路径哈希值、文件哈希值、文件大小、文件创建时间、文件路径版本、文件版本和文件是否已删除的信息。Information about file path, file name, file path hash, file hash, file size, file creation time, file path version, file version, and whether the file was deleted.

根据本发明的另一方面,提供了一种文件处理方法,其包括:According to another aspect of the present invention, a file processing method is provided, which includes:

接收对文件信息表的查阅请求,其中,所述查阅请求至少包括查阅时间点A,所述文件信息表包括文件基本信息以及文件和/或文件路径变化前的信息;Receive a query request for a file information table, wherein the query request includes at least a query time point A, and the file information table includes basic file information and information before the file and/or file path changes;

根据文件信息表和查阅时间点A,获取与查阅时间点A对应的文件信息表;According to the file information table and the reference time point A, obtain the file information table corresponding to the reference time point A;

将与查阅时间点A对应的文件信息表返回给请求方。The file information table corresponding to the reference time point A is returned to the requesting party.

可选地,获取查阅时间点A对应的文件信息表,进一步包括:Optionally, obtaining the file information table corresponding to the reference time point A further includes:

将文件信息表中文件创建时间早于查阅时间点A的文件信息添加到查阅时间点A对应的文件信息表中。Add the file information in the file information table whose file creation time is earlier than the reference time point A to the file information table corresponding to the reference time point A.

可选地,获取查阅时间点A对应的文件信息表,进一步包括:Optionally, obtaining the file information table corresponding to the reference time point A further includes:

当文件信息表中文件创建时间晚于查阅时间点A时,如果文件版本发生变更且记录的该文件和/或文件路径变化前的文件创建时间早于查阅时间点 A,则将文件信息表中记录的该文件和/或文件路径变化前的文件信息添加到与查阅时间点A对应的文件信息表中。When the file creation time in the file information table is later than the query time point A, if the file version changes and the recorded file creation time before the file and/or file path change is earlier than the query time point A, the file information table will be The recorded file information and/or the file information before the file path change is added to the file information table corresponding to the query time point A.

可选地,对比当前时间点B对应的文件信息表与查阅时间点A对应的文件信息表,将二者中相同的文件标注为未变化;将当前时间点B不具有但查阅时间点A具有的文件标注为已删除;将查阅时间点A和当前时间点B都具有、但文件版本不同的文件标注为已修改;将查阅时间点B具有但当前时间点A不具有的文件标注为新增加。Optionally, compare the file information table corresponding to the current time point B with the file information table corresponding to the reference time point A, and mark the same files in the two as unchanged; the current time point B does not have but the reference time point A has Mark the file as deleted; mark the file that has both the reference time point A and the current time point B, but the file version is different; mark the file that the review time point B has but the current time point A does not have as newly added .

可选地,当收到一键恢复消息时,将当前时间点B对应的所有的文件恢复为查阅时间点A所对应的文件。Optionally, when the one-key recovery message is received, all the files corresponding to the current time point B are restored to the files corresponding to the reference time point A.

可选地,当收到差异恢复消息时,将当前时间点B对应的文件中相对于查阅时间点A所对应的文件发生变化的所有文件恢复为查阅时间点A所对应的文件。Optionally, when the difference recovery message is received, all the files in the file corresponding to the current time point B that have changed relative to the file corresponding to the reference time point A are restored to the files corresponding to the reference time point A.

可选地,当收到特定文件恢复消息时,将用户选择的当前时间点B中的文件恢复为查阅时间点A时对应的文件。Optionally, when a specific file restoration message is received, the file at the current time point B selected by the user is restored to the file corresponding to the reference time point A.

根据本发明的另一方面,提供了一种文件管理装置,其包括:According to another aspect of the present invention, a file management device is provided, which includes:

文件信息表建立模块,用于建立文件信息表,所述文件信息表包括文件基本信息;The file information table building module is used to set up a file information table, and the file information table includes file basic information;

记录模块,用于当文件和/或文件路径变化时,相应地修改该文件和/或文件路径在所述文件信息表中的记录,并将该文件和/或文件路径变化前的信息记录在所述文件信息表中;The recording module is used to modify the record of the file and/or file path in the file information table accordingly when the file and/or file path changes, and record the information of the file and/or file path before the change in In the document information table;

保存模块,用于对变化前的源文件和变化后的新文件分别进行保存。The saving module is used for saving the source file before the change and the new file after the change respectively.

可选地,所述记录模块在所述文件信息表中记录该文件和/或文件路径变化前的信息,包括记录文件操作前对应的以下各项信息中的一项或多项:Optionally, the recording module records the information of the file and/or the file path before the change in the file information table, including one or more of the following information corresponding to the recording of the file operation:

文件路径、文件路径哈希值、文件路径版本、文件创建时间、文件哈希值、文件大小和文件版本。File path, file path hash, file path version, file creation time, file hash, file size, and file version.

可选地,所述文件基本信息包括以下各项中的一项或多项:Optionally, the basic file information includes one or more of the following:

文件路径、文件名、文件路径哈希值、文件哈希值、文件大小、文件创建时间、文件路径版本、文件版本和文件是否已删除的信息。Information about file path, file name, file path hash, file hash, file size, file creation time, file path version, file version, and whether the file was deleted.

根据本发明的另一方面,提供了一种文件处理装置,其包括:According to another aspect of the present invention, a file processing device is provided, which includes:

接收模块,用于接收对文件信息表的查阅请求,其中,所述查阅请求至少包括查阅时间点A,所述文件信息表包括文件基本信息以及文件和/或文件路径变化前的信息;A receiving module, configured to receive a query request for a file information table, wherein the query request includes at least a query time point A, and the file information table includes basic file information and information before the file and/or file path changes;

文件信息表获取模块,用于根据文件信息表和查阅时间点A,获取与查阅时间点A对应的文件信息表;The file information table acquisition module is used to obtain the file information table corresponding to the reference time point A according to the file information table and the reference time point A;

发送模块,用于将与查阅时间点A对应的文件信息表返回给请求方。A sending module, configured to return the file information table corresponding to the query time point A to the requester.

可选地,所述文件信息表获取模块还用于:Optionally, the file information table acquisition module is also used for:

将文件信息表中文件创建时间早于查阅时间点A的文件信息添加到查阅时间点A对应的文件信息表中。Add the file information in the file information table whose file creation time is earlier than the reference time point A to the file information table corresponding to the reference time point A.

可选地,所述文件信息表获取模块还用于:Optionally, the file information table acquisition module is also used for:

当文件信息表中文件创建时间晚于查阅时间点A时,如果文件版本发生变更且记录的该文件和/或文件路径变化前的文件创建时间早于查阅时间点 A,则将文件信息表中记录的该文件和/或文件路径变化前的文件信息添加到与查阅时间点A对应的文件信息表中。When the file creation time in the file information table is later than the query time point A, if the file version changes and the recorded file creation time before the file and/or file path change is earlier than the query time point A, the file information table will be The recorded file information and/or the file information before the file path change is added to the file information table corresponding to the query time point A.

可选地,所述文件信息表获取模块还用于:Optionally, the file information table acquisition module is also used for:

对比当前时间点B对应的文件信息表与查阅时间点A对应的文件信息表,将二者中相同的文件标注为未变化;将当前时间点B不具有但查阅时间点A具有的文件标注为已删除;将查阅时间点A和当前时间点B都具有、但文件版本不同的文件标注为已修改;将查阅时间点B具有但当前时间点A不具有的文件标注为新增加。Compare the file information table corresponding to the current time point B with the file information table corresponding to the reference time point A, and mark the same files in the two as unchanged; mark the files that the current time point B does not have but the reference time point A has as Deleted; mark the files that have both the reference time point A and the current time point B but have different file versions as modified; mark the files that have the reference time point B but not the current time point A as newly added.

可选地,所述文件处理装置还包括:Optionally, the file processing device further includes:

一键恢复模块,用于当收到一键恢复消息时,将当前时间点B对应的所有的文件恢复为查阅时间点A所对应的文件。The one-key recovery module is configured to restore all the files corresponding to the current time point B to the files corresponding to the reference time point A when the one-key recovery message is received.

可选地,所述文件处理装置还包括:Optionally, the file processing device further includes:

差异恢复模块,用于当收到差异恢复消息时,将当前时间点B对应的文件中相对于查阅时间点A所对应的文件发生变化的所有文件恢复为查阅时间点A所对应的文件。The difference recovery module is configured to restore all files that have changed from the file corresponding to the reference time point A among the files corresponding to the current time point B to the files corresponding to the reference time point A when receiving the difference recovery message.

可选地,所述文件处理装置还包括:Optionally, the file processing device further includes:

特定文件恢复模块,用于当收到特定文件恢复消息时,将用户选择的当前时间点B中的文件恢复为查阅时间点A时对应的文件。The specific file restoration module is configured to restore the file at the current time point B selected by the user to the file corresponding to the reference time point A when the specific file restoration message is received.

根据本发明的另一方面,提供了一种文件处理系统,其中,包括终端、以及上述的文件管理装置和文件处理装置。According to another aspect of the present invention, a file processing system is provided, which includes a terminal, and the above-mentioned file management device and file processing device.

根据本发明的文件信息表中记录的文件和/或文件路径变化前的信息,可以查找任意时间点的文件,可以将历史文件目录重新展示出来,由此解决了用户无法查阅已删除、已覆盖、重命名文件的问题,可以取得查阅、恢复任意时间点对应文件的有益效果。According to the files recorded in the file information table of the present invention and/or the information before the file path changes, files at any point in time can be searched, and the historical file directory can be re-displayed, thereby solving the problem that users cannot consult deleted and overwritten files. 1. For the problem of renaming files, the beneficial effect of consulting and restoring the corresponding files at any point in time can be obtained.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same parts. In the attached picture:

图1示出了根据本发明一个实施例的一种文件管理方法的流程图;Fig. 1 shows a flow chart of a file management method according to an embodiment of the present invention;

图2示出了根据本发明一个实施例的一种文件处理方法的流程图;FIG. 2 shows a flowchart of a file processing method according to an embodiment of the present invention;

图3示出了根据本发明一个实施例的一种获取与查阅时间点A对应的文件信息表的流程图;FIG. 3 shows a flow chart of obtaining a file information table corresponding to a reference time point A according to an embodiment of the present invention;

图4示出了根据本发明一个实施例的一种文件管理装置的结构示意图;Fig. 4 shows a schematic structural diagram of a file management device according to an embodiment of the present invention;

图5示出了根据本发明一个实施例的一种文件处理装置的结构示意图;Fig. 5 shows a schematic structural diagram of a file processing device according to an embodiment of the present invention;

图6示出了根据本发明另一个实施例的一种文件处理装置的结构示意图;Fig. 6 shows a schematic structural diagram of a file processing device according to another embodiment of the present invention;

图7示出了根据本发明一个实施例的一种文件处理系统的结构示意图;FIG. 7 shows a schematic structural diagram of a file processing system according to an embodiment of the present invention;

图8示出了根据本发明一个实施例的用户新建云盘的示意图;FIG. 8 shows a schematic diagram of a user creating a new cloud disk according to an embodiment of the present invention;

图9示出了根据本发明一个实施例的用户第一次修改云盘内文件后的示意图;Fig. 9 shows a schematic diagram of a user modifying a file in a cloud disk for the first time according to an embodiment of the present invention;

图10示出了根据本发明一个实施例的用户第二次修改云盘内文件后的示意图。Fig. 10 shows a schematic diagram after the user modifies the files in the cloud disk for the second time according to an embodiment of the present invention.

具体实施方式detailed description

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although 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 by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

如图1所示,提供了依据本发明实施例的文件管理方法,其包括:As shown in Figure 1, a file management method according to an embodiment of the present invention is provided, which includes:

步骤S101,建立文件信息表,文件信息表包括文件基本信息;Step S101, establishing a file information table, which includes basic file information;

步骤S102,当文件和/或文件路径变化时,相应地修改该文件和/或文件路径在所述文件信息表中的记录,并将该文件和/或文件路径变化前的信息记录在所述文件信息表中;Step S102, when the file and/or file path changes, correspondingly modify the record of the file and/or file path in the file information table, and record the information of the file and/or file path before the change in the in the file information table;

步骤S103,其中,对于文件而言,变化前的源文件和变化后的新文件分别进行保存。Step S103, wherein, for the files, the original file before the change and the new file after the change are respectively saved.

由上述可知,依据本发明一个实施例的技术方案,首先,建立文件信息表,该文件信息表包括文件基本信息。由于用户可能会对文件进行修改、删除、改变保存路径、改变文件名等操作,这样会造成文件或文件路径发生变化。在此情况下,当文件和/或文件路径变化时,相应地修改该文件和/或文件路径在文件信息表中的记录,并将该文件和/或文件路径变化前的信息记录在文件信息表中。上述过程中,对于文件而言,变化前的源文件和变化后的新文件分别进行保存,这样便于后期的恢复等操作。当查找任意时间点的文件时,可以根据文件信息表中记录的文件和/或文件路径变化前的信息将历史文件目录重新展示出来,由此解决了用户无法查阅已删除、已覆盖、重命名文件的问题。As can be seen from the above, according to the technical solution of an embodiment of the present invention, firstly, a file information table is established, and the file information table includes basic file information. Because the user may modify, delete, change the save path, change the file name and other operations on the file, this will cause the file or the file path to change. In this case, when the file and/or file path changes, the record of the file and/or file path in the file information table is modified accordingly, and the information before the file and/or file path change is recorded in the file information table. In the above process, for the files, the source file before the change and the new file after the change are saved separately, which is convenient for later recovery and other operations. When looking for files at any point in time, the historical file directory can be re-displayed according to the files recorded in the file information table and/or the information before the file path changes, thus solving the problem that users cannot view deleted, overwritten, and renamed files file problem.

其中,文件基本信息可以包括:Among them, the basic information of the file can include:

文件路径(path):是指文件在客户端(client)所创建的目录位置,例如:我的云盘中在图片文件夹下有泰山文件夹,可以记录为:\图片\泰山。如果是具体文件,例如泰山文件夹下存储了“五岳独尊.png”的图片,存储形式如:\图片\泰山\五岳独尊.png。File path (path): refers to the directory location of the file created by the client (client), for example: there is a Taishan folder under the picture folder in my cloud disk, which can be recorded as: \picture\Taishan. If it is a specific file, for example, the picture of "Five Sacred Mountains.png" is stored in the Taishan folder, and the storage format is as follows: \Pictures\Taishan\Five Sacred Mountains.png.

文件名(file_name):是指文件夹和文件的名称,例如:“\图片\泰山”对应的文件名称是“泰山”;而“\图片\泰山\五岳独尊.png”对应的名称是“五岳独尊.png”。File name (file_name): refers to the name of the folder and file, for example: the file name corresponding to "\Picture\Taishan" is "Taishan"; Five Sacred Mountains.png".

文件路径哈希值(pash_hash):是根据文件路径计算出来的哈希(hash) 值,主要是判断文件路径的唯一性。当新建文件夹,上传新文件时,都会计算出文件路径的hash值,举例来说,“\图片\泰山”会计算一个hsah值,“\ 图片\泰山\五岳独尊.png”也会计算一个hsah值。File path hash value (pash_hash): It is a hash value calculated according to the file path, mainly to judge the uniqueness of the file path. When a new folder is created and a new file is uploaded, the hash value of the file path will be calculated. For example, "\Picture\Taishan" will calculate a hsah value, and "\Picture\Taishan\Five Sacred Unique.png" will also be calculated A hsah value.

文件哈希值(file_hash):是根据文件计算出来的hash值,只计算文件,文件夹不计算hash值。主要作用是client根据文件hash从服务器端下载文件。文件hash和文件路径hash的区别是,文件改名后,文件路径hash是会改变,但是文件hash不会改变。如果文件只修改内容,则文件路径hash不变,文件 hash会改变。File hash value (file_hash): It is the hash value calculated according to the file, only the file is calculated, and the folder does not calculate the hash value. The main function is that the client downloads the file from the server according to the file hash. The difference between the file hash and the file path hash is that after the file is renamed, the file path hash will change, but the file hash will not change. If the file only modifies the content, the file path hash will not change, but the file hash will change.

文件大小(file_size):记录文件的大小,文件夹不记录大小值。File size (file_size): Record the size of the file, and the folder does not record the size value.

文件创建时间(file_create):是记录文件的创建和修改时间,主要包括文件路径和文件的修改,以服务器时间为准。File creation time (file_create): records the creation and modification time of the file, mainly including the file path and file modification, subject to the server time.

文件路径版本(path_ver):是指同一文件路径被修改过多少次;每修改一次文件路径增加一次版本信息。File path version (path_ver): refers to how many times the same file path has been modified; the version information is added every time a file path is modified.

文件版本(file_ver):File version (file_ver):

是指同一文件被修改过多少次;每修改一次文件增加一次版本信息。It refers to how many times the same file has been modified; the version information is added every time a file is modified.

文件是否已删除(delete):是指文件是否已经被用户删除;0表示未删除, 1表示已删除。Whether the file has been deleted (deleted): refers to whether the file has been deleted by the user; 0 indicates that it has not been deleted, and 1 indicates that it has been deleted.

当用户对文件进行上传(增加)、修改或删除操作时,文件和/或文件路径发生变化,将变化后的信息记录在文件信息表中,并且,将该文件和/或文件路径变化前的信息也记录在所述文件信息表中。文件和/或文件路径变化前的信息包括记录以下各项中的一项或多项:文件操作前对应的文件名、文件路径哈希值、文件创建时间、文件版本、文件操作前的文件哈希值、文件创建时间和文件版本。When a user uploads (adds), modifies or deletes a file, and the file and/or file path changes, the changed information is recorded in the file information table, and the file and/or file path before the change Information is also recorded in the file information table. The information before the file and/or file path changes includes recording one or more of the following items: the corresponding file name before the file operation, the file path hash value, the file creation time, the file version, the file hash before the file operation Hash value, file creation time, and file version.

具体地,可以在文件信息表中增加路径增量备份信息和/或文件增量备份信息,将文件操作前对应的信息记录在路径增量备份信息和/或文件增量备份信息中。Specifically, incremental path backup information and/or incremental file backup information may be added to the file information table, and corresponding information before the file operation is recorded in the incremental path backup information and/or incremental file backup information.

路径增量备份信息(path_back):当文件路径被修改时,会记录被修改的时间、版本、路径hash和/或文件名;每次路径修改都会在文件信息表中增加一条新的数据项;格式为file_name+path_hash+file_create+path_ver,包括:文件操作前对应的文件名、文件路径哈希值、文件创建时间和文件版本。Path incremental backup information (path_back): When the file path is modified, the modified time, version, path hash and/or file name will be recorded; each path modification will add a new data item to the file information table; The format is file_name+path_hash+file_create+path_ver, including: the corresponding file name before file operation, file path hash value, file creation time and file version.

文件增量备份信息(file_back):当文件被修改时,会记录被修改的时间、版本和/或文件hash;每次文件修改都会在文件信息表中增加一条新的记录数据项;格式为file_back+file_create+file_ver,包括:文件操作前的文件哈希值、文件创建时间和文件版本。File incremental backup information (file_back): When a file is modified, it will record the modified time, version and/or file hash; each time a file is modified, a new record data item will be added to the file information table; the format is file_back +file_create+file_ver, including: file hash value before file operation, file creation time and file version.

对于源文件的保存,可以根据用户需求、服务器压力等进行调整,例如设置历史文件1月之内不删除,文件信息表增量更新1月之内的文件不删除,这样可以有效的保存1个月之内的历史文件信息。考虑到服务器压力,也可以根据文件类型进行历史文件(源文件)的保存,视频文件不保存历史信息,文本文件保存历史信息等。For the preservation of source files, adjustments can be made according to user needs, server pressure, etc. For example, set historical files not to be deleted within one month, and files within one month of incremental update of the file information table not to be deleted, so that one can be effectively saved Historical file information within a month. Considering the server pressure, historical files (source files) can also be saved according to the file type, video files do not save historical information, text files save historical information, etc.

下面给出文件信息表的示例,An example of a file information table is given below,

例如在用户云盘上创建目录图片,上传了文档测试.doc,建立文件信息表如表1所示。For example, create a directory picture on the user's cloud disk, upload the document test.doc, and create a file information table as shown in Table 1.

表1Table 1

用户后来将“图片”重命名为“我的图片”,更新了“测试.doc”文档,即:“图片”的文件路径、文件名、文件路径哈希值、文件路径、文件创建时间和文件路径版本发生了变化;“测试.doc”文档的文件哈希值、文件大小、文件创建时间、文件版本发生了变化。因此,在文件信息表中增加数据项 Path_back1和File_back1;分别来记录文件文件路径、文件发生变化之前的信息,具体如表2所示。The user later renamed "Pictures" to "My Pictures", updated the "test.doc" document, ie: the file path of "Picture", the file name, the file path hash, the file path, the file creation time and the file Path version changed; file hash, file size, file creation time, file version of "test.doc" document changed. Therefore, data items Path_back1 and File_back1 are added to the file information table to record the file path and the information before the file changes, respectively, as shown in Table 2.

表2Table 2

如图2所示,提供了依据本发明实施例的文件处理方法,其包括:As shown in Figure 2, a file processing method according to an embodiment of the present invention is provided, which includes:

步骤S201,接收对文件信息表的查阅请求,其中,所述查阅请求至少包括查阅时间点A,所述文件信息表包括文件基本信息以及文件和/或文件路径变化前的信息;Step S201, receiving a query request for a file information table, wherein the query request includes at least a query time point A, and the file information table includes basic file information and information before file and/or file path changes;

本步骤中,用户在client(客户端)打开文件管理系统,根据提供的日历,选择具体日期时间A(查阅时间点A);选择时间后,client端会向server(服务器端)发送查阅请求,请求时间点A的文件信息表。该文件信息表是通过上述实施例创建的,包括文件基本信息以及文件和/或文件路径变化前的信息。In this step, the user opens the file management system on the client (client), and selects a specific date and time A (review time point A) according to the calendar provided; after selecting the time, the client will send a request to the server (server), Request the file information table at time point A. The file information table is created through the above embodiments, and includes basic file information and information before the file and/or file path is changed.

步骤S202,根据文件信息表和查阅时间点A,获取与查阅时间点A对应的文件信息表;Step S202, according to the file information table and the reference time point A, obtain the file information table corresponding to the reference time point A;

本步骤中,获取与查阅时间点A对应的文件信息表,具体包括如下步骤:In this step, the file information table corresponding to the query time point A is obtained, which specifically includes the following steps:

步骤S301,打开server端文件信息表;Step S301, open the server-side file information table;

步骤S302,判断文件信息表中文件创建时间是否晚于时间点A,如果是,则转步骤S303,如果否,则转步骤S306;Step S302, judging whether the file creation time in the file information table is later than time point A, if yes, go to step S303, if not, go to step S306;

步骤S303,进一步判断文件信息表中文件版本是否发生变更,如果是,则转步骤S304,如果否,则转步骤S307;Step S303, further judging whether the file version in the file information table has changed, if yes, then go to step S304, if not, then go to step S307;

步骤S304,进一步判断文件信息表中记录的文件和/或文件路径变化前的文件创建时间是否晚于查阅时间点A,如果是,则转步骤S305,如果否,则转步骤S307;Step S304, further judge whether the creation time of the file recorded in the file information table and/or the file path before the file path change is later than the reference time point A, if yes, go to step S305, if not, go to step S307;

步骤S305,从文件信息表中记录的文件和/或文件路径变化前的信息中,取出离查阅时间点A最近的备份信息,然后转步骤S306;Step S305, from the file and/or information before the file path change recorded in the file information table, take out the backup information closest to the reference time point A, and then go to step S306;

步骤S306,将由上述步骤获得的文件信息添加到与查阅时间点A对应的文件信息表中。Step S306, adding the file information obtained in the above steps to the file information table corresponding to the query time point A.

步骤S307,表示不需要该文件信息。Step S307, indicating that the file information is not needed.

针对文件信息表中的每一条记录,重复步骤S302~307,最终获得与查阅时间点A对应的文件信息表。For each record in the file information table, repeat steps S302-307, and finally obtain the file information table corresponding to the query time point A.

步骤S203,将与查阅时间点A对应的文件信息表返回给请求方。Step S203, returning the file information table corresponding to the query time point A to the requesting party.

client收到文件备份列表(与查阅时间点A对应的文件信息表)后,会将时间点A的文件目录结构重新展示到云盘客户端,该展示属于临时展示,当关闭文件管理系统后,会重新恢复到当前时间点的云盘文件。After the client receives the file backup list (the file information table corresponding to the query time point A), it will re-display the file directory structure of the time point A to the cloud disk client. This display is a temporary display. When the file management system is closed, The cloud disk file at the current point in time will be restored.

客户端在将时间点A的文件展示给用户以后,对比当前时间点B对应的文件信息表与查阅时间点A对应的文件信息表,将二者中相同的文件标注为未变化;将当前时间点B不具有但查阅时间点A具有的文件标注为已删除;将查阅时间点A和当前时间点B都具有、但文件版本不同的文件标注为已修改;将查阅时间点B具有但当前时间点A不具有的文件标注为新增加。After displaying the file at time point A to the user, the client compares the file information table corresponding to the current time point B with the file information table corresponding to the query time point A, and marks the same file as unchanged; Mark the files that do not exist at point B but that exist at point A at the time of review as deleted; mark the files that exist at both point A at time point A and at point B at the current time but have different file versions as modified; Files that point A does not have are marked as new additions.

根据时间点A与当前时间点B云盘文件存在差异的地方,用户可以一键恢复,将云盘中所有的文件恢复到时间A节点的文件,也可以差异恢复,将云盘中有差异的文件(主要是已删除和已修改)恢复时间A点的状态;还可以单文件恢复,用户选择一个文件,直接恢复到原来版本和目录位置。具体如下:According to the difference between the cloud disk files at time point A and the current time point B, the user can restore all the files in the cloud disk to the files at the time A node with one click, and can also perform differential recovery to restore the files with differences in the cloud disk. Files (mainly deleted and modified) are restored to the state at point A at time A; single file restoration is also possible, the user selects a file and directly restores to the original version and directory location. details as follows:

当收到终端发送的一键恢复消息时,将当前时间点B对应的所有的文件恢复为查阅时间点A所对应的文件。本实施例的一键恢复消息,是指用户通过终端发送给服务器端要求将当前时间点B对应的所有的文件恢复为查阅时间点A所对应的文件的消息。When receiving the one-click restore message sent by the terminal, restore all the files corresponding to the current time point B to the files corresponding to the query time point A. The one-key restore message in this embodiment refers to a message sent by the user to the server through the terminal to request to restore all the files corresponding to the current time point B to the files corresponding to the reference time point A.

当收到终端发送的差异恢复消息时,将当前时间点B对应的文件中相对于查阅时间点A所对应的文件发生变化的所有文件恢复为查阅时间点A所对应的文件。本实施例的差异恢复消息,是指用户通过终端发送给服务器端要求将当前时间点B对应的文件中相对于查阅时间点A所对应的文件发生变化的所有文件恢复为查阅时间点A所对应的文件的消息。When the difference recovery message sent by the terminal is received, all the files in the file corresponding to the current time point B that have changed relative to the file corresponding to the reference time point A are restored to the files corresponding to the reference time point A. The difference recovery message in this embodiment refers to the request sent by the user to the server through the terminal to restore all files that have changed from the file corresponding to the reference time point A in the file corresponding to the current time point B to that corresponding to the reference time point A message of the file.

当收到终端发送的特定文件恢复消息时,将用户选择的当前时间点B中的文件恢复为查阅时间点A时对应的文件。本实施例的特定文件恢复消息,是指用户通过终端发送给服务器端要求将用户选择的当前时间点B中的文件恢复为查阅时间点A时对应的文件的消息。When receiving a specific file restoration message sent by the terminal, the file at the current time point B selected by the user is restored to the file corresponding to the time point A at the time of viewing. The specific file restoration message in this embodiment refers to a message sent by the user to the server through the terminal to restore the file selected by the user at the current time point B to the file corresponding to the time point A when the user consulted it.

另外,如图4所示,提供了依据本发明实施例的实现上述方法的文件管理装置,其包括:In addition, as shown in FIG. 4, a file management device for implementing the above method according to an embodiment of the present invention is provided, which includes:

文件信息表建立模块401,用于建立文件信息表,所述文件信息表包括文件基本信息;The file information table building module 401 is used to set up a file information table, and the file information table includes file basic information;

记录模块402,用于当文件和/或文件路径变化时,相应地修改该文件和/ 或文件路径在所述文件信息表中的记录,并将该文件和/或文件路径变化前的信息记录在所述文件信息表中;The recording module 402 is configured to modify the record of the file and/or file path in the file information table accordingly when the file and/or file path changes, and record the information of the file and/or file path before the change In said document information form;

保存模块403,用于对变化前的源文件和变化后的新文件分别进行保存。The saving module 403 is configured to save the source file before the change and the new file after the change respectively.

记录模块402在文件信息表中记录该文件和/或文件路径变化前的信息,包括记录以下各项中的一项或多项:The recording module 402 records the information of the file and/or the file path before the change in the file information table, including recording one or more of the following items:

文件操作前对应的文件名、文件路径哈希值、文件创建时间、文件版本、文件操作前的文件哈希值、文件创建时间和文件版本。The corresponding file name, file path hash value, file creation time, file version, file hash value before file operation, file creation time, and file version before the file operation.

文件基本信息包括以下各项中的一项或多项:Basic file information includes one or more of the following:

文件路径、文件名、文件路径哈希值、文件哈希值、文件大小、文件创建时间、文件路径版本、文件版本和文件是否已删除的信息。Information about file path, file name, file path hash, file hash, file size, file creation time, file path version, file version, and whether the file was deleted.

另外,如图5所示,本发明实施例还涉及一种实现上述方法的一种文件处理装置,其包括:In addition, as shown in FIG. 5, an embodiment of the present invention also relates to a file processing device for implementing the above method, which includes:

接收模块501,用于接收对文件信息表的查阅请求,其中,所述查阅请求至少包括查阅时间点A,所述文件信息表包括文件基本信息以及文件和/或文件路径变化前的信息;The receiving module 501 is configured to receive a query request for a file information table, wherein the query request includes at least a query time point A, and the file information table includes basic file information and information before file and/or file path changes;

文件信息表获取模块502,用于根据文件信息表和查阅时间点A,获取与查阅时间点A对应的文件信息表;The file information table acquisition module 502 is used to obtain the file information table corresponding to the reference time point A according to the file information table and the reference time point A;

发送模块503,用于将与查阅时间点A对应的文件信息表返回给请求方。The sending module 503 is configured to return the file information table corresponding to the query time point A to the requesting party.

其中,文件信息表获取模块502还用于:Wherein, the file information table acquisition module 502 is also used for:

将文件信息表中文件创建时间早于查阅时间点A的文件信息添加到查阅时间点A对应的文件信息表中;Add the file information in the file information table whose file creation time is earlier than the reference time point A to the file information table corresponding to the reference time point A;

当文件信息表中文件创建时间晚于查阅时间点A时,如果文件版本发生变更且记录的该文件和/或文件路径变化前的文件创建时间早于查阅时间点 A,则将文件信息表中记录的该文件和/或文件路径变化前的文件信息添加到与查阅时间点A对应的文件信息表中;When the file creation time in the file information table is later than the query time point A, if the file version changes and the recorded file creation time before the file and/or file path change is earlier than the query time point A, the file information table will be The recorded file information and/or the file information before the file path change is added to the file information table corresponding to the query time point A;

对比当前时间点B对应的文件信息表与查阅时间点A对应的文件信息表,将二者中相同的文件标注为未变化;将当前时间点B不具有但查阅时间点A具有的文件标注为已删除;将查阅时间点A和当前时间点B都具有、但文件版本不同的文件标注为已修改;将查阅时间点B具有但当前时间点A不具有的文件标注为新增加。Compare the file information table corresponding to the current time point B with the file information table corresponding to the reference time point A, and mark the same files in the two as unchanged; mark the files that the current time point B does not have but the reference time point A has as Deleted; mark the files that have both the reference time point A and the current time point B but have different file versions as modified; mark the files that have the reference time point B but not the current time point A as newly added.

为达更佳技术效果,如图6所示,本发明实施例的文件处理装置除包括接收模块601、文件信息表获取模块602和发送模块603之外,还包括:In order to achieve a better technical effect, as shown in Figure 6, in addition to the receiving module 601, the file information table acquisition module 602 and the sending module 603, the file processing device of the embodiment of the present invention also includes:

一键恢复模块604,用于当收到一键恢复消息时,将当前时间点B对应的所有的文件恢复为查阅时间点A所对应的文件。The one-key recovery module 604 is configured to restore all the files corresponding to the current time point B to the files corresponding to the query time point A when the one-key recovery message is received.

差异恢复模块605,用于当收到差异恢复消息时,将当前时间点B对应的文件中相对于查阅时间点A所对应的文件发生变化的所有文件恢复为查阅时间点A所对应的文件。The difference recovery module 605 is configured to restore all files in the files corresponding to the current time point B that have changed relative to the file corresponding to the reference time point A to the files corresponding to the reference time point A when receiving the difference recovery message.

特定文件恢复模块606,用于当收到特定文件恢复消息时,将用户选择的当前时间点B中的文件恢复为查阅时间点A时对应的文件。The specific file restoration module 606 is configured to restore the file at the current time point B selected by the user to the file corresponding to the reference time point A when the specific file restoration message is received.

根据上述实施例的描述,本领域人员还可以明白,本发明实施例还可以涉及一种文件处理系统,包括终端701 、以及上述实施例涉及的文件管理装置702 和文件处理装置703 。由于之前实施例已经详细描述了文件管理装置和文件处理装置,因此,本实施例不再详细描述。According to the description of the above embodiment, those skilled in the art can also understand that the embodiment of the present invention may also relate to a file processing system, including the terminal 701, and the file management device 702 and the file processing device 703 involved in the above embodiment. Since the previous embodiments have described the file management device and the file processing device in detail, this embodiment will not describe them in detail.

下面,通过示例以更加清楚地描述本发明技术方案。In the following, the technical solution of the present invention is described more clearly through examples.

1、用户在2013.04.01 12:00:00,新建了云盘,并创建了目录以及上传了图片和文档。如图8所示,用户新建了图片、文档、音乐三个文件夹,并上传了蓝色.jpg、测试.doc、学习.doc、研发.doc、产品.doc五个文件。1. At 2013.04.01 12:00:00, the user created a new cloud disk, created a directory, and uploaded pictures and documents. As shown in Figure 8, the user has created three folders of pictures, documents, and music, and uploaded five files: blue.jpg, test.doc, learning.doc, research and development.doc, and product.doc.

服务器端创建文件信息表,如表3所示Create a file information table on the server side, as shown in Table 3

表3table 3

2、用户在2013.04.05 12:00:00将”\图片”重命名为”我的图片”;2013.04.05 12:01:00删除了”\文档”文件夹;2013.04.05 12:03:00更新了”\测试.doc”; 2013.04.05 12:05:00在“\音乐”目录下新上传了“\学习.xml”。用户修改后的云盘如图9所示,包括我的图片、音乐两个文件夹,以及蓝色.jpg、测试.doc、学习.doc、研发.doc、产品.doc五个文件;其中,音乐文件夹内还包括“\学习.xml”。2. The user renamed "\Pictures" to "My Pictures" at 2013.04.05 12:00:00; deleted the "\Documents" folder at 2013.04.05 12:01:00; 2013.04.05 12:03: 00 updated "\Test.doc"; 2013.04.05 12:05:00 newly uploaded "\Learning.xml" under the "\Music" directory. The cloud disk modified by the user is shown in Figure 9, including two folders of my picture and music, and five files of blue.jpg, test.doc, learning.doc, research and development.doc, and product.doc; among them, The music folder also includes "\learning.xml".

服务器端在文件信息表中记录信息如表4所示:粗体部分表示文件信息有变化的情况。其中path_back和file_back记录的是变化以前的信息。The information recorded in the file information table on the server side is shown in Table 4: the bold part indicates that the file information has changed. Among them, path_back and file_back record the information before the change.

表4Table 4

3、用户在2013.04.10 13:00:00将”\图片”重命名为”我的图片2”;2013.04.1013:01:00删除了“产品.doc”文档;2013.04.10 13:03:00更新了”\测试.doc”;2013.04.1013:05:00更新了“\音乐\学习.xml”;2013.04.10 13:08:00新建了“\ 测试”文件夹;2013.04.10 13:10:00新建了“工作.doc”文档。用户修改后的云盘如图10所示,包括我的图片2、音乐、测试三个文件夹,以及蓝色.jpg、测试.doc、学习.doc、研发.doc、工作.doc五个文件;其中,音乐文件夹内还包括“\学习.xml”。3. The user renamed "\Picture" to "My Picture 2" at 2013.04.10 13:00:00; deleted the "product.doc" document at 2013.04.10 13:01:00; 2013.04.10 13:03: 00 updated "\test.doc"; 2013.04.10 13:05:00 updated "\music\learning.xml"; 2013.04.10 13:08:00 created a new folder "\test"; 2013.04.10 13: 10:00 Created a new "work.doc" document. The cloud disk modified by the user is shown in Figure 10, including three folders of my picture 2, music, and test, and five files of blue.jpg, test.doc, learning.doc, research and development.doc, and work.doc ; Among them, the music folder also includes "\learning.xml".

服务器在文件信息表中记录信息如表5所示,粗体字体部分表示文件信息有变化的情况;其中path_back和file_back记录的是变更以前的信息。The information recorded by the server in the file information table is shown in Table 5. The bold font part indicates that the file information has changed; where path_back and file_back record information before the change.

表5table 5

表5中,由于针对文档“产品.doc”用户进行的是删除操作,其文件大小没有发生变化,因此,在记录文件变化前的信息时,可以不记录文件大小;当然,也可以记录。In Table 5, since the user performed a delete operation on the document "product.doc", its file size has not changed. Therefore, when recording the information before the file change, the file size may not be recorded; of course, it can also be recorded.

4、当用户在2013.04.14日登录,查看云盘文件时,client端首先向server 端获取文件信息表,server端会将最新的文件信息表计算出来发送给client。主要是获取最新的文件列表,并将已删除文件排除在外,所以会将“文档”和“产品.doc”排除。Client端的文件信息表如下表6所示。Client端会根据文件信息表创建快捷方式,展示在用户云盘主界面内。4. When the user logs in on 2013.04.14 and views the cloud disk files, the client end first obtains the file information table from the server end, and the server end calculates the latest file information table and sends it to the client. The main thing is to get the latest file list and exclude deleted files, so "documentation" and "product.doc" will be excluded. The file information table on the client side is shown in Table 6 below. The client will create a shortcut based on the file information table and display it in the main interface of the user's cloud disk.

表6Table 6

5当用户在2013.04.14日登录,查看2013.04.07 12:00:00历史云盘文件时,client端首先向server端获取文件信息表,server端会将最新的文件信息表计算出来发送给client,具体如下:5 When the user logs in on 2013.04.14 and checks the historical cloud disk files at 2013.04.07 12:00:00, the client side first obtains the file information table from the server side, and the server side will calculate the latest file information table and send it to the client ,details as follows:

1)、首先将2013.04.07 12:00:00和file_create对比,当file_create晚于2013.04.07 12:00:00,而且没有其他版本时会被排除,所以会将“测试”目录和“工作.doc”文件排除。1), first compare 2013.04.07 12:00:00 with file_create, when file_create is later than 2013.04.07 12:00:00, and there is no other version, it will be excluded, so the "test" directory and "work. doc" files are excluded.

2)、对于file_create早于2013.04.07 12:00:00的文件全部保留(排除已删除文件),所以“音乐”目录保留,“文档”目录需要删除,蓝色.jpg,学习.doc,研发.doc保留。2) All files whose file_create is earlier than 2013.04.07 12:00:00 are reserved (excluding deleted files), so the "music" directory is retained, and the "document" directory needs to be deleted. Blue.jpg, learning.doc, research and development .doc is reserved.

3)、接下来,对比path_back和2013.04.07 12:00:00时间,“我的图片2”目录需要回退到“我的图片”目录,回退到版本2的信息。3) Next, compare path_back with the time of 2013.04.07 12:00:00, the "My Picture 2" directory needs to roll back to the "My Picture" directory, and roll back the information of version 2.

4)、最后,对比file_back和2013.04.07 12:00:00时间,“测试.doc”需要回退到版本2;已经删除的“产品.doc”需要恢复到版本1,并且状态为未删除;“\音乐\学习.xml”需要回退到版本1。4) Finally, compare file_back and 2013.04.07 12:00:00, "Test.doc" needs to roll back to version 2; the deleted "Product.doc" needs to be restored to version 1, and the status is not deleted; "\Music\Learning.xml" needs to fall back to version 1.

5)、根据以上信息,生成新的文件信息表(表7),发送给客户端。Client 端收到文件信息表后,在云盘历史记录中根据文件信息表临时展示给客户。5) According to the above information, a new file information table (table 7) is generated and sent to the client. After the client receives the file information table, it will temporarily display it to the client in the cloud disk history according to the file information table.

表7Table 7

7、当历史信息展现在用户眼前时,用户可以进行单文件,差异文件,或一键恢复。用户查看2013.04.07 12:00:00历史信息,差异文件都会进行标注,例如用户可以选择“\音乐\学习.xml”后,进行单文件恢复,该文件所有信息都会回到版本1的信息。7. When the historical information is displayed in front of the user, the user can perform single file, differential file, or one-key recovery. When the user checks the historical information of 2013.04.07 12:00:00, the difference files will be marked. For example, the user can select "\Music\Learning.xml" to restore a single file, and all the information of the file will return to the version 1 information.

8、差异文件恢复,例如当用户选择差异文件恢复,会对比当前时间文件信息表(表6)和2013.04.07 12:00:00的文件信息表(表7),存在差异的地方,一次性恢复。所以“测试.doc”回退到版本2;已经删除的“产品.doc”重新恢复到版本1;“\音乐\学习.xml”回退到版本1。8. Differential file recovery, for example, when the user selects differential file recovery, it will compare the current time file information table (Table 6) with the file information table (Table 7) at 2013.04.07 12:00:00, where there are differences, one-time recover. So "Test.doc" rolls back to version 2; the deleted "Product.doc" restores to version 1; "\Music\Learning.xml" rolls back to version 1.

在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the 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 the understanding of this description.

类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. 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 can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including 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 understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的文件管理装置和/或文件处理装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of some or all components of the file management device and/or file processing device according to the embodiment of the present invention. Full functionality. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

本发明还公开了A1、一种文件管理方法,其包括:The present invention also discloses A1. A file management method, which includes:

建立文件信息表,所述文件信息表包括文件基本信息;Establish a file information table, the file information table includes file basic information;

当文件和/或文件路径变化时,相应地修改该文件和/或文件路径在所述文件信息表中的记录,并将该文件和/或文件路径变化前的信息记录在所述文件信息表中;When the file and/or file path changes, correspondingly revise the record of the file and/or file path in the file information table, and record the information before the file and/or file path change in the file information table middle;

其中,对于文件而言,变化前的源文件和变化后的新文件分别进行保存。Wherein, for the files, the source file before the change and the new file after the change are respectively saved.

A2、如A1所述的方法,其中,在所述文件信息表中记录该文件和/或文件路径变化前的信息,包括记录文件操作前对应的以下各项信息中的一项或多项:A2. The method as described in A1, wherein recording the file and/or information before the file path change in the file information table includes recording one or more of the following information corresponding to the file operation:

文件路径、文件路径哈希值、文件路径版本、文件创建时间、文件哈希值、文件大小和文件版本。File path, file path hash, file path version, file creation time, file hash, file size, and file version.

A3、如A1或A2所述的方法,其中,所述文件基本信息包括以下各项中的一项或多项:A3. The method described in A1 or A2, wherein the basic file information includes one or more of the following:

文件路径、文件名、文件路径哈希值、文件哈希值、文件大小、文件创建时间、文件路径版本、文件版本和文件是否已删除的信息。Information about file path, file name, file path hash, file hash, file size, file creation time, file path version, file version, and whether the file was deleted.

本发明公开了B4、一种文件处理方法,其包括:The invention discloses B4, a file processing method, which includes:

接收对文件信息表的查阅请求,其中,所述查阅请求至少包括查阅时间点A,所述文件信息表包括文件基本信息以及文件和/或文件路径变化前的信息;Receive a query request for a file information table, wherein the query request includes at least a query time point A, and the file information table includes basic file information and information before the file and/or file path changes;

根据文件信息表和查阅时间点A,获取与查阅时间点A对应的文件信息表;According to the file information table and the reference time point A, obtain the file information table corresponding to the reference time point A;

将与查阅时间点A对应的文件信息表返回给请求方。The file information table corresponding to the reference time point A is returned to the requesting party.

B5、如B4所述的方法,其中,获取查阅时间点A对应的文件信息表,进一步包括:B5. The method as described in B4, wherein obtaining the file information table corresponding to the reference time point A further includes:

将文件信息表中文件创建时间早于查阅时间点A的文件信息添加到查阅时间点A对应的文件信息表中。Add the file information in the file information table whose file creation time is earlier than the reference time point A to the file information table corresponding to the reference time point A.

B6、如B4或B5所述的方法,其中,获取查阅时间点A对应的文件信息表,进一步包括:B6. The method as described in B4 or B5, wherein obtaining the file information table corresponding to the reference time point A further includes:

当文件信息表中文件创建时间晚于查阅时间点A时,如果文件版本发生变更且记录的该文件和/或文件路径变化前的文件创建时间早于查阅时间点A,则将文件信息表中记录的该文件和/或文件路径变化前的文件信息添加到与查阅时间点A对应的文件信息表中。When the file creation time in the file information table is later than the query time point A, if the file version changes and the recorded file creation time before the file and/or file path change is earlier than the query time point A, the file information table will be The recorded file information and/or the file information before the file path change is added to the file information table corresponding to the query time point A.

B7、如B6所述的方法,其中,对比当前时间点B对应的文件信息表与查阅时间点A对应的文件信息表,将二者中相同的文件标注为未变化;将当前时间点B不具有但查阅时间点A具有的文件标注为已删除;将查阅时间点 A和当前时间点B都具有、但文件版本不同的文件标注为已修改;将查阅时间点B具有但当前时间点A不具有的文件标注为新增加。B7. The method as described in B6, wherein, comparing the file information table corresponding to the current time point B with the file information table corresponding to the reference time point A, the same files in the two are marked as unchanged; the current time point B is not changed Mark the files that exist but exist at the reference time point A as deleted; mark the files that exist at both the review time point A and the current time point B but have different file versions as modified; mark the files that exist at the review time point B but not at the current time point A Files that have are marked as new additions.

B8、如B7所述的方法,其中,当收到一键恢复消息时,将当前时间点B 对应的所有的文件恢复为查阅时间点A所对应的文件。B8. The method as described in B7, wherein, when the one-click recovery message is received, all the files corresponding to the current time point B are restored to the files corresponding to the reference time point A.

B9、如B7所述的方法,其中,当收到差异恢复消息时,将当前时间点B 对应的文件中相对于查阅时间点A所对应的文件发生变化的所有文件恢复为查阅时间点A所对应的文件。B9. The method as described in B7, wherein, when receiving the difference recovery message, all files that have changed in the file corresponding to the current time point B relative to the file corresponding to the reference time point A are restored to the files corresponding to the reference time point A. corresponding files.

B10、如B7所述的方法,其中,当收到特定文件恢复消息时,将用户选择的当前时间点B中的文件恢复为查阅时间点A时对应的文件。B10. The method as described in B7, wherein, when a specific file restoration message is received, the file at the current time point B selected by the user is restored to the file corresponding to the time point A when the user is consulted.

本发明还公开了C11、一种文件管理装置,其包括:The present invention also discloses C11, a file management device, which includes:

文件信息表建立模块,用于建立文件信息表,所述文件信息表包括文件基本信息;The file information table building module is used to set up a file information table, and the file information table includes file basic information;

记录模块,用于当文件和/或文件路径变化时,相应地修改该文件和/或文件路径在所述文件信息表中的记录,并将该文件和/或文件路径变化前的信息记录在所述文件信息表中;The recording module is used to modify the record of the file and/or file path in the file information table accordingly when the file and/or file path changes, and record the information of the file and/or file path before the change in In the document information table;

保存模块,用于对变化前的源文件和变化后的新文件分别进行保存。The saving module is used for saving the source file before the change and the new file after the change respectively.

C12、如C11所述的装置,其中,所述记录模块在所述文件信息表中记录该文件和/或文件路径变化前的信息,包括记录文件操作前对应的以下各项信息中的一项或多项:C12. The device according to C11, wherein the recording module records the information of the file and/or the file path before the change in the file information table, including one of the following items of information corresponding to the recording file operation or more:

文件路径、文件路径哈希值、文件路径版本、文件创建时间、文件哈希值、文件大小和文件版本。File path, file path hash, file path version, file creation time, file hash, file size, and file version.

C13、如C11或C12所述的装置,其中,所述文件基本信息包括以下各项中的一项或多项:C13. The device as described in C11 or C12, wherein the basic file information includes one or more of the following items:

文件路径、文件名、文件路径哈希值、文件哈希值、文件大小、文件创建时间、文件路径版本、文件版本和文件是否已删除的信息。Information about file path, file name, file path hash, file hash, file size, file creation time, file path version, file version, and whether the file was deleted.

本文还公开了D14、一种文件处理装置,其包括:This paper also discloses D14, a file processing device, which includes:

接收模块,用于接收对文件信息表的查阅请求,其中,所述查阅请求至少包括查阅时间点A,所述文件信息表包括文件基本信息以及文件和/或文件路径变化前的信息;A receiving module, configured to receive a query request for a file information table, wherein the query request includes at least a query time point A, and the file information table includes basic file information and information before the file and/or file path changes;

文件信息表获取模块,用于根据文件信息表和查阅时间点A,获取与查阅时间点A对应的文件信息表;The file information table acquisition module is used to obtain the file information table corresponding to the reference time point A according to the file information table and the reference time point A;

发送模块,用于将与查阅时间点A对应的文件信息表返回给请求方。A sending module, configured to return the file information table corresponding to the query time point A to the requester.

D15、如D14所述的装置,其中,所述文件信息表获取模块还用于:D15. The device as described in D14, wherein the file information table acquisition module is also used for:

将文件信息表中文件创建时间早于查阅时间点A的文件信息添加到查阅时间点A对应的文件信息表中。Add the file information in the file information table whose file creation time is earlier than the reference time point A to the file information table corresponding to the reference time point A.

D16、如D14或D15所述的装置,其中,所述文件信息表获取模块还用于:D16. The device as described in D14 or D15, wherein the file information table acquisition module is also used for:

当文件信息表中文件创建时间晚于查阅时间点A时,如果文件版本发生变更且记录的该文件和/或文件路径变化前的文件创建时间早于查阅时间点 A,则将文件信息表中记录的该文件和/或文件路径变化前的文件信息添加到与查阅时间点A对应的文件信息表中。When the file creation time in the file information table is later than the query time point A, if the file version changes and the recorded file creation time before the file and/or file path change is earlier than the query time point A, the file information table will be The recorded file information and/or the file information before the file path change is added to the file information table corresponding to the query time point A.

D17、如D14所述的装置,其中,所述文件信息表获取模块还用于:D17. The device as described in D14, wherein the file information table acquisition module is also used for:

对比当前时间点B对应的文件信息表与查阅时间点A对应的文件信息表,将二者中相同的文件标注为未变化;将当前时间点B不具有但查阅时间点A具有的文件标注为已删除;将查阅时间点A和当前时间点B都具有、但文件版本不同的文件标注为已修改;将查阅时间点B具有但当前时间点A不具有的文件标注为新增加。Compare the file information table corresponding to the current time point B with the file information table corresponding to the reference time point A, and mark the same files in the two as unchanged; mark the files that the current time point B does not have but the reference time point A has as Deleted; mark the files that have both the reference time point A and the current time point B but have different file versions as modified; mark the files that have the reference time point B but not the current time point A as newly added.

D18、如D17所述的装置,其中,所述文件处理装置还包括:D18. The device as described in D17, wherein the file processing device further includes:

一键恢复模块,用于当收到一键恢复消息时,将当前时间点B对应的所有的文件恢复为查阅时间点A所对应的文件。The one-key recovery module is configured to restore all the files corresponding to the current time point B to the files corresponding to the reference time point A when the one-key recovery message is received.

D19、如D17所述的装置,其中,所述文件处理装置还包括:D19. The device as described in D17, wherein the file processing device further includes:

差异恢复模块,用于当收到差异恢复消息时,将当前时间点B对应的文件中相对于查阅时间点A所对应的文件发生变化的所有文件恢复为查阅时间点A所对应的文件。The difference recovery module is configured to restore all files that have changed from the file corresponding to the reference time point A among the files corresponding to the current time point B to the files corresponding to the reference time point A when receiving the difference recovery message.

D20、如D17所述的装置,其中,所述文件处理装置还包括:D20. The device as described in D17, wherein the file processing device further includes:

特定文件恢复模块,用于当收到特定文件恢复消息时,将用户选择的当前时间点B中的文件恢复为查阅时间点A时对应的文件。The specific file restoration module is configured to restore the file at the current time point B selected by the user to the file corresponding to the reference time point A when the specific file restoration message is received.

本发明还公开了E21、一种文件处理系统,其中,包括终端、C11~C13 任一项所述的文件管理装置,以及D14~D20任一项所述的文件处理装置。The present invention also discloses E21, a file processing system, which includes a terminal, the file management device described in any one of C11-C13, and the file processing device described in any one of D14-D20.

Claims (19)

1.一种文件管理方法,基于云服务端,其包括:1. A file management method, based on a cloud server, comprising: 建立文件信息表,所述文件信息表包括文件基本信息;Establish a file information table, the file information table includes file basic information; 当文件和/或文件路径变化时,相应地修改该文件和/或文件路径在所述文件信息表中的记录,并将该文件和/或文件路径变化前的信息记录在所述文件信息表中;其中,所述文件路径包括文件在客户端所创建的目录位置;When the file and/or file path changes, correspondingly revise the record of the file and/or file path in the file information table, and record the information before the file and/or file path change in the file information table In; wherein, the file path includes the directory location of the file created by the client; 其中,对于文件而言,变化前的源文件和变化后的新文件分别进行保存;Wherein, for the file, the source file before the change and the new file after the change are saved separately; 在所述文件信息表中记录该文件和/或文件路径变化前的信息,包括记录文件操作前对应的以下各项信息中的一项或多项:文件路径、文件路径哈希值、文件路径版本、文件创建时间、文件哈希值、文件大小和文件版本。Record the information of the file and/or the file path before the change in the file information table, including one or more of the following information corresponding to the file operation before recording: file path, file path hash value, file path version, file creation time, file hash, file size, and file version. 2.如权利要求1所述的方法,其中,所述文件基本信息包括以下各项中的一项或多项:2. The method according to claim 1, wherein the basic file information includes one or more of the following: 文件路径、文件名、文件路径哈希值、文件哈希值、文件大小、文件创建时间、文件路径版本、文件版本和文件是否已删除的信息。Information about file path, file name, file path hash, file hash, file size, file creation time, file path version, file version, and whether the file was deleted. 3.一种文件处理方法,基于云服务端,其包括:3. A file processing method, based on a cloud server, comprising: 接收对文件信息表的查阅请求,其中,所述查阅请求至少包括查阅时间点A,所述文件信息表包括文件基本信息以及文件和/或文件路径变化前的信息;其中,所述文件路径包括文件在客户端所创建的目录位置;Receive a query request for a file information table, wherein the query request includes at least a query time point A, and the file information table includes basic file information and information before the file and/or file path changes; wherein the file path includes The directory location of the file created by the client; 根据文件信息表和查阅时间点A,获取与查阅时间点A对应的文件信息表;According to the file information table and the reference time point A, obtain the file information table corresponding to the reference time point A; 将与查阅时间点A对应的文件信息表返回给请求方;Return the file information table corresponding to the reference time point A to the requesting party; 根据当前时间点B对应的文件信息表与查阅时间点A对应的文件信息表,接收如下至少一种对文件的恢复消息:一键恢复消息、差异恢复消息、特定文件恢复消息。According to the file information table corresponding to the current time point B and the file information table corresponding to the reference time point A, at least one of the following file recovery messages is received: a one-key recovery message, a difference recovery message, and a specific file recovery message. 4.如权利要求3所述的方法,其中,获取查阅时间点A对应的文件信息表,进一步包括:4. The method according to claim 3, wherein obtaining the file information table corresponding to the reference time point A further comprises: 将文件信息表中文件创建时间早于查阅时间点A的文件信息添加到查阅时间点A对应的文件信息表中。Add the file information in the file information table whose file creation time is earlier than the reference time point A to the file information table corresponding to the reference time point A. 5.如权利要求3或4所述的方法,其中,获取查阅时间点A对应的文件信息表,进一步包括:5. The method according to claim 3 or 4, wherein obtaining the file information table corresponding to the reference time point A further comprises: 当文件信息表中文件创建时间晚于查阅时间点A时,如果文件版本发生变更且记录的该文件和/或文件路径变化前的文件创建时间早于查阅时间点A,则将文件信息表中记录的该文件和/或文件路径变化前的文件信息添加到与查阅时间点A对应的文件信息表中。When the file creation time in the file information table is later than the query time point A, if the file version changes and the recorded file creation time before the file and/or file path change is earlier than the query time point A, the file information table will be The recorded file information and/or the file information before the file path change is added to the file information table corresponding to the query time point A. 6.如权利要求5所述的方法,其中,对比当前时间点B对应的文件信息表与查阅时间点A对应的文件信息表,将二者中相同的文件标注为未变化;将当前时间点B不具有但查阅时间点A具有的文件标注为已删除;将查阅时间点A和当前时间点B都具有、但文件版本不同的文件标注为已修改;将查阅时间点B具有但当前时间点A不具有的文件标注为新增加。6. The method according to claim 5, wherein, comparing the file information table corresponding to the current time point B with the file information table corresponding to the reference time point A, the same files in the two are marked as unchanged; the current time point Mark the files that B does not have but have the reference time point A as deleted; mark the files that have both the reference time point A and the current time point B but have different file versions as modified; mark the files that the review time point B has but the current time point Files that A does not have are marked as new additions. 7.如权利要求6所述的方法,其中,当收到一键恢复消息时,将当前时间点B对应的所有的文件恢复为查阅时间点A所对应的文件。7. The method according to claim 6, wherein, when the one-click restore message is received, all files corresponding to the current time point B are restored to the files corresponding to the reference time point A. 8.如权利要求6所述的方法,其中,当收到差异恢复消息时,将当前时间点B对应的文件中相对于查阅时间点A所对应的文件发生变化的所有文件恢复为查阅时间点A所对应的文件。8. The method according to claim 6, wherein, when a difference recovery message is received, all files that have changed in the file corresponding to the current time point B relative to the file corresponding to the reference time point A are restored to the reference time point The file corresponding to A. 9.如权利要求6所述的方法,其中,当收到特定文件恢复消息时,将用户选择的当前时间点B中的文件恢复为查阅时间点A时对应的文件。9. The method according to claim 6, wherein, when the specific file recovery message is received, the file at the current time point B selected by the user is restored to the file corresponding to the reference time point A. 10.一种文件管理装置,基于云服务器,其包括:10. A file management device, based on a cloud server, comprising: 文件信息表建立模块,用于建立文件信息表,所述文件信息表包括文件基本信息;The file information table building module is used to set up a file information table, and the file information table includes file basic information; 记录模块,用于当文件和/或文件路径变化时,相应地修改该文件和/或文件路径在所述文件信息表中的记录,并将该文件和/或文件路径变化前的信息记录在所述文件信息表中;其中,所述文件路径包括文件在客户端所创建的目录位置;The recording module is used to modify the record of the file and/or file path in the file information table accordingly when the file and/or file path changes, and record the information of the file and/or file path before the change in In the file information table; wherein, the file path includes the directory location of the file created by the client; 保存模块,用于对变化前的源文件和变化后的新文件分别进行保存;A saving module is used to save the source file before the change and the new file after the change respectively; 所述记录模块在所述文件信息表中记录该文件和/或文件路径变化前的信息,包括记录文件操作前对应的以下各项信息中的一项或多项:文件路径、文件路径哈希值、文件路径版本、文件创建时间、文件哈希值、文件大小和文件版本。The recording module records the information of the file and/or the file path before the change in the file information table, including one or more of the following information corresponding to the file operation before recording: file path, file path hash value, file path version, file creation time, file hash, file size, and file version. 11.如权利要求10所述的装置,其中,所述文件基本信息包括以下各项中的一项或多项:11. The device according to claim 10, wherein the basic file information includes one or more of the following: 文件路径、文件名、文件路径哈希值、文件哈希值、文件大小、文件创建时间、文件路径版本、文件版本和文件是否已删除的信息。Information about file path, file name, file path hash, file hash, file size, file creation time, file path version, file version, and whether the file was deleted. 12.一种文件处理装置,基于云服务器,其包括:12. A file processing device, based on a cloud server, comprising: 接收模块,用于接收对文件信息表的查阅请求,其中,所述查阅请求至少包括查阅时间点A,所述文件信息表包括文件基本信息以及文件和/或文件路径变化前的信息;其中,所述文件路径包括文件在客户端所创建的目录位置;A receiving module, configured to receive a query request for a file information table, wherein the query request includes at least a query time point A, and the file information table includes basic file information and information before the file and/or file path changes; wherein, The file path includes the directory location of the file created by the client; 文件信息表获取模块,用于根据文件信息表和查阅时间点A,获取与查阅时间点A对应的文件信息表;The file information table acquisition module is used to obtain the file information table corresponding to the reference time point A according to the file information table and the reference time point A; 发送模块,用于将与查阅时间点A对应的文件信息表返回给请求方;A sending module, configured to return the file information table corresponding to the query time point A to the requester; 所述接收模块,还用于根据当前时间点B对应的文件信息表与查阅时间点A对应的文件信息表,接收如下至少一种对文件的恢复消息:一键恢复消息、差异恢复消息、特定文件恢复消息。The receiving module is also configured to receive at least one of the following recovery messages for files according to the file information table corresponding to the current time point B and the file information table corresponding to the reference time point A: one-key recovery message, difference recovery message, specific File recovery message. 13.如权利要求12所述的装置,其中,所述文件信息表获取模块还用于:13. The device according to claim 12, wherein the file information table acquisition module is also used for: 将文件信息表中文件创建时间早于查阅时间点A的文件信息添加到查阅时间点A对应的文件信息表中。Add the file information in the file information table whose file creation time is earlier than the reference time point A to the file information table corresponding to the reference time point A. 14.如权利要求12或13所述的装置,其中,所述文件信息表获取模块还用于:14. The device according to claim 12 or 13, wherein the file information table acquisition module is also used for: 当文件信息表中文件创建时间晚于查阅时间点A时,如果文件版本发生变更且记录的该文件和/或文件路径变化前的文件创建时间早于查阅时间点A,则将文件信息表中记录的该文件和/或文件路径变化前的文件信息添加到与查阅时间点A对应的文件信息表中。When the file creation time in the file information table is later than the query time point A, if the file version changes and the recorded file creation time before the file and/or file path change is earlier than the query time point A, the file information table will be The recorded file information and/or the file information before the file path change is added to the file information table corresponding to the query time point A. 15.如权利要求12所述的装置,其中,所述文件信息表获取模块还用于:15. The device according to claim 12, wherein the file information table acquisition module is also used for: 对比当前时间点B对应的文件信息表与查阅时间点A对应的文件信息表,将二者中相同的文件标注为未变化;将当前时间点B不具有但查阅时间点A具有的文件标注为已删除;将查阅时间点A和当前时间点B都具有、但文件版本不同的文件标注为已修改;将查阅时间点B具有但当前时间点A不具有的文件标注为新增加。Compare the file information table corresponding to the current time point B with the file information table corresponding to the reference time point A, and mark the same files in the two as unchanged; mark the files that the current time point B does not have but the reference time point A has as Deleted; mark the files that have both the reference time point A and the current time point B but have different file versions as modified; mark the files that have the reference time point B but not the current time point A as newly added. 16.如权利要求15所述的装置,其中,所述文件处理装置还包括:16. The device according to claim 15, wherein the file processing device further comprises: 一键恢复模块,用于当收到一键恢复消息时,将当前时间点B对应的所有的文件恢复为查阅时间点A所对应的文件。The one-key recovery module is configured to restore all the files corresponding to the current time point B to the files corresponding to the reference time point A when the one-key recovery message is received. 17.如权利要求15所述的装置,其中,所述文件处理装置还包括:17. The device according to claim 15, wherein the file processing device further comprises: 差异恢复模块,用于当收到差异恢复消息时,将当前时间点B对应的文件中相对于查阅时间点A所对应的文件发生变化的所有文件恢复为查阅时间点A所对应的文件。The difference recovery module is configured to restore all files that have changed from the file corresponding to the reference time point A among the files corresponding to the current time point B to the files corresponding to the reference time point A when receiving the difference recovery message. 18.如权利要求15所述的装置,其中,所述文件处理装置还包括:18. The device according to claim 15, wherein the file processing device further comprises: 特定文件恢复模块,用于当收到特定文件恢复消息时,将用户选择的当前时间点B中的文件恢复为查阅时间点A时对应的文件。The specific file restoration module is configured to restore the file at the current time point B selected by the user to the file corresponding to the reference time point A when the specific file restoration message is received. 19.一种文件处理系统,其中,包括终端、权利要求10~11任一项所述的文件管理装置,以及权利要求12~18任一项所述的文件处理装置。19. A file processing system, comprising a terminal, the file management device according to any one of claims 10-11, and the file processing device according to any one of claims 12-18.
CN201310292209.5A 2013-07-12 2013-07-12 file management and processing method, device and system Active CN103365996B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310292209.5A CN103365996B (en) 2013-07-12 2013-07-12 file management and processing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310292209.5A CN103365996B (en) 2013-07-12 2013-07-12 file management and processing method, device and system

Publications (2)

Publication Number Publication Date
CN103365996A CN103365996A (en) 2013-10-23
CN103365996B true CN103365996B (en) 2017-11-03

Family

ID=49367337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310292209.5A Active CN103365996B (en) 2013-07-12 2013-07-12 file management and processing method, device and system

Country Status (1)

Country Link
CN (1) CN103365996B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104866508B (en) * 2014-02-26 2019-05-03 中国电信股份有限公司 The method and apparatus of file is managed under cloud environment
CN106156129A (en) * 2015-04-08 2016-11-23 联想(北京)有限公司 File management method and device
CN106528677A (en) * 2016-10-31 2017-03-22 努比亚技术有限公司 Data comparison method and device
CN106528331A (en) * 2016-10-31 2017-03-22 努比亚技术有限公司 Data recovery method and device
US10747719B2 (en) * 2017-09-22 2020-08-18 Microsoft Technology Licensing, Llc File system point-in-time restore using recycle bin and version history
CN108519897A (en) * 2018-03-01 2018-09-11 惠州Tcl移动通信有限公司 Intelligent terminal and its file management method, the device with store function
CN109840087B (en) * 2018-12-29 2020-12-25 北京三快在线科技有限公司 Interface design system and method, computer readable storage medium
CN110309102A (en) * 2019-07-10 2019-10-08 牛文运 A kind of batch documents generation method and system
CN110888758A (en) * 2019-11-15 2020-03-17 天津联想协同科技有限公司 File control method, file recovery method, file control device, file recovery device and storage medium
CN114942912B (en) * 2022-07-25 2022-12-23 天津联想协同科技有限公司 Network disk file collection method and device, network disk and storage medium
CN116010364B (en) * 2023-03-27 2023-08-04 天津联想协同科技有限公司 Method and device for updating network disk file state, network disk and storage medium
CN116361071B (en) * 2023-03-31 2024-04-05 摩尔线程智能科技(北京)有限责任公司 Backup file generation method, device, equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4446738B2 (en) * 2001-08-20 2010-04-07 データセンターテクノロジーズ エヌ.ヴイ. System and method for efficiently backing up computer files
US20060117008A1 (en) * 2004-11-17 2006-06-01 Kabushiki Kaisha Toshiba File management apparatus and file management program
KR100667827B1 (en) * 2005-11-02 2007-01-11 삼성전자주식회사 Method for managing content file information, recording medium recording apparatus and program for performing the method
CN101403988B (en) * 2008-11-05 2011-01-12 中国科学院计算技术研究所 System and method for file backup in computer system
CN103092718A (en) * 2011-10-27 2013-05-08 鸿富锦精密工业(深圳)有限公司 Test data backup system and method
CN102810138B (en) * 2012-06-19 2015-12-02 北京奇虎科技有限公司 A kind of restorative procedure of user side file and system
CN103150342B (en) * 2013-02-05 2016-08-03 珠海市君天电子科技有限公司 User is obtained the method and system that file is managed

Also Published As

Publication number Publication date
CN103365996A (en) 2013-10-23

Similar Documents

Publication Publication Date Title
CN103365996B (en) file management and processing method, device and system
US20220147489A1 (en) System, method, and computer program for enabling a user to access and edit via a virtual drive objects synchronized to a plurality of synchronization clients
US10848557B2 (en) Server-side selective synchronization
US11074396B2 (en) Animating edits to documents
US11113463B2 (en) Note browser
US10242045B2 (en) Filtering content using synchronization data
US8838681B2 (en) Systems and methods for adding digital content to content management service accounts
CN107077483B (en) Synchronization of shared folders and files
US9367646B2 (en) Document and user metadata storage
US11308449B2 (en) Storing metadata inside file to reference shared version of file
US9374359B2 (en) Generating a data display in view of user activities
US9628546B2 (en) Systems and methods for downloading files
US9465856B2 (en) Cloud-based document suggestion service
US20140281875A1 (en) Multi-user layer annotation
US20150172239A1 (en) Saving message attachments to an online content management system
WO2013130588A1 (en) Synchronizing local clients with a cloud-based data storage system
US11630554B2 (en) Display of a plurality of files from multiple devices
CN106101265A (en) Method for synchronizing files between network disk and desktop end
JP7355964B2 (en) External location synchronization
JP7355959B2 (en) External location synchronization
JP4507609B2 (en) File management program and file management apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220725

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.