[go: up one dir, main page]

HK1215974B - Managing operations on stored data units - Google Patents

Managing operations on stored data units Download PDF

Info

Publication number
HK1215974B
HK1215974B HK16103842.6A HK16103842A HK1215974B HK 1215974 B HK1215974 B HK 1215974B HK 16103842 A HK16103842 A HK 16103842A HK 1215974 B HK1215974 B HK 1215974B
Authority
HK
Hong Kong
Prior art keywords
data
data block
deleted
block
stored
Prior art date
Application number
HK16103842.6A
Other languages
Chinese (zh)
Other versions
HK1215974A1 (en
Inventor
伊佛雷姆.梅里韦瑟.维什尼亚奇
S.J.施密特
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
Priority claimed from US13/787,203 external-priority patent/US9875054B2/en
Application filed by 起元科技有限公司 filed Critical 起元科技有限公司
Publication of HK1215974A1 publication Critical patent/HK1215974A1/en
Publication of HK1215974B publication Critical patent/HK1215974B/en

Links

Description

管理对存储数据单元的操作Manage operations on storage data units

相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS

本申请要求享有2013年3月6日提交的13/787,203号美国专利申请的优先权。This application claims priority to U.S. patent application No. 13/787,203, filed March 6, 2013.

技术领域Technical Field

本申请涉及管理对存储数据单元的操作。The present application relates to managing operations on storage data units.

背景技术Background Art

数据存储系统提供各种操作以存储、检索或删除数据单元(data unit)。“数据单元”是指由可检索的存储数据代表的信息单元(例如,一个数据单元可表示一条单独记录)。不同系统可采用不同存储格式和不同技术来执行上述操作。例如,对于一些系统而言,删除数据单元可能会涉及到删除用来定位该数据单元的指针(pointer)或索引项,或者可能会涉及到覆盖该数据单元。数据单元可单独存储,也可存储在包括多个数据单元(以相同或不同的表示法)的“数据块”(或“数据的块”或“压缩块”)之内。有些系统提供诸如数据压缩和数据加密的特征,这些特征会影响上述操作的实施,甚至会支持上述操作。例如,包括压缩到单一数据块的多个数据单元的存储格式可能会支持压缩块的群组的删除(例如,旧块或过期块),但可能不会支持这些块内个别数据单元的删除。Data storage systems provide various operations for storing, retrieving, or deleting data units. A "data unit" is a unit of information represented by retrievable stored data (e.g., a data unit may represent a single record). Different systems may employ different storage formats and techniques to perform the above operations. For example, for some systems, deleting a data unit may involve deleting a pointer or index entry used to locate the data unit, or may involve overwriting the data unit. Data units may be stored individually or within "data blocks" (or "data blocks" or "compressed blocks") that include multiple data units (in the same or different representations). Some systems provide features such as data compression and data encryption that may affect the implementation of, or even support, the above operations. For example, a storage format that includes multiple data units compressed into a single data block may support the deletion of groups of compressed blocks (e.g., old or expired blocks), but may not support the deletion of individual data units within those blocks.

发明内容Summary of the Invention

在一个方案中,通常,一种用于管理数据单元存储的系统包括配置为存储多个数据块的数据存储系统,至少一些所述数据块包括多个数据单元,至少一组所述数据块是连续存储的,从而支持第一读取操作,该第一读取操作从所述组中至少两个相邻数据块中检索数据单元(例如,该第一读取操作可能是存储接口模块104或该数据存储系统的另一接口用来执行的一类函数或程序)。该系统还包括接口,该接口包括至少一个处理器,耦接至所述数据存储系统,且被配置为执行关于数据单元的一种或多种操作,所述操作包括删除操作,该删除操作以不包括已删除数据单元的第二数据块来替代包括待删除数据单元的第一数据块,所述第二数据块具有和所述第一数据块相同的大小。In one aspect, generally, a system for managing storage of data units includes a data storage system configured to store a plurality of data blocks, at least some of the data blocks including a plurality of data units, at least one group of the data blocks being stored contiguously to support a first read operation that retrieves a data unit from at least two adjacent data blocks in the group (e.g., the first read operation may be a type of function or procedure executed by a storage interface module 104 or another interface of the data storage system). The system also includes an interface comprising at least one processor coupled to the data storage system and configured to perform one or more operations on the data units, the operations including a delete operation that replaces a first data block including a data unit to be deleted with a second data block that does not include the deleted data unit, the second data block having the same size as the first data block.

这些方案可包括一个或多个以下特征。These aspects may include one or more of the following features.

所述第二数据块与一数据块相邻,而该数据块在所述数据存储系统内与所述第一数据块相邻。The second data block is adjacent to a data block, and the data block is adjacent to the first data block in the data storage system.

所述第二数据块以和所述第一数据块相同的存储空间进行存储。The second data block is stored in the same storage space as the first data block.

所述删除操作使得不同于所述第一数据块的数据块维持在所述数据存储系统内相同的存储位置,这些数据块在执行所述删除操作之前就存储于该存储位置中。The deletion operation causes data blocks other than the first data block to be maintained in the same storage location within the data storage system where the data blocks were stored before the deletion operation was performed.

该数据存储系统被配置为针对至少一些所述数据块存储与之前从该数据块删除一个或多个数据单元有关的相应历史信息,所述删除会影响该数据块中多个数据单元的至少一些地址。The data storage system is configured to store, for at least some of the data blocks, corresponding history information regarding a previous deletion of one or more data units from the data block, the deletion affecting at least some addresses of the plurality of data units in the data block.

所述操作包括第二读取操作,不同于所述第一读取操作,该第二读取操作根据基于对应于一特定数据块的任何存储的历史信息解读的地址信息来访问存储在所述特定数据块中的至少一第一数据单元。The operations include a second read operation, different from the first read operation, that accesses at least a first data unit stored in a particular data block based on address information interpreted based on any stored history information corresponding to the particular data block.

所述删除操作将与所述已删除数据单元有关的信息存储在对应于所述第二数据块的历史信息中。The deletion operation stores information related to the deleted data unit in history information corresponding to the second data block.

至少一些所述历史信息存储在所述数据存储系统中。At least some of the historical information is stored in the data storage system.

至少一部分所述历史信息在不同数据块之间交叉存取。At least a portion of the historical information is interleaved between different data blocks.

对应于一特定数据块的至少一部分历史信息存储在该特定数据块的预定部分中。At least a portion of the history information corresponding to a specific data block is stored in a predetermined portion of the specific data block.

至少一些所述数据块是已压缩数据块。At least some of the data blocks are compressed data blocks.

所述第二读取操作解压缩一特定的已压缩数据块以恢复一已解压缩数据单元集合,并至少部分基于对应于该特定的已压缩数据块的所述历史信息在距一参考位置特定的偏移量处检索所述待读取数据单元。The second read operation decompresses a specific compressed data block to recover a set of decompressed data units, and retrieves the data unit to be read at a specific offset from a reference position based at least in part on the history information corresponding to the specific compressed data block.

所述第一读取操作解压缩多个已压缩数据块并相继读取多个已解压缩数据单元。The first reading operation decompresses a plurality of compressed data blocks and sequentially reads a plurality of decompressed data units.

所述删除操作对所述第二已压缩数据块的存储大小进行扩展,以负责所述第二已压缩数据块和所述第一已压缩数据块之间的大小差异。The deletion operation expands the storage size of the second compressed data block to account for the size difference between the second compressed data block and the first compressed data block.

所述第二已压缩数据块的存储大小通过存储除对应于所述第二已压缩数据块的历史信息之外的与所述第二已压缩数据块相关联的附加信息来进行扩展。The storage size of the second compressed data block is extended by storing additional information associated with the second compressed data block in addition to the history information corresponding to the second compressed data block.

所述删除操作存储与所述第二已压缩数据块相关联的新检错码以替代与所述第一已压缩数据块相关联的检错码。The deletion operation stores a new error detection code associated with the second compressed data block in place of the error detection code associated with the first compressed data block.

所述操作包括添加操作,该添加操作存储与一最近添加的数据单元集合相关联的待添加数据单元。The operations include an add operation that stores a to-be-added data unit in association with a set of most recently added data units.

所述处理器还被配置为将所述最近添加的数据单元集合压缩为存储在所述存储介质中的已压缩数据块。The processor is further configured to compress the set of most recently added data units into a compressed data block stored in the storage medium.

所述数据存储系统被配置为存储附加信息,该附加信息将所述组中的所述多个数据块确定为符合预定存储格式。The data storage system is configured to store additional information identifying the plurality of data blocks in the group as conforming to a predetermined storage format.

所述附加信息包括在所述组中每一数据块的数据头中的用来确定所述预定存储格式的标识符。The additional information includes an identifier in a data header of each data block in the group for identifying the predetermined storage format.

所述第一读取操作与所述预定存储格式相兼容。The first read operation is compatible with the predetermined storage format.

在另一个方案中,通常,一种用于管理数据单元存储的系统包括用来存储多个数据块的装置,至少一些所述数据块包括多个数据单元,至少一组数据块是连续存储的,从而支持第一读取操作,该第一读取操作从所述组中至少两个相邻数据块中检索数据单元。该系统还包括用来执行关于数据单元的一种或多种操作的装置,所述操作包括删除操作,该删除操作以不包括所述已删除数据单元的第二数据块来替代包括待删除数据单元的第一数据块,所述第二数据块具有和所述第一数据块相同的大小。In another aspect, in general, a system for managing storage of data units includes means for storing a plurality of data blocks, at least some of the data blocks including a plurality of data units, at least one group of the data blocks being stored contiguously to support a first read operation that retrieves a data unit from at least two adjacent data blocks in the group. The system also includes means for performing one or more operations on the data units, the operations including a delete operation that replaces a first data block including a data unit to be deleted with a second data block that does not include the deleted data unit, the second data block having the same size as the first data block.

在另一个方案中,通常,一种用于管理数据单元存储的方法包括将多个数据块存储在数据存储系统中,至少一些所述数据块包括多个数据单元,至少一组数据块是连续存储的,从而支持第一读取操作,该第一读取操作从所述组中至少两个相邻数据块中检索数据单元。该方法还包括使用至少一个处理器来执行关于数据单元的一种或多种操作,所述操作包括删除操作,该删除操作以不包括所述已删除数据单元的第二数据块来替代包括待删除数据单元的第一数据块,所述第二数据块具有和所述第一数据块相同的大小。In another aspect, in general, a method for managing data unit storage includes storing a plurality of data blocks in a data storage system, at least some of the data blocks including a plurality of data units, at least one group of the data blocks being stored contiguously to support a first read operation that retrieves a data unit from at least two adjacent data blocks in the group. The method also includes using at least one processor to perform one or more operations with respect to the data units, the operations including a delete operation that replaces a first data block including a data unit to be deleted with a second data block that does not include the deleted data unit, the second data block having the same size as the first data block.

在另一个方案中,通常,软件存储在计算机可读介质上,以管理数据单元的存储。所述软件包括用于使计算系统执行以下操作的指令:将多个数据块存储在数据存储系统中,至少一些所述数据块包括多个数据单元,至少一组数据块是连续存储的,从而支持第一读取操作,该第一读取操作从所述组中至少两个相邻数据块中检索数据单元;以及针对多个数据单元执行两项或更多项操作,所述操作包括删除操作,该删除操作以不包括所述已删除数据单元的第二数据块来替代包括待删除数据单元的第一数据块,所述第二数据块具有和所述第一数据块相同的大小。In another embodiment, software is stored on a computer-readable medium to manage storage of data units. The software includes instructions for causing a computing system to: store a plurality of data blocks in a data storage system, at least some of the data blocks including a plurality of data units, at least one group of the data blocks being stored contiguously to support a first read operation that retrieves a data unit from at least two adjacent data blocks in the group; and perform two or more operations on the plurality of data units, the operations including a delete operation that replaces a first data block including a data unit to be deleted with a second data block that does not include the deleted data unit, the second data block having the same size as the first data block.

在另一个方案中,通常,一种用于管理数据单元存储的系统,包括配置为存储多个数据块的数据存储系统,至少一些所述数据块包括多个数据单元,至少一组所述数据块是连续存储的,从而支持第一读取操作,该第一读取操作从所述组中至少两个相邻数据块中检索数据单元(例如,该第一读取操作可能是存储接口模块104或该数据存储系统的另一接口用来执行的一类函数或程序)。该系统还包括接口,该接口包括至少一个处理器,耦接至所述数据存储系统,且被配置为执行关于数据单元的两项或更多项操作。所述操作包括:第二读取操作,与所述第一读取操作不同,该第二读取操作至少部分基于包含待读取数据单元的数据块的地址来检索该待读取数据单元;以及删除操作,该删除操作以不包括已删除数据单元的第二数据块来替代包括待删除数据单元的第一数据块。In another embodiment, a system for managing data unit storage includes a data storage system configured to store a plurality of data blocks, at least some of the data blocks including a plurality of data units, at least one group of the data blocks being stored contiguously to support a first read operation that retrieves a data unit from at least two adjacent data blocks in the group (e.g., the first read operation may be a function or procedure executed by a storage interface module 104 or another interface of the data storage system). The system also includes an interface comprising at least one processor coupled to the data storage system and configured to perform two or more operations on the data units. The operations include: a second read operation that, unlike the first read operation, retrieves a data unit to be read based at least in part on an address of the data block containing the data unit to be read; and a delete operation that replaces a first data block containing the data unit to be deleted with a second data block that does not include the deleted data unit.

这些方案可包括一个或多个以下特征。These aspects may include one or more of the following features.

该数据存储系统被配置为针对至少一些所述数据块存储与之前从该数据块删除一个或多个数据单元有关的相应历史信息,所述删除会影响该数据块中多个数据单元的至少一些地址。The data storage system is configured to store, for at least some of the data blocks, corresponding history information regarding a previous deletion of one or more data units from the data block, the deletion affecting at least some addresses of the plurality of data units in the data block.

所述第二读取操作根据基于对应于一特定数据块的任何存储的历史信息解读的地址信息来访问存储在所述特定数据块中的至少一第一数据单元。The second read operation accesses at least a first data unit stored in a particular data block according to address information interpreted based on any stored history information corresponding to the particular data block.

所述删除操作将与所述已删除数据单元有关的信息存储在对应于所述新数据块的历史信息中。The deletion operation stores information related to the deleted data unit in history information corresponding to the new data block.

至少一些所述历史信息存储在所述数据存储系统中。At least some of the historical information is stored in the data storage system.

至少一部分所述历史信息在不同数据块之间交叉存取(interleaved)。At least a portion of the historical information is interleaved between different data blocks.

对应于一特定数据块的至少一部分历史信息存储在该特定数据块的预定部分中。At least a portion of the history information corresponding to a specific data block is stored in a predetermined portion of the specific data block.

至少一些所述数据块是已压缩数据块。At least some of the data blocks are compressed data blocks.

所述第二读取操作解压缩一特定的已压缩数据块以恢复一已解压缩数据单元集合,并至少部分基于对应于该特定的已压缩数据块的所述历史信息在距一参考位置特定的偏移量处检索所述待读取数据单元。The second read operation decompresses a specific compressed data block to recover a set of decompressed data units, and retrieves the data unit to be read at a specific offset from a reference position based at least in part on the history information corresponding to the specific compressed data block.

所述第一读取操作解压缩多个已压缩数据块并相继读取多个已解压缩数据单元。The first reading operation decompresses a plurality of compressed data blocks and sequentially reads a plurality of decompressed data units.

所述删除操作对所述第二已压缩数据块的存储大小进行扩展,以负责(accountfor)所述第二已压缩数据块和所述第一已压缩数据块之间存在的大小差异。The deletion operation expands the storage size of the second compressed data block to account for a size difference between the second compressed data block and the first compressed data block.

所述第二已压缩数据块的存储大小通过存储除对应于所述第二已压缩数据块的历史信息之外的与所述第二已压缩数据块相关联的附加信息来进行扩展。The storage size of the second compressed data block is extended by storing additional information associated with the second compressed data block in addition to the history information corresponding to the second compressed data block.

所述删除操作存储与所述第二已压缩数据块相关联的新检错码以替代与所述第一已压缩数据块相关联的检错码。The deletion operation stores a new error detection code associated with the second compressed data block in place of the error detection code associated with the first compressed data block.

所述操作包括添加操作,该添加操作存储与一最近添加的数据单元集合相关联的待添加数据单元。The operations include an add operation that stores a to-be-added data unit in association with a set of most recently added data units.

所述处理器还被配置为将所述最近添加的数据单元集合压缩为存储在所述存储介质中的已压缩数据块。The processor is further configured to compress the set of most recently added data units into a compressed data block stored in the storage medium.

所述第二读取操作根据一指示含有具有多个特定标识符的数据单元的所述数据块的索引来定位包括所述待读取数据单元的所述数据块,以恢复已解压缩数据单元集合,并在所述多个已解压缩数据单元内搜索所述待读取数据单元。The second read operation locates the data block including the data unit to be read according to an index indicating the data block containing data units with multiple specific identifiers to restore the decompressed data unit set and searches for the data unit to be read within the multiple decompressed data units.

所述数据存储系统被配置为存储附加信息,该附加信息将所述组中的所述多个数据块确定为符合预定存储格式。The data storage system is configured to store additional information identifying the plurality of data blocks in the group as conforming to a predetermined storage format.

所述附加信息包括在所述组中每一数据块的数据头中的用来确定所述预定存储格式的标识符。The additional information includes an identifier in a data header of each data block in the group for identifying the predetermined storage format.

所述第一读取操作与所述预定存储格式相兼容。The first read operation is compatible with the predetermined storage format.

在另一个方案中,通常,一种用于管理数据单元存储的系统包括用来存储多个数据块的装置,至少一些所述数据块包括多个数据单元,至少一组数据块是连续存储的,从而支持第一读取操作,该第一读取操作从所述组中至少两个相邻数据块中检索数据单元。所述系统还包括用来针对多个数据单元执行两项或更多项操作的装置。所述操作包括:第二读取操作,与所述第一读取操作不同,该第二读取操作至少部分基于包含待读取数据单元的数据块的地址来检索该待读取数据单元;以及删除操作,该删除操作以不包括已删除数据单元的第二数据块来替代包括待删除数据单元的第一数据块。In another embodiment, in general, a system for managing data unit storage includes means for storing a plurality of data blocks, at least some of the data blocks including a plurality of data units, at least one group of the data blocks being stored contiguously to support a first read operation that retrieves a data unit from at least two adjacent data blocks in the group. The system also includes means for performing two or more operations on the plurality of data units. The operations include: a second read operation that, unlike the first read operation, retrieves a data unit to be read based at least in part on an address of the data block containing the data unit to be read; and a delete operation that replaces a first data block that includes a data unit to be deleted with a second data block that does not include the deleted data unit.

在另一个方案中,通常,一种用于管理数据单元存储的方法包括将多个数据块存储在数据存储系统中,至少一些所述数据块包括多个数据单元,至少一组数据块是连续存储的,从而支持第一读取操作,该第一读取操作从所述组中至少两个相邻数据块中检索数据单元。所述方法还包括使用至少一个处理器针对多个数据单元执行两项或更多项操作。所述操作包括:第二读取操作,与所述第一读取操作不同,该第二读取操作至少部分基于包含待读取数据单元的数据块的地址来检索该待读取数据单元;以及删除操作,该删除操作以不包括已删除数据单元的第二数据块来替代包括待删除数据单元的第一数据块。In another embodiment, in general, a method for managing data unit storage includes storing a plurality of data blocks in a data storage system, at least some of the data blocks including a plurality of data units, and at least one group of the data blocks being stored contiguously to support a first read operation that retrieves a data unit from at least two adjacent data blocks in the group. The method also includes performing, using at least one processor, two or more operations on the plurality of data units. The operations include: a second read operation that, unlike the first read operation, retrieves a data unit to be read based at least in part on an address of the data block containing the data unit to be read; and a delete operation that replaces a first data block that includes a data unit to be deleted with a second data block that does not include the deleted data unit.

在另一个方案中,通常,软件存储在计算机可读介质上以管理数据单元的存储。所述软件包括用于使计算系统执行以下操作的指令:将多个数据块存储在数据存储系统中,至少一些所述数据块包括多个数据单元,至少一组数据块是连续存储的,从而支持第一读取操作,该第一读取操作从所述组中至少两个相邻数据块中检索数据单元;以及针对多个数据单元执行两项或更多项操作。所述操作包括:第二读取操作,与所述第一读取操作不同,该第二读取操作至少部分基于包含待读取数据单元的数据块的地址来检索该待读取数据单元;以及删除操作,该删除操作以不包括已删除数据单元的第二数据块来替代包括待删除数据单元的第一数据块。In another embodiment, software is stored on a computer-readable medium to manage storage of data units. The software includes instructions for causing a computing system to: store a plurality of data blocks in a data storage system, at least some of the data blocks including a plurality of data units, at least one group of the data blocks being stored contiguously to support a first read operation that retrieves a data unit from at least two adjacent data blocks in the group; and perform two or more operations on the plurality of data units. The operations include: a second read operation that, unlike the first read operation, retrieves a data unit to be read based at least in part on an address of the data block including the data unit to be read; and a delete operation that replaces a first data block including a data unit to be deleted with a second data block that does not include the deleted data unit.

在另一个方案中,通常,一种用于管理数据单元存储的系统包括被配置为存储多个数据块的数据存储系统,至少一些所述数据块包括多个数据单元,所述数据存储系统还被配置为针对至少一些所述数据块存储与之前从该数据块删除一个或多个数据单元有关的相应历史信息,所述删除会影响该数据块中多个数据单元的至少一些地址。该系统还包括接口,该接口包括至少一个处理器,耦接至所述数据存储系统,且被配置为根据地址信息来执行至少一种访问存储在第一数据块中的至少一第一数据单元的操作,所述地址信息基于对应于所述第一数据块的任何存储的历史信息来解读。In another aspect, in general, a system for managing data unit storage includes a data storage system configured to store a plurality of data blocks, at least some of the data blocks including a plurality of data units, the data storage system further configured to store, for at least some of the data blocks, corresponding historical information related to a previous deletion of one or more data units from the data block, the deletion affecting at least some addresses of the plurality of data units in the data block. The system also includes an interface comprising at least one processor coupled to the data storage system and configured to perform at least one operation to access at least one first data unit stored in a first data block based on address information interpreted based on any stored historical information corresponding to the first data block.

这些方案可包括一个或多个以下特征。These aspects may include one or more of the following features.

对应于所述第一数据块的所述历史信息包括与之前从所述第一数据块删除一个或多个数据单元有关的信息,所述删除会影响已从所述第一数据块中解压缩的数据单元的相对偏移量。The history information corresponding to the first data block includes information regarding previous deletions of one or more data units from the first data block, the deletions affecting relative offsets of data units that have been decompressed from the first data block.

至少一些所述数据块是已压缩数据块。At least some of the data blocks are compressed data blocks.

该接口被配置为针对多个数据单元执行两项或更多项操作,所述操作包括:读取操作,该读取操作至少部分基于地址信息来检索待读取数据单元,所述地址信息相对于参考地址来定位所述数据单元;以及删除操作,该删除操作删除待删除数据单元,并存储用来针对其他数据单元解读地址信息的与所述已删除数据单元相关的历史信息,以考虑到由于删除所述待删除数据单元而造成的相对于所述参考地址的任何偏移量。The interface is configured to perform two or more operations on multiple data units, the operations including: a read operation that retrieves a data unit to be read based at least in part on address information, wherein the address information locates the data unit relative to a reference address; and a delete operation that deletes the data unit to be deleted and stores historical information related to the deleted data unit for interpreting address information for other data units to take into account any offset relative to the reference address caused by deleting the data unit to be deleted.

该接口还被配置为针对多个数据单元执行两项或更多项操作,所述操作包括:第一读取操作,该第一读取操作至少部分基于对应于已压缩数据块的历史信息来检索待读取数据单元;以及删除操作,该删除操作以不包括所述已删除数据单元的第二已压缩数据块来替代包括待删除数据单元的第一已压缩数据块,并将与所述已删除数据单元有关的信息存储在对应于所述第二已压缩数据块的历史信息中。The interface is also configured to perform two or more operations on multiple data units, the operations including: a first read operation, which retrieves the data unit to be read based at least in part on historical information corresponding to the compressed data block; and a delete operation, which replaces the first compressed data block including the data unit to be deleted with a second compressed data block that does not include the deleted data unit, and stores information related to the deleted data unit in the historical information corresponding to the second compressed data block.

所述第一读取操作解压缩一特定的已压缩数据块以恢复一已解压缩数据单元集合,并至少部分基于对应于该特定的已压缩数据块的所述历史信息在距一参考位置特定的偏移量处检索所述待读取数据单元。The first read operation decompresses a specific compressed data block to recover a set of decompressed data units, and retrieves the data unit to be read at a specific offset from a reference position based at least in part on the history information corresponding to the specific compressed data block.

所述第一读取操作确定所述历史信息是否包括与一个或多个先前已删除数据单元有关的信息。The first read operation determines whether the history information includes information related to one or more previously deleted data units.

如果所述历史信息包括与一个或多个先前已删除数据单元有关的信息,所述第一读取操作基于对所述特定的偏移量和历史信息中的值的比较来确定是否调整所述特定的偏移量,所述历史信息指出至少一个先前已删除数据单元的偏移量。If the history information includes information related to one or more previously deleted data units, the first read operation determines whether to adjust the specific offset based on a comparison of the specific offset and a value in the history information, wherein the history information indicates the offset of at least one previously deleted data unit.

如果要调整所述特定的偏移量,所述第一读取操作基于一个或多个先前已删除数据单元的偏移量和大小来调整所述特定的偏移量。If the specific offset is to be adjusted, the first read operation adjusts the specific offset based on the offset and size of one or more previously deleted data units.

所述删除操作对所述第二已压缩数据块的存储大小进行扩展,以负责所述第二已压缩数据块和所述第一已压缩数据块之间的大小差异。The deletion operation expands the storage size of the second compressed data block to account for the size difference between the second compressed data block and the first compressed data block.

所述第二已压缩数据块的存储大小通过存储除对应于所述第二已压缩数据块的历史信息之外的与所述第二已压缩数据块相关联的附加信息来进行扩展。The storage size of the second compressed data block is extended by storing additional information associated with the second compressed data block in addition to the history information corresponding to the second compressed data block.

所述删除操作存储与所述第二已压缩数据块相关联的新检错码以替代与所述第一已压缩数据块相关联的检错码。The deletion operation stores a new error detection code associated with the second compressed data block in place of the error detection code associated with the first compressed data block.

所述操作包括添加操作,该添加操作存储与一最近添加的数据单元集合相关联的待添加数据单元。The operations include an add operation that stores a to-be-added data unit in association with a set of most recently added data units.

所述处理器还被配置为将所述最近添加的数据单元集合压缩为存储在所述存储介质中的已压缩数据块。The processor is further configured to compress the set of most recently added data units into a compressed data block stored in the storage medium.

所述操作包括第二读取操作,与所述第一读取操作不同,所述第二读取操作解压缩一个或多个已压缩数据块并相继读取多个已解压缩数据单元。The operations include a second read operation that, unlike the first read operation, decompresses one or more compressed data blocks and sequentially reads a plurality of decompressed data units.

所述操作包括第三读取操作,与所述第一读取操作和所述第二读取操作不同,该第三读取操作解压缩由索引指出为包括具有特定标识符的数据单元的特定的已压缩数据块,以恢复已解压缩数据单元集合,并在所述多个已解压缩数据单元内搜索所述具有所述特定标识符的数据单元。The operation includes a third read operation, which is different from the first read operation and the second read operation, and decompresses a specific compressed data block indicated by an index as including a data unit with a specific identifier to recover a set of decompressed data units, and searches for the data unit with the specific identifier within the multiple decompressed data units.

至少一些所述历史信息存储在所述数据存储系统中。At least some of the historical information is stored in the data storage system.

至少一部分所述历史信息在不同数据块之间交叉存取。At least a portion of the historical information is interleaved between different data blocks.

对应于一特定数据块的至少一部分历史信息存储在该特定数据块的预定部分中。At least a portion of the history information corresponding to a specific data block is stored in a predetermined portion of the specific data block.

在另一个方案中,通常,一种用于管理数据单元存储的系统包括用于存储多个数据块的装置,至少一些所述数据块包括多个数据单元,所述用于存储多个数据块的装置被配置为针对至少一些所述数据块存储与之前从该数据块删除一个或多个数据单元有关的相应历史信息,所述删除会影响该数据块中多个数据单元的至少一些地址。该系统还包括用于执行至少一种操作的装置,该操作根据基于对应于所述第一数据块的任何存储的历史信息解读的地址信息来访问存储在所述第一数据块中的至少一第一数据单元。In another aspect, in general, a system for managing data unit storage includes means for storing a plurality of data blocks, at least some of the data blocks including a plurality of data units, the means for storing the plurality of data blocks being configured to store, for at least some of the data blocks, corresponding historical information related to a previous deletion of one or more data units from the data block, the deletion affecting at least some addresses of the plurality of data units in the data block. The system also includes means for performing at least one operation that accesses at least one first data unit stored in the first data block based on address information interpreted based on any stored historical information corresponding to the first data block.

在另一个方案中,通常,一种用于管理数据单元存储的方法包括将多个数据块存储在数据存储系统中,至少一些所述数据块包括多个数据单元,所述数据存储系统被配置为针对至少一些所述数据块存储与之前从该数据块删除一个或多个数据单元有关的相应历史信息,所述删除会影响该数据块中多个数据单元的至少一些地址。该方法还包括使用至少一个处理器来执行至少一种操作,所述操作根据基于对应于所述第一数据块的任何存储的历史信息解读的地址信息来访问存储在所述第一数据块中的至少一第一数据单元。In another aspect, in general, a method for managing data unit storage includes storing a plurality of data blocks in a data storage system, at least some of the data blocks including a plurality of data units, the data storage system being configured to store, for at least some of the data blocks, corresponding historical information related to a previous deletion of one or more data units from the data block, the deletion affecting at least some addresses of the plurality of data units in the data block. The method also includes executing, using at least one processor, at least one operation of accessing at least one first data unit stored in the first data block based on address information interpreted based on any stored historical information corresponding to the first data block.

在另一个方案中,通常,软件存储在计算机可读介质上,以管理数据单元的存储。所述软件包括用于使计算系统执行以下操作的指令:将多个数据块存储在数据存储系统中,至少一些所述数据块包括多个数据单元,该数据存储系统被配置为针对至少一些所述数据块存储与之前从该数据块删除一个或多个数据单元有关的相应历史信息,所述删除会影响该数据块中多个数据单元的至少一些地址;以及执行至少一种操作,所述操作根据基于对应于所述第一数据块的任何存储的历史信息解读的地址信息来访问存储在所述第一数据块中的至少一第一数据单元。In another embodiment, software is stored on a computer-readable medium to manage storage of data units. The software includes instructions for causing a computing system to: store a plurality of data blocks in a data storage system, at least some of the data blocks including a plurality of data units, the data storage system being configured to store, for at least some of the data blocks, corresponding history information related to a previous deletion of one or more data units from the data block, the deletion affecting at least some addresses of the plurality of data units in the data block; and perform at least one operation that accesses at least one first data unit stored in the first data block based on address information interpreted based on any stored history information corresponding to the first data block.

这些方案可包括一个或多个以下优点。These aspects may include one or more of the following advantages.

提供一可彻底从已压缩数据存储部中删除数据单元的删除操作,该删除操作可能是有用的,例如,用于遵守应客户要求而删除数据的隐私法。删除所述已删除数据单元可能会影响在特定地址或在距参考地址相对偏移量处定位数据单元的指针。然而,这些指针不需要改动,甚至不需要在执行所述删除操作时加以定位。不过,如果要实际访问那些数据单元,必要时,随后可以对指针进行改正。对于许多所述数据存储的使用而言,按需改正指针比在删除时定位并改正该指针更加有效。从多块已压缩数据存储部的已压缩块删除已删除数据单元也可以这样一种方式来执行:即,保存所述删除操作和多种操作的兼容性,所述多种操作通过扫描从一个或多个已压缩数据块恢复的多个数据单元来读取数据单元。例如,所述删除操作可能与扫描读取操作相兼容,该扫描读取操作将标准的解压缩功能(例如gzcat)应用于以已知压缩格式(例如gzip)存储的文件中,并解读已解压缩数据(例如,根据记录格式)以不必依赖于索引或其他地址信息而相继将单独记录恢复为数据单元。通过确保在所述删除操作之后所述文件在已压缩数据块之间没有间隙,扫描读取操作仍然能够正确地解析所述压缩格式,无需移动或重写整个文件。此外,通过使用所述历史信息,可以执行所述删除操作,这样,不管是否有数据单元先前已从已压缩数据存储部中删除,依赖于地址信息的读取操作都继续正常运行。A delete operation is provided for completely removing a data unit from a compressed data storage unit, which may be useful, for example, for complying with privacy laws for deleting data at the request of a customer. Deleting the deleted data unit may affect pointers that locate the data unit at a specific address or at a relative offset from a reference address. However, these pointers do not need to be changed, or even located when the delete operation is performed. However, if those data units are actually accessed, the pointers can be corrected later if necessary. For many uses of the data storage unit, correcting the pointers on demand is more efficient than locating and correcting the pointers at the time of deletion. Deleting deleted data units from compressed blocks of a multi-block compressed data storage unit can also be performed in a manner that preserves the compatibility of the delete operation with multiple operations that read the data units by scanning multiple data units recovered from one or more compressed data blocks. For example, the delete operation may be compatible with a scan-read operation that applies a standard decompression function (e.g., gzcat) to a file stored in a known compression format (e.g., gzip) and interprets the decompressed data (e.g., according to the record format) to sequentially restore individual records into data units without relying on indexes or other address information. By ensuring that the file has no gaps between compressed data blocks after the delete operation, the scan-read operation can still correctly parse the compression format without having to move or rewrite the entire file. Furthermore, by using the history information, the delete operation can be performed such that read operations that rely on address information continue to operate normally regardless of whether data units have been previously deleted from the compressed data store.

通过以下说明书和权利要求书,本发明的其它特征和优点将变得显而易见。Other features and advantages of the invention will become apparent from the following description and from the claims.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是数据存储系统的框图。FIG1 is a block diagram of a data storage system.

图2是数据存储格式的示意图。FIG2 is a schematic diagram of a data storage format.

图3A-3D是数据操作的流程图。3A-3D are flow charts of data operations.

具体实施方式DETAILED DESCRIPTION

图1所示的是数据处理系统100的一个示例,数据存储技术可应用于该数据处理系统。执行环境102包括存储接口模块104,该存储接口模块被配置为针对存储在数据存储系统106中的数据单元执行数据操作。所述执行环境102可能被托管在例如受一合适的操作系统(比如UNIX操作系统的一个版本)控制的一个或多个通用计算机。例如,所述执行环境102还可包括多节点并行计算环境,该多节点并行计算环境包括使用多个中央处理器(CPU)或处理器内核的计算机系统的配置,这些CPU或处理器内核可以是本地(例如多处理器系统,如对称多处理(SMP)计算机),或本地分布式(例如多个处理器耦合为群集或大规模并行处理(MPP)系统),或者远程,或远程分布式(例如通过局域网(LAN)和/或广域网(WAN)来耦合的多个处理器),或其组合。所述数据存储系统106包括一个或多个存储设备,所述存储设备可能是所述执行环境102本地的存储设备,例如,连接到托管所述执行环境102的计算机;或可能是所述执行环境102远程的存储设备,例如,通过远程连接与托管所述执行环境102的计算机进行通讯。所述一个或多个存储设备可包括:例如,易失性存储器,比如随机存取存储器(RAM);和非易失性存储器,比如磁驱动器或固态驱动器。所述数据处理系统100可用于通过耦接至网络110的通信接口108而从其他系统接收数据或向其他系统提供数据。FIG1 illustrates an example of a data processing system 100 to which data storage techniques may be applied. An execution environment 102 includes a storage interface module 104 configured to perform data operations on data units stored in a data storage system 106. The execution environment 102 may be hosted, for example, on one or more general-purpose computers controlled by a suitable operating system (e.g., a version of the UNIX operating system). For example, the execution environment 102 may also include a multi-node parallel computing environment, including a configuration of a computer system using multiple central processing units (CPUs) or processor cores. These CPUs or processor cores may be local (e.g., a multi-processor system such as a symmetric multiprocessing (SMP) computer), locally distributed (e.g., multiple processors coupled as a cluster or massively parallel processing (MPP) system), remote, or remotely distributed (e.g., multiple processors coupled via a local area network (LAN) and/or a wide area network (WAN)), or a combination thereof. The data storage system 106 includes one or more storage devices, which may be local to the execution environment 102, for example, connected to the computer hosting the execution environment 102, or remote from the execution environment 102, for example, in communication with the computer hosting the execution environment 102 via a remote connection. The one or more storage devices may include, for example, volatile memory, such as random access memory (RAM), and non-volatile memory, such as magnetic drives or solid-state drives. The data processing system 100 may be configured to receive data from or provide data to other systems via a communication interface 108 coupled to a network 110.

从所述数据存储系统106中的各种存储源接收的可单独访问的数据单元可被组织为针对各字段(也称为“属性(attribute)”或“纵列(column)”)具有值的记录,包括可能的空值。例如,信用卡公司可从各零售公司收到表示单笔交易的数据。每一交易与表示属性的值(例如,客户名称、日期、购买量等)相关联。所述存储接口模块104可确保数据是按照预定记录格式进行格式化的,以便与交易相关联的值被存储在记录里。在某些情况下,这会包括根据所述记录格式转化来自多个源的数据。在其他情况下,一个或多个源会根据所述记录格式提供已格式化数据。在某些情况下,所述记录格式最初可能是未知的,可能在对所述源或数据进行分析之后才能确定。Individually accessible data units received from various storage sources in the data storage system 106 may be organized into records having values for various fields (also referred to as "attributes" or "columns"), including possible null values. For example, a credit card company may receive data representing individual transactions from various retail companies. Each transaction is associated with a value representing an attribute (e.g., customer name, date, purchase amount, etc.). The storage interface module 104 may ensure that the data is formatted according to a predetermined record format so that the values associated with the transaction are stored in the record. In some cases, this may include converting data from multiple sources according to the record format. In other cases, one or more sources may provide formatted data according to the record format. In some cases, the record format may not be initially known and may be determined only after analysis of the source or data.

所述存储接口模块104为管理存储在所述数据存储系统106中的数据提供一数据操作集合。例如,处理器被配置为针对特定数据操作执行存储指令,以响应执行该特定数据操作的请求。所述数据操作包括用来添加新数据单元的添加操作、用来删除存储数据单元的删除操作以及用来以不同读取模式检索存储数据单元(在下文进行更详细地的描述)并返回已请求读取的检索到的数据单元的多个读取操作。进行所述数据操作以响应于所述数据处理系统100的另一部分,包括从用户处接收输入的用户接口。The storage interface module 104 provides a set of data operations for managing data stored in the data storage system 106. For example, the processor is configured to execute storage instructions for a particular data operation in response to a request to perform the particular data operation. The data operations include an add operation for adding a new data unit, a delete operation for deleting a stored data unit, and a plurality of read operations for retrieving a stored data unit using different read modes (described in more detail below) and returning the retrieved data unit requested to be read. The data operations are performed in response to another portion of the data processing system 100, including a user interface for receiving input from a user.

在一些实施方式中,所述数据存储系统106包括压缩数据存储部112,该压缩数据存储部以这样一种存储格式来存储数据,即,每个已压缩数据块通过压缩多个数据单元来形成。由所述压缩产生的数据块通常包括以压缩形式表示那些多个数据单元的压缩数据以及附加信息(overhead information),所述附加信息系指是所述数据块的一部分但不是压缩数据本身的任何其他信息,该附加信息出现在所述压缩数据之前被称为“数据头(header)”,出现在所述压缩数据之后则被称为“数据尾(footer)”。在一些实施方式中,所述数据存储系统106存储有不一定被压缩但彼此相关联的数据单元集合,比如在相对于共同参考位置的指定偏移位置处存储的数据单元集合。在一些实施方式中,所述存储接口模块104能够使用各种技术中的任一种技术在某种程度上结合记录来处理数据单元以生成数据块(例如,以使该块不仅仅是级联的记录集合)。可通过采用补充功能(例如,解压缩)对包含多个数据单元的数据块进行处理以恢复独立的数据单元。包含在数据块中的数据单元可能不是以其原始形式存储的(例如,数据单元可能用不同位元来表示),并且数据单元可能不是以每一数据单元和存储在该数据块中位元之间的一一对应来单独表示的(例如,已压缩数据块内的任一特定位元可能是多个数据单元的函数)。如果采用了压缩,则该压缩可以是执行预期功能的一部分。例如,在一些实施方式中,模块104对记录集合进行处理,以生成一加密的数据块。不同数据块的压缩比(即,压缩大小除以解压缩后的大小)通常会变化,在某些情况下,一些数据块的压缩比可能会大于1。In some embodiments, the data storage system 106 includes a compressed data storage unit 112 that stores data in a storage format where each compressed data block is formed by compressing multiple data units. The data blocks generated by the compression typically include compressed data representing the multiple data units in compressed form, as well as overhead information, which refers to any other information that is part of the data block but not the compressed data itself. The overhead information is referred to as a "header" if it appears before the compressed data, and as a "footer" if it appears after the compressed data. In some embodiments, the data storage system 106 stores a collection of data units that are not necessarily compressed but are associated with each other, such as a collection of data units stored at a specified offset relative to a common reference location. In some embodiments, the storage interface module 104 can use any of a variety of techniques to process the data units in some manner in conjunction with records to generate data blocks (e.g., so that the block is more than just a concatenated collection of records). Data blocks containing multiple data units can be processed to recover the individual data units by applying supplementary functions (e.g., decompression). The data units contained in a data block may not be stored in their original form (e.g., the data units may be represented by different bits), and the data units may not be individually represented with a one-to-one correspondence between each data unit and the bits stored in the data block (e.g., any particular bit within a compressed data block may be a function of multiple data units). If compression is employed, the compression may be part of performing the intended function. For example, in some embodiments, module 104 processes a set of records to generate an encrypted data block. The compression ratio (i.e., the compressed size divided by the decompressed size) for different data blocks will typically vary, and in some cases, the compression ratio for some data blocks may be greater than 1.

存储格式的一个例子是用于定位个别存储数据单元的具有可选索引的已压缩记录文件,在美国专利号7,885,932进行了详细描述,该专利通过引用合并于此。例如,为生成压缩记录文件,所述存储接口模块104通过可识别每一记录的主键值(例如,可识别单独记录的唯一键或可识别一条记录多个更新版本的键)对接收到的记录进行分类,并将所述记录归合成对应于非重叠范围主键值的记录集合,每一记录集合可能对应于预定数量的记录(例如,100条记录)。所述模块104将每一记录集合压缩为压缩数据块。将这些压缩块收集起来以形成一压缩记录文件(例如,通过把连续的块添加到该文件中),所述压缩记录文件存储在所述压缩数据存储部112中(例如,托管在非易失性存储介质中,如一个或多个硬盘驱动器)。还可以对任何数目的压缩记录文件进行合并以形成一复合的压缩记录文件。在一些实施方式中,所述存储接口模块104对包括针对所述块中每一块的条目的索引进行管理。所述索引可用于通过列出记录的一系列主键来定位包括给定记录的块,所述记录可包括在所述块之中,在美国专利号7,885,932进行更详细地描述。虽然所述索引可存储在与所述压缩记录文件同样的存储介质中,但优选地,由于该索引通常要比所述压缩记录文件小得多,该索引可存储在相对更快的存储器中(例如,易失性存储介质,如动态随机存取存储器)。An example of a storage format is a compressed record file with optional indexing for locating individual stored data units, as described in detail in U.S. Patent No. 7,885,932, which is incorporated herein by reference. For example, to generate a compressed record file, the storage interface module 104 sorts the received records by a primary key value that identifies each record (e.g., a unique key that identifies an individual record or a key that identifies multiple updated versions of a record) and groups the records into record sets corresponding to non-overlapping ranges of primary key values, each record set potentially corresponding to a predetermined number of records (e.g., 100 records). The module 104 compresses each record set into compressed data blocks. These compressed blocks are collected to form a compressed record file (e.g., by appending consecutive blocks to the file), which is stored in the compressed data storage unit 112 (e.g., hosted on a non-volatile storage medium, such as one or more hard drives). Any number of compressed record files can also be merged to form a composite compressed record file. In some embodiments, the storage interface module 104 manages an index that includes an entry for each of the blocks. The index can be used to locate the block containing a given record by listing a series of primary keys of the records that may be included in the block, as described in more detail in U.S. Patent No. 7,885,932. Although the index can be stored in the same storage medium as the compressed record file, it is preferably stored in a relatively faster memory (e.g., a volatile storage medium such as dynamic random access memory) because the index is typically much smaller than the compressed record file.

由于要接收新的数据单元并存储在所述数据存储系统106中(通过添加操作),所述数据单元首先以未压缩的形式存储在输入缓冲器114中。在一预设阈值后,例如,在特定数量的数据单元被存储在所述输入缓冲器114之后,或者在所述输入缓冲器114达到特定大小后,或者在特定时间间隔之后,采用多种压缩格式中任一种压缩格式(例如,gzip格式),可以将多个数据单元一起压缩为一单一的压缩数据块。所述压缩数据块然后被添加到所述压缩数据存储部112中的所述压缩记录文件之一。As new data units are received and stored in the data storage system 106 (via an append operation), the data units are first stored in an uncompressed form in the input buffer 114. After a predetermined threshold, for example, after a certain number of data units have been stored in the input buffer 114, after the input buffer 114 reaches a certain size, or after a certain time interval, the multiple data units can be compressed together into a single compressed data block using any of a variety of compression formats (e.g., gzip format). The compressed data block is then added to one of the compressed record files in the compressed data storage unit 112.

在一些实施方式中,针对不同读取模式有不同读取操作,以便以能够检索数据的方式提供灵活性。对于每一种读取模式,对由所述读取模式识别的一个或多个压缩数据块进行解压缩,可以生成一数据单元集合。然而,不同的读取模式采用不同技术来从已从数据块恢复的所述数据单元集合检索一个或多个待返回的数据单元,以响应所述读取操作。例如,在第一读取模式(称为“直接寻址模式”)中,基于地址信息对特定的数据单元(多个)进行检索,所述地址信息指定了:包含数据单元的所述数据块,所述数据单元的开端的偏移量(相对于所述恢复的集合的开端)以及所述数据单元的长度。在某些情况下,可能需要基于历史信息对所述偏移量进行修改,所述历史信息包括与之前从该数据块删除一个或多个数据单元有关的信息,该信息足以更正由于所述之前的删除而导致的潜在变更,在下文中会更详细地进行描述。所述数据单元的长度规格以可变长度和/或未指定长度来支持数据单元。可选地,在一些实施方式中,如果所有数据单元具有相同指定的固定长度,则所述长度不需包括在直接地址之中。在一些实施方式中,直接地址能基于辅助信息隐含地指出数据单元的相对偏移量。例如,直接地址能指定:包含数据单元的所述数据块,映射到所述数据单元的开端的偏移量的记录标识符(例如,基于与所述数据块相关联存储的映射)。In some embodiments, different read operations are used for different read modes to provide flexibility in how data can be retrieved. For each read mode, one or more compressed data blocks identified by the read mode are decompressed to generate a set of data units. However, different read modes employ different techniques to retrieve one or more data units to be returned from the set of data units recovered from the data block in response to the read operation. For example, in a first read mode (referred to as "direct addressing mode"), specific data units are retrieved based on address information that specifies: the data block containing the data unit, an offset of the beginning of the data unit (relative to the beginning of the recovered set), and the length of the data unit. In some cases, the offset may need to be modified based on historical information that includes information related to a previous deletion of one or more data units from the data block, which is sufficient to correct potential changes caused by the previous deletion, as described in more detail below. The data unit length specification supports data units with variable lengths and/or unspecified lengths. Alternatively, in some embodiments, if all data units have the same specified fixed length, the length need not be included in the direct address. In some embodiments, the direct address can implicitly indicate the relative offset of the data unit based on auxiliary information. For example, the direct address can specify: the data block containing the data unit, and the record identifier that maps to the offset of the beginning of the data unit (e.g., based on a mapping stored in association with the data block).

在第二读取模式(称为“扫描模式”)中,可以从所述恢复的集合中将数据单元相继读取为连续流。对于包括多个压缩数据块的压缩记录文件,当达到一个压缩数据块的末端时,对来自下一个压缩数据块的数据单元进行解压缩和读取,直至达到该文件的结尾。在扫描模式中,可以返回全部所述读取的数据单元,以响应于所述读取操作,或者可以返回所述读取的数据单元的任一子集(例如,基于一选定的过滤器)。在所述系统100的一些实施方式中,扫描模式读取操作可被配置为由所述数据存储系统106的一接口来执行,该接口与所述存储接口模块104是分离开的(例如,通过在所述执行环境102中运行的第三方程序或者通过可从所述执行环境102外部访问所述数据存储系统106的系统来隔开)。In a second read mode (referred to as "scan mode"), data units can be read sequentially from the recovered set as a continuous stream. For a compressed record file comprising multiple compressed data blocks, when the end of a compressed data block is reached, data units from the next compressed data block are decompressed and read until the end of the file is reached. In scan mode, all of the read data units can be returned in response to the read operation, or any subset of the read data units can be returned (e.g., based on a selected filter). In some embodiments of the system 100, the scan mode read operation can be configured to be performed by an interface of the data storage system 106 that is separate from the storage interface module 104 (e.g., by a third-party program running in the execution environment 102 or by a system that can access the data storage system 106 from outside the execution environment 102).

在第三读取模式中(称为“键查找模式”),通过访问一索引来检索具有特定键(多个)的记录,该索引可识别对应于每一数据块的可能键的范围。由所述读取操作指定的键可能是主键,或者是映射到待检索的数据单元的一个或多个主键的辅键。对所述索引所列出并对应于包括指定主键的范围的数据块进行解压缩,并从所述恢复的数据单元集合搜索该主键。其他读取操作也可得以支持。例如,读取操作可指定主键或辅键,通过使用主键-直接地址查找表可将该主键或辅键映射到针对一特定数据单元的地址信息。In a third read mode (referred to as "key lookup mode"), records with a specific key(s) are retrieved by accessing an index that identifies a range of possible keys corresponding to each data block. The key specified by the read operation may be a primary key or a secondary key that maps to one or more primary keys of the data unit to be retrieved. The data blocks listed by the index and corresponding to the range that includes the specified primary key are decompressed, and the primary key is searched for from the recovered set of data units. Other read operations may also be supported. For example, a read operation may specify a primary key or a secondary key, which may be mapped to address information for a specific data unit using a primary key-direct address lookup table.

所述删除操作可使指定的数据单元从包含该数据单元的所述压缩数据存储部112中的压缩数据块中删除,而无需修改所述压缩数据存储部112的任何其他部分。例如,一些实施方式不需要对压缩记录文件的超过一个单一数据块进行修改,且不需要对所述数据块或文件的任何索引进行修改。这很有用,例如,如果一特定的数据单元包含需要被清除的信息(例如,应客户请求根据隐私法需要删除的客户信息),但同一块或同一压缩记录文件中的其他数据单元仍需要保留。所述删除操作以不包括所述删除数据单元的新的压缩数据块来替代包括待删除数据单元的压缩数据块,并将与所述删除数据单元有关的信息存储在与所述新的压缩数据块相关联的历史信息中。所述历史信息可随同所述压缩数据块存储在所述压缩数据存储部112中(例如,所述压缩数据块的预定部分,如数据头或数据尾,或其他附加信息或不同压缩数据块之间的可用交织空间)。所述历史信息可包括例如已删除数据单元的一系列偏置量及其长度。The delete operation causes a specified data unit to be deleted from the compressed data block in the compressed data storage 112 containing the data unit without modifying any other portion of the compressed data storage 112. For example, some embodiments do not require modifying more than a single data block in a compressed record file, nor do they require modifying any indexes to the data blocks or file. This is useful, for example, if a particular data unit contains information that needs to be purged (e.g., customer information that needs to be deleted at a customer's request under privacy laws), but other data units in the same block or compressed record file need to be retained. The delete operation replaces the compressed data block containing the deleted data unit with a new compressed data block that does not include the deleted data unit, and stores information about the deleted data unit in history information associated with the new compressed data block. The history information may be stored with the compressed data block in the compressed data storage 112 (e.g., a predetermined portion of the compressed data block, such as a header or trailer, or other additional information or available interleaving space between different compressed data blocks). The history information may include, for example, a series of offsets to the deleted data units and their lengths.

利用该历史信息,通过利用根据所述历史信息解读的现有地址信息随后仍能访问留在所述新的压缩数据块中的其他数据单元,以把由任何删除数据单元造成的任何偏移量考虑进去。特别地,对于位于从已删除数据单元后的数据块恢复的集合中的数据单元的全部现有直接地址偏移量在删除操作时不需进行修改,这有助于提升效率。当期望采用读取操作以直接寻址模式来读取较小数量的存储数据单元时,这种情况下,写入历史信息以按需调整偏移量可能要比针对从未读取的数据单元修改潜在大量的存储的直接地址偏移量(例如,存储在索引中)更有效率。此外,在一些实施方式中,所述存储接口模块104可能不会访问所有的位置,所述位置中可存储直接地址偏移量。因此,不会对全部所述偏移量进行修改。Utilizing this historical information, other data units remaining in the new compressed data block can subsequently still be accessed by utilizing existing address information interpreted based on the historical information to take into account any offsets caused by any deleted data units. In particular, all existing direct address offsets for data units located in the set recovered from the data block following the deleted data unit do not need to be modified during the deletion operation, which helps to improve efficiency. When it is desired to use a read operation to read a smaller number of stored data units in direct addressing mode, in this case, writing historical information to adjust the offsets as needed may be more efficient than modifying a potentially large number of stored direct address offsets (e.g., stored in an index) for data units that have never been read. In addition, in some embodiments, the storage interface module 104 may not access all locations where direct address offsets can be stored. Therefore, not all of the offsets are modified.

参见图2,所述压缩数据存储部112的数据存储格式的一个示例包括压缩记录文件200,所述压缩记录文件200包括若干压缩数据块,所述压缩数据块包括数据块202A-202C。在该示例中,所述数据块202B包括数据头204和数据尾206。所述数据头204包括存储有关于所述数据块202B压缩和解压缩相关的信息以及其他相关信息的字段。所述数据尾206包括检错码,例如循环冗余校验(CRC)和其他校验和(checksum),以检测和/或改正压缩和解压缩过程中的错误。可以对所述数据块202B之内的一部分压缩数据208进行解压缩,以恢复存储在所述压缩记录文件200中的记录集合210。对于一些压缩格式,所述数据头204具有可变长度,并因此包括指示该数据头204结束位置以及所述压缩数据208开始位置的信息。2 , an example of a data storage format for the compressed data storage unit 112 includes a compressed record file 200, which includes a plurality of compressed data blocks, including data blocks 202A-202C. In this example, the data block 202B includes a header 204 and a trailer 206. The header 204 includes fields storing information related to the compression and decompression of the data block 202B, as well as other related information. The trailer 206 includes error detection codes, such as cyclic redundancy checks (CRCs) and other checksums, to detect and/or correct errors during the compression and decompression processes. A portion of the compressed data 208 within the data block 202B can be decompressed to recover a record set 210 stored in the compressed record file 200. For some compression formats, the header 204 has a variable length and therefore includes information indicating where the header 204 ends and where the compressed data 208 begins.

例如,在gzip压缩格式中,所述数据头204具有下表列出的字段,包括前10个字节中的6个必填字段,以及包括可变长度字段的多达6个可选字段。For example, in the gzip compression format, the data header 204 has the fields listed in the following table, including 6 mandatory fields in the first 10 bytes and up to 6 optional fields including variable length fields.

表1Table 1

所述gzip压缩格式还具有8-字节数据尾,该8-字节数据尾包括一4-字节CRC码以及一4-字节值,该4-字节值提供所述原始数据的解压缩后的大小,所述解压缩后的大小为232压缩模。两个或多个压缩数据块(每个压缩数据块具有自己的gzip数据头和数据尾,且彼此相邻存储(即,下一数据头紧接上一数据尾之后开始))可被识别为单一有效的gzip文件。The gzip compression format also has an 8-byte trailer that includes a 4-byte CRC code and a 4-byte value that provides the decompressed size of the original data, where the decompressed size is compressed modulo 2 32. Two or more compressed data blocks, each with its own gzip header and trailer, and stored adjacent to each other (i.e., the next header begins immediately after the previous trailer), can be identified as a single valid gzip file.

当所述存储接口模块104执行删除操作时(在该删除操作中,一个或多个待删除记录(例如,记录C和记录E)被指示为包含在所述数据块202B中(例如,通过索引)),所述模块104对所述压缩数据208进行解压缩,以恢复所述记录集合210,生成省略了被删除的记录的新记录集合212,并将该新记录集合212压缩成修改过的压缩数据208’。由于所述新记录集合212包含的信息内容少于所述原始的记录集合210,所以所述修改过的压缩数据208’的大小会小于所述原始压缩数据208的大小(假设任一可被删除的给定记录中有一定的最低信息含量)。存储所述压缩数据208的所述数据块202B的所述部分然后被替换为所述修改过的压缩数据208’,且所述原始数据头204和数据尾206被替换为修改过的数据头204’和数据尾206’,所述数据头204’和数据尾206’共同对应于修改过的数据块202B’。由于所述修改过的数据208’占据的存储空间少于所述原始数据208,具有可供所述修改过的数据头204’占据的存储空间,且所述修改过的数据头204’占据的存储空间要超过所述原始数据头204。该额外的存储空间用于将历史信息214存储在一可用的可变长度字段(例如,所述gzip压缩格式的额外字段)。When the storage interface module 104 performs a delete operation in which one or more records to be deleted (e.g., record C and record E) are indicated as being contained in the data block 202B (e.g., by an index), the module 104 decompresses the compressed data 208 to restore the record set 210, generates a new record set 212 that omits the deleted records, and compresses the new record set 212 into modified compressed data 208'. Because the new record set 212 contains less information content than the original record set 210, the size of the modified compressed data 208' will be smaller than the size of the original compressed data 208 (assuming there is a certain minimum information content in any given record that can be deleted). The portion of the data block 202B storing the compressed data 208 is then replaced with the modified compressed data 208′, and the original data header 204 and data footer 206 are replaced with the modified data header 204′ and data footer 206′, which together correspond to the modified data block 202B′. Because the modified data 208′ occupies less storage space than the original data 208, there is storage space available for the modified data header 204′, and the modified data header 204′ occupies more storage space than the original data header 204. This additional storage space is used to store history information 214 in an available variable-length field (e.g., an extra field in the gzip compression format).

对于多数记录格式,需要将所述历史信息214容纳在所述修改过的数据头204’范围内的存储空间可能要小于在删除单一记录后所述修改过的数据208’预期的缩减大小。如果所述大小没有缩减到能充分容纳所述历史信息214,则可能取消相关联的删除操作,并返回错误消息。为确保所述修改过的数据块202B’具有和所述原始数据块202B相同的总大小,可以根据需要通过写入补白(padding)218来延长所述数据头,例如通过重复的字节模式(如,包含0xff的许多字节)或其他附加信息,在同一或另一可变长度字段(例如,所述gzip压缩格式的注解字段)。可选地,对于记录的删除可能不会为所述历史信息(例如,为特别紧凑的记录结构)提供足够空间的实施而言,当首先生成一压缩数据块时,补白也可包括在所述数据头中。可以根据需要减少所述初始补白,以在所述数据头中为所述历史信息提供额外空间。For most record formats, the storage space required to accommodate the history information 214 within the modified data header 204' may be less than the expected reduction in size of the modified data 208' after deleting a single record. If the size is not reduced enough to accommodate the history information 214, the associated deletion operation may be canceled and an error message returned. To ensure that the modified data block 202B' has the same total size as the original data block 202B, the header may be extended as needed by writing padding 218, for example, by repeating byte patterns (e.g., a number of bytes containing 0xff) or other additional information in the same or another variable-length field (e.g., the comment field in the gzip compression format). Optionally, for implementations where record deletion may not provide sufficient space for the history information (e.g., for particularly compact record structures), padding may also be included in the header when a compressed data block is first generated. The initial padding may be reduced as needed to provide additional space in the header for the history information.

如上所述,所述历史信息214汇总了已从所述记录集合210删除的记录,所述记录集合在相对于一共同参考存储位置(例如,相继将记录存储在所述新的恢复记录集合212中地址空间的起始地址)针对必要时要进行更正的所述新的较小集合212中剩余记录的直接地址偏移值具有足够信息。可用于编码所述历史信息214的数据结构215的一个示例是一列元素216,每一元素包括已删记录相对于所述原始记录集合中第一记录开始的偏移量(无论所述第一记录当前是否存在),以及该记录的对应长度。在图2阐明的示例中,针对已删记录C和E中的每一记录都具有两个元素216。记录长度的编码以可变长度和/或未指定的长度来支持记录。可选地,在其他示例中,如果所有记录具有相同指定的固定长度,则所述长度不需存储在元素216中。所述元素216存在于按其偏移值次序排列的列表中。由于执行额外的删除操作以删除额外记录,额外元素216被添加到或插入到该列表中。As described above, the history information 214 summarizes the records deleted from the record set 210, which contains sufficient information about the direct address offsets of the remaining records in the new, smaller set 212 relative to a common reference storage location (e.g., the start address of the address space where the records are subsequently stored in the new, restored record set 212) to be corrected, if necessary. An example of a data structure 215 that can be used to encode the history information 214 is a list of elements 216, each element containing the offset of a deleted record relative to the start of the first record in the original record set (regardless of whether the first record currently exists), and the corresponding length of the record. In the example illustrated in FIG. 2 , there are two elements 216 for each of the deleted records C and E. The encoding of the record length supports records with variable and/or unspecified lengths. Alternatively, in other examples, if all records have the same specified fixed length, the length need not be stored in element 216. The elements 216 are presented in a list ordered by their offset values. As additional delete operations are performed to delete additional records, additional elements 216 are added to or inserted into the list.

各种编码技术可用来以有效方式存储该数据结构215。例如,两个或多个相邻已删记录的任一序列可收缩为一单一元素216,该单一元素216包括该序列中第一记录的偏移量以及等于该序列中记录长度总和的长度。因此,每一元素216可表示一先前已删除区,该先前已删除区存储有许多先前已删除的记录。在某些情况下,相邻的已删记录可能已在不同删除操作中删除了。每一元素216可存储在所述数据头204’的可变长度字段中位元的相邻位置,采用预定数目的位元来存储所述偏移量并采用预定数目的位元来存储所述长度。用于存储所述偏移值的存储空间的数量限制在足够存储预期最大的可能偏移量的相对较少数量的位元。用于存储所述长度值的存储空间的数量也可加以限制(例如,限制在和用于存储所述偏移量的位元相同的数量,以把收缩的元素考虑进去)。也可基于什么值才是可能的值的假设来对所述偏移值和长度值进行压缩。例如,如果已知一条记录总会占据偶数个位元,则所述偏移值和长度值可被理解为对特定数目的位元对进行编码。因此,8位元能够编码的值高达255×2=510位元。类似地,如果已知一条记录总会占据的存储空间是一定数量位元的存储空间的倍数,则所述偏移值和长度值可被理解为对一个数字乘以该倍数的位元进行编码,这与位元的实际数目完全不同。可选地,还能进一步压缩该数据结构215(例如,采用行程(run-length)编码)。Various encoding techniques can be used to efficiently store the data structure 215. For example, any sequence of two or more adjacent deleted records can be collapsed into a single element 216 that includes the offset of the first record in the sequence and a length equal to the sum of the lengths of the records in the sequence. Thus, each element 216 can represent a previously deleted region that stores a number of previously deleted records. In some cases, adjacent deleted records may have been deleted in different deletion operations. Each element 216 can be stored in adjacent bits within the variable-length field of the data header 204', using a predetermined number of bits to store the offset and a predetermined number of bits to store the length. The amount of storage space used to store the offset value is limited to a relatively small number of bits sufficient to store the largest possible offset expected. The amount of storage space used to store the length value can also be limited (e.g., to the same number of bits as used to store the offset to account for collapsed elements). The offset and length values can also be compressed based on assumptions about what values are possible. For example, if it is known that a record will always occupy an even number of bits, then the offset and length values can be interpreted as encoding a specific number of bit pairs. Thus, 8 bits can encode values up to 255 × 2 = 510 bits. Similarly, if it is known that a record will always occupy a multiple of the storage space of a certain number of bits, then the offset and length values can be interpreted as encoding a number times that multiple of the bits, which is completely different from the actual number of bits. Optionally, the data structure 215 can be further compressed (e.g., using run-length encoding).

图3A所示的是为删除一个或多个记录而执行的删除操作的一个示例的流程图300,每一记录具有对应于三个一组(BLOCK(块)、OFFSET(偏移)、LENGTH(长度))的直接地址。(在该示例中,单一块中的一个或多个记录正被删除,但在其他示例中,来自许多块的记录可能是在删除操作中予以删除的。)所述存储接口模块104对所述压缩数据存储部112中的数据块进行解压缩(302),将标识符BLOCK(块)存储在一地址空间,该地址空间在地址START(开始)处开始。所述模块104在地址START(开始)+OFFSET(偏移)处删除(304)记录(具有LENGTH(长度)的长度)。所述模块104对历史信息进行计算(306),该历史信息可编码OFFSET(偏移)值和LENGTH(长度)值。所述模块104确定(308)是否有多个记录要从该块中删除,如果是,则重复所述删除(304)步骤和计算(306)步骤。删除记录之后,所述模块104将一新记录集合写入到一部分所述存储空间,剩余记录在该部分存储空间中相邻,没有任何过去曾经是省略了的记录(多条)的间隙(例如,写入到一临时文件中),并且所述模块104对所述新记录集合进行压缩(310)。所述模块104将经过计算的历史信息数据结构和任何必要的补白写入(312)进块BLOCK(块)的数据头中。所述模块104将产生的所述压缩数据写入(314)进所述已压缩数据存储部112中的块BLOCK(块),这样该压缩数据会在和块BLOCK(块)中的原始压缩数据相同的位置处结束。所述模块104用检错码来为所述新压缩数据写入(316)一新的数据尾(来代替之前的数据尾)。FIG3A shows a flow chart 300 of an example of a delete operation performed to delete one or more records, each record having a direct address corresponding to a triplet (BLOCK, OFFSET, LENGTH). (In this example, one or more records in a single block are being deleted, but in other examples, records from many blocks may be deleted in the delete operation.) The storage interface module 104 decompresses (302) a block of data in the compressed data storage 112 and stores the identifier BLOCK in an address space that begins at address START. The module 104 deletes (304) the record (having a length of LENGTH) at address START+OFFSET. The module 104 calculates (306) history information that may encode the OFFSET value and the LENGTH value. The module 104 determines (308) whether there are multiple records to be deleted from the block, and if so, repeats the deleting (304) step and the calculating (306) step. After deleting the records, the module 104 writes a new set of records to a portion of the storage space where the remaining records are contiguous without any gaps where the omitted record(s) were previously (e.g., written to a temporary file), and the module 104 compresses (310) the new set of records. The module 104 writes (312) the calculated history information data structure and any necessary padding into the data header of the block BLOCK. The module 104 writes (314) the resulting compressed data into the block BLOCK in the compressed data storage portion 112 so that the compressed data ends at the same position as the original compressed data in the block BLOCK. The module 104 writes (316) a new data trailer for the new compressed data (to replace the previous data trailer) using an error detection code.

除这样一种实际删除正被删除的记录中信息的“擦除(expunging)”删除操作之外,所述存储接口模块104还能被配置为提供简单地隐藏或标记将要被删除的记录(实际上并不删除该记录中的信息)的其他删除操作。这些删除操作可能不需要写入历史信息,甚至不需要解压缩块,这对于提供更快但较不安全的删除形式是很有帮助的。然而,还有能充分擦除的删除操作可供使用,以满足在清除信息上有更严格的要求,例如,按照某些隐私法的规定,删除后的信息不能被恢复。In addition to such an "expunging" delete operation that actually deletes the information in the record being deleted, the storage interface module 104 can also be configured to provide other delete operations that simply hide or mark the record to be deleted (without actually deleting the information in the record). These delete operations may not require writing history information or even decompressing blocks, which is very helpful in providing a faster but less secure form of deletion. However, there are also delete operations that can fully erase to meet more stringent requirements for clearing information, such as certain privacy laws that require that deleted information cannot be recovered.

图3B所示的是为读取一个或多个记录而执行的第一(直接寻址)读取操作的一个示例的流程图320,每一记录具有对应于三个一组(BLOCK(块)、OFFSET(偏移)、LENGTH(长度))的直接地址。(在该示例中,单一块中的一个或多个记录正被读取,但在其他示例中,可能是来自许多块的记录在读取操作中被读取。)所述存储接口模块104对所述压缩数据存储部112中的数据块进行解压缩(322),将标识符BLOCK(块)存储在一地址空间,该地址空间在地址START(开始)处开始。所述模块104将待读取记录的地址计算(324)为START(开始)+OFFSET(偏移)–CORRECTION(校正),其中CORRECTION(校正)基于针对块BLOCK(块)的任何现有历史信息予以计算。例如,所述模块104确定有多少先前已删除区具有少于OFFSET(偏移)的偏移值的值并在OFFSET(偏移)之前结束。如果没有,则无需进行校正且CORRECTION(校正)=0。否则,CORRECTION(校正)等于偏移值少于OFFSET(偏移)的每一先前已删除区的长度之和。因此,由先前已删除区导致的校正取决于最初有多少先前已删记录存在于特定的待读取记录和所述记录集合起点之间。计算所述地址之后,所述模块104在所述计算地址处读取(326)所述记录。如果先前已删除区具有的偏移值小于或等于OFFSET(偏移)但不在OFFSET(偏移)之前结束,则所述计算地址落入所述先前已删除区,并且所述模块104跳过所述读取步骤326并报告所述待读取记录已经被删除。所述模块104确定(328)是否有额外待读取记录,如果有,则重复所述计算(324)步骤和读取(326)步骤。当所述块中没有额外待读取记录,则返回操作(330)。FIG3B shows a flow chart 320 of an example of a first (directly addressed) read operation performed to read one or more records, each record having a direct address corresponding to a triplet of (BLOCK, OFFSET, LENGTH). (In this example, one or more records in a single block are being read, but in other examples, records from many blocks may be read in the read operation.) The storage interface module 104 decompresses (322) the data block in the compressed data storage 112 and stores the identifier BLOCK in an address space that begins at address START. The module 104 calculates (324) the address of the record to be read as START + OFFSET − CORRECTION, where CORRECTION is calculated based on any existing historical information for block BLOCK. For example, the module 104 determines how many previously deleted areas have a value less than the offset value of OFFSET and end before OFFSET. If not, no correction is required and CORRECTION = 0. Otherwise, CORRECTION is equal to the sum of the lengths of each previously deleted region whose offset value is less than OFFSET. Thus, the correction caused by previously deleted regions depends on how many previously deleted records initially existed between the particular record to be read and the start of the set of records. After calculating the address, the module 104 reads (326) the record at the calculated address. If a previously deleted region has an offset value less than or equal to OFFSET but does not end before OFFSET, the calculated address falls within the previously deleted region and the module 104 skips the reading step 326 and reports that the record to be read has been deleted. The module 104 determines (328) whether there are additional records to be read and, if so, repeats the calculation (324) and reading (326) steps. When there are no additional records to be read in the block, the process returns to operation (330).

所述第一(直接寻址)读取操作的其他实施也是可能的。例如,不用针对每一待读取记录计算校正过的地址,在对所述压缩数据块进行解压缩之后恢复的记录可被写入到带有已删记录曾经所在的适当间隙的地址空间。为确定所述间隙所在位置所需的信息可从上述相同的历史信息中获得。所述读取操作然后在其未经校正的地址START(开始)+OFFSET(偏移)处继续读取每一记录。Other implementations of the first (direct addressing) read operation are possible. For example, rather than calculating a corrected address for each record to be read, the records recovered after decompressing the compressed data block can be written to the address space with appropriate gaps where the deleted records once were. The information needed to determine the location of these gaps can be obtained from the same historical information described above. The read operation then continues to read each record at its uncorrected address START+OFFSET.

图3C显示的是第二(扫描)读取操作的示例的流程图340,该第二(扫描)读取操作对压缩记录文件中的一个或多个块进行扫描,记录将要从该压缩记录文件中读取。所述存储接口模块104将所述压缩数据存储部112中的所述第一数据块解压缩(342)至一地址空间中。所述模块104扫描(344)该地址空间以读取每一单独记录(例如,通过识别每一记录的开始和/或每一记录的结尾)。所述模块104确定(346)所述文件中是否有另一数据块(例如,通过检测另一gzip神奇数据头),如果有,则解压缩(342)下一数据块以读取额外的记录。如果在所述文件中没有额外的待读取数据块(例如,通过检测所述文件的结尾),则操作返回(348)。FIG3C shows a flowchart 340 of an example of a second (scanning) read operation that scans one or more blocks in a compressed record file from which records are to be read. The storage interface module 104 decompresses (342) the first data block in the compressed data storage unit 112 into an address space. The module 104 scans (344) the address space to read each individual record (e.g., by identifying the beginning of each record and/or the end of each record). The module 104 determines (346) whether there is another data block in the file (e.g., by detecting another gzip magic header) and, if so, decompresses (342) the next data block to read the additional record. If there are no additional data blocks to be read in the file (e.g., by detecting the end of the file), the operation returns (348).

尽管可能以完全擦除记录而无需存储历史信息的方式来实施擦除操作(例如,通过以例如全是1位元或0位元的预定模式填写的间隙来将所述已删记录覆盖在适当位置),这样一种删除操作需要扫描模式读取操作来识别并忽略这些已删记录。通过删除所述已删记录曾经所在的间隙,并将信息保存在所述历史信息之中,所述扫描模式读取操作能够以与多种技术中任一种技术相兼容的灵活方式来予以实施,所述技术可用来读取所述压缩数据存储部112中的信息,包括通过除了所述存储接口模块104之外的其他模块(例如,通过采用第三方软件)。此外,通过填写在较小的已修改过的压缩数据208’替代较大的原始压缩数据208之后剩余的额外的空间(例如,通过填写所述已修改过的数据头204’的字段),在压缩记录文件中没有意外间隙,使得所述第二(扫描)读取操作能够成功地识别出每一压缩数据块。例如,在采用gzip格式的实施中,在数据尾后,所述模块104预见压缩数据块的另一开头(即,另一gzip神奇数据头)或所述压缩记录文件结尾的指示符。以这种方式扩展由删除操作修改的压缩数据块的大小能够维持扫描模式的兼容性,而无需移动压缩记录文件中任一压缩数据块的存储位置,所述压缩记录文件在所述压缩数据块被修改之后出现。While it is possible to perform an erase operation by completely erasing the record without storing the history information (e.g., by overwriting the deleted record in place with gaps filled with a predetermined pattern, such as all 1 bits or all 0 bits), such an erase operation requires a scan-mode read operation to identify and ignore the deleted record. By deleting the gaps where the deleted record once existed and storing the information in the history information, the scan-mode read operation can be implemented in a flexible manner compatible with any of a variety of techniques for reading the information in the compressed data storage 112, including by modules other than the storage interface module 104 (e.g., by employing third-party software). Furthermore, by filling in the extra space remaining after the smaller, modified compressed data 208' replaces the larger, original compressed data 208 (e.g., by filling in fields in the modified data header 204'), there are no unexpected gaps in the compressed record file, allowing the second (scanning) read operation to successfully identify each compressed data block. For example, in an implementation using the gzip format, after the data tail, the module 104 foresees another beginning of a compressed data block (i.e., another gzip magic header) or an indicator of the end of the compressed record file. Extending the size of a compressed data block modified by a deletion operation in this manner maintains scan mode compatibility without moving the storage location of any compressed data block in the compressed record file that appears after the compressed data block is modified.

图3D所示的是为读取一个或多个记录而执行的第三(键查找)读取操作的一个示例的流程图360,每一记录具有一个标识键值。所述存储接口模块104以标识符BLOCK(块)将所述压缩数据存储部112中的数据块解压缩(362)至一地址空间中。所述模块104在所述地址空间中搜索(364)记录,以定位具有提供的键值的任何记录。3D shows a flow chart 360 of an example of a third (key lookup) read operation performed to read one or more records, each record having an identifying key value. The storage interface module 104 decompresses (362) a data block from the compressed data storage unit 112 into an address space using the identifier BLOCK. The module 104 searches (364) for records in the address space to locate any record having the provided key value.

为了使多个并发数据操作得以被所述存储接口模块104、或访问所述压缩数据存储部112的其他模块或系统执行,可以采用技术以避免两个数据操作之间发生冲突。如果预期删除操作并非频频发生,压缩数据块的数据尾中的检错码可以在解压缩后由数据操作用来检测在删除操作期间更新压缩数据过程中的数据块。例如,在无效校验和之后,所述数据操作可输出错误消息或在一段延迟后再行尝试,以允许完成所述删除操作。如果预期删除操作相对频繁地发生,可采用锁定机制来避免这样的冲突。In order to enable multiple concurrent data operations to be performed by the storage interface module 104, or other modules or systems that access the compressed data storage unit 112, techniques can be used to avoid conflicts between two data operations. If the expected deletion operation does not occur frequently, the error detection code in the data tail of the compressed data block can be used by the data operation after decompression to detect the data block in the process of updating the compressed data during the deletion operation. For example, after an invalid checksum, the data operation can output an error message or try again after a delay to allow the deletion operation to be completed. If the expected deletion operation occurs relatively frequently, a locking mechanism can be used to avoid such conflicts.

上述数据存储技术可以使用执行适当软件的计算系统来实施。例如,软件包括在一个或多个已编程或可编程计算机系统(可以具有各种架构,诸如分布式、客户端/服务器、或网格式)上执行的一个或多个计算机程序中的进程,每个计算机系统包括至少一个处理器、至少一个数据存储系统(包括易失性和/或非易失性存储器和/或存储元件)、以及至少一个用户接口(用于使用至少一个输入设备或端口来接收输入,以及用于使用至少一个输出设备或端口来提供输出)。该软件可包括大型程序的一个或多个模块,例如,该大型程序提供与数据流图的设计、配置和执行相关的其它服务。该程序的模块(例如,数据流图的元件)可以被实施为数据结构或者符合在数据库中存储的数据模型的其它经过组织的数据。The above-mentioned data storage technology can be implemented using a computing system that executes appropriate software. For example, the software includes a process in one or more computer programs that are executed on one or more programmed or programmable computer systems (which can have various architectures, such as distributed, client/server, or network formats), each of which includes at least one processor, at least one data storage system (including volatile and/or non-volatile memory and/or storage element), and at least one user interface (for receiving input using at least one input device or port, and for providing output using at least one output device or port). The software may include one or more modules of a large program, for example, the large program provides other services related to the design, configuration, and execution of a data flow graph. The modules of the program (for example, elements of a data flow graph) may be implemented as data structures or other organized data that conform to the data model stored in a database.

该软件可以被提供在诸如CD-ROM或其他计算机可读介质之类的有形永久存储介质(其可以被通用或专用计算机系统或装置读取)上,或者通过网络的通信介质递送(编码成传播信号)到执行该软件的计算机系统的有形永久介质。一些或全部处理可以在专用计算机上执行,或者使用诸如协处理器或现场可编程门阵列(FPGA)或专用集成电路(ASIC)之类的专用硬件来执行。该处理可以以分布方式实施,在该分布方式中,由该软件指定的不同的计算部分由不同的计算元件执行。每个这样的计算机程序被优选地存储在或下载到可由通用或专用可编程计算机读取的存储设备的计算机可读存储介质(例如,固态存储器或介质、或者磁或光介质),用于在计算机读取该存储介质或设备时配置和操作该计算机,以执行此处所描述的处理。也可以考虑将本发明的系统实施为有形永久存储介质,其配置有计算机程序,其中,如此配置的存储介质使得计算机以特定和预定义的方式操作以执行此处所描述的一个或多个处理步骤。The software can be provided on a tangible permanent storage medium such as a CD-ROM or other computer readable medium (which can be read by a general or special computer system or device), or a tangible permanent medium delivered (encoded into a propagation signal) to a computer system that executes the software via a communication medium of a network. Some or all of the processing can be performed on a dedicated computer, or performed using dedicated hardware such as a coprocessor or a field programmable gate array (FPGA) or an application specific integrated circuit (ASIC). The processing can be implemented in a distributed manner in which different computing parts specified by the software are performed by different computing elements. Each such computer program is preferably stored in or downloaded to a computer readable storage medium (e.g., a solid-state memory or medium, or a magnetic or optical medium) of a storage device that can be read by a general or special programmable computer, for configuring and operating the computer when the computer reads the storage medium or device to perform the processing described herein. It is also contemplated that the system of the present invention can be implemented as a tangible permanent storage medium configured with a computer program, wherein the storage medium so configured causes the computer to operate in a specific and predefined manner to perform one or more processing steps described herein.

已经对本发明的多个实施例进行了描述。然而,应当理解,前面的描述旨在说明而非限制本发明的范围,本发明的范围由以下权利要求书的范围来限定。因此,其它实施例也落在以下权利要求书的范围内。例如,在不脱离本发明的范围的情况下可进行各种修改。此外,上述的一些步骤可以是顺序独立的,因此可以以不同于所述的顺序来执行。Several embodiments of the present invention have been described. However, it should be understood that the foregoing description is intended to illustrate, not to limit, the scope of the present invention, which is defined by the following claims. Therefore, other embodiments are also within the scope of the following claims. For example, various modifications may be made without departing from the scope of the present invention. Furthermore, some of the steps described above may be sequence-independent and, therefore, may be performed in an order different from that described.

Claims (23)

1.一种用于管理数据单元存储的系统,所述系统包括:1. A system for managing data unit storage, the system comprising: 数据存储系统,配置为存储多个数据块,至少一些所述数据块包括多个数据单元,至少一组数据块是连续存储的,从而支持第一读取操作,该第一读取操作从所述组中至少两个相邻数据块中检索数据单元;以及A data storage system configured to store multiple data blocks, at least some of which comprise multiple data units, and at least one group of data blocks stored contiguously, thereby supporting a first read operation that retrieves data units from at least two adjacent data blocks in the group; and 接口,包括至少一个处理器,耦接至所述数据存储系统,且被配置为执行关于数据单元的一种或多种操作,所述操作包括删除操作,该删除操作以不包括已删除数据单元的第二数据块来替代包括待删除数据单元的第一数据块,并存储与之前移除已删除数据单元有关的历史信息和附加信息,与之前移除已删除数据单元有关的历史信息和附加信息均被存储在所述第二数据块中,以及所述附加信息的大小取决于与之前移除已删除数据单元有关的历史信息的大小,以使在与之前移除已删除数据单元有关的历史信息和附加信息被存储在所述第二数据块中之后,所述第二数据块具有和所述第一数据块相同的大小。An interface, including at least one processor, coupled to the data storage system and configured to perform one or more operations relating to data units, including a deletion operation that replaces a first data block containing the data unit to be deleted with a second data block that does not include the deleted data unit, and stores historical information and additional information related to the previous removal of the deleted data unit, both of which are stored in the second data block, and the size of the additional information depends on the size of the historical information related to the previous removal of the deleted data unit, such that after the historical information and additional information related to the previous removal of the deleted data unit are stored in the second data block, the second data block has the same size as the first data block. 2.根据权利要求1所述的系统,其中所述第二数据块与一数据块相邻,该数据块在所述数据存储系统内曾与所述第一数据块相邻。2. The system according to claim 1, wherein the second data block is adjacent to a data block that was previously adjacent to the first data block in the data storage system. 3.根据权利要求1或2所述的系统,其中所述第二数据块存储在与所述第一数据块相同的存储空间中。3. The system according to claim 1 or 2, wherein the second data block is stored in the same storage space as the first data block. 4.根据权利要求1或2所述的系统,其中所述删除操作使得并非所述第一数据块的数据块维持在所述数据存储系统之内相同的存储位置,并非所述第一数据块的数据块在执行所述删除操作之前就存储于所述存储位置中。4. The system according to claim 1 or 2, wherein the deletion operation causes data blocks that are not the first data block to remain in the same storage location within the data storage system, and the data blocks that are not the first data block were stored in the storage location before the deletion operation was performed. 5.根据权利要求1或2所述的系统,其中所述数据存储系统被配置为针对至少一些所述数据块存储与之前从该数据块移除一个或多个数据单元有关的相应历史信息,所述移除影响该数据块中至少一些数据单元的地址。5. The system of claim 1 or 2, wherein the data storage system is configured to store, for at least some of the data blocks, corresponding historical information relating to the previous removal of one or more data units from the data block, the removal affecting the addresses of at least some data units in the data block. 6.根据权利要求5所述的系统,其中所述操作包括第二读取操作,不同于所述第一读取操作,该第二读取操作根据基于对应于一特定数据块的任何存储的历史信息解读的地址信息来访问存储在所述特定数据块中的至少一第一数据单元。6. The system of claim 5, wherein the operation includes a second read operation, distinct from the first read operation, which accesses at least one first data unit stored in the specific data block based on address information interpreted from historical information corresponding to any storage of the specific data block. 7.根据权利要求5所述的系统,其中至少一些所述历史信息存储在所述数据存储系统中。7. The system of claim 5, wherein at least some of the historical information is stored in the data storage system. 8.根据权利要求7所述的系统,其中至少一部分所述历史信息在不同数据块之间交叉存取。8. The system of claim 7, wherein at least a portion of the historical information is cross-accessed between different data blocks. 9.根据权利要求7所述的系统,其中对应于一特定数据块的至少一部分历史信息存储在该特定数据块的预定部分中。9. The system of claim 7, wherein at least a portion of historical information corresponding to a particular data block is stored in a predetermined portion of that particular data block. 10.根据权利要求6所述的系统,其中至少一些所述数据块是已压缩数据块。10. The system of claim 6, wherein at least some of the data blocks are compressed data blocks. 11.根据权利要求10所述的系统,其中所述第二读取操作解压缩一特定的已压缩数据块以恢复一已解压缩数据单元集合,并至少部分基于对应于该特定的已压缩数据块的所述历史信息在距一参考位置特定的偏移量处检索待读取数据单元。11. The system of claim 10, wherein the second read operation decompresses a specific compressed data block to recover a set of decompressed data units, and retrieves the data unit to be read at a specific offset from a reference position based at least in part on the historical information corresponding to the specific compressed data block. 12.根据权利要求10或11所述的系统,其中所述第一读取操作解压缩多个已压缩数据块并相继读取多个已解压缩数据单元。12. The system according to claim 10 or 11, wherein the first read operation decompresses a plurality of compressed data blocks and sequentially reads a plurality of decompressed data units. 13.根据权利要求10或11中任一权利要求所述的系统,其中所述第一数据块和所述第二数据块是已压缩数据块,并且所述删除操作对所述第二数据块的存储大小进行扩展,以填占所述第二数据块和所述第一数据块之间的大小差异。13. The system according to any one of claims 10 or 11, wherein the first data block and the second data block are compressed data blocks, and the deletion operation expands the storage size of the second data block to fill the size difference between the second data block and the first data block. 14.根据权利要求13所述的系统,其中所述第二数据块的所述存储大小通过存储除历史信息之外的所述第二数据块中的附加信息来进行扩展。14. The system of claim 13, wherein the storage size of the second data block is expanded by storing additional information in the second data block in addition to historical information. 15.根据权利要求10或11中任一权利要求所述的系统,其中所述删除操作存储与所述第二数据块相关联的新检错码以替代与所述第一数据块相关联的检错码。15. The system of claim 10 or 11, wherein the deletion operation stores a new error detection code associated with the second data block to replace the error detection code associated with the first data block. 16.根据权利要求10或11中任一权利要求所述的系统,其中所述操作包括添加操作,该添加操作存储与一最近添加的数据单元集合相关联的待添加数据单元。16. The system according to any one of claims 10 or 11, wherein the operation includes an add operation that stores data units to be added associated with a set of recently added data units. 17.根据权利要求16所述的系统,其中所述处理器还被配置为将所述最近添加的数据单元集合压缩为存储在存储介质中的已压缩数据块。17. The system of claim 16, wherein the processor is further configured to compress the recently added set of data units into compressed data blocks stored in a storage medium. 18.根据权利要求10或11所述的系统,其中所述数据存储系统被配置为存储附加信息,该附加信息将所述组中的所述多个数据块识别为符合预定存储格式。18. The system of claim 10 or 11, wherein the data storage system is configured to store additional information that identifies the plurality of data blocks in the group as conforming to a predetermined storage format. 19.根据权利要求18所述的系统,其中所述附加信息包括在所述组中每一数据块的数据头中的用来识别所述预定存储格式的标识符。19. The system of claim 18, wherein the additional information includes an identifier in the header of each data block in the group for identifying the predetermined storage format. 20.根据权利要求18所述的系统,其中所述第一读取操作与所述预定存储格式相兼容。20. The system of claim 18, wherein the first read operation is compatible with the predetermined storage format. 21.一种用于管理数据单元存储的系统,所述系统包括:21. A system for managing data unit storage, the system comprising: 用来存储多个数据块的装置,至少一些所述多个数据块包括多个数据单元,至少一组数据块是连续存储的,从而支持第一读取操作,该第一读取操作从所述组中至少两个相邻数据块中检索数据单元;以及A means for storing multiple data blocks, wherein at least some of the multiple data blocks comprise multiple data units, and at least one group of data blocks is stored contiguously, thereby supporting a first read operation that retrieves data units from at least two adjacent data blocks in the group; and 用来执行关于数据单元的一种或多种操作的装置,所述操作包括删除操作,该删除操作以不包括已删除数据单元的第二数据块来替代包括待删除数据单元的第一数据块,并存储与之前移除已删除数据单元有关的历史信息和附加信息,与之前移除已删除数据单元有关的历史信息和附加信息均被存储在所述第二数据块中,以及所述附加信息的大小取决于与之前移除已删除数据单元有关的历史信息的大小,以使在与之前移除已删除数据单元有关的历史信息和附加信息被存储在所述第二数据块中之后,所述第二数据块具有和所述第一数据块相同的大小。An apparatus for performing one or more operations relating to a data unit, the operations including a deletion operation that replaces a first data block containing the data unit to be deleted with a second data block that does not include the deleted data unit, and stores historical information and additional information relating to the previous removal of the deleted data unit, both of which are stored in the second data block, and the size of the additional information depends on the size of the historical information relating to the previous removal of the deleted data unit, such that after the historical information and additional information relating to the previous removal of the deleted data unit are stored in the second data block, the second data block has the same size as the first data block. 22.一种用于管理数据单元存储的方法,所述方法包括:22. A method for managing data unit storage, the method comprising: 将多个数据块存储在数据存储系统中,至少一些所述数据块包括多个数据单元,至少一组所述数据块是连续存储的,从而支持第一读取操作,该第一读取操作从所述组中至少两个相邻数据块中检索数据单元;以及Multiple data blocks are stored in a data storage system, at least some of the data blocks comprising multiple data units, and at least one group of the data blocks are stored contiguously, thereby supporting a first read operation that retrieves data units from at least two adjacent data blocks in the group; and 使用至少一个处理器来执行关于数据单元的一种或多种操作,所述操作包括删除操作,该删除操作以不包括已删除数据单元的第二数据块来替代包括待删除数据单元的第一数据块,并存储与之前移除已删除数据单元有关的历史信息和附加信息,与之前移除已删除数据单元有关的历史信息和附加信息均被存储在所述第二数据块中,以及所述附加信息的大小取决于与之前移除已删除数据单元有关的历史信息的大小,以使在与之前移除已删除数据单元有关的历史信息和附加信息被存储在所述第二数据块中之后,所述第二数据块具有和所述第一数据块相同的大小。At least one processor is used to perform one or more operations on a data unit, the operations including a deletion operation that replaces a first data block containing the data unit to be deleted with a second data block that does not include the deleted data unit, and stores historical information and additional information related to the previous removal of the deleted data unit, both of which are stored in the second data block, and the size of the additional information depends on the size of the historical information related to the previous removal of the deleted data unit, such that after the historical information and additional information related to the previous removal of the deleted data unit are stored in the second data block, the second data block has the same size as the first data block. 23.一种计算机可读介质,存储用来管理数据单元的软件,该软件包括用于使计算系统执行以下操作的指令:23. A computer-readable medium storing software for managing data units, the software including instructions for causing a computing system to perform the following operations: 将多个数据块存储在数据存储系统中,至少一些所述数据块包括多个数据单元,至少一组数据块是连续存储的,从而支持第一读取操作,该第一读取操作从所述组中至少两个相邻数据块中检索数据单元;以及Multiple data blocks are stored in a data storage system, at least some of the data blocks comprising multiple data units, and at least one group of data blocks are stored contiguously, thereby supporting a first read operation that retrieves data units from at least two adjacent data blocks in the group; and 执行关于数据单元的一种或多种操作,所述操作包括删除操作,该删除操作以不包括已删除数据单元的第二数据块来替代包括待删除数据单元的第一数据块,并存储与之前移除已删除数据单元有关的历史信息和附加信息,与之前移除已删除数据单元有关的历史信息和附加信息均被存储在所述第二数据块中,以及所述附加信息的大小取决于与之前移除已删除数据单元有关的历史信息的大小,以使在与之前移除已删除数据单元有关的历史信息和附加信息被存储在所述第二数据块中之后,所述第二数据块具有和所述第一数据块相同的大小。Perform one or more operations on a data unit, including a deletion operation that replaces a first data block containing the data unit to be deleted with a second data block that does not include the deleted data unit, and stores historical information and additional information related to the previous removal of the deleted data unit, both of which are stored in the second data block, and the size of the additional information depends on the size of the historical information related to the previous removal of the deleted data unit, such that after the historical information and additional information related to the previous removal of the deleted data unit are stored in the second data block, the second data block has the same size as the first data block.
HK16103842.6A 2013-03-06 2014-02-18 Managing operations on stored data units HK1215974B (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US13/787,203 US9875054B2 (en) 2013-03-06 2013-03-06 Managing operations on stored data units
US13/787,203 2013-03-06
PCT/US2014/016858 WO2014137587A1 (en) 2013-03-06 2014-02-18 Managing operations on stored data units

Publications (2)

Publication Number Publication Date
HK1215974A1 HK1215974A1 (en) 2016-09-30
HK1215974B true HK1215974B (en) 2020-11-27

Family

ID=

Similar Documents

Publication Publication Date Title
AU2019257524B2 (en) Managing operations on stored data units
CN105027071B (en) Manage the operation to data storage unit
JP6632380B2 (en) Managing operations on stored data units
HK1215974B (en) Managing operations on stored data units
HK1216267B (en) Managing operations on stored data units
HK1215973B (en) Managing operations on stored data units