Data query method, device, equipment, system and medium on blockchain
A data query and blockchain technology, which is applied in the fields of systems and media, equipment, data query methods and devices on the blockchain, and can solve problems such as blockchain data query solutions that have not yet been provided.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0036] This embodiment is applicable to the case of querying data in blocks in the blockchain, and the method can be executed by a data query device on the blockchain. The main idea of this embodiment is to export the data from the block to the storage middleware, and use the multi-dimensional query function of the storage middleware to perform multi-dimensional query on the data in the storage middleware.
[0037] figure 1 It is a flowchart of a data query method on a blockchain provided by Embodiment 1 of the present invention, specifically including the following steps:
[0038] S110. Read the largest historical block number for which data has been exported from the storage unit, and obtain the largest on-chain block number from the blockchain.
[0039] The block number is the block number of the block itself, which is the unique identification of the block. For example, the block number of the genesis block is 0, the block number of the block connected to the genesis b...
Embodiment 2
[0056] This embodiment further optimizes the above-mentioned embodiment, specifically, on the basis of the above-mentioned embodiment, the case that the largest historical block number is smaller than the largest on-chain block number is added. figure 2 It is a flow chart of a data query method on a block chain provided by Embodiment 2 of the present invention, including the following steps:
[0057] S210. Read the largest historical block number for which data has been exported from the storage unit, and obtain the largest on-chain block number from the blockchain.
[0058] Among them, the largest block number on the chain is the block number of the latest block added to the blockchain at the current moment.
[0059] S220. Determine whether the largest historical block number is the same as the largest on-chain block number, and if they are the same, continue to execute S230. If the largest historical block number is smaller than the largest on-chain block number, jump to S...
Embodiment 3
[0078] image 3 It is a schematic structural diagram of a data query device on a blockchain provided by Embodiment 3 of the present invention, including: a reading module 31 , a listening module 32 , an acquisition module 33 , an export and addition module 34 , and a data query module 35 .
[0079] The reading module 31 is used to read the largest historical block number that has been exported from the storage unit, and obtain the largest block number on the chain from the block chain;
[0080] The monitoring module 32 is used to monitor the new block addition event on the block chain if the largest historical block block number is the same as the largest block block number on the chain;
[0081]An acquisition module 33, configured to obtain the new block block number from the new block addition event when the new block addition event is monitored;
[0082] Export and add module 34, be used for exporting the data in the block corresponding to the new block block number to the...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


