CPC G06Q 20/3827 (2013.01) [G06Q 20/38215 (2013.01); G06Q 20/407 (2013.01); G06Q 20/4014 (2013.01); H04L 9/3297 (2013.01)] | 9 Claims |
1. A method for control of blockchain data access based on a smart contract, comprising:
obtaining, by a blockchain node, an access operation request of an institution, wherein the access operation request includes a transaction identifier of a transaction to be accessed;
according to the transaction identifier, determining, by the blockchain node, a blockchain state corresponding to the transaction identifier, wherein the blockchain state includes a hash value of a transaction corresponding to a last time change of the blockchain state;
according to the hash value of the transaction corresponding to the last time change in the blockchain state and an identifier of the institution, performing, by the blockchain node, data access control on the institution to obtain a control result, wherein performing the data access control comprises:
according to the hash value of the transaction corresponding to the last time change in the blockchain state, determining a timestamp of a block corresponding to the hash value;
according to the identifier of the institution, determining a timestamp of a configuration block of the institution;
determining whether the timestamp of the configuration block of the institution is earlier than the timestamp of the block corresponding to the hash value; and
when the timestamp of the configuration block of the institution is earlier than the timestamp of the block corresponding to the hash value, executing an access operation of the institution, determining result of the access operation as the control result, and when the timestamp of the configuration block of the institution is not earlier than the timestamp of the block corresponding to the hash value, determining that the institution is not authorized to access the transaction, and determining access denial information as the control result; and
transmitting, by the blockchain node, the control result to the institution.
|