Blockchain-based data detection method and apparatus, device, storage medium, and program product
View Patent ↗This application discloses a blockchain-based data detection method performed by a computer device. The method includes: calling an oracle smart contract based on a verification smart contract to initiate a verification request for a trusted execution environment platform, where the verification request includes an environment signature corresponding to the trusted execution environment platform; triggering an environment verification event comprising the environment signature based on the verification request, wherein an oracle node is configured to obtain verification information about the trusted execution environment platform from a verification service node in response to the environment verification event; and obtaining the verification information from the oracle node and returning the verification information to the verification smart contract.
1 . A blockchain-based data detection method performed by a computer device, the method comprising:
receiving, from a trusted execution environment platform, an environment signature of the trusted execution environment platform, the trusted execution environment platform being deployed in a local area network;
calling an oracle smart contract based on a verification smart contract to initiate a verification request for the trusted execution environment platform, the verification request comprising the environment signature of the trusted execution environment platform and the oracle smart contract and the verification smart contract being deployed on a blockchain network within the local area network;
triggering an environment verification event comprising the environment signature based on the verification request, including triggering an oracle node to obtain verification information about the trusted execution environment platform from a verification service node external to the local area network in response to the environment verification event, wherein the oracle node being deployed in a demilitarized zone between the blockchain network and the verification service node external to the local area network;
obtaining the verification information from the oracle node and returning the verification information to the verification smart contract;
calling the oracle smart contract to initiate a signature anomaly obtaining request for the trusted execution environment platform;
triggering a signature anomaly obtaining event based on the signature anomaly obtaining request, wherein the oracle node is configured to obtain signature anomaly information associated with the trusted execution environment platform from the verification service node in response to the signature anomaly obtaining event; and
when the signature anomaly information indicates that the trusted execution environment platform is a normal platform, performing the process of calling the oracle smart contract to initiate the verification request for the trusted execution environment platform.
2 . The method according to claim 1 , wherein before the initiation of a verification request for a trusted execution environment platform, the method further comprises:
receiving a usage request for the trusted execution environment platform from a service device, wherein the usage request comprises: an object credential of a trusted environment object in the trusted execution environment platform;
performing the process of calling an oracle smart contract to initiate a verification request for the trusted execution environment platform after the object credential passes verification; and
transmitting a usage failure message to the service device when the object credential fails the verification.
3 . The method according to claim 1 , wherein before the initiation of a verification request for a trusted execution environment platform, the method further comprises:
constructing a communication channel with the trusted execution environment platform; and
obtaining the environment signature corresponding to the trusted execution environment platform through the communication channel.
4 . The method according to claim 3 , wherein the constructing a communication channel to the trusted execution environment platform comprises:
obtaining a first public parameter, a second public parameter, and a block private parameter, and generating a block public key according to the first public parameter, the second public parameter, and the block private parameter; and
obtaining an environment public key corresponding to the trusted execution environment platform, and constructing the communication channel to the trusted execution environment platform based on the block public key and the environment public key, wherein
the environment public key is generated by the trusted execution environment platform according to the first public parameter, the second public parameter, and an environment private parameter.
5 . The method according to claim 1 , wherein the triggering an environment verification event comprising the environment signature based on the verification request comprises:
determining an event name and a processing object indicating the verification service node that responds to the verification request for the verification request; and
triggering the environment verification event according to the event name, the environment signature, and the processing object, wherein
the oracle node is configured to determine the verification service node and obtain the verification information about the trusted execution environment platform from the verification service node, and the verification information is comprised in the environment verification event.
6 . The method according to claim 1 , wherein the verification information comprises a verification result about the trusted execution environment platform and a verification signature of the verification service node about the verification result; and the method further comprises:
obtaining a verification public key of the verification service node based on the verification smart contract, and verifying the verification signature with the verification public key; and
generating an object verification block according to the verification result and the verification signature when the verification signature passes verification, and adding the object verification block to a blockchain.
7 . A computer device, comprising a processor, a memory, and an input/output interface,
the processor being connected to the memory and the input/output interface respectively, the input/output interface being configured to receive and output data, the memory being configured to store a computer program that, when executed by the processor, causes the computer device to perform a blockchain-based data detection method including:
receiving, from a trusted execution environment platform, an environment signature of the trusted execution environment platform, the trusted execution environment platform being deployed in a local area network;
calling an oracle smart contract based on a verification smart contract to initiate a verification request for the trusted execution environment platform, the verification request comprising the environment signature of the trusted execution environment platform and the oracle smart contract and the verification smart contract being deployed on a blockchain network within the local area network;
triggering an environment verification event comprising the environment signature based on the verification request, including triggering an oracle node to obtain verification information about the trusted execution environment platform from a verification service node external to the local area network in response to the environment verification event, wherein the oracle node being deployed in a demilitarized zone between the blockchain network and the verification service node external to the local area network;
obtaining the verification information from the oracle node and returning the verification information to the verification smart contract;
calling the oracle smart contract to initiate a signature anomaly obtaining request for the trusted execution environment platform;
triggering a signature anomaly obtaining event based on the signature anomaly obtaining request, wherein the oracle node is configured to obtain signature anomaly information associated with the trusted execution environment platform from the verification service node in response to the signature anomaly obtaining event; and
when the signature anomaly information indicates that the trusted execution environment platform is a normal platform, performing the process of calling the oracle smart contract to initiate the verification request for the trusted execution environment platform.
8 . The computer device according to claim 7 , wherein before the initiation of a verification request for a trusted execution environment platform, the method further comprises:
receiving a usage request for the trusted execution environment platform from a service device, wherein the usage request comprises: an object credential of a trusted environment object in the trusted execution environment platform;
performing the process of calling an oracle smart contract to initiate a verification request for the trusted execution environment platform after the object credential passes verification; and
transmitting a usage failure message to the service device when the object credential fails the verification.
9 . The computer device according to claim 7 , wherein before the initiation of a verification request for a trusted execution environment platform, the method further comprises:
constructing a communication channel with the trusted execution environment platform; and
obtaining the environment signature corresponding to the trusted execution environment platform through the communication channel.
10 . The computer device according to claim 9 , wherein the constructing a communication channel to the trusted execution environment platform comprises:
obtaining a first public parameter, a second public parameter, and a block private parameter, and generating a block public key according to the first public parameter, the second public parameter, and the block private parameter; and
obtaining an environment public key corresponding to the trusted execution environment platform, and constructing the communication channel to the trusted execution environment platform based on the block public key and the environment public key, wherein
the environment public key is generated by the trusted execution environment platform according to the first public parameter, the second public parameter, and an environment private parameter.
11 . The computer device according to claim 7 , wherein the triggering an environment verification event comprising the environment signature based on the verification request comprises:
determining an event name and a processing object indicating the verification service node that responds to the verification request for the verification request; and
triggering the environment verification event according to the event name, the environment signature, and the processing object, wherein
the oracle node is configured to determine the verification service node and obtain the verification information about the trusted execution environment platform from the verification service node, and the verification information is comprised in the environment verification event.
12 . The computer device according to claim 7 , wherein the verification information comprises a verification result about the trusted execution environment platform and a verification signature of the verification service node about the verification result; and the method further comprises:
obtaining a verification public key of the verification service node based on the verification smart contract, and verifying the verification signature with the verification public key; and
generating an object verification block according to the verification result and the verification signature when the verification signature passes verification, and adding the object verification block to a blockchain.
13 . A non-transitory computer-readable storage medium, the computer-readable storage medium storing a computer program that, when executed by a processor of a computer device, causes the computer device to perform a blockchain-based data detection method including:
receiving, from a trusted execution environment platform, an environment signature of the trusted execution environment platform, the trusted execution environment platform being deployed in a local area network;
calling an oracle smart contract based on a verification smart contract to initiate a verification request for the trusted execution environment platform, the verification request comprising the environment signature of the trusted execution environment platform and the oracle smart contract and the verification smart contract being deployed on a blockchain network within the local area network;
triggering an environment verification event comprising the environment signature based on the verification request, including triggering an oracle node to obtain verification information about the trusted execution environment platform from a verification service node external to the local area network in response to the environment verification event, wherein the oracle node being deployed in a demilitarized zone between the blockchain network and the verification service node external to the local area network;
obtaining the verification information from the oracle node and returning the verification information to the verification smart contract;
calling the oracle smart contract to initiate a signature anomaly obtaining request for the trusted execution environment platform;
triggering a signature anomaly obtaining event based on the signature anomaly obtaining request, wherein the oracle node is configured to obtain signature anomaly information associated with the trusted execution environment platform from the verification service node in response to the signature anomaly obtaining event; and
when the signature anomaly information indicates that the trusted execution environment platform is a normal platform, performing the process of calling the oracle smart contract to initiate the verification request for the trusted execution environment platform.
14 . The non-transitory computer-readable storage medium according to claim 13 , wherein before the initiation of a verification request for a trusted execution environment platform, the method further comprises:
receiving a usage request for the trusted execution environment platform from a service device, wherein the usage request comprises: an object credential of a trusted environment object in the trusted execution environment platform;
performing the process of calling an oracle smart contract to initiate a verification request for the trusted execution environment platform after the object credential passes verification; and
transmitting a usage failure message to the service device when the object credential fails the verification.
15 . The non-transitory computer-readable storage medium according to claim 13 , wherein before the initiation of a verification request for a trusted execution environment platform, the method further comprises:
constructing a communication channel with the trusted execution environment platform; and
obtaining the environment signature corresponding to the trusted execution environment platform through the communication channel.
16 . The non-transitory computer-readable storage medium according to claim 13 , wherein the triggering an environment verification event comprising the environment signature based on the verification request comprises:
determining an event name and a processing object indicating the verification service node that responds to the verification request for the verification request; and
triggering the environment verification event according to the event name, the environment signature, and the processing object, wherein
the oracle node is configured to determine the verification service node and obtain the verification information about the trusted execution environment platform from the verification service node, and the verification information is comprised in the environment verification event.
17 . The non-transitory computer-readable storage medium according to claim 13 , wherein the verification information comprises a verification result about the trusted execution environment platform and a verification signature of the verification service node about the verification result; and the method further comprises:
obtaining a verification public key of the verification service node based on the verification smart contract, and verifying the verification signature with the verification public key; and
generating an object verification block according to the verification result and the verification signature when the verification signature passes verification, and adding the object verification block to a blockchain.