Data processing method and apparatus
AssigneeAdvanced New Technologies Co., Ltd.
InventorHusen Wang
Life of this patent
Estimating the term…
Abstract
A data processing method may include: determining, by a transaction initiation node in a blockchain, transaction data of a transaction and information to be hidden in the transaction data; obtaining, by using the transaction data as an input of a predetermined one-way function, a transaction root of the transaction, and constructing, based on the transaction root, proof data corresponding to the information to be hidden; and, after signing the transaction root, initiating a transaction request to write the transaction root and the proof data on the blockchain, for a node in the blockchain to perform consensus verification on the transaction root and the proof data, and approve or reject the transaction request based on a verification result.
Claims20
A data processing method, comprising:
- determining, by a computing device of a transaction initiator, information to be hidden in transaction data;
- determining pre-transaction data and post-transaction data in the transaction data;
- obtaining, by using the pre-transaction data as an input of a first predetermined one-way function, an input transaction root that is output by the first predetermined one-way function;
- obtaining, by using the post-transaction data as an input of a second predetermined one-way function, an output transaction root that is output by the second predetermined one-way function, wherein the output transaction root is obtained by:
- constructing, according to the post-transaction data and a random number, a bottom layer of a predetermined one-way function tree, and
- determining the output transaction root corresponding to a top layer of the predetermined one-way function tree;
- constructing, according to the input transaction root and the output transaction root, proof data of validity of the information to be hidden;
- and
- sending, by the computing device of the transaction initiator, the input transaction root, the output transaction root, and the proof data to a computing device of a transaction receiver for the computing device of the transaction receiver to perform verification on the input transaction root and the output transaction root, and to initiate, after the verification succeeds, a transaction request to write the proof data and input transaction root and the output transaction root carrying signatures of the transaction initiator and the transaction receiver on a blockchain.
One or more non-transitory computer-readable storage media configured with instructions executable by one or more processors to cause the one or more processors to perform operations comprising:
- determining information to be hidden in transaction data;
- determining pre-transaction data and post-transaction data in the transaction data;
- obtaining, by using the pre-transaction data as an input of a first predetermined one-way function, an input transaction root that is output by the first predetermined one-way function;
- obtaining, by using the post-transaction data as an input of a second predetermined one-way function, an output transaction root that is output by the second predetermined one-way function, wherein the output transaction root is obtained by:
- constructing, according to the post-transaction data and a random number, a bottom layer of a predetermined one-way function tree, and
- determining the output transaction root corresponding to a top layer of the predetermined one-way function tree;
- constructing, according to the input transaction root and the output transaction root, proof data of validity of the information to be hidden;
- and
- sending the input transaction root, the output transaction root, and the proof data to a computing device of a transaction receiver for the computing device of the transaction receiver to perform verification on the input transaction root and the output transaction root, and to initiate, after the verification succeeds, a transaction request to write the proof data and input transaction root and the output transaction root carrying signatures of a transaction initiator and the transaction receiver on a blockchain.
An apparatus comprising:
- one or more processors;
- and
- a memory storing instructions executable by the one or more processors to cause the one or more processors to perform operations comprising:
- determining information to be hidden in transaction data;
- determining pre-transaction data and post-transaction data in the transaction data;
- obtaining, by using the pre-transaction data as an input of a first predetermined one-way function, an input transaction root that is output by the first predetermined one-way function;
- obtaining, by using the post-transaction data as an input of a second predetermined one-way function, an output transaction root that is output by the second predetermined one-way function, wherein the output transaction root is obtained by:
- constructing, according to the post-transaction data and a random number, a bottom layer of a predetermined one-way function tree, and
- determining the output transaction root corresponding to a top layer of the predetermined one-way function tree;
- constructing, according to the input transaction root and the output transaction root, proof data of validity of the information to be hidden;
- and
- sending the input transaction root, the output transaction root, and the proof data to a computing device of a transaction receiver for the computing device of the transaction receiver to perform verification on the input transaction root and the output transaction root, and to initiate, after the verification succeeds, a transaction request to write the proof data and input transaction root and the output transaction root carrying signatures of a transaction initiator and the transaction receiver on a blockchain.
Dependencies are inferred from the claim text.