Blockchain data recovery method and device, equipment and medium

A recovery method and blockchain technology, applied in the field of blockchain data recovery, can solve the problems of inability to quickly recover data, high recovery cost, and slow recovery speed.

Active Publication Date: 2020-09-11
成都质数斯达克科技有限公司
View PDF13 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003]The technical problem to be solved by the present invention is that currently most of the data recovery in the blockchain starts from the first block...

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Blockchain data recovery method and device, equipment and medium
  • Blockchain data recovery method and device, equipment and medium
  • Blockchain data recovery method and device, equipment and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0055] The present invention provides a blockchain data recovery method, which can be applied to different computer equipment including but not limited to various personal computers, notebook computers, smart phones and tablet computers.

[0056] Such as figure 1 As shown, the present invention provides a blockchain data recovery method, which includes the following steps:

[0057] S10: Obtain the height to be rolled back, query the database based on the height to be rolled back, and obtain the hash values ​​of all root nodes to be rolled back corresponding to the height to be rolled back.

[0058] Among them, the height to be rolled back refers to the height of the block determined to be rolled back after an error occurs in the data of the blockchain. A database refers to a database that stores data storage keys and data storage values. The data storage key refers to the key composed of the key of the ledger data and the hash value of the ledger data; the data storage value refers t...

Embodiment 2

[0103] Such as Image 6 As shown, the difference between this embodiment and Embodiment 1 is that a blockchain data recovery device includes:

[0104] The height to be rolled back processing module 10 is used to obtain the height to be rolled back, query the database based on the height to be rolled back, and obtain the hash values ​​of all root nodes to be rolled back corresponding to the height to be rolled back.

[0105] The root node data obtaining module 20 to be rolled back is configured to obtain the root node data to be rolled back corresponding to the hash value of each root node to be rolled back from the database based on the hash value of the root node to be rolled back.

[0106] The to-be-rolled-back MPT tree processing module 30 is used to generate the to-be-rolled-back MPT tree based on the data of each root node to-be-rolled-back, update the to-be-rolled-back MPT tree to the memory, and replace the ledger MPT tree in the memory with the to-be-returned MPT tree Roll th...

Embodiment 3

[0131] This embodiment provides a computer device, which may be a server, and its internal structure diagram may be as Figure 7 Shown. The computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a computer-readable storage medium and internal memory. The computer-readable storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the computer-readable storage medium. The database of the computer equipment is used to store the data involved in the blockchain data recovery method. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program is executed by t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a blockchain data recovery method and device, equipment and a medium. The method comprises the steps of obtaining a to-be-rolled-back height, acquiring hash values of all corresponding root nodes to be rolled back based on the height of the root nodes to be rolled back; based on the hash value of the root node to be rolled back, obtaining to-be-rolled-back root node data corresponding to each to-be-rolled-back root node hash value from a database, generating an MPT tree to be rolled back; updating the MPT tree to be rolled back into a memory; replacing an account book MPT tree in a memory with the MPT tree to be rolled back; based on the MPT tree to be rolled back, rolling back the account book state of the blockchain to a corresponding to-be-rolled-back height; deleting the block data after the to-be-rolled-back height in the original to-be-recovered blockchain; obtaining normal block data from the synchronized blockchain node based on the height to be rolled back; and recovering the block data after the to-be-rolled-back height in the original to-be-recovered blockchain, obtaining correct root node data based on the normal block data, and recovering the to-be-rolled-back MPT tree, so as to improve the data recovery speed in the blockchain and reduce the data recovery cost.

Description

Technical field [0001] The present invention relates to the technical field of blockchain data processing, in particular to a method, device, equipment and medium for recovering blockchain data. Background technique [0002] Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain is an important concept of Bitcoin. Its essence is a decentralized database. The bottom layer is a series of data blocks associated with cryptographic methods. Each data block contains a batch of data. Bitcoin network transaction information is used to verify the validity of the transaction (anti-counterfeiting) and generate the next block. According to the characteristics of the blockchain, the data stored in the blockchain cannot be modified once it is generated. In practical applications, there will inevitably be errors in the data stored in the blockchain due to technical or h...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F11/14G06F16/22
CPCG06F11/1464G06F16/2255G06F16/2246
Inventor 李成才雷罡高勇邓柯
Owner 成都质数斯达克科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products