Transaction execution method and device based on blockchain, and electronic device

By using content summary of third-party storage systems in blockchain transactions for content checksum execution, the problem of closed-loop data usage in blockchain network is solved, data redundant storage is reduced, and storage performance is improved.

CN112767158BActive Publication Date: 2024-11-08ANTCHAIN TECHNOLOGY PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110077763.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-02-27
Publication Date
2024-11-08
Estimated Expiration
2038-02-27

AI Technical Summary

Technical Problem

There is a closed loop of data usage in the blockchain network, and the data content cannot be referenced from externally stored, resulting in a degradation of data redundant storage and storage performance.

Method used

Carry out the content summary of the third-party storage system in blockchain transactions, query and verify the target content from the third-party storage system, and only execute transactions and store transaction records after the content verification is passed, so as to avoid the original content in the blockchain nodes Redundant storage on the device.

Benefits of technology

It breaks the closed loop of blockchain data usage, reduces the redundant synchronization of third-party storage system content, and improves the storage performance and efficiency of blockchain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112767158B_ABST
    Figure CN112767158B_ABST
Patent Text Reader

Abstract

One or more embodiments of the present specification provide a transaction execution method and apparatus, and an electronic device based on blockchain, which may include: a node device of the blockchain receives a target transaction; wherein at least part of the transaction content in the target transaction includes a content summary of the target content stored in a third-party storage system connected to the blockchain; querying the third-party storage system for the target content corresponding to the content summary, and performing content verification on the target content; if the target content verification passes, executing the target transaction based on the transaction content in the target transaction, and storing the target transaction in the distributed database of the blockchain after the execution of the target transaction is completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of this specification relate to the field of blockchain technology, and in particular, to a transaction execution method and device based on blockchain, and an electronic device. Background Art

[0002] Blockchain technology, also known as distributed ledger technology, is an emerging technology in which several computing devices jointly participate in "bookkeeping" and jointly maintain a complete distributed database. Due to the characteristics of blockchain technology being decentralized, open and transparent, each computing device can participate in database records, and data can be quickly synchronized between computing devices, the use of blockchain technology to build a decentralized system and include various execution programs in the distributed database of the blockchain for automatic execution has been widely used in many fields; for example, in the field of financial technology, the use of blockchain technology to build a P2P payment platform and publish execution programs such as smart contracts on the blockchain can achieve point-to-point secure payment between different users without going through financial institutions such as banks. Summary of the invention

[0003] This specification proposes a transaction execution method based on blockchain, including:

[0004] A node device of the blockchain receives a target transaction; wherein at least part of the transaction content in the target transaction includes a content summary of the target content stored in a third-party storage system connected to the blockchain;

[0005] querying the third-party storage system for target content corresponding to the content summary, and performing content verification on the target content;

[0006] If the target content verification passes, the target transaction is executed based on the transaction content in the target transaction, and the target transaction is stored in the distributed database of the blockchain after the target transaction is executed.

[0007] Optionally, the third-party storage system stores a correspondence between the target content and a content summary of the target content;

[0008] The querying the third-party storage system for target content corresponding to the content summary includes:

[0009] The content summary is used as a query index to initiate a query to the third-party storage system to query the target content corresponding to the content summary.

[0010] Optionally, the performing content verification on the target content includes:

[0011] Calculating a content summary of the target content based on a preset summary algorithm;

[0012] Determining whether the calculated content summary is consistent with the content summary of the target content in the target transaction;

[0013] If the calculated content digest is consistent with the content digest of the target content in the target transaction, it is determined that the verification of the target content is passed.

[0014] Optionally, the third-party storage system includes a centralized content-addressable storage (CAS) system; or a distributed CAS storage system.

[0015] Optionally, the blockchain includes any member blockchain in a consortium chain consisting of several member blockchains.

[0016] Optionally, the third-party storage system is another member blockchain between the alliance chain and the blockchain that has a cross-chain data reference relationship.

[0017] Optionally, the alliance chain is a directed acyclic graph (DAG) structure constructed based on the cross-chain data reference relationship between member blockchains.

[0018] This specification also proposes a transaction execution device based on blockchain, including:

[0019] A receiving module receives a target transaction; wherein at least part of the transaction content in the target transaction includes a content summary of the target content stored in a third-party storage system connected to the blockchain;

[0020] A query module, querying the third-party storage system for target content corresponding to the content summary, and performing content verification on the target content;

[0021] The execution module executes the target transaction based on the transaction content in the target transaction if the target content verification passes, and stores the target transaction in the distributed database of the blockchain after the target transaction is executed.

[0022] Optionally, the third-party storage system stores a correspondence between the target content and a content summary of the target content;

[0023] The query module:

[0024] The content summary is used as a query index to initiate a query to the third-party storage system to query the target content corresponding to the content summary.

[0025] Optionally, the execution module further:

[0026] Calculating a content summary of the target content based on a preset summary algorithm;

[0027] Determining whether the calculated content summary is consistent with the content summary of the target content in the target transaction;

[0028] If the calculated content digest is consistent with the content digest of the target content in the target transaction, it is determined that the verification of the target content is passed.

[0029] Optionally, the third-party storage system includes a centralized content-addressable storage (CAS) system; or a distributed CAS storage system.

[0030] Optionally, the blockchain includes any member blockchain in a consortium chain consisting of several member blockchains.

[0031] Optionally, the third-party storage system is another member blockchain between the alliance chain and the blockchain that has a cross-chain data reference relationship.

[0032] Optionally, the alliance chain is a directed acyclic graph (DAG) structure constructed based on the cross-chain data reference relationship between member blockchains.

[0033] This specification also proposes an electronic device, comprising:

[0034] processor;

[0035] memory for storing machine-executable instructions;

[0036] Wherein, by reading and executing machine-executable instructions stored in the memory corresponding to control logic for blockchain-based transaction execution, the processor is caused to:

[0037] A target transaction is received; wherein at least part of the transaction content in the target transaction includes a content summary of the target content stored in a third-party storage system connected to the blockchain;

[0038] querying the third-party storage system for target content corresponding to the content summary, and performing content verification on the target content;

[0039] If the target content verification passes, the target transaction is executed based on the transaction content in the target transaction, and the target transaction is stored in the distributed database of the blockchain after the target transaction is executed.

[0040] Through the above embodiments, by carrying the content summary of the target content stored in the third-party storage system connected to the blockchain in the transaction content of the transaction published to the blockchain, the node device in the blockchain that receives the transaction can query the third-party storage system for the corresponding target content based on the content summary, perform content verification on the target content, and execute the transaction after the target content verification passes, and store the transaction in the distributed database of the blockchain after the transaction is executed, thereby enabling the user to reference the target content stored in the third-party storage system connected to the blockchain as the transaction content in the transaction published to the blockchain, and avoiding the synchronization of the original content of the target content stored in the third-party storage system to each node device in the blockchain, which causes redundant data storage on the blockchain. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a flowchart of a transaction execution method based on blockchain provided by an exemplary embodiment.

[0042] Figure 2 This is a structural diagram of a consortium chain provided by an exemplary embodiment.

[0043] Figure 3 It is a schematic structural diagram of an electronic device provided by an exemplary embodiment.

[0044] Figure 4 It is a block diagram of a transaction execution device based on blockchain provided by an exemplary embodiment. DETAILED DESCRIPTION

[0045] In the traditional blockchain transaction process, the transaction content in the transaction (transfer) usually comes entirely from the data content stored in the blockchain's distributed database (i.e., the blockchain ledger), and cannot reference data content stored in external storage; therefore, for each node device in the blockchain network, when executing transactions issued by member users connected to the blockchain, the data content involved in the transaction content all comes from the chain, thus forming a "closed loop of data usage."

[0046] The purpose of this specification is to disclose a technical solution for breaking the "data usage closed loop" of blockchain by referencing immutable data content stored in a third-party storage platform as transaction content in blockchain transactions (transfer).

[0047] During implementation, the blockchain can be pre-connected with a third-party storage system, and a number of immutable data contents that can be referenced by transactions published on the blockchain can be pre-stored in the third-party storage system. When a member user connected to the blockchain publishes a transaction to the blockchain, he or she can add a summary of the data contents stored in the third-party storage system to the transaction to reference the data contents stored in the third-party storage system as the transaction content.

[0048] When a node device on the blockchain receives a transaction published by the above-mentioned member user, it can initiate a query to the above-mentioned third-party storage system based on the content summary to query the data content corresponding to the content summary, and perform content verification on the queried data content; when the content verification passes, the transaction can be executed based on the complete transaction content in the transaction, and the transaction can be stored in the distributed database of the blockchain after the transaction is executed.

[0049] In the above embodiments, by carrying a content summary of the target content stored in a third-party storage system connected to the blockchain in the transaction content of the transaction published to the blockchain, the node device in the blockchain that receives the transaction can query the third-party storage system for the corresponding target content based on the content summary, perform content verification on the target content, and execute the transaction after the target content verification passes, and store the transaction in the distributed database of the blockchain after the transaction is executed, thereby enabling the user to reference the target content stored in the third-party storage system connected to the blockchain as the transaction content in the transaction published to the blockchain, and avoiding synchronizing the original content of the target content stored in the above-mentioned third-party storage system to each node device in the blockchain, thereby causing redundant data storage on the blockchain.

[0050] The present specification is described below through specific embodiments and in combination with specific application scenarios.

[0051] Please refer to Figure 1 , Figure 1 A transaction execution method based on blockchain is provided in an embodiment of this specification, which is applied to a node device in the blockchain and performs the following steps:

[0052] Step 102: A node device of the blockchain receives a target transaction; wherein at least part of the transaction content in the target transaction includes a content summary of the target content stored in a third-party storage system connected to the blockchain;

[0053] Step 104: query the third-party storage system for target content corresponding to the content summary, and perform content verification on the target content;

[0054] Step 106: If the target content is verified, the target transaction is executed based on the transaction content in the target transaction, and the target transaction is stored in the distributed database of the blockchain after the target transaction is executed. The blockchain described in this specification may specifically include any type of blockchain network that can reference immutable data content stored in a third-party storage system connected to the blockchain as transaction content in the supported blockchain transactions.

[0055] For example, in one scenario, the blockchain can be any member blockchain in a consortium chain consisting of several member blockchains. In the consortium chain, in the blockchain transactions supported by each member blockchain, data content stored in other member blockchains can be cross-chain referenced as transaction content.

[0056] The above-mentioned third-party storage system includes a CAS (content-addressable-storage) storage platform that provides reliable data storage services for blockchain. Content addressability means that data is no longer addressed by the storage offset of the data in the storage system, but by the content of the data.

[0057] In the CAS storage platform, the content summary of the stored data content (such as the content hash value obtained by hashing the data content) can be used as a query index for the original data content, and the correspondence between the query index and the original data content can be saved, so that the data query party can query the corresponding original data content from the CAS storage platform by using the content summary as the query index.

[0058] In practical applications, the third-party storage system may include a traditional centralized CAS (content-addressable-storage) system; or, it may include a decentralized distributed CAS system;

[0059] For example, in one scenario, the blockchain can be any member blockchain in a consortium chain consisting of several member blockchains. The third-party storage system can be a distributed system based on the OSS (Object Storage Service) architecture, which is deployed in the consortium chain and can be connected to each member blockchain in the consortium chain.

[0060] Alternatively, in another example, other member blockchains in the above-mentioned alliance chain, except for the above-mentioned blockchain, that have a data cross-chain reference relationship with the blockchain can also be used as a third-party storage system connected to the blockchain to realize cross-chain data references between the member blockchains.

[0061] The following takes the above-mentioned blockchain as an example of a member blockchain in a consortium chain composed of several member blockchains, and combines "third-party storage system deployment", "transaction content reference", "transaction content addressing" and "transaction execution" to explain the technical solution of this specification in detail.

[0062] 1) Third-party storage system deployment

[0063] In this specification, the operator can pre-build a consortium chain consisting of several member blockchains. In the consortium chain, each member blockchain is a consortium member in the consortium chain. The above blockchain can specifically be any member blockchain in the consortium chain.

[0064] The operator of the alliance chain can also deploy a third-party storage system in the alliance chain, connect with each member blockchain in the alliance chain, and provide reliable data storage services to each member blockchain.

[0065] For example, the third-party storage system can provide a continuous and reliable API access interface for each member blockchain, so that each member blockchain in the alliance chain can connect to the third-party storage system by accessing the API access interface.

[0066] Among them, when deploying a third-party storage system in the alliance chain, a global third-party storage system can be deployed for the alliance chain, or an independent third-party storage system can be deployed for each member blockchain in the alliance chain, which is not specifically limited in this specification.

[0067] In this specification, the third-party storage system may be a CAS storage system that supports content addressability. In practical applications, the third-party storage system may be a traditional centralized CAS system or a distributed CAS system.

[0068] Among them, the above-mentioned distributed CAS system may include a traditional centralized distributed system and a decentralized distributed system.

[0069] In one embodiment shown, the third-party storage system may be a centralized distributed system such as an OSS architecture that is deployed in the alliance chain and can be connected to each member blockchain in the alliance chain.

[0070] In another embodiment shown, the third-party storage system can also be a decentralized distributed system. In implementation, other member blockchains in the alliance chain other than the blockchain that have a cross-chain data reference relationship with the blockchain can be used as a third-party storage system connected to the blockchain. That is, any member blockchain in the alliance chain can be used as a third-party storage system connected to another member blockchain to achieve cross-chain data reference.

[0071] For example, in one scenario, the operator can build a consortium chain based on actual business needs and assign different business roles to each member blockchain in the consortium chain; that is, the consortium chain corresponds to a complete business process, and each member blockchain can correspond to a sub-process in the above completed business process.

[0072] For example, in one example, taking the alliance chain built by the operator based on the business demand of "online rental transaction" as an example, the member blockchains that make up the alliance chain can include "transaction chain", "authentication chain" and "data chain". Among them, "transaction chain", "authentication chain" and "data chain" can correspond to a sub-process in the business process of "online rental transaction" respectively; for example, "data chain" is used to maintain the real-name data of the renting user; "authentication chain" is used to complete the real-name authentication of the user's rental; and "transaction chain" is used to complete the online rental transaction.

[0073] Then, the operator can build the alliance chain into a DAG (Directed Acyclic Graph) structured topology graph at the business level based on the one-way cross-chain data reference relationship between the member blockchains.

[0074] It should be noted that the unidirectional cross-chain data reference relationship between member blockchains usually depends on actual business needs and is not specifically limited in this specification.

[0075] For example, see Figure 2 , Figure 2 A schematic diagram of a consortium chain with a DAG structure shown as an example.

[0076] like Figure 2As shown in the figure, still taking the alliance chain built by the operator based on the business demand of "online rental" as an example, the member blockchains that make up the alliance chain can include "transaction chain", "certification chain" and "data chain". Among them, the "data chain" is used to maintain the real-name data of the rental users. Users can store their personal real-name data in the distributed database of the "data chain" by publishing transactions on the "data chain"; the "certification chain" is used to reference the real-name data of the users published on the "data chain" to complete the real-name authentication of the user's rental. Users can complete their personal real-name authentication by publishing transactions on the "certification chain" and publish the real-name authentication results on the distributed database of the "certification chain"; and the "transaction chain" is used to reference the real-name authentication results for users published on the "certification chain". Users can complete online rental transactions by publishing transactions on the "transaction chain" and publish the transaction results on the distributed database of the "certification chain".

[0077] By using other member blockchains that have a cross-chain data reference relationship with any target member blockchain in the above-mentioned alliance chain as a distributed storage platform connected to the target member blockchain, on the one hand, cross-chain data references between various member blockchains can be realized at the business level; on the other hand, since the member blockchain as a third-party storage system no longer needs to synchronize the original content of the above-referenced target content to each node device in the above-mentioned target member blockchain, and the above-mentioned target member blockchain no longer needs to store the original content of the above-referenced target content; therefore, for the above-mentioned target member blockchain, it is no longer necessary to perform additional data association between the original content of the target content stored in the target member blockchain and the referenced target content synchronized with the member blockchain as a third-party storage system. Only through the content summary of the referenced target content, the data association of the referenced target content on two different blockchains can be realized, which can ensure the consistency of the target content referenced by the above-mentioned target member blockchain and the above-referenced target content stored on the member blockchain as a third-party storage system in business semantics.

[0078] 2) Transaction content reference

[0079] In this specification, users who need to access the alliance chain can register in advance in the alliance chain and obtain a pair of public and private keys returned by the alliance chain. When the registration is completed, the alliance chain can create a corresponding account object for the user.

[0080] For registered users, they can access each member blockchain through the API interface provided by each member blockchain in the alliance chain, and complete the corresponding business operations in each member blockchain by publishing transactions signed by the private key held. Figure 2Taking the “transaction chain” in the alliance chain shown in as an example, users can complete online rental transactions by publishing transactions in the “transaction chain”.

[0081] During implementation, the operator of the alliance chain can develop client software (such as APP) for member users who access the alliance chain, and member users can use the client software to assemble transaction data in accordance with the standard transaction format supported by the alliance chain, and by calling the API interface provided by each member blockchain, publish the composed transaction data to the target member blockchain specified by the member user in the alliance chain for execution.

[0082] Among them, the transaction data assembled by the member users through the client software can carry the transaction contents specified by the member users, and at least part of the transaction contents can be replaced by the content summary.

[0083] In one embodiment shown, when a member user assembles transaction data that needs to be executed on the above-mentioned target member blockchain through the client software, the member user can fill in the transaction content through the client software; and the client software can parse the transaction content filled in by the member user to determine whether the transaction content filled in by the member user has been stored in a third-party storage system connected to the above-mentioned target member blockchain.

[0084] If the transaction content filled in by the member user contains transaction content that has already been stored in the third-party storage system, the member user can query the third-party storage system for the content summary corresponding to this part of the transaction content (i.e., query index), or recalculate the content summary for this part of the transaction content according to the same content summary algorithm supported by the third-party storage system, and then fill the content summary into the marked transaction format;

[0085] For example, during implementation, a content summary field for carrying transaction content can be extended in the standard transaction format supported by the consortium chain. When the client software assembles transaction data according to the standard transaction format, the content summary of all transaction contents stored in the above-mentioned third-party storage system can be filled into the content summary field.

[0086] 3) Transaction content addressing

[0087] In this specification, the node device connected to the registered member user in the above-mentioned target member blockchain can first authenticate the user based on the public key corresponding to the private key held by the user after receiving the transaction issued by the user based on the private key;

[0088] For example, in actual applications, a user can sign the initiated transaction based on the private key he holds, and the node device in the blockchain can authenticate the signature based on the public key corresponding to the private key held by the user; if the signature authentication is successful, the identity authentication of the user is successful.

[0089] When the identity authentication is passed, the node device can parse the transaction content carried in the received transaction to determine whether there is a content summary in the transaction content carried in the transaction;

[0090] For example, the node device may determine whether there is a content summary in the transaction content carried in the transaction by parsing whether the content summary field extended from the standard transaction format and used to carry the transaction content is a null value.

[0091] If there is a content summary in the transaction content carried in the transaction, it indicates that part of the transaction content in the transaction refers to data content already stored in the above-mentioned third-party storage system. In this case, in order to obtain the complete transaction content carried in the transaction, the node device can query the third-party storage system connected to the above-mentioned target member blockchain for the target content corresponding to the content summary.

[0092] During implementation, the node device can construct a query request, carry the above content summary as a query index in the query request, and then submit the query request to the above third-party storage system. After receiving the query request, the above third-party storage system can read the query index from the query request, and then based on the query index, traverse the correspondence between the locally stored data content and the content summary to query the target content corresponding to the above query index, and return the queried target content to the above node device.

[0093] It should be noted that, in actual applications, in addition to carrying the content summary as a query index, the query request may also carry some auxiliary query parameters in order to quickly search for target content corresponding to the content summary;

[0094] For example, taking the third-party storage system connected to the above-mentioned target member blockchain as an example, which is other member blockchains in the above-mentioned alliance chain that have a cross-chain reference relationship with the target member blockchain in terms of data storage, in this case, since the referenced data content and the corresponding content summary stored in other member blockchains as the third-party storage system are usually stored in the distributed database of the blockchain in the form of blocks; therefore, in order to facilitate the query, the member blockchain number, block number, etc. where the above-mentioned content summary is located can also be carried in the above-mentioned query request as auxiliary query parameters.

[0095] 4) Transaction Execution

[0096] In this specification, when the node device queries the target content corresponding to the content summary carried in the received transaction from a third-party storage system connected to the above-mentioned target member blockchain, the node device can execute the transaction in the target member blockchain based on the complete transaction content carried in the transaction.

[0097] First, the node device may perform content verification on the queried target content to ensure whether the queried target content is consistent with the data content corresponding to the content summary.

[0098] During implementation, the node device may recalculate the content digest of the queried target content, and then match the recalculated content digest with the content digest carried in the received transaction to determine whether the recalculated content digest is consistent with the content digest carried in the received transaction;

[0099] If the two are consistent, the content verification of the queried target content is passed, the transaction received by the node device is a valid transaction, and the node device can obtain the complete transaction content carried in the transaction;

[0100] On the contrary, if the two are inconsistent, the content verification of the queried target content fails. In this case, the original referenced target content stored in the above-mentioned third-party storage system may have been modified or updated due to the unreliability of the system. At this time, the transaction is an invalid transaction and the node device can directly terminate the transaction.

[0101] Among them, it should be noted that when the node device can recalculate the content summary of the queried target content, the data structure of the target content, the encoding method performed on the target content, and the summary algorithm adopted must be consistent with the above-mentioned third-party storage system to ensure that the node device and the above-mentioned third-party storage system can obtain the same calculation results when calculating the content summary for the same target content.

[0102] Furthermore, the node device can also perform consensus processing on valid transactions (i.e., transactions that have passed content verification) received within a period of time based on the consensus algorithm supported by the above-mentioned target member blockchain, and after the consensus processing is completed, execute the transaction in the target member blockchain based on the complete transaction content carried in the transaction.

[0103] Among them, the consensus algorithm supported by each member blockchain in the above-mentioned alliance chain is not specifically limited in this specification, and the consensus algorithm supported by each member blockchain can be the same or different.

[0104] It should be noted that, in this specification, when the above-mentioned node device executes the transaction in the above-mentioned target member blockchain based on the complete transaction content in the acquired transaction, it can generally include the following two situations:

[0105] In one case, the transaction published by the member user in the target member blockchain may be a transaction automatically executed by calling a smart contract published in the target member blockchain. For example, the transaction may be a transaction that completes online value transfer (such as cross-border transfer) in the blockchain by calling a smart contract.

[0106] In this case, the smart contract can declare in advance the executable program that can be called related to the transaction; for example, the executable program can be the executable code, function, etc. related to the transaction conditions declared in the smart contract; and the transaction content carried in the transaction will be used as the input parameter for calling the smart contract. After obtaining the transaction content carried in the above transaction, the node device can initiate a call to the above smart contract and submit these input parameters to the executable program declared in the above smart contract for execution to complete the transaction.

[0107] In another case, the transaction published by the member user in the target member blockchain may be a standard transaction type supported by the target member blockchain. For standard transaction types, the transaction can be executed without calling a smart contract; for example, the transaction may be a standard transaction type such as "certificate transaction" supported by the target member blockchain. Figure 2 As shown in the “data chain”, users can publish a “certificate transaction” to the “data chain” to store their personal real-name information in the distributed database of the “data chain”. Once the publication is completed, the user’s real-name information cannot be tampered with.

[0108] In this case, when executing the transaction, the node device can first verify the validity of the transaction; if the transaction is confirmed to be valid after the validity verification, the node device can further broadcast the transaction in the target member blockchain, synchronize the transaction to other node devices in the target member blockchain, and have other node devices verify the validity of the transaction; if the majority (for example, 51%) of the node devices in the target member blockchain confirm that the transaction is valid after the validity verification, the transaction is executed.

[0109] In this specification, after the node device completes the execution of the received transaction, it can further store the transaction in the distributed database of the target member blockchain.

[0110] Among them, the information recorded in the distributed database of the blockchain usually consists of transaction log and transaction state.

[0111] Transaction log is used to store transaction logs. It is composed of blocks connected in series in the order of occurrence and is a transaction record in a distributed database.

[0112] Transaction state is used to store state changes caused by transactions recorded in a distributed database. For example, a blockchain is usually composed of many small objects (such as account objects, contract objects, and asset objects, etc.). When a transaction is submitted to the distributed database of the blockchain, the states related to the transaction will be updated synchronously after the transaction is executed. For example, taking an online transfer transaction submitted in the blockchain as an example, after the transaction is executed, the balance of the account object related to the transfer will be updated synchronously.

[0113] In this case, when the node device completes the received transaction and further stores the transaction in the distributed database of the target member blockchain:

[0114] On the one hand, the transaction can be written into the generated block and stored in the transaction log in the distributed database of the target member blockchain;

[0115] On the other hand, the state changes of related objects caused by the transaction can be updated in the transaction state; for example, still taking the online transfer transaction submitted in the blockchain as an example, after the transaction is executed, the balance of the account object related to this transfer can be updated in the transaction state.

[0116] In the above embodiment, since the original content of the referenced data can be stored in the third-party storage system, and the blockchain can only store the content summary of the referenced data content, when the blockchain executes a transaction or performs transaction backtracking, the original content of the referenced data is read from the third-party storage system based on the content summary:

[0117] On the one hand, it can avoid synchronizing the original content of the target content stored in the third-party storage system to each node device in the blockchain, which causes redundant data storage on the blockchain;

[0118] For example, taking the third-party storage system connected to the target blockchain as another blockchain that has a cross-chain data reference relationship with the blockchain as an example, assuming that the other blockchain includes 5 node devices, and the target blockchain includes 50 node devices; if the method of synchronizing the referenced data content stored in the other blockchain to the target blockchain is still adopted, the referenced data content needs to be synchronized to the 50 nodes in the target blockchain respectively, thereby causing a large amount of redundancy of the referenced data content in the target blockchain; and if the target blockchain only stores the content summary of the above-mentioned referenced data content, then for the above-mentioned other blockchains, it is no longer necessary to synchronize the above-mentioned referenced data content to the above-mentioned 50 node devices respectively, thereby significantly reducing the data storage redundancy of the above-mentioned target blockchain.

[0119] On the other hand, it can significantly improve the storage performance of blockchain;

[0120] For example, in actual applications, if the referenced data content is some large media files such as pictures and videos, directly storing these media files in the target member blockchain may reduce the storage performance of the blockchain network; therefore, in this way, the data storage performance of the target member blockchain can also be improved to a certain extent.

[0121] Corresponding to the above method embodiments, this specification also provides an embodiment of a transaction execution device based on blockchain. The embodiment of the transaction execution device based on blockchain in this specification can be applied to electronic devices. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of the electronic device in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory and running them. From the hardware level, if Figure 3 The figure is a hardware structure diagram of the electronic device where the blockchain-based transaction execution device of this specification is located, except Figure 3 In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device in which the device in the embodiment is located may also include other hardware according to the actual function of the electronic device, which will not be described in detail.

[0122] Figure 4 It is a block diagram of a transaction execution device based on blockchain shown in an exemplary embodiment of this specification.

[0123] Please refer to Figure 4 The blockchain-based transaction execution device 30 can be applied in the aforementioned Figure 2 The electronic device shown includes: a receiving module 401 , a query module 402 and an execution module 403 .

[0124] The receiving module 401 receives a target transaction; wherein at least part of the transaction content in the target transaction includes a content summary of the target content stored in a third-party storage system connected to the blockchain;

[0125] A query module 402 queries the third-party storage system for target content corresponding to the content summary, and performs content verification on the target content;

[0126] The execution module 403 executes the target transaction based on the transaction content in the target transaction if the target content verification passes, and stores the target transaction in the distributed database of the blockchain after the target transaction is executed.

[0127] In this embodiment, the third-party storage system stores the corresponding relationship between the target content and the content summary of the target content;

[0128] The query module 402:

[0129] The content summary is used as a query index to initiate a query to the third-party storage system to query the target content corresponding to the content summary.

[0130] In this embodiment, the execution module 403 further:

[0131] Calculating a content summary of the target content based on a preset summary algorithm;

[0132] Determining whether the calculated content summary is consistent with the content summary of the target content in the target transaction;

[0133] If the calculated content digest is consistent with the content digest of the target content in the target transaction, it is determined that the verification of the target content is passed.

[0134] In this embodiment, the third-party storage system includes a centralized content-addressable storage (CAS) system; or a distributed CAS storage system.

[0135] In this embodiment, the blockchain includes any member blockchain in a consortium chain composed of several member blockchains.

[0136] In this embodiment, the third-party storage system is other member blockchains between the alliance chain and the blockchain that have a cross-chain data reference relationship.

[0137] In this embodiment, the alliance chain is a directed acyclic graph (DAG) structure constructed based on the cross-chain data reference relationship between the member blockchains.

[0138] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.

[0139] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0140] The systems, devices, modules or modules described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0141] Corresponding to the above method embodiment, this specification also provides an embodiment of an electronic device. The electronic device includes: a processor and a memory for storing machine executable instructions; wherein the processor and the memory are usually connected to each other through an internal bus. In other possible implementations, the device may also include an external interface to enable communication with other devices or components.

[0142] In this embodiment, by reading and executing machine executable instructions corresponding to the control logic of blockchain-based transaction execution stored in the memory, the processor is prompted to:

[0143] A target transaction is received; wherein at least part of the transaction content in the target transaction includes a content summary of the target content stored in a third-party storage system connected to the blockchain;

[0144] querying the third-party storage system for target content corresponding to the content summary, and performing content verification on the target content;

[0145] If the target content verification passes, the target transaction is executed based on the transaction content in the target transaction, and the target transaction is stored in the distributed database of the blockchain after the target transaction is executed.

[0146] In this embodiment, the third-party storage system stores the corresponding relationship between the target content and the content summary of the target content;

[0147] By reading and executing machine-executable instructions stored in the memory corresponding to control logic for blockchain-based transaction execution, the processor is caused to:

[0148] The content summary is used as a query index to initiate a query to the third-party storage system to query the target content corresponding to the content summary.

[0149] In this embodiment, by reading and executing machine executable instructions corresponding to the control logic of blockchain-based transaction execution stored in the memory, the processor is prompted to:

[0150] Calculating a content summary of the target content based on a preset summary algorithm;

[0151] Determining whether the calculated content summary is consistent with the content summary of the target content in the target transaction;

[0152] If the calculated content digest is consistent with the content digest of the target content in the target transaction, it is determined that the verification of the target content is passed.

[0153] Those skilled in the art will readily appreciate other embodiments of the specification after considering the specification and practicing the invention disclosed herein. The specification is intended to cover any variations, uses, or adaptations of the specification that follow the general principles of the specification and include common knowledge or customary techniques in the art that are not disclosed in the specification. The specification and examples are to be considered exemplary only, and the true scope and spirit of the specification are indicated by the following claims.

[0154] It should be understood that the present description is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.

[0155] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

Claims

1. A transaction execution method based on blockchain, comprising: A node device of the blockchain receives a target transaction; wherein at least part of the transaction content in the target transaction includes a content summary of the target content stored in a third-party storage system connected to the blockchain; The node device of the blockchain queries the third-party storage system for target content corresponding to the content summary, and performs content verification on the target content; If the target content verification passes, the target transaction is executed based on the transaction content in the target transaction, and the target transaction is stored in the blockchain.

2. According to the method of claim 1, the third-party storage system stores the corresponding relationship between the target content and the content summary of the target content; The querying the third-party storage system for target content corresponding to the content summary includes: The content summary is used as a query index to initiate a query to the third-party storage system to query the target content corresponding to the content summary.

3. According to the method of claim 1, the performing content verification on the target content comprises: Calculating a content summary of the target content based on a preset summary algorithm; Determining whether the calculated content summary is consistent with the content summary of the target content included in the target transaction; If the calculated content digest is consistent with the content digest of the target content included in the target transaction, it is determined that the verification of the target content is passed.

4. According to the method of claim 1, the third-party storage system includes a centralized content-addressable storage (CAS) system; or a distributed CAS storage system.

5. According to the method according to claim 1, the blockchain includes any member blockchain in a consortium chain consisting of several member blockchains.

6. According to the method of claim 5, the third-party storage system is another member blockchain in the alliance chain that has a data cross-chain reference relationship with any member blockchain.

7. According to the method of claim 6, the alliance chain is a directed acyclic graph (DAG) structure constructed based on the cross-chain data reference relationship between each member blockchain.

8. A transaction execution device based on blockchain, comprising: A receiving module receives a target transaction; wherein at least part of the transaction content in the target transaction includes a content summary of the target content stored in a third-party storage system connected to the blockchain; A query module, querying the third-party storage system for target content corresponding to the content summary, and performing content verification on the target content; An execution module executes the target transaction based on the transaction content in the target transaction if the target content verification passes, and stores the target transaction in the blockchain.

9. The device according to claim 8, wherein the third-party storage system stores a corresponding relationship between the target content and a content summary of the target content; The query module: The content summary is used as a query index to initiate a query to the third-party storage system to query the target content corresponding to the content summary.

10. The apparatus according to claim 8, wherein the execution module further: Calculating a content summary of the target content based on a preset summary algorithm; Determining whether the calculated content summary is consistent with the content summary of the target content included in the target transaction; If the calculated content digest is consistent with the content digest of the target content included in the target transaction, it is determined that the verification of the target content is passed.

11. According to the device of claim 8, the third-party storage system includes a centralized content-addressable storage (CAS) system; or a distributed CAS storage system.

12. The device according to claim 8, wherein the blockchain comprises any member blockchain in a consortium chain consisting of several member blockchains.

13. According to the device according to claim 12, the third-party storage system is other member blockchains in the alliance chain that have a data cross-chain reference relationship with any member blockchain.

14. According to the device of claim 13, the alliance chain is a directed acyclic graph (DAG) structure constructed based on the cross-chain data reference relationship between each member blockchain.

15. An electronic device, comprising: processor; memory for storing machine-executable instructions; Wherein, by reading and executing the machine executable instructions corresponding to the control logic of blockchain-based transaction execution stored in the memory, the processor is prompted to: A target transaction is received; wherein at least part of the transaction content in the target transaction includes a content summary of the target content stored in a third-party storage system connected to the blockchain; querying the third-party storage system for target content corresponding to the content summary, and performing content verification on the target content; If the target content verification passes, the target transaction is executed based on the transaction content in the target transaction, and the target transaction is stored in the blockchain.