Proof method, device, equipment and storage medium for decentralized storage service
The method of generating storage proofs using random numbers and validating them through a validation center addresses the issue of unreliable data storage in decentralized networks by ensuring reliable storage through rewards and penalties.
Patent Information
- Application Number
- CN202210910567.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-07-29
AI Technical Summary
In decentralized storage services, the prior art cannot effectively ensure the reliability of the storage nodes for data, and cannot determine the specific content and transactions of each data block, resulting in low reliability of the storage nodes.
By obtaining the storage random number, the verification center verifies the files to be verified in the storage node, receives the existence certificate, and if the existence certificate is not received, the storage node will be punished to ensure reliable storage of the files.
It improves the reliability of storage nodes in the decentralized network to store data, and solves the problem of low reliability of existing storage nodes in the storage data.
Smart Images

Figure CN115396111B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of blockchain, and particularly to a method, apparatus, device, and computer-readable storage medium for proving the storage of a decentralized storage service. Background Art
[0002] Blockchain is essentially a globally shared database, and blockchain has currently been widely applied in various fields, such as finance, securities, medical care, supply chain, and other fields. Blockchain is a string of data blocks generated by using cryptographic methods. Each data block contains specific information for verifying the validity of the information and generating the next block. In the scenario of decentralized storage services, there is no centralized institution to ensure that the provided storage service is reliable. In the prior art, after the main link receives the Merkle root, it is impossible to know the specific content of each data block, nor can it know which transactions are included in each data block. It often occurs that it is impossible to determine whether each storage node has reliably saved the data. Therefore, how to solve the low reliability of the existing storage nodes in saving data has become a technical problem to be solved urgently at present. Summary of the Invention
[0003] The main object of the present invention is to provide a method, apparatus, device, and computer-readable storage medium for proving a decentralized storage service, aiming to solve the technical problem of the low reliability of the existing storage nodes in saving data.
[0004] To achieve the above object, the present invention provides a method for proving a decentralized storage service, the method including: obtaining a storage random number, and generating a storage proof through a storage node according to the storage random number; verifying a file to be verified in the storage node by a verification center, and receiving an existence proof, where the existence proof is sent by the storage node; judging whether the existence proof sent by the storage node is received according to the storage proof and the existence proof; if the existence proof is not received, punishing the storage node.
[0005] Further, the generating a storage proof through a storage node according to the storage random number includes:
[0006] obtaining the storage random number through the storage node, and obtaining node information of the storage node;
[0007] generating the storage proof through hash value calculation based on the storage random number and the information of the storage node, where the node information includes identity information of the storage node.
[0008] Further, the verification center verifies the file to be verified in the storage node and receives the proof of existence, where the proof of existence is sent by the storage node and includes:
[0009] Based on the storage proof, the verification center randomly selects the file to be verified from the files stored in the storage node and issues a verification instruction;
[0010] After obtaining the verification instruction, the storage node calculates the hash value of the file to be verified, generates the root of the Merkle tree corresponding to the file to be verified, and uses the root of the Merkle tree as the proof of existence.
[0011] Further, before punishing the storage node if the proof of existence is not received, it further includes:
[0012] If the proof of existence is received, it is confirmed that the storage node has stored the file to be verified and has not deleted the file to be verified within the second preset time threshold.
[0013] Further, after determining whether the proof of existence sent by the storage node is received according to the storage proof and the proof of existence, it further includes:
[0014] Match the storage proof with the proof of existence to obtain a matching result;
[0015] If the matching result is not less than the preset matching rate, it is determined that the proof of existence is valid, and the storage node is rewarded.
[0016] Further, after matching the storage proof with the proof of existence to obtain a matching result, it further includes:
[0017] If the matching result is less than the preset matching rate, it is determined that the proof of existence is invalid, and the storage node is punished.
[0018] Further, before obtaining the storage random number, it includes:
[0019] Obtain the first preset time threshold and use the first preset time threshold as the time interval for obtaining the storage random number through the verification center.
[0020] In addition, to achieve the above object, the present invention further provides a proof device for a decentralized storage service. The device includes: a storage proof generation module, configured to obtain a storage random number and generate a storage proof through a storage node according to the storage random number; an existence proof verification module, configured to verify a file to be verified in the storage node through a verification center and receive an existence proof, where the existence proof is sent out by the storage node; an existence proof judgment module, configured to judge whether the existence proof sent out by the storage node is received according to the storage proof and the existence proof; and a reward and punishment implementation module, configured to punish the storage node if the existence proof is not received.
[0021] In addition, to achieve the above object, the present invention further provides a proof device for a decentralized storage service. The proof device for the decentralized storage service includes a processor, a memory, and a proof program for the decentralized storage service stored on the memory and executable by the processor. When the proof program for the decentralized storage service is executed by the processor, the steps of the proof method for the decentralized storage service as described above are implemented.
[0022] In addition, to achieve the above object, the present invention further provides a computer-readable storage medium. A proof program for a decentralized storage service is stored on the computer-readable storage medium. When the proof program for the decentralized storage service is executed by a processor, the steps of the proof method for the decentralized storage service as described above are implemented.
[0023] The present invention provides a proof method for a decentralized storage service. The method includes: obtaining a storage random number and generating a storage proof through a storage node according to the storage random number; verifying a file to be verified in the storage node through a verification center and receiving an existence proof, where the existence proof is sent out by the storage node; judging whether the existence proof sent out by the storage node is received according to the storage proof and the existence proof; and punishing the storage node if the existence proof is not received. By the above method, by obtaining a storage random number and generating a storage proof, verifying the file to be verified to generate an existence proof, and determining whether the file to be verified is reliably stored in the storage node according to the relationship between the storage proof and the existence proof, the reliability of data storage in the storage node in a decentralized network is improved, and the technical problem of low reliability of data storage in the existing storage node is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a schematic hardware structure diagram of a proof device for a decentralized storage service involved in the embodiment solution of the present invention;
[0025] Figure 2 Schematic flowchart of the first embodiment of the proof method for the decentralized storage service of the present invention;
[0026] Figure 3 Existence proof schematic diagram in the proof method for the decentralized storage service of the present invention;
[0027] Figure 4 Schematic flowchart of the second embodiment of the proof method for the decentralized storage service of the present invention;
[0028] Figure 5 Schematic diagram of the functional modules of the first embodiment of the proof device for the decentralized storage service of the present invention.
[0029] The realization, functional features, and advantages of the objectives of the present invention will be further described with reference to the embodiments and the accompanying drawings. Specific embodiments
[0030] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0031] The proof method for the decentralized storage service involved in the embodiments of the present invention is mainly applied to the proof device for the decentralized storage service. The proof generation device for the decentralized storage service may be a device with display and processing functions such as a PC, a portable computer, or a mobile terminal.
[0032] Refer to Figure 1 , Figure 1 Schematic diagram of the hardware structure of the proof device for the decentralized storage service involved in the solution of the embodiments of the present invention. In the embodiments of the present invention, the proof device for the decentralized storage service may include a processor 1001 (such as a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to implement the connection and communication between these components; the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface); the memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory, and the memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.
[0033] Those skilled in the art can understand that Figure 1 the hardware structure shown in
[0034] Continue to refer to Figure 1 , Figure 1 in, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, and a proof program for a decentralized storage service.
[0035] In Figure 1 in, the network communication module is mainly used to connect to the server and communicate with the server for data; and the processor 1001 can call the proof program for the decentralized storage service stored in the memory 1005 and execute the proof method for the decentralized storage service provided by the embodiments of the present invention.
[0036] The embodiments of the present invention provide a proof method for a decentralized storage service.
[0037] Refer to Figure 2 , Figure 2 is a schematic flowchart of the first embodiment of the proof method for the decentralized storage service of the present invention.
[0038] In this embodiment, the proof method for the decentralized storage service includes the following steps:
[0039] Step S10, obtain a storage random number, and generate a storage proof through a storage node according to the storage random number;
[0040] In this embodiment, proofLeaf is a leaf node of the storage proof tree, and is generated using the node pidHash, the storage proof random number, and the rowdata of the file block. Therefore, an IPFS (InterPlanetary File System) node must have the content of the stored file slice locally to generate it, and only storing the CID (Character identifier) cannot generate it. Moreover, the proof of other nodes cannot be copied. The following is the calculation method of proofLeaf:
[0041] proofLeaf = Hash(pidHash + Hash(storeChallenge + rowdata))
[0042] Among them, the Hash function uses sha256. A proofLeaf will be generated for each locally stored file fragment. All proofLeaves form a Merkle tree, which is the storage proof tree, and the root of the tree is the existence proof. The heavy node needs to submit the root of the tree to the incentive contract to prove that it has indeed stored these file fragments locally. A heavy node can use the same storage proof root in an epoch. The storage proof root is uploaded before the lottery draw. Therefore, the newly received shards cannot participate in the incentive immediately after upload. They need to update their roots to the incentive contract during the GEN or UPDATE phase before they can participate in the incentive.
[0043] IPFS (InterPlanetary File System) is a file storage and content distribution network protocol that combines existing successful systems such as Distributed Hash Tables (DHTs), BitTorrent, version control system Git, Self-Certified Filesystems (SFS), and blockchain. The combined advantages of these systems endow it with the following remarkable features:
[0044] 1. Permanently and decentralized storage and sharing of files (storage DHTs in the blockchain mode);
[0045] 2. Peer-to-peer hypermedia: P2P (peer to peer lending) stores various types of bitstreams:
[0046] 3. Versioning: Traceable file modification history (Git-Merkle DAG (Directed Acyclic Graph));
[0047] 4. Content-addressable: Files are identified by generating independent hash values based on the file content, rather than by the file storage location. Files with the same content will only exist once in the system, saving storage space.
[0048] IPFS is a peer-to-peer distributed file system that attempts to connect the same file system for all computing devices. In some respects, IPFS is similar to the World Wide Web, but it can also be regarded as an independent BitTorrent swarm, exchanging objects in the same Git (distributed version control system) repository. In other words, IPFS provides a high-throughput, content-addressable block storage model, and content-related hyperlinks. This forms a generalized Merkle directed acyclic graph (DAG). IPFS combines a distributed hash table, encourages block exchange, and a self-certifying namespace. IPFS has no single point of failure, and nodes do not need to trust each other. Distributed content delivery can save bandwidth and prevent DDoS (Distributed Denial of Service) attacks that the HTTP scheme may encounter.
[0049] The InterPlanetary File System can be accessed in various ways, including FUSE (Filesystem in Userspace) and HTTP (Hyper Text Transfer Protocol). Adding local files to the IPFS file system makes them available to the world. File representation is based on its hash, which is beneficial for caching. File distribution uses a BitTorrent-based protocol. Other users viewing the content also help to provide the content to others on the network. IPFS has a name service called IPNS, which is a PKI-based global namespace for building a trust chain, is compatible with other NS (Name Server records), and can map DNS (Domain Name System),.onion (a top-level domain suffix for addressing special purposes on the Tor network), etc. to IPNS.
[0050] Blockchain technology has many characteristics and advantages, including decentralization, openness, programmability, and immutability. The decentralization of blockchain means that the storage, verification, and transmission of data are all completed by distributed network nodes. The rights and obligations of nodes in the system are equal, and it does not rely on a central management node. Whether new nodes join the system or existing nodes in the system suddenly stop working, it will not affect the overall operation of the system, thus enabling distributed recording, storage, and updating of data.
[0051] In the main-subchain network, the main chain has the management ability for subchains and is responsible for the life cycle management of subchains and sub-nodes belonging to subchains, which not only solves the scalability problem of the blockchain, but also ensures the security of the blockchain and strengthens the control over subchains. For the main-subchain network, subchains rely on the main chain. There can be no subchains, but there must absolutely be a main chain.
[0052] CID - Character Identification Code is a special form of content addressing developed for the InterPlanetary File System. It is a single identifier containing an encrypted hash value and a codec, which stores information on how to read the data. Using an encrypted hash, anyone using the same algorithm for the same data will obtain the same hash. Most content in the InterPlanetary File System is hashed using the sha2-256 algorithm. The target data is hashed through the sha2-256 algorithm to obtain the character identification code based on the target data, and the character identification code is sent to the main-subchain network of the blockchain.
[0053] It can be understood that the storage proof is the storage random number and the node identity, and the root of the Merkle tree generated by the hash algorithm for the content of all file slices stored by the node.
[0054] Step S20: Verify the file to be verified in the storage node through the verification center and receive the proof of existence, where the proof of existence is sent by the storage node.
[0055] In this embodiment, SV (Simplified Verification, proof of storage) aims to use less data volume to prove that a certain proofLeaf corresponding to a file slice actually exists in the storage proof. The SV proof of the proof of existence includes proofLeaf and the path from it to the root of the storage proof. As Figure 3 shown, the SV proof of proofLeaf 1 needs to include 1, 2, 3. The verification center can calculate the storage proof through 1, 2, 3 and then compare it with the storage proof previously uploaded by the storage node, so as to verify that the storage node previously uploaded the storage proof and actually stored the file.
[0056] Step S30: Judge whether the proof of existence sent by the storage node is received according to the storage proof and the proof of existence.
[0057] In this embodiment, it is judged whether the proof of existence returned by the storage node is received after the verification instruction is sent by the verification center. When the verification center receives a valid proof of existence, it is determined that the corresponding storage node has effectively and reliably stored the file to be verified.
[0058] The verification center adjusts the release period of the stored random number so that the cost for nodes to honestly store files all the time is lower than that of cheating (pulling and then deleting files when generating storage proofs and providing existence proofs instead of storing files all the time), then the tendency of nodes to cheat can be eliminated.
[0059] Step S40, if the existence proof is not received, punish the storage node.
[0060] In this embodiment, if the verification center does not receive the existence proof, it means that the storage node does not store the file to be verified or cheats when storing the file to be verified and does not store the file to be verified in a timely and effective manner. Therefore, the corresponding storage node should be punished according to the punishment mechanism to achieve the purpose of restricting the storage node.
[0061] This embodiment provides a method for proving a decentralized storage service. The method includes: obtaining a storage random number, and generating a storage proof through a storage node according to the storage random number; verifying the file to be verified in the storage node by a verification center and receiving an existence proof, where the existence proof is sent by the storage node; judging whether the existence proof sent by the storage node is received according to the storage proof and the existence proof; if the existence proof is not received, punish the storage node. In the above manner, by obtaining the storage random number and generating the storage proof, verifying the file to be verified to generate the existence proof, and determining whether the file to be verified is reliably stored in the storage node according to the relationship between the storage proof and the existence proof, the reliability of data storage in the storage node in the decentralized network is improved, and the technical problem of low reliability of data storage in the existing storage node is solved.
[0062] Refer to Figure 4 , Figure 4 which is a schematic flowchart of the second embodiment of the method for proving a decentralized storage service of the present invention.
[0063] Based on the above Figure 2 shown embodiment, in this embodiment, step S10 specifically includes:
[0064] Step S11, obtain the storage random number through the storage node and obtain the node information of the storage node.
[0065] Step S12, based on the storage random number and the information of the storage node, generate the storage proof through hash value calculation, where the node information includes the identity information of the storage node.
[0066] In this embodiment, at least one random number is generated by a verification node, and these random numbers are used as random numbers. Through hash operation, the root of the corresponding Merkle tree is obtained.
[0067] The hash algorithm is an important computer algorithm that can irreversibly convert a binary value string of any length into a shorter fixed-length binary value string. This mapped value is called the hash value.
[0068] The hash algorithm needs to meet the following characteristics:
[0069] Difficulty in reverse: It is difficult to reverse the original plaintext from the hash value;
[0070] Input sensitivity: Any modification of the original data will result in a very different final hash value;
[0071] Low collision probability: The probability that two plaintexts with different contents at both ends produce the same hash value is very small.
[0072] Efficient calculation: The hash value corresponding to the plaintext can be quickly calculated within a limited time and resources.
[0073] The Merkle tree (MT) is a hash binary tree invented by Ralph Merkle in 1979. Like a standard binary tree, it consists of a set of leaf nodes, a set of intermediate nodes, and a root node. The leaf nodes contain the stored data or its hash value. The intermediate nodes are the hash values of the contents of its two child nodes. The top-level root node is also composed of the hash values of the contents of its two child nodes.
[0074] This embodiment provides a method for proving a decentralized storage service. The method includes: obtaining a storage random number, and generating a storage proof through a storage node according to the storage random number; verifying a file to be verified in the storage node by a verification center, and receiving an existence proof, where the existence proof is sent by the storage node; judging whether the existence proof sent by the storage node is received according to the storage proof and the existence proof; if the existence proof is not received, punishing the storage node. In the above manner, by obtaining a storage random number and generating a storage proof, verifying the file to be verified to generate an existence proof, and determining whether the file to be verified is reliably stored in the storage node according to the relationship between the storage proof and the existence proof, the reliability of storing data in the storage node in a decentralized network is improved, and the technical problem of low reliability of storing data in the existing storage node is solved.
[0075] Based on the above Figure 2 In the shown embodiment, in this embodiment, the step S20 specifically includes:
[0076] Based on the storage proof, the verification center randomly selects the file to be verified from the files stored by the storage node and issues a verification instruction;
[0077] After obtaining the verification instruction, the storage node calculates the hash value of the file to be verified, generates the root of the Merkle tree corresponding to the file to be verified, and uses the root of the Merkle tree as the existence proof.
[0078] In this embodiment, the Merkle tree structure is constructed after sorting each group of data. When the roots of two Merkle trees are the same, it means that the two groups of data represented must be the same. Otherwise, they must be different.
[0079] Since the process of hash calculation can be very fast, the preprocessing can be completed in a short time. Using the Merkle tree structure can bring great advantages in comparison performance.
[0080] This embodiment provides a method for proving a decentralized storage service. The method includes: obtaining a storage random number, and generating a storage proof through a storage node according to the storage random number; verifying a file to be verified in the storage node through a verification center, and receiving an existence proof, where the existence proof is sent by the storage node; judging whether the existence proof sent by the storage node is received according to the storage proof and the existence proof; if the existence proof is not received, punishing the storage node. By the above method, by obtaining the storage random number and generating the storage proof, verifying the file to be verified to generate the existence proof, and determining whether the file to be verified is reliably stored in the storage node according to the relationship between the storage proof and the existence proof, the reliability of storing data by the storage node in the decentralized network is improved, and the technical problem of low reliability of storing data by the existing storage node is solved.
[0081] Further, after step S30, it specifically includes:
[0082] Matching the storage proof with the existence proof to obtain a matching result;
[0083] If the matching result is not less than a preset matching rate, it is determined that the existence proof is valid, and the storage node is rewarded;
[0084] If the matching result is less than the preset matching rate, it is determined that the existence proof is invalid, and the storage node is punished.
[0085] This embodiment provides a method for proving a decentralized storage service. The method includes: obtaining a storage random number, and generating a storage proof through a storage node according to the storage random number; verifying a file to be verified in the storage node by a verification center, and receiving an existence proof, where the existence proof is sent by the storage node; judging whether the existence proof sent by the storage node is received according to the storage proof and the existence proof; if the existence proof is not received, punishing the storage node. In the above manner, by obtaining a storage random number and generating a storage proof, verifying the file to be verified to generate an existence proof, and determining whether the file to be verified is reliably stored in the storage node according to the relationship between the storage proof and the existence proof, the reliability of data storage in the storage node in a decentralized network is improved, and the technical problem of low reliability of data storage in existing storage nodes is solved.
[0086] Further, before step S40, it specifically includes:
[0087] If the existence proof is received, it is confirmed that the storage node has stored the file to be verified and has not deleted the file to be verified within a second preset time threshold.
[0088] Based on all the above embodiments, this embodiment further includes:
[0089] Obtaining a first preset time threshold and using the first preset time threshold as the time interval for obtaining the storage random number through the verification center.
[0090] In this embodiment, the verification center adjusts the release period of the storage random number so that the cost of the node always honestly storing the file is lower than cheating (pulling the file and then deleting it when generating the storage proof and providing the existence proof, and not always storing the file), then the tendency of the node to cheat can be eliminated.
[0091] This embodiment provides a method for proving a decentralized storage service. The method includes: obtaining a storage random number, and generating a storage proof through a storage node according to the storage random number; verifying a file to be verified in the storage node by a verification center, and receiving an existence proof, where the existence proof is sent by the storage node; judging whether the existence proof sent by the storage node is received according to the storage proof and the existence proof; if the existence proof is not received, punishing the storage node. In the above manner, by obtaining a storage random number and generating a storage proof, verifying the file to be verified to generate an existence proof, and determining whether the file to be verified is reliably stored in the storage node according to the relationship between the storage proof and the existence proof, the reliability of data storage in the storage node in a decentralized network is improved, and the technical problem of low reliability of data storage in existing storage nodes is solved.
[0092] In addition, an embodiment of the present invention also provides a device for proving a decentralized storage service.
[0093] Refer to Figure 5 , Figure 5 which is a schematic diagram of the function modules of the first embodiment of the device for proving a decentralized storage service of the present invention.
[0094] In this embodiment, the device for proving a decentralized storage service includes:
[0095] A storage proof generation module 10, configured to obtain a storage random number, and generate a storage proof through a storage node according to the storage random number;
[0096] An existence proof verification module 20, configured to verify a file to be verified in the storage node by a verification center, and receive an existence proof, where the existence proof is sent by the storage node;
[0097] An existence proof judgment module 30, configured to judge whether the existence proof sent by the storage node is received according to the storage proof and the existence proof;
[0098] A reward and punishment implementation module 40, configured to punish the storage node if the existence proof is not received.
[0099] Further, the storage proof generation module 10 specifically includes:
[0100] A storage random number acquisition unit, configured to obtain the storage random number through the storage node, and obtain the node information of the storage node;
[0101] A storage proof generation unit, configured to generate the storage proof through hash value calculation based on the stored random number and the information of the storage node, where the node information includes the identity information of the storage node.
[0102] Further, the existence proof verification module 20 specifically includes:
[0103] A verification instruction sending unit, configured to send a verification instruction for randomly selecting the file to be verified from the files stored by the storage node through the verification center based on the storage proof;
[0104] An existence proof generation unit, configured to calculate the hash value of the file to be verified through the storage node after obtaining the verification instruction, generate the root of the Merkle tree corresponding to the file to be verified, and use the root of the Merkle tree as the existence proof.
[0105] Further, the proof device further includes a storage confirmation device, specifically including:
[0106] A storage confirmation unit, configured to confirm that the storage node has stored the file to be verified and has not deleted the file to be verified within a second preset time threshold if receiving the existence proof.
[0107] Further, the proof device further includes a data matching device, specifically including:
[0108] A matching unit, configured to match the storage proof with the existence proof to obtain a matching result;
[0109] A reward and punishment unit, configured to determine that the existence proof is valid and reward the storage node if the matching result is not less than a preset matching rate.
[0110] Further, the proof device further includes a validity judgment device, specifically including:
[0111] A validity judgment unit, configured to determine that the existence proof is invalid and punish the storage node if the matching result is less than the preset matching rate.
[0112] Wherein, each module in the proof device of the above decentralized storage service corresponds to each step in the proof method embodiment of the above decentralized storage service, and its functions and implementation processes will not be described in detail here.
[0113] In addition, an embodiment of the present invention further provides a computer-readable storage medium.
[0114] A proof program for a decentralized storage service is stored on a computer-readable storage medium of the present invention. When the proof program for the decentralized storage service is executed by a processor, the steps of the proof method for the decentralized storage service as described above are implemented.
[0115] Among them, the method implemented when the proof program for the decentralized storage service is executed can refer to each embodiment of the proof method for the decentralized storage service of the present invention, which will not be elaborated here.
[0116] It should be noted that in this article, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including one..." does not exclude the presence of additional identical elements in the process, method, article or system including the element.
[0117] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0118] This application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0119] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above and includes several instructions for causing a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present invention.
[0120] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A proof method for a decentralized storage service, characterized in that, The proof method includes the following steps: Obtain a stored random number, and generate a storage proof through a storage node according to the stored random number, including: Obtain the stored random number through the storage node, and obtain the node information of the storage node; Based on the stored random number and the information of the storage node, generate the storage proof through hash value calculation, where the node information includes the identity information of the storage node; Verify the file to be verified in the storage node through a verification center, and receive an existence proof, where the existence proof is sent by the storage node; Judge whether the existence proof sent by the storage node is received according to the storage proof and the existence proof; If the existence proof is not received, punish the storage node; Before obtaining the stored random number, it includes: Obtain a first preset time threshold, and use the first preset time threshold as the time interval for obtaining the stored random number through the verification center.
2. The proof method of the decentralized storage service according to claim 1, wherein, The step of verifying the file to be verified in the storage node through the verification center and receiving an existence proof, where the existence proof is sent by the storage node, includes: Based on the storage proof, randomly select the file to be verified from the files stored in the storage node through the verification center and send a verification instruction; After obtaining the verification instruction, calculate the hash value of the file to be verified through the storage node to generate the root of the Merkle tree corresponding to the file to be verified, and use the root of the Merkle tree as the existence proof.
3. The proof method of the decentralized storage service according to claim 1, wherein, Before punishing the storage node if the existence proof is not received, it further includes: If the existence proof is received, confirm that the storage node has stored the file to be verified and has not deleted the file to be verified within a second preset time threshold.
4. The proof method of the decentralized storage service according to claim 1, characterized in that, After judging whether the existence proof sent by the storage node is received according to the storage proof and the existence proof, it further includes: Match the storage proof with the existence proof to obtain a matching result; If the matching result is not less than a preset matching rate, determine that the existence proof is valid and reward the storage node.
5. The proof method of the decentralized storage service as described in claim 4, characterized in that, After matching the storage proof with the existence proof to obtain a matching result, it further includes: If the matching result is less than the preset matching rate, determine that the existence proof is invalid and punish the storage node.
6. A proof device for a decentralized storage service, characterized in that, The proof device for the decentralized storage service includes: A storage proof generation module, configured to obtain a stored random number, and generate a storage proof through a storage node according to the stored random number, including: Obtain the stored random number through the storage node, and obtain the node information of the storage node; Based on the stored random number and the information of the storage node, generate the storage proof through hash value calculation, where the node information includes the identity information of the storage node; An existence proof verification module is used to verify the file to be verified in the storage node through a verification center and receive an existence proof, where the existence proof is sent by the storage node; An existence proof judgment module is used to judge whether the existence proof sent by the storage node is received according to the storage proof and the existence proof; A reward and punishment implementation module is used to punish the storage node if the existence proof is not received; Before obtaining the storage random number, it includes: Obtain a first preset time threshold and use the first preset time threshold as the time interval for obtaining the storage random number through the verification center.
7. A proof device for decentralized storage service storage, characterized in that, The proof device stored by the decentralized storage service includes a processor, a memory, and a proof program for the decentralized storage service stored on the memory and executable by the processor. When the proof program for the decentralized storage service is executed by the processor, the steps of the proof method for the decentralized storage service according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium, characterized in that, A proof program for the decentralized storage service is stored on the computer-readable storage medium. When the proof program for the decentralized storage service is executed by a processor, the steps of the proof method for the decentralized storage service according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Decentralized data storage method, verification method and device and storage medium
CN110300173A