CN109885423B - Block chain source data backup method - Google Patents

Block chain source data backup method Download PDF

Info

Publication number
CN109885423B
CN109885423B CN201910008629.3A CN201910008629A CN109885423B CN 109885423 B CN109885423 B CN 109885423B CN 201910008629 A CN201910008629 A CN 201910008629A CN 109885423 B CN109885423 B CN 109885423B
Authority
CN
China
Prior art keywords
data
block node
backup
uplink
layer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910008629.3A
Other languages
Chinese (zh)
Other versions
CN109885423A (en
Inventor
谢益文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Qiyin Information Technology Co ltd
Original Assignee
Shanghai Qiyin Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Qiyin Information Technology Co ltd filed Critical Shanghai Qiyin Information Technology Co ltd
Priority to CN201910008629.3A priority Critical patent/CN109885423B/en
Publication of CN109885423A publication Critical patent/CN109885423A/en
Application granted granted Critical
Publication of CN109885423B publication Critical patent/CN109885423B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a block chain source data backup method, which comprises the following steps: when a certain block node has data to be uplink, the block node receives the data to be uplink and sends the received data to a data storage layer for storage, and meanwhile, hash calculation is carried out on the data to be uplink and a data backup hash value is generated; calculating the block node address which can be backed up by taking the data backup hash value as a key factor through a consistency balancing algorithm; sending the data needing to be uplink to a data storage layer of the block node corresponding to the block node address capable of being backed up for backup; and sending the data backup hash value to a network distribution consensus layer of the block node for storage. The invention effectively reduces the number of backups, can save the resources occupation of the network and the disk to a great extent, can avoid overlarge data redundancy, and improves the consensus speed and the operation efficiency of the block chain system.

Description

Block chain source data backup method
Technical Field
The invention relates to the technical field of blockchain, in particular to a blockchain source data backup method.
Background
The blockchain is made up of a plurality of blocknodes, each blocknode having all of the data on the blockchain. Each block node needs to perform data backup in uplink, but the following problems occur in data backup: 1. the redundancy of the data is overlarge, and the backup quantity of one data is equal to the quantity of block nodes; 2. when the data is too large, a large amount of network and disk resources are consumed; 3. when the transmitted backup data is too large, the consensus speed is greatly delayed, and the operation efficiency of the whole block chain system is low. For this reason, the applicant has conducted an advantageous search and study to find a method for solving the above-mentioned problems, and the technical solutions to be described below are produced in this context.
Disclosure of Invention
The invention aims at: the block chain source data backup method for avoiding overlarge data redundancy, saving network and disk resources and improving the consensus speed and the operation efficiency of the block chain is provided.
The technical problems to be solved by the invention can be realized by adopting the following technical scheme:
a blockchain source data backup method, the blockchain being made up of a plurality of blocknodes, each blocknode being divided into a network distribution consensus layer and a data storage layer, the backup method comprising the steps of:
when a certain block node has data to be uplink, the block node receives the data to be uplink and sends the received data to a data storage layer for storage, and meanwhile, a hash algorithm is utilized to carry out hash calculation on the data to be uplink and generate a data backup hash value;
the block node uses the data backup hash value as a key factor to calculate a block node address which can be backed up through a consistency balancing algorithm;
the block node sends the data needing to be uplink to the data storage layer of the block node corresponding to the block node address capable of being backed up for backup;
the block node sends the data backup hash value to a network distribution consensus layer for storage.
In a preferred embodiment of the present invention, when a block node needs to acquire its backup data, the following operations are performed:
the block node uses the data backup hash value stored in the network distribution consensus layer as a key factor and calculates the block node address corresponding to the backup data through a consistency balancing algorithm;
the network distribution consensus layer of the block node sends a request for acquiring the backup data to the network distribution consensus layer of the block node corresponding to the block node address corresponding to the backup data;
the network distribution consensus layer of the block node corresponding to the block node address corresponding to the backup data sends the stored backup data to the data storage layer of the block node according to the acquired backup data request;
the data storage layer of the block node receives the backup data.
Due to the adoption of the technical scheme, the invention has the beneficial effects that: the invention sends the data which needs to be uplink to other limited block nodes for backup, reduces the number of the backup, can save the resources occupation of the network and the disk to a great extent, can avoid the overlarge data redundancy and improves the consensus speed and the operation efficiency of the block chain system.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a blockchain source data backup method of the present invention.
Fig. 2 is a topology diagram between block nodes of the present invention.
FIG. 3 is a flow chart of the present invention for obtaining backup data at a block node.
Detailed Description
The invention is further described with reference to the following detailed drawings in order to make the technical means, the creation characteristics, the achievement of the purpose and the effect of the implementation of the invention easy to understand.
Referring to fig. 1 in combination with fig. 2, the blockchain is composed of a plurality of blocknodes, each blocknode is divided into a network distribution consensus Layer (Layer 1) and a data storage Layer (Layer 2), and the blockchain source data backup method of the invention comprises the following steps:
step S1, when a certain block node has data to be uplink, the block node receives the data to be uplink and sends the received data to a data storage layer for storage, and meanwhile, a hash algorithm is utilized to carry out hash calculation on the data to be uplink and generate a data backup hash value. In this embodiment, the hash algorithm may be one of SHA-1 algorithm, SHA-2 algorithm, SHA-3 algorithm, SHA256 algorithm, MD5 algorithm, SHA512 algorithm, RIPEMD160 algorithm. The data backup hash value should be calculated as a hash value with a very short field.
And S2, the block node uses the data backup hash value as a key factor to calculate the block node address which can be backed up through a consistency balancing algorithm. In this embodiment, the consistency balancing algorithm may be one of jumo consistent hash algorithm, libconhash algorithm, hash table algorithm, consistent hashing algorithm.
And step S3, the block node sends the data needing to be uplinked to a data storage layer of the block node corresponding to the block node address capable of being backed up for backup.
And S4, the block node sends the data backup hash value to a network distribution consensus layer for storage.
Referring to fig. 3, when a block node needs to acquire its backup data, the following operations are performed:
and S5, the block node calculates the block node address corresponding to the backup data by using the data backup hash value stored in the network distribution consensus layer as a key factor through a consistency balancing algorithm.
Step S6, the network distribution consensus layer of the block node sends a request for acquiring the backup data to the network distribution consensus layer of the block node corresponding to the block node address corresponding to the backup data.
Step S7, the network distribution consensus layer of the block node corresponding to the block node address corresponding to the backup data sends the stored backup data to the data storage layer of the block node according to the acquired backup data request.
And S8, the data storage layer of the block node receives the backup data, and if the backup data do not belong to the data needing to be backed up after the backup data are used, the backup data are deleted, so that the occupation of disk resources is avoided.
The foregoing has shown and described the basic principles and main features of the present invention and the advantages of the present invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, and that the above embodiments and descriptions are merely illustrative of the principles of the present invention, and various changes and modifications may be made without departing from the spirit and scope of the invention, which is defined in the appended claims. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (1)

1. A method for backing up source data of a blockchain, wherein the blockchain is composed of a plurality of blocknodes, each blocknode is divided into a network distribution consensus layer and a data storage layer, and the backup method comprises the following steps:
when a certain block node has data to be uplink, the block node receives the data to be uplink and sends the received data to a data storage layer for storage, and meanwhile, a hash algorithm is utilized to carry out hash calculation on the data to be uplink and generate a data backup hash value;
the block node uses the data backup hash value as a key factor to calculate a block node address which can be backed up through a consistency balancing algorithm;
the block node sends the data needing to be uplink to the data storage layer of the block node corresponding to the block node address capable of being backed up for backup;
the block node sends the data backup hash value to a network distribution consensus layer for storage;
when a certain block node needs to acquire backup data, the following operations are performed:
the block node uses the data backup hash value stored in the network distribution consensus layer as a key factor and calculates the block node address corresponding to the backup data through a consistency balancing algorithm;
the network distribution consensus layer of the block node sends a request for acquiring the backup data to the network distribution consensus layer of the block node corresponding to the block node address corresponding to the backup data;
the network distribution consensus layer of the block node corresponding to the block node address corresponding to the backup data sends the stored backup data to the data storage layer of the block node according to the acquired backup data request;
the data storage layer of the block node receives the backup data.
CN201910008629.3A 2019-01-04 2019-01-04 Block chain source data backup method Active CN109885423B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910008629.3A CN109885423B (en) 2019-01-04 2019-01-04 Block chain source data backup method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910008629.3A CN109885423B (en) 2019-01-04 2019-01-04 Block chain source data backup method

Publications (2)

Publication Number Publication Date
CN109885423A CN109885423A (en) 2019-06-14
CN109885423B true CN109885423B (en) 2023-05-23

Family

ID=66925551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910008629.3A Active CN109885423B (en) 2019-01-04 2019-01-04 Block chain source data backup method

Country Status (1)

Country Link
CN (1) CN109885423B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111191294B (en) * 2019-12-27 2022-05-24 诚镌科技(广州)有限公司 Single-node accounting method, system, equipment and storage medium based on block chain
CN111026767B (en) * 2020-01-04 2023-05-26 天津金农企业管理咨询合伙企业(有限合伙) Block chain data storage method and device and hardware equipment
CN117319422B (en) * 2023-11-28 2024-02-02 天津市城市规划设计研究总院有限公司 Block chain blocking method and system for Internet of things data in urban planning field

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102843403A (en) * 2011-06-23 2012-12-26 盛大计算机(上海)有限公司 File processing method based on distributed file system, system, and client
CN104077423A (en) * 2014-07-23 2014-10-01 山东大学(威海) Consistent hash based structural data storage, inquiry and migration method
CN106775497A (en) * 2017-01-19 2017-05-31 郑志超 Distributed storage method and equipment based on block chain
CN107273410A (en) * 2017-05-03 2017-10-20 上海点融信息科技有限责任公司 Distributed storage based on block chain
CN107526775A (en) * 2017-07-18 2017-12-29 杭州趣链科技有限公司 A kind of method of block chain data filing
WO2018032371A1 (en) * 2016-08-13 2018-02-22 深圳市樊溪电子有限公司 Power consumption perception pow consensus mechanism for block chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102843403A (en) * 2011-06-23 2012-12-26 盛大计算机(上海)有限公司 File processing method based on distributed file system, system, and client
CN104077423A (en) * 2014-07-23 2014-10-01 山东大学(威海) Consistent hash based structural data storage, inquiry and migration method
WO2018032371A1 (en) * 2016-08-13 2018-02-22 深圳市樊溪电子有限公司 Power consumption perception pow consensus mechanism for block chain
CN106775497A (en) * 2017-01-19 2017-05-31 郑志超 Distributed storage method and equipment based on block chain
CN107273410A (en) * 2017-05-03 2017-10-20 上海点融信息科技有限责任公司 Distributed storage based on block chain
CN107526775A (en) * 2017-07-18 2017-12-29 杭州趣链科技有限公司 A kind of method of block chain data filing

Also Published As

Publication number Publication date
CN109885423A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
CN109885423B (en) Block chain source data backup method
WO2021003985A1 (en) Blockchain data archiving storage method and apparatus, computer device and storage medium
CN101989929B (en) Disaster recovery data backup method and system
EP2659377B1 (en) Adaptive index for data deduplication
WO2019100921A1 (en) Information pushing method and device
AU2012398262B2 (en) Partition extension method and apparatus
WO2015143983A1 (en) Method and apparatus for implementing acceleration processing on vnf
WO2015103926A1 (en) Method, apparatus and system for disseminating routing information
AU2014218837A1 (en) Deduplication storage system with efficient reference updating and space reclamation
WO2017088705A1 (en) Data processing method and device
JP2012525633A5 (en)
WO2017020576A1 (en) Method and apparatus for file compaction in key-value storage system
CN110543448A (en) data synchronization method, device, equipment and computer readable storage medium
CN109032803B (en) Data processing method and device and client
CN103227818A (en) Terminal, server, file transferring method, file storage management system and file storage management method
JP2011170667A (en) File-synchronizing system, file synchronization method, and file synchronization program
WO2023134604A1 (en) Data caching and reading method, and data access system
GB2594417A (en) Blockchain technology for data integrity regulation and proof of existence in data protection systems
CN106909556B (en) Memory cluster storage balancing method and device
US20200213089A1 (en) Data storage method, apparatus, system and device
CN107943615B (en) Data processing method and system based on distributed cluster
US20130226867A1 (en) Apparatus and method for converting replication-based file into parity-based file in asymmetric clustering file system
WO2021143026A1 (en) Flow table updating method, apparatus and system, computer device, and storage medium
CN101526959B (en) Data storing method and device
EP3349416B1 (en) Relationship chain processing method and system, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant