CN113452801A - 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
CN113452801A
CN113452801A CN202111017884.8A CN202111017884A CN113452801A CN 113452801 A CN113452801 A CN 113452801A CN 202111017884 A CN202111017884 A CN 202111017884A CN 113452801 A CN113452801 A CN 113452801A
Authority
CN
China
Prior art keywords
node
block
nodes
value
transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111017884.8A
Other languages
Chinese (zh)
Other versions
CN113452801B (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
Nanjing University of Information Science and Technology
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 Nanjing University of Information Science and Technology filed Critical Nanjing University of Information Science and Technology
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 it is at the time of settingWorkshopT 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 blockchain network designed by the invention is shown in figure 1 and represents the receiving of the node firstlyAnd classifying the states of the transmission blocks, calculating a node comprehensive PR value comprising a transmission rate PR value and a trust PR value of the node, and finally selecting the optimal node transmission block according to the node comprehensive PR value. 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 of the great difference of the online time among the nodes, the direct trust value of the nodes is greatly differentTherefore, the influence of the online number of the neighbor node on the trust value of the node 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
which indicates the current 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). Adding node information to the received block node set if the received block node comes from the received messageHIn (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 return toNew set of received block nodesH(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 (6)

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;
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.
2. The method for selecting and optimizing the trusted node for the block transmission in the blockchain network according to claim 1, wherein the node update 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.
3. The method for selecting and optimizing the trusted node for block transmission in the blockchain network according to claim 1, wherein the block transmission-oriented node selection optimization algorithm is specifically as follows:
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.
4. The method for selecting and optimizing the trusted node facing the block transmission in the blockchain network according to claim 3, wherein the calculation process of the transmission rate PR value is as follows:
order nodeiRespectively have an in-degree and an out-degree of
Figure DEST_PATH_IMAGE002
And
Figure DEST_PATH_IMAGE004
then nodeiOccupied node in external linkiTotal specific gravityk i
Figure DEST_PATH_IMAGE006
Wherein the content of the first and second substances,Krepresenting nodesiThe number of neighbor nodes;
calculating Euclidean distance between nodes:
Figure DEST_PATH_IMAGE008
wherein the content of the first and second substances,D ij representing nodesiAnd neighbor nodesjDistance, node ofiAndjrespectively is (a)x i , y i ) And (a)x j , y j );
Computing nodeiTransmission rate ofP i
Figure DEST_PATH_IMAGE010
Wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE012
represents a fixed speed of channel transmission between nodes;
then the nodeiIn thattTransmission rate PR value at time
Figure DEST_PATH_IMAGE014
Comprises the following steps:
Figure DEST_PATH_IMAGE016
wherein the content of the first and second substances,din order to be a damping coefficient of the damping,
Figure DEST_PATH_IMAGE018
Nfor the total number of nodes in the blockchain network,
Figure DEST_PATH_IMAGE020
representing neighbor nodesjIn thattThe value of the transmission rate PR at a time,
Figure DEST_PATH_IMAGE022
representing neighbor nodesjThe transmission rate of (c).
5. The method for block transmission-oriented selection and optimization of trusted nodes in a blockchain network according to claim 3, wherein the calculation process of the trusted PR value is as follows:
1) computing nodeiIn thattDirect trust value of a moment
Figure DEST_PATH_IMAGE024
Figure DEST_PATH_IMAGE026
Wherein the content of the first and second substances,Y i representing nodesiThe current time of the on-line time,X i representing nodesiThe last departure time of;
2) computing nodeiIn thattIndirect trust value of time of day
Figure DEST_PATH_IMAGE028
Figure DEST_PATH_IMAGE030
Wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE032
representing nodesjTo pairiA direct trust value of; and is
Figure DEST_PATH_IMAGE034
3) Computing nodeiIn thattHistorical trust value of time of day
Figure DEST_PATH_IMAGE036
Figure DEST_PATH_IMAGE038
Wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE040
which indicates the current time of day,Urepresenting nodesiThe total number of blocks received is,
Figure DEST_PATH_IMAGE042
representing nodesiIn thattThe number of successful transmissions at the moment in time,
Figure DEST_PATH_IMAGE042A
the method specifically comprises the following steps:
Figure DEST_PATH_IMAGE044
4) computing nodeiIn thattCurrent trust value of time of day
Figure DEST_PATH_IMAGE046
Figure DEST_PATH_IMAGE048
Wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE050
is a coefficient, the value range is between (0,1),Kis a nodeiThe number of neighbor nodes;
5) computing nodeiIn thattTemporal transmission behavior trust value
Figure DEST_PATH_IMAGE052
Figure DEST_PATH_IMAGE054
Wherein the content of the first and second substances,λ 1andλ 2respectively representing current trust value coefficient and historical trustValue coefficient of, andλ 1+λ 2=1;
6) computing nodeiIn thattVerification behavior trust value of time of day
Figure DEST_PATH_IMAGE056
Figure DEST_PATH_IMAGE058
Wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE060
the node verification coefficients are represented by the node verification coefficients,
Figure DEST_PATH_IMAGE062
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 determined;
7) computing nodeiIn thattTrusted PR value of time of day
Figure DEST_PATH_IMAGE064
Figure DEST_PATH_IMAGE066
Wherein the content of the first and second substances,din order to be a damping coefficient of the damping,
Figure DEST_PATH_IMAGE018A
Nfor the total number of nodes in the blockchain network,Kis a nodeiThe number of the neighbor nodes of (a),
Figure DEST_PATH_IMAGE068
representing neighbor nodesjThe value of the trusted PR of (a) is,
Figure DEST_PATH_IMAGE070
representing neighbor nodesjThe transmission of the behavior trust value of (c),
Figure DEST_PATH_IMAGE072
denoted as neighbor nodesjVerifying the behavioral trust value.
6. The block transmission-oriented trusted node selection optimization method in the blockchain network according to claim 3, wherein the node comprehensive PR value specifically is:
Figure DEST_PATH_IMAGE074
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE076
is shown intNode of timeiThe PR values are integrated to obtain the total PR value,
Figure DEST_PATH_IMAGE078
and
Figure DEST_PATH_IMAGE080
respectively representing a transmission rate weight and a trust value weight of the node,
Figure DEST_PATH_IMAGE082
are respectively shown intTime nodeiNormalizing the transmission rate PR value and the trust PR value; and:
Figure DEST_PATH_IMAGE084
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE014A
representing nodesiIn thattThe value of the transmission rate PR at a time,
Figure DEST_PATH_IMAGE064A
representing nodesiIn thattThe trusted PR value of the moment.
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 true CN113452801A (en) 2021-09-28
CN113452801B 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)

Cited By (3)

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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110519246A (en) * 2019-08-15 2019-11-29 安徽师范大学 Based on the degree of belief calculation method for trusting block chain link point
US20200027089A1 (en) * 2018-07-20 2020-01-23 Coral Protocol Blockchain transaction safety using smart contracts
CN112118138A (en) * 2020-09-18 2020-12-22 上海计算机软件技术开发中心 System and method for implementing block chain consensus mechanism
CN112534774A (en) * 2018-06-04 2021-03-19 珊瑚协议有限公司 Decentralized fraud prevention security

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112534774A (en) * 2018-06-04 2021-03-19 珊瑚协议有限公司 Decentralized fraud prevention security
US20200027089A1 (en) * 2018-07-20 2020-01-23 Coral Protocol Blockchain transaction safety using smart contracts
CN112740252A (en) * 2018-07-20 2021-04-30 珊瑚协议有限公司 Blockchain transaction security using smart contracts
CN110519246A (en) * 2019-08-15 2019-11-29 安徽师范大学 Based on the degree of belief calculation method for trusting block chain link point
CN112118138A (en) * 2020-09-18 2020-12-22 上海计算机软件技术开发中心 System and method for implementing block chain consensus mechanism

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
戴炳荣 等: "基于改进PageRank算法的跨链公证人机制评价模型", 《计算机工程》 *

Cited By (4)

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

Also Published As

Publication number Publication date
CN113452801B (en) 2022-02-25

Similar Documents

Publication Publication Date Title
Wang et al. A light-weight trust-based QoS routing algorithm for ad hoc networks
Khan et al. ETERS: A comprehensive energy aware trust-based efficient routing scheme for adversarial WSNs
CN104618908B (en) The method and apparatus that distributed cognition wireless network is attacked anti-distort perception data
CN113452801B (en) Trusted node selection optimization method for block transmission in block chain network
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
CN110300094B (en) Data node credibility evaluation method, device, equipment and storage medium
Stelte et al. Secure trust reputation with multi-criteria decision making for wireless sensor networks data aggregation
CN104410646A (en) Data forwarding method with black hole attack detection function
Yang et al. DS evidence theory based trust detection scheme in wireless sensor networks
Hajiee et al. Trust-based routing optimization using multi-ant colonies in wireless sensor network
Huang A data-driven WSN security threat analysis model based on cognitive computing
Yuan A Secure Routing Protocol for Wireless Sensor Energy Network Based on Trust Management
Shabut et al. Malicious insider threats in tactical MANET: The performance analysis of DSR routing protocol
Murty et al. Secure and light weight Aodv (SLW-AODV) routing protocol for resilience against blackhole attack in manets
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
Yang et al. DS evidence theory based trust detection scheme in wireless sensor networks
Sangeetha et al. Validation Of Blockchain Transactions In Wireless Sensor Networks Using Dense Neural Networks
Karunambiga et al. FUZZY BASED OPTIMIZATION FOR IMPROVING THE TRUST SCORE IN MANETS.
CN115348554B (en) Trusted data collection method in edge sensor network
CN117319018A (en) Node trust degree assessment method based on D-S evidence theory
CN115001750B (en) Trusted group construction method and system based on trust management in electric power Internet of things
CN115529614A (en) Node trust degree evaluation method based on PBFT consensus algorithm in Ad Hoc network

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
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

GR01 Patent grant
GR01 Patent grant