Privacy transaction based on blockchain and its application method and device

By setting up trust setting transactions on the blockchain, the unprivacy-protected data information is converted into privacy-protected data and uploaded to the blockchain, which solves the problem of difficult privacy protection in data sharing between nodes and realizes data security. Privacy protection and attestability.

CN112381646BActive Publication Date: 2024-10-22ANTCHAIN TECHNOLOGY PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011103220.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-10-31
Publication Date
2024-10-22
Estimated Expiration
2038-10-31

AI Technical Summary

Technical Problem

In the existing blockchain architecture, data sharing between nodes makes it difficult to protect data privacy, and users do not want other nodes to know their data.

Method used

By setting up a trust setting transaction on the blockchain, the user converts unprivacy-protected data information into privacy-protected data information, and saves and uploads it to the blockchain distributed database on the trusted user's node device to ensure that the data Privacy and attestability on the blockchain.

Benefits of technology

It realizes the privacy protection of user data, prevents other nodes on the blockchain from obtaining its original data information, and at the same time certifies the authenticity and security of the data on the blockchain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112381646B_ABST
    Figure CN112381646B_ABST
Patent Text Reader

Abstract

One or more embodiments of the present specification provide a blockchain-based privacy transaction method and device, and a privacy transaction application method and device. The blockchain-based privacy transaction method is applied to a node device of a trusted user, including: receiving a first message sent by the blockchain user, the first message including first data information that is not privacy-protected; converting the first data information that is not privacy-protected into second data information that is privacy-protected; storing the first data information in a local database of the node device of the trusted user; and sending a second transaction to the blockchain, the second transaction including the second data information, so that the second transaction is verified and included in the distributed database of the blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of data processing technology, and in particular to a blockchain-based privacy transaction and its application method and device. Background Art

[0002] Blockchain technology, also known as distributed ledger technology, is an emerging technology in which several computing devices jointly participate in "bookkeeping" and jointly maintain a complete distributed database. Blockchain technology has been widely used in many fields because of its decentralized, open and transparent characteristics, each computing device can participate in database records, and data can be quickly synchronized between computing devices.

[0003] However, in the current mainstream blockchain architecture, each node stores the same data; in some practical scenarios, blockchain node participants do not want their data to be known by other nodes. Summary of the invention

[0004] In view of the current status and problems of the blockchain data processing flow proposed above, according to a first aspect of one or more embodiments of this specification, a privacy transaction method based on blockchain is proposed, which is applied to a node device of a trusted user, wherein the trusted user is determined by a trust setting transaction stored in a distributed database of the blockchain, and the trust setting transaction includes the identifiers of all trusted users corresponding to the blockchain user; the method includes:

[0005] Receiving a first message sent by the blockchain user, wherein the first message includes first data information that is not privacy-protected and second data information that is privacy-protected;

[0006] Converting the first data information without privacy protection into the second data information with privacy protection;

[0007] The first data information is stored in a local database of the node device of the trusted user;

[0008] A second transaction is sent to the blockchain, where the second transaction includes the second data information, so that the second transaction is verified and included in the distributed database of the blockchain.

[0009] According to a second aspect of one or more embodiments of this specification, a method for applying a private transaction based on blockchain is proposed, including:

[0010] Acquire a second transaction sent by a node device of a trusted user from a distributed database of the blockchain, the second transaction including second data information protected by privacy, wherein the trusted user is determined by a trust setting transaction stored in the distributed database of the blockchain, and the trust setting transaction includes identifiers of all trusted users corresponding to the blockchain user;

[0011] Receiving first data information without privacy protection sent by the node device of the trusted user, wherein the first data information is stored in a local database of the node device of the trusted user;

[0012] Verify whether the privacy-protected second data information is obtained by transforming the non-privacy-protected first data information; if so, execute application logic for the second transaction.

[0013] According to a third aspect of one or more embodiments of this specification, a privacy transaction device based on blockchain is proposed, which is applied to a node device of a trusted user, wherein the trusted user is determined by a trust setting transaction stored in a distributed database of the blockchain, and the trust setting transaction includes the identifiers of all trusted users corresponding to the blockchain user; the device includes:

[0014] A receiving unit, receiving a first message sent by the blockchain user, wherein the first message includes first data information that is not privacy protected;

[0015] a conversion unit, converting the first data information without privacy protection into second data information with privacy protection;

[0016] A storage unit, storing the first data information in a local database of a node device of the trusted user;

[0017] A sending unit sends a second transaction to the blockchain, where the second transaction includes the second data information, so that the second transaction is verified and included in the distributed database of the blockchain.

[0018] According to a fourth aspect of one or more embodiments of this specification, an application device for private transactions based on blockchain is proposed, including:

[0019] an acquiring unit, acquiring, from a distributed database of the blockchain, a second transaction sent by a node device of a trusted user, the second transaction including second data information subject to privacy protection, wherein the trusted user is determined by a trust setting transaction stored in the distributed database of the blockchain, the trust setting transaction including identifiers of all trusted users corresponding to the blockchain user;

[0020] A receiving unit, receiving first data information without privacy protection sent by the node device of the trusted user, wherein the first data information is stored in a local database of the node device of the trusted user;

[0021] A verification unit, verifying whether the second data information with privacy protection is converted from the first data information without privacy protection;

[0022] The application unit executes application logic for the second transaction.

[0023] This specification also provides a computer device, including: a memory and a processor; the memory stores a computer program that can be run by the processor; when the processor runs the computer program, it executes the steps described in the above-mentioned blockchain-based privacy transaction method.

[0024] This specification also provides a computer device, including: a memory and a processor; the memory stores a computer program that can be run by the processor; when the processor runs the computer program, it executes the steps described in the above-mentioned blockchain-based privacy data application method.

[0025] As can be seen from the above technical solutions, the privacy transaction method and device based on blockchain provided in this specification, the user sets up his trusted users on the blockchain through trust setting transactions, and discloses his first data information that he wants to keep private to his trusted users, and his trusted users upload the second data information that is converted from the above first data information and is protected by privacy to the distributed database of the blockchain, so that the above second data information that is protected by privacy is verified by consensus on the blockchain. The privacy transaction method provided in this specification can protect the privacy of the user's first data information that is not protected by privacy, prevent any other node on the blockchain from obtaining the first data information, and can also store the second data information obtained by the data conversion of the first data information on the blockchain for evidence protection; when any node needs to apply or verify the second data information in the future, it can obtain the above first data information from the trusted node set by the above user, and verify the correspondence between the first data information and the second data information, so as to complete the verification of the second data information stored on the blockchain, and obtain the original text of the first data information for its application.

[0026] The above technical solution provided in this specification is based on the distributed database storage mechanism of blockchain technology. The user's second data information is decentralized and recorded in all nodes, maintained by the nodes of all participants, synchronized in real time, and all records can be traced back. Moreover, based on the consensus mechanism of blockchain, the second data information provided by each user will not be tampered with after being provided, thereby ensuring the authenticity and security of the user's second data information. Based on the trust in the trusted user, when using the first data information corresponding to the second data information, the trusted user provides the original text of the first data information, thereby ensuring the authenticity, security and accuracy of the above first data. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A flowchart of a privacy transaction method based on blockchain and executed by a node device of a trusted user provided in an exemplary embodiment of this specification;

[0028] Figure 2 A flowchart of an exemplary embodiment of the present specification, in which a node device of a trusted user transmits a non-private message to a node device of another trusted user;

[0029] Figure 3 A flowchart of an application method for privacy-protected transactions performed by any node device of a blockchain provided by an exemplary embodiment of this specification;

[0030] Figure 4 A flowchart of a blockchain-based private transaction method and an application method for private transactions provided in another embodiment of this specification;

[0031] Figure 5 A schematic diagram of a blockchain-based privacy transaction device provided by an embodiment of this specification;

[0032] Figure 6 A schematic diagram of a privacy transaction application device based on blockchain provided by an embodiment of this specification;

[0033] Figure 7 A hardware structure diagram for running the blockchain-based privacy transaction device embodiment or privacy transaction application device provided in this specification. DETAILED DESCRIPTION

[0034] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0035] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0036] like Figure 1 As shown, an illustrative embodiment of this specification provides a privacy transaction method based on blockchain. The blockchain described in this embodiment may specifically refer to a P2P network system with a distributed data storage structure, in which each node device reaches a consensus mechanism. The data in the blockchain is distributed in "blocks" that are connected in time. The latter block contains the data summary of the previous block, and according to the specific consensus mechanism (such as POW, POS, DPOS or PBFT, etc.), a full backup of the data of all or part of the node devices is achieved. It is well known to those skilled in the art that since the blockchain system operates under the corresponding consensus mechanism, the data included in the blockchain database is difficult to be tampered by any node device. For example, for a blockchain using Pow consensus, at least 51% of the computing power of the entire network is required to tamper with the existing data. Therefore, the blockchain system has the characteristics of ensuring data security and preventing attacks and tampering that other centralized database systems cannot match.

[0037] The transaction described in this specification refers to a piece of data created by a user through a node device of a blockchain and ultimately published to a distributed database of the blockchain. Among them, transactions in the blockchain can be divided into transactions in a narrow sense and transactions in a broad sense. A transaction in a narrow sense refers to a value transfer published by a user to the blockchain; for example, in a traditional blockchain network, a transaction can be a transfer initiated by a user in the blockchain. A transaction in a broad sense refers to any data published by a user to the blockchain: for example, an operator can build a consortium chain based on actual business needs, and rely on the consortium chain to deploy some other types of online services that are not related to value transfer (for example, rental business, vehicle dispatch business, insurance claims business, credit services, medical services, etc.), and in such consortium chains, a transaction can be a business message or business request with business intentions published by a user in the consortium chain; for example, in an account-based blockchain, the transaction can also be data sent by a user to the blockchain to change the user's account status (such as account balance, etc.). Therefore, any data published by a user to the distributed database of the blockchain, regardless of whether the data is stored in the block body, block header or other location of the block, can belong to the "transaction" described in the present invention.

[0038] In addition, it is worth noting that the node devices described in this specification may include not only full-node devices that back up the full data of the distributed database of the blockchain, but also light-node devices that back up partial data of the distributed database of the blockchain, as well as other terminal devices or clients, which are not limited in this specification.

[0039] Figure 1 The blockchain-based privacy transaction method shown is applied to the node device of the trusted user, wherein the trusted user is determined by the trust setting transaction stored in the distributed database of the blockchain, and the trust setting transaction includes the identification of all trusted users determined by the blockchain user, such as the account address of the trusted user, the public key of the trusted user, or the account name of the trusted user, etc., which can uniquely identify the trusted user. The blockchain user can select and set the corresponding trusted user based on his or her trust in other users, for example, a financial institution, certification agency, supervisory agency user or other institution with high credit can be selected. The above trust setting transaction can be published directly to the blockchain by the blockchain user, or it can be published by the blockchain user calling a smart contract that declares the trusted user setting logic, which is not limited here.

[0040] Figure 1 The method shown includes: step 102, receiving a first message sent by the blockchain user, wherein the first message includes first data information that is not privacy protected.

[0041] The first message sent by the blockchain user as described in step 102 is received by the node device of the above-mentioned trusted user through the communication with the blockchain user through the off-chain channel. The off-chain channel refers to a form of private point-to-point communication or network communication through other relay nodes instead of sending transactions to the distributed database of the blockchain. It is worth noting that the above-mentioned first message can have the same data content format as the transaction published on the blockchain. The reason why it is called "message" instead of "transaction" here is that the above-mentioned first message is not sent to the distributed database of the blockchain, but is sent through the off-chain channel. The first data information without privacy protection refers to the original information that the first data information is not encrypted with privacy protection.

[0042] Step 104: convert the first data information without privacy protection into second data information with privacy protection.

[0043] The second data information with privacy protection is obtained by transforming the first data information without privacy protection. The specific data transformation rules can be set by the underlying protocol of the blockchain or by the trusted user. The transformation process can be to encrypt or encode the first data information to obtain the second data information. In an embodiment shown, in order to ensure that the second data information can only uniquely correspond to the first data information, the second data information can be a hash summary of the first data information.

[0044] Step 106: Save the first data information in a local database of the node device of the trusted user.

[0045] The local database of the node device of the above-mentioned trusted user is different from the blockchain distributed database of the node device of the trusted user. The first data information stored in the local database of the node device will not be known by other node devices on the blockchain, thereby ensuring the privacy of the first data information.

[0046] In another illustrated embodiment, in order to ensure the legitimacy of the content contained in the first message, a verification rule may be pre-set, and the node device of the trusted user may verify the first message, and after the verification specified by the preset verification rule is passed, the first data information may be saved in the local database of the node device of the trusted user. For example, when the first message includes the first digital signature made by the blockchain user at least on the first data information without privacy protection, the preset verification rule may at least include verifying that the first digital signature is made by the blockchain user at least on the first data information without privacy protection, so as to prevent other users from impersonating the blockchain user and tampering with the first data information.

[0047] Step 108: Send a second transaction to the blockchain, where the second transaction includes the second data information, so that the second transaction is verified by a node device with consensus authority in the blockchain and then included in the distributed database of the blockchain.

[0048] Any node device on the blockchain can obtain the second data information in the above-mentioned second transaction by accessing the distributed database of the blockchain; since the second data information is in a privacy-protected state, except for the blockchain user who sends the first message and the trusted users trusted by the blockchain user, other users on the blockchain cannot know the first data information corresponding to the second data information, thereby effectively protecting the privacy of the first data information.

[0049] The detailed process of making the second transaction included in the distributed database of the blockchain described in the above embodiment can be specifically set according to the consensus mechanism and verification rules of the blockchain. In an illustrated embodiment, the specific steps of including the second transaction in the distributed database of the blockchain may include:

[0050] The node device with accounting authority in the blockchain adds the second transaction to the candidate block;

[0051] Determine a consensus accounting node device that satisfies the blockchain consensus mechanism from the node devices with accounting authority;

[0052] The consensus accounting node device broadcasts the candidate block to the node devices of the blockchain;

[0053] After the candidate block is verified and approved by a preset number of node devices of the blockchain, the candidate block is regarded as the latest block and added to the distributed database of the blockchain.

[0054] In the above embodiment, the node device with accounting authority refers to the node device with the authority to generate the candidate block, which may include the node device with a higher credit user and other node devices in the above blockchain. According to the consensus mechanism of the blockchain, the consensus accounting node device can be determined from the node devices with accounting authority for the candidate block, and the above consensus mechanism may include the proof of work mechanism (PoW), or the proof of rights mechanism (PoS), or the share authorization proof mechanism (DPoS), or the PBFT commonly used by the alliance chain.

[0055] Regarding the verification of the second transaction, it may generally include the verification of the data content format of the second transaction, or the verification of all or part of the content of the second transaction, or the verification of the digital signature contained in the second transaction, etc. In an illustrated embodiment, in order to ensure that the node device of the trusted user who sends the second transaction belongs to the trusted user set by the blockchain user, the node device of the blockchain should verify whether the identifier of the trusted user is included in the trust setting transaction initiated by the blockchain user; if so, it indicates that the initiating user of the second transaction is a legitimate initiating user.

[0056] In another illustrated embodiment, in order to prevent any other node device from impersonating the node device of the above-mentioned trusted user to initiate the above-mentioned second transaction, the above-mentioned second transaction also includes the second digital signature made by the above-mentioned trusted user at least on the second data information protected by privacy; in order to reflect and prove that the second data information contained in the above-mentioned second transaction was originally generated by the node device of the above-mentioned blockchain user, the above-mentioned second transaction may also include the first digital signature made by the blockchain user at least on the first data information not protected by privacy included in the above-mentioned first message. Accordingly, the verification of the above-mentioned second transaction by the node device in the blockchain should at least include the verification of the second digital signature based on the public key of the trusted user, so that after the verification is passed, the above-mentioned second transaction will be included in the distributed database of the blockchain.

[0057] When setting trusted users, blockchain users can set multiple trusted users. The blockchain user can select a trusted user from the multiple trusted users to send the first message. Accordingly, in addition to completing the blockchain-based privacy transaction method described in steps 102 to 108 in the above embodiment, the trusted user should also transmit the first message sent by the blockchain user to the node devices of other trusted users, so that other trusted users can back up the first data information that is not privacy-protected contained in the first message in the local database of their node devices. Specifically, Figure 2 As shown, the step of transmitting the first message sent by the blockchain user to the node device of other trusted users may include:

[0058] Step 202, obtaining the trust setting transaction from a distributed database of the blockchain;

[0059] Step 204, confirming other trusted users trusted by the blockchain user based on the trust setting transaction;

[0060] Step 206, the non-privacy-protected first data information and the privacy-protected second data information are transmitted off-chain to the node devices of other trusted users trusted by the user, so that the first data information is verified to be converted from the second data information and then stored in the local database of the node devices of the other trusted users.

[0061] As described in the above embodiment, the trust setting transaction includes the identifiers of all trusted users determined by the blockchain user, such as the account address of the trusted user, the public key of the trusted user, or the account name of the trusted user, etc., which can uniquely identify the trusted user. Therefore, based on the above trust setting transaction, other trusted users trusted by the blockchain user in addition to itself can be confirmed.

[0062] In order to prevent the first data information from being known by any node device on the blockchain and losing privacy, the node device of the above-mentioned trusted user transmits the first data information it obtains to the node devices of other trusted users through an off-chain channel; in order to facilitate other trusted users to verify whether the above-mentioned second data information corresponds to the first data information, the node device of the above-mentioned trusted user should also transmit the second data information obtained by its conversion to the node devices of other trusted users through an off-chain channel. The above-mentioned off-chain transmission methods include but are not limited to off-chain point-to-point communication, broadcasting and other forms.

[0063] Similarly, the node devices of other trusted users may also verify the first data information based on preset verification rules, so as to save the first data information in the local database of the node devices of the other trusted users after the verification is passed, wherein the preset verification rules include verifying that the second data information protected by privacy is converted from the first data information without privacy protection. When the above-mentioned trusted user also sends the first digital signature or the second digital signature described in the above-mentioned embodiment to other trusted users outside the chain, the other trusted users shall also verify that the first digital signature is made by the blockchain user at least for the first data information without privacy protection, or verify that the second digital signature is made by the trusted user at least for the second data information protected by privacy, etc., which will not be repeated here.

[0064] It is worth noting that after the node devices of each other trusted user receive the above-mentioned first data information and the second data information, the node devices of each other trusted user can transmit to the above-mentioned trusted user a reply such as completion of information reception, verification, or agreement to store the above-mentioned first data information. In another embodiment shown, the node devices of each other trusted user send to the above-mentioned trusted user the digital signatures made by each other trusted user at least on the second data information protected by privacy. The above-mentioned digital signatures can express to the above-mentioned trusted user that the node devices of each other trusted user have verified the above-mentioned first message, or a prompt that the first data information has been stored. The node devices of the above-mentioned trusted users can also include the above-mentioned digital signatures in the second transaction published to the distributed database of the blockchain, thereby supporting the verification of the legitimacy of the second data information included in the second transaction by any other node device of the blockchain together with the fourth electronic signature made by the node devices of the above-mentioned trusted users.

[0065] The above embodiments provided in this specification provide a blockchain-based privacy transaction method executed by a node device of a trusted user, by storing first data information that is not privacy-protected in a local database of the node device of the trusted user, and the node device of the trusted user sends second data information that is privacy-protected to a distributed database of the blockchain, so that the node devices of the blockchain can back up the second data information that is privacy-protected, thereby achieving the effect of privacy protection of the first data information.

[0066] Accordingly, this specification also provides an application method for privacy transactions based on blockchain. Figure 3 As shown, when any node device of the blockchain needs to apply the second transaction, the node device may perform the following steps:

[0067] Step 302: Obtain a second transaction sent by a node device of a trusted user from a distributed database of the blockchain, wherein the second transaction includes second data information that is privacy-protected. The trusted user is determined by a trust setting transaction stored in the distributed database of the blockchain, and the trust setting transaction includes identifiers of all trusted users corresponding to the blockchain user.

[0068] Step 304: Receive the first data information without privacy protection sent by the node device of the trusted user, and the first data information is stored in the local database of the node device of the trusted user. Any node device of the blockchain can obtain the first data information stored in the local database of the node device of the trusted user by communicating with the node device of the trusted user who sent the second transaction.

[0069] Step 306: Verify whether the second data information with privacy protection is converted from the first data information without privacy protection.

[0070] in the case of,

[0071] Step 308: Execute application logic for the second transaction.

[0072] The setting method of the above-mentioned trust setting transaction, the conversion rules or methods of the first data information and the second data information, the selection method of the trusted user, etc. have all been described in the multiple embodiments of the above-mentioned blockchain-based privacy transaction method, and will not be repeated here. The above-mentioned application logic for the second transaction includes obtaining the first data information without privacy protection corresponding to the second data information with privacy protection in the second transaction, or data applications or business applications based on the first data information, etc.; the application can include data applications outside the blockchain and data applications on the blockchain, such as publishing transactions based on the first data information, etc., which are not limited in this specification.

[0073] Compared with general transactions of setting parameter status or publishing privacy-protected data information, transfer transactions in blockchain have some unique characteristic steps because they need to involve the linkage changes of the account balance status of at least two users. Below, this specification takes the example of blockchain user A sending a transfer transaction to blockchain user B to elaborate on the privacy transaction method provided in this specification. Based on the privacy security considerations of its own account, blockchain user A cooperates with its trusted user SA to set the balance in its account status (assuming it is 100) to a privacy-protected state (for example, the hash summary value hash (100) corresponding to the balance 100) through the methods described in one or more of the above embodiments.

[0074] like Figure 4 As shown, the process of setting the balance 100 in the blockchain user A account status to hash(100) may include:

[0075] Step 401: The node device of blockchain user A sends a trust setting transaction to the distributed database of the blockchain, setting user SA as its trusted user.

[0076] Step 402: The node device of blockchain user A sends a first message to the node device of trusted user SA through an off-chain channel. The first message may include: first data information - balance 100, and user A's digital signature Sign 1 for the first data information.

[0077] In step 403, the node device of the trusted user SA converts the first data information - balance 100 into the second data information - privacy-protected balance hash (100) according to the data conversion rule, and verifies the above Sign 1.

[0078] Step 404: After the verification described in step 403 is passed, the node device of the trusted user SA saves the first data information contained in the first message, namely, the balance 100, in the local database. Optionally, the node device of the trusted user SA may set a mapping table in the local database to record the first data information and the second data information.

[0079] Step 405: The node device of the trusted user SA digitally signs the verified second data information with Sign 2.

[0080] Step 406: The node device of the trusted user SA sends a second transaction to the blockchain. The second transaction includes the second data information - the protected balance hash (100), the digital signature Sign1 of user A on the first data information, and the digital signature Sign 2 of user SA on the second data information.

[0081] Step 407, according to the consensus rules of the blockchain, the consensus nodes on the blockchain verify the above-mentioned second transaction, and the above-mentioned verification includes verifying whether the user SA belongs to the trusted user determined by user A through the trust setting transaction, and verifying that the digital signatures included in the second transaction are respectively made by user A and the trusted user SA confirmed by user A.

[0082] Step 408, when all the verifications described in step 407 are passed, the consensus node (node ​​with consensus authority) of the blockchain will include the block including the second transaction into the distributed database of the blockchain, and all nodes on the blockchain will update the balance status of user A to hash (100) in their databases.

[0083] Similarly, user B may also protect the privacy of the balance status in his account. The specific method may be similar to steps 401 to 408 and will not be repeated here.

[0084] It is worth noting that when the privacy transaction method provided in this specification is a privacy transfer transaction, in order to ensure that the account balance of the transferor user and the account balance of the transferee user can be verified by the node device of the trusted user and the corresponding balance changes occur, the transferor user and the transferee user should trust at least one same trusted user, that is, the trust setting transaction sent by the transferor user and the transferee user should include at least one same trusted user identifier. In this embodiment, the trusted user SA is a trusted user of user A and also a trusted user of user B.

[0085] The process of user A completing the transfer from user B may specifically include:

[0086] In step 409, the node device of user A sends the transaction message Txab of user A transferring money to user B to the node device of the trusted user SA shared by user A and user B; the transaction message Txab includes the account identifiers (account addresses or public keys) of user A and user B, the transfer amount 10, and the digital signature Sign (10) of user A for the transfer amount 10.

[0087] In step 410, the node device of the trusted user SA converts the transfer amount 10 into a hash summary hash (10) according to the data conversion rule, verifies whether the account balance 100 of user A is sufficient to pay for the transfer, and verifies the Sign (10).

[0088] Step 411, after the verification described in step 410 is passed, the node device of the trusted user SA saves the transfer amount 10 in the above transfer message in the local database; based on this transfer, the node device of the trusted user SA should also change the account balances of user A and user B in the local database.

[0089] In step 412, the node device of the trusted user SA digitally signs the verified privacy-protected transfer amount hash(10) using Sign 2(hash(10)); and generates new hash digests hash(account A) and hash(account B) for the account balances of user A and user B after the transfer is completed, and digitally signs them using Sign(hash(account A)) and Sign(hash(account B)).

[0090] In step 413, the node device of the trusted user SA sends a second transaction to the blockchain. The second transaction includes the privacy-protected transfer amount hash(10), the account balances of user A and user B after the transfer is completed to generate new hash summaries hash(account A) and hash(account B), user A's digital signature Sign 1(10) for the transfer amount 10, and user SA's digital signatures Sign 2(hash(10)), Sign(hash(account A)), and Sign(hash(account B)).

[0091] Step 414, according to the consensus rules of the blockchain, the consensus nodes on the blockchain verify the above-mentioned second transaction, and the above-mentioned verification includes verifying whether the user SA is a trusted user determined by the user A and the user B through the trust setting transaction, and verifying that the digital signature Sign 2 (hash (10)) included in the second transaction is made by the trusted user SA confirmed by the user A for the hash summary hash (10) of the above-mentioned transfer amount, and the digital signatures Sign (hash (account A)) and Sign (hash (account B)) of the user SA are the hash summaries hash (account A) and hash (account B) of the new account balances of the user A and the user B respectively.

[0092] Step 415, when all the verifications described in step 414 are passed, the consensus node (node ​​with consensus authority) of the blockchain will include the block including the second transaction in the distributed database of the blockchain, and all nodes on the blockchain will update the balance status of user A to hash (account A) and the balance status of user B to hash (account B) in their databases.

[0093] Optionally, in order to ensure that the update of the account balances of user A and user B by the node device of the above-mentioned trusted user SA after the transfer is approved by user A and user B, user A and user B may also send their own updated account balances and digital signatures based on the updated account balances to the node device of the above-mentioned trusted user SA, respectively. The above specific process is similar to the process of storing the user's privacy-protected second data information in the distributed database of the blockchain by the trusted user selected by the user as described in each embodiment of this specification, and will not be repeated here.

[0094] Corresponding to the above process implementation, the embodiments of this specification also provide a blockchain-based privacy transaction device and a blockchain-based privacy transaction application device. The above device can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in the logical sense, the CPU (Central Process Unit) of the device reads the corresponding computer program instructions into the memory and runs them. From the hardware level, in addition to Figure 7 In addition to the CPU, memory and storage shown, the device where the network risk business implementation device is located usually also includes other hardware such as chips for sending and receiving wireless signals, and / or other hardware such as boards for implementing network communication functions.

[0095] Figure 5The figure shows a privacy transaction device 50 based on blockchain, which is applied to a node device of a trusted user, wherein the trusted user is determined by a trust setting transaction stored in a distributed database of the blockchain, and the trust setting transaction includes the identifiers of all trusted users corresponding to the blockchain user; the device 50 includes:

[0096] A receiving unit 502 receives a first message sent by the blockchain user, where the first message includes first data information that is not privacy protected;

[0097] A conversion unit 504 converts the first data information without privacy protection into second data information with privacy protection;

[0098] The storage unit 506 stores the first data information in a local database of the node device of the trusted user;

[0099] The sending unit 508 sends a second transaction to the blockchain, where the second transaction includes the second data information, so that the second transaction is verified and included in the distributed database of the blockchain.

[0100] In another illustrated embodiment, the first message includes a first digital signature made by the blockchain user at least on the first data information without privacy protection;

[0101] The device 50 also includes a verification unit: verifying the first message based on a preset verification rule, so as to save the first data information in the local database of the node device of the trusted user after the verification is passed, wherein the preset verification rule also includes: verifying that the first digital signature is made by the blockchain user at least for the first data information that is not privacy protected.

[0102] In yet another illustrated embodiment, the second transaction further includes a second digital signature made by the trusted user for at least the privacy-protected second data information and a first digital signature made by the blockchain user for at least the non-privacy-protected first data information.

[0103] In yet another illustrated embodiment, the device 50 further comprises:

[0104] An acquisition unit, which acquires the trust setting transaction from a distributed database of the blockchain;

[0105] A confirmation unit, configured to confirm other trusted users trusted by the user based on the trust setting transaction;

[0106] The transmission unit transmits the non-privacy-protected first data information and the privacy-protected second data information off-chain to the node devices of other trusted users trusted by the user, so that the first data information is verified to be converted from the second data information and then stored in the local database of the node devices of the other trusted users.

[0107] In another illustrated embodiment, the receiving unit 502 receives a digital signature made by the other trusted user based at least on the second data information;

[0108] The second transaction also includes a digital signature made by the other trusted user based at least on the second data information.

[0109] In yet another illustrated embodiment, the privacy-protected second data information is a data summary of the non-privacy-protected first data information.

[0110] In another illustrated embodiment, the first message includes a transfer amount from the blockchain user to other blockchain users; the second transaction includes the privacy-protected transfer amount and the privacy-protected account balances of the blockchain user and the other blockchain users;

[0111] The trusted user is also the trusted user corresponding to the other blockchain users in the trust setting transaction.

[0112] Figure 6 As shown in the specification, an application device 60 for privacy transactions based on blockchain is provided, including:

[0113] An acquiring unit 602 acquires a second transaction sent by a node device of a trusted user from a distributed database of the blockchain, wherein the second transaction includes second data information that is protected by privacy, wherein the trusted user is determined by a trust setting transaction stored in the distributed database of the blockchain, and the trust setting transaction includes identifiers of all trusted users corresponding to the blockchain user;

[0114] A receiving unit 604 receives first data information without privacy protection sent by the node device of the trusted user, where the first data information is stored in a local database of the node device of the trusted user;

[0115] A verification unit 606 verifies whether the second data information with privacy protection is converted from the first data information without privacy protection;

[0116] The application unit 608 executes application logic for the second transaction.

[0117] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically detailed in the implementation process of the corresponding steps in the above-mentioned method. For relevant parts, please refer to the partial description of the method embodiment, which will not be repeated here.

[0118] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the units or modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Those of ordinary skill in the art may understand and implement it without creative work.

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

[0120] Corresponding to the above method embodiment, the embodiment of this specification also provides a computer device, which includes a memory and a processor. Among them, the memory stores a computer program that can be run by the processor; when the processor runs the stored computer program, it executes each step of the blockchain-based privacy transaction method in the embodiment of this specification. For a detailed description of each step of the blockchain-based privacy transaction method, please refer to the previous content and will not be repeated.

[0121] Corresponding to the above method embodiment, the embodiment of this specification also provides a computer device, which includes a memory and a processor. Among them, the memory stores a computer program that can be run by the processor; when the processor runs the stored computer program, it executes each step of the application method of privacy transaction based on blockchain in the embodiment of this specification. For a detailed description of each step of the application method of privacy transaction based on blockchain, please refer to the previous content and will not be repeated.

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

[0123] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0124] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0125] Computer readable media include permanent and non-permanent, removable and non-removable media and can store information by any method or technology. The information can be computer readable instructions, data structures, program modules or other data.

[0126] Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0127] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0128] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, the embodiments of this specification may take the form of complete hardware embodiments, complete software embodiments or embodiments combining software and hardware. Moreover, the embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

Claims

1. A privacy transaction method based on blockchain, applied to a node device of a trusted user trusted by both a first blockchain user and a second blockchain user; The local database of the node device of the trusted user stores the non-privacy-protected account balances of the first blockchain user and the second blockchain user; the method comprises: Receiving a first message sent by the first blockchain user through an off-chain channel, where the first message includes a transfer amount that is transferred from the first blockchain user to the second blockchain user without privacy protection; Based on the transfer amount, the non-privacy-protected account balances of the first blockchain user and the second blockchain user stored in the local database are updated respectively; the transfer amount is converted into a privacy-protected transfer amount, and the updated non-privacy-protected account balances of the first blockchain user and the second blockchain user are converted into privacy-protected account balances respectively; A second transaction is sent to the blockchain, wherein the second transaction includes the privacy-protected transfer amount and the privacy-protected account balances of the first blockchain user and the second blockchain user, so that after the second transaction is verified by a node device of the blockchain, the account balance states of the first blockchain user and the second blockchain user stored in the distributed database of the blockchain are respectively updated based on the privacy-protected account balances of the first blockchain user and the second blockchain user.

2. The method according to claim 1, before respectively updating the non-privacy-protected account balances of the first blockchain user and the second blockchain user stored in the local database based on the transfer amount, further comprises: The first message is verified based on a preset verification rule, wherein the preset verification rule includes: verifying whether the account balance of the first blockchain user is sufficient to pay the transfer amount.

3. The method according to claim 2, wherein the first message includes a first digital signature made by the first blockchain user at least for the non-privacy-protected transfer amount; The preset verification rules also include: Verify that the first digital signature is made by the first blockchain user for at least the non-privacy-protected transfer amount.

4. The method of claim 3, wherein the second transaction further comprises the first digital signature, a second digital signature of the trusted user for at least the privacy-protected transfer amount, a third digital signature of the trusted user for at least the privacy-protected account balance of the first blockchain user, and a fourth digital signature of the trusted user for at least the privacy-protected account balance of the second blockchain user.

5. The method according to any one of claims 1 to 4, wherein the trusted user is determined by at least one trust setting transaction stored in a distributed database of a blockchain.

6. The method according to claim 5, further comprising: Retrieve the at least one trust setting transaction from a distributed database of the blockchain; Confirming other trusted users trusted by the first blockchain user or the second blockchain user based on the trust setting transaction; The non-privacy-protected transfer amount is transmitted off-chain to a node device of other trusted users trusted by the first blockchain user or the second blockchain user, so that the node device of the other trusted user updates the non-privacy-protected account balance of the first blockchain user or the second blockchain user in a local database based on the non-privacy-protected transfer amount.

7. The method according to claim 6, further comprising: Receiving a digital signature made by the other trusted user based on at least the updated privacy-protected account balance of the first blockchain user or the second blockchain user; The second transaction also includes a digital signature made by the other trusted user based on at least the updated privacy-protected account balance of the first blockchain user or the second blockchain user.

8. A privacy transaction device based on blockchain, applied to a node device of a trusted user trusted by both the first blockchain user and the second blockchain user; The local database of the node device of the trusted user stores the non-privacy-protected account balances of the first blockchain user and the second blockchain user; the device comprises: A receiving unit receives a first message sent by the first blockchain user through an off-chain channel, where the first message includes a transfer amount that is transferred from the first blockchain user to the second blockchain user without privacy protection; A storage unit, which updates the non-privacy-protected account balances of the first blockchain user and the second blockchain user stored in a local database based on the transfer amount; a conversion unit, converting the transfer amount into a privacy-protected transfer amount, and converting the updated non-privacy-protected account balances of the first blockchain user and the second blockchain user into privacy-protected account balances, respectively; A sending unit sends a second transaction to the blockchain, wherein the second transaction includes the privacy-protected transfer amount and the privacy-protected account balances of the first blockchain user and the second blockchain user, so that after the second transaction is verified by a node device of the blockchain, the account balance states of the first blockchain user and the second blockchain user stored in the distributed database of the blockchain are respectively updated based on the privacy-protected account balances of the first blockchain user and the second blockchain user.

9. The apparatus according to claim 8, further comprising: The verification unit verifies the first message based on a preset verification rule, wherein the preset verification rule includes: verifying whether the account balance of the first blockchain user is sufficient to pay the transfer amount.

10. The apparatus according to claim 9, wherein the first message comprises a first digital signature made by the first blockchain user at least for the non-privacy-protected transfer amount; The preset verification rules also include: Verify that the first digital signature is made by the first blockchain user for at least the non-privacy-protected transfer amount.

11. The apparatus of claim 10, wherein the second transaction further comprises the first digital signature, a second digital signature of the trusted user at least on the privacy-protected transfer amount, a third digital signature of the trusted user at least on the privacy-protected account balance of the first blockchain user, and a fourth digital signature of the trusted user at least on the privacy-protected account balance of the second blockchain user.

12. The apparatus according to any one of claims 8 to 11, wherein the trusted user is determined by at least one trust setting transaction stored in a distributed database of a blockchain.

13. The apparatus according to claim 12, further comprising: An acquiring unit, acquiring the at least one trust setting transaction from a distributed database of the blockchain; A confirmation unit, configured to confirm other trusted users trusted by the first blockchain user or the second blockchain user based on the trust setting transaction; A transmission unit transmits the non-privacy-protected transfer amount off-chain to a node device of another trusted user trusted by the first blockchain user or the second blockchain user, so that the node device of the other trusted user updates the non-privacy-protected account balance of the first blockchain user or the second blockchain user in a local database based on the non-privacy-protected transfer amount.

14. The device according to claim 13, The receiving unit receives a digital signature made by the other trusted user based at least on the updated privacy-protected account balance of the first blockchain user or the second blockchain user; The second transaction also includes a digital signature made by the other trusted user based at least on the updated privacy-protected account balance of the first blockchain user or the second blockchain user.

15. A computer device comprising: Memory and processor; The memory stores a computer program executable by the processor; When the processor runs the computer program, the processor performs the method according to any one of claims 1 to 7.