Data processing method and apparatus based on blockchain network, electronic device, and storage medium
AssigneeTencent Technology (Shenzhen) Company Limited
InventorZhichao Du
Life of this patent
Estimating the term…
Abstract
A data processing method is provided for an electronic device. The method includes obtaining from a target node a transaction request for off-chain data, parsing the transaction request to obtain a transaction parameter and a chain height parameter of the target node, querying, according to the chain height parameter of the target node, for the off-chain data, in response to determining the off-chain data is present in the data manager, sending the off-chain data to the target node, and in response to determining the off-chain data is absent in the data manager, obtaining the off-chain data from a data source according to a type of the target node.
Claims20
A data processing method executed via an interplay between a first data manager and a second data manager both connected to a blockchain network, the first data manager and the second data manager each including a hardware processor, the method comprising:
- obtaining, by the second data manager, from a target node a transaction request for off-chain data, the target node being a smart phone, a smart pad, a laptop computer, or a desktop computer;
- parsing, by the second data manager, the transaction request to obtain a transaction parameter and a chain height parameter of the target node;
- querying, by the second data manager, according to the chain height parameter of the target node, for the off-chain data;
- in response to determining the off-chain data is present in the second data manager, sending, by the second data manager, the off-chain data to the target node;
- and
- in response to determining the off-chain data is absent in the second data manager, determining, by the second data manager, a type of the target node according to the transaction parameter, sending, by the second data manager, a data request for the off-chain data to the first data manger, the data request including the type of the target node according to the transaction parameter;
- obtaining, by the first data manager, the off-chain data from a data source according to the type of the target node as determined and according to the data request from the second data manager;
- sending, by the first data manager, the off-chain data to the first data manager;
- and
- receiving, by the second data manger, the off-chain data from the first data manager;
- and
- sending, by the second data manager, the off-chain data to the target node.
A data processing apparatus including a first data manager and a second data manager both connected to a blockchain network, the first data manager and the second data manager each comprising:
- a memory;
- and a processor coupled to the memory, the processor being positioned to perform:
- obtaining, by the second data manager, from a target node a transaction request for off-chain data;
- parsing, by the second data manager, the transaction request to obtain a transaction parameter and a chain height parameter of the target node, the target node being a smart phone, a smart pad, a laptop computer, or a desktop computer;
- querying, by the second data manager, according to the chain height parameter of the target node, for the off-chain data;
- in response to determining the off-chain data is present in the second data manager, sending, by the second data manager, the off-chain data to the target node;
- and
- in response to determining the off-chain data is absent in the second data manager, determining, by the second data manager, a type of the target node according to the transaction parameter, sending, by the second data manager, a data request for the off-chain data to the first data manger, the data request including the type of the target node according to the transaction parameter;
- obtaining, by the first data manager, the off-chain data from a data source according to the type of the target node as determined and according to the data request from the second data manager;
- sending, by the first data manager, the off-chain data to the first data manager;
- and
- receiving, by the second data manger, the off-chain data from the first data manager;
- and sending, by the second data manager, the off-chain data to the target node.
A non-transitory computer-readable storage medium storing computer program instructions executable by at least one processor to perform a method via an interplay between a first data manager and a second data manager both connected to a blockchain network, the first data manager and the second data manager each including a hardware processor, and the method including:
- obtaining, by the second data manager, from a target node a transaction request for off-chain data, the target node being a smart phone, a smart pad, a laptop computer, or a desktop computer;
- parsing, by the second data manager, the transaction request to obtain a transaction parameter and a chain height parameter of the target node;
- querying, by the second data manager, according to the chain height parameter of the target node, for the off-chain data;
- in response to determining the off-chain data is present in the second data manager, sending, by the second data manager, the off-chain data to the target node;
- and
- in response to determining the off-chain data is absent in the second data manager, determining a type of the target node according to the transaction parameter, sending, by the second data manager, a data request for the off-chain data to the first data manger, the data request including the type of the target node according to the transaction parameter;
- obtaining, by the first data manager, the off-chain data from a data source according to the type of the target node as determined and according to the data request from the second data manager;
- sending, by the first data manager, the off-chain data to the first data manager;
- and
- receiving, by the second data manger, the off-chain data from the first data manager;
- and sending, by the second data manager, the off-chain data to the target node.
Dependencies are inferred from the claim text.