CN110602705A - Improved PBFT consensus method suitable for Internet of vehicles environment - Google Patents

Improved PBFT consensus method suitable for Internet of vehicles environment Download PDF

Info

Publication number
CN110602705A
CN110602705A CN201910889906.6A CN201910889906A CN110602705A CN 110602705 A CN110602705 A CN 110602705A CN 201910889906 A CN201910889906 A CN 201910889906A CN 110602705 A CN110602705 A CN 110602705A
Authority
CN
China
Prior art keywords
node
nodes
region
area
representative
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
CN201910889906.6A
Other languages
Chinese (zh)
Other versions
CN110602705B (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.)
Zhejiang Shuren University
Original Assignee
Zhejiang Shuren University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Shuren University filed Critical Zhejiang Shuren University
Priority to CN201910889906.6A priority Critical patent/CN110602705B/en
Publication of CN110602705A publication Critical patent/CN110602705A/en
Application granted granted Critical
Publication of CN110602705B publication Critical patent/CN110602705B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • 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/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/009Security arrangements; Authentication; Protecting privacy or anonymity specially adapted for networks, e.g. wireless sensor networks, ad-hoc networks, RFID networks or cloud networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • H04W12/121Wireless intrusion detection systems [WIDS]; Wireless intrusion prevention systems [WIPS]
    • H04W12/122Counter-measures against attacks; Protection against rogue devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security
    • H04W12/63Location-dependent; Proximity-dependent
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security
    • H04W12/66Trust-dependent, e.g. using trust scores or trust relationships
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention relates to an improved PBFT consensus method applicable to a vehicle networking environment, which divides node identities into 4 types and processes the node identities by combining node identity verification and a change mechanism; adopting a node credit reward and punishment mechanism and selecting GMM clustering to distinguish the nodes into different grades, and giving node rights according to the grades; determining area representative nodes by combining the number of different types of nodes in each area and the credit level, voting with different weights according to the node types to determine area representative nodes, and forming spare area representative nodes by selecting nodes; determining a multi-region or region internal consensus mechanism according to the related range of the transaction, wherein the region internal consensus mechanism randomly selects a main node from the nodes with the highest credit level in the region; the multi-zone consensus mechanism comprises a main node group competition building block formed by a plurality of zone representative nodes, and implements a simplified consistency agreement to achieve consensus. The invention can tolerate the invasion attack of a certain number of malicious nodes, effectively eliminates the malicious nodes and reduces the transaction delay.

Description

Improved PBFT consensus method suitable for Internet of vehicles environment
The technical field is as follows:
the invention relates to the field of block chains, in particular to an improved PBFT consensus method suitable for a vehicle networking environment.
Background art:
currently, a new revolution and transformation of technology has been actively developed in the automobile industry, and Vehicles (intelligent networked automobiles, etc.) with Internet of Vehicles (Internet of Vehicles) have become strategic direction and inevitable trend of development. According to the estimation of the Boston consultation group in the United states, the intelligent networked automobile can meet the high-speed development period of about 20 years from 2018, and can occupy about 25% of new automobile markets in the world by 2035 years, the annual sales volume exceeds 3000 thousands, and the industrial scale is predicted to be between 2940 million yuan and 5390 million yuan.
Information safety is one of the core technologies of the internet of vehicles, and has a fundamental role in protecting the intelligent internet of vehicles and guaranteeing intelligent transportation and smart cities. At present, the Internet of vehicles faces security threat problems in communication aspects, such as communication security threat, vehicle-mounted terminal security threat, data security threat and the like, so that security events are frequent and lives and properties of users are damaged. As the nodes in the block chain technology follow the same accounting transaction rule and make a consensus by a consensus method, no centralized hardware or management mechanism exists, and the blocks are generated by adopting a one-way hash algorithm and strictly according to the time sequence, so that the method has the advantages of non-tamper property, encryption safety and the like. Therefore, the block chain technology can be applied to the Internet of vehicles, so that the network security and data security problems of information tampering, information counterfeiting and the like in the Internet of vehicles are solved. The consensus method in the block chain technology is a key for determining whether the block chain can be effectively applied to the field, so that a block consensus method suitable for the car networking environment is urgently needed, and the requirements of preventing the invasion of malicious nodes, realizing short-time transaction delay and the like can be met.
Currently, Castro M et al propose a Practical Byzantine Fault tolerant method (PBFT) that can meet the demand for a short-time response to a transaction. But the method has the problems that the main node selection is easy to be invaded by a malicious node, the expansibility is poor and the like. Therefore, some scholars have introduced credit mechanisms or improved PBFT in terms of master node selection for addressing malicious node intrusion: for example, a credit mechanism is introduced by the slow governing and the like to strengthen the response capability to the malicious nodes, but the credit grade division is simpler and the high-credit nodes are easy to become targets of intrusion; and Wangdwen et al reduce the risk of intrusion through the selection of the master node, but the scope of improvement is mainly limited in the selection of the master node and the designated master node becomes a new main intrusion target.
In addition, for solving the problem of poor PBFT expansibility, partial scholars adopt methods such as partition and fragmentation to improve the PBFT: such as Dianhui M et al, modifies the condition that 2/3 node approval is required for otherwise achieving consensus to require only half of the node approval; minnown et al use a partitioning strategy to partition multiple subject sub-blocks and propose a method of local and global consistency verification to prevent the double overhead problem. Although the method adopts the methods of partition and fragmentation and the like, the expansibility of the original mechanism is improved to a certain extent, but the method does not consider the problems that the area representation is set unreasonably or the node identity is stolen and the like due to a large number of mobile nodes in the network.
Some scholars also aim at solving the problem of poor flexibility of the checkpoint protocol and the view switching protocol of the PBFT, and improve the PBFT by adopting methods such as modifying the operating conditions: for example, the checking point protocol and the view switching protocol are improved by the person in the autumn wave and the like, so that the capability of the original mechanism in the aspects of node storage and error handling is improved to a certain extent, but the expansibility problem is not considered, so that the method cannot be directly applied to the vehicle networking environment with numerous nodes.
In short, the existing PBFT methods are too simple in credit level classification means, the designated master node becomes a new intrusion target, the movement condition of the node is not considered, and the problem of poor expansibility in a checkpoint protocol and a view switching protocol is ignored.
The invention content is as follows:
in view of the defects in the prior art, the invention provides an improved PBFT consensus method suitable for the car networking environment, the node identities are divided according to the movement conditions of the nodes in the network, and malicious nodes can be effectively removed through reasonable node identity verification and the setting of a change mechanism; the right of the malicious node is effectively limited by combining a node credit reward and punishment mechanism, different modes are provided on a region internal node consensus mechanism and a multi-region representative node consensus mechanism, the intrusion risk of the malicious node is reduced, and the purpose of guaranteeing the network information safety of the Internet of vehicles is achieved.
In order to achieve the purpose of the invention, the technical scheme adopted by the invention is as follows:
an improved PBFT consensus method applicable to a vehicle networking environment, comprising:
step 1): the method comprises the following steps that the Internet of vehicles is divided into regions according to a street range of administrative planning and deployment positions of 5G base stations, each region comprises a plurality of 5G base stations, the 5G base stations are used as fixed nodes, all Internet of vehicles nodes are used as new nodes, and node performance score eta, mu and rho parameter thresholds in a reward and punishment mechanism are set;
step 2): the verification groups are formed by each area to perform identity verification on the new nodes and the flow fleeing nodes which frequently move to other areas: if the identity authentication of the new node is successful, the new node is converted into a reserved node which moves in the area where the new node is located and cannot move to other areas, and participates in the consensus of the blocks; if the identity verification of the new node is unsuccessful, stopping the right of the new node to participate in block consensus, and repeatedly verifying the identity of the new node within interval time; if the identity authentication of the flow fleeing node is successful, the flow fleeing node can participate in block consensus, otherwise, the right of the flow fleeing node to participate in the block consensus is stopped, and the identity of the flow fleeing node is repeatedly authenticated within interval time; the flow fleeing nodes can be converted into reservation nodes according to the stay time and the credit level in the current area, and the reservation nodes can be converted into flow fleeing nodes according to the stay time of the reservation nodes in other areas;
step 3): each region executes the performance reward punishment method to calculate the node cumulative score, and converts the cumulative score into a cumulative credit value;
step 4): collecting evaluation elements including active time, offline times, offline time, delay time and current region accumulated time, and performing credit rating division by a GMM clustering method, wherein the credit rating division is as follows: best is 80, good is 70, normal is 60, bad is 40, best is 30;
step 5): and giving the right to the node according to the credit rating classification result of the node: the nodes with best and good grades are endowed with the right to participate in node identity authentication and checkpoint protocol, and have election right and voting right representing candidates; nodes with normal ratings are given the right to participate in checkpoint agreements and voting rights on behalf of candidates; a node with a bad level only has the right to participate in the checkpoint protocol; a node with a worst level has no rights; clearing the accumulated credit value and the accumulated score of the node after the node right is given;
step 6): determining the total number of the candidate nodes represented by the current area according to the total number of the nodes in the current area, and determining the number of the candidate nodes represented by the areas of different types according to the ratio of the number of the nodes of different types in the current area in the total number of the nodes; judging whether each node can become a regional representative node, calculating the score of each node by combining the credit level of the nodes in the current region, classifying according to different types, and selecting the scores in each type from high to low to become regional representative candidate nodes;
step 7): calculating the number of the region representative nodes in the current region, counting the number of votes by adopting different weights, and selecting region representative candidate nodes meeting the number requirement as region representative nodes according to the voting result;
step 8): judging the related range of the transaction according to the transaction information, if the transaction only relates to the local area, considering the transaction information as an internal transaction of the area, otherwise, considering the transaction information as a multi-area transaction; adopting a region internal consensus method to achieve consensus on the region internal affairs, and adopting a multi-region consensus method to achieve consensus on the multi-region affairs; finally jump to step 2).
The verification group in the step 2) is formed in the following way: if the first consensus is started currently, each area randomly selects N1The fixed nodes form a verification group, otherwise, the region representative node randomly selects N in each region2A fixed node and N with a credit rating of good or above3The individual gatekeeper nodes together form a verification group.
The identity verification method for the new node by the verification group comprises the following steps: if the consensus is started for the first time, after the new node joins the network, randomly selecting a node in the verification group of the area where the new node is located, and sending a verification request to the verification groups of other areas by the node; if the new node is not in the first consensus, the area representing the new node sends a verification request to the verification group of other areas; if the new node fails to pass the verification in each region, the new node is proved to be unique, namely the identity verification of the new node is considered to be successful; the verification of the new node by the verification group comprises the following steps:
2.1) verification group preservation X2The method comprises the steps that information of nodes which are communicated within time is sent to a communicable list, fixed nodes of a verification group are communicated with other fixed nodes in the verification group, the communicable list of the fixed nodes is updated, the fixed nodes of the verification group are also communicated with keeper nodes of the verification group, the keeper nodes of the verification group update the communicable list, and the fixed nodes of the verification group only update the information of the same node in m keeper nodes;
2.2) if the node information can be inquired by the communicable list of only 1 fixed node or n reserved nodes in the verification group, the node is considered to pass the verification of the area.
The verification method for the verification group to the flow channeling node comprises the following steps: the method comprises the steps that a region representative node of a region where a flow channeling node is currently located sends a verification request to a region where the flow channeling node is located before a cross region and a surrounding region of the flow channeling node, if the flow channeling node passes verification of the region where the flow channeling node is located before the cross region and fails to pass the surrounding region, the flow channeling node is indicated to be unique, and identity verification of the flow channeling node is considered to be successful;
converting the flow channeling node meeting the condition of the formula (1) into a reserved node:
wherein, t1Represents the stay time of the current area of the current flow node, T represents the time of successful uplink of a single block, n1A block quantity threshold value representing successful uplink of the current node, level representing the current credit level of the current node, and normal representing the normal level in the credit levels;
converting the reserved nodes meeting the conditions of the formula (2) into flow channeling nodes:
t2>n2×T (2)
wherein, t2Representing the dwell time of the gatekeeper node in other areas, n2A threshold number of blocks representing successful uplink of the conservative node, and n2<<n1
The performance award punishment method in the step 3) is specifically as follows: if the consensus is started for the first time, setting the accumulated score to be 0, and setting the accumulated credit value of each node to be 0; if not, executing the performance reward punishment method according to the previous block consensus result, specifically:
3.1) if the consensus is successful, rewarding the region representative node, the standby region representative node and the node expression score eta which awards the vote to the region representative node in each region, or else rewarding the node expression score lambda which awards the vote to the region representative node;
3.2) awarding a fixed node and a reserved node which actively participate and complete the node identity verification task to show a score mu, and awarding a node which actively participate and complete the checkpoint protocol to show a score rho;
3.3) if the consensus is successful, deducting the node expression score gamma which throws an objection ticket to the region representative node in each region, otherwise deducting the node expression score sigma which becomes the region representative node, and deducting the node expression score sigma which throws a voted vote to the region representative node in each region;
3.4) calculating the final performance score phi of each node in the previous consensus through a formula (3), and updating to the accumulated score x:
wherein the content of the first and second substances,representing the previous accumulated score, x representing the updated current accumulated score, and the values of gamma and sigma are far larger than eta, lambda, mu and rho;
3.5) converting the cumulative score to a cumulative credit value by equation (4):
where tanh () represents a hyperbolic tangent function, x represents an accumulated score of a node, and y represents an accumulated credit value of a node.
The specific method for classifying the credit rating in the step 4) comprises the following steps: if the common identification is started for the first time, acquiring active time, offline times, offline time, delay time and current area accumulated time as evaluation elements of node level division; if the node is not the first consensus, acquiring active time, offline times, offline time, delay time, current area accumulated time, current accumulated credit value, historical grade value, invalid block providing times and forked block providing times as evaluation elements of node grade division; the GMM clustering method for credit rating classification specifically comprises the following steps:
4.1) setting the cluster number K to 5, setting the current iteration number step to 0, and initializing the mean value xi of the multidimensional Gaussian distribution model of each clusteriCovariance matrix χiAnd a weight OiAnd is and
4.2) calculating posterior probability of each node generated by Gaussian distribution model of each cluster by formulas (5) and (6):
wherein, Pt,iRepresenting a multidimensional Gaussian distribution, x, of the t-th node in the i-th clustertA vector composed of evaluation elements representing the t-th node;
wherein, thetat,iRepresenting a posterior probability of a t-th node generated by the multi-dimensional Gaussian distribution model of the i-th cluster;
4.3) calculating the parameters of the multidimensional Gaussian distribution model of the ith cluster of the new round:
wherein, tau represents the total number of nodes,represents the weight after update is completed omicroniIndicating the mean value ξ after the update is completediDenotes the variance χ after completion of the updatei,step=step+1;
4.4) if step is less than the threshold ψ or the added value of the likelihood function equation (10) is greater than the convergence threshold ν, jump to step 4.3), otherwise jump to step 4.5);
4.5) calculating posterior probability values of all nodes in different clusters, dividing the nodes into clusters with the maximum probability values, and obtaining K clusters and cluster members C thereofi
4.6) ranking according to the result of dividing clusters by equation (11):
QR={best=80,good=70,normal=60,bad=40,worst=30} (11)。
the method for determining the region representative candidate node in the step 6) is as follows:
6.1) determining the total number TNC of the representative candidate nodes of the current area according to the total node number TN of the current area:
TNC=β×TN (12)
wherein, beta represents the corresponding proportion of the total number of the nodes and the total number of the candidate nodes represented by the region;
6.2) determining the number of the candidate nodes represented by the different types of areas according to the proportion of the different types of nodes in the current area in the total node number:
wherein, tn1Indicates the number of fixed nodes in the current region, tn2Indicating the number of left behind nodes in the current region, tn3Indicates the number of nodes in the current area, and FN _ TNC indicates the area generation of the current areaThe quantity of fixed nodes in the candidate nodes is shown, RN _ TNC represents the quantity of the nodes left behind in the candidate nodes represented by the area of the current area, and SN _ TNC represents the quantity of the nodes fleeed by the flow in the candidate nodes represented by the area of the current area;
6.3) judging whether each node can become a region representative node through the formula (14):
wherein alpha isiAn identifier indicating whether the ith node can continue to be the area representative node, t3Represents the cumulative time since the ith node was last selected as the zone representative node and when alphaiZero clearing when changed, n3Threshold of number of blocks, t, indicating successful uplink4Represents the cumulative time after the ith node with credit rating greater than or equal to good is stopped due to its malicious behavior and when alpha isiZero clearing when changed, n4A threshold number of blocks representing successful uplinks, and n3<<n4
6.4) calculating the score of each node through a formula (15) by combining the credit rating of the node in the current region, and classifying according to different types, wherein each type is selected from high to low to become a region representative candidate node:
scorei=QRi×αi (15)
wherein, scoreiFor score of ith node, QRiA score, α, corresponding to the credit rating of the ith nodeiAn identifier indicating whether the ith node can continue to become the area representative node; if the scores of a plurality of nodes are the same, one node which becomes a region representative candidate is randomly selected.
The method for determining the region representative node in the step 7) comprises the following steps: calculating the number ANC of the area representative nodes in the current area by a formula (16), counting the number of votes by adopting different weights according to a formula (17), selecting the area representative candidate nodes with the number ANC to formally become the area representative nodes according to the voting result, and forming the standby area representative nodes by the selected area representative candidate nodes:
ANC=δ×TN (16)
wherein, δ is the corresponding proportion of the total node number to the area representative nodes, and ANC is the number of the area representative nodes in the current area;
wherein, reuse _ TNCiFor the voting result of the i-th area representing the candidate node, FN _ savoury and FN _ against are the voting condition of the fixed node in the area for the i-th area representing the candidate node, and epsilon1For the weight of the fixed node in voting, RN _ fare and RN _ against are the voting conditions of the left-behind nodes in the region for the ith region to represent candidate nodes, and epsilon2For the weight of the left-behind node in voting, SN _ savoury and SN _ against are the voting condition of the flow fleeing node in the region for the ith region to represent the candidate node, and epsilon3The weights of the flow channeling nodes in voting.
The transaction information in the step 8) comprises a node blockage position, a blockage severity degree and a node position; the intra-region consensus method is as follows:
8.1) randomly selecting one node from the representative nodes in the area with the highest credit level as a main node, and taking the representative nodes in other areas as replica nodes;
8.2) the main node broadcasts a pre-preparation message to the replica node, and after receiving the pre-preparation message, the replica node enters a preparation state and broadcasts the preparation message to other nodes;
8.3) if a node receives 2f1A preparation message, wherein f1If the maximum allowable number of the malicious nodes in the network is represented, entering a guarantee state and broadcasting a guarantee message;
8.4) when the replica node receives 2f1A guarantee message, that consensus is deemed to be achieved, and blocks are written to the zone slave chain.
The multi-region consensus method is as follows:
8.5) region representation from each regionRandomly selecting n in a node5(1<n5< ANC) forming a main node group of the competition building block by the nodes;
8.6) the main node group sends a pre-prepared message to other area representative nodes and uniformly collects the returned approval messages; if the acceptance message received by the master node group exceeds 3f2Wherein f is21/3 representing the number of the area representative nodes ANC, uniformly sending an approval message to other area representative nodes for verification, otherwise jumping to step 8.7); if 2f2If the other areas represent that the nodes pass the verification, jumping to the step 8.8), otherwise, jumping to the step 8.7);
8.7) the main node group broadcasts a pre-preparation message to the replica node, and when the other area representative nodes receive the pre-preparation message, the main node group enters a preparation state and broadcasts the preparation message to other nodes; if a node receives 2f1A preparation message, wherein f1If the maximum allowable number of the malicious nodes in the network is represented, entering a guarantee state and broadcasting a guarantee message, otherwise, continuously waiting for receiving a preparation message; if 2f1The representative nodes of other areas receive the guarantee message, namely the consensus is considered to be achieved, and the step 8.8 is skipped, otherwise, the representative nodes continue to wait for receiving the guarantee message;
8.8) writing the blocks into the global main chain, wherein the blocks which firstly reach the verified blocks are reserved, and the blocks generated subsequently are deleted;
8.9) if the area representative node has malicious behaviors or moves to other areas, randomly selecting a standby area representative node and converting the standby area representative node into the area representative node.
The invention has the following beneficial effects:
the invention mainly aims at the problems of invasion of malicious nodes in the Internet of vehicles, short-time transaction delay requirements and the like. According to the movement condition of the nodes in the network, the node identities are divided into a new node, a flow fleeing node, a reserved node and a fixed node, and the node identities are processed by combining a node identity verification and change mechanism, so that the authenticity of the nodes is ensured, and malicious nodes are found in time. In the face of the problem of giving the consensus rights of the nodes in the network, a perfect node credit reward and punishment mechanism is set, GMM clustering is selected to divide the nodes into different grades, and then rights such as node election rights and voting rights are given to the node area according to the grades, so that the rights of malicious nodes can be effectively limited. Aiming at the election of the area representative nodes, the area representative candidate nodes are determined by combining the number of different types of nodes in each area and the credit level, the final area representative nodes are determined by voting with different weights according to the node types, and the dropped nodes form standby area representative nodes so as to deal with the conditions that a main node group fails and the like, and the election and the updating of the dynamic area representative nodes in the car networking with frequent topology change are realized. The multi-region consensus mechanism or the intra-region consensus mechanism is selected according to the related range of the transaction. The internal consensus mechanism of the region randomly selects the main node from the nodes with the highest credit level in the region, so that the attack of malicious nodes can be avoided. In the multi-area representative node consensus mechanism, a main node group competition building block is formed by a plurality of area representative nodes, and a simplified consistency protocol is executed to achieve consensus, so that the risk of malicious node intrusion is reduced, and the block building efficiency is improved.
In a word, the method can tolerate the invasion attack of a certain number of malicious nodes, can effectively remove the malicious nodes, and reduces the transaction delay, thereby ensuring the network information security of the Internet of vehicles.
The invention is further illustrated by the accompanying drawings and detailed description.
Description of the drawings:
FIG. 1 is a flow chart of a method according to an embodiment of the present invention.
The specific implementation mode is as follows:
referring to fig. 1, an improved PBFT consensus method applicable to a car networking environment includes the steps of:
1) initialization: firstly, the Internet of vehicles network is divided into areas according to the street range and the deployment position of the 5G base station in administrative planning of China. Wherein each area contains 30 5G base stations. The 5G base station is considered as a fixed node, and all the Internet of vehicles nodes are considered as new nodes. Wherein a fixed node represents a node that does not move within the area and a new node represents a node that newly joins the network within the area. Setting threshold parameters including parameters such as performance rewards eta, mu and rho in a reward and punishment mechanism;
2) executing node identity authentication and change mechanisms in each area, determining the identity of the nodes in the area, and preliminarily eliminating malicious nodes;
2.1) if the current is the first consensus, then each region randomly picks N1The fixed nodes form a verification group, otherwise, the region representative node randomly selects N in each region2A fixed node and N with a credit rating of good or above3The individual gatekeeper nodes form a verification group. Wherein, the nodes which have been selected as the verification group will not be considered in the next random combination process until all possible combinations are traversed;
2.2) if the consensus is started for the first time, the new node joins the network, then the node is randomly selected from the verification group in the area where the new node is located, the node sends a verification request to the verification groups in other areas, and otherwise, the area where the new node is located represents the node to send the verification request to the verification groups in other areas. If the new node is not verified in each area, the new node is proved to be unique, namely the identity verification of the new node is considered to be successful, the new node can be converted into a reserved node which moves in the area and cannot move to other areas, and the new node participates in the consensus of the blocks. Otherwise, the right of the new node to participate in block consensus needs to be stopped, and every X1And repeatedly verifying until the identity verification of the new node is completed. The verification method of the verification group comprises the following steps:
2.2.1) verification group preservation X2The nodes that have communicated in time are informed of their communicable lists. And the fixed nodes of the verification group communicate with other fixed nodes in the verification group, and update the communicable list of the fixed nodes. And the fixed node of the verification group is also communicated with the left-behind node of the verification group, the left-behind node of the verification group updates a communicable list, and the fixed node of the verification group only updates the information of the same node in the m left-behind nodes.
If the fixed nodes exist in the verification group, the fixed nodes communicate with each other, and respective communicable lists are updated. If the left-behind nodes exist in the verification group at the same time, the fixed nodes are communicated with the left-behind nodes, and only the information of the same node in the m left-behind nodes is updated.
2.2.2) if the node information can be inquired by the communicable list of only 1 fixed node or n reserved nodes in the verification group, the node is considered to pass the verification of the area.
2.3) the authentication group authenticates the streaming nodes which move to other areas frequently although moving in the area. The verification method for the verification group to the flow fleeing node comprises the following steps:
2.3.1) the area of the area where the flow node is currently located represents that the node sends a verification request to the area where the flow node is located before crossing the area and the surrounding area (excluding the current area).
2.3.2) if the flow fleeing node passes the verification of the area where the flow fleeing node is located before the cross-region and fails to pass in the surrounding area (excluding the current area), the flow fleeing node is unique, namely the flow fleeing node is considered to be successfully authenticated, and can participate in the consensus process of the block. Otherwise, the right of the flow fleeing node to participate in block consensus needs to be stopped, and every X is set1And repeatedly verifying until the identity verification of the flow channeling node is completed.
And 2.4) converting the flow channeling nodes meeting the conditions into the reserved nodes according to the formula (1).
Wherein, t1Represents the stay time of the current area of the current flow node, T represents the time of successful uplink of a single block, n1The threshold value of the number of blocks representing successful uplink of the current node is represented by level, the current credit level of the current node is represented by normal, and the normal represents the normal level in the credit levels.
And 2.5) converting the qualified reserved nodes into the flow channeling nodes according to the formula (2).
t2>n2×T (2)
Wherein, t2Representing the dwell time of the gatekeeper node in other areas, n2A threshold number of blocks representing successful uplink of the conservative node, and n2<<n1
3) If the first time of block consensus is present, setting the cumulative score to be 0 and directly jumping to the step 4), otherwise, executing the performance awarding and punishing method according to the previous block consensus result: the performance award and punishment method comprises the following steps:
3.1) if the consensus is successful, rewarding the region representative node, the standby region representative node and the node performance score eta which awards the region representative node for accepting the vote in each region, or else awarding the node performance score lambda which awards the region representative node for accepting the vote.
3.2) awarding a fixed node and a reserved node which actively participate and complete the node identity verification task to show a score mu, and awarding a node which actively participate and complete the checkpoint protocol to show a score rho;
3.3) if the consensus is successful, deducting the node expression score gamma which throws an objection ticket to the region representative node in each region. And otherwise, deducting the node performance score sigma of the area representative node, and deducting the node performance score sigma of the vote awarded to the area representative node in each area.
And 3.4) calculating the final performance score phi of each node in the previous consensus through a formula (3) and updating to the accumulated score x.
Wherein the content of the first and second substances,represents the previous cumulative score, x represents the updated current cumulative score, and γ and σ are both much larger than η, λ, μ and ρ.
4) And if the current common consensus is started for the first time, setting the cumulative credit value of each node as 0, otherwise, converting the cumulative score into the cumulative credit value through a formula (4).
Where tanh () represents a hyperbolic tangent function, x represents an accumulated score of a node, and y represents an accumulated credit value of a node.
5) If the current situation is the first time of starting consensus, acquiring evaluation elements of node level division such as active time, offline times, offline time, delay time, current area accumulated time and the like, and otherwise acquiring evaluation elements of node level division such as active time, offline times, offline time, delay time, current area accumulated time, current accumulated credit value, historical level numerical value, invalid block providing times and bifurcation block providing times and the like. The active time represents the online time of the node in the current area, the offline times represents the offline times of the node in the current area, the offline time represents the offline time of the node in the current area, the delay time represents the delay time of the node in the communication process, the accumulated time of the current area represents the accumulated time of the node in the current area, the current accumulated credit value represents the credit value accumulation of the node before grade division, the historical grade value represents the total grade value of the node in the past, the number of times of providing invalid blocks represents the total number of times of providing invalid blocks by the node in the past, and the number of times of providing forked blocks represents the total number of times of providing forked blocks by the node in the past.
6) Performing credit rating division by a GMM clustering method; the GMM clustering method comprises the following concrete implementation steps:
6.1) setting the cluster number K to 5, setting the current iteration number step to 0, and initializing the mean value xi of the multidimensional Gaussian distribution model of each clusteriCovariance matrix χiAnd weight omicroni. And is
6.2) calculating the posterior probability of each node generated by the Gaussian distribution model of each cluster according to the formulas (5) and (6):
wherein, Pt,iIndicating that the t node is at the iMultidimensional gaussian distribution of clusters. x is the number oftVector composed of evaluation elements representing the t-th node
Wherein, thetat,iRepresenting the posterior probability of the t-th node generated by the multi-dimensional gaussian distribution model of the i-th cluster.
6.3) calculating the parameters of the multidimensional Gaussian distribution model of the ith cluster of the new round:
wherein, tau represents the total number of nodes,represents the weight after update is completed omicroniIndicating the mean value ξ after the update is completediDenotes the variance χ after completion of the updatei。step=step+1。
6.4) if step is smaller than the threshold ψ or the added value of the likelihood function equation (10) is larger than the convergence threshold ν, jump to step 6.3), otherwise jump to step 6.5).
6.5) calculating that each node is differentDividing the nodes into clusters with the maximum probability value to obtain K clusters and cluster members C thereofi
6.6) ranking is performed by equation (11) according to the result of dividing clusters.
QR={best=80,good=70,normal=60,bad=40,worst=30} (11)
7) According to the divided levels, the nodes with best and good levels have the right to participate in the node authentication and checkpoint protocol and the election right and voting right representing the candidate. Nodes with normal ratings have the right to participate in checkpoint agreements and vote rights on behalf of candidates. Nodes with bad classes only have the right to participate in the checkpoint protocol. A node with a worst level has no rights. And clearing the accumulated credit value and the accumulated score of the node.
8) And determining the total number TNC of the candidate nodes represented by the current area according to the total node number TN of the current area.
TNC=β×TN (12)
Wherein β represents a corresponding ratio of the total number of nodes to the total number of the region representative candidate nodes.
9) And determining the number of the candidate nodes represented by the different types of areas according to the ratio of the number of the different types of nodes in the current area to the total number of the nodes.
Wherein, tn1Indicates the number of fixed nodes in the current region, tn2Indicating the number of left behind nodes in the current region, tn3The number of the flow fleeing nodes in the current area is represented, FN _ TNC represents the number of fixed nodes in the candidate nodes of the area of the current area, RN _ TNC represents the number of the remaining nodes in the candidate nodes of the area of the current area, and SN _ TNC represents the number of the flow fleeing nodes in the candidate nodes of the area of the current area.
10) Judging whether each node can become a region representative node through a formula (14), thereby mobilizing the enthusiasm of the node and ensuring the safety of block consensus;
wherein alpha isiAn identifier indicating whether the ith node can continue to be the area representative node, t3Represents the cumulative time since the ith node was last selected as the zone representative node and when alphaiZero clearing when changed, n3Threshold of number of blocks, t, indicating successful uplink4Represents the cumulative time after the ith node with credit rating greater than or equal to good is stopped due to its malicious behavior and when alpha isiZero clearing when changed, n4A threshold number of blocks representing successful uplinks, and n3<<n4
11) And calculating the score of each node through a formula (15) by combining the credit levels of the nodes in the current region, classifying according to different types, and selecting from high to low in each type to be a region representative candidate node.
scorei=QRi×αi (15)
Wherein, scoreiFor score of ith node, QRiA score, α, corresponding to the credit rating of the ith nodeiThe identifier of the representative node for the area is determined as to whether the ith node can continue to be the representative node of the area. If the scores of a plurality of nodes are the same, one node which becomes a region representative candidate is randomly selected.
12) And calculating the number ANC of the region representative nodes in the current region by formulas (16) and (17), and adopting different weight statistical votes. And according to the voting result, selecting the area representative nodes with the number of ANCs to formally become the area representative nodes, and forming the standby area representative nodes by using the selected area representative nodes.
ANC=δ×TN (16)
And the ANC is the number of the area representative nodes in the current area.
Wherein, reuse _ TNCiFor the voting result of the i-th area representing the candidate node, FN _ savoury and FN _ against are the voting condition of the fixed node in the area for the i-th area representing the candidate node, and epsilon1For the weight of the fixed node in voting, RN _ fare and RN _ against are the voting conditions of the left-behind nodes in the region for the ith region to represent candidate nodes, and epsilon2For the weight of the left-behind node in voting, SN _ savoury and SN _ against are the voting condition of the flow fleeing node in the region for the ith region to represent the candidate node, and epsilon3The weights of the flow channeling nodes in voting.
13) And judging whether the transaction information such as the node blockage position, the blockage severity degree, the node position and the like only relates to the region or relates to a plurality of region ranges. If only the local area is involved, the transaction information is considered as an intra-area transaction, otherwise, the transaction information is considered as a multi-area transaction. And adopting a region internal consensus method to achieve consensus on the region internal affairs, and adopting a multi-region consensus method to achieve consensus on the multi-region affairs. Finally, jump to step 2. The region internal consensus method comprises the following steps:
13.1) randomly selecting one node from the representative nodes in the area with the highest credit level as a main node, and taking the representative nodes in other areas as replica nodes.
13.2) the master node broadcasts a prepare message to the replica node. And when the replica node receives the pre-preparation message, entering a preparation state and broadcasting the preparation message to other nodes.
13.3) if a node receives 2f1A preparation message, wherein f1Indicating the maximum allowed number of malicious nodes in the network, entering a guaranteed state and broadcasting a guarantee message.
13.4) when the replica node receives 2f1A guarantee message, that consensus is deemed to be achieved, and blocks are written to the zone slave chain.
The multi-region consensus method comprises the following steps:
13.5) randomly selecting n from the region representative nodes of each region5(1<n5< ANC) the nodes constitute the master node group of the competition building block.
13.6) the main node group sends a pre-preparation message to other area representative nodes and uniformly collects the returned approval messages. If the acceptance message received by the master node group exceeds 3f2Wherein f is21/3 indicating the number of area representative nodes ANC, then sending an approval message to the other area representative nodes for verification, otherwise jumping to step 13.7). If 2f2And if the other area represents that the node is verified, jumping to the step 13.8), otherwise, jumping to the step 13.7).
And 13.7) the main node group broadcasts a preparation message to the replica node, and when the other area representative nodes receive the preparation message, the preparation state is entered and the preparation message is broadcast to the other nodes. If a node receives 2f1A preparation message, wherein f1And if the maximum allowable number of the malicious nodes in the network is represented, entering a guarantee state and broadcasting a guarantee message, otherwise, continuously waiting for receiving a preparation message. If 2f1And (4) the other area represents that the node receives the guarantee message, namely the node considers to reach the consensus, and jumps to the step 13.8), or else, the node continuously waits for receiving the guarantee message.
13.8) writing the blocks to the global backbone, wherein the blocks which first reach the verified block are retained, and the blocks which are generated subsequently are deleted.
13.9) if the area representative node has malicious behaviors or moves to other areas, randomly selecting a standby area representative node and converting the standby area representative node into the area representative node.
The above embodiments are only for illustrating the technical solutions of the present invention and are not limited, and other modifications or equivalent substitutions made by the technical solutions of the present invention by the ordinary skilled person in the art are included in the scope of the claims of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. An improved PBFT consensus method applicable to a vehicle networking environment is characterized in that: the content comprises the following steps:
step 1): the method comprises the following steps that the Internet of vehicles is divided into regions according to a street range of administrative planning and deployment positions of 5G base stations, each region comprises a plurality of 5G base stations, the 5G base stations are used as fixed nodes, all Internet of vehicles nodes are used as new nodes, and node performance score eta, mu and rho parameter thresholds in a reward and punishment mechanism are set;
step 2): the verification groups are formed by each area to perform identity verification on the new nodes and the flow fleeing nodes which frequently move to other areas: if the identity authentication of the new node is successful, the new node is converted into a reserved node which moves in the area where the new node is located and cannot move to other areas, and participates in the consensus of the blocks; if the identity verification of the new node is unsuccessful, stopping the right of the new node to participate in block consensus, and repeatedly verifying the identity of the new node within interval time; if the identity authentication of the flow fleeing node is successful, the flow fleeing node can participate in block consensus, otherwise, the right of the flow fleeing node to participate in the block consensus is stopped, and the identity of the flow fleeing node is repeatedly authenticated within interval time; the flow fleeing nodes can be converted into reservation nodes according to the stay time and the credit level in the current area, and the reservation nodes can be converted into flow fleeing nodes according to the stay time of the reservation nodes in other areas;
step 3): each region executes the performance reward punishment method to calculate the node cumulative score, and converts the cumulative score into a cumulative credit value;
step 4): collecting evaluation elements including active time, offline times, offline time, delay time and current region accumulated time, and performing credit rating division by a GMM clustering method, wherein the credit rating division is as follows: best is 80, good is 70, normal is 60, bad is 40, best is 30;
step 5): and giving the right to the node according to the credit rating classification result of the node: the nodes with best and good grades are endowed with the right to participate in node identity authentication and checkpoint protocol, and have election right and voting right representing candidates; nodes with normal ratings are given the right to participate in checkpoint agreements and voting rights on behalf of candidates; a node with a bad level only has the right to participate in the checkpoint protocol; a node with a worst level has no rights; clearing the accumulated credit value and the accumulated score of the node after the node right is given;
step 6): determining the total number of the candidate nodes represented by the current area according to the total number of the nodes in the current area, and determining the number of the candidate nodes represented by the areas of different types according to the ratio of the number of the nodes of different types in the current area in the total number of the nodes; judging whether each node can become a regional representative node, calculating the score of each node by combining the credit level of the nodes in the current region, classifying according to different types, and selecting the scores in each type from high to low to become regional representative candidate nodes;
step 7): calculating the number of the region representative nodes in the current region, counting the number of votes by adopting different weights, and selecting region representative candidate nodes meeting the number requirement as region representative nodes according to the voting result;
step 8): judging the related range of the transaction according to the transaction information, if the transaction only relates to the local area, considering the transaction information as an internal transaction of the area, otherwise, considering the transaction information as a multi-area transaction; adopting a region internal consensus method to achieve consensus on the region internal affairs, and adopting a multi-region consensus method to achieve consensus on the multi-region affairs; finally jump to step 2).
2. The improved PBFT consensus method applicable to a vehicle networking environment according to claim 1, wherein: the verification group in the step 2) is formed in the following way: if the first consensus is started currently, each area randomly selects N1The fixed nodes form a verification group, otherwise, the region representative node randomly selects N in each region2A fixed node and N with a credit rating of good or above3The individual gatekeeper nodes together form a verification group.
3. The improved PBFT consensus method applicable to a vehicle networking environment according to claim 2, wherein: the identity verification method for the new node by the verification group comprises the following steps: if the consensus is started for the first time, after the new node joins the network, randomly selecting a node in the verification group of the area where the new node is located, and sending a verification request to the verification groups of other areas by the node; if the new node is not in the first consensus, the area representing the new node sends a verification request to the verification group of other areas; if the new node fails to pass the verification in each region, the new node is proved to be unique, namely the identity verification of the new node is considered to be successful; the verification of the new node by the verification group comprises the following steps:
2.1) verification group preservation X2The method comprises the steps that information of nodes which are communicated within time is sent to a communicable list, fixed nodes of a verification group are communicated with other fixed nodes in the verification group, the communicable list of the fixed nodes is updated, the fixed nodes of the verification group are also communicated with keeper nodes of the verification group, the keeper nodes of the verification group update the communicable list, and the fixed nodes of the verification group only update the information of the same node in m keeper nodes;
2.2) if the node information can be inquired by the communicable list of only 1 fixed node or n reserved nodes in the verification group, the node is considered to pass the verification of the area.
4. The improved PBFT consensus method applicable to a vehicle networking environment according to claim 2, wherein: the verification method for the verification group to the flow channeling node comprises the following steps: the method comprises the steps that a region representative node of a region where a flow channeling node is currently located sends a verification request to a region where the flow channeling node is located before a cross region and a surrounding region of the flow channeling node, if the flow channeling node passes verification of the region where the flow channeling node is located before the cross region and fails to pass the surrounding region, the flow channeling node is indicated to be unique, and identity verification of the flow channeling node is considered to be successful;
converting the flow channeling node meeting the condition of the formula (1) into a reserved node:
wherein, t1Represents the stay time of the current area of the current flow node, T represents the time of successful uplink of a single block, n1A block quantity threshold value representing successful uplink of the current node, level representing the current credit level of the current node, and normal representing the normal level in the credit levels;
converting the reserved nodes meeting the conditions of the formula (2) into flow channeling nodes:
t2>n2×T (2)
wherein, t2Representing the dwell time of the gatekeeper node in other areas, n2A threshold number of blocks representing successful uplink of the conservative node, and n2<<n1
5. The improved PBFT consensus method applicable to a vehicle networking environment according to claim 1, wherein: the performance award punishment method in the step 3) is specifically as follows: if the consensus is started for the first time, setting the accumulated score to be 0, and setting the accumulated credit value of each node to be 0; if not, executing the performance reward punishment method according to the previous block consensus result, specifically:
3.1) if the consensus is successful, rewarding the region representative node, the standby region representative node and the node expression score eta which awards the vote to the region representative node in each region, or else rewarding the node expression score lambda which awards the vote to the region representative node;
3.2) awarding a fixed node and a reserved node which actively participate and complete the node identity verification task to show a score mu, and awarding a node which actively participate and complete the checkpoint protocol to show a score rho;
3.3) if the consensus is successful, deducting the node expression score gamma which throws an objection ticket to the region representative node in each region, otherwise deducting the node expression score sigma which becomes the region representative node, and deducting the node expression score sigma which throws a voted vote to the region representative node in each region;
3.4) calculating the final performance score phi of each node in the previous consensus through a formula (3), and updating to the accumulated score x:
wherein the content of the first and second substances,representing the previous accumulated score, x representing the updated current accumulated score, and the values of gamma and sigma are far larger than eta, lambda, mu and rho;
3.5) converting the cumulative score to a cumulative credit value by equation (4):
where tanh () represents a hyperbolic tangent function, x represents an accumulated score of a node, and y represents an accumulated credit value of a node.
6. The improved PBFT consensus method applicable to a vehicle networking environment according to claim 1 or 5, wherein: the specific method for classifying the credit rating in the step 4) comprises the following steps: if the common identification is started for the first time, acquiring active time, offline times, offline time, delay time and current area accumulated time as evaluation elements of node level division; if the node is not the first consensus, acquiring active time, offline times, offline time, delay time, current area accumulated time, current accumulated credit value, historical grade value, invalid block providing times and forked block providing times as evaluation elements of node grade division; the GMM clustering method for credit rating classification specifically comprises the following steps:
4.1) setting the cluster number K to 5, setting the current iteration number step to 0, and initializing the mean value xi of the multidimensional Gaussian distribution model of each clusteriCovariance matrix χiAnd a weight OiAnd is and
4.2) calculating posterior probability of each node generated by Gaussian distribution model of each cluster by formulas (5) and (6):
wherein, Pt,iIndicating that the t node is in the i clusterMulti-dimensional Gaussian distribution of (1), xtA vector composed of evaluation elements representing the t-th node;
wherein, thetat,iRepresenting a posterior probability of a t-th node generated by the multi-dimensional Gaussian distribution model of the i-th cluster;
4.3) calculating the parameters of the multidimensional Gaussian distribution model of the ith cluster of the new round:
wherein, tau represents the total number of nodes,represents the weight after update is completed omicroniIndicating the mean value ξ after the update is completediDenotes the variance χ after completion of the updatei,step=step+1;
4.4) if step is less than the threshold ψ or the added value of the likelihood function equation (10) is greater than the convergence threshold ν, jump to step 4.3), otherwise jump to step 4.5);
4.5) calculating posterior probability values of all nodes in different clusters, dividing the nodes into clusters with the maximum probability values, and obtaining K clusters and cluster members C thereofi
4.6) ranking according to the result of dividing clusters by equation (11):
QR={best=80,good=70,normal=60,bad=40,worst=30} (11)。
7. the improved PBFT consensus method applicable to a vehicle networking environment according to claim 6, wherein: the method for determining the region representative candidate node in the step 6) is as follows:
6.1) determining the total number TNC of the representative candidate nodes of the current area according to the total node number TN of the current area:
TNC=β×TN (12)
wherein, beta represents the corresponding proportion of the total number of the nodes and the total number of the candidate nodes represented by the region;
6.2) determining the number of the candidate nodes represented by the different types of areas according to the proportion of the different types of nodes in the current area in the total node number:
wherein, tn1Indicates the number of fixed nodes in the current region, tn2Indicating the number of left behind nodes in the current region, tn3The number of the flow fleeing nodes in the current region is represented, FN _ TNC represents the number of fixed nodes in the region representing candidate nodes of the current region, RN _ TNC represents the number of the remaining nodes in the region representing candidate nodes of the current region, and SN _ TNC represents the number of the flow fleeing nodes in the region representing candidate nodes of the current region;
6.3) judging whether each node can become a region representative node through the formula (14):
wherein alpha isiAn identifier indicating whether the ith node can continue to be the area representative node, t3Represents the cumulative time since the ith node was last selected as the zone representative node and when alphaiZero clearing when changed, n3Threshold of number of blocks, t, indicating successful uplink4Represents the cumulative time after the ith node with credit rating greater than or equal to good is stopped due to its malicious behavior and when alpha isiZero clearing when changed, n4A threshold number of blocks representing successful uplinks, and n3<<n4
6.4) calculating the score of each node through a formula (15) by combining the credit rating of the node in the current region, and classifying according to different types, wherein each type is selected from high to low to become a region representative candidate node:
scorei=QRi×αi (15)
wherein, scoreiFor score of ith node, QRiA score, α, corresponding to the credit rating of the ith nodeiAn identifier indicating whether the ith node can continue to become the area representative node; if the scores of a plurality of nodes are the same, one node which becomes a region representative candidate is randomly selected.
8. The improved PBFT consensus method applicable to a vehicle networking environment according to claim 7, wherein: the method for determining the region representative node in the step 7) comprises the following steps: calculating the number ANC of the area representative nodes in the current area by a formula (16), counting the number of votes by adopting different weights according to a formula (17), selecting the area representative candidate nodes with the number ANC to formally become the area representative nodes according to the voting result, and forming the standby area representative nodes by the selected area representative candidate nodes:
ANC=δ×TN (16)
wherein, δ is the corresponding proportion of the total node number to the area representative nodes, and ANC is the number of the area representative nodes in the current area;
wherein, reuse _ TNCiFor the voting result of the i-th area representing the candidate node, FN _ savoury and FN _ against are the voting condition of the fixed node in the area for the i-th area representing the candidate node, and epsilon1For the weight of the fixed node in voting, RN _ fare and RN _ against are the voting conditions of the left-behind nodes in the region for the ith region to represent candidate nodes, and epsilon2For the weight of the left-behind node in voting, SN _ savoury and SN _ against are the voting condition of the flow fleeing node in the region for the ith region to represent the candidate node, and epsilon3The weights of the flow channeling nodes in voting.
9. The improved PBFT consensus method applicable to a car networking environment according to claim 8, wherein: the transaction information in the step 8) comprises a node blockage position, a blockage severity degree and a node position; the intra-region consensus method is as follows:
8.1) randomly selecting one node from the representative nodes in the area with the highest credit level as a main node, and taking the representative nodes in other areas as replica nodes;
8.2) the main node broadcasts a pre-preparation message to the replica node, and after receiving the pre-preparation message, the replica node enters a preparation state and broadcasts the preparation message to other nodes;
8.3) if a node receives 2f1A preparation message, wherein f1If the maximum allowable number of the malicious nodes in the network is represented, entering a guarantee state and broadcasting a guarantee message;
8.4) when the replica node receives 2f1A guarantee message, that consensus is deemed to be achieved, and blocks are written to the zone slave chain.
10. The improved PBFT consensus method applicable to a car networking environment according to claim 9, wherein: the multi-region consensus method is as follows:
8.5) randomly selecting n from the region representative nodes of each region5(1<n5< ANC) forming a main node group of the competition building block by the nodes;
8.6) the main node group sends a pre-prepared message to other area representative nodes and uniformly collects the returned approval messages; if the acceptance message received by the master node group exceeds 3f2Wherein f is21/3 representing the number of the area representative nodes ANC, uniformly sending an approval message to other area representative nodes for verification, otherwise jumping to step 8.7); if 2f2If the other areas represent that the nodes pass the verification, jumping to the step 8.8), otherwise, jumping to the step 8.7);
8.7) the main node group broadcasts a pre-preparation message to the replica node, and when the other area representative nodes receive the pre-preparation message, the main node group enters a preparation state and broadcasts the preparation message to other nodes; if a node receives 2f1A preparation message, wherein f1If the maximum allowable number of the malicious nodes in the network is represented, entering a guarantee state and broadcasting a guarantee message, otherwise, continuously waiting for receiving a preparation message; if 2f1The representative nodes of other areas receive the guarantee message, namely the consensus is considered to be achieved, and the step 8.8 is skipped, otherwise, the representative nodes continue to wait for receiving the guarantee message;
8.8) writing the blocks into the global main chain, wherein the blocks which firstly reach the verified blocks are reserved, and the blocks generated subsequently are deleted;
8.9) if the area representative node has malicious behaviors or moves to other areas, randomly selecting a standby area representative node and converting the standby area representative node into the area representative node.
CN201910889906.6A 2019-09-20 2019-09-20 Improved PBFT consensus method suitable for Internet of vehicles environment Active CN110602705B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910889906.6A CN110602705B (en) 2019-09-20 2019-09-20 Improved PBFT consensus method suitable for Internet of vehicles environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910889906.6A CN110602705B (en) 2019-09-20 2019-09-20 Improved PBFT consensus method suitable for Internet of vehicles environment

Publications (2)

Publication Number Publication Date
CN110602705A true CN110602705A (en) 2019-12-20
CN110602705B CN110602705B (en) 2022-05-03

Family

ID=68861359

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910889906.6A Active CN110602705B (en) 2019-09-20 2019-09-20 Improved PBFT consensus method suitable for Internet of vehicles environment

Country Status (1)

Country Link
CN (1) CN110602705B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111866808A (en) * 2020-07-22 2020-10-30 中国联合网络通信集团有限公司 Identity authentication method, device and storage medium
CN111898158A (en) * 2020-07-23 2020-11-06 百望股份有限公司 Encryption method for OFD (office file format) document
CN112734586A (en) * 2021-01-27 2021-04-30 国网信息通信产业集团有限公司 Data processing method and system based on block chain
CN113139871A (en) * 2021-05-07 2021-07-20 新晨科技股份有限公司 Adaptive consensus on block chain method, apparatus and computer readable storage medium
CN113301047A (en) * 2021-05-25 2021-08-24 浙江树人学院(浙江树人大学) Vehicle networking node consistency consensus method based on malicious node attack detection
CN114006920A (en) * 2021-10-11 2022-02-01 重庆电子工程职业学院 Geological disaster emergency command system based on alliance chain
CN114448997A (en) * 2022-01-04 2022-05-06 中国人民武装警察部队工程大学 Equipment quality information management node consensus method based on PBFT
CN117278326A (en) * 2023-11-21 2023-12-22 四川易利数字城市科技有限公司 Block chain data security improving method based on credit layering

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104010302A (en) * 2014-04-29 2014-08-27 上海交通大学 Vehicle-mounted self-organizing network traffic data trust evaluation method
CN107665405A (en) * 2017-09-26 2018-02-06 北京邮电大学 A kind of vehicle credit management method and device
US20180122234A1 (en) * 2016-10-31 2018-05-03 Veniam, Inc. Systems and methods for achieving road action consensus, for example among autonomous vehicles, in a network of moving things
US20180372502A1 (en) * 2017-06-22 2018-12-27 Nokia Technologies Oy Road traffic management
CN109275122A (en) * 2018-08-03 2019-01-25 暨南大学 A kind of common recognition Protocol Design and its car networking application method proved based on service

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104010302A (en) * 2014-04-29 2014-08-27 上海交通大学 Vehicle-mounted self-organizing network traffic data trust evaluation method
US20180122234A1 (en) * 2016-10-31 2018-05-03 Veniam, Inc. Systems and methods for achieving road action consensus, for example among autonomous vehicles, in a network of moving things
US20180372502A1 (en) * 2017-06-22 2018-12-27 Nokia Technologies Oy Road traffic management
CN107665405A (en) * 2017-09-26 2018-02-06 北京邮电大学 A kind of vehicle credit management method and device
CN109275122A (en) * 2018-08-03 2019-01-25 暨南大学 A kind of common recognition Protocol Design and its car networking application method proved based on service

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
任条娟: "基于信道切换的车联网数据传输算法", 《电信科学》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111866808A (en) * 2020-07-22 2020-10-30 中国联合网络通信集团有限公司 Identity authentication method, device and storage medium
CN111866808B (en) * 2020-07-22 2023-03-24 中国联合网络通信集团有限公司 Identity authentication method, device and storage medium
CN111898158A (en) * 2020-07-23 2020-11-06 百望股份有限公司 Encryption method for OFD (office file format) document
CN112734586A (en) * 2021-01-27 2021-04-30 国网信息通信产业集团有限公司 Data processing method and system based on block chain
CN113139871A (en) * 2021-05-07 2021-07-20 新晨科技股份有限公司 Adaptive consensus on block chain method, apparatus and computer readable storage medium
CN113301047A (en) * 2021-05-25 2021-08-24 浙江树人学院(浙江树人大学) Vehicle networking node consistency consensus method based on malicious node attack detection
CN113301047B (en) * 2021-05-25 2022-06-03 浙江树人学院(浙江树人大学) Vehicle networking node consistency consensus method based on malicious node attack detection
CN114006920A (en) * 2021-10-11 2022-02-01 重庆电子工程职业学院 Geological disaster emergency command system based on alliance chain
CN114006920B (en) * 2021-10-11 2023-05-23 重庆电子工程职业学院 Geological disaster emergency command system based on alliance chain
CN114448997A (en) * 2022-01-04 2022-05-06 中国人民武装警察部队工程大学 Equipment quality information management node consensus method based on PBFT
CN114448997B (en) * 2022-01-04 2023-11-03 中国人民武装警察部队工程大学 Equipment quality information management node consensus method based on PBFT
CN117278326A (en) * 2023-11-21 2023-12-22 四川易利数字城市科技有限公司 Block chain data security improving method based on credit layering

Also Published As

Publication number Publication date
CN110602705B (en) 2022-05-03

Similar Documents

Publication Publication Date Title
CN110602705B (en) Improved PBFT consensus method suitable for Internet of vehicles environment
CN111601258B (en) Vehicle networking node data safety communication method based on block chain
CN110602117B (en) Vehicle networking node consistency consensus method based on block chain
CN109639837B (en) Block chain DPoS (distributed denial of service) consensus method based on trust mechanism
CN110677485B (en) Dynamic layered Byzantine fault-tolerant consensus method based on credit
CN111131181B (en) Reputation mechanism and DPBFT algorithm-based block chain dynamic DPoS consensus method
CN111010278B (en) High-fault-tolerance layering consensus method based on DPoS
CN113301047B (en) Vehicle networking node consistency consensus method based on malicious node attack detection
CN108881274B (en) A kind of block chain sharding method and device based on application
CN108492103A (en) A kind of alliance&#39;s block chain common recognition method
CN110796547A (en) Improved practical Byzantine fault-tolerant system based on alliance block chain
CN111106942A (en) Block chain credit mechanism based on AP-PBFT algorithm
CN107231299A (en) A kind of chain route and realized the system that block chain communicates across chain
CN111090892A (en) Block chain consensus method and device based on VRF and threshold signature
CN111026578A (en) Intelligent contract security detection method based on prediction machine
CN111935207A (en) Block chain system consensus method based on improved C4.5 algorithm
CN111988381A (en) HashGraph-based vehicle networking distributed trust system and trust value calculation method
CN113422805B (en) Fragment consensus method based on verifiable random function
CN111065089B (en) Internet of vehicles bidirectional authentication method and device based on crowd sensing
CN113407632A (en) PBFT (proxy-based policy and authorization-based ft) trust certification block chain consensus algorithm
CN113014635A (en) Node type division method and device of block chain system and block chain system
CN115065468B (en) PBFT consensus optimization method based on group reputation value
CN115841382A (en) Virtual power plant transaction block chain, credit evaluation method thereof and consensus mechanism thereof
CN111490994B (en) Consensus mechanism method for combining DPOS between block link point groups and POW in node group
CN112769936A (en) POVT consensus algorithm based on voting and credit mechanism

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant