CN112035576A - Distributed storage method of block chain account book - Google Patents
Distributed storage method of block chain account book Download PDFInfo
- Publication number
- CN112035576A CN112035576A CN202010917424.XA CN202010917424A CN112035576A CN 112035576 A CN112035576 A CN 112035576A CN 202010917424 A CN202010917424 A CN 202010917424A CN 112035576 A CN112035576 A CN 112035576A
- Authority
- CN
- China
- Prior art keywords
- block chain
- account book
- block
- hosts
- chain network
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 11
- 238000004880 explosion Methods 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 4
- 239000004744 fabric Substances 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- Technology Law (AREA)
- Strategic Management (AREA)
- Marketing (AREA)
- Economics (AREA)
- Computing Systems (AREA)
- Development Economics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A distributed storage method of a block chain account book relates to the technical field of block chains. The block chain account book storage method based on the low-cost host computer is a brand-new idea for performing distributed storage on the block chain account book by using the low-cost host computer, is used for solving the problem of large explosion of the block chain account book data, and improves the upper limit of the storage capacity of the block chain account book. The account book data capacity of the block chain network is enlarged by building a distributed cluster formed by a plurality of hosts. Generally, a distributed cluster only has more host nodes, and a distributed cluster with hundreds of host nodes can expand the ledger storage capacity of a block chain network by hundreds of times. More cheap hosts can be utilized, the capacity of the block chain account book is expanded, the project cost is reduced, and the upper limit based on the block chain project is improved.
Description
Technical Field
The invention relates to the technical field of block chains, in particular to a distributed storage method of a block chain account book.
Background
With the advent of blockchain technology, characteristics of decentralization, distributed multi-copy storage, consistent data consensus, data traceability, data tamper resistance and the like make the blockchain technology widely applied. The development of the internet of things + the blockchain leads to more and more internet of things projects based on the blockchain to be landed, however, as the blockchain network adopts multi-copy redundant storage and a chain structure, nodes in the blockchain network can realize autonomous verification and consensus on each transaction information (transaction) in the network, but the problem of account book redundancy is also caused. As the ledger information on blockchain networks continues to grow as transactions continue to progress, there is no appreciable upper limit, so it may happen that the blockchain ledger data storage capacity requirements become very large.
Chinese patent cn201811081255.x discloses a distributed storage technology for a block chain ledger based on erasure codes, which includes the following steps: a) the block delay coding strategy allows a certain number of new blocks to be coded in a delayed mode so as to meet the synchronous requirements of other block chain common node pairs on the blocks; b) according to a set block coding algorithm, cutting a block meeting coding conditions into k data blocks, wherein the size of each data block is about 1/k of that of an original block, and further coding the cut k data blocks into n (n > k) coding blocks by an erasure code technology; c) each block chain link point reserves part of the coding blocks, and finally the whole block chain network dispersedly stores the coding blocks; d) when the original block needs to be recovered from the coding block, the current node collects the other coding block parts corresponding to the block from the other nodes, and then recovers the original block according to the corresponding decoding algorithm. The requirement of the block chain on the storage resource is reduced, and the utilization rate of the storage space is improved.
Disclosure of Invention
The invention aims to provide a distributed storage method of a block chain account book, which can solve the problems of data big explosion and the like of the block chain.
The invention comprises the following steps:
1) grouping a plurality of hosts, wherein each group is used as a virtual node on a block chain network, the block chain network has a plurality of identical and complete account book backups, and the account book backups are stored in a plurality of hosts in one group in a distributed manner, so that the account book data generated by the block chain network is expanded from the capacity of one host to the capacity of a plurality of hosts;
2) simulating a plurality of hosts of a group by using a plurality of hosts, building a block chain network, and building a distributed cluster on the plurality of hosts;
3) performing transaction on the established block chain network in the step 2) continuously, and generating a large amount of book data continuously; the method comprises the following steps that as transactions are continuously carried out, the size of an account book is continuously increased, after a first account book block reaches the upper limit size, the block is uploaded to a built distributed cluster from a virtual node of a block chain network, the first account book block disappears on an original virtual node and is stored on a Hadoop cluster, and meanwhile, a second account book block appears on the block chain network;
4) with the continuous transaction on the block chain network, more and more account book blocks reach the upper limit value, and the account book blocks reaching the upper limit value are dynamically uploaded to the distributed cluster from the original virtual node, so that the distributed storage of the block chain account book is realized, and the storage capacity of the block chain account book is expanded.
In step 3), the upper limit of the ledger block is determined according to different block chain platforms.
The invention enlarges the account book data capacity of the block chain network by building a distributed cluster consisting of a plurality of hosts. Generally, a distributed cluster only has more host nodes, and a distributed cluster with hundreds of host nodes can expand the ledger storage capacity of a block chain network by hundreds of times. The invention provides a brand new idea for performing distributed storage on a block chain account book by using a cheap host, which is used for solving the problem of large explosion of the block chain account book data and improving the upper limit of the storage capacity of the block chain account book. The invention can utilize more cheap hosts, expand the capacity of the block chain account book, not only reduce the project cost, but also improve the upper limit based on the block chain project.
Drawings
Fig. 1 is a schematic diagram of a block chain network.
Fig. 2 is a schematic diagram of a virtual node architecture.
FIG. 3 is a logic diagram of the present invention.
FIG. 4 is a logic diagram of an intelligent contract according to an embodiment of the present invention.
Detailed Description
The following examples will further illustrate the present invention with reference to the accompanying drawings.
The invention provides a new solution, namely, the block chain network generates the ledger data and uses more cheap hosts to perform distributed storage, so as to improve the upper limit of the storage capacity of the block chain ledger.
In this embodiment, a block chain network is built by using 9 cheap hosts, the block chain network is divided into three groups, each group includes three hosts, each group is used as a virtual node on the block chain network, and the block chain network has three identical and complete account book backups, and the account books are backed up in one group, that is, three hosts for distributed storage, so that the capacity of the three hosts is expanded from the capacity of one host. The framework of the whole network is shown in figure 1.
Three hosts build a block chain network and a distributed system, and the virtual nodes are structured as shown in FIG. 2; the logic block diagram of the present invention is shown in fig. 3. A distributed cluster with hostname of Matser-slave1-slave2 is built; a block chain network is built on a mat (a logic guide diagram of the intelligent contract is given in fig. 4) by writing an intelligent contract through a Hyperhedger Fabric, and a distributed cluster with a Master-slave1-slave2 structure is built on three hosts, wherein the NameNode and the Secondary NameNode are deployed on the Master, and the DataNode is deployed on the slave1 and the slave2, respectively. The transaction is carried out continuously on the established block chain network, and a large amount of account book data can be continuously generated.
The first book block on the blockchain network is blockfile _000000, the ongoing transaction will result in the continuous increase of the book size, and after the first block _000000 reaches the upper limit size of 64M, the second book block _000001 appears on the blockchain network because the upper limit size of the block specified by superhedger Fabric is 64M.
After a blockfile _000000 block with the size of the upper limit block appears, the block is uploaded to the constructed distributed cluster from the peer node of the block chain network, and the blockfile _000000 block disappears from the original peer node and is stored in the Hadoop cluster.
With the continuous transaction on the blockchain network, more and more blocks reach the upper limit size value, and the blocks reaching the upper limit size are dynamically uploaded to the distributed cluster from the original peer node, so that the distributed storage of the blockchain account book is realized, and the storage capacity of the blockchain account book is expanded.
In the embodiment, the ledger data capacity of the block chain network is expanded from 10G to 20G by building a distributed cluster consisting of 3 hosts, and the whole block chain network is expanded by two times. Under a general condition, a distributed cluster only has more host nodes, and a distributed cluster with hundreds of host nodes can naturally expand the book storage capacity of the block chain network by hundreds of times.
The above is only a preferred embodiment of the present invention, and the present invention can also adopt more cheap hosts to build the blockchain network, divide it into more groups, and can simultaneously enlarge the ledger storage capacity of the blockchain network by times by setting the upper limit size of the blocks to 128M, 256M, 512M, etc.
The invention provides a brand new idea of carrying out distributed storage on a block chain account book by using cheap hosts, adopts a method of establishing a block chain network by grouping a plurality of cheap hosts, multiplies the account book storage capacity of the block chain network, and can be used for solving the problem of large explosion of the account book data of the block chain. The method has the advantages that more cheap hosts can be utilized, the capacity of the block chain account book is expanded, the project cost is reduced, and the upper limit based on the block chain project is improved.
Claims (1)
1. The distributed storage method of the block chain account book is characterized by comprising the following steps:
1) grouping a plurality of hosts, wherein each group is used as a virtual node on a block chain network, the block chain network has a plurality of identical and complete account book backups, and the account book backups are stored in a plurality of hosts in one group in a distributed manner, so that the account book data generated by the block chain network is expanded from the capacity of one host to the capacity of a plurality of hosts;
2) simulating a plurality of hosts of a group by using a plurality of hosts, building a block chain network, and building a distributed cluster on the plurality of hosts;
3) performing transaction on the established block chain network in the step 2) continuously, and generating a large amount of book data continuously; the method comprises the following steps that as transactions are continuously carried out, the size of an account book is continuously increased, after a first account book block reaches the upper limit size, the block is uploaded to a built distributed cluster from a virtual node of a block chain network, the first account book block disappears on an original virtual node and is stored on a Hadoop cluster, and meanwhile, a second account book block appears on the block chain network;
4) with the continuous transaction on the block chain network, more and more account book blocks reach the upper limit value, and the account book blocks reaching the upper limit value are dynamically uploaded to the distributed cluster from the original virtual node, so that the distributed storage of the block chain account book is realized, and the storage capacity of the block chain account book is expanded.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010917424.XA CN112035576A (en) | 2020-09-03 | 2020-09-03 | Distributed storage method of block chain account book |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010917424.XA CN112035576A (en) | 2020-09-03 | 2020-09-03 | Distributed storage method of block chain account book |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112035576A true CN112035576A (en) | 2020-12-04 |
Family
ID=73592343
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010917424.XA Pending CN112035576A (en) | 2020-09-03 | 2020-09-03 | Distributed storage method of block chain account book |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112035576A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113220789A (en) * | 2021-05-31 | 2021-08-06 | 青岛网信信息科技有限公司 | Distributed storage method and system for block chain account book |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108769150A (en) * | 2018-05-14 | 2018-11-06 | 百度在线网络技术(北京)有限公司 | Data processing method, device, clustered node and the storage medium of block chain network |
WO2018201797A1 (en) * | 2017-05-03 | 2018-11-08 | 上海点融信息科技有限责任公司 | Block chain-based distributed storage |
US20190286629A1 (en) * | 2018-03-13 | 2019-09-19 | WAY2BIT Co. Ltd. | Method for processing transactions using blockchain network, and transaction management server using the same |
CN111539750A (en) * | 2020-04-27 | 2020-08-14 | 中山大学 | Commodity traceability system based on block chain and big data technology |
-
2020
- 2020-09-03 CN CN202010917424.XA patent/CN112035576A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018201797A1 (en) * | 2017-05-03 | 2018-11-08 | 上海点融信息科技有限责任公司 | Block chain-based distributed storage |
US20190286629A1 (en) * | 2018-03-13 | 2019-09-19 | WAY2BIT Co. Ltd. | Method for processing transactions using blockchain network, and transaction management server using the same |
CN108769150A (en) * | 2018-05-14 | 2018-11-06 | 百度在线网络技术(北京)有限公司 | Data processing method, device, clustered node and the storage medium of block chain network |
CN111539750A (en) * | 2020-04-27 | 2020-08-14 | 中山大学 | Commodity traceability system based on block chain and big data technology |
Non-Patent Citations (1)
Title |
---|
叶良,刘维岗著, 成都:电子科技大学出版社 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113220789A (en) * | 2021-05-31 | 2021-08-06 | 青岛网信信息科技有限公司 | Distributed storage method and system for block chain account book |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109903049A (en) | A kind of block chain transaction data storage method, device, equipment and storage medium | |
CN103688515B (en) | The coding of a kind of minimum bandwidth regeneration code and memory node restorative procedure | |
CN109359223A (en) | The block chain account book distributed storage technology realized based on correcting and eleting codes | |
CN110245951B (en) | Tree structure based alliance chain master-slave multi-chain consensus method | |
CN107844272A (en) | A kind of cross-packet coding and decoding method for improving error correcting capability | |
CN105187533A (en) | Data transmission method and device | |
CN101557300B (en) | Method, device and equipment for network topology reconstruction | |
CN110764950A (en) | Hybrid coding method, data restoration method and system based on RS (Reed-Solomon) code and regeneration code | |
CN113901069B (en) | Data storage method and device of distributed database | |
CN112035576A (en) | Distributed storage method of block chain account book | |
CN112527781B (en) | Intelligent contract data migration method and system | |
Zhang et al. | Asymmetric interdependent networks with multiple-dependence relation | |
CN106998208A (en) | A kind of code construction method of variable length Polar codes | |
CN102902746A (en) | Method, device and system for processing mass data | |
CN105119949A (en) | Data synchronization method and system based on multistage slice difference distribution statistics | |
CN109977275A (en) | A kind of regular expression DFA space compression method and system | |
CN109062724B (en) | A kind of correcting and eleting codes conversion method and terminal | |
CN114567554A (en) | Block chain construction method based on node reputation and partition consensus | |
CN115292340B (en) | Block chain storage optimization method and device based on distributed network coding | |
CN108536555B (en) | Data access method based on BCube (n, b) data center | |
CN108512553A (en) | A kind of truncation regeneration code constructing method reducing bandwidth consumption | |
CN109194519A (en) | Configuration method, device, controller and the computer storage medium of the network equipment | |
KR102218796B1 (en) | Selection method and device of cooperation node | |
CN107463462A (en) | Data recovery method and data prosthetic device | |
CN106161170A (en) | A kind of asynchronous file being spaced execution selects and Replica placement method |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20201204 |