CN104616680B - Repeating data deleting system based on optical disc storage as well as data operating method and device - Google Patents
Repeating data deleting system based on optical disc storage as well as data operating method and device Download PDFInfo
- Publication number
- CN104616680B CN104616680B CN201410825881.0A CN201410825881A CN104616680B CN 104616680 B CN104616680 B CN 104616680B CN 201410825881 A CN201410825881 A CN 201410825881A CN 104616680 B CN104616680 B CN 104616680B
- Authority
- CN
- China
- Prior art keywords
- data
- fingerprint
- data block
- file
- block
- 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.)
- Expired - Fee Related
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/064—Management of blocks
- G06F3/0641—De-duplication techniques
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0674—Disk device
- G06F3/0677—Optical disk device, e.g. CD-ROM, DVD
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明适用于光盘存储技术领域,提供一种基于光盘存储的重复数据删除系统及数据操作方法、装置,所述系统包括高速存储设备、内存、处理器以及光盘柜,所述数据操作方法包括数据备份方法和数据还原方法,在数据备份方法中,将数据块缓冲在缓冲区内,当数据块缓冲量到达光盘容量时,则将数据块批量存入光盘中;在数据恢复方法中,通过缓冲区存储的文件目录,将光盘整盘缓存在缓冲区,获取并整合文件数据块。本发明充分利用光盘存储的特点,可以很大程度上减小光盘读写次数,从而实现一种基于光盘存储的重复数据删除系统。
The present invention is applicable to the technical field of optical disk storage, and provides a data deduplication system based on optical disk storage, a data operation method, and a device. The system includes a high-speed storage device, a memory, a processor, and an optical disk cabinet. The data operation method includes a data In the backup method and the data restoration method, in the data backup method, the data block is buffered in the buffer zone, and when the buffered amount of the data block reaches the capacity of the optical disc, the data block is stored in batches in the optical disc; The file directory stored in the area, the entire disc is cached in the buffer zone, and the file data blocks are obtained and integrated. The present invention makes full use of the characteristics of optical disc storage, can greatly reduce the number of times of reading and writing of optical discs, thereby realizing a deduplication system based on optical disc storage.
Description
技术领域technical field
本发明属于光盘数据管理技术领域,尤其涉及一种基于光盘存储的重复数据删除系统及数据操作方法、装置。The invention belongs to the technical field of optical disc data management, and in particular relates to an optical disc storage-based deduplication system, a data operation method and a device.
背景技术Background technique
大数据时代数据急剧增长,当今企业对信息存储的需求也在飞速增长,存储设备的改进已经不能满足企业数据存储的需求。企业在进行数据备份的过程中,会将大量相同的数据重复存储在存储设备中,导致存储资源的严重浪费。重复数据删除技术作为目前研究的热门技术,在数据存储过程中,对相同的数据仅存储一次,大大减少了存储资源的浪费。With the rapid growth of data in the era of big data, the demand for information storage of today's enterprises is also growing rapidly, and the improvement of storage devices can no longer meet the needs of enterprise data storage. In the process of data backup, enterprises will repeatedly store a large amount of the same data in the storage device, resulting in a serious waste of storage resources. Data de-duplication technology is a popular technology in current research. In the process of data storage, the same data is only stored once, which greatly reduces the waste of storage resources.
目前的一些重复数据删除系统,如P-Dedupe、Extreme Binning等,都采用磁盘作为数据存储设备,以数据块为基本存储单位进行数据存储。当系统存储数据块时,对数据块进行检测,若存储设备中存在与该数据块相同的数据块,则不需要再将数据块存入存储设备中;若不存在相同的数据块,则为该数据块存入存储设备中。一次备份的数据通常包含大量的数据块,存入存储设备的过程需要频繁访问存储设备,为了保证重复数据删除系统的性能,通常对存储设备的性能有一定的要求,大量的高性能存储设备大大的增加了重复数据删除系统的成本。Some current data deduplication systems, such as P-Dedupe and Extreme Binning, all use disks as data storage devices, and use data blocks as basic storage units for data storage. When the system stores a data block, it detects the data block. If the same data block exists in the storage device, it does not need to store the data block in the storage device; if there is no identical data block, it is The data block is stored in the storage device. The data backed up at one time usually contains a large number of data blocks. The process of storing in the storage device requires frequent access to the storage device. In order to ensure the performance of the deduplication system, there are usually certain requirements for the performance of the storage device. A large number of high-performance storage devices greatly increases the cost of the deduplication system.
与磁盘存储相比,光盘存储是一种廉价的数据长期保存方式。光盘一次性写的特点大大减少了写入数据时光盘的访问频率,怎样合理利用光盘的特性,配合数据缓存,对数据进行组织和管理,实现重复数据删除系统上的数据读写,是急需解决的问题。Compared with disk storage, optical disk storage is an inexpensive way of long-term data preservation. The one-time writing feature of the optical disc greatly reduces the access frequency of the optical disc when writing data. How to make reasonable use of the characteristics of the optical disc, cooperate with the data cache, organize and manage the data, and realize the data reading and writing on the deduplication system is an urgent need to solve The problem.
发明内容Contents of the invention
鉴于上述问题,本发明的目的在于提供一种基于光盘存储的重复数据删除系统及数据操作方法、装置,旨在解决现有磁盘存储系统访问频率高、存储效率低的技术问题。In view of the above problems, the purpose of the present invention is to provide a data deduplication system based on optical disk storage, a data operation method, and a device, aiming at solving the technical problems of high access frequency and low storage efficiency of existing disk storage systems.
一方面,所述基于光盘存储的重复数据删除系统包括高速存储设备、内存、处理器以及光盘柜,所述高速存储设备作为系统的缓冲区,分为数据块缓冲区、指纹存储区、文件目录存储区和光盘缓存区;所述内存作为系统的缓存区,分为基于光盘存储的重复数据删除系统指纹缓存区和数据块缓存区;所述光盘柜内设有多张光盘;On the one hand, the deduplication system based on optical disc storage includes a high-speed storage device, a memory, a processor, and an optical disc cabinet. The high-speed storage device is used as a buffer of the system and is divided into a data block buffer, a fingerprint storage area, and a file directory. A storage area and an optical disc buffer area; the internal memory is used as a buffer area of the system, and is divided into a fingerprint buffer area and a data block buffer area of a deduplication system based on optical disc storage; multiple optical discs are arranged in the optical disc cabinet;
其中所述数据块缓冲区,用于在数据备份时存储一定量的数据块,同时由若干个数据块组成一个块文件,当所述块文件数量达到一定数量时,将所述块文件批量写入所述光盘柜中的光盘内;Wherein the data block buffer is used to store a certain amount of data blocks during data backup, and a block file is composed of several data blocks at the same time. When the number of the block files reaches a certain number, the block files are written in batches into the optical disc in the optical disc cabinet;
所述指纹存储区,用于在数据备份时,存储所有非重复数据块的指纹信息,在数据进行重复查询的过程中,通过查询指纹存储区的指纹,判断数据块的重复性,每个数据块指纹都指向数据块的物理地址,所述物理地址中包含了数据块在所述光盘柜中的存储位置信息,用于填充数据块对应文件的目录信息;同样,由若干个指纹组成一个块文件,当所述块文件数量达到一定量时,将这些数据块批量写入所述光盘柜中的光盘内;The fingerprint storage area is used to store the fingerprint information of all non-repeated data blocks during data backup, and to judge the repeatability of the data blocks by querying the fingerprints in the fingerprint storage area during the process of repeated query of the data. The block fingerprints all point to the physical address of the data block, and the physical address contains the storage location information of the data block in the optical disk cabinet, which is used to fill the directory information of the file corresponding to the data block; similarly, a block is composed of several fingerprints files, when the number of the block files reaches a certain amount, these data blocks are written into the optical disc in the optical disc cabinet in batches;
所述文件目录存储区,用于在数据备份时存储文件的文件目录信息,记录了文件存储的光盘信息和各个数据块的存储信息,用于数据恢复过程中的数据块定位和组织,同时,当前文件数据备份完成后,若所述文件目录大小不超过一张光盘的容量,则将所述文件目录写入所述光盘柜中一张光盘内,若所述文件目录大小超过一张光盘的容量,则分成几个部分,依次存入所述光盘柜中连续的几张光盘内;The file directory storage area is used to store the file directory information of the file during data backup, records the disc information of the file storage and the storage information of each data block, and is used for data block positioning and organization in the data recovery process. At the same time, After the current file data backup is completed, if the size of the file directory does not exceed the capacity of a CD, then write the file directory into a CD in the CD cabinet, if the size of the file directory exceeds the capacity of a CD capacity, it is divided into several parts, which are sequentially stored in several consecutive optical discs in the optical disc cabinet;
所述光盘缓存区,用于在数据恢复时以整张光盘为单位缓存光盘数据,在数据恢复过程中缓存存有该文件数据的光盘数据,同时,缓存一些访问频率较高的光盘数据;The optical disc buffer area is used for buffering the optical disc data in units of the entire optical disc during data restoration, buffering the optical disc data containing the file data during the data recovery process, and at the same time, buffering some optical disc data with high access frequency;
所述指纹缓存区,用于在数据备份时,缓存访问频率较高的一些指纹;The fingerprint cache area is used to cache some fingerprints with high access frequency during data backup;
所述数据块缓存区,用于在数据恢复时,缓存读出频率较高的一些数据块,配合缓冲区中的光盘缓存区,形成两级缓存;The data block buffer area is used for buffering some data blocks with higher reading frequency during data recovery, and cooperates with the optical disc buffer area in the buffer area to form a two-level cache;
所述光盘柜中的光盘用于存储数据块、指纹和文件目录,以单张光盘为单位存储,各个区域中的数据按顺序存入光盘中。The optical discs in the optical disc cabinet are used to store data blocks, fingerprints and file directories, and are stored in units of a single optical disc, and the data in each area is stored in the optical disc in sequence.
进一步的,所述数据块指纹、文件目录在光盘柜中双盘存储备份。Further, the data block fingerprints and file directories are stored and backed up in double discs in the optical disc cabinet.
另一方面,所述基于光盘存储的重复数据删除系统的数据操作方法,包括数据备份方法和数据恢复方法;On the other hand, the data operation method of the deduplication system based on optical disc storage includes a data backup method and a data recovery method;
其中所述数据备份方法包括:Wherein said data backup method includes:
当接收到文件数据备份请求后,将待备份的文件数据分成若干个数据块,按顺序选取数据块,并计算当前数据块的指纹;After receiving the file data backup request, divide the file data to be backed up into several data blocks, select the data blocks in order, and calculate the fingerprint of the current data block;
对于当前数据块,在所述指纹缓存区和指纹存储区中查询是否存在与当前数据块指纹相同的指纹;若存在相同的指纹,则获取所述指纹对应数据块的物理地址,并在文件目录存储区中填充该数据块的文件目录信息;若不存在相同的指纹,则将该数据块存储在所述数据块缓冲区,同时将所述数据块指纹存储到所述指纹存储区,在文件目录存储区中填充该数据块的文件目录信息;For the current data block, query whether there is a fingerprint identical to the fingerprint of the current data block in the fingerprint cache area and the fingerprint storage area; if there is the same fingerprint, then obtain the physical address of the corresponding data block of the fingerprint, and store the The file directory information of the data block is filled in the storage area; if there is no identical fingerprint, the data block is stored in the data block buffer, and the data block fingerprint is stored in the fingerprint storage area at the same time, in the file Fill the file directory information of the data block in the directory storage area;
每当所述数据缓冲区/指纹缓存储区中的块文件大小达到一张光盘容量时,将所述数据缓冲区/指纹缓存储区中的写入光盘柜中对应光盘;Whenever the size of the block file in the data buffer/fingerprint cache storage area reaches the capacity of one optical disc, write the data in the data buffer/fingerprint buffer storage area to the corresponding optical disc in the optical disc cabinet;
当文件数据备份完成后,将所述文件目录存储区中的文件目录写入光盘柜中对应光盘;After the file data backup is completed, write the file directory in the file directory storage area into the corresponding CD in the CD cabinet;
其中所述数据恢复方法包括:The data recovery methods mentioned therein include:
当接收到文件数据恢复请求时,获取所述文件数据对应的文件目录信息,将存储该文件数据的光盘数据以整盘为单位预读到所述光盘缓存区中;When a file data recovery request is received, the file directory information corresponding to the file data is obtained, and the optical disc data storing the file data is pre-read into the optical disc buffer area in units of the entire disc;
首先访问所述数据块缓存区,然后访问所述光盘缓存区,获取文件各个数据块数据;First access the data block buffer area, and then access the optical disc buffer area to obtain the data of each data block of the file;
当所有数据块获取完成后,整合数据块,得到原文件。After all the data blocks are acquired, the data blocks are integrated to obtain the original file.
进一步的,所述数据备份方法中,所述当接收到文件数据备份请求后,将待备份的文件数据分成若干个数据块,按顺序选取数据块,并计算当前数据块的指纹步骤,具体包括:Further, in the data backup method, after the file data backup request is received, the file data to be backed up is divided into several data blocks, the data blocks are selected in order, and the fingerprint of the current data block is calculated, which specifically includes :
当接收到文件数据备份请求后,将待备份的文件数据分成若干个大小相同的数据块;After receiving the file data backup request, divide the file data to be backed up into several data blocks of the same size;
按顺序选取数据块,对当前数据块通过哈希算法计算得到对应的数据块指纹。Select the data blocks in order, and calculate the corresponding data block fingerprint through the hash algorithm for the current data block.
进一步的,所述数据备份方法中,所述对于当前数据块,在所述指纹缓存区和指纹存储区中查询是否存在与当前数据块指纹相同的指纹;若存在相同的指纹,则获取所述指纹对应数据块的物理地址,并在文件目录存储区中填充该数据块的文件目录信息;若不存在相同的指纹,则将该数据块存储在所述数据块缓冲区,同时将所述数据块指纹存储到所述指纹存储区,在文件目录存储区中填充该数据块的文件目录信息步骤,具体包括:Further, in the data backup method, for the current data block, query whether there is a fingerprint identical to the fingerprint of the current data block in the fingerprint buffer area and the fingerprint storage area; if there is the same fingerprint, obtain the Fingerprint corresponds to the physical address of the data block, and fills the file directory information of the data block in the file directory storage area; if there is no identical fingerprint, the data block is stored in the data block buffer, and the data The block fingerprint is stored in the fingerprint storage area, and the step of filling the file directory information of the data block in the file directory storage area specifically includes:
针对每个数据块,首先查询所述指纹缓存区中是否存在与当前数据块指纹相同的指纹;For each data block, first inquire whether there is a fingerprint identical to the fingerprint of the current data block in the fingerprint buffer;
若所述指纹缓存区中不存在相同指纹,则继续查询所述指纹存储区中是否存在与当前数据块指纹相同的指纹;If the same fingerprint does not exist in the fingerprint buffer area, then continue to inquire whether there is a fingerprint identical to the current data block fingerprint in the fingerprint storage area;
若所述指纹存储区中不存在相同指纹,则将该数据块存储在所述数据块缓冲区,同时将所述数据块指纹存储到所述指纹存储区;If the same fingerprint does not exist in the fingerprint storage area, the data block is stored in the data block buffer, and the data block fingerprint is stored in the fingerprint storage area;
若所述指纹缓存区中存在相同指纹,则获取所述指纹对应数据块的物理地址;If the same fingerprint exists in the fingerprint buffer area, then obtain the physical address of the data block corresponding to the fingerprint;
若所述指纹存储区中存在相同指纹,则获取所述指纹对应数据块的物理地址,将所述指纹缓存到所述指纹缓存区中;If the same fingerprint exists in the fingerprint storage area, then obtain the physical address of the data block corresponding to the fingerprint, and cache the fingerprint in the fingerprint buffer area;
在文件目录存储区中填充该数据块的文件目录信息。The file directory information of the data block is filled in the file directory storage area.
进一步的,所述数据恢复方法中,所述首先访问所述数据块缓存区,然后访问所述光盘缓存区,获取文件各个数据块数据步骤,具体包括:Further, in the data recovery method, the step of first accessing the data block buffer area, then accessing the optical disc buffer area, and obtaining data of each data block of the file specifically includes:
针对所述光盘缓存中的每个数据块,首先查询所述数据块缓存区中是否存在当前数据块,若存在则获取所述数据块;For each data block in the optical disk cache, first inquire whether there is a current data block in the data block cache, and if so, obtain the data block;
若所述数据块缓存区中不存在当前数据块,则从所述光盘存储缓存区中获取所述数据块。If the current data block does not exist in the data block buffer area, the data block is acquired from the optical disk storage buffer area.
第三方面,所述基于光盘存储的重复数据删除系统的数据操作装置包括数据备份装置和数据恢复装置,In the third aspect, the data operation device of the deduplication system based on optical disc storage includes a data backup device and a data recovery device,
其中所述数据备份装置包括:Wherein said data backup device includes:
分块计算单元,用于当接收到文件数据备份请求后,将待备份的文件数据分成若干个数据块,按顺序选取数据块,并计算当前数据块的指纹;The block calculation unit is used to divide the file data to be backed up into several data blocks after receiving the file data backup request, select the data blocks in order, and calculate the fingerprint of the current data block;
查询填充单元,用于对于当前数据块,在所述指纹缓存区和指纹存储区中查询是否存在与当前数据块指纹相同的指纹;若存在相同的指纹,则获取所述指纹对应数据块的物理地址,并在文件目录存储区中填充该数据块的文件目录信息;若不存在相同的指纹,则将该数据块存储在所述数据块缓冲区,同时将所述数据块指纹存储到所述指纹存储区,在文件目录存储区中填充该数据块的文件目录信息;The query filling unit is used to query whether there is a fingerprint identical to the fingerprint of the current data block in the fingerprint cache area and the fingerprint storage area for the current data block; if there is the same fingerprint, obtain the physical data of the data block corresponding to the fingerprint. address, and fill in the file directory information of the data block in the file directory storage area; if there is no identical fingerprint, the data block is stored in the data block buffer, and the data block fingerprint is stored in the A fingerprint storage area, filling the file directory information of the data block in the file directory storage area;
数据块指纹写入单元,用于每当所述数据缓冲区/指纹缓存储区中的块文件大小达到一张光盘容量时,将所述数据缓冲区/指纹缓存储区中的写入光盘柜中对应光盘;The data block fingerprint writing unit is used to write the data in the data buffer/fingerprint buffer storage area into the optical disk cabinet whenever the size of the block file in the data buffer/fingerprint buffer storage area reaches the capacity of a disc Corresponding disc in
目录写入单元,用于当文件数据备份完成后,将所述文件目录存储区中的文件目录写入光盘柜中对应光盘;The directory writing unit is used to write the file directory in the file directory storage area into the corresponding optical disk in the optical disk cabinet after the file data backup is completed;
其中所述数据恢复装置包括:Wherein said data recovery device includes:
数据预存单元,用于当接收到文件数据恢复请求时,获取所述文件数据对应的文件目录信息,将存储该文件数据的光盘数据以整盘为单位预读到所述光盘缓存区中;The data pre-storage unit is used to obtain the file directory information corresponding to the file data when receiving the file data restoration request, and pre-read the optical disc data storing the file data into the optical disc buffer area in units of the entire disc;
数据获取单元,用于首先访问所述数据块缓存区,然后访问所述光盘缓存区,获取文件各个数据块数据;A data acquisition unit, configured to first access the data block buffer area, and then access the optical disc buffer area to acquire data of each data block of the file;
数据整合单元,用于当所有数据块获取完成后,整合数据块,得到原文件。The data integration unit is configured to integrate the data blocks to obtain the original file after all the data blocks have been acquired.
进一步的,所述分块计算单元包括:Further, the block calculation unit includes:
分块模块,用于当接收到文件数据备份请求后,将待备份的文件数据分成若干个大小相同的数据块;The block module is used to divide the file data to be backed up into several data blocks of the same size after receiving the file data backup request;
哈希计算模块,用于按顺序选取数据块,对当前数据块通过哈希算法计算得到对应的数据块指纹。The hash calculation module is used to select data blocks in order, and calculate the corresponding data block fingerprints for the current data block through hash algorithm.
进一步的,所述查询填充单元包括:Further, the query filling unit includes:
第一查询模块,用于针对每个数据块,首先查询所述指纹缓存区中是否存在与当前数据块指纹相同的指纹;The first query module is configured to, for each data block, first query whether there is a fingerprint identical to the fingerprint of the current data block in the fingerprint buffer;
第二查询模块,用于若所述指纹缓存区中不存在相同指纹,则继续查询所述指纹存储区中是否存在与当前数据块指纹相同的指纹;The second query module is used to continue to query whether there is a fingerprint identical to the fingerprint of the current data block in the fingerprint storage area if the same fingerprint does not exist in the fingerprint buffer;
数据块指纹存储模块,用于若所述指纹存储区中不存在相同指纹,则将该数据块存储在所述数据块缓冲区,同时将所述数据块指纹存储到所述指纹存储区;A data block fingerprint storage module, configured to store the data block in the data block buffer and store the data block fingerprint in the fingerprint storage area if the same fingerprint does not exist in the fingerprint storage area;
地址获取模块,用于若所述指纹缓存区和指纹存储区中都不存在相同指纹,则获取所述指纹对应数据块的物理地址;An address obtaining module, configured to obtain the physical address of the data block corresponding to the fingerprint if the same fingerprint does not exist in the fingerprint buffer area and the fingerprint storage area;
目录填充模块,用于在文件目录存储区中填充该数据块的文件目录信息。The directory filling module is used to fill the file directory information of the data block in the file directory storage area.
进一步的,所述数据获取单元包括:Further, the data acquisition unit includes:
第三查询模块,用于针对所述光盘缓存中的每个数据块,首先查询所述数据块缓存区中是否存在当前数据块,若存在则获取所述数据块;The third query module is configured to, for each data block in the optical disc cache, first query whether the current data block exists in the data block buffer area, and obtain the data block if it exists;
第四查询模块,用于若所述数据块缓存区中不存在当前数据块,则从所述光盘存储缓存区中获取所述数据块。A fourth query module, configured to obtain the data block from the optical disk storage buffer if the current data block does not exist in the data block buffer.
本发明的有益效果是:本发明技术方案包括文件数据备份和文件数据恢复,在文件数据备份的过程中,首先进行数据分块,根据指纹对数据块经过查重后,先存储在缓冲区,随后批量存入光盘中,本发明利用光盘一次性写入的性能,减少了数据写入时,存储资源的访问频率,提高了数据存储的效率;在文件数据恢复的过程中,根据文件的目录信息,将存储文件数据的光盘数据并行缓存到缓冲区,大大减少了读盘次数,同时添加数据块缓存,提高了读数据的效率;另外,在备份和恢复过程中,本发明中提供了光盘缓存和数据块缓存的两级缓存机制,充分适应光盘数据读写的性质,提高了读数据的效率。The beneficial effect of the present invention is: the technical scheme of the present invention comprises file data backup and file data recovery, in the process of file data backup, first carry out data block, after the data block is checked for duplication according to fingerprint, store in buffer zone first, Then batches are stored in optical discs. The present invention utilizes the performance of one-time writing of optical discs to reduce the access frequency of storage resources during data writing and improve the efficiency of data storage; Information, the disc data storing the file data is cached in parallel to the buffer zone, which greatly reduces the number of disk reads, and adds data block cache at the same time, which improves the efficiency of reading data; in addition, in the process of backup and recovery, the present invention provides CD The two-level cache mechanism of cache and data block cache fully adapts to the nature of optical disc data reading and writing, and improves the efficiency of reading data.
附图说明Description of drawings
图1是重复数据删除系统的硬件结构图;Fig. 1 is the hardware structural diagram of deduplication system;
图2是重复数据删除系统的原理结构图;Fig. 2 is a schematic structural diagram of the data deduplication system;
图3是光盘柜结构图;Fig. 3 is a structural diagram of an optical disc cabinet;
图4是缓冲区结构图;Fig. 4 is a buffer structure diagram;
图5是数据块指纹的数据结构示意图;Fig. 5 is a schematic diagram of a data structure of a data block fingerprint;
图6是文件目录的数据结构示意图;Fig. 6 is a schematic diagram of the data structure of the file directory;
图7是本发明第一实施例提供的数据备份方法的流程图;Fig. 7 is a flow chart of the data backup method provided by the first embodiment of the present invention;
图8是本发明第二实施例提供的数据备份方法的流程图;Fig. 8 is a flow chart of the data backup method provided by the second embodiment of the present invention;
图9是本发明第三实施例提供的数据恢复方法的流程图;FIG. 9 is a flow chart of a data recovery method provided in a third embodiment of the present invention;
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
本发明实施例提供了一种基于光盘存储的重复数据删除系统,从系统硬件结构来看,如图1所示,并结合图2所示的重复数据删除系统原理图,所述重复数据删除系统包括高速存储设备(如SSD、硬盘)、内存、处理器(即CPU)以及光盘柜,所述高速存储设备作为系统的缓冲区,缓冲区主要分为数据块缓冲区、指纹存储区、文件目录存储区和光盘缓存区;在内存中设置缓存区,缓存区由指纹缓存区和数据块缓存区构成;所述光盘柜设有多张光盘的,具体的,所述光盘柜由多个光盘组构成,每个光盘组包括多张光盘,光盘为主要存储设备,光盘柜主要存储数据块、指纹和文件目录。The embodiment of the present invention provides a deduplication system based on optical disc storage. From the perspective of the system hardware structure, as shown in FIG. 1 , combined with the schematic diagram of the deduplication system shown in FIG. Including high-speed storage device (such as SSD, hard disk), internal memory, processor (ie CPU) and optical disc cabinet, described high-speed storage device is used as the buffer zone of the system, and the buffer zone is mainly divided into data block buffer zone, fingerprint storage area, file directory storage area and optical disc buffer area; a buffer area is set in the memory, and the buffer area is composed of a fingerprint buffer area and a data block buffer area; the optical disc cabinet is provided with multiple optical discs, specifically, the optical disc cabinet is composed of a plurality of optical discs Composition, each optical disc group includes multiple optical discs, the optical disc is the main storage device, and the optical disc cabinet mainly stores data blocks, fingerprints and file directories.
下面针对上述系统各个部分进行详细描述。Each part of the above-mentioned system will be described in detail below.
所述缓冲区包括数据块缓冲区、指纹存储区、文件目录存储区和光盘缓存区。其中,所述数据块缓冲区存储一定量的数据块,由若干个数据块组成一个块文件,当块文件数量达到数据一定量时,将这些数据块批量写入光盘中。The buffer includes a data block buffer, a fingerprint storage area, a file directory storage area and an optical disk buffer area. Wherein, the data block buffer stores a certain amount of data blocks, a block file is composed of several data blocks, and when the number of block files reaches a certain amount of data, these data blocks are written into the optical disk in batches.
所述指纹存储区用于存储所有非重复数据块的指纹信息,在数据进行重复查询的过程中,通过查询指纹存储区的指纹,判断数据块的重复性,每个数据块指纹都指向数据块物理地址,物理地址中包含了数据块在光盘柜中的存储位置信息,用于填充数据块对应文件的目录信息;同样,由若干个指纹组成一个块文件,当块文件数量达到数据一定量时,将这些数据块批量写入光盘中。The fingerprint storage area is used to store the fingerprint information of all non-repetitive data blocks. In the process of repeated query of data, the repeatability of the data blocks is judged by querying the fingerprints in the fingerprint storage area. Each data block fingerprint points to the data block Physical address, the physical address contains the storage location information of the data block in the CD cabinet, which is used to fill the directory information of the file corresponding to the data block; similarly, a block file is composed of several fingerprints, when the number of block files reaches a certain amount of data , and write these data blocks to the disc in batches.
所述文件目录存储区用于存储所有文件的文件目录信息,记录了文件存储的光盘信息和各个数据块的存储信息,用于数据恢复过程中的数据块定位和组织,同时,当前文件数据备份完成后,若一个文件目录大小不超过一张光盘的容量,则将文件目录写入一张光盘中,若文件目录大小超过一张光盘的容量,则分成几个部分,依次存入连续的光盘中。The file directory storage area is used to store the file directory information of all files, records the disc information of file storage and the storage information of each data block, and is used for data block positioning and organization in the data recovery process. At the same time, the current file data backup After completion, if the size of a file directory does not exceed the capacity of a CD, the file directory will be written into a CD, if the size of the file directory exceeds the capacity of a CD, it will be divided into several parts and stored in successive CDs middle.
所述光盘缓存区,以整张光盘为单位缓存光盘数据,在数据恢复过程中缓存存有该文件数据的光盘数据,同时,缓存一些访问频率较高的光盘数据,由于光盘的一次性写特点,保证了光盘中的数据不会发生改变,保证了缓存数据的可靠性。The disc buffer area caches the disc data in units of the entire disc, and caches the disc data containing the file data during the data recovery process. At the same time, it caches some disc data with high access frequency. , ensuring that the data in the optical disc will not change, and ensuring the reliability of the cached data.
所述缓存区包括指纹缓存区和数据块缓存区。其中所述指纹缓存区用于缓存访问频率较高的一些指纹,提高了指纹查询的效率。The cache includes a fingerprint cache and a data block cache. The fingerprint cache area is used to cache some fingerprints with high access frequency, which improves the efficiency of fingerprint query.
所述数据块缓存区用于缓存读出频率较高的一些数据块,配合缓冲区中的光盘缓存区,充分利用光盘的特点,形成两级缓存,提高了文件数据恢复的效率。The data block buffer area is used for buffering some data blocks with high reading frequency, cooperates with the optical disc buffer area in the buffer area, fully utilizes the characteristics of the optical disc, forms a two-level buffer, and improves the efficiency of file data recovery.
为了便于描述,假设一张光盘的容量为40G,由15张40G的光盘构成一个光盘组,由若干个光盘组构成一个光盘柜。如图3所示的光盘柜结构,光盘柜被划分为三个部分,一个部分存储数据块,一个部分存储文件目录,另外一个用于存储指纹,每个部分中数据以整盘为单位按顺序存入光盘中,因此,数据的存储位置都是可预知的,保证了数据块在存入缓冲区,还未存入光盘时,文件目录中的数据块存储信息是已知的。For ease of description, assume that the capacity of a CD is 40G, 15 CDs of 40G constitute a CD group, and several CD groups constitute a CD cabinet. The CD cabinet structure shown in Figure 3, the CD cabinet is divided into three parts, one part stores data blocks, one part stores file directories, and the other part is used to store fingerprints, and the data in each part is in the order of the whole disk. Therefore, the storage location of the data is predictable, which ensures that the data block storage information in the file directory is known when the data block is stored in the buffer zone and not yet stored in the optical disc.
基于上述假设,参照如图4所示的缓冲区结构:Based on the above assumptions, refer to the buffer structure shown in Figure 4:
所述数据块缓冲区的大小为n*40GB,由n个40GB的与光盘容量相同的部分构成,每个数据块大小为16KB,由1024个数据块构成一个16MB的块文件(chunkfile)。当存入数据块缓冲区的块文件达到2560个,即暂存到缓冲区的数据达到40GB(即一张光盘的大小),则将该40GB的数据一次性存入光盘柜中的一张光盘中。数据块缓冲区为n*40GB保证了在数据写入光盘的同时,进入缓冲区中的数据块能够存入数据块缓冲区,使得不同存储区域的数据读写同时进,提高效率,同时也保证了数据的可靠性。The size of the data block buffer is n*40GB, consisting of n parts of 40GB equal to the capacity of the optical disc, each data block is 16KB in size, and a 16MB chunkfile is formed by 1024 data blocks. When the number of block files stored in the data block buffer reaches 2560, that is, the data temporarily stored in the buffer reaches 40GB (that is, the size of a CD), the 40GB data is stored in a CD in the CD cabinet at one time middle. The data block buffer is n*40GB, which ensures that the data blocks entering the buffer can be stored in the data block buffer at the same time as the data is written to the disc, so that the data read and write in different storage areas can be read and written at the same time, improving efficiency and ensuring data reliability.
所述指纹存储区中,一个数据块的指纹为64B,由256K个指纹构成一个块文件,每存储2560个块文件,即将它们一次性存入光盘柜中的一张光盘中。参照如5所示的数据块指纹的数据结构示意图,一个数据块指纹为32B,指纹指向一个数据块的物理地址,物理地址为32B,物理地址中包含了数据块在光盘柜中存储的地址信息(光盘组ID、光盘ID、块文件ID、块ID)。In the fingerprint storage area, the fingerprint of a data block is 64B, and a block file is composed of 256K fingerprints. Every time 2560 block files are stored, they are stored in a CD in the CD cabinet at one time. Referring to the data structure diagram of the data block fingerprint shown in Figure 5, a data block fingerprint is 32B, the fingerprint points to the physical address of a data block, the physical address is 32B, and the physical address contains the address information of the data block stored in the optical disk cabinet (disc group ID, disc ID, block file ID, block ID).
所述文件目录存储区中,一旦文件备份完成,若文件对应的目录大小小于一张光盘的大小40GB,则直接将该文件目录存入光盘柜中的一张光盘中,反之,将文件目录按照40GB为基础存储单位,顺序存储到光盘柜中的几张光盘中。参照如图6所示的为文件目录的数据结构示意图,文件目录为一个树形数据结构,由文件ID指向存储文件数据块的各个光盘地址(光盘组ID、光盘ID),由光盘指向存储该文件数据块的块文件,块文件中存储了数据块的ID和块地址,数据块ID为数据块在块文件中的存储地址,块地址为数据块在原文件中的存储地址。在数据备份的过程中,若数据块指纹和指纹存储区中的指纹相同,即存在相同的已存入光盘中的数据块,则直接通过相同的数据块指纹指向的物理地址信息,直接向该数据块对应的文件目录中写入该数据块的存储信息即可。与此同时,在数据恢复的过程中,该文件目录结构,配合了光盘缓存区的光盘数据预取功能。In the file directory storage area, once the file backup is completed, if the size of the directory corresponding to the file is less than 40GB of the size of a CD, the file directory is directly stored in a CD in the CD cabinet; otherwise, the file directory is stored according to the 40GB is the basic storage unit, which is sequentially stored in several CDs in the CD cabinet. Referring to the data structure schematic diagram of the file directory as shown in Figure 6, the file directory is a tree-shaped data structure, and the file ID points to each disc address (disc group ID, disc ID) that stores the file data block, and the disc points to store the The block file of the file data block, the ID and block address of the data block are stored in the block file, the data block ID is the storage address of the data block in the block file, and the block address is the storage address of the data block in the original file. In the process of data backup, if the fingerprint of the data block is the same as the fingerprint in the fingerprint storage area, that is, there is the same data block that has been stored in the optical disc, then the physical address information pointed to by the same data block fingerprint is directly sent to the The storage information of the data block can be written in the file directory corresponding to the data block. At the same time, in the process of data recovery, the file directory structure cooperates with the optical disc data prefetch function in the optical disc cache area.
所述光盘缓存区,在数据恢复过程中,提供了光盘数据预取功能,以一张光盘为单位,将存储文件数据的光盘中的数据缓存在光盘缓存区中,同时缓存一些经常访问的光盘数据。The optical disc buffer area provides an optical disc data prefetch function during the data recovery process, and uses an optical disc as a unit to cache the data in the optical disc storing file data in the optical disc buffer area, and cache some frequently accessed optical discs at the same time data.
基于上述系统,本发明实施例还提供了一种数据操作方法,包括数据备份方法和数据恢复方法,下面通过具体实施例来进行说明本发明技术方案。Based on the above system, an embodiment of the present invention also provides a data operation method, including a data backup method and a data recovery method. The technical solution of the present invention will be described below through specific embodiments.
实施例一:Embodiment one:
图7示出了本发明第一实施例提供的数据备份方法的流程,为了便于说明仅示出了与本发明实施例相关的部分。FIG. 7 shows the flow of the data backup method provided by the first embodiment of the present invention, and only shows the part related to the embodiment of the present invention for convenience of description.
如图7所示,本实施例提供的数据备份方法包括:As shown in Figure 7, the data backup method provided in this embodiment includes:
步骤S701、当接收到文件数据备份请求后,将待备份的文件数据分成若干个数据块,按顺序选取数据块,并计算当前数据块的指纹。Step S701. After receiving the file data backup request, divide the file data to be backed up into several data blocks, select the data blocks in order, and calculate the fingerprint of the current data block.
当需要进行数据备份时,首先触发生成文件数据备份请求。并接收待备份的文件数据,安装预定格式,将所述待备份的文件数据分成若干个数据块,每个数据块大小为16KB,随后依次处理每个数据块。具体的,按顺序逐一选取数据块,并计算当前数据块的指纹。本实施例不限定指纹的具体算法,该指纹为数据的识别信息。When data backup is required, the generation of a file data backup request is first triggered. And receive the file data to be backed up, install a predetermined format, divide the file data to be backed up into several data blocks, each data block is 16KB in size, and then process each data block in turn. Specifically, data blocks are selected one by one in sequence, and the fingerprint of the current data block is calculated. This embodiment does not limit the specific algorithm of the fingerprint, which is the identification information of the data.
步骤S702、对于当前数据块,在所述指纹缓存区和指纹存储区中查询是否存在与当前数据块指纹相同的指纹。Step S702. For the current data block, query whether there is a fingerprint identical to the fingerprint of the current data block in the fingerprint buffer area and the fingerprint storage area.
所述指纹缓存区存储有访问频率较高的一些指纹,所述指纹存储区中存储有完整的指纹数据。The fingerprint buffer area stores some fingerprints with high access frequency, and the fingerprint storage area stores complete fingerprint data.
步骤S703、若存在相同的指纹,则获取所述指纹对应数据块的物理地址,并在文件目录存储区中填充该数据块的文件目录信息;Step S703, if the same fingerprint exists, obtain the physical address of the data block corresponding to the fingerprint, and fill in the file directory information of the data block in the file directory storage area;
步骤S704、若不存在相同的指纹,则将该数据块存储在所述数据块缓冲区,同时将所述数据块指纹存储到所述指纹存储区,在文件目录存储区中填充该数据块的文件目录信息。Step S704, if the same fingerprint does not exist, store the data block in the data block buffer, store the data block fingerprint in the fingerprint storage area, and fill the data block in the file directory storage area File directory information.
首先查询指纹缓存区中是否存在与当前数据块指纹相同的指纹,若存在则直接获取所述指纹对应数据块的物理地址,并在文件目录存储区中填充该数据块的文件目录信息;否则继续在指纹存储区中查询是否存在与当前数据块指纹相同的指纹,若存在,同样直接获取所述指纹对应数据块的物理地址,并在文件目录存储区中填充该数据块的文件目录信息,同时将所述指纹缓存在所述指纹缓存区中;说明此数据块在光盘柜中有重复,因此该数据块不用备份,直接获取所述指纹对应数据块的物理地址,并在文件目录存储区中,写入存储信息即可,即写入当前数据块对应的文件目录。若仍查询不到与当前数据块指纹相同的指纹,说明光盘柜中并未保存该数据块数据,因此需要存储该数据块,具体的,将该数据块存储在所述数据块缓冲区,同时将所述数据块指纹存储到所述指纹存储区,并且在文件目录存储区中填充该数据块的文件目录信息。First query whether there is a fingerprint identical to the fingerprint of the current data block in the fingerprint cache area, if it exists, directly obtain the physical address of the data block corresponding to the fingerprint, and fill in the file directory information of the data block in the file directory storage area; otherwise continue Query whether there is a fingerprint identical to the fingerprint of the current data block in the fingerprint storage area, if it exists, directly obtain the physical address of the data block corresponding to the fingerprint, and fill in the file directory information of the data block in the file directory storage area, and at the same time Cache the fingerprint in the fingerprint cache area; explain that this data block is repeated in the CD cabinet, so the data block does not need to be backed up, and directly obtains the physical address of the data block corresponding to the fingerprint, and stores it in the file directory storage area , just write the storage information, that is, write to the file directory corresponding to the current data block. If the same fingerprint as the current data block fingerprint is still not found, it means that the data block data is not saved in the CD cabinet, so the data block needs to be stored, specifically, the data block is stored in the data block buffer, and at the same time The fingerprint of the data block is stored in the fingerprint storage area, and the file directory information of the data block is filled in the file directory storage area.
步骤S705、每当所述数据缓冲区/指纹缓存储区中的块文件大小达到一张光盘容量时,将所述数据缓冲区/指纹缓存储区中的写入光盘柜中对应光盘。Step S705 , whenever the size of the block files in the data buffer/fingerprint cache storage area reaches the capacity of one optical disc, write the data in the data buffer/fingerprint buffer storage area to the corresponding optical disc in the optical disc cabinet.
完成一个数据块处理后,继续选择下一数据块进行同样处理,当所述数据缓冲区/指纹缓存储区中的块文件大小达到一张光盘容量时,即块文件达到40G时,将所述数据缓冲区/指纹缓存储区中的写入光盘柜的一张光盘中。After completing the processing of a data block, continue to select the next data block for the same processing, and when the size of the block file in the data buffer/fingerprint buffer storage area reaches the capacity of an optical disc, that is, when the block file reaches 40G, the The data buffer/fingerprint cache storage area is written to a disc in the disc cabinet.
步骤S706、当文件数据备份完成后,将所述文件目录存储区中的文件目录写入光盘柜中对应光盘。Step S706. After the file data backup is completed, write the file directory in the file directory storage area into the corresponding optical disk in the optical disk cabinet.
当所述当文件数据备份完成后,即当前数据块为待处理文件数据的最后一个数据块并处理完毕时,最后将所述文件目录存储区中的文件目录写入光盘柜中对应光盘。When the backup of the file data is completed, that is, the current data block is the last data block of the file data to be processed and the processing is completed, the file directory in the file directory storage area is finally written into the corresponding optical disk in the optical disk cabinet.
本实施例中,光盘柜由若干个光盘组组成,每个光盘组中有一定数量的光盘,光盘柜中分为几个区域分别用于存储数据块、指纹和文件目录。在光盘柜中,以单张光盘为单位存储数据,各个区域中的数据按顺序存入光盘中。为了避免光盘出现不可恢复性错误,优选的,在一次性写光盘的过程中,相邻的下一张光盘并行存储相同的数据,保证数据的可靠性。即所述数据块指纹、文件目录在光盘柜中双盘存储备份。In this embodiment, the optical disk cabinet is composed of several optical disk groups, and each optical disk group has a certain number of optical disks. The optical disk cabinet is divided into several areas for storing data blocks, fingerprints and file directories respectively. In the optical disc cabinet, data is stored in units of a single optical disc, and data in each area is stored in the optical disc in sequence. In order to avoid unrecoverable errors on the optical disc, preferably, in the process of writing the optical disc once, the next adjacent optical disc stores the same data in parallel to ensure the reliability of the data. That is, the data block fingerprints and file directories are stored and backed up in double disks in the CD cabinet.
实施例二:Embodiment two:
图8示出了本发明第二实施例提供的数据备份方法的流程,为了便于说明仅示出了与本发明实施例相关的部分。FIG. 8 shows the flow of the data backup method provided by the second embodiment of the present invention, and only shows the part related to the embodiment of the present invention for convenience of description.
如图8所示,本实施例提供的数据备份方法包括:As shown in Figure 8, the data backup method provided in this embodiment includes:
步骤S801、当接收到文件数据备份请求后,将待备份的文件数据分成若干个大小相同的数据块;Step S801, after receiving the file data backup request, divide the file data to be backed up into several data blocks of the same size;
步骤S802、按顺序选取数据块,对当前数据块通过哈希算法计算得到对应的数据块指纹;Step S802, selecting data blocks in sequence, and calculating the corresponding data block fingerprints for the current data block through hash algorithm;
步骤S803、针对每个数据块,首先查询所述指纹缓存区中是否存在与当前数据块指纹相同的指纹;Step S803, for each data block, first inquire whether there is a fingerprint identical to the fingerprint of the current data block in the fingerprint buffer;
步骤S804、若所述指纹缓存区中不存在相同指纹,则继续查询所述指纹存储区中是否存在与当前数据块指纹相同的指纹;Step S804, if the same fingerprint does not exist in the fingerprint buffer area, continue to inquire whether there is a fingerprint identical to the fingerprint of the current data block in the fingerprint storage area;
步骤S805、若所述指纹存储区中不存在相同指纹,则将该数据块存储在所述数据块缓冲区,同时将所述数据块指纹存储到所述指纹存储区;Step S805, if the same fingerprint does not exist in the fingerprint storage area, store the data block in the data block buffer, and store the data block fingerprint in the fingerprint storage area;
步骤S806、若所述指纹缓存区或指纹存储区中存在相同指纹,则获取所述指纹对应数据块的物理地址,并将所述指纹缓存到所述指纹缓存区中;Step S806, if the same fingerprint exists in the fingerprint cache area or the fingerprint storage area, obtain the physical address of the data block corresponding to the fingerprint, and cache the fingerprint in the fingerprint cache area;
步骤S807、在文件目录存储区中填充该数据块的文件目录信息;Step S807, filling the file directory information of the data block in the file directory storage area;
步骤S808、每当所述数据缓冲区/指纹缓存储区中的块文件大小达到一张光盘容量时,将所述数据缓冲区/指纹缓存储区中的写入光盘柜中对应光盘;Step S808, whenever the size of the block file in the data buffer/fingerprint buffer storage area reaches the capacity of one optical disc, write the data in the data buffer/fingerprint buffer storage area to the corresponding optical disc in the optical disc cabinet;
步骤S809、当文件数据备份完成后,将所述文件目录存储区中的文件目录写入光盘柜中对应光盘。Step S809, when the file data backup is completed, write the file directory in the file directory storage area into the corresponding optical disk in the optical disk cabinet.
本实施例方法在实施例一基础上,公开了一些具体步骤,分块时采用哈希算法,查询指纹缓存区和指纹存储区中是否存在与当前数据块指纹相同的指纹,首先查询指纹缓存区中,当不存在时再查询指纹存储区。若指纹缓存区和指纹存储区中都不存在与当前数据块指纹一致的指纹时,则认定当前数据块为新数据块,需要对数据块进行存储;否则当前数据块为重复数据块,只用记录文件目录信息即可。The method of this embodiment discloses some specific steps on the basis of Embodiment 1. When dividing blocks, a hash algorithm is used to query whether there is a fingerprint identical to the fingerprint of the current data block in the fingerprint buffer area and the fingerprint storage area. First, query the fingerprint buffer area , and then query the fingerprint storage area if it does not exist. If there is no fingerprint consistent with the fingerprint of the current data block in the fingerprint cache area and the fingerprint storage area, the current data block is determined to be a new data block, and the data block needs to be stored; otherwise, the current data block is a duplicate data block, and only Just record the file directory information.
实施例三:Embodiment three:
图9示出了本发明第三实施例提供的数据恢复方法的流程,为了便于说明仅示出了与本发明实施例相关的部分。FIG. 9 shows the flow of the data recovery method provided by the third embodiment of the present invention, and only shows the part related to the embodiment of the present invention for convenience of description.
如图9所示,本实施例提供的数据恢复方法包括:As shown in Figure 9, the data recovery method provided in this embodiment includes:
步骤S901、当接收到文件数据恢复请求时,获取所述文件数据对应的文件目录信息,将存储该文件数据的光盘数据以整盘为单位预读到所述光盘缓存区中;Step S901. When a file data recovery request is received, obtain the file directory information corresponding to the file data, and pre-read the optical disc data storing the file data into the optical disc buffer area in units of the entire disc;
步骤S902、首先访问所述数据块缓存区,然后访问所述光盘缓存区,获取文件各个数据块数据;Step S902, first accessing the data block buffer area, and then accessing the optical disc buffer area to obtain data of each data block of the file;
步骤S903、当所有数据块获取完成后,整合数据块,得到原文件。Step S903, when all the data blocks are obtained, integrate the data blocks to obtain the original file.
当需要进行数据恢复时,首先触发生成文件数据恢复请求,所述文件数据恢复请求包括待恢复文件数据的目录路径,据此可以查找到光盘柜中存放文件目录信息的光盘,找到对应的文件目录信息后,分析可得到待恢复的文件数据所在光盘,然后将光盘中的数据整盘为单位预读到所述光盘缓存区中,然后访问数据块缓存区、光盘缓存区并获取数据块,当所有数据块获取完成后,整合数据块,即可得到原文件。When data recovery is required, first trigger the generation of a file data recovery request, the file data recovery request includes the directory path of the file data to be recovered, based on which the CD that stores the file directory information in the CD cabinet can be found, and the corresponding file directory can be found After the information is analyzed, the optical disc where the file data to be recovered can be obtained, and then the data in the optical disc is pre-read into the optical disc buffer area as a unit, and then the data block buffer area and the optical disc buffer area are accessed to obtain the data block. After all the data blocks are acquired, the data blocks are integrated to obtain the original file.
在访问数据块缓存区、光盘缓存区时,针对所述光盘缓存中的每个数据块,首先查询所述数据块缓存区中是否存在当前数据块,若存在则获取所述数据块;若所述数据块缓存区中不存在当前数据块,则从所述光盘存储缓存区中获取所述数据块。由于所述数据块缓存区中缓存有读取频率较高的一些数据块,若待恢复的数据块在所述数据块缓存区中,则直接读取即可,否在才在光盘缓存区中读取,这样形成两级缓存,提高了文件数据恢复的效率。When accessing the data block buffer area and the optical disc buffer area, for each data block in the optical disc buffer area, first inquire whether there is a current data block in the data block buffer area, and if so, obtain the data block; If the current data block does not exist in the data block buffer area, the data block is acquired from the optical disk storage buffer area. Since some data blocks with higher reading frequency are cached in the data block buffer area, if the data block to be restored is in the data block buffer area, it can be read directly, otherwise it is in the optical disk buffer area Read, thus forming a two-level cache, which improves the efficiency of file data recovery.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included in the protection of the present invention. within range.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410825881.0A CN104616680B (en) | 2014-12-25 | 2014-12-25 | Repeating data deleting system based on optical disc storage as well as data operating method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410825881.0A CN104616680B (en) | 2014-12-25 | 2014-12-25 | Repeating data deleting system based on optical disc storage as well as data operating method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN104616680A CN104616680A (en) | 2015-05-13 |
| CN104616680B true CN104616680B (en) | 2017-05-24 |
Family
ID=53151099
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410825881.0A Expired - Fee Related CN104616680B (en) | 2014-12-25 | 2014-12-25 | Repeating data deleting system based on optical disc storage as well as data operating method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104616680B (en) |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105787037B (en) * | 2016-02-25 | 2019-03-15 | 浪潮(北京)电子信息产业有限公司 | Method and device for deleting duplicate data |
| CN106657917A (en) * | 2016-12-30 | 2017-05-10 | 天津余庆科技有限公司 | Rural and community medical visual remote equipment based on public communication network |
| US10635548B2 (en) * | 2017-10-27 | 2020-04-28 | Netapp, Inc. | Data block name based efficient restore of multiple files from deduplicated storage |
| CN108022606B (en) * | 2017-11-22 | 2019-07-09 | 苏州互盟信息存储技术有限公司 | Near line CD server, data classification storage and system |
| CN108536553A (en) * | 2018-04-17 | 2018-09-14 | 北京星震维度信息技术有限公司 | Backup data store method for determining position, device, equipment and system |
| CN109326307B (en) * | 2018-09-07 | 2020-12-11 | 江苏菲利斯通信息科技有限公司 | Disc streaming method |
| CN111147540B (en) * | 2019-11-18 | 2022-09-16 | 深圳市元征科技股份有限公司 | File transmission method, device, equipment and storage medium |
| CN116257420B (en) * | 2023-03-14 | 2023-12-15 | 山西融创智联信息科技有限公司 | Computer intelligent regulation and control system and method based on data fusion |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1573960A (en) * | 2003-05-19 | 2005-02-02 | 三星电子株式会社 | Smalll-sized optical disc, apparatus and method for recording data to small-sized optical disc, and apparatus and method for reproducing data recorded to small-sized optical disc |
| CN102467528A (en) * | 2010-11-02 | 2012-05-23 | 英业达股份有限公司 | deduplication operating system |
| CN103608785A (en) * | 2013-06-21 | 2014-02-26 | 华为技术有限公司 | Method for reading file, storage device and reading system |
| CN103984651A (en) * | 2014-04-28 | 2014-08-13 | 武汉光忆科技有限公司 | Mass optic disc offline storage system and method for automatic and quick positioning of optic disc data |
| CN104134447A (en) * | 2014-05-04 | 2014-11-05 | 武汉光忆科技有限公司 | Compact disc storage system and compact disc data reading and writing method |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002116946A (en) * | 2000-10-11 | 2002-04-19 | Canon Inc | Multimedia data storage method, device and storage medium |
-
2014
- 2014-12-25 CN CN201410825881.0A patent/CN104616680B/en not_active Expired - Fee Related
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1573960A (en) * | 2003-05-19 | 2005-02-02 | 三星电子株式会社 | Smalll-sized optical disc, apparatus and method for recording data to small-sized optical disc, and apparatus and method for reproducing data recorded to small-sized optical disc |
| CN102467528A (en) * | 2010-11-02 | 2012-05-23 | 英业达股份有限公司 | deduplication operating system |
| CN103608785A (en) * | 2013-06-21 | 2014-02-26 | 华为技术有限公司 | Method for reading file, storage device and reading system |
| CN103984651A (en) * | 2014-04-28 | 2014-08-13 | 武汉光忆科技有限公司 | Mass optic disc offline storage system and method for automatic and quick positioning of optic disc data |
| CN104134447A (en) * | 2014-05-04 | 2014-11-05 | 武汉光忆科技有限公司 | Compact disc storage system and compact disc data reading and writing method |
Non-Patent Citations (1)
| Title |
|---|
| 光盘库备份系统中重复数据删除技术的研究与实现;彭飞;《CNKI》;20130501;全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN104616680A (en) | 2015-05-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN104616680B (en) | Repeating data deleting system based on optical disc storage as well as data operating method and device | |
| JP5445682B2 (en) | Storage system | |
| US9430156B1 (en) | Method to increase random I/O performance with low memory overheads | |
| US10102150B1 (en) | Adaptive smart data cache eviction | |
| CN102364474B (en) | Metadata storage system for cluster file system and metadata management method | |
| US9465554B2 (en) | Tiered caching and migration in differing granularities | |
| CN103345472B (en) | Deduplication File System Based on Finite Binary Tree Bloom Filter and Its Construction Method | |
| CN103098035B (en) | Storage system | |
| US9430404B2 (en) | Thinly provisioned flash cache with shared storage pool | |
| US10127166B2 (en) | Data storage controller with multiple pipelines | |
| CN105574104B (en) | A kind of LogStructure storage system and its method for writing data based on ObjectStore | |
| US10176117B2 (en) | Efficient metadata in a storage system | |
| US11372576B2 (en) | Data processing apparatus, non-transitory computer-readable storage medium, and data processing method | |
| CN103907096B (en) | The lifting of the part data slot in flash cache | |
| US9817865B2 (en) | Direct lookup for identifying duplicate data in a data deduplication system | |
| WO2014015828A1 (en) | Data storage space processing method and processing system, and data storage server | |
| CN107615252A (en) | Metadata management in storage system extending transversely | |
| US10229127B1 (en) | Method and system for locality based cache flushing for file system namespace in a deduplicating storage system | |
| US11144508B2 (en) | Region-integrated data deduplication implementing a multi-lifetime duplicate finder | |
| JP2021076969A (en) | Information processing apparatus and information processing program | |
| US20210072899A1 (en) | Information processing apparatus and computer-readable recording medium recording information processing program | |
| CN102968381A (en) | Method for improving snapshot performance by using solid state disk | |
| US10474588B1 (en) | Method and system for memory-based data caching | |
| US9189408B1 (en) | System and method of offline annotation of future accesses for improving performance of backup storage system | |
| US12153802B2 (en) | Method and device for log structured merge-tree based key-value data storage |
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 |
Effective date of registration: 20240105 Address after: 255 Zicheng Road, Zicheng Town, Zichuan District, Zibo City, Shandong Province Patentee after: SHANDONG HUAXIN COMMUNICATION TECHNOLOGY Co.,Ltd. Address before: Future Science and Technology City, No. 999 Gaoxin Avenue, Wuhan City, Hubei Province, 430074 Patentee before: WUHAN OPSTOR TECHNOLOGY Ltd. |
|
| TR01 | Transfer of patent right | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170524 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |