US 12,445,316 B2
Blockchain data processing method, apparatus, and device, computer-readable storage medium, and computer program product
Zongyou Wang, Shenzhen (CN); Jun Liang, Shenzhen (CN); Like Shu, Shenzhen (CN); Hu Lan, Shenzhen (CN); Yifang Shi, Shenzhen (CN); Zhiyong Liao, Shenzhen (CN); Qucheng Liu, Shenzhen (CN); Hanqing Liu, Shenzhen (CN); Yangjun Huang, Shenzhen (CN); Kaixuan Nie, Shenzhen (CN); and Gengliang Zhu, Shenzhen (CN)
Assigned to TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED, Shenzhen (CN)
Filed by Tencent Technology (Shenzhen) Company Limited, Shenzhen (CN)
Filed on Nov. 15, 2023, as Appl. No. 18/510,310.
Application 18/510,310 is a continuation of application No. PCT/CN2023/114284, filed on Aug. 22, 2023.
Claims priority of application No. 202211637944.0 (CN), filed on Dec. 15, 2022; and application No. 202211637945.5 (CN), filed on Dec. 15, 2022.
Prior Publication US 2024/0205032 A1, Jun. 20, 2024
Int. Cl. H04L 29/06 (2006.01); H04L 9/00 (2022.01)
CPC H04L 9/50 (2022.05) 20 Claims
OG exemplary drawing
 
1. A blockchain data processing method, performed by an electronic device acting as a local consensus node in a local consensus network, the method comprising:
packaging a local consensus transaction, a main chain binding height, and a main chain read dataset into a local consensus block, the local consensus transaction being a service transaction executed in the local consensus network, wherein the local consensus network is deployed in a service network of a multi-layer chain network, and a core consensus network comprising a core consensus node is deployed in the multi-layer chain network and independent of the service network, and the main chain binding height being a block height of a first global consensus block, the first global consensus block being synchronized from a main chain of the core consensus node when packaging the local consensus transaction, the main chain read dataset being obtained by clearing from a first global contract state and being used for executing the local consensus transaction, and the first global contract state being a read dataset that is read when a global consensus transaction in the first global consensus block is executed;
broadcasting the local consensus block to a local verification node, the local verification node being configured to obtain a voting consensus result corresponding to a transaction execution result of the local consensus transaction when a synchronized block height is greater than or equal to the main chain binding height, and a synchronized read dataset is consistent with the main chain read dataset, and the local verification node being a consensus node other than the local consensus node in the local consensus network;
when determining that consensus is reached based on the voting consensus result returned by the local verification node, uploading the local consensus block to a local consensus sub-chain corresponding to the local consensus network, and writing the local consensus block into a local consensus ledger database;
invoking a local consensus service contract on the local consensus sub-chain to perform the following processing:
obtaining a target block height from a main chain sub-ledger database, wherein the target block height is a block height of a second global consensus block that is synchronized from the main chain through the core consensus node, and the second global consensus block is a global consensus block that is synchronized from the main chain when consensus on the local consensus block is reached;
searching, when the target block height is greater than or equal to the main chain binding height, a read dataset associated with the first global consensus block in the main chain sub-ledger database, to obtain a target read dataset; and
using a key-value pair in the target read dataset as a first key-value pair, using a key-value pair in the main chain read dataset as a second key-value pair, and executing, when the first key-value pair is consistent with the second key-value pair, the local consensus transaction in the local consensus block, to obtain the transaction execution result.