Transaction method, node device, storage medium and computing device based on blockchain

By encrypting and consensus on transaction data in the blockchain network, ensuring the privacy and security of data, it solves the problem of ensuring privacy and security while realizing data security sharing, especially in the presence of malicious nodes. .

CN114078053BActive Publication Date: 2025-02-18CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010825238.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-17
Publication Date
2025-02-18
Estimated Expiration
2040-08-17

AI Technical Summary

Technical Problem

In a blockchain network, how to ensure the privacy and security of data while achieving secure data sharing, especially in the presence of malicious nodes.

Method used

Encryption and consensus between the transaction initiating node and the target node, ensure the privacy and security of transaction data in the blockchain network. The specific steps include: reading transaction data from the privacy database, calculating the summary and encryption of the transaction data and sending it to the blockchain, only relevant nodes participate in the transaction consensus, and introducing supervision nodes to supervise if necessary.

Benefits of technology

It realizes privacy transactions in the blockchain network, ensures the security and privacy of data during transmission and storage, and prevents data leakage and tampering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114078053B_ABST
    Figure CN114078053B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, node, storage medium and computing device for transactions based on blockchain, wherein the method comprises: the initiating node of the transaction reads the transaction data from a local privacy database; calculates the transaction data to obtain the encrypted transaction data and the summary of the transaction data; and sends a transaction request to the blockchain, wherein the transaction request comprises at least a target node parameter, the encrypted transaction data and the summary of the transaction data, and the target node parameter identifies the target node of the transaction; and wherein, if the transaction is a private transaction, the transaction request further comprises a private transaction parameter, the private transaction parameter identifies the transaction as a private transaction and comprises an identifier of a relevant node of the transaction, and the relevant node and the initiating node participate in the consensus of the transaction via the blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of blockchain, and more particularly to a method, node, storage medium, and computing device for blockchain-based transactions. Background Art

[0002] Blockchain technology is becoming more and more well-known and recognized. Due to the decentralized nature of blockchain, it has the characteristics of openness, transparency, and tamper-proof. Data can be shared between various nodes through blockchain.

[0003] However, for some important data, the privacy of these data should be protected while sharing the data. For example, important data needs to be shared only among several transaction participants, and other users in the blockchain network cannot obtain specific information.

[0004] Moreover, there may be malicious nodes in the blockchain network, which brings the risk of data leakage.

[0005] Therefore, there is a need to ensure the privacy and security of data while achieving secure sharing of data. Summary of the invention

[0006] According to a first aspect of the present disclosure, a method for blockchain-based transactions is provided, comprising: an initiating node of the transaction reads transaction data from a locally located privacy database; calculates the transaction data to obtain encrypted transaction data and a summary of the transaction data; and sends a transaction request to the blockchain, wherein the transaction request includes at least a target node parameter, encrypted transaction data, and a summary of the transaction data, the target node parameter identifies the target node of the transaction; and wherein, if the transaction is a private transaction, the transaction request also includes a private transaction parameter, the private transaction parameter identifies the transaction as a private transaction and includes an identifier of a relevant node of the transaction, and the relevant node and the initiating node participate in the consensus of the transaction via the blockchain.

[0007] According to a second aspect of the present disclosure, a method for blockchain-based transactions is provided, comprising: a node receiving a transaction request from an initiating node via a blockchain, the transaction request comprising at least a target node parameter, encrypted transaction data, and a summary of the transaction data, the target node parameter identifying the target node of the transaction; judging whether the transaction request includes a privacy transaction parameter, the privacy transaction parameter identifying the transaction as a privacy transaction; if the transaction request includes the privacy transaction parameter, judging whether the privacy transaction parameter includes an identifier of the node; and if the privacy transaction parameter includes the identifier of the node, the node is a related node, and the related node and the initiating node participate in the consensus of the transaction via the blockchain.

[0008] According to a third aspect of the present disclosure, a node for blockchain-based transactions is provided, comprising: a blockchain module, configured to store a summary of transaction data and to perform consensus on transactions; a privacy database, located locally at the node and configured to store transaction data; an encryption / decryption module, configured to encrypt and decrypt transaction data; and a transaction module, configured to: read transaction data from a locally located privacy database; calculate a summary of the transaction data, and send the transaction data to the encryption / decryption module to obtain encrypted transaction data and a summary of the transaction data; and send a transaction request to the blockchain module; wherein the transaction request includes at least a target node parameter, encrypted transaction data, and a summary of the transaction data, the target node parameter identifying the target node of the transaction; and wherein, if the transaction is a private transaction, the transaction request also includes a private transaction parameter, the private transaction parameter identifying the transaction as a private transaction and including an identifier of a relevant node of the transaction, the relevant node and the node participating in the consensus of the transaction via the blockchain.

[0009] According to a fourth aspect of the present disclosure, a node for blockchain-based transactions is provided, comprising: a blockchain module, configured to store a summary of transaction data and to perform consensus on transactions; an encryption / decryption module, configured to encrypt and decrypt transaction data; a privacy database, located locally at the node and configured to store transaction data; and a transaction module, configured to: receive a transaction request from an initiating node from the blockchain module, the transaction request comprising at least a target node parameter, encrypted transaction data and a summary of the transaction data, the target node parameter identifying a target node of the transaction; determine whether the transaction request includes a privacy transaction parameter, the privacy transaction parameter identifying the transaction as a privacy transaction; if the transaction request includes a privacy transaction parameter, determine whether the privacy transaction parameter includes an identifier of the node; and if the privacy transaction parameter includes an identifier of the node, the node is a related node, and the related node and the initiating node participate in the consensus of the transaction via the blockchain.

[0010] According to a fifth aspect of the present disclosure, a non-transitory computer-readable storage medium for blockchain-based transactions is provided, on which a program is stored, characterized in that when the program is executed by a computer, the computer executes the method according to the first aspect of the present disclosure.

[0011] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium for blockchain-based transactions is provided, on which a program is stored, characterized in that when the program is executed by a computer, the computer executes the method according to the second aspect of the present disclosure.

[0012] According to a seventh aspect of the present disclosure, a computing device for blockchain-based transactions is provided, comprising a memory and a processor, wherein the memory is communicatively coupled to the processor, and a program is stored in the memory, and when the program is executed by the processor, the processor executes the method according to the first aspect of the present disclosure.

[0013] According to an eighth aspect of the present disclosure, a computing device for blockchain-based transactions is provided, comprising a memory and a processor, wherein the memory is communicatively coupled to the processor, and a program is stored in the memory, which, when executed by the processor, causes the processor to execute the method according to the second aspect of the present disclosure.

[0014] The present disclosure can realize private transactions in the blockchain, ensuring the privacy and security of transaction data while achieving secure data sharing.

[0015] Other features and advantages of the present disclosure will become more apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0017] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

[0018] Figure 1 It is a schematic diagram of the structure of a blockchain according to an embodiment of the present disclosure.

[0019] Figure 2 is a schematic diagram of global data sharing in a blockchain according to an embodiment of the present disclosure.

[0020] Figure 3 It is a schematic diagram of local data sharing in a blockchain according to an embodiment of the present disclosure.

[0021] Figure 4 is a schematic diagram of a data storage model of a node according to an embodiment of the present disclosure.

[0022] Figure 5 is a schematic diagram of a private transaction according to an embodiment of the present disclosure.

[0023] Figure 6 is a schematic diagram of a private transaction according to an embodiment of the present disclosure.

[0024] Figure 7 The present invention is a flowchart of a method for initiating a private transaction of a node according to an embodiment of the present disclosure.

[0025] Figure 8It is a flowchart of a method for private transactions for related nodes according to an embodiment of the present disclosure.

[0026] Fig. 9 It is a schematic diagram of data security verification according to an embodiment of the present disclosure.

[0027] Fig.10 is a schematic diagram of an exemplary configuration of a computing device that may be used to implement blockchain-based transactions according to an embodiment of the present disclosure.

[0028] For ease of understanding, the position, size, range, etc. of each structure shown in the drawings and the like may not represent the actual position, size, range, etc. Therefore, the present disclosure is not limited to the position, size, range, etc. disclosed in the drawings and the like. DETAILED DESCRIPTION

[0029] Various exemplary embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure.

[0030] The following description of at least one exemplary embodiment is in fact merely illustrative and is in no way intended to limit the present disclosure and its application or use. That is, the structures and methods herein are shown in an exemplary manner to illustrate different embodiments of the structures and methods in the present disclosure. However, those skilled in the art will appreciate that they merely illustrate exemplary ways of the present disclosure that can be implemented, rather than exhaustive ways. In addition, the drawings need not be drawn to scale, and some features may be enlarged to illustrate the details of specific components.

[0031] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.

[0032] Figure 1 : is a schematic diagram of the structure of a blockchain according to an embodiment of the present disclosure. To use blockchain for multi-party data sharing, it is first necessary to build a consortium blockchain for data sharing. Participants who need to participate in data sharing need to join the consortium blockchain as nodes. Before joining the consortium blockchain, the participants need to pass the qualification review. After the qualification review is passed, a certificate is assigned to the participant, and the participant can join the blockchain and perform multi-party data sharing. Through such a method, the credibility of the nodes of the consortium blockchain can be improved, and multiple participants can jointly maintain the operation of the blockchain.

[0033] In the blockchain, data sharing between multiple parties is achieved in the form of transactions. The transactions here do not refer specifically to commercial transactions, but cover any data interaction and related functions implemented in the blockchain.

[0034] Figure 2 is a schematic diagram of global data sharing in a blockchain according to an embodiment of the present disclosure. When global data sharing is performed, Figure 2 As shown in , the user of node 2 in the blockchain can initiate a transaction and upload the transaction data to be shared to the blockchain network through node 2. According to the consensus mechanism of the blockchain, other nodes in the blockchain network can synchronize the transaction data. Other users of the blockchain (for example, Figure 2 Users of node 4 in can obtain transaction data from the blockchain through their nodes.

[0035] Figure 3 It is a schematic diagram of local data sharing in a blockchain according to an embodiment of the present disclosure.

[0036] When local data sharing is performed, private transactions can be sent from the initiating node to the target node, and irrelevant nodes in the blockchain will not obtain information about the private transactions. Figure 3 In the embodiment shown in , node n is the initiating node of the private transaction, and node 2 is the target node of the private transaction. A private transaction can be initiated from node n to node 2. In the private transaction, transaction data is shared from node n to node 2, and other unrelated nodes in the blockchain will not obtain this transaction data.

[0037] A private transaction can specify the parties involved in the transaction. The nodes of the parties involved in the transaction are the relevant nodes of the private transaction. Trusted sharing of information about the transaction is performed only between the nodes of the parties involved in the transaction, so that only the parties involved in the transaction can obtain information about the private transaction, thereby ensuring the privacy of the data. In an embodiment according to the present disclosure, the relevant nodes may include at least the target node of the transaction. In other embodiments according to the present disclosure, the relevant nodes may include the initiating node and the target node of the transaction. Figure 3 In the embodiment shown in , the relevant nodes may include node n as an initiating node and node 2 as a target node.

[0038] In an embodiment according to the present disclosure, the relevant nodes may include a supervisory node. In a private transaction, the parties conducting the transaction can use the Byzantine consensus algorithm to prevent nodes from doing evil, so a supervisory node can be introduced. All private transactions in the blockchain network can use the supervisory node as a transaction-related party, and the supervisory node can record information about transactions in the blockchain network. In an embodiment according to the present disclosure, the supervisory node may be a fixed node in the blockchain network, which is used to record information about all transactions occurring in the blockchain network. In an embodiment according to the present disclosure, the supervisory node may also be changed. For example, the initiating node of the transaction may specify any node in the blockchain network as the supervisory node of the transaction. For example, in Figure 3 In the transaction shown in , node 2 is not a supervisory node but a target node. In another transaction, node 2 can also be designated as a supervisory node.

[0039] Figure 4 Schematic diagram of a data storage model of a node according to an embodiment of the present disclosure. Figure 4 As shown in , a node contains two units that can be used for storage: a blockchain module and a privacy database. The blockchain module can store a summary of transaction data and can also perform consensus on transactions. The privacy database is located locally on the node and can store transaction data.

[0040] For private transactions, transaction data is stored in a private database, and a summary of the transaction data is stored in the blockchain module.

[0041] The digest is a brief representation of the transaction data. An algorithm can be applied to the transaction data to obtain a digest of the transaction data, but it is difficult to reverse the operation, that is, it is difficult to infer the transaction data based on the digest of the transaction data. This can prevent irrelevant users who may obtain the digest of the transaction data from inferring the transaction data based on the digest to a certain extent, thereby helping to ensure the privacy of the transaction data. For example, the algorithm for obtaining the digest may include a hash algorithm, such as SHA-256, and the digest may be a hash value of the transaction data.

[0042] Figure 5 Schematic diagram of a privacy transaction according to an embodiment of the present disclosure. Figure 5 As shown in , node 1 is the initiating node of the privacy transaction, node 2 is the target node of the privacy transaction, and node 3 is a node in the blockchain that is not related to the privacy transaction.

[0043] Node 1, which is the initiating node of the private transaction, may include a blockchain module, a privacy database, an encryption / decryption module, and a transaction module. The blockchain module may be configured to store a summary of the transaction data and to reach a consensus on the transaction. The privacy database may be located locally at the node and configured to store the transaction data. The encryption / decryption module may be configured to encrypt the transaction data. The transaction module may be configured to execute the specific steps performed by the initiating node in the transaction, which will be described below in conjunction with Figure 7 Describe in detail.

[0044] Node 2, which is the target node of the private transaction, may include a blockchain module, a privacy database, an encryption / decryption module, and a transaction module. The blockchain module may be configured to store a summary of the transaction data and to perform a consensus on the transaction. The privacy database may be located locally at the node and configured to store the transaction data. The encryption / decryption module may be configured to decrypt the transaction data. The transaction module may be configured to execute the specific steps performed by the target node in the transaction, which will be described below in conjunction with Figure 8 Describe in detail.

[0045] Node 3, which is a node in the blockchain that is not related to the privacy transaction, may not respond to the transaction request from node 1, which is the initiating node, that is, it does not trade with node 1 and does not participate in the consensus of the transaction.

[0046] Figure 6 is a schematic diagram of a privacy transaction according to an embodiment of the present disclosure. Figure 5 Similar to the embodiment shown in , node 1 is the initiating node of the private transaction, and node 2 is the target node of the private transaction. Figure 5 The embodiment shown in FIG. 1 differs in that, as Figure 6 The embodiment shown includes a node 4 which is a supervisory node of a transaction. Both the supervisory node and the target node are relevant nodes of the transaction.

[0047] Node 4, as a supervisory node for private transactions, can record transaction information. That is, node 4 can store transaction data in a local private database, and can participate in consensus on the summary of the uploaded transaction data in response to node 1 uploading the summary of the transaction data to the blockchain.

[0048] Node 4, which is a supervisory node for private transactions, may include at least a blockchain module, a privacy database, an encryption / decryption module, and a transaction module. The blockchain module may be configured to store a summary of transaction data and to reach consensus on transactions. The privacy database may be located locally at the node and configured to store transaction data. The encryption / decryption module may be configured to encrypt / decrypt transaction data. The transaction module may be configured to execute specific steps performed by the supervisory node in the transaction, which will be described below in conjunction with Figure 8 Describe in detail.

[0049] Figure 7 The present invention is a flowchart of a method for initiating a private transaction of a node according to an embodiment of the present disclosure.

[0050] like Figure 7 As shown, at step S701, for the initiating node of the transaction, the transaction module can read the transaction data from the local privacy database.

[0051] At step S702, the transaction data may be calculated to obtain the encrypted transaction data and the summary of the transaction data. The transaction module may calculate the summary of the transaction data and send the transaction data to the encryption / decryption module to obtain the encrypted transaction data and the summary of the transaction data.

[0052] The digest of the data can be a hash value of the data. Figure 5, the initiating node 1 of the transaction obtains the data data that needs to be shared from its own privacy database, and calculates its hash value hash = SHA-256(data) as the summary of the data.

[0053] The encrypted transaction data may be obtained by encrypting the transaction data using a private key of the initiating node in the encryption / decryption module.

[0054] At S703, a transaction request may be sent to the blockchain. The initiating node of the transaction may send the transaction request to other nodes in the blockchain, where the other nodes include related nodes and unrelated nodes.

[0055] The transaction request may include at least a target node parameter, encrypted transaction data, and a summary of the transaction data. The target node parameter may identify the target node of the transaction. And, if the transaction is a private transaction, the transaction request may also include a private transaction parameter. The private transaction parameter may identify the transaction as a private transaction, and the private transaction parameter includes an identifier of a relevant node of the transaction, and the relevant node and the initiating node participate in the consensus of the transaction via the blockchain.

[0056] For example, the initiating node can initiate a private transaction request: newTransaction(from, to, payload,privateTxFor), where the parameter from can identify the initiating node of the transaction, the parameter to can identify the target node of the transaction, the parameter payload can include encrypted transaction data, and the parameter privateTxFor can be a private transaction parameter. For example, privateTxFor can be a set of public keys of the relevant nodes of the transaction, such as: [publickey1, publickey2, …, publickeyN]. For example, in Figure 5 In the illustrated embodiment, publickey2 may be included in the set of public keys in privateTxFor, while publickey3 is not included in the set of public keys in privateTxFor; Figure 6 In the illustrated embodiment, publickey2 and publickey4 may be included in the set of public keys in privateTxFor.

[0057] After S703, the initiating node may, in response to receiving a successful transaction response from the target node, upload the summary of the transaction data to the blockchain and participate in the consensus of the summary of the uploaded transaction data. Figure 5 In the illustrated embodiment, the transaction module of node 1 sends a summary of the transaction data to the blockchain module and reaches a consensus in the blockchain.

[0058] Furthermore, the relevant nodes of the transaction may include a target node and a supervisory node, and the supervisory node may be configured to record the transaction.

[0059] Figure 8 1 is a flow chart of a method for private transactions of related nodes according to an embodiment of the present disclosure. The related nodes may include a target node and a supervisory node.

[0060] At S801, the node may receive a transaction request from an initiating node via a blockchain. The transaction request may include at least a target node parameter, encrypted transaction data, and a summary of the transaction data, and the target node parameter may identify a target node of the transaction.

[0061] At S802, it may be determined whether the transaction request includes a private transaction parameter. The private transaction parameter may identify the transaction as a private transaction. For example, it may be determined whether the transaction request includes privateTxFor as described above.

[0062] If the transaction request does not include private transaction parameters, the transaction is not a private transaction.

[0063] If the transaction request includes a private transaction parameter, the transaction is a private transaction. At S803, it can be determined whether the private transaction parameter includes the identifier of the node. The identifier of the node can be, for example, the public key of the node. For example, for node 2, it can be determined whether publickey2 is included in privateTxFor.

[0064] If the node identifier is not included in the privacy transaction parameters, the node is an irrelevant node of the transaction and does not participate in the transaction or consensus.

[0065] If the privacy transaction parameters include the identifier of the node, then at S804, the node is confirmed to be a relevant node, and the relevant node and the initiating node can participate in the consensus of the transaction via the blockchain.

[0066] When the transaction request includes the privacy transaction parameters, it is also possible to determine whether the node is the target node of the transaction based on the target node parameters.

[0067] If the privacy transaction parameters include the identifier of the node and the node is not the target node of the transaction, the node may belong to the supervisory node. The supervisory node may store the transaction data in a local privacy database, and in response to the initiating node uploading the summary of the transaction data to the blockchain, participate in the consensus on the summary of the uploaded transaction data. The summary of the transaction data may be a hash value of the transaction data. The supervisory node may include at least a transaction module, a privacy database, an encryption / decryption module, and a blockchain module. For example, in Figure 6In the embodiment shown in , after node 4 receives the transaction request, the transaction module of node 4 can make a judgment and confirm that the node belongs to the supervisory node. Then, the transaction module of node 4 can send the encrypted data in the transaction request to the encryption / decryption module of node 4, decrypt the data using the public key of the initiating node, and return the decrypted data to the transaction module. The transaction module of node 4 can send the decrypted data to the privacy database of node 4 and store it in the privacy database. After the transaction of target node 2 is successful, when the initiating node 1 uploads the summary to the blockchain for consensus, the blockchain module of supervisory node 4 can participate in the consensus of the summary of the transaction.

[0068] If the privacy transaction parameters include the identifier of the node, and the node is the target node of the transaction, the target node may perform the following steps: decrypt the encrypted transaction data included in the transaction request; store the decrypted transaction data in a privacy database located locally at the node; send a successful transaction response to the initiating node; and participate in the consensus on the summary of the transaction data based on the blockchain. The target node may include a transaction module, a blockchain module, an encryption / decryption module, and a privacy database. For example, in Figure 5 In the embodiment shown in , after node 2 receives the transaction request, the transaction module of node 2 can make a judgment and confirm that node 2 is the target node of the transaction. Then, the transaction module of node 2 can send the encrypted data in the transaction request to the encryption / decryption module of node 2, decrypt the data using the public key of the initiating node, and return the decrypted data to the transaction module. Then, the transaction module of node 2 can send the decrypted data to the privacy database of node 2 and store it in the privacy database, and the privacy database can feedback the successful storage to the transaction module. After confirming that the storage is successful and the transaction data has been stored in the privacy database of node 2, the target node 2 can feedback the successful transaction to the initiating node 1 of the transaction. When the initiating node 1 uploads the summary to the blockchain for consensus, the blockchain module of the target node 2 can participate in the consensus of the summary of the transaction.

[0069] After the consensus of the summary of the transaction data is completed, the summary of the transaction data is stored in the blockchain module of the transaction initiating node and related nodes. Because the privacy databases of each node are isolated from each other, there is a risk of data being tampered with.

[0070] To solve this problem, both the initiating node and the target node of the transaction can use the summary stored in the blockchain module and the data stored in the local privacy database to perform data security verification. Fig. 9 shown.

[0071] Fig. 9is a schematic diagram of data security verification according to an embodiment of the present disclosure. The transaction module of the node can obtain the transaction data from the privacy database of the node, and then calculate a summary of it. The transaction module can obtain the summary in the blockchain from the blockchain module, and compare the calculated summary with the summary of the corresponding transaction data stored in the blockchain to determine whether the transaction data in the privacy database has been tampered with. If the two summaries are consistent, the data has not been tampered with and the data is safe. If the two summaries are inconsistent, the data has been tampered with. The initiating node, target node, and supervisory node of the transaction can all perform data security verification to determine whether the data sharing and storage process is safe.

[0072] Fig.10 is a schematic diagram of an exemplary configuration of a computing device that can be used to implement blockchain-based transactions according to an embodiment of the present disclosure. Fig.10 As shown, computing device 1000 may include one or more processors 1002. Processor(s) 1002 may be any kind of processor and may include, but are not limited to, one or more general purpose processors or special purpose processors (such as dedicated processing chips).

[0073] The computing device 1000 may also include or be connected to a non-volatile storage device 1004, which may be any storage device that is non-volatile and can enable data storage, and may include but is not limited to a disk drive, an optical storage device, a solid-state memory, a floppy disk, a flexible disk, a hard disk, a magnetic tape or any other magnetic medium, a compact disk or any other optical medium, a cache memory and / or any other storage chip or module, and / or any other medium from which a computer can read data, instructions and / or code.

[0074] The processor 1002 and / or the storage device 1004 may be connected or communicated with the bus 1006 via one or more interfaces. The bus 1006 may include, but is not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus, etc.

[0075] I / O device 1008 may be any device that enables a user to interact with computing device 1000. Examples of I / O device 1008 may include, but are not limited to, a keyboard, a trackpad, a mouse, a joystick or other pointing device, a microphone, a speaker, and a display.

[0076] The computing device 1000 may also include a network interface 1010. The network interface 1010 may be any type of device or system capable of enabling communication with an external device and / or a network, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication device and / or a chipset (such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication facility, etc.).

[0077] I / O devices 1008 and / or network interface 1010 may also be communicatively coupled with processor 1002 and / or storage device 1004 via bus 1006 .

[0078] Various aspects, embodiments, implementations or features of the foregoing embodiments may be used alone or in any combination. Various aspects of the foregoing embodiments may be implemented by software, hardware or a combination of hardware and software.

[0079] For example, the foregoing embodiments may be embodied as computer readable code on a computer readable medium. A computer readable medium is any data storage device that can store data, which can then be read by a computer system. Examples of computer readable media include read-only memory, random access memory, CD-ROM, DVD, magnetic tape, hard drive, solid state drive, and optical data storage device. The computer readable medium may also be distributed among network coupled computer systems so that the computer readable code is stored and executed in a distributed manner.

[0080] For example, the aforementioned embodiments may be in the form of hardware circuits. The hardware circuits may include any combination of combinational logic circuits, clock storage devices (such as floppy disks, flip-flops, latches, etc.), finite state machines, memories such as static random access memories or embedded dynamic random access memories, custom designed circuits, programmable logic arrays, etc.

[0081] In one embodiment, hardware circuits according to the present disclosure may be implemented by coding and designing one or more integrated circuits using a hardware description language (HDL) such as Verilog or VHDL, or in combination using discrete circuits.

[0082] The present invention improves the traditional Ethereum blockchain transaction method. When a transaction is initiated, the parties involved in the transaction consensus process can be limited, thereby realizing trusted privacy sharing of data between some nodes in the blockchain network. Supervisory nodes are introduced to supervise the transaction process to avoid nodes in the blockchain from doing evil. In addition, data security verification can be realized to prevent data from being tampered with, thereby ensuring the security and reliability of data.

[0083] In summary, according to the first aspect of the present disclosure, a method for blockchain-based transactions is provided, comprising: the initiating node of the transaction reads transaction data from a locally located privacy database; calculates the transaction data to obtain encrypted transaction data and a summary of the transaction data; and sends a transaction request to the blockchain, wherein the transaction request includes at least a target node parameter, encrypted transaction data, and a summary of the transaction data, and the target node parameter identifies the target node of the transaction; and wherein, if the transaction is a private transaction, the transaction request also includes a private transaction parameter, which identifies the transaction as a private transaction and includes an identifier of a relevant node of the transaction, and the relevant node and the initiating node participate in the consensus of the transaction via the blockchain.

[0084] In some embodiments, the method further includes: in response to receiving a response indicating a successful transaction from the target node, uploading a summary of the transaction data to the blockchain, and participating in the consensus of the uploaded summary of the transaction data.

[0085] In some embodiments, the method further includes: calculating a summary for the transaction data in the privacy database of the initiating node; and comparing the calculated summary with the summary of the corresponding transaction data stored in the blockchain to determine whether the transaction data in the privacy database has been tampered with.

[0086] In some embodiments, the relevant nodes include a target node and a supervisory node, and the supervisory node can be configured to record the transaction.

[0087] In some embodiments, the summary of the transaction data is a hash value of the transaction data, and wherein the encrypted transaction data is obtained by encrypting the transaction data using a private key of the initiating node.

[0088] In some embodiments, nodes may need to pass a qualification review before joining the blockchain.

[0089] According to a second aspect of the present disclosure, a method for blockchain-based transactions is provided, comprising: a node receiving a transaction request from an initiating node via a blockchain, the transaction request comprising at least a target node parameter, encrypted transaction data, and a summary of the transaction data, the target node parameter identifying the target node of the transaction; judging whether the transaction request includes a privacy transaction parameter, the privacy transaction parameter identifying the transaction as a privacy transaction; if the transaction request includes the privacy transaction parameter, judging whether the privacy transaction parameter includes an identifier of the node; and if the privacy transaction parameter includes the identifier of the node, the node is a related node, and the related node and the initiating node participate in the consensus of the transaction via the blockchain.

[0090] In some embodiments, the method also includes: when the transaction request includes a privacy transaction parameter, determining whether the node is the target node of the transaction based on the target node parameter; if the node is the target node of the transaction, performing the following steps: decrypting the encrypted transaction data included in the transaction request; storing the decrypted transaction data in a privacy database located locally at the node; sending a response of successful transaction to the initiating node; and participating in a consensus on a summary of the transaction data based on the blockchain.

[0091] In some embodiments, the method further includes: calculating a summary for the transaction data in the privacy database of the target node; and comparing the calculated summary with the summary of the corresponding transaction data stored in the blockchain to determine whether the transaction data in the privacy database has been tampered with.

[0092] In some embodiments, when the transaction request includes privacy transaction parameters, it is determined whether the node is the target node of the transaction based on the target node parameters; if the privacy transaction parameters include an identifier of the node and the node is not the target node of the transaction, the node belongs to a supervisory node and performs the following steps: decrypting the encrypted transaction data included in the transaction request, storing the decrypted transaction data in a privacy database located locally at the node, and in response to the initiating node uploading a summary of the transaction data to the blockchain, participating in the consensus on the summary of the uploaded transaction data.

[0093] In some embodiments, the digest of the transaction data is a hash value of the transaction data, and wherein decrypting the encrypted transaction data included in the transaction request comprises decrypting the encrypted transaction data using a public key of the initiating node.

[0094] According to a third aspect of the present disclosure, a node for blockchain-based transactions is provided, comprising: a blockchain module, configured to store a summary of transaction data and to perform consensus on transactions; a privacy database, located locally at the node and configured to store transaction data; an encryption / decryption module, configured to encrypt and decrypt transaction data; and a transaction module, configured to: read transaction data from a locally located privacy database; calculate a summary of the transaction data, and send the transaction data to the encryption / decryption module to obtain encrypted transaction data and a summary of the transaction data; and send a transaction request to the blockchain module, wherein the transaction request includes at least a target node parameter, encrypted transaction data, and a summary of the transaction data, the target node parameter identifying a target node of the transaction; and wherein, if the transaction is a private transaction, the transaction request also includes a private transaction parameter, the private transaction parameter identifying the transaction as a private transaction and including an identifier of a relevant node of the transaction, the relevant node and the node participating in the consensus of the transaction via the blockchain.

[0095] In some embodiments, the transaction module is further configured to: in response to receiving a response indicating a successful transaction from the target node, upload a summary of the transaction data to the blockchain, and participate in the consensus of the uploaded summary of the transaction data.

[0096] According to a fourth aspect of the present disclosure, a node for blockchain-based transactions is provided, comprising: a blockchain module, configured to store a summary of transaction data and to perform consensus on transactions; an encryption / decryption module, configured to encrypt and decrypt transaction data; a privacy database, located locally at the node and configured to store transaction data; and a transaction module, configured to: receive a transaction request from an initiating node from the blockchain module, the transaction request comprising at least a target node parameter, encrypted transaction data and a summary of the transaction data, the target node parameter identifying a target node of the transaction; determine whether the transaction request includes a privacy transaction parameter, the privacy transaction parameter identifying the transaction as a privacy transaction; if the transaction request includes a privacy transaction parameter, determine whether the privacy transaction parameter includes an identifier of the node; and if the privacy transaction parameter includes an identifier of the node, the node is a related node, and the related node and the initiating node participate in the consensus of the transaction via the blockchain.

[0097] In some embodiments, the transaction module is further configured to: when the transaction request includes privacy transaction parameters, determine whether the node is the target node of the transaction based on the target node parameters; if the node is the target node of the transaction, perform the following steps: send the encrypted transaction data included in the transaction request to the encryption / decryption module to obtain decrypted transaction data; store the decrypted transaction data in a privacy database located locally at the node; and send a response of successful transaction to the initiating node; the blockchain module of the target node is configured to reach a consensus on the summary of the transaction data.

[0098] In some embodiments, the transaction module is further configured to: when the transaction request includes a privacy transaction parameter, determine whether the node is the target node of the transaction based on the target node parameter; if the privacy transaction parameter includes an identifier of the node and the node is not the target node of the transaction, the node belongs to a supervisory node and performs the following steps: decrypt the encrypted transaction data included in the transaction request, and store the decrypted transaction data in a privacy database located locally at the node; the blockchain module of the supervisory node is configured to participate in the consensus on the summary of the uploaded transaction data in response to the initiating node uploading the summary of the transaction data to the blockchain.

[0099] According to a fifth aspect of the present disclosure, a non-transitory computer-readable storage medium for blockchain-based transactions is provided, on which a program is stored, characterized in that when the program is executed by a computer, the computer executes the method described in the first aspect of the present disclosure.

[0100] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium for blockchain-based transactions is provided, on which a program is stored, characterized in that when the program is executed by a computer, the computer executes the method described in the second aspect of the present disclosure.

[0101] According to a seventh aspect of the present disclosure, a computing device for blockchain-based transactions is provided, comprising a memory and a processor, wherein the memory is communicatively coupled to the processor, and a program is stored in the memory, and when the program is executed by the processor, the processor executes the method according to the first aspect of the present disclosure.

[0102] According to an eighth aspect of the present disclosure, a computing device for blockchain-based transactions is provided, comprising a memory and a processor, wherein the memory is communicatively coupled to the processor, and a program is stored in the memory, and when the program is executed by the processor, the processor executes the method according to the second aspect of the present disclosure.

[0103] Although some specific embodiments of the present disclosure have been shown in detail by examples, it should be understood by those skilled in the art that the above examples are intended to be illustrative only and do not limit the scope of the present disclosure. It should be appreciated that some steps in the aforementioned method are not necessarily performed in the order shown in the figure, but they can be performed simultaneously, in different orders or in an overlapping manner. In addition, those skilled in the art can add some steps or omit some steps as needed. Some components in the aforementioned system are not necessarily arranged according to the diagram, and those skilled in the art can add some components or omit some components as needed. It should be understood by those skilled in the art that the above embodiments can be modified without departing from the scope and essence of the present disclosure. The scope of the present disclosure is defined by the attached claims.

Claims

1. A method for blockchain-based transactions, comprising: The transaction initiating node reads the transaction data from the local privacy database; Calculating the transaction data to obtain encrypted transaction data and a summary of the transaction data; Send transaction request to blockchain; In response to receiving a successful transaction response from the target node, uploading a summary of the transaction data to the blockchain, and participating in the consensus of the uploaded summary of the transaction data; After reaching consensus on the summary of the transaction data, a summary is calculated for the transaction data in the privacy database of the initiating node; as well as Compare the calculated summary with the summary of the corresponding transaction data stored in the blockchain to determine whether the transaction data in the privacy database has been tampered with; The transaction request at least includes a target node parameter, encrypted transaction data, and a summary of the transaction data, wherein the target node parameter identifies a target node of the transaction; and Among them, if the transaction is a private transaction, the transaction request also includes a private transaction parameter, which identifies the transaction as a private transaction and includes an identifier of a relevant node of the transaction. The relevant node and the initiating node participate in the consensus of the transaction via the blockchain.

2. The method according to claim 1, wherein: The relevant nodes include a target node and a supervisory node, and the supervisory node is configured to record transactions.

3. The method according to claim 1 or 2, wherein: The summary of the transaction data is a hash value of the transaction data, and wherein the encrypted transaction data is obtained by encrypting the transaction data using a private key of the initiating node.

4. The method according to claim 1 or 2, wherein: Nodes need to pass a qualification review before joining the blockchain.

5. A method for blockchain-based transactions, comprising: The node receives a transaction request from an initiating node via a blockchain, the transaction request including at least a target node parameter, encrypted transaction data, and a summary of the transaction data, the target node parameter identifying a target node of the transaction; Determining whether the transaction request includes a private transaction parameter, wherein the private transaction parameter identifies the transaction as a private transaction; If the transaction request includes a private transaction parameter, determining whether the private transaction parameter includes an identifier of the node; as well as If the private transaction parameter includes an identifier of the node, the node is a relevant node, and the relevant node and the initiating node participate in the consensus of the transaction via the blockchain; In the case where the transaction request includes the privacy transaction parameter, whether the node is the target node of the transaction is determined based on the target node parameter. If the node is the target node, the following steps are performed: decrypting the encrypted transaction data included in the transaction request, Storing the decrypted transaction data in a private database located locally at the node, Send a successful transaction response to the initiating node, Based on blockchain participation in the consensus of transaction data summary, After reaching consensus on the summary of the transaction data, computing a summary for the transaction data in the privacy database of the target node, and Compare the calculated summary with the summary of the corresponding transaction data stored in the blockchain to determine whether the transaction data in the privacy database has been tampered with; If the private transaction parameters include the identifier of the node, and the node is not the target node of the transaction, the node is a supervisory node, and the following steps are performed: decrypting the encrypted transaction data included in the transaction request, storing the decrypted transaction data in a private database located locally at the node, and In response to the initiating node uploading a summary of the transaction data to the blockchain, participating in the consensus on the summary of the uploaded transaction data.

6. The method according to claim 5, wherein: If the node is a supervisory node, the following steps are further performed: after completing the consensus of the summary of the transaction data, a summary is calculated for the transaction data in the privacy database of the supervisory node, and The calculated summary is compared with the summary of the corresponding transaction data stored in the blockchain to determine whether the transaction data in the privacy database has been tampered with.

7. The method according to claim 5, wherein: The digest of the transaction data is a hash value of the transaction data, and wherein decrypting the encrypted transaction data included in the transaction request comprises: The encrypted transaction data is decrypted using the public key of the initiating node.

8. A node device for blockchain-based transactions, comprising: The blockchain module is configured to store a summary of transaction data and to perform consensus on transactions; The privacy database is located locally on the node and is configured to store transaction data; an encryption / decryption module configured to encrypt and decrypt transaction data; as well as The transaction module is configured as follows: Read transaction data from a local privacy database; Calculating a summary of the transaction data, and sending the transaction data to an encryption / decryption module to obtain the encrypted transaction data and a summary of the transaction data; Send transaction request to blockchain module; In response to receiving a successful transaction response from the target node, uploading a summary of the transaction data to the blockchain, and participating in the consensus of the uploaded summary of the transaction data; After reaching consensus on the summary of transaction data, a summary is calculated for the transaction data in the privacy database of the relevant nodes; as well as Compare the calculated summary with the summary of the corresponding transaction data stored in the blockchain to determine whether the transaction data in the privacy database has been tampered with; The transaction request at least includes a target node parameter, encrypted transaction data, and a summary of the transaction data, wherein the target node parameter identifies a target node of the transaction; and Among them, if the transaction is a private transaction, the transaction request also includes a private transaction parameter, which identifies the transaction as a private transaction and includes an identifier of a related node of the transaction, and the related node and the node participate in the consensus of the transaction via the blockchain.

9. A node device for blockchain-based transactions, comprising: The blockchain module is configured to store a summary of transaction data and to perform consensus on transactions; an encryption / decryption module configured to encrypt and decrypt transaction data; The privacy database is located locally on the node and is configured to store transaction data; as well as The transaction module is configured as follows: Receive a transaction request from an initiating node from a blockchain module, the transaction request including at least a target node parameter, encrypted transaction data, and a summary of the transaction data, the target node parameter identifying a target node of the transaction; Determining whether the transaction request includes a private transaction parameter, wherein the private transaction parameter identifies the transaction as a private transaction; If the transaction request includes a private transaction parameter, determining whether the private transaction parameter includes an identifier of the node; as well as If the private transaction parameter includes an identifier of the node, the node is a relevant node, and the relevant node and the initiating node participate in the consensus of the transaction via the blockchain; In the case where the transaction request includes the privacy transaction parameter, whether the node is the target node of the transaction is determined based on the target node parameter. If the node is the target node of the transaction, the node performs the following steps: sending the encrypted transaction data included in the transaction request to the encryption / decryption module to obtain the decrypted transaction data, Storing the decrypted transaction data in a private database located locally at the node, Send a successful transaction response to the initiating node, After reaching consensus on the summary of the transaction data, computing a summary for the transaction data in the privacy database of the target node, and Compare the calculated summary with the summary of the corresponding transaction data stored in the blockchain to determine whether the transaction data in the privacy database has been tampered with. wherein the blockchain module of the target node is configured to reach a consensus on a summary of the transaction data; If the private transaction parameters include the identifier of the node, and the node is not the target node of the transaction, the node is a supervisory node, and the following steps are performed: decrypting the encrypted transaction data included in the transaction request, and Storing the decrypted transaction data in a private database located locally at the node, The blockchain module of the supervisory node is configured to participate in the consensus on the summary of the uploaded transaction data in response to the initiating node uploading the summary of the transaction data to the blockchain.

10. The node device according to claim 9, wherein: The transaction module is further configured to: If the node is a supervisory node, the following steps are further performed: after completing the consensus of the summary of the transaction data, a summary is calculated for the transaction data in the privacy database of the supervisory node, and The calculated summary is compared with the summary of the corresponding transaction data stored in the blockchain to determine whether the transaction data in the privacy database has been tampered with.

11. A non-transitory computer-readable storage medium for blockchain-based transactions having a program stored thereon, characterized in that: When the program is executed by a computer, the computer is caused to execute the method according to any one of claims 1 to 4.

12. A non-transitory computer-readable storage medium for blockchain-based transactions having a program stored thereon, characterized in that: When the program is executed by a computer, the computer is caused to execute the method according to any one of claims 5 to 7.

13. A computing device for blockchain-based transactions, comprising a memory and a processor, wherein the memory is communicatively coupled to the processor, wherein a program is stored in the memory, and when the program is executed by the processor, the processor executes the method according to any one of claims 1 to 4.

14. A computing device for blockchain-based transactions, comprising a memory and a processor, wherein the memory is communicatively coupled to the processor, wherein a program is stored in the memory, and when the program is executed by the processor, the processor performs the method according to any one of claims 5 to 7.

Citation Information

Patent Citations

  • Consensus verification method and device

    CN107392040A

  • Data processing method, data processing device and computer system

    CN110197082A