US 12,141,796 B2
Blockchain-based data processing method, device, and medium
Wei He, Singapore (SG); Shuang Wu, Singapore (SG); and Tsz Hon Yuen, Singapore (SG)
Assigned to Huawei Technologies Co., Ltd., Shenzhen (CN)
Filed by Huawei Technologies Co., Ltd., Shenzhen (CN)
Filed on Jul. 2, 2021, as Appl. No. 17/366,969.
Application 17/366,969 is a continuation of application No. PCT/SG2019/050001, filed on Jan. 3, 2019.
Prior Publication US 2021/0334796 A1, Oct. 28, 2021
Int. Cl. G06Q 20/38 (2012.01)
CPC G06Q 20/3825 (2013.01) [G06Q 20/389 (2013.01); G06Q 2220/00 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A data processing method, comprising:
sending, by a first client device, a channel creation message to a blockchain node device, wherein the blockchain node device is a miner device that is part of a main chain of a blockchain, wherein the channel creation message causes the blockchain node device to create an off-chain channel between the first client device and a second client device according to a preset channel creation smart contract, and determine that a fund status of the off-chain channel is a first state, wherein the off-chain channel is a wireless bidirectional communication technology channel other than the main chain of the blockchain; and
performing, by the first client device, a fund transferring transaction between the first client device and the second client device using the off-chain channel to update the fund status of the off-chain channel from the first state to a second state, wherein performing the fund transferring transaction comprises:
sending, by the first client device, a first channel closing message in the second state to the second client device on the off-chain channel, wherein the first channel closing message in the second state comprises fund information in the second state and a first hash lock in the second state, wherein the first channel closing message in the second state causes the second client device to switch the fund status from the first state to the second state based on the fund information in the second state, and wherein the first hash lock in the second state is a hash lock of the first client device in the second state;
receiving, by the first client device, a second signature in the second state and a second channel closing message in the second state from the second client device on the off-chain channel, wherein the second signature in the second state is obtained by signing the second channel closing message in the second state by the second client device based on a private key of the second client device, wherein the second channel closing message in the second state comprises the fund information in the second state, the first hash lock in the second state, and a second hash lock in the second state, and wherein the second hash lock in the second state is a hash lock of the second client device in the second state;
signing, by the first client device, a third channel closing message in the second state based on a private key of the first client device, to obtain a first signature in the second state; and
sending, by the first client device, the first signature in the second state to the second client device, wherein the third channel closing message in the second state comprises the fund information in the second state, the first hash lock in the second state, and the second hash lock in the second state;
wherein the blockchain node device is configured to receive a hash lock preimage of the first client device in the first state within a time corresponding to a preset time lock, wherein the blockchain node device performs a hash operation on the first hash lock preimage of the first client device in the first state according to a first channel closing smart contract, to obtain a hash value, wherein the blockchain node device compares the hash value with a first hash lock in the first state according to the first channel closing smart contract, wherein the first hash lock in the first state is a hash lock of the first client device in the first state, and wherein based on the hash value being the same as the first hash lock in the first state, the blockchain node device transfers a fund quota of the first client device in the first state to a fund address of the second client device on the blockchain according to the first channel closing smart contract.