Decentralized storage computing method and system
By storing data index information in the blockchain and distributing the data itself, combined with asynchronous computing and incentive mechanisms, the problems of insufficient reliability and high cost in decentralized storage computing are solved, achieving efficient and reliable data storage and computing.
Patent Information
- Application Number
- CN202510103211.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2045-01-22
AI Technical Summary
Existing decentralized storage computing solutions suffer from insufficient reliability and high costs due to data expansion.
The index information of the data is stored in the state data of the blockchain, while the data itself is stored in the storage pool of the blockchain. It is calculated asynchronously, and a reasonable incentive mechanism and Bitswap protocol are used to ensure the reliability and storage efficiency of the data.
It effectively reduces storage costs, avoids the bloat of blockchain state data, improves data reliability and storage efficiency, and ensures that nodes receive fair rewards through a reasonable incentive mechanism.
Smart Images

Figure CN120011332B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of information technology, in particular to a decentralized storage computing method and system. BACKGROUND
[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 a blockchain. These technologies achieve data storage and access through a decentralized network, but have some limitations.
[0003] For example, although external storage systems such as IPFS provide decentralized storage, they lack an incentive mechanism and have 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 a bottleneck.
[0004] Also, for the solution of blockchain state storage, storing data on the blockchain state can provide high reliability and non-tamperability, but since the state data of the blockchain is a complete copy held by each node, the cost of using it for storage is very expensive, cannot carry large-scale data, the storage capacity is limited, and will cause the problem of bloating the blockchain state.
[0005] Therefore, in the existing decentralized storage computing solution, there are mainly problems of insufficient reliability and high cost caused by data bloating. SUMMARY
[0006] An object of the present application is to provide a decentralized storage computing method and system to solve the problem of insufficient reliability and high cost caused by data bloating in the prior art.
[0007] To achieve the above object, the embodiments of the present application provide a decentralized storage computing method, which comprises:
[0008] constructing first data to be stored into a data storage transaction and submitting it to a transaction pool of a blockchain, generating index information of the first data when executing the data storage transaction, storing the index information of the first data into state data of the blockchain, and storing the first data into a storage pool of the blockchain;
[0009] constructing a computing task into a computing task transaction and submitting it to a transaction pool of a blockchain, requesting all nodes of a blockchain network to obtain second data according to the index information of the second data required by the computing task when executing the computing task transaction, performing calculation according to the second data in an asynchronous manner, and obtaining a calculation result;
[0010] constructing the calculation result into a calculation result transaction and submitting the calculation result transaction to a transaction pool of the blockchain, wherein, when the calculation result transaction is executed, index information of the calculation result is generated, the index information of the calculation result is stored in state data of the blockchain, and the calculation result is published to the blockchain;
[0011] After the calculation result is published, a reward for the corresponding calculation task is locked in a verification period, and the reward is issued to the computing node after verification, wherein the reward includes a data retrieval incentive fee, and the data retrieval incentive fee is proportional to a data volume of the second data required by the calculation task.
[0012] Further, when the calculation task transaction is executed, the second data is requested from all nodes of the blockchain network according to the index information of the second data required by the calculation task, including:
[0013] When the calculation task transaction is executed, a node storing the second data is connected according to the index information of the second data required by the calculation task, and the Bitswap protocol is used to request the second data from the node.
[0014] Further, before the second data is calculated in an asynchronous manner, the method further includes:
[0015] The second data is verified to confirm that the second data matches the index information of the second data.
[0016] Further, the method further includes:
[0017] The calculation result is stored in a storage pool of the blockchain.
[0018] Further, the method further includes:
[0019] During the verification period, the correctness of the calculation result is verified by other nodes of the blockchain according to the calculation task.
[0020] Further, the method further includes:
[0021] When the verification fails, the reward for the calculation task issued to the computing node is confiscated, and the reward and the staking of the computing node are issued to the node initiating the verification.
[0022] Further, storing the first data in the storage pool of the blockchain includes:
[0023] Based on the capacity proof protocol, the first data is distributed and stored in the storage devices of the nodes of the blockchain in multiple copies or shards.
[0024] Further, when the computing task transaction is executed, the second data required by the computing task is requested from all nodes of the blockchain network according to index information of the second data, and the computing is performed in an asynchronous manner according to the second data, the computing result is obtained, and the computing result is packed into a new transaction with the index of the aggregated transaction and published to the transaction pool of the blockchain.
[0025] After the computing node obtains the computing right, the computing task transaction that has not been executed is searched in the transaction pool, and the computing task transaction is packed into an aggregated transaction based on the identifier of the computing task transaction and the proof of the computing right, so as to declare that the computing task transaction has been locked.
[0026] After the computing node packs the aggregated transaction and broadcasts it, the second data required by the computing task is requested from all nodes of the blockchain network according to index information of the second data, the computing is performed in an asynchronous manner according to the second data, the computing result is obtained, the computing result is packed into a new transaction with the index of the aggregated transaction, and the new transaction is published 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 the 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] The embodiments of the present application also provide a computer readable medium having computer program instructions stored thereon, and the computer program instructions can be executed by a processor to implement the decentralized storage computing method.
[0029] In a decentralized storage computing scheme provided by the embodiment of the application, when storing data, first data to be stored is constructed into a data storage transaction and submitted to a transaction pool of a block chain, when the data storage transaction is executed, index information of the first data is generated, the index information of the first data is stored into state data of the block chain, and the first data is stored into a storage pool of the block chain; when performing calculation, a calculation task is constructed into a calculation task transaction and submitted to a transaction pool of a block chain, when the calculation task transaction is executed, second data required by the calculation task is requested from all nodes of the block chain network according to index information of the second data, the second data is calculated in an asynchronous manner, and a calculation result is obtained; then the calculation result is constructed into a calculation result transaction and submitted to a transaction pool of a block chain, when the calculation result transaction is executed, index information of the calculation result is generated, the index information of the calculation result is stored into state data of the block chain, and the calculation result is published to the block chain; and after the calculation result is published, a reward of the corresponding calculation task is locked in a verification period, and the reward of the calculation task is issued to the calculation node after verification, the reward includes a data retrieval incentive fee, and the data retrieval incentive fee is related to a data amount of the second data required by the calculation task. In the above scheme, since the data itself is no longer directly stored into the state data of the block chain, but only the index information corresponding to the data is written into the state data of the block chain, the amount of data to be written into the state data is greatly reduced, the problem of expansion of the block chain state data can be avoided, thereby effectively reducing the storage cost, and at the same time, the data itself is stored into the storage pool of the block chain, that is, the data is distributed to each node of the block chain for storage, the risk of data loss is avoided, and the reliability of the scheme is better. BRIEF DESCRIPTION OF DRAWINGS
[0030] Other characteristics, objects and advantages of the application will become more apparent from the following detailed description of non-restrictive embodiments, made with reference to the attached drawings:
[0031] Figure 1 A flowchart of a decentralized storage computing method provided by the embodiment of the application is shown in the figure;
[0032] The same or similar reference signs in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0033] The application will be further described in detail below with reference to the drawings.
[0034] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings for the embodiments of the present application to make a clear and complete description of the technical solutions in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0035] It is to be understood that the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. It is further understood that the terms "comprising," "including," "containing," or "having" and the like, when used in the specification, specify the presence of stated features, integers, steps, operations, elements, and / or components but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It is further understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements can be present. In addition, the use of "connection" or "coupling" herein also includes wireless connection or wireless coupling. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0036] In one typical arrangement of the present application, the terminal and the device of the service network each includes one or more processors (CPUs), input / output interfaces, network interfaces, and memories.
[0037] The memory can include non-persistent memory in computer-readable media, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash memory. The memory is an example of computer-readable media.
[0038] Computer-readable media includes permanent and non-permanent, removable and non-removable media implemented by any method or technology for information storage. Information can be computer program instructions, data structures, program modules 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 technologies, compact discs (CD-ROM), digital versatile discs (DVD) or other optical storage, magnetic cassette, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device.
[0039] The embodiment of the application provides a decentralized storage computing method, when storing data, first data to be stored is constructed into a data storage transaction and submitted to a transaction pool of a block chain, when the data storage transaction is executed, index information of the first data is generated, the index information of the first data is stored into state data of the block chain, and the first data is stored into a storage pool of the block chain. When performing calculation, a calculation task can be constructed into a calculation task transaction and submitted to a transaction pool of a block chain, when the calculation task transaction is executed, according to index information of second data required by the calculation task, all nodes of a block chain network are requested to obtain the second data, the second data is calculated in an asynchronous mode, and a calculation result is obtained. Then, the calculation result is constructed into a calculation result transaction and submitted to a transaction pool of a block chain, when the calculation result transaction is executed, index information of the calculation result is generated, the index information of the calculation result is stored into state data of the block chain, and the calculation result is published into the block chain. After the calculation result is published, a reward of the corresponding calculation task is locked in a verification period, and the reward of the calculation task is issued to a calculation node after verification, and the reward includes a data retrieval incentive fee, and the data retrieval incentive fee is related to a data amount of the second data required by the calculation task.
[0040] In the above scheme, since the data itself is no longer directly stored into the state data of the block chain, but only the index information corresponding to the data is written into the state data of the block chain, the amount of data required to be written into the state data is greatly reduced, the problem of block chain state data expansion can be avoided, thereby effectively reducing the storage cost, and the data itself is stored into the storage pool of the block chain, that is, the data is distributed to each node of the entire block chain for storage, the risk of data loss is avoided, and the reliability of the scheme is better.
[0041] In an actual scene, each node in the system can be various network devices or devices formed by integrating network devices or user devices and network devices through a network, and can also be a program running in the above devices. The user device includes, but is not limited to, various terminal devices such as personal computers, mobile phones, tablet computers and the like; and the network device includes, but is not limited to, a network host, a single network server, a plurality of network server sets or a computer set based on cloud computing, and the like. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, wherein the cloud computing is a kind of distributed computing, and a virtual computer composed of a loose coupling computer set.
[0042] The meanings of the technical terms involved in the scheme of the application are as follows:
[0043] Node: An entity participating in the blockchain network, including the software it runs and the hardware resources it invests.
[0044] Transaction: A basic unit of a block in the blockchain, such as a transfer record, a contract call, a governance vote, etc.
[0045] Transaction Pool: Nodes communicate with each other to synchronize all transactions received by each other, and the collection of these transactions is called the transaction pool
[0046] Submit Transaction: After generating and signing a transaction, the user sends it to one or more nodes, which are synchronized to each node.
[0047] Storage Pool: Consensus algorithm can allocate data to be stored to each node for storage, and the logical storage body composed of these nodes is called the storage pool. The data put into the storage pool is actually allocated to each node in the entire blockchain network.
[0048] Consensus: A set of rules, mechanisms or algorithms used by the blockchain network to achieve consensus.
[0049] Block Right: The right to issue a new block, and each height will be allocated to a node by consensus.
[0050] Block Node: The node that gets the block right of the current height.
[0051] Computing Task: A computing task that a user wants a node to perform, which requires the index information of the data needed for the task and the specific operation process using the data as input.
[0052] Computing Right: The right to perform a computing task, and each height will determine which node can get the computing right for the next round by consensus.
[0053] Computing Node: The node that gets the computing right of the current round
[0054] Asynchronous Execution of Computing: The execution of a computing task does not need to be completed within a height and can span multiple heights.
[0055] Node Event: During the synchronization and execution of blocks, the node will produce some events to notify the relevant subscribers of the current state of the blockchain.
[0056] Figure 1 A processing flow of a decentralized storage computing method is shown, which includes at least the following processing steps:
[0057] Step S101, store data. The first data to be stored is constructed into a data storage transaction and submitted to the transaction pool of the blockchain. When the data storage transaction is executed, index information of the first data is generated, stored in the state data of the blockchain, and the first data is stored in the storage pool of the blockchain.
[0058] The index information can be any information that can be used to query and determine the first data, such as a hash value of the first data in this embodiment. The data amount of the index information is less than that of the first data itself, so that the user can submit a large amount of data without causing the state data of the blockchain to expand.
[0059] The scheme of this embodiment can store the first data in the storage pool of the blockchain based on a proof of concept (POC) protocol, and distribute and store the first data in the storage devices of each node of the blockchain through multiple copies or shards, thereby avoiding the risk of data loss.
[0060] Step S102, deploy a computing task. The computing task is constructed into a computing task transaction and submitted to the transaction pool of the blockchain. The computing task transaction needs to include index information of second data required by the computing task. After the computing node obtains the second data, the computing process of the computing task is executed with the second data as input.
[0061] Step S103, obtain data. When the computing task transaction is executed, the second data required by the computing task is requested from all nodes in the blockchain network according to the index information of the second data. Based on a pre-configured consensus mechanism, the blockchain network selects a node in the blockchain as a computing node for executing the computing task.
[0062] When the computing node executes the computing task, it 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 responds to the data request initiated by the computing node, so that the computing node and the node storing the second data establish a connection, and the Bitswap protocol is used to request the second data from the node. The Bitswap protocol is a peer-to-peer data exchange protocol for exchanging data between distributed file systems, which requires one party to respond to an equal amount of data from another party in the future as compensation after requesting data from another party.
[0063] Step S104, performing calculation. The computing node performs calculation according to the second data in an asynchronous manner to obtain a calculation result.
[0064] In some embodiments of the present application, since each part of the second data is obtained from each node of the blockchain respectively, in order to avoid inaccurate calculation results caused by data errors, the obtained second data can be checked before calculation. Specifically, the present scheme can check the obtained second data before performing calculation according to the second data in an asynchronous manner, and 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 check is passed, and the computing node can perform calculation according to the second data in an asynchronous manner to obtain a calculation result. When the second data does not match the index information of the second data, it means that the check is failed, and part of the second data may be incorrect or missing, so that the correct calculation result cannot be obtained, and the data request needs to be reinitiated to obtain the correct second data, thereby ensuring the accuracy of the calculation result.
[0066] Step S105, publishing the calculation result. The calculation result is constructed into a calculation result transaction, and is submitted to a transaction pool of the blockchain. When the calculation result transaction is executed, the index information of the calculation result is generated, 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 a storage pool of the blockchain.
[0067] Step S106, after the calculation result is published, the reward of the corresponding calculation task is locked within a verification period, and the reward of the calculation task is paid 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 data volume of the second data required by the calculation task.
[0068] After the computing node publishes the computing result, the reward of the corresponding computing task is locked for a period of time for other nodes to verify the computing result, which is the verification period in the present scheme. During the verification period, other nodes of the blockchain verify the correctness of the computing result according to the computing task, thereby challenging the computing result of the computing task by the computing node. If the challenge is successful within the verification period, that is, the correctness of the computing result fails to pass the verification, it indicates that the computing node may have malicious behavior, at which time the reward of the computing node for the computing task will be confiscated, and the reward and the stake of the computing node will be given to the node that initiates the verification. When there is no other node that successfully challenges within the verification period, it indicates that the computing result of the computing node is correct, at which time the reward of the computing node for the computing task will be normally given.
[0069] The reward and the stake can both be in the form of a Gas fee, which is a fee that needs to be paid when a transaction or an intelligent contract is executed on the blockchain network. Taking the incentive mechanism adopted in the present scheme as an example, the node provides data to the outside, which consumes corresponding resources such as network bandwidth, traffic, etc., so that a proper incentive mechanism needs to be established to encourage the node to provide data services. In the incentive mechanism adopted in the present scheme, the reward of the node for providing data services to the outside, in addition to the basic Gas fee, will also have a Gas fee for contract execution, which is proportional to the complexity of contract execution. In addition, a new category of Gas fee, that is, a data retrieval incentive fee, is also needed to encourage the node to provide data, the specific value of which is proportional to the data volume of the second data needed during the execution of the computing task, and the specific calculation formula can be as follows:
[0070] Gas = M x b
[0071] Wherein, M is the data volume obtained by the computing task, and b is a preset proportion coefficient, the specific value of which can be set according to the economic model in the actual application scenario.
[0072] The data retrieval incentive fee can be paid to the computing node as part of the reward. In actual scenarios, the second data needed by the computing node for executing the computing task has part that is already possessed by the computing node itself and part that is provided by other nodes. During the execution of a computing task, other nodes do not obtain direct rewards, but because of the Bitswap protocol, when other nodes are elected as computing nodes, they can also request data from the nodes from which the second data is obtained. Thus, as a whole, the Bitswap protocol ensures the fairness of all nodes of the blockchain obtaining rewards through cooperation, and for a certain computing, non-computing nodes that provide data can also obtain indirect incentives.
[0073] In some embodiments of the present application, in the specific process from data acquisition to the publication of the calculation result, the computing node can implement asynchronous calculation in the following asynchronous processing manner: after obtaining the calculation right, the computing node searches for a computing task transaction that has not been executed in the transaction pool, and packs the identification of the computing task transaction and the proof of the calculation right into an aggregated transaction for declaring that the computing task transaction has been locked. Then, after the block node packs the aggregated transaction and broadcasts it, the computing node executes the index information of the second data required according to the computing task to request all nodes of the blockchain network to acquire the second data, performs calculation according to the second data in an asynchronous manner, acquires the calculation result, packs the calculation result and the index of the aggregated transaction into a new transaction, and publishes it to the transaction pool of the blockchain.
[0074] The process of asynchronous calculation is described in detail as follows:
[0075] When the computing load of the computing task is heavy or the amount of the second data required by the computing task 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 should complete block generation in a relatively short time, especially for the blockchain network with throughput requirements, and therefore asynchronous calculation is needed to solve this problem. Taking the computing node Cn and the block node Bn at the current height determined by the network consensus in the blockchain as an example, asynchronous calculation includes the following steps:
[0076] Step S1. The computing node Cn and the block node Bn at the current height determined by the network consensus.
[0077] Step S2. After obtaining the calculation right, the computing node Cn searches for a computing task transaction that has not been executed in the transaction pool.
[0078] Step S3. The computing node Cn declares the computing task transaction to be executed. The computing node Cn packs the identification information of the computing task transaction planned to be executed and the proof of the calculation right into a new aggregated transaction and publishes it to the transaction pool. This aggregated transaction is used to declare which computing task transactions have been locked and will be executed by the computing task transaction, and the computing node at the subsequent new height will not repeat selecting these locked computing task transactions.
[0079] Step S4. The current block node Bn packs the above aggregated transaction and part of other types of transactions selected from the transaction pool into a new block and broadcasts it, at which 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 generated computing nodes C(n+1) can only find computing task transactions that have not been declared locked, and process them in the manner of steps S2-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 aggregated transaction packed before to a new transaction in the transaction pool.
[0082] Step S7. The block node B(n+k) of the current latest round packs the transaction containing the execution result, calculates the reward, and locks it, and enters the verification period.
[0083] Step S8. After the verification period ends, if no other node successfully challenges the correctness of the computing result, the task has no error in this computing result, and the reward to be paid out is unlocked.
[0084] In summary, in the scheme provided by the embodiments of the present application, since the data 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, the problem of expansion of the state data of the blockchain 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, and in fact, the data is distributed to each node of the entire blockchain for storage, avoiding the risk of data loss, and making the reliability of the scheme better.
[0085] In addition, by adopting a reasonable incentive mechanism and the Bitswap protocol, the fairness of the nodes obtaining the reward is ensured, and the asynchronous execution of the computing also improves the block efficiency of the blockchain, ensuring the throughput of the entire blockchain network.
[0086] In addition, the decentralized storage computing system provided by the embodiments of the present application can 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 triggers the implementation of the method and / or technical solution of the aforementioned embodiments of the present application.
[0087] In particular, the method and / or embodiments in the embodiments of the present application can be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising program code for executing the method shown in the flowchart. When the computer program is executed by a processing unit, the above-mentioned functions defined in the method of the present application are executed.
[0088] Note that the computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable medium can be, for example but not limited to, a computer-readable storage medium such as a floppy disk, a flexible disk, a hard disk, a magnetic tape, a magnetic disk, an optical fiber, a compact disk (CD), a digital versatile disk (DVD), a Blu-ray disk, a memory stick, a floppy disk, a random access memory (RAM), a read-only memory (ROM), a programmable ROM (EPROM), an erasable and programmable ROM (EPROM), an electrically erasable and programmable ROM (EEPROM), a flash ROM, a flash memory, a solid state disk, a hard disk, a computer-readable storage medium, or any appropriate combination thereof. In the present application, the computer-readable medium can be any tangible medium that contains or stores a program that can be used by an instruction execution system, apparatus, or device to execute the program.
[0089] In the present application, the computer-readable signal medium can include a data signal that propagates in a baseband or as part of a carrier wave by any medium, including but not limited to wire, wireline, optical fiber, cable, RF, etc., or any appropriate combination thereof. The computer-readable signal medium can also be any computer-readable medium that can send, propagate, or transport programming code to be used by an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to wireless, wireline, optical fiber, cable, RF, etc., or any appropriate combination thereof.
[0090] The computer program code for carrying out operations of the present application can be written in one or more programming languages or combinations of languages including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages such as C or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can 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 the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0091] The computer readable medium can be a storage medium or memory medium such as floppy disk, hard disk, optical disk, Blu-ray disk, DVD, CD-ROM, CD-R, CD-RW, DVD-R, DVD-RW, DVD+R, DVD+RW, HD-DVD, Blu-ray, memory stick, ROM, RAM, EEPROM, or flash memory. The computer readable medium can also be a transmission medium such as electrical or optical cable, or a computer network such as the Internet, intranet or extranet. The computer readable medium can have stored thereon computer program instructions which implement one embodiment or a combination of a plurality of embodiments of the present application. The computer program instructions can preferably be computer software programs.
[0092] As another aspect, the present application also provides a computer readable medium, which can be contained in the apparatus described in the above embodiments, or can exist separately without being assembled into the apparatus. The above computer readable medium carries one or more computer program instructions, which can be executed by a processor to implement the methods and / or technical solutions of the above 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 by using an application-specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In some 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 soft disk and similar devices. In addition, some steps or functions of the present application can be implemented by using hardware, for example, as a circuit cooperating with the processor to execute the respective steps or functions.
[0094] It will be obvious to a person skilled in the art that the application is not limited to the details of the foregoing exemplary embodiments and can be implemented in other embodiments without departing from the scope of the application. The embodiments are to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, which is intended to be illustrative only and not restrictive; therefore all changes coming within the meaning and equivalency range of the claims are intended to be embraced therein. No reference signs in the claims should be considered as limiting the scope of the claims to what the reference signs indicate. Furthermore, it is expressly intended that the description of the foregoing exemplary embodiments should not be construed as limiting the scope of the application. The term comprising, and grammatical variants thereof, should not be construed as implying exclusivity. The singular forms "a", "an", and "the" should not be construed as excluding pluralities. The use of the term "about" in relation to a numerical value specifies the open ended range extending from the lower limit to plus or minus 10% of the numerical value. Multiple units or devices recited in an apparatus claim can also be implemented by one unit or device through software or hardware. The terms first, second, etc. are used to indicate names and not any particular order. The numerical order of the numbers corresponding to the steps does not indicate any particular order of execution, and each step can be executed in any order in combination with the execution logic.
Claims
1. A decentralized storage computing method, characterized in that, The method comprises: building first data to be stored into a data storage transaction, and submitting the data storage transaction to a transaction pool of a blockchain, when the data storage transaction is executed, generating index information of the first data, storing the index information of the first data into state data of the blockchain, and storing the first data into a storage pool of the blockchain; building a computing task into a computing task transaction, and submitting the computing task transaction to a transaction pool of a blockchain, when the computing task transaction is executed, requesting all nodes of a blockchain network to obtain second data required by the computing task according to index information of the second data, performing calculation according to the second data in an asynchronous manner, and obtaining a calculation result; building the calculation result into a calculation result transaction, and submitting the calculation result transaction to a transaction pool of a blockchain, when the calculation result transaction is executed, generating index information of the calculation result, storing the index information of the calculation result into state data of the blockchain, and publishing the calculation result to the blockchain; locking a reward of the corresponding computing task within a verification period after the calculation result is published, and issuing the reward of the computing task to a computing node after verification, wherein the reward comprises a data retrieval incentive fee, and the data retrieval incentive fee is proportional to a data volume of the second data required by the computing task.
2. The method of claim 1, wherein, When the computing task transaction is executed, requesting all nodes of a blockchain network to obtain second data required by the computing task according to index information of the second data, comprising: When the computing task transaction is executed, establishing a connection with a node storing the second data according to the index information of the second data required by the computing task, and requesting the node to obtain the second data in a Bitswap protocol.
3. The method of claim 1, wherein, Before the second data is calculated in an asynchronous manner, further comprising: verifying the obtained second data, and confirming that the second data matches the index information of the second data.
4. The method of claim 1, wherein, The method further comprises: storing the calculation result into the storage pool of the blockchain.
5. The method of claim 1, wherein, The method further comprises: Within the verification period, verifying the correctness of the calculation result by other nodes of the blockchain according to the computing task.
6. The method of claim 1, wherein, The method further comprises: When the verification fails, confiscating the reward of the computing task issued to the computing node, and issuing the reward and a pledge of the computing node to a node initiating the verification.
7. The method of claim 1, wherein, Storing the first data into the storage pool of the blockchain, comprising: Based on a capacity proof protocol, the first data is distributed and stored in storage devices of each node of the blockchain in a plurality of copies or shards.
8. The method of claim 1, wherein, When the computing task transaction is executed, requesting all nodes of a blockchain network to obtain second data required by the computing task according to index information of the second data, performing calculation according to the second data in an asynchronous manner, and obtaining a calculation result, comprising: After the computing node obtains the computing right, the computing node searches for a computing task transaction that has not been executed in a transaction pool, and packs an aggregated transaction based on an identifier of the computing task transaction and a proof of the computing right, to declare that the computing task transaction has been locked; After the computing node packs the aggregated transaction and broadcasts it, the computing node requests all nodes in the blockchain network to obtain second data according to index information of the second data required by the computing task, performs computation on the second data in an asynchronous manner, obtains a computation result, packs the computation result and an index of the aggregated transaction into a new transaction, and publishes the new transaction to a transaction pool of the blockchain.
9. A system for decentralized storage computing, 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 perform the method of any one of claims 1 to 8.
10. A computer readable medium having stored thereon computer program instructions executable by a processor to implement the method of 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