CN110166565A - Block chain divides domain triggering method and system - Google Patents

Block chain divides domain triggering method and system Download PDF

Info

Publication number
CN110166565A
CN110166565A CN201910462445.4A CN201910462445A CN110166565A CN 110166565 A CN110166565 A CN 110166565A CN 201910462445 A CN201910462445 A CN 201910462445A CN 110166565 A CN110166565 A CN 110166565A
Authority
CN
China
Prior art keywords
node
load
current
domain
block chain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910462445.4A
Other languages
Chinese (zh)
Inventor
饶光
王剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201910462445.4A priority Critical patent/CN110166565A/en
Publication of CN110166565A publication Critical patent/CN110166565A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1059Inter-group management mechanisms, e.g. splitting, merging or interconnection of groups

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本公开提供了一种区块链分域触发方法,包括:当第一节点加入区块链网络时,获取区块链网络中的各第二节点的当前负载参数;根据各第二节点的当前负载参数,计算出区块链网络的当前整体负载参数;判断所述区块链网络的当前整体负载参数是否大于预先获取的触发分域负载阈值;若判断出区块链网络的当前整体负载参数大于预先获取的触发分域负载阈值时,触发分域流程,完成第一节点的加入;若判断出区块链网络的当前整体负载参数小于或等于预先获取的触发分域负载阈值时,不触发分域流程,完成第一节点的加入。本公开还提供了区块链分域触发系统。

The present disclosure provides a block chain domain division trigger method, including: when the first node joins the block chain network, obtain the current load parameters of each second node in the block chain network; according to the current load parameters of each second node Load parameters, calculate the current overall load parameters of the blockchain network; judge whether the current overall load parameters of the blockchain network are greater than the pre-acquired trigger domain load threshold; if the current overall load parameters of the blockchain network are determined When it is greater than the pre-acquired trigger domain load threshold, the domain division process is triggered to complete the joining of the first node; if it is judged that the current overall load parameter of the blockchain network is less than or equal to the pre-acquired trigger domain load threshold, it does not trigger The domain division process completes the joining of the first node. The present disclosure also provides a block chain domain division trigger system.

Description

区块链分域触发方法及系统Block chain domain triggering method and system

技术领域technical field

本公开实施例涉及通信技术领域,特别涉及一种区块链分域触发方法及系统。The embodiments of the present disclosure relate to the field of communication technologies, and in particular, to a method and system for triggering blockchain domain division.

背景技术Background technique

区块链(Block Chain)基于P2P传输、共识机制、加密算法、块链式数据结构、分布式数据存储等技术,实现了去中心化的可信数字架构。区块链核心是去中心化,以点对点传输为承载,利用分布式节点共识算法、加密算法、块链式数据结构来生成不可篡改和不可伪造的分布式账本。但是,正因为其去中心化的思想,在任意两个节点间都会有广播消息、共识算法消息、数据块同步等数据流量。当区块链网络节点数达到一定规模时,数据流量激增,将会给传输网络带来较大压力,同时各节点也面临计算量的压力。Based on P2P transmission, consensus mechanism, encryption algorithm, block chain data structure, distributed data storage and other technologies, the blockchain (Block Chain) realizes a decentralized trusted digital architecture. The core of the blockchain is decentralization, with point-to-point transmission as the carrier, using distributed node consensus algorithms, encryption algorithms, and block chain data structures to generate non-tamperable and unforgeable distributed ledgers. However, because of its idea of decentralization, there will be data traffic such as broadcast messages, consensus algorithm messages, and data block synchronization between any two nodes. When the number of blockchain network nodes reaches a certain scale, the surge in data traffic will bring greater pressure to the transmission network, and at the same time, each node will also face the pressure of calculation.

为解决以上问题,目前采用一种区块链分域方法,在区块链节点数达到一定规模时,将全部节点分拆到两个不同的域中,本域内的节点间的广播、共识算法消息限定在本域内,不扩散至其它域,但发生新的记账时将数据块进行跨域同步,后续如果本域的节点的数量规模达到分域标准时,将进行再次分域,依此类推,通过分域的方式可以达到降低网络流量、减轻节点计算量的目的。In order to solve the above problems, a block chain domain division method is currently adopted. When the number of blockchain nodes reaches a certain scale, all nodes are split into two different domains. The broadcast and consensus algorithm between nodes in this domain The message is limited to this domain and will not spread to other domains. However, when a new bookkeeping occurs, the data block will be synchronized across domains. If the number of nodes in this domain reaches the domain division standard, the domain will be divided again, and so on. , the purpose of reducing network traffic and reducing the amount of calculation of nodes can be achieved through domain division.

但是,将节点的数量规模这种单一的静态因素作为触发区块链分域的条件,不太合理,难以实现高效合理的区块链分域。However, it is unreasonable to use a single static factor such as the number of nodes as a condition to trigger blockchain domain division, and it is difficult to achieve efficient and reasonable blockchain domain division.

发明内容Contents of the invention

本公开实施例提供一种区块链分域触发方法及系统。Embodiments of the present disclosure provide a method and system for triggering blockchain domain division.

第一方面,本公开实施例提供一种区块链分域触发方法,该区块链分域触发方法包括:In the first aspect, an embodiment of the present disclosure provides a method for triggering blockchain domain division, which includes:

当第一节点加入区块链网络时,获取区块链网络中的各第二节点的当前负载参数;When the first node joins the block chain network, obtain the current load parameters of each second node in the block chain network;

根据各第二节点的当前负载参数,计算出区块链网络的当前整体负载参数;Calculate the current overall load parameters of the blockchain network according to the current load parameters of each second node;

判断所述区块链网络的当前整体负载参数是否大于预先获取的触发分域负载阈值;Judging whether the current overall load parameter of the blockchain network is greater than the pre-acquired trigger domain load threshold;

若判断出区块链网络的当前整体负载参数大于预先获取的触发分域负载阈值时,触发分域流程,完成第一节点的加入;If it is judged that the current overall load parameter of the blockchain network is greater than the pre-acquired trigger domain load threshold, the domain division process is triggered to complete the joining of the first node;

若判断出区块链网络的当前整体负载参数小于或等于预先获取的触发分域负载阈值时,不触发分域流程,完成第一节点的加入。If it is determined that the current overall load parameter of the blockchain network is less than or equal to the pre-acquired load threshold for triggering domain division, the domain division process is not triggered and the joining of the first node is completed.

在一些实施例中,所述获取区块链网络中的各第二节点的当前负载参数包括:In some embodiments, the obtaining the current load parameters of each second node in the blockchain network includes:

从所述第一节点相邻的第二节点获取区块链负载信息表,所述区块链负载信息表包括节点负载信息表,所述节点负载信息表包括各第二节点的当前负载参数。Obtain a block chain load information table from a second node adjacent to the first node, the block chain load information table includes a node load information table, and the node load information table includes current load parameters of each second node.

在一些实施例中,所述区块链负载信息表还包括配置参数表,所述配置参数表包括所述触发分域负载阈值。In some embodiments, the blockchain load information table further includes a configuration parameter table, and the configuration parameter table includes the trigger domain load threshold.

在一些实施例中,所述节点负载信息表还包括各第二节点的节点序号和各第二节点的节点地址。In some embodiments, the node load information table further includes a node serial number of each second node and a node address of each second node.

在一些实施例中,第二节点的当前负载参数Node_Load=CPU_Load*W_C+Memory_Load*W_M,其中,Node_Load为第二节点的当前负载参数,CPU_Load为第二节点的当前CPU平均资源利用率,W_C为CPU_Load对应的预设权重,Memory_Load为第二节点的当前内存平均资源利用率,W_M为Memory_Load对应的预设权重,W_C、W_M∈(0,1),W_C+W_M=1。In some embodiments, the current load parameter of the second node Node_Load=CPU_Load*W_C+Memory_Load*W_M, wherein, Node_Load is the current load parameter of the second node, CPU_Load is the current CPU average resource utilization rate of the second node, and W_C is The preset weight corresponding to CPU_Load, Memory_Load is the current average memory resource utilization of the second node, W_M is the preset weight corresponding to Memory_Load, W_C, W_M∈(0,1), W_C+W_M=1.

在一些实施例中,所述根据各第二节点的当前负载参数,计算出区块链网络的当前整体负载参数包括:In some embodiments, the calculating the current overall load parameters of the blockchain network according to the current load parameters of each second node includes:

将各第二节点的当前负载参数进行求和;summing the current load parameters of the second nodes;

将求和结果除以第二节点的总数量,得到所有第二节点的当前负载参数的平均值,所述区块链网络的当前整体负载参数为所述平均值。The summation result is divided by the total number of the second nodes to obtain the average value of the current load parameters of all the second nodes, and the current overall load parameter of the blockchain network is the average value.

第二方面,本公开实施例提供一种区块链分域触发系统,该区块链分域触发系统包括:In the second aspect, an embodiment of the present disclosure provides a blockchain domain triggering system, the blockchain domain triggering system includes:

获取模块,用于当第一节点加入区块链网络时,获取区块链网络中的各第二节点的当前负载参数;An acquisition module, configured to obtain the current load parameters of each second node in the blockchain network when the first node joins the blockchain network;

计算模块,用于根据各第二节点的当前负载参数,计算出区块链网络的当前整体负载参数;A calculation module, configured to calculate the current overall load parameter of the blockchain network according to the current load parameters of each second node;

判断模块,用于判断所述区块链网络的当前整体负载参数是否大于预先获取的触发分域负载阈值;A judging module, configured to judge whether the current overall load parameter of the blockchain network is greater than the pre-acquired trigger domain load threshold;

触发分域模块,用于若判断模块判断出区块链网络的当前整体负载参数大于预先获取的触发分域负载阈值时,触发分域流程,完成第一节点的加入;若判断模块判断出区块链网络的当前整体负载参数小于或等于预先获取的触发分域负载阈值时,不触发分域流程,完成第一节点的加入。The trigger domain division module is used to trigger the domain division process and complete the joining of the first node if the judging module judges that the current overall load parameter of the blockchain network is greater than the pre-acquired trigger domain load threshold; When the current overall load parameter of the block chain network is less than or equal to the pre-acquired trigger domain load threshold, the domain division process will not be triggered and the joining of the first node will be completed.

在一些实施例中,所述获取模块具体用于从所述第一节点相邻的第二节点获取区块链负载信息表,所述区块链负载信息表包括节点负载信息表,所述节点负载信息表包括各第二节点的当前负载参数。In some embodiments, the obtaining module is specifically configured to obtain a block chain load information table from a second node adjacent to the first node, the block chain load information table includes a node load information table, and the node The load information table includes current load parameters of each second node.

在一些实施例中,所述区块链负载信息表还包括配置参数表,所述配置参数表包括所述触发分域负载阈值。In some embodiments, the blockchain load information table further includes a configuration parameter table, and the configuration parameter table includes the trigger domain load threshold.

在一些实施例中,所述计算模块具体用于将各第二节点的当前负载参数进行求和;将求和结果除以第二节点的总数量,得到所有第二节点的当前负载参数的平均值,所述区块链网络的当前整体负载参数为所述平均值。In some embodiments, the calculation module is specifically configured to sum the current load parameters of each second node; divide the sum result by the total number of second nodes to obtain the average of the current load parameters of all second nodes value, the current overall load parameter of the blockchain network is the average value.

本公开实施例所提供的区块链分域触发方法及系统,当第一节点(新节点)加入区块链网络时,通过判断区块链网络的当前整体负载参数是否大于预先获取的触发分域负载阈值,来决定是否触发区块链分域,从而实现了高效合理的区块链分域,有效避免单一静态因素作为分域触发条件存在的不合理性的问题。The block chain domain division trigger method and system provided by the embodiments of the present disclosure, when the first node (new node) joins the block chain network, by judging whether the current overall load parameter of the block chain network is greater than the trigger point obtained in advance The domain load threshold is used to determine whether to trigger blockchain domain division, thereby realizing efficient and reasonable blockchain domain division, and effectively avoiding the unreasonable problem of a single static factor as a domain division trigger condition.

附图说明Description of drawings

图1为本公开实施例提供的一种区块链分域触发方法的流程图;FIG. 1 is a flow chart of a method for triggering domain division of a blockchain provided by an embodiment of the present disclosure;

图2为本公开实施例提供的一种区块链分域触发系统的结构示意图。FIG. 2 is a schematic structural diagram of a blockchain domain triggering system provided by an embodiment of the present disclosure.

具体实施方式Detailed ways

为使本领域的技术人员更好地理解本公开的技术方案,下面结合附图对本公开提供的区块链分域触发方法及系统进行详细描述。In order for those skilled in the art to better understand the technical solution of the present disclosure, the blockchain domain division triggering method and system provided by the present disclosure will be described in detail below with reference to the accompanying drawings.

图1为本公开实施例提供的一种区块链分域触发方法的流程图,如图1所示,该区块链分域触发方法包括:Fig. 1 is a flow chart of a method for triggering domain division of a blockchain provided by an embodiment of the present disclosure. As shown in Fig. 1 , the method for triggering domain division of a blockchain includes:

步骤11、当第一节点加入区块链网络时,获取区块链网络中的各第二节点的当前负载参数。Step 11. When the first node joins the blockchain network, obtain the current load parameters of each second node in the blockchain network.

步骤12、根据各第二节点的当前负载参数,计算出区块链网络的当前整体负载参数。Step 12. Calculate the current overall load parameters of the blockchain network according to the current load parameters of each second node.

步骤13、判断区块链网络的当前整体负载参数是否大于预先获取的触发分域负载阈值,若是,触发分域流程,完成第一节点的加入,若否,不触发分域流程,完成第一节点的加入。Step 13. Determine whether the current overall load parameter of the blockchain network is greater than the pre-acquired trigger domain load threshold. If so, trigger the domain division process and complete the joining of the first node. If not, do not trigger the domain division process and complete the first Joining of nodes.

在本公开实施例中,第一节点为区块链网络的新节点,各第二节点为区块链网络中已有的节点,在步骤11中,当新节点(第一节点)加入区块链网络时,获取区块链网络中已有的各节点(第二节点)的当前负载参数。其中,第二节点的当前负载参数是指第二节点的最新的负载参数。In the embodiment of the present disclosure, the first node is a new node of the blockchain network, and each second node is an existing node in the blockchain network. In step 11, when the new node (first node) joins the block In the blockchain network, the current load parameters of each node (second node) existing in the blockchain network are obtained. Wherein, the current load parameter of the second node refers to the latest load parameter of the second node.

在一些实施例中,步骤11包括:当第一节点加入区块链网络时,从第一节点相邻的第二节点获取区块链负载信息表。In some embodiments, step 11 includes: when the first node joins the blockchain network, obtaining a blockchain load information table from a second node adjacent to the first node.

在一些实施例中,第一节点相邻的第二节点为第一节点加入区块链网络时,首次连接到的节点(第二节点)。在区块链网络中,每个第二节点均存储并维护区块链网络的区块链负载信息表。In some embodiments, the second node adjacent to the first node is the node (second node) that the first node connects to for the first time when it joins the blockchain network. In the blockchain network, each second node stores and maintains a blockchain load information table of the blockchain network.

其中,区块链负载信息表至少包括节点负载信息表,节点负载信息表包括如下字段:各第二节点的当前负载参数(最新负载参数)。在一些实施例中,节点负载信息表还包括如下字段:各第二节点的节点序号和各第二节点的节点地址。在本公开实施例中,节点负载信息表还可以包括对应的第二节点的其他信息,此处不再一一列举。Wherein, the blockchain load information table at least includes a node load information table, and the node load information table includes the following fields: current load parameters (latest load parameters) of each second node. In some embodiments, the node load information table further includes the following fields: the node serial number of each second node and the node address of each second node. In the embodiment of the present disclosure, the node load information table may further include other information of the corresponding second node, which will not be listed here.

在一些实施例中,该第二节点的当前负载参数Node_Load=CPU_Load*W_C+Memory_Load*W_M,其中,Node_Load为第二节点的当前负载参数,CPU_Load为第二节点的当前CPU平均资源利用率,W_C为CPU_Load对应的预设权重,Memory_Load为第二节点的当前内存平均资源利用率,W_M为Memory_Load对应的预设权重,W_C、W_M∈(0,1),W_C+W_M=1。其中,W_C为CPU平均资源利用率在节点负载中所占的权重,可根据第二节点的CPU对第二节点的性能的影响程度确定;W_M为内存平均资源利用率在节点负载中所占的权重,可根据第二节点的内存对第二节点的性能的影响程度确定。需要说明的是,W_C和W_M的具体取值可根据实际情况确定,本公开实施例对W_C和W_M的取值不作具体限制。In some embodiments, the current load parameter of the second node Node_Load=CPU_Load*W_C+Memory_Load*W_M, wherein, Node_Load is the current load parameter of the second node, CPU_Load is the current CPU average resource utilization rate of the second node, W_C is the preset weight corresponding to CPU_Load, Memory_Load is the current average memory resource utilization rate of the second node, W_M is the preset weight corresponding to Memory_Load, W_C, W_M∈(0,1), W_C+W_M=1. Among them, W_C is the weight of the average CPU resource utilization in the node load, which can be determined according to the degree of influence of the CPU of the second node on the performance of the second node; W_M is the weight of the average memory resource utilization in the node load The weight may be determined according to the influence degree of the memory of the second node on the performance of the second node. It should be noted that specific values of W_C and W_M may be determined according to actual conditions, and the embodiments of the present disclosure do not specifically limit the values of W_C and W_M.

在一些实施例中,针对区块链网络中的每个第二节点,该第二节点每隔预设更新时间周期更新该第二节点的当前负载参数。具体地,该第二节点通过上述公式:Node_Load=CPU_Load*W_C+Memory_Load*W_M更新该第二节点的当前负载参数。其中,CPU_Load为第二节点在当前预设更新时间周期内的CPU平均资源利用率,Memory_Load为第二节点在当前预设更新时间周期内的内存平均资源利用率。在本公开实施例中,该预设更新时间周期为该第二节点计算更新当前负载参数的时间周期,可以根据实际需要进行设置,本公开实施例对此不作限制。In some embodiments, for each second node in the blockchain network, the second node updates the current load parameter of the second node every preset update time period. Specifically, the second node updates the current load parameter of the second node according to the above formula: Node_Load=CPU_Load*W_C+Memory_Load*W_M. Wherein, CPU_Load is the average CPU resource utilization rate of the second node within the current preset update time period, and Memory_Load is the average memory resource utilization rate of the second node within the current preset update time period. In the embodiment of the present disclosure, the preset update time period is the time period for the second node to calculate and update the current load parameter, which can be set according to actual needs, and is not limited in the embodiment of the present disclosure.

其中,CPU_Load(当前CPU平均资源利用率)可根据如下方式获取和更新:在当前预设更新时间周期(例如30分钟)内,每隔预设采样时间间隔(例如1分钟),从第二节点的节点机器操作系统中读取CPU的资源利用率,对预设更新时间周期(例如30分钟)内读取的所有CPU的资源利用率求取平均值,得到该第二节点在当前预设更新时间周期内的CPU_Load(CPU平均资源利用率)。Among them, CPU_Load (current CPU average resource utilization rate) can be obtained and updated according to the following method: within the current preset update time period (for example, 30 minutes), every preset sampling time interval (for example, 1 minute), from the second node The resource utilization rate of the CPU is read in the operating system of the node machine, and the resource utilization rate of all CPUs read within the preset update time period (for example, 30 minutes) is averaged to obtain the current preset update rate of the second node. CPU_Load (average CPU resource utilization) within the time period.

同理,Memory_Load(当前内存平均资源利用率)可以根据如下方式获取和更新:在当前预设更新时间周期(例如30分钟)内,每隔预设采样时间间隔(例如1分钟),从第二节点的节点机器操作系统中读取内存的资源利用率,对预设更新时间周期(例如30分钟)内读取的所有内存的资源利用率求取平均值,得到该第二节点在当前预设更新时间周期内的Memory_Load(内存平均资源利用率)。Similarly, Memory_Load (the average resource utilization rate of the current memory) can be obtained and updated in the following manner: within the current preset update time period (for example, 30 minutes), every preset sampling time interval (for example, 1 minute), from the second Read the resource utilization rate of the memory in the node machine operating system of the node, calculate the average value of the resource utilization rate of all memory read within the preset update time period (for example, 30 minutes), and obtain the second node in the current preset Update the Memory_Load (memory average resource utilization) within the time period.

在一些实施例中,针对区块链网络中的每个第二节点,该第二节点通过上述方式更新其当前负载参数后,在该第二节点存储的节点负载信息表中更新其当前负载参数,并以广播的方式向区块链网络中的其他第二节点发送节点负载更新消息,区块链网络中,收到该第二节点的节点负载更新消息的第二节点根据节点负载更新消息更新本节点上的节点负载信息表。In some embodiments, for each second node in the blockchain network, after the second node updates its current load parameters in the above-mentioned manner, it updates its current load parameters in the node load information table stored by the second node , and send a node load update message to other second nodes in the blockchain network in a broadcast manner. In the blockchain network, the second node that receives the node load update message of the second node updates according to the node load update message The node load information table on this node.

在本公开实施例中,区块链负载信息表还包括配置参数表,配置参数表包括触发分域负载阈值。可选地,配置参数表还包括各第二节点计算更新当前负载参数的预设更新时间周期,以及各第二节点的CPU的资源利用率和内存的资源利用率的预设采样时间间隔。In the embodiment of the present disclosure, the block chain load information table further includes a configuration parameter table, and the configuration parameter table includes triggering domain-specific load thresholds. Optionally, the configuration parameter table further includes a preset update time period for each second node to calculate and update the current load parameter, and a preset sampling time interval for each second node's CPU resource utilization rate and memory resource utilization rate.

在一些实施例中,步骤12包括:In some embodiments, step 12 includes:

步骤111、将各第二节点的当前负载参数进行求和,得到求和结果。Step 111: Sum the current load parameters of the second nodes to obtain a sum result.

步骤112、将求和结果除以第二节点的总数量,得到所有第二节点的当前负载参数的平均值,区块链网络的当前整体负载参数为该平均值。Step 112: Divide the summation result by the total number of second nodes to obtain the average value of the current load parameters of all second nodes, and the current overall load parameter of the blockchain network is the average value.

例如,区块链网络中,第二节点的总数量为5个,该5个第二节点的当前负载参数分别为A、B、C、D、F,将各第二节点的当前负载参数进行求和,得到求和结果A+B+C+D+F,将求和结果A+B+C+D+F除以第二节点的总数量5,得到区块链网络的当前整体负载参数为(A+B+C+D+F)/5。For example, in the blockchain network, the total number of second nodes is five, and the current load parameters of the five second nodes are A, B, C, D, and F respectively, and the current load parameters of each second node are Sum to get the summation result A+B+C+D+F, divide the summation result A+B+C+D+F by the total number of the second node 5 to get the current overall load parameter of the blockchain network It is (A+B+C+D+F)/5.

在步骤13中,若判断出区块链网络的当前整体负载参数大于预先获取的触发分域负载阈值时,触发分域流程,以广播的形式向第一节点和各第二节点发送分域消息,完成分域流程,第一节点成功加入区块链网络中。若判断出区块链网络的当前整体负载参数小于或等于预先获取的触发分域负载阈值时,不触发分域流程,第一节点成功加入区块链网络中。在加入区块链网络后,第一节点成为第二节点,当有新的节点加入区块链网络时,重复执行上述步骤11至步骤13。In step 13, if it is judged that the current overall load parameter of the blockchain network is greater than the pre-acquired trigger domain load threshold, the domain division process is triggered, and domain division messages are sent to the first node and each second node in the form of broadcast , the process of domain division is completed, and the first node successfully joins the blockchain network. If it is determined that the current overall load parameter of the blockchain network is less than or equal to the pre-acquired load threshold for triggering domain division, the domain division process is not triggered, and the first node successfully joins the blockchain network. After joining the blockchain network, the first node becomes the second node, and when a new node joins the blockchain network, repeat steps 11 to 13 above.

在本公开实施例中,触发分域负载阈值可根据实际情况进行设置,本公开实施例对此不作限制。In the embodiments of the present disclosure, the load threshold for triggering domain division may be set according to actual conditions, which is not limited in the embodiments of the present disclosure.

在一些实施例中,分域流程包括:In some embodiments, domain segmentation procedures include:

1、将区块链网络中的所有第二节点按照预设的分域规则分到两个不同的域中。1. Divide all second nodes in the blockchain network into two different domains according to preset domain division rules.

例如,预设的分域规则包括:将区块链网络的所有第二节点按照节点序号从小到大排序,将节点序号排在前1/2的第二节点作为第一归属域,将节点序号排在后1/2的节点作为第二归属域。For example, the preset domain division rules include: sorting all the second nodes of the blockchain network according to the node serial number from small to large, taking the second node whose node serial number ranks in the top 1/2 as the first attribution domain, The last 1/2 nodes are used as the second home domain.

2、将第一节点(新节点)加入到上述两个不同域中的一个域中。2. Add the first node (new node) to one of the above two different domains.

具体地,将第一节点(新节点)加入到第一归属域或第二归属域中。Specifically, the first node (new node) is added to the first home domain or the second home domain.

在本公开实施例中,通过计算区块链网络的动态负荷(当前整体负载参数)来决定是否触发分域,以各第二节点的CPU平均资源利用率和内存平均资源利用率作为计算区块链网络的动态负荷的参数,在新节点加入区块链网络时判断区块链网络的动态负荷水平,进而决定是否触发分域,从而实现高效合理的区块链分域,有效避免单一静态因素作为分域触发条件存在的不合理性的问题。In the embodiment of the present disclosure, whether to trigger domain division is determined by calculating the dynamic load (current overall load parameter) of the blockchain network, and the average CPU resource utilization rate and memory average resource utilization rate of each second node are used as calculation blocks The parameters of the dynamic load of the chain network, judge the dynamic load level of the blockchain network when a new node joins the blockchain network, and then decide whether to trigger domain division, so as to achieve efficient and reasonable blockchain domain division, and effectively avoid a single static factor The problem of irrationality as a trigger condition for domain division.

本公开实施例所提供的区块链分域触发方法的技术方案中,当第一节点(新节点)加入区块链网络时,通过判断区块链网络的当前整体负载参数是否大于预先获取的触发分域负载阈值,来决定是否触发区块链分域,从而实现了高效合理的区块链分域,有效避免单一静态因素作为分域触发条件存在的不合理性的问题。In the technical solution of the block chain domain division trigger method provided by the embodiment of the present disclosure, when the first node (new node) joins the block chain network, by judging whether the current overall load parameter of the block chain network is greater than the pre-acquired Trigger the domain load threshold to decide whether to trigger the blockchain domain, thus realizing efficient and reasonable blockchain domain division, and effectively avoiding the unreasonable problem of a single static factor as the domain division trigger condition.

图2为本公开实施例提供的一种区块链分域触发系统的结构示意图,如图2所示,该区块链分域触发系统包括获取模块21、计算模块22、判断模块23和触发分域模块24。Figure 2 is a schematic structural diagram of a blockchain domain-divided trigger system provided by an embodiment of the present disclosure. As shown in Figure 2, the blockchain domain-divided trigger system includes an acquisition module 21, a calculation module 22, a judgment module 23 and a trigger Sub-domain module 24.

其中,获取模块21用于当第一节点加入区块链网络时,获取区块链网络中的各第二节点的当前负载参数。Wherein, the acquiring module 21 is used for acquiring the current load parameters of each second node in the blockchain network when the first node joins the blockchain network.

计算模块22用于根据各第二节点的当前负载参数,计算出区块链网络的当前整体负载参数。The calculation module 22 is used to calculate the current overall load parameter of the blockchain network according to the current load parameters of each second node.

判断模块23用于判断所述区块链网络的当前整体负载参数是否大于预先获取的触发分域负载阈值。The judging module 23 is used to judge whether the current overall load parameter of the block chain network is greater than the pre-acquired trigger sub-regional load threshold.

触发分域模块24用于若判断模块23判断出区块链网络的当前整体负载参数大于预先获取的触发分域负载阈值时,触发分域流程,完成第一节点的加入;若判断模块23判断出区块链网络的当前整体负载参数小于或等于预先获取的触发分域负载阈值时,不触发分域流程,完成第一节点的加入。The trigger domain division module 24 is used to trigger the domain division process and complete the joining of the first node if the judgment module 23 judges that the current overall load parameter of the block chain network is greater than the pre-acquired trigger domain load threshold; if the judgment module 23 judges When the current overall load parameter of the outgoing blockchain network is less than or equal to the pre-acquired trigger domain load threshold, the domain division process will not be triggered and the joining of the first node will be completed.

在一些实施例中,获取模块21具体用于从所述第一节点相邻的第二节点获取区块链负载信息表,所述区块链负载信息表包括节点负载信息表,所述节点负载信息表包括各第二节点的当前负载参数。In some embodiments, the obtaining module 21 is specifically configured to obtain a block chain load information table from a second node adjacent to the first node, the block chain load information table includes a node load information table, and the node load The information table includes current load parameters of each second node.

在一些实施例中,区块链负载信息表还包括配置参数表,所述配置参数表包括所述触发分域负载阈值。In some embodiments, the block chain load information table further includes a configuration parameter table, and the configuration parameter table includes the trigger domain load threshold.

在一些实施例中,计算模块22具体用于将各第二节点的当前负载参数进行求和;将求和结果除以第二节点的总数量,得到所有第二节点的当前负载参数的平均值,所述区块链网络的当前整体负载参数为所述平均值。In some embodiments, the calculation module 22 is specifically configured to sum the current load parameters of each second node; divide the sum result by the total number of second nodes to obtain the average value of the current load parameters of all second nodes , the current overall load parameter of the blockchain network is the average value.

此外,本公开实施例所提供的区块链分域触发系统具体用于实现前述区块链分域触发方法,具体可参见前述区块链分域触发方法的描述,此处不再赘述。In addition, the blockchain domain division triggering system provided by the embodiments of the present disclosure is specifically used to implement the aforementioned blockchain domain division trigger method. For details, please refer to the description of the aforementioned blockchain domain division trigger method, which will not be repeated here.

可以理解的是,以上实施方式仅仅是为了说明本发明的原理而采用的示例性实施方式,然而本发明并不局限于此。对于本领域内的普通技术人员而言,在不脱离本发明的精神和实质的情况下,可以做出各种变型和改进,这些变型和改进也视为本发明的保护范围。It can be understood that, the above embodiments are only exemplary embodiments adopted for illustrating the principle of the present invention, but the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also regarded as the protection scope of the present invention.

Claims (10)

1.一种区块链分域触发方法,其特征在于,包括:1. A method for triggering domain division of blockchain, comprising: 当第一节点加入区块链网络时,获取区块链网络中的各第二节点的当前负载参数;When the first node joins the block chain network, obtain the current load parameters of each second node in the block chain network; 根据各第二节点的当前负载参数,计算出区块链网络的当前整体负载参数;Calculate the current overall load parameters of the blockchain network according to the current load parameters of each second node; 判断所述区块链网络的当前整体负载参数是否大于预先获取的触发分域负载阈值;Judging whether the current overall load parameter of the blockchain network is greater than the pre-acquired trigger domain load threshold; 若判断出区块链网络的当前整体负载参数大于预先获取的触发分域负载阈值时,触发分域流程,完成第一节点的加入;If it is judged that the current overall load parameter of the blockchain network is greater than the pre-acquired trigger domain load threshold, the domain division process is triggered to complete the joining of the first node; 若判断出区块链网络的当前整体负载参数小于或等于预先获取的触发分域负载阈值时,不触发分域流程,完成第一节点的加入。If it is determined that the current overall load parameter of the blockchain network is less than or equal to the pre-acquired load threshold for triggering domain division, the domain division process is not triggered and the joining of the first node is completed. 2.根据权利要求1所述的区块链分域触发方法,其特征在于,所述获取区块链网络中的各第二节点的当前负载参数包括:2. The block chain domain division triggering method according to claim 1, wherein said obtaining the current load parameters of each second node in the block chain network comprises: 从所述第一节点相邻的第二节点获取区块链负载信息表,所述区块链负载信息表包括节点负载信息表,所述节点负载信息表包括各第二节点的当前负载参数。Obtain a block chain load information table from a second node adjacent to the first node, the block chain load information table includes a node load information table, and the node load information table includes current load parameters of each second node. 3.根据权利要求2所述的区块链分域触发方法,其特征在于,所述区块链负载信息表还包括配置参数表,所述配置参数表包括所述触发分域负载阈值。3. The method for triggering domain division of a blockchain according to claim 2, wherein the blockchain load information table further includes a configuration parameter table, and the configuration parameter table includes the trigger domain load threshold. 4.根据权利要求2所述的区块链分域触发方法,其特征在于,所述节点负载信息表还包括各第二节点的节点序号和各第二节点的节点地址。4. The blockchain domain division triggering method according to claim 2, wherein the node load information table further includes the node serial number of each second node and the node address of each second node. 5.根据权利要求1所述的区块链分域触发方法,其特征在于,第二节点的当前负载参数Node_Load=CPU_Load*W_C+Memory_Load*W_M,其中,Node_Load为第二节点的当前负载参数,CPU_Load为第二节点的当前CPU平均资源利用率,W_C为CPU_Load对应的预设权重,Memory_Load为第二节点的当前内存平均资源利用率,W_M为Memory_Load对应的预设权重,W_C、W_M∈(0,1),W_C+W_M=1。5. The block chain domain division triggering method according to claim 1, wherein the current load parameter Node_Load of the second node=CPU_Load*W_C+Memory_Load*W_M, wherein Node_Load is the current load parameter of the second node, CPU_Load is the current CPU average resource utilization of the second node, W_C is the preset weight corresponding to CPU_Load, Memory_Load is the current average memory resource utilization of the second node, W_M is the preset weight corresponding to Memory_Load, W_C, W_M∈(0 , 1), W_C+W_M=1. 6.根据权利要求1所述的区块链分域触发方法,其特征在于,所述根据各第二节点的当前负载参数,计算出区块链网络的当前整体负载参数包括:6. The block chain domain division triggering method according to claim 1, wherein the calculation of the current overall load parameters of the block chain network according to the current load parameters of each second node comprises: 将各第二节点的当前负载参数进行求和;summing the current load parameters of the second nodes; 将求和结果除以第二节点的总数量,得到所有第二节点的当前负载参数的平均值,所述区块链网络的当前整体负载参数为所述平均值。The summation result is divided by the total number of the second nodes to obtain the average value of the current load parameters of all the second nodes, and the current overall load parameter of the blockchain network is the average value. 7.一种区块链分域触发系统,其特征在于,包括:7. A block chain domain triggering system, characterized in that it comprises: 获取模块,用于当第一节点加入区块链网络时,获取区块链网络中的各第二节点的当前负载参数;An acquisition module, configured to obtain the current load parameters of each second node in the blockchain network when the first node joins the blockchain network; 计算模块,用于根据各第二节点的当前负载参数,计算出区块链网络的当前整体负载参数;A calculation module, configured to calculate the current overall load parameter of the blockchain network according to the current load parameters of each second node; 判断模块,用于判断所述区块链网络的当前整体负载参数是否大于预先获取的触发分域负载阈值;A judging module, configured to judge whether the current overall load parameter of the blockchain network is greater than the pre-acquired trigger domain load threshold; 触发分域模块,用于若判断模块判断出区块链网络的当前整体负载参数大于预先获取的触发分域负载阈值时,触发分域流程,完成第一节点的加入;若判断模块判断出区块链网络的当前整体负载参数小于或等于预先获取的触发分域负载阈值时,不触发分域流程,完成第一节点的加入。The trigger domain division module is used to trigger the domain division process and complete the joining of the first node if the judging module judges that the current overall load parameter of the blockchain network is greater than the pre-acquired trigger domain load threshold; When the current overall load parameter of the block chain network is less than or equal to the pre-acquired trigger domain load threshold, the domain division process will not be triggered and the joining of the first node will be completed. 8.根据权利要求7所述的区块链分域触发系统,其特征在于,所述获取模块具体用于从所述第一节点相邻的第二节点获取区块链负载信息表,所述区块链负载信息表包括节点负载信息表,所述节点负载信息表包括各第二节点的当前负载参数。8. The block chain domain division trigger system according to claim 7, wherein the acquisition module is specifically used to obtain a block chain load information table from a second node adjacent to the first node, and the The block chain load information table includes a node load information table, and the node load information table includes current load parameters of each second node. 9.根据权利要求8所述的区块链分域触发系统,其特征在于,所述区块链负载信息表还包括配置参数表,所述配置参数表包括所述触发分域负载阈值。9. The blockchain domain triggering system according to claim 8, wherein the blockchain load information table further includes a configuration parameter table, and the configuration parameter table includes the trigger domain load threshold. 10.根据权利要求7所述的区块链分域触发系统,其特征在于,所述计算模块具体用于将各第二节点的当前负载参数进行求和;将求和结果除以第二节点的总数量,得到所有第二节点的当前负载参数的平均值,所述区块链网络的当前整体负载参数为所述平均值。10. The block chain domain division trigger system according to claim 7, wherein the calculation module is specifically used to sum the current load parameters of each second node; divide the summation result by the second node The total number of the total number, the average value of the current load parameters of all second nodes is obtained, and the current overall load parameter of the block chain network is the average value.
CN201910462445.4A 2019-05-30 2019-05-30 Block chain divides domain triggering method and system Pending CN110166565A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910462445.4A CN110166565A (en) 2019-05-30 2019-05-30 Block chain divides domain triggering method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910462445.4A CN110166565A (en) 2019-05-30 2019-05-30 Block chain divides domain triggering method and system

Publications (1)

Publication Number Publication Date
CN110166565A true CN110166565A (en) 2019-08-23

Family

ID=67630023

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910462445.4A Pending CN110166565A (en) 2019-05-30 2019-05-30 Block chain divides domain triggering method and system

Country Status (1)

Country Link
CN (1) CN110166565A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111629046A (en) * 2020-05-22 2020-09-04 中国联合网络通信集团有限公司 Edge computing collaboration method, edge computing device and terminal
CN113055453A (en) * 2021-03-09 2021-06-29 中国工商银行股份有限公司 Operation processing method, device and system based on block chain
CN114666334A (en) * 2022-04-28 2022-06-24 深圳嘉业产业发展有限公司 Node management method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932175A (en) * 2012-10-29 2013-02-13 华为技术有限公司 Node partition dividing method, device and server
CN106899680A (en) * 2017-03-09 2017-06-27 上海亿账通区块链科技有限公司 The burst treating method and apparatus of multi-tiling chain
CN107832139A (en) * 2017-09-26 2018-03-23 上海点融信息科技有限责任公司 For the method, apparatus and system for the computing resource for managing block chain link point
WO2018104276A1 (en) * 2016-12-08 2018-06-14 Bundesdruckerei Gmbh Master blockchain
CN108769264A (en) * 2018-07-09 2018-11-06 中国联合网络通信集团有限公司 A kind of block chain divides domain method
CN108847925A (en) * 2018-06-20 2018-11-20 深圳大学 A kind of fragment block chain generation method based on tree

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932175A (en) * 2012-10-29 2013-02-13 华为技术有限公司 Node partition dividing method, device and server
WO2018104276A1 (en) * 2016-12-08 2018-06-14 Bundesdruckerei Gmbh Master blockchain
CN106899680A (en) * 2017-03-09 2017-06-27 上海亿账通区块链科技有限公司 The burst treating method and apparatus of multi-tiling chain
CN107832139A (en) * 2017-09-26 2018-03-23 上海点融信息科技有限责任公司 For the method, apparatus and system for the computing resource for managing block chain link point
CN108847925A (en) * 2018-06-20 2018-11-20 深圳大学 A kind of fragment block chain generation method based on tree
CN108769264A (en) * 2018-07-09 2018-11-06 中国联合网络通信集团有限公司 A kind of block chain divides domain method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111629046A (en) * 2020-05-22 2020-09-04 中国联合网络通信集团有限公司 Edge computing collaboration method, edge computing device and terminal
CN113055453A (en) * 2021-03-09 2021-06-29 中国工商银行股份有限公司 Operation processing method, device and system based on block chain
CN114666334A (en) * 2022-04-28 2022-06-24 深圳嘉业产业发展有限公司 Node management method and system
CN114666334B (en) * 2022-04-28 2024-01-26 深圳嘉业共创供应链管理有限公司 Node management method and system

Similar Documents

Publication Publication Date Title
CN107332876B (en) Method and device for synchronizing state of blockchain
CN111935315B (en) Block synchronization method and device
CN110661636B (en) Method, apparatus and system for obtaining network slices
EP3242437B1 (en) Light-weight key update mechanism with blacklisting based on secret sharing algorithm in wireless sensor networks
CN110958324B (en) Data processing method and device of block chain network
CN110166565A (en) Block chain divides domain triggering method and system
CN109756566B (en) Block chain based data storage method, related equipment and storage medium
CN109361625B (en) Method, device and controller for checking forwarding table item
CN103327075A (en) Distributed mass organization realizing method based on label interaction
CN109885423B (en) Block chain source data backup method
CN108768749A (en) A kind of node isolation self-recovery method and device based on block chain
CN110324166B (en) A method, device and system for synchronizing target information in multiple nodes
CN105207908B (en) A kind of message processing method and system
CN110149221B (en) Self-adaptive network construction method and device based on alliance chain
JP2023108058A5 (en) Communication methods and networking systems
CN106331152A (en) A method and device for realizing information synchronization between modules
US11070303B2 (en) Management message loop detection in precision time protocol
CN110879774B (en) Network element performance data alarming method and device
CN109857805B (en) Block chain based data storage method, related equipment and storage medium
CN102647424B (en) Data transmission method and data transmission device
CN112165371B (en) Method, medium, equipment and device for BIER automatic configuration management (BSL)
CN108063808A (en) A kind of acquisition methods of business, device, storage medium and computer equipment
CN112751895B (en) Communication connection keep-alive method and system thereof
CN114008990B (en) Method, node and system in a communication network
CN110417897A (en) A blockchain sub-domain triggering method, blockchain node device and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190823