Decentralized storage computing method and system
By storing the index information of data on the blockchain instead of the data itself, and using the transaction pool and storage pool on the blockchain for asynchronous processing of computing tasks, the cost problems caused by insufficient reliability and data bloat in decentralized storage computing are solved, and efficient and reliable storage and computing are achieved.
Patent Information
- Application Number
- CN202510103211.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-01-22
AI Technical Summary
In the existing decentralized storage computing solutions, there are problems such as insufficient reliability and high cost caused by data bloat.
Instead of directly storing the data itself, the data is stored by building it into data storage transactions and generating index information on the blockchain. The computing task also builds the computing task transaction, obtains the required data asynchronously for calculation, and constructs the calculation results into transactions for storage. At the same time, incentive mechanisms and Bitswap protocols are adopted to ensure data reliability and fair distribution.
It effectively reduces the problem of blockchain state data bloat, reduces storage costs, improves data reliability, and improves the throughput of blockchain network through incentive mechanisms and asynchronous computing.
Smart Images

Figure CN120011332A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a decentralized storage computing method and system. Background Art
[0002] In the field of decentralized computing and storage, common technical solutions include obtaining data through external storage systems such as IPFS (Inter Planetary File System), or storing data in the state data of the blockchain. These technologies achieve data storage and access through decentralized networks, but there are some limitations.
[0003] For example, although external storage systems such as IPFS provide decentralized storage, they lack incentive mechanisms and suffer from problems such as data loss and low storage efficiency. Especially when it comes to large-scale data storage, the access speed and reliability of IPFS become bottlenecks.
[0004] For example, for the blockchain state storage solution, storing data on the blockchain state can provide higher reliability and immutability, but because each node holds a complete copy of the blockchain state data, the cost of using it for storage is very expensive, it cannot carry large-scale data, the storage capacity is limited, and it will cause the blockchain state to expand.
[0005] From this, we can see that the main problems in existing decentralized storage and computing solutions are insufficient reliability and high costs caused by data expansion. Summary of the invention
[0006] One purpose of the present application is to provide a decentralized storage computing method and system to solve the problems of insufficient reliability and high cost caused by data expansion in the prior art.
[0007] To achieve the above purpose, the present application provides a decentralized storage computing method, which includes:
[0008] Constructing the first data to be stored into a data storage transaction and submitting it to the transaction pool of the blockchain, generating index information of the first data when executing the data storage transaction, storing the index information of the first data in the state data of the blockchain, and storing the first data in the storage pool of the blockchain;
[0009] The computing task is constructed into a computing task transaction and submitted to the transaction pool of the blockchain. When executing the computing task transaction, according to the index information of the second data required by the computing task, all nodes of the blockchain network are requested to obtain the second data, and the computing result is obtained by performing computing according to the second data in an asynchronous manner;
[0010] The calculation result is constructed into a calculation result transaction and submitted to the transaction pool of the blockchain. When executing the calculation result transaction, index information of the calculation result is generated, the index information of the calculation result is stored in the state data of the blockchain, and the calculation result is published to the blockchain;
[0011] After the calculation result is released, the reward of the corresponding computing task is locked within the verification period, and the reward of this computing task is issued to the computing node after the verification is passed. The reward includes a data retrieval incentive fee, and the data retrieval incentive fee is proportional to the amount of second data required for the computing task.
[0012] Furthermore, when executing the computing task transaction, requesting all nodes of the blockchain network to obtain the second data according to the index information of the second data required by the computing task includes:
[0013] When executing the computing task transaction, a connection is established with a node storing the second data according to the index information of the second data required by the computing task, and the Bitswap protocol is used to request the node to obtain the second data.
[0014] Furthermore, before performing calculation according to the second data in an asynchronous manner, the method further includes:
[0015] The acquired second data is verified to confirm that the second data matches the index information of the second data.
[0016] Furthermore, the method further comprises:
[0017] The calculation result is stored in the storage pool of the blockchain.
[0018] Furthermore, the method further comprises:
[0019] During the verification cycle, other nodes of the blockchain verify the correctness of the calculation result based on the calculation task.
[0020] Furthermore, the method further comprises:
[0021] When the verification fails, the reward for this computing task issued to the computing node will be confiscated, and the reward and the pledge of the computing node will be issued to the node that initiated the verification.
[0022] Further, storing the first data in a storage pool of the blockchain includes:
[0023] Based on the capacity proof protocol, the first data will be distributed and stored in the storage devices of each node of the blockchain in a plurality of copies or shards.
[0024] Furthermore, when executing the computing task transaction, requesting all nodes of the blockchain network to obtain the second data required by the computing task according to the index information of the second data, performing calculations according to the second data in an asynchronous manner, and obtaining calculation results include:
[0025] After obtaining the computing rights, the computing node searches for computing task transactions that have not been executed in the transaction pool, and packages them into an aggregate transaction based on the identifier of the computing task transaction and the computing rights certificate, which is used to declare that the computing task transaction has been locked;
[0026] After the block producing node packages and broadcasts the aggregated transaction, the computing node executes a request to obtain the second data from all nodes of the blockchain network according to the index information of the second data required for the computing task, performs calculation according to the second data in an asynchronous manner, obtains the calculation result, packages the calculation result and the index of the aggregated transaction into a new transaction, and publishes it to the transaction pool of the blockchain.
[0027] Based on another aspect of the present application, a decentralized storage computing system is also provided, which includes a memory for storing computer program instructions and a processor for executing computer program instructions, wherein when the computer program instructions are executed by the processor, the system is triggered to execute the decentralized storage computing method.
[0028] An embodiment of the present application also provides a computer-readable medium on which computer program instructions are stored, and the computer program instructions can be executed by a processor to implement the decentralized storage computing method.
[0029] In a decentralized storage computing solution provided by an embodiment of the present application, when storing data, the first data to be stored is constructed into a data storage transaction and submitted to the transaction pool of the blockchain. When executing the data storage transaction, index information of the first data is generated, the index information of the first data is stored in the state data of the blockchain, and the first data is stored in the storage pool of the blockchain. When performing calculations, the calculation task is constructed into a calculation task transaction and submitted to the transaction pool of the blockchain. When executing the calculation task transaction, a request is made to obtain the second data from all nodes of the blockchain network according to the index information of the second data required by the calculation task. The calculation is performed according to the second data in an asynchronous manner to obtain the calculation result; then the calculation result is constructed into a calculation result transaction and submitted to the transaction pool of the blockchain. When executing the calculation result transaction, the index information of the calculation result is generated, the index information of the calculation result is stored in the state data of the blockchain, and the calculation result is published in the blockchain; and after the calculation result is published, the reward of the corresponding calculation task is locked during the verification cycle, and the reward of this calculation task is issued to the calculation node after the verification is passed. The reward includes a data retrieval incentive fee, and the data retrieval incentive fee is related to the amount of the second data required by the calculation task. In the above scheme, since the data itself is no longer directly stored in the state data of the blockchain, but only the index information corresponding to the data is written into the state data of the blockchain, the amount of data that needs to be written into the state data is greatly reduced, and the problem of blockchain state data expansion can be avoided, thereby effectively reducing the storage cost. At the same time, the data itself is stored in the storage pool of the blockchain, which actually distributes the data to each node of the entire blockchain for storage, avoiding the risk of data loss, making the scheme more reliable. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0031] Figure 1 A flowchart of a decentralized storage computing method provided in an embodiment of the present application;
[0032] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0033] The present application is described in further detail below in conjunction with the accompanying drawings.
[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0035] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0036] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPU), input / output interface, network interface and memory.
[0037] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0038] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer program instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0039] An embodiment of the present application provides a decentralized storage computing method. When storing data, the method constructs the first data to be stored into a data storage transaction and submits it to the transaction pool of the blockchain. When executing the data storage transaction, index information of the first data is generated, the index information of the first data is stored in the status data of the blockchain, and the first data is stored in the storage pool of the blockchain. When performing calculations, the calculation task can be constructed into a calculation task transaction and submitted to the transaction pool of the blockchain. When executing the calculation task transaction, the second data required by the calculation task is requested from all nodes of the blockchain network to obtain the second data, and the calculation is performed according to the second data in an asynchronous manner to obtain the calculation result; then the calculation result is constructed into a calculation result transaction and submitted to the transaction pool of the blockchain. When executing the calculation result transaction, the index information of the calculation result is generated, the index information of the calculation result is stored in the status data of the blockchain, and the calculation result is published to the blockchain; and after the calculation result is published, the reward of the corresponding calculation task is locked within the verification period, and the reward of this calculation task is issued to the calculation node after the verification is passed. The reward includes a data retrieval incentive fee, and the data retrieval incentive fee is related to the data volume of the second data required by the calculation task.
[0040] In the above scheme, since the data itself is no longer directly stored in the state data of the blockchain, but only the index information corresponding to the data is written into the state data of the blockchain, the amount of data that needs to be written into the state data is greatly reduced, and the problem of blockchain state data expansion can be avoided, thereby effectively reducing storage costs. At the same time, the data itself is stored in the storage pool of the blockchain, which actually distributes the data to each node of the entire blockchain for storage, avoiding the risk of data loss and making the scheme more reliable.
[0041] In actual scenarios, each node in the system can be various types of network devices or network devices or devices formed by integrating user devices and network devices through a network, and can also be programs running in the above devices. The user devices include but are not limited to various types of terminal devices such as personal computers, mobile phones, and tablet computers; the network devices include but are not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing (Cloud Computing), where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0042] The meanings of the technical terms involved in this application are as follows:
[0043] Node: An entity participating in a blockchain network, including the software it runs and the hardware resources it invests in.
[0044] Transaction: specifically refers to the basic building blocks of a blockchain, such as transfer records, contract calls, governance votes, etc.
[0045] Transaction pool: Nodes communicate with each other and synchronize all transactions received between each other. The collection of these transactions is called a transaction pool.
[0046] Submitting a transaction: After a blockchain user generates a transaction and signs it, the transaction will be sent to any one or more nodes, and the transaction will be synchronized to each node.
[0047] Storage pool: The consensus algorithm can distribute the data that needs to be stored to each node for storage. The logical storage body composed of these nodes is called a storage pool. The data put into the storage pool is actually distributed to each node of the entire blockchain network.
[0048] Consensus: A set of rules, mechanisms or algorithms used by a blockchain network to achieve consensus.
[0049] Block production right: The right to publish a new block. At each height, the block production right will be assigned to a certain node by consensus.
[0050] Block-producing node: The node that obtains the block-producing right at the current height.
[0051] Computational task: A computational task that the user wants the node to perform. The task needs to specify the index information of the data required to perform the task, as well as the specific calculation process using the data as input.
[0052] Computing rights: The right to perform computing tasks. At each height, consensus will determine which node will obtain the next round of computing rights.
[0053] Computing node: the node that obtains the computing power for the current round
[0054] Asynchronous execution of calculations: The execution of a calculation task does not need to be completed within one height, but can span multiple heights.
[0055] Node events: During the process of synchronizing and executing blocks, nodes will generate some events to notify the relevant subscribers of the node about the current status of the blockchain.
[0056] Figure 1 The processing flow of a decentralized storage computing method provided by an embodiment of the present application is shown, which at least includes the following processing steps:
[0057] Step S101, storing data. Construct the first data to be stored into a data storage transaction and submit it to the transaction pool of the blockchain. When executing the data storage transaction, generate index information of the first data, store the index information of the first data in the state data of the blockchain, and store the first data in the storage pool of the blockchain.
[0058] The index information may be any information that can be used to query and determine the first data. For example, in this embodiment, the index information may be a hash value of the first data. The amount of index information is smaller than the first data itself. Therefore, by storing the index information of the first data in the state data of the blockchain and storing the complete first data in the storage pool of the blockchain, users can submit a large amount of data without causing the state data of the blockchain to expand.
[0059] The solution of this embodiment can distribute and store the first data in the storage devices of each node of the blockchain in multiple copies or shards based on the Proof of Concept (POC) protocol when storing the first data in the storage pool of the blockchain, thereby avoiding the risk of data loss.
[0060] Step S102, deploying computing tasks. The computing tasks are constructed into computing task transactions and submitted to the transaction pool of the blockchain. The computing task transactions need to include index information of the second data required for the computing tasks. After the computing nodes obtain the second data, they use the second data as input to execute the computing process of the computing tasks.
[0061] Step S103, obtaining data. When executing the computing task transaction, request all nodes of the blockchain network to obtain the second data according to the index information of the second data required by the computing task. The blockchain network will select a node in the blockchain as a computing node based on a pre-configured consensus mechanism to execute the computing task.
[0062] When executing a computing task, the computing node first broadcasts a data request to all nodes in the blockchain network according to the index information in the computing task. The node storing the second data will respond to the data request initiated by the computing node, so that a connection is established between the computing node and the node storing the second data, and the Bitswap (data block exchange) protocol is used to request the node to obtain the second data. Among them, the Bitswap protocol is a point-to-point data exchange protocol for exchanging data between distributed file systems. The protocol requires that after one party requests the data of the other party, it also needs to respond to the other party with an equal amount of data as compensation within a period of time in the future.
[0063] Step S104, performing calculations: The calculation node performs calculations according to the second data in an asynchronous manner to obtain calculation results.
[0064] In some embodiments of the present application, since each part of the second data is obtained from each node of the blockchain, in order to avoid data errors leading to inaccurate subsequent calculation results, the obtained second data can be verified before the calculation. Specifically, before the present solution adopts an asynchronous method to calculate according to the second data, the obtained second data can also be verified to confirm that the second data matches the index information of the second data.
[0065] When it is confirmed that the second data matches the index information of the second data, it means that the verification is passed, and the computing node can use an asynchronous method to perform calculations based on the second data to obtain the calculation results. When the second data does not match the index information of the second data, it means that the verification has not passed, and it may be that part of the second data is wrong or missing, and the correct calculation result cannot be obtained. It is necessary to re-initiate a data request to obtain the correct second data, thereby ensuring the accuracy of the calculation result.
[0066] Step S105, publish the calculation result. The calculation result is constructed into a calculation result transaction and submitted to the transaction pool of the blockchain. When executing the calculation result transaction, the index information of the calculation result is generated, the index information of the calculation result is stored in the state data of the blockchain, and the calculation result is published to the blockchain. In actual scenarios, if necessary, the calculation result can also be stored in the storage pool of the blockchain.
[0067] Step S106, after the calculation result is released, the reward of the corresponding calculation task is locked in the verification period, and the reward of this calculation task is issued to the calculation node after the verification is passed, and the reward includes a data retrieval incentive fee, and the data retrieval incentive fee is proportional to the amount of the second data required by the calculation task.
[0068] After the computing node publishes the calculation result, the reward of the corresponding computing task will be locked for a period of time to allow other nodes to verify the calculation result. This period of time is the verification cycle in this scheme. During the verification cycle, other nodes of the blockchain verify the correctness of the calculation result based on the calculation task, thereby challenging the calculation result of the computing node for the calculation task. If the challenge is successful during the verification cycle, that is, the correctness of the calculation result fails to pass the verification, it means that the computing node may have committed a malicious act. At this time, the reward for this calculation task issued to the computing node will be confiscated, and the reward and the pledge of the computing node will be issued to the node that initiated the verification. When no other node challenges successfully during the verification cycle, it means that the calculation result of the computing node is correct, and the reward for this calculation task will be issued to the computing node normally.
[0069] Among them, both the reward and the pledge can be in the form of Gas fees, which refers to the fees that need to be paid when conducting transactions or executing smart contracts on the blockchain network. Taking the incentive mechanism adopted in this scheme as an example, when nodes provide data to the outside, it will consume corresponding resources, such as network bandwidth, traffic, etc., so it is necessary to establish an appropriate incentive mechanism to encourage nodes to provide data services to the outside. In the incentive mechanism adopted by this scheme, the reward for nodes to provide data services to the outside, in addition to the basic Gas fee, there will also be Gas fees for contract execution. This part of the Gas fee is proportional to the complexity of the contract execution. In addition, it is also necessary to include a new category of Gas fees, namely data retrieval incentive fees, which are used to incentivize nodes to provide data. Its specific value is proportional to the amount of second data required when executing the computing task. The specific calculation formula can be as follows:
[0070] Gas=M×b
[0071] Among them, M is the amount of data obtained by the computing task, and b is the preset proportional coefficient, and its specific value may need to be set according to the economic model in the actual application scenario.
[0072] Data retrieval incentive fees can be paid to computing nodes as part of the reward. In actual scenarios, the second data required by computing nodes to perform computing tasks is partly owned by the computing nodes themselves, and partly provided by other nodes. During the execution of a computing task, other nodes do not receive direct rewards, but because of the existence of the Bitswap protocol, when other nodes are elected as computing nodes, they can also request data from the nodes that have obtained the second data from them. Therefore, on the whole, the Bitswap protocol ensures the fairness of all nodes in the blockchain to obtain rewards through cooperation. For a certain calculation, non-computing nodes that provide data can also receive indirect incentives.
[0073] In some embodiments of the present application, in the specific process from data acquisition to calculation result release, the computing node can implement asynchronous computing in the following asynchronous processing manner: after the computing node obtains the computing right, it searches for computing task transactions that have not been executed in the transaction pool, and packages them into an aggregate transaction based on the identifier of the computing task transaction and the computing right certificate, which is used to declare that the computing task transaction has been locked. Then, after the block node packages the aggregate transaction and broadcasts it, the computing node executes a request to obtain the second data from all nodes of the blockchain network based on the index information of the second data required by the computing task, performs calculations based on the second data in an asynchronous manner, obtains the calculation results, packages the calculation results and the index of the aggregate transaction into a new transaction, and publishes it to the transaction pool of the blockchain.
[0074] The following is a detailed description of the asynchronous computing process:
[0075] When the computing load of the computing task is heavy, or the amount of second data that the computing task needs to obtain is large, the execution of the computing task will take a long time. This is contrary to the requirement that the block node in the blockchain must complete the block in a relatively short time, especially for the blockchain network with throughput requirements. Therefore, it is necessary to use asynchronous computing to solve this problem. Taking the current height computing node Cn and block node Bn determined by the network consensus in the blockchain as an example, asynchronous computing includes the following steps:
[0076] Step S1. The network consensus determines the current height of the computing node Cn and the block node Bn.
[0077] Step S2. After obtaining the computing right, the computing node Cn will search for computing task transactions that have not been executed in the transaction pool.
[0078] Step S3. Computing node Cn declares the computing task transactions to be executed. Computing node Cn packages the identification information and computing right proof of the computing task transactions it plans to execute into a new aggregate transaction and publishes it to the transaction pool. This aggregate transaction is used to declare which computing task transactions have been locked and will be executed by computing task transactions. The computing nodes generated by the subsequent new heights will not repeatedly select these locked computing task transactions.
[0079] Step S4. The current block-producing node Bn packages the above-mentioned aggregated transaction and some other types of transactions selected from the transaction pool into a new block and broadcasts it. At this time, the computing node Cn can start executing the computing task.
[0080] Step S5. A new round of computing nodes C(n+1) and block nodes B(n+1) will be generated at the new height. The newly appeared computing node C(n+1) can only look for computing task transactions that have not been declared locked, and process them using the aforementioned steps S2 to S4.
[0081] Step S6. After k heights, the computing node Cn completes the computing task and publishes the computing result and the index information of the previously packaged aggregated transaction as a new transaction to the transaction pool.
[0082] Step S7. The latest block-producing node B (n+k) will package the transaction containing the execution result, calculate the reward and lock it, and enter the verification cycle.
[0083] Step S8. After the verification cycle ends, if no other node successfully challenges the correctness of the calculation result, the calculation result of the task is correct and the reward to be issued is unlocked.
[0084] To sum up, in the solution provided by the embodiment of the present application, since the data itself is no longer directly stored in the state data of the blockchain, but only the index information corresponding to the data is written into the state data of the blockchain, the amount of data that needs to be written into the state data is greatly reduced, and the problem of blockchain state data expansion can be avoided, thereby effectively reducing storage costs. At the same time, the data itself is stored in the storage pool of the blockchain, which actually distributes the data to each node of the entire blockchain for storage, avoiding the risk of data loss and making the solution more reliable.
[0085] In addition, the fairness of node rewards is ensured by adopting a reasonable incentive mechanism and the Bitswap protocol, and the asynchronous execution of calculations also improves the efficiency of blockchain block generation and ensures the throughput of the entire blockchain network.
[0086] In addition, an embodiment of the present application provides a decentralized storage computing system, which may include a memory for storing computer program instructions and a processor for executing computer program instructions, wherein when the computer program instructions are executed by the processor, the system is triggered to implement the methods and / or technical solutions of the aforementioned multiple embodiments of the present application.
[0087] In particular, the methods and / or embodiments in the embodiments of the present application may be implemented as computer software programs. For example, the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the processing unit, the above functions defined in the method of the present application are executed.
[0088] It should be noted that the computer-readable medium described in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0089] In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0090] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0091] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0092] As another aspect, the present application further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more computer program instructions, which may be executed by a processor to implement the methods and / or technical solutions of the above multiple embodiments of the present application.
[0093] It should be noted that the present application can be implemented in software and / or a combination of software and hardware, for example, can be implemented using an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In certain embodiments, the software program of the present application can be executed by a processor to implement the above steps or functions. Similarly, the software program of the present application (including related data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and similar devices. In addition, some steps or functions of the present application can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform each step or function.
[0094] For those skilled in the art, it is obvious that the present application is not limited to the details of the above exemplary embodiments, and the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to represent names, and do not represent any specific order. The numerical order of the serial numbers corresponding to the steps does not represent any specific execution order, and each step can be executed in any order combination under the premise of conforming to the execution logic.
Claims
1. A decentralized storage computing method, characterized in that: The method comprises: Constructing the first data to be stored into a data storage transaction and submitting it to the transaction pool of the blockchain, generating index information of the first data when executing the data storage transaction, storing the index information of the first data in the state data of the blockchain, and storing the first data in the storage pool of the blockchain; The computing task is constructed into a computing task transaction and submitted to the transaction pool of the blockchain. When executing the computing task transaction, according to the index information of the second data required by the computing task, all nodes of the blockchain network are requested to obtain the second data, and the computing result is obtained by performing computing according to the second data in an asynchronous manner; The calculation result is constructed into a calculation result transaction and submitted to the transaction pool of the blockchain. When executing the calculation result transaction, index information of the calculation result is generated, the index information of the calculation result is stored in the state data of the blockchain, and the calculation result is published to the blockchain; After the calculation result is released, the reward of the corresponding computing task is locked within the verification period, and the reward of this computing task is issued to the computing node after the verification is passed. The reward includes a data retrieval incentive fee, and the data retrieval incentive fee is proportional to the amount of second data required for the computing task.
2. The method according to claim 1, characterized in that When executing the computing task transaction, requesting all nodes of the blockchain network to obtain the second data according to the index information of the second data required by the computing task includes: When executing the computing task transaction, a connection is established with a node storing the second data according to the index information of the second data required by the computing task, and the Bitswap protocol is used to request the node to obtain the second data.
3. The method according to claim 1, characterized in that Before performing calculation according to the second data in an asynchronous manner, the method further includes: The acquired second data is verified to confirm that the second data matches the index information of the second data.
4. The method according to claim 1, characterized in that: The method further comprises: The calculation result is stored in the storage pool of the blockchain.
5. The method according to claim 1, characterized in that The method further comprises: During the verification cycle, other nodes of the blockchain verify the correctness of the calculation result based on the calculation task.
6. The method according to claim 1, characterized in that The method further comprises: When the verification fails, the reward for this computing task issued to the computing node will be confiscated, and the reward and the pledge of the computing node will be issued to the node that initiated the verification.
7. The method according to claim 1, characterized in that Storing the first data in a storage pool of the blockchain includes: Based on the capacity proof protocol, the first data will be distributed and stored in the storage devices of each node of the blockchain in a plurality of copies or shards.
8. The method according to claim 1, characterized in that When executing the computing task transaction, requesting all nodes of the blockchain network to obtain the second data required by the computing task according to the index information of the second data, performing calculations according to the second data in an asynchronous manner, and obtaining calculation results, including: After obtaining the computing rights, the computing node searches for computing task transactions that have not been executed in the transaction pool, and packages them into an aggregate transaction based on the identifier of the computing task transaction and the computing rights certificate, which is used to declare that the computing task transaction has been locked; After the block producing node packages and broadcasts the aggregated transaction, the computing node executes a request to obtain the second data from all nodes of the blockchain network according to the index information of the second data required for the computing task, performs calculation according to the second data in an asynchronous manner, obtains the calculation result, packages the calculation result and the index of the aggregated transaction into a new transaction, and publishes it to the transaction pool of the blockchain.
9. A decentralized storage computing system, characterized in that: The system comprises a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the system is triggered to execute the method according to any one of claims 1 to 8.
10. A computer readable medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Indexing and recovering encoded blockchain data
CN111373693A
Digital certificate storage method, device and system and medium
CN116610754A
Optimizing queries and other retrieve operations in a blockchain
US20190042620A1
Blockchain implementing reliability database
US20200110812A1
Systems, methods, and apparatuses for implementing efficient storage and validation of data and metadata within a blockchain using distributed ledger technology (DLT)
US20200250174A1