WO2009092254A1 - 一种高速缓存数据恢复的方法、装置和系统 - Google Patents

一种高速缓存数据恢复的方法、装置和系统 Download PDF

Info

Publication number
WO2009092254A1
WO2009092254A1 PCT/CN2008/073656 CN2008073656W WO2009092254A1 WO 2009092254 A1 WO2009092254 A1 WO 2009092254A1 CN 2008073656 W CN2008073656 W CN 2008073656W WO 2009092254 A1 WO2009092254 A1 WO 2009092254A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
cache
backup data
information
data
Prior art date
Application number
PCT/CN2008/073656
Other languages
English (en)
French (fr)
Inventor
Lin Lin
Jing Li
Jie Yao
Original Assignee
Huawei Technologies Co., Ltd.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Publication of WO2009092254A1 publication Critical patent/WO2009092254A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • 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

Definitions

  • Embodiments of the present invention relate to the field of computer storage technologies, and in particular, to a method, device, and system for cache data recovery. Background technique
  • a cache is a storage space between a processor and a memory that has less storage space than memory, and the processor accesses the cache much faster than the processor accesses the memory.
  • the processor When the processor receives an access request for a file, it first accesses the memory, opens and reads the file. Due to the slow memory access, saving files in the cache will greatly increase the efficiency of processing and shorten the access time of these files. However, the system's cache capacity is also limited, and it is not possible to store all files in the cache.
  • the frequency of accessing files on the recording memory is used, and the frequently accessed files are loaded into the cache periodically or irregularly, and the files saved in the cache are updated at the same time to solve the disadvantage of limited cache capacity.
  • the cache since the cache is actually a part of the memory, the access frequency information of the file is also stored in the memory, so whenever the resource processor is restarted, the cache loses all the saved data, and the data only Can be re-established.
  • Each resource processor in the server device is relatively independent. For each resource processor, after each reboot, it takes a long time and a considerable number of files to access. After that, the files saved in the cache can be relatively stable, and the cache hit rate (the ratio of the number of times the file is read from the cache to the total number of times the resource processor accesses the file from the file server and the cache) can be stabilized. At a relatively high level.
  • Embodiments of the present invention provide a method of cache data recovery to restore data in a cache when needed.
  • Embodiments of the present invention also provide an apparatus for cache data recovery that can quickly recover data in a cache when needed.
  • Embodiments of the present invention also provide a system for implementing cache data recovery that can quickly recover data in a cache when needed.
  • an embodiment of the present invention provides a method for recovering cache data, including: reading backup data, wherein backup data is used to record file information of a file; and writing a file corresponding to file information in the backup data to a high speed Cache.
  • an embodiment of the present invention provides a device for recovering cache data, including:
  • a backup data reading unit for reading backup data of file information for recording a file
  • a file recovery unit configured to write a file corresponding to each file information in the backup data to a cache.
  • an embodiment of the present invention provides a system for implementing cache data recovery, including a resource processor and a memory, where the resource processor includes 10 modules and a cache.
  • the cache is configured to store a file for fast reading or calling by the module 10;
  • the memory is configured to back up files in the cache
  • the 10 module configured to complete a number between the cache and the memory According to the interaction, when the data in the cache is lost, the file in the cache is restored by using the file backed up by the memory.
  • the cache data recovery method of the embodiment of the present invention can recover the files in the cache in a shorter time by restoring the files in the cache by using the backup data.
  • FIG. 1 is a structural diagram of a resource processor according to Embodiment 1 of the present invention.
  • FIG. 2 is a flowchart of a cache backup in the first embodiment of the present invention
  • FIG. 3 is a flowchart of cache reconstruction in the first embodiment of the present invention. detailed description
  • the embodiment of the present invention can recover the files in the cache in a short time, so that the cached data does not need to be recreated, which is beneficial to improve the cache in a shorter time. Hit rate.
  • Cache backup refers to exporting and saving the file information of files in the cache in the backup data.
  • Cache refactoring means that the resource processor reads the backup data and rebuilds the cache based on the file information in the backup data.
  • the file information saved in the backup data may be a file attribute or a complete file, where the file attribute is the file name of the file and/or a file path characterizing the storage location of the file on the file server.
  • the first way is to save the cached content as a separate file. Only the file attributes of each file saved in the cache are listed in the file, such as the file path and/or file name in the file server. This method is suitable for situations where the file path in the file server does not change very often.
  • the second way is to save the cached content as a separate file. All the files in the cache and their organization are stored in the file, which is the complete content of the cache. This method is suitable when the file path in the file server is not fixed.
  • the third way is to save the contents of the cache in a directory where each individual file in the directory or its subdirectories is a complete file stored in the cache.
  • the fourth way is to save the contents of the cache in a directory.
  • the files in this directory or its subdirectories list the file attributes of each file saved in the cache, such as the file path in the file server and / Or file name, etc.
  • This embodiment still uses the operator's customer service point equipment as an example to illustrate the implementation of the present invention.
  • FIG. 1 is a structural diagram of a resource processor in the embodiment.
  • the resource processor of this embodiment includes: a control module 101, a file invoking module 102, a 10 module 103, and a cache 104.
  • the control module 101 is configured to receive and process an operation request issued by a manager or other processor, control the related module to complete the corresponding operation, and return a response and result of the operation request execution to the manager or other processor.
  • the file invoking module 102 is configured to process the file read by the module 103 according to the control of the control module 101.
  • the 10 module 103 is for performing operations with the cache 104 and the file server 105 in accordance with the control of the control module 101, including operations of building the cache 104, reading data files from the cache 104 and the file server 105, and the like. Moreover, information exchange with the memory 106 is also possible.
  • the cache 104 is used to store files that are frequently accessed on the file server for quick reading or invocation by the 10 module 103.
  • Memory 106 is used to store files in the cache.
  • the memory 106 may be a storage device independent of the file server, a storage device of the file server, or a storage device internal to the resource processor, such as FLASH or RAM.
  • the cache data recovery device of this embodiment can recover files in the cache, and mainly includes the following functional units:
  • a backup data generating unit configured to generate backup data for recording information of the file stored in the cache
  • a backup data writing unit for writing the backup data to the memory
  • a backup data reading unit for reading backup data for recording file information of the file stored in the cache from the memory
  • a file recovery unit configured to write a file corresponding to each file information in the backup data to the cache.
  • FIG. 2 is a flowchart of a cache backup in the embodiment. As shown in Figure 2, the cache backup process includes the following steps.
  • Step 201 Start the backup of the cache, that is, send a backup request of the backup cache data to the control module.
  • the backup request may be manually sent by the manager to the control module by the user, or may be sent to the control module periodically by the manager.
  • Step 202 After receiving the backup request, the control module sets the state of the cache to unavailable. This is to avoid the operation of reading and updating the cache to affect the backup process.
  • Step 203 The control module instructs the 10 module to initiate a backup of the cache.
  • Step 204 After receiving the backup indication of starting the cache, the 10 module creates backup data on the memory, where the backup data is used to record file information of the file stored in the cache.
  • the backup data can have different forms, such as files or Directory and so on.
  • each file in the cache is sequentially read, and each file read is sequentially written into the backup data;
  • each file in the cache is sequentially read, the attributes of each file are obtained, and the attributes of each file, such as the file name and/or the file is represented in the file.
  • the file path of the storage location on the server is sequentially written to the backup data.
  • the backup data In order to prevent the backup data of multiple similar devices from interfering with each other at different times, the backup data needs to be identified by the device that performs the backup at the time of the unique device identifier in the customer service site and the time when the backup data is currently written.
  • Step 206 The module determines the backup mode according to the configuration, reads the first file in the cache, and extracts the file information of the file for backup.
  • the backed up file information can be a list of file attributes in the cache, such as a file path, a list of file names, or all files in the cache and their organization.
  • the backup data can be a separate file of the file attribute list in the cache, a separate file of the complete file and structure in the cache, a complete file and structure directory in the cache, or each of the caches.
  • the file's file attributes are in four forms.
  • the 10 module For a stand-alone file that only saves a list of file attributes in the cache, the 10 module only needs to write the file attributes of each file sequentially to the backup data, such as the file path and/or file name of each file;
  • the 10 module needs to read each file in the cache in turn and write it into the backup data in turn;
  • the 10 module separately saves the files in the cache to the directory of the backup data
  • the 10 module separately saves the file attributes of each file in the cache, such as the file path and/or file name in the file server, to the backup data.
  • the name can be in the following form: "resource processor number + backup time", for example, the backup data generated by the resource manager numbered 252 at 02:11 on July 14, 2007, the name can be "252_200707140211". If only the file name and path of each file on the file server are saved in the backup data, the contents of the backup data may be in the following form:
  • Step 208 The 10 module writes the file information of the first file into the backup data created on the memory.
  • Step 210 The 10 module reads the second file in the cache and extracts the file information that needs to be backed up.
  • Step 212 The 10 module writes the file information of the second file into the backup data created on the memory.
  • Step 214 The 10 modules sequentially read the files in the cache until the last file in the cache, and extract the file information that needs to be backed up.
  • Step 216 The 10 module writes the file information of the last file to the backup data created on the memory.
  • Step 218 The 10 module writes the current backup time information to the backup data.
  • Step 219 The module returns the result of the cache backup to the control module, that is, whether the backup succeeds or not.
  • Step 220 The control module receives the cache backup result of the 10 modules, and sets the cache function to be available.
  • Step 222 The control module returns a cache backup result to the manager, that is, whether the backup is successful or not.
  • the cache refactoring process can be initiated manually or automatically.
  • FIG. 3 is a flowchart of cache reconstruction in the embodiment, including the following steps.
  • Step 301 Start reconfiguration of the cache, that is, send a reconstruction request for reconstructing the cache data to the control module.
  • the reconstruction request may be triggered by the resource manager to perform a cache reconstruction when the resource processor is restarted.
  • Step 302 After receiving the cache reconfiguration request, the control module sets the state of the cache to be unavailable.
  • Step 304 The control module instructs the 10 module to start the reconstruction of the cache.
  • Step 305 The 10 module reads the backup data information in the memory.
  • Step 306 The 10 module selects backup data for cache reconstruction from the backup data.
  • the 10 module selects the latest backup data of the resource processor from the backup data.
  • a backup data with the latest creation time may be selected from the optional backup data.
  • Step 308 The 10 module reads the first file information in the selected backup data.
  • the file information can be a file attribute or a complete file.
  • the backup data can be in the form of a separate file or a directory.
  • each file corresponding to each file information in the backup data is sequentially read, and each file read is sequentially written into the cache.
  • the 10 module determines that the backup data is a separate file or directory containing file attributes of the file, sequentially reading each file attribute in the backup data, such as the recorded file name and file path, and according to the file name and/or file path. Accessing a file server for storing the file, sequentially reading a file corresponding to the file attribute from the file server, and writing the file to the cache.
  • step 309 is performed;
  • step 310 For a separate file that holds all the files and structures in the cache, or in a directory To save each file in the cache, go to step 310.
  • Step 309 The 10 module accesses the file server, and reads the corresponding file according to the file information. If the corresponding file is not found, then step 312 is performed; otherwise, step 310 is continued.
  • Step 310 The 10 module writes the first file to the cache.
  • Step 312 The 10 module reads the second file information. If only the file path and/or file name are saved, step 313 is performed, otherwise step 314 is performed.
  • Step 313 The 10 module accesses the file server, and reads the corresponding file according to the file path and/or the file name. If the corresponding file is not found, go to step 316; otherwise, go to step 314.
  • Step 314 The 10 module writes the second file to the cache.
  • Step 316 The 10 modules sequentially read the file information in the cache until the last file information in the cache.
  • Step 317 The backup data only saves the path and file name of the file, and the 10 module accesses the file server, and reads the corresponding file according to the file path and/or file name. If the corresponding file is not found, go to step 319; otherwise, continue to step 318.
  • Step 318 The 10 module writes the last file to the cache.
  • Step 319 The 10 module returns the result of the cache reconstruction to the control module.
  • Step 320 The control module receives the cache reconstruction result returned by the 10 module, and sets the state of the cache to be available.
  • Step 322 The control module returns the result of the cache reconfiguration.
  • the cache is restored to the state of the most recent backup, where the files are the files that were most frequently accessed during the last backup.
  • the CRBT file with the most visited times of the site can be backed up.
  • the backup file can be used to quickly recover the data in the cache;
  • the server of the service applies the technical solution of the embodiment, the video file that is viewed or downloaded most can be backed up, and the like.
  • each resource processor can periodically or manually build its cached backup data.
  • the backup data created by the resource processor or created by other resource processors in the site can be loaded immediately.
  • the cache hit rate in the resource processor takes a long time to stabilize at a high level, the cached backup data is not practical, so it can be used directly.
  • the cache data recovery method of the present invention can recover data in the cache when needed, and can quickly increase the cache hit rate.
  • the cache data recovery device of the present invention can recover the data in its cache when needed, and can quickly increase the cache hit rate.
  • the present invention can be implemented by hardware, or can be implemented by means of software plus necessary general hardware platform, and the technical solution of the present invention. It can be embodied in the form of a software product that can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for making a computer device (may It is a personal computer, a server, or a network device, etc.) that performs the methods described in various embodiments of the present invention.
  • a non-volatile storage medium which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.
  • a computer device may It is a personal computer, a server, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

一种高速緩存数据恢复的方法、 装置和系统 本申请要求于 2007年 12月 29日提交中国专利局、 申请号为 200710308301.0、 发明名称为 "一种高速緩存数据恢复的方法和装 置" 的中国专利申请的优先权, 其全部内容通过引用结合在本申 请中。 技术领域
本发明实施例涉及计算机存储技术领域,特别涉及一种高速緩存 数据恢复的方法、 装置和系统。 背景技术
高速緩存是位于处理器和存储器之间的一块存储空间,其存储空 间小于存储器,而处理器访问高速緩存速度远快于处理器访问存储器 的速度。
当处理器接收到文件的访问请求时, 先访问存储器, 打开并读取 文件。 由于存储器访问速度较慢, 如果将文件保存在高速緩存中将大 大提高处理的效率, 缩短这些文件的访问时间。但系统的高速緩存的 容量也是有限的, 不可能将所有文件都存放在高速緩存中。
目前采用记录存储器上的文件的访问频率,定期或者不定期地将 部分访问频繁的文件加载到高速緩存中,同时更新高速緩存中保存的 文件, 来解决高速緩存容量有限的缺点。
在实现本发明的过程中, 发明人发现现有技术至少存在以下问 题:
现有技术中, 由于高速緩存实际上是内存的一部分, 文件的访问 频率信息也都是保存在内存中, 所以每当资源处理器重新启动, 高速 緩存就会失去保存的所有数据, 这些数据只能重新进行建立。服务器 设备中每一个资源处理器相对独立, 对于每一个资源处理器, 在每次 重新启动之后,都需要经过一段相当长时间和相当多次文件的访问之 后, 高速緩存中保存的文件才能相对稳定下来, 高速緩存命中率(从 高速緩存中读取文件的次数占该资源处理器从文件服务器上和高速 緩存上访问文件的总次数的比例) 才能稳定在一个相对较高的水平。
发明内容
本发明实施例提供了一种高速緩存数据恢复的方法,以实现在需 要时恢复高速緩存中的数据。
本发明实施例还提供了一种高速緩存数据恢复的装置,该装置可 以在需要时快速地恢复高速緩存中的数据。
本发明实施例还提供了一种实现高速緩存数据恢复的系统,该系 统可以在需要时快速地恢复高速緩存中的数据。
一方面,本发明实施例提供一种高速緩存数据恢复的方法,包括, 读取备份数据, 其中备份数据用于记录文件的文件信息; 将所述备份数据中文件信息所对应的文件写入高速緩存。
另一方面, 本发明实施例提供一种高速緩存数据恢复的装置, 包 括,
备份数据读取单元,用于读取用于记录文件的文件信息的备份数 据;
文件恢复单元,用于将所述备份数据中各文件信息所对应的文件 写入高速緩存。
另一方面, 本发明实施例提供一种实现高速緩存数据恢复的系 统, 包括资源处理器、 存储器, 其中, 所述资源处理器中包含 10模 块和高速緩存,
所述高速緩存, 用于存储文件, 供所述 10模块进行快速读取或 调用;
所述存储器, 用于备份所述高速緩存中的文件;
所述 10模块, 用于完成与所述高速緩存和所述存储器之间的数 据交互, 在所述高速緩存中的数据丟失时, 利用所述存储器备份的文 件恢复所述高速緩存中的文件。
与现有技术相比,本发明实施例的高速緩存数据恢复的方法通过 利用备份数据恢复高速緩存中的文件,可以在较短时间内恢复出高速 緩存中的文件。
附图说明
图 1为本发明实施例一中资源处理器的结构图;
图 2为本发明实施例一中高速緩存备份的流程图;
图 3为本发明实施例一中高速緩存重构的流程图。 具体实施方式
为使本发明的目的、技术方案及优点更加清楚明白, 以下参照附 图并举实施例, 对本发明进一步详细说明。
本发明实施例通过利用备份数据恢复高速緩存中的文件,可以在 较短时间内恢复出高速緩存中的文件,使得不需要重新创建高速緩存 的数据, 利于在更短的时间内提高高速緩存的命中率。
实施例一
本实施例的技术方案包括高速緩存的备份和重构两个部分。 高速緩存的备份,是指将高速緩存中文件的文件信息导出并保存 在备份数据中。
高速緩存的重构, 是指资源处理器读取备份数据, 并根据备份数 据中的文件信息重新构建高速緩存。
备份数据中保存的文件信息可以是文件的属性或者完整的文件, 其中文件属性为所述文件的文件名和 /或表征该文件在文件服务器上 存储位置的文件路径。
高速緩存备份的方式可以有以下四种: 第一种方式是将高速緩存的内容保存为一个独立的文件,文件中 仅列出高速緩存中保存的各文件的文件属性,例如在文件服务器中的 文件路径和 /或文件名等。 这种方式适用于文件服务器中的文件路径 不常变化的情况。
第二种方式是将高速緩存的内容保存为一个独立的文件,文件中 保存的是高速緩存中所有文件及其组织结构,也就是高速緩存的完整 内容。 这种方式适用于文件服务器中的文件路径不固定的情况。
第三种方式是将高速緩存中的内容保存在一个目录中,这个目录 或其子目录中每一个独立的文件都是高速緩存中保存的一个完整文 件。
第四种方式是将高速緩存中的内容保存在一个目录中,这个目录 或其子目录中的文件列出高速緩存中保存的每一个文件的文件属性, 例如在文件服务器中的文件路径和 /或文件名等。
本实施例仍以运营商的客服局点设备为例说明本发明的实施方 式。
图 1为本实施例中资源处理器的结构图。
本实施例的资源处理器包括: 控制模块 101、 文件调用模块 102、 10模块 103和高速緩存 104。
控制模块 101 用于接收并处理管理器或其它处理器发出的操作 请求,控制相关模块完成相应的操作并向管理器或其他处理器返回操 作请求执行的响应和结果。
文件调用模块 102用于根据控制模块 101的控制, 处理 10模块 103读取的文件。
10模块 103用于根据控制模块 101的控制,完成与高速緩存 104、 文件服务器 105之间的交互,包括构建高速緩存 104、从高速緩存 104 和文件服务器 105读取数据文件等操作。 而且, 还可以与存储器 106 进行信息交互。
高速緩存 104用于存储文件服务器上访问频繁的文件, 供 10模 块 103进行快速读取或调用。 存储器 106用来存储高速緩存中的文件。存储器 106可以是独立 于文件服务器的存储设备, 也可以是文件服务器的存储设备, 还可以 是资源处理器内部的存储设备, 如 FLASH或 RAM。
本实施例的高速緩存数据恢复装置可以对高速緩存中的文件进 行恢复, 主要包括以下功能单元:
备份数据生成单元,用于生成用于记录所述高速緩存所存储文件 的信息的备份数据;
备份数据写入单元, 用于将所述备份数据写入存储器; 备份数据读取单元,用于从存储器中读取用于记录高速緩存所存 储文件的文件信息的备份数据;
文件恢复单元,用于将与所述备份数据中各文件信息所对应的文 件写入高速緩存。
作为本发明的较佳实施方式,该高速緩存数据恢复装置的功能是 由 10模块 103来完成的, 但是本领域技术人员应当明白, 该高速緩 存数据恢复装置也可以是一个单独的装置或者存在其它设备或模块 当中或者由其它设备或组件完成其功能。 图 2为本实施例中高速緩存备份的流程图。 如图 2, 高速緩存的 备份过程包括如下步骤。
步骤 201: 启动高速緩存的备份, 即向控制模块发送备份高速緩 存数据的备份请求。该备份请求可以由管理器通过用户手动启动发送 给控制模块, 也可以由管理器定时启动发送给控制模块。
步骤 202: 控制模块收到备份请求后, 将高速緩存的状态设为不 可用,这是为了避免对高速緩存进行读取和更新的操作对备份过程造 成影响。
步骤 203: 控制模块指示 10模块启动高速緩存的备份。
步骤 204: 10模块收到启动高速緩存的备份指示后,在存储器上 创建备份数据,所述备份数据用于记录高速緩存所存储文件的文件信 息。 根据选择的备份方式, 备份数据可以有不同的形式, 如文件或者 目录等。
例如, 当 10模块采用备份完整的文件的方式时, 依次读取所述 高速緩存中每一文件, 并将所读取的每一文件依次写入所述备份数 据;
当 10模块采用备份文件属性的方式时, 依次读取所述高速緩存 中每一文件, 得到每一文件的属性, 并将所述每一文件的属性, 如文 件名和 /或表征该文件在文件服务器上存储位置的文件路径, 依次写 入所述备份数据。
为了防止多个同类设备在不同时间的备份数据相互干扰,这份备 份数据需要以该进行备份的设备在该客服局点中的唯一设备标识和 当前写入备份数据的时间来进行标识。
步骤 206: 10模块根据配置确定备份的方式,读取高速緩存中的 第一个文件, 并提取该文件的文件信息用于备份。
根据备份方式的不同,备份的文件信息可以是高速緩存中的文件 属性列表, 例如文件路径、 文件名的列表, 或是高速緩存中全部文件 及其组织结构。备份数据可以是高速緩存中的文件属性列表的独立文 件, 可以是高速緩存中完整的文件和结构的独立文件, 可以是高速緩 存中完整的文件和结构的目录,还可以是高速緩存中每个文件的文件 属性的目录四种形式。
对于仅保存高速緩存中文件属性列表的独立文件, 10模块只需 要向备份数据中依次写入各文件的文件属性即可,例如各文件的文件 路径和 /或文件名;
对于保存高速緩存中完整的文件和结构的独立文件, 10模块需 要依次读取高速緩存中每一个文件并依次写入备份数据中;
对于分别保存高速緩存中完整的文件和结构的目录的形式, 10 模块要分别将高速緩存中的文件保存到备份数据的目录中;
对于分别保存高速緩存中文件的文件属性的目录的形式, 10模 块要分别将高速緩存中的每一个文件的文件属性,例如在文件服务器 中的文件路径和 /或文件名等, 保存到备份数据的目录中。 名可以是下面的形式: "资源处理器编号 +备份时间",例如编号为 252 的资源管理器在 2007年 07月 14日 02点 11分生成的备份数据, 名 称可以为 "252_200707140211"。 如果备份数据中仅保存各个文件在 文件服务器上的文件名和路径,则备份数据中的内容可以为如下的形 式:
" y: \playfile\ye sterdayoncemore .wav;
y: \playfile\whenyoubelieve .wav;
y: \playfile\prodeoffly.wav; "
由于备份过程中高速緩存被设为不可用,为了在最小程度上减小 备份对正常业务开展的影响, 可以选择在业务量最小的时间, 例如凌 晨, 启动高速緩存的备份。
步骤 208: 10模块将第一个文件的文件信息写入存储器上创建的 备份数据中。
步骤 210: 10模块读取高速緩存中的第二个文件, 并提取需要备 份的文件信息。
步骤 212: 10模块将第二个文件的文件信息写入存储器上创建的 备份数据中。
步骤 214: 10模块依次读取高速緩存中的文件, 直到高速緩存中 的最后一个文件, 并提取需要备份的文件信息。
步骤 216: 10模块将最后一个文件的文件信息写入存储器上创建 的备份数据中。
步骤 218: 10模块向备份数据中写入当前备份的时间信息。 步骤 219: 10模块向控制模块返回高速緩存备份的结果, 即备份 成功与否。
步骤 220: 控制模块收到 10模块的高速緩存备份结果, 设置高 速緩存功能可用。
步骤 222: 控制模块向管理器返回高速緩存备份结果, 即备份成 功与否。 当资源处理器重新启动后,可以手动或自动启动高速緩存的重构 过程。 图 3为本实施例中高速緩存重构的流程图, 包括下面的步骤。 步骤 301: 启动高速緩存的重构, 即向控制模块发送重构高速緩 存数据的重构请求。 该重构请求可以当资源处理器重新启动时, 由资 源管理器触发控制模块进行高速緩存的重构。
步骤 302: 控制模块收到高速緩存重构请求后, 设置高速緩存的 状态为不可用。
步骤 304: 控制模块指示 10模块启动高速緩存的重构。
步骤 305: 10模块读取存储器中的备份数据信息。
步骤 306: 10模块从备份数据中选择用于高速緩存重构的备份数 据。 优选的, 10模块从备份数据中选择该资源处理器最新的一个备 份数据, 例如, 可以从可选的备份数据中选择创建时间最近的一个备 份数据。
步骤 308: 10模块读取选择的备份数据中的第一个文件信息。 根据备份方式的不同, 文件信息可以是文件的属性或完整的文 件, 备份数据可以是独立的文件或者是目录的形式。
当 10模块判断备份数据为包含完整的文件的独立文件或目录 时,依次读取备份数据中各文件信息所对应的每一文件, 并将所读取 的每一文件依次写入所述高速緩存;
当 10模块判断备份数据为包含文件的文件属性的独立文件或目 录时,依次读取所述备份数据中各文件属性, 例如所记录的文件名和 文件路径, 并根据所述文件名和 /或文件路径访问用于存储所述文件 的文件服务器, 从文件服务器依次读取所述文件属性对应的文件, 并 写入所述高速緩存。
对于仅保存高速緩存中文件属性列表的独立文件或目录,执行步 骤 309;
对于保存高速緩存中全部文件和结构的独立文件,或者以目录的 形式保存高速緩存中每个文件, 执行步骤 310。
步骤 309: 10模块访问文件服务器,根据文件信息读取对应的文 件。 如果没有找到对应的文件, 则执行步骤 312; 否则, 继续执行步 骤 310。
步骤 310: 10模块将第一个文件写入高速緩存。
步骤 312: 10模块读取第二个文件信息。 若仅保存文件路径和 / 或文件名, 则执行步骤 313 , 否则执行步骤 314。
步骤 313: 10模块访问文件服务器, 根据文件路径和 /或文件名 读取对应的文件。如果没有找到对应的文件, 则执行步骤 316; 否贝' J , 继续执行步骤 314。
步骤 314: 10模块将第二个文件写入高速緩存。
步骤 316: 10模块依次读取高速緩存中的文件信息, 直到高速緩 存中的最后一个文件信息。
步骤 317: 备份数据仅保存文件的路径和文件名, 10模块访问文 件服务器, 根据文件路径和 /或文件名读取对应的文件。 如果没有找 到对应的文件, 则执行步骤 319; 否则, 继续执行步骤 318。
步骤 318: 10模块将最后一个文件写入高速緩存。
步骤 319: 10模块向控制模块返回高速緩存重构的结果。
步骤 320: 控制模块收到 10模块返回的高速緩存重构结果, 将 高速緩存的状态设为可用。
步骤 322: 控制模块返回高速緩存重构的结果。
经过上面的步骤, 高速緩存就恢复到最近一次备份时的状态, 其 中的文件是在上一次备份时被最频繁地访问的文件。
另外, 当某个资源处理器重新启动后, 如果没有找到其自身备份 的文件, 可以选择其它资源处理器的备份文件加载。
运营商的彩铃局点应用本实施例的技术方案时,可以备份该局点 被访问次数最多的彩铃文件, 当资源处理器重启时, 可以利用备份文 件快速恢复出高速緩存中的数据;提供视频服务的服务器应用本实施 例技术方案时, 可以备份被观看或下载最多的视频文件, 等等。 对于已经正常运行的局点,每个资源处理器可以定时或手动构建 其高速緩存的备份数据。 当某个资源处理器重启后, 可以立刻加载该 资源处理器创建或该局点内其它资源处理器创建的备份数据。
对于新设立的局点, 由于刚开始运行, 其资源处理器中的高速緩 存的命中率还需要较长时间才能稳定在较高水平,其高速緩存的备份 数据实用度不高, 因此可以直接使用其它局点的高速緩存备份数据, 或者根据当前的流行资讯手动创建受欢迎的文件的备份数据,来构建 其高速緩存, 以提高该新局点高速緩存的命中率。
对于一些应用上类似的局点, 例如智能网智能外设局点, 由于其 资源比较固定, 可以事先手动生成高速緩存备份数据, 供此类局点直 接加载到其高速緩存中,可以大大提供这一类局点的高速緩存的命中 率, 并显著减少其高速緩存的构建时间。
由上述的实施例可见,本发明的这种高速緩存数据恢复的方法可 以在需要时恢复高速緩存中的数据,而且可以迅速提高高速緩存的命 中率。
本发明的这种高速緩存数据恢复的装置可以在需要时恢复其高 速緩存中的数据, 而且可以迅速提高高速緩存的命中率。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解 到本发明可以通过硬件实现,也可以可借助软件加必要的通用硬件平 台的方式来实现基于这样的理解,本发明的技术方案可以以软件产品 的形式体现出来, 该软件产品可以存储在一个非易失性存储介质(可 以是 CD-ROM, U盘, 移动硬盘等) 中, 包括若干指令用以使得一 台计算机设备(可以是个人计算机, 服务器, 或者网络设备等)执行 本发明各个实施例所述的方法。
总之, 以上所述仅为本发明的较佳实施例而已, 并非用于限定本 发明的保护范围。 凡在本发明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权利要求
1、 一种高速緩存数据恢复的方法, 其特征在于, 包括, 读取备份数据, 其中备份数据用于记录文件的文件信息; 将所述备份数据中文件信息所对应的文件写入高速緩存。
2、 根据权利要求 1所述的方法, 其特征在于, 进一步包括, 生成所述备份数据。
3、 根据权利要求 2所述的方法, 其特征在于, 所述生成所述备 份数据包括,
根据高速緩存中所存储的文件生成记录所述文件的文件信息的 备份数据。
4、 根据权利要求 2所述的方法, 其特征在于, 所述生成所述备 份数据包括,
根据需要保存在高速緩存中的文件生成记录所述文件的文件信 息的所述备份数据。
5、 根据权利要求 1至 4任一项所述的方法, 其特征在于, 所述 文件信息为完整的文件;
所述将与所述备份数据中文件信息所对应的文件写入高速緩存 包括:
读取所述备份数据中记录的完整的文件;
将所读取的所述文件写入所述高速緩存。
6、 根据权利要求 1至 4任一项所述的方法, 其特征在于, 所述 文件信息为文件的属性;
所述将与所述备份数据文件信息所对应的文件写入高速緩存包 括:
读取所述备份数据中文件信息所记录的文件属性;
根据所述文件属性访问用于存储文件的文件服务器,从所述文件 服务器读取所述文件属性对应的文件, 写入所述高速緩存。
7、 根据权利要求 6所述的方法, 其特征在于, 所述文件的属性 为所述文件的文件名和 /或表征该文件在文件服务器上存储位置的文 件路径。
8、 根据权利要求 2或 3所述的方法, 其特征在于, 所述文件信 息为完整的文件;
所述生成所述备份数据包括,
依次读取所述高速緩存中每一文件;
将所读取的所述每一文件作为文件信息依次写入所述备份数据。
9、 根据权利要求 2或 3所述的方法, 其特征在于, 所述文件信 息为文件的属性;
所述生成所述备份数据包括,
依次读取所述高速緩存中每一文件, 得到所述文件的文件属性; 将所述每一文件的文件属性作为文件信息依次写入所述备份数 据。
10、 根据权利要求 1所述的方法, 其特征在于, 所述备份数据进 一步包含将所述文件信息写入备份数据的时间信息。
11、 根据权利要求 1所述的方法, 其特征在于, 所述备份数据进 一步包含设备标识信息。
12、 一种高速緩存数据恢复的装置, 其特征在于, 包括, 备份数据读取单元,用于读取用于记录文件的文件信息的备份数 据;
文件恢复单元,用于将所述备份数据中各文件信息所对应的文件 写入高速緩存。
13、 根据权利要求 12所述的装置, 其特征在于, 进一步包括, 备份数据生成单元, 用于生成所述备份数据。
14、 一种实现高速緩存数据恢复的系统, 其特征在于, 包括资源 处理器、存储器,其中, 所述资源处理器中包含 10模块和高速緩存, 所述高速緩存, 用于存储文件, 供所述 10模块进行快速读取或 调用; 所述存储器, 用于备份所述高速緩存中的文件; 所述 10模块, 用于完成与所述高速緩存和所述存储器之间的数 据交互, 在所述高速緩存中的数据丟失时, 利用所述存储器备份的文 件恢复所述高速緩存中的文件。
PCT/CN2008/073656 2007-12-29 2008-12-22 一种高速缓存数据恢复的方法、装置和系统 WO2009092254A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200710308301.0 2007-12-29
CN2007103083010A CN101470645B (zh) 2007-12-29 2007-12-29 一种高速缓存数据恢复的方法和装置

Publications (1)

Publication Number Publication Date
WO2009092254A1 true WO2009092254A1 (zh) 2009-07-30

Family

ID=40828131

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2008/073656 WO2009092254A1 (zh) 2007-12-29 2008-12-22 一种高速缓存数据恢复的方法、装置和系统

Country Status (2)

Country Link
CN (1) CN101470645B (zh)
WO (1) WO2009092254A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108173665A (zh) * 2016-12-07 2018-06-15 北京云中融信网络科技有限公司 一种备份数据的方法及装置

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102262657B (zh) * 2011-06-29 2014-12-03 华为数字技术(成都)有限公司 多媒体数据存储方法及系统
CN102567490B (zh) 2011-12-21 2013-12-04 华为技术有限公司 数据库内的描述信息的恢复和数据的缓存方法及设备
CN103885901B (zh) * 2012-12-21 2019-06-25 联想(北京)有限公司 文件读取方法、存储设备和电子设备
US9684607B2 (en) 2015-02-25 2017-06-20 Microsoft Technology Licensing, Llc Automatic recovery of application cache warmth
EP3213211A4 (en) * 2014-10-29 2017-09-06 Hewlett-Packard Enterprise Development LP Data restoration using allocation maps
CN104331343B (zh) * 2014-11-06 2017-09-19 努比亚技术有限公司 文件备份方法和系统
CN104881334B (zh) * 2015-02-06 2018-04-10 北京华胜天成软件技术有限公司 缓存数据的防掉电保护方法及系统
US9684596B2 (en) 2015-02-25 2017-06-20 Microsoft Technology Licensing, Llc Application cache replication to secondary application(s)
CN105302671A (zh) * 2015-11-11 2016-02-03 中国建设银行股份有限公司 自动化备份、回退方法及装置
CN105718330A (zh) * 2016-01-15 2016-06-29 浪潮(北京)电子信息产业有限公司 一种Linux系统备份数据的恢复方法及装置
CN112925759B (zh) * 2021-03-31 2024-05-31 北京金山云网络技术有限公司 数据文件的处理方法和装置、存储介质、电子装置

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1543605A (zh) * 2001-06-29 2004-11-03 ض� 高速缓存器元数据的存储
CN101025712A (zh) * 2006-02-24 2007-08-29 三星电子株式会社 使用非易失性存储器的存储设备及其映射信息恢复方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1754155A (zh) * 2003-01-17 2006-03-29 泰斯特网络公司 使用分布式文件系统进行存储式高速缓存的方法和系统
CN100461806C (zh) * 2005-04-07 2009-02-11 华为技术有限公司 一种语音增值业务数据信息处理方法
CN1318974C (zh) * 2005-08-05 2007-05-30 北京九州汇宝软件有限公司<Del/> 数据库备份数据的压缩和查询方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1543605A (zh) * 2001-06-29 2004-11-03 ض� 高速缓存器元数据的存储
CN101025712A (zh) * 2006-02-24 2007-08-29 三星电子株式会社 使用非易失性存储器的存储设备及其映射信息恢复方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108173665A (zh) * 2016-12-07 2018-06-15 北京云中融信网络科技有限公司 一种备份数据的方法及装置
CN108173665B (zh) * 2016-12-07 2021-02-23 北京云中融信网络科技有限公司 一种备份数据的方法及装置

Also Published As

Publication number Publication date
CN101470645B (zh) 2012-04-25
CN101470645A (zh) 2009-07-01

Similar Documents

Publication Publication Date Title
WO2009092254A1 (zh) 一种高速缓存数据恢复的方法、装置和系统
US20210056074A1 (en) File System Data Access Method and File System
US9703640B2 (en) Method and system of performing incremental SQL server database backups
JP3830886B2 (ja) 不揮発性メモリへのデータ貯蔵方法
US8032707B2 (en) Managing cache data and metadata
EP2329360B1 (en) Managing cache data and metadata
CA2178213C (en) Incremental backup system
US20180046633A1 (en) Backup and restoration for storage system
CN100524302C (zh) 计算装置中的文件管理方法
CN104350477A (zh) 用于固态驱动装置(ssd)的优化的上下文移除
CN103999058A (zh) 带驱动器系统服务器
WO2015081470A1 (zh) 数据处理设备和数据处理的方法
CN106062742A (zh) 用于改进快照性能的系统和方法
WO2020098654A1 (zh) 基于云存储的数据存储方法、装置和存储介质
WO2019223377A1 (zh) 文件处理方法、装置、设备及存储介质
CN109582686B (zh) 分布式元数据管理一致性保证方法、装置、系统及应用
US8296270B2 (en) Adaptive logging apparatus and method
JP2004127295A (ja) 仮想記憶システムおよびその動作方法
CN110413376A (zh) 一种虚拟机管理usb设备的方法、设备以及存储介质
JP2008262561A (ja) 履歴上のファイル名およびロケーションをインデックス付きにすることによりファイル・サーチおよびファイル操作を支援するためのシステムおよび方法
CN114564339A (zh) 一种磁盘镜像文件跨平台迁移方法及系统
CN114416677A (zh) 一种冷存储数据的更新方法、装置、设备及存储介质
US7516133B2 (en) Method and apparatus for file replication with a common format
CN111581023A (zh) 银行内存数据处理方法及装置
CN110287064A (zh) 一种磁盘数据的还原方法、装置及电子设备

Legal Events

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

Ref document number: 08871216

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: 08871216

Country of ref document: EP

Kind code of ref document: A1