PBFT algorithm improvement method for identity authentication of Internet of Vehicles

Through the K-Medoids clustering algorithm, the consensus process of the PBFT algorithm is optimized, and the problem of inefficient communication in the Internet of Vehicles is solved, and more efficient communication and stronger system consistency is achieved.

CN119584123AInactive Publication Date: 2025-03-07CHONGQING UNIV OF POSTS & TELECOMM
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411608803.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the Internet of Vehicles, the PBFT algorithm has low communication efficiency due to communication complexity and scalability problems, which affects the consistency of the system.

Method used

The K-Medoids clustering algorithm is used to group vehicles on the network, and the consensus process of the PBFT algorithm is optimized based on the packet results to reduce communication consumption and communication delay.

Benefits of technology

The PBFT algorithm optimized by packets significantly improves the communication efficiency of the Internet of Vehicles system, reduces communication consumption, and reduces communication delay, enhancing the consistency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119584123A_ABST
    Figure CN119584123A_ABST
Patent Text Reader

Abstract

The invention relates to the technologies of the Internet of Vehicles, block chains, consensus algorithms and the like, and discloses a PBFT algorithm improvement method for identity authentication of the Internet of Vehicles. In the method, only dynamic vehicle nodes are used as consensus nodes, k fixed and credible road side units are preset based on a K-Medoids clustering algorithm and are used as clustering centers, the vehicles are divided into nearest groups according to the communication distance between the vehicles, and a threshold value is set to enable the number of nodes in each group to be similar; and then a consensus process is improved according to a grouping result, the consensus process is divided into intra-group consensus and inter-group consensus, the communication consumption and the communication time delay of a PBFT consensus algorithm and the number of messages propagated in the network are reduced, and the network load and the communication overhead are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of blockchain technology, and specifically is a PBFT algorithm improvement method for Internet of Vehicles identity authentication. Background Art

[0002] The Internet of Vehicles is a comprehensive communication system built using the new generation of information and communication technology. It realizes comprehensive network connection between vehicles, vehicles and roads, vehicles and pedestrians, vehicles and cloud platforms, and internal equipment of vehicles.

[0003] Blockchain technology is a decentralized ledger technology that ensures data security and transparency by grouping data into multiple blocks and connecting these blocks using a cryptographic hash algorithm to form a continuous and tamper-proof chain. This structure ensures that all transaction records are visible to every node in the network. Once a record is written to the blockchain, it is almost impossible to modify or delete it, thus ensuring the immutability of the data.

[0004] Blockchain technology can build a decentralized environment for vehicle networks in vehicle network identity authentication, which contains multiple distributed entities such as vehicles and roadside units. These entities can manage their own operations independently and verify vehicle identities and update data through distributed consensus mechanisms, thereby reducing dependence on central decision-making.

[0005] The consensus mechanism is a core component of blockchain technology. It ensures that all nodes in the distributed network can reach a consensus on the consistency of data. It is often used in the field of vehicle network identity authentication to ensure the consistency of new vehicle network access messages. As a classic consensus algorithm, the PBFT algorithm can ensure that all non-faulty nodes eventually reach a consensus on the same sequence of operations. This algorithm guarantees security and activity, that is, all correct replicas will eventually process all client requests and return the same correct results. The PBFT algorithm is fault-tolerant and can tolerate failures when there are (n-1) / 3 faulty nodes among n nodes. It also runs effectively in an asynchronous environment and does not rely on time assumptions.

[0006] However, in practical applications, due to the high dynamics of vehicles, long communication distances, and different density levels, the communication complexity of the PBFT algorithm will also increase, and in the case of a large number of nodes, it may also affect the scalability of the algorithm. Therefore, improving the communication efficiency between PBFT consensus nodes is crucial to achieving consistency in the Internet of Vehicles system. In order to solve these problems, this paper proposes to group the vehicles on the network through the K-Medoids clustering algorithm, and optimize the consensus process of the PBFT algorithm based on the grouping results, improve the application efficiency of the PBFT algorithm in the Internet of Vehicles, reduce the communication consumption of the Internet of Vehicles consensus process, and reduce the communication delay. Summary of the invention

[0007] The purpose of the present invention is to provide a PBFT algorithm improvement method for vehicle network identity authentication to solve the problems raised in the above background technology.

[0008] In order to achieve the above-mentioned purpose, the present invention provides the following technical solution: grouping the online vehicles based on the K-Medoids clustering algorithm, and improving the PBFT consensus algorithm process during vehicle identity authentication according to the vehicle grouping results. In the present invention, only the vehicle is used as a consensus node, and the roadside unit is a trusted edge server with a fixed position. In the algorithm, it serves as the initial central node of the K-Medoids clustering algorithm and does not participate in the consensus process. The algorithm specifically includes the following steps:

[0009] S1: According to the size of the Internet of Vehicles environment and the available transmission range, determine the initial number of clusters k and select k edge servers as the initial clustering centers to match the vehicle nodes to the appropriate network;

[0010] S2: According to the distance between the vehicle node and the cluster center, the vehicles with shorter communication distance are divided into the nearest cluster center, and then the center of all points in each cluster is recalculated, requiring that the center point after iteration actually exists in the cluster;

[0011] S3: Continue the process of iteratively allocating and updating cluster centers, taking into account the size balance between clusters when updating until the stop condition is met. Finally, the number of objects in each node group is required to be similar to avoid imbalanced communication consumption caused by a large difference in number, which affects the overall consensus efficiency. In addition, after the grouping is completed, the identity information of the vehicle node will be updated with the group number;

[0012] S4: In this method, the nodes of the consensus network are divided into master nodes, consensus nodes and ordinary nodes. Each group contains at least master nodes and consensus nodes to ensure that each group can perform the complete consensus process and complete the grouping task. If the nodes in the group cannot meet the consensus requirements, re-grouping will be triggered.

[0013] S5: The consensus process after grouping is divided into intra-group consensus and inter-group consensus. Each node group conducts local consensus within the group, and inter-group consensus is achieved between different node groups, and finally a global consensus is reached.

[0014] S6: When the network is normal, the grouping will generally remain stable for a long time. If there is a problem that seriously affects the consensus result or after multiple consensus rounds, the grouping will be re-performed.

[0015] Furthermore, the detailed process of the grouping rule of S3 is that, during the initial clustering, k edge servers acting as the initial node centers are determined, grouped according to the communication distance between vehicles, and the Euclidean distance between the data object and the cluster center is calculated:

[0016]

[0017] Where x is the data object, o is the data center, and n is the dimension of the data. According to the calculation results, the vehicles are divided into the most different clusters, and then the cluster centers are updated iteratively.

[0018] For each cluster C i The intra-cluster cost function calculates the sum of the distances from all points in the cluster to the cluster center:

[0019]

[0020] Among them, K represents the number of clusters, n k is the number of points in the cluster.

[0021] Furthermore, the consensus network is divided into consensus groups G1, G2~G n , the vehicle identity authentication process is divided into intra-group consensus and inter-group consensus. The specific process is as follows: the consensus process is that the new vehicle Client sends a message to the nearest node group G p Initiate a network access request. After verification by the master node, send consensus requests to the consensus nodes in the group and other consensus groups respectively, achieve local consensus asynchronously in each group, simplify the consensus consistency protocol, and improve efficiency.

[0022] After each group reaches a local consensus, each node group G1~G n To G p The master node replies with the consensus result, and the master node replies with the result to the client. If the vehicle successfully enters the network through authentication, the identity of the vehicle will be updated and a group number attribute will be added. In the traditional PBFT algorithm, assuming there are n vehicle nodes, n(n-1) communication messages will be sent each time. The intra-group consensus protocol of the improved algorithm greatly reduces the amount of communication in the network, and the intra-group communication ensures that the communication delay between vehicles is within a low range, which speeds up the consensus speed.

[0023] Furthermore, based on the division of the consensus process in S5, Figure 2 As shown in the figure, the improved PBFT algorithm process includes: request phase, pre-preparation phase, intra-group preparation phase, intra-group confirmation phase, inter-group confirmation phase and reply phase. The specific steps are as follows:

[0024] Request phase: The new vehicle acts as a client node Client to the nearest node group G p The master node N Gp Send a network access request<Request,o,t,c> , where o is the specific operation requested, t is the timestamp appended by the client, and c is the client identifier.

[0025] Pre-preparation stage: master node Gp After receiving the Request message, the client's request is verified for legitimacy and correctness, that is, whether the request is issued by the Client, whether the Client identity is expired, and whether the Client's request is legal. If the verification passes, Node Gp Broadcast a <<Pre-Prepare,g,n,d,v> , m> message to the consensus nodes in the group and G1~G n Trusted Nodes Gn , where g is the group number, n is the client request number, d is the message summary, m is the message content, and v is the view where the node is located;

[0026] In-group preparation stage: G p The consensus node in the group receives the <<Pre-Prepare,g,n,d,v> , m> message, and then verify the content. After verification, store the result in the local buffer, broadcast it within the group, and send it to other nodes including the master node.<Prepare,g,n,d,i,v> message, where g represents the group number, n represents the client request number, i represents the consensus node number, d represents the message digest, and m represents the message content;

[0027] G1~G n Each group receives the master node N Gp Sent by<Pre-Prepare,g,n,d,v> , m> message and then broadcast it directly to the rest of the nodes in the group, and the node group G p Go through the same verification phase;

[0028] In-group confirmation phase: Each node receives 2 / 3 of the messages from the rest of the nodes in the group.<Prepare,g,n,d,i,v> After the message is received, the message is verified and broadcast to the rest of the nodes in the group after the verification is passed.<Commit,g,n,d,i,v> message, where g represents the group number, n represents the client request number, d represents the consensus node number, d represents the message digest, and v is the view where the node is located;

[0029] Inter-group confirmation stage: G p and G1~G n After each group reaches a consensus, it sends a<Group_Commit,g,v> message, where g represents the group number and v is the view where the node is located;

[0030] Reply phase: Master Node Gp After receiving confirmation messages from enough groups, the consensus result will be replied to the client. If it passes, the new vehicle will be successfully added to the network, the vehicle identity will be updated, and the group number will be assigned.

[0031] Furthermore, when the network is normal, the grouping is generally stable, and will automatically regroup after a long period of time or after multiple consensus rounds. When an abnormal situation occurs in the consensus network, regrouping will be triggered immediately, as follows:

[0032] The number of vehicle nodes that can participate in the consensus in a group cannot meet the requirements of the PBFT consensus algorithm. There may be more than f malicious nodes, which affects the consensus results in the group. In addition, if there is no selectable master node in the group or the efficiency of the group is too low, it needs to be regrouped;

[0033] When a certain number of nodes join or leave, resulting in the number of nodes in a node group being much larger or much smaller than the number of nodes in other groups, the communication delay difference may be too large due to the large difference in the number of nodes between groups, which may have a negative impact on network communication.

[0034] In addition, due to the mobility of vehicles, when the communication efficiency fluctuates or decreases significantly, it means that the communication distance between vehicles in the same group may be too far or there is a problem with the vehicle node network, and regrouping is required.

[0035] The present invention has at least the following beneficial effects

[0036] The present invention aims to improve the problems of high communication consumption, large number of communications, and difficult deployment in the Internet of Vehicles of the PBFT algorithm, and proposes to group vehicles on the network based on the K-Medoids clustering algorithm, and improve the PBFT consensus algorithm process during identity authentication based on the vehicle grouping results. Grouping nodes according to communication distance through the K-Medoids clustering algorithm can ensure that the communication delay within the group is as small as possible. The grouping method can also eliminate the impact of malicious nodes on the entire network to a certain extent, that is, the failure of the consensus of a certain group will not affect the consensus of the entire network, and it is conducive to locating the position of malicious nodes. The algorithm reduces the communication consumption in the network while improving the consensus efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 Simple diagram for grouping the Internet of Vehicles

[0038] Figure 2 Schematic diagram of the improved PBFT algorithm

[0039] Figure 3 Flowchart of the improved PBFT algorithm DETAILED DESCRIPTION

[0040] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the features in the following embodiments and embodiments can be combined with each other without conflict. Among them, the accompanying drawings are only used for exemplary description, and only schematic diagrams are represented, not physical diagrams, and cannot be understood as limitations on the present invention.

[0041] like Figures 1 to 3 As shown, an embodiment of the present invention provides an improved method for the PBFT consensus algorithm for the Internet of Vehicles, which groups online vehicles based on the K-Medoids clustering algorithm, and improves the PBFT consensus algorithm process during vehicle identity authentication based on the vehicle grouping results. In the present invention, only vehicles are used as consensus nodes, and the roadside unit is a trusted edge server with a fixed position. In the algorithm, it serves as the initial central node of the K-Medoids clustering algorithm and does not participate in the consensus process. The algorithm specifically includes the following steps:

[0042] S1: According to the size of the Internet of Vehicles environment and the available transmission range, determine the initial number of clusters k and select k edge servers as the initial clustering centers to match the vehicle nodes to the appropriate network;

[0043] S2: According to the distance between the vehicle node and the cluster center, the vehicles with shorter communication distance are divided into the nearest cluster center, and then the center of all points in each cluster is recalculated, requiring that the center point after iteration actually exists in the cluster;

[0044] S3: Continue the process of iteratively allocating and updating cluster centers, taking into account the size balance between clusters when updating until the stop condition is met. Finally, the number of objects in each node group is required to be similar to avoid imbalanced communication consumption caused by a large difference in number, which affects the overall consensus efficiency. In addition, after the grouping is completed, the identity information of the vehicle node will be updated with the group number;

[0045] S4: In this method, the nodes of the consensus network are divided into master nodes, consensus nodes and ordinary nodes. Each group contains at least master nodes and consensus nodes to ensure that each group can perform the complete consensus process and complete the grouping task. If the nodes in the group cannot meet the consensus requirements, re-grouping will be triggered.

[0046] S5: The consensus process after grouping is divided into intra-group consensus and inter-group consensus. Each node group conducts local consensus within the group, and inter-group consensus is achieved between different node groups, and finally a global consensus is reached.

[0047] S6: When the network is normal, the grouping will generally remain stable for a long time. If there is a problem that seriously affects the consensus result or after multiple consensus rounds, the grouping will be re-performed.

[0048] Furthermore, the detailed process of the grouping rule of S3 is that, during the initial clustering, k edge servers acting as the initial node centers are determined, grouped according to the communication distance between vehicles, and the Euclidean distance between the data object and the cluster center is calculated:

[0049]

[0050] Where x is the data object, o is the data center, and n is the dimension of the data. According to the calculation results, the vehicles are divided into the most different clusters, and then the cluster centers are updated iteratively.

[0051] For each cluster C i The intra-cluster cost function calculates the sum of the distances from all points in the cluster to the cluster center:

[0052]

[0053] Among them, K represents the number of clusters, n k is the number of points in the cluster.

[0054] Furthermore, the consensus network is divided into consensus groups G1, G2~G n , the vehicle identity authentication process is divided into intra-group consensus and inter-group consensus. The specific process is as follows: the consensus process is that the new vehicle Client sends a message to the nearest node group G p Initiate a network access request. After verification by the master node, send consensus requests to the consensus nodes in the group and other consensus groups respectively, achieve local consensus asynchronously in each group, simplify the consensus consistency protocol, and improve efficiency.

[0055] After each group reaches a local consensus, each node group G1~G n To G p The master node replies with the consensus result, and the master node replies with the result to the client. If the vehicle successfully enters the network through authentication, the identity of the vehicle will be updated and a group number attribute will be added. In the traditional PBFT algorithm, assuming there are n vehicle nodes, n(n-1) communication messages will be sent each time. The intra-group consensus protocol of the improved algorithm greatly reduces the amount of communication in the network, and the intra-group communication ensures that the communication delay between vehicles is within a low range, which speeds up the consensus speed.

[0056] Furthermore, based on the division of the consensus process in S5, Figure 2As shown in the figure, the improved PBFT algorithm process includes: request phase, pre-preparation phase, in-group preparation phase, in-group confirmation phase, inter-group confirmation phase, and reply phase. The specific steps are as follows:

[0057] Request phase: The new vehicle, as the client node Client, sends an access request <Request, o, t, c> to the primary node of the nearest node group G p where o is the specific operation of the request, t is the timestamp appended by the client, and c is the client identifier.

[0058] Pre-preparation phase: After receiving the Request message, the primary node verifies the legality and correctness of the client Client's request, that is, verifies whether the request is sent by the Client, whether the Client's identity has expired, and whether the Client's request is legal. If the verification passes, broadcasts a message <<Pre-Prepare, g, n, d, v>, m> to the consensus nodes within the group and the trusted nodes of G1~G n where g is the group number, n is the client request number, d is the message digest, m is the message content, and v is the view where the node is located;

[0059] In-group preparation phase: After receiving the message <<Pre-Prepare, g, n, d, v>, m> sent by the primary node, the consensus nodes within the Gp group verify the content. After the verification passes, they store the result in the local buffer and perform in-group broadcast, sending a <Prepare, g, n, d, i, v> message to other nodes including the primary node, where g represents the group number, n represents the client request number, i represents the consensus node number, d represents the message digest, and m represents the message content;

[0060] G1~G n After each group receives the message <<Pre-Prepare, g, n, d, v>, m> sent by the primary node N Gp it directly broadcasts it to the remaining nodes within the group and performs the same verification phase as the node group G p ;

[0061] In-group confirmation phase: After each node receives 2 / 3 <Prepare, g, n, d, i, v> messages from the remaining nodes within the group, it verifies the messages. After the verification passes, it broadcasts a <Commit, g, n, d, i, v> message to the remaining nodes within the group, where g represents the group number, n represents the client request number, d represents the consensus node number, d represents the message digest, and v is the view where the node is located;

[0062] Inter-group confirmation phase: G​​p and G1~G n After each group reaches a consensus, it sends a<Group_Commit,g,v> message, where g represents the group number and v is the view where the node is located;

[0063] Reply phase: Master Node Gp After receiving confirmation messages from enough groups, the consensus result will be replied to the client. If it passes, the new vehicle will be successfully added to the network, the vehicle identity will be updated, and the group number will be assigned.

[0064] Furthermore, when the network is normal, the grouping is generally stable, and will automatically regroup after a long period of time or after multiple consensus rounds. When an abnormal situation occurs in the consensus network, regrouping will be triggered immediately, as follows:

[0065] The number of vehicle nodes that can participate in the consensus in a group cannot meet the requirements of the PBFT consensus algorithm. There may be more than f malicious nodes, which affects the consensus results within the group. In addition, if there is no selectable master node in the group or the efficiency of the group is too low, it also needs to be regrouped;

[0066] When a certain number of nodes join or leave, resulting in the number of nodes in a node group being much larger or smaller than that in other groups, the communication delay difference may be too large due to the large difference in the number of nodes between groups, which will have a negative impact on network communication.

[0067] In addition, due to the mobility of vehicles, when the communication efficiency fluctuates or decreases significantly, it means that the communication distance between vehicles in the same group may be too far or there is a problem with the vehicle node network, and regrouping is required.

[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. An improved method of PBFT algorithm for Internet of Vehicles identity authentication, characterized by: The vehicle nodes are grouped based on the K-Medoids clustering algorithm, and the consensus process is improved according to the grouping results, which includes the following steps: S1: According to the size of the Internet of Vehicles environment and the available transmission range, determine the initial number of clusters k and select k edge servers as the initial clustering centers to match the vehicle nodes to the appropriate network; S2: According to the distance between the vehicle node and the cluster center, the vehicles with shorter communication distance are divided into the nearest cluster center, and then the center of all points in each cluster is recalculated, requiring that the center point after iteration actually exists in the cluster; S3: Continue the process of iteratively allocating and updating cluster centers, taking into account the size balance between clusters when updating until the stop condition is met. Finally, the number of objects in each node group is required to be similar to avoid imbalanced communication consumption caused by a large difference in number, which affects the overall consensus efficiency. In addition, after the grouping is completed, the identity information of the vehicle node will be updated with the group number; S4: In this method, the nodes of the consensus network are divided into master nodes, consensus nodes and ordinary nodes. Each group contains at least master nodes and consensus nodes to ensure that each group can perform the complete consensus process and complete the grouping task. If the nodes in the group cannot meet the consensus requirements, re-grouping will be triggered. S5: The consensus process after grouping is divided into intra-group consensus and inter-group consensus. Each node group conducts local consensus within the group, and inter-group consensus is achieved between different node groups, and finally a global consensus is reached. S6: When the network is normal, the grouping will generally remain stable for a long time. If there is a problem that seriously affects the consensus result or after multiple consensus rounds, the grouping will be re-performed.

2. According to claim 1, a PBFT algorithm improvement method for vehicle network identity authentication is characterized in that: Trusted roadside unit vehicles only serve as initial clustering centers and do not participate in the subsequent consensus process. Only the grouped online vehicle nodes serve as consensus nodes.

3. According to claim 1, the improved method of PBFT algorithm for vehicle network identity authentication is characterized in that: When grouping nodes, the K-Medoids clustering algorithm is used to divide the nodes into multiple consensus groups based on the communication distance between nodes. In the initial grouping, random selection is not adopted. Instead, k suitable roadside units are pre-selected as the initial clustering centers based on the vehicle network size and vehicle distribution, and the Euclidean distance between the vehicle and the clustering center is calculated.

4. According to claim 1, the improved method of PBFT algorithm for vehicle network identity authentication is characterized in that: The cluster centers are continuously iterated, and nodes that actually exist are selected as cluster centers until the cluster centers no longer change. In addition, the size balance of the clusters is considered during the update, and the data set is finally clustered into k groups with similar numbers of nodes, and the intra-group and inter-group consensus are performed based on the grouping.

5. According to claim 1, the improved method of PBFT algorithm for vehicle network identity authentication is characterized in that: The improved PBFT consensus process based on the grouping results includes six processes: request phase, pre-preparation phase, intra-group preparation phase, intra-group confirmation phase, inter-group confirmation phase, and reply phase: In the request phase, the new vehicle initiates a network access request message to the nearest vehicle node group; in the pre-preparation phase, the master node forwards the message that has passed the preliminary verification to the nodes within the group and the remaining groups; in the preparation phase, each group reaches a consensus; in the group confirmation phase, the consensus message is confirmed within the group; in the inter-group confirmation phase, after a group receives enough confirmation messages, it sends a confirmation message representing the group to the remaining groups; in the reply phase, the master node replies to the client with the consensus result. If the authentication is successful, the new vehicle successfully enters the network, updates the vehicle identity information, and assigns a group number, otherwise the network access fails.

6. According to claim 1, a PBFT algorithm improvement method for vehicle network identity authentication is characterized in that: Under normal circumstances, the grouping is stable, and the network will not be regrouped if the number of grouped nodes fluctuates within an acceptable range. However, due to the dynamic nature of the vehicle, the node network will be regrouped when it is detected that the consensus effects between different groups are too different, the number of nodes in some groups is too large or too small, and after a certain number of consensus rounds have been completed.

Citation Information

Patent Citations

  • Block chain node consensus method for secure communication in Internet of Vehicles

    CN114449476A

  • Layered architecture-oriented PBFT consensus node dynamic adjustment method

    CN114640466A

  • Packet Byzantine fault-tolerant algorithm based on dynamic trust model

    CN115271724A