Transaction processing method and device of block chain network, product, equipment and medium

By deploying local contract processing transaction information that the consensus network does not need to witness in the business nodes of the blockchain network, generating transition transactions and collaborating with the client, the problem of blockchain network transaction congestion is solved and transaction processing performance is improved.

CN119006150APending Publication Date: 2024-11-22TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310563531.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-17
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In a blockchain network, when several clients initiate multiple transactions at the same time, the load on the consensus network will be very high, resulting in transaction congestion.

Method used

By deploying local contracts in the target business nodes of the business network, transaction information that does not require witness in the consensus network is processed, transition transactions are generated, and the target business node and client sign together to generate new transactions and send them to the consensus network to mitigate consensus The load of the network.

Benefits of technology

It alleviates the load pressure of the consensus network to process transactions, improves the transaction processing performance of the blockchain network, and solves the problem of joint signature of new transactions by target business nodes and clients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006150A_ABST
    Figure CN119006150A_ABST
Patent Text Reader

Abstract

The invention discloses a transaction processing method and device of a block chain network, a product, equipment and a medium, the block chain network comprises a service network and a consensus network, and a target service node and a client in the service network respectively hold private key fragments of a node private key of the target service node obtained through negotiation. The method comprises the following steps: a target service node receives a first transaction sent by a client, calls a local contract to process transaction information of a target type in the first transaction to obtain a processing result, and generates a transition transaction based on the processing result and the transaction information except the transaction information of the target type in the first transaction; sending the transition transaction to the client, and cooperating with the client to perform signature processing on the transition transaction based on respective private key fragments to obtain a first transaction signature of the transition transaction; and generating a second transaction based on the first transaction signature and the transition transaction, and sending the second transaction to a consensus network for consensus. According to the invention, the transaction processing performance of the block chain network can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a transaction processing method, device, product, equipment and medium for a blockchain network. Background Art

[0002] In a blockchain network, a business node can receive transactions initiated by a client and perform a simple check on the transaction information in the transaction (such as checking the information format or range). After the check is completed, the transaction initiated by the client can be sent to the consensus network for consensus. In this way, all business processing related to transactions initiated by the client is performed in the consensus network. When several clients initiate many transactions at the same time, the transaction processing load of the consensus network will be very large, which may lead to transaction congestion. Summary of the invention

[0003] The present application provides a transaction processing method, device, product, equipment and medium for a blockchain network, which can improve the performance of blockchain network in processing transactions.

[0004] On one hand, the present application provides a transaction processing method for a blockchain network, wherein the blockchain network includes a business network and a consensus network, the business network includes a target business node, a local contract is deployed in the target business node, the local contract is used to process transaction information of a target type in the transaction, the transaction information of the target type is transaction information that does not need to be witnessed by the consensus network, the target business node has a node private key, and the target business node and the client each hold a private key shard of the node private key obtained through negotiation; the method is applied to the target business node, and the method includes:

[0005] receiving a first transaction sent by a client, and extracting transaction information of a target type from the first transaction;

[0006] Calling the local contract to process the extracted transaction information of the target type, obtaining a processing result of the extracted transaction information of the target type, and generating a transition transaction based on the processing result and transaction information other than the transaction information of the target type in the first transaction;

[0007] Send the transition transaction to the client, and collaborate with the client to sign the transition transaction based on the private key shards held by each party to obtain the first transaction signature of the transition transaction;

[0008] A second transaction is generated based on the first transaction signature and the transition transaction, and the second transaction is sent to the consensus network so that the consensus network performs consensus processing on the second transaction.

[0009] On one hand, the present application provides a transaction processing device for a blockchain network, wherein the blockchain network includes a business network and a consensus network, the business network includes a target business node, a local contract is deployed in the target business node, and the local contract is used to process transaction information of a target type in the transaction, and the transaction information of the target type is transaction information that does not need to be witnessed by the consensus network, the target business node has a node private key, and the target business node and the client each hold a private key shard of the node private key obtained through negotiation; the device is applied to the target business node, and the device includes:

[0010] A receiving module, used for receiving a first transaction sent by a client, and extracting transaction information of a target type from the first transaction;

[0011] A calling module, used to call the local contract to process the extracted transaction information of the target type, obtain the processing result of the extracted transaction information of the target type, and generate a transition transaction based on the processing result and the transaction information in the first transaction except the transaction information of the target type;

[0012] The signature module is used to send the transition transaction to the client, and cooperate with the client to sign the transition transaction based on the private key shards held by each party to obtain the first transaction signature of the transition transaction;

[0013] The consensus module is used to generate a second transaction based on the first transaction signature and the transition transaction, and send the second transaction to the consensus network so that the consensus network performs consensus processing on the second transaction.

[0014] Optionally, the first transaction includes a called contract address, which is the contract address of a local contract. A business contract is deployed in the consensus network, and the business contract is used by the consensus network to process transactions. The first transaction includes a second transaction signature, which is obtained by the client signing the transaction information in the first transaction except the second transaction signature based on the private key sharding it holds.

[0015] The calling module generates a transition transaction based on the processing result and the transaction information other than the transaction information of the target type in the first transaction, including:

[0016] The transaction information of the target type in the first transaction is replaced with the processing result, and the second transaction signature in the first transaction is removed to obtain an initial transition transaction;

[0017] Change the contract address called in the initial transition transaction from the contract address of the local contract to the contract address of the business contract to generate a transition transaction.

[0018] Optionally, a binding relationship is established between the contract address of the local contract and the contract address of the business contract;

[0019] The calling module modifies the contract address called in the initial transition transaction from the contract address of the local contract to the contract address of the business contract, and generates a transition transaction in the following ways:

[0020] Get the contract address that is bound to the contract address of the local contract;

[0021] The contract address called in the initial transition transaction is modified from the contract address of the local contract to a contract address that has a binding relationship with the contract address of the local contract, and a transition transaction is generated.

[0022] Optionally, the signature module cooperates with the client to sign the transition transaction based on the private key shards held by each party to obtain the first transaction signature of the transition transaction, including:

[0023] Get the encrypted private key shard sent by the client; the encrypted private key shard is sent by the client after successfully verifying the transition transaction, and the encrypted private key shard is obtained by the client performing homomorphic encryption on the private key shard it holds;

[0024] Based on the encrypted private key shard and the private key shard held by the target business node, the transition transaction is signed to obtain the first transaction signature of the transition transaction.

[0025] Optionally, the first transaction includes a second transaction signature, and the second transaction signature is obtained by the client after signing the transaction information in the first transaction except the second transaction signature based on the private key shard held by the client;

[0026] The method in which the receiving module extracts the transaction information of the target type from the first transaction includes:

[0027] Using the public key shard corresponding to the private key shard held by the client, verify the second transaction signature in the first transaction to obtain a verification result of the second transaction signature;

[0028] If the verification result of the second transaction signature is used to indicate that the verification of the second transaction signature is successful, the transaction information of the target type is extracted from the first transaction.

[0029] Optionally, the signing module sends the transition transaction to the client in the following ways:

[0030] The transition transaction is signed using the private key shard held by the target business node to obtain the third transaction signature of the transition transaction;

[0031] Send the third transaction signature and transition transaction to the client;

[0032] Among them, the client is used to verify the received third transaction signature based on the public key shard corresponding to the private key shard held by the target business node, and after the third transaction signature is successfully verified, it is used to cooperate with the target business node to sign the transition transaction.

[0033] Optionally, the transition transaction includes a signature field, and the field information at the signature field in the transition transaction is empty;

[0034] The way in which the consensus module generates the second transaction based on the first transaction signature and the transition transaction includes:

[0035] The first transaction signature is encapsulated into the signature field in the transition transaction to generate a second transaction.

[0036] Optionally, the transaction information of the target type in the first transaction is the identity information of the client;

[0037] The calling module calls the local contract to process the extracted transaction information of the target type, and obtains the processing result of the extracted transaction information of the target type, including:

[0038] Call the local contract to perform identity authentication on the client based on the extracted identity information and obtain the client's identity authentication result;

[0039] Among them, the identity authentication result is the processing result of the identity information.

[0040] Optionally, after receiving the second transaction, the consensus network is used to extract the identity authentication result from the second transaction;

[0041] The consensus network is used to perform consensus processing on the second transaction after determining that the identity of the client initiating the second transaction is legitimate based on the identity authentication result.

[0042] Optionally, the consensus network includes multiple consensus nodes; the way in which the consensus module sends the second transaction to the consensus network includes:

[0043] Sending the second transaction to a target consensus node among the multiple consensus nodes, so that the target consensus node broadcasts the second transaction to other consensus nodes among the multiple consensus nodes;

[0044] The target consensus node is any one of the multiple consensus nodes, and the multiple consensus nodes are all used to perform consensus processing on the received second transaction.

[0045] Optionally, the first transaction signature is consistent with a transaction signature obtained by encrypting a hash value of the transition transaction using a node private key;

[0046] The process of consensus processing of the second transaction by any consensus node includes:

[0047] Using the node public key corresponding to the node private key, decrypt the first transaction signature in the second transaction to obtain a decrypted hash value;

[0048] Performing hash calculation on the transaction information in the second transaction except the signature of the first transaction to obtain a calculated hash value;

[0049] If the calculated hash value is consistent with the decrypted hash value, it is determined that any consensus node has successfully reached consensus on the second transaction.

[0050] Optionally, the above device is also used for:

[0051] Generate a contract deployment transaction; the contract deployment transaction contains a local contract, and the contract deployment transaction is used to request the deployment of the local contract in the target business node;

[0052] Send the contract deployment transaction to the consensus network so that the consensus network can process the contract deployment transaction through consensus.

[0053] Receive the execution result of the contract deployment transaction sent by the consensus network; the execution result is the result of the contract deployment transaction executed by the consensus network after the contract deployment transaction consensus is successful;

[0054] Among them, the execution result of the contract deployment transaction includes the status information of the contract deployment transaction, the status information includes the local contract, and the status information is used to indicate that the local contract deployment is successful.

[0055] Optionally, the above device is also used for:

[0056] Receiving the execution result of the second transaction sent by the consensus network; the execution result is the result of executing the second transaction after the consensus network successfully reaches consensus on the second transaction;

[0057] The execution result of the second transaction, the first transaction, and the second transaction are stored in association.

[0058] In one aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes a method in one aspect of the present application.

[0059] In one aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor executes the method in the above aspect.

[0060] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in various optional modes such as the above-mentioned one aspect.

[0061] In the present application, the blockchain network may include a business network and a consensus network. The business network includes a target business node. A local contract is deployed in the target business node. The local contract is used to process the transaction information of the target type in the transaction. The transaction information of the target type is the transaction information that the consensus network does not need to witness. The target business node has a node private key. The target business node and the client each hold a private key shard of the node private key obtained through negotiation. Therefore, the target business node can receive the first transaction sent by the client, and can extract the transaction information of the target type from the first transaction; call the local contract to process the extracted transaction information of the target type, obtain the processing result of the extracted transaction information of the target type, and generate a transition transaction based on the processing result and the transaction information other than the target type in the first transaction; send the transition transaction to the client, and cooperate with the client to sign the transition transaction based on the private key shards held by each party, and obtain the first transaction signature of the transition transaction; generate a second transaction based on the first transaction signature and the transition transaction, and send the second transaction to the consensus network so that the consensus network performs consensus processing on the second transaction. It can be seen from this that the method proposed in the present application can process the transaction information (i.e., the target type of transaction information) that the consensus network does not need to witness in the first transaction initiated by the client, and the target business node can directly give the processing result of the target type of transaction information to the consensus network; and because the first transaction originally initiated by the client is changed by the processing result, a new transaction (i.e., a transitional transaction) is obtained. Therefore, in the present application, the target business node and the client can also negotiate with each other about the private key shard of the node private key of the target business node, and the target business node can also cooperate with the client to sign the new transaction based on the private key shards they each hold. The signature of the new transaction (i.e., the first transaction signature) can be obtained by name processing, and then the second transaction can be generated through the new transaction and the signature of the new transaction, and the second transaction is given to the consensus network for consensus processing, so as to alleviate the load pressure of the consensus network in processing transactions, so that the target business node and the consensus network can jointly process the transaction, and the private key sharding held by the target business node and the client also solves the problem that the target business node and the client need to jointly sign the new transaction (because the first transaction was changed by the target business node, and the new transaction needs to be confirmed by both parties), thereby improving the performance of the blockchain network in processing transactions. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0063] Figure 1 It is a structural diagram of a transaction processing network architecture provided by this application;

[0064] Figure 2 It is a schematic diagram of a transaction processing scenario provided by this application;

[0065] Figure 3 It is a flowchart of a transaction processing method of a blockchain network provided by this application;

[0066] Figure 4 This is a schematic diagram of a private key sharding negotiation scenario provided by this application;

[0067] Figure 5 It is a schematic diagram of a scenario for generating a transition transaction provided by the present application;

[0068] Figure 6 is a schematic diagram of a scenario for generating a second transaction provided by the present application;

[0069] Figure 7 It is a flowchart of a contract deployment method provided by this application;

[0070] Figure 8 This is a flowchart of deploying a local contract provided by this application;

[0071] Fig. 9 It is a structural schematic diagram of a transaction processing device of a blockchain network provided by the present application;

[0072] Fig.10 It is a structural schematic diagram of a computer device provided by this application.

[0073] The following will be combined with the drawings in this application to clearly and completely describe the technical solutions in this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0074] This application involves blockchain-related technologies. Among them, blockchain is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The blockchain may include a blockchain underlying platform, a platform product service layer, and an application service layer. The blockchain includes a series of blocks that are connected to each other in the order of their generation. Once a new block is added to the blockchain, it will not be removed. The block records the record data submitted by the nodes in the blockchain system.

[0075] This application relates to smart contracts in blockchain technology (such as local contracts and business contracts described below). Among them, smart contracts are automated computer programs that run on the blockchain and are used to perform predefined operations under the terms of the contract. These contracts are stored on the blockchain in the form of code and can be automatically executed by nodes on the blockchain.

[0076] The present application also involves cloud technology, which refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or a local area network to achieve data computing, storage, processing and sharing.

[0077] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, image websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.

[0078] The cloud technology involved in this application may refer to data interaction between the client and the business node, and between the business node and the consensus node, all of which can be carried out through the "cloud".

[0079] First of all, it should be noted that all business data collected in this application (such as transactions, node private keys, private key shards, public key shards, node public keys and other related data) are collected with the consent and authorization of the object to which the business data belongs (such as users, institutions or enterprises), and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0080] First, the relevant technical concepts involved in this application are described.

[0081] Local smart contract (abbreviated as local contract): a smart contract whose execution process does not participate in consensus. Local smart contracts are only executed on a single business node (belonging to the blockchain node).

[0082] ECDSA m-n multi-signature algorithm: n and m are both positive integers, n is the number of participants, and m is the minimum number of participants among the n participants who can sign the transaction. The n participants will conduct key negotiation (i.e. private key negotiation). After the negotiation, each participant has a private key fragment (i.e. private key shard); all participants can hold the same global public key (such as a complete node public key). In the signing stage, any m of the n participants can sign the transaction, and the resulting transaction signature is consistent with the transaction signature obtained by signing the transaction with the complete node private key, and the transaction signature can be verified by the global public key.

[0083] Business node: A blockchain node that does not participate in consensus and can be used to store business data on the blockchain.

[0084] See also Figure 1 , Figure 1 This is a schematic diagram of the structure of a transaction processing network architecture provided by this application. Figure 1 As shown, the network architecture may include several clients (which may be understood as a client set) and a blockchain network. The several clients may be the clients of the user, and the user may initiate corresponding blockchain transactions to the blockchain network based on the clients held. The blockchain network may include a business network and a consensus network. The business network may include multiple business nodes. The number of business nodes in the business network may be determined according to the actual application scenario, and there is no restriction on this. Similarly, the consensus network may include multiple consensus nodes. The number of consensus nodes in the consensus network may also be determined according to the actual application scenario, and there is no restriction on this.

[0085] In the present application, each business node in the business network can be connected to the user's client. Optionally, in the present application, different business nodes can be connected to different multiple clients (that is, several clients can be assigned to different business nodes for connection, so as to improve the transaction processing efficiency for the client and the utilization rate of the node resources of each business node). Subsequently, the business node can negotiate the private key sharding of the node private key of the business node with the client to which it is connected.

[0086] For example, if the service network includes service node 1, service node 2, service node 3 and service node 4, and the client set includes clients 1 to 12, then the clients connected to service node 1 may include clients 1 to 3, the clients connected to service node 2 may include clients 4 to 6, the clients connected to service node 3 may include clients 7 to 9, and the clients connected to service node 4 may include clients 10 to 12.

[0087] Or, optionally, different service nodes may also be connected to the same client, which may be determined according to actual application scenarios and is not limited thereto.

[0088] In this application, the business nodes in the business network and the consensus nodes in the consensus network all belong to the blockchain nodes in the blockchain network. The blockchain node can be composed of a server, which can be an independent physical server or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (content distribution network), and big data and artificial intelligence platforms.

[0089] It should be noted that, since in the present application, the principles by which each business node processes transactions of each client it is connected to are the same and independent, the following description will be given using the process of a business node (hereinafter collectively referred to as a business node) processing transactions of a connected client (hereinafter collectively referred to as a client) as an example.

[0090] In this application, the client can initiate a transaction to the business node, and the business node can perform corresponding pre-processing on the transaction initiated by the client, and then submit the processed new transaction to the consensus node for consensus processing, as described below.

[0091] Please also see Figure 2 , Figure 2 This is a schematic diagram of a transaction processing scenario provided by this application. Figure 2As shown, here, the client can initiate a first transaction to the business node, and the first transaction can include transaction information of the target type and transaction information other than the transaction information of the target type. The transaction information of the target type can refer to transaction information that the consensus network does not need to witness.

[0092] A local contract (i.e., a local smart contract) for pre-processing transactions is deployed in the business node. Specifically, the business node can call the deployed local contract to process the transaction information of the target type in the first transaction, and obtain the processing result of the transaction information of the target type. The business node can generate a transition transaction based on the processing result of the transaction information of the target type and part of the transaction information in the first transaction except the transaction information of the target type. The transition transaction is a new transaction obtained after the business node processes the first transaction.

[0093] Furthermore, the business node and the client connected to it can respectively hold the negotiated private key shards of the node private key of the business node. Therefore, the business node can send the transition transaction to the client, and sign the transition transaction with the client based on the private key shards they respectively hold, thereby generating a transaction signature (which can be called the first transaction signature) for the transition transaction.

[0094] Next, the business node can combine the first transaction signature with the transition transaction to generate a second transaction, which is the transaction that ultimately needs to be submitted to the consensus network for consensus processing. The business node can send the second transaction to the consensus network so that the consensus network can perform consensus processing on the second transaction. After the second transaction is successfully agreed upon in the consensus network, the consensus network can execute the second transaction and process the second transaction on the chain.

[0095] In the present application, part of the business logic that should be implemented in the consensus node (such as the logic for processing the target type of transaction information) can be implemented in the local contract of the business node, thereby reducing the load of the consensus node for business processing, and the target type of transaction information is processed in the local contract of the business node. The local contract only exists in the business node to which it belongs. The local contract is open to the logic of data processing, but the data processing process is confidential. Therefore, the transaction information of the target type in the transaction can be confidential, thereby also ensuring the privacy and security of the transaction information of the target type.

[0096] See also Figure 3 , Figure 3 This is a flowchart of a transaction processing method for a blockchain network provided by this application. Figure 3 As shown, the method may include:

[0097] Step S101: receiving a first transaction sent by a client, and extracting transaction information of a target type from the first transaction.

[0098] Optionally, a blockchain network may include a business network and a consensus network. A business network may include multiple business nodes, and a consensus network may include multiple consensus nodes. Both the business nodes and the consensus nodes are blockchain nodes. Any blockchain node may be composed of one or more computer devices, which may be a terminal device, a server, or other devices, without limitation.

[0099] Any service node in the service network may be referred to as a target service node, and the target service node may be a service node that has negotiated private key sharding with the client, and the first transaction may be any transaction initiated by the client to the service node (i.e., the target service node) with which the client has negotiated private key sharding. The execution subject in the embodiment of the present application may be the target service node. The client may be a client of any user, and is used for the user to initiate the corresponding transaction.

[0100] Optionally, the target business node may have a node private key (also referred to as a node key), which may be used to sign and encrypt transactions of the target business node. There may be one or more clients in this application (i.e., clients that the target business node needs to connect to for transaction processing), and this application may negotiate the private key shard of the node private key with the target business node through the one or more clients. It can be understood that the node private key may be negotiated by the target business node and all clients (such as negotiated through the ECDSA m-n multi-signature algorithm). After the negotiation is completed, one party (such as the target business node or any client) may hold a private key shard of the node private key, where n may be equal to the sum of the number of all clients and the number of target business nodes, and m may be equal to 2.

[0101] It is understandable that each party in the n parties (target business node and each client) may not hold a complete node private key to ensure the security of the node private key. Moreover, by setting m to 2, any two parties in the n parties can realize the joint signature of the transaction (realizing the effect of signing the transaction with a complete node private key), that is, any client can interact with the target business node for data to realize the signature processing of the transaction (such as the transition transaction described below). Among them, m is equal to 2, which can also be understood as the node private key can be recovered through two private key fragments of any two parties (i.e., any two private key fragments) (such as by adding the two private key fragments to obtain the node private key), and the private key fragments held by each party are kept confidential from each other.

[0102] See also Figure 4 , Figure 4 This is a schematic diagram of a private key sharding negotiation scenario provided by this application. Figure 4 As shown, the above n may be equal to 4, that is, n is equal to the sum of the number of the three clients (including client k1, client k2 and client k3) and the target service nodes.

[0103] The three clients and the target business node can conduct multiple rounds of negotiation on the private key shards of the node private key of the target business node. After the negotiation is completed, each party can obtain a private key shard of the node private key of the target business node. For example, client k1 can obtain private key shard 1, client k2 can obtain private key shard 2, client k3 can obtain private key shard 3, and the target business node can obtain private key shard 4.

[0104] It should be noted that since the principles of data interaction between each client and the target business node to realize transaction processing are the same and independent of each other, this application is explained by taking the process of data transaction between a client and the target business node to realize the processing of the client's transaction as an example (hereinafter collectively referred to as the client), but there can be multiple clients in the process of negotiating the private key sharding of the node private key.

[0105] According to different application scenarios, the type of the first transaction in this application may also be different. For example, in the application scenario of data storage, the first transaction may be a transaction of data storage; in the application scenario of resource transfer, the first transaction may be a transaction of resource transfer; in the application scenario of resource issuance, the first transaction may be a transaction of resource issuance, etc. The specific transaction type of the first transaction can be determined according to the actual application scenario, and there is no limitation on this. This application can be applied to all relevant application scenarios in which transactions can be collaboratively processed by business nodes and consensus nodes.

[0106] Furthermore, a local contract (i.e., a local smart contract) can be deployed in the target business node, and the local contract can only run on the target business node. The local contract can be used to process the transaction information of the target type in the transaction. For different application scenarios, the transaction information of the target type can also be different, and the processing logic of the transaction of the target type configured in the local contract can also be different, which can be determined according to the actual application scenario.

[0107] The target type of transaction information may be transaction information of a type that does not need to be witnessed by the consensus network in the transaction. It can be understood that the target type of transaction information may refer to transaction information that is not needed by the consensus network in the process of reaching consensus on the transaction or executing the transaction after consensus. That is, the existence or non-existence of the target type of transaction information has no effect on the subsequent consensus network's consensus processing of the transaction or the process of executing the transaction after the transaction consensus is successful.

[0108] For example, the first transaction may be a data notarization transaction initiated by a client, and the target type of transaction information may be the identity information of the client in the first transaction, and the identity information may be used to authenticate the identity of the client.

[0109] Therefore, the target service node can receive the first transaction initiated by the client, and can extract transaction information of the target type from the first transaction.

[0110] Optionally, the target service node may also have a prerequisite for extracting the target type of transaction information from the first transaction (ie, starting transaction processing on the first transaction may have a prerequisite), that is, extracting after successfully verifying the first transaction, as described below.

[0111] The first transaction may include a transaction signature, which may be referred to as the second transaction signature. The second transaction signature may be obtained by the client, based on the private key shard held by the client, by signing the transaction information in the first transaction except the second transaction signature (such as encrypting the hash value of the transaction information in the first transaction except the second transaction signature). It can be understood that the second transaction signature is the signature of the first transaction.

[0112] The private key shard held by the client and the public key shard corresponding to the private key shard can constitute a key pair, that is, data encrypted using the private key shard held by the client can be decrypted by the public key shard corresponding to the private key shard held by the client. The public key shard corresponding to the private key shard held by the client can be public, that is, the target business node can know (hold) the public key shard corresponding to the private key shard held by the client.

[0113] Therefore, the target business node can use the public key shard corresponding to the private key shard held by the client to verify the second transaction signature in the first transaction (i.e., verify the signature), and obtain the verification result of the second transaction signature. The verification result can be the result of failure to verify the second transaction signature (indicating that the first transaction is an illegal and untrustworthy transaction), or the verification result can be the result of successful verification of the second transaction signature (indicating that the first transaction is a legal and trustworthy transaction).

[0114] The process in which the target business node verifies the second transaction signature to obtain the verification result of the second transaction signature may include: the target business node may decrypt the second transaction signature using the public key fragment corresponding to the private key fragment held by the client to obtain a decrypted hash value. The target business node may also perform hash calculation on the transaction information in the first transaction except the second transaction signature to obtain a calculated hash value.

[0115] If the decrypted hash value is the same as (i.e., consistent with) the calculated hash value, the verification result of the second transaction signature may be the result of successful verification of the second transaction signature; conversely, if the decrypted hash value is different from (i.e., inconsistent with) the calculated hash value, the verification result of the second transaction signature may be the result of failed verification of the second transaction signature.

[0116] Furthermore, if the verification result of the second transaction signature is the result of successful verification of the second transaction signature, that is, the verification result of the second transaction signature is used to indicate that the verification of the second transaction signature is successful, indicating that the first transaction is a legal and credible transaction, then the target business node can start processing the first transaction, such as extracting transaction information of the target type from the first transaction.

[0117] Step S102, calling the local contract to process the extracted transaction information of the target type, obtaining the processing result of the extracted transaction information of the target type, and generating a transition transaction based on the processing result and the transaction information in the first transaction except the transaction information of the target type.

[0118] Optionally, the target business node may call a local contract to perform information processing on the transaction information of the target type extracted from the first transaction to obtain a processing result of the extracted transaction information of the target type.

[0119] For example, if the target type of transaction information in the first transaction is the identity information of the client, the target business node can call the local contract to perform identity authentication on the client based on the target type of transaction information extracted from the first transaction, and obtain the identity authentication result of the client. The identity authentication result can be a result that the identified identity of the client is legal, or the identity authentication result can be a result that the identified identity of the client is illegal (i.e., illegal).

[0120] It can be understood that the local contract is configured with processing logic for information processing of the target type of transaction information, and the processing logic can be a pre-processing logic for the transaction at the business level. Optionally, the operation of extracting the target type of transaction information from the first transaction in the above step S101 can also be executed by calling the local contract, and the local contract can also be configured with business logic for extracting the target type of transaction information from the transaction.

[0121] For example, the identity information of the client may include the identity number information of the object to which the client belongs (such as a user), and the identity number information is the unique number information of the object registered with the government agency. Therefore, the target business node may call the local contract to query the government agency about the authenticity of the identity number information of the client. If the identity number information is found to be the real number information of the object in the government agency, it can be determined that the identity information of the client in the first transaction is legal. On the contrary, if the identity number information is not the real number information of the object in the government agency, it can be determined that the identity information of the client in the first transaction is illegal.

[0122] The above-mentioned identity authentication result may be the processing result of the identity information (that is, the processing result obtained after calling the local contract to process the transaction information of the target type in the first transaction).

[0123] Furthermore, the target business node can generate a new transaction through the processing results obtained above and the transaction information in the first transaction except the transaction information of the target type. The new transaction can be called a transition transaction. The transition transaction can include the processing result of the local contract for the transaction information of the target type. The processing result is the output of the local contract. The output of the local contract can be used as the input of the business contract in the subsequent consensus node, as described below.

[0124] Specifically, the first transaction may include a called contract address (i.e., the contract address called by the first transaction). The contract address called by the first transaction may be the contract address of the local contract of the above-mentioned target business node. The contract address may be a unique address assigned to the local contract by the consensus network when the local contract is deployed in the target business node (which may be called the calling address of the local contract).

[0125] In addition, a business contract can also be deployed in the consensus network, that is, each consensus node in the consensus network can be deployed with the business contract, and the business contract can be a contract for the consensus network to perform business processing on transactions (such as consensus processing of transactions and execution of transactions after successful consensus on transactions, etc.).

[0126] Therefore, the process of generating a transition transaction by using the processing result of the transaction information of the target type in the first transaction and the transaction information other than the transaction information of the target type in the first transaction may include:

[0127] The target business node can replace the transaction information of the target type in the first transaction with the processing result of the transaction information of the target type, and can remove the second transaction signature in the first transaction (which can be understood as deleting the second transaction signature from the first transaction) to obtain an initial transition transaction, that is, the transaction information of the target type in the first transaction can be replaced with the processing result of the transaction information of the target type, and the transaction obtained after removing the second transaction signature is called an initial transition transaction. The initial transition transaction can be a transaction that does not contain the transaction information of the target type, but contains the processing result of the transaction information of the target type, and the initial transition transaction does not contain the second transaction signature. The contract address called in the initial transition transaction is still the contract address of the local contract.

[0128] Furthermore, the target business node can modify the contract address called in the initial transition transaction from the contract address of the local contract to the contract address of the business contract to generate a transition transaction. That is, the transaction obtained by modifying the contract address called in the initial transition transaction to the contract address of the business contract can be called a transition transaction, and the contract address called in the transition transaction is the contract address of the business contract.

[0129] Optionally, since transactions processed by the local contract need to be submitted to the consensus network for consensus processing, the present application can also establish a binding relationship between the local contract and the contract that performs business processing on the transaction (such as the above-mentioned business contract). The binding relationship can be established through the contract address of the local contract and the contract address of the business contract. For example, a binding relationship can be established between the contract address of the local contract and the contract address of the business contract.

[0130] Therefore, a binding relationship can be established between the contract address of the above-mentioned local contract and the contract address of the business contract. The binding relationship can be established during the process of deploying the local contract in the target business node or after the local contract is deployed in the target business node, and there is no restriction on this.

[0131] Therefore, the target business node modifies the contract address called in the initial transition transaction from the contract address of the local contract to the contract address of the business contract to generate a transition transaction, which may include:

[0132] The target business node can obtain the contract address that has a binding relationship with the contract address of the local contract (i.e., the contract address of the business contract). Then, the target business node can modify the contract address called in the initial transition transaction (i.e., the contract address of the local contract) to the contract address that has a binding relationship with the called contract address (i.e., the contract address of the business contract), and obtain the transition transaction.

[0133] Optionally, the process of establishing a binding relationship between the contract address of the local contract and the contract address of the business contract may include:

[0134] The target business node can generate a contract binding transaction, which can include the contract address of the local contract and the contract address of the business contract. The contract binding transaction is a transaction for requesting the contract address of the local contract to be bound to the contract address of the business contract (i.e., establishing a binding relationship). The target business node can send the contract binding transaction to the consensus network so that each consensus node in the consensus network can reach a consensus on the contract binding transaction, and can execute the contract binding transaction after the consensus on the contract binding transaction is passed.

[0135] Among them, executing the contract binding transaction can be to establish a binding relationship between the contract address of the local contract and the contract address of the business contract. After the consensus network successfully establishes the binding relationship between the contract address of the local contract and the contract address of the business contract (that is, after successfully executing the contract binding transaction), it can return the status information of the transaction to the target business node. The status information of the transaction can be information indicating that the binding relationship between the contract address of the local contract and the contract address of the business contract has been successfully established. The status information of the transaction can include the contract address that has successfully established a binding relationship with the contract address of the local contract. The target business node can store the contract address that has a binding relationship with the contract address of the local contract in the status information. It is understandable that the consensus network will also store the executed transactions (such as contract binding transactions) and the execution results of the transactions (such as the contract address that has established a binding relationship with the contract address of the local contract).

[0136] Therefore, it can be understood that the target business node itself can usually store a contract address that has a binding relationship with the contract address of the local contract. If the target business node stores a contract address that has a binding relationship with the contract address of the local contract, the target business node can directly obtain the contract address that has a binding relationship with the contract address of the local contract in the local database; or, in some special scenarios, if the target business node does not store a contract address that has a binding relationship with the contract address of the local contract, the target business node can pull the contract address that has a binding relationship with the contract address of the local contract from the consensus network (such as from any consensus node).

[0137] See also Figure 5 , Figure 5 This is a schematic diagram of a scenario for generating a transition transaction provided by this application. Figure 5As shown, a transaction may contain multiple fields. For example, the multiple fields in the first transaction here may include: Nonce (random number, here the random number is x1, filled in by the transaction initiator (such as the client)), gasprice (which can be understood as the unit price of each operation of transaction processing in the blockchain, here is x2), gas (which can be understood as the number of each operation of transaction processing in the blockchain, here is x3), to (representing the contract address called by the transaction, here is Addr_L, and the Addr_L can represent the contract address of the local contract), value (if the transaction is a resource transfer transaction, then value is the resource transfer amount, here is x4), input (input parameters, that is, parameters for calling smart contracts, which can include parameters A, B, C and D), RSV (ie, R, S, V) all represent the signature field of the transaction signature (here the transaction signature is Sig(TX), and the Sig(TX) can represent the above-mentioned second transaction signature).

[0138] It should be noted that the target type transaction information in this application may be part of the input parameters of the transaction, such as the target type transaction information in the first transaction here may include parameter C and parameter D in the input parameters of the first transaction. Among them, the specific meaning of each parameter in the input parameters of the first transaction can be determined according to the actual application scenario, and there is no restriction on this. For example, parameter C and parameter D here may be parameters representing the identity information of the client, and parameter A and parameter B may be relevant remarks information when transferring resources or relevant information of the resource transferor and the resource receiver, etc.

[0139] The target business node can call the local contract to process parameter C and obtain result E (which can be called parameter E), and can call the local contract to process parameter D and obtain result F (which can be called parameter F). Result E and result F together constitute the processing result of the transaction information of the target type in the first transaction.

[0140] Therefore, by keeping parameter A and parameter B unchanged in the input parameters of the first transaction, the input parameters of the business contract can be parameter A, parameter B, result E and result F. The input parameters are also the input parameters of the transition transaction that needs to be generated later.

[0141] like Figure 5As shown, the input parameters of the generated transition transaction can include parameter A, parameter B, result E and result F, and the "to" field in the transition transaction (i.e., the field of the called contract address) can be Addr_C, which can represent the contract address of the business contract. In the transition transaction, except for the called contract address and the results E and F in the input parameters, which are different from the corresponding transaction information in the first transaction, other transaction information can be the corresponding transaction information in the first transaction, and the signature field RSV in the transition transaction is empty.

[0142] Among them, since the above transition transaction is obtained by repackaging the first transaction by the target business node, the transition transaction can also be understood as a transaction of the target business node. However, in fact, the transition transaction is still a transaction of the client.

[0143] Step S103, sending the transition transaction to the client, and cooperating with the client to sign the transition transaction based on the private key shards held by each party, to obtain the first transaction signature of the transition transaction.

[0144] Optionally, the target business node can send the above-generated transition transaction to the client, and then can collaborate with the client to sign the transition transaction based on the private key shards held by each (i.e., the shards of the node private key of the target business node), and obtain the transaction signature of the transition transaction, which can be referred to as the first transaction signature of the transition transaction. It can be understood that the first transaction signature is consistent with the transaction signature obtained by directly using the node private key to sign the transition transaction (such as encrypting the hash value of the transition transaction). That is, it can be understood that the first transaction signature is obtained by the target business node collaborating with the client to encrypt the hash value of the transition transaction based on the private key shards held by each.

[0145] Optionally, for the security of transmitting the transition transaction to the client, the target business node may also use its own private key shard to sign the transition transaction (such as encrypting the hash value of the transition transaction) to obtain a transaction signature of the transition transaction, which may be referred to as a third transaction signature.

[0146] Similarly, the private key shard held by the target business node and the public key shard corresponding to the private key shard can also form a key pair, that is, the data encrypted by the private key shard held by the target business node can be decrypted by the public key shard corresponding to the private key shard held by the target business node. The public key shard corresponding to the private key shard held by the target business node can also be public, so the client can know (hold) the public key shard corresponding to the private key shard held by the target business node.

[0147] The target business node can send the third transaction signature and the transition transaction together to the client. After receiving the third transaction signature and the transition transaction, the client can verify the received third transaction signature (i.e., signature verification) through the public key shard corresponding to the private key shard held by the target business node to obtain the verification result of the third transaction signature.

[0148] Among them, the principle of verifying the third transaction signature here by the public key shard corresponding to the private key shard held by the target business node to obtain the verification result of the third transaction signature is the same as the principle of verifying the second transaction signature by the public key shard corresponding to the private key shard held by the client to obtain the verification result of the second transaction signature, and will not be repeated here.

[0149] If the verification result of the third transaction signature is the result of successful verification of the third transaction signature, that is, after the third transaction signature is successfully verified, the client can cooperate with the target business node to sign the transition transaction so that the target business node can obtain the first transaction signature of the transition transaction, as described below.

[0150] Optionally, the process of the target business node collaborating with the client to sign the transition transaction may include: since the target business node is the node that integrates transactions to submit transactions to the consensus network, the transition transaction can be mainly signed by the target business node, as described below.

[0151] Optionally, after obtaining the transition transaction, the client can verify the transaction information in the transition transaction (such as whether the format of the verification information is correct or whether the verification information is complete, etc.). After the client successfully verifies the transaction information in the transition transaction (that is, after confirming that the transaction information in the transition transaction is correct), it can send the encrypted private key shard to the target business node. The encrypted private key shard can be obtained by the client after homomorphic encryption processing of the private key shard held by the client.

[0152] Among them, homomorphic encryption is an encryption algorithm, which has a characteristic that the processing result of the homomorphically encrypted data can be consistent with the processing result of the original data (such as the private key shard held by the client). Therefore, it can be understood that after receiving the encrypted private key shard sent by the client, the target business node can sign the transition transaction through the encrypted private key shard and the private key shard held by the target business node itself (the signature effect achieved is consistent with the effect of directly using the node private key to sign the transition transaction), and the first transaction signature of the transition transaction can be obtained.

[0153] In fact, it is understandable that the target business node can also perform homomorphic encryption on the private key shard it holds to obtain the corresponding encrypted private key shard, and can give the encrypted private key shard to the client. The client can also sign the transition transaction through the encrypted private key shard combined with the private key shard it holds, and obtain the transaction signature of the transition transaction (the same as the first transaction signature). However, since this application requires the target business node to submit the transaction to the consensus network (that is, the target business node needs to perform transaction integration), therefore, this application can use the above process, the target business node sends the encrypted private key shard through the client combined with the private key shard it holds, to sign the transition transaction to obtain the first transaction signature of the transition transaction.

[0154] Step S104, generating a second transaction based on the first transaction signature and the transition transaction, and sending the second transaction to the consensus network, so that the consensus network performs consensus processing on the second transaction.

[0155] Optionally, the target business node may combine the first transaction signature and the transition transaction to generate a second transaction, and the second transaction includes the transition transaction and the first transaction signature of the transition transaction, as described below.

[0156] The transition transaction may include a signature field. The field information at the signature field in the transition transaction is empty, that is, there is no field information at the signature field in the transition transaction (that is, there is no transaction signature). Therefore, the first transaction signature can be encapsulated into the signature field in the transition transaction, that is, the first transaction signature is used as the field information at the signature field in the transition transaction, and the second transaction can be obtained. In other words, the second transaction can be the transaction obtained by encapsulating the first transaction signature into the transition transaction. The second transaction is also a transaction that calls a business contract, and calling a business contract is to call the consensus network deployed with the business contract.

[0157] See also Figure 6 , Figure 6 This is a schematic diagram of a scenario for generating a second transaction provided by this application. Figure 6 As shown, after the target business node and the client sign the transition transaction and obtain the first transaction signature of the transition transaction (i.e., Sig(new_TX) here), the first transaction signature can be added to the signature field RSV in the transition transaction to obtain the second transaction. The transition transaction here can be based on the above Figure 5 Generated by the process described in the corresponding embodiment.

[0158] The contract address called by the second transaction is the contract address of the business contract.

[0159] Furthermore, the target business node can send the second transaction to the consensus network, so that the consensus network can perform consensus processing on the second transaction based on the deployed business contract.

[0160] Optionally, the consensus network may include multiple consensus nodes, and the process of the target business node sending the second transaction to the consensus network may include: the target business node may send the second transaction to the target consensus node among the multiple consensus nodes, so that the target consensus node can broadcast the received second transaction to other consensus nodes in the consensus network, and ultimately each consensus node in the consensus network can receive the second transaction, and then, each consensus node in the consensus network can jointly perform consensus processing on the second transaction based on the deployed business contract.

[0161] Optionally, the target consensus node may be any one of the multiple consensus nodes of the consensus network, or the target consensus node may be the consensus node among the multiple consensus nodes that is closest to the target business node (it may be geographically closest, which can make the data transmission line shorter, the data transmission overhead smaller, and the data transmission speed faster).

[0162] Optionally, since the second transaction may include the processing result of the transaction information of the target type in the first transaction, the consensus node in the consensus network may check (same as detect) the processing result in the second transaction after receiving the second transaction. If it is determined that the processing result is a legal result (i.e., the consensus node can confirm the processing result), the second transaction may be processed by consensus.

[0163] For example, if the target type of transaction information in the first transaction is the identity information of the client, then the target type of transaction information can be the identity authentication result of the client. Therefore, if the consensus node determines that the identity authentication result is the result of successful authentication of the client's identity (such as the result of authenticating that the client's identity is legal), the consensus node can perform consensus processing on the received second transaction.

[0164] Optionally, as can be seen from the above, the first transaction signature is consistent with the transaction signature obtained by directly encrypting the hash value of the transition transaction using the node private key. Therefore, any consensus node (any consensus node in the blockchain network, which may be the above target consensus node or not) can call the business contract to perform consensus processing on the second transaction. The process may include:

[0165] First of all, it should be explained that each consensus node can hold the node public key (also called the global public key) corresponding to the node private key (also called the global private key) of the target business node. Based on the characteristics of the ECDSA m-n multi-signature algorithm itself, the node public key can be equal to the sum of the public key fragments corresponding to the private key fragments held by all parties (all clients and target business nodes). The node public key can be public.

[0166] Therefore, any consensus node can call the business contract to use the node public key corresponding to the node private key of the target business node to verify the first transaction signature in the second transaction (i.e., signature verification), including: any consensus node can use the node public key to decrypt the first transaction signature in the second transaction, and the hash value obtained by decryption can be called the decrypted hash value.

[0167] Any consensus node can also call the business contract to perform hash calculation on the transaction information in the second transaction except the signature of the first transaction, and the calculated hash value can be called the calculated hash value. Therefore, if the calculated hash value is consistent with the decrypted hash value (i.e., the same), it can be determined that any consensus node has successfully reached consensus on the second transaction (in fact, the consensus process for the transaction can also include other consensus operations related to the transaction itself. For example, when the transaction is a resource transfer transaction, it is also necessary to verify whether the resources owned by the resource transfer party are sufficient to perform operations such as the corresponding number of resource transfers, which can be determined based on the actual application scenario).

[0168] Optionally, when more than a specified number of consensus nodes in the consensus network (such as more than 2f+1, f is a positive integer, and f is the maximum number of malicious nodes that can be accommodated in the consensus network) successfully reach consensus on the second transaction, it indicates that the second transaction has been successfully reached in the consensus network, and the consensus network (i.e., the consensus nodes in the consensus network) can also call the business contract to execute the second transaction, obtain the execution result of the second transaction, and can process the second transaction and the execution result of the second transaction on the chain (i.e., store them in the blockchain network).

[0169] The consensus network (such as the target consensus node in the consensus network) can return the execution result of the second transaction to the target business node, and the target business node can also store the execution result of the second transaction.

[0170] If the second transaction is a transaction for storing target data, the execution result of the second transaction can be the result of successfully storing the target data; if the second transaction is to transfer the target resources of the first account to the second account, the execution result of the second transaction can be the result of transferring the target resources of the first account to the second account, and so on.

[0171] Optionally, the target service node may also associate and store the execution result of the second transaction, the first transaction (which may be the original first transaction sent by the client without modification), and the second transaction.

[0172] In this application, the processing logic of the local contract for data (same as information) can be public, but the process of local contract processing data (i.e., the execution process) is not public. Therefore, through the above process, the transaction information of the target type can only exist in the target business node (such as only in the local contract of the target business node) and will not be exposed to other blockchain nodes in the blockchain network (such as consensus nodes), that is, the transaction information of the target type will not be made public, thereby improving the security and privacy of the transaction information of the target type in the transaction.

[0173] Furthermore, since the business node in the present application can process the transaction information of the target type in the transaction through the local contract, the subsequent consensus node does not need to process the transaction information of the target type. Therefore, the target business node shares part of the workload of transaction processing for the consensus node, thereby reducing the load of the consensus node on transaction processing.

[0174] In addition, since this application adopts a multi-signature algorithm, the client and the target business node respectively hold private key shards of the node private key. It is impossible to sign a transaction through the private key shard held by a client itself. Therefore, the client cannot bypass the target business node and directly send transactions that have not been processed by the target business node (that is, transactions that have not been verified by the target business node) to the consensus node. Therefore, the security of transaction processing is also improved.

[0175] Furthermore, by adopting the method provided in the present application, the local contract in the target business node can execute more complex business logic, and can append the execution result (such as the processing result of the transaction information of the target type) to the transaction (such as the first transaction initiated by the client), and the appended transaction (such as the transition transaction) can be confirmed by both the target business node and the client (that is, the confirmation is achieved through the process of the two parties co-signing the transition transaction based on the private key shards they hold). It can be understood that both the signature of the target business node on the transition transaction and the signature of the client on the transition transaction are retained. Therefore, it complies with the business rules of submitting the transaction to the consensus node, ensuring the security and credibility of the transaction.

[0176] In the present application, the blockchain network may include a business network and a consensus network. The business network includes a target business node. A local contract is deployed in the target business node. The local contract is used to process the transaction information of the target type in the transaction. The transaction information of the target type is the transaction information that the consensus network does not need to witness. The target business node has a node private key. The target business node and the client each hold a private key shard of the node private key obtained through negotiation. Therefore, the target business node can receive the first transaction sent by the client, and can extract the transaction information of the target type from the first transaction; call the local contract to process the extracted transaction information of the target type, obtain the processing result of the extracted transaction information of the target type, and generate a transition transaction based on the processing result and the transaction information other than the target type in the first transaction; send the transition transaction to the client, and cooperate with the client to sign the transition transaction based on the private key shards held by each party, and obtain the first transaction signature of the transition transaction; generate a second transaction based on the first transaction signature and the transition transaction, and send the second transaction to the consensus network so that the consensus network performs consensus processing on the second transaction. It can be seen from this that the method proposed in the present application can process the transaction information (i.e., the target type of transaction information) that the consensus network does not need to witness in the first transaction initiated by the client, and the target business node can directly give the processing result of the target type of transaction information to the consensus network; and because the first transaction originally initiated by the client is changed by the processing result, a new transaction (i.e., a transitional transaction) is obtained. Therefore, in the present application, the target business node and the client can also negotiate with each other about the private key shard of the node private key of the target business node, and the target business node can also cooperate with the client to sign the new transaction based on the private key shards they each hold. The signature of the new transaction (i.e., the first transaction signature) can be obtained by name processing, and then the second transaction can be generated through the new transaction and the signature of the new transaction, and the second transaction is given to the consensus network for consensus processing, so as to alleviate the load pressure of the consensus network in processing transactions, so that the target business node and the consensus network can jointly process the transaction, and the private key sharding held by the target business node and the client also solves the problem that the target business node and the client need to jointly sign the new transaction (because the first transaction was changed by the target business node, and the new transaction needs to be confirmed by both parties), thereby improving the performance of the blockchain network in processing transactions.

[0177] See also Figure 7 , Figure 7 is a flow chart of a contract deployment method provided by this application. The execution subject in the embodiment of this application may also be the above-mentioned target business node. Figure 7 As shown, the method may include:

[0178] Step S201, generating a contract deployment transaction; the contract deployment transaction includes a local contract, and the contract deployment transaction is used to request deployment of the local contract in the target business node.

[0179] Optionally, the target business node may generate a contract deployment transaction, which may include the local contract to be deployed (such as the contract code of the local contract), and the local contract may be imported into the target business node, or the local contract may be directly written in the target business node, without limitation. The contract deployment transaction is a transaction for requesting the deployment of a local contract in the target business node.

[0180] Step S202, submitting the contract deployment transaction to the consensus network, so that the consensus network performs consensus processing on the contract deployment transaction.

[0181] Optionally, the target business node may send the above-generated contract deployment transaction to the consensus network (which may be the same as the principle of sending the second transaction to the consensus network), so that each consensus node in the consensus network can perform consensus processing on the contract deployment transaction.

[0182] If the contract deployment transaction is successfully agreed upon in the consensus network, the consensus network (i.e., the consensus node in the consensus network) can execute the contract deployment transaction. Executing the contract deployment transaction can confirm the successful deployment of the local contract in the target business node. After executing the contract deployment transaction, the execution result of the contract deployment transaction can be obtained. The execution result can include the status information of the contract deployment transaction (such as the status information of the execution). The status information can include the local contract, and the status information can be used to indicate that the local contract is successfully deployed in the target business node.

[0183] Optionally, the target business node in the present application may have two private keys, one of which is the node private key mentioned above, and the node private key is used for the target business node and the client to negotiate the corresponding private key shards, so that the target business node can subsequently cooperate with the client to sign the repackaged client's transactions (such as transition transactions). The other private key can be called the business private key of the target business node, and the business private key can also have a corresponding public key (which can be called a business public key). The business public key can be public, and the business private key and the business public key can constitute a key pair. The business private key can be used for transactions that are exclusive to the target business node itself (the transaction is usually unrelated to the client, such as the transaction can include the above-mentioned contract deployment transaction and the above-mentioned contract binding transaction, etc.).

[0184] Optionally, after the target business node and the client negotiate on the node private key, the private key shard held by the target business node can be used as the above-mentioned business private key. Alternatively, the business private key may not be the private key shard held by the target business node on the node private key, and the business private key may also be regenerated additionally using the private key generation algorithm.

[0185] Therefore, the consensus node in the consensus network can hold the above-mentioned business public key. The above-mentioned contract deployment transaction in this application can carry the transaction signature of the contract deployment transaction, and the transaction signature can be obtained by the target business node using the business private key to sign the transaction information in the contract deployment transaction except the transaction signature.

[0186] After obtaining the contract deployment transaction, the consensus node in the consensus network can use the above-mentioned business public key to verify the transaction signature in the contract deployment transaction (i.e., signature verification). If the verification is successful and it is confirmed that the contract deployment transaction has been successfully agreed upon in the consensus network, the contract deployment transaction can be executed to obtain the execution result of the contract deployment transaction.

[0187] Step S203, receiving the execution result of the contract deployment transaction sent by the consensus network; the execution result is the result of the contract deployment transaction being executed by the consensus network after the contract deployment transaction consensus is successfully reached.

[0188] Optionally, the consensus network (i.e., the consensus node in the consensus network) can return the execution result of the obtained contract deployment transaction to the target business node, so that the target business node can receive the execution result of the contract deployment transaction sent by the consensus network.

[0189] The target business node can obtain the successfully deployed local contract (i.e., the local contract deployed by synchronizing from the consensus network) through the execution result of the contract deployment transaction, and confirm that the local contract is successfully deployed at the target business node.

[0190] By adopting the above method described in this application, the successful deployment of the local contract in the target business node can be achieved through transactions.

[0191] See also Figure 8 , Figure 8 This is a flowchart of deploying a local contract provided by this application. Figure 8 As shown, S1: the target business node can request the consensus node to deploy a local smart contract (i.e., a local contract, such as a transaction request deployed through the above contract), and the code of the local smart contract can be included in the request.

[0192] S2: After receiving the request from the target business node, the consensus node (which can be any consensus node in the consensus network) can perform a deployment operation. The principle of performing the deployment operation can be to reach a consensus in the consensus network and execute a contract deployment transaction. By performing the deployment operation, the local contract can be successfully deployed in the target business node.

[0193] S3: The consensus node can return the deployment result of the local contract to the target business node (which can be the execution result of the contract deployment transaction), so that the target business node can synchronously deploy the successful local contract from the consensus node, so that the subsequent target business node can call the local contract.

[0194] S4: After knowing that the local contract has been successfully deployed, the target business node can also request the consensus node to set the access address of the local contract. The access address can be the public key shard corresponding to the private key shard held by each client connected to the target business node. The access address can be used to verify the subsequent transactions initiated by the client (such as the first transaction), so that only the client whose public key shard corresponding to the private key shard is set as the access address of the local contract can initiate the corresponding transaction (such as the first transaction) to the target business node, that is, only the client whose public key shard corresponding to the private key shard is set as the access address of the local contract can initiate the transaction to call the local contract to the target business node. The transaction can be successfully verified by the target business node and then processed (such as pre-processing of the transaction).

[0195] S5: After the consensus node obtains the request initiated by the target business node for setting the access address of the local contract, it can set the access address for the local contract, that is, set the public key shard corresponding to the private key shard held by each client connected to the target business node as the access address of the local contract. Optionally, the request can carry the public key shard corresponding to the private key shard held by each client connected to the target business node.

[0196] Optionally, the process in which the target business node requests the consensus node to set the access address of the local contract can also be achieved by the target business node initiating a transaction to the consensus node to set the access address of the local contract (which can be called an access address setting transaction). After receiving the access address setting transaction, the consensus node can reach a consensus on the access address setting transaction. After the access address setting transaction is successfully agreed upon in the consensus network, the consensus node can execute the access address setting transaction. Executing the access address setting transaction is to set the access address of the local contract.

[0197] S6: The consensus node can return the setting result (such as the execution result of the access address setting transaction) to the target business node, and the target business node will know that the access address setting of the local contract is successful. Subsequently, only the clients that negotiate the private key sharding of the node private key with the target business node (that is, the clients connected to the target business node) can call the local contract deployed in the target business node.

[0198] Subsequently, the client can query the local contract from the target business node or the consensus node to ensure that the local contract deployed in the target business node is consistent with the local contract that has been agreed upon by each consensus node in the consensus network.

[0199] See also Fig. 9 , Fig. 9 This is a structural diagram of a transaction processing device for a blockchain network provided by the present application. The blockchain network includes a business network and a consensus network. The business network includes a target business node. A local contract is deployed in the target business node. The local contract is used to process the transaction information of the target type in the transaction. The transaction information of the target type is the transaction information that the consensus network does not need to witness. The target business node has a node private key. The target business node and the client each hold a private key shard of the node private key obtained through negotiation. The transaction processing device of the blockchain network can be applied to the target business node. Fig. 9 As shown, the transaction processing device 901 of the blockchain network may include: a receiving module 9011, a calling module 9012, a signature module 9013 and a consensus module 9014.

[0200] The receiving module 9011 is used to receive a first transaction sent by a client, and extract transaction information of a target type from the first transaction;

[0201] A calling module 9012 is used to call the local contract to process the extracted transaction information of the target type, obtain the processing result of the extracted transaction information of the target type, and generate a transition transaction based on the processing result and the transaction information other than the transaction information of the target type in the first transaction;

[0202] The signature module 9013 is used to send the transition transaction to the client, and cooperate with the client to sign the transition transaction based on the private key shards held by each party, so as to obtain the first transaction signature of the transition transaction;

[0203] The consensus module 9014 is used to generate a second transaction based on the first transaction signature and the transition transaction, and send the second transaction to the consensus network so that the consensus network performs consensus processing on the second transaction.

[0204] Optionally, the first transaction includes a called contract address, which is the contract address of a local contract. A business contract is deployed in the consensus network, and the business contract is used by the consensus network to process transactions. The first transaction includes a second transaction signature, which is obtained by the client signing the transaction information in the first transaction except the second transaction signature based on the private key sharding it holds.

[0205] The calling module 9012 generates a transition transaction based on the processing result and the transaction information other than the transaction information of the target type in the first transaction, including:

[0206] The transaction information of the target type in the first transaction is replaced with the processing result, and the second transaction signature in the first transaction is removed to obtain an initial transition transaction;

[0207] Change the contract address called in the initial transition transaction from the contract address of the local contract to the contract address of the business contract to generate a transition transaction.

[0208] Optionally, a binding relationship is established between the contract address of the local contract and the contract address of the business contract;

[0209] The calling module 9012 modifies the contract address called in the initial transition transaction from the contract address of the local contract to the contract address of the business contract, and generates a transition transaction in the following manner:

[0210] Get the contract address that is bound to the contract address of the local contract;

[0211] The contract address called in the initial transition transaction is modified from the contract address of the local contract to a contract address that has a binding relationship with the contract address of the local contract, and a transition transaction is generated.

[0212] Optionally, the signature module 9013 cooperates with the client to sign the transition transaction based on the private key shards held by each party to obtain the first transaction signature of the transition transaction, including:

[0213] Get the encrypted private key shard sent by the client; the encrypted private key shard is sent by the client after successfully verifying the transition transaction, and the encrypted private key shard is obtained by the client performing homomorphic encryption on the private key shard it holds;

[0214] Based on the encrypted private key shard and the private key shard held by the target business node, the transition transaction is signed to obtain the first transaction signature of the transition transaction.

[0215] Optionally, the first transaction includes a second transaction signature, and the second transaction signature is obtained by the client after signing the transaction information in the first transaction except the second transaction signature based on the private key shard held by the client;

[0216] The method in which the receiving module 9011 extracts the transaction information of the target type from the first transaction includes:

[0217] Using the public key shard corresponding to the private key shard held by the client, verify the second transaction signature in the first transaction to obtain a verification result of the second transaction signature;

[0218] If the verification result of the second transaction signature is used to indicate that the verification of the second transaction signature is successful, the transaction information of the target type is extracted from the first transaction.

[0219] Optionally, the manner in which the signature module 9013 sends the transition transaction to the client includes:

[0220] The transition transaction is signed using the private key shard held by the target business node to obtain the third transaction signature of the transition transaction;

[0221] Send the third transaction signature and transition transaction to the client;

[0222] Among them, the client is used to verify the received third transaction signature based on the public key shard corresponding to the private key shard held by the target business node, and after the third transaction signature is successfully verified, it is used to cooperate with the target business node to sign the transition transaction.

[0223] Optionally, the transition transaction includes a signature field, and the field information at the signature field in the transition transaction is empty;

[0224] The way in which the consensus module 9014 generates the second transaction based on the first transaction signature and the transition transaction includes:

[0225] The first transaction signature is encapsulated into the signature field in the transition transaction to generate a second transaction.

[0226] Optionally, the transaction information of the target type in the first transaction is the identity information of the client;

[0227] The calling module 9012 calls the local contract to process the extracted transaction information of the target type, and obtains the processing result of the extracted transaction information of the target type, including:

[0228] Call the local contract to perform identity authentication on the client based on the extracted identity information and obtain the client's identity authentication result;

[0229] Among them, the identity authentication result is the processing result of the identity information.

[0230] Optionally, after receiving the second transaction, the consensus network is used to extract the identity authentication result from the second transaction;

[0231] The consensus network is used to perform consensus processing on the second transaction after determining that the identity of the client initiating the second transaction is legitimate based on the identity authentication result.

[0232] Optionally, the consensus network includes multiple consensus nodes; the way in which the consensus module sends the second transaction to the consensus network includes:

[0233] Sending the second transaction to a target consensus node among the multiple consensus nodes, so that the target consensus node broadcasts the second transaction to other consensus nodes among the multiple consensus nodes;

[0234] The target consensus node is any one of the multiple consensus nodes, and the multiple consensus nodes are all used to perform consensus processing on the received second transaction.

[0235] Optionally, the first transaction signature is consistent with a transaction signature obtained by encrypting a hash value of the transition transaction using a node private key;

[0236] The process of consensus processing of the second transaction by any consensus node includes:

[0237] Using the node public key corresponding to the node private key, decrypt the first transaction signature in the second transaction to obtain a decrypted hash value;

[0238] Performing hash calculation on the transaction information in the second transaction except the signature of the first transaction to obtain a calculated hash value;

[0239] If the calculated hash value is consistent with the decrypted hash value, it is determined that any consensus node has successfully reached consensus on the second transaction.

[0240] Optionally, the device 901 is further used for:

[0241] Generate a contract deployment transaction; the contract deployment transaction contains a local contract, and the contract deployment transaction is used to request the deployment of the local contract in the target business node;

[0242] Send the contract deployment transaction to the consensus network so that the consensus network can process the contract deployment transaction through consensus.

[0243] Receive the execution result of the contract deployment transaction sent by the consensus network; the execution result is the result of the contract deployment transaction executed by the consensus network after the contract deployment transaction consensus is successful;

[0244] Among them, the execution result of the contract deployment transaction includes the status information of the contract deployment transaction, the status information includes the local contract, and the status information is used to indicate that the local contract deployment is successful.

[0245] Optionally, the device 901 is further used for:

[0246] Receiving the execution result of the second transaction sent by the consensus network; the execution result is the result of executing the second transaction after the consensus network successfully reaches consensus on the second transaction;

[0247] The execution result of the second transaction, the first transaction, and the second transaction are stored in association.

[0248] According to one embodiment of the present application, Figure 3 The steps involved in the transaction processing method of the blockchain network shown can be Fig. 9 The various modules in the transaction processing device 901 of the blockchain network shown are executed. For example, Figure 3 The step S101 shown in FIG. 1 can be performed by Fig. 9 The receiving module 9011 in is used to execute, Figure 3 The step S102 shown in FIG. 1 can be performed by Fig. 9 The calling module 9012 in is executed; Figure 3 The step S103 shown in FIG. 1 can be performed by Fig. 9 The signature module 9013 in is executed. Figure 3 The step S104 shown in FIG. 1 can be performed by Fig. 9 It is executed by consensus module 9014 in.

[0249] In the present application, the blockchain network may include a business network and a consensus network. The business network includes a target business node. A local contract is deployed in the target business node. The local contract is used to process the transaction information of the target type in the transaction. The transaction information of the target type is the transaction information that the consensus network does not need to witness. The target business node has a node private key. The target business node and the client each hold a private key shard of the node private key obtained through negotiation. Therefore, the target business node can receive the first transaction sent by the client, and can extract the transaction information of the target type from the first transaction; call the local contract to process the extracted transaction information of the target type, obtain the processing result of the extracted transaction information of the target type, and generate a transition transaction based on the processing result and the transaction information other than the target type in the first transaction; send the transition transaction to the client, and cooperate with the client to sign the transition transaction based on the private key shards held by each party, and obtain the first transaction signature of the transition transaction; generate a second transaction based on the first transaction signature and the transition transaction, and send the second transaction to the consensus network so that the consensus network performs consensus processing on the second transaction. It can be seen from this that the device proposed in the present application can process the transaction information (i.e., the target type of transaction information) in the first transaction initiated by the client that the consensus network does not need to witness by the target business node, and then the target business node can directly give the processing result of the target type of transaction information to the consensus network; and because the first transaction originally initiated by the client is changed by the processing result, a new transaction (i.e., a transitional transaction) is obtained. Therefore, in the present application, the target business node and the client can also negotiate with each other about the private key shard of the node private key of the target business node, and the target business node can also cooperate with the client to sign the new transaction based on the private key shards they each hold. The signature of the new transaction (i.e., the first transaction signature) can be obtained by name processing, and then the second transaction can be generated through the new transaction and the signature of the new transaction, and the second transaction is given to the consensus network for consensus processing, so as to alleviate the load pressure of the consensus network in processing transactions, so that the target business node and the consensus network can jointly process the transaction, and the private key sharding held by the target business node and the client also solves the problem that the target business node and the client need to jointly sign the new transaction (because the first transaction was changed by the target business node, and the new transaction needs to be confirmed by both parties), thereby improving the performance of the blockchain network in processing transactions.

[0250] According to one embodiment of the present application, Fig. 9The various modules in the transaction processing device 901 of the blockchain network shown can be separately or completely combined into one or several units to constitute, or one (some) of the units can be further divided into multiple functionally smaller sub-units, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above modules are divided based on logical functions. In practical applications, the functions of a module can also be implemented by multiple units, or the functions of multiple modules can be implemented by one unit. In other embodiments of the present application, the transaction processing device 901 of the blockchain network may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0251] According to one embodiment of the present application, the program can be executed by running on a general-purpose computer device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. Figure 3 The computer program of each step involved in the corresponding method shown in is constructed as follows Fig. 9 The transaction processing device 901 of the blockchain network shown in the embodiment of the present application is used to implement the transaction processing method of the blockchain network. The above computer program can be recorded on, for example, a computer-readable recording medium, and loaded into the above computing device through the computer-readable recording medium, and run therein.

[0252] See also Fig.10 , Fig.10 Schematic diagram of the structure of a computer device provided by this application. Fig.10 As shown, the computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, in some embodiments, the computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally be at least one storage device located away from the aforementioned processor 1001. As Fig.10 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.

[0253] exist Fig.10 In the computer device 1000 shown, the network interface 1004 can provide a network communication function; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

[0254] Receive a first transaction sent by a client, and extract transaction information of a target type from the first transaction; the blockchain network includes a business network and a consensus network, the business network includes a target business node, a local contract is deployed in the target business node, the local contract is used to process the transaction information of the target type in the transaction, the transaction information of the target type is the transaction information that the consensus network does not need to witness, the target business node has a node private key, the target business node and the client each hold a private key shard of the node private key obtained through negotiation; the computer device 1000 is applied to the target business node;

[0255] Calling the local contract to process the extracted transaction information of the target type, obtaining a processing result of the extracted transaction information of the target type, and generating a transition transaction based on the processing result and transaction information other than the transaction information of the target type in the first transaction;

[0256] Send the transition transaction to the client, and collaborate with the client to sign the transition transaction based on the private key shards held by each party to obtain the first transaction signature of the transition transaction;

[0257] A second transaction is generated based on the first transaction signature and the transition transaction, and the second transaction is sent to the consensus network so that the consensus network performs consensus processing on the second transaction.

[0258] In a feasible implementation, the first transaction includes a called contract address, the contract address called by the first transaction is the contract address of the local contract, a business contract is deployed in the consensus network, and the business contract is used for the consensus network to perform business processing on the transaction; the first transaction includes a second transaction signature, and the second transaction signature is obtained by the client after signing the transaction information in the first transaction except the second transaction signature based on the private key sharding held; the processor 1001 can also be used to call the device control application stored in the memory 1005 to achieve:

[0259] The transaction information of the target type in the first transaction is replaced with the processing result, and the second transaction signature in the first transaction is removed to obtain an initial transition transaction;

[0260] Change the contract address called in the initial transition transaction from the contract address of the local contract to the contract address of the business contract to generate a transition transaction.

[0261] In a feasible implementation, a binding relationship is established between the contract address of the local contract and the contract address of the business contract; the processor 1001 can also be used to call the device control application stored in the memory 1005 to achieve:

[0262] Get the contract address that is bound to the contract address of the local contract;

[0263] The contract address called in the initial transition transaction is modified from the contract address of the local contract to a contract address that has a binding relationship with the contract address of the local contract, and a transition transaction is generated.

[0264] In a feasible implementation manner, the processor 1001 may also be used to call a device control application stored in the memory 1005 to implement:

[0265] Get the encrypted private key shard sent by the client; the encrypted private key shard is sent by the client after successfully verifying the transition transaction, and the encrypted private key shard is obtained by the client performing homomorphic encryption on the private key shard it holds;

[0266] Based on the encrypted private key shard and the private key shard held by the target business node, the transition transaction is signed to obtain the first transaction signature of the transition transaction.

[0267] In a feasible implementation, the first transaction includes a second transaction signature, and the second transaction signature is obtained by the client after signing the transaction information other than the second transaction signature in the first transaction based on the private key shard held by the client; the processor 1001 can also be used to call the device control application stored in the memory 1005 to implement:

[0268] Using the public key shard corresponding to the private key shard held by the client, verify the second transaction signature in the first transaction to obtain a verification result of the second transaction signature;

[0269] If the verification result of the second transaction signature is used to indicate that the verification of the second transaction signature is successful, the transaction information of the target type is extracted from the first transaction.

[0270] In a feasible implementation manner, the processor 1001 may also be used to call a device control application stored in the memory 1005 to implement:

[0271] The transition transaction is signed using the private key shard held by the target business node to obtain the third transaction signature of the transition transaction;

[0272] Send the third transaction signature and transition transaction to the client;

[0273] Among them, the client is used to verify the received third transaction signature based on the public key shard corresponding to the private key shard held by the target business node, and after the third transaction signature is successfully verified, it is used to cooperate with the target business node to sign the transition transaction.

[0274] In a feasible implementation manner, the transition transaction includes a signature field, and the field information at the signature field in the transition transaction is empty; the processor 1001 may also be used to call the device control application stored in the memory 1005 to implement:

[0275] The first transaction signature is encapsulated into the signature field in the transition transaction to generate a second transaction.

[0276] In a feasible implementation manner, the target type of transaction information in the first transaction is the identity information of the client; the processor 1001 may also be used to call the device control application stored in the memory 1005 to implement:

[0277] Call the local contract to perform identity authentication on the client based on the extracted identity information and obtain the client's identity authentication result;

[0278] Among them, the identity authentication result is the processing result of the identity information.

[0279] In a feasible implementation, after receiving the second transaction, the consensus network is used to extract the identity authentication result from the second transaction;

[0280] The consensus network is used to perform consensus processing on the second transaction after determining that the identity of the client initiating the second transaction is legitimate based on the identity authentication result.

[0281] In a feasible implementation, the consensus network includes multiple consensus nodes; the processor 1001 can also be used to call the device control application stored in the memory 1005 to achieve:

[0282] Sending the second transaction to a target consensus node among the multiple consensus nodes, so that the target consensus node broadcasts the second transaction to other consensus nodes among the multiple consensus nodes;

[0283] The target consensus node is any one of the multiple consensus nodes, and the multiple consensus nodes are all used to perform consensus processing on the received second transaction.

[0284] In a feasible implementation, the first transaction signature is consistent with the transaction signature obtained by encrypting the hash value of the transition transaction using the node private key; the process of any consensus node performing consensus processing on the second transaction includes:

[0285] Using the node public key corresponding to the node private key, decrypt the first transaction signature in the second transaction to obtain a decrypted hash value;

[0286] Performing hash calculation on the transaction information in the second transaction except the signature of the first transaction to obtain a calculated hash value;

[0287] If the calculated hash value is consistent with the decrypted hash value, it is determined that any consensus node has successfully reached consensus on the second transaction.

[0288] In a feasible implementation manner, the processor 1001 may also be used to call a device control application stored in the memory 1005 to implement:

[0289] Generate a contract deployment transaction; the contract deployment transaction contains a local contract, and the contract deployment transaction is used to request the deployment of the local contract in the target business node;

[0290] Send the contract deployment transaction to the consensus network so that the consensus network can process the contract deployment transaction through consensus.

[0291] Receive the execution result of the contract deployment transaction sent by the consensus network; the execution result is the result of the contract deployment transaction executed by the consensus network after the contract deployment transaction consensus is successful;

[0292] Among them, the execution result of the contract deployment transaction includes the status information of the contract deployment transaction, the status information includes the local contract, and the status information is used to indicate that the local contract deployment is successful.

[0293] In a feasible implementation manner, the processor 1001 may also be used to call a device control application stored in the memory 1005 to implement:

[0294] Receiving the execution result of the second transaction sent by the consensus network; the execution result is the result of executing the second transaction after the consensus network successfully reaches consensus on the second transaction;

[0295] The execution result of the second transaction, the first transaction, and the second transaction are stored in association.

[0296] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 3 The description of the transaction processing method of the blockchain network in the corresponding embodiment can also be performed as described above. Fig. 9 The description of the transaction processing device 901 of the blockchain network in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated here.

[0297] In addition, it should be pointed out here that: the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program, and when the processor executes the computer program, it can execute the above Figure 3 The description of the transaction processing method of the blockchain network in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0298] As an example, the above-mentioned computer program may be deployed on one computer device for execution, or deployed on multiple computer devices located at one location for execution, or executed on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network may constitute a blockchain network.

[0299] The computer-readable storage medium may be an internal storage unit of the computer device, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0300] The present application provides a computer program product, which includes a computer program, which is stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the above-mentioned Figure 3 The description of the transaction processing method of the above-mentioned blockchain network in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0301] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the listed steps or modules, but optionally includes steps or modules that are not listed, or optionally includes other step units inherent to these processes, methods, devices, products, or equipment.

[0302] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0303] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A transaction processing method for a blockchain network, characterized in that: The blockchain network includes a business network and a consensus network. The business network includes a target business node. A local contract is deployed in the target business node. The local contract is used to process transaction information of a target type in a transaction. The transaction information of the target type is transaction information that does not require witnessing in the consensus network. The target business node has a node private key. The target business node and the client each hold a private key shard of the node private key obtained through negotiation. The method is applied to the target service node, and the method includes: receiving a first transaction sent by the client, and extracting transaction information of the target type from the first transaction; Calling the local contract to process the extracted transaction information of the target type to obtain a processing result of the extracted transaction information of the target type, and generating a transition transaction based on the processing result and transaction information in the first transaction except the transaction information of the target type; Sending the transition transaction to the client, and cooperating with the client to sign the transition transaction based on the private key shards held by each party, to obtain a first transaction signature of the transition transaction; A second transaction is generated based on the first transaction signature and the transition transaction, and the second transaction is sent to the consensus network so that the consensus network performs consensus processing on the second transaction.

2. The method according to claim 1, characterized in that The first transaction includes a called contract address, which is the contract address of the local contract. A business contract is deployed in the consensus network, and the business contract is used by the consensus network to process transactions. The first transaction includes a second transaction signature, which is obtained by the client signing the transaction information in the first transaction except the second transaction signature based on the private key sharding it holds. The generating a transition transaction based on the processing result and transaction information in the first transaction except the transaction information of the target type includes: Replacing the transaction information of the target type in the first transaction with the processing result, and removing the second transaction signature in the first transaction to obtain an initial transition transaction; The contract address called in the initial transition transaction is modified from the contract address of the local contract to the contract address of the business contract to generate the transition transaction.

3. The method according to claim 2, characterized in that A binding relationship is established between the contract address of the local contract and the contract address of the business contract; The step of modifying the contract address called in the initial transition transaction from the contract address of the local contract to the contract address of the business contract to generate the transition transaction includes: Obtain a contract address that has a binding relationship with the contract address of the local contract; The contract address called in the initial transition transaction is modified from the contract address of the local contract to a contract address that has a binding relationship with the contract address of the local contract, and the transition transaction is generated.

4. The method according to claim 1, characterized in that: The step of cooperating with the client to sign the transition transaction based on the private key shards held by each party to obtain a first transaction signature of the transition transaction includes: Obtaining the encrypted private key shard sent by the client; the encrypted private key shard is sent by the client after successfully verifying the transition transaction, and the encrypted private key shard is obtained by the client performing homomorphic encryption processing on the private key shard held by the client; Based on the encrypted private key shard and the private key shard held by the target business node, the transition transaction is signed to obtain the first transaction signature of the transition transaction.

5. The method according to claim 1, characterized in that The first transaction includes the second transaction signature, and the second transaction signature is obtained by the client after signing the transaction information in the first transaction except the second transaction signature based on the private key shard held by the client; The extracting the transaction information of the target type from the first transaction includes: Using the public key shard corresponding to the private key shard held by the client, verifying the second transaction signature in the first transaction to obtain a verification result of the second transaction signature; If the verification result of the second transaction signature is used to indicate that the verification of the second transaction signature is successful, the transaction information of the target type is extracted from the first transaction.

6. The method according to claim 1, characterized in that The sending the transition transaction to the client comprises: The transition transaction is signed using the private key shard held by the target business node to obtain a third transaction signature of the transition transaction; Sending the third transaction signature and the transition transaction to the client; Among them, the client is used to verify the received third transaction signature based on the public key shard corresponding to the private key shard held by the target business node, and after the third transaction signature is successfully verified, it is used to cooperate with the target business node to sign the transition transaction.

7. The method according to claim 1, characterized in that The transition transaction includes a signature field, and field information at the signature field in the transition transaction is empty; The generating a second transaction based on the first transaction signature and the transition transaction comprises: The first transaction signature is encapsulated into the signature field in the transition transaction to generate the second transaction.

8. The method according to claim 1, characterized in that The target type of transaction information in the first transaction is the identity information of the client; The calling of the local contract to process the extracted transaction information of the target type to obtain a processing result of the extracted transaction information of the target type includes: Calling the local contract to perform identity authentication processing on the client based on the extracted identity information to obtain an identity authentication result of the client; The identity authentication result is the processing result of the identity information.

9. The method according to claim 8, characterized in that After receiving the second transaction, the consensus network is used to extract the identity authentication result from the second transaction; The consensus network is used to perform consensus processing on the second transaction after determining that the identity of the client initiating the second transaction is legitimate based on the identity authentication result.

10. The method according to claim 1, characterized in that The consensus network includes a plurality of consensus nodes; sending the second transaction to the consensus network includes: Sending the second transaction to a target consensus node among the multiple consensus nodes, so that the target consensus node broadcasts the second transaction to other consensus nodes among the multiple consensus nodes; Among them, the target consensus node is any one of the multiple consensus nodes, and the multiple consensus nodes are all used to perform consensus processing on the received second transaction.

11. The method according to claim 10, characterized in that The first transaction signature is consistent with a transaction signature obtained by encrypting the hash value of the transition transaction using the node private key; The process of any consensus node performing consensus processing on the second transaction includes: Decrypting the first transaction signature in the second transaction using the node public key corresponding to the node private key to obtain a decrypted hash value; Performing hash calculation on the transaction information in the second transaction except the first transaction signature to obtain a calculated hash value; If the calculated hash value is consistent with the decrypted hash value, it is determined that any one of the consensus nodes has successfully reached consensus on the second transaction.

12. The method according to claim 1, characterized in that The method further comprises: Generate a contract deployment transaction; the contract deployment transaction includes the local contract, and the contract deployment transaction is used to request deployment of the local contract in the target business node; Sending the contract deployment transaction to the consensus network so that the consensus network performs consensus processing on the contract deployment transaction; Receiving the execution result of the contract deployment transaction sent by the consensus network; the execution result is the result of the consensus network executing the contract deployment transaction after successfully reaching consensus on the contract deployment transaction; The execution result of the contract deployment transaction includes status information of the contract deployment transaction, the status information includes the local contract, and the status information is used to indicate that the local contract is successfully deployed.

13. The method according to claim 1, characterized in that The method further comprises: receiving an execution result of the second transaction sent by the consensus network; the execution result is a result of executing the second transaction after the consensus network successfully reaches consensus on the second transaction; The execution result of the second transaction, the first transaction and the second transaction are stored in association.

14. A transaction processing device for a blockchain network, characterized in that: The blockchain network includes a business network and a consensus network. The business network includes a target business node. A local contract is deployed in the target business node. The local contract is used to process transaction information of a target type in a transaction. The transaction information of the target type is transaction information that does not require witnessing in the consensus network. The target business node has a node private key. The target business node and the client each hold a private key shard of the node private key obtained through negotiation. The device is applied to the target service node, and the device includes: A receiving module, configured to receive a first transaction sent by the client, and extract transaction information of the target type from the first transaction; a calling module, configured to call the local contract to process the extracted transaction information of the target type, obtain a processing result of the extracted transaction information of the target type, and generate a transition transaction based on the processing result and transaction information in the first transaction except the transaction information of the target type; A signature module, used to send the transition transaction to the client, and cooperate with the client to sign the transition transaction based on the private key shards held by each party, so as to obtain a first transaction signature of the transition transaction; A consensus module is used to generate a second transaction based on the first transaction signature and the transition transaction, and send the second transaction to the consensus network so that the consensus network performs consensus processing on the second transaction.

15. A computer program product, comprising a computer program, which implements the steps of the method according to any one of claims 1 to 13 when executed by a processor.

16. A computer device, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 13.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the method according to any one of claims 1 to 13.