WO2019127531A1 - Block chain-based data processing method and apparatus, storage medium and electronic device - Google Patents

Block chain-based data processing method and apparatus, storage medium and electronic device Download PDF

Info

Publication number
WO2019127531A1
WO2019127531A1 PCT/CN2017/120264 CN2017120264W WO2019127531A1 WO 2019127531 A1 WO2019127531 A1 WO 2019127531A1 CN 2017120264 W CN2017120264 W CN 2017120264W WO 2019127531 A1 WO2019127531 A1 WO 2019127531A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
sub
smart contract
node
blockchain
Prior art date
Application number
PCT/CN2017/120264
Other languages
French (fr)
Chinese (zh)
Inventor
王健
谢辉
张跃洋
陈敏
周阳
庞洪福
薛鹏飞
Original Assignee
深圳前海达闼云端智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海达闼云端智能科技有限公司 filed Critical 深圳前海达闼云端智能科技有限公司
Priority to PCT/CN2017/120264 priority Critical patent/WO2019127531A1/en
Priority to CN201780002508.7A priority patent/CN108235772B/en
Publication of WO2019127531A1 publication Critical patent/WO2019127531A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Definitions

  • the present disclosure relates to the field of computers, and in particular, to a data processing method, apparatus, storage medium, and electronic device based on a blockchain.
  • Blockchain technology is a distributed, decentralized, trusted network data consensus storage technology based on a unique block generation mechanism and P2P (Point To Point (point-to-point) network communication mechanism realizes the synchronization problem of distributed computing.
  • P2P Point To Point (point-to-point) network communication mechanism
  • the transaction information of any blockchain node is public, and any blockchain node can view the transaction information of other blockchain nodes.
  • the transaction information of the blockchain node may include private information, and it is necessary to avoid providing clear text to each participating node.
  • the node if the node has no data plaintext, the node will not be able to verify the validity of the data, and finally cannot achieve the protection chain. The purpose of the data.
  • the present disclosure provides a blockchain-based data processing method, apparatus, storage medium, and electronic device for protecting a privacy transaction of a blockchain node.
  • a block chain-based data processing method is provided, the method being applied to a first block chain node in a blockchain network, the blockchain Deploying a management contract, the management contract defining a trusted node capable of executing a smart contract, the trusted node including at least the first blockchain node;
  • the method includes:
  • the block includes a sub-block, the sub-block including a smart contract code and data corresponding to the smart contract code;
  • the sub-block is written into a block of the first block chain node.
  • an apparatus for securely accessing a blockchain configured in a first blockchain node in a blockchain network, the blockchain network deploying a management contract, the management contract Defining a trusted node capable of executing a smart contract, the trusted node including at least the first blockchain node;
  • the device includes:
  • a receiving module configured to receive a block in the blockchain network; the block includes a sub-block, where the sub-block includes a smart contract code and data corresponding to the smart contract code;
  • An obtaining module configured to obtain a secret key from a digital envelope of the smart contract by using a pre-acquired private key
  • a decryption module configured to acquire the smart contract code in the sub-block according to the secret key, so that the first blockchain node executes the smart contract code
  • a first write module configured to encrypt and write data generated by the smart contract code and the first blockchain node to the smart contract code into a sub-block
  • a second write module is configured to write the sub-block into a block of the first block chain node.
  • a computer readable storage medium for storing a computer program, the computer program comprising instructions for performing the method of the first aspect.
  • a fourth aspect of the present disclosure provides an electronic device comprising: the computer readable storage medium of the third aspect; and one or more processors for executing a program in the computer readable storage medium.
  • the management contract may define a trusted node capable of executing a smart contract with a private transaction, that is, an object of the private transaction may be defined by the management contract, and only the object of the private transaction can Obtaining a secret key from a digital envelope of the management contract by a pre-acquired private key, and decrypting the encrypted private transaction in the sub-block by the obtained secret key, and since the sub-block is only an independent part of the block, It does not affect the validity of other data in other nodes to verify the block, and the validity of the sub-block data can only be verified by the object of the private transaction (ie, the node).
  • the protection of privacy transactions is achieved using the above method.
  • FIG. 1 is a schematic diagram of an implementation environment, according to an exemplary embodiment of the present disclosure.
  • FIG. 2 is a schematic flowchart diagram of a blockchain-based data processing method according to an exemplary embodiment of the present disclosure.
  • FIG. 3 is a schematic flowchart of encryption in a blockchain-based data processing method according to an exemplary embodiment of the present disclosure.
  • FIG. 4 is a schematic flowchart of a sub-block write block in a block chain-based data processing method according to an exemplary embodiment of the present disclosure.
  • FIG. 5 is a block diagram of a blockchain-based data processing apparatus according to an exemplary embodiment of the present disclosure.
  • FIG. 6 is a block diagram of a first write module of a blockchain-based data processing apparatus according to an exemplary embodiment of the present disclosure.
  • FIG. 7 is a block diagram of a second write module of a blockchain-based data processing apparatus according to an exemplary embodiment of the present disclosure.
  • FIG. 8 is a block diagram of an electronic device, according to an exemplary embodiment.
  • a blockchain is a decentralized distributed database system in which all nodes in a blockchain network participate in maintenance. It is composed of a series of data blocks generated by cryptography, and each block is a blockchain. One block. According to the order of the generation time, the blocks are linked together in an orderly manner to form a data chain, which is aptly called a blockchain.
  • a node in a blockchain network may be referred to as a blockchain node, where the blockchain network is based on P2P (Peer) To Peer (peer-to-peer network) network, each P2P network node participating in transaction and block storage, verification, and forwarding is a node in a blockchain network.
  • P2P Peer
  • peer-to-peer network peer-to-peer network
  • the user identity in the blockchain can be represented by a public key or an account address generated based on the public key, and the public key and the private key appear in pairs, wherein the private key is mastered by the user and not posted to the blockchain described above.
  • the public key or the above account address can be freely posted in the blockchain network.
  • the public key can be the above account address through a specific hash and encoding. It is worth mentioning that there is no one-to-one correspondence between user identity and blockchain nodes. Users can use their own private key on any blockchain node.
  • each node participating in the calculation has the same authority (decentralized, no trust), including transactions, calculation blocks (commonly known as mining, ie mining) And other core functions.
  • the transaction representative will be written into the block data, and the block (Block) adopts a specific generation mechanism to ensure that the longest chain (the longest chain contains the most relevant blocks) is the effective chain.
  • the data of the transaction usually includes a certain attribute or currency, such as the digital signature of the transaction owner (ie, the owner's private key encrypts the transaction, usually called digital signature), the account address of the transaction recipient Etc., after the transaction passes the verification of the owner's digital signature and is written into the block, the ownership of the currency is transferred to the recipient.
  • the process of writing blocks to the data of the blockchain is performed by the blockchain node by writing a transaction to the blockchain network to write data to the blockchain.
  • the transaction includes: the blockchain node performs a digital signature on the generated transaction data packet according to a preset transaction data format, and uses the private key of the blockchain node to perform the digital signature on the transaction data packet, and the digital signature is used to prove the The identity of the user of the blockchain node.
  • the transaction is then recorded by the “miners” in the blockchain network (ie, the blockchain nodes that perform the PoW consensus competition mechanism) into the new blocks generated in the blockchain, and the transaction is posted to the blockchain network.
  • the transaction is verified by other blockchain nodes (other nodes can obtain the public key of the blockchain node from the transaction generated by the blockchain node, and sign the digital signature according to the public key of the blockchain node Verification, in addition to verifying the digital signature, can verify that the transaction packet is the specified data structure) and the transaction is written to the blockchain.
  • other nodes can obtain the public key of the blockchain node from the transaction generated by the blockchain node, and sign the digital signature according to the public key of the blockchain node Verification, in addition to verifying the digital signature, can verify that the transaction packet is the specified data structure) and the transaction is written to the blockchain.
  • the new block in the blockchain is implemented by the above-mentioned “miners” to implement the PoW consensus competition mechanism (this mechanism can be understood as: each “miner” according to the preset technical requirements of the block, for example, according to the preset random number requirement To jointly calculate the random number, which "miner” first calculates the random number that meets the random number requirement, and the block produced by the "miner” is periodically generated as the new block, so the time interval for generating the new block is usually Related to the above-mentioned preset technical requirements, the time interval at which the blockchain generates a new block can be changed by setting different preset technical requirements.
  • Smart Contract A smart contract is actually executable code stored on a blockchain. It is not strictly an account because it does not necessarily have an actual owner, but its characteristics and behavior can be Think of it as a machine account controlled by programming logic.
  • FIG. 1 is a schematic diagram of an implementation environment, according to an exemplary embodiment of the present disclosure.
  • the implementation environment may include a blockchain network 10 composed of a number of nodes, the blockchain network 10 deploying a management contract, which is a contract that all nodes in the blockchain network can execute.
  • the management contract defines a trusted node capable of executing a smart contract, and the smart contract mentioned herein may be any smart contract, including a smart contract with a private transaction; the smart contract may also refer to a private transaction only Smart contract.
  • the blockchain network 10 may include a first block chain node 11, a second block chain node 12, and a participating node 13. among them:
  • the first blockchain node 11 which may include, but is not limited to, various terminals, is a trusted node capable of executing a smart contract with a private transaction, and blocks data of the blockchain network.
  • the second blockchain node 12 which may include, but is not limited to, various terminals, is a trusted node capable of executing the smart contract, and blocks data of the blockchain network.
  • the participating nodes 13 may include, but are not limited to, various terminals, and the number of any nodes other than the trusted nodes in the blockchain network is not limited.
  • the first blockchain node 11 and the second blockchain node 12 are capable of executing smart contracts with private transactions, and the participating nodes 13 are unable to execute smart contracts with private transactions.
  • the first blockchain node 11, the second blockchain node 12, and the participating node 13 are all capable of executing the management contract.
  • FIG. 2 is a flowchart of a blockchain-based data processing method according to an exemplary embodiment of the first aspect of the present disclosure. The method is applied to a first blockchain node in a blockchain network. As shown in FIG. 2, the method can include the following steps.
  • Step S21 Receive a block in the blockchain network; the block includes a sub-block, where the sub-block includes a smart contract code and data corresponding to the smart contract code.
  • the smart contract code may refer to a code of a smart contract having a private transaction, and the data corresponding to the smart contract code refers to data of a private transaction.
  • Step S22 Obtain a secret key from the digital envelope of the management contract by using a pre-acquired private key.
  • Step S23 acquiring the smart contract code in the sub-block according to the secret key, so that the first blockchain node executes the smart contract code.
  • Step S24 encrypting and writing the smart contract code and the data generated by the first blockchain node to execute the smart contract code into the sub-block.
  • Step S25 writing the sub-block into the block of the first block chain node.
  • the technical solution of the present disclosure is based on a blockchain capable of supporting smart contracts.
  • Ethereum is a blockchain supporting smart contracts, and the technical solution of the present disclosure can be implemented based on Ethereum.
  • Ethereum itself has no access restrictions, and it is necessary to transform Ethereum into a license chain and deploy management contracts and smart contracts in the modified license chain, which define trusted nodes capable of executing smart contracts, for example,
  • the management contract can define that the trusted node is capable of executing all smart contracts, in particular including smart contracts with private transactions; the management contract can also define that only trusted nodes can execute smart contracts with private transactions.
  • the trusted node includes a first block chain node 11 and a second block chain node 12.
  • EOA in the license chain (External Owned Account) Account and contract account.
  • the EOA account includes the ExtInfo field, the account's nonce, and the account balance balance.
  • nonce is a number to prevent replay attacks. For every transaction sent by the account, nonce needs to be increased by 1.
  • the original Ethereum account does not have an ExtInfo field. By adding this field, the user can be defined with the permission.
  • the data and the account's nonce and balance form the attribute identifier of the account, and the data of the blockchain is protected against tampering.
  • the contract account includes data corresponding to the smart contract code and the smart contract code, which is the persistent data generated by the trusted node executing the smart contract code.
  • the privacy information of the protection blockchain node in this solution needs to include the data corresponding to the smart contract code and the smart contract code.
  • the first blockchain node receives a block broadcast by a neighboring node from the blockchain network.
  • the data of the privacy transaction is stored in the sub-block.
  • one participating node 13 broadcasts its own block, and the first block chain node 11 receives the block of the participating node 13, assuming that the block includes a sub-block, the sub-block includes intelligence.
  • the contract code and the data corresponding to the smart contract code are stored in the sub-block.
  • the management contract may define a transaction interface through which a privacy transaction may be sent to the trusted node; the management contract may define an interface for adding a trusted node, as shown in FIG. 1, one of the participating nodes may be accessed through the interface 13 is added as a trusted node; the management contract may define an interface for deleting the trusted node, as shown in FIG. 1, the second blockchain node 12 may be deleted from the trusted node through the interface, so that the second region The blockchain node 12 acts as a participating node; the management contract can also define an interface to modify the trusted node.
  • pseudo code for a management contract is an example of pseudo code for a management contract:
  • the DealTx interface is the trading interface for managing contracts.
  • the present disclosure can transform the EVM (Contract Execution Virtual Machine) of Ethereum to perform the function of deploying the trusted node, starting the trusted node, and performing privacy transactions when executing the DealTx interface.
  • EVM Contract Execution Virtual Machine
  • step S22 is performed to obtain the secret key from the digital envelope of the management contract by using the pre-acquired private key.
  • the secret key may be a digital envelope that may be encrypted by asymmetric encryption and placed in the management contract.
  • the secret key may be a symmetric key, and the private key is an asymmetric private key.
  • the first blockchain node first acquires a digital envelope in the management contract, and then decrypts the encrypted key by a private key to obtain a secret key.
  • step S23 may be performed, and the encrypted smart contract code in the sub-block is decrypted according to the secret key to obtain the smart contract code.
  • the first blockchain node executes the acquired smart contract code to generate corresponding data.
  • step S24 is executed to encrypt and write the smart contract code and the data generated by the first blockchain node to execute the smart contract code into the sub-block.
  • the method for encrypting the smart contract code and the first blockchain node to execute the data generated by the smart contract code in step S24 includes but is not limited to the following two implementation manners:
  • FIG. 3 is a schematic flowchart of encryption in a blockchain-based data processing method according to an exemplary embodiment of the present disclosure, where the smart contract code and The first blockchain node performs data encryption generated by the smart contract code, and may include the following steps.
  • step S241 the secret key is randomly generated, and the randomly generated secret key is acquired.
  • step S242 the smart contract code and the data generated by the first blockchain node to execute the smart contract code are encrypted by using the randomly generated secret key.
  • step S243 the randomly generated secret key is updated into the digital envelope of the management contract.
  • the first block chain node randomly generates a secret key each time the smart contract code and the first blockchain node perform data generated by the smart contract code are encrypted, and Step S24 is executed by using the randomly generated secret key. Since the rules for generating the secret key are randomly generated each time, the secret key generated by the first block chain node is different each time, that is, the key used by the first block chain node to perform step S24 is different, and The key used in the current execution of step S24 is updated in the digital envelope of the management contract. Therefore, the sub-blocks generated by the first block chain node in the previous execution of step S24 can no longer be decrypted, and can be applied to the need to clear the history. Recorded application scenarios.
  • a second implementation manner encrypting, by the secret key, the smart contract code and the first blockchain node to execute data generated by the smart contract code; wherein the secret key is the first blockchain
  • the node generates the randomly generated secret key and encrypts the first randomly generated secret key before the node first encrypts the smart contract code and the first blockchain node to execute the data generated by the smart contract code.
  • the digital envelope In the digital envelope.
  • the first blockchain node randomly generates a secret key before encrypting the smart contract code and the data generated by the first blockchain node to execute the smart contract code for the first time.
  • step S24 is performed.
  • the first blockchain node uses the first randomly generated secret key each time step S24 is performed. That is, as long as the first blockchain node randomly generates the secret key before encrypting the smart contract code and the data generated by the first blockchain node to execute the smart contract code, it is not necessary to randomly The secret key is generated.
  • the first randomly generated secret key is fixed to the first block chain node to execute the secret key used in step S24. Therefore, the first block chain node uses the same secret key used in step S24.
  • the smart contract code and the first blockchain node After the smart contract code and the first blockchain node perform data encryption generated by the smart contract code, the encrypted smart contract code and data are written into the sub-block, and then step S25 is performed, The sub-block is written in a block of the first block chain node.
  • FIG. 4 is a schematic flowchart of a sub-block write block in a block chain-based data processing method according to an exemplary embodiment of the present disclosure. As shown in FIG. 4, the writing the sub-block into the block of the first block chain node may include the following steps.
  • step S251 mining is performed by the device where the first block chain node is located.
  • step S252 the sub-block after the completion of the mining is written into the block of the first block chain node.
  • the equipment of the first block chain node that generates the sub-block is used for mining and mining.
  • the sub-block is written into the block of the first block chain node.
  • the first blockchain node may send the block to other nodes in the blockchain network by way of broadcast.
  • the sub-block exists in the next-level sub-directory of the block directory in which the block is located, and the sub-directory where the sub-block is located and the directory structure of the block directory Consistent.
  • the directory structure can look like this:
  • the management contract of the blockchain network 10 defines that the first blockchain node 11 and the second blockchain node 12 are trusted nodes, participating nodes. 13 is an untrusted node, and a key is stored in the digital envelope of the management contract.
  • the second blockchain node 12 initiates a privacy transaction, and the first blockchain node 11 performs a privacy transaction as an example (of course, in other embodiments, the first blockchain node 11 may also initiate a private transaction, the second zone Blockchain node 12 performs a privacy transaction):
  • the block of the second block chain node 12 includes a sub-block containing information of a private transaction.
  • the block of the second blockchain node 12 is transparently transmitted to the neighboring participating node 13 through the peer-to-peer network, and the participating node 13 passes the block of the second blockchain node 12 again.
  • the peer-to-peer network is transparently transmitted to the adjacent first block chain node 11. Since the participating node 13 is not a trusted node, the participating node 13 cannot obtain the secret key from the digital envelope of the management contract, that is, the sub-block in the block of the second blockchain node 12 cannot be decrypted;
  • the first block chain node 11 After receiving the block of the second block chain node 12, the first block chain node 11 transparently transmits the block of the second block chain node 12 to the neighboring node through the point-to-point network, and obtains the private key from the pre-acquired The key is obtained in the digital envelope of the management contract.
  • the first block chain node 11 decrypts the encrypted smart contract code in the sub-block according to the secret key; then, the first block chain node 11 executes the smart contract code and generates corresponding data; then, The first blockchain node 11 encrypts and packs the smart contract code and corresponding data into the sub-block; then, the first block chain node 11 writes the sub-block to the first blockchain In the block of the node; finally, the first block chain node 11 broadcasts the block.
  • the management contract can define a trusted node capable of executing a smart contract with a private transaction, that is, an object of the private transaction can be defined by the management contract, only the private transaction
  • the object can obtain the secret key from the digital envelope of the management contract through the pre-acquired private key, and decrypt the encrypted private transaction in the sub-block by the obtained secret key, and since the sub-block is only independent in the block Part of it does not affect the validity of other data in other nodes to verify the block, and the validity of the sub-block data can only be verified by the object of the private transaction (ie, the node).
  • the protection of privacy transactions is achieved using the above method.
  • FIG. 5 is a block diagram of a blockchain-based data processing apparatus according to an exemplary embodiment of the present disclosure.
  • the blockchain-based data processing apparatus 500 is configured in a first blockchain node in a blockchain network, the blockchain network deploying a management contract, the management contract defining the ability to perform the a trusted node of the smart contract, the trusted node including at least the first blockchain node; the apparatus 500 includes:
  • the device includes:
  • the receiving module 510 is configured to receive a block in the blockchain network; the block includes a sub-block, where the sub-block includes a smart contract code and data corresponding to the smart contract code;
  • the obtaining module 520 is configured to obtain a secret key from the digital envelope of the management contract by using a pre-acquired private key;
  • the decryption module 530 is configured to acquire the smart contract code in the sub-block according to the secret key, so that the first blockchain node executes the smart contract code;
  • a first write module 540 configured to encrypt and write data generated by the smart contract code and the first blockchain node to the smart contract code into a sub-block;
  • the second write module 550 is configured to write the sub-block into a block of the first block chain node.
  • the second writing module 550 includes:
  • a mining sub-module 551 configured to perform mining by a device in which the first blockchain node is located according to the sub-block;
  • the write sub-module 552 is configured to write the sub-block after the completion of the mining into the block of the first block chain node.
  • the first writing module 540 includes:
  • the obtaining submodule 541 is configured to randomly generate the secret key and obtain the randomly generated secret key;
  • the encryption sub-module 542 is configured to encrypt the smart contract code and the data generated by the first blockchain node to execute the smart contract code by using the randomly generated secret key;
  • the update sub-module 543 is configured to update the randomly generated secret key to the digital envelope of the management contract.
  • the first writing module 540 is further configured to:
  • the secret key is a secret generated randomly before the first blockchain node encrypts the smart contract code and the data generated by the first blockchain node to execute the smart contract code for the first time. Key, and the first randomly generated secret key is stored in the digital envelope of the management contract.
  • the sub-block exists in a sub-directory of a sub-directory of the block directory in which the block is located, and a sub-directory in which the sub-block is located is consistent with a directory structure of the block directory.
  • the management contract defines at least a transaction interface, and an interface for adding, deleting, and modifying a trusted node.
  • the private key is an asymmetric private key
  • the secret key is a symmetric key
  • the secret key is asymmetrically encrypted and placed in a digital envelope of the management contract.
  • each module is only a logical function division, and the actual implementation may have another division mode.
  • the physical implementation of each module may also be in various manners, which is not limited in this disclosure.
  • FIG. 8 is a block diagram of an electronic device 800, according to an exemplary embodiment.
  • the electronic device 800 can include a processor 801, a memory 802, a multimedia component 803, an input/output (I/O) interface 804, and a communication component 805.
  • a processor 801 a memory 802
  • a multimedia component 803 a multimedia component 803
  • an input/output (I/O) interface 804 a communication component 805.
  • the processor 801 is configured to control the overall operation of the electronic device 800 to complete all or part of the above-described blockchain-based data processing method.
  • Memory 802 is used to store various types of data to support operations at the electronic device 800, such as may include instructions for any application or method operating on the electronic device 800, as well as application related data, For example, contact data, sent and received messages, pictures, audio, video, and so on.
  • the memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read only memory ( Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (Erasable) Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, disk or optical disk.
  • the multimedia component 803 can include a screen and audio components.
  • the screen may be, for example, a touch screen, and the audio component is used to output and/or input an audio signal.
  • the audio component can include a microphone for receiving an external audio signal.
  • the received audio signal may be further stored in memory 802 or transmitted via communication component 805.
  • the audio component also includes at least one speaker for outputting an audio signal.
  • the I/O interface 804 provides an interface between the processor 801 and other interface modules.
  • the other interface modules may be keyboards, mice, buttons, and the like. These buttons can be virtual buttons or physical buttons.
  • Communication component 805 is used for wired or wireless communication between the electronic device 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 can include: Wi-Fi module, Bluetooth module, NFC module.
  • electronic device 800 may be implemented by one or more application specific integrated circuits (Application) Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), on-site A Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the blockchain-based data processing method described above.
  • ASIC Application Specific integrated circuits
  • DSP Digital Signal Processor
  • DSPD Digital Signal Processing Device
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • controller microcontroller, microprocessor or other electronic component implementation for performing the blockchain-based data processing method described above.
  • a computer readable storage medium comprising program instructions, such as a memory 802 comprising program instructions executable by processor 801 of electronic device 800 to perform the above-described zone based Block chain data processing method.

Abstract

The present invention provides a block chain-based data processing method and apparatus, a storage medium and an electronic device for protecting private transaction of a block chain node. The method comprises: receiving a block in a block chain network, the block comprising a sub-block, and the sub-block comprising a smart contract code and data corresponding to the smart contract code; obtaining a secret key from a digital envelope of a management contract by means of a pre-obtained private key; obtaining the smart contract code in the sub-block according to the secret key, so that a first block chain node executes the smart contract code; encrypting and writing the smart contract code and data generated when the first block chain node executes the smart contract code into the sub-block; and writing the sub-block into a block of the first block chain node.

Description

基于区块链的数据处理方法、装置、存储介质及电子设备Data processing method, device, storage medium and electronic device based on blockchain 技术领域Technical field
本公开涉及计算机领域,尤其涉及一种基于区块链的数据处理方法、装置、存储介质及电子设备。The present disclosure relates to the field of computers, and in particular, to a data processing method, apparatus, storage medium, and electronic device based on a blockchain.
背景技术Background technique
区块链技术是一种分布式、去中心、去信任的网络数据共识存储技术,其基于独特的区块(Block)生成机制和P2P(Point to Point,点对点)网络通信机制实现了分布式计算的同步性问题。Blockchain technology is a distributed, decentralized, trusted network data consensus storage technology based on a unique block generation mechanism and P2P (Point To Point (point-to-point) network communication mechanism realizes the synchronization problem of distributed computing.
对传统的公有区块链而言,任一区块链节点的交易信息都是公开的,且任一区块链节点都可以查看其他区块链节点的交易信息。但在一些应用领域,区块链节点的交易信息可能包括隐私信息,需要避免给每个参与节点提供数据明文,但如果节点没有数据明文,节点将无法验证数据的有效性,最终不能达到保护链上数据的目的。For the traditional public blockchain, the transaction information of any blockchain node is public, and any blockchain node can view the transaction information of other blockchain nodes. However, in some application areas, the transaction information of the blockchain node may include private information, and it is necessary to avoid providing clear text to each participating node. However, if the node has no data plaintext, the node will not be able to verify the validity of the data, and finally cannot achieve the protection chain. The purpose of the data.
因此,传统的公有区块链无法较好地保护隐私交易。Therefore, the traditional public blockchain cannot better protect private transactions.
发明内容Summary of the invention
有鉴于此,本公开提供一种基于区块链的数据处理方法、装置、存储介质及电子设备,用以保护区块链节点的隐私交易。In view of this, the present disclosure provides a blockchain-based data processing method, apparatus, storage medium, and electronic device for protecting a privacy transaction of a blockchain node.
为了实现上述目的,根据本公开实施例的第一方面,提供一种基于区块链的数据处理方法,所述方法应用于区块链网络中的第一区块链节点,所述区块链网络部署一管理合约,所述管理合约定义了能够执行智能合约的可信节点,所述可信节点至少包括所述第一区块链节点;In order to achieve the above object, according to a first aspect of an embodiment of the present disclosure, a block chain-based data processing method is provided, the method being applied to a first block chain node in a blockchain network, the blockchain Deploying a management contract, the management contract defining a trusted node capable of executing a smart contract, the trusted node including at least the first blockchain node;
所述方法包括:The method includes:
接收所述区块链网络中的区块;所述区块包括子区块,所述子区块包括智能合约代码和所述智能合约代码对应的数据;Receiving a block in the blockchain network; the block includes a sub-block, the sub-block including a smart contract code and data corresponding to the smart contract code;
通过预先获取的私钥从所述管理合约的数字信封中获取秘钥;Obtaining a secret key from a digital envelope of the management contract by a pre-acquired private key;
根据所述秘钥获取所述子区块中的所述智能合约代码,以使所述第一区块链节点执行所述智能合约代码;Obtaining the smart contract code in the sub-block according to the secret key, so that the first blockchain node executes the smart contract code;
将所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据加密并写入子区块中;Encrypting the smart contract code and the data generated by the first blockchain node to execute the smart contract code into a sub-block;
将所述子区块写入所述第一区块链节点的区块中。The sub-block is written into a block of the first block chain node.
根据本公开实施例的第二方面,提供一种安全访问块链的装置,配置于区块链网络中的第一区块链节点,所述区块链网络部署一管理合约,所述管理合约定义了能够执行智能合约的可信节点,所述可信节点至少包括所述第一区块链节点;According to a second aspect of an embodiment of the present disclosure, there is provided an apparatus for securely accessing a blockchain, configured in a first blockchain node in a blockchain network, the blockchain network deploying a management contract, the management contract Defining a trusted node capable of executing a smart contract, the trusted node including at least the first blockchain node;
该装置包括:The device includes:
接收模块,被配置为接收所述区块链网络中的区块;所述区块包括子区块,所述子区块包括智能合约代码和所述智能合约代码对应的数据;a receiving module, configured to receive a block in the blockchain network; the block includes a sub-block, where the sub-block includes a smart contract code and data corresponding to the smart contract code;
获取模块,被配置为通过预先获取的私钥从所述智能合约的数字信封中获取秘钥;An obtaining module configured to obtain a secret key from a digital envelope of the smart contract by using a pre-acquired private key;
解密模块,被配置为根据所述秘钥获取所述子区块中的所述智能合约代码,以使所述第一区块链节点执行所述智能合约代码;a decryption module configured to acquire the smart contract code in the sub-block according to the secret key, so that the first blockchain node executes the smart contract code;
第一写入模块,被配置为将所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据加密并写入子区块中;以及a first write module configured to encrypt and write data generated by the smart contract code and the first blockchain node to the smart contract code into a sub-block;
第二写入模块,被配置为将所述子区块写入所述第一区块链节点的区块中。A second write module is configured to write the sub-block into a block of the first block chain node.
根据本公开实施例的第三方面,提供一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序,所述计算机程序包括用于执行第一方面所述的方法的指令。According to a third aspect of an embodiment of the present disclosure, a computer readable storage medium for storing a computer program, the computer program comprising instructions for performing the method of the first aspect.
本公开第四方面提供一种电子设备,包括:第三方面所述的计算机可读存储介质;以及一个或者多个处理器,用于执行所述计算机可读存储介质中的程序。A fourth aspect of the present disclosure provides an electronic device comprising: the computer readable storage medium of the third aspect; and one or more processors for executing a program in the computer readable storage medium.
通过本公开上述技术方案,通过部署管理合约,所述管理合约可以定义能够执行具有隐私交易的智能合约的可信节点,即可以由所述管理合约定义隐私交易的对象,只有隐私交易的对象能够通过预先获取的私钥从所述管理合约的数字信封中获取秘钥,并通过获取的秘钥来解密子区块中经过加密的隐私交易,并且由于子区块只是区块中独立的一部分,并不影响其它节点验证区块中其它数据的有效性,而子区块数据的有效性只有隐私交易的对象(即可信节点)能够验证。因而,采用上述方法实现了对隐私交易的保护。Through the above technical solution of the present disclosure, by deploying a management contract, the management contract may define a trusted node capable of executing a smart contract with a private transaction, that is, an object of the private transaction may be defined by the management contract, and only the object of the private transaction can Obtaining a secret key from a digital envelope of the management contract by a pre-acquired private key, and decrypting the encrypted private transaction in the sub-block by the obtained secret key, and since the sub-block is only an independent part of the block, It does not affect the validity of other data in other nodes to verify the block, and the validity of the sub-block data can only be verified by the object of the private transaction (ie, the node). Thus, the protection of privacy transactions is achieved using the above method.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。The above general description and the following detailed description are intended to be illustrative and not restrictive.
附图说明DRAWINGS
图1是根据本公开一示例性实施例示出的实施环境示意图。FIG. 1 is a schematic diagram of an implementation environment, according to an exemplary embodiment of the present disclosure.
图2是根据本公开一示例性实施例提供的一种基于区块链的数据处理方法的流程示意图。FIG. 2 is a schematic flowchart diagram of a blockchain-based data processing method according to an exemplary embodiment of the present disclosure.
图3是根据本公开一示例性实施例提供的一种基于区块链的数据处理方法中加密的流程示意图。FIG. 3 is a schematic flowchart of encryption in a blockchain-based data processing method according to an exemplary embodiment of the present disclosure.
图4是根据本公开一示例性实施例提供的一种基于区块链的数据处理方法中子区块写入区块的流程示意图。FIG. 4 is a schematic flowchart of a sub-block write block in a block chain-based data processing method according to an exemplary embodiment of the present disclosure.
图5是根据本公开一示例性实施例提供的一种基于区块链的数据处理装置的框图。FIG. 5 is a block diagram of a blockchain-based data processing apparatus according to an exemplary embodiment of the present disclosure.
图6是根据本公开一示例性实施例提供的一种基于区块链的数据处理装置的第一写入模块的框图。FIG. 6 is a block diagram of a first write module of a blockchain-based data processing apparatus according to an exemplary embodiment of the present disclosure.
图7是根据本公开一示例性实施例提供的一种基于区块链的数据处理装置的第二写入模块的框图。FIG. 7 is a block diagram of a second write module of a blockchain-based data processing apparatus according to an exemplary embodiment of the present disclosure.
图8是是根据一示例性实施例示出的一种电子设备的框图。FIG. 8 is a block diagram of an electronic device, according to an exemplary embodiment.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. The following description refers to the same or similar elements in the different figures unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with aspects of the present disclosure as detailed in the appended claims.
在介绍本公开提供的基于区块链的数据处理方法、装置及存储介质之前,首先对区块链网络进行简单介绍。区块链是由区块链网络中所有节点共同参与维护的去中心化分布式数据库系统,它是由一系列基于密码学方法产生的数据块组成,每个数据块即为区块链中的一个区块。根据产生时间的先后顺序,区块被有序地链接在一起,形成一个数据链条,被形象地称为区块链(Blockchain)。下面对区块链网络的一些概念进行介绍。Before introducing the blockchain-based data processing method, device and storage medium provided by the present disclosure, a blockchain network is briefly introduced. A blockchain is a decentralized distributed database system in which all nodes in a blockchain network participate in maintenance. It is composed of a series of data blocks generated by cryptography, and each block is a blockchain. One block. According to the order of the generation time, the blocks are linked together in an orderly manner to form a data chain, which is aptly called a blockchain. Some concepts of the blockchain network are introduced below.
区块链网络中的节点可以称为区块链节点,其中区块链网络基于P2P(Peer to Peer,对等网络)网络,每个参与交易和区块存储、验证、转发的P2P网络节点都是一个区块链网络中的节点。A node in a blockchain network may be referred to as a blockchain node, where the blockchain network is based on P2P (Peer) To Peer (peer-to-peer network) network, each P2P network node participating in transaction and block storage, verification, and forwarding is a node in a blockchain network.
区块链中的用户身份可以使用公钥或者是根据该公钥生成的账户地址表示,并且公钥和私钥是成对出现的,其中私钥由用户掌握而不发布到上述的区块链网络中,公钥或者上述的账户地址可随意发布在区块链网络中。其中,公钥可以通过特定的哈希和编码后成为上述的账户地址。值得一提的是,用户身份和区块链节点不存在一一对应关系,用户可以在任意一个区块链节点上使用自己的私钥。The user identity in the blockchain can be represented by a public key or an account address generated based on the public key, and the public key and the private key appear in pairs, wherein the private key is mastered by the user and not posted to the blockchain described above. In the network, the public key or the above account address can be freely posted in the blockchain network. Among them, the public key can be the above account address through a specific hash and encoding. It is worth mentioning that there is no one-to-one correspondence between user identity and blockchain nodes. Users can use their own private key on any blockchain node.
通常意义上,在区块链的形成过程中,每一个参与计算的节点均享有相同的权限(去中心、无信任),其中包括交易(Transaction),计算区块(俗称挖矿,即mining)等核心功能。其中,交易代表将被写入区块的数据,而区块(Block)则采用特定生成机制,保证最长的链(最长的链包含最多前后关联的区块)为有效链。在交易的数据中,通常包括了一定属性或货币,比如交易拥有者的数字签名(即拥有者的私钥对其交易进行加密处理,通常意义上称为数字签名),交易接受者的账户地址等,在该交易通过了对拥有者数字签名的验证,并被写入区块后,即将该货币的所有权转移到接受者一方。In the usual sense, in the formation of the blockchain, each node participating in the calculation has the same authority (decentralized, no trust), including transactions, calculation blocks (commonly known as mining, ie mining) And other core functions. Among them, the transaction representative will be written into the block data, and the block (Block) adopts a specific generation mechanism to ensure that the longest chain (the longest chain contains the most relevant blocks) is the effective chain. In the data of the transaction, usually includes a certain attribute or currency, such as the digital signature of the transaction owner (ie, the owner's private key encrypts the transaction, usually called digital signature), the account address of the transaction recipient Etc., after the transaction passes the verification of the owner's digital signature and is written into the block, the ownership of the currency is transferred to the recipient.
关于区块链的数据写入区块的过程,是由区块链节点通过向区块链网络发布交易(Transaction)实现向区块链写入数据。该交易包括:区块链节点按照预设的交易数据格式对生成的交易数据包,以及利用该区块链节点自己的私钥对该交易数据包进行的数字签名,该数字签名用于证明该区块链节点的用户的身份。而后,该交易被区块链网络中的“矿工”(即执行PoW共识竞争机制的区块链节点)记录入区块链中产生的新区块,并将该交易发布到区块链网络中,在该交易被其他区块链节点验证通过(其他节点可以从该区块链节点生成的交易中获取该区块链节点的公钥,并根据该区块链节点的公钥对上述的数字签名进行验证,除了验证数字签名之外还可以验证交易数据包是否为规定的数据结构)和接受后,该交易即被写入区块链。其中,区块链中的新区块是由上述的“矿工”通过执行PoW共识竞争机制(该机制可以理解为:各个“矿工”按照区块的预设技术要求,例如按照预设的随机数要求来共同计算随机数,哪一个“矿工”先计算出符合该随机数要求的随机数,该“矿工”产生的区块就作为该新区块)而定期产生的,因此产生新区块的时间间隔通常和上述的预设技术要求相关,通过设置不同的预设技术要求可以改变区块链产生新区块的时间间隔。The process of writing blocks to the data of the blockchain is performed by the blockchain node by writing a transaction to the blockchain network to write data to the blockchain. The transaction includes: the blockchain node performs a digital signature on the generated transaction data packet according to a preset transaction data format, and uses the private key of the blockchain node to perform the digital signature on the transaction data packet, and the digital signature is used to prove the The identity of the user of the blockchain node. The transaction is then recorded by the “miners” in the blockchain network (ie, the blockchain nodes that perform the PoW consensus competition mechanism) into the new blocks generated in the blockchain, and the transaction is posted to the blockchain network. The transaction is verified by other blockchain nodes (other nodes can obtain the public key of the blockchain node from the transaction generated by the blockchain node, and sign the digital signature according to the public key of the blockchain node Verification, in addition to verifying the digital signature, can verify that the transaction packet is the specified data structure) and the transaction is written to the blockchain. Among them, the new block in the blockchain is implemented by the above-mentioned “miners” to implement the PoW consensus competition mechanism (this mechanism can be understood as: each “miner” according to the preset technical requirements of the block, for example, according to the preset random number requirement To jointly calculate the random number, which "miner" first calculates the random number that meets the random number requirement, and the block produced by the "miner" is periodically generated as the new block, so the time interval for generating the new block is usually Related to the above-mentioned preset technical requirements, the time interval at which the blockchain generates a new block can be changed by setting different preset technical requirements.
智能合约(Smart Contract):智能合约实际上是存储在区块链上的可执行代码,不是严格意义上的账户因其不一定设有实际拥有人,但其特性和行为在很多情况下能够被看作是一种受编程逻辑控制的机器账户。Smart Contract: A smart contract is actually executable code stored on a blockchain. It is not strictly an account because it does not necessarily have an actual owner, but its characteristics and behavior can be Think of it as a machine account controlled by programming logic.
为了使公开技术方案更加易于理解,再对本公开各个实施例所涉及的可能的区块链网络结构进行介绍。图1是根据本公开一示例性实施例示出的实施环境示意图。如图1所示,该实施环境可以包括由若干节点组成的区块链网络10,该区块链网络10部署管理合约,所述管理合约为区块链网络中的所有节点都能够执行的合约。所述管理合约定义了能够执行智能合约的可信节点,这里所提的所述智能合约可以为任何智能合约,包括了具有隐私交易的智能合约;所述智能合约也可以是只指具有隐私交易的智能合约。该区块链网络10可以包括:第一区块链节点11、第二区块链节点12、参与节点13。其中:In order to make the disclosed technical solution easier to understand, a possible blockchain network structure involved in various embodiments of the present disclosure is introduced. FIG. 1 is a schematic diagram of an implementation environment, according to an exemplary embodiment of the present disclosure. As shown in FIG. 1, the implementation environment may include a blockchain network 10 composed of a number of nodes, the blockchain network 10 deploying a management contract, which is a contract that all nodes in the blockchain network can execute. . The management contract defines a trusted node capable of executing a smart contract, and the smart contract mentioned herein may be any smart contract, including a smart contract with a private transaction; the smart contract may also refer to a private transaction only Smart contract. The blockchain network 10 may include a first block chain node 11, a second block chain node 12, and a participating node 13. among them:
第一区块链节点11,可以包括但不限于各种终端,是能够执行具有隐私交易的智能合约的可信节点,同步区块链网络的区块数据。The first blockchain node 11, which may include, but is not limited to, various terminals, is a trusted node capable of executing a smart contract with a private transaction, and blocks data of the blockchain network.
第二区块链节点12,可以包括但不限于各种终端,是能够执行该智能合约的可信节点,同步区块链网络的区块数据。The second blockchain node 12, which may include, but is not limited to, various terminals, is a trusted node capable of executing the smart contract, and blocks data of the blockchain network.
参与节点13,可以包括但不限于各种终端,区块链网络中除可信节点外的任意节点,数量不限。所述第一区块链节点11与所述第二区块链节点12,能够执行具有隐私交易的智能合约,参与节点13不能执行具有隐私交易的智能合约。其中,所述第一区块链节点11、所述第二区块链节点12与参与节点13都能够执行所述管理合约。The participating nodes 13 may include, but are not limited to, various terminals, and the number of any nodes other than the trusted nodes in the blockchain network is not limited. The first blockchain node 11 and the second blockchain node 12 are capable of executing smart contracts with private transactions, and the participating nodes 13 are unable to execute smart contracts with private transactions. The first blockchain node 11, the second blockchain node 12, and the participating node 13 are all capable of executing the management contract.
图2是根据本公开第一方面一示例性实施例提供的一种基于区块链的数据处理方法的流程图。该方法应用于区块链网络中的第一区块链节点。如图2所示,该方法可以包括以下步骤。FIG. 2 is a flowchart of a blockchain-based data processing method according to an exemplary embodiment of the first aspect of the present disclosure. The method is applied to a first blockchain node in a blockchain network. As shown in FIG. 2, the method can include the following steps.
步骤S21,接收所述区块链网络中的区块;所述区块包括子区块,所述子区块包括智能合约代码和所述智能合约代码对应的数据。所述智能合约代码可以是指具有隐私交易的智能合约的代码,所述智能合约代码对应的数据是指隐私交易的数据。Step S21: Receive a block in the blockchain network; the block includes a sub-block, where the sub-block includes a smart contract code and data corresponding to the smart contract code. The smart contract code may refer to a code of a smart contract having a private transaction, and the data corresponding to the smart contract code refers to data of a private transaction.
步骤S22,通过预先获取的私钥从所述管理合约的数字信封中获取秘钥。Step S22: Obtain a secret key from the digital envelope of the management contract by using a pre-acquired private key.
步骤S23,根据所述秘钥获取所述子区块中的所述智能合约代码,以使所述第一区块链节点执行所述智能合约代码。Step S23, acquiring the smart contract code in the sub-block according to the secret key, so that the first blockchain node executes the smart contract code.
步骤S24,将所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据加密并写入子区块中。Step S24, encrypting and writing the smart contract code and the data generated by the first blockchain node to execute the smart contract code into the sub-block.
步骤S25,将所述子区块写入所述第一区块链节点的区块中。Step S25, writing the sub-block into the block of the first block chain node.
本公开的技术方案基于能够支持智能合约的区块链,例如,以太坊就是一个支持智能合约的区块链,基于以太坊可以实施本公开的技术方案。以太坊本身没有接入限制,需要将以太坊改造为许可链,并在改造的许可链中部署管理合约和智能合约,所述管理合约定义了能够执行智能合约的可信节点,比如,所述管理合约可以定义可信节点能够执行所有的智能合约,特别是包括了具有隐私交易的智能合约;所述管理合约也可以定义只有可信节点能够执行具有隐私交易的智能合约。在图1中,所述可信节点包括第一区块链节点11和第二区块链节点12。The technical solution of the present disclosure is based on a blockchain capable of supporting smart contracts. For example, Ethereum is a blockchain supporting smart contracts, and the technical solution of the present disclosure can be implemented based on Ethereum. Ethereum itself has no access restrictions, and it is necessary to transform Ethereum into a license chain and deploy management contracts and smart contracts in the modified license chain, which define trusted nodes capable of executing smart contracts, for example, The management contract can define that the trusted node is capable of executing all smart contracts, in particular including smart contracts with private transactions; the management contract can also define that only trusted nodes can execute smart contracts with private transactions. In FIG. 1, the trusted node includes a first block chain node 11 and a second block chain node 12.
在该许可链中包括EOA(External Owned Account)账号和合约账号两类。其中,EOA账号包括ExtInfo字段、账号的nonce和账号的余额balance。其中,nonce是防止回放攻击的一个数字,账号每发一个交易,nonce需要加1。原生的以太坊账号没有ExtInfo字段,通过增加该字段可以为用户增加权限的定义,其数据与账号的nonce、余额一起形成账号的属性标识,受区块链的数据防篡改保护。合约账号除了包括EOA账号所拥有的数据项外,还包括智能合约代码和智能合约代码对应的数据,该数据为可信节点执行智能合约代码产生的持久化的数据。本方案需要保护区块链节点的隐私信息包括智能合约代码和智能合约代码对应的数据。Include EOA in the license chain (External Owned Account) Account and contract account. Among them, the EOA account includes the ExtInfo field, the account's nonce, and the account balance balance. Among them, nonce is a number to prevent replay attacks. For every transaction sent by the account, nonce needs to be increased by 1. The original Ethereum account does not have an ExtInfo field. By adding this field, the user can be defined with the permission. The data and the account's nonce and balance form the attribute identifier of the account, and the data of the blockchain is protected against tampering. In addition to the data items owned by the EOA account, the contract account includes data corresponding to the smart contract code and the smart contract code, which is the persistent data generated by the trusted node executing the smart contract code. The privacy information of the protection blockchain node in this solution needs to include the data corresponding to the smart contract code and the smart contract code.
在步骤S21中,所述第一区块链节点从所述区块链网络中接收邻近节点广播的区块。其中,所述子区块里存有隐私交易的数据。如图1所示,一个参与节点13广播自己的区块,第一区块链节点11从接收该参与节点13的区块,假设该区块中包括子区块,所述子区块包括智能合约代码和所述智能合约代码对应的数据。In step S21, the first blockchain node receives a block broadcast by a neighboring node from the blockchain network. Wherein, the data of the privacy transaction is stored in the sub-block. As shown in FIG. 1, one participating node 13 broadcasts its own block, and the first block chain node 11 receives the block of the participating node 13, assuming that the block includes a sub-block, the sub-block includes intelligence. The contract code and the data corresponding to the smart contract code.
所述管理合约可以定义交易接口,通过该交易接口可以向可信节点发送隐私交易;所述管理合约可以定义增加可信节点的接口,如图1所示,可以通过该接口将其中一个参与节点13增加为可信节点;所述管理合约可以定义删除可信节点的接口,如图1所示,可以通过该接口将第二区块链节点12从可信节点中删除,以使第二区块链节点12作为参与节点;所述管理合约还可以定义修改可信节点的接口。以下是管理合约的伪代码示例:The management contract may define a transaction interface through which a privacy transaction may be sent to the trusted node; the management contract may define an interface for adding a trusted node, as shown in FIG. 1, one of the participating nodes may be accessed through the interface 13 is added as a trusted node; the management contract may define an interface for deleting the trusted node, as shown in FIG. 1, the second blockchain node 12 may be deleted from the trusted node through the interface, so that the second region The blockchain node 12 acts as a participating node; the management contract can also define an interface to modify the trusted node. The following is an example of pseudo code for a management contract:
contract SubChainContract {Contract SubChainContract {
    AddMember()       //增加可信节点AddMember() / / Increase the trusted node
    DeleteMember()      //删除可信节点DeleteMember() / / Delete trusted nodes
    ModifyMember()     //修改可信节点ModifyMember() / / Modify the trusted node
    DealTx()            //通过本接口向可信节点发送隐私交易DealTx() / / Send private transactions to trusted nodes through this interface
    SubChainName()      //设置可信节点的名字SubChainName() / / Set the name of the trusted node
}}
DealTx接口是管理合约的交易接口。本公开可以通过改造以太坊的EVM(合约执行虚拟机),使其执行DealTx接口时,完成部署可信节点、启动可信节点进行隐私交易等功能。The DealTx interface is the trading interface for managing contracts. The present disclosure can transform the EVM (Contract Execution Virtual Machine) of Ethereum to perform the function of deploying the trusted node, starting the trusted node, and performing privacy transactions when executing the DealTx interface.
在接收区块后,执行步骤S22,通过预先获取的私钥从所述管理合约的数字信封中获取秘钥。其中,所述秘钥可以是所述可以是通过非对称加密方式加密后放入所述管理合约的数字信封中,所述秘钥可以为对称秘钥,所述私钥为非对称私钥。所述第一区块链节点首先获取所述管理合约的中的数字信封,然后,通过私钥解密加密的秘钥,以获取秘钥。After receiving the block, step S22 is performed to obtain the secret key from the digital envelope of the management contract by using the pre-acquired private key. The secret key may be a digital envelope that may be encrypted by asymmetric encryption and placed in the management contract. The secret key may be a symmetric key, and the private key is an asymmetric private key. The first blockchain node first acquires a digital envelope in the management contract, and then decrypts the encrypted key by a private key to obtain a secret key.
在获取秘钥后,就可以执行步骤S23,根据所述秘钥解密所述子区块中的经过加密的所述智能合约代码,以获取所述智能合约代码。所述第一区块链节点在获取所述智能合约代码后,执行获取的所述智能合约代码,进而产生对应的数据。然后,执行步骤S24,将所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据加密并写入子区块中。After acquiring the secret key, step S23 may be performed, and the encrypted smart contract code in the sub-block is decrypted according to the secret key to obtain the smart contract code. After acquiring the smart contract code, the first blockchain node executes the acquired smart contract code to generate corresponding data. Then, step S24 is executed to encrypt and write the smart contract code and the data generated by the first blockchain node to execute the smart contract code into the sub-block.
其中,步骤S24中对所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据的加密方式包括但不限于以下两种实施方式:The method for encrypting the smart contract code and the first blockchain node to execute the data generated by the smart contract code in step S24 includes but is not limited to the following two implementation manners:
第一种实施方式:如图3所示,图3是根据本公开一示例性实施例提供的一种基于区块链的数据处理方法中加密的流程示意图,所述将所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据加密,可以包括以下步骤。First Embodiment: As shown in FIG. 3, FIG. 3 is a schematic flowchart of encryption in a blockchain-based data processing method according to an exemplary embodiment of the present disclosure, where the smart contract code and The first blockchain node performs data encryption generated by the smart contract code, and may include the following steps.
在步骤S241中,随机生成所述秘钥,并获取本次随机生成的秘钥。In step S241, the secret key is randomly generated, and the randomly generated secret key is acquired.
在步骤S242中,利用本次随机生成的秘钥加密所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据。In step S242, the smart contract code and the data generated by the first blockchain node to execute the smart contract code are encrypted by using the randomly generated secret key.
在步骤S243中,将本次随机生成的秘钥更新到所述管理合约的数字信封中。In step S243, the randomly generated secret key is updated into the digital envelope of the management contract.
采用第一种实施方式,在每次对所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据进行加密之前,第一区块链节点随机生成秘钥,并利用本次随机生成的秘钥,执行步骤S24。由于每次生成秘钥的规则都是随机生成,所以第一区块链节点每次随机生成的秘钥不同,即第一区块链节点每次执行步骤S24所使用的秘钥不同,并且,当前执行步骤S24所使用的秘钥会更新到管理合约的数字信封中,因此,第一区块链节点以往各次执行步骤S24产生的子区块将不能再被解密,能够适用于需要清除历史记录的应用场景。With the first embodiment, the first block chain node randomly generates a secret key each time the smart contract code and the first blockchain node perform data generated by the smart contract code are encrypted, and Step S24 is executed by using the randomly generated secret key. Since the rules for generating the secret key are randomly generated each time, the secret key generated by the first block chain node is different each time, that is, the key used by the first block chain node to perform step S24 is different, and The key used in the current execution of step S24 is updated in the digital envelope of the management contract. Therefore, the sub-blocks generated by the first block chain node in the previous execution of step S24 can no longer be decrypted, and can be applied to the need to clear the history. Recorded application scenarios.
第二种实施方式:利用所述秘钥加密所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据;其中,所述秘钥为所述第一区块链节点第一次对所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据进行加密之前,随机生成的秘钥,并将第一次随机生成的秘钥存入所述数字信封中。a second implementation manner: encrypting, by the secret key, the smart contract code and the first blockchain node to execute data generated by the smart contract code; wherein the secret key is the first blockchain The node generates the randomly generated secret key and encrypts the first randomly generated secret key before the node first encrypts the smart contract code and the first blockchain node to execute the data generated by the smart contract code. In the digital envelope.
采用第二种实施方式,在第一次对所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据进行加密之前,第一区块链节点随机生成秘钥,并利用第一次随机生成的秘钥,执行步骤S24。在第一次随机生成秘钥之后,第一区块链节点以后每次执行步骤S24都使用第一次随机生成的秘钥。也就是说,只要第一区块链节点在第一次对智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据进行加密之前随机生成秘钥,此后都无需再次随机生成秘钥,该第一次随机生成的秘钥固定为第一区块链节点执行步骤S24所使用的秘钥,因而,第一区块链节点每次执行步骤S24所使用的秘钥相同。With the second embodiment, the first blockchain node randomly generates a secret key before encrypting the smart contract code and the data generated by the first blockchain node to execute the smart contract code for the first time. And using the first randomly generated secret key, step S24 is performed. After the first random generation of the secret key, the first blockchain node uses the first randomly generated secret key each time step S24 is performed. That is, as long as the first blockchain node randomly generates the secret key before encrypting the smart contract code and the data generated by the first blockchain node to execute the smart contract code, it is not necessary to randomly The secret key is generated. The first randomly generated secret key is fixed to the first block chain node to execute the secret key used in step S24. Therefore, the first block chain node uses the same secret key used in step S24.
在对所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据加密后,将加密后的智能合约代码和数据写入子区块中,然后执行步骤S25,将所述子区块写入所述第一区块链节点的区块中。After the smart contract code and the first blockchain node perform data encryption generated by the smart contract code, the encrypted smart contract code and data are written into the sub-block, and then step S25 is performed, The sub-block is written in a block of the first block chain node.
图4是根据本公开一示例性实施例提供的一种基于区块链的数据处理方法中子区块写入区块的流程示意图。如图4所示,所述将所述子区块写入所述第一区块链节点的区块中,可以包括以下步骤。FIG. 4 is a schematic flowchart of a sub-block write block in a block chain-based data processing method according to an exemplary embodiment of the present disclosure. As shown in FIG. 4, the writing the sub-block into the block of the first block chain node may include the following steps.
在步骤S251中,根据所述子区块,由所述第一区块链节点所在的设备进行挖矿。In step S251, according to the sub-block, mining is performed by the device where the first block chain node is located.
在步骤S252中,将挖矿完成后的所述子区块写入所述第一区块链节点的区块中。In step S252, the sub-block after the completion of the mining is written into the block of the first block chain node.
为了节约资源,即避免为了子区块而另外分配挖矿的CPU和内存资源,在生成子区块后,由生成该子区块的第一区块链节点所在的设备进行挖矿,挖矿完成后,将所述子区块写入所述第一区块链节点的区块中。进而,所述第一区块链节点可以将该区块通过广播的形式发送给区块链网络中的其它节点。In order to save resources, it is avoided to additionally allocate the CPU and memory resources of the mining for the sub-blocks. After the sub-block is generated, the equipment of the first block chain node that generates the sub-block is used for mining and mining. Upon completion, the sub-block is written into the block of the first block chain node. Further, the first blockchain node may send the block to other nodes in the blockchain network by way of broadcast.
为了使得子区块所在的进程能够独立运行,逻辑上与区块所在的进程没有关系。物理部署上为了方便管理,所述子区块存在于所述区块所在的区块目录的下一级子目录中,且所述子区块所在的子目录与所述区块目录的目录结构一致。目录结构可以如下所示:In order to make the process of the sub-blocks run independently, it is logically irrelevant to the process in which the block is located. For the convenience of management, the sub-block exists in the next-level sub-directory of the block directory in which the block is located, and the sub-directory where the sub-block is located and the directory structure of the block directory Consistent. The directory structure can look like this:
▾mainChain/▾mainChain/
▸ethash/▸ethash/
▾geth/▾geth/
▸chaindata/       //保存区块的数据▸chaindata/ //Save block data
▸ethash/▸ethash/
▸keystore/▸keystore/
▾ subChain_2/▾ subChain_2/
▾geth/▾geth/
▸chaindata/       //保存子区块的数据▸chaindata/ //Save the data of the sub-block
▸ethash/▸ethash/
▸keystore/▸keystore/
区块所在的进程与子区块所在的进程之间从逻辑和物理上完全解耦,所以它们之间的通信是进程间的消息通信。以太坊已经支持RPC(远程过程调用),本方案只需要在RPC的基础上扩展消息即可。The process in which the block is located is completely decoupled logically and physically from the process in which the sub-block is located, so communication between them is message communication between processes. Ethereum already supports RPC (Remote Procedure Call). This solution only needs to extend the message based on RPC.
举例来讲,如图1所示的区块链网络10,该区块链网络10部署的管理合约定义了第一区块链节点11和第二区块链节点12为可信节点,参与节点13为不可信节点,且所述管理合约的数字信封中存有秘钥。以第二区块链节点12发起隐私交易,第一区块链节点11执行隐私交易为例(当然,在其它实施例中,也可以是第一区块链节点11发起隐私交易,第二区块链节点12执行隐私交易):For example, as shown in the blockchain network 10 of FIG. 1, the management contract of the blockchain network 10 defines that the first blockchain node 11 and the second blockchain node 12 are trusted nodes, participating nodes. 13 is an untrusted node, and a key is stored in the digital envelope of the management contract. The second blockchain node 12 initiates a privacy transaction, and the first blockchain node 11 performs a privacy transaction as an example (of course, in other embodiments, the first blockchain node 11 may also initiate a private transaction, the second zone Blockchain node 12 performs a privacy transaction):
第二区块链节点12的区块包括子区块,子区块中包含隐私交易的信息。第二区块链节点12发起隐私交易后,第二区块链节点12的区块通过点对点网络透传给邻近的参与节点13,参与节点13再将第二区块链节点12的区块通过点对点网络透传给邻近的第一区块链节点11。由于参与节点13不是可信节点,因此,参与节点13不能从所述管理合约的数字信封中获取秘钥,即不能解密第二区块链节点12的区块中的子区块;The block of the second block chain node 12 includes a sub-block containing information of a private transaction. After the second blockchain node 12 initiates a privacy transaction, the block of the second blockchain node 12 is transparently transmitted to the neighboring participating node 13 through the peer-to-peer network, and the participating node 13 passes the block of the second blockchain node 12 again. The peer-to-peer network is transparently transmitted to the adjacent first block chain node 11. Since the participating node 13 is not a trusted node, the participating node 13 cannot obtain the secret key from the digital envelope of the management contract, that is, the sub-block in the block of the second blockchain node 12 cannot be decrypted;
第一区块链节点11收到第二区块链节点12的区块后,将第二区块链节点12的区块通过点对点网络透传给邻近节点的同时,通过预先获取的私钥从所述管理合约的数字信封中获取秘钥。第一区块链节点11根据所述秘钥解密所述子区块中经过加密的智能合约代码;接着,第一区块链节点11执行所述智能合约代码,并产生对应的数据;然后,第一区块链节点11将所述智能合约代码和对应的数据加密并打包到子区块中;接着,第一区块链节点11将所述子区块写入所述第一区块链节点的区块中;最后,第一区块链节点11将该区块进行广播。After receiving the block of the second block chain node 12, the first block chain node 11 transparently transmits the block of the second block chain node 12 to the neighboring node through the point-to-point network, and obtains the private key from the pre-acquired The key is obtained in the digital envelope of the management contract. The first block chain node 11 decrypts the encrypted smart contract code in the sub-block according to the secret key; then, the first block chain node 11 executes the smart contract code and generates corresponding data; then, The first blockchain node 11 encrypts and packs the smart contract code and corresponding data into the sub-block; then, the first block chain node 11 writes the sub-block to the first blockchain In the block of the node; finally, the first block chain node 11 broadcasts the block.
可见,通过本公开上述技术方案,通过部署管理合约,所述管理合约可以定义能够执行具有隐私交易的智能合约的可信节点,即可以由所述管理合约定义隐私交易的对象,只有隐私交易的对象能够通过预先获取的私钥从所述管理合约的数字信封中获取秘钥,并通过获取的秘钥来解密子区块中经过加密的隐私交易,并且由于子区块只是区块中独立的一部分,并不影响其它节点验证区块中其它数据的有效性,而子区块数据的有效性只有隐私交易的对象(即可信节点)能够验证。因而,采用上述方法实现了对隐私交易的保护。It can be seen that, through the above technical solution of the present disclosure, by deploying a management contract, the management contract can define a trusted node capable of executing a smart contract with a private transaction, that is, an object of the private transaction can be defined by the management contract, only the private transaction The object can obtain the secret key from the digital envelope of the management contract through the pre-acquired private key, and decrypt the encrypted private transaction in the sub-block by the obtained secret key, and since the sub-block is only independent in the block Part of it does not affect the validity of other data in other nodes to verify the block, and the validity of the sub-block data can only be verified by the object of the private transaction (ie, the node). Thus, the protection of privacy transactions is achieved using the above method.
基于同一发明构思,本公开实施例还提供一种基于区块链的数据处理装置,用于执行本公开实施例提供的上述基于区块链的数据处理方法。图5是根据本公开一示例性实施例提供的一种基于区块链的数据处理装置的框图。如图5所示,基于区块链的数据处理装置500配置于区块链网络中的第一区块链节点,所述区块链网络部署一管理合约,所述管理合约定义了能够执行该智能合约的可信节点,所述可信节点至少包括所述第一区块链节点;该装置500包括:Based on the same inventive concept, an embodiment of the present disclosure further provides a blockchain-based data processing apparatus for performing the above blockchain-based data processing method provided by an embodiment of the present disclosure. FIG. 5 is a block diagram of a blockchain-based data processing apparatus according to an exemplary embodiment of the present disclosure. As shown in FIG. 5, the blockchain-based data processing apparatus 500 is configured in a first blockchain node in a blockchain network, the blockchain network deploying a management contract, the management contract defining the ability to perform the a trusted node of the smart contract, the trusted node including at least the first blockchain node; the apparatus 500 includes:
所述装置包括:The device includes:
接收模块510,被配置为接收所述区块链网络中的区块;所述区块包括子区块,所述子区块包括智能合约代码和所述智能合约代码对应的数据;The receiving module 510 is configured to receive a block in the blockchain network; the block includes a sub-block, where the sub-block includes a smart contract code and data corresponding to the smart contract code;
获取模块520,被配置为通过预先获取的私钥从所述管理合约的数字信封中获取秘钥;The obtaining module 520 is configured to obtain a secret key from the digital envelope of the management contract by using a pre-acquired private key;
解密模块530,被配置为根据所述秘钥获取所述子区块中的所述智能合约代码,以使所述第一区块链节点执行所述智能合约代码;The decryption module 530 is configured to acquire the smart contract code in the sub-block according to the secret key, so that the first blockchain node executes the smart contract code;
第一写入模块540,被配置为将所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据加密并写入子区块中;以及a first write module 540 configured to encrypt and write data generated by the smart contract code and the first blockchain node to the smart contract code into a sub-block;
第二写入模块550,被配置为将所述子区块写入所述第一区块链节点的区块中。The second write module 550 is configured to write the sub-block into a block of the first block chain node.
可选地,如图7所示,所述第二写入模块550包括:Optionally, as shown in FIG. 7, the second writing module 550 includes:
挖矿子模块551,被配置为根据所述子区块,由所述第一区块链节点所在的设备进行挖矿;以及a mining sub-module 551 configured to perform mining by a device in which the first blockchain node is located according to the sub-block;
写入子模块552,被配置为将挖矿完成后的所述子区块写入所述第一区块链节点的区块中。The write sub-module 552 is configured to write the sub-block after the completion of the mining into the block of the first block chain node.
可选地,如图6所示,所述第一写入模块540包括:Optionally, as shown in FIG. 6, the first writing module 540 includes:
获取子模块541,被配置为随机生成所述秘钥,并获取本次随机生成的秘钥;The obtaining submodule 541 is configured to randomly generate the secret key and obtain the randomly generated secret key;
加密子模块542,被配置为利用本次随机生成的秘钥加密所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据;以及The encryption sub-module 542 is configured to encrypt the smart contract code and the data generated by the first blockchain node to execute the smart contract code by using the randomly generated secret key;
更新子模块543,被配置为将本次随机生成的秘钥更新到所述管理合约的数字信封中。The update sub-module 543 is configured to update the randomly generated secret key to the digital envelope of the management contract.
可选地,所述第一写入模块540还被配置为:Optionally, the first writing module 540 is further configured to:
利用所述秘钥加密所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据;Encrypting the smart contract code and the first blockchain node to execute data generated by the smart contract code by using the secret key;
其中,所述秘钥为所述第一区块链节点第一次对所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据进行加密之前,随机生成的秘钥,并将第一次随机生成的秘钥存入所述管理合约的所述数字信封中。The secret key is a secret generated randomly before the first blockchain node encrypts the smart contract code and the data generated by the first blockchain node to execute the smart contract code for the first time. Key, and the first randomly generated secret key is stored in the digital envelope of the management contract.
可选地,所述子区块存在于所述区块所在的区块目录的下一级子目录中,且所述子区块所在的子目录与所述区块目录的目录结构一致。Optionally, the sub-block exists in a sub-directory of a sub-directory of the block directory in which the block is located, and a sub-directory in which the sub-block is located is consistent with a directory structure of the block directory.
可选地,所述管理合约至少定义了交易接口、以及增加、删除、修改可信节点的接口。Optionally, the management contract defines at least a transaction interface, and an interface for adding, deleting, and modifying a trusted node.
可选地,所述私钥为非对称私钥,所述秘钥为对称秘钥,所述秘钥通过非对称加密后放入所述管理合约的数字信封中。Optionally, the private key is an asymmetric private key, and the secret key is a symmetric key, and the secret key is asymmetrically encrypted and placed in a digital envelope of the management contract.
所属本领域的技术人员应该清楚地了解到,为描述的方便和简洁,上述描述的基于区块链的数据处理装置的各模块的具体工作过程,可以参考前述方法实施例中对应的过程,此处不再赘述。It should be clearly understood by those skilled in the art that for the convenience and brevity of the description, the specific working process of each module of the blockchain-based data processing apparatus described above may refer to the corresponding process in the foregoing method embodiment. I won't go into details here.
另外,上述对基于区块链的数据处理装置组成模块进行的划分,仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。并且,各个模块的物理实现也可以有多种方式,本公开对此不做限定。In addition, the division of the block module-based data processing device component module is only a logical function division, and the actual implementation may have another division mode. Moreover, the physical implementation of each module may also be in various manners, which is not limited in this disclosure.
图8是根据一示例性实施例示出的一种电子设备800的框图。如图8所示,该电子设备800可以包括:处理器801,存储器802,多媒体组件803,输入/输出(I/O)接口804,以及通信组件805。FIG. 8 is a block diagram of an electronic device 800, according to an exemplary embodiment. As shown in FIG. 8, the electronic device 800 can include a processor 801, a memory 802, a multimedia component 803, an input/output (I/O) interface 804, and a communication component 805.
其中,处理器801用于控制该电子设备800的整体操作,以完成上述的基于区块链的数据处理方法中的全部或部分步骤。存储器802用于存储各种类型的数据以支持在该电子设备800的操作,这些数据例如可以包括用于在该电子设备800上操作的任何应用程序或方法的指令,以及应用程序相关的数据,例如联系人数据、收发的消息、图片、音频、视频等等。该存储器802可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,例如静态随机存取存储器(Static Random Access Memory,简称SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,简称EEPROM),可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,简称EPROM),可编程只读存储器(Programmable Read-Only Memory,简称PROM),只读存储器(Read-Only Memory,简称ROM),磁存储器,快闪存储器,磁盘或光盘。多媒体组件803可以包括屏幕和音频组件。其中屏幕例如可以是触摸屏,音频组件用于输出和/或输入音频信号。例如,音频组件可以包括一个麦克风,麦克风用于接收外部音频信号。所接收的音频信号可以被进一步存储在存储器802或通过通信组件805发送。音频组件还包括至少一个扬声器,用于输出音频信号。I/O接口804为处理器801和其他接口模块之间提供接口,上述其他接口模块可以是键盘,鼠标,按钮等。这些按钮可以是虚拟按钮或者实体按钮。通信组件805用于该电子设备800与其他设备之间进行有线或无线通信。无线通信,例如Wi-Fi,蓝牙,近场通信(Near Field Communication,简称NFC),2G、3G或4G,或它们中的一种或几种的组合,因此相应的该通信组件805可以包括:Wi-Fi模块,蓝牙模块,NFC模块。The processor 801 is configured to control the overall operation of the electronic device 800 to complete all or part of the above-described blockchain-based data processing method. Memory 802 is used to store various types of data to support operations at the electronic device 800, such as may include instructions for any application or method operating on the electronic device 800, as well as application related data, For example, contact data, sent and received messages, pictures, audio, video, and so on. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read only memory ( Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (Erasable) Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, disk or optical disk. The multimedia component 803 can include a screen and audio components. The screen may be, for example, a touch screen, and the audio component is used to output and/or input an audio signal. For example, the audio component can include a microphone for receiving an external audio signal. The received audio signal may be further stored in memory 802 or transmitted via communication component 805. The audio component also includes at least one speaker for outputting an audio signal. The I/O interface 804 provides an interface between the processor 801 and other interface modules. The other interface modules may be keyboards, mice, buttons, and the like. These buttons can be virtual buttons or physical buttons. Communication component 805 is used for wired or wireless communication between the electronic device 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 can include: Wi-Fi module, Bluetooth module, NFC module.
在一示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,简称ASIC)、数字信号处理器(Digital Signal Processor,简称DSP)、数字信号处理设备(Digital Signal Processing Device,简称DSPD)、可编程逻辑器件(Programmable Logic Device,简称PLD)、现场可编程门阵列(Field Programmable Gate Array,简称FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述的基于区块链的数据处理方法。In an exemplary embodiment, electronic device 800 may be implemented by one or more application specific integrated circuits (Application) Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), on-site A Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the blockchain-based data processing method described above.
在另一示例性实施例中,还提供了一种包括程序指令的计算机可读存储介质,例如包括程序指令的存储器802,上述程序指令可由电子设备800的处理器801执行以完成上述的基于区块链的数据处理方法。In another exemplary embodiment, there is also provided a computer readable storage medium comprising program instructions, such as a memory 802 comprising program instructions executable by processor 801 of electronic device 800 to perform the above-described zone based Block chain data processing method.
以上结合附图详细描述了本公开的优选实施方式,但是,本公开并不限于上述实施方式中的具体细节,在本公开的技术构思范围内,可以对本公开的技术方案进行多种简单变型,这些简单变型均属于本公开的保护范围。The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings. However, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications can be made to the technical solutions of the present disclosure within the scope of the technical idea of the present disclosure. These simple variations are all within the scope of the disclosure.
另外需要说明的是,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合,为了避免不必要的重复,本公开对各种可能的组合方式不再另行说明。It should be further noted that the specific technical features described in the above specific embodiments may be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure is applicable to various possibilities. The combination method will not be described separately.
此外,本公开的各种不同的实施方式之间也可以进行任意组合,只要其不违背本公开的思想,其同样应当视为本公开所公开的内容。In addition, any combination of various embodiments of the present disclosure may be made as long as it does not deviate from the idea of the present disclosure, and should also be regarded as the disclosure of the present disclosure.

Claims (16)

  1. 一种基于区块链的数据处理方法,其特征在于,所述方法应用于区块链网络中的第一区块链节点,所述区块链网络部署一管理合约,所述管理合约定义了能够执行智能合约的可信节点,所述可信节点至少包括所述第一区块链节点;A blockchain-based data processing method, wherein the method is applied to a first blockchain node in a blockchain network, the blockchain network deploying a management contract, and the management contract defines A trusted node capable of executing a smart contract, the trusted node including at least the first blockchain node;
    所述方法包括:The method includes:
    接收所述区块链网络中的区块;所述区块包括子区块,所述子区块包括智能合约代码和所述智能合约代码对应的数据;Receiving a block in the blockchain network; the block includes a sub-block, the sub-block including a smart contract code and data corresponding to the smart contract code;
    通过预先获取的私钥从所述管理合约的数字信封中获取秘钥;Obtaining a secret key from a digital envelope of the management contract by a pre-acquired private key;
    根据所述秘钥获取所述子区块中的所述智能合约代码,以使所述第一区块链节点执行所述智能合约代码;Obtaining the smart contract code in the sub-block according to the secret key, so that the first blockchain node executes the smart contract code;
    将所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据加密并写入子区块中;Encrypting the smart contract code and the data generated by the first blockchain node to execute the smart contract code into a sub-block;
    将所述子区块写入所述第一区块链节点的区块中。The sub-block is written into a block of the first block chain node.
  2. 根据权利要求1所述的方法,其特征在于,所述将所述子区块写入所述第一区块链节点的区块中,包括:The method according to claim 1, wherein the writing the sub-block to the block of the first block chain node comprises:
    根据所述子区块,由所述第一区块链节点所在的设备进行挖矿;Digging according to the device in which the first block chain node is located according to the sub-block;
    将挖矿完成后的所述子区块写入所述第一区块链节点的区块中。The sub-block after the completion of the mining is written into the block of the first block chain node.
  3. 根据权利要求1所述的方法,其特征在于,所述将所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据加密,包括:The method according to claim 1, wherein said encrypting said smart contract code and said first blockchain node to execute data generated by said smart contract code comprises:
    随机生成所述秘钥,并获取本次随机生成的秘钥;Randomly generating the secret key and obtaining the randomly generated secret key;
    利用本次随机生成的秘钥加密所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据;Encrypting the smart contract code and the first blockchain node to execute data generated by the smart contract code by using the randomly generated secret key;
    将本次随机生成的秘钥更新到所述管理合约的数字信封中。The randomly generated secret key is updated into the digital envelope of the management contract.
  4. 根据权利要求1所述的方法,其特征在于,所述将所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据加密,包括:The method according to claim 1, wherein said encrypting said smart contract code and said first blockchain node to execute data generated by said smart contract code comprises:
    利用所述秘钥加密所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据;Encrypting the smart contract code and the first blockchain node to execute data generated by the smart contract code by using the secret key;
    其中,所述秘钥为所述第一区块链节点第一次对所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据进行加密之前,随机生成的秘钥,并将第一次随机生成的秘钥存入所述管理合约的所述数字信封中。The secret key is a secret generated randomly before the first blockchain node encrypts the smart contract code and the data generated by the first blockchain node to execute the smart contract code for the first time. Key, and the first randomly generated secret key is stored in the digital envelope of the management contract.
  5. 根据权利要求1所述的方法,其特征在于,所述子区块存在于所述区块所在的区块目录的下一级子目录中,且所述子区块所在的子目录与所述区块目录的目录结构一致。The method according to claim 1, wherein the sub-block exists in a sub-directory of a sub-directory of the block directory in which the block is located, and a sub-directory in which the sub-block is located is The directory structure of the block directory is the same.
  6. 根据权利要求1所述的方法,其特征在于,所述管理合约至少定义了交易接口、以及增加、删除、修改可信节点的接口。The method of claim 1 wherein said management contract defines at least a transaction interface and an interface for adding, deleting, and modifying trusted nodes.
  7. 根据权利要求1所述的方法,其特征在于,所述私钥为非对称私钥,所述秘钥为对称秘钥,所述秘钥通过非对称加密后放入所述管理合约的数字信封中。The method according to claim 1, wherein the private key is an asymmetric private key, the secret key is a symmetric key, and the secret key is asymmetrically encrypted and placed in a digital envelope of the management contract. in.
  8. 一种基于区块链的数据处理装置,其特征在于,所述装置配置于区块链网络中的第一区块链节点,所述区块链网络部署一管理合约,所述管理合约定义了能够执行智能合约的可信节点,所述可信节点至少包括所述第一区块链节点;A blockchain-based data processing apparatus, wherein the apparatus is configured in a first blockchain node in a blockchain network, the blockchain network deploying a management contract, and the management contract defines A trusted node capable of executing a smart contract, the trusted node including at least the first blockchain node;
    所述装置包括:The device includes:
    接收模块,被配置为接收所述区块链网络中的区块;所述区块包括子区块,所述子区块包括智能合约代码和所述智能合约代码对应的数据;a receiving module, configured to receive a block in the blockchain network; the block includes a sub-block, where the sub-block includes a smart contract code and data corresponding to the smart contract code;
    获取模块,被配置为通过预先获取的私钥从所述管理合约的数字信封中获取秘钥;An obtaining module configured to obtain a secret key from a digital envelope of the management contract by using a pre-acquired private key;
    解密模块,被配置为根据所述秘钥获取所述子区块中的所述智能合约代码,以使所述第一区块链节点执行所述智能合约代码;a decryption module configured to acquire the smart contract code in the sub-block according to the secret key, so that the first blockchain node executes the smart contract code;
    第一写入模块,被配置为将所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据加密并写入子区块中;以及a first write module configured to encrypt and write data generated by the smart contract code and the first blockchain node to the smart contract code into a sub-block;
    第二写入模块,被配置为将所述子区块写入所述第一区块链节点的区块中。A second write module is configured to write the sub-block into a block of the first block chain node.
  9. 根据权利要求8所述的装置,其特征在于,所述第二写入模块括:The apparatus of claim 8 wherein said second write module comprises:
    挖矿子模块,被配置为根据所述子区块,由所述第一区块链节点所在的设备进行挖矿;以及a mining sub-module configured to mine by the device in which the first block chain node is located according to the sub-block;
    写入子模块,被配置为将挖矿完成后的所述子区块写入所述第一区块链节点的区块中。The write submodule is configured to write the sub-block after the completion of the mining into the block of the first block chain node.
  10. 根据权利要求8所述的装置,其特征在于,所述第一写入模块包括:The device according to claim 8, wherein the first writing module comprises:
    获取子模块,被配置为随机生成所述秘钥,并获取本次随机生成的秘钥;Obtaining a sub-module configured to randomly generate the secret key and obtain a randomly generated secret key;
    加密子模块,被配置为利用本次随机生成的秘钥加密所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据;以及An encryption submodule configured to encrypt the smart contract code and the data generated by the first blockchain node to execute the smart contract code using the randomly generated secret key; and
    更新子模块,被配置为将本次随机生成的秘钥更新到所述管理合约的数字信封中。The update submodule is configured to update the randomly generated secret key to the digital envelope of the management contract.
  11. 根据权利要求8所述的装置,其特征在于,所述第一写入模块还被配置为:The apparatus of claim 8, wherein the first write module is further configured to:
    利用所述秘钥加密所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据;Encrypting the smart contract code and the first blockchain node to execute data generated by the smart contract code by using the secret key;
    其中,所述秘钥为所述第一区块链节点第一次对所述智能合约代码和所述第一区块链节点执行所述智能合约代码产生的数据进行加密之前,随机生成的秘钥,并将第一次随机生成的秘钥存入所述管理合约的所述数字信封中。The secret key is a secret generated randomly before the first blockchain node encrypts the smart contract code and the data generated by the first blockchain node to execute the smart contract code for the first time. Key, and the first randomly generated secret key is stored in the digital envelope of the management contract.
  12. 根据权利要求8所述的装置,其特征在于,所述子区块存在于所述区块所在的区块目录的下一级子目录中,且所述子区块所在的子目录与所述区块目录的目录结构一致。The apparatus according to claim 8, wherein the sub-block exists in a sub-directory of a sub-directory of the block directory in which the block is located, and a sub-directory in which the sub-block is located is The directory structure of the block directory is the same.
  13. 根据权利要求8所述的装置,其特征在于,所述管理合约至少定义了交易接口、以及增加、删除、修改可信节点的接口。The apparatus of claim 8 wherein said management contract defines at least a transaction interface and an interface for adding, deleting, and modifying trusted nodes.
  14. 根据权利要求8所述的装置,其特征在于,所述私钥为非对称私钥,所述秘钥为对称秘钥,所述秘钥通过非对称加密后放入所述管理合约的数字信封中。The apparatus according to claim 8, wherein the private key is an asymmetric private key, and the secret key is a symmetric key, and the secret key is asymmetrically encrypted and placed in a digital envelope of the management contract. in.
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,所述计算机程序包括用于执行权利要求1-7任一所述的方法的指令。A computer readable storage medium, characterized in that the computer readable storage medium is for storing a computer program, the computer program comprising instructions for performing the method of any of claims 1-7.
  16. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    权利要求15中所述的计算机可读存储介质;以及The computer readable storage medium of claim 15;
    一个或者多个处理器,用于执行所述计算机可读存储介质中的程序。One or more processors for executing a program in the computer readable storage medium.
PCT/CN2017/120264 2017-12-29 2017-12-29 Block chain-based data processing method and apparatus, storage medium and electronic device WO2019127531A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/120264 WO2019127531A1 (en) 2017-12-29 2017-12-29 Block chain-based data processing method and apparatus, storage medium and electronic device
CN201780002508.7A CN108235772B (en) 2017-12-29 2017-12-29 Data processing method and device based on block chain, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/120264 WO2019127531A1 (en) 2017-12-29 2017-12-29 Block chain-based data processing method and apparatus, storage medium and electronic device

Publications (1)

Publication Number Publication Date
WO2019127531A1 true WO2019127531A1 (en) 2019-07-04

Family

ID=62643248

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/120264 WO2019127531A1 (en) 2017-12-29 2017-12-29 Block chain-based data processing method and apparatus, storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN108235772B (en)
WO (1) WO2019127531A1 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110399184A (en) * 2019-07-31 2019-11-01 中国工商银行股份有限公司 The execution method and device of intelligent contract in block chain
CN110750541A (en) * 2019-10-18 2020-02-04 天津理工大学 Data storage indexing system and method based on block chain
CN110827168A (en) * 2019-09-26 2020-02-21 国网山东省电力公司菏泽供电公司 Electric quantity data processing method based on block chain and electronic equipment
CN110928951A (en) * 2019-11-26 2020-03-27 天津理工大学 Data sharing and arbitration method based on block chain
CN111262692A (en) * 2020-01-08 2020-06-09 网络通信与安全紫金山实验室 Key distribution system and method based on block chain
CN111585764A (en) * 2020-04-28 2020-08-25 浙江大学宁波理工学院 System for block chain on terminal equipment data
CN112070608A (en) * 2020-08-20 2020-12-11 财付通支付科技有限公司 Information processing method, information processing apparatus, information processing medium, and electronic device
CN112073467A (en) * 2020-08-11 2020-12-11 东软集团股份有限公司 Block chain-based data transmission method and device, storage medium and electronic equipment
CN112148278A (en) * 2020-09-25 2020-12-29 模视科技(北京)有限公司 Visual block chain intelligent contract framework and intelligent contract development and deployment method
CN112634040A (en) * 2020-12-25 2021-04-09 中国农业银行股份有限公司 Data processing method and device
CN113128999A (en) * 2019-12-31 2021-07-16 航天信息股份有限公司 Block chain privacy protection method and device
CN113297614A (en) * 2021-05-13 2021-08-24 江苏南工科技集团有限公司 Data encryption authentication and security analysis method based on block chain technology

Families Citing this family (41)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11240035B2 (en) * 2017-05-05 2022-02-01 Jeff STOLLMAN Systems and methods for extending the utility of blockchains through use of related child blockchains
CN109063498A (en) * 2018-07-27 2018-12-21 深圳市新名泽科技有限公司 Digital asset storage method, device, restoration methods and device
CN109064172A (en) * 2018-07-27 2018-12-21 深圳市新名泽科技有限公司 Cipher key processing method, device and block catenary system
CN109040133A (en) * 2018-09-27 2018-12-18 上海点融信息科技有限责任公司 The method, apparatus and storage medium of intelligent contract are installed in block chain network
CN111008222A (en) * 2018-10-08 2020-04-14 顺丰科技有限公司 Data state query method and device
CN111833189A (en) * 2018-10-26 2020-10-27 创新先进技术有限公司 Data processing method and device
CN111199044B (en) * 2018-11-20 2022-06-17 中国电信股份有限公司 Data storage method, device and storage medium
CN111899102A (en) * 2018-11-30 2020-11-06 创新先进技术有限公司 Method for realizing privacy protection in block chain
CN109756496B (en) * 2018-12-29 2022-02-01 播金信息科技(上海)有限公司 Data network transmission security protection method based on DNA characteristics and block chains and computer readable storage medium
CN110008736A (en) * 2019-01-31 2019-07-12 阿里巴巴集团控股有限公司 The method and node, storage medium of secret protection are realized in block chain
CN109886682B (en) * 2019-01-31 2020-10-23 创新先进技术有限公司 Method, node and storage medium for realizing contract calling in block chain
CN111767555A (en) * 2019-01-31 2020-10-13 阿里巴巴集团控股有限公司 Method for realizing privacy protection in block chain, node and storage medium
CN111612462B (en) * 2019-02-19 2023-08-22 创新先进技术有限公司 Method, node and storage medium for implementing privacy protection in blockchain
CN110032885B (en) * 2019-02-19 2020-03-06 阿里巴巴集团控股有限公司 Method, node and storage medium for implementing privacy protection in block chain
CN110009499B (en) * 2019-04-17 2021-05-11 北京八分量信息科技有限公司 Transaction method and system based on block chain and hidden address
CN110263090B (en) * 2019-05-20 2021-04-27 创新先进技术有限公司 Receipt storage method and node with multiple types of dimensions
WO2020233421A1 (en) * 2019-05-20 2020-11-26 创新先进技术有限公司 Object-level receipt storage method and node based on code marking
CN110245946B (en) * 2019-05-20 2021-04-27 创新先进技术有限公司 Receipt storage method and node combining code labeling and multi-type dimensionality
CN110264195B (en) * 2019-05-20 2021-03-16 创新先进技术有限公司 Receipt storage method and node combining code marking with transaction and user type
CN110263544B (en) * 2019-05-20 2021-04-27 创新先进技术有限公司 Receipt storage method and node combining transaction type and judgment condition
CN110223172B (en) * 2019-05-20 2021-04-13 创新先进技术有限公司 Conditional receipt storage method and node combining code labeling and type dimension
CN110263089B (en) * 2019-05-20 2021-05-04 创新先进技术有限公司 Receipt storage method and node combining conditional restrictions of transaction and event types
CN110266644B (en) * 2019-05-20 2021-04-06 创新先进技术有限公司 Receipt storage method and node combining code marking and transaction types
CN110264198B (en) * 2019-05-20 2021-04-06 创新先进技术有限公司 Conditional receipt storage method and node combining code labeling and transaction type
CN110245945B (en) * 2019-05-20 2021-03-23 创新先进技术有限公司 Receipt storage method and node combining code marking and user type
CN110245489B (en) * 2019-05-20 2021-04-27 创新先进技术有限公司 Receipt storage method, node and system based on plaintext log
CN110263091B (en) * 2019-05-20 2021-06-04 创新先进技术有限公司 Receipt storage method and node combining code marking with user and event type
CN110245506B (en) * 2019-05-30 2020-09-01 阿里巴巴集团控股有限公司 Intelligent contract management method and device based on block chain and electronic equipment
CN110263547B (en) * 2019-05-31 2021-07-20 创新先进技术有限公司 Method and device for realizing dynamic encryption based on contract state modification sequence
CN110210209A (en) * 2019-06-06 2019-09-06 中星技术股份有限公司 The method and apparatus for managing picture pick-up device
US11251963B2 (en) 2019-07-31 2022-02-15 Advanced New Technologies Co., Ltd. Blockchain-based data authorization method and apparatus
US11057189B2 (en) 2019-07-31 2021-07-06 Advanced New Technologies Co., Ltd. Providing data authorization based on blockchain
US11252166B2 (en) 2019-07-31 2022-02-15 Advanced New Technologies Co., Ltd. Providing data authorization based on blockchain
CN110457875B (en) * 2019-07-31 2021-04-27 创新先进技术有限公司 Data authorization method and device based on block chain
CN110717203B (en) * 2019-09-25 2021-04-27 支付宝(杭州)信息技术有限公司 Method and device for realizing privacy block chain based on FPGA
CN110766078A (en) * 2019-10-24 2020-02-07 广东工业大学 Picture verification method based on block chain in Internet of vehicles environment
US11310051B2 (en) 2020-01-15 2022-04-19 Advanced New Technologies Co., Ltd. Blockchain-based data authorization method and apparatus
CN111368333A (en) * 2020-03-26 2020-07-03 国金公用通链(海南)信息科技有限公司 Universal block chain key encapsulation technology
CN113034140B (en) * 2021-03-17 2023-07-18 深圳壹账通智能科技有限公司 Method, system, equipment and storage medium for realizing intelligent contract encryption
CN113472512A (en) * 2021-06-10 2021-10-01 东软集团股份有限公司 Intelligent contract execution method and device, storage medium and electronic equipment
US20230145340A1 (en) * 2021-11-08 2023-05-11 Adobe Inc. Distributing and synchronizing encrypted data for multi-regional accessibility

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106559211A (en) * 2016-11-22 2017-04-05 中国电子科技集团公司第三十研究所 Secret protection intelligence contract method in a kind of block chain
CN107103473A (en) * 2017-04-27 2017-08-29 电子科技大学 A kind of intelligent contract implementation method based on block chain
CN107273759A (en) * 2017-05-08 2017-10-20 上海点融信息科技有限责任公司 Method, equipment and computer-readable recording medium for protecting block chain data
CN107342858A (en) * 2017-07-05 2017-11-10 武汉凤链科技有限公司 A kind of intelligent contract guard method and system based on trusted context
CN107464118A (en) * 2017-08-16 2017-12-12 济南浪潮高新科技投资发展有限公司 A kind of data trade method based on block chain intelligence contract

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108027867A (en) * 2015-07-14 2018-05-11 Fmr有限责任公司 Calculate efficient transfer accounts processing, audit and searcher, method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106559211A (en) * 2016-11-22 2017-04-05 中国电子科技集团公司第三十研究所 Secret protection intelligence contract method in a kind of block chain
CN107103473A (en) * 2017-04-27 2017-08-29 电子科技大学 A kind of intelligent contract implementation method based on block chain
CN107273759A (en) * 2017-05-08 2017-10-20 上海点融信息科技有限责任公司 Method, equipment and computer-readable recording medium for protecting block chain data
CN107342858A (en) * 2017-07-05 2017-11-10 武汉凤链科技有限公司 A kind of intelligent contract guard method and system based on trusted context
CN107464118A (en) * 2017-08-16 2017-12-12 济南浪潮高新科技投资发展有限公司 A kind of data trade method based on block chain intelligence contract

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110399184B (en) * 2019-07-31 2023-04-25 中国工商银行股份有限公司 Method and device for executing intelligent contracts in block chain
CN110399184A (en) * 2019-07-31 2019-11-01 中国工商银行股份有限公司 The execution method and device of intelligent contract in block chain
CN110827168A (en) * 2019-09-26 2020-02-21 国网山东省电力公司菏泽供电公司 Electric quantity data processing method based on block chain and electronic equipment
CN110750541A (en) * 2019-10-18 2020-02-04 天津理工大学 Data storage indexing system and method based on block chain
CN110750541B (en) * 2019-10-18 2023-05-02 天津理工大学 Block chain-based data storage indexing system and method
CN110928951A (en) * 2019-11-26 2020-03-27 天津理工大学 Data sharing and arbitration method based on block chain
CN113128999A (en) * 2019-12-31 2021-07-16 航天信息股份有限公司 Block chain privacy protection method and device
CN113128999B (en) * 2019-12-31 2024-04-12 航天信息股份有限公司 Block chain privacy protection method and device
CN111262692B (en) * 2020-01-08 2023-02-28 网络通信与安全紫金山实验室 Key distribution system and method based on block chain
CN111262692A (en) * 2020-01-08 2020-06-09 网络通信与安全紫金山实验室 Key distribution system and method based on block chain
CN111585764A (en) * 2020-04-28 2020-08-25 浙江大学宁波理工学院 System for block chain on terminal equipment data
CN112073467A (en) * 2020-08-11 2020-12-11 东软集团股份有限公司 Block chain-based data transmission method and device, storage medium and electronic equipment
CN112070608A (en) * 2020-08-20 2020-12-11 财付通支付科技有限公司 Information processing method, information processing apparatus, information processing medium, and electronic device
CN112070608B (en) * 2020-08-20 2024-03-19 财付通支付科技有限公司 Information processing method, device, medium and electronic equipment
CN112148278A (en) * 2020-09-25 2020-12-29 模视科技(北京)有限公司 Visual block chain intelligent contract framework and intelligent contract development and deployment method
CN112634040A (en) * 2020-12-25 2021-04-09 中国农业银行股份有限公司 Data processing method and device
CN112634040B (en) * 2020-12-25 2023-08-18 中国农业银行股份有限公司 Data processing method and device
CN113297614A (en) * 2021-05-13 2021-08-24 江苏南工科技集团有限公司 Data encryption authentication and security analysis method based on block chain technology

Also Published As

Publication number Publication date
CN108235772A (en) 2018-06-29
CN108235772B (en) 2021-04-09

Similar Documents

Publication Publication Date Title
WO2019127531A1 (en) Block chain-based data processing method and apparatus, storage medium and electronic device
WO2021013245A1 (en) Data key protection method and system, electronic device and storage medium
US20200153808A1 (en) Method and System for an Efficient Shared-Derived Secret Provisioning Mechanism
JP2020528224A (en) Secure execution of smart contract operations in a reliable execution environment
CN111797415A (en) Block chain based data sharing method, electronic device and storage medium
Ullah et al. Towards blockchain-based secure storage and trusted data sharing scheme for IoT environment
WO2019214070A1 (en) Encryption method for user communication on block chain, apparatus, terminal device and storage medium
US8059818B2 (en) Accessing protected data on network storage from multiple devices
CN111181720A (en) Service processing method and device based on trusted execution environment
TW202021306A (en) Remote attestation method and apparatus for trusted application program, and electronic device
US11616636B2 (en) Hash updating methods and apparatuses of blockchain integrated station
JP2020521343A (en) Field Programmable Gate Array-Based Reliable Execution Environment for Use in Blockchain Networks
TW201814496A (en) Data storage method, data acquisition method, device and system wherein security of both the data key and the data ciphertext is ensured because the data key shared by the first device and the second device is protected under the storage root key of the respective trusted platform modules
JP2019522412A (en) Registration / authorization method, apparatus and system
US10880100B2 (en) Apparatus and method for certificate enrollment
JP2012050066A (en) Secure field-programmable gate array (fpga) architecture
CN106027503A (en) Cloud storage data encryption method based on TPM
CN110445840B (en) File storage and reading method based on block chain technology
CN116601912A (en) Post-secret provisioning service providing encryption security
US11783091B2 (en) Executing entity-specific cryptographic code in a cryptographic coprocessor
CN111181944B (en) Communication system, information distribution method, device, medium, and apparatus
WO2021163960A1 (en) Blockchain-based random number generation method and system, and storage medium
CN113438205A (en) Block chain data access control method, node and system
JP4731034B2 (en) Copyright protection system, encryption device, decryption device, and recording medium
KR102282788B1 (en) Blockchain system for supporting change of plain text data included in transaction

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17936872

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 11.11.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17936872

Country of ref document: EP

Kind code of ref document: A1