CN111541753A - Distributed storage system, method, computer device and medium for block chain data - Google Patents
Distributed storage system, method, computer device and medium for block chain data Download PDFInfo
- Publication number
- CN111541753A CN111541753A CN202010301043.9A CN202010301043A CN111541753A CN 111541753 A CN111541753 A CN 111541753A CN 202010301043 A CN202010301043 A CN 202010301043A CN 111541753 A CN111541753 A CN 111541753A
- Authority
- CN
- China
- Prior art keywords
- file
- node
- blockchain
- data
- target cache
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Finance (AREA)
- Accounting & Taxation (AREA)
- Development Economics (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明提供了一种区块链数据的分布式存储系统、方法、计算机设备及介质,所述方法能够响应于接收到的文件存储请求,调用区块链网络中的交易合约对所述文件存储请求进行校验,以便结合区块链中的校验逻辑使数据的存储更加安全可靠,当所述文件存储请求通过校验时,将待存储文件写入所述目标缓存节点,有效提升了区块链系统的吞吐量,响应于所述文件系统将第一数量的数据块及第二数量的校验块写入第一条带节点,记录存储的文件的元数据信息,其中,所述数据块及所述校验块是对选择的目标缓存节点上的文件进行条带化处理后执行RS编码而得到,由于单独记录了元数据信息,解决了资源放大问题,并保证记录的元数据信息的有效性。
The present invention provides a distributed storage system, method, computer equipment and medium for blockchain data. The method can respond to a received file storage request and call a transaction contract in a blockchain network to store the file. Request for verification, in order to combine the verification logic in the blockchain to make data storage more secure and reliable, when the file storage request passes verification, the file to be stored is written to the target cache node, effectively improving the area The throughput of the blockchain system, in response to the file system writing the first number of data blocks and the second number of check blocks to the first stripe node, recording metadata information of the stored file, wherein the data The block and the check block are obtained by striping the file on the selected target cache node and then performing RS encoding. Since the metadata information is separately recorded, the problem of resource amplification is solved, and the recorded metadata information is guaranteed. effectiveness.
Description
技术领域technical field
本发明涉及区块链技术领域,尤其涉及区块链数据的分布式存储系统、方法、计算机设备及介质。The present invention relates to the technical field of blockchain, and in particular, to a distributed storage system, method, computer equipment and medium for blockchain data.
背景技术Background technique
目前,区块链(Block Chain)网络中的数据存储通常采用直接将数据上链的方式,所有数据都保存在区块链的各个节点上,不仅耗费了大量的存储空间,且存储成本也较高。而随着存储量级的不断提升,区块链网络的性能也会随之降低,无法支持海量大文件的数据存储。At present, the data storage in the block chain network usually adopts the method of directly uploading the data to the chain. All data is stored on each node of the block chain, which not only consumes a lot of storage space, but also costs more. high. With the continuous improvement of the storage level, the performance of the blockchain network will also decrease, and it cannot support the data storage of massive and large files.
另外,由于将数据都存储在区块链节点上,不支持对文件的操作进行权限控制,数据的安全性也较低,还会导致严重的读写放大、存储资源放大问题。In addition, because the data is stored on the blockchain nodes, it does not support permission control for file operations, and the security of the data is also low, which will also lead to serious problems of read-write amplification and storage resource amplification.
发明内容SUMMARY OF THE INVENTION
本发明的主要目的在于提供区块链数据的分布式存储系统、方法、计算机设备及介质,能够基于缓存节点及条带节点实现对区块链网络中数据的分布式存储,有效提升了区块链系统的吞吐量及写入性能,且由于结合了区块链中的校验逻辑,使数据的存储更加安全可靠,能够避免存储的数据被恶意篡改。The main purpose of the present invention is to provide a distributed storage system, method, computer equipment and medium for blockchain data, which can realize distributed storage of data in the blockchain network based on cache nodes and stripe nodes, and effectively improve the block chain. The throughput and writing performance of the chain system, and because of the combination of the verification logic in the blockchain, the storage of data is more secure and reliable, which can avoid malicious tampering of the stored data.
为实现上述目的,本发明提供一种区块链数据的分布式存储系统,所述区块链数据的分布式存储系统包括区块链节点及文件系统;To achieve the above object, the present invention provides a distributed storage system for blockchain data, wherein the distributed storage system for blockchain data includes a blockchain node and a file system;
所述区块链节点,用于响应于接收到的文件存储请求,调用区块链网络中的交易合约对所述文件存储请求进行校验;The blockchain node is configured to, in response to the received file storage request, call a transaction contract in the blockchain network to verify the file storage request;
所述区块链节点,还用于当所述文件存储请求通过校验时,将待存储文件发送至所述文件系统;The blockchain node is further configured to send the file to be stored to the file system when the file storage request passes the verification;
所述文件系统,用于选择目标缓存节点,并将所述待存储文件暂存至所述目标缓存节点;the file system, configured to select a target cache node, and temporarily store the to-be-stored file to the target cache node;
所述文件系统,还用于对所述目标缓存节点上的文件进行条带化处理;The file system is further used for striping the files on the target cache node;
所述文件系统,还用于对条带化处理后的文件执行RS编码,得到第一数量的数据块及第二数量的校验块,并将所述数据块及所述校验块写入第一条带节点;The file system is further configured to perform RS encoding on the striped file to obtain a first number of data blocks and a second number of check blocks, and write the data blocks and the check blocks into first strip node;
所述区块链节点,还用于记录存储的文件的元数据信息。The blockchain node is also used to record the metadata information of the stored file.
根据本发明优选实施例,所述文件系统选择目标缓存节点包括:According to a preferred embodiment of the present invention, the file system selecting a target cache node includes:
从多个缓存节点中确定当前未被调用的节点;Determine the node that is not currently called from multiple cache nodes;
将所述当前未被调用的节点中剩余容量最大的节点确定为所述目标缓存节点。A node with the largest remaining capacity among the nodes that have not been called at present is determined as the target cache node.
根据本发明优选实施例,每个缓存节点包括至少一个备选节点,所述文件系统,还用于:According to a preferred embodiment of the present invention, each cache node includes at least one candidate node, and the file system is further configured to:
当所述目标缓存节点异常时,从所述目标缓存节点的备选节点中选择一个节点代替所述目标缓存节点;或者When the target cache node is abnormal, select a node from the candidate nodes of the target cache node to replace the target cache node; or
当在所述目标缓存节点及所述目标缓存节点的备选节点中剩余一个节点服务时,禁止向剩余的节点写入数据。When the target cache node and the candidate nodes of the target cache node remain to serve one node, writing data to the remaining nodes is prohibited.
根据本发明优选实施例,当所述目标缓存节点中的文件向条带节点写入完成时,所述文件系统,还用于:According to a preferred embodiment of the present invention, when the file in the target cache node is written to the stripe node, the file system is further configured to:
当检测到所述目标缓存节点中的文件当前未被访问时,删除所述目标缓存节点中的文件;或者When it is detected that the file in the target cache node is not currently accessed, delete the file in the target cache node; or
当检测到所述目标缓存节点中的文件正在被访问时,基于分布式锁服务对所述目标缓存节点进行加锁,并禁止删除所述目标缓存节点中的文件。When it is detected that the file in the target cache node is being accessed, the target cache node is locked based on the distributed lock service, and deletion of the file in the target cache node is prohibited.
根据本发明优选实施例,所述文件系统,还用于:According to a preferred embodiment of the present invention, the file system is further used for:
当所述第一条带节点被写满,且存在剩余数据块及/或校验块未被写入时,申请第二条带节点存储所述剩余数据块及/或校验块。When the first stripe node is full and there are remaining data blocks and/or check blocks that have not been written, apply for a second stripe node to store the remaining data blocks and/or check blocks.
为实现上述目的,本发明还提供一种区块链数据的分布式存储方法,应用于区块链节点,所述区块链节点与文件系统相通信,所述区块链数据的分布式存储方法包括:In order to achieve the above object, the present invention also provides a distributed storage method for blockchain data, which is applied to a blockchain node, the blockchain node communicates with a file system, and the distributed storage method of the blockchain data is Methods include:
响应于接收到的文件存储请求,调用区块链网络中的交易合约对所述文件存储请求进行校验;In response to the received file storage request, call the transaction contract in the blockchain network to verify the file storage request;
当所述文件存储请求通过校验时,将待存储文件发送至所述文件系统;When the file storage request passes the verification, sending the file to be stored to the file system;
响应于所述文件系统将第一数量的数据块及第二数量的校验块写入第一条带节点,记录存储的文件的元数据信息,其中,所述数据块及所述校验块是对选择的目标缓存节点上的文件进行条带化处理后执行RS编码而得到。In response to the file system writing the first number of data blocks and the second number of check blocks into the first stripe node, record metadata information of the stored file, wherein the data blocks and the check blocks It is obtained by striping the file on the selected target cache node and then performing RS encoding.
根据本发明优选实施例,所述区块链数据的分布式存储方法还包括:According to a preferred embodiment of the present invention, the distributed storage method for blockchain data further includes:
响应于接收到的文件删除请求,调用所述区块链网络中的交易合约对所述文件删除请求进行校验;In response to the received file deletion request, call the transaction contract in the blockchain network to verify the file deletion request;
当所述文件删除请求通过校验时,调取待删除文件对应的元数据信息;When the file deletion request passes the verification, retrieve the metadata information corresponding to the file to be deleted;
从调取的元数据信息中获取所述待删除文件的存储位置;Obtain the storage location of the to-be-deleted file from the retrieved metadata information;
当检测到所述待删除文件存储于缓存节点时,请求所述文件系统从检测到的缓存节点中删除所述待删除文件,或者当检测到所述待删除文件存储于条带节点时,请求所述文件系统在检测到的条带节点中将所述待删除文件标记为删除状态;When detecting that the to-be-deleted file is stored in a cache node, request the file system to delete the to-be-deleted file from the detected cache node, or when detecting that the to-be-deleted file is stored in a stripe node, request The file system marks the to-be-deleted file as a deleted state in the detected stripe node;
更新调取的元数据信息。Update the retrieved metadata information.
根据本发明优选实施例,所述区块链数据的分布式存储方法还包括:According to a preferred embodiment of the present invention, the distributed storage method for blockchain data further includes:
响应于接收到的文件下载请求,调用所述区块链网络中的交易合约对所述文件下载请求进行校验;In response to the received file download request, call the transaction contract in the blockchain network to verify the file download request;
当所述文件下载请求通过校验时,调取待下载文件对应的元数据信息;When the file download request passes the verification, retrieve the metadata information corresponding to the file to be downloaded;
从调取的元数据信息中获取所述待下载文件的存储位置;Obtain the storage location of the to-be-downloaded file from the retrieved metadata information;
从调取的存储位置上读取所述待下载文件。The file to be downloaded is read from the recalled storage location.
根据本发明优选实施例,所述区块链数据的分布式存储方法还包括:According to a preferred embodiment of the present invention, the distributed storage method for blockchain data further includes:
响应于接收到的文件恢复请求,从条带节点中获取待恢复文件的未丢失数据块及/或校验块;In response to the received file recovery request, obtain the non-missing data blocks and/or check blocks of the file to be recovered from the stripe node;
对所述未丢失数据块及/或校验块进行RS解码,得到待恢复文件的原始文件。Perform RS decoding on the non-missing data blocks and/or check blocks to obtain the original file of the file to be restored.
为实现上述目的,本发明还提供一种区块链数据的分布式存储装置,运行于区块链节点,所述区块链节点与文件系统相通信,所述区块链数据的分布式存储装置包括:In order to achieve the above purpose, the present invention also provides a distributed storage device for blockchain data, which runs on a blockchain node, the blockchain node communicates with the file system, and the distributed storage of the blockchain data The device includes:
校验单元,用于响应于接收到的文件存储请求,调用区块链网络中的交易合约对所述文件存储请求进行校验;a verification unit, used for invoking the transaction contract in the blockchain network to verify the file storage request in response to the received file storage request;
发送单元,用于当所述文件存储请求通过校验时,将待存储文件发送至所述文件系统;a sending unit, configured to send the file to be stored to the file system when the file storage request passes the verification;
记录单元,用于响应于所述文件系统将第一数量的数据块及第二数量的校验块写入第一条带节点,记录存储的文件的元数据信息,其中,所述数据块及所述校验块是对选择的目标缓存节点上的文件进行条带化处理后执行RS编码而得到。a recording unit, configured to record the metadata information of the stored file in response to the file system writing the first number of data blocks and the second number of check blocks into the first stripe node, wherein the data blocks and The check block is obtained by performing the RS encoding after striping the file on the selected target cache node.
根据本发明优选实施例,所述校验单元,还用于响应于接收到的文件删除请求,调用所述区块链网络中的交易合约对所述文件删除请求进行校验;According to a preferred embodiment of the present invention, the verification unit is further configured to, in response to the received file deletion request, call a transaction contract in the blockchain network to verify the file deletion request;
所述区块链数据的分布式存储装置还包括:The distributed storage device for the blockchain data also includes:
调取单元,用于当所述文件删除请求通过校验时,调取待删除文件对应的元数据信息;a retrieval unit, configured to retrieve the metadata information corresponding to the file to be deleted when the file deletion request passes the verification;
获取单元,用于从调取的元数据信息中获取所述待删除文件的存储位置;an obtaining unit, configured to obtain the storage location of the to-be-deleted file from the retrieved metadata information;
请求单元,用于当检测到所述待删除文件存储于缓存节点时,请求所述文件系统从检测到的缓存节点中删除所述待删除文件,或者当检测到所述待删除文件存储于条带节点时,请求所述文件系统在检测到的条带节点中将所述待删除文件标记为删除状态;The requesting unit is configured to request the file system to delete the to-be-deleted file from the detected cache node when it is detected that the to-be-deleted file is stored in the cache node, or to request the file system to delete the to-be-deleted file when it is detected that the to-be-deleted file is stored in the cache node When stripping nodes, requesting the file system to mark the to-be-deleted file in the detected stripe node as a deleted state;
更新单元,用于更新调取的元数据信息。The update unit is used to update the retrieved metadata information.
根据本发明优选实施例,所述校验单元,还用于响应于接收到的文件下载请求,调用所述区块链网络中的交易合约对所述文件下载请求进行校验;According to a preferred embodiment of the present invention, the verification unit is further configured to, in response to the received file download request, call a transaction contract in the blockchain network to verify the file download request;
所述调取单元,还用于当所述文件下载请求通过校验时,调取待下载文件对应的元数据信息;The retrieval unit is further configured to retrieve the metadata information corresponding to the file to be downloaded when the file download request passes the verification;
所述获取单元,还用于从调取的元数据信息中获取所述待下载文件的存储位置;The obtaining unit is further configured to obtain the storage location of the to-be-downloaded file from the retrieved metadata information;
所述区块链数据的分布式存储装置还包括:The distributed storage device for the blockchain data also includes:
读取单元,用于从调取的存储位置上读取所述待下载文件。A reading unit, configured to read the to-be-downloaded file from the recalled storage location.
根据本发明优选实施例,所述获取单元,还用于响应于接收到的文件恢复请求,从条带节点中获取待恢复文件的未丢失数据块及/或校验块;According to a preferred embodiment of the present invention, the obtaining unit is further configured to, in response to the received file restoration request, obtain the non-missing data blocks and/or check blocks of the file to be restored from the stripe node;
所述区块链数据的分布式存储装置还包括:The distributed storage device for the blockchain data also includes:
解码单元,用于对所述未丢失数据块及/或校验块进行RS解码,得到待恢复文件的原始文件。A decoding unit, configured to perform RS decoding on the non-missing data blocks and/or check blocks to obtain the original file of the file to be restored.
为实现上述目的,本发明进一步提供一种计算机设备,所述计算机设备包括:In order to achieve the above object, the present invention further provides a computer device, the computer device includes:
存储器,存储至少一个指令;及a memory that stores at least one instruction; and
处理器,执行所述存储器中存储的指令以实现所述区块链数据的分布式存储方法。The processor executes the instructions stored in the memory to implement the distributed storage method of the blockchain data.
为实现上述目的,本发明进一步提供一种计算机可读存储介质,所述计算机可读存储介质上存储有区块链数据的分布式存储程序,所述区块链数据的分布式存储程序可被一个或者多个处理器执行,以实现所述区块链数据的分布式存储方法。In order to achieve the above object, the present invention further provides a computer-readable storage medium, on which a distributed storage program of blockchain data is stored, and the distributed storage program of blockchain data can be One or more processors execute to implement the distributed storage method of the blockchain data.
综上所述,本发明能够响应于接收到的文件存储请求,调用区块链网络中的交易合约对所述文件存储请求进行校验,以便结合区块链中的校验逻辑使数据的存储更加安全可靠,当所述文件存储请求通过校验时,将待存储文件写入所述目标缓存节点,有效提升了区块链系统的吞吐量,响应于所述文件系统将第一数量的数据块及第二数量的校验块写入第一条带节点,记录存储的文件的元数据信息,其中,所述数据块及所述校验块是对选择的目标缓存节点上的文件进行条带化处理后执行RS编码而得到,由于单独记录了元数据信息,解决了资源放大问题,并保证记录的元数据信息的有效性。To sum up, the present invention can call the transaction contract in the blockchain network to verify the file storage request in response to the received file storage request, so as to combine the verification logic in the blockchain to store the data It is more secure and reliable. When the file storage request passes the verification, the file to be stored is written to the target cache node, which effectively improves the throughput of the blockchain system. In response to the file system, the first amount of data The block and the second number of check blocks are written into the first stripe node, and the metadata information of the stored file is recorded, wherein the data block and the check block are for striping the file on the selected target cache node. It is obtained by performing RS coding after the banding process. Since the metadata information is separately recorded, the problem of resource amplification is solved, and the validity of the recorded metadata information is guaranteed.
附图说明Description of drawings
图1为本发明一实施例的流程示意图;1 is a schematic flowchart of an embodiment of the present invention;
图2为本发明另一实施例的流程示意图;2 is a schematic flowchart of another embodiment of the present invention;
图3为本发明一实施例揭露的计算机设备的内部结构示意图;3 is a schematic diagram of an internal structure of a computer device disclosed in an embodiment of the present invention;
图4为本发明区块链数据的分布式存储装置的功能模块示意图。FIG. 4 is a schematic diagram of functional modules of a distributed storage device for blockchain data according to the present invention.
主要元件符号说明Description of main component symbols
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、系统、方法、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are only used for For descriptive purposes, it should not be understood as indicating or implying their relative importance or implying the number of technical features indicated. Thus, features delimited with "first" and "second" may expressly or implicitly include at least one of the features and are not necessarily used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, system, method, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.
另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本发明要求的保护范围之内。In addition, the technical solutions between the various embodiments can be combined with each other, but must be based on the realization by those of ordinary skill in the art. When the combination of technical solutions is contradictory or cannot be realized, it should be considered that the combination of such technical solutions does not exist. , is not within the scope of protection required by the present invention.
本发明提供一种区块链数据的分布式存储系统。The present invention provides a distributed storage system for blockchain data.
参照图1,为本发明一实施例的流程示意图。根据不同的需求,该流程示意图中步骤的顺序可以改变,某些步骤可以省略。Referring to FIG. 1 , it is a schematic flowchart of an embodiment of the present invention. According to different requirements, the sequence of the steps in this schematic flowchart can be changed, and some steps can be omitted.
在一实施例中,所述区块链数据的分布式存储系统包括区块链节点及文件系统:In one embodiment, the distributed storage system for blockchain data includes a blockchain node and a file system:
S10,所述区块链节点响应于接收到的文件存储请求,调用区块链网络中的交易合约对所述文件存储请求进行校验。S10: In response to the received file storage request, the blockchain node invokes a transaction contract in the blockchain network to verify the file storage request.
在本发明的至少一个实施例中,以交易哈希作为校验的依据。In at least one embodiment of the present invention, the transaction hash is used as the verification basis.
举例来说,所述区块链节点将所述文件存储请求中的哈希值与所述区块链网络中的交易哈希进行匹配,当匹配成功时,所述区块链节点确定所述文件存储请求通过校验,并执行所述文件存储请求;当匹配失败时,所述区块链节点确定所述文件存储请求未通过校验,不执行所述文件存储请求。For example, the blockchain node matches the hash value in the file storage request with the transaction hash in the blockchain network, and when the matching is successful, the blockchain node determines the The file storage request passes the verification and executes the file storage request; when the matching fails, the blockchain node determines that the file storage request fails the verification, and does not execute the file storage request.
通过上述实施方式,能够结合区块链中的校验逻辑使数据的存储更加安全可靠。Through the above-mentioned embodiments, data storage can be made more secure and reliable in combination with the verification logic in the blockchain.
S11,当所述文件存储请求通过校验时,所述区块链节点将待存储文件发送至所述文件系统。S11, when the file storage request passes the verification, the blockchain node sends the file to be stored to the file system.
举例来说,所述文件系统可以是包含操作系统的文件存储系统,操作系统用于明确存储设备或分区上的文件的方法和数据结构,即在存储设备上组织文件,操作系统中负责管理和存储文件信息的软件机构可称为文件管理系统。For example, the file system may be a file storage system including an operating system, the operating system is used to specify the method and data structure of files on the storage device or partition, that is, organize files on the storage device, and the operating system is responsible for managing and A software organization that stores file information may be referred to as a file management system.
S12,所述文件系统选择目标缓存节点,并将所述待存储文件暂存至所述目标缓存节点。S12, the file system selects a target cache node, and temporarily stores the to-be-stored file to the target cache node.
文件系统可以包括多个缓存节点和多个条带节点,用于实现文件存储功能,目标缓存节点是上述多个缓存节点中的其中一个。The file system may include multiple cache nodes and multiple stripe nodes for implementing a file storage function, and the target cache node is one of the multiple cache nodes.
在本发明的至少一个实施例中,所述缓存节点(Cache Node)用于暂时存储所述区块链网络中的数据,通过所述缓存节点的配置,能够有效提升区块链系统的吞吐量。In at least one embodiment of the present invention, the cache node (Cache Node) is used to temporarily store data in the blockchain network, and the configuration of the cache node can effectively improve the throughput of the blockchain system .
在本实施例中,由于缓存节点的读写要求较高,因此,优选的可以为所述缓存节点配备读写性能更佳的固态硬盘(Solid State Drive,SSD),所述固态硬盘相较于机械硬盘的读写速度更快、防震抗摔能力更高,且功耗低、无噪音,工作温度范围也更广。In this embodiment, since the cache node has high read and write requirements, it is preferable to equip the cache node with a solid state drive (Solid State Drive, SSD) with better read and write performance. Mechanical hard drives have faster read and write speeds, higher shock and drop resistance, low power consumption, no noise, and a wider operating temperature range.
在本发明的至少一个实施例中,所述文件系统从所述缓存节点中选择所述目标缓存节点存储文件包括:In at least one embodiment of the present invention, the file system selecting the target cache node to store the file from the cache nodes includes:
所述文件系统从多个缓存节点中确定当前未被调用的节点,并将所述当前未被调用的节点中剩余容量最大的节点确定为所述目标缓存节点。The file system determines a node that is not currently called from a plurality of cache nodes, and determines a node with the largest remaining capacity among the nodes that is not currently called as the target cache node.
可以理解的是,一个缓存节点无法被同时调用,因此,所述文件系统首先从多个缓存节点中确定当前未被调用的节点,并进一步将所述当前未被调用的节点中剩余容量最大的节点确定为所述目标缓存节点,进而从可被调用的所有节点中选择性能最优的节点进行数据存储。It can be understood that a cache node cannot be called at the same time, therefore, the file system first determines the node that is not currently called from the multiple cache nodes, and further selects the node with the largest remaining capacity among the nodes that are not currently called. The node is determined as the target cache node, and then the node with the best performance is selected from all the nodes that can be called for data storage.
在本发明的至少一个实施例中,每个缓存节点包括至少一个备选节点,所述文件系统,还用于:In at least one embodiment of the present invention, each cache node includes at least one candidate node, and the file system is further configured to:
(1)当所述目标缓存节点异常时,所述文件系统从所述目标缓存节点的备选节点中选择一个节点代替所述目标缓存节点。(1) When the target cache node is abnormal, the file system selects a node from the candidate nodes of the target cache node to replace the target cache node.
通过上述实施方式,能够在一个节点出现异常无法服务时,以备选节点代替异常的节点继续服务,有效解决了系统的单点宕机问题,提升了系统的稳定性。Through the above-mentioned embodiments, when a node fails to serve abnormally, an alternative node can be used to replace the abnormal node to continue the service, which effectively solves the single-point downtime problem of the system and improves the stability of the system.
(2)当在所述目标缓存节点及所述目标缓存节点的备选节点中剩余一个节点服务时,所述文件系统禁止向剩余的节点写入数据。(2) When the target cache node and the candidate nodes of the target cache node are left to serve one node, the file system prohibits writing data to the remaining nodes.
可以理解的是,当某一组缓存节点中的主节点或备用节点发生宕机,并且只剩余一个节点进行服务时,单节点存储的数据安全无法得到保障,因此该组缓存节点将不再提供写入功能,仅提供文件读支持,以保证数据的安全性。It is understandable that when the master node or standby node in a group of cache nodes goes down and only one node remains to serve, the data security of single-node storage cannot be guaranteed, so this group of cache nodes will no longer provide Write function, only provide file read support to ensure data security.
S13,所述文件系统对所述目标缓存节点上的文件进行条带化处理。S13, the file system performs striping processing on the file on the target cache node.
当多个进程同时访问一个磁盘时,可能会出现磁盘冲突。条带化处理就是一种自动的将I/O的负载均衡到多个物理磁盘上的过程,条带化处理就是将一块连续的数据分成很多小部分,并把他们分别存储到不同磁盘上去。这就能使多个进程同时访问数据的多个不同部分而不会造成磁盘冲突,而且在需要对这种数据进行顺序访问时,可以获得最大程度上的I/O并行能力,从而获得更好的性能。Disk conflicts can occur when multiple processes access a disk at the same time. Striping is a process of automatically balancing the I/O load to multiple physical disks. Striping is to divide a continuous piece of data into many small parts and store them on different disks. This enables multiple processes to simultaneously access different parts of the data without causing disk conflicts, and when sequential access to such data is required, maximum I/O parallelism can be achieved, resulting in better performance.
S14,所述文件系统对条带化处理后的文件执行RS(Reed-Solomon codes)编码,得到第一数量的数据块及第二数量的校验块,并将所述数据块及所述校验块写入第一条带节点(Stripe Node)。S14, the file system performs RS (Reed-Solomon codes) encoding on the striped file to obtain a first number of data blocks and a second number of check blocks, and encodes the data blocks and the check blocks. The verification block is written to the first stripe node.
其中,所述第一数量及所述第二数量可以根据实际需求进行配置,例如:所述第一数量可以为9,所述第二数量可以为3。The first number and the second number may be configured according to actual requirements, for example, the first number may be 9, and the second number may be 3.
进一步地,每个数据块的大小及每个校验块的大小也可以根据实际需求进行配置。例如:每个数据块可以为16M,每个校验块也为16M。Further, the size of each data block and the size of each check block can also be configured according to actual requirements. For example: each data block can be 16M, and each check block is also 16M.
在本发明的至少一个实施例中,所述RS编码是一种前向纠错的信道编码,对由校正过采样数据所产生的多项式有效。当正确的收到足够的数据后,就可以根据接收的数据恢复原来的数据,即使接收到的数据有很多点被噪声干扰失真也不影响数据恢复,是一种低成本的数据处理模式。In at least one embodiment of the present invention, the RS coding is a forward error correction channel coding valid for polynomials generated by correcting oversampled data. When enough data is received correctly, the original data can be recovered according to the received data. Even if the received data is disturbed and distorted by many points of noise, it will not affect the data recovery. It is a low-cost data processing mode.
在本实施例中,所述第一条带节点可以是当前正在服务的未被写满的条带节点,可以是文件系统中多个条带节点中的其中一个。In this embodiment, the first stripe node may be a currently serving stripe node that is not full, and may be one of multiple stripe nodes in the file system.
当多个进程同时访问一个磁盘时,可能会出现磁盘冲突。而在条带化(striping)的存储模式中,自动的将I/O(Input/Output,输入/输出)的负载均衡到多个物理磁盘上,将一块连续的数据分成很多小部分,并把他们分别存储到不同磁盘上去(优先存储在不同机器的不同磁盘上,其次也可以存储在相同机器的不同磁盘上),使多个进程同时访问数据的多个不同部分,而不会造成磁盘冲突,而且,在需要对数据进行顺序访问时,可以获得最大程度上的I/O并行能力,提升了访问性能。Disk conflicts can occur when multiple processes access a disk at the same time. In the striping storage mode, the I/O (Input/Output, input/output) load is automatically balanced to multiple physical disks, a continuous piece of data is divided into many small parts, and the They are stored on different disks (preferably on different disks on different machines, and secondly on different disks on the same machine), so that multiple processes can access multiple different parts of the data at the same time without causing disk conflicts. , and, when sequential access to data is required, the I/O parallelism to the greatest extent can be obtained, which improves the access performance.
另外,由于数据被分块存储在不同位置,因此数据同时损坏的可能性非常低,后续也就可以利用未损坏的数据基于RS解码进行数据恢复,提升了数据的可恢复能力。In addition, because the data is stored in different blocks in different locations, the possibility of simultaneous damage to the data is very low, and the undamaged data can be used for subsequent data recovery based on RS decoding, which improves the recoverability of the data.
而且,由于系统中数据的inode索引存在上限,而在条带化的存储模式中,小文件会合并成固定大小的条带进行存储,因此提升了写入性能,并避免了inode索引溢出。Moreover, since there is an upper limit on the inode index of data in the system, in the striped storage mode, small files are merged into fixed-size stripes for storage, which improves write performance and avoids inode index overflow.
S15,所述区块链节点记录存储的文件的元数据信息。S15, the blockchain node records the metadata information of the stored file.
在本发明的至少一个实施例中,所述文件系统,还用于:In at least one embodiment of the present invention, the file system is further used for:
当所述第一条带节点被写满,且存在剩余数据块及/或校验块未被写入时,申请第二条带节点存储所述剩余数据块及/或校验块。When the first stripe node is full and there are remaining data blocks and/or check blocks that have not been written, apply for a second stripe node to store the remaining data blocks and/or check blocks.
需要说明的是,在条带化的存储模式中,同一时刻只存在一个未被写满的条带节点,当该条带节点被写满时,才能向中央控制器申请第二条带节点进行服务。It should be noted that in the striped storage mode, there is only one stripe node that is not full at the same time. When the stripe node is full, it can apply to the central controller for a second stripe node. Serve.
本实施例能够在第一条带节点被写满时及时申请第二条带节点,以实现对数据的正常存储。This embodiment can apply for a second stripe node in time when the first stripe node is full, so as to realize normal storage of data.
在本发明的至少一个实施例中,当所述目标缓存节点中的文件向条带节点写入完成时,所述文件系统,还用于:In at least one embodiment of the present invention, when the file in the target cache node is written to the stripe node, the file system is further configured to:
(1)当检测到所述目标缓存节点中的文件当前未被访问时,删除所述目标缓存节点中的文件。(1) When it is detected that the file in the target cache node is not currently accessed, delete the file in the target cache node.
通过上述实施方式,能够在所述目标缓存节点中的文件被成功写入条带节点后,及时删除所述目标缓存节点中的文件,以释放所述目标缓存节点的存储空间。Through the above implementation, after the file in the target cache node is successfully written to the stripe node, the file in the target cache node can be deleted in time to release the storage space of the target cache node.
(2)当检测到所述目标缓存节点中的文件正在被访问时,基于分布式锁服务对所述目标缓存节点进行加锁,并禁止删除所述目标缓存节点中的文件。(2) When it is detected that the file in the target cache node is being accessed, the target cache node is locked based on the distributed lock service, and the deletion of the file in the target cache node is prohibited.
通过上述实施方式,能够有效避免在数据被访问时由于删除数据导致的访问异常。Through the above-mentioned embodiments, it is possible to effectively avoid access abnormality caused by deleting data when data is accessed.
在本发明的至少一个实施例中,当正在写入数据的条带节点异常时,及时报警,以避免上游数据的无效写入。In at least one embodiment of the present invention, when a stripe node that is writing data is abnormal, an alarm is issued in time to avoid invalid writing of upstream data.
在本实施例中,所述元数据信息包括,但不限于以下一种或者多种信息的组合:In this embodiment, the metadata information includes, but is not limited to, a combination of one or more of the following information:
文件摘要、文件存储节点信息、文件创建时间以及文件最近一次读取时间。File summary, file storage node information, file creation time, and file last read time.
其中,文件摘要用于与链上存储的文件摘要数据作比对,以确保文件未被篡改;Among them, the file summary is used to compare with the file summary data stored on the chain to ensure that the file has not been tampered with;
文件存储节点信息用于确定文件的存储位置。如Cache_0_100_1234:Cache_0__100_1235,说明文件位于CacheNode0节点中,且起始点为100号条带的1234字节,结束点为100号条带的1235字节;Stripe_1025_1234:;Stripe_1026:;Stripe_1027_0:Stripe_1027_65534,说明文件位于Stripe中,起始点为第1025号存储条带的1234字节,结束点为第1027号存储条带的64434字节。The file storage node information is used to determine the storage location of the file. For example, Cache_0_100_1234:Cache_0__100_1235, the file is located in the CacheNode0 node, and the starting point is 1234 bytes of strip 100, and the end point is 1235 bytes of strip 100; Stripe_1025_1234:; Stripe_1026:; Stripe_1027_0: Stripe_1027_65534, indicating that the file is located in In Stripe, the starting point is 1234 bytes of the 1025th storage stripe, and the end point is 64434 bytes of the 1027th storage stripe.
在本实施例中,可以以Key-Value的形式记录所述存储的文件的元数据信息,其中,Key为路径(path),Value为所述元数据信息。In this embodiment, the metadata information of the stored file may be recorded in the form of Key-Value, where Key is a path (path), and Value is the metadata information.
另外,在存储所述元数据信息时,也可以采用主备存储的模式,以避免单点故障。In addition, when storing the metadata information, an active-standby storage mode may also be adopted to avoid a single point of failure.
通过记录所述元数据信息,无需在数据存储的同时再存储所述元数据信息中的相关信息,解决了资源放大问题。By recording the metadata information, it is not necessary to store the relevant information in the metadata information at the same time of data storage, thereby solving the problem of resource amplification.
通过上述实施方式,能够及时更新记录的元数据信息,以保证记录的元数据信息的有效性。Through the above embodiments, the recorded metadata information can be updated in time to ensure the validity of the recorded metadata information.
在本发明的至少一个实施例中,所述区块链节点,还用于:In at least one embodiment of the present invention, the blockchain node is further used for:
响应于接收到的文件删除请求,所述区块链节点调用所述区块链网络中的交易合约对所述文件删除请求进行校验,当所述文件删除请求通过校验时,所述区块链节点调取待删除文件对应的元数据信息,进一步地,所述区块链节点从调取的元数据信息中获取所述待删除文件的存储位置,当检测到所述待删除文件存储于缓存节点时,所述区块链节点请求所述文件系统从检测到的缓存节点中删除所述待删除文件,或者当检测到所述待删除文件存储于条带节点时,所述区块链节点请求所述文件系统在检测到的条带节点中将所述待删除文件标记为删除状态,并更新调取的元数据信息。In response to the received file deletion request, the blockchain node invokes the transaction contract in the blockchain network to verify the file deletion request, and when the file deletion request passes the verification, the district The block chain node retrieves the metadata information corresponding to the file to be deleted. Further, the blockchain node obtains the storage location of the file to be deleted from the retrieved metadata information. When detecting that the file to be deleted is stored In the cache node, the blockchain node requests the file system to delete the to-be-deleted file from the detected cache node, or when it is detected that the to-be-deleted file is stored in the stripe node, the block The chain node requests the file system to mark the to-be-deleted file as a deleted state in the detected stripe node, and update the retrieved metadata information.
其中,在条带化的存储模式中,删除操作的实施较为复杂,因此,通常只是将待删除文件标记为删除状态。Among them, in the striped storage mode, the implementation of the delete operation is more complicated, therefore, the files to be deleted are usually only marked as deleted.
通过上述实施方式,能够在文件删除请求通过校验后针对不同的存储位置进行文件的删除操作。Through the above-mentioned embodiments, the file deletion operation can be performed for different storage locations after the file deletion request passes the verification.
在本发明的至少一个实施例中,所述区块链节点,还用于:In at least one embodiment of the present invention, the blockchain node is further used for:
响应于接收到的文件下载请求,所述区块链节点调用所述区块链网络中的交易合约对所述文件下载请求进行校验,当所述文件下载请求通过校验时,所述区块链节点调取待下载文件对应的元数据信息,并从调取的元数据信息中获取所述待下载文件的存储位置,进一步地,所述区块链节点从调取的存储位置上读取所述待下载文件。In response to the received file download request, the blockchain node invokes the transaction contract in the blockchain network to verify the file download request, and when the file download request passes the verification, the district The block chain node retrieves the metadata information corresponding to the file to be downloaded, and obtains the storage location of the file to be downloaded from the retrieved metadata information. Further, the blockchain node reads from the retrieved storage location. Get the file to be downloaded.
通过上述实施方式,能够在文件下载请求通过校验后执行文件的下载操作,避免对非正常请求的响应。Through the above-mentioned embodiments, the file download operation can be performed after the file download request passes the verification, so as to avoid the response to the abnormal request.
在本实施例中,还可以验证文件是否被篡改。In this embodiment, it can also be verified whether the file has been tampered with.
以哈希值为例,可以获取所述存储的文件的文件摘要,并将获取的文件摘要与所述区块链网络中存储的文件摘要进行匹配,当匹配成功时,确定所述存储的文件通过验证,进一步确定所述存储的文件未被篡改;当匹配失败时,确定所述存储的文件未通过验证,进一步确定所述存储的文件存在被篡改的风险。Taking the hash value as an example, the file digest of the stored file can be obtained, and the obtained file digest can be matched with the file digest stored in the blockchain network. When the matching is successful, the stored file can be determined. Through the verification, it is further determined that the stored file has not been tampered with; when the matching fails, it is determined that the stored file has not passed the verification, and it is further determined that the stored file has a risk of being tampered with.
在本发明的至少一个实施例中,所述区块链节点,还用于:In at least one embodiment of the present invention, the blockchain node is further used for:
响应于接收到的文件恢复请求,所述区块链节点从条带节点中获取待恢复文件的未丢失数据块及/或校验块,并对所述未丢失数据块及/或校验块进行RS解码,得到待恢复文件的原始文件。In response to the received file recovery request, the blockchain node obtains the non-missing data blocks and/or check blocks of the file to be restored from the stripe node, and performs an update on the non-missing data blocks and/or check blocks. Perform RS decoding to obtain the original file of the file to be restored.
通过上述实施方式,能够结合RS解码实现对丢失数据的自动恢复,且恢复成本较低。Through the above-mentioned embodiments, automatic recovery of lost data can be realized in combination with RS decoding, and the recovery cost is low.
综上所述,本发明能够响应于接收到的文件存储请求,调用区块链网络中的交易合约对所述文件存储请求进行校验,以便结合区块链中的校验逻辑使数据的存储更加安全可靠,当所述文件存储请求通过校验时,将待存储文件写入所述目标缓存节点,有效提升了区块链系统的吞吐量,响应于所述文件系统将第一数量的数据块及第二数量的校验块写入第一条带节点,记录存储的文件的元数据信息,其中,所述数据块及所述校验块是对选择的目标缓存节点上的文件进行条带化处理后执行RS编码而得到,由于单独记录了元数据信息,解决了资源放大问题,并保证记录的元数据信息的有效性。To sum up, the present invention can call the transaction contract in the blockchain network to verify the file storage request in response to the received file storage request, so as to combine the verification logic in the blockchain to store the data It is more secure and reliable. When the file storage request passes the verification, the file to be stored is written to the target cache node, which effectively improves the throughput of the blockchain system. In response to the file system, the first amount of data The block and the second number of check blocks are written into the first stripe node, and the metadata information of the stored file is recorded, wherein the data block and the check block are for striping the file on the selected target cache node. It is obtained by performing RS coding after the banding process. Since the metadata information is separately recorded, the problem of resource amplification is solved, and the validity of the recorded metadata information is guaranteed.
参见图2,为本发明另一实施例的流程示意图。根据不同的需求,该流程示意图中步骤的顺序可以改变,某些步骤可以省略。Referring to FIG. 2 , it is a schematic flowchart of another embodiment of the present invention. According to different requirements, the sequence of the steps in this schematic flowchart can be changed, and some steps can be omitted.
所述区块链数据的分布式存储方法应用于一个或者多个区块链节点中,所述区块链节点是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,所述区块链节点的硬件设备包括但不限于微处理器、专用集成电路(ApplicationSpecific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable GateArray,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。The distributed storage method of blockchain data is applied to one or more blockchain nodes, and the blockchain node is a kind of blockchain node that can automatically perform numerical calculation and/or information according to pre-set or stored instructions Processing equipment, the hardware equipment of the blockchain node includes but is not limited to a microprocessor, an application specific integrated circuit (ASIC), a programmable gate array (Field-Programmable GateArray, FPGA), a digital processor (Digital Signal Processor, DSP), embedded devices, etc.
所述区块链节点可以是任何一种可与用户进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴式设备等。The blockchain node can be any electronic product that can interact with the user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network Television (Internet Protocol Television, IPTV), smart wearable devices, etc.
所述区块链节点还可以包括网络设备和/或用户设备。其中,所述网络设备包括,但不限于单个网络服务器、多个网络服务器组成的服务器组或基于云计算(CloudComputing)的由大量主机或网络服务器构成的云。The blockchain nodes may also include network equipment and/or user equipment. Wherein, the network device includes, but is not limited to, a single network server, a server group formed by multiple network servers, or a cloud formed by a large number of hosts or network servers based on cloud computing (Cloud Computing).
所述区块链节点所处的网络包括但不限于互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等。The network where the blockchain node is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), and the like.
S20,响应于接收到的文件存储请求,调用区块链网络中的交易合约对所述文件存储请求进行校验。S20, in response to the received file storage request, call a transaction contract in the blockchain network to verify the file storage request.
在本发明的至少一个实施例中,以交易哈希作为校验的依据。In at least one embodiment of the present invention, the transaction hash is used as the verification basis.
举例来说,所述区块链节点将所述文件存储请求中的哈希值与所述区块链网络中的交易哈希进行匹配,当匹配成功时,所述区块链节点确定所述文件存储请求通过校验,并执行所述文件存储请求;当匹配失败时,所述区块链节点确定所述文件存储请求未通过校验,不执行所述文件存储请求。For example, the blockchain node matches the hash value in the file storage request with the transaction hash in the blockchain network, and when the matching is successful, the blockchain node determines the The file storage request passes the verification and executes the file storage request; when the matching fails, the blockchain node determines that the file storage request fails the verification, and does not execute the file storage request.
通过上述实施方式,能够结合区块链中的校验逻辑使数据的存储更加安全可靠。Through the above-mentioned embodiments, data storage can be made more secure and reliable in combination with the verification logic in the blockchain.
S21,当所述文件存储请求通过校验时,将待存储文件发送至所述文件系统。S21, when the file storage request passes the verification, send the file to be stored to the file system.
举例来说,所述文件系统可以是包含操作系统的文件存储系统,操作系统用于明确存储设备或分区上的文件的方法和数据结构,即在存储设备上组织文件,操作系统中负责管理和存储文件信息的软件机构可称为文件管理系统。For example, the file system may be a file storage system including an operating system, the operating system is used to specify the method and data structure of files on the storage device or partition, that is, organize files on the storage device, and the operating system is responsible for managing and A software organization that stores file information may be referred to as a file management system.
S22,响应于所述文件系统将第一数量的数据块及第二数量的校验块写入第一条带节点,记录存储的文件的元数据信息,其中,所述数据块及所述校验块是对选择的目标缓存节点上的文件进行条带化处理后执行RS编码而得到。S22, in response to the file system writing the first number of data blocks and the second number of check blocks into the first stripe node, record metadata information of the stored file, wherein the data blocks and the check blocks are The verification block is obtained by performing the RS encoding after striping the file on the selected target cache node.
在本发明的至少一个实施例中,所述区块链数据的分布式存储方法还包括:In at least one embodiment of the present invention, the distributed storage method for blockchain data further includes:
响应于接收到的文件删除请求,所述区块链节点调用所述区块链网络中的交易合约对所述文件删除请求进行校验,当所述文件删除请求通过校验时,所述区块链节点调取待删除文件对应的元数据信息,进一步地,所述区块链节点从调取的元数据信息中获取所述待删除文件的存储位置,当检测到所述待删除文件存储于缓存节点时,所述区块链节点请求所述文件系统从检测到的缓存节点中删除所述待删除文件,或者当检测到所述待删除文件存储于条带节点时,所述区块链节点请求所述文件系统在检测到的条带节点中将所述待删除文件标记为删除状态,并更新调取的元数据信息。In response to the received file deletion request, the blockchain node invokes the transaction contract in the blockchain network to verify the file deletion request, and when the file deletion request passes the verification, the district The block chain node retrieves the metadata information corresponding to the file to be deleted. Further, the blockchain node obtains the storage location of the file to be deleted from the retrieved metadata information. When detecting that the file to be deleted is stored In the cache node, the blockchain node requests the file system to delete the to-be-deleted file from the detected cache node, or when it is detected that the to-be-deleted file is stored in the stripe node, the block The chain node requests the file system to mark the to-be-deleted file as a deleted state in the detected stripe node, and update the retrieved metadata information.
其中,在条带化的存储模式中,删除操作的实施较为复杂,因此,通常只是将待删除文件标记为删除状态。Among them, in the striped storage mode, the implementation of the delete operation is more complicated, therefore, the files to be deleted are usually only marked as deleted.
通过上述实施方式,能够在文件删除请求通过校验后针对不同的存储位置进行文件的删除操作。Through the above-mentioned embodiments, the file deletion operation can be performed for different storage locations after the file deletion request passes the verification.
在本发明的至少一个实施例中,所述区块链数据的分布式存储方法还包括:In at least one embodiment of the present invention, the distributed storage method for blockchain data further includes:
响应于接收到的文件下载请求,所述区块链节点调用所述区块链网络中的交易合约对所述文件下载请求进行校验,当所述文件下载请求通过校验时,所述区块链节点调取待下载文件对应的元数据信息,并从调取的元数据信息中获取所述待下载文件的存储位置,进一步地,所述区块链节点从调取的存储位置上读取所述待下载文件。In response to the received file download request, the blockchain node invokes the transaction contract in the blockchain network to verify the file download request, and when the file download request passes the verification, the district The block chain node retrieves the metadata information corresponding to the file to be downloaded, and obtains the storage location of the file to be downloaded from the retrieved metadata information. Further, the blockchain node reads from the retrieved storage location. Get the file to be downloaded.
通过上述实施方式,能够在文件下载请求通过校验后执行文件的下载操作,避免对非正常请求的响应。Through the above-mentioned embodiments, the file download operation can be performed after the file download request passes the verification, so as to avoid the response to the abnormal request.
在本发明的至少一个实施例中,所述区块链数据的分布式存储方法还包括:In at least one embodiment of the present invention, the distributed storage method for blockchain data further includes:
响应于接收到的文件恢复请求,所述区块链节点从条带节点中获取待恢复文件的未丢失数据块及/或校验块,并对所述未丢失数据块及/或校验块进行RS解码,得到待恢复文件的原始文件。In response to the received file recovery request, the blockchain node obtains the non-missing data blocks and/or check blocks of the file to be restored from the stripe node, and performs an update on the non-missing data blocks and/or check blocks. Perform RS decoding to obtain the original file of the file to be restored.
通过上述实施方式,能够结合RS解码实现对丢失数据的自动恢复,且恢复成本较低。Through the above-mentioned embodiments, automatic recovery of lost data can be realized in combination with RS decoding, and the recovery cost is low.
综上所述,本发明能够响应于接收到的文件存储请求,调用区块链网络中的交易合约对所述文件存储请求进行校验,以便结合区块链中的校验逻辑使数据的存储更加安全可靠,当所述文件存储请求通过校验时,将待存储文件写入所述目标缓存节点,有效提升了区块链系统的吞吐量,响应于所述文件系统将第一数量的数据块及第二数量的校验块写入第一条带节点,记录存储的文件的元数据信息,其中,所述数据块及所述校验块是对选择的目标缓存节点上的文件进行条带化处理后执行RS编码而得到,由于单独记录了元数据信息,解决了资源放大问题,并保证记录的元数据信息的有效性。To sum up, the present invention can call the transaction contract in the blockchain network to verify the file storage request in response to the received file storage request, so as to combine the verification logic in the blockchain to store the data It is more secure and reliable. When the file storage request passes the verification, the file to be stored is written to the target cache node, which effectively improves the throughput of the blockchain system. In response to the file system, the first amount of data The block and the second number of check blocks are written into the first stripe node, and the metadata information of the stored file is recorded, wherein the data block and the check block are for striping the file on the selected target cache node. It is obtained by performing RS coding after the banding process. Since the metadata information is separately recorded, the problem of resource amplification is solved, and the validity of the recorded metadata information is guaranteed.
参见图3,在本实施例中,所述计算机设备1可以包括存储器12、处理器13和总线,还可以包括存储在所述存储器12中并可在所述处理器13上运行的计算机程序,例如区块链数据的分布式存储程序。Referring to FIG. 3 , in this embodiment, the
本领域技术人员可以理解,所述示意图仅仅是计算机设备1的示例,并不构成对计算机设备1的限定,所述计算机设备1既可以是总线型结构,也可以是星形结构,所述计算机设备1还可以包括比图示更多或更少的其他硬件或者软件,或者不同的部件布置,例如所述计算机设备1还可以包括输入输出设备、网络接入设备等。Those skilled in the art can understand that the schematic diagram is only an example of the
需要说明的是,所述计算机设备1仅为举例,其他现有的或今后可能出现的电子产品如可适应于本发明,也应包含在本发明的保护范围以内,并以引用方式包含于此。It should be noted that the
其中,存储器12至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。存储器12在一些实施例中可以是计算机设备1的内部存储单元,例如该计算机设备1的移动硬盘。存储器12在另一些实施例中也可以是计算机设备1的外部存储设备,例如计算机设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(SecureDigital,SD)卡、闪存卡(Flash Card)等。进一步地,存储器12还可以既包括计算机设备1的内部存储单元也包括外部存储设备。存储器12不仅可以用于存储安装于计算机设备1的应用软件及各类数据,例如区块链数据的分布式存储程序的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。Wherein, the
处理器13在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。处理器13是所述计算机设备1的控制核心(Control Unit),利用各种接口和线路连接整个计算机设备1的各个部件,通过运行或执行存储在所述存储器12内的程序或者模块(例如执行区块链数据的分布式存储程序等),以及调用存储在所述存储器12内的数据,以执行计算机设备1的各种功能和处理数据。The
所述处理器13执行所述计算机设备1的操作系统以及安装的各类应用程序。所述处理器13执行所述应用程序以实现上述各个区块链数据的分布式存储方法实施例中的步骤,例如图2所示的步骤S20、S21、S22。The
或者,所述处理器13执行所述计算机程序时实现上述各装置实施例中各模块/单元的功能,例如:Alternatively, when the
响应于接收到的文件存储请求,调用区块链网络中的交易合约对所述文件存储请求进行校验;In response to the received file storage request, call the transaction contract in the blockchain network to verify the file storage request;
当所述文件存储请求通过校验时,将待存储文件发送至所述文件系统;When the file storage request passes the verification, sending the file to be stored to the file system;
响应于所述文件系统将第一数量的数据块及第二数量的校验块写入第一条带节点,记录存储的文件的元数据信息,其中,所述数据块及所述校验块是对选择的目标缓存节点上的文件进行条带化处理后执行RS编码而得到。In response to the file system writing the first number of data blocks and the second number of check blocks into the first stripe node, record metadata information of the stored file, wherein the data blocks and the check blocks It is obtained by striping the file on the selected target cache node and then performing RS encoding.
示例性的,所述计算机程序可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器12中,并由所述处理器13执行,以完成本发明。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序在所述计算机设备1中的执行过程。例如,所述计算机程序可以被分割成校验单元111、发送单元112、记录单元113、调取单元114、获取单元115、请求单元116、更新单元117、读取单元118、解码单元119。Exemplarily, the computer program may be divided into one or more modules/units, and the one or more modules/units are stored in the
上述以软件功能模块的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、计算机设备,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分。The above-mentioned integrated units implemented in the form of software functional modules may be stored in a computer-readable storage medium. The above-mentioned software function modules are stored in a storage medium, and include several instructions to cause a computer device (which may be a personal computer, a computer device, or a network device, etc.) or a processor (processor) to execute the methods described in the various embodiments of the present invention. part.
所述计算机设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指示相关的硬件设备来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。If the modules/units integrated in the
其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) .
总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。为便于表示,在图3中仅用一根箭头表示,但并不表示仅有一根总线或一种类型的总线。所述总线被设置为实现所述存储器12以及至少一个处理器13等之间的连接通信。The bus may be a peripheral component interconnect (PCI for short) bus or an extended industry standard architecture (extended industry standard architecture, EISA for short) bus, or the like. The bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one arrow is shown in FIG. 3, but it does not mean that there is only one bus or one type of bus. The bus is arranged to enable connection communication between the
尽管未示出,所述计算机设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器13逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述计算机设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。Although not shown, the
进一步地,所述计算机设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该计算机设备1与其他计算机设备之间建立通信连接。Further, the
可选地,该计算机设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在计算机设备1中处理的信息以及用于显示可视化的用户界面。Optionally, the
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。It should be understood that the embodiments are only used for illustration, and are not limited by this structure in the scope of the patent application.
图3仅示出了具有组件12-13的计算机设备1,本领域技术人员可以理解的是,图3示出的结构并不构成对所述计算机设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG. 3 only shows the
结合图2,所述计算机设备1中的所述存储器12存储多个指令以实现一种区块链数据的分布式存储方法,所述处理器13可执行所述多个指令从而实现:2, the
响应于接收到的文件存储请求,调用区块链网络中的交易合约对所述文件存储请求进行校验;In response to the received file storage request, call the transaction contract in the blockchain network to verify the file storage request;
当所述文件存储请求通过校验时,将待存储文件发送至所述文件系统;When the file storage request passes the verification, sending the file to be stored to the file system;
响应于所述文件系统将第一数量的数据块及第二数量的校验块写入第一条带节点,记录存储的文件的元数据信息,其中,所述数据块及所述校验块是对选择的目标缓存节点上的文件进行条带化处理后执行RS编码而得到。In response to the file system writing the first number of data blocks and the second number of check blocks into the first stripe node, record metadata information of the stored file, wherein the data blocks and the check blocks It is obtained by striping the file on the selected target cache node and then performing RS encoding.
具体地,所述处理器13对上述指令的具体实现方法可参考图2对应实施例中相关步骤的描述,在此不赘述。Specifically, for the specific implementation method of the above-mentioned instruction by the
参照图4,为本发明区块链数据的分布式存储系统的功能模块示意图。所述区块链数据的分布式存储装置11包括校验单元111、发送单元112、记录单元113、调取单元114、获取单元115、请求单元116、更新单元117、读取单元118、解码单元119。本发明所称的模块/单元是指一种能够被处理器13所执行,并且能够完成固定功能的一系列计算机程序段,其存储在存储器12中。在本实施例中,关于各模块/单元的功能将在后续的实施例中详述。Referring to FIG. 4 , it is a schematic diagram of the functional modules of the distributed storage system for blockchain data of the present invention. The distributed storage device 11 for blockchain data includes a
响应于接收到的文件存储请求,校验单元111调用区块链网络中的交易合约对所述文件存储请求进行校验。In response to the received file storage request, the
在本发明的至少一个实施例中,以交易哈希作为校验的依据。In at least one embodiment of the present invention, the transaction hash is used as the verification basis.
举例来说,所述校验单元111将所述文件存储请求中的哈希值与所述区块链网络中的交易哈希进行匹配,当匹配成功时,所述校验单元111确定所述文件存储请求通过校验,并执行所述文件存储请求;当匹配失败时,所述校验单元111确定所述文件存储请求未通过校验,不执行所述文件存储请求。For example, the
通过上述实施方式,能够结合区块链中的校验逻辑使数据的存储更加安全可靠。Through the above-mentioned embodiments, data storage can be made more secure and reliable in combination with the verification logic in the blockchain.
当所述文件存储请求通过校验时,发送单元112将待存储文件发送至所述文件系统。When the file storage request passes the verification, the sending
其中,所述文件系统是操作系统,用于明确存储设备或分区上的文件的方法和数据结构,即在存储设备上组织文件。操作系统中负责管理和存储文件信息的软件机构称为文件管理系统,简称文件系统。Wherein, the file system is an operating system used to specify the method and data structure of files on a storage device or partition, that is, to organize files on the storage device. The software organization responsible for managing and storing file information in the operating system is called a file management system, or file system for short.
响应于所述文件系统将第一数量的数据块及第二数量的校验块写入第一条带节点,记录单元113记录存储的文件的元数据信息,其中,所述数据块及所述校验块是对选择的目标缓存节点上的文件进行条带化处理后执行RS编码而得到。In response to the file system writing the first number of data blocks and the second number of check blocks into the first stripe node, the
在本发明的至少一个实施例中,响应于接收到的文件删除请求,所述校验单元111调用所述区块链网络中的交易合约对所述文件删除请求进行校验,当所述文件删除请求通过校验时,调取单元114调取待删除文件对应的元数据信息,进一步地,获取单元115从调取的元数据信息中获取所述待删除文件的存储位置,当检测到所述待删除文件存储于缓存节点时,请求单元116请求所述文件系统从检测到的缓存节点中删除所述待删除文件,或者当检测到所述待删除文件存储于条带节点时,所述请求单元116请求所述文件系统在检测到的条带节点中将所述待删除文件标记为删除状态,更新单元117更新调取的元数据信息。In at least one embodiment of the present invention, in response to the received file deletion request, the
其中,在条带化的存储模式中,删除操作的实施较为复杂,因此,通常只是将待删除文件标记为删除状态。Among them, in the striped storage mode, the implementation of the delete operation is more complicated, therefore, the files to be deleted are usually only marked as deleted.
通过上述实施方式,能够在文件删除请求通过校验后针对不同的存储位置进行文件的删除操作。Through the above-mentioned embodiments, the file deletion operation can be performed for different storage locations after the file deletion request passes the verification.
在本发明的至少一个实施例中,响应于接收到的文件下载请求,所述校验单元111调用所述区块链网络中的交易合约对所述文件下载请求进行校验,当所述文件下载请求通过校验时,所述调取单元114调取待下载文件对应的元数据信息,所述获取单元115从调取的元数据信息中获取所述待下载文件的存储位置,进一步地,读取单元118从调取的存储位置上读取所述待下载文件。In at least one embodiment of the present invention, in response to the received file download request, the
通过上述实施方式,能够在文件下载请求通过校验后执行文件的下载操作,避免对非正常请求的响应。Through the above-mentioned embodiments, the file download operation can be performed after the file download request passes the verification, so as to avoid the response to the abnormal request.
在本发明的至少一个实施例中,响应于接收到的文件恢复请求,所述获取单元115从条带节点中获取待恢复文件的未丢失数据块及/或校验块,解码单元119对所述未丢失数据块及/或校验块进行RS解码,得到待恢复文件的原始文件。In at least one embodiment of the present invention, in response to the received file restoration request, the obtaining
通过上述实施方式,能够结合RS解码实现对丢失数据的自动恢复,且恢复成本较低。Through the above-mentioned embodiments, automatic recovery of lost data can be realized in combination with RS decoding, and the recovery cost is low.
综上所述,本发明能够响应于接收到的文件存储请求,调用区块链网络中的交易合约对所述文件存储请求进行校验,以便结合区块链中的校验逻辑使数据的存储更加安全可靠,当所述文件存储请求通过校验时,将待存储文件写入所述目标缓存节点,有效提升了区块链系统的吞吐量,响应于所述文件系统将第一数量的数据块及第二数量的校验块写入第一条带节点,记录存储的文件的元数据信息,其中,所述数据块及所述校验块是对选择的目标缓存节点上的文件进行条带化处理后执行RS编码而得到,由于单独记录了元数据信息,解决了资源放大问题,并保证记录的元数据信息的有效性。To sum up, the present invention can call the transaction contract in the blockchain network to verify the file storage request in response to the received file storage request, so as to combine the verification logic in the blockchain to store the data It is more secure and reliable. When the file storage request passes the verification, the file to be stored is written to the target cache node, which effectively improves the throughput of the blockchain system. In response to the file system, the first amount of data The block and the second number of check blocks are written into the first stripe node, and the metadata information of the stored file is recorded, wherein the data block and the check block are for striping the file on the selected target cache node. It is obtained by performing RS coding after the banding process. Since the metadata information is separately recorded, the problem of resource amplification is solved, and the validity of the recorded metadata information is guaranteed.
在上述实施例中,可以全部或部分地通过软件、硬件设备、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware devices, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product.
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、从服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、从服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的从服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、移动硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态移动硬盘Solid State Disk(SSD))等。The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website, computer, slave server or data The center transmits to another website site, computer, slave server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be stored by a computer or a data storage device such as a slave server, a data center, etc. that includes one or more available media integrated. The usable media may be magnetic media (eg, floppy disks, removable hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), and the like.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件设备的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware devices, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,从服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动移动硬盘、只读存储器(ROM,Read-OnlyMemory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a slave server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a removable hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk or an optical disk and other media that can store program codes.
需要说明的是,上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。并且本文中的术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。It should be noted that the above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments. And the terms "comprising", "comprising" or any other variation thereof herein are intended to encompass a non-exclusive inclusion such that a process, device, article or method comprising a list of elements includes not only those elements, but also includes no explicit Other elements listed, or those inherent to such a process, apparatus, article, or method are also included. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, apparatus, article, or method that includes the element.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in other related technical fields , are similarly included in the scope of patent protection of the present invention.
Claims (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010301043.9A CN111541753B (en) | 2020-04-16 | 2020-04-16 | Distributed storage system, method, computer device and medium for block chain data |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010301043.9A CN111541753B (en) | 2020-04-16 | 2020-04-16 | Distributed storage system, method, computer device and medium for block chain data |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111541753A true CN111541753A (en) | 2020-08-14 |
| CN111541753B CN111541753B (en) | 2024-02-27 |
Family
ID=71974989
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010301043.9A Active CN111541753B (en) | 2020-04-16 | 2020-04-16 | Distributed storage system, method, computer device and medium for block chain data |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111541753B (en) |
Cited By (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112256472A (en) * | 2020-10-20 | 2021-01-22 | 平安科技(深圳)有限公司 | Distributed data calling method and device, electronic equipment and storage medium |
| CN112968922A (en) * | 2021-01-19 | 2021-06-15 | 河北蜂之巢互联网技术有限公司 | Stream data storage method and stream data storage system |
| CN112988680A (en) * | 2021-03-30 | 2021-06-18 | 联想凌拓科技有限公司 | Data acceleration method, cache unit, electronic device and storage medium |
| CN113065169A (en) * | 2021-04-20 | 2021-07-02 | 支付宝(杭州)信息技术有限公司 | File storage method, device and equipment |
| CN113094754A (en) * | 2021-05-08 | 2021-07-09 | 重庆银行股份有限公司 | Big data platform data modification system and modification, response, cache and verification method |
| CN113283987A (en) * | 2021-05-17 | 2021-08-20 | 网易(杭州)网络有限公司 | Service processing method, device, block chain gateway, block chain node and storage medium |
| CN114153647A (en) * | 2021-09-24 | 2022-03-08 | 深圳市木浪云科技有限公司 | Rapid data verification method, device and system for cloud storage system |
| CN114257605A (en) * | 2020-09-24 | 2022-03-29 | 航天信息股份有限公司 | A data sharing system, method, apparatus, medium and device |
| CN114501074A (en) * | 2020-10-23 | 2022-05-13 | 国家广播电视总局广播电视科学研究院 | IPTV supervision method and readable storage medium |
| CN114640690A (en) * | 2022-05-17 | 2022-06-17 | 浙江省公众信息产业有限公司无线运营分公司 | File storage method, system, medium and equipment |
| CN114860349A (en) * | 2022-07-06 | 2022-08-05 | 深圳华锐分布式技术股份有限公司 | Data loading method, device, equipment and medium |
Citations (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070192544A1 (en) * | 2006-02-16 | 2007-08-16 | Svend Frolund | Method of operating replicated cache |
| CN102750195A (en) * | 2012-06-07 | 2012-10-24 | 浪潮电子信息产业股份有限公司 | Method for cluster file system data fault tolerance |
| US20140164694A1 (en) * | 2012-12-07 | 2014-06-12 | Netapp, Inc. | Decoupled reliability groups |
| CN104283948A (en) * | 2014-09-26 | 2015-01-14 | 东软集团股份有限公司 | Server cluster system and load balancing implementation method thereof |
| US8972478B1 (en) * | 2012-05-23 | 2015-03-03 | Netapp, Inc. | Using append only log format in data storage cluster with distributed zones for determining parity of reliability groups |
| CN105791353A (en) * | 2014-12-23 | 2016-07-20 | 深圳市腾讯计算机系统有限公司 | Distributed data storage method and system based on erasure code |
| CN106210151A (en) * | 2016-09-27 | 2016-12-07 | 深圳市彬讯科技有限公司 | A kind of zedis distributed caching and server cluster monitoring method |
| CN106301823A (en) * | 2015-05-19 | 2017-01-04 | 中兴通讯股份有限公司 | The fault alarming method of a kind of key component, device and big data management system |
| CN106649401A (en) * | 2015-11-03 | 2017-05-10 | 阿里巴巴集团控股有限公司 | Data writing method and device of distributed file system |
| CN108874312A (en) * | 2018-05-30 | 2018-11-23 | 郑州云海信息技术有限公司 | Date storage method and storage equipment |
| CN109491968A (en) * | 2018-11-13 | 2019-03-19 | 浙江鲸腾网络科技有限公司 | A kind of document handling method, device, equipment and computer readable storage medium |
| CN109634932A (en) * | 2018-11-30 | 2019-04-16 | 北京瑞卓喜投科技发展有限公司 | A kind of intelligence contract storage method and storage system |
| CN110032545A (en) * | 2019-03-27 | 2019-07-19 | 远光软件股份有限公司 | File memory method, system and electronic equipment based on block chain |
| CN110515541A (en) * | 2019-07-29 | 2019-11-29 | 西安交通大学 | Correcting and eleting codes non-alignment data-updating method in distributed storage |
-
2020
- 2020-04-16 CN CN202010301043.9A patent/CN111541753B/en active Active
Patent Citations (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070192544A1 (en) * | 2006-02-16 | 2007-08-16 | Svend Frolund | Method of operating replicated cache |
| US8972478B1 (en) * | 2012-05-23 | 2015-03-03 | Netapp, Inc. | Using append only log format in data storage cluster with distributed zones for determining parity of reliability groups |
| CN102750195A (en) * | 2012-06-07 | 2012-10-24 | 浪潮电子信息产业股份有限公司 | Method for cluster file system data fault tolerance |
| US20140164694A1 (en) * | 2012-12-07 | 2014-06-12 | Netapp, Inc. | Decoupled reliability groups |
| CN104283948A (en) * | 2014-09-26 | 2015-01-14 | 东软集团股份有限公司 | Server cluster system and load balancing implementation method thereof |
| CN105791353A (en) * | 2014-12-23 | 2016-07-20 | 深圳市腾讯计算机系统有限公司 | Distributed data storage method and system based on erasure code |
| CN106301823A (en) * | 2015-05-19 | 2017-01-04 | 中兴通讯股份有限公司 | The fault alarming method of a kind of key component, device and big data management system |
| CN106649401A (en) * | 2015-11-03 | 2017-05-10 | 阿里巴巴集团控股有限公司 | Data writing method and device of distributed file system |
| CN106210151A (en) * | 2016-09-27 | 2016-12-07 | 深圳市彬讯科技有限公司 | A kind of zedis distributed caching and server cluster monitoring method |
| CN108874312A (en) * | 2018-05-30 | 2018-11-23 | 郑州云海信息技术有限公司 | Date storage method and storage equipment |
| CN109491968A (en) * | 2018-11-13 | 2019-03-19 | 浙江鲸腾网络科技有限公司 | A kind of document handling method, device, equipment and computer readable storage medium |
| CN109634932A (en) * | 2018-11-30 | 2019-04-16 | 北京瑞卓喜投科技发展有限公司 | A kind of intelligence contract storage method and storage system |
| CN110032545A (en) * | 2019-03-27 | 2019-07-19 | 远光软件股份有限公司 | File memory method, system and electronic equipment based on block chain |
| CN110515541A (en) * | 2019-07-29 | 2019-11-29 | 西安交通大学 | Correcting and eleting codes non-alignment data-updating method in distributed storage |
Cited By (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114257605A (en) * | 2020-09-24 | 2022-03-29 | 航天信息股份有限公司 | A data sharing system, method, apparatus, medium and device |
| CN112256472A (en) * | 2020-10-20 | 2021-01-22 | 平安科技(深圳)有限公司 | Distributed data calling method and device, electronic equipment and storage medium |
| CN114501074A (en) * | 2020-10-23 | 2022-05-13 | 国家广播电视总局广播电视科学研究院 | IPTV supervision method and readable storage medium |
| CN114501074B (en) * | 2020-10-23 | 2023-12-05 | 国家广播电视总局广播电视科学研究院 | IPTV supervision method and readable storage medium |
| CN112968922A (en) * | 2021-01-19 | 2021-06-15 | 河北蜂之巢互联网技术有限公司 | Stream data storage method and stream data storage system |
| CN112988680B (en) * | 2021-03-30 | 2022-09-27 | 联想凌拓科技有限公司 | Data acceleration method, cache unit, electronic device and storage medium |
| CN112988680A (en) * | 2021-03-30 | 2021-06-18 | 联想凌拓科技有限公司 | Data acceleration method, cache unit, electronic device and storage medium |
| CN113065169A (en) * | 2021-04-20 | 2021-07-02 | 支付宝(杭州)信息技术有限公司 | File storage method, device and equipment |
| CN113094754A (en) * | 2021-05-08 | 2021-07-09 | 重庆银行股份有限公司 | Big data platform data modification system and modification, response, cache and verification method |
| CN113283987A (en) * | 2021-05-17 | 2021-08-20 | 网易(杭州)网络有限公司 | Service processing method, device, block chain gateway, block chain node and storage medium |
| CN114153647A (en) * | 2021-09-24 | 2022-03-08 | 深圳市木浪云科技有限公司 | Rapid data verification method, device and system for cloud storage system |
| CN114153647B (en) * | 2021-09-24 | 2022-08-02 | 深圳市木浪云科技有限公司 | Rapid data verification method, device and system for cloud storage system |
| CN114640690A (en) * | 2022-05-17 | 2022-06-17 | 浙江省公众信息产业有限公司无线运营分公司 | File storage method, system, medium and equipment |
| CN114860349A (en) * | 2022-07-06 | 2022-08-05 | 深圳华锐分布式技术股份有限公司 | Data loading method, device, equipment and medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111541753B (en) | 2024-02-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111541753A (en) | Distributed storage system, method, computer device and medium for block chain data | |
| US10467246B2 (en) | Content-based replication of data in scale out system | |
| US8732411B1 (en) | Data de-duplication for information storage systems | |
| US10108359B2 (en) | Method and system for efficient cache buffering in a system having parity arms to enable hardware acceleration | |
| WO2020211236A1 (en) | Read-write conflict resolution method and apparatus employing b+ tree and storage medium | |
| US10719479B2 (en) | Data unit cloning in memory-based file systems | |
| CN109086388A (en) | Block chain date storage method, device, equipment and medium | |
| US20170242869A1 (en) | Managing deduplication in a data storage system using a bloomier filter data dictionary | |
| CN113419685B (en) | RAID creation based on SMR, data writing aiming at RAID and RAID recovery method | |
| US20200026647A1 (en) | Method, apparatus and computer program product for managing cache | |
| JP2018106545A (en) | Information processing device, information processing system, information processing method and program | |
| KR102437777B1 (en) | Methods and systems to detect silent corruptionof data | |
| US12169639B2 (en) | Data exchange between host and storage device using compute functions | |
| CN111857603B (en) | Data processing method and related device | |
| CN113806803A (en) | Data storage method, system, terminal equipment and storage medium | |
| CN104067241A (en) | Synchronizing local and remote storage devices | |
| US12175107B2 (en) | Method, electronic device and computer program product for processing data | |
| WO2021114877A1 (en) | Missing-number detection method, apparatus, electronic device, and storage medium | |
| CN109739857B (en) | Data distributed writing method, device, terminal and storage medium under high concurrency | |
| CN115203200A (en) | Method, device, equipment and storage medium for changing database table structure | |
| CN111680334B (en) | Disk security access method, device, equipment and medium | |
| US9864661B2 (en) | Cache-accelerated replication of snapshots between storage devices | |
| US7921324B2 (en) | Providing file system availability during local path failure of a non-server node | |
| CN116755633A (en) | Data storage method, device, computer-readable storage medium and terminal equipment | |
| US11132401B1 (en) | Distributed hash table based logging service |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| TA01 | Transfer of patent application right |
Effective date of registration: 20210913 Address after: 518057 floors 21-23, block B, building 12, Shenzhen Bay science and technology ecological park, No. 18, Keji South Road, community, high tech Zone, Yuehai street, Nanshan District, Shenzhen, Guangdong Applicant after: Xunlei Networking Technologies, Ltd. Applicant after: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd. Address before: 5 / F, building 5, Weixin Software Park, No. 9, Gaoxin South ninth Road, Nanshan District, Shenzhen City, Guangdong Province Applicant before: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd. |
|
| TA01 | Transfer of patent application right | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20240617 Address after: 518000, 2101 to 2107, Xunlei Building, No. 3709 Baishi Road, Gaoxin District, Yuehai Street, Nanshan District, Shenzhen, Guangdong Province Patentee after: Xunlei Networking Technologies, Ltd. Country or region after: China Address before: 518057 floors 21-23, block B, building 12, Shenzhen Bay science and technology ecological park, No. 18, Keji South Road, community, high tech Zone, Yuehai street, Nanshan District, Shenzhen, Guangdong Patentee before: Xunlei Networking Technologies, Ltd. Country or region before: China Patentee before: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd. |
|
| TR01 | Transfer of patent right |


