CN113452801B - Trusted node selection optimization method for block transmission in block chain network - Google Patents

Trusted node selection optimization method for block transmission in block chain network Download PDF

Info

Publication number
CN113452801B
CN113452801B CN202111017884.8A CN202111017884A CN113452801B CN 113452801 B CN113452801 B CN 113452801B CN 202111017884 A CN202111017884 A CN 202111017884A CN 113452801 B CN113452801 B CN 113452801B
Authority
CN
China
Prior art keywords
node
block
value
transmission
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111017884.8A
Other languages
Chinese (zh)
Other versions
CN113452801A (en
Inventor
张佩云
束俊良
刘梓杰
蔡松健
陈芳剑
谢杰敏
黄文君
陈禹同
张茂凯
谢荣见
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Luoyi Information Technology Co.,Ltd.
Original Assignee
Shanghai Luoyi Information Technology 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 Shanghai Luoyi Information Technology Co ltd filed Critical Shanghai Luoyi Information Technology Co ltd
Priority to CN202111017884.8A priority Critical patent/CN113452801B/en
Publication of CN113452801A publication Critical patent/CN113452801A/en
Application granted granted Critical
Publication of CN113452801B publication Critical patent/CN113452801B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/1044Group management mechanisms 
    • 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
    • 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/1044Group management mechanisms 
    • H04L67/1048Departure or maintenance mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a block transmission-oriented credible node selection optimization method in a blockchain network, which aims to improve the safety and transmission rate of block transmission in the blockchain network, provides a block transmission-oriented credible node selection optimization model, analyzes the influence of node distance and connectivity on block synchronization time, introduces a trust value to node behaviors (such as transmission and verification blocks), classifies the block receiving and transmitting states of nodes in order to reduce transmission redundancy and communication cost, and designs the model by combining the node states. Based on the model, an improved PageRank (PR) algorithm is designed to calculate a comprehensive PR value of the node, and an optimal node set is selected according to the comprehensive PR value of the node. The method designed by the invention has advantages in block synchronization time, block transmission time and block transmission success rate.

Description

Trusted node selection optimization method for block transmission in block chain network
Technical Field
The invention relates to a block transmission-oriented trusted node selection optimization method in a block chain network, belonging to the field of node selection in block transmission.
Background
At present, in order to reduce the probability of occurrence of block chain bifurcation, many scholars reduce verification time from the perspective of a consensus layer and introduce an incentive mode to improve the participation of nodes, and also improve network layer transmission performance from the aspects of network transmission time, network communication cost, network topology and the like. In the block transmission problem, node selection is a key factor. The number of block chain network external connections is 8 and the number of internal connection nodes reaches 125, so that selecting different external connection nodes makes the block transmission to the whole network faster. While raising the transmission rate problem, security is also easily overlooked. If the safety problem is not taken into consideration, the false node not only can send false block information to cause chaotic node transmission, increase the communication congestion of normal nodes and cause great delay to the transmission of the reasonable blocks, but also can provide a convenient channel for the malicious node to intentionally improve the probability of the branching blocks. Typical examples are: in the Sybil attack, in a peer-to-peer network, because nodes can maliciously increase redundant information by controlling a part of nodes according to a plurality of identifiers of the nodes, and impact backup information of the nodes of the network, normal communication congestion is caused, and the block verification speed among the nodes is influenced.
In an unlicensed chain network, a transmission node is randomly selected for block transmission, and the problems of low node communication rate, insufficient security and the like exist. In order to improve the security and transmission rate of block transmission in a blockchain network, a block transmission-oriented trusted node selection optimization model needs to be provided.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the method comprises the steps of analyzing the influence of node distance and connectivity on block synchronization time, introducing trust values into node behaviors (such as transmission and verification blocks), classifying block receiving and transmission states of the nodes, and selecting an optimal node for block transmission based on a node comprehensive PR value.
The invention adopts the following technical scheme for solving the technical problems:
a block transmission-oriented trusted node selection optimization method in a block chain network comprises the following steps:
step 1, when a node in a block chain network receives a block, updating the node state in the block chain network by using a node updating algorithm to obtain an unreceived block node set, a received block node set and a non-transmission block node set;
step 2, if a new node is added into the block chain network within a set time, updating the node state in the block chain network again by using a node updating algorithm to obtain an unreceived block node set; otherwise, entering step 3;
and 3, selecting an optimal node set from the node sets which do not receive the block node set by adopting a node selection optimization algorithm facing block transmission, transmitting the block to the node in the optimal node set by the node which receives the block and verifies the block, and putting the node in the optimal node set into the received block node set.
The node updating algorithm specifically comprises the following steps:
1) when a node in the block chain network receives a block, initializing node information in the network, and simultaneously, sending the node receiving the block to the node not receiving the blockINVA message;
2) when nodeiReceives its neighbor nodejTransmitted byINVWhen a message is sent, willINVThe message is forwarded to the neighbor node which does not receive the block, and a reply message sent by the neighbor node which does not receive the block is received;
3) if at the set timeT r Inner, nodeiThe neighbor node which does not receive the reply message, i.e. does not receive the block, does not reply the message, or the time when the neighbor node which does not receive the block sends the reply messageT init ExceedT r If the nodes are not received, the neighbor nodes which do not receive the blocks are considered to leave the network, and the nodes are deleted from the node set which does not receive the blocks;
4) if nodeiIf the received reply message comes from a new node, the new node is put into the node set of the non-received blocks, and if the node comes from the node set of the non-received blocks, the node set of the non-received blocks is put into the node set of the non-received blocksiIf the received reply message comes from the received block node, the received block node is put into the received block node set;
5) and judging whether the nodes in the unreceived block node set obtained by the steps 3) and 4) are online, if not, deleting the nodes which are not online to obtain the final unreceived block node set.
The block transmission-oriented node selection optimization algorithm specifically comprises the following steps:
1) for the nodes which do not receive the block node set, calculating the transmission rate PR value and the trust PR value of the nodes;
2) setting a credible threshold, if the credible PR value of the node is greater than or equal to the credible threshold, judging the node as a credible node, and entering the next step, otherwise, putting the node into a malicious node set;
3) and calculating a comprehensive PR value of the node according to the transmission rate PR value and the trust PR value of the node, setting a transmission threshold value, and if the comprehensive PR value of the node is greater than or equal to the transmission threshold value, putting the node into an optimal node set.
Compared with the prior art, the invention adopting the technical scheme has the following technical effects:
1. the invention analyzes two influencing factors in block transmission: transmission rate and security to improve the block transmission rate and trustworthiness of the node. On one hand, the transmission rate is to ensure that the node quickly transmits the block to the neighbor node after receiving and verifying the block. On the other hand, from the perspective of security, the credibility of the node is evaluated according to the values of node behaviors (such as a transmission behavior trust value and a verification behavior trust value), and the node is ensured to transmit and verify block information.
2. The invention applies the PageRank algorithm to the calculation of the transmission rate and the trust value of the node block, improves the PageRank algorithm by introducing the current transmission time value in order to reduce the problem of rapid convergence of the PageRank during block transmission, and has the advantage of rapidly calculating the PR value of the node.
3. In order to reduce the problem of redundancy in transmission, the invention classifies the states of the nodes receiving the transmission blocks, and provides a node selection optimization algorithm facing block transmission based on the comprehensive PR value of the neighbor nodes, thereby reducing the problem of redundancy in block transmission.
Drawings
Fig. 1 is a block transmission oriented trusted node selection model of the present invention.
FIG. 2 is a diagram of trust value relationships of the present invention.
Fig. 3 is an overall architecture diagram of a block transmission-oriented trusted node selection optimization method in a block chain network according to the present invention.
Fig. 4 is a block synchronization time variation CDF diagram under the same node.
Fig. 5 is a synchronization time diagram for different node numbers.
Fig. 6 is a block transmission time scenario in different cycles.
Fig. 7(a) -7 (c) are degree distributions of nodes, where fig. 7(a) is the degree distribution graph, fig. 7(b) is the in-degree distribution graph, and fig. 7(c) is the out-degree distribution graph.
Fig. 8 is a relationship between node degree and transmission time.
Fig. 9 is malicious node rate and block transmission success rate.
Fig. 10 is a multiple simulation versus block successful transmission rate.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
The block transmission oriented trusted node selection model in the block chain network designed by the invention is shown in fig. 1, and represents that the states of the received transmission blocks of the nodes are classified, then the comprehensive PR value of the nodes including the transmission rate PR value and the trusted PR value of the nodes is calculated, and finally the optimal node transmission block is selected according to the comprehensive PR value of the nodes. Taking a block chain P2P network as an undirected graphG(V, E) WhereinVA set of nodes is represented that is,
Figure DEST_PATH_IMAGE001
representing a set of edges between nodes. Wherein the content of the first and second substances,N=|V|represents the number of nodes in the blockchain network,M=|Eand | represents the number of edges between nodes.
1. The transmission rate PR value of a node is calculated as follows:
the transmission rate is determined by the connectivity of the nodes and the distance between the nodes. Order nodeiRespectively have an in-degree and an out-degree of
Figure 288845DEST_PATH_IMAGE002
And
Figure DEST_PATH_IMAGE003
then nodeiOccupied node in external linkiTotal specific gravityk i As shown in formula (1):
Figure 815773DEST_PATH_IMAGE004
(1)
in the formula (1), the reaction mixture is,Krepresenting nodesiNumber of neighbor nodes.
And (3) calculating the Euclidean distance between the nodes, as shown in the formula (2):
Figure DEST_PATH_IMAGE005
(2)
in the formula (2)D ij Representing nodesiAnd nodejDistance, node ofiAndjrespectively is (a)x i , y i ) And (a)x j , y j )。
Formula (3) computing nodeiTransmission rate ofP i
Figure 936788DEST_PATH_IMAGE006
(3)
In the formula (3), the reaction mixture is,
Figure DEST_PATH_IMAGE007
representing a fixed speed of channel transmission between nodes.
Node pointiIn thattTransmission rate PR value at time (f)
Figure 676205DEST_PATH_IMAGE008
) As shown in formula (4):
Figure DEST_PATH_IMAGE009
(4)
in the formula (4), the reaction mixture is,
Figure 834785DEST_PATH_IMAGE010
as damping coefficient, nodal point
Figure DEST_PATH_IMAGE011
Is a nodeiThe neighbor nodes of (a) are,
Figure 250723DEST_PATH_IMAGE012
denoted as neighbor nodesjThe transmission rate of (c).
2. The trusted PR value for a node is calculated as follows:
the trust values include:
trust PR value: representing a trusted PR value that is considered in combination with aspects of node transmission and verification.
Verifying the behavior trust value: the representation of the verification behavior is represented by the verification time of a block received by the node, which is determined by how much time the node needs to verify the block information.
Transmission behavior trust value: the transmission behavior is represented by the fact that the node transmission blocks are transmitted to the neighbor nodes and determined by the number of the transmission blocks among the nodes.
Historical trust value: representing the average of the previous historical trust values.
Current trust value: representing the trust value of the current node.
Direct trust value: and the direct trust value is related to the online time of the node.
Indirect trust value: and the representation neighbor node calculates the trust value of the node.
The relationship between the trust values is shown in fig. 2, and the trust values in fig. 2 are calculated in the order from right to left as follows:
1) node pointiIn thattDirect trust value of a moment
Figure DEST_PATH_IMAGE013
Figure 127543DEST_PATH_IMAGE014
(5)
The direct trust value represents the trust value of the node, and the direct trust value is related to the online time of the node, which takes the stability influence of the online time of the node on the whole network into consideration. In the formula (5), the reaction mixture is,Y i representing nodesiThe current time of the on-line time,X i representing nodesiThe last departure time of.
2) Node pointiIn thattIndirect trust value of time of day
Figure DEST_PATH_IMAGE015
Figure 667721DEST_PATH_IMAGE016
(6)
In the formula (6), the reaction mixture is,
Figure DEST_PATH_IMAGE017
representing nodesjTo pairiBecause the online time of the nodes has great difference, the direct trust values of the nodes have great difference, and therefore the influence of the online number of the neighbor nodes on the trust values of the nodes is better shown. The concrete formula is shown as (7):
Figure 133338DEST_PATH_IMAGE018
(7)
3) node pointiIn thattHistorical trust value of time of day
Figure DEST_PATH_IMAGE019
Figure 2068DEST_PATH_IMAGE020
(8)
In the formula (8), the reaction mixture is,
Figure DEST_PATH_IMAGE021
to representAt the present moment in time, the time of day,Urepresenting nodesiThe total number of blocks received is,
Figure 366184DEST_PATH_IMAGE022
representing nodesiIn thattThe number of successful transmissions at the moment in time,
Figure 368775DEST_PATH_IMAGE022
the method specifically comprises the following steps:
Figure DEST_PATH_IMAGE023
(9)
4) node pointiIn thattCurrent trust value of time of day
Figure 236368DEST_PATH_IMAGE024
Figure DEST_PATH_IMAGE025
(10)
The compound of the formula (10),
Figure 7491DEST_PATH_IMAGE013
and
Figure 780274DEST_PATH_IMAGE015
from the formulae (6) and (7),
Figure 134027DEST_PATH_IMAGE026
is a coefficient, the value range is between (0,1),Kis a nodeiNumber of neighbor nodes.
5) Node pointiIn thattTemporal transmission behavior trust value
Figure DEST_PATH_IMAGE027
Figure 574235DEST_PATH_IMAGE028
(11)
In the formula (11),λ 1andλ 2respectively represent the current trust value coefficient and the historical trust value coefficient, andλ 1+λ 2=1。
6) node pointiIn thattVerification behavior trust value of time of day
Figure DEST_PATH_IMAGE029
Figure 253609DEST_PATH_IMAGE030
(12)
In the formula (12), the reaction mixture is,
Figure DEST_PATH_IMAGE031
the node verification coefficients are represented by the node verification coefficients,Bis the size of the block or blocks,Cis the power of the CPU and is,B/Cthe proportion of processing blocks in the CPU resource of the node is adopted.
7) Node pointiIn thattTrusted PR value of time of day
Figure 592318DEST_PATH_IMAGE032
Figure DEST_PATH_IMAGE033
(13)
In the formula (13), the reaction mixture is,
Figure 264608DEST_PATH_IMAGE034
as damping coefficient, nodal point
Figure 799405DEST_PATH_IMAGE011
Is a nodeiThe neighbor nodes of (a) are,
Figure DEST_PATH_IMAGE035
representing neighbor nodesjThe transmission of the behavior trust value of (c),
Figure 649680DEST_PATH_IMAGE036
denoted as neighbor nodesjVerifying the behavioral trust value.
3. The invention selects nodes by combining the transmission rate and the trust value, and calculates the parameters of the two parties in (0,1) by adopting a sigmoid normalization method. Firstly, normalizing the transmission rate PR value, specifically:
Figure DEST_PATH_IMAGE037
(14)
in the formula (14), the compound represented by the formula (I),
Figure 285804DEST_PATH_IMAGE038
is shown intTime nodeiThe transmission rate PR value of (a) is normalized. Next, the confidence PR value is normalized, as shown in equation (15):
Figure DEST_PATH_IMAGE039
(15)
in the formula (15), the reaction mixture is,
Figure 778097DEST_PATH_IMAGE040
is shown intTime nodeiNormalized by the trusted PR value.
The comprehensive PR value of the calculation node is shown as the formula (16):
Figure DEST_PATH_IMAGE041
(16)
in the formula (16), the compound represented by the formula,
Figure 724056DEST_PATH_IMAGE042
is shown intNode of timeiThe PR values are integrated to obtain the total PR value,
Figure DEST_PATH_IMAGE043
and
Figure 10812DEST_PATH_IMAGE044
respectively representing a transmission rate weight and a trust value weight of the node.
In order to know the node transmission block information more intuitively and conveniently, the invention establishes a transmission information table at each node. The specific information of the table is < serial number, < neighbor node address, < neighbor node state, < trust PR value, < transmission rate PR value >. When the node receives the block information, the state information of the neighbor node is inquired firstly, then the ACK information is sent to the node which does not receive the block state, and the comprehensive PR value of the neighbor node is calculated through the returned trust value and the transmission rate.
4. Due to the relation of receiving transmission blocks among nodes, the transmission state change of the nodes can be influenced. The Profile-Threshold model established by the method is used for receiving any information in a mode of combining active mode and passive mode, wherein the passive mode means that the node receives the information as long as the neighbor node sends the received information, and therefore the passive mode does not identify the information. Active reception means that when the number of neighbor nodes receiving the message reaches a certain threshold, the node receives the message. This model functions to determine whether information is received by incorporating the recognition common to neighbors. However, the model has some disadvantages: firstly, when considering whether the node receives the sent message, the model only identifies the credibility of the message through the mutual recognition of the neighbors, and does not detect the credibility of the node. Secondly, the model receives information in an active-passive combined mode, and whether the information is received or not is determined by setting a random value.
Therefore, the credibility of the nodes is detected by setting the credibility threshold, the optimal nodes are selected by setting the transmission threshold, and the model has the following assumptions:
a assumes the node is in [ 2 ]ttt]The total number of nodes does not occur within a time, i.e. the number of joins and the number of exits of nodes are equal.
b assumes that the node's state transition during the block transmission process occurs in units of time.
c assume that a node can only transmit one block after receiving the block, i.e., a node cannot upload and download blocks at the same time.
To simulate a node's receive transport block state change, the node states are classified as follows:
non-received block status: indicating that the node is in a state of not receiving the block in the network;
received block status: indicating that once a node receives block information of a neighbor node, a node in a received block state generally transmits a block to a node which does not receive the block state;
non-transport block status: indicating that the node has received the block but does not transmit the block and becomes a non-transmission block state, the normal node may be the cause of the own bandwidth or a malicious node without transmitting the block.
The node remains in all three states for a time interval.
Setting a trusted threshold to determine a nodejWhether to transmit blocks to neighboring nodesi. As long as the nodejReceiving neighbor nodeiRequest block information by analyzing nodesjWhether the trust PR value of (1) reaches a credible threshold value, and if the trust PR value reaches the credible threshold value, indicating that the node reaches the nodeiAnd the block transmission is trusted, otherwise, the block transmission is marked as a malicious node. Setting the transmission threshold value is to select an optimal node in consideration of transmission rate and security, and if the transmission threshold value is reached, the node is representediIs optimal in transmission rate and security.
5. The algorithm for node selection optimization for block transmission is shown in fig. 3. The two algorithms called in fig. 3 are: a node update algorithm (algorithm 1) and a block-oriented node selection optimization algorithm (algorithm 2). When a node receives a block of a miner or a neighbor node, the node needs to be detected to judge whether the node is added or withdrawn. If there is a node joining or exiting, then the node update algorithm (Algorithm 1) is executed. Otherwise, a node selection optimization algorithm (algorithm 2) facing block transmission is carried out, and an optimal node set is selected.
Algorithm 1:
Algorithm 1. Node update
Input:W, H, Q,INV,T init ,T r ,node_message,new_message,infection_messge,n i ,n j ,n j* ;
/* Wa set of nodes representing that a block has not been received,Ha set of nodes representing the received block is received,Qa set of nodes representing a block that is not propagated,INVa block signal indicating a notification to a neighbor node,T init a timer is indicated and the time-of-day,T r represents an inter-node transmission time limit value,node_ messageindicating whether the node received the block information and determining whether the node is online,new_messagethe indication is a newly added node information, infection_messageIndicating that the block information has been received,n i representing nodesin j Representing nodesiNeighbor node of (2)jn j* Representing nodesiExcept neighbor nodejIs greater than or equal to
Output:W;
1 int T init ←0;
2 For each n i W /*n i means the node of W*/
3 If n i receive signal INV from n j &&n j H /*n j means the node of H*/
4 send node_messageton j ;
/*node_message include the message of online or unline and the status information of received block or not*/
5 reset T init ; /* set the timer */
6 send signal INV to n j* ; /* sends INV signal to neighbor nodes(n j* ) other than n j */
7 If n i receivenode_messagefromn j* &&T init <T r
8If node_message == new_message /* Determine whether it is a new node*/
9 add n j* to W;
10 Else if node_message == infection_message/* Determine whether it is a received block node*/
11 add n j* to H;
12 delete n j* from W;
13 ElseIF /* Determine whether it is online */
14 updaten j* in W;
15 EndIf
16 Else
17 add n j* to Q;
18 delete n j* from W;
19 EndIf
20 EndIF
21EndFor
22 Return W;
In Algorithm 1, node information is initialized, and when a node is presentn i Receiving neighbor noden j Transmitted byINVMessage, immediately forwarding the message to the neighbor node (except the node from which the message originated) which does not receive the blockn j Step 1-6). Step 5 shows in settingT r Within the time, the time when the node receives the neighbor node reply messageT init . If the message is from a new node, the information of the node needs to be added to the node set of the non-received blocksW(step 7-9). If the received information has received the block node, the node will be savedAdding point information to a received block node setHIn (step 10-12). For nodes that appear online and have not received blocks, the original node set will be updated (steps 13-14). If the node fails to receive the reply information beyond the time, the node leaves the network by default, and the node set is never receivedWDelete the node (steps 16-18) and finally return an updated set of unreceived block nodesW(steps 19 to 22).
Algorithm 2
Algorithm 2. Node selection optimization
Input:W, Ev, θ, ε, B,n i ; /*WA set of nodes representing that no block was received online,Eva set of nodes that are representative of a malicious node,θandεrespectively representing a trusted threshold and a transmission threshold,Bin the form of a block, the number of blocks,n i representing nodesi */
Output:H; /* HNode set x-or representing a received block
1 For each n i Wdo
2 calculate α t i andβ t i Computing nodeiAnd the transfer rate PR value and the trust PR value +
3 If β t i >=θthe/judge node determines whether or not it is trusted
4 M i t = δF i t + τL i t The evaluation node synthesizes the PR value
5 If
Figure DEST_PATH_IMAGE045
the then/optimal node selection
6 If B is verified/Block validation by +
7 send B to n i Sending a block to the node
8 add n i to H; /*Adding nodes to a set of nodes of a received blockHIn*/
9deleten i fromW;
10 Else
11 add n i to EvThe addition node is a malicious node
12 EndIf
13Endfor
14 Return H;
In the algorithm 2, the step 1-2 shows that the block node set is not received, and the trust PR value and the transmission rate PR value of the node are calculated. Step 3, judging whether the node is credible, and when the credible PR value of the node reaches the transmission threshold value
Figure 58533DEST_PATH_IMAGE046
Then the nodal integrated PR value is computed (step 4). When the node optimization value reaches the transmission threshold value
Figure DEST_PATH_IMAGE047
When the received block node verifies the block, the transmission block is sent to the non-received block node, and simultaneouslyn i Adding to a received set of block nodesH(step 5-9). If the trusted PR value does not reach the threshold valueθIndicating that the node is a malicious node (step 9-10). Finally returning the updated received block node setH(Steps 11 to 14).
6. The three indexes of block synchronization time, block transmission time and block transmission success rate in the block chain network are measured, and the superiority of the method is demonstrated by comparing node selection algorithms of Block P2P-EP, BiBingci network and Ethengfang network.
1) Block synchronization time (T g ): the block synchronization time represents the time when the block is finally acknowledged on the chain, as shown in equation (17):
Figure 275888DEST_PATH_IMAGE048
(17)
in the formula (17), the compound represented by the formula (I),T a representing the set of times that the block was received by the node.
2) Inter-node block transmission time: (T ij ): representing neighbor nodesjTransmitting a block to a nodeiAs shown in equation (18):
Figure DEST_PATH_IMAGE049
(18)
in the formula (18), the reaction mixture,T i representing nodesiThe time of receipt of the block is,T j representing neighbor nodesjTime of receipt of INV message (INV is the message sent by the received block node to the non-received block neighbor node).
3) Block transmission success rate: (P b ): the number of successfully received blocks of all nodes is the total number of transmission blocks, as shown in equation (19):
Figure 886474DEST_PATH_IMAGE050
(19)
in the formula (19), the compound represented by the formula (I),Swhich represents the total number of transport blocks,I i representing nodesiThe number of blocks received.
In the block synchronization time measurement, the time performance of different block chain block synchronization is shown by fig. 4 and fig. 5, and fig. 4 shows the variation process of the block synchronization time in the case of 500 by the node, which shows the synchronization trend in the block transmission process by means of the Cumulative Distribution Function (CDF). Fig. 4 generally observes that the method of the present invention allows all nodes to receive block information at the time point of 9s, and Bitcon and Ethereum need to be reached after 10 s. At 9s, the Block P2P-EP can also make all nodes receive the blocks, but in the time period of 4-9s, the block synchronization rate of the invention is obviously higher than that of the Block P2P-EP, because the Block P2P-EP needs to construct a logical topological structure during the block transmission process and carry out the inter-node communication by constructing a transmission tree. The method of the invention selects the optimal node to carry out block transmission based on the actual topological structure, thereby quickening the block synchronization in the block transmission process. The block synchronization time of each block chain system in the first 4s is similar, because the blocks are spread outward from the mining node during the initial transmission process, so that a great difference is not generated during the previous transmission process.
In order to analyze the advantages of the method in the process of increasing the number of nodes, 500, 1000 and 10000 of node numbers are set in an experiment, and fig. 5 shows the difference of synchronization time of different node selection methods in the block transmission process when different node numbers are set. In the node number of 500, the difference of each transmission time is not very large, but the node number is 1000, and it is obvious that Bitcoin, Ethereum, Block P2P-EP and the method of the invention are sequentially reduced in block synchronization time, and the performance is more obvious when the node number is 10000. In fig. 5, bitcoil and Ethereum are large in block synchronization time, which is strongly associated with the transport protocol. In the case of a large number of nodes, the broadcast block transmission method does not consider the transmission capability of each node, and does not measure the effective inter-node distance, which may increase the transmission load of the node. In BlockP2P-EP, the block transmission time is much shorter than the former two because the transmission time can be reduced by constructing a tree transmission structure, but there is no consideration for nodes and transmission channels during block transmission, resulting in that nodes can reduce the transmission rate in the transmission block due to their own transmission capability limit. The method measures the comprehensive PR value of each neighbor node and selects the optimal node transmission block information, so the method has superiority in block synchronization time.
Fig. 6 shows the performance of different blockchain block transmission time, and fig. 6 shows the difference of the selection method of each blockchain node when the number of nodes is 500. Since the online condition of the node is inconsistent in each cycle, 5 cycles are accumulated to calculate the average block transmission time, which more accurately represents the delay condition of the block transmission method. The bitcoil block in fig. 6 has a high transmission time, which does not consider the connection situation between nodes, and only relying on broadcast transmission only increases the delay between nodes. Ethereum reduces the block transmission time compared to Bitcoin, but the total transmission time is still close to 1 s. For blockP2P-EP that was higher than Ethereum in the first 5 cycles, experimental results show that overall blockP2P-EP is superior to the first two in terms of block transfer time. But neighbor node transmission capability is not fully considered in block transmission, which affects inter-node block transmission time. The method of the invention can show very small block transmission time in a plurality of cycles.
The degree distribution situation is crucial to block transmission, in order to observe the degree distribution situation, the total node degree distribution situation is analyzed first, and then the delay condition of the transmission block is analyzed for the nodes under different degree conditions, and fig. 7(a) -7 (c) show the node degree distribution situation: in this case, fig. 7(a) is a total degree distribution, fig. 7(b) is an in-degree distribution, and fig. 7(c) is an out-degree distribution. From the degree profile, the following two important information can be obtained: 1) from the distribution of node degrees, the number of nodes with the degree less than 9 accounts for more than 90% of the total number of nodes, so that the nodes with the degree less than 9 are mainly used in the network. 2) The number of nodes with the degree of entry (exit) less than 9 accounts for 90% of the total number of nodes with the degree of entry (exit), and therefore the nodes with the degree of less than 9 are the main nodes in receiving (transmitting) block information.
Therefore, in the block chain network, the block transmission is mainly that the nodes with the degree less than 9 bear the transmission block information. In order to analyze the transmission time under different degrees, node degrees 2, 4, 8 and 16 are respectively set, specifically as shown in fig. 8, when the node degree is 2, the difference of block transmission time generated by each node selection method is not very large, because all node selection methods depend on neighbor nodes for block transmission, when the node degree is limited, the whole block synchronization process is also difficult. When the node degree is increased to 4, the block transmission time of each node selection method is obviously different. First, the block transmission time of Bitcoin is still high compared to others, but it is already much lower compared to 2. Second, Ethereum and BlockP2P-EP are not very different because both lack consideration for node transport block information. Finally, the inventive method is minimal in block transfer time, since nodes with faster transfers and higher trust values are selected in block synchronization. Next, when the node degree is 8, only the method of the present invention significantly reduces the block transmission time, which benefits from considering the transmission time between nodes when establishing the model, and by avoiding nodes with high delay and low transmission force, the synchronization speed of the block can be increased and the transmission time can be reduced. When the node degree is 16, the block transmission time of each transmission method is not obvious because the delay time is already low, but the advantages of the method of the present invention can be seen.
Fig. 9 and 10 show the influence of malicious node rates of different node selection methods on the block transmission success rate. Fig. 9 shows the variation of the block transmission success rate for different node selection methods in the case of different malicious node rates. In terms of the malicious node rate, the parameters are set to be 0.1, 0.2, 0.3 and 0.4, and the total number of nodes is 500. And observing the change rule of successful block transmission through the malicious node rate to obtain the influence of the malicious node on the block transmission. Fig. 9 shows that as the number of malicious nodes increases, the block success transmission rate also tends to decrease. Firstly, the method of the invention obviously reduces the success rate of block transmission with the increase of the malicious nodes, which is the reason that the malicious nodes obstruct the block transmission by not transmitting block information and not acting as equal behaviors to block verification, but compared with other node selection methods, the method of the invention has the minimum rate of reduction of the success rate of block transmission. Secondly, BlockP2P-EP performs slightly lower than the method of the present invention in the block transmission success rate, which is that the node selection method lacks consideration for the verification behavior of the block and also does not detect the block transmission behavior. Bitjoin and Ethereum are poor in malicious node rate between 0.3 and 0.4, and when the malicious node rate reaches 40%, the malicious node rate and the Ethereum do not have specific malicious node detection behaviors, so that the block transmission success rate is greatly reduced.
In order to test the change trend of the block transmission success rate of each node selection method under the condition of a fixed malicious node rate. When the malicious node rate is 0.3, fig. 10 shows the block successful transmission rate variation process in multiple measurements, and it can be seen that the block transmission success rate increases with the increase of the simulation times, because the number of node transmission blocks increases with the increase of the simulation times under the condition that the malicious node rate remains unchanged, and the block transmission success also presents an increasing trend. It is observed from fig. 10 that the node selection method of the present invention is excellent in terms of successful block transmission rate, because the trust and transmission rate of the node are considered in the block transmission process, and the optimal node is selected to transmit the block information. While BlockP2P-EP lacks consideration of blocks in node trust and does not make a valid measure of the ability of a node to transport blocks. Under the condition that the malicious node is kept unchanged, the success rate of block transmission is limited to a certain extent. Since bitcoil and Ethereum do not consider a trusted node, the block transfer success rate shows a slowly increasing trend.
The above embodiments are only for illustrating the technical idea of the present invention, and the protection scope of the present invention is not limited thereby, and any modifications made on the basis of the technical scheme according to the technical idea of the present invention fall within the protection scope of the present invention.

Claims (1)

1. A block transmission-oriented trusted node selection optimization method in a block chain network is characterized by comprising the following steps:
step 1, when a node in a block chain network receives a block, updating the node state in the block chain network by using a node updating algorithm to obtain an unreceived block node set, a received block node set and a non-transmission block node set;
the node updating algorithm is specifically as follows:
1) when a node in the block chain network receives a block, initializing node information in the network, and simultaneously, sending an INV message to a node which does not receive the block by the node which receives the block;
2) when the node i receives the INV message sent by the neighbor node j, the INV message is forwarded to the neighbor node which does not receive the block, and the reply message sent by the neighbor node which does not receive the block is received;
3) if at the set time TrIn the method, the node i does not receive the reply message, namely the neighbor node which does not receive the block does not reply the message, or the time T of the neighbor node which does not receive the block to send the reply messageinitExceeds TrThen, these are considered not to be collectedThe neighbor nodes to the block leave the network, and the nodes are deleted from the node set which never receives the block;
4) if the reply message received by the node i is from a new node, the new node is put into the non-received block node set, and if the reply message received by the node i is from the received block node, the received block node is put into the received block node set;
5) judging whether the nodes in the unreceived block node set obtained by the steps 3) and 4) are online or not, if not, deleting the nodes which are not online to obtain a final unreceived block node set;
step 2, if a new node is added into the block chain network within a set time, updating the node state in the block chain network again by using a node updating algorithm to obtain an unreceived block node set; otherwise, entering step 3;
step 3, for node sets which do not receive the blocks, adopting a node selection optimization algorithm facing block transmission to select an optimal node set, transmitting the blocks to nodes in the optimal node set by the nodes which receive the blocks and verify the blocks, and putting the nodes in the optimal node set into the node set which has received the blocks;
the block transmission-oriented node selection optimization algorithm specifically comprises the following steps:
1) for the nodes which do not receive the block node set, calculating the transmission rate PR value and the trust PR value of the nodes;
the calculation process of the transmission rate PR value is as follows:
let the in-degree and out-degree of node i be ki inAnd ki outIf so, the proportion k of the total degree of the node i in the external link of the node ii
Figure FDA0003312129910000021
Wherein K represents the number of neighbor nodes of the node i;
calculating Euclidean distance between nodes:
Figure FDA0003312129910000022
wherein D isijRepresents the distance between a node i and a neighbor node j, and the coordinates of the nodes i and j are respectively (x)i,yi) And (x)j,yj);
Calculating the transmission rate P of the node ii
Figure FDA0003312129910000023
Wherein η represents a fixed speed of inter-node channel transmission;
the transmission rate PR value of the node i at the moment t
Figure FDA0003312129910000024
Comprises the following steps:
Figure FDA0003312129910000025
wherein d is a damping coefficient, d belongs to (0,1), N is the total number of nodes in the block chain network,
Figure FDA0003312129910000026
denotes the transmission rate PR value, P, of the neighboring node j at time tjRepresenting the transmission rate of the neighbor node j;
the trusted PR value is calculated as follows:
1) calculating direct trust value v of node i at time ti t
Figure FDA0003312129910000028
Wherein, YiRepresenting the current online time, X, of node iiRepresents the last departure time of node i;
2) computingIndirect trust value upsilon of node i at time ti t
Figure FDA00033121299100000210
Wherein q isij tRepresenting the direct trust value of node j to i; and is
Figure FDA00033121299100000211
3) Calculating historical trust value p of node i at time ti t
Figure FDA0003312129910000031
Wherein, Ti *Represents the current time, U represents the total number of blocks received by node i, Ui tIndicating the number of successes transmitted by node i at time t,
Figure FDA0003312129910000032
the method specifically comprises the following steps:
Figure FDA0003312129910000033
4) calculating the current trust value q of the node i at the time ti t
Figure FDA0003312129910000034
Wherein, the delta is a coefficient and the value range is between (0, 1);
5) calculating the transmission behavior trust value r of the node i at the time ti t
Figure FDA0003312129910000035
Wherein λ is1And λ2Respectively representing a current confidence value coefficient and a historical confidence value coefficient, and12=1;
6) calculating the verification behavior trust value h of the node i at the time ti t
Figure FDA0003312129910000036
Wherein xi represents a node verification coefficient, xi is an element (0,1), B is the size of a block, C is the CPU power, and B/C is the proportion of a processing block to the node CPU resource;
7) computing the trusted PR value of node i at time t
Figure FDA0003312129910000037
Figure FDA0003312129910000038
Wherein the content of the first and second substances,
Figure FDA0003312129910000039
represents the trusted PR value, r, of the neighbor node jj tRepresents the transmission behavior trust value of the neighbor node j, hj tExpressed as the verification behavior trust value of the neighbor node j;
2) setting a credible threshold, if the credible PR value of the node is greater than or equal to the credible threshold, judging the node as a credible node, and entering the next step, otherwise, putting the node into a malicious node set;
3) calculating a comprehensive PR value of the node according to the transmission rate PR value and the trust PR value of the node, setting a transmission threshold value, and if the comprehensive PR value of the node is greater than or equal to the transmission threshold value, putting the node into an optimal node set;
the node comprehensive PR value is specifically as follows:
Figure FDA00033121299100000310
wherein M isi tDenotes the integrated PR value of node i at time t, sigma and tau denote the transmission rate weight and trust value weight of node respectively, Fi t
Figure FDA0003312129910000041
Respectively representing the normalization of a transmission rate PR value and a trust PR value of a node i at the moment t; and:
Figure FDA0003312129910000042
Figure FDA0003312129910000043
wherein the content of the first and second substances,
Figure FDA0003312129910000044
representing the value of the transmission rate PR at time t for node i,
Figure FDA0003312129910000045
representing the trusted PR value of node i at time t.
CN202111017884.8A 2021-09-01 2021-09-01 Trusted node selection optimization method for block transmission in block chain network Active CN113452801B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111017884.8A CN113452801B (en) 2021-09-01 2021-09-01 Trusted node selection optimization method for block transmission in block chain network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111017884.8A CN113452801B (en) 2021-09-01 2021-09-01 Trusted node selection optimization method for block transmission in block chain network

Publications (2)

Publication Number Publication Date
CN113452801A CN113452801A (en) 2021-09-28
CN113452801B true CN113452801B (en) 2022-02-25

Family

ID=77819274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111017884.8A Active CN113452801B (en) 2021-09-01 2021-09-01 Trusted node selection optimization method for block transmission in block chain network

Country Status (1)

Country Link
CN (1) CN113452801B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117675669B (en) * 2024-01-29 2024-05-14 南京信息工程大学 Inter-cluster block transmission method, storage medium and computing device
CN117687578B (en) * 2024-02-01 2024-04-16 南京信息工程大学 Block collaborative storage method, medium and device based on dynamic clustering in block chain

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019236471A1 (en) * 2018-06-04 2019-12-12 Coral Protocol Decentralized safeguard against fraud
AU2019305079A1 (en) * 2018-07-20 2021-03-11 Strong Force TX Portfolio 2018, LLC Blockchain transaction safety using smart contracts
CN110519246B (en) * 2019-08-15 2021-09-28 安徽师范大学 Trust degree calculation method based on trust block chain node
CN112118138B (en) * 2020-09-18 2023-06-23 上海计算机软件技术开发中心 System and method for realizing block chain consensus mechanism

Also Published As

Publication number Publication date
CN113452801A (en) 2021-09-28

Similar Documents

Publication Publication Date Title
CN113452801B (en) Trusted node selection optimization method for block transmission in block chain network
CN112202928B (en) Credible unloading cooperative node selection system and method for sensing edge cloud block chain network
Khan et al. ETERS: A comprehensive energy aware trust-based efficient routing scheme for adversarial WSNs
Wang et al. A light-weight trust-based QoS routing algorithm for ad hoc networks
CN104618908B (en) The method and apparatus that distributed cognition wireless network is attacked anti-distort perception data
CN109257750B (en) Intrusion detection method of multi-protocol layer based on trust and noise point detection technology
CN109756515A (en) Black hole attack detection and method for tracing based on suspicious degree accumulation
CN107294851B (en) A kind of router level network topology estimating method
Stelte et al. Secure trust reputation with multi-criteria decision making for wireless sensor networks data aggregation
CN110300094B (en) Data node credibility evaluation method, device, equipment and storage medium
Wang et al. A framework for intrusion detection systems by social network analysis methods in ad hoc networks
CN104410646A (en) Data forwarding method with black hole attack detection function
CN106332131B (en) A kind of clone&#39;s nodal test method and system of wireless sensor network
Yang et al. DS evidence theory based trust detection scheme in wireless sensor networks
Zhang et al. Dynamic double threshold spectrum sensing algorithm based on block chain
Hajiee et al. Trust-based routing optimization using multi-ant colonies in wireless sensor network
KR20220169584A (en) METHOD FOR SELECTING IoT OPTIMIZATION NODES AND REMOVING MALICIOUS NODES
Yuan A Secure Routing Protocol for Wireless Sensor Energy Network Based on Trust Management
Subramanian et al. HTmRPL++: a trust-aware RPL routing protocol for fog enabled Internet of Things
Shabut et al. Malicious insider threats in tactical MANET: The performance analysis of DSR routing protocol
Gundluru et al. Soft-Computing Based Trust Management Framework for Group Key Management in MANETs.
Srilakshmi et al. Prevention of attacks in mobile ad hoc network using African buffalo monitoring zone protocol
Karunambiga et al. FUZZY BASED OPTIMIZATION FOR IMPROVING THE TRUST SCORE IN MANETS.
Yin et al. A novel reputation model for malicious node detection in wireless sensor network
Wang et al. An intrusion detection system in ad hoc networks: A social network analysis approach

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
TA01 Transfer of patent application right

Effective date of registration: 20220113

Address after: Room 201-1, building 4, No. 799, Hutai Road, Jing'an District, Shanghai 200040

Applicant after: Shanghai Luoyi Information Technology Co.,Ltd.

Address before: No.219, ningliu Road, Jiangbei new district, Nanjing, Jiangsu Province, 210032

Applicant before: NANJING University OF INFORMATION SCIENCE & TECHNOLOGY

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant