CN112947868B - Four-branch chain type structure financial block chain storage method - Google Patents

Four-branch chain type structure financial block chain storage method Download PDF

Info

Publication number
CN112947868B
CN112947868B CN202110377277.6A CN202110377277A CN112947868B CN 112947868 B CN112947868 B CN 112947868B CN 202110377277 A CN202110377277 A CN 202110377277A CN 112947868 B CN112947868 B CN 112947868B
Authority
CN
China
Prior art keywords
chain
storage
block
branch
sub
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
CN202110377277.6A
Other languages
Chinese (zh)
Other versions
CN112947868A (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.)
Liaoning University
Original Assignee
Liaoning University
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 Liaoning University filed Critical Liaoning University
Priority to CN202110377277.6A priority Critical patent/CN112947868B/en
Publication of CN112947868A publication Critical patent/CN112947868A/en
Application granted granted Critical
Publication of CN112947868B publication Critical patent/CN112947868B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Abstract

A four-branch chain type structure financial block chain storage method comprises the steps of firstly constructing a four-branch chain type structure financial block chain ternary account book structure, storing data in a block body of the four-branch chain type structure, and storing the data in a ternary mode according to different storage environments: full aggregate storage, multi-unit storage and full partition storage, and data storage efficiency is improved through data shunt parallel storage. And secondly, constructing a four-branch chain structure storage model which comprises a free competition chain structure, a serial centralized chain structure, a Z-shaped return chain structure and a parallel average chain structure, and storing data by taking the four chain structures as carriers. And thirdly, establishing a security judging mechanism of the four-branch chain structure to judge the security state of the chain structure. And finally, adjusting the intermediate transition state of each branch chain, and establishing a four-branch chain structure block chain head static rotation mechanism to ensure that four-branch chains are in stable transition. The system has great advantages in the aspects of data storage rate and communication overhead.

Description

Four-branch chain type structure financial block chain storage method
Technical Field
The invention belongs to the field of blockchain data storage, in particular relates to a blockchain storage system design, and particularly relates to a four-branch chain structure financial blockchain storage method design.
Background
The blockchain is a novel information processing mode for carrying out large data credible storage by adopting an efficient cryptography principle, and has the characteristics of safety, credibility, retrospection, decentralization and the like, so that the application related to the blockchain technology is more and more widely in recent years. The blockchain stores transaction data on the chain, is influenced by transaction scale, has huge data storage quantity, fast change of transaction data scale and rapid increase of real-time yield of blockchain data, so that the existing blockchain data storage rate is difficult to keep up with the real-time yield rate of data, the data cannot be stably adapted to the increase of the data quantity, and the associated storage efficiency of a single chain mode in a complex classification scene is low. For example, in a blockchain system of financial activities, the difference of accounting speeds of each financial enterprise is large, nearly ten thousands of transactions can be generated per second in banks and securities exchanges, and the accounting speed of the blockchain in a single chain mode is dozens of transactions per second, which is obviously delayed from the transaction generating speed, and data information is excessively accumulated in a network, so that the network is jammed and stagnated.
The existing blockchain mainly has the following problems in data storage: the blockchain data storage mode becomes a research hot point due to the principles of reliable and efficient cryptography and the like, but in recent years, the blockchain information is rapidly increased, and the existing blockchain storage mode is difficult to keep pace with the blockchain data generation rate in real time, so that a series of blockchain networks are stagnated, the blockchain stability is reduced and the like. In addition, the blockchain information grows rapidly, and if a blockchain mode which is stable for a long time does not exist, blockchain bifurcation and calculation force diversion are easy to be caused. Therefore, it is necessary to construct a block chain structure that is efficient in storage and integration.
Therefore, the real-time and effective block chain integrated optimized storage system in the financial field is designed, and has important significance for safe storage and traceability inquiry of financial big data.
Disclosure of Invention
In order to solve the defects of the existing blockchain storage system in the financial field, the invention provides a four-branch chain structure financial blockchain storage method design oriented to financial big data. The data storage of the financial entity and the financial activity can be effectively performed.
In order to achieve the above purpose, the invention adopts the following technical scheme: the four-branch chain type structure financial block chain storage method is characterized by comprising the following steps:
step 1, constructing a four-branch chain type structure financial block chain ternary ledger structure;
step 2, constructing a four-branch chain structure storage model;
step3, establishing a four-branch chain structure safety judgment mechanism;
and 4, establishing a four-branch chain structure block chain head static rotation mechanism.
The building of the four-branch chain type structure financial block chain ternary ledger structure in the step 1 comprises the following steps:
Step 1-1 full replication storage structure:
Each complete sub-chain traced back to the creation 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, and providing management nodes of a global view of the block chain, wherein the nodes record all account books of the whole multi-tree block chain, and dynamically select the sub-block chain with the biggest profit according to the state of each sub-block chain; when information is transmitted through a network by a flooding method, nodes adopting the storage structure synchronize information produced by all nodes;
step 1-2 multi-cell memory structure:
The storage node which is responsible for recording the block chain sub-chain data updates the storage data in the node at regular intervals, the node stores the data information generated by the local node, a local view of the storage sub-chain is provided, other nodes are dynamically selected for storage according to the number of the limited account book, the node 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 must be synchronously updated, and when the information is transmitted to the network through a flooding method, the node adopting the storage structure only synchronizes the information of the required chain;
step 1-3 full-segment storage structure:
under the condition of lowest requirement on the billing environment, each node records a unique unit account book required by the node, adopts the node with a full-segmentation storage structure, only can provide a single view of a storage sub-chain, the view of other chain structures of the blockchain cannot be provided, and when information is transmitted through a network by a flooding method, the node is only responsible for synchronously storing and updating the chain information.
The building of the four-branch chain structure storage model in the step 2 comprises the following steps:
step 2-1 free competition chain type structural design:
Realizing a free competition chain structure: each sub-chain of the structure is mutually independent after being branched, the sub-chain only packs information on the chain and does not interact with other chains, a node newly added with accounting freely selects two storage schemes, one is that the node actively selects the sub-chain according to an address ChainIp, and the other is that the system dynamically distributes the accounting chain; the system defaults to make the overall blockchain length consistent, and nodes that newly join and select the default system are assigned to blocksubchains with fewer nodes for billing.
Step 2-2 serial centralized chain structure design:
Realize the serial centralized chain structure: after the chain structure of the structure is branched, each branched chain node concentrates honest calculation force in the information storage process, the concentrated calculation force sequentially carries out the packing sequence of the blocks with the same height of the branched chain from left to right, after all sub chains with the current height are packed, the sub chains enter the next height for packing, and the nodes added into the chain structure can be forcedly packed according to the rule;
Step 2-3Z-shaped return chain type structural design:
Realizing a Z-shaped return chain structure: the chain structure is branched, and each branched chain block is carried out according to the following rules in the information storage process: the method is characterized in that the structure concentrates all branched chain calculation forces to pack blocks from left to right from top to bottom, each layer of blocks of each sub-chain records the brother hash value of the brother block of the previous layer except the parent block hash value of the chain, blocks on the same layer of sub-chain are sequentially created from left to right, after the data of the blocks on the same layer are stored, the process of creating the leftmost sub-chain blocks on the next layer is entered, and then the blocks on the same layer of sub-chain are sequentially created from left to right;
step 2-4 parallel average chain structure design
Realizing a parallel average chain structure: the chain structure is branched, and each branched chain block is carried out according to the following rules in the information storage process: after the parallel average chain structure is branched, each sub chain is required to record the comprehensive hash value of the block of the upper layer besides recording the parent hash value of the block of the chain, and after the unordered packing of all the blocks of the upper layer is finished, the sub chain enters the next layer.
The step 3 of establishing a four-branch chain structure safety judgment mechanism comprises the following steps:
Step 3-1 free competition safety judgment mechanism:
The number of branches of the block chain is n, malicious nodes with the calculation force ratio q compete with the honest calculation force on a single branch, the safety state value of the block chain is s, the probability of successfully catching up z blocks is p, and the safety state is judged when p is not greater than the safety state value s;
the probability of an attacker catching up with z blocks of the honest chain is as follows:
Namely:
Wherein, P1=1-q 1, the success rate of the malicious node attack is obtained through the state of the malicious node during the malicious attack,
Wherein lambda= (q 1/p 1) z, and obtaining the success probability of the final malicious computing force attack after finishing;
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 the block chain is n, malicious nodes with the calculation force ratio q compete with the honest calculation force on a single branch, the safety state value of the block chain is s, the probability of successfully catching up z blocks is p, and the safety state is judged when p is not greater than the safety state value s;
the probability of an attacker catching up with z blocks of the honest chain is as follows:
Namely:
Obtaining the attack success rate of the malicious node through the state of the malicious node during malicious attack,
Wherein λ=q×z/p, after finishing:
[ (z+1-n)/n ] & is expressed as taking the smallest integer greater than (z+1-n)/n;
Finally, if the attack success probability p is smaller than the comprehensive rated safety state value s, the chain structure is considered to be in a safety state;
Step 3-3Z-shaped loop safety judgment mechanism:
The number of branches of the block chain is n, malicious nodes with the calculation force ratio q compete with the honest calculation force on a single branch, the safety state value of the block chain is s, the probability of successfully catching up z blocks is p, and the safety state is judged when p is not greater than the safety state value s;
the probability of an attacker catching up with z blocks of the honest chain is as follows:
Synthesizing the states of the malicious nodes during malicious attack to obtain the attack success rate of the malicious nodes;
And (3) finishing to obtain:
if the final attack success probability p is smaller than the comprehensive rated safety state value s, the chain structure is considered to be in a safety state;
step 3-4 parallel average safety judgment mechanism:
The number of branches of the block chain is n, malicious nodes with the calculation force ratio q compete with the honest calculation force on a single branch, the safety state value of the block chain is s, the probability of successfully catching up z blocks is p, and the safety state is judged when p is not greater than the safety state value s;
the probability of an attacker catching up with z blocks of the honest chain is as follows:
Wherein, P1=1-q 1; synthesizing the states of the malicious nodes during malicious attack to obtain the attack success rate of the malicious nodes;
wherein λ=q1×z/p1, the arrangement yields:
And if the final attack success probability p is smaller than the comprehensive rated safety state value s, the chain structure is considered to be in a safety state.
The static rotation mechanism for establishing the four-branch chain structure block chain head part in the step 4 specifically comprises the following steps:
In the four-branch chain structure financial block chain storage method, various chain structures are combined to form a whole, when the block head is shifted from one chain structure to another chain structure, corresponding head information is shifted in a self-adaptive way, and for simplifying 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, allhash fields related to branch chains are reserved; the initial block is first branched by a parallel average chain structure, then each sub-chain is further branched by a Z-shaped loop chain structure, a free competition chain structure and a serial centralized chain structure, and finally stable transition of the four-branch chain is realized as shown in table 1.
Table 1 head information rotation table
The invention has the beneficial effects that:
The invention designs a four-branch chain type structure financial blockchain storage method, which comprises the steps of firstly constructing a four-branch chain type structure financial blockchain ternary account book structure, storing data in a block body of the four-branch chain type structure, and storing the data in a ternary mode according to different storage environments: full aggregate storage, multi-unit storage, full split storage. And secondly, constructing a four-branch chain structure storage model which comprises a free competition chain structure, a serial centralized chain structure, a Z-shaped return chain structure and a parallel average chain structure, and storing data by taking the four chain structures as carriers. And thirdly, establishing a security judging mechanism of the four-branch chain structure to judge the security state of the chain structure. And finally, adjusting the intermediate transition state of each branch chain, and establishing a four-branch chain structure block chain head static rotation mechanism to ensure that four-branch chains are in stable transition. The system has the advantages of improving the data storage rate of the block chain and reducing the network load.
Drawings
FIG. 1 is a schematic diagram of a four-branch chain architecture financial blockchain ternary ledger architecture.
FIG. 2 is a schematic diagram of a four-branch free contention structure.
FIG. 3 is a schematic diagram of a four-branch chain serial centralized architecture.
And 4, a four-branch chain Z-shaped structure schematic diagram is shown.
Figure 5 is a schematic diagram of a four-branch chain parallel average structure.
FIG. 6 is a diagram of four-branch chain block header information update.
FIG. 7 is a schematic diagram of a four-branch chain block transition mode.
FIG. 8 is a diagram showing the comparison of data storage efficiency of a four-branch chain structure
FIG. 9 is a diagram showing comparison of query efficiency of a four-branch chain structure.
FIG. 10 is a diagram showing the comparison of the acknowledgement delays for a four-branch chain configuration.
Detailed Description
The following description of the embodiments of the present invention will be made with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention.
Step1, a four-branch chain type structure financial block chain ternary ledger structure is built. And storing the data units according to the full replication, the multiple units and the full segmentation of the data storage.
Step 1-1 full copy storage Structure
Each complete sub-chain traced back to the creation block is called a storage unit, and each node needs to store at least one complete storage unit when storing transaction information. The method comprises the steps of dynamically managing each sub-chain in the blockchain, and providing management nodes of a global view of the blockchain, wherein the nodes record all accounts of the entire multi-tree blockchain, and the nodes can dynamically select the sub-block chain with the largest profit according to the state of each sub-blockchain. When the information is transmitted through the network by a flooding method, the nodes adopting the storage structure synchronize the information produced by all the nodes.
Step 1-2 Multi-cell memory Structure
The nodes store data information generated by local nodes, a local view of a storage sub-chain is provided, other nodes are dynamically selected for storage according to the number of the limited account books, the nodes can continuously select a single storage unit or a plurality of storage units for data storage, but when the storage units are replaced for data storage, chains to be stored must be synchronously updated, and when the information is transmitted through a network by a flooding method, the nodes adopting the storage structure only synchronize the information of the needed chains.
Step 1-3 full-segment storage structure
Under the condition of lowest requirement on the billing environment, each node records a unique unit account book required by the node, adopts the node with a full-segmentation storage structure, only can provide a single view of a storage sub-chain, the view of other chain structures of the blockchain cannot be provided, and when information is transmitted through a network by a flooding method, the node is only responsible for synchronously storing and updating the chain information.
Step 2, constructing a four-branch chain structure storage model which comprises a free competition chain structure, a serial centralized chain structure, a Z-shaped return chain structure and a parallel average chain structure, and storing data on the basis of four characteristic structure chains
Step 2-1 free competitive chain structure design
Realizing a free competitive chain structure. Each sub-chain of the structure is mutually independent after being branched, and the sub-chain only packs information on the chain and does not interact with other chains. The newly added billing node is free to choose two storage schemes, one is that the node actively selects a sub-chain based on address ChainIp and the other is that the system dynamically allocates billing chains. The system defaults to make the overall blockchain length consistent, and nodes that newly join and select the default system are assigned to blocksubchains with fewer nodes for billing.
Step 2-2 serial centralized chain type structural design
A serial centralized chain structure is realized. After the chain structure is branched, each branched chain node concentrates honest calculation force in the information storage process, after the calculation force is concentrated, the packing sequence of the same height blocks of the branched chains is sequentially carried out from left to right, after all sub chains of the current height are packed, the sub chains enter the next height for packing, the nodes added into the chain structure can be forced to be packed according to the rule, and the structure also has good compatibility.
Step 2-3Z-shaped return chain type structural design
Realizing a Z-shaped return chain structure. The chain structure is branched, each branched chain block is carried out according to the following rule in the information storage process, and in order to offset the computational force safety problem generated by distributing computational force to multiple chains, the structure concentrates each branched chain computational force to pack the blocks from left to right and from top to bottom in sequence. Each layer of blocks of each sub-chain records the brother hash value of the brother block of the previous layer except the parent block hash value of the chain, the blocks on the same layer of sub-chain are sequentially created from left to right, after the data of the blocks on the same layer are stored, the process of creating the left-most sub-chain blocks on the next layer is entered, and then the blocks on the same layer of sub-chain 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 processed according to the following rules in the information storage process, malicious nodes are used for carrying out malicious attack on the structure, excessive computing power resources are required to be consumed, and the structure shows good defense effect. After the parallel average chain structure is branched, each sub chain is required to record the comprehensive hash value of the block of the upper layer besides recording the father hash value of the block of the chain, and after the unordered packing of all the blocks of the upper layer is finished, the next layer is entered.
And 3, establishing a four-branch chain structure safety judging mechanism, and respectively judging the safety of the free competition chain structure, the serial centralized chain structure, the Z-shaped return chain structure and the parallel average chain structure to judge the feasibility of the running environment.
Step 3-1 free competition safety judgment mechanism
The free competing chained architecture encounters malicious attacks by malicious nodes in the network, which in turn leads to the double-flower problem. The number of branches of the block chain is n, malicious nodes with the calculation force ratio q compete with the honest calculation force on a single branch, the safety state value of the block chain is s, the probability of successfully catching up z blocks is p, and the safety state is judged when p is not greater than the safety state value s.
The probability of an attacker catching up with z blocks of the honest chain is shown below.
Namely:
Wherein, P1=1-q 1. And integrating the states of the malicious nodes during malicious attack to obtain the success rate of the malicious node attack.
And obtaining the final probability of success of malicious computing force attack after finishing, wherein lambda= (q 1/p 1) z.
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) Taking n branch chains (assuming n=2) in the free competition chain structure, attacking the branch chains by a malicious node with the calculation power ratio q (assuming q to be 0.01,0.05,0.1,0.2), wherein the number of the confirmed blocks of the calculation power is z (assuming z to be 1,3,5,7,9, 11, 13, 15 and 17), the safety state value of the chain structure is s (assuming s to be 0.01), and judging the safety state of the chain structure.
(2) And comparing the attack success probability obtained by the steps with the security state value s to obtain the following table.
Table 1: free competition chain safety state table
(3) According to the final calculation result of the table, when the attack success probability is smaller than the security state value s, the chain structure is in a security state, namely the security state quantity is +1, the security state quantity is counted in the table, and analysis results show that the larger the malicious calculation force occupation ratio is, the smaller the corresponding security state quantity meeting the requirements is, the more the number of confirmation blocks is, the higher the security coefficient of the chain structure is, and the free competition chain structure is realized in the environment meeting the security state.
Step 3-2 serial centralized safety identification mechanism
The serial centralized chain structure encounters malicious node malicious attack in the network, which in turn causes the double-flower problem. The number of branches of the block chain is n, malicious nodes with the calculation force ratio q compete with the honest calculation force on a single branch, the safety state value of the block chain is s, the probability of successfully catching up z blocks is p, and the safety state is judged when p is not greater than the safety state value s.
The probability of an attacker catching up with z blocks of the honest chain is shown below.
Namely:
And integrating the states of the malicious nodes during malicious attack to obtain the success rate of the malicious node attack.
Wherein λ=q×z/p, after finishing:
[ (z+1-n)/n ] & is expressed as taking the smallest integer greater than (z+1-n)/n.
And finally, if the attack success probability p is smaller than the comprehensive rated safety state value s, the chain structure is considered to be in a safety state.
The specific process is as follows:
(1) Taking n branch chains (supposing n=2) in the serial centralized chain structure, attacking the branch chains by a malicious node with the calculation force ratio q (supposing q to be 0.01,0.05,0.1,0.2), wherein the number of the confirmed blocks of the calculation force is z (supposing z to be 1,3,5,7,9, 11, 13, 15 and 17), the safety state value of the chain structure is s (supposing s to be 0.01), and judging the safety state of the chain structure.
(2) And comparing the attack success probability obtained by the steps with the security state value s to obtain the following table.
Table 2: serial centralized 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 a safety state, namely the safety state quantity is +1, the safety state quantity is counted in the table, and the analysis results show that the larger the malicious calculation force occupation ratio is, the smaller the corresponding safety state quantity meeting the requirements is, the more the number of the confirmation blocks is, the higher the safety coefficient of the chain structure is, and the serial centralized chain structure is required to be realized in an environment meeting the safety state.
Step 3-3Z-shaped loop safety identification mechanism
The Z-shaped loop chain structure encounters malicious node malicious attack in the network, thereby causing the double-flower problem. The number of branches of the block chain is n, malicious nodes with the calculation force ratio q compete with the honest calculation force on a single branch, the safety state value of the block chain is s, the probability of successfully catching up z blocks is p, and the safety state is judged when p is not greater than the safety state value s.
The probability of an attacker catching up with z blocks of the honest chain is shown below.
And integrating the states of the malicious nodes during malicious attack to obtain the success rate of the malicious node attack.
And (3) finishing to obtain:
and if the final attack success probability p is smaller than the comprehensive rated safety state value s, the chain structure is considered to be in a safety state.
The specific process is as follows:
(1) In the Z-shaped loop-shaped chain structure, the probability of success of malicious attack of malicious nodes is irrelevant to the bifurcation number n, n branch chains are arbitrarily taken, a malicious node with the calculation force ratio of q (assuming q to be 0.01,0.05,0.1,0.2) attacks the branch chains, at the moment, the number of blocks with the honest calculation force confirmed is Z (assuming Z to be 1,3,5,7,9, 11, 13, 15 and 17), the safety state value of the chain structure is s (assuming s to be 0.01), and the safety state of the chain structure is judged.
(2) And comparing the attack success probability obtained by the steps with the security state value s to obtain the following table.
Table 3: z-shaped loop 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 a safety state, namely the safety state quantity is +1, the safety state quantity is counted in the table, and analysis is carried out, so that the larger the malicious calculation force occupation ratio is, the smaller the corresponding safety state quantity meeting the requirements is, the more the number of the confirmation blocks is, the higher the safety coefficient of the chain structure is, and the Z-shaped chain structure is required to be realized in an environment meeting the safety state.
Step 3-4 parallel average safety judgment mechanism
The parallel average chain structure encounters malicious node malicious attack in the network, which in turn causes the double-flower problem. The number of branches of the block chain is n, malicious nodes with the calculation force ratio q compete with the honest calculation force on a single branch, the safety state value of the block chain is s, the probability of successfully catching up z blocks is p, and the safety state is judged when p is not greater than the safety state value s.
The probability of an attacker catching up with z blocks of the honest chain is shown below.
Wherein,P1=1-q 1. And integrating the states of the malicious nodes during malicious attack to obtain the success rate of the malicious node attack. /(I)
Wherein λ=q1×z/p1, the arrangement yields:
And if the final attack success probability p is smaller than the comprehensive rated safety state value s, the chain structure is considered to be in a safety state.
The specific process is as follows:
(1) In the parallel average chain structure, n branch chains (n=2) are taken, a malicious node with the calculation force ratio of q (0.01,0.05,0.1,0.2 is taken on the assumption that q) attacks the branch chains, at the moment, the number of the confirmed blocks of the calculation force is z (1, 3,5,7,9, 11, 13, 15 and 17 is taken on the assumption that z), the safety state value of the chain structure is s (0.01 is taken on the assumption that s) and the safety state of the chain structure is judged.
(2) And comparing the attack success probability obtained by the steps with the security state value s to obtain the following table.
Table 4: parallel average chain security 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 a safety state, namely the safety state quantity is +1, the safety state quantity is counted in the table, and the analysis results show that the larger the malicious calculation force occupation ratio is, the smaller the corresponding safety state quantity meeting the requirements is, the more the number of the confirmation blocks is, the higher the safety coefficient of the chain structure is, and the parallel average chain structure is realized in an environment meeting the safety state.
And 4, establishing a four-branch chain structure block chain head static rotation mechanism. When the inter-chain structure is replaced, a unified rule is formulated to restrict the corresponding conversion state, the block head information executes a static rotation mechanism, and the smooth transition between chains is coordinated.
In the four-branch chain structure financial blockchain storage method, various chain structures are combined to form a whole. When the block head is shifted from one chain structure to another chain structure, the corresponding head information is adaptively shifted. To simplify the block header information, the field information such as Merkel tree root, random number nonce, timestamp, etc. is omitted, and only the header Domain, up, down, chainIP, brohash, stage, allhash field related to the branch chain is reserved. As shown in fig. 7, the initial block is first branched by the parallel average chain structure, and then each sub-chain is further branched by the zigzag chain structure, the free competition chain structure and the serial centralized chain structure, so as to finally realize the smooth transition of the four-branch chain as shown in table 5.
Table 5: head information rotation table
Example 1:
In order to better test the data storage efficiency of the four-branch chain structure financial blockchain storage method in the blockchain, as an example of the invention, an experimental environment of 20 cluster nodes is built, the memory of each node host is 8GB, the CPU main frequency is 3.5GHz, and the hard disk capacity is 1TB; the software environment is Ubuntu 16.04 system; codeBlocks 17.12.12, minGW 4.8.4 development environment; NPM:3.10.10; nodeJS: v6.10.2; truffle:2.0.8; testRPC: 3.0.5. 20 host nodes NodeDB of installation TestRPC, in which each NodeDB running a smart contract within the Truffle framework automatically generates 10 node transaction accounts, each NodeDB being responsible for managing and interacting with 10 nodes. The capacity of the basic block is set to be 0.1M, the head state information of the block is modified by modifying the billing rule, and the like, and meanwhile, the experimental environment of the four-branch chain structure financial block chain storage system is established by Migrations deployment contracts. And comparing with the isolation authentication storage and BitcoinXT storage modes according to the operation result and data of the experiment.
The experiment is operated on a data set of manual simulation transaction, transaction account information generated by the nodes is transmitted to a block chain test network, original data are extracted, and a real experiment result data set on a small-scale data set is obtained through a four-branch chain storage mode. The whole processing flow is mainly divided into the following parts:
(1) Data preprocessing: the original transaction data is preprocessed, the related effective digital signature, the standardized transaction grammar, the transaction index and the like are included, other redundant attributes are deleted, only the experimental related test data set is reserved, and before the blockchain is packed into a block, the transaction information meeting the requirements can be chained.
(2) Four-branch chain structure storage mode: after data preprocessing, a branch chain structure storage mode is executed on an information set on a block chain network on the basis of keeping the front-back hash anchoring, random number operation and the like of related data information, and the executed data set is normally linked.
(3) Real dataset query: based on the data preprocessing and the data set after the four-branch chain structure storage mode, acquiring the data set according to the four-stage processing strategy of the four-branch chain structure block chain storage system, actually inquiring the stored data set, and finally returning an inquiring result.
And comparing the data storage rate, the query efficiency and the confirmation delay of the three strategies through experimental data on the real data set, and evaluating the execution efficiency of the four-branch chain structure storage.
Data storage rate contrast
In the experiment, the isolation authentication storage mode is realized by adding 0.1M volume equal to witness structural signature information through a main chain block, the Bitcoin XT storage mode sets the recorded block volume to 0.8M, the four-branch chain structure storage mode sets the block volume to 0.4M, and the three-fork tree structure is used for data storage. The experimental data of fig. 8 were obtained after statistics of the experimental data. As shown in FIG. 8, the blockchain data storage rate using the quarantine authentication storage is not greater than 220 pens/sec, the blockchain record data storage rate using the Bitcoin XT storage is not greater than 700 pens/sec, and the blockchain data storage rate using the four-branch chain storage is not less than 400 pens/sec, not greater than 1200 pens/sec. Therefore, the four-branch chained architecture storage mode is significantly higher in data storage rate than the isolated witness and Bitcoin XT storage modes.
Query efficiency contrast
During experiments, the total storage amount of the accounting data is the same, the isolation verification storage mode and the Bitcoin XT storage mode use a single-chain mode to store data, and the four-branch chain storage side strategy stores data through a three-tree chain structure. As shown in FIG. 9, the time consumed by the query in the isolation verification mode is obviously longer than that of the four-branch chain structure storage mode and Bitcoin XT mode, the query time is between 0 and 60s, the query time is between 0 and 20s in the Bitcoin XT storage mode, the query height of the four-branch chain storage strategy is reduced through the three-branch chain structure, and the query time is stabilized between 0 and 15s. In the comprehensive view, the four-branch chain structure storage mode is optimal.
Acknowledgement delay contrast
In the experiment, the POW workload is adopted in all three storage modes, and the generation rate of each single-chain block in each mode is equal. According to the method, the determining time of a single transaction is approximately equal, the transaction information stored in the block body of the isolated witness storage mode is the shortest, so that the time for writing the transaction information into the block body and verifying the transaction signature is the shortest, namely, the time for confirming the isolated witness mode is slightly lower than that of other two storage modes, the time for confirming the isolated witness mode is mainly related to the writing rate of a transaction record along with the increase of the determining transaction amount, the time for confirming the isolated witness mode is obviously longer than that of Bitcoin XT storage modes, the time for confirming the four-branch chain type structure storage mode is obviously lower than that of other two storage modes, namely, the time for confirming the isolated witness mode is < Bitcoin XT < in the four-branch chain type structure storage mode.

Claims (4)

1. The four-branch chain type structure financial block chain storage method is characterized by comprising the following steps:
Step 1, constructing a four-branch chain type structure financial block chain ternary ledger structure; comprising the following steps: 1-1 full copy storage structure, 1-2 multi-unit storage structure, 1-3 full split storage structure;
step 2, constructing a four-branch chain structure storage model; comprising the following steps: step 2-1 free competition chain type structural design, step 2-2 serial centralized chain type structural design, step 2-3Z-shaped return chain type structural design and step 2-4 parallel average chain type structural design;
step3, establishing a four-branch chain structure safety judgment mechanism;
Step 3-1 free competition safety judgment mechanism:
The number of branches of the block chain is n, malicious nodes with the calculation force ratio q compete with the honest calculation force on a single branch, the safety state value of the block chain is s, the probability of successfully catching up z blocks is p, and the safety state is judged when p is not greater than the safety state value s;
the probability of an attacker catching up with z blocks of the honest chain is as follows:
Namely:
Wherein, P1=1-q 1, the success rate of the malicious node attack is obtained through the state of the malicious node during the malicious attack,
Wherein lambda= (q 1/p 1) z, and obtaining the success probability of the final malicious computing force attack after finishing;
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 the block chain is n, malicious nodes with the calculation force ratio q compete with the honest calculation force on a single branch, the safety state value of the block chain is s, the probability of successfully catching up z blocks is p, and the safety state is judged when p is not greater than the safety state value s;
the probability of an attacker catching up with z blocks of the honest chain is as follows:
Namely:
Obtaining the attack success rate of the malicious node through the state of the malicious node during malicious attack,
Wherein λ=q×z/p, after finishing:
[ (z+1-n)/n ] & is expressed as taking the smallest integer greater than (z+1-n)/n;
Finally, if the attack success probability p is smaller than the comprehensive rated safety state value s, the chain structure is considered to be in a safety state;
Step 3-3Z-shaped loop safety judgment mechanism:
The number of branches of the block chain is n, malicious nodes with the calculation force ratio q compete with the honest calculation force on a single branch, the safety state value of the block chain is s, the probability of successfully catching up z blocks is p, and the safety state is judged when p is not greater than the safety state value s;
the probability of an attacker catching up with z blocks of the honest chain is as follows:
Synthesizing the states of the malicious nodes during malicious attack to obtain the attack success rate of the malicious nodes;
And (3) finishing to obtain:
if the final attack success probability p is smaller than the comprehensive rated safety state value s, the chain structure is considered to be in a safety state;
step 3-4 parallel average safety judgment mechanism:
The number of branches of the block chain is n, malicious nodes with the calculation force ratio q compete with the honest calculation force on a single branch, the safety state value of the block chain is s, the probability of successfully catching up z blocks is p, and the safety state is judged when p is not greater than the safety state value s;
the probability of an attacker catching up with z blocks of the honest chain is as follows:
Wherein, P1=1-q 1; synthesizing the states of the malicious nodes during malicious attack to obtain the attack success rate of the malicious nodes;
wherein λ=q1×z/p1, the arrangement yields:
If the final attack success probability p is smaller than the comprehensive rated safety state value s, the chain structure is considered to be in a safety state;
and 4, establishing a four-branch chain structure block chain head static rotation mechanism.
2. The method for storing a four-branch chain type structure financial blockchain of claim 1, wherein the constructing the four-branch chain type structure financial blockchain ternary ledger structure in step 1 includes the steps of:
Step 1-1 full replication storage structure:
Each complete sub-chain traced back to the creation 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, and providing management nodes of a global view of the block chain, wherein the nodes record all account books of the whole multi-tree block chain, and dynamically select the sub-block chain with the biggest profit according to the state of each sub-block chain; when information is transmitted through a network by a flooding method, nodes adopting the storage structure synchronize information produced by all nodes;
step 1-2 multi-cell memory structure:
The storage node which is responsible for recording the block chain sub-chain data updates the storage data in the node at regular intervals, the node stores the data information generated by the local node, a local view of the storage sub-chain is provided, other nodes are dynamically selected for storage according to the number of the limited account book, the node 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 must be synchronously updated, and when the information is transmitted to the network through a flooding method, the node adopting the storage structure only synchronizes the information of the required chain;
step 1-3 full-segment storage structure:
under the condition of lowest requirement on the billing environment, each node records a unique unit account book required by the node, adopts the node with a full-segmentation storage structure, only can provide a single view of a storage sub-chain, the view of other chain structures of the blockchain cannot be provided, and when information is transmitted through a network by a flooding method, the node is only responsible for synchronously storing and updating the chain information.
3. The four-branch chain structure financial blockchain storage method of claim 1, wherein the building of the four-branch chain structure storage model in step 2 includes the steps of:
step 2-1 free competition chain type structural design:
Realizing a free competition chain structure: each sub-chain of the structure is mutually independent after being branched, the sub-chain only packs information on the chain and does not interact with other chains, a node newly added with accounting freely selects two storage schemes, one is that the node actively selects the sub-chain according to an address ChainIp, and the other is that the system dynamically distributes the accounting chain; the system defaults to make the chain lengths of the whole block chains consistent, and the nodes newly added and selected by the default system are distributed to the block sub-chains with fewer nodes for accounting;
Step 2-2 serial centralized chain structure design:
Realize the serial centralized chain structure: after the chain structure is branched, each branched chain node concentrates honest calculation force in the information storage process, the concentrated calculation force sequentially carries out the packing sequence of the blocks with the same height of the branched chain from left to right, after all sub-chains with the current height are packed, the sub-chains enter the next height for packing, and the nodes added into the chain structure can be forcedly packed according to the rule;
Step 2-3Z-shaped return chain type structural design:
Realizing a Z-shaped return chain structure: the chain structure is branched, and each branched chain block is carried out according to the following rules in the information storage process: the method is characterized in that the structure concentrates all branched chain calculation forces to pack blocks from left to right from top to bottom, each layer of blocks of each sub-chain records the brother hash value of the brother block of the previous layer except the parent block hash value of the chain, blocks on the same layer of sub-chain are sequentially created from left to right, after the data of the blocks on the same layer are stored, the process of creating the leftmost sub-chain blocks on the next layer is entered, and then the blocks on the same layer of sub-chain are sequentially created from left to right;
Step 2-4 parallel average chain structure design:
realizing a parallel average chain structure: the chain structure is branched, and each branched chain block is carried out according to the following rules in the information storage process: after the parallel average chain structure is branched, each sub chain is required to record the comprehensive hash value of the block of the upper layer besides recording the parent hash value of the block of the chain, and after the unordered packing of all the blocks of the upper layer is finished, the sub chain enters the next layer.
4. The method for storing a four-branch chain type architecture blockchain of claim 1, wherein the creating a static rotation mechanism of the four-branch chain type architecture blockchain head in step 4 specifically comprises:
In the four-branch chain structure financial block chain storage method, various chain structures are combined to form a whole, when the block head is shifted from one chain structure to another chain structure, corresponding head information is shifted in a self-adaptive way, and for simplifying 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, allhash fields related to branch chains are reserved; the initial block is branched by a parallel average chain structure, and then each sub-chain is further branched by a Z-shaped return chain structure, a free competition chain structure and a serial centralized chain structure, so that the smooth transition of the four-branch chain is finally realized.
CN202110377277.6A 2021-04-08 2021-04-08 Four-branch chain type structure financial block chain storage method Active CN112947868B (en)

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 CN112947868A (en) 2021-06-11
CN112947868B true 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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
区块链全局账本数据的拆分技术研究;于雷;金岩;;高技术通讯(Z2);全文 *
基于区块链技术的动态数据存储安全机制研究;乔蕊;董仕;魏强;王清贤;;计算机科学(02);全文 *

Also Published As

Publication number Publication date
CN112947868A (en) 2021-06-11

Similar Documents

Publication Publication Date Title
CN110427433B (en) Block chain consensus method and storage medium
CN109903049A (en) A kind of block chain transaction data storage method, device, equipment and storage medium
CN101216821B (en) Data acquisition system storage management 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
CN110471795A (en) Block chain state data reconstruction method and device, electronic equipment
CN110457319A (en) Block chain state date storage method and device, electronic equipment
CN108765151A (en) A kind of method of commerce based on block chain
CN110347684A (en) Based on the classification storage method and device of block chain, electronic equipment
CN103473248B (en) A kind of continuous moving K-nearest neighbor query method under road network environment
CN103106253B (en) A kind of data balancing method based on genetic algorithm in MapReduce computation model
CN102722553A (en) Distributed type reverse index organization method based on user log analysis
CN107491495B (en) Storage method of the preferential space-time trajectory data file of space attribute in auxiliary storage device
CN102184197A (en) Regular expression matching method based on smart finite automaton (SFA)
CN103150163A (en) Map/Reduce mode-based parallel relating method
CN105975345B (en) A kind of video requency frame data dynamic equalization memory management method based on distributed memory
CN110233802A (en) A method of the block chain framework of the building more side chains of one main chain
CN112800065A (en) Efficient data retrieval method based on improved block storage structure
CN106031827A (en) Game server data storage, read method and system based on redis
CN109828975A (en) A kind of extensive quick account book access system based on block chain
CN112947868B (en) Four-branch chain type structure financial block chain storage method
CN109918369A (en) Date storage method and device
CN103281383B (en) A kind of time sequence information recording method of Based on Distributed data source
Gouveia et al. Dynamic programming based heuristics for the topological design of local access networks
CN106161056B (en) The distributed caching O&amp;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