WO2021017433A1 - 基于智能合约的数据授权方法及装置 - Google Patents

基于智能合约的数据授权方法及装置 Download PDF

Info

Publication number
WO2021017433A1
WO2021017433A1 PCT/CN2020/072038 CN2020072038W WO2021017433A1 WO 2021017433 A1 WO2021017433 A1 WO 2021017433A1 CN 2020072038 W CN2020072038 W CN 2020072038W WO 2021017433 A1 WO2021017433 A1 WO 2021017433A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
authorization
smart contract
transaction
user
Prior art date
Application number
PCT/CN2020/072038
Other languages
English (en)
French (fr)
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 US16/779,228 priority Critical patent/US11057189B2/en
Publication of WO2021017433A1 publication Critical patent/WO2021017433A1/zh
Priority to US17/185,522 priority patent/US20210184836A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • One or more embodiments of this specification relate to the field of blockchain technology, and in particular to a method and device for data authorization based on smart contracts.
  • Blockchain technology (also known as distributed ledger technology) is a de-neutralized distributed database technology, which has the characteristics of decentralization, openness and transparency, non-tampering, trustworthiness, etc., and is suitable for many In application scenarios with high demand for data reliability.
  • one or more embodiments of this specification provide a data authorization method and device based on smart contracts.
  • a data authorization method based on smart contracts including:
  • the blockchain node receives the data acquisition transaction submitted by the data user, and the data acquisition transaction is used to request the acquisition of target data held by the data owner;
  • the blockchain node executes the data authorization smart contract called by the data acquisition transaction, and the data authorization smart contract is used to obtain the target data when it is confirmed that the data user has been authorized, so that the data user Obtain the target data and/or an operation result obtained after performing a preset operation on the target data.
  • a data authorization device based on smart contract including:
  • the receiving unit enables the blockchain node to receive the data acquisition transaction submitted by the data user, and the data acquisition transaction is used to request the acquisition of target data held by the data owner;
  • the execution unit enables the blockchain node to execute the data authorization smart contract called by the data acquisition transaction, and the data authorization smart contract is used to obtain the target data when it is confirmed that the data user has been authorized, so that all The data user obtains the target data and/or an operation result obtained after performing a preset operation on the target data.
  • an electronic device including:
  • a memory for storing processor executable instructions
  • the processor implements the method according to the first aspect by running the executable instruction.
  • a computer-readable storage medium is provided, and computer instructions are stored thereon, which, when executed by a processor, implement the steps of the method described in the first aspect.
  • Fig. 1 is a schematic diagram of an example environment provided by an example embodiment.
  • Fig. 2 is a schematic diagram of a conceptual architecture provided by an exemplary embodiment.
  • Fig. 3 is a flowchart of a data authorization method based on a smart contract provided by an exemplary embodiment.
  • Fig. 4 is a schematic diagram of an end-to-end data authorization based on a blockchain network provided by an exemplary embodiment.
  • Fig. 5 is an interactive flowchart of end-to-end data authorization based on a blockchain network according to an exemplary embodiment.
  • Fig. 6 is a schematic structural diagram of a device provided by an exemplary embodiment.
  • Fig. 7 is a block diagram of a data authorization device based on a smart contract provided by an exemplary embodiment.
  • the steps of the corresponding method are not necessarily executed in the order shown and described in this specification.
  • the method includes more or fewer steps than described in this specification.
  • a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may also be combined into a single step in other embodiments. description.
  • Fig. 1 is a schematic diagram of an example environment provided by an example embodiment.
  • the example environment 100 allows entities to participate in the blockchain network 102.
  • the blockchain network 102 may be a public, private, or consortium blockchain network.
  • the example environment 100 may include computing devices 104, 106, 108, 110, 112 and a network 114; in an embodiment, the network 114 may include a local area network (LAN), a wide area network (Wide Area Network, WAN), the Internet, or It is combined and connected to websites, user devices (such as computing devices) and back-end systems.
  • the network 114 may be accessed through wired and/or wireless communication.
  • the computing devices 106, 108 may be nodes of a cloud computing system (not shown), or each computing device 106, 108 may be a separate cloud computing system, including being interconnected by a network and acting as a distributed processing system Multiple computers at work.
  • the computing devices 104-108 may run any appropriate computing system to enable them to serve as nodes in the blockchain network 102; for example, the computing devices 104-108 may include, but are not limited to, servers, desktop computers, and notebooks. Computers, tablet computing devices and smartphones. In an embodiment, the computing devices 104 to 108 may be attributed to related entities and used to implement corresponding services. For example, the service may be used to manage transactions between a certain entity or multiple entities.
  • the computing devices 104-108 respectively store the blockchain ledger corresponding to the blockchain network 102.
  • the computing device 104 may be (or include) a web server for providing browser functions, and the web server may provide visual information related to the blockchain network 102 based on the network 114.
  • the computing device 104 may not participate in block verification, but monitor the blockchain network 102 to determine when other nodes (for example, computing devices 106-108 may include) reached a consensus, and generate corresponding blocks accordingly Chain visual user interface.
  • the computing device 104 may receive a request initiated by a client device (such as the computing device 110 or the computing device 112) for the blockchain visualization user interface.
  • a client device such as the computing device 110 or the computing device 112
  • the nodes of the blockchain network 102 can also serve as client devices.
  • a user of the computing device 108 can use a browser running on the computing device 108 to send the aforementioned request to the computing device 104.
  • the computing device 104 may generate a blockchain visual user interface (such as a web page) based on the stored blockchain ledger, and send the generated blockchain visual user interface to the requesting client device.
  • a blockchain visual user interface such as a web page
  • the request for the blockchain visualization user interface may include user authorization information, before the blockchain visualization user interface is generated and sent to the requesting client device ,
  • the computing device 104 may verify the user authorization information, and return to the corresponding blockchain visual user interface after the verification is passed.
  • the blockchain visual user interface may be displayed on the client device (for example, it may be displayed in the user interface 116 shown in FIG. 1).
  • the display content of the user interface 116 can also be updated accordingly.
  • the user's interaction with the user interface 116 may lead to requests for other user interfaces, such as displaying block lists, block details, transaction lists, transaction details, account lists, account details, contract lists, contract details, or user requests for blocks Search results pages generated by the implementation of the search on the chain network.
  • Fig. 2 is a schematic diagram of a conceptual architecture provided by an exemplary embodiment.
  • the conceptual architecture 200 includes a physical layer 202, a managed service layer 204 and a blockchain network layer 206.
  • the entity layer 202 may include three entities: entity 1, entity 2 and entity 3, and each entity has its own transaction management system 208.
  • the managed service layer 204 may include an interface 210 corresponding to each transaction management system 208.
  • each transaction management system 208 uses a protocol (such as Hypertext Transfer Protocol Security (HTTPS), etc.) to communicate with the respective interface 210 through a network (such as the network 114 in FIG. 1).
  • HTTPS Hypertext Transfer Protocol Security
  • each interface 210 may provide a communication connection between its corresponding transaction management system 208 and the blockchain network layer 206; more specifically, the interface 210 may be connected to the blockchain network of the blockchain network layer 206 212 communications.
  • the communication between the interface 210 and the blockchain network layer 206 can be implemented using remote procedure calls (RPCs).
  • the interface 210 may provide an API interface for accessing the blockchain network 212 to the transaction management system 208.
  • the blockchain network 212 is provided in the form of a peer-to-peer network.
  • the peer-to-peer network includes a plurality of nodes 214, each of which is used to persist the blockchain ledger 216 formed by the blockchain data; Wherein, only one block chain ledger 216 is shown in FIG. 2, but there may be multiple block chain ledger 216 or copies thereof in the block chain network 212.
  • each node 214 can maintain a block chain separately Ledger 216 or a copy thereof.
  • a transaction in a narrow sense refers to a value transfer issued by a user to the blockchain; for example, in a traditional Bitcoin blockchain network, a transaction can be a transfer initiated by the user in the blockchain.
  • a transaction refers to a piece of business data with business intent released by a user to the blockchain; for example, an operator can build a consortium chain based on actual business needs, and rely on the consortium chain to deploy some other types that are not related to value transfer Online business (for example, renting business, vehicle dispatching business, insurance claims business, credit service, medical service, etc.), and in this kind of alliance chain, the transaction can be a business with business intent issued by the user in the alliance chain Message or business request.
  • value transfer Online business for example, renting business, vehicle dispatching business, insurance claims business, credit service, medical service, etc.
  • Blockchain is generally divided into three types: Public Blockchain, Private Blockchain and Consortium Blockchain.
  • the most decentralized one is the public chain.
  • the public chain is represented by Bitcoin and Ethereum. Participants who join the public chain can read the data records on the chain, participate in transactions, and compete for the accounting rights of new blocks. Moreover, each participant (ie, node) can freely join and exit the network, and perform related operations.
  • the private chain is the opposite.
  • the write permission of the network is controlled by an organization or institution, and the data read permission is regulated by the organization.
  • the private chain can be a weakly centralized system with strict restrictions and few participating nodes. This type of blockchain is more suitable for internal use by specific institutions.
  • the alliance chain is a block chain between the public chain and the private chain, which can achieve "partial decentralization".
  • Each node in the alliance chain usually has a corresponding entity or organization; participants are authorized to join the network and form a stakeholder alliance to jointly maintain the operation of the blockchain.
  • a smart contract on the blockchain is a contract that can be triggered and executed by a transaction on the blockchain system.
  • Smart contracts can be defined in the form of codes.
  • EVM Ethereum Virtual Machine
  • Each Ethereum node can run EVM.
  • EVM is a Turing complete virtual machine, which means that various complex logic can be implemented through it. Users publish and call smart contracts in Ethereum run on the EVM.
  • Fig. 3 is a flowchart of a data authorization method based on a smart contract provided by an exemplary embodiment. As shown in Figure 3, this method is applied to blockchain nodes and can include the following steps:
  • Step 302 The blockchain node receives the data acquisition transaction submitted by the data user, and the data acquisition transaction is used to request the acquisition of target data held by the data owner.
  • the data user can directly generate a data acquisition transaction on the aforementioned blockchain node; or, the data user can generate a data acquisition transaction on the client, and send the data acquisition transaction to the aforementioned blockchain node through the client; or , The data user can send the data acquisition transaction to another blockchain node after generating the data acquisition transaction on the client, and the other blockchain node sends the data acquisition transaction to the aforementioned blockchain node .
  • the data acquisition transaction will be transmitted to all blockchain nodes in the blockchain network, and each blockchain node will execute the data acquisition transaction.
  • a blockchain network that uses consensus algorithms such as Proof of Work (POW), Proof of Stake (POS), and Delegated Proof of Stake (DPOS), they compete for the right to bookkeeping. All nodes can execute the blockchain transaction after receiving the blockchain transaction. One of the nodes competing for the right to bookkeeping may win this round and become the bookkeeping node.
  • the accounting node can package the data acquisition transaction with other transactions and generate a new block, and send the generated new block to other nodes for consensus.
  • the nodes with the right to book accounts have been agreed before this round of bookkeeping. Therefore, after the above-mentioned blockchain node receives the data acquisition transaction, if it is not the accounting node of this round, it can send the data acquisition transaction to the accounting node.
  • accounting nodes which can be the above-mentioned blockchain nodes
  • the data acquisition transaction can be executed. After the accounting node packages the data acquisition transaction (or other transactions together) and generates a new block, the generated new block or block header is sent to other nodes for consensus.
  • the accounting nodes of this round can package the data acquisition transaction and generate new blocks, and Send the header of the generated new block to other nodes for consensus. If other nodes receive the block and verify that there is no problem, they can append the new block to the end of the original block chain to complete the accounting process and reach a consensus; among them, if the data acquisition transaction is used to call The data authorization smart contract completes the call and execution of the data authorization smart contract. In the process of other nodes verifying the new block or block header sent by the accounting node, the data acquisition transaction in the block may also be executed.
  • Step 304 The blockchain node executes the data authorization smart contract called by the data acquisition transaction, and the data authorization smart contract is used to obtain the target data when it is confirmed that the data user has been authorized, so that the The data user obtains the target data and/or the calculation result obtained after performing a preset calculation on the target data.
  • the data acquisition transaction may include the above-mentioned contract address in the to field of the data acquisition transaction to call the data authorization smart contract.
  • each blockchain node receives the data acquisition transaction, reads the to field of the data acquisition transaction, and calls the above data authorization Smart contract specifically refers to reading the code of the data authorization smart contract into the EVM on the blockchain node for execution.
  • the data acquisition transaction can include information about the target data, such as the hash value of the target data or any other description information, as long as it can point to the target data.
  • the target data information can be included in the data field of the data acquisition transaction; when the data acquisition transaction calls the data authorization smart contract, the content in the data field can be used as the input information of the data authorization smart contract.
  • the data authorization smart contract may include a list of corresponding authorized parties to record the information of the authorized objects for the data held by the data owner, that is, the information of the authorized party. Then, if the data authorization smart contract confirms that the data user is in the list of authorized parties, it can be confirmed that the data user has been authorized. Based on the management method of the authorized party list, all data held by the data owner can be authorized at one time, and even if the data held by the data owner increases or decreases, it will not affect the content of the authorized party list. That is, it can be compatible with the update of the data held by the data owner.
  • the data authorization smart contract When the data authorization smart contract is created, the information of the authorized party list can be written into the contract code, so that the content of the authorized party list cannot be changed. Then, the data authorization smart contract may need to be replaced or versioned to update the list of authorized parties.
  • the data authorization smart contract can have one or more corresponding states, and the value of the one or more states can be maintained on the blockchain node.
  • the one or more states The status is equivalent to the above list of authorized parties; among them, the data owner can submit a blockchain transaction to the blockchain network, and the blockchain transaction can call the authorization interface defined in the data authorization smart contract to make the list of authorized parties
  • the content can be updated after the data authorization smart contract is executed, without the need to replace or iterate the data authorization smart contract.
  • the data authorization smart contract can call another smart contract, and the code or status of the other smart contract can be used to record the list of authorized parties; where, if the list of authorized parties is unalterably written into the code of the other smart contract , Then when you need to update the list of authorized parties, you can create a new smart contract, the code of the new smart contract contains the updated list of authorized parties, and then the data authorized smart contract calls the contract address of the new smart contract.
  • the called contract address can be used as a state of the data authorization smart contract, and the value of this state can be changed); and if the list of authorized parties is written into the state corresponding to the other smart contract, then as described above You only need to update the value of the state to update the list of authorized parties, and the contract address called by the data authorization smart contract does not need to be updated.
  • the contract address can either be fixed into the code of the data authorization smart contract, or Can be written into a state of the data authorization smart contract.
  • the data user can temporarily request authorization from the data owner. For example, a data user can submit an authorization request transaction to the blockchain network, and the authorization request transaction calls the request interface defined in the above data authorization smart contract, so that the blockchain node can execute the authorization request transaction by calling the data authorization
  • the request interface defined in the smart contract enables the data authorization smart contract to write authorization request events in the transaction log. Then, the data owner can respond to the authorization request event written in the transaction log through the event monitoring callback mechanism.
  • the data owner can submit an authorization confirmation transaction to the blockchain network, and the authorization confirmation transaction calls the authorization interface defined in the data authorization smart contract above to make the blockchain node execute the authorization
  • the data authorization smart contract can mark the data user as authorized by calling the authorization interface defined in the data authorization smart contract. Mark the data user as authorized.
  • the data authorization smart contract only confirms that the data user’s operation is authorized, so that the data user has obtained long-term authorization.
  • the authorization smart contract can affect the data acquisition request of the data user this time, but after this data acquisition transaction is completed, the data user will lose the authorization and need to request authorization from the data owner again.
  • the list of authorized parties is a long-term authorization, but it does not necessarily mean a permanent authorization.
  • the data owner can update the list of authorized parties to remove one or more authorized parties and make them lose their authorization; for another example, each authorized party in the list of authorized parties can have a certain value of remaining authorization time and/or remaining Authorization times. When the remaining authorization time or remaining authorization times are cleared, the corresponding authorized party can be automatically removed from the authorized party list, which is equivalent to the "aging" mechanism implemented for the authorized parties in the authorized party list.
  • the data user can include the target data information in the authorization request transaction, and the target data information can be written into the authorization request event in the transaction log, so that the data owner knows the authorization scope requested by the data user; if The authorization request transaction does not contain any data information, which means that the data user requests authorization for all data held by the data owner.
  • the data owner can add information about the target data in the authorization confirmation transaction to indicate that the target data is authorized to the data user; if the authorization confirmation transaction submitted by the data owner does not contain any data information, then It indicates that all data users have opened all data authorizations.
  • the information of the target data contained in the data acquisition transaction of the data user may be inconsistent with the authorization scope (that is, the authorization for which data has been obtained), which may cause the data acquisition transaction to not be executed normally. Or the data authorization smart contract cannot successfully obtain the target data specified in the data acquisition transaction.
  • the target data can be directly provided to the data user.
  • the data authorization smart contract can write the target data into the transaction log of the data acquisition transaction, so that the data user can obtain the target data by monitoring the transaction log; among them, the blockchain node can encrypt the target data to make the encryption
  • the data user holding the key can read and decrypt the encrypted target data to obtain the target data, while irrelevant users cannot decrypt the encrypted target data. This not only ensures that the data user obtains the target data, but also prevents the target data from being obtained by unrelated persons when it is recorded in the transaction log in plain text, avoiding the leakage of the target data, and protecting the rights of the data owner.
  • the data authorization smart contract After the data authorization smart contract obtains the target data, it can perform a preset calculation on the target data, and the calculation result is provided to the data user.
  • the preset calculation can be any calculation that the data user wants to use, and this specification does not limit it.
  • the operation rules of the preset operation can be predefined in the data authorization smart contract; among them, the data authorization smart contract can define one or more operation rules, especially when there are multiple operation rules, the data can be The user specifies the operation rule to be adopted in the data acquisition transaction (for example, adding the identifier corresponding to the operation rule in the data field of the data acquisition transaction, etc.).
  • the operation rule of the preset operation may be transferred from the data acquisition transaction to the data authorization smart contract.
  • the operation rule of the preset operation may be written into the data field of the data acquisition transaction, and then passed into the data authorization smart contract.
  • the target data obtains the corresponding calculation result through the above-mentioned preset calculation, if the data user cannot infer the value of the target data from the calculation result, it can avoid data use while meeting the data acquisition needs of the data user
  • the party directly obtains the target data to prevent the data user from leaking the target data and infringing on the rights of the data owner, and to ensure that the target data is always held only by the data owner.
  • the data owner can hold data with a relatively low privacy level and data with a relatively high privacy level, that is, data with a low privacy level and data with a high privacy level; accordingly, when the target data belongs to a low privacy level, The target data can be provided to the data user, that is, the data owner does not pay attention to whether the low privacy level data will be leaked, and when the target data belongs to the high privacy level, the target data needs to be subjected to preset calculations to make the corresponding The result of the calculation is provided to the data user to ensure that high-privacy data will not be leaked.
  • the target data contains both low privacy level and high privacy level data
  • the low privacy level target data can be directly provided to the data user, and the high privacy level target data can be provided to the data user after the preset calculation.
  • all target data can be implemented together after the preset operation, and the operation result can be provided to the data User.
  • the target data and/or calculation result can be written into the transaction log by the data authorization smart contract through the event mechanism, for example, a transaction execution result event is formed in the transaction log, so that the data user can monitor the transaction execution result event to obtain the above The target data and/or the result of the calculation.
  • the principle of the monitoring process is similar to that of the aforementioned data owner monitoring the authorization request event, which will not be repeated here.
  • the target data can be stored in the database corresponding to the blockchain node, so that after the data authorization smart contract is executed, the target data can be directly read from the database and provided to the data user.
  • the target data can be encrypted and the corresponding encrypted target data can be stored in the above-mentioned database, so that irrelevant persons can only obtain the encrypted target data at most, thus avoiding the occurrence of the target data. vent.
  • TEE Trusted Execution Environment
  • the encryption of target data can be implemented in conjunction with the Trusted Execution Environment (TEE); because the target data can be any data requested by the data user and held by the data owner, that is, the data held by the data owner Any data can be encrypted in a similar way.
  • TEE is a secure extension based on CPU hardware and a trusted execution environment completely isolated from the outside. TEE was first proposed by Global Platform to solve the security isolation of resources on mobile devices, and parallel to the operating system to provide a trusted and secure execution environment for applications. For example, Intel’s Software Protection Extensions (SGX) and other TEE technologies isolate code execution, remote attestation, secure configuration, secure storage of data, and trusted paths for code execution. The applications running in the TEE are protected by security and are almost impossible to be accessed by third parties.
  • SGX Software Protection Extensions
  • Blockchain nodes use the new processor instructions in the CPU to allocate a part of the area EPC (Enclave Page Cache, enclave page cache or enclave page cache) in the memory, load the EVM into the EPC, and confirm it through remote certification
  • the code of the loaded EVM is consistent with the code of the EVM at the key management server (for example, comparing the hash value).
  • the blockchain node encrypts the aforementioned target data and stores it in the EPC through the encryption engine MEE (Memory Encryption Engine) in the CPU.
  • MEE Memory Encryption Engine
  • the target data in the plaintext is encrypted to obtain the encrypted target data to be stored in the database corresponding to the blockchain node.
  • the blockchain node can execute the data authorization smart contract in the trusted execution environment to read the encrypted target data into the trusted execution environment for decryption, and then the data authorization intelligent The contract performs a preset calculation. For example, after the remote certification is passed, the blockchain node encrypts the obtained encrypted target data and the code of the data authorization smart contract through the encryption engine MEE in the CPU, respectively, and stores them in the EPC.
  • the encrypted content in EPC can only be decrypted after entering the CPU.
  • the encrypted target data can be decrypted into plaintext target data, and by executing the code of the data authorization smart contract, preset operations can be performed on the target data. Therefore, by encrypting and decrypting the target data in the TEE and executing the code of the data authorization smart contract, a safe and reliable environment can be ensured to avoid interference from external factors.
  • a symmetric encryption key can be used.
  • the key can be sent to the block chain node by the key management server.
  • the key can be used by each block chain node.
  • the above-mentioned key may also be a key for asymmetric encryption, which is not restricted in this specification.
  • the key can be stored in a security enclosure created on a blockchain node.
  • the security enclosure can be a QE (Quoting Enclave) enclosure instead of an AE (Application Enclave) enclosure.
  • the data owner can deposit the target data on the blockchain by submitting a privacy deposit transaction to the blockchain network.
  • the transaction content of the private deposit certificate transaction contains the target data in plain text, but the transaction content of the private deposit certificate transaction itself can be encrypted by the key, so that the block where the private deposit certificate transaction is located is added to the blockchain.
  • the target data cannot be obtained by viewing the transaction content of the privacy deposit transaction.
  • the key can be maintained in the trusted execution environment of the blockchain node, so that the blockchain node can perform the private certification transaction in the trusted execution environment after receiving the private certification transaction submitted by the data owner. Decryption is performed to obtain the target data contained in the transaction content.
  • the data owner can use symmetric encryption or asymmetric encryption to encrypt the transaction content, and this manual does not limit this.
  • the key can be generated through negotiation between the blockchain node and the data owner; or, can be generated by the key management server and then issued to the data owner and the blockchain node respectively.
  • the data owner can deposit the target data on the blockchain by submitting a deposit transaction to the blockchain network.
  • the transaction content of the deposit certificate transaction can include the creation and/or invocation of smart contracts, so that the blockchain node can execute the corresponding transaction content in the trusted execution environment after receiving the deposit certificate transaction submitted by the data owner, such as the execution of the above
  • the code of the smart contract that needs to be created and/or called to generate the above-mentioned target data.
  • the blockchain node can encrypt the target data and store it in the database. Since the target data only appears in plaintext in the trusted execution environment, and all appear in ciphertext outside the trusted execution environment, there is no need to worry about the leakage of the target data in plaintext.
  • the target data can be stored in the off-chain channel by the data owner, while the blockchain node only stores the digital summary of the target data, for example, the digital summary can be the hash value of the target data .
  • the data authorization smart contract can obtain target data from off-chain channels through cross-chain technology, and provide the target data and/or calculation results to the data user.
  • the data authorization smart contract can use the oracle smart contract to obtain the target data from the off-chain channel, and then the data authorization smart contract can use the event mechanism to obtain the target data Write the transaction log of the data acquisition transaction, and/or perform a preset calculation on the target data, and write the calculation result into the transaction log of the data acquisition transaction through an event mechanism, so that the data user can monitor the transaction log to obtain the target data and/ Or the result of the operation.
  • Fig. 4 is a schematic diagram of an end-to-end data authorization based on a blockchain network provided by an exemplary embodiment. As shown in Figure 4, assuming that there are nodes N1, N2, N3, N4, and N5 in the blockchain network, the blockchain network can be a consortium chain composed of a service platform and several partners.
  • nodes N1, N2, N4, and N5 respectively directly or indirectly correspond to several supply chain financial companies
  • node N3 corresponds to a service platform
  • users can obtain various supply chain financial companies based on the service platform
  • nodes N1, N2, N4, and N5 respectively directly or indirectly correspond to a number of merchants
  • node N3 corresponds to the service platform
  • the user can be based on the The service platform obtains invoices issued by various merchants, part of the information in the invoices, or calculation results obtained based on the invoice information; of course, the technical solutions in this manual can also be applied to other scenarios, and this manual does not limit this.
  • the supply chain finance scenario as an example.
  • FIG. 5 is an interactive flowchart of end-to-end data authorization based on a blockchain network according to an exemplary embodiment.
  • the interaction process between user Ua, blockchain nodes and enterprises C1-C2 can include the following steps:
  • step 501 the user Ua generates an authorization request transaction and submits it to the blockchain network.
  • the computing device used by the user Ua can run a client, and generate authorization request transactions based on the client, and submit them to the blockchain network.
  • the user Ua may upload the authorization request transaction to the service platform 40 after generating the authorization request transaction on the client, and the service platform 40 submits the authorization request transaction to the blockchain network.
  • the user Ua may initiate an authorization request to the service platform 40, so that the service platform 40 generates an authorization request transaction and submits it to the blockchain network.
  • the authorization request transaction can include data description information to describe the data that user Ua wants to request authorization from enterprises C1 and C2 respectively.
  • the data description information can describe the asset amount of enterprise C1 and the asset amount of enterprise C2 respectively; accordingly, the user Ua can obtain authorization for the amount of assets of enterprise C1 and authorization for the amount of assets of enterprise C2 on this basis, but will not obtain authorization for other data.
  • the authorization request transaction may not contain data description information, indicating that the user Ua wishes to request authorization for all data from the companies C1 and C2 respectively, so that the user Ua is authorized for all the data held by the companies C1 and C2, including The amount of assets mentioned above.
  • the following takes the data description information contained in the authorization request transaction as an example to describe the subsequent steps.
  • the authorization request transaction is initially submitted to a node in the blockchain network.
  • the authorization request transaction can usually be submitted to the node N3 by the service platform 40, and of course it can be submitted to other nodes.
  • the computing device used by the user Ua can also submit the authorization request transaction to a certain node.
  • consensus can be carried out among various nodes, and the consensus authorization request transaction can be executed on each node separately.
  • the consensus process can use Proof of Work (POW), Proof of Stake (POS), Delegated Proof of Stake (DPOS), and Practical Byzantine Fault Tolerance in related technologies. PBFT) or other consensus mechanisms, this manual does not limit this.
  • step 502 the blockchain node assists the user Ua in obtaining data authorization by calling the request interface of the smart contract T1, and writes the authorization request event in the transaction log.
  • each node in the blockchain network needs to execute the above authorization request transaction.
  • the blockchain node executes the authorization request transaction, it calls the smart contract T1 by reading the account address filled in the to field of the authorization request transaction.
  • the code of the smart contract T1 can logically form multiple interfaces to implement different functions, and the authorization request transaction can specify the interface to be called. For example, when an authorization request transaction calls the request interface of the smart contract T1, the relevant authorization can be requested accordingly.
  • the authorization request transaction can include the aforementioned data description information, as well as user Ua information (such as user Ua's signature), enterprise C1-C2 information (such as enterprise C1, C2 public keys), etc., so that the smart contract T1 After the request interface is called, the authorization request event can be written in the transaction log of the authorization request transaction.
  • the content of the authorization request event can include the above-mentioned data description information, user Ua information, enterprise C1-C2 information, etc., indicating the user Ua hopes to obtain the target data corresponding to the data description information from the enterprises C1 and C2.
  • Step 503 The enterprises C1 and C2 monitor the authorization request event.
  • enterprises C1 and C2 can access any of the corresponding blockchain nodes to obtain the above authorization request event based on the event monitoring callback mechanism to determine what user Ua wants to obtain from itself Target data.
  • step 504 the enterprises C1 and C2 respectively generate authorization confirmation transactions and submit them to the blockchain network.
  • the authorization confirmation transaction generated by enterprise C1 may include the data description information corresponding to the target data that it agrees to provide to user Ua, the public key of user Ua, the signature of enterprise C1, etc.; or, the authorization confirmation The transaction may include information such as the transaction number of the above-mentioned authorization request transaction to indicate that it agrees to the relevant request of the authorization request transaction.
  • step 505 the blockchain node calls the authorization interface of the smart contract T1, updates the authorization status of the user Ua, and writes an authorization status update event in the transaction log.
  • the smart contract T1 contains several predefined interfaces.
  • the to field can respectively contain the contract address of the smart contract T1, and can indicate that the authorization interface is desired to be called.
  • the smart contract T1 can confirm that the companies C1 and C2 respectively agree to grant the user Ua the authorization for target data such as asset amount by running the code corresponding to the authorization interface, thereby updating the authorization status of the user Ua to the authorized status.
  • the authorized status of the user Ua may be recorded in various forms, depending on the rules defined in the smart contract T1, which will not be repeated here.
  • the smart contract T1 can write a corresponding authorization status update event in the transaction log to indicate that the user Ua has obtained authorization for the assets of the enterprises C1 and C2.
  • Step 506 the user Ua monitors the authorization status update event.
  • the user Ua can monitor the transaction log corresponding to the authorization confirmation transaction in the blockchain node based on the event monitoring callback mechanism, and based on the monitored authorization status update event, determine that it has gained access to the enterprise C1, Authorization of C2’s assets.
  • step 507 the user Ua generates a data acquisition transaction and submits it to the blockchain network.
  • user Ua can generate and submit data acquisition transactions in a variety of ways, such as independent generation and submission, independent generation and submission by the service platform, generation and submission by the service platform, etc. Repeat.
  • the data acquisition transaction can include data description information to describe that user Ua wants to obtain the average asset amount of enterprises C1 and C2 (specifically, it can include the data description information of the asset amount of enterprises C1 and C2, and the algorithm used is the average value);
  • the data acquisition transaction may include the aforementioned transaction number of the authorization request transaction or the aforementioned transaction number of the authorization confirmation transaction, which can also indirectly indicate the desire to acquire the average asset amount of the enterprises C1 and C2.
  • step 508 the blockchain node calls the data interface of the smart contract T1, and writes the transaction execution result event in the transaction log.
  • the smart contract T1 By calling the data interface of the smart contract T1, it can indicate to the smart contract T1 that the user Ua wants to obtain the average asset amount of the enterprises C1 and C2. Then, the smart contract T1 can query the authorization status of the user Ua.
  • the transaction can be terminated; or, the smart contract T1 can write an authorization request event to the transaction log, so as to temporarily request authorization from the enterprises C1 and C2 through a process similar to steps 502 to 505.
  • the data acquisition transaction is equivalent to realizing the functions of authorization request and data acquisition at the same time, and the related operations and steps of the aforementioned authorization request transaction can be omitted.
  • the smart contract T1 can obtain the assets of the enterprises C1 and C2.
  • the value of the asset amount is stored on the blockchain
  • the value of the asset amount is stored on the blockchain in the form of cipher text
  • the smart contract T1 can read the encrypted asset amount and store it on the blockchain node.
  • the amount of assets in the clear text is decrypted in the trusted execution environment.
  • the smart contract T1 can obtain the value of the asset value through cross-chain technology.
  • the smart contract T1 can call the oracle smart contract T2 , So that the oracle smart contract T2 can read the assets of enterprises C1 and C2 from the off-chain channel respectively, and return to the smart contract T1.
  • Step 509 The user Ua monitors the transaction execution result event.
  • the user Ua can monitor the transaction log of the data acquisition transaction based on the event monitoring callback mechanism to monitor the transaction execution result event. If the data acquisition transaction is successfully implemented, the user Ua can obtain the average asset value M of the enterprises C1 and C2 from the transaction execution result event, so that the average asset value of the user Ua can be satisfied, and the exposure of the enterprise C1 and The value of the respective assets of enterprise C2.
  • Fig. 6 is a schematic structural diagram of a device provided by an exemplary embodiment.
  • the device includes a processor 602, an internal bus 604, a network interface 606, a memory 608, and a non-volatile memory 610, and of course, may also include hardware required for other services.
  • the processor 602 reads the corresponding computer program from the non-volatile memory 610 to the memory 608 and then runs it to form a data authorization device based on a smart contract on a logical level.
  • one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., which means that the execution body of the following processing flow is not limited to each
  • the logic unit can also be a hardware or logic device.
  • the smart contract-based data authorization device may include:
  • the receiving unit 701 enables the blockchain node to receive the data acquisition transaction submitted by the data user, and the data acquisition transaction is used to request the acquisition of target data held by the data owner;
  • the execution unit 702 enables the blockchain node to execute the data authorization smart contract called by the data acquisition transaction, and the data authorization smart contract is used to obtain the target data when it is confirmed that the data user has been authorized, so that The data user obtains the target data and/or an operation result obtained after performing a preset operation on the target data.
  • the data authorization smart contract has a corresponding authorized party list; wherein the data authorization smart contract confirms that the data user is authorized when the data user is in the authorized party list .
  • Optional also includes:
  • the authorization request unit 703 enables the blockchain node to call the request interface defined in the data authorization smart contract according to the authorization request transaction submitted by the data user, so that the data authorization smart contract writes in the transaction log Authorization request events to be monitored by the data owner;
  • the authorization confirmation unit 704 enables the blockchain node to confirm the transaction according to the authorization submitted by the data owner, call the authorization interface defined in the data authorization smart contract, and make the data authorization smart contract send the data user Mark as authorized.
  • the target data when the target data belongs to a low privacy level, the target data is provided to the data user; when the target data belongs to a high privacy level, the target data is subjected to the preset calculation , So that the corresponding calculation result is provided to the data user.
  • the operation rule of the preset operation is predefined in the data authorization smart contract; or, the operation rule of the preset operation is transferred to the data authorization smart contract from the data acquisition transaction.
  • the target data and/or the calculation result are written into the transaction execution result event of the transaction log by the data authorization smart contract, so that the data user can monitor and obtain it.
  • Optional also includes:
  • the data encryption unit 705 is configured to enable the blockchain node to encrypt the target data in a trusted execution environment to obtain encrypted target data to be stored in a database corresponding to the blockchain node;
  • the data operation unit 706 enables the blockchain node to execute the data authorization smart contract in the trusted execution environment, so as to read the encrypted target data into the trusted execution environment for decryption.
  • the data authorizes the smart contract to execute the preset operation.
  • Optional also includes:
  • the transaction decryption unit 707 enables the blockchain node to decrypt the privacy certificate transaction in the trusted execution environment after receiving the privacy certificate transaction submitted by the data owner to obtain the transaction content
  • the data generating unit 708 enables the blockchain node to execute the corresponding transaction content in the trusted execution environment after receiving the deposit transaction submitted by the data owner to generate the target data.
  • the blockchain node stores a digital summary of the target data, and the target data is stored in an off-chain channel by the data owner; wherein, the data authorization smart contract calls the oracle smart contract , Enabling the oracle smart contract to obtain the target data from the off-chain channel, so that the data authorizes the smart contract to perform the preset operation.
  • a typical implementation device is a computer.
  • the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email receiving and sending device, and a game control A console, a tablet computer, a wearable device, or a combination of any of these devices.
  • the computer includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
  • processors CPU
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
  • first, second, third, etc. may be used in one or more embodiments of this specification to describe various information, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as second information, and similarly, the second information may also be referred to as first information.
  • word “if” as used herein can be interpreted as "when” or “when” or "in response to determination”.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Databases & Information Systems (AREA)
  • Technology Law (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种基于智能合约的数据授权方法及装置,该方法包括:区块链节点接收数据使用方提交的数据获取交易,所述数据获取交易用于请求获取数据所有方持有的目标数据(302);所述区块链节点执行所述数据获取交易调用的数据授权智能合约,所述数据授权智能合约用于在确认所述数据使用方已获得授权时获取所述目标数据,使所述数据使用方获得所述目标数据和/或对所述目标数据执行预设运算后得到的运算结果(304)。

Description

基于智能合约的数据授权方法及装置 技术领域
本说明书一个或多个实施例涉及区块链技术领域,尤其涉及一种基于智能合约的数据授权方法及装置。
背景技术
区块链技术(也被称之为,分布式账本技术)是一种去中性化的分布式数据库技术,具有去中心化、公开透明、不可篡改、可信任等多种特点,适用于诸多对数据可靠性具有高需求的应用场景中。
发明内容
有鉴于此,本说明书一个或多个实施例提供一种基于智能合约的数据授权方法及装置。
为实现上述目的,本说明书一个或多个实施例提供技术方案如下:
根据本说明书一个或多个实施例的第一方面,提出了一种基于智能合约的数据授权方法,包括:
区块链节点接收数据使用方提交的数据获取交易,所述数据获取交易用于请求获取数据所有方持有的目标数据;
所述区块链节点执行所述数据获取交易调用的数据授权智能合约,所述数据授权智能合约用于在确认所述数据使用方已获得授权时获取所述目标数据,使所述数据使用方获得所述目标数据和/或对所述目标数据执行预设运算后得到的运算结果。
根据本说明书一个或多个实施例的第二方面,提出了一种基于智能合约的数据授权装置,包括:
接收单元,使区块链节点接收数据使用方提交的数据获取交易,所述数据获取交易用于请求获取数据所有方持有的目标数据;
执行单元,使所述区块链节点执行所述数据获取交易调用的数据授权智能合约,所述数据授权智能合约用于在确认所述数据使用方已获得授权时获取所述目标数据,使 所述数据使用方获得所述目标数据和/或对所述目标数据执行预设运算后得到的运算结果。
根据本说明书一个或多个实施例的第三方面,提出了一种电子设备,包括:
处理器;
用于存储处理器可执行指令的存储器;
其中,所述处理器通过运行所述可执行指令以实现如第一方面所述的方法。
根据本说明书一个或多个实施例的第四方面,提出了一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如第一方面所述方法的步骤。
附图说明
图1是一示例性实施例提供的一种示例环境的示意图。
图2是一示例性实施例提供的一种概念架构的示意图。
图3是一示例性实施例提供的一种基于智能合约的数据授权方法的流程图。
图4是一示例性实施例提供的一种基于区块链网络实现的端到端数据授权的示意图。
图5是一示例性实施例提供的一种基于区块链网络实现的端到端数据授权的交互流程图。
图6是一示例性实施例提供的一种设备的结构示意图。
图7是一示例性实施例提供的一种基于智能合约的数据授权装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书一个或多个实施例相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书一个或多个实施例的一些方面相一致的装置和方法的例子。
需要说明的是:在其他实施例中并不一定按照本说明书示出和描述的顺序来执行 相应方法的步骤。在一些其他实施例中,其方法所包括的步骤可以比本说明书所描述的更多或更少。此外,本说明书中所描述的单个步骤,在其他实施例中可能被分解为多个步骤进行描述;而本说明书中所描述的多个步骤,在其他实施例中也可能被合并为单个步骤进行描述。
图1是一示例性实施例提供的一种示例环境的示意图。如图1所示,示例环境100允许实体参与区块链网络102。区块链网络102可以为公有类型、私有类型或联盟类型的区块链网络。示例环境100可以包括计算设备104、106、108、110、112和网络114;在一实施例中,网络114可以包括局域网(Local Area Network,LAN)、广域网(Wide Area Network,WAN)、因特网或其组合,并连接至网站、用户设备(例如计算设备)和后端系统。在一实施例中,可以通过有线和/或无线通信方式访问网络114。
在某些情况下,计算设备106、108可以是云计算系统的节点(未显示),或者每个计算设备106、108可以是单独的云计算系统,包括由网络互连并作为分布式处理系统工作的多台计算机。
在一实施例中,计算设备104~108可以运行任何适当的计算系统,使其能够作为区块链网络102中的节点;例如,计算设备104~108可以包括但不限于服务器、台式计算机、笔记本电脑、平板电脑计算设备和智能手机。在一实施例中,计算设备104~108可以归属于相关实体并用于实现相应的服务,例如该服务可以用于对某一实体或多个实体之间的交易进行管理。
在一实施例中,计算设备104~108分别存储有区块链网络102对应的区块链账本。计算设备104可以是(或包含)用于提供浏览器功能的网络服务器,该网络服务器可基于网络114提供与区块链网络102相关的可视化信息。在一些情况下,计算设备104可以不参与区块验证,而是监控区块链网络102以确定其他节点(譬如可以包括计算设备106-108)何时达成共识,并据此生成相应的区块链可视化用户界面。
在一实施例中,计算设备104可接收客户端设备(例如计算设备110或计算设备112)针对区块链可视化用户界面发起的请求。在一些情况下,区块链网络102的节点也可以作为客户端设备,比如计算设备108的用户可以使用运行在计算设备108上的浏览器向计算设备104发送上述请求。
响应于上述请求,计算设备104可以基于存储的区块链账本生成区块链可视化用户界面(如网页),并将生成的区块链可视化用户界面发送给请求的客户端设备。如果 区块链网络102是私有类型或联盟类型的区块链网络,对区块链可视化用户界面的请求可以包括用户授权信息,在生成区块链可视化用户界面并发送给请求的客户端设备之前,可以由计算设备104对该用户授权信息进行验证,并在验证通过后返回相应的区块链可视化用户界面。
区块链可视化用户界面可以显示在客户端设备上(例如可显示在图1所示的用户界面116中)。当区块链账本发生更新时,用户界面116的显示内容也可以随之发生更新。此外,用户与用户界面116的交互可能导致对其他用户界面的请求,例如显示区块列表、区块详情、交易列表、交易详情、账户列表、账户详情、合约列表、合约详情或者用户对区块链网络实施搜索而产生的搜索结果页面等。
图2是一示例性实施例提供的一种概念架构的示意图。如图2所示,该概念架构200包括实体层202、托管服务层204和区块链网络层206。例如,实体层202可以包括三个实体:实体1、实体2和实体3,每个实体都有各自的交易管理系统208。
在一实施例中,托管服务层204可以包括每个事务管理系统208对应的接口210。例如,各个事务管理系统208使用协议(例如超文本传输协议安全(HTTPS)等)通过网络(例如图1中的网络114)与各自的接口210通信。在一些例子中,每个接口210可以提供各自对应的交易管理系统208与区块链网络层206之间的通信连接;更具体地,接口210可与区块链网络层206的区块链网络212通信。在一些例子中,接口210和区块链网络层206之间的通信可以使用远程过程调用(Remote Procedure Calls,RPCs)而实现。在一些例子中,接口210可以向交易管理系统208提供用于访问区块链网络212的API接口。
如本文所述,区块链网络212以对等网络的形式提供,该对等网络包括多个节点214,这些节点214分别用于对块链数据所形成的区块链账本216进行持久化;其中,图2中仅示出了一份区块链账本216,但区块链网络212中可以存在多份区块链账本216或其副本,比如每一节点214可以分别维护一份区块链账本216或其副本。
需要指出的是:在本说明书中所描述的交易(transaction),是指用户通过区块链的客户端创建,并需要最终发布至区块链的分布式数据库中的一笔数据。其中,区块链中的交易,存在狭义的交易以及广义的交易之分。狭义的交易是指用户向区块链发布的一笔价值转移;例如,在传统的比特币区块链网络中,交易可以是用户在区块链中发起的一笔转账。而广义的交易是指用户向区块链发布的一笔具有业务意图的业务数据;例如,运营方可以基于实际的业务需求搭建一个联盟链,依托于联盟链部署一些与价值转 移无关的其它类型的在线业务(比如,租房业务、车辆调度业务、保险理赔业务、信用服务、医疗服务等),而在这类联盟链中,交易可以是用户在联盟链中发布的一笔具有业务意图的业务消息或者业务请求。
区块链一般被划分为三种类型:公有链(Public Blockchain),私有链(Private Blockchain)和联盟链(Consortium Blockchain)。此外,还有多种类型的结合,比如私有链+联盟链、联盟链+公有链等不同组合形式。其中去中心化程度最高的是公有链。公有链以比特币、以太坊为代表,加入公有链的参与者可以读取链上的数据记录、参与交易以及竞争新区块的记账权等。而且,各参与者(即节点)可自由加入以及退出网络,并进行相关操作。私有链则相反,该网络的写入权限由某个组织或者机构控制,数据读取权限受组织规定。简单来说,私有链可以为一个弱中心化系统,参与节点具有严格限制且少。这种类型的区块链更适合于特定机构内部使用。联盟链则是介于公有链以及私有链之间的区块链,可实现“部分去中心化”。联盟链中各个节点通常有与之相对应的实体机构或者组织;参与者通过授权加入网络并组成利益相关联盟,共同维护区块链运行。
不论是公有链、私有链或是联盟链,都可能提供智能合约的功能。区块链上的智能合约是在区块链系统上可以被交易触发执行的合约。智能合约可以通过代码的形式定义。
以以太坊为例,支持用户在以太坊网络中创建并调用一些复杂的逻辑,这是以太坊区别于比特币区块链技术的最大挑战。以太坊作为一个可编程区块链的核心是以太坊虚拟机(EVM),每个以太坊节点都可以运行EVM。EVM是一个图灵完备的虚拟机,这意味着可以通过它实现各种复杂的逻辑。用户在以太坊中发布和调用智能合约就是在EVM上运行的。
而在本说明书的技术方案中,通过在区块链节点上发布和调用智能合约,可以在数据所有方与数据使用方之间实现安全的端到端数据授权。下面结合实施例对本说明书的技术方案进行描述。
图3是一示例性实施例提供的一种基于智能合约的数据授权方法的流程图。如图3所示,该方法应用于区块链节点,可以包括以下步骤:
步骤302,区块链节点接收数据使用方提交的数据获取交易,所述数据获取交易用于请求获取数据所有方持有的目标数据。
数据使用方可以直接在上述区块链节点上生成数据获取交易;或者,数据使用方可以在客户端上生成数据获取交易,并通过客户端将该数据获取交易发送至上述区块链节点;或者,数据使用方可以在客户端上生成数据获取交易后,将该数据获取交易发送至另一区块链节点,并由该另一区块链节点将该数据获取交易发送至上述区块链节点。当然,在上述数据获取交易通过共识后,该数据获取交易会被传输至区块链网络中的所有区块链节点,并分别由各个区块链节点执行该数据获取交易。
一般的,采用工作量证明(Proof of Work,POW)以及股权证明(Proof of Stake,POS)、委任权益证明(Delegated Proof of Stake,DPOS)等共识算法的区块链网络中,争夺记账权的节点都可以在接收到区块链交易后执行该区块链交易。争夺记账权的节点中可能其中一个在本轮争夺记账权的过程中胜出,成为记账节点。以上述的数据获取交易为例,记账节点可以将该数据获取交易与其它交易一起打包并生成新的区块,并将生成的新的区块发送至其它节点进行共识。
对于采用实用拜占庭容错(Practical Byzantine Fault Tolerance,PBFT)等机制的区块链网络中,具有记账权的节点在本轮记账前已经商定好。因此,上述区块链节点接收到数据获取交易后,如果自身不是本轮的记账节点,则可以将该数据获取交易发送至记账节点。对于本轮的记账节点(可以是上述的区块链节点),在将该数据获取交易打包并生成新区块的过程中或者之前,或在将该数据获取交易与其它交易一起打包并生成新区块的过程中或者之前,可以执行该数据获取交易。所述记账节点将该数据获取交易打包(或还包括其它交易一起打包)并生成新的区块后,将生成的新的区块或者区块头发送至其它节点进行共识。
如上所述,采用POW机制的区块链网络中,或者采用POS、DPOS、PBFT机制的区块链网络中,本轮的记账节点都可以将数据获取交易打包并生成新的区块,并将生成的新的区块后区块头发送至其它节点进行共识。如果其它节点接收到所述区块后经验证没有问题,可以将该新的区块追加到原有的区块链末尾,从而完成记账过程,达成共识;其中,若数据获取交易用于调用数据授权智能合约,则完成了对该数据授权智能合约的调用和执行。其它节点验证记账节点发来的新的区块或区块头的过程中,也可以执行所述区块中的数据获取交易。
步骤304,所述区块链节点执行所述数据获取交易调用的数据授权智能合约,所述数据授权智能合约用于在确认所述数据使用方已获得授权时获取所述目标数据,使所述数据使用方获得所述目标数据和/或对所述目标数据执行预设运算后得到的运算结果。
数据授权智能合约被创建后,在区块链上形成相应的合约账户,该合约账户存在特定的合约地址。数据获取交易可以在诸如该数据获取交易的to字段包含上述的合约地址,以调用数据授权智能合约。如前所述,区块链网络中的所有区块链节点之间完成共识后,每个区块链节点分别接收到数据获取交易、读取该数据获取交易的to字段并调用上述的数据授权智能合约,具体是指将数据授权智能合约的代码读入区块链节点上的EVM中予以执行。
数据获取交易中可以包含目标数据的信息,比如该目标数据的哈希值或其他任意描述信息,只要能够指向目标数据即可。例如,该目标数据的信息可以包含于数据获取交易的data字段中;当数据获取交易调用数据授权智能合约时,data字段中的内容可以作为该数据授权智能合约的输入信息。
数据授权智能合约可以包含对应的授权方名单,以用于记录对数据所有方持有的数据已获得授权的对象信息,即授权方的信息。那么,如果数据授权智能合约确认数据使用方位于授权方名单内,则可以确认该数据使用方已获得授权。基于授权方名单的管理方式,可以对数据所有方所持有的全部数据进行一次性授权,并且即便数据所有方所持有的数据发生增加或减少时,也不会影响授权方名单的内容,即能够兼容数据所有方所持有数据的更新。
在数据授权智能合约被创建时,授权方名单的信息可以被写入合约代码中,使得该授权方名单的内容不可更改。那么,可能需要对数据授权智能合约进行替换或版本迭代,以实现对授权方名单的更新。或者,数据授权智能合约可以存在对应的一个或多个状态,区块链节点上可以维护该一个或多个状态的取值,当状态的取值为授权方的信息时,该一个或多个状态相当于上述的授权方名单;其中,数据所有方可以通过向区块链网络中提交区块链交易,该区块链交易可以调用数据授权智能合约中定义的授权接口,使得授权方名单的内容可以在数据授权智能合约被执行后发生更新,而无需对数据授权智能合约进行替换或版本迭代。或者,数据授权智能合约可以调用另一智能合约,该另一智能合约的代码或状态可以用于记录授权方名单;其中,如果授权方名单被不可更改地写入该另一智能合约的代码中,那么在需要对授权方名单进行更新时,可以创建新的智能合约、该新的智能合约的代码中包含更新后的授权方名单,然后由数据授权智能合约调用新的智能合约的合约地址即可(被调用的合约地址可以作为数据授权智能合约的一个状态,该状态的取值可以发生变化);而如果授权方名单被写入上述另一智能合约对应的状态中,那么如前所述只需要对状态的取值进行更新,即可实现授权方名单的更 新,而数据授权智能合约所调用的合约地址也无需更新,该合约地址既可以固定写入数据授权智能合约的代码中,也可以写入数据授权智能合约的一个状态中。
数据使用方可以临时向数据所有方请求获取授权。例如,数据使用方可以向区块链网络中提交授权请求交易,该授权请求交易调用上述数据授权智能合约中定义的请求接口,使得区块链节点执行该授权请求交易后,可以通过调用数据授权智能合约中定义的请求接口,使数据授权智能合约在交易日志中写入授权请求事件。然后,数据所有方可以通过事件监听回调机制,在监听到交易日志中写入的上述授权请求事件时做出响应。例如,当确定数据使用方能够获得授权时,数据所有方可以向区块链网络提交授权确认交易,该授权确认交易调用上述数据授权智能合约中定义的授权接口,使得区块链节点执行该授权确认交易后,可以通过调用数据授权智能合约中定义的授权接口,使数据授权智能合约将数据使用方标记为已获得授权。将数据使用方标记为已获得授权,一种情况下可以是将数据使用方添加至授权方名单中,其添加过程如前文所述、此处不再赘述,那么只要数据使用方处于授权方名单内,即可随时请求获取数据所有方持有的数据,相当于数据使用方获得了长期授权;另一种情况下,数据授权智能合约只是确认数据使用方的本次操作获得了授权,使得数据授权智能合约可以在本次对数据使用方的数据获取请求做出影响,但本次的数据获取交易完成后,数据使用方将丧失授权,需要重新向数据所有方请求授权。
虽然相比于上述的后一种情况而言,授权方名单属于一种长期授权,但是并不一定意味着永久授权。例如,数据所有方可以通过更新授权方名单,将一个或多个授权方剔除、使其失去授权;再例如,授权方名单中的每一授权方可以存在一定数值的剩余授权时长和/或剩余授权次数,当剩余授权时长或剩余授权次数清零时,相应的授权方可以被自动从授权方名单中剔除,相当于对授权方名单内的授权方实施的“老化”机制。
数据使用方可以在授权请求交易中包含目标数据的信息,该目标数据的信息可以被写入交易日志中的授权请求事件内,以使得数据所有方获知数据使用方所希望请求的授权范围;如果授权请求交易中并未包含任何数据的信息,则表明数据使用方请求获取数据所有方持有的全部数据的授权。相应地,数据所有方可以在授权确认交易中添加目标数据的信息,以表明针对该目标数据向数据使用方赋予授权;如果数据所有方提交的授权确认交易中并未包含任何数据的信息,则表明数据所有方向数据使用方开放了所有数据的授权。因此,在一些情况下,数据使用方的数据获取交易中包含的目标数据的信息可能与其所获得的授权范围(即获得了针对哪些数据的授权)不一致,此时可能导致 数据获取交易无法正常执行或数据授权智能合约无法成功获得数据获取交易中指明的目标数据。
数据授权智能合约在获得目标数据后,该目标数据可以被直接提供至数据使用方。例如,数据授权智能合约可以将目标数据写入数据获取交易的交易日志中,使得数据使用方可以通过监听交易日志来获得该目标数据;其中,区块链节点可以对目标数据进行加密,使得加密后目标数据被写入上述的交易日志中,那么持有密钥的数据使用方可以对加密后目标数据进行读取和解密、得到目标数据,而无关用户则无法对加密后目标数据进行解密,从而既可以确保数据使用方获得目标数据,又可以避免目标数据以明文形式记入交易日志时被无关人员获得,避免目标数据发生外泄,保障了数据所有方的权益。
数据授权智能合约在获得目标数据后,可以对该目标数据执行预设运算,而运算结果被提供至数据使用方。该预设运算可以为数据使用方希望采用的任意运算,本说明书并不对此进行限制。例如,该预设运算的运算规则可以被预定义于数据授权智能合约中;其中,该数据授权智能合约中可以定义一种或多种运算规则,尤其是当存在多种运算规则时,可由数据使用方在数据获取交易中指明所需采用的运算规则(比如在数据获取交易的data字段添加该运算规则对应的标识等)。再例如,该预设运算的运算规则可以由数据获取交易传入数据授权智能合约,比如可以将该预设运算的运算规则写入数据获取交易的data字段,进而传入数据授权智能合约中。当目标数据经由上述的预设运算得到相应的运算结果时,如果数据使用方无法由运算结果反推出目标数据的取值,就可以在满足数据使用方的数据获取需求的情况下,避免数据使用方直接获得目标数据,防止数据使用方对该目标数据造成外泄而侵犯数据所有方的权益,确保目标数据始终仅由数据所有方持有。
数据所有方持有的各个数据之间,可以存在不同的隐私级别;相应地,不同隐私级别的数据可以具有差异化的处理方式。例如,数据所有方可以分别持有隐私级别相对较低的数据和隐私级别相对较高的数据,即低隐私级别的数据和高隐私级别的数据;相应地,当目标数据属于低隐私级别时,该目标数据可以被提供至数据使用方,即数据所有方不关注低隐私级别的数据是否会发生外泄,而当目标数据属于高隐私级别时,目标数据需要被执行预设运算,以使相应的运算结果被提供至数据使用方,以确保高隐私级别的数据不会发生外泄。如果目标数据同时包含低隐私级别和高隐私级别的数据时,可以将低隐私级别的目标数据直接提供至数据使用方、将高隐私级别的目标数据经由预设运算后将运算结果提供至数据使用方;或者,尤其是在数据使用方已经在数据获取交易 中指明所需采用的预设运算的运算规则的情况下,可以将所有目标数据一并实施预设运算后,将运算结果提供至数据使用方。
目标数据和/或运算结果可以被数据授权智能合约通过事件机制写入交易日志中,譬如在交易日志中形成交易执行结果事件,使得数据使用方可以对该交易执行结果事件进行监听,以获得上述的目标数据和/或运算结果。该监听过程的原理类似于前述的数据所有方对授权请求事件进行监听,此处不再赘述。
目标数据可以存储于区块链节点对应的数据库中,使得数据授权智能合约被执行后,可以直接从该数据库中读取目标数据,以提供至数据使用方。为了避免目标数据被无关人员获得,可以对目标数据进行加密,并将相应的加密后目标数据存入上述的数据库中,使得无关人员至多仅能够获得该加密后目标数据,从而避免目标数据发生外泄。
对于目标数据的加密处理,可以结合可信执行环境(Trusted Execution Environment,TEE)来实现;由于目标数据可以为数据使用方所请求、数据所有方持有的任意数据,即数据所有方持有的任意数据均可以采用类似的方式实现加密处理。TEE是基于CPU硬件的安全扩展,且与外部完全隔离的可信执行环境。TEE最早是由Global Platform提出的概念,用于解决移动设备上资源的安全隔离,平行于操作系统为应用程序提供可信安全的执行环境。例如,英特尔的软件保护扩展(SGX)等TEE技术隔离了代码执行、远程证明、安全配置、数据的安全存储以及用于执行代码的可信路径。在TEE中运行的应用程序受到安全保护,几乎不可能被第三方访问。
以Intel SGX技术为例。区块链节点利用CPU中新增的处理器指令,在内存中可以分配一部分区域EPC(Enclave Page Cache,围圈页面缓存或飞地页面缓存),将EVM加载至EPC中,并通过远程证明确认所加载EVM的代码与密钥管理服务器处EVM的代码一致(例如比较hash值)。在远程证明通过后,区块链节点通过CPU内的加密引擎MEE(Memory Encryption Engine)对上述目标数据进行加密存入所述EPC中。EPC中加密的内容只有进入CPU后才能够被解密成明文。在CPU中,对明文的目标数据进行加密,得到加密后目标数据,以存储于区块链节点对应的数据库中。而响应于数据使用方提交的数据获取交易,区块链节点可以在可信执行环境中执行数据授权智能合约,以将加密后目标数据读入可信执行环境中进行解密后,由数据授权智能合约执行预设运算。例如,在远程证明通过后,区块链节点通过CPU内的加密引擎MEE对获得的加密后目标数据、数据授权智能合约的代码分别进行加密存入所述EPC中。EPC中加密的内容只有进入CPU后才能够被解密。在CPU中,可以将加密后目标数据解密为明 文的目标数据,并通过执行数据授权智能合约的代码,对目标数据执行预设运算。因此,通过在TEE中对目标数据进行加解密以及执行数据授权智能合约的代码,可以确保提供安全可靠的环境,避免受到外界因素的干扰。
区块链节点在针对目标数据进行加密时,可以采用对称加密的密钥,比如该密钥可以由密钥管理服务器发送至区块链节点,再比如该密钥可以由各个区块链节点之间协商得到。上述密钥也可以是非对称加密的密钥,本说明书并不对此进行限制。密钥可以存储于区块链节点上创建的安全围圈中,比如该安全围圈可以为QE(Quoting Enclave)围圈,而非AE(Application Enclave)围圈。
数据所有方可以通过向区块链网络提交隐私存证交易的方式,将目标数据存证于区块链上。其中,隐私存证交易的交易内容中包含明文的目标数据,但该隐私存证交易的交易内容本身可以通过密钥加密,使得该隐私存证交易所在的区块被添加至区块链后,无法通过查看该隐私存证交易的交易内容而获得目标数据。相应地,区块链节点的可信执行环境内可以维护有密钥,使得区块链节点在收到数据所有方提交的隐私存证交易后,可以在可信执行环境中对隐私存证交易进行解密,以得到交易内容中包含的目标数据。数据所有方可以采用对称加密方式或非对称加密方式对交易内容进行加密,本说明书并不对此进行限制。其中,密钥可由区块链节点与数据所有方协商生成;或者,可由密钥管理服务器生成后分别下发至数据所有方和区块链节点。
数据所有方可以通过向区块链网络提交存证交易的方式,将目标数据存证于区块链上。存证交易的交易内容可以包括创建和/或调用智能合约,使得区块链节点在收到数据所有方提交的存证交易后,可以在可信执行环境中执行相应的交易内容,比如执行上述所需创建和/或调用的智能合约的代码,以生成上述的目标数据。进一步地,区块链节点可以将该目标数据加密后存储至数据库中。由于目标数据仅在可信执行环境中以明文形式出现,而在可信执行环境之外均以密文形式出现,因而不必担心明文的目标数据发生外泄。
除了存证于区块链节点的数据库之外,目标数据可由数据所有方存储于链下渠道,而区块链节点仅存储目标数据的数字摘要,譬如该数字摘要可以为目标数据的哈希值。那么,可以通过跨链技术使得数据授权智能合约可以从链下渠道获得目标数据,并将目标数据和/或运算结果提供至数据使用方。以基于预言机的跨链技术为例:数据授权智能合约可以通过调用预言机智能合约,使预言机智能合约从链下渠道获取目标数据,然后数据授权智能合约可以将获得的目标数据以事件机制写入数据获取交易的交易日志,和 /或对目标数据执行预设运算后,将运算结果以事件机制写入数据获取交易的交易日志,使得数据使用方可以监听交易日志以获得目标数据和/或运算结果。
需要指出的是:本说明书中的由数据所有方持有、数据使用方请求的“数据”应当理解为一种广义概念,比如数值、文字、图像、音频、视频、代码、程序、模型(如人工智能模型)等,本说明书并不对此进行限制。
图4是一示例性实施例提供的一种基于区块链网络实现的端到端数据授权的示意图。如图4所示,假定在区块链网络中存在N1、N2、N3、N4和N5等节点,该区块链网络可以为服务平台与若干合作方组成的联盟链。例如,在供应链金融场景下,节点N1、N2、N4和N5等分别直接或间接对应于若干供应链金融企业,节点N3对应于服务平台,而用户可以基于该服务平台获取各个供应链金融企业的目标数据或基于目标数据得到的运算结果;再例如,在发票场景下,节点N1、N2、N4和N5等分别直接或间接对应于若干商家,节点N3对应于服务平台,而用户可以基于该服务平台获取各个商家开具的发票、发票中的部分信息或者基于发票信息得到的运算结果;当然,本说明书的技术方案还可以应用于其他场景,本说明书并不对此进行限制。为了便于理解,下面以供应链金融场景为例进行描述。
假定用户Ua希望获知供应链金融企业C1、C2的平均资产额,以用于相关用途。但是,资产额对于企业C1、C2而言均为需要保密的数据,不能够由企业C1、C2分别将自身的资产额提供至用户Ua,由用户Ua进而计算出平均资产额。因此,可以通过本说明书的技术方案,在满足用户Ua的数据获取需求的情况下,避免暴露企业C1、C2的数据隐私,兼顾数据使用方(如用户Ua)和数据所有方(如企业C1、C2)的权益。例如,图5是一示例性实施例提供的一种基于区块链网络实现的端到端数据授权的交互流程图。如图5所示,用户Ua、区块链节点和企业C1-C2之间的交互流程可以包括以下步骤:
步骤501,用户Ua生成授权请求交易,并提交至区块链网络。
用户Ua使用的计算设备上可以运行客户端,并基于该客户端生成授权请求交易,以及提交至区块链网络。或者,用户Ua可以在客户端上生成授权请求交易后,将该授权请求交易上传至服务平台40,由该服务平台40将授权请求交易提交至区块链网络。或者,用户Ua可以向服务平台40发起授权请求,使得服务平台40生成授权请求交易,以及提交至区块链网络。
向区块链网络提交授权请求交易的目的,在于请求企业C1、C2向该用户Ua赋予相关授权,使得用户Ua可以最终获得上述的平均资产额。授权请求交易中可以包含数据描述信息,以描述用户Ua希望分别向企业C1、C2请求授权的数据,比如该数据描述信息可以分别描述企业C1的资产额、企业C2的资产额;相应地,用户Ua可以据此获得企业C1的资产额的授权、企业C2的资产额的授权,但不会获得其他数据的授权。或者,授权请求交易可以不包含数据描述信息,表明该用户Ua希望分别向企业C1、C2请求获得对所有数据的授权,使得用户Ua对企业C1、C2持有的所有数据均获得了授权,包括上述的资产额。下面以授权请求交易中包含数据描述信息为例,对后续步骤进行描述。
授权请求交易最初被提交至区块链网络中的某个节点。譬如,当服务平台40在区块链网络中存在对应的节点N3时,该授权请求交易通常可以被服务平台40提交至该节点N3,当然也不排除可以提交至其他节点。类似地,用户Ua使用的计算设备也可以将授权请求交易提交至某一节点。授权请求交易被提交至区块链网络后,可以在各个节点之间进行共识,而经过共识的授权请求交易可以在每个节点上分别执行。共识过程可以采用相关技术中的工作量证明(Proof of Work,POW)、股权证明(Proof of Stake,POS)、委任权益证明(Delegated Proof of Stake,DPOS)、实用拜占庭容错(Practical Byzantine Fault Tolerance,PBFT)或其他共识机制,本说明书并不对此进行限制。
步骤502,区块链节点通过调用智能合约T1的请求接口,协助用户Ua获得数据授权,并在交易日志中写入授权请求事件。
经过共识后,区块链网络中的每个节点均需要执行上述的授权请求交易。区块链节点在执行授权请求交易时,通过读取该授权请求交易在to字段中填写的账户地址,调用智能合约T1。其中,智能合约T1的代码可以在逻辑上形成多个接口,以分别实现不同的功能,而授权请求交易中可以具体指明所需调用的接口。譬如,当授权请求交易调用了智能合约T1的请求接口时,可以据此请求获取相关授权。
例如,授权请求交易中可以包含前述的数据描述信息,以及用户Ua的信息(如用户Ua的签名)、企业C1-C2的信息(如企业C1、C2的公钥)等,使得智能合约T1的请求接口被调用后,可以在授权请求交易的交易日志中写入授权请求事件,该授权请求事件的内容可以包含上述的数据描述信息、用户Ua的信息、企业C1-C2的信息等,表明用户Ua希望从企业C1、C2处获得数据描述信息对应的目标数据。
步骤503,企业C1、C2监听授权请求事件。
由于所有区块链节点的操作一致,因而企业C1、C2可以通过访问对应的任意区块链节点,即可基于事件监听回调机制获知上述的授权请求事件,以确定用户Ua希望从自身处获取的目标数据。
步骤504,企业C1、C2分别生成授权确认交易,并提交至区块链网络。
当企业C1、C2同意用户Ua获取相关目标数据时,可以分别生成并提交授权确认交易,以表明自身同意向用户Ua提供诸如资产额等目标数据。以企业C1为例:在企业C1生成的授权确认交易中,可以包含其自身同意向用户Ua提供的目标数据对应的数据描述信息、用户Ua的公钥、企业C1的签名等;或者,授权确认交易中可以包含上述授权请求交易的交易编号等信息,以表明其同意该授权请求交易的相关请求。
步骤505,区块链节点调用智能合约T1的授权接口,更新用户Ua的授权状态,并在交易日志中写入授权状态更新事件。
如前所述,智能合约T1包含预定义的若干接口。在企业C1提交的授权确认交易1、企业C2提交的授权确认交易2中,to字段可以分别包含智能合约T1的合约地址,并且可以指明希望调用授权接口。而智能合约T1可以通过运行授权接口对应的代码,确认企业C1、C2分别同意向用户Ua赋予对诸如资产额等目标数据的授权,从而将用户Ua的授权状态更新为已授权状态。如前所述,用户Ua的已授权状态可能采用多种形式进行记录,这取决于智能合约T1中定义的规则,此处不再赘述。
针对用户Ua的授权状态的更新情况,智能合约T1可以在交易日志中写入相应的授权状态更新事件,以表明用户Ua已经获得对于企业C1、C2的资产额的授权。
步骤506,用户Ua监听授权状态更新事件。
与步骤503相类似的,用户Ua可以基于事件监听回调机制对区块链节点中对应于授权确认交易的交易日志进行监听,并基于监听到的授权状态更新事件,确定自身已经获得对于企业C1、C2的资产额的授权。
步骤507,用户Ua生成数据获取交易,并提交至区块链网络。
与前述的授权请求交易相类似的,用户Ua可以通过多种方式生成并提交数据获取交易,比如独立生成并提交、独立生成后由服务平台提交、由服务平台生成并提交等,此处不再赘述。
数据获取交易中可以包含数据描述信息,以描述用户Ua希望获得企业C1、C2的 平均资产额(具体可以包含企业C1、C2的资产额的数据描述信息,以及采用的运算规则为求均值);或者,数据获取交易中可以包含前述的授权请求交易的交易编号或者前述的授权确认交易的交易编号,同样可以间接表明希望获取企业C1、C2的平均资产额。
步骤508,区块链节点调用智能合约T1的数据接口,并在交易日志中写入交易执行结果事件。
通过调用智能合约T1的数据接口,可以向智能合约T1表明:用户Ua希望获取企业C1、C2的平均资产额。那么,智能合约T1可以查询用户Ua的授权状态。
如果用户Ua并未获得授权,可以终止交易;或者,智能合约T1可以向交易日志中写入授权请求事件,从而通过类似于步骤502~505的过程,临时向企业C1、C2请求授权,此时数据获取交易相当于同时实现了授权请求和数据获取的功能,可以省去前述授权请求交易的相关操作和步骤。
如果用户Ua已获得授权,智能合约T1可以获取企业C1、C2的资产额。例如,当资产额的取值存证于区块链时,比如资产额的取值以密文形式存证于区块链上,智能合约T1可以读取加密后资产额、在区块链节点处的可信执行环境中解密得到明文的资产额。再例如,当资产额的取值存证于企业C1、C2分别维护的链下渠道时,智能合约T1可以通过跨链技术获取资产额的取值,比如智能合约T1可以调用预言机智能合约T2,使得预言机智能合约T2可以从链下渠道分别读取企业C1、C2的资产额,并返回至智能合约T1。
智能合约T1在获得企业C1、C2的资产额后,可以按照预定义的运算规则计算出相应的平均资产额。例如,当企业C1的资产额为m1、企业C2的资产额为m2时,可以计算得到平均资产额M=(m1+m2)/2。相应地,智能合约T1可以将该平均资产额M的取值添加至交易执行结果事件中,并写入数据获取交易的交易日志。
步骤509,用户Ua监听交易执行结果事件。
如前所述,用户Ua可以基于事件监听回调机制对数据获取交易的交易日志进行监听,以监听到交易执行结果事件。如果数据获取交易顺利实施,那么用户Ua可以从该交易执行结果事件中获得企业C1、C2的平均资产额M,使得既可以满足用户Ua对该平均资产额的需求,又可以避免暴露企业C1、企业C2各自资产额的取值。
图6是一示例性实施例提供的一种设备的示意结构图。请参考图6,在硬件层面,该设备包括处理器602、内部总线604、网络接口606、内存608以及非易失性存储器 610,当然还可能包括其他业务所需要的硬件。处理器602从非易失性存储器610中读取对应的计算机程序到内存608中然后运行,在逻辑层面上形成基于智能合约的数据授权装置。当然,除了软件实现方式之外,本说明书一个或多个实施例并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。
请参考图7,在软件实施方式中,该基于智能合约的数据授权装置可以包括:
接收单元701,使区块链节点接收数据使用方提交的数据获取交易,所述数据获取交易用于请求获取数据所有方持有的目标数据;
执行单元702,使所述区块链节点执行所述数据获取交易调用的数据授权智能合约,所述数据授权智能合约用于在确认所述数据使用方已获得授权时获取所述目标数据,使所述数据使用方获得所述目标数据和/或对所述目标数据执行预设运算后得到的运算结果。
可选的,所述数据授权智能合约存在对应的授权方名单;其中,所述数据授权智能合约在确认所述数据使用方位于所述授权方名单内时,确认所述数据使用方已获得授权。
可选的,还包括:
授权请求单元703,使所述区块链节点根据所述数据使用方提交的授权请求交易,调用所述数据授权智能合约中定义的请求接口,使所述数据授权智能合约在交易日志中写入授权请求事件,以由所述数据所有方进行监听;
授权确认单元704,使所述区块链节点根据所述数据所有方提交的授权确认交易,调用所述数据授权智能合约中定义的授权接口,使所述数据授权智能合约将所述数据使用方标记为已获得授权。
可选的,当所述目标数据属于低隐私级别时,所述目标数据被提供至所述数据使用方;当所述目标数据属于高隐私级别时,所述目标数据被执行所述预设运算,以使相应的运算结果被提供至所述数据使用方。
可选的,所述预设运算的运算规则被预定义于所述数据授权智能合约中;或者,所述预设运算的运算规则由所述数据获取交易传入所述数据授权智能合约。
可选的,所述目标数据和/或所述运算结果被所述数据授权智能合约写入交易日志 的交易执行结果事件中,以由所述数据使用方进行监听并获取。
可选的,还包括:
数据加密单元705,使所述区块链节点在可信执行环境中对所述目标数据进行加密,得到加密后目标数据,以存储于所述区块链节点对应的数据库中;
数据运算单元706,使所述区块链节点在所述可信执行环境中执行所述数据授权智能合约,以将所述加密后目标数据读入所述可信执行环境中进行解密后,由所述数据授权智能合约执行所述预设运算。
可选的,还包括:
交易解密单元707,使所述区块链节点在收到所述数据所有方提交的隐私存证交易后,在所述可信执行环境中对所述隐私存证交易进行解密,以得到交易内容中包含的所述目标数据;
或者,数据生成单元708,使所述区块链节点在收到所述数据所有方提交的存证交易后,在所述可信执行环境中执行相应的交易内容,以生成所述目标数据。
可选的,所述区块链节点存储了所述目标数据的数字摘要,所述目标数据由所述数据所有方存储于链下渠道;其中,所述数据授权智能合约通过调用预言机智能合约,使所述预言机智能合约从所述链下渠道获取所述目标数据,以由所述数据授权智能合约执行所述预设运算。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
在一个典型的配置中,计算机包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法 或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
在本说明书一个或多个实施例使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本说明书一个或多个实施例可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
以上所述仅为本说明书一个或多个实施例的较佳实施例而已,并不用以限制本说明书一个或多个实施例,凡在本说明书一个或多个实施例的精神和原则之内,所做的任 何修改、等同替换、改进等,均应包含在本说明书一个或多个实施例保护的范围之内。

Claims (12)

  1. 一种基于智能合约的数据授权方法,包括:
    区块链节点接收数据使用方提交的数据获取交易,所述数据获取交易用于请求获取数据所有方持有的目标数据;
    所述区块链节点执行所述数据获取交易调用的数据授权智能合约,所述数据授权智能合约用于在确认所述数据使用方已获得授权时获取所述目标数据,使所述数据使用方获得所述目标数据和/或对所述目标数据执行预设运算后得到的运算结果。
  2. 根据权利要求1所述的方法,所述数据授权智能合约存在对应的授权方名单;其中,所述数据授权智能合约在确认所述数据使用方位于所述授权方名单内时,确认所述数据使用方已获得授权。
  3. 根据权利要求1所述的方法,还包括:
    所述区块链节点根据所述数据使用方提交的授权请求交易,调用所述数据授权智能合约中定义的请求接口,使所述数据授权智能合约在交易日志中写入授权请求事件,以由所述数据所有方进行监听;
    所述区块链节点根据所述数据所有方提交的授权确认交易,调用所述数据授权智能合约中定义的授权接口,使所述数据授权智能合约将所述数据使用方标记为已获得授权。
  4. 根据权利要求1所述的方法,当所述目标数据属于低隐私级别时,所述目标数据被提供至所述数据使用方;当所述目标数据属于高隐私级别时,所述目标数据被执行所述预设运算,以使相应的运算结果被提供至所述数据使用方。
  5. 根据权利要求1所述的方法,所述预设运算的运算规则被预定义于所述数据授权智能合约中;或者,所述预设运算的运算规则由所述数据获取交易传入所述数据授权智能合约。
  6. 根据权利要求1所述的方法,所述目标数据和/或所述运算结果被所述数据授权智能合约写入交易日志的交易执行结果事件中,以由所述数据使用方进行监听并获取。
  7. 根据权利要求1所述的方法,还包括:
    所述区块链节点在可信执行环境中对所述目标数据进行加密,得到加密后目标数据,以存储于所述区块链节点对应的数据库中;
    所述区块链节点在所述可信执行环境中执行所述数据授权智能合约,以将所述加密后目标数据读入所述可信执行环境中进行解密后,由所述数据授权智能合约执行所述预设运算。
  8. 根据权利要求7所述的方法,还包括:
    所述区块链节点在收到所述数据所有方提交的隐私存证交易后,在所述可信执行环境中对所述隐私存证交易进行解密,以得到交易内容中包含的所述目标数据;
    或者,所述区块链节点在收到所述数据所有方提交的存证交易后,在所述可信执行环境中执行相应的交易内容,以生成所述目标数据。
  9. 根据权利要求1所述的方法,所述区块链节点存储了所述目标数据的数字摘要,所述目标数据由所述数据所有方存储于链下渠道;其中,所述数据授权智能合约通过调用预言机智能合约,使所述预言机智能合约从所述链下渠道获取所述目标数据,以由所述数据授权智能合约执行所述预设运算。
  10. 一种基于智能合约的数据授权装置,包括:
    接收单元,使区块链节点接收数据使用方提交的数据获取交易,所述数据获取交易用于请求获取数据所有方持有的目标数据;
    执行单元,使所述区块链节点执行所述数据获取交易调用的数据授权智能合约,所述数据授权智能合约用于在确认所述数据使用方已获得授权时获取所述目标数据,使所述数据使用方获得所述目标数据和/或对所述目标数据执行预设运算后得到的运算结果。
  11. 一种电子设备,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器通过运行所述可执行指令以实现如权利要求1-9中任一项所述的方法。
  12. 一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如权利要求1-9中任一项所述的方法。
PCT/CN2020/072038 2019-07-31 2020-01-14 基于智能合约的数据授权方法及装置 WO2021017433A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US16/779,228 US11057189B2 (en) 2019-07-31 2020-01-31 Providing data authorization based on blockchain
US17/185,522 US20210184836A1 (en) 2019-07-31 2021-02-25 Providing data authorization based on blockchain

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910704682.7A CN110473096A (zh) 2019-07-31 2019-07-31 基于智能合约的数据授权方法及装置
CN201910704682.7 2019-07-31

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/779,228 Continuation US11057189B2 (en) 2019-07-31 2020-01-31 Providing data authorization based on blockchain

Publications (1)

Publication Number Publication Date
WO2021017433A1 true WO2021017433A1 (zh) 2021-02-04

Family

ID=68509471

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/072038 WO2021017433A1 (zh) 2019-07-31 2020-01-14 基于智能合约的数据授权方法及装置

Country Status (3)

Country Link
CN (1) CN110473096A (zh)
TW (1) TWI737200B (zh)
WO (1) WO2021017433A1 (zh)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112819634A (zh) * 2021-02-25 2021-05-18 成都质数斯达克科技有限公司 交易处理方法、装置、电子设备及可读存储介质
CN113128992A (zh) * 2021-04-30 2021-07-16 支付宝(杭州)信息技术有限公司 一种基于知识产权使用授权的支付方法
CN113781245A (zh) * 2021-09-10 2021-12-10 杭州宇链科技有限公司 赋能安全生产保险的隐私计算系统及方法
CN113806443A (zh) * 2021-08-19 2021-12-17 西安电子科技大学 一种数据可信存储方法、系统、介质、设备及终端
CN114119046A (zh) * 2021-11-25 2022-03-01 支付宝(杭州)信息技术有限公司 基于区块链系统的商品设计的授权使用方法及装置
CN114301675A (zh) * 2021-12-28 2022-04-08 杭州趣链科技有限公司 隐私数据交易方法、系统、计算机设备和存储介质
CN114679274A (zh) * 2021-12-31 2022-06-28 支付宝(杭州)信息技术有限公司 跨子网交互的权限控制方法及装置、电子设备、存储介质
CN115115249A (zh) * 2022-07-13 2022-09-27 北京市燃气集团有限责任公司 燃气管道甲烷排放量核算方法、装置、设备及存储介质
WO2023050556A1 (zh) * 2021-09-28 2023-04-06 中诚区块链研究院(南京)有限公司 一种共识智能合约算法
CN117997654A (zh) * 2024-04-03 2024-05-07 湖南天河国云科技有限公司 边缘计算架构中的数据处理方法、装置和计算机设备
CN117997654B (zh) * 2024-04-03 2024-06-07 湖南天河国云科技有限公司 边缘计算架构中的数据处理方法、装置和计算机设备

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11251963B2 (en) 2019-07-31 2022-02-15 Advanced New Technologies Co., Ltd. Blockchain-based data authorization method and apparatus
CN110473096A (zh) * 2019-07-31 2019-11-19 阿里巴巴集团控股有限公司 基于智能合约的数据授权方法及装置
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
CN111046055A (zh) * 2019-12-11 2020-04-21 杭州趣链科技有限公司 一种区块链全局配置的变更方法、设备和存储介质
CN111143890B (zh) * 2019-12-26 2022-09-20 百度在线网络技术(北京)有限公司 一种基于区块链的计算处理方法、装置、设备和介质
CN111104649A (zh) * 2019-12-31 2020-05-05 阿尔法云计算(深圳)有限公司 数据处理方法、服务器及存储介质
CN111209602B (zh) * 2020-01-15 2022-11-11 阿尔法云计算(深圳)有限公司 基于区块链的数据开发方法、系统、服务器及存储介质
US11310051B2 (en) 2020-01-15 2022-04-19 Advanced New Technologies Co., Ltd. Blockchain-based data authorization method and apparatus
CN111092914B (zh) * 2020-03-18 2020-06-26 支付宝(杭州)信息技术有限公司 访问外部数据的方法及装置
CN111898153B (zh) * 2020-03-18 2024-05-03 支付宝(杭州)信息技术有限公司 调用合约的方法及装置
CN111539013A (zh) * 2020-03-24 2020-08-14 山东爱城市网信息技术有限公司 一种数据使用、智能合约写入、申请方法、设备及介质
CN111709029A (zh) * 2020-05-14 2020-09-25 哈希森林(北京)科技有限公司 基于区块链和可信计算网络的数据运算和隐私交易方法
CN111936995A (zh) 2020-06-08 2020-11-13 支付宝实验室(新加坡)有限公司 海关清关数据的分布式存储
CN111989663A (zh) 2020-06-08 2020-11-24 支付宝实验室(新加坡)有限公司 基于区块链的智能合约池
EP3844655B1 (en) 2020-06-08 2023-05-03 Alipay Labs (Singapore) Pte. Ltd. Managing user authorizations for blockchain-based custom clearance services
EP3841507B1 (en) 2020-06-08 2023-04-26 Alipay Labs (Singapore) Pte. Ltd. User management of blockchain-based custom clearance service platform
EP3844699A4 (en) 2020-06-08 2021-08-18 Alipay Labs (Singapore) Pte. Ltd. BLOCKCHAIN-BASED PROCESSING OF IMPORT CLEARANCE DATA
EP3844654B1 (en) 2020-06-08 2023-05-17 Alipay Labs (Singapore) Pte. Ltd. Blockchain-based document registration for custom clearance
CN111858769B (zh) * 2020-07-28 2024-05-03 北京金山云网络技术有限公司 数据使用方法、装置、节点设备及存储介质
CN113010115B (zh) * 2021-03-18 2022-11-22 腾讯科技(深圳)有限公司 区块链节点中的数据处理方法及相关设备
CN113077260A (zh) * 2021-04-13 2021-07-06 支付宝(杭州)信息技术有限公司 基于区块链的数据访问方法、装置及电子设备

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632268A (zh) * 2018-04-28 2018-10-09 腾讯科技(深圳)有限公司 区块链访问的鉴权方法和装置、存储介质、电子装置
US20180293556A1 (en) * 2017-04-05 2018-10-11 Samsung Sds Co., Ltd. Method and system for processing blockchain-based real-time transaction
CN109450910A (zh) * 2018-11-26 2019-03-08 远光软件股份有限公司 基于区块链的数据共享方法、数据共享网络及电子设备
CN110011996A (zh) * 2019-03-26 2019-07-12 阿里巴巴集团控股有限公司 基于区块链的应用授权方法及装置和电子设备
CN110060162A (zh) * 2019-03-29 2019-07-26 阿里巴巴集团控股有限公司 基于区块链的数据授权、查询方法和装置
CN110473096A (zh) * 2019-07-31 2019-11-19 阿里巴巴集团控股有限公司 基于智能合约的数据授权方法及装置
CN110473094A (zh) * 2019-07-31 2019-11-19 阿里巴巴集团控股有限公司 基于区块链的数据授权方法及装置

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101184865B1 (ko) * 2011-07-20 2012-09-20 주식회사 하렉스인포텍 휴대용단말기를 이용한 복합결제시스템 및 복합결제방법
US20230196328A1 (en) * 2013-02-14 2023-06-22 Advanced New Technologies Co., Ltd. Data interaction method and device, and offline credit payment method and device
CN106933548B (zh) * 2015-12-29 2021-01-12 阿里巴巴集团控股有限公司 全局信息获取、处理及更新、方法、装置和系统
CN105610865A (zh) * 2016-02-18 2016-05-25 中国银联股份有限公司 一种基于交易数据认证用户身份的方法和装置
GB2561727A (en) * 2016-02-23 2018-10-24 Nchain Holdings Ltd Blockchain-based exchange with tokenisation
KR20180114942A (ko) * 2016-02-23 2018-10-19 엔체인 홀딩스 리미티드 분산형 해시 테이블 및 블록체인을 사용하여 컴퓨터 소프트웨어를 보호하기 위한 방법 및 시스템
GB201611948D0 (en) * 2016-07-08 2016-08-24 Kalypton Int Ltd Distributed transcation processing and authentication system
CN106991317B (zh) * 2016-12-30 2020-01-21 中国银联股份有限公司 安全验证方法、平台、装置和系统
TW201828200A (zh) * 2017-01-24 2018-08-01 阿里巴巴集團服務有限公司 一種資料處理方法和裝置
GB201706071D0 (en) * 2017-04-18 2017-05-31 Nchain Holdings Ltd Computer-implemented system and method
CN107545419B (zh) * 2017-07-19 2021-07-13 招商银行股份有限公司 汇款处理方法、系统及计算机可读存储介质
TWI629604B (zh) * 2017-07-20 2018-07-11 中華電信股份有限公司 Data set transaction and computing resource integration method
CN107391944A (zh) * 2017-07-27 2017-11-24 北京太云科技有限公司 一种基于区块链的电子病历共享系统
CN109462472A (zh) * 2017-09-06 2019-03-12 阿里巴巴集团控股有限公司 数据加密和解密的方法、装置和系统
CN108234515B (zh) * 2018-01-25 2020-07-24 中国科学院合肥物质科学研究院 一种基于智能合约的自认证数字身份管理系统及其方法
TWM561279U (zh) * 2018-02-12 2018-06-01 林俊良 用於處理金融資產之策略模型腳本之區塊鏈系統與節點伺服器
TWI685767B (zh) * 2018-06-07 2020-02-21 艾維克科技股份有限公司 去中心化的軟體資訊建立系統及其方式
CN109034833B (zh) * 2018-06-16 2021-07-23 复旦大学 一种基于区块链的产品追溯信息管理系统及方法
CN108985089B (zh) * 2018-08-01 2020-08-07 清华大学 互联网数据共享系统
CN109190410B (zh) * 2018-09-26 2020-05-19 华中科技大学 一种云存储环境下的基于区块链的日志行为审计方法
CN109347941A (zh) * 2018-10-10 2019-02-15 南京简诺特智能科技有限公司 一种基于区块链的数据共享平台及其实现方法
CN109636503A (zh) * 2018-11-06 2019-04-16 福建省辅城网络科技有限公司 一种基于线上商务社交的商品定制交易与存证方法
CN109977697A (zh) * 2019-04-03 2019-07-05 陕西医链区块链集团有限公司 一种区块链的数据授权方法

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180293556A1 (en) * 2017-04-05 2018-10-11 Samsung Sds Co., Ltd. Method and system for processing blockchain-based real-time transaction
CN108632268A (zh) * 2018-04-28 2018-10-09 腾讯科技(深圳)有限公司 区块链访问的鉴权方法和装置、存储介质、电子装置
CN109450910A (zh) * 2018-11-26 2019-03-08 远光软件股份有限公司 基于区块链的数据共享方法、数据共享网络及电子设备
CN110011996A (zh) * 2019-03-26 2019-07-12 阿里巴巴集团控股有限公司 基于区块链的应用授权方法及装置和电子设备
CN110060162A (zh) * 2019-03-29 2019-07-26 阿里巴巴集团控股有限公司 基于区块链的数据授权、查询方法和装置
CN110473096A (zh) * 2019-07-31 2019-11-19 阿里巴巴集团控股有限公司 基于智能合约的数据授权方法及装置
CN110473094A (zh) * 2019-07-31 2019-11-19 阿里巴巴集团控股有限公司 基于区块链的数据授权方法及装置

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112819634A (zh) * 2021-02-25 2021-05-18 成都质数斯达克科技有限公司 交易处理方法、装置、电子设备及可读存储介质
CN112819634B (zh) * 2021-02-25 2023-06-02 成都质数斯达克科技有限公司 交易处理方法、装置、电子设备及可读存储介质
CN113128992A (zh) * 2021-04-30 2021-07-16 支付宝(杭州)信息技术有限公司 一种基于知识产权使用授权的支付方法
CN113806443A (zh) * 2021-08-19 2021-12-17 西安电子科技大学 一种数据可信存储方法、系统、介质、设备及终端
CN113806443B (zh) * 2021-08-19 2024-04-05 西安电子科技大学 一种数据可信存储方法、系统、介质、设备及终端
CN113781245A (zh) * 2021-09-10 2021-12-10 杭州宇链科技有限公司 赋能安全生产保险的隐私计算系统及方法
CN113781245B (zh) * 2021-09-10 2023-10-13 杭州宇链科技有限公司 赋能安全生产保险的隐私计算系统及方法
WO2023050556A1 (zh) * 2021-09-28 2023-04-06 中诚区块链研究院(南京)有限公司 一种共识智能合约算法
CN114119046A (zh) * 2021-11-25 2022-03-01 支付宝(杭州)信息技术有限公司 基于区块链系统的商品设计的授权使用方法及装置
CN114301675A (zh) * 2021-12-28 2022-04-08 杭州趣链科技有限公司 隐私数据交易方法、系统、计算机设备和存储介质
CN114679274A (zh) * 2021-12-31 2022-06-28 支付宝(杭州)信息技术有限公司 跨子网交互的权限控制方法及装置、电子设备、存储介质
CN115115249A (zh) * 2022-07-13 2022-09-27 北京市燃气集团有限责任公司 燃气管道甲烷排放量核算方法、装置、设备及存储介质
CN117997654A (zh) * 2024-04-03 2024-05-07 湖南天河国云科技有限公司 边缘计算架构中的数据处理方法、装置和计算机设备
CN117997654B (zh) * 2024-04-03 2024-06-07 湖南天河国云科技有限公司 边缘计算架构中的数据处理方法、装置和计算机设备

Also Published As

Publication number Publication date
TWI737200B (zh) 2021-08-21
CN110473096A (zh) 2019-11-19
TW202107458A (zh) 2021-02-16

Similar Documents

Publication Publication Date Title
WO2021017433A1 (zh) 基于智能合约的数据授权方法及装置
WO2021017441A1 (zh) 基于区块链的数据授权方法及装置
WO2021017444A1 (zh) 基于区块链的数据授权方法及装置
US11057189B2 (en) Providing data authorization based on blockchain
US11831656B2 (en) Providing data authorization based on blockchain
US11398914B2 (en) Blockchain-based data authorization method and apparatus
US11310051B2 (en) Blockchain-based data authorization method and apparatus
WO2021179743A1 (zh) 区块链中账户隐私信息的查询方法及装置
WO2021088547A1 (zh) 基于区块链账户的隐私数据查询方法及装置
WO2021088548A1 (zh) 基于智能合约的隐私数据查询方法及装置
WO2021088536A1 (zh) 基于链下授权的隐私数据查询方法及装置
WO2021088546A1 (zh) 基于区块链账户的隐私数据查询方法及装置
US11726968B2 (en) Methods, apparatuses, and devices for transferring data assets based on blockchain
WO2021088549A1 (zh) 基于链代码的权限查询配置方法及装置
WO2021088533A1 (zh) 隐私数据的共享方法及装置
WO2021088535A1 (zh) 基于智能合约的隐私数据查询方法及装置
US11233660B2 (en) Confidential blockchain transactions
WO2021088543A1 (zh) 基于智能合约的权限查询配置方法及装置
WO2020233635A1 (zh) 结合多类型维度的条件限制的收据存储方法和节点
WO2020233627A1 (zh) 多类型维度的收据存储方法和节点
CN114756903A (zh) 基于区块链智能合约的遗嘱处理方法、装置及计算设备

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: 20846366

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20846366

Country of ref document: EP

Kind code of ref document: A1