CN112947868A - Four-branch chain structure golden melt block chain storage system - Google Patents
Four-branch chain structure golden melt block chain storage system Download PDFInfo
- Publication number
- CN112947868A CN112947868A CN202110377277.6A CN202110377277A CN112947868A CN 112947868 A CN112947868 A CN 112947868A CN 202110377277 A CN202110377277 A CN 202110377277A CN 112947868 A CN112947868 A CN 112947868A
- Authority
- CN
- China
- Prior art keywords
- chain
- block
- storage
- branched
- chain structure
- 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.)
- Granted
Links
- 238000013500 data storage Methods 0.000 claims abstract description 33
- 230000007246 mechanism Effects 0.000 claims abstract description 27
- 230000007704 transition Effects 0.000 claims abstract description 11
- 230000003068 static effect Effects 0.000 claims abstract description 8
- 238000004364 calculation method Methods 0.000 claims description 25
- 238000000034 method Methods 0.000 claims description 21
- 230000008569 process Effects 0.000 claims description 17
- 238000013461 design Methods 0.000 claims description 13
- 238000011156 evaluation Methods 0.000 claims description 12
- 230000002194 synthesizing effect Effects 0.000 claims description 7
- 239000000126 substance Substances 0.000 claims description 6
- 238000007726 management method Methods 0.000 claims description 4
- 239000012141 concentrate Substances 0.000 claims description 3
- 230000003362 replicative effect Effects 0.000 claims description 2
- 239000000969 carrier Substances 0.000 abstract description 2
- 230000002776 aggregation Effects 0.000 abstract 1
- 238000004220 aggregation Methods 0.000 abstract 1
- 230000011218 segmentation Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 9
- 238000002474 experimental method Methods 0.000 description 8
- 238000002955 isolation Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 3
- 238000007781 pre-processing Methods 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 241000609666 Tuber aestivum Species 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 238000004873 anchoring Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000007123 defense Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000012856 packing Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/062—Securing storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/064—Management of blocks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
Abstract
The utility model provides a four branch chain structure golden melt block chain storage systems, at first constructs four branch chain structure golden melt block chain ternary account book structures, and data storage adopts the ternary mode to carry out data storage according to the storage environment of difference in the block body of four branch chain structure: full aggregation storage, multi-unit storage and full segmentation storage, and data storage efficiency is improved through data distribution and parallel storage. And secondly, constructing a four-branch chain structure storage model, wherein the four-branch chain structure storage model comprises a free competition chain structure, a serial concentrated chain structure, a Z-shaped loop chain structure and a parallel average chain structure, and the four chain structures are used as carriers for data storage. And thirdly, establishing a four-branch chain structure safety judgment mechanism to judge the safety state of the chain structure. And finally, adjusting the intermediate transition state of each branch chain, and establishing a four-branch chain type structure block chain head static rotation mechanism to enable four-branch chains to be in stable transition. The system has great advantages in data storage rate and communication overhead.
Description
Technical Field
The invention belongs to the field of block chain data storage, particularly relates to a block chain storage system design, and particularly relates to a four-branched chain type structure golden melt block chain storage system design.
Background
The block chain is a novel information processing mode for performing trusted storage of big data by adopting an efficient cryptography principle, and has the characteristics of safety, reliability, traceability, decentralization and the like, so that the block chain technology related application is increasingly wide in recent years. The block chain stores transaction data on the chain, the transaction data is influenced by transaction scale, the data storage amount is huge, the transaction data scale is changed rapidly, the real-time yield of the block chain data is increased rapidly, the existing block chain data storage rate is difficult to keep up with the data real-time output rate, the data volume increase cannot be adapted stably, and the associated storage efficiency of the single-chain mode under a complex classification scene is low. For example, in a block chain system of financial activities, the difference of the accounting speed of each financial enterprise is large, nearly ten thousand transactions can be generated per second in banks and stock exchanges, the accounting speed of the block chain under a single chain mode is mostly dozens of transactions per second, which obviously lags behind the transaction generation speed, and data information is excessively accumulated in the network, thereby causing network congestion and stagnation.
The existing block chain mainly has the following problems in data storage: the block chain data storage mode becomes a research hotspot due to the principles of reliable and efficient cryptography and the like, but in recent years, block chain information is rapidly increased, and the existing block chain storage mode is difficult to keep up with the block chain data generation rate in real time, so that a series of block chain networks are stagnated, the block chain stability is reduced and the like. Moreover, the information of the blockchain grows rapidly, and if the blockchain model is not stable for a long time, the blockchain is easy to split, and the calculation is easy to be shunted. Therefore, it is necessary to construct a block chain structure for efficient storage and integration.
Therefore, a real-time and effective financial field block chain integrated optimization storage system is designed, and the system has important significance for safe storage and traceability query of financial big data.
Disclosure of Invention
In order to overcome the defects of the block chain storage system in the prior financial field, the invention provides a design of a financial big data-oriented four-branched chain type structure golden melt block chain storage system. The data storage of the financial entity and the financial activity can be effectively carried out.
In order to achieve the purpose, the invention adopts the following technical scheme: four branch chain structure golden melt block chain memory system, its characterized in that, its step is:
and 4, establishing a four-branched chain type structure block chain head static rotation mechanism.
The construction of the ternary financial book structure of the four-branch chain structure financial block chain in the step 1 comprises the following steps:
step 1-1 fully replicating a storage structure:
each subchain traced back to the founding block is called a storage unit, and each node needs to store at least one complete storage unit when storing transaction information; dynamically managing each sub-chain in the block chain, providing management nodes of a block chain global view, recording all accounts of the whole multi-branch tree block chain by the nodes, and dynamically selecting the sub-block chain with the largest profit according to the state of each sub-block chain by the nodes; when the information is transmitted by the network through a flood model method, the nodes of the storage structure are adopted to synchronize the information output by all the nodes;
step 1-2 multi-cell memory architecture:
the storage node is responsible for recording the data of the link subchain of the block, the stored data in the node is updated regularly, the node stores the data information generated by the local node, provides a local view for storing the subchain, dynamically selects other nodes for storage according to the number of limited accounts, and continuously selects a single storage unit or a plurality of storage units for data storage, but when the storage units are replaced for data storage, the chain to be stored needs to be updated synchronously, and when the network transmits the information through a flood paradigm, the node adopting the storage structure only synchronizes the information of the needed chain;
step 1-3 a full split storage architecture:
under the condition of lowest requirement on the bookkeeping environment, each node records the only unit book of the mine to be excavated, the node with the full-division storage structure can only provide a single view of the storage subchain, the views of other chain structures of the block chain can not be provided, and the node is only responsible for synchronously storing and updating the chain information when the network transmits the information through the flood paradigm.
The construction of the storage model with the four-branched-chain structure in the step 2 comprises the following steps:
step 2-1, designing a free competition chain structure:
realizing a free competition chain structure: each subchain of the structure is independent after being branched, the subchains only pack information on the chain and do not interact with other chains, and nodes newly added with accounting freely select two storage schemes, wherein one scheme is that the nodes actively select the subchains according to addresses Chainip, and the other scheme is that the accounting chains are dynamically allocated by a system; the system defaults to make the length of the whole block chain sub-chain consistent, and nodes which are newly added and select the default system are allocated to the block chain with fewer nodes for accounting.
Step 2-2 serial centralized chain structure design:
realize the chain structure in serial concentration: after the chain structure of the structure is branched, honest calculation power is concentrated by each branched chain node in the information storage process, the concentrated total calculation power sequentially packs blocks at the same height of the branched chains from left to right, the branched chain structure enters the next height to pack after all the sub chains at the current height are packed, and the nodes added into the chain structure are forced to pack according to the rule;
step 2-3Z shape chain structure design:
realize the chain structure of the zigzag shape: the chain structure is branched, and each branched block is carried out according to the following rules in the information storage process: the structure concentrates the calculation force of each branch chain to pack blocks from left to right and from top to bottom in sequence, each layer block of each sub-chain records brother hash values of a brother block of the previous layer except for the hash value of a parent block of the chain, the blocks on the sub-chain of the same layer are created from left to right in sequence, after the data storage of the layer block is finished, the creation process of the leftmost sub-chain block of the next layer is started, and then the blocks on the sub-chain of the same layer are created from left to right in sequence;
step 2-4 parallel average chain structure design
Realizing a parallel average chain structure: the chain structure is branched, and each branched block is carried out according to the following rules in the information storage process: after the parallel average chain structure is branched, each child chain not only records the parent hash value of one block on the chain, but also needs to record the comprehensive hash value of the block on the previous layer, and enters the next layer after all the blocks on the previous layer are packed out of order.
The establishment of the four-branch chain structure safety judgment mechanism in the step 3 comprises the following steps:
step 3-1, a free competition safety judgment mechanism:
the number of branches of a block chain branched chain is n, a malicious node with the computing power accounting for q competes with the honest computing power on a single branched chain, the safety state value of the block chain is s, the probability of successfully pursuing z blocks is p, and when p is not greater than the safety state value s, the block chain branched chain is judged to be in a safety state;
the probability of an attacker catching up z blocks of honest chain is as follows:
namely:
wherein the content of the first and second substances,p1 is 1-q1, the attack success rate of the malicious node is obtained according to the state of the malicious node during the malicious attack,
wherein, λ is (q1/p1) × z, and the final success probability of the malicious computational power attack is obtained after the arrangement;
finally, judging the safety state of the chain structure according to whether the attack success probability p is smaller than the safety state value s of comprehensive evaluation;
step 3-2, serial centralized safety judgment mechanism:
the number of branches of a block chain branched chain is n, a malicious node with the computing power accounting for q competes with the honest computing power on a single branched chain, the safety state value of the block chain is s, the probability of successfully pursuing z blocks is p, and when p is not greater than the safety state value s, the block chain branched chain is judged to be in a safety state;
the probability of an attacker catching up z blocks of honest chain is as follows:
namely:
the attack success rate of the malicious node is obtained according to the state of the malicious node during the malicious attack,
wherein, the lambda is q x z/p, and the finishing is carried out to obtain:
[(z+1-n)/n]&expressed as taking the smallest integer greater than (z + 1-n)/n;
finally, if the attack success probability p is smaller than the safety state value s of comprehensive evaluation, the chain structure is considered to be in a safety state;
step 3-3Z-shaped safety judgment mechanism:
the number of branches of a block chain branched chain is n, a malicious node with the computing power accounting for q competes with the honest computing power on a single branched chain, the safety state value of the block chain is s, the probability of successfully pursuing z blocks is p, and when p is not greater than the safety state value s, the block chain branched chain is judged to be in a safety state;
the probability of an attacker catching up z blocks of honest chain is as follows:
synthesizing the state of the malicious node during the malicious attack to obtain the attack success rate of the malicious node;
finishing to obtain:
if the last attack success probability p is smaller than the safety state value s of comprehensive evaluation, the chain structure is considered to be in a safety state;
step 3-4, parallel average safety judgment mechanism:
the number of branches of a block chain branched chain is n, a malicious node with the computing power accounting for q competes with the honest computing power on a single branched chain, the safety state value of the block chain is s, the probability of successfully pursuing z blocks is p, and when p is not greater than the safety state value s, the block chain branched chain is judged to be in a safety state;
the probability of an attacker catching up z blocks of honest chain is as follows:
wherein the content of the first and second substances,p1 ═ 1-q 1; synthesizing the state of the malicious node during the malicious attack to obtain the attack success rate of the malicious node;
wherein, the lambda is q1 xz/p 1, and the finishing result is:
and if the last attack success probability p is smaller than the safety state value s of the comprehensive evaluation, the chain structure is considered to be in a safety state.
The establishing of the four-branch chain structure block chain head static rotation mechanism in the step 4 specifically comprises the following steps:
in the four-branch chain type structure golden block chain storage system, various chain structures are combined to form a whole, when a block head is in a chain structure alternate transition to another chain structure, corresponding head information can be in self-adaptive alternate, in order to simplify the block head information, version number, Merkel tree root, random number nonce, timestamp and creation difficulty field information are omitted, and only head Domain, Up, Down, ChainIP, Brohash, Stage and Allhash fields related to branch chains are reserved; the initial block is firstly forked by a parallel average chain structure, then each subchain is further forked by a Z-shaped loop chain structure, a free competition chain structure and a serial concentrated chain structure, and finally the stable transition of the four-branched chain is realized as shown in Table 1.
TABLE 1 header information rotation table
The beneficial effects created by the invention are as follows:
the invention designs a four-branch chain type structure golden melt block chain storage system, which comprises the following steps of firstly constructing a four-branch chain type structure golden melt block chain ternary account book structure, storing data in a block body of the four-branch chain type structure, and storing the data by adopting a ternary mode according to different storage environments: fully aggregated storage, multi-unit storage, fully partitioned storage. And secondly, constructing a four-branch chain structure storage model, wherein the four-branch chain structure storage model comprises a free competition chain structure, a serial concentrated chain structure, a Z-shaped loop chain structure and a parallel average chain structure, and the four chain structures are used as carriers for data storage. And thirdly, establishing a four-branch chain structure safety judgment mechanism to judge the safety state of the chain structure. And finally, adjusting the intermediate transition state of each branch chain, and establishing a four-branch chain type structure block chain head static rotation mechanism to enable four-branch chains to be in stable transition. The system has the advantages of improving the block chain data storage rate and reducing the network load.
Drawings
Fig. 1 is a schematic diagram of a ternary account book structure of a four-branched chain type structure golden melt block chain.
FIG. 2 is a diagram of the four-branched free-competing structure.
Figure 3 is a schematic diagram of a four branched chain tandem concentration architecture.
FIG. 4 is a schematic diagram of a Z-shaped structure of a four-branched chain.
Figure 5 is a schematic diagram of a four-branched parallel-averaging structure.
Fig. 6 is a diagram illustrating update of header information of a four-branched-chain block.
Fig. 7 is a diagram of a four-branch block transition mode.
FIG. 8 is a comparison diagram of data storage efficiency of four branched chain structure
FIG. 9 is a graph comparing query efficiency for a four-branched chain structure.
FIG. 10 is a schematic diagram of a comparison of the four-branched structure confirmation retardations.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only some embodiments of the present invention, not all embodiments.
Step 1-1 fully replicated storage structures
Each sub-chain which completely traces back to the founding block is called a storage unit, and each node needs to store at least one complete storage unit when storing transaction information. The management node records all accounts of the whole multi-branch tree block chain, and the node can dynamically select the sub-block chain with the maximum profit according to the state of each sub-block chain. When the information is transmitted by the network through the flood model method, the nodes of the storage structure are adopted to synchronize the information output by all the nodes.
Step 1-2 Multi-cell memory Structure
The node stores data information generated by a local node, provides a local view for storing the sub-chains, dynamically selects other nodes for storage according to the number of the limited accounts, and can continuously select a single storage unit or a plurality of storage units for data storage.
Step 1-3 full split storage architecture
Under the condition of lowest requirement on the bookkeeping environment, each node records the only unit book of the mine to be excavated, the node with the full-division storage structure can only provide a single view of the storage subchain, the views of other chain structures of the block chain can not be provided, and the node is only responsible for synchronously storing and updating the chain information when the network transmits the information through the flood paradigm.
Step 2-1 free competition chain structure design
Realizing a free competition chain structure. Each sub-chain of the structure is independent after branching, and the sub-chains only pack information on the chain and do not interact with other chains. The node newly joining the accounting can freely select two storage schemes, one is that the node actively selects the subchain according to the address Chainip, and the other is that the system dynamically allocates an accounting chain. The system defaults to make the length of the whole block chain sub-chain consistent, and nodes which are newly added and select the default system are allocated to the block chain with fewer nodes for accounting.
Step 2-2 serial centralized chain structure design
Realizing a serial centralized chain structure. After the chain structure is branched, honest calculation power is concentrated by each branch chain node in the information storage process, after concentration, the total calculation power is sequentially carried out on the same height block packing sequence of the branch chains from left to right, after all sub chains at the current height are packed, the sub chains enter the next height to be packed, the node added into the chain structure can be forced to be packed according to the rule, and the chain structure also has good compatibility.
Step 2-3Z-shaped chain structure design
And a Z-shaped loop chain structure is realized. The chain structure is branched, each branched chain block is carried out in the information storage process according to the following rule, and in order to counteract the computational power safety problem generated by distributing the computational power to the multiple chains, the structure concentrates the computational power of each branched chain on the blocks to be packed from left to right and from top to bottom in sequence. Each zone block of each sub-chain records brother hash values of brother blocks of the previous layer except the parent block hash value of the chain, blocks on the sub-chain of the same layer are sequentially created from left to right, after the data storage of the zone block is finished, the creation process of the leftmost sub-chain block of the next layer is started, and then blocks on the sub-chain of the same layer are sequentially created from left to right;
step 2-4 parallel average chain structure design
A parallel average chain structure is realized. The chain structure is branched, each branched chain block is carried out in the information storage process according to the following rules, malicious nodes carry out malicious attack on the structure, overlarge computational resources are consumed, and the structure needle body has a good defense effect. After the parallel average chain structure is branched, each sub-chain not only records the parent hash value of one block on the chain, but also needs to record the comprehensive hash value of the block on the previous layer, and enters the next layer after all the blocks on the previous layer are packed out of order.
And 3, establishing a four-branch chain structure safety judgment mechanism, respectively carrying out safety judgment on the free competition chain structure, the serial concentrated chain structure, the Z-shaped loop chain structure and the parallel average chain structure, and judging the feasibility of the operating environment.
Step 3-1 free competition safety judgment mechanism
The free competition chain structure encounters malicious attack of malicious nodes in the network, and then the double-flower problem is caused. The number of branches of a block chain branched chain is n, a malicious node with the computing power accounting for q competes with the honest computing power on a single branched chain, the safety state value of the block chain is s, the probability of successfully pursuing z blocks is p, and when p is not more than the safety state value s, the block chain branched chain is judged to be in a safety state.
The probability of an attacker catching up z blocks of honest chain is shown below.
Namely:
wherein the content of the first and second substances,p1 is 1-q 1. When comprehensive malicious attacksAnd obtaining the attack success rate of the malicious node according to the state of the malicious node.
And (q1/p1) z, and finishing to obtain the success probability of the final malicious computational power attack.
And finally, judging the safety state of the chain structure according to whether the attack success probability p is smaller than the safety state value s of comprehensive evaluation.
The specific process is as follows:
(1) in the free competition chain structure, a malicious node with n branched chains (assuming that n is 2) and a calculation power ratio of q (assuming that q is 0.01, 0.05, 0.1 and 0.2) attacks the branched chains, the number of blocks with confirmed honest calculation power is z (assuming that z is 1, 3, 5, 7, 9, 11, 13, 15 and 17), the safety state value of the chain structure is s (assuming that s is 0.01), and the safety state of the chain structure is judged.
(2) And comparing the attack success rate obtained in the steps with the safety state value s to obtain the following table.
Table 1: free contention chain security status table
(3) According to the final calculation result of the table, when the attack success probability is smaller than the safety state value s, the chain structure is in the safety state, namely the safety state number is +1, the safety state number is counted in the table and analyzed, the larger the malicious calculation power ratio is, the smaller the corresponding safety state number meeting the requirements is, the larger the confirmed block number is, the higher the safety coefficient of the chain structure is, and the free competition chain structure must be realized in the environment meeting the safety state.
Step 3-2 serial centralized safety judgment mechanism
The serial centralized chain structure encounters malicious attack of malicious nodes in the network, and then the double-flower problem is caused. The number of branches of a block chain branched chain is n, a malicious node with the computing power accounting for q competes with the honest computing power on a single branched chain, the safety state value of the block chain is s, the probability of successfully pursuing z blocks is p, and when p is not more than the safety state value s, the block chain branched chain is judged to be in a safety state.
The probability of an attacker catching up z blocks of honest chain is shown below.
Namely:
and synthesizing the state of the malicious node during the malicious attack to obtain the attack success rate of the malicious node.
Wherein, the lambda is q x z/p, and the finishing is carried out to obtain:
[(z+1-n)/n]&expressed as taking the smallest integer greater than (z + 1-n)/n.
And finally, if the attack success probability p is smaller than the safety state value s of comprehensive evaluation, the chain structure is considered to be in a safety state.
The specific process is as follows:
(1) in the serial concentrated chain structure, a malicious node with n branched chains (assuming that n is 2) and a calculation power ratio of q (assuming that q is 0.01, 0.05, 0.1 and 0.2) attacks the branched chains, the number of blocks with confirmed honest calculation power is z (assuming that z is 1, 3, 5, 7, 9, 11, 13, 15 and 17), the safety state value of the chain structure is s (assuming that s is 0.01), and the safety state of the chain structure is judged.
(2) And comparing the attack success rate obtained in the steps with the safety state value s to obtain the following table.
Table 2: serial set chain safety state table
(3) According to the final calculation result of the table, when the attack success probability is smaller than the safety state value s, the chain structure is in the safety state, namely the safety state number is +1, the safety state number is counted in the table and analyzed, the larger the malicious calculation power ratio is, the smaller the corresponding safety state number meeting the requirements is, the larger the confirmed block number is, the higher the safety coefficient of the chain structure is, and the serial centralized chain structure is required to be realized in the environment meeting the safety state.
Step 3-3Z-shaped safety judgment mechanism
The Z-shaped chain structure encounters malicious attack of malicious nodes in the network, and then the double-flower problem is caused. The number of branches of a block chain branched chain is n, a malicious node with the computing power accounting for q competes with the honest computing power on a single branched chain, the safety state value of the block chain is s, the probability of successfully pursuing z blocks is p, and when p is not more than the safety state value s, the block chain branched chain is judged to be in a safety state.
The probability of an attacker catching up z blocks of honest chain is shown below.
And synthesizing the state of the malicious node during the malicious attack to obtain the attack success rate of the malicious node.
Finishing to obtain:
and if the last attack success probability p is smaller than the safety state value s of the comprehensive evaluation, the chain structure is considered to be in a safety state.
The specific process is as follows:
(1) in the Z-shaped zigzag chain structure, the malicious attack success probability of a malicious node is irrelevant to the number n of branches, n branched chains are arbitrarily taken, the malicious node with the calculation power ratio of q (assuming that q is 0.01, 0.05, 0.1 and 0.2) attacks the branched chains, the number of blocks with confirmed honest calculation power is Z (assuming that Z is 1, 3, 5, 7, 9, 11, 13, 15 and 17), the safety state value of the chain structure is s (assuming that s is 0.01), and the safety state of the chain structure is judged.
(2) And comparing the attack success rate obtained in the steps with the safety state value s to obtain the following table.
Table 3: z-shaped clip chain safety state table
(3) According to the final calculation result of the table, when the attack success probability is smaller than the safety state value s, the chain structure is in the safety state, namely the safety state number is +1, the safety state number is counted in the table and analyzed, the larger the malicious calculation power ratio is, the smaller the corresponding safety state number meeting the requirements is, the larger the confirmed block number is, the higher the safety coefficient of the chain structure is, and the Z-shaped chain structure is required to be realized in the environment meeting the safety state.
Step 3-4 parallel average safety judgment mechanism
The parallel average chain structure encounters malicious attack of malicious nodes in the network, and then the double-flower problem is caused. The number of branches of a block chain branched chain is n, a malicious node with the computing power accounting for q competes with the honest computing power on a single branched chain, the safety state value of the block chain is s, the probability of successfully pursuing z blocks is p, and when p is not more than the safety state value s, the block chain branched chain is judged to be in a safety state.
The probability of an attacker catching up z blocks of honest chain is shown below.
Wherein the content of the first and second substances,p1 is 1-q 1. And synthesizing the state of the malicious node during the malicious attack to obtain the attack success rate of the malicious node.
Wherein, the lambda is q1 xz/p 1, and the finishing result is:
and if the last attack success probability p is smaller than the safety state value s of the comprehensive evaluation, the chain structure is considered to be in a safety state.
The specific process is as follows:
(1) in the parallel average chain structure, a malicious node with n branched chains (assuming that n is 2) and a calculation power ratio of q (assuming that q is 0.01, 0.05, 0.1 and 0.2) attacks the branched chains, the number of blocks with confirmed honest calculation power is z (assuming that z is 1, 3, 5, 7, 9, 11, 13, 15 and 17), the safety state value of the chain structure is s (assuming that s is 0.01), and the safety state of the chain structure is judged.
(2) And comparing the attack success rate obtained in the steps with the safety state value s to obtain the following table.
Table 4: parallel average chain safety state table
(3) According to the final calculation result of the table, when the attack success probability is smaller than the safety state value s, the chain structure is in the safety state, namely the safety state number is +1, the safety state number is counted in the table and analyzed, the larger the malicious calculation power ratio is, the smaller the corresponding safety state number meeting the requirements is, the larger the confirmed block number is, the higher the safety coefficient of the chain structure is, and the parallel average chain structure must be realized in the environment meeting the safety state.
And 4, establishing a four-branched chain type structure block chain head static rotation mechanism. When the structure among the chains is replaced, a unified rule needs to be formulated to restrict the corresponding transformation state, and the block header information executes a static rotation mechanism to coordinate the stable transition among the chains.
In the four-branched-chain type structure golden melt block chain storage system, various chain structures are combined to form a whole. When the block head is transited from one chain structure to another chain structure, the corresponding head information is adaptively rotated. In order to simplify the block header information, the field information such as the Merkel tree root, the random number nonce, the timestamp and the like is omitted, and only the header fields such as Domain, Up, Down, ChainIP, Brohash, Stage and Allhash related to the branch chain are reserved. For example, in fig. 7, the initial block is first forked by a parallel average chain structure, and then each subchain is further forked by a zigzag chain structure, a free competition chain structure, and a serial concentrated chain structure, and finally, the smooth transition of the four branched chains is realized as shown in table 5.
Table 5: head information alternation table
Example 1:
in order to better test the data storage efficiency of the four-branched-chain structure golden melt block chain storage system in the block chain, as an example of the invention, an experimental environment of 20 cluster nodes is set up, wherein 8GB is stored in a host of each node, the CPU main frequency is 3.5GHz, and the hard disk capacity is 1 TB; the software environment is a Ubuntu 16.04 system; CodeBlocks 17.12, MinGW 4.8.4 development environment; NPM: 3.10.10, respectively; NodeJS: v 6.10.2; truffle: 2.0.8, respectively; TestRPC: 3.0.5. and 20 host nodes NodeDB provided with TestRPC, wherein each NodeDB runs an intelligent contract in a Truffle framework and automatically generates 10 node transaction accounts, and each NodeDB is responsible for management and performs information interaction with 10 nodes. Setting the capacity of a basic block to be 0.1M, modifying the head state information of the block and the like by modifying the accounting rule, and establishing an experimental environment of the golden melt block chain storage system with the four-branched chain structure by deploying contracts through Mirations. According to the operation results and data of the experiment, the method is compared with the isolation authentication storage and the BitcoinXT storage mode.
The experiment runs on a data set of manual simulated transaction, transaction account information generated by nodes is transmitted to a block chain test network, original data is extracted and processed, and a real experiment result data set on a small-scale data set is obtained through a four-branched-chain storage mode. The whole treatment process is mainly divided into the following parts:
(1) data preprocessing: the original transaction data is preprocessed and contains associated effective digital signatures, standard transaction grammars, transaction indexes and the like, other redundant attributes are deleted, only test data sets relevant to experiments are reserved, and transaction information meeting requirements can be linked before block chains are packed into blocks.
(2) Four-branch chain structure storage mode: after data preprocessing, on the basis of keeping hash anchoring, random number operation and the like before and after the related data information, a branch chain type structure storage mode is executed on an information set on a block chain network, and the executed data set is normally linked.
(3) And (3) real data set query: and acquiring the data set based on the data set after data preprocessing and the four-stage branched chain type structure storage mode according to a four-stage processing strategy of the four-stage branched chain structure block chain storage system, actually inquiring the stored data set, and finally returning an inquiry result.
And comparing the data storage rate, the query efficiency and the confirmation delay of the three strategies through experimental data on a real data set, and evaluating the execution efficiency of the storage of the four-branched-chain structure.
Data storage rate comparison
In the experiment, the isolation authentication storage mode is realized by adding a volume of 0.1M equal to the amount of the witness structural signature information to a main chain block, the volume of the recorded block is set to be 0.8M by a Bitcion XT storage mode, the volume of the block is set to be 0.4M by a four-branched chain type structure storage mode, and a ternary tree structure is used for data storage. The experimental data of fig. 8 were obtained after counting the experimental data. As shown in fig. 8, the data storage rate of the blockchain adopting the isolation verification storage mode is not greater than 220 pens/sec, the data storage rate of the blockchain recording adopting the bitcone XT storage mode is not greater than 700 pens/sec, and the data storage rate of the blockchain adopting the four-branch chain structure storage mode is not less than 400 pens/sec and not greater than 1200 pens/sec. Therefore, the data storage rate of the four-branch-chain structure storage mode is obviously higher than that of the isolation witness storage mode and the Bitcoin XT storage mode.
Query efficiency comparison
In the experiment, the total storage capacity of the accounting data is the same, the single-chain form is used for data storage in the isolation verification storage mode and the Bitcoin XT storage mode, and the data storage is carried out through the ternary tree chain structure in the four-branch-chain storage side strategy. As shown in FIG. 9, the time consumed for query by adopting an isolation verification mode is obviously longer than that of a four-branch-chain structure storage mode and a Bitcoin XT mode, the query time is between 0 and 60s, the Bitcoin XT storage mode is adopted, the query time is between 0 and 20s, the query height is reduced by a four-branch-chain storage strategy through a ternary tree chain structure, and the query time is stabilized at 0 to 15 s. In a comprehensive view, the storage mode of the four-branch-chain type structure is optimal.
Confirming a delayed comparison
During experiments, POW workload is adopted to prove that the generation rate of each single-chain block is equal in all the three storage modes. Fig. 10 is obtained through experiments, the three storage modes are approximately equal to each other for the determination time of a single transaction, and the transaction information stored in the block of the isolated witness storage mode is the least, so that the time for writing the transaction information into the block of the area and verifying the transaction signature is the shortest, that is, the determination time of the isolated witness mode is slightly lower than that of the other two storage modes, along with the increase of the determined transaction amount, the determination time is mainly related to the writing rate of the transaction record, the determination time of the isolated witness storage mode is obviously longer than that of the Bitcoin XT storage mode, and the storage mode of the four-branched-chain structure is obviously lower than that of the other two storage modes, that is, the storage mode of the four-branched-chain structure < bit.
Claims (5)
1. Four branch chain structure golden melt block chain memory system, its characterized in that, its step is:
step 1, constructing a ternary account book structure of a four-branched chain type structure golden melt block chain;
step 2, constructing a four-branched-chain type structure storage model;
step 3, establishing a four-branch chain structure safety judgment mechanism;
and 4, establishing a four-branched chain type structure block chain head static rotation mechanism.
2. The system of claim 1, wherein the step 1 of constructing a ternary ledger structure of four-branch chain structure golden melt block chains comprises the following steps:
step 1-1 fully replicating a storage structure:
each subchain traced back to the founding block is called a storage unit, and each node needs to store at least one complete storage unit when storing transaction information; dynamically managing each sub-chain in the block chain, providing management nodes of a block chain global view, recording all accounts of the whole multi-branch tree block chain by the nodes, and dynamically selecting the sub-block chain with the largest profit according to the state of each sub-block chain by the nodes; when the information is transmitted by the network through a flood model method, the nodes of the storage structure are adopted to synchronize the information output by all the nodes;
step 1-2 multi-cell memory architecture:
the storage node is responsible for recording the data of the link subchain of the block, the stored data in the node is updated regularly, the node stores the data information generated by the local node, provides a local view for storing the subchain, dynamically selects other nodes for storage according to the number of limited accounts, and continuously selects a single storage unit or a plurality of storage units for data storage, but when the storage units are replaced for data storage, the chain to be stored needs to be updated synchronously, and when the network transmits the information through a flood paradigm, the node adopting the storage structure only synchronizes the information of the needed chain;
step 1-3 a full split storage architecture:
under the condition of lowest requirement on the bookkeeping environment, each node records the only unit book of the mine to be excavated, the node with the full-division storage structure can only provide a single view of the storage subchain, the views of other chain structures of the block chain can not be provided, and the node is only responsible for synchronously storing and updating the chain information when the network transmits the information through the flood paradigm.
3. The system for storing the golden melt block chain with the four-branched structure according to claim 1, wherein the step 2 of constructing the storage model with the four-branched structure comprises the following steps:
step 2-1, designing a free competition chain structure:
realizing a free competition chain structure: each subchain of the structure is independent after being branched, the subchains only pack information on the chain and do not interact with other chains, and nodes newly added with accounting freely select two storage schemes, wherein one scheme is that the nodes actively select the subchains according to addresses Chainip, and the other scheme is that the accounting chains are dynamically allocated by a system; the system defaults to make the length of the whole block chain sub-chain consistent, and nodes which are newly added and select the default system are allocated to the block chain with fewer nodes for accounting.
Step 2-2 serial centralized chain structure design:
realize the chain structure in serial concentration: after the chain structure of the structure is branched, honest calculation power is concentrated by each branched chain node in the information storage process, the concentrated total calculation power sequentially packs blocks at the same height of the branched chains from left to right, the branched chain structure enters the next height to pack after all the sub chains at the current height are packed, and the nodes added into the chain structure are forced to pack according to the rule;
step 2-3Z shape chain structure design:
realize the chain structure of the zigzag shape: the chain structure is branched, and each branched block is carried out according to the following rules in the information storage process: the structure concentrates the calculation force of each branch chain to pack blocks from left to right and from top to bottom in sequence, each layer block of each sub-chain records brother hash values of a brother block of the previous layer except for the hash value of a parent block of the chain, the blocks on the sub-chain of the same layer are created from left to right in sequence, after the data storage of the layer block is finished, the creation process of the leftmost sub-chain block of the next layer is started, and then the blocks on the sub-chain of the same layer are created from left to right in sequence;
step 2-4, designing a parallel average chain structure:
realizing a parallel average chain structure: the chain structure is branched, and each branched block is carried out according to the following rules in the information storage process: after the parallel average chain structure is branched, each child chain not only records the parent hash value of one block on the chain, but also needs to record the comprehensive hash value of the block on the previous layer, and enters the next layer after all the blocks on the previous layer are packed out of order.
4. The system according to claim 1, wherein the establishing of the four-branch chain structure safety judgment mechanism in step 3 comprises the following steps:
step 3-1, a free competition safety judgment mechanism:
the number of branches of a block chain branched chain is n, a malicious node with the computing power accounting for q competes with the honest computing power on a single branched chain, the safety state value of the block chain is s, the probability of successfully pursuing z blocks is p, and when p is not greater than the safety state value s, the block chain branched chain is judged to be in a safety state;
the probability of an attacker catching up z blocks of honest chain is as follows:
namely:
wherein the content of the first and second substances,p1 is 1-q1, the attack success rate of the malicious node is obtained according to the state of the malicious node during the malicious attack,
wherein, λ is (q1/p1) × z, and the final success probability of the malicious computational power attack is obtained after the arrangement;
finally, judging the safety state of the chain structure according to whether the attack success probability p is smaller than the safety state value s of comprehensive evaluation;
step 3-2, serial centralized safety judgment mechanism:
the number of branches of a block chain branched chain is n, a malicious node with the computing power accounting for q competes with the honest computing power on a single branched chain, the safety state value of the block chain is s, the probability of successfully pursuing z blocks is p, and when p is not greater than the safety state value s, the block chain branched chain is judged to be in a safety state;
the probability of an attacker catching up z blocks of honest chain is as follows:
namely:
the attack success rate of the malicious node is obtained according to the state of the malicious node during the malicious attack,
wherein, the lambda is q x z/p, and the finishing is carried out to obtain:
[(z+1-n)/n]&expressed as taking the smallest integer greater than (z + 1-n)/n;
finally, if the attack success probability p is smaller than the safety state value s of comprehensive evaluation, the chain structure is considered to be in a safety state;
step 3-3Z-shaped safety judgment mechanism:
the number of branches of a block chain branched chain is n, a malicious node with the computing power accounting for q competes with the honest computing power on a single branched chain, the safety state value of the block chain is s, the probability of successfully pursuing z blocks is p, and when p is not greater than the safety state value s, the block chain branched chain is judged to be in a safety state;
the probability of an attacker catching up z blocks of honest chain is as follows:
synthesizing the state of the malicious node during the malicious attack to obtain the attack success rate of the malicious node;
finishing to obtain:
if the last attack success probability p is smaller than the safety state value s of comprehensive evaluation, the chain structure is considered to be in a safety state;
step 3-4, parallel average safety judgment mechanism:
the number of branches of a block chain branched chain is n, a malicious node with the computing power accounting for q competes with the honest computing power on a single branched chain, the safety state value of the block chain is s, the probability of successfully pursuing z blocks is p, and when p is not greater than the safety state value s, the block chain branched chain is judged to be in a safety state;
the probability of an attacker catching up z blocks of honest chain is as follows:
wherein the content of the first and second substances,p1 ═ 1-q 1; synthesizing the state of the malicious node during the malicious attack to obtain the attack success rate of the malicious node;
wherein, the lambda is q1 xz/p 1, and the finishing result is:
and if the last attack success probability p is smaller than the safety state value s of the comprehensive evaluation, the chain structure is considered to be in a safety state.
5. The system according to claim 1, wherein the step 4 of establishing the four-branch chain structure blockchain head static rotation mechanism is specifically:
in the four-branch chain type structure golden block chain storage system, various chain structures are combined to form a whole, when a block head is in a chain structure alternate transition to another chain structure, corresponding head information can be in self-adaptive alternate, in order to simplify the block head information, version number, Merkel tree root, random number nonce, timestamp and creation difficulty field information are omitted, and only head Domain, Up, Down, ChainIP, Brohash, Stage and Allhash fields related to branch chains are reserved; the initial block is firstly forked by a parallel average chain structure, then each subchain is further forked by a Z-shaped loop chain structure, a free competition chain structure and a serial concentrated chain structure, and finally the stable transition of the four-branched chain is realized as shown in Table 1.
TABLE 1 header information rotation table
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110377277.6A CN112947868B (en) | 2021-04-08 | 2021-04-08 | Four-branch chain type structure financial block chain storage method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110377277.6A CN112947868B (en) | 2021-04-08 | 2021-04-08 | Four-branch chain type structure financial block chain storage method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112947868A true CN112947868A (en) | 2021-06-11 |
CN112947868B CN112947868B (en) | 2024-05-03 |
Family
ID=76231131
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110377277.6A Active CN112947868B (en) | 2021-04-08 | 2021-04-08 | Four-branch chain type structure financial block chain storage method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112947868B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110310119A (en) * | 2019-07-06 | 2019-10-08 | 辽宁大学 | Extendible capacity storage method towards the transaction of transregional piece of chain |
CN110321074A (en) * | 2019-05-20 | 2019-10-11 | 西安电子科技大学 | The common recognition method proved based on the secure storage of block chain and distributed memory system |
WO2020015668A1 (en) * | 2018-07-20 | 2020-01-23 | 北京航空航天大学 | Block chain storage method and node of block chain |
CN111611315A (en) * | 2020-05-25 | 2020-09-01 | 辽宁大学 | Financial big data-oriented multi-branch tree structure block chain integrated optimization storage method |
-
2021
- 2021-04-08 CN CN202110377277.6A patent/CN112947868B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020015668A1 (en) * | 2018-07-20 | 2020-01-23 | 北京航空航天大学 | Block chain storage method and node of block chain |
CN110321074A (en) * | 2019-05-20 | 2019-10-11 | 西安电子科技大学 | The common recognition method proved based on the secure storage of block chain and distributed memory system |
CN110310119A (en) * | 2019-07-06 | 2019-10-08 | 辽宁大学 | Extendible capacity storage method towards the transaction of transregional piece of chain |
CN111611315A (en) * | 2020-05-25 | 2020-09-01 | 辽宁大学 | Financial big data-oriented multi-branch tree structure block chain integrated optimization storage method |
Non-Patent Citations (2)
Title |
---|
乔蕊;董仕;魏强;王清贤;: "基于区块链技术的动态数据存储安全机制研究", 计算机科学, no. 02 * |
于雷;金岩;: "区块链全局账本数据的拆分技术研究", 高技术通讯, no. 2 * |
Also Published As
Publication number | Publication date |
---|---|
CN112947868B (en) | 2024-05-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109903049A (en) | A kind of block chain transaction data storage method, device, equipment and storage medium | |
CN110427433B (en) | Block chain consensus method and storage medium | |
EP4155966A1 (en) | Blockchain data indexing method, and blockchain data storage method | |
CN110493325A (en) | Block chain state method of data synchronization and device, electronic equipment | |
CN106777351A (en) | Computing system and its method are stored based on ART tree distributed systems figure | |
CN111338766A (en) | Transaction processing method and device, computer equipment and storage medium | |
CN109522428B (en) | External memory access method of graph computing system based on index positioning | |
CN108765151A (en) | A kind of method of commerce based on block chain | |
CN112380209B (en) | Block chain multi-channel state data-oriented structure tree aggregation method | |
CN106569896B (en) | A kind of data distribution and method for parallel processing and system | |
Hong et al. | Scaling blockchain via layered sharding | |
CN110233802A (en) | A method of the block chain framework of the building more side chains of one main chain | |
CN112202775B (en) | Consensus mechanism architecture and method for block chain of directed acyclic graph structure | |
CN111478811A (en) | Network key point analysis method based on double-layer information flow transmission | |
CN112800065A (en) | Efficient data retrieval method based on improved block storage structure | |
CN109710668A (en) | A kind of multi-source heterogeneous data access middleware construction method | |
Jia et al. | SE-chain: a scalable storage and efficient retrieval model for blockchain | |
CN114881654B (en) | Efficient block chain transaction query technology based on radix estimation method | |
CN111475837B (en) | Network big data privacy protection method | |
CN110704438A (en) | Method and device for generating bloom filter in block chain | |
CN110336677A (en) | Block packing, broadcasting method and system, equipment and storage medium | |
CN106384292A (en) | System and method for collecting relation among social network users | |
CN112947868A (en) | Four-branch chain structure golden melt block chain storage system | |
Gouveia et al. | Dynamic programming based heuristics for the topological design of local access networks | |
CN106161056B (en) | The distributed caching O&M method and device of preiodic type data |
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 |