WO2016054858A1 - 一种恢复系统文件索引的方法及装置 - Google Patents

一种恢复系统文件索引的方法及装置 Download PDF

Info

Publication number
WO2016054858A1
WO2016054858A1 PCT/CN2014/092639 CN2014092639W WO2016054858A1 WO 2016054858 A1 WO2016054858 A1 WO 2016054858A1 CN 2014092639 W CN2014092639 W CN 2014092639W WO 2016054858 A1 WO2016054858 A1 WO 2016054858A1
Authority
WO
WIPO (PCT)
Prior art keywords
index
file
information set
index information
storage medium
Prior art date
Application number
PCT/CN2014/092639
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 深圳市锐明视讯技术有限公司
Priority to SG11201602649UA priority Critical patent/SG11201602649UA/en
Priority to US15/030,530 priority patent/US20160253247A1/en
Publication of WO2016054858A1 publication Critical patent/WO2016054858A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • G06F11/1451Management of the data involved in backup or backup restore by selection of backup contents
    • 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
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/80Database-specific techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/805Real-time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/84Using snapshots, i.e. a logical point-in-time copy of the data

Definitions

  • the present invention relates to the field of data storage methods, and in particular, to a method and apparatus for restoring a system file index.
  • the working mechanism of the universal file system has one thing in common: file management based on indexes.
  • the index data is usually stored in the memory, and the update of these key data is not synchronized back to the storage medium in real time.
  • the index data of the memory and the storage medium is not synchronized, which may result in the destruction of the index data integrity of the file system.
  • the key index information of the file system is damaged.
  • the upper layer application such as the video storage program, reads the abnormal value, has no corresponding processing flow, and can only terminate, forming a fault that repeatedly restarts without recording.
  • the invention provides a method and a device for restoring a system file index, and overcomes the defect of repeatedly restarting and not recording.
  • the present invention provides a method of restoring a system file index, the method comprising:
  • step E When loading the storage medium, it is determined whether the index information set is read, and if so, step E is performed, and if not, step B is performed;
  • step E determining whether the index in the index information set is correct, if not, executing step E;
  • step E When the reading operation is performed on the first file in the storage medium, determining whether the index of the first file in the index information set is consistent with the backup index in the first file, and if not, executing the step E;
  • step E When performing a write operation on the second file of the storage medium, determining whether the index of the second file in the index information set is consistent with the backup index in the second file, and if not, executing step E;
  • the present invention provides an apparatus for restoring a system file index, the apparatus comprising:
  • a first determining module configured to determine, when loading the storage medium, whether the index information set is read
  • a second determining module configured to determine whether an index in the index information set is correct
  • a third determining module configured to determine, when the first file in the storage medium is read, whether an index of the first file in the index information set is consistent with a backup index in the first file ;
  • a fourth determining module configured to determine, during a write operation on the second file of the storage medium, whether an index of the second file in the index information set is consistent with a backup index in the second file;
  • a repair reconstruction module configured to update a backup index of all files in the storage medium, and repair or reconstruct the index information set.
  • the storage medium when the storage medium is loaded and the index information set is not read, or when the storage medium is loaded and the index in the index information set is judged to be incorrect, or the file in the storage medium is read and the file is indexed Update the backup of all files in the storage medium when the index in the information set is inconsistent with the backup index in the file, or when the file in the storage medium is written and the index in the index information set is inconsistent with the backup index in the file. Indexing, and repairing or rebuilding the index information set, thus overcoming the drawback of repeated restarts without recording.
  • FIG. 1 is a flowchart of a method for restoring a system file index according to Embodiment 1 of the present invention
  • FIG. 2 is another flowchart of a method for restoring a system file index according to Embodiment 1 of the present invention
  • FIG. 3 is a flowchart of a method for restoring a system file index according to Embodiment 2 of the present invention.
  • FIG. 4 is a schematic structural diagram of an apparatus for restoring a system file index according to Embodiment 3 of the present invention.
  • FIG. 5 is another schematic structural diagram of an apparatus for restoring a system file index according to Embodiment 3 of the present invention.
  • FIG. 6 is a schematic diagram of a device repair module structure for restoring a system file index according to Embodiment 3 of the present invention.
  • FIG. 7 is another schematic diagram of a device repair module structure for restoring a system file index according to Embodiment 3 of the present invention.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • Embodiment 1 of the present invention provides a method for restoring a system file index.
  • a method for restoring a system file index includes the following steps:
  • step 101a When the storage medium is loaded, it is determined whether the index information set is read, if not, step 103 is performed, and if so, step 102a is performed;
  • step 101b When performing a read operation on the first file in the storage medium, determining whether the index of the first file in the index information set is consistent with the backup index in the first file, and if not, executing step 103;
  • step 100 is further included before steps 101a, 101b, and 101c:
  • the index information set is first read. If the index information set is read, it is determined whether the index in the index information set is correct. If it is determined that the index in the index information set is wrong, all the storage mediums are updated. Back up the index of the file and fix or rebuild the index information set.
  • first create a file and allocate an address space (00000 to the file to be created (file 3). 004H5), adding an index of the file to be created (file 3) in the index information set, and storing a corresponding backup index in the file to be created (file 3); when writing the file 3, when the file 3 is in the index information set
  • the backup index of all files in the storage medium is updated, and the index information set is repaired or rebuilt.
  • This embodiment is performed by loading a storage medium and not reading the index information set, or when loading the storage medium and determining that the index in the index information set is incorrect, or performing a read operation on the file in the storage medium and the file is indexed Update the backup of all files in the storage medium when the index in the information set is inconsistent with the backup index in the file, or when the file in the storage medium is written and the index in the index information set is inconsistent with the backup index in the file. Indexing, and repairing or rebuilding the index information set, thus overcoming the drawback of repeated restarts without recording.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • the second embodiment of the present invention provides a method for restoring a system file index.
  • the method for restoring a system file index includes the following steps:
  • step 203 Determine one by one whether the index in the index information set and the backup index in the corresponding file are consistent, if not, proceed to step 203;
  • step 203 is performed;
  • step 203 is performed;
  • index information set when loading a hard disk, traversing the data in the hard disk, if the index information set exists, it is judged one by one whether the index in the index information set is consistent with the backup index in the corresponding file, if the index in the index information set and the backup index in the corresponding file If the data is inconsistent, all the data in the storage medium is read, the backup index of all files in the storage medium is updated, and the index in the index information set is updated and replaced according to the updated backup index of all the files.
  • Update the backup index of all files in the storage medium delete the index information set, and store the backup indexes of all the updated files in a one-dimensional array to re-establish the index information set.
  • the index of the file 3 in the index information set is consistent with the backup index in the file 3.
  • the index of the file 3 in the index information set is inconsistent with the backup index in the file 3.
  • Read all the data in the storage medium update the backup index of all files in the storage medium, delete the index information set, and store the backup indexes of all the updated files in a one-dimensional array to re-establish the index information set.
  • step 201a is a specific refinement step of step 101a in FIG. 1;
  • step 202a is a specific refinement step of step 102a in FIG. 1;
  • step 103 in FIG. 1 is to update all files in the storage medium
  • step 103 includes step 203 and step 204a in the embodiment;
  • step 103 in FIG. 1 is to update the backup index of all the files in the storage medium, and rebuild the index information set,
  • Step 103 includes step 203 and step 204b in this embodiment.
  • This embodiment passes the index and file of the file in the index information set when the storage medium is loaded and the index information set is not read, or when the storage medium is loaded and the index in the index information set is judged to be incorrect, or the file is read.
  • the backup indexes in the inconsistency are inconsistent, or when the file is written and the index of the file in the index information set is inconsistent with the backup index in the file, all the data in the storage medium is read, and the backup index of all the files in the storage medium is updated. And updating and replacing the index in the index information set according to the updated backup index of all files, or updating the backup index of all files in the storage medium, deleting the index information set, and updating all the files in a one-dimensional array form.
  • the backup index is stored for re-establishing the index information set, thus overcoming the drawback of repeated restarts without recording.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • the third embodiment of the present invention provides an apparatus for restoring a system file index.
  • the apparatus 40 for restoring a system file index includes a first determining module 410, a detecting module 420, a second determining module 430, and a third determining module. 440 and repair module 450.
  • the first determining module 410 is configured to determine, when loading the storage medium, whether the index information set is read;
  • the second determining module 420 is configured to determine whether the index in the index information set is correct
  • the third determining module 430 is configured to determine, when performing a read operation on the first file in the storage medium, whether the index of the first file in the index information set is consistent with the backup index in the first file;
  • the fourth determining module 440 is configured to determine, when performing a write operation on the second file of the storage medium, whether the index of the second file in the index information set is consistent with the backup index in the second file;
  • the repair reconstruction module 450 is configured to update a backup index of all files in the storage medium and repair or reconstruct the index information set.
  • the apparatus 50 for restoring the system file index further includes:
  • the creating module 460 is configured to allocate an address space for the file to be created, add an index of the file to be created in the index information set, and store a corresponding backup index in the file to be created.
  • the repair and reconstruction module 450 when the repair and reconstruction module 450 repairs the index information set, the repair and reconstruction module 450 includes:
  • the first reading unit 451a is configured to read all data in the storage medium.
  • the repairing unit 452a is configured to update a backup index of all files in the storage medium, and update and replace the index in the index information set according to the updated backup index of all the files.
  • the repair and reconstruction module 450 when the repair and reconstruction module 450 reconstructs the index information set, the repair and reconstruction module 450 includes:
  • the second reading unit 451b is configured to read all the data in the storage medium.
  • the reconstruction unit 452b is configured to update a backup index of all files in the storage medium, delete the index information set, and store the backup indexes of all the updated files in a one-dimensional array form to re-establish the index information set.
  • This embodiment is performed by loading a storage medium and not reading the index information set, or when loading the storage medium and determining that the index in the index information set is incorrect, or performing a read operation on the file in the storage medium and the file is indexed Update the backup of all files in the storage medium when the index in the information set is inconsistent with the backup index in the file, or when the file in the storage medium is written and the index in the index information set is inconsistent with the backup index in the file. Indexing, and repairing or rebuilding the index information set, thus overcoming the drawback of repeated restarts without recording.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Abstract

本发明提供了一种恢复系统文件索引的方法及装置,属于数据储存方法领域。在本发明中,在加载存储介质并且未读取到索引信息集时,或在加载存储介质并且判断索引信息集中的索引不正确时,或在对存储介质中的文件进行读取操作并且文件在索引信息集中的索引与文件中的备份索引不一致时,或在对存储介质中的文件进行写操作并且文件在索引信息集中的索引与文件中的备份索引不一致时,更新存储介质中的所有文件的备份索引,并修复或重建索引信息集。本发明通过所述恢复系统文件索引的方法及装置,克服了反复重启不录像的缺陷。

Description

一种恢复系统文件索引的方法及装置 技术领域
本发明涉及数据储存方法领域,特别涉及一种恢复系统文件索引的方法及装置。
背景技术
通用文件系统的工作机制有一个共同点:基于索引实现文件管理。运行过程中,通常把索引数据存放在内存,这些关键数据的更新并没有实时同步回存储介质。遇到突然断电,内存和存储介质的索引数据来不及同步,会造成文件系统的索引数据完整性被破坏。
索引信息被破坏后,对应的录像文件虽然实际上还存在存储介质中,但无法读取到,除非使用离线工具修复索引。失去索引的录像文件相当于被删除。
文件系统的关键索引信息受到破坏,上层应用,如录像存储程序,读取到异常的值,没有对应的处理流程,只能终止,形成反复重启不录像的故障。
技术问题
本发明提供了一种恢复系统文件索引的方法及装置,克服了反复重启不录像的缺陷。
技术解决方案
一方面,本发明提供了一种恢复系统文件索引的方法,所述方法包括:
A. 在加载存储介质时,判断是否读取到索引信息集,若是,则执行步骤E,若否,则执行步骤B;
B. 判断所述索引信息集中的索引是否正确,若否,则执行步骤E;
C. 在对所述存储介质中的第一文件进行读取操作时,判断所述第一文件在所述索引信息集中的索引与所述第一文件中的备份索引是否一致,若否,则执行步骤E;
D. 在对所述存储介质的第二文件进行写操作时,判断所述第二文件在所述索引信息集中的索引与所述第二文件中的备份索引是否一致,若否,则执行步骤E;
E. 更新所述存储介质中的所有文件的备份索引,并修复或重建所述索引信息集。
第二方面,本发明提供了一种恢复系统文件索引的装置,所述装置包括:
第一判断模块,用于在加载存储介质时,判断是否读取到索引信息集;
第二判断模块,用于判断所述索引信息集中的索引是否正确;
第三判断模块,用于在对所述存储介质中的第一文件进行读取操作时,判断所述第一文件在所述索引信息集中的索引与所述第一文件中的备份索引是否一致;
第四判断模块,用于在对所述存储介质的第二文件进行写操作时,判断所述第二文件在所述索引信息集中的索引与所述第二文件中的备份索引是否一致;
修复重建模块,用于更新所述存储介质中所有文件的备份索引,并修复或重建所述索引信息集。
有益效果
在本发明中在加载存储介质并且未读取到索引信息集时,或在加载存储介质并且判断索引信息集中的索引不正确时,或在对存储介质中的文件进行读取操作并且文件在索引信息集中的索引与文件中的备份索引不一致时,或在对存储介质中的文件进行写操作并且文件在索引信息集中的索引与文件中的备份索引不一致时,更新存储介质中的所有文件的备份索引,并修复或重建索引信息集,因此,克服了反复重启不录像的缺陷。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例一提供的恢复系统文件索引的方法一种流程图;
图2为本发明实施例一提供的恢复系统文件索引的方法另一种流程图;
图3为本发明实施例二提供的恢复系统文件索引的方法一种流程图;
图4为本发明实施例三提供的恢复系统文件索引的装置一种结构示意图;
图5为本发明实施例三提供的恢复系统文件索引的装置另一种结构示意图;
图6为本发明实施例三提供的一种恢复系统文件索引的装置修复模块结构一种示意图;
图7为本发明实施例三提供的一种恢复系统文件索引的装置修复模块结构另一种示意图。
本发明的实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。
实施例一:
本发明实施例一提供了一种恢复系统文件索引的方法,参见图1,恢复系统文件索引的方法包括以下步骤:
101a. 在加载存储介质时,判断是否读取到索引信息集,若否,则执行步骤103,若是,则执行步骤102a;
102a. 判断索引信息集中的索引是否正确,若否,则执行步骤103;
101b. 在对存储介质中的第一文件进行读取操作时,判断第一文件在索引信息集中的索引与第一文件中的备份索引是否一致,若否,则执行步骤103;
101c. 在对存储介质的第二文件进行写操作时,判断第二文件在索引信息集中的索引与第二文件中的备份索引是否一致,若否,则执行步骤103;
103. 更新存储介质中的所有文件的备份索引,并修复或重建索引信息集。
优选的,如图2所示,在步骤101a、101b和101c之前还包括步骤 100:
100. 为待创建文件分配地址空间,在索引信息集中添加待创建文件的索引,在待创建文件中存储对应的备份索引。
例如,在加载硬盘时,先读取索引信息集,若读取到索引信息集,则判断索引信息集中的索引是否正确,若判断索引信息集中的索引是错误的,则更新存储介质中的所有文件的备份索引,并修复或重建索引信息集。
再例如,先进行创建文件,为待创建文件(文件3)分配地址空间(00000至 004H5),在索引信息集中添加待创建文件(文件3)的索引,在待创建文件(文件3)中存储对应的备份索引;在对文件3进行写操作时,当文件3在索引信息集中的索引与文件3中的备份索引不一致时,更新存储介质中的所有文件的备份索引,并修复或重建索引信息集。
本实施例通过在加载存储介质并且未读取到索引信息集时,或在加载存储介质并且判断索引信息集中的索引不正确时,或在对存储介质中的文件进行读取操作并且文件在索引信息集中的索引与文件中的备份索引不一致时,或在对存储介质中的文件进行写操作并且文件在索引信息集中的索引与文件中的备份索引不一致时,更新存储介质中的所有文件的备份索引,并修复或重建索引信息集,因此,克服了反复重启不录像的缺陷。
实施例二:
本发明实施例二提供了一种恢复系统文件索引的方法,参见图3,恢复系统文件索引的方法包括以下步骤:
201a. 对所述存储介质中的所有数据进行读取,判断所述数据中是否存在索引信息集,若否,则执行步骤203,若是,则执行步骤202a;
202a. 逐个判断索引信息集中的索引与对应文件中的备份索引是否一致,若否,则执行步骤203;
201b. 在对存储介质中的第一文件进行读取操作时,判断第一文件在索引信息集中的索引与第一文件中的备份索引是否一致,若否,则执行步骤203;
201c. 在对存储介质的第二文件进行写操作时,判断第二文件在索引信息集中的索引与第二文件中的备份索引是否一致,若否,则执行步骤203;
203. 对存储介质中的所有数据进行读取;
204a. 更新存储介质中所有文件的备份索引,并根据更新后的所有文件的备份索引对索引信息集中的索引进行更新替换;
例如,在加载硬盘时,遍历硬盘中的数据,若索引信息集存在,则逐个判断索引信息集中的索引与对应文件中的备份索引是否一致,若索引信息集中的索引与对应文件中的备份索引不一致,则对存储介质中的所有数据进行读取,更新存储介质中所有文件的备份索引,并根据更新后的所有文件的备份索引对索引信息集中的索引进行更新替换。
204b. 更新存储介质中所有文件的备份索引,删除索引信息集,并以一维数组形式对更新后的所有文件的备份索引进行存储以重新建立索引信息集。
例如,在对文件3进行读操作时,判断文件3在索引信息集中的索引与文件3中的备份索引是否一致,当文件3在索引信息集中的索引与文件3中的备份索引不一致时,则对存储介质中的所有数据进行读取,更新存储介质中所有文件的备份索引,删除索引信息集,并以一维数组形式对更新后的所有文件的备份索引进行存储以重新建立索引信息集。
其中,步骤201a是对图1中的步骤101a的具体细化步骤;步骤202a是对图1中的步骤102a的具体细化步骤;当图1中的步骤103为更新存储介质中的所有文件的备份索引,并修复索引信息集时,步骤103包括本实施例中的步骤203和步骤204a;当图1中的步骤103为更新存储介质中的所有文件的备份索引,并重建索引信息集时,步骤103包括本实施例中的步骤203和步骤204b。
本实施例通过在加载存储介质并且未读取到索引信息集时,或在加载存储介质并且判断索引信息集中的索引不正确时,或在对文件进行读操作并且索引信息集中文件的索引与文件中的备份索引不一致时,或在对文件进行写操作并且索引信息集中文件的索引与文件中的备份索引不一致时,对存储介质中的所有数据进行读取,更新存储介质中所有文件的备份索引,并根据更新后的所有文件的备份索引对索引信息集中的索引进行更新替换,或更新存储介质中所有文件的备份索引,删除索引信息集,并以一维数组形式对更新后的所有文件的备份索引进行存储以重新建立索引信息集,因此,克服了反复重启不录像的缺陷。
实施例三:
本发明实施例三提供了一种恢复系统文件索引的装置,如图4所示,恢复系统文件索引的装置40包括第一判断模块410、检测模块420、第二判断模块430、第三判断模块440和修复模块450。
第一判断模块410,用于在加载存储介质时,判断是否读取到索引信息集;
第二判断模块420,用于判断索引信息集中的索引是否正确;
第三判断模块430,用于在对存储介质中的第一文件进行读取操作时,判断第一文件在索引信息集中的索引与第一文件中的备份索引是否一致;
第四判断模块440,用于在对存储介质的第二文件进行写操作时,判断第二文件在索引信息集中的索引与第二文件中的备份索引是否一致;
修复重建模块450,用于更新存储介质中所有文件的备份索引,并修复或重建索引信息集。
可选的,如图5所示,恢复系统文件索引的装置50还包括:
创建模块460,用于为待创建文件分配地址空间,在索引信息集中添加待创建文件的索引,在待创建文件中存储对应的备份索引。
其中,如图6所示,当修复重建模块450修复索引信息集时,修复重建模块450包括:
第一读取单元451a,用于对存储介质中的所有数据进行读取。
修复单元452a,用于更新存储介质中所有文件的备份索引,并根据更新后的所有文件的备份索引对索引信息集中的索引进行更新替换。
其中,如图7所示,当修复重建模块450重建索引信息集时,修复重建模块450包括:
第二读取单元451b,用于对存储介质中的所有数据进行读取。
重建单元452b,用于更新存储介质中所有文件的备份索引,删除索引信息集,并以一维数组形式对更新后的所有文件的备份索引进行存储以重新建立索引信息集。
本实施例通过在加载存储介质并且未读取到索引信息集时,或在加载存储介质并且判断索引信息集中的索引不正确时,或在对存储介质中的文件进行读取操作并且文件在索引信息集中的索引与文件中的备份索引不一致时,或在对存储介质中的文件进行写操作并且文件在索引信息集中的索引与文件中的备份索引不一致时,更新存储介质中的所有文件的备份索引,并修复或重建索引信息集,因此,克服了反复重启不录像的缺陷。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (10)

  1. 一种恢复系统文件索引的方法,其特征在于,所述方法包括:
    A. 在加载存储介质时,判断是否读取到索引信息集,若否,则执行步骤E,若是,则执行步骤B;
    B. 判断所述索引信息集中的索引是否正确,若否,则执行步骤E;
    C. 在对所述存储介质中的第一文件进行读取操作时,判断所述第一文件在所述索引信息集中的索引与所述第一文件中的备份索引是否一致,若否,则执行步骤E;
    D. 在对所述存储介质的第二文件进行写操作时,判断所述第二文件在所述索引信息集中的索引与所述第二文件中的备份索引是否一致,若否,则执行步骤E;
    E. 更新所述存储介质中的所有文件的备份索引,并修复或重建所述索引信息集。
  2. 根据权利要求1所述的方法,其特征在于,在所述步骤A、所述步骤C和所述步骤D之前还包括以下步骤:
    为待创建文件分配地址空间,在所述索引信息集中添加所述待创建文件的索引,在所述待创建文件中存储对应的备份索引。
  3. 根据权利要求1所述的方法,其特征在于,当所述步骤E为更新所述存储介质中的所有文件的备份索引,并修复所述索引信息集时,所述步骤E包括以下步骤:
    对所述存储介质中的所有数据进行读取;
    更新所述存储介质中所有文件的备份索引,并根据更新后的所有文件的备份索引对所述索引信息集中的索引进行更新替换;
    当所述步骤E为更新所述存储介质中的所有文件的备份索引,并重建所述索引信息集时,所述步骤E包括以下步骤:
    对所述存储介质中的所有数据进行读取;
    更新所述存储介质中所有文件的备份索引,删除索引信息集,并以一维数组形式对更新后的所有文件的备份索引进行存储以重新建立索引信息集。
  4. 根据权利要求1所述的休眠控制方法,其特征在于,所述判断所述索引信息集中的索引是否正确的步骤具体为:
    逐个判断所述索引信息集中的索引与对应文件中的备份索引是否一致。
  5. 根据权利要求1所述的方法,其特征在于,所述判断是否读取到索引信息集的步骤具体为:
    对所述存储介质中的所有数据进行读取,判断所述数据中是否存在索引信息集。
  6. 一种恢复系统文件索引的装置,其特征在于,所述装置包括:
    第一判断模块,用于在加载存储介质时,判断是否读取到索引信息集;
    第二判断模块,用于判断所述索引信息集中的索引是否正确;
    第三判断模块,用于在对所述存储介质中的第一文件进行读取操作时,判断所述第一文件在所述索引信息集中的索引与所述第一文件中的备份索引是否一致;
    第四判断模块,用于在对所述存储介质的第二文件进行写操作时,判断所述第二文件在所述索引信息集中的索引与所述第二文件中的备份索引是否一致;
    修复重建模块,用于更新所述存储介质中所有文件的备份索引,并修复或重建所述索引信息集。
  7. 根据权利要求6所述的装置,其特征在于,所述装置还包括:
    创建模块,用于为待创建文件分配地址空间,在所述索引信息集中添加所述待创建文件的索引,在所述待创建文件中存储对应的备份索引。
  8. 根据权利要求6所述的装置,其特征在于,当修复重建模块修复所述索引信息集时,所述修复重建模块包括:
    第一读取单元,用于对所述存储介质中的所有数据进行读取;
    修复单元,用于更新所述存储介质中所有文件的备份索引,并根据更新后的所有文件的备份索引对所述索引信息集中的索引进行更新替换;
    当修复重建模块重建所述索引信息集时,所述修复重建模块包括:
    第二读取单元,用于对所述存储介质中的所有数据进行读取;
    重建单元,用于更新所述存储介质中所有文件的备份索引,删除索引信息集,并以一维数组形式对更新后的所有文件的备份索引进行存储以重新建立索引信息集。
  9. 根据权利要求6所述的装置,其特征在于,所述第二判断模块判断所述索引信息集中的索引是否正确具体为:
    逐个判断所述索引信息集中的索引与对应文件中的备份索引是否一致。
  10. 根据权利要求6所述的装置,其特征在于,所述第一判断模块判断是否读取到索引信息集具体为:
    对所述存储介质中的所有数据进行读取,判断所述数据中是否存在索引信息集。
PCT/CN2014/092639 2014-10-10 2014-12-01 一种恢复系统文件索引的方法及装置 WO2016054858A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
SG11201602649UA SG11201602649UA (en) 2014-10-10 2014-12-01 Method and device for restoring system file index
US15/030,530 US20160253247A1 (en) 2014-10-10 2014-12-01 Method and device for restoring system file indexes

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410530985.9 2014-10-10
CN201410530985.9A CN104317833B (zh) 2014-10-10 2014-10-10 一种恢复系统文件索引的方法及装置

Publications (1)

Publication Number Publication Date
WO2016054858A1 true WO2016054858A1 (zh) 2016-04-14

Family

ID=52373065

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/092639 WO2016054858A1 (zh) 2014-10-10 2014-12-01 一种恢复系统文件索引的方法及装置

Country Status (4)

Country Link
US (1) US20160253247A1 (zh)
CN (1) CN104317833B (zh)
SG (1) SG11201602649UA (zh)
WO (1) WO2016054858A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045684B (zh) * 2015-07-16 2018-06-15 北京京东尚科信息技术有限公司 索引切换和索引控制的方法及装置
CN105183396A (zh) * 2015-09-22 2015-12-23 厦门雅迅网络股份有限公司 一种增强车载dvr录像数据可回溯性的存储方法
CN105573862B (zh) * 2015-12-11 2021-02-02 浙江大华技术股份有限公司 一种恢复文件系统的方法和设备
US20230114912A1 (en) * 2021-10-08 2023-04-13 Open Text Holdings, Inc. System and method for efficient multi-stage querying of archived data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314383A (zh) * 2011-09-28 2012-01-11 成都市华为赛门铁克科技有限公司 数据索引的故障恢复方法和装置
US8495022B1 (en) * 2010-05-13 2013-07-23 Symantec Corporation Systems and methods for synthetic backups
CN103929609A (zh) * 2014-04-22 2014-07-16 浙江宇视科技有限公司 一种录像回放方法和装置
CN104040481A (zh) * 2011-11-18 2014-09-10 戴尔软件股份有限公司 用于融合、存储和检索增量式备份数据的方法和系统

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8468293B2 (en) * 2009-07-24 2013-06-18 Apple Inc. Restore index page
WO2011031903A2 (en) * 2009-09-09 2011-03-17 Fusion-Io, Inc. Apparatus, system, and method for allocating storage
CN101763321B (zh) * 2010-02-24 2013-01-02 华为技术有限公司 数据容灾的方法、装置及系统
US8762340B2 (en) * 2010-05-14 2014-06-24 Salesforce.Com, Inc. Methods and systems for backing up a search index in a multi-tenant database environment
CN102385610B (zh) * 2011-08-30 2016-05-04 杭州海康威视数字技术股份有限公司 数字硬盘录像机录像文件保存与数据恢复的方法及其系统
US8914327B2 (en) * 2012-03-16 2014-12-16 Apple Inc. Methods and systems for searching a backup volume

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8495022B1 (en) * 2010-05-13 2013-07-23 Symantec Corporation Systems and methods for synthetic backups
CN102314383A (zh) * 2011-09-28 2012-01-11 成都市华为赛门铁克科技有限公司 数据索引的故障恢复方法和装置
CN104040481A (zh) * 2011-11-18 2014-09-10 戴尔软件股份有限公司 用于融合、存储和检索增量式备份数据的方法和系统
CN103929609A (zh) * 2014-04-22 2014-07-16 浙江宇视科技有限公司 一种录像回放方法和装置

Also Published As

Publication number Publication date
CN104317833A (zh) 2015-01-28
CN104317833B (zh) 2019-03-26
US20160253247A1 (en) 2016-09-01
SG11201602649UA (en) 2016-05-30

Similar Documents

Publication Publication Date Title
WO2016045193A1 (zh) 一种文件索引组织及修复的方法及装置
US6742138B1 (en) Data recovery method and apparatus
JP4624829B2 (ja) データバックアップシステム及び方法
US7310743B1 (en) Data recovery method and apparatus
US6195761B1 (en) Method and apparatus for identifying and repairing mismatched data
WO2016054858A1 (zh) 一种恢复系统文件索引的方法及装置
WO2013048023A2 (ko) 플래시 메모리에 기반한 ssd에서의 전원-손실 복구 방법 및 장치
JP4941556B2 (ja) 暗号化装置、暗号化方法および暗号化プログラム
US20150012503A1 (en) Self-healing by hash-based deduplication
US20190079834A1 (en) Database Transaction Log Migration
US11403176B2 (en) Database read cache optimization
JPH0833864B2 (ja) データ保全方式
US8590042B2 (en) Storage system, and encryption key management method and encryption key management program thereof
US7711895B2 (en) Storage device, data arrangement method and program
JP2009104369A (ja) ディスクサブシステム
WO2016065695A1 (zh) 一种硬盘物理块管理方法及系统
WO2014123372A1 (ko) 증명 가능하고 정확한 오류 복구를 위한 플래시 변환 계층 설계 프레임워크
JP6277878B2 (ja) ストレージ装置の制御装置、ストレージ装置の制御方法及びストレージ装置の制御プログラム
JP2015005248A (ja) ストレージ制御装置、ストレージ制御方法、及びストレージ制御プログラム
JP2009069965A (ja) ストレージ装置、データ回復方法及び計算機システム
JP2007133535A (ja) 記憶装置内のファイルシステム
JP4858779B2 (ja) 分散並列プログラムの障害解析ファイル軽量化装置、その方法及びそのプログラム
JP4920390B2 (ja) ストレージ装置
TW201416852A (zh) 磁碟陣列卡自動修護方法及系統
JP2005284449A (ja) 情報記録媒体アレイシステムおよびその復旧方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 15030530

Country of ref document: US

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

Ref document number: 14903723

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14903723

Country of ref document: EP

Kind code of ref document: A1