Data storage method and device and computer equipment
A technology for data storage and computer programs, which is applied in the field of computer systems and can solve problems such as low query efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0054] figure 2 A flowchart of a data storage method according to Embodiment 1 of the present application is schematically shown. It can be understood that the flowchart in this method embodiment is not used to limit the sequence of execution steps. An exemplary description is given below taking the computer device 2 as the execution subject.
[0055]Such as figure 2 As shown, the data storage method includes steps S20-S23, wherein:
[0056] Step S20, monitor the generation of blocks in the blockchain in real time, and obtain the first transaction log in the first block when the generation of the first block is detected;
[0057] Specifically, by monitoring the blockchain in real time or at regular intervals, the output of blocks can be monitored. Exemplarily, a block generation monitoring program can be used to monitor whether a new block is generated in the block chain, and when it is detected that the first block is generated in the block chain, the first block in the...
Embodiment 2
[0090] Figure 5 A flowchart of the data storage method according to Embodiment 2 of the present application is schematically shown. The data storage method may also include steps S50-S51, wherein:
[0091] Step S50, receiving a transaction query request initiated by an external device.
[0092] Step S51 , based on the transaction query request, query the relational database and return a query result matching the transaction query request to the external device.
[0093] Specifically, the transaction query request is used to query the data required by the user, for example, the user's recharge data within a certain period of time, order data within a certain period of time, etc. can be queried. The transaction query request is sent in the form of SQL statement.
[0094] When the user needs to query the transaction details / operations stored in each block in the blockchain, the transaction query request can be sent through an external device to directly query the data require...
Embodiment 3
[0097] Figure 6 A flowchart of the data storage method according to Embodiment 3 of the present application is schematically shown. The data storage method may also include steps S60-S63, wherein:
[0098] Step S60, receiving a data verification request initiated by an external device.
[0099] Specifically, the data verification request is a request initiated for verifying data. Exemplarily, since the transaction log stored in the relational database is centralized database data, the stored data may be tampered with, so , the user may think that the data stored in the relational database does not match the actual transaction situation. When the user questions the data stored in the relational database, the user can initiate a data verification request through an external device. In this embodiment, the data verification request carries the block number of the block to be queried or the hash value of the block to be queried.
[0100] Step S61, based on the data verificatio...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


