WO2020168477A1 - Method for constructing topology satisfying partition tolerance under alliance chain consensus and system - Google Patents

Method for constructing topology satisfying partition tolerance under alliance chain consensus and system Download PDF

Info

Publication number
WO2020168477A1
WO2020168477A1 PCT/CN2019/075547 CN2019075547W WO2020168477A1 WO 2020168477 A1 WO2020168477 A1 WO 2020168477A1 CN 2019075547 W CN2019075547 W CN 2019075547W WO 2020168477 A1 WO2020168477 A1 WO 2020168477A1
Authority
WO
WIPO (PCT)
Prior art keywords
probability
partition
partition tolerance
alliance chain
state
Prior art date
Application number
PCT/CN2019/075547
Other languages
French (fr)
Chinese (zh)
Inventor
李挥
王菡
邬江兴
伊鹏
陆平
安辉耀
黄健森
Original Assignee
北京大学深圳研究生院
佛山赛思禅科技有限公司
深圳赛思鹏科技发展有限公司
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 北京大学深圳研究生院, 佛山赛思禅科技有限公司, 深圳赛思鹏科技发展有限公司 filed Critical 北京大学深圳研究生院
Priority to PCT/CN2019/075547 priority Critical patent/WO2020168477A1/en
Priority to CN201980005054.8A priority patent/CN111512332B/en
Publication of WO2020168477A1 publication Critical patent/WO2020168477A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/08Computing arrangements based on specific mathematical models using chaos models or non-linear system models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • the invention belongs to the technical improvement field of network construction, and in particular relates to a topology construction method that satisfies the partition tolerance under the alliance chain consensus.
  • Blockchain refers to the construction of unforgeable, non-tamperable and traceable block-chain data in a peer-to-peer network (Peer-to-Peer Networking, also known as peer-to-peer network) environment through transparent and trusted rules Structure to implement and manage the transaction processing mode.
  • Peer-to-Peer Networking also known as peer-to-peer network
  • a blockchain is a chained data structure that combines data blocks in a chronological order and is not tamperable with cryptographic methods.
  • blockchain uses block-chain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, and uses cryptography to ensure data transmission and access A new distributed infrastructure and calculation method that safely uses smart contracts composed of automated script codes to program and manipulate data.
  • the blockchain is essentially a decentralized distributed ledger, and long before the emergence of the blockchain, the idea of distributed has been proposed and matured day by day.
  • Consistency Consistency
  • availability A: Availability
  • partition tolerance Partition tolerance
  • Lynch et al. proved this conjecture and raised it to the CAP theorem.
  • the CAP theorem refines the three factors of consistency, availability, and partition tolerance as important features of distributed system design.
  • Consistency means that any operation in the system should appear to be "atomic" or serial, and all operations appear to be globally ordered;
  • Availability means that any normal node will be Responses should be given within a limited time;
  • Partition tolerance means that when the network is partitioned at a certain moment, the system can still meet consistency and availability.
  • Bitcoin uses an Internet-based peer-to-peer distributed network architecture, and each node has a network routing function. When a new node needs to be connected to the Bitcoin network, perform the following steps:
  • the node After the startup is completed, the node will remember the recently successfully connected node, and can quickly re-establish a connection with the previous node after restarting. If none of the previous nodes can be connected, start from step (1) again.
  • PoA Proof of Authority
  • the same signer can only sign one of (SIGNER_COUNT/2)+1 blocks.
  • one signer at each height is in the IN-TURN state, and other signers are in the OUT-OF-TURN state.
  • the signer in the IN-TURN state can immediately broadcast their own block, OUT-OF -When a signer in TURN state generates a block, it will be broadcast after a random delay.
  • the PoA consensus relies on an effective and trustworthy identity authentication mechanism. Considering that the identity of the signer is open to the entire network, once an attacker attacks more than half of the signers, the system cannot guarantee the correctness of the block. On the other hand, compared with the traditional PBFT consensus algorithm, the PoA consensus algorithm achieves high availability and partition tolerance by weakening the consistency requirement to non-consistency (Aura client) or eventual consistency (Clique client).
  • the purpose of the present invention is to provide a topology construction method that satisfies the partition tolerance under the alliance chain consensus, and aims to solve the above technical problems.
  • the present invention is realized in this way, a topology construction method that satisfies the partition tolerance under the alliance chain consensus, and the topology construction method includes the following steps:
  • step S2 the Markov process converges to a steady-state distribution of an independent initial distribution, and obtaining the steady-state probability of the system under a single network topology includes the following steps:
  • a further technical solution of the present invention is: the MTBF and MTTR of each analysis element in step S3 are independent processes without memory and have a constant mean value; obtaining the partition tolerance probability of the system under a single network topology includes the following steps:
  • the total probability formula is: l indicates the total number of channels, and i indicates that there are and only i channels in the steady state system are in a fault state.
  • a further technical solution of the present invention is: obtaining the average minimum repair time of the system under a single network topology structure includes the following steps:
  • the further technical solution of the present invention is: in the hierarchical network topology, according to the consensus process, the partition tolerance of the lower-level domain is not only affected by its own network topology, but also related to the partition tolerance of the higher-level domain; the partition tolerance of the system Probability is
  • the average minimum repair time of the system is the average minimum repair time of the system.
  • Another object of the present invention is to provide a topology construction system that satisfies the partition tolerance under the alliance chain consensus, and the topology construction system includes
  • the combination module is used to combine the alliance chain consensus mechanism with the network topology to make the alliance chain consensus meet the partition tolerance in probability;
  • Convergence module used to abstract the partition tolerance of the system into a kind of convergent Markov process and obtain the steady-state probability of the system
  • Sampling estimation module used to estimate the probability and minimum repair time of partition failure and not meet the consistency or availability when the number of faulty channels is certain, and obtain the partition tolerance probability and average minimum repair time of the system;
  • a further technical solution of the present invention is that the Markov process in the convergence module converges to a steady-state distribution of an independent initial distribution, and obtaining the steady-state probability of the system under a single network topology includes
  • the cyclic multiplication unit is used to cyclically multiply the state transition matrix P with itself;
  • the judgment unit is used to judge whether the matrix 2-norm of the difference between two consecutive products is less than the set convergence accuracy. If it is less, then the power of P at this time is considered to be the steady-state probability matrix P * , if not less than, Then return to the loop multiplication unit.
  • a further technical solution of the present invention is: the MTBF and MTTR of each analysis element in the sampling estimation module are independent processes without memory and have a constant mean; obtaining the partition tolerance probability of the system under a single network topology includes
  • Sampling unit used to sample N times for each possible state of the steady-state system
  • the estimation unit is used to estimate the probability of partition failure in each state and not meeting consistency or availability
  • the calculation unit is used to calculate the partition tolerance probability of the system according to the total probability formula.
  • the total probability formula is:
  • l indicates the total number of channels
  • i indicates that there are and only i channels in the steady state system are in a fault state.
  • the further technical solution of the present invention is: obtaining the average minimum repair time of the system under a single network topology structure includes
  • the further technical solution of the present invention is: in the hierarchical network topology, according to the consensus process, the partition tolerance of the lower-level domain is not only affected by its own network topology, but also related to the partition tolerance of the higher-level domain; the partition tolerance of the system Probability is
  • the average minimum repair time of the system is the average minimum repair time of the system.
  • the beneficial effects of the present invention are: the network topology is combined with the alliance chain consensus mechanism, so that the alliance chain consensus meets the partition tolerance in probability, and can realize the coexistence of the three CAP factors, which has high practical significance;
  • the mean time between failures and mean time to repair that remain constant over a period of time are used as parameters to improve the Markov model's prediction accuracy for the probability distribution trend of the system state; when the number of failed channels is estimated, the partition failure occurs and does not meet the consistency or availability. Probability and minimum repair time are adapted to the partition tolerance of the consensus mechanism and the characteristics of the network topology to the greatest extent.
  • Figure 1 is a schematic diagram of the Markov state transition diagram of the general network topology.
  • Figure 2 is a schematic diagram of the domain numbering of the hierarchical network topology provided by an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of the partition tolerance probability of a multi-dimensional hypersquare network topology provided by an embodiment of the present invention.
  • Fig. 4 is a schematic diagram of the average minimum repair time of the multi-dimensional hypersquare network topology provided by an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of the partition tolerance probability of a multipoint fully connected network topology provided by an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of the average minimum repair time of the multipoint fully connected network topology provided by an embodiment of the present invention.
  • Fig. 7 is a schematic diagram of the lower boundary of the hierarchical network topology provided by an embodiment of the present invention.
  • Figure 8 is a schematic diagram of a fully symmetric hierarchical network topology provided by an embodiment of the present invention.
  • Fig. 9 is a schematic diagram of a semi-symmetric hierarchical network topology according to an embodiment of the present invention.
  • Fig. 10 is a schematic diagram of an asymmetric hierarchical network topology provided by an embodiment of the present invention.
  • FIG. 11 is a flowchart of a topology construction method that satisfies partition tolerance under the alliance chain consensus provided by an embodiment of the present invention.
  • the present invention provides a topology construction method that satisfies partition tolerance under the alliance chain consensus, which is detailed as follows:
  • the existing blockchain system only strengthens the two factors of consistency, availability, and partition tolerance at the consensus level, and is accompanied by a significant weakening of the third factor, which is still far from the CAP limit.
  • the current mainstream blockchain systems do not consider how to maintain the network topology, which brings potential network communication risks and waste of resources.
  • the present invention a topology construction method and system that meets the tolerance of partitions under the consensus of the alliance chain, combines the network topology with the consensus mechanism of the alliance chain, so that the consensus of the alliance chain meets the tolerance of the partition in probability, and then Able to achieve the coexistence of the three factors of CAP.
  • the present invention also proposes a partition tolerance calculation method, which abstracts the partition tolerance of the system into a kind of convergent Markov process, and uses MATLAB and other simulation software to sample and calculate the network that does not meet the consistency or availability when a partition failure occurs. Probability and average minimum repair time.
  • the present invention specifically analyzes the resource overhead and partition tolerance under different network topologies, and constructs a network topology structure with suitable scale and high partition tolerance for alliance chain consensus with different requirements.
  • the technical scheme of the present invention combines the network topology and the alliance chain consensus mechanism on the basis of not affecting the consistency and availability of the consensus algorithm itself, so that the alliance chain consensus satisfies the partition tolerance in probability, thereby achieving the three factors of CAP Coexistence has high practical significance.
  • a calculation method of partition tolerance is proposed.
  • the partition tolerance problem of the system is abstracted into a kind of convergent Markov process.
  • the mean time between failures and mean time to repair are used as parameters to improve the Markov model’s
  • the prediction accuracy of the trend of the system state probability distribution is proposed.
  • the calculation method under a single network topology structure further derives the partition tolerance under the hierarchical network topology structure, which is not only suitable for general single-chain architecture, but also for multi-chain and cross-chain architecture, and has broad application prospects.
  • Domains at different levels may adopt the same or different network topologies and parameters, and the network topologies of different domains at the same level may not be exactly the same.
  • MTBF Mel Time Between Failures, Mean Time Between Failures
  • MTTR Mel Time To Repair, Mean Time To Repair
  • MTBF is much greater than MTTR.
  • v Total number of network nodes.
  • the probability of failure interruption per unit time of the channel
  • the probability that a channel in a faulty state in the system is repaired per unit time, namely
  • v nodes and l channels make a Markov state transition diagram, as shown in Figure 1.
  • the i-th system state indicates that there are and only i channels in the network are in a fault state (0 ⁇ i ⁇ l).
  • the state transition matrix of the Markov model is a matrix P with a scale of (l+1) ⁇ (l+1), where the element p ji represents the probability of transitioning from the i-th system state to the j-th system state.
  • m denote the number of the same failed channels in state i and state j, and the value range of m is [max ⁇ i+jl, 0 ⁇ , min ⁇ i, j ⁇ ].
  • each system state can come from any other state, that is, the Markov state transition diagram above is fully connected, so P satisfies the irreducibility.
  • Algorithm 1 describes the iterative calculation process of the system steady-state probability. Multiply the state transition matrix P by itself. If the matrix 2-norm of the difference between two consecutive products is less than the given convergence accuracy, then the power of P at this time is considered to be the steady-state probability matrix P * .
  • Algorithm 2 describes the calculation process of the partition tolerance probability of the system under a single network topology. For the various states that the system may be in at steady state, sample N times respectively, estimate the probability of partition failure and not meet consistency or availability, and then calculate the partition tolerance probability of the system according to the full probability formula.
  • the minimum repair time is defined as the minimum time required for the system to repair some channels when a certain failure occurs, so that the system meets consistency and availability.
  • Algorithm 3 describes the calculation process of the average minimum repair time of the system under a single network topology. On the basis of Algorithm 2, for each instance that has a partition failure and does not meet consistency or availability, calculate its minimum repair time, and then multiply it by the weight of the instance in the total system partition tolerance problem to get the average of the system Minimum repair time.
  • each domain is numbered according to a tree structure of (i 1 i 2 i 3 ...), as shown in Figure 2.
  • the partition tolerance of the lower-level domain is not only affected by its own network topology, but also related to the partition tolerance of the higher-level domain. make Represents the partition tolerance probability of each domain. Then the partition tolerance probability of the system is
  • the following is to calculate the partition tolerance probability and the average minimum repair time when the Proof of Vote consensus mechanism (Proof of Vote, PoV) in the alliance chain adopts the hypersquare network topology and the fully connected network topology.
  • a digital optical cable communication system with automatic switching of main and standby systems should meet the annual indicators shown in Table 1. Therefore, taking parameters ( ⁇ , ⁇ ) ⁇ ⁇ ( 4.5662 ⁇ 10 -4, 4.1667 ⁇ 10 -2), (2.7397 ⁇ 10 -4, 6.9444 ⁇ 10 -2), (3.8358 ⁇ 10 -5, 4.9603 ⁇ 10 - 1 ), (2.5571 ⁇ 10 -5 , 7.4405 ⁇ 10 -1 ) ⁇ .
  • Table 2 shows the resource overhead of the two network topologies of multi-dimensional hyper-square and multi-point full connection.
  • Figure 7 shows the lower boundary of this method, that is, the top-level, second-level, and third-level domains are all 2-dimensional hypersquare topological structures;
  • Figure 8 shows a completely symmetrical 3-level topology construction method, the top level The topological structures of the second, second, and third-level domains are all 3-dimensional hypersquares;
  • Figure 9 shows a semisymmetric 2-level topology construction method.
  • the topological structure of the same-level domains is the same, but the top-level domain topology is 4
  • the topological structure of the second-level domain is a 3-dimensional hyper-square;
  • Figure 10 shows an asymmetric 2-level topology construction method.
  • the topological structure of the upper and lower domains and the same-level domains are different. Specifically , The top-level domain adopts a 4-dimensional hyper-square structure, while there are 4, 8, and 4 secondary domains using 4-dimensional hyper-square, 3-dimensional hyper-square and 7-point fully connected structures.
  • the partition tolerance probability and the average minimum repair time of the four hierarchical network topologies in Figure 7 to Figure 10 are further calculated as:
  • t [t 1 *(1-p 1 )+t 11 *p 1 *(1-p 11 )*4+t 111 *p 1 *p 11 *(1-p 111 )*4*4]/( 1-p) ⁇ 21h, that is, the average minimum repair time after a partition failure occurs is about 21 hours.
  • t [t 1 *(1-p 1 )+t 11 *p 1 *(1-p 11 )*8+t 111 *p 1 *p 11 *(1-p 111 )*8*8]/( 1-p) ⁇ 23h, that is, the average minimum repair time after a partition failure occurs is about 23 hours.
  • p 1-[(1-p 1 )+p 1 *(1-p 11 )*16] ⁇ 1-1 ⁇ 10 -8 , that is, a partition failure failure occurs approximately every 11,416 years.
  • t [t 1 *(1-p 1 )+t 11 *p 1 *(1-p 11 )*16]/(1-p) ⁇ 14h, that is, the average minimum repair time after a partition failure occurs is approximately 14 hours.
  • p 1-[(1-p 1 )+p 1 *(1-p 11 )*4+p 1 *(1-p 12 )*8+p 1 *(1-p 13 )*4] ⁇ 1 -6 ⁇ 10 -9 , that is, a partition failure occurs approximately every 19,026 years.
  • t [t 1 *(1-p 1 )+t 11 *p 1 *(1-p 11 )*4+t 12 *p 1 *(1-p 12 )*8+t 13 *p 1 *( 1-p 13 )*4]/(1-p) ⁇ 14h, that is, the average minimum repair time after a partition failure occurs is approximately 14 hours.
  • Another object of the present invention is to provide a topology construction system that satisfies the partition tolerance under the alliance chain consensus, and the topology construction system includes
  • the combination module is used to combine the alliance chain consensus mechanism with the network topology to make the alliance chain consensus meet the partition tolerance in probability;
  • the convergence module is used to abstract the partition tolerance of the system into a kind of convergent Markov process and obtain the steady-state probability of the system;
  • Sampling estimation module used to estimate the probability and minimum repair time of partition failure and not meet the consistency or availability when the number of faulty channels is certain, and obtain the partition tolerance probability and average minimum repair time of the system;
  • the Markov process in the convergence module converges to a steady-state distribution of an independent initial distribution, and obtaining the steady-state probability of the system under a single network topology includes
  • the cyclic multiplication unit is used to cyclically multiply the state transition matrix P with itself;
  • the judgment unit is used to judge whether the matrix 2-norm of the difference between two consecutive products is less than the set convergence accuracy. If it is less, then the power of P at this time is considered to be the steady-state probability matrix P * , if not less than, Then return to the loop multiplication unit.
  • the MTBF and MTTR of each analysis element in the sampling estimation module are independent processes without memory and the mean value is constant; obtaining the partition tolerance probability of the system under a single network topology includes
  • the estimation unit is used to estimate the probability of partition failure in each state and not meeting consistency or availability
  • the calculation unit is used to calculate the partition tolerance probability of the system according to the total probability formula.
  • the total probability formula is:
  • l indicates the total number of channels
  • i indicates that there are and only i channels in the steady state system are in a fault state.
  • the partition tolerance of the lower-level domain is not only affected by its own network topology, but also related to the partition tolerance of the higher-level domain;
  • the partition tolerance probability of the system is The average minimum repair time of the system is among them, Indicates the partition tolerance probability of each domain, Indicates the average minimum repair time of each domain.

Abstract

A method for constructing topology satisfying partition tolerance under alliance chain consensus, applicable to the field of network construction technology improvement. The method comprises: combining the alliance chain consensus mechanism with the network topology structure to make the alliance chain consensus probabilistically satisfy partition tolerance (P) (S1); abstracting the partition tolerance of a system into a convergent Markov process and obtaining the stability probability of the system (S2); estimating the probability of a partition failure and not satisfying consistency (C) or availability (A) when the number of faulty channels are fixed and the shortest repair duration to obtain the partition tolerance probability and average shortest repair duration of the system (S3); and according to the obtained partition tolerance probability and average shortest repair duration, analyzing the resource overhead and partition tolerance under different network topology structures, and constructing for alliance chain consensus having different requirements a network topology having a suitable dimension and high partition tolerance (S4).This method can achieve the coexistence of the three factors (CAP) and has high practical significance.

Description

一种联盟链共识下满足分区容忍性的拓扑构造方法及系统A topology construction method and system satisfying partition tolerance under alliance chain consensus 技术领域Technical field
本发明属于网络构建技术改进领域,尤其涉及一种联盟链共识下满足分区容忍性的拓扑构造方法。The invention belongs to the technical improvement field of network construction, and in particular relates to a topology construction method that satisfies the partition tolerance under the alliance chain consensus.
背景技术Background technique
区块链,指的是一种在对等网络(Peer-to-Peer Networking,又称点对点网络)环境下,通过透明和可信规则,构建不可伪造、不可篡改和可追溯的块链式数据结构,来实现和管理事务处理的模式。根据人们早期对区块链的讨论,狭义上,区块链是一种按照时间顺序将数据区块以顺序相连的方式组合成的一种链式数据结构,并以密码学方式保证的不可篡改和不可伪造的分布式账本;广义上,区块链是利用块链式数据结构来验证和存储数据、利用分布式节点共识算法来生成和更新数据、利用密码学的方式保证数据传输和访问的安全、利用由自动化脚本代码组成的智能合约来编程和操作数据的一种全新的分布式基础架构与计算方式。Blockchain refers to the construction of unforgeable, non-tamperable and traceable block-chain data in a peer-to-peer network (Peer-to-Peer Networking, also known as peer-to-peer network) environment through transparent and trusted rules Structure to implement and manage the transaction processing mode. According to people’s early discussions on the blockchain, in a narrow sense, a blockchain is a chained data structure that combines data blocks in a chronological order and is not tamperable with cryptographic methods. And unforgeable distributed ledgers; in a broad sense, blockchain uses block-chain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, and uses cryptography to ensure data transmission and access A new distributed infrastructure and calculation method that safely uses smart contracts composed of automated script codes to program and manipulate data.
区块链本质上是一种去中心化的分布式账本,而早在区块链出现以前,分布式的思想就已经被提出并日益发展成熟。2000年,Eric Brewer在某个研讨会上提出猜想:一致性(C:Consistency)、可用性(A:Availability)和分区容忍性(P:Partition tolerance)三者无法在分布式系统中同时被完全满足。2002年,Lynch等人证明了这个猜想,并将其上升为CAP定理。CAP定理首次将一致性、可用性和分区容忍性三个因素提炼为分布式系统设计的重要特征。具体地,(1)一致性指系统中任何的操作都应该看起来是“原子”或串行的,所有的操作都看起来像被全局排序;(2)可用性指任何正常节点受到请求后都应该在有限的时间内给出响应;(3)分区容忍性指当网络在某一时刻发生分区时,系统仍然能够满足一致性和可用性。The blockchain is essentially a decentralized distributed ledger, and long before the emergence of the blockchain, the idea of distributed has been proposed and matured day by day. In 2000, Eric Brewer put forward a conjecture at a seminar: Consistency (C: Consistency), availability (A: Availability) and partition tolerance (P: Partition tolerance) cannot be fully satisfied at the same time in a distributed system . In 2002, Lynch et al. proved this conjecture and raised it to the CAP theorem. For the first time, the CAP theorem refines the three factors of consistency, availability, and partition tolerance as important features of distributed system design. Specifically, (1) Consistency means that any operation in the system should appear to be "atomic" or serial, and all operations appear to be globally ordered; (2) Availability means that any normal node will be Responses should be given within a limited time; (3) Partition tolerance means that when the network is partitioned at a certain moment, the system can still meet consistency and availability.
由于区块链的网络环境十分复杂,PoW等主流区块链共识算法通过弱化严格一致性为长时间的最终一致性来满足高可用性和分区容忍性,但这会导致系统的TPS性能受限。因此,EOS等一些高性能的区块链系统选择牺牲部分分区容忍性,通过控制参与记账的节点数量来换取TPS性能的提升。上述两种手段都只是在一致性、可用性和分区容忍性中选择两个因素作为主要强化的点,而大幅度弱化第三个因素,距离CAP极限还有很大的空间。Due to the complex network environment of the blockchain, mainstream blockchain consensus algorithms such as PoW meet high availability and partition tolerance by weakening the strict consistency to a long-term final consistency, but this will result in the system's TPS performance limitation. Therefore, some high-performance blockchain systems such as EOS choose to sacrifice part of the partition tolerance and control the number of nodes participating in accounting in exchange for the improvement of TPS performance. The above-mentioned two methods only choose two factors among consistency, availability and partition tolerance as the main strengthening points, while greatly weakening the third factor, there is still a lot of room from the CAP limit.
比特币采用了基于互联网的点对点分布式网络架构,每个节点都具备网络路由功能。当一个新节点需要接入到比特币网络中时,执行以下步骤:Bitcoin uses an Internet-based peer-to-peer distributed network architecture, and each node has a network routing function. When a new node needs to be connected to the Bitcoin network, perform the following steps:
1.使用DNS种子或seednode命令寻找到比特币网络中的有效节点。1. Use DNS seed or seednode commands to find valid nodes in the Bitcoin network.
2.向发现的有效比特币节点发送一条包含基本认证内容的version消 息进行初始握手通信过程,建立连接。2. Send a version message containing the basic authentication content to the discovered valid Bitcoin node for the initial handshake communication process to establish a connection.
3.将自己的IP地址发送给已连接的节点,这些节点收到后将此转发给它们各自的连接节点,使网络中有更多的节点接收到新节点。3. Send your own IP address to the connected nodes, and these nodes will forward this to their respective connected nodes after receiving it, so that more nodes in the network will receive the new node.
4.向已连接节点请求其已知的节点IP地址列表,从而找到更多可连接的节点。4. Request a list of its known node IP addresses from the connected node to find more connectable nodes.
5.定期向已建立连接的节点发送信息维持连接,如果与某个节点之间长达90分钟没有通信,则被认为已经断开,开始寻找一个新的节点。由于比特币通信基于TCP协议,每个节点的TCP连接数有限,因此超过数量的IP地址会被忽略。5. Periodically send information to the connected node to maintain the connection. If there is no communication with a certain node for 90 minutes, it is considered to have been disconnected and start looking for a new node. Since Bitcoin communication is based on the TCP protocol, each node has a limited number of TCP connections, so IP addresses that exceed the number will be ignored.
启动完成后,节点会记住最近成功连接的节点,当重新启动后可以迅速与先前的节点重新建立连接。如果先前节点均无法连接,则重新从步骤(1)开始执行。After the startup is completed, the node will remember the recently successfully connected node, and can quickly re-establish a connection with the previous node after restarting. If none of the previous nodes can be connected, start from step (1) again.
在比特币区块链节点间通信过程中,不要求维护网络的拓扑结构,也就是不需要将网络进行逻辑意义上抽象,采用泛洪策略进行数据的传输。泛洪思想简单易于实现,而且节点加入、离开以及失效等行为对整个系统的负面影响较小,网络可靠性高。但是,由于网状结构互相连通,泛洪有可能引起节点多次重复收到相同的数据,导致节点信息冗余接收,大量无用的重复数据传输也消耗着网络资源。In the process of communication between Bitcoin blockchain nodes, it is not required to maintain the topology of the network, that is, it is not necessary to abstract the network in a logical sense, and use a flooding strategy for data transmission. The flooding idea is simple and easy to implement, and node joining, leaving, and failure have little negative impact on the entire system, and the network reliability is high. However, due to the interconnection of the network structure, flooding may cause nodes to receive the same data multiple times, resulting in redundant reception of node information, and a large number of useless repeated data transmissions also consume network resources.
基于联盟链的一类权威证明(Proof of Authority,PoA)共识算法由以太坊联合创始人兼前首席技术官Gavin Wood于2017年提出,目前用在以太坊测试网Kovan中。PoA的共识流程为:首先在创世区块中指定一组初始授权的签名者,启动挖矿后签名者开始对生成的区块进行签名并广播上链。如果其他已授权的签名者反对该区块生成,则对该区块的签名者进行“踢出”投票,票数超过签名者总数的50%即取消区块对应签名者的记账权。A type of Proof of Authority (PoA) consensus algorithm based on the alliance chain was proposed by Gavin Wood, the co-founder and former CTO of Ethereum in 2017, and is currently used in the Ethereum test network Kovan. The consensus process of PoA is as follows: First, a group of initially authorized signers is designated in the genesis block, and after mining is started, the signers begin to sign the generated block and broadcast it on the chain. If other authorized signers object to the block generation, the signers of the block will be "kicked out" to vote. If the number of votes exceeds 50% of the total number of signers, the accounting rights of the signers corresponding to the block will be cancelled.
为了减少恶意签名者带来的损失,同一个签名者只能签名(SIGNER_COUNT/2)+1个区块中的一个。为了降低分叉的概率,每一高度都有一个签名者处于IN-TURN状态,其他签名者处于OUT-OF-TURN状态,IN-TURN状态的签名者能够立刻广播自己的区块,OUT-OF-TURN状态的签名者生成区块时则会随机延时一段时间后再广播。In order to reduce the loss caused by malicious signers, the same signer can only sign one of (SIGNER_COUNT/2)+1 blocks. In order to reduce the probability of forks, one signer at each height is in the IN-TURN state, and other signers are in the OUT-OF-TURN state. The signer in the IN-TURN state can immediately broadcast their own block, OUT-OF -When a signer in TURN state generates a block, it will be broadcast after a random delay.
PoA共识依赖于有效且值得信赖的身份认证机制。考虑到签名者的身份是向全网公开的,一旦攻击者攻击了超过半数的签名者,则系统无法保证区块的正确性。另一方面,相较传统的PBFT共识算法,PoA共识算法通过弱化一致性需求为无一致性(Aura客户端)或最终一致性(Clique客户端),来达到高可用性和分区容忍性。The PoA consensus relies on an effective and trustworthy identity authentication mechanism. Considering that the identity of the signer is open to the entire network, once an attacker attacks more than half of the signers, the system cannot guarantee the correctness of the block. On the other hand, compared with the traditional PBFT consensus algorithm, the PoA consensus algorithm achieves high availability and partition tolerance by weakening the consistency requirement to non-consistency (Aura client) or eventual consistency (Clique client).
发明内容Summary of the invention
本发明的目的在于提供一种联盟链共识下满足分区容忍性的拓扑构造方法,旨在解决上述的技术问题。The purpose of the present invention is to provide a topology construction method that satisfies the partition tolerance under the alliance chain consensus, and aims to solve the above technical problems.
本发明是这样实现的,一种联盟链共识下满足分区容忍性的拓扑构造方法,所述拓扑构造方法包括以下步骤:The present invention is realized in this way, a topology construction method that satisfies the partition tolerance under the alliance chain consensus, and the topology construction method includes the following steps:
S1、将联盟链共识机制与网络拓扑结构相结合使联盟链共识在概率上满足分区容忍性;S1. Combine the alliance chain consensus mechanism with the network topology to make the alliance chain consensus meet the partition tolerance in probability;
S2、将系统的分区容忍性抽象为一类可收敛的Markov过程并获取系统的稳态概率;S2, abstract the partition tolerance of the system into a kind of convergent Markov process and obtain the steady-state probability of the system;
S3、估算故障信道数量一定时发生分区故障且不满足一致性或可用性的概率及最小修复时间,得到系统的分区容忍概率及平均最小修复时间;S3. Estimate the probability and minimum repair time of partition failure and not meet consistency or availability when the number of failed channels is certain, and obtain the partition tolerance probability and average minimum repair time of the system;
S4、根据得到的分区容忍概率及平均最小修复时间分析不同网络拓扑结构下的资源开销和分区容忍性,为不同需求的联盟链共识构造规模适合、分区容忍性高的网络拓扑结构。S4. Analyze resource overhead and partition tolerance under different network topologies according to the obtained partition tolerance probability and average minimum repair time, and construct a network topology structure with suitable scale and high partition tolerance for the alliance chain consensus of different needs.
本发明的进一步技术方案是:所述步骤S2中Markov过程收敛于一个独立初始分布的稳态分布,在单一网络拓扑结构下获取系统的稳态概率包括以下步骤:A further technical solution of the present invention is that in the step S2, the Markov process converges to a steady-state distribution of an independent initial distribution, and obtaining the steady-state probability of the system under a single network topology includes the following steps:
S21、将状态转移矩阵P循环与自身相乘;S21: Multiply the state transition matrix P cyclically by itself;
S22、判断连续两次乘积之差的矩阵2-范数是否小于设定的收敛精度,若小于,则认为此时的P的幂值为稳态概率矩阵P *,若不小于,则返回步骤S21。 S22. Determine whether the matrix 2-norm of the difference between two consecutive products is less than the set convergence accuracy. If it is less, then the power of P at this time is considered to be the steady-state probability matrix P * ; if it is not less, then return to step S21.
本发明的进一步技术方案是:所述步骤S3中各个分析元素的MTBF和MTTR都是无记忆的独立过程且均值恒定;在单一网络拓扑结构下获取系统的分区容忍概率包括以下步骤:A further technical solution of the present invention is: the MTBF and MTTR of each analysis element in step S3 are independent processes without memory and have a constant mean value; obtaining the partition tolerance probability of the system under a single network topology includes the following steps:
S311、对于稳态系统的每个可能状态分别抽样N次;S311: Sample N times for each possible state of the steady-state system;
S312、估计每个状态下发生分区故障且不满足一致性或可用性的概率;S312. Estimate the probability that a partition failure occurs in each state and does not meet the consistency or availability;
S313、再根据全概率公式计算系统的分区容忍概率,全概率公式为:
Figure PCTCN2019075547-appb-000001
l表示信道总数,i表示稳态系统中有且仅有i条信道处于故障状态。
S313. Calculate the partition tolerance probability of the system according to the total probability formula. The total probability formula is:
Figure PCTCN2019075547-appb-000001
l indicates the total number of channels, and i indicates that there are and only i channels in the steady state system are in a fault state.
本发明的进一步技术方案是:在单一网络拓扑结构下获取系统的平均最小修复时间包括以下步骤:A further technical solution of the present invention is: obtaining the average minimum repair time of the system under a single network topology structure includes the following steps:
S321、对每一个发生分区故障且不满足一致性或可用性的样本计算最小修复时间;S321. Calculate the minimum repair time for each sample that has a partition failure and does not meet the consistency or availability;
S322、乘以该样本在总系统分区容忍问题中所占的权重,得到系统的平均最小修复时间。S322. Multiply the weight of the sample in the total system partition tolerance problem to obtain the average minimum repair time of the system.
本发明的进一步技术方案是:在层级化网络拓扑结构中,根据共识的过程,下级域的分区容忍不仅受自身的网络拓扑结构影响,还与高层级域的分区容忍性有关;系统的分区容忍概率为The further technical solution of the present invention is: in the hierarchical network topology, according to the consensus process, the partition tolerance of the lower-level domain is not only affected by its own network topology, but also related to the partition tolerance of the higher-level domain; the partition tolerance of the system Probability is
Figure PCTCN2019075547-appb-000002
系统的平均最小修复时间为
Figure PCTCN2019075547-appb-000002
The average minimum repair time of the system is
Figure PCTCN2019075547-appb-000003
其中,
Figure PCTCN2019075547-appb-000004
表示各个域的分区容忍概率,
Figure PCTCN2019075547-appb-000005
表示各个域的平均最小修复时间。
Figure PCTCN2019075547-appb-000003
among them,
Figure PCTCN2019075547-appb-000004
Indicates the partition tolerance probability of each domain,
Figure PCTCN2019075547-appb-000005
Indicates the average minimum repair time of each domain.
本发明的另一目的在于提供一种联盟链共识下满足分区容忍性的拓扑构造系统,所述拓扑构造系统包括Another object of the present invention is to provide a topology construction system that satisfies the partition tolerance under the alliance chain consensus, and the topology construction system includes
结合模块,用于将联盟链共识机制与网络拓扑结构相结合使联盟链共识在概率上满足分区容忍性;The combination module is used to combine the alliance chain consensus mechanism with the network topology to make the alliance chain consensus meet the partition tolerance in probability;
收敛模块,用于将系统的分区容忍性抽象为一类可收敛的Markov过程并获取系统的稳态概率;Convergence module, used to abstract the partition tolerance of the system into a kind of convergent Markov process and obtain the steady-state probability of the system;
抽样估计模块,用于估算故障信道数量一定时发生分区故障且不满足一致性或可用性的概率及最小修复时间,得到系统的分区容忍概率及平均最小修复时间;Sampling estimation module, used to estimate the probability and minimum repair time of partition failure and not meet the consistency or availability when the number of faulty channels is certain, and obtain the partition tolerance probability and average minimum repair time of the system;
构建网络模块,用于根据得到的分区容忍概率及平均最小修复时间分析不同网络拓扑结构下的资源开销和分区容忍性,为不同需求的联盟链共识构造规模适合、分区容忍性高的网络拓扑结构。Construct a network module to analyze the resource overhead and partition tolerance under different network topologies according to the obtained partition tolerance probability and average minimum repair time, and construct a network topology structure with suitable scale and high partition tolerance for the alliance chain consensus of different needs .
本发明的进一步技术方案是:所述收敛模块中Markov过程收敛于一个独立初始分布的稳态分布,在单一网络拓扑结构下获取系统的稳态概率包括A further technical solution of the present invention is that the Markov process in the convergence module converges to a steady-state distribution of an independent initial distribution, and obtaining the steady-state probability of the system under a single network topology includes
循环相乘单元,用于将状态转移矩阵P循环与自身相乘;The cyclic multiplication unit is used to cyclically multiply the state transition matrix P with itself;
判断单元,用于判断连续两次乘积之差的矩阵2-范数是否小于设定的收敛精度,若小于,则认为此时的P的幂值为稳态概率矩阵P *,若不小于,则返回循环相乘单元。 The judgment unit is used to judge whether the matrix 2-norm of the difference between two consecutive products is less than the set convergence accuracy. If it is less, then the power of P at this time is considered to be the steady-state probability matrix P * , if not less than, Then return to the loop multiplication unit.
本发明的进一步技术方案是:所述抽样估计模块中各个分析元素的MTBF和MTTR都是无记忆的独立过程且均值恒定;在单一网络拓扑结构下获取系统的分区容忍概率包括A further technical solution of the present invention is: the MTBF and MTTR of each analysis element in the sampling estimation module are independent processes without memory and have a constant mean; obtaining the partition tolerance probability of the system under a single network topology includes
抽样单元,用于对于稳态系统的每个可能状态分别抽样N次;Sampling unit, used to sample N times for each possible state of the steady-state system;
估计单元,用于估计每个状态下发生分区故障且不满足一致性或可用性的概率;The estimation unit is used to estimate the probability of partition failure in each state and not meeting consistency or availability;
计算单元,用于再根据全概率公式计算系统的分区容忍概率,全概率公式为:The calculation unit is used to calculate the partition tolerance probability of the system according to the total probability formula. The total probability formula is:
Figure PCTCN2019075547-appb-000006
l表示信道总数,i表示稳态系统中有且仅有i条信道处于故障状态。
Figure PCTCN2019075547-appb-000006
l indicates the total number of channels, and i indicates that there are and only i channels in the steady state system are in a fault state.
本发明的进一步技术方案是:在单一网络拓扑结构下获取系统的平均最小修复时间包括The further technical solution of the present invention is: obtaining the average minimum repair time of the system under a single network topology structure includes
计算最小修复时间单元,用于对每一个发生分区故障且不满足一致性或可用性的样本计算最小修复时间;Calculate the minimum repair time unit, which is used to calculate the minimum repair time for each sample that has a partition failure and does not meet the consistency or availability;
计算平均最小修复时间单元,用于乘以该样本在总系统分区容忍问题中所占的权重,得到系统的平均最小修复时间。Calculate the average minimum repair time unit, which is used to multiply the weight of the sample in the total system partition tolerance problem to obtain the average minimum repair time of the system.
本发明的进一步技术方案是:在层级化网络拓扑结构中,根据共识的过程,下级域的分区容忍不仅受自身的网络拓扑结构影响,还与高层级域的分区容忍性有关;系统的分区容忍概率为The further technical solution of the present invention is: in the hierarchical network topology, according to the consensus process, the partition tolerance of the lower-level domain is not only affected by its own network topology, but also related to the partition tolerance of the higher-level domain; the partition tolerance of the system Probability is
Figure PCTCN2019075547-appb-000007
系统的平均最小修复时间为
Figure PCTCN2019075547-appb-000007
The average minimum repair time of the system is
Figure PCTCN2019075547-appb-000008
其中,
Figure PCTCN2019075547-appb-000009
表示各个域的分区容忍概率,
Figure PCTCN2019075547-appb-000010
表示各个域的平均最小修复时间。
Figure PCTCN2019075547-appb-000008
among them,
Figure PCTCN2019075547-appb-000009
Indicates the partition tolerance probability of each domain,
Figure PCTCN2019075547-appb-000010
Indicates the average minimum repair time of each domain.
本发明的有益效果是:将网络拓扑结构与联盟链共识机制相结合,使得联盟链共识在概率上满足分区容忍性,进而能够实现CAP三个因素的共存,具有很高的现实意义;采用在一段时间内保持不变的平均故障间隔时间和平均故障修复时间作为参数,提高Markov模型对于系统状态概率分布趋势的预测准确度;估算故障信道数量一定时发生分区故障且不满足一致性或可用性的概率及最小修复时间,最大程度适应了共识机制的自身分区容忍性和网络拓扑结构特征。The beneficial effects of the present invention are: the network topology is combined with the alliance chain consensus mechanism, so that the alliance chain consensus meets the partition tolerance in probability, and can realize the coexistence of the three CAP factors, which has high practical significance; The mean time between failures and mean time to repair that remain constant over a period of time are used as parameters to improve the Markov model's prediction accuracy for the probability distribution trend of the system state; when the number of failed channels is estimated, the partition failure occurs and does not meet the consistency or availability. Probability and minimum repair time are adapted to the partition tolerance of the consensus mechanism and the characteristics of the network topology to the greatest extent.
附图说明Description of the drawings
图1是一般网络拓扑结构的Markov状态转移图示意图。Figure 1 is a schematic diagram of the Markov state transition diagram of the general network topology.
图2是本发明实施例提供的层级化网络拓扑结构的域编号示意图。Figure 2 is a schematic diagram of the domain numbering of the hierarchical network topology provided by an embodiment of the present invention.
图3是本发明实施例提供的多维超方形网络拓扑结构的分区容忍概率示意图。FIG. 3 is a schematic diagram of the partition tolerance probability of a multi-dimensional hypersquare network topology provided by an embodiment of the present invention.
图4是本发明实施例提供的多维超方形网络拓扑结构的平均最小修复时间示意图。Fig. 4 is a schematic diagram of the average minimum repair time of the multi-dimensional hypersquare network topology provided by an embodiment of the present invention.
图5是本发明实施例提供的多点全连接网络拓扑结构的分区容忍概率示意图。FIG. 5 is a schematic diagram of the partition tolerance probability of a multipoint fully connected network topology provided by an embodiment of the present invention.
图6是本发明实施例提供的多点全连接网络拓扑结构的平均最小修复时间示意图。FIG. 6 is a schematic diagram of the average minimum repair time of the multipoint fully connected network topology provided by an embodiment of the present invention.
图7是本发明实施例提供的层级化网络拓扑结构的下边界情况示意图。Fig. 7 is a schematic diagram of the lower boundary of the hierarchical network topology provided by an embodiment of the present invention.
图8是本发明实施例提供的完全对称层级化网络拓扑结构示意图。Figure 8 is a schematic diagram of a fully symmetric hierarchical network topology provided by an embodiment of the present invention.
图9是本发明实施例提供的半对称层级化网络拓扑结构示意图。Fig. 9 is a schematic diagram of a semi-symmetric hierarchical network topology according to an embodiment of the present invention.
图10是本发明实施例提供的不对称层级化网络拓扑结构示意图。Fig. 10 is a schematic diagram of an asymmetric hierarchical network topology provided by an embodiment of the present invention.
图11是本发明实施例提供的联盟链共识下满足分区容忍性的拓扑构造方法的流程图。FIG. 11 is a flowchart of a topology construction method that satisfies partition tolerance under the alliance chain consensus provided by an embodiment of the present invention.
具体实施方式detailed description
如图11所示,本发明提供的一种联盟链共识下满足分区容忍性的拓扑构造方法,其详述如下:As shown in Fig. 11, the present invention provides a topology construction method that satisfies partition tolerance under the alliance chain consensus, which is detailed as follows:
现有的区块链系统仅在共识层面强化了一致性、可用性和分区容忍性中的两个因素,并伴随了第三个因素的大幅弱化,较CAP极限仍有距离。此外,在数据通信层面,目前主流的区块链系统对如何维护网络拓扑结构均没有考虑,这带来了潜在的网络通信隐患和资源浪费。The existing blockchain system only strengthens the two factors of consistency, availability, and partition tolerance at the consensus level, and is accompanied by a significant weakening of the third factor, which is still far from the CAP limit. In addition, at the data communication level, the current mainstream blockchain systems do not consider how to maintain the network topology, which brings potential network communication risks and waste of resources.
针对上述问题,本发明——一种联盟链共识下满足分区容忍性的拓扑构造方法与系统,将网络拓扑结构与联盟链共识机制相结合,使得联盟链共识在概率上满足分区容忍性,进而能够实现CAP三个因素的共存。本发明还提出一种分区容忍性计算方法,将系统的分区容忍问题抽象为一类可收敛的Markov过程,并使用MATLAB等仿真软件抽样和计算网络在发生分区故障时不满足一致性或可用性的概率和平均最小修复时间。根据上述计算方法,本发明具体分析不同网络拓扑结构下的资源开销和分区容忍性,为不同需求的联盟链共识构造规模适合、分区容忍性高的网络拓扑结构。In view of the above problems, the present invention, a topology construction method and system that meets the tolerance of partitions under the consensus of the alliance chain, combines the network topology with the consensus mechanism of the alliance chain, so that the consensus of the alliance chain meets the tolerance of the partition in probability, and then Able to achieve the coexistence of the three factors of CAP. The present invention also proposes a partition tolerance calculation method, which abstracts the partition tolerance of the system into a kind of convergent Markov process, and uses MATLAB and other simulation software to sample and calculate the network that does not meet the consistency or availability when a partition failure occurs. Probability and average minimum repair time. According to the above calculation method, the present invention specifically analyzes the resource overhead and partition tolerance under different network topologies, and constructs a network topology structure with suitable scale and high partition tolerance for alliance chain consensus with different requirements.
本发明技术方案在不影响共识算法自身一致性和可用性的基础上,将网络拓扑结构与联盟链共识机制相结合,使得联盟链共识在概率上满足分区容忍性,进而能够实现CAP三个因素的共存,具有很高的现实意义。The technical scheme of the present invention combines the network topology and the alliance chain consensus mechanism on the basis of not affecting the consistency and availability of the consensus algorithm itself, so that the alliance chain consensus satisfies the partition tolerance in probability, thereby achieving the three factors of CAP Coexistence has high practical significance.
提出一种分区容忍性计算方法,将系统的分区容忍问题抽象为一类可收敛的Markov过程,采用在一段时间内保持不变的平均故障间隔时间和平均故障修复时间作为参数,提高Markov模型对于系统状态概率分布趋势的预测准确度。A calculation method of partition tolerance is proposed. The partition tolerance problem of the system is abstracted into a kind of convergent Markov process. The mean time between failures and mean time to repair are used as parameters to improve the Markov model’s The prediction accuracy of the trend of the system state probability distribution.
不同共识机制的分区容忍性不同,不同网络拓扑下可能发生分区故障的情况也不同,因此它们的故障概率具有各异性特征。使用MATLAB等仿真软件抽样估计故障信道数量一定时发生分区故障且不满足一致性或可用性的概率及最小修复时间,最大程度适应了共识机制的自身分区容忍性和网络拓扑结构特征。Different consensus mechanisms have different partition tolerances, and the situations in which partition failures may occur under different network topologies are also different, so their failure probabilities have different characteristics. Using MATLAB and other simulation software to sample and estimate the probability of a partition failure and not meet the consistency or availability and the minimum repair time when the number of faulty channels is certain, it adapts to the consensus mechanism's own partition tolerance and network topology characteristics to the greatest extent.
由单一网络拓扑结构下的计算方法进一步推导层级化网络拓扑结构下的分区容忍性,不仅适用于一般的单链架构,也适用于多链和跨链架构,具有广阔的应用前景。The calculation method under a single network topology structure further derives the partition tolerance under the hierarchical network topology structure, which is not only suitable for general single-chain architecture, but also for multi-chain and cross-chain architecture, and has broad application prospects.
具体分析不同网络拓扑结构下的资源开销和分区容忍性,为不同需求的联盟链共识构造规模适合、分区容忍性高的单一或层级化网络拓扑结构。不同层级的域可以采用相同或不同的网络拓扑结构和参数,同一层级不同域的网络拓扑也可以不完全相同。Specific analysis of resource overhead and partition tolerance under different network topologies, and construct a single or hierarchical network topology structure with suitable scale and high partition tolerance for alliance chain consensus with different needs. Domains at different levels may adopt the same or different network topologies and parameters, and the network topologies of different domains at the same level may not be exactly the same.
评价通信网络一般建立在以下基本假设基础上:The evaluation of communication networks is generally based on the following basic assumptions:
1.参与分析的所有元素只有两种状态:工作和故障。1. All elements involved in the analysis have only two states: working and malfunctioning.
2.各个分析元素之间发生故障和修复是互相独立的。2. Failure and repair of each analysis element are independent of each other.
3.各个分析元素的MTBF(Mean Time Between Failures,平均故障间隔时间)和MTTR(Mean Time To Repair,平均故障修复时间)都是无记忆的独立过程且均值恒定。3. MTBF (Mean Time Between Failures, Mean Time Between Failures) and MTTR (Mean Time To Repair, Mean Time To Repair) of each analysis element are independent processes without memory and have a constant average value.
4.MTBF远大于MTTR。4. MTBF is much greater than MTTR.
基于上述假设,由于每个元素均处于工作-故障-修复的多次过程,可以采用Markov过程来进行数学描述。定义参数如下:Based on the above assumptions, since each element is in the multiple process of work-fault-repair, the Markov process can be used for mathematical description. Define the parameters as follows:
v:网络节点总数。v: Total number of network nodes.
l:网络信道总数。l: Total number of network channels.
k:联盟链共识机制满足一致性和可用性最少需要的共识节点数量,即当且仅当某个分区内的共识节点数量≥k,此联盟链共识机制满足一致性和可用性。k: Consortium chain consensus mechanism meets the minimum number of consensus nodes required for consistency and availability, that is, if and only if the number of consensus nodes in a certain partition is ≥k, this alliance chain consensus mechanism meets consistency and availability.
λ:信道单位时间内故障中断的概率,即
Figure PCTCN2019075547-appb-000011
λ: the probability of failure interruption per unit time of the channel, namely
Figure PCTCN2019075547-appb-000011
μ:系统中某条处于故障状态的信道单位时间内被修复的概率,即
Figure PCTCN2019075547-appb-000012
μ: the probability that a channel in a faulty state in the system is repaired per unit time, namely
Figure PCTCN2019075547-appb-000012
一、单一网络拓扑结构的分区容忍概率和平均最小修复时间1. Partition tolerance probability and average minimum repair time of a single network topology
对于一个包含了v个节点和l条信道的网络拓扑结构(如多维超方形结构或多点全连接结构),作Markov状态转移图,如图1所示。第i个系统状态表示该网络中有且仅有i条信道处于故障状态(0≤i≤l)。For a network topology including v nodes and l channels (such as a multi-dimensional hyper-square structure or a multi-point fully connected structure), make a Markov state transition diagram, as shown in Figure 1. The i-th system state indicates that there are and only i channels in the network are in a fault state (0≤i≤l).
该Markov模型的状态转移矩阵是一个规模为(l+1)×(l+1)的矩阵P,其中元素p ji表示从第i个系统状态转移到第j个系统状态的概率。令m表示状态i与状态j中相同的故障信道的数量,则m的取值范围是[max{i+j-l,0},min{i,j}]。 The state transition matrix of the Markov model is a matrix P with a scale of (l+1)×(l+1), where the element p ji represents the probability of transitioning from the i-th system state to the j-th system state. Let m denote the number of the same failed channels in state i and state j, and the value range of m is [max{i+jl, 0}, min{i, j}].
Figure PCTCN2019075547-appb-000013
Figure PCTCN2019075547-appb-000013
上述Markov模型的状态转移矩阵P满足三个特性:The state transition matrix P of the Markov model above satisfies three characteristics:
1.由于P的所有元素都大于等于0,且某一列的元素和表示给定初始状态下所有可能下一跳的概率之和,即P的列和均为1,因此P满足随机性。1. Since all elements of P are greater than or equal to 0, and the sum of the elements in a column represents the sum of the probabilities of all possible next hops in a given initial state, that is, the sum of the columns of P is all 1, so P satisfies randomness.
2.由于各个信道之间发生故障和修复是互相独立的,每一个系统状态都可来自任意的其他状态,即上述Markov状态转移图是全连通的,所以P满足不可约性。2. Since the failure and repair of each channel are independent of each other, each system state can come from any other state, that is, the Markov state transition diagram above is fully connected, so P satisfies the irreducibility.
3.由图1可知,系统状态间不存在简单循环,因此P满足非周期性。3. It can be seen from Figure 1 that there is no simple cycle between system states, so P satisfies aperiodicity.
因此,上述Markov过程最终会收敛到一个独立于初始分布的稳态分布。算法1描述了系统稳态概率的迭代计算过程。将状态转移矩阵P循环与自身相乘,若连续两次乘积之差的矩阵2-范数小于给定的收敛精度,则认为此时的P的幂值为稳态概率矩阵P *Therefore, the above Markov process will eventually converge to a steady-state distribution independent of the initial distribution. Algorithm 1 describes the iterative calculation process of the system steady-state probability. Multiply the state transition matrix P by itself. If the matrix 2-norm of the difference between two consecutive products is less than the given convergence accuracy, then the power of P at this time is considered to be the steady-state probability matrix P * .
Figure PCTCN2019075547-appb-000014
Figure PCTCN2019075547-appb-000014
由于各个分析元素的MTBF和MTTR都是无记忆的独立过程且均值恒定,因此能够通过抽样估计故障信道数量一定时发生分区故障且不满足一致性或可用性的概率。算法2描述了单一网络拓扑结构下系统的分区容忍概率计算过程。对于稳态时系统可能处于的各种状态,分别采样N次,估计其发生分区故障且不满足一致性或可用性的概率,再根据全概率公式计算系统的分区容忍概率。Since the MTBF and MTTR of each analysis element are independent processes without memory and the mean value is constant, sampling can be used to estimate the probability of a partition failure and not meeting consistency or availability when the number of faulty channels is certain. Algorithm 2 describes the calculation process of the partition tolerance probability of the system under a single network topology. For the various states that the system may be in at steady state, sample N times respectively, estimate the probability of partition failure and not meet consistency or availability, and then calculate the partition tolerance probability of the system according to the full probability formula.
Figure PCTCN2019075547-appb-000015
Figure PCTCN2019075547-appb-000015
最小修复时间的定义为系统在发生某种故障时能够修复部分信道使得系统满足一致性和可用性所需的最小时间。算法3描述了单一网络拓扑结构下系统的平均最小修复时间计算过程。在算法2的基础上,对于每一个发生分区故障且不满足一致性或可用性实例,计算其最小修复时间,再乘以该实例在总的系统分区容忍问题中所占的权重,得到系统的平均最小修复时间。The minimum repair time is defined as the minimum time required for the system to repair some channels when a certain failure occurs, so that the system meets consistency and availability. Algorithm 3 describes the calculation process of the average minimum repair time of the system under a single network topology. On the basis of Algorithm 2, for each instance that has a partition failure and does not meet consistency or availability, calculate its minimum repair time, and then multiply it by the weight of the instance in the total system partition tolerance problem to get the average of the system Minimum repair time.
Figure PCTCN2019075547-appb-000016
Figure PCTCN2019075547-appb-000016
二、层级化网络拓扑结构的分区容忍概率和最小平均修复时间2. Partition tolerance probability and minimum average repair time of hierarchical network topology
在一个层级化的网络拓扑结构中,下级域节点在本域内共识生成区块后,将该区块传递至上级域节点继续高一级的共识。对于一个n级网络拓扑结构,将各个域按照(i 1i 2i 3…)的树形结构编号,如图2所示。 In a hierarchical network topology, after the lower-level domain node generates a block by consensus in the domain, the block is passed to the upper-level domain node to continue the higher-level consensus. For an n-level network topology, each domain is numbered according to a tree structure of (i 1 i 2 i 3 …), as shown in Figure 2.
下级域的分区容忍性不仅受自身的网络拓扑结构影响,还与高层级域的分区容忍性有关。令
Figure PCTCN2019075547-appb-000017
表示各个域的分区容忍概率。则系统的分区容忍概率为
The partition tolerance of the lower-level domain is not only affected by its own network topology, but also related to the partition tolerance of the higher-level domain. make
Figure PCTCN2019075547-appb-000017
Represents the partition tolerance probability of each domain. Then the partition tolerance probability of the system is
Figure PCTCN2019075547-appb-000018
Figure PCTCN2019075547-appb-000018
同理,令
Figure PCTCN2019075547-appb-000019
表示各个域的平均最小修复时间。则系统的平均最小修复时间为
Similarly, let
Figure PCTCN2019075547-appb-000019
Indicates the average minimum repair time of each domain. Then the average minimum repair time of the system is
Figure PCTCN2019075547-appb-000020
Figure PCTCN2019075547-appb-000020
以数字光缆系统为例,下面分别计算联盟链中的投票证明共识机制(Proof of Vote,PoV)采用超方形网络拓扑结构和全连接网络拓扑结构时的分区容忍概率和平均最小修复时间。Taking the digital optical cable system as an example, the following is to calculate the partition tolerance probability and the average minimum repair time when the Proof of Vote consensus mechanism (Proof of Vote, PoV) in the alliance chain adopts the hypersquare network topology and the fully connected network topology.
根据国家标准的规定,具有主备用系统自动倒换功能的数字光缆通信系统应满足表1所示的全年指标。故取参数对(λ,μ)∈{(4.5662×10 -4,4.1667×10 -2),(2.7397×10 -4,6.9444×10 -2),(3.8358×10 -5,4.9603×10 -1),(2.5571×10 -5,7.4405×10 -1)}。 According to the provisions of national standards, a digital optical cable communication system with automatic switching of main and standby systems should meet the annual indicators shown in Table 1. Therefore, taking parameters (λ, μ) ∈ {( 4.5662 × 10 -4, 4.1667 × 10 -2), (2.7397 × 10 -4, 6.9444 × 10 -2), (3.8358 × 10 -5, 4.9603 × 10 - 1 ), (2.5571×10 -5 , 7.4405×10 -1 )}.
表1数字光缆通信系统可靠性指标Table 1 Reliability index of digital optical cable communication system
链路长度/kmLink length/km 50005000 30003000 420420 280280
双向全程故障次数Total failure times in both directions 44 2.42.4 0.3360.336 0.2240.224
MTBF/hMTBF/h 21902190 36503650 2607026070 3910739107
φ/fitφ/fit 456620456620 273970273970 3835838358 2557025570
MTTR/hMTTR/h 24twenty four 14.414.4 2.0162.016 1.3441.344
F/%F/% 0.2740.274 0.1640.164 0.0230.023 0.0150.015
A/%A/% 99.72699.726 99.83699.836 99.97799.977 99.98599.985
多维超方形和多点全连接两种网络拓扑结构的资源开销如表2所示。Table 2 shows the resource overhead of the two network topologies of multi-dimensional hyper-square and multi-point full connection.
表2多维超方形和多点全连接网络拓扑结构的资源开销Table 2 Resource overhead of multi-dimensional hypersquare and multi-point fully connected network topology
Figure PCTCN2019075547-appb-000021
Figure PCTCN2019075547-appb-000021
在PoV共识中,
Figure PCTCN2019075547-appb-000022
其分区容忍概率和平均最小修复时间的计算结果,如图3-图6所示。
In the PoV consensus,
Figure PCTCN2019075547-appb-000022
The calculation results of the partition tolerance probability and the average minimum repair time are shown in Figure 3-Figure 6.
继续考虑以图7-图10为例的4种层级化网络拓扑结构。图7给出了一种本方法的下边界情况,即顶级、二级和三级域的拓扑结构均为2维超方形;图8给出了一种完全对称的3级拓扑构造方法,顶级、二级和三级域的拓扑结构均为3维超方形;图9给出了一种半对称的2级拓扑构造方法,同级域间的拓扑结构相同,但顶级域的拓扑结构为4维超方形,二级域的拓扑结构则为3维超方形;图10给出了一种不对称的2级拓扑构造方法, 上级和下级域、同级域间的拓扑结构均不同,具体地,顶级域采用4维超方形结构,同时分别有4、8、4个二级域采用4维超方形、3维超方形和7点全连接结构。Continue to consider the four hierarchical network topologies shown in Figure 7-10 as examples. Figure 7 shows the lower boundary of this method, that is, the top-level, second-level, and third-level domains are all 2-dimensional hypersquare topological structures; Figure 8 shows a completely symmetrical 3-level topology construction method, the top level The topological structures of the second, second, and third-level domains are all 3-dimensional hypersquares; Figure 9 shows a semisymmetric 2-level topology construction method. The topological structure of the same-level domains is the same, but the top-level domain topology is 4 The topological structure of the second-level domain is a 3-dimensional hyper-square; Figure 10 shows an asymmetric 2-level topology construction method. The topological structure of the upper and lower domains and the same-level domains are different. Specifically , The top-level domain adopts a 4-dimensional hyper-square structure, while there are 4, 8, and 4 secondary domains using 4-dimensional hyper-square, 3-dimensional hyper-square and 7-point fully connected structures.
假设图7-图10中拓扑的顶级、二级和三级链路长度分别为5000km、3000km和420km。利用图3-图6的多维超方形和多点全连接的分区容忍性计算结果,进一步计算图7-图10中的4种层级化网络拓扑结构的分区容忍概率和平均最小修复时间分别为:Assume that the top-level, second-level, and third-level link lengths of the topologies in Figure 7-10 are 5000km, 3000km, and 420km, respectively. Using the calculation results of the partition tolerance of the multi-dimensional hypersquare and multi-point full connection in Figure 3 to Figure 6, the partition tolerance probability and the average minimum repair time of the four hierarchical network topologies in Figure 7 to Figure 10 are further calculated as:
(1)下边界情况(1) Lower boundary situation
p=1-[(1-p 1)+p 1*(1-p 11)*4+p 1*p 11*(1-p 111)*4*4]≈1-4×10 -4/h,即大约每3个月会发生一次分区失效故障。 p=1-[(1-p 1 )+p 1 *(1-p 11 )*4+p 1 *p 11 *(1-p 111 )*4*4]≈1-4×10 -4 / h, that is, a partition failure will occur approximately every 3 months.
t=[t 1*(1-p 1)+t 11*p 1*(1-p 11)*4+t 111*p 1*p 11*(1-p 111)*4*4]/(1-p)≈21h,即发生分区失效故障后的平均最小修复时间大约为21个小时。 t=[t 1 *(1-p 1 )+t 11 *p 1 *(1-p 11 )*4+t 111 *p 1 *p 11 *(1-p 111 )*4*4]/( 1-p)≈21h, that is, the average minimum repair time after a partition failure occurs is about 21 hours.
(2)完全对称的3级拓扑结构(2) Completely symmetrical 3-level topology
p=1-[(1-p 1)+p 1*(1-p 11)*8+p 1*p 11*(1-p 111)*8*8]≈1-5×10 -8/h,即大约每2,283年会发生一次分区失效故障。 p=1-[(1-p 1 )+p 1 *(1-p 11 )*8+p 1 *p 11 *(1-p 111 )*8*8]≈1-5×10 -8 / h, that is, a partition failure occurs approximately every 2,283 years.
t=[t 1*(1-p 1)+t 11*p 1*(1-p 11)*8+t 111*p 1*p 11*(1-p 111)*8*8]/(1-p)≈23h,即发生分区失效故障后的平均最小修复时间大约为23个小时。 t=[t 1 *(1-p 1 )+t 11 *p 1 *(1-p 11 )*8+t 111 *p 1 *p 11 *(1-p 111 )*8*8]/( 1-p)≈23h, that is, the average minimum repair time after a partition failure occurs is about 23 hours.
(3)半对称的2级拓扑结构(3) Semi-symmetrical 2-level topology
p=1-[(1-p 1)+p 1*(1-p 11)*16]≈1-1×10 -8,即大约每11,416年会发生一次分区失效故障。 p = 1-[(1-p 1 )+p 1 *(1-p 11 )*16]≈1-1×10 -8 , that is, a partition failure failure occurs approximately every 11,416 years.
t=[t 1*(1-p 1)+t 11*p 1*(1-p 11)*16]/(1-p)≈14h,即发生分区失效故障后的平均最小修复时间大约为14个小时。 t=[t 1 *(1-p 1 )+t 11 *p 1 *(1-p 11 )*16]/(1-p)≈14h, that is, the average minimum repair time after a partition failure occurs is approximately 14 hours.
(4)不对称的2级拓扑结构(4) Asymmetric 2-level topology
p=1-[(1-p 1)+p 1*(1-p 11)*4+p 1*(1-p 12)*8+p 1*(1-p 13)*4]≈1-6×10 -9,即大约每19,026年会发生一次分区失效故障。 p=1-[(1-p 1 )+p 1 *(1-p 11 )*4+p 1 *(1-p 12 )*8+p 1 *(1-p 13 )*4]≈1 -6×10 -9 , that is, a partition failure occurs approximately every 19,026 years.
t=[t 1*(1-p 1)+t 11*p 1*(1-p 11)*4+t 12*p 1*(1-p 12)*8+t 13*p 1*(1-p 13)*4]/(1-p)≈14h,即发生分区失效故障后的平均最小修复时间大约为14个小时。 t=[t 1 *(1-p 1 )+t 11 *p 1 *(1-p 11 )*4+t 12 *p 1 *(1-p 12 )*8+t 13 *p 1 *( 1-p 13 )*4]/(1-p)≈14h, that is, the average minimum repair time after a partition failure occurs is approximately 14 hours.
本发明的另一目的在于提供一种联盟链共识下满足分区容忍性的拓扑构造系统,所述拓扑构造系统包括Another object of the present invention is to provide a topology construction system that satisfies the partition tolerance under the alliance chain consensus, and the topology construction system includes
结合模块,用于将联盟链共识机制与网络拓扑结构相结合使联盟链共识在概率上满足分区容忍性;The combination module is used to combine the alliance chain consensus mechanism with the network topology to make the alliance chain consensus meet the partition tolerance in probability;
收敛模块,用于将系统的分区容忍性抽象为一类可收敛的Markov过 程并获取系统的稳态概率;The convergence module is used to abstract the partition tolerance of the system into a kind of convergent Markov process and obtain the steady-state probability of the system;
抽样估计模块,用于估算故障信道数量一定时发生分区故障且不满足一致性或可用性的概率及最小修复时间,得到系统的分区容忍概率及平均最小修复时间;Sampling estimation module, used to estimate the probability and minimum repair time of partition failure and not meet the consistency or availability when the number of faulty channels is certain, and obtain the partition tolerance probability and average minimum repair time of the system;
构建网络模块,用于根据得到的分区容忍概率及平均最小修复时间分析不同网络拓扑结构下的资源开销和分区容忍性,为不同需求的联盟链共识构造规模适合、分区容忍性高的网络拓扑结构。Construct a network module to analyze the resource overhead and partition tolerance under different network topologies according to the obtained partition tolerance probability and average minimum repair time, and construct a network topology structure with suitable scale and high partition tolerance for the alliance chain consensus of different needs .
所述收敛模块中Markov过程收敛于一个独立初始分布的稳态分布,在单一网络拓扑结构下获取系统的稳态概率包括The Markov process in the convergence module converges to a steady-state distribution of an independent initial distribution, and obtaining the steady-state probability of the system under a single network topology includes
循环相乘单元,用于将状态转移矩阵P循环与自身相乘;The cyclic multiplication unit is used to cyclically multiply the state transition matrix P with itself;
判断单元,用于判断连续两次乘积之差的矩阵2-范数是否小于设定的收敛精度,若小于,则认为此时的P的幂值为稳态概率矩阵P *,若不小于,则返回循环相乘单元。 The judgment unit is used to judge whether the matrix 2-norm of the difference between two consecutive products is less than the set convergence accuracy. If it is less, then the power of P at this time is considered to be the steady-state probability matrix P * , if not less than, Then return to the loop multiplication unit.
所述抽样估计模块中各个分析元素的MTBF和MTTR都是无记忆的独立过程且均值恒定;在单一网络拓扑结构下获取系统的分区容忍概率包括The MTBF and MTTR of each analysis element in the sampling estimation module are independent processes without memory and the mean value is constant; obtaining the partition tolerance probability of the system under a single network topology includes
采用单元,用于对于稳态系统的每个可能状态分别抽样N次;Adopt a unit to sample N times for each possible state of the steady-state system;
估计单元,用于估计每个状态下发生分区故障且不满足一致性或可用性的概率;The estimation unit is used to estimate the probability of partition failure in each state and not meeting consistency or availability;
计算单元,用于再根据全概率公式计算系统的分区容忍概率,全概率公式为:The calculation unit is used to calculate the partition tolerance probability of the system according to the total probability formula. The total probability formula is:
Figure PCTCN2019075547-appb-000023
l表示信道总数,i表示稳态系统中有且仅有i条信道处于故障状态。
Figure PCTCN2019075547-appb-000023
l indicates the total number of channels, and i indicates that there are and only i channels in the steady state system are in a fault state.
在单一网络拓扑结构下获取系统的平均最小修复时间包括Obtain the average minimum repair time of the system under a single network topology including
计算最小修复时间单元,用于对每一个发生分区故障且不满足一致性或可用性的样本计算最小修复时间;Calculate the minimum repair time unit, which is used to calculate the minimum repair time for each sample that has a partition failure and does not meet the consistency or availability;
计算平均最小修复时间单元,用于乘以该样本在总系统分区容忍问题中所占的权重,得到系统的平均最小修复时间。Calculate the average minimum repair time unit, which is used to multiply the weight of the sample in the total system partition tolerance problem to obtain the average minimum repair time of the system.
在层级化网络拓扑结构中,根据共识的过程,下级域的分区容忍不仅受自身的网络拓扑结构影响,还与高层级域的分区容忍性有关;系统的分区容忍概率为
Figure PCTCN2019075547-appb-000024
Figure PCTCN2019075547-appb-000025
系统的平均最小修复时间为
Figure PCTCN2019075547-appb-000026
Figure PCTCN2019075547-appb-000027
其中,
Figure PCTCN2019075547-appb-000028
表示各个域的分区容忍概率,
Figure PCTCN2019075547-appb-000029
表示各个域的平均最小修复时间。
In the hierarchical network topology, according to the consensus process, the partition tolerance of the lower-level domain is not only affected by its own network topology, but also related to the partition tolerance of the higher-level domain; the partition tolerance probability of the system is
Figure PCTCN2019075547-appb-000024
Figure PCTCN2019075547-appb-000025
The average minimum repair time of the system is
Figure PCTCN2019075547-appb-000026
Figure PCTCN2019075547-appb-000027
among them,
Figure PCTCN2019075547-appb-000028
Indicates the partition tolerance probability of each domain,
Figure PCTCN2019075547-appb-000029
Indicates the average minimum repair time of each domain.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含 在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modification, equivalent replacement and improvement made within the spirit and principle of the present invention shall be included in the protection of the present invention. Within range.

Claims (10)

  1. 一种联盟链共识下满足分区容忍性的拓扑构造方法,其特征在于,所述拓扑构造方法包括以下步骤:A topology construction method that satisfies the partition tolerance under the consensus of the alliance chain is characterized in that the topology construction method includes the following steps:
    S1、将联盟链共识机制与网络拓扑结构相结合使联盟链共识在概率上满足分区容忍性;S1. Combine the alliance chain consensus mechanism with the network topology to make the alliance chain consensus meet the partition tolerance in probability;
    S2、将系统的分区容忍性抽象为一类可收敛的Markov过程并获取系统的稳态概率;S2, abstract the partition tolerance of the system into a kind of convergent Markov process and obtain the steady-state probability of the system;
    S3、估算故障信道数量一定时发生分区故障且不满足一致性或可用性的概率及最小修复时间,得到系统的分区容忍概率及平均最小修复时间;S3. Estimate the probability and minimum repair time of partition failure and not meet consistency or availability when the number of failed channels is certain, and obtain the partition tolerance probability and average minimum repair time of the system;
    S4、根据得到的分区容忍概率及平均最小修复时间分析不同网络拓扑结构下的资源开销和分区容忍性,为不同需求的联盟链共识构造规模适合、分区容忍性高的网络拓扑结构。S4. Analyze resource overhead and partition tolerance under different network topologies according to the obtained partition tolerance probability and average minimum repair time, and construct a network topology structure with suitable scale and high partition tolerance for the alliance chain consensus of different needs.
  2. 根据权利要求1所述的联盟链共识下满足分区容忍性的拓扑构造方法,其特征在于,所述步骤S2中Markov过程收敛于一个独立初始分布的稳态分布,在单一网络拓扑结构下获取系统的稳态概率包括以下步骤:The topology construction method that satisfies the partition tolerance under the alliance chain consensus according to claim 1, wherein the Markov process in the step S2 converges to an independent initial distribution steady-state distribution, and the system is obtained under a single network topology The steady-state probability of includes the following steps:
    S21、将状态转移矩阵P循环与自身相乘;S21: Multiply the state transition matrix P cyclically by itself;
    S22、判断连续两次乘积之差的矩阵2-范数是否小于设定的收敛精度,若小于,则认为此时的P的幂值为稳态概率矩阵P *,若不小于,则返回步骤S21。 S22. Determine whether the matrix 2-norm of the difference between two consecutive products is less than the set convergence accuracy. If it is less, then the power of P at this time is considered to be the steady-state probability matrix P * ; if it is not less, then return to step S21.
  3. 根据权利要求2所述的联盟链共识下满足分区容忍性的拓扑构造方法,其特征在于,所述步骤S3中各个分析元素的MTBF和MTTR都是无 记忆的独立过程且均值恒定;在单一网络拓扑结构下获取系统的分区容忍概率包括以下步骤:The topology construction method that satisfies the partition tolerance under the alliance chain consensus according to claim 2, wherein the MTBF and MTTR of each analysis element in the step S3 are independent processes without memory and have a constant mean value; in a single network Obtaining the partition tolerance probability of the system under the topology includes the following steps:
    S311、对于稳态系统的每个可能状态分别抽样N次;S311: Sample N times for each possible state of the steady-state system;
    S312、估计每个状态下发生分区故障且不满足一致性或可用性的概率;S312. Estimate the probability that a partition failure occurs in each state and does not meet the consistency or availability;
    S313、再根据全概率公式计算系统的分区容忍概率,全概率公式为:S313. Calculate the partition tolerance probability of the system according to the total probability formula. The total probability formula is:
    Figure PCTCN2019075547-appb-100001
    l表示信道总数,i表示稳态系统中有且仅有i条信道处于故障状态。
    Figure PCTCN2019075547-appb-100001
    l indicates the total number of channels, and i indicates that there are and only i channels in the steady state system are in a fault state.
  4. 根据权利要求3所述的联盟链共识下满足分区容忍性的拓扑构造方法,其特征在于,在单一网络拓扑结构下获取系统的平均最小修复时间包括以下步骤:The topology construction method that satisfies the partition tolerance under the alliance chain consensus according to claim 3, wherein obtaining the average minimum repair time of the system under a single network topology includes the following steps:
    S321、对每一个发生分区故障且不满足一致性或可用性的样本计算最小修复时间;S321. Calculate the minimum repair time for each sample that has a partition failure and does not meet the consistency or availability;
    S322、乘以该样本在总系统分区容忍问题中所占的权重,得到系统的平均最小修复时间。S322. Multiply the weight of the sample in the total system partition tolerance problem to obtain the average minimum repair time of the system.
  5. 根据权利要求1-4任一项所述的联盟链共识下满足分区容忍性的拓扑构造方法,其特征在于,在层级化网络拓扑结构中,根据共识的过程,下级域的分区容忍不仅受自身的网络拓扑结构影响,还与高层级域的分区容忍性有关;系统的分区容忍概率为The topology construction method that satisfies the partition tolerance under the alliance chain consensus according to any one of claims 1-4, characterized in that, in the hierarchical network topology, according to the consensus process, the partition tolerance of the lower domain is not only affected by itself The influence of the network topology of the system is also related to the partition tolerance of the high-level domain; the partition tolerance probability of the system is
    Figure PCTCN2019075547-appb-100002
    系统 的平均最小修复时间为
    Figure PCTCN2019075547-appb-100002
    The average minimum repair time of the system is
    Figure PCTCN2019075547-appb-100003
    其中,
    Figure PCTCN2019075547-appb-100004
    表示各个域的分区容忍概率,
    Figure PCTCN2019075547-appb-100005
    表示各个域的平均最小修复时间。
    Figure PCTCN2019075547-appb-100003
    among them,
    Figure PCTCN2019075547-appb-100004
    Indicates the partition tolerance probability of each domain,
    Figure PCTCN2019075547-appb-100005
    Indicates the average minimum repair time of each domain.
  6. 一种联盟链共识下满足分区容忍性的拓扑构造系统,其特征在于,所述拓扑构造系统包括A topology construction system that satisfies partition tolerance under the consensus of the alliance chain is characterized in that the topology construction system includes
    结合模块,用于将联盟链共识机制与网络拓扑结构相结合使联盟链共识在概率上满足分区容忍性;The combination module is used to combine the alliance chain consensus mechanism with the network topology to make the alliance chain consensus meet the partition tolerance in probability;
    收敛模块,用于将系统的分区容忍性抽象为一类可收敛的Markov过程并获取系统的稳态概率;Convergence module, used to abstract the partition tolerance of the system into a kind of convergent Markov process and obtain the steady-state probability of the system;
    抽样估计模块,用于估算故障信道数量一定时发生分区故障且不满足一致性或可用性的概率及最小修复时间,得到系统的分区容忍概率及平均最小修复时间;Sampling estimation module, used to estimate the probability and minimum repair time of partition failure and not meet the consistency or availability when the number of faulty channels is certain, and obtain the partition tolerance probability and average minimum repair time of the system;
    构建网络模块,用于根据得到的分区容忍概率及平均最小修复时间分析不同网络拓扑结构下的资源开销和分区容忍性,为不同需求的联盟链共识构造规模适合、分区容忍性高的网络拓扑结构。Construct a network module to analyze the resource overhead and partition tolerance under different network topologies according to the obtained partition tolerance probability and average minimum repair time, and construct a network topology structure with suitable scale and high partition tolerance for the alliance chain consensus of different needs .
  7. 根据权利要求6所述的联盟链共识下满足分区容忍性的拓扑构造系统,其特征在于,所述收敛模块中Markov过程收敛于一个独立初始分布的稳态分布,在单一网络拓扑结构下获取系统的稳态概率包括The topology construction system that satisfies the partition tolerance under the alliance chain consensus according to claim 6, wherein the Markov process in the convergence module converges to a steady-state distribution of independent initial distribution, and the system is obtained under a single network topology The steady-state probability includes
    循环相乘单元,用于将状态转移矩阵P循环与自身相乘;The cyclic multiplication unit is used to cyclically multiply the state transition matrix P with itself;
    判断单元,用于判断连续两次乘积之差的矩阵2-范数是否小于设定的收敛精度,若小于,则认为此时的P的幂值为稳态概率矩阵P *,若不小于,则返回循环相乘单元。 The judgment unit is used to judge whether the matrix 2-norm of the difference between two consecutive products is less than the set convergence accuracy. If it is less, then the power of P at this time is considered to be the steady-state probability matrix P * , if not less than, Then return to the loop multiplication unit.
  8. 根据权利要求7所述的联盟链共识下满足分区容忍性的拓扑构造系统,其特征在于,所述抽样估计模块中各个分析元素的MTBF和MTTR都是无记忆的独立过程且均值恒定;在单一网络拓扑结构下获取系统的分区容忍概率包括The topology construction system that satisfies the partition tolerance under the alliance chain consensus according to claim 7, characterized in that the MTBF and MTTR of each analysis element in the sampling estimation module are independent processes without memory and have a constant mean value; The partition tolerance probability of the acquisition system under the network topology includes
    抽样单元,用于对于稳态系统的每个可能状态分别抽样N次;Sampling unit, used to sample N times for each possible state of the steady-state system;
    估计单元,用于估计每个状态下发生分区故障且不满足一致性或可用性的概率;The estimation unit is used to estimate the probability of partition failure in each state and not meeting consistency or availability;
    计算单元,用于再根据全概率公式计算系统的分区容忍概率,全概率公式为:The calculation unit is used to calculate the partition tolerance probability of the system according to the total probability formula. The total probability formula is:
    Figure PCTCN2019075547-appb-100006
    l表示信道总数,i表示稳态系统中有且仅有i条信道处于故障状态。
    Figure PCTCN2019075547-appb-100006
    l indicates the total number of channels, and i indicates that there are and only i channels in the steady state system are in a fault state.
  9. 根据权利要求8所述的联盟链共识下满足分区容忍性的拓扑构造方法,其特征在于,在单一网络拓扑结构下获取系统的平均最小修复时间包括The topology construction method that satisfies the partition tolerance under the alliance chain consensus according to claim 8, wherein obtaining the average minimum repair time of the system under a single network topology includes
    计算最小修复时间单元,用于对每一个发生分区故障且不满足一致性或可用性的样本计算最小修复时间;Calculate the minimum repair time unit, which is used to calculate the minimum repair time for each sample that has a partition failure and does not meet the consistency or availability;
    计算平均最小修复时间单元,用于乘以该样本在总系统分区容忍问题中所占的权重,得到系统的平均最小修复时间。Calculate the average minimum repair time unit, which is used to multiply the weight of the sample in the total system partition tolerance problem to obtain the average minimum repair time of the system.
  10. 根据权利要求1-4任一项所述的联盟链共识下满足分区容忍性的拓扑构造方法,其特征在于,在层级化网络拓扑结构中,根据共识的过程,下级域的分区容忍不仅受自身的网络拓扑结构影响,还与高层级域的分区容忍性有关;系统的分区容忍概率为The topology construction method that satisfies the partition tolerance under the alliance chain consensus according to any one of claims 1-4, characterized in that, in the hierarchical network topology, according to the consensus process, the partition tolerance of the lower domain is not only affected by itself The influence of the network topology of the system is also related to the partition tolerance of the high-level domain; the partition tolerance probability of the system is
    Figure PCTCN2019075547-appb-100007
    系统的平均最小修复时间为
    Figure PCTCN2019075547-appb-100007
    The average minimum repair time of the system is
    Figure PCTCN2019075547-appb-100008
    其中,
    Figure PCTCN2019075547-appb-100009
    表示各个域的分区容忍概率,
    Figure PCTCN2019075547-appb-100010
    表示各个域的平均最小修复时间。
    Figure PCTCN2019075547-appb-100008
    among them,
    Figure PCTCN2019075547-appb-100009
    Indicates the partition tolerance probability of each domain,
    Figure PCTCN2019075547-appb-100010
    Indicates the average minimum repair time of each domain.
PCT/CN2019/075547 2019-02-20 2019-02-20 Method for constructing topology satisfying partition tolerance under alliance chain consensus and system WO2020168477A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/075547 WO2020168477A1 (en) 2019-02-20 2019-02-20 Method for constructing topology satisfying partition tolerance under alliance chain consensus and system
CN201980005054.8A CN111512332B (en) 2019-02-20 2019-02-20 Topological construction method and system for meeting partition tolerance under alliance chain consensus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/075547 WO2020168477A1 (en) 2019-02-20 2019-02-20 Method for constructing topology satisfying partition tolerance under alliance chain consensus and system

Publications (1)

Publication Number Publication Date
WO2020168477A1 true WO2020168477A1 (en) 2020-08-27

Family

ID=71864549

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/075547 WO2020168477A1 (en) 2019-02-20 2019-02-20 Method for constructing topology satisfying partition tolerance under alliance chain consensus and system

Country Status (2)

Country Link
CN (1) CN111512332B (en)
WO (1) WO2020168477A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114401099A (en) * 2021-08-17 2022-04-26 同济大学 Block chain PoW selfish mining attack defense method based on network topology
CN116506444A (en) * 2023-06-28 2023-07-28 北京科技大学 Block chain stable slicing method based on deep reinforcement learning and reputation mechanism

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113708963B (en) * 2021-08-20 2022-08-16 北京大学深圳研究生院 Optimized topology recursion method and system meeting alliance chain partition tolerance

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140317222A1 (en) * 2012-01-13 2014-10-23 Hui Li Data Storage Method, Device and Distributed Network Storage System
CN106211196A (en) * 2016-06-22 2016-12-07 西北工业大学 How unmanned sail body based on markov random file harmonious property method
CN108124502A (en) * 2017-03-31 2018-06-05 北京大学深圳研究生院 A kind of top level domain management method and system based on alliance's chain
CN109194444A (en) * 2018-09-01 2019-01-11 哈尔滨工程大学 A kind of balanced binary tree restorative procedure based on network topology

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9672115B2 (en) * 2013-08-26 2017-06-06 Vmware, Inc. Partition tolerance in cluster membership management
CN105592098B (en) * 2016-01-16 2018-09-14 杭州复杂美科技有限公司 The management method of ballot and CA certificate on block chain
CN107038638A (en) * 2017-02-24 2017-08-11 杭州象链网络技术有限公司 A kind of equity registration transaction system construction method based on alliance's chain
CN108492103B (en) * 2018-02-07 2021-04-27 北京大学深圳研究生院 Joint block chain consensus method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140317222A1 (en) * 2012-01-13 2014-10-23 Hui Li Data Storage Method, Device and Distributed Network Storage System
CN106211196A (en) * 2016-06-22 2016-12-07 西北工业大学 How unmanned sail body based on markov random file harmonious property method
CN108124502A (en) * 2017-03-31 2018-06-05 北京大学深圳研究生院 A kind of top level domain management method and system based on alliance's chain
CN109194444A (en) * 2018-09-01 2019-01-11 哈尔滨工程大学 A kind of balanced binary tree restorative procedure based on network topology

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114401099A (en) * 2021-08-17 2022-04-26 同济大学 Block chain PoW selfish mining attack defense method based on network topology
CN114401099B (en) * 2021-08-17 2023-05-09 同济大学 Block chain PoW selfish consensus resistance method based on network topology
CN116506444A (en) * 2023-06-28 2023-07-28 北京科技大学 Block chain stable slicing method based on deep reinforcement learning and reputation mechanism
CN116506444B (en) * 2023-06-28 2023-10-17 北京科技大学 Block chain stable slicing method based on deep reinforcement learning and reputation mechanism

Also Published As

Publication number Publication date
CN111512332A (en) 2020-08-07
CN111512332B (en) 2022-12-09

Similar Documents

Publication Publication Date Title
US20190220768A1 (en) Constructing topology for satisfying partition tolerance in consortium blockchain consensus
Kobo et al. Fragmentation-based distributed control system for software-defined wireless sensor networks
Oktian et al. Distributed SDN controller system: A survey on design choice
CN108769150B (en) Data processing method and device of block chain network, cluster node and storage medium
Yu et al. Distributed adaptive control for synchronization in directed complex networks
WO2020168477A1 (en) Method for constructing topology satisfying partition tolerance under alliance chain consensus and system
CN109919771B (en) Industrial internet transaction device applying hierarchical block chain technology
Zoican et al. Blockchain and consensus algorithms in internet of things
CN114626547A (en) Group collaborative learning method based on block chain
CN113469371A (en) Federal learning method and device
Yi et al. Consensus in Markovian jump second‐order multi‐agent systems with random communication delay
CN112395113A (en) Practical Byzantine fault-tolerant consensus method and device and readable storage medium
Jiang et al. A trust-based hierarchical consensus mechanism for consortium blockchain in smart grid
Huang et al. Blockchain based log system
Zhang et al. Privacy-preserving average consensus via edge decomposition
Xiong et al. A distributed security SDN cluster architecture for smart grid based on blockchain technology
Lin et al. Security function virtualization based moving target defense of SDN-enabled smart grid
Wu et al. Reinforced practical Byzantine fault tolerance consensus protocol for cyber physical systems
Li et al. EBFT: A hierarchical and group-based byzantine fault tolerant consensus algorithm
Bhonsle et al. ETIS--Efficient Trust and Identity Management System for Federated Service Providers
Monshizadeh et al. Uniform synchronization in multi‐agent systems with switching topologies
CN103118105A (en) Wireless sensor network based data query system and query method thereof
Deng et al. Adaptive event-triggered state estimation for complex networks with nonlinearities against hybrid attacks
Wang et al. A physical topology for optimizing partition tolerance in consortium blockchains to reach CAP guarantee bound
Xian et al. A distributed efficient blockchain oracle scheme for Internet of Things

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19916237

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19916237

Country of ref document: EP

Kind code of ref document: A1