[go: up one dir, main page]

WO2013163832A1 - Cloud storage method and device - Google Patents

Cloud storage method and device Download PDF

Info

Publication number
WO2013163832A1
WO2013163832A1 PCT/CN2012/075841 CN2012075841W WO2013163832A1 WO 2013163832 A1 WO2013163832 A1 WO 2013163832A1 CN 2012075841 W CN2012075841 W CN 2012075841W WO 2013163832 A1 WO2013163832 A1 WO 2013163832A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
storage
module
hash value
storage path
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.)
Ceased
Application number
PCT/CN2012/075841
Other languages
French (fr)
Chinese (zh)
Inventor
王东临
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Sursen Investment Co Ltd
Original Assignee
Tianjin Sursen Investment Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin Sursen Investment Co Ltd filed Critical Tianjin Sursen Investment Co Ltd
Priority to US13/858,489 priority Critical patent/US20140181116A1/en
Publication of WO2013163832A1 publication Critical patent/WO2013163832A1/en
Anticipated expiration legal-status Critical
Priority to US14/943,909 priority patent/US20160112413A1/en
Priority to US15/055,373 priority patent/US20160182638A1/en
Priority to US15/594,374 priority patent/US20170249093A1/en
Priority to US16/378,076 priority patent/US20190235777A1/en
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • G06F16/137Hash-based

Definitions

  • the present invention relates to the field of the Internet, and in particular, to a cloud storage method and apparatus. Background technique
  • Embodiments of the present invention provide a cloud storage method and apparatus to provide efficient storage of massive data.
  • Calculate the hash value of the file convert the hash value of the file into a string as the file name; calculate the storage path of the file by using the file hash value according to a predefined rule; and find the actual storage location of the storage path of the file in the index table
  • the file is stored in the actual storage location.
  • the mapping table of all possible storage paths and the actual location of the storage disk has been pre-stored in the index table.
  • a first module configured to calculate a hash value of the file according to a predefined hash value algorithm
  • a second module configured to convert the hash value of the file calculated according to the first module into a string Is the file name
  • a third module configured to calculate a storage path of the file according to a predefined algorithm by using a hash value of the file calculated by the first module
  • the fourth module is configured to store a mapping table of all possible storage paths and actual locations of the storage disks
  • a fifth module configured to search, according to a storage path of the file calculated by the third module, an actual storage location of the storage path of the file in the fourth module;
  • a sixth module configured to store the file on a storage disk found by the fifth module to store the file.
  • a cloud storage method and device provided by the embodiment of the present invention stores a large amount of data storage, since the file name storage using the hash value is used, the non-repetitive storage of the massive data can be ensured. Calculating the storage path of the file according to the hash value, and ensuring that the quantity data is stored on each storage server to ensure the storage balance of the system. Even if the storage server of the cloud storage system is infinitely expanded, the method can be efficiently managed. The storage of the document. DRAWINGS
  • FIG. 1 is a flowchart of a cloud storage method according to an embodiment of the present invention.
  • FIG. 2 is a schematic structural diagram of a cloud storage device according to an embodiment of the present invention.
  • BEST MODE FOR CARRYING OUT THE INVENTION will be further described in detail with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
  • FIG. 1 is a flowchart of a cloud storage method according to an embodiment of the present invention. As shown in FIG. 1, when the file is stored in the cloud, the method includes the following steps:
  • Step 101 Calculate the Hash value of the file, and convert the Hash value of the file into a string as the file name.
  • different hash value algorithms can be selected according to the configuration of the system.
  • a double hash algorithm may be adopted as the file name, that is, two different hash algorithms are used to calculate the hash value of the file, and the two hash values are connected as the hash value of the file.
  • the Hash value of the file is converted into a hexadecimal string as a file name, for example, the converted file name is HiHzHg -> HNO
  • Step 102 Calculate the storage path of the file by using the file Hash value according to a predefined rule.
  • the predefined rule may be:
  • the storage path of the file is composed of a secondary directory; for example, the first two bits of the file name may be directly used as a first-level directory for storing the file, and the file name is The third four bits are used as the second level directory for storing the file.
  • H 3 H 4 will be used as the second level directory of the file, that is, the file name is H 2 H 3 ...
  • H N has a storage path of 11 2 ⁇ 11 4 .
  • the two-digit 36-level secondary directory storage provided by the embodiment of the present invention can theoretically store and manage more than 10 billion documents. .
  • Step 103 Find an actual storage location of a storage path of the file in an index table, and store the file in the actual storage location.
  • the mapping table of all possible storage paths and the actual location of the storage disk has been pre-stored in the index table.
  • the storage disk location corresponding to the 1679616 storage path (second-level directory) is already recorded in the index table, for example, which volume of a storage directory is located in a secondary directory.
  • index table usually needs a few megabytes of space, and can be in the form of a group, which can be directly obtained by subscripting.
  • the index table records a primary directory named AB, and the secondary directory named CD is stored on the third logical volume of the first disk.
  • Step 104 When looking up (calling) a file, according to the same predefined rules, use The file hash value calculates the file name and storage path of the file to be searched;
  • the first four digits of the file name are extracted, and the primary storage directory and the secondary storage directory of the file are obtained.
  • Step 105 Find a physical disk corresponding to the file to be searched in the index table according to the calculated storage path of the file to be searched;
  • Step 106 Find the file to be searched in the physical disk corresponding to the storage path according to the file name of the file to be searched.
  • the actual storage location of all possible storage paths is recorded in the index table in advance in order to speed up the storage and lookup.
  • one storage server In actual operation, usually one storage server carries multiple storage disks. When you add a storage disk to the current storage server, copy some of the directories on the existing storage disk to the new storage disk. When adding a new storage server, you can insert some of the disks on the original storage server directly into the new storage server. Although the original storage server needs to add new storage disks, you need to leave it from the storage server. Copy the storage disk to the new disk, but copy it.
  • the storage method provided by the embodiment of the present invention can be used for mass data storage.
  • mass data storage when storing a large amount of data storage in this way, since the file name storage using the hash value is used, it is possible to ensure the non-repetitive storage of the massive data.
  • the storage path of the file is calculated according to the hash value, and the quantity data is stored on each storage server to ensure the storage balance of the system, even if the storage server of the cloud storage system is infinitely expanded. This way, you can also efficiently manage the storage of documents.
  • the index table can be stored in the web server, so that when the user needs to find a file, the file can be quickly found in the mass server.
  • the first bit of the hash value is used as the primary directory
  • the second three is used as the secondary directory
  • the fourth is used as the tertiary directory.
  • FIG. 2 is a schematic structural diagram of a cloud storage device according to an embodiment of the present invention. As shown in FIG. 2, the cloud storage device runs on a device having a processor and a storage module.
  • the device includes:
  • a Hash value calculation module configured to calculate a Hash value of the file according to a predefined hash value algorithm
  • a file name calculation module configured to calculate a Hash value of the file calculated by the module according to the Hash value, and convert the file into a string as a file name
  • a storage path calculation module configured to calculate a Hash value of the file calculated by the Hash value calculation module, and calculate a storage path of the file according to a predefined algorithm
  • a table module for storing a mapping table of all possible storage paths and the actual location of the storage disk
  • An index table searching module configured to search, according to a storage module, a storage path of the file calculated by the storage path calculation module, and find an actual storage location of the storage path of the file in the index table module;
  • the storage module is configured to invoke an index table lookup module, and store the file on a storage disk returned by the index table lookup module to store the file.
  • the Hash value calculation module calculates the file name to be searched
  • the file name calculation module calculates the file name of the file to be searched
  • the storage path calculation module calculates the storage path of the file to be searched
  • the index table search module And the physical storage disk corresponding to the file to be searched is found in the index table module
  • the cloud storage device further includes: a search module, configured to calculate a storage path of the file to be searched according to the storage path calculation module, and call an index table to search for a module; and calculate a file name of the file to be searched according to the file name calculation module, and find the physical disk corresponding to the storage path. The file to be found.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

一种云存储方法及装置  Cloud storage method and device

技术领域 Technical field

本发明涉及互联网领域, 特别涉及一种云存储方法及装置。 背景技术  The present invention relates to the field of the Internet, and in particular, to a cloud storage method and apparatus. Background technique

云存储(cloud storage ) 这个概念一经提出, 就得到了众多厂商的支持 和关注。 云存储的本质是将海量数据存储在云端, 各客户端通过互联网访问 云端海量数据。 但云端海量数据如何在云端存储, 其实是云存储的一个本质 问题。  Once the concept of cloud storage has been proposed, it has received support and attention from many vendors. The essence of cloud storage is to store massive amounts of data in the cloud, and each client accesses massive amounts of data in the cloud through the Internet. But how the massive data in the cloud is stored in the cloud is actually an essential issue of cloud storage.

目前很多云存储提供商在云端存储海量数据的方式为:为不同的用户分 配一个相对独立的空间, 不同用户的数据存放在相对的空间内。 当数据量足 够大时, 云端会有很多重复数据, 利用这种方式存储, 会导致很多数据的重 复存储。 这种存储方式非常低效。 发明内容  At present, many cloud storage providers store massive amounts of data in the cloud by assigning a relatively independent space to different users, and data of different users is stored in a relative space. When the amount of data is large enough, there will be a lot of duplicate data in the cloud. Using this method of storage will result in repeated storage of many data. This type of storage is very inefficient. Summary of the invention

本发明实施例提供了一种云存储方法及装置,以提供海量数据的高效存 储。  Embodiments of the present invention provide a cloud storage method and apparatus to provide efficient storage of massive data.

本发明实施例提到的一种云存储方法, 包括:  A cloud storage method mentioned in the embodiment of the present invention includes:

计算文件的 Hash值, 将文件的 Hash值转换为字符串作为文件名; 根据预先定义的规则, 利用文件 Hash值计算文件的存储路径; 在索引表中查找所述文件的存储路径的实际存储位置,在所述实际存储 位置中存储所述文件; 其中, 所述索引表中已经预先存储了所有可能的存储 路径与存储磁盘实际位置的映射关系表。  Calculate the hash value of the file, convert the hash value of the file into a string as the file name; calculate the storage path of the file by using the file hash value according to a predefined rule; and find the actual storage location of the storage path of the file in the index table The file is stored in the actual storage location. The mapping table of all possible storage paths and the actual location of the storage disk has been pre-stored in the index table.

本发明实施例提到的一种云存储装置, 包括:  A cloud storage device mentioned in the embodiment of the present invention includes:

第一模块, 用于根据预定义的 hash值算法, 计算文件的 Hash值; 第二模块, 用于根据第一模块计算的文件的 Hash值, 转换为字符串作 为文件名; a first module, configured to calculate a hash value of the file according to a predefined hash value algorithm; a second module, configured to convert the hash value of the file calculated according to the first module into a string Is the file name;

第三模块, 用于利用第一模块计算的文件的 Hash值, 根据预定义的算 法, 计算文件的存储路径;  a third module, configured to calculate a storage path of the file according to a predefined algorithm by using a hash value of the file calculated by the first module;

第四模块,用于存储了所有可能的存储路径与存储磁盘实际位置的映射 关系表;  The fourth module is configured to store a mapping table of all possible storage paths and actual locations of the storage disks;

第五模块, 用于根据第三模块计算出来的文件的存储路径, 在第四模块 中查找所述文件的存储路径的实际存储位置;  a fifth module, configured to search, according to a storage path of the file calculated by the third module, an actual storage location of the storage path of the file in the fourth module;

第六模块,用于将文件存储在第五模块查找到的存储磁盘上存储所述文 件。  And a sixth module, configured to store the file on a storage disk found by the fifth module to store the file.

利用本发明实施例提供的一种云存储方法及装置存储海量数据存储时, 由于是利用 hash值的文件名存储, 这样可以保证海量数据的不重复存储。 根据 hash值计算文件的存储路径, 又可以保证将数量数据均勾地存放在各 存储服务器上, 保证系统的存储均衡, 即使云存储系统的存储服务器无限扩 展时, 利用该方式也可以高效地管理文档的存储。 附图说明  When a cloud storage method and device provided by the embodiment of the present invention stores a large amount of data storage, since the file name storage using the hash value is used, the non-repetitive storage of the massive data can be ensured. Calculating the storage path of the file according to the hash value, and ensuring that the quantity data is stored on each storage server to ensure the storage balance of the system. Even if the storage server of the cloud storage system is infinitely expanded, the method can be efficiently managed. The storage of the document. DRAWINGS

图 1所示为本发明实施例提供的一种云存储方法的流程图。  FIG. 1 is a flowchart of a cloud storage method according to an embodiment of the present invention.

图 2所示为本发明实施例提供的一种云存储装置的结构示意图。 具体实施方式 以下结合附图及实施例, 对本发明进行进一步详细说明。 应当理解, 此 处所描述的具体实施例仅仅用于解释本发明, 并不用于限定本发明。  FIG. 2 is a schematic structural diagram of a cloud storage device according to an embodiment of the present invention. BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be further described in detail with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

图 1所示为本发明实施例提供的一种云存储方法的流程图。如图 1所示, 当将文件存储在云端时, 该方法包括如下步骤:  FIG. 1 is a flowchart of a cloud storage method according to an embodiment of the present invention. As shown in FIG. 1, when the file is stored in the cloud, the method includes the following steps:

步骤 101 : 计算文件的 Hash值, 将文件的 Hash值转换为字符串作为文 件名。  Step 101: Calculate the Hash value of the file, and convert the Hash value of the file into a string as the file name.

这里, 可以根据系统的配置选择不同的 Hash值算法。 比如, 可以采取 MD2、 MD4、 MD5 和 SHA-1 等算法。 在本发明一实施例中, 可以采取双 Hash算法作为文件名, 即利用两种不同的 Hash算法计算文件的 Hash值, 将两个 Hash值连接起来作为文件的 Hash值。 Here, different hash value algorithms can be selected according to the configuration of the system. For example, can take Algorithms such as MD2, MD4, MD5, and SHA-1. In an embodiment of the present invention, a double hash algorithm may be adopted as the file name, that is, two different hash algorithms are used to calculate the hash value of the file, and the two hash values are connected as the hash value of the file.

在本发明一实施例中,将文件的 Hash值转换为 36进制字符串作为文件 名, 比如转换后的文件名为 HiHzHg ...... HNO  In an embodiment of the invention, the Hash value of the file is converted into a hexadecimal string as a file name, for example, the converted file name is HiHzHg ...... HNO

步骤 102: 根据预先定义的规则, 利用文件 Hash值计算文件的存储路 径。  Step 102: Calculate the storage path of the file by using the file Hash value according to a predefined rule.

在本发明一实施例中, 预定义的规则可以是: 文件的存储路径由二级目 录构成;比如,可以直接将文件名的第一二位作为存储该文件的第一级目录, 将文件名的第三四位作为存储该文件的第二级目录。  In an embodiment of the present invention, the predefined rule may be: The storage path of the file is composed of a secondary directory; for example, the first two bits of the file name may be directly used as a first-level directory for storing the file, and the file name is The third four bits are used as the second level directory for storing the file.

比如, 在本例中, 将 作为文件的第一级目录, 将 H3H4作为文件的 第二级目录, 即文件名为 H2H3...... HN的存储路径为 112\ 114For example, in this example, it will be the first level directory of the file, and H 3 H 4 will be used as the second level directory of the file, that is, the file name is H 2 H 3 ... H N has a storage path of 11 2 \ 11 4 .

当以 36进制字符串作为文件名时, 系统理论上最大可包含 362=1296个 一级目录, 362*362=1679616个二级目录。 When using a 36-character string as the file name, the system can theoretically contain up to 36 2 = 1296 first-level directories, 36 2 * 36 2 = 1679616 secondary directories.

通常对于一个 Linux系统而言,每个子目录下可以管理至少 1万个文件, 那么利用本发明实施例提供的两位 36进制二级目录存储的方式, 理论上可 以存储管理超过 100亿的文档。  Generally, for a Linux system, at least 10,000 files can be managed in each subdirectory, and the two-digit 36-level secondary directory storage provided by the embodiment of the present invention can theoretically store and manage more than 10 billion documents. .

步骤 103 : 在索引表中查找所述文件的存储路径的实际存储位置, 在所 述实际存储位置中存储所述文件。 其中, 在所索引表中已经预先存储了所有 可能的存储路径与存储磁盘实际位置的映射关系表。  Step 103: Find an actual storage location of a storage path of the file in an index table, and store the file in the actual storage location. The mapping table of all possible storage paths and the actual location of the storage disk has been pre-stored in the index table.

比如, 继续以上述为例, 索引表中已经记载有 1679616条存储路径(二 级目录)所对应的存储磁盘位置, 比如记录某一个二级目录位于某个存储服 务器的哪个卷。 通常这样的索引表大概只需要几兆的空间, 而且可以是数 组形式, 通过下标就可以直接获取。 具体来说, 该索引表中记录有一级目录 名为 AB , 二级目录名为 CD的路径存放在第一磁盘的第 3个逻辑卷上。  For example, continue to use the above as an example. The storage disk location corresponding to the 1679616 storage path (second-level directory) is already recorded in the index table, for example, which volume of a storage directory is located in a secondary directory. Usually such an index table only needs a few megabytes of space, and can be in the form of a group, which can be directly obtained by subscripting. Specifically, the index table records a primary directory named AB, and the secondary directory named CD is stored on the third logical volume of the first disk.

在该索引表中记录的该文件存储路径对应的存储磁盘上存储所述文件。 步骤 104: 当查找(调用) 某一文件时, 根据同样的预定义规则, 利用 文件 Hash值计算待查找文件的文件名和存储路径; The file is stored on a storage disk corresponding to the file storage path recorded in the index table. Step 104: When looking up (calling) a file, according to the same predefined rules, use The file hash value calculates the file name and storage path of the file to be searched;

比如, 在本发明一实施例中, 提取文件名的前四位, 得到该文件的一级 存储目录和二级存储目录。  For example, in an embodiment of the present invention, the first four digits of the file name are extracted, and the primary storage directory and the secondary storage directory of the file are obtained.

步骤 105: 根据计算得到的所述待查找文件的存储路径, 在索引表中找 到所述待查找文件对应的物理磁盘;  Step 105: Find a physical disk corresponding to the file to be searched in the index table according to the calculated storage path of the file to be searched;

步骤 106: 根据所述待查找文件的文件名, 在其存储路径对应的物理磁 盘中找到所述待查找文件。  Step 106: Find the file to be searched in the physical disk corresponding to the storage path according to the file name of the file to be searched.

这里, 之所以预先在索引表中记录所有可能的存储路径的实际存储位 置, 是为了加快存储和查找的速度。  Here, the actual storage location of all possible storage paths is recorded in the index table in advance in order to speed up the storage and lookup.

当扩展云存储系统的存储服务器时,将现有存储服务器中的部分目录迁 移到扩展的存储服务器上, 并同时更新索引表中的记录。  When expanding the storage server of the cloud storage system, some of the directories in the existing storage server are migrated to the extended storage server, and the records in the index table are also updated.

在实际操作过程中, 通常是一个存储服务器上携带多个存储磁盘。 当在 当前存储服务器上增加存储磁盘时,将现有存储磁盘上的部分目录拷贝到新 的存储磁盘。 当增加新的存储服务器时, 可以是将原有存储服务器上的部分 磁盘直接插入到新的存储服务器中; 虽然原有的存储服务器中还需要增加新 的存储磁盘, 还需要从存储服务器中剩下的存储磁盘拷贝到新增磁盘上, 但 拷贝。  In actual operation, usually one storage server carries multiple storage disks. When you add a storage disk to the current storage server, copy some of the directories on the existing storage disk to the new storage disk. When adding a new storage server, you can insert some of the disks on the original storage server directly into the new storage server. Although the original storage server needs to add new storage disks, you need to leave it from the storage server. Copy the storage disk to the new disk, but copy it.

本发明实施例提供的存储方法可用于海量数据存储。当利用这种方式存 储海量数据存储时, 由于是利用 hash值的文件名存储, 这样可以保证海量 数据的不重复存储。 另外, 当数据量足够大时, 根据 hash值计算文件的存 储路径, 又可以保证将数量数据均勾地存放在各存储服务器上, 保证系统的 存储均衡, 即使云存储系统的存储服务器无限扩展时, 利用该方式也可以高 效地管理文档的存储。 另外, 可以将索引表存储在网站服务器中, 这样当用 户需要查找一个文件时, 也可以快速地在海量服务器中查找到这个文件。  The storage method provided by the embodiment of the present invention can be used for mass data storage. When storing a large amount of data storage in this way, since the file name storage using the hash value is used, it is possible to ensure the non-repetitive storage of the massive data. In addition, when the amount of data is large enough, the storage path of the file is calculated according to the hash value, and the quantity data is stored on each storage server to ensure the storage balance of the system, even if the storage server of the cloud storage system is infinitely expanded. This way, you can also efficiently manage the storage of documents. In addition, the index table can be stored in the web server, so that when the user needs to find a file, the file can be quickly found in the mass server.

在本发明另一实施例中, 可以根据系统所需要支持的存储量级, 调整系 统的参数设置。 比如, 可以将文件的 Hash值转换为 10进制, 这种情况下, 在上一实施例其他参数不变的情况下, 系统理论上可以支持的二级目录数 为: 102*102=104。 又或者可以是将 Hash值的第一位作为一级目录, 第二三 四位作为二级目录, 同样在上一实施例其他参数不变的情况下, 系统理论上 可以支持的二级目录数依然为: 36*363=1679616。或者,也可以分三级存储, 比如, 将 Hash值的第一位作为一级目录, 第二三位作为二级目录, 将第四 位作为三级目录等。 总之, 本领域技术人员可以根据上次例子, 依据系统需 要, 自己配置系统的参数。 In another embodiment of the present invention, the parameter settings of the system can be adjusted according to the storage level that the system needs to support. For example, you can convert the hash value of a file to decimal, in which case In the case where the other parameters of the previous embodiment are unchanged, the number of secondary directories that the system can theoretically support is: 10 2 *10 2 =10 4 . Alternatively, the first bit of the hash value may be used as the primary directory, and the second and fourth digits may be used as the secondary directory. Similarly, in the case where the other parameters of the previous embodiment are unchanged, the number of secondary directories that the system can theoretically support may be Still: 36*36 3 =1679616. Alternatively, it may be stored in three levels, for example, the first bit of the hash value is used as the primary directory, the second three is used as the secondary directory, and the fourth is used as the tertiary directory. In summary, those skilled in the art can configure the parameters of the system according to the needs of the system according to the previous example.

图 2所示为本发明实施例提供的一种云存储装置的结构示意图。 如图 2 所示, 该云存储装置运行在具有处理器、 存储模块的装置上。 该装置包括: FIG. 2 is a schematic structural diagram of a cloud storage device according to an embodiment of the present invention. As shown in FIG. 2, the cloud storage device runs on a device having a processor and a storage module. The device includes:

Hash值计算模块, 用于根据预定义的 hash值算法, 计算文件的 Hash 值; a Hash value calculation module, configured to calculate a Hash value of the file according to a predefined hash value algorithm;

文件名计算模块, 用于根据 Hash值计算模块计算的文件的 Hash值,转 换为字符串作为文件名;  a file name calculation module, configured to calculate a Hash value of the file calculated by the module according to the Hash value, and convert the file into a string as a file name;

存储路径计算模块, 用于利用 Hash值计算模块计算的文件的 Hash值, 根据预定义的算法, 计算文件的存储路径;  a storage path calculation module, configured to calculate a Hash value of the file calculated by the Hash value calculation module, and calculate a storage path of the file according to a predefined algorithm;

索 )表模块,用于存储了所有可能的存储路径与存储磁盘实际位置的映 射关系表;  a table module for storing a mapping table of all possible storage paths and the actual location of the storage disk;

索引表查找模块, 用于在存储模块的调用下, 根据存储路径计算模块计 算出来的文件的存储路径,在索引表模块中查找所述文件的存储路径的实际 存储位置;  An index table searching module, configured to search, according to a storage module, a storage path of the file calculated by the storage path calculation module, and find an actual storage location of the storage path of the file in the index table module;

存储模块, 用于调用索引表查找模块, 将文件存储在索引表查找模块返 回的存储磁盘上存储所述文件。  The storage module is configured to invoke an index table lookup module, and store the file on a storage disk returned by the index table lookup module to store the file.

当查找 (调用 ) 某一文件时, Hash 值计算模块计算待查找的文件名, 文件名计算模块计算待查找文件的文件名,存储路径计算模块计算该待查找 文件的存储路径,索引表查找模块根据存储路径计算模块计算的待查找文件 的存储路径, 在索引表模块中找到所述待查找文件对应的物理磁盘, 此时, 该云存储装置进一步包括: 查找模块, 用于根据存储路径计算模块计算的待查找文件的存储路径, 调用索引表查找模块; 根据文件名计算模块计算出的待查找文件的文件名, 在其存储路径对应的物理磁盘中找到所述待查找文件。 When a file is searched (called), the Hash value calculation module calculates the file name to be searched, the file name calculation module calculates the file name of the file to be searched, and the storage path calculation module calculates the storage path of the file to be searched, and the index table search module And the physical storage disk corresponding to the file to be searched is found in the index table module, and the cloud storage device further includes: a search module, configured to calculate a storage path of the file to be searched according to the storage path calculation module, and call an index table to search for a module; and calculate a file name of the file to be searched according to the file name calculation module, and find the physical disk corresponding to the storage path. The file to be found.

以上所述仅为本发明的较佳实施例而已, 并不用以限制本发明, 凡在本 发明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在 本发明的保护范围之内。  The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are included in the spirit and scope of the present invention, should be included in the present invention. Within the scope of protection.

Claims

权利要求 Rights request 1、 一种云存储方法, 其特征在于, 包括: A cloud storage method, comprising: 计算文件的 Hash值, 将文件的 Hash值转换为字符串作为文件名; 根据预先定义的规则, 利用文件 Hash值计算文件的存储路径; 在索引表中查找所述文件的存储路径的实际存储位置,在所述实际存储 位置中存储所述文件; 其中, 所述索引表中已经预先存储了所有可能的存储 路径与存储磁盘实际位置的映射关系表。  Calculate the hash value of the file, convert the hash value of the file into a string as the file name; calculate the storage path of the file by using the file hash value according to a predefined rule; and find the actual storage location of the storage path of the file in the index table The file is stored in the actual storage location. The mapping table of all possible storage paths and the actual location of the storage disk has been pre-stored in the index table. 2、 如权利要求 1所述的方法, 其特征在于, 当查找一文件时, 进一步 包括:  2. The method according to claim 1, wherein when searching for a file, further comprising: 根据同样的预定义规则, 利用文件 Hash值计算待查找文件的文件名和 存储路径;  Calculate the file name and storage path of the file to be searched by using the file Hash value according to the same predefined rule; 根据计算得到的所述待查找文件的存储路径,在索引表中找到所述待查 找文件对应的物理磁盘;  And finding, according to the calculated storage path of the file to be searched, a physical disk corresponding to the file to be searched in the index table; 根据所述待查找文件的文件名,在其存储路径对应的物理磁盘中找到所 述待查找文件。  The file to be found is found in the physical disk corresponding to the storage path according to the file name of the file to be searched. 3、 如权利要求 1 或 2所述的方法, 其特征在于, 所述将文件的 Hash 值转换为字符串作为文件名包括:  3. The method according to claim 1 or 2, wherein the converting the Hash value of the file into a string as the file name comprises: 将文件的 Hash值转换为 10进制或 36进制字符串作为文件名。  Convert the Hash value of the file to a decimal or hex string as the file name. 4、 如权利要求 1或 2所述的方法, 其特征在于, 所述预定义的规则为: 文件的存储路径由二级目录构成。  The method according to claim 1 or 2, wherein the predefined rule is: The storage path of the file is composed of a secondary directory. 5、 如权利要求 4所述的方法, 其特征在于, 所述文件的存储路径由二 级目录构成包括:  5. The method according to claim 4, wherein the storage path of the file is composed of a secondary directory including: 直接将文件名的第一二位作为存储该文件的第一级目录,将文件名的第 三四位作为存储该文件的第二级目录。  The first two bits of the file name are directly used as the first level directory for storing the file, and the third and fourth bits of the file name are used as the second level directory for storing the file. 6、 一种云存储装置, 其特征在于, 包括:  6. A cloud storage device, comprising: 第一模块, 用于根据预定义的 hash值算法, 计算文件的 Hash值; 第二模块, 用于根据第一模块计算的文件的 Hash值, 转换为字符串作 为文件名; a first module, configured to calculate a hash value of the file according to a predefined hash value algorithm; a second module, configured to convert a hash value of the file calculated according to the first module into a string as a file name; 第三模块, 用于利用第一模块计算的文件的 Hash值, 根据预定义的算 法, 计算文件的存储路径;  a third module, configured to calculate a storage path of the file according to a predefined algorithm by using a hash value of the file calculated by the first module; 第四模块,用于存储了所有可能的存储路径与存储磁盘实际位置的映射 关系表;  The fourth module is configured to store a mapping table of all possible storage paths and actual locations of the storage disks; 第五模块, 用于根据第三模块计算出来的文件的存储路径, 在第四模块 中查找所述文件的存储路径的实际存储位置;  a fifth module, configured to search, according to a storage path of the file calculated by the third module, an actual storage location of the storage path of the file in the fourth module; 第六模块,用于将文件存储在第五模块查找到的存储磁盘上存储所述文 件。  And a sixth module, configured to store the file on a storage disk found by the fifth module to store the file. 7、 如权利要求 6所述的装置, 其特征在于, 进一步包括:  7. The device of claim 6, further comprising: 第七模块, 用于根据第三模块计算的待查找文件的存储路径, 调用第五 模块; 根据第二模块计算出的待查找文件的文件名, 在第五模块返回的存储 路径对应的物理磁盘中找到所述待查找文件。  a seventh module, configured to: according to the storage path of the file to be searched calculated by the third module, invoke the fifth module; according to the file name of the file to be searched calculated by the second module, the physical disk corresponding to the storage path returned by the fifth module Find the file to be found in .
PCT/CN2012/075841 2011-10-11 2012-05-22 Cloud storage method and device Ceased WO2013163832A1 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
US13/858,489 US20140181116A1 (en) 2011-10-11 2013-04-08 Method and device of cloud storage
US14/943,909 US20160112413A1 (en) 2011-10-11 2015-11-17 Method for controlling security of cloud storage
US15/055,373 US20160182638A1 (en) 2011-10-11 2016-02-26 Cloud serving system and cloud serving method
US15/594,374 US20170249093A1 (en) 2011-10-11 2017-05-12 Storage method and distributed storage system
US16/378,076 US20190235777A1 (en) 2011-10-11 2019-04-08 Redundant storage system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2012101329267A CN103384256A (en) 2012-05-02 2012-05-02 Cloud storage method and device
CN201210132926.7 2012-05-12

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/076516 Continuation WO2013170504A1 (en) 2011-10-11 2012-06-06 Large data storage system

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US13/271,165 Continuation US9176953B2 (en) 2008-06-04 2011-10-11 Method and system of web-based document service
US13/858,489 Continuation US20140181116A1 (en) 2011-10-11 2013-04-08 Method and device of cloud storage

Publications (1)

Publication Number Publication Date
WO2013163832A1 true WO2013163832A1 (en) 2013-11-07

Family

ID=49491950

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/075841 Ceased WO2013163832A1 (en) 2011-10-11 2012-05-22 Cloud storage method and device

Country Status (2)

Country Link
CN (1) CN103384256A (en)
WO (1) WO2013163832A1 (en)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182487A (en) * 2014-08-11 2014-12-03 浪潮软件股份有限公司 Unified storage method supporting various storage modes
CN104202428A (en) * 2014-09-25 2014-12-10 北京网秦天下科技有限公司 Distributed file storage system and method
CN105812427B (en) * 2014-12-31 2019-08-13 中国电信股份有限公司 File uploads and method for down loading, device and file server
US9684569B2 (en) * 2015-03-30 2017-06-20 Western Digital Technologies, Inc. Data deduplication using chunk files
CN105279258B (en) * 2015-10-21 2020-01-14 Tcl集团股份有限公司 File storage method and system with balanced distribution
CN105590064B (en) * 2015-12-14 2018-10-19 中国建设银行股份有限公司 Document handling method, document handling apparatus and file server
CN106250440B (en) * 2016-07-26 2019-07-09 金蝶软件(中国)有限公司 Document management method and device
CN106446001B (en) * 2016-07-29 2019-10-18 北京北信源软件股份有限公司 A kind of method and system of the storage file in computer storage medium
CN106776891A (en) * 2016-11-30 2017-05-31 山东浪潮商用系统有限公司 A kind of method and apparatus of file storage
CN106649858A (en) * 2016-12-30 2017-05-10 天津市测绘院 Personal geographic information operating method and device
CN106888119B (en) * 2017-02-15 2020-10-27 金钱猫科技股份有限公司 A method and system for obtaining terminal attributes
CN107562786A (en) * 2017-07-27 2018-01-09 平安科技(深圳)有限公司 File memory method, terminal and computer-readable recording medium
CN107612917B (en) * 2017-09-28 2020-03-13 山东恒云信息科技有限公司 Method for encrypting log storage by using 3DES encryption algorithm in cloud computing environment
CN107741968B (en) * 2017-10-09 2021-06-29 郑州云海信息技术有限公司 A file retrieval method, system, device and computer-readable storage medium
CN110019010B (en) * 2017-11-14 2023-06-13 阿里巴巴集团控股有限公司 Processing method, apparatus, device and machine readable medium
CN109582642A (en) * 2018-11-08 2019-04-05 网宿科技股份有限公司 File memory method, delet method, server and storage medium
CN111198882B (en) * 2019-12-26 2024-07-23 东软集团股份有限公司 Data processing method and device, storage medium and electronic equipment
CN111400251A (en) * 2020-03-17 2020-07-10 深圳市卡牛科技有限公司 File access method, device, server and storage medium based on gateway
CN113971162A (en) * 2020-07-22 2022-01-25 深圳市茁壮网络股份有限公司 Data access method and apparatus
CN113127421A (en) * 2021-04-01 2021-07-16 山东英信计算机技术有限公司 Method and equipment for searching file content in storage system
CN113254395A (en) * 2021-05-14 2021-08-13 杭州圆图网络技术有限公司 File remarking method based on hash algorithm and file management system
CN115964754B (en) * 2023-03-16 2023-05-23 长城数字能源(西安)科技有限公司 Big data secure storage method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020135801A1 (en) * 2000-12-08 2002-09-26 Gary Tessman Distributed image storage architecture
CN1614591A (en) * 2004-12-02 2005-05-11 中国科学院计算技术研究所 Method for organizing and accessing distributive catalogue of document system
CN101576854A (en) * 2009-04-03 2009-11-11 成都市华为赛门铁克科技有限公司 File access method, device and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7412449B2 (en) * 2003-05-23 2008-08-12 Sap Aktiengesellschaft File object storage and retrieval using hashing techniques
CN101072222A (en) * 2006-05-12 2007-11-14 腾讯科技(深圳)有限公司 Picture tracking-browsing system and method based on point-to-point technology
CN100486206C (en) * 2006-08-22 2009-05-06 中国科学院声学研究所 Signaling control method for P2P network sharing service based on IMS
CN100499463C (en) * 2007-01-12 2009-06-10 北京时代亮点科技发展有限公司 Peer-to-peer network transmission method facing moving terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020135801A1 (en) * 2000-12-08 2002-09-26 Gary Tessman Distributed image storage architecture
CN1614591A (en) * 2004-12-02 2005-05-11 中国科学院计算技术研究所 Method for organizing and accessing distributive catalogue of document system
CN101576854A (en) * 2009-04-03 2009-11-11 成都市华为赛门铁克科技有限公司 File access method, device and system

Also Published As

Publication number Publication date
CN103384256A (en) 2013-11-06

Similar Documents

Publication Publication Date Title
WO2013163832A1 (en) Cloud storage method and device
JP6644960B1 (en) Method and system for restoring archived data containers on object-based storage
JP6122038B2 (en) Fragmentation control to perform deduplication operations
CN106484820B (en) A renaming method, access method and device
CN105027069B (en) Deduplication of volume regions
CN103002027B (en) Data-storage system and the method for tree directory structure is realized based on key-value pair system
WO2014101583A1 (en) Method, apparatus, and electronic device for building a file system in a key value storage system
US11681653B2 (en) Namespace representation and enhanced browsability for replicated file systems
US9128944B2 (en) File system enabling fast purges and file access
JP6506374B2 (en) Cache management
JP2015512551A (en) A consistent ring namespace that facilitates data storage and organization in network infrastructure
CN103229173A (en) Metadata management method and system
WO2010099715A1 (en) Method, system, client and data server for data operation
CN103345472A (en) Redundancy removal file system based on limited binary tree bloom filter and construction method of redundancy removal file system
JP2015510174A (en) Location independent files
CN103064906A (en) File management method and device
CN105981033A (en) Assign placement policy to segment set
CN106570113A (en) Cloud storage method and system for mass vector slice data
CN108540510B (en) A cloud host creation method, device and cloud service system
CN101114296A (en) Method and apparatus for managing licenses
WO2015055035A1 (en) Method and device for hashing metadata object
CN114327285A (en) Data storage method, device, device and storage medium
CN103744882B (en) A kind of browse film segment table based on key-value pair shows method and device
CN103902577A (en) Method and system for searching and locating resources
CN114676096A (en) Index storage method, file search method, apparatus, electronic device and medium

Legal Events

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

Ref document number: 12875880

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12875880

Country of ref document: EP

Kind code of ref document: A1