Construction method and application of PST-PBFT consensus algorithm model

By constructing node reputation values ​​and grouping contour matrices, the communication method of the PBFT consensus algorithm is optimized, which solves the problems of arbitrary master node selection and high communication complexity, improves the stability and fault tolerance of the blockchain system, and achieves an efficient consensus process.

CN120675757APending Publication Date: 2025-09-19ZUNYI MEDICAL COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510789547.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

The existing PBFT consensus algorithm has problems such as arbitrary master node selection, high communication complexity, and interference of malicious nodes in the consensus process.

Method used

By constructing the node reputation value contour matrix and the node grouping contour matrix, the nodes are divided into high reliability group, ordinary group and low reliability group according to indicators such as the node consensus completion rate, consensus time interval, communication completion rate and malicious rate. In the consistency protocol process, different communication methods are selected according to the node characteristics of different groups. The high reliability group nodes adopt one-way communication, the ordinary group adopts the communication method of verifying view number, sequence number, summary and unified coloring value, and the low reliability group adopts the traditional point-to-point communication method.

Benefits of technology

It effectively reduces communication latency and complexity, improves the stability and reliability of blockchain communication, enhances the fault tolerance and throughput performance of the blockchain system, and optimizes consensus efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120675757A_ABST
    Figure CN120675757A_ABST
Patent Text Reader

Abstract

The invention discloses a construction method and application of a PST-PBFT consensus algorithm model, and aims to solve the problems of random selection of a main node, too high communication complexity, interference of a bad node and the like in an existing PBFT consensus algorithm. The method comprises the following steps: firstly, constructing a node reputation value contour matrix, a consensus completion rate based on nodes, a time interval, a communication completion rate, a disability rate and other indexes; secondly, dividing nodes into a high-reliability group, a common group and a low-reliability group according to the matrix; then determining a main node and a consensus node in a pre-preparation stage, and realizing inter-group and intra-group consensus; and finally, in the consistency protocol process, different communication modes are selected according to the unified coloring value of the nodes, so that the communication time delay and complexity are reduced. The model is applied to a block chain system, and stability and reliability of block chain communication are remarkably improved by optimizing a PBFT consistency protocol.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a method for constructing a PST-PBFT consensus algorithm model and its application. Background Art

[0002] Practical Byzantine Fault Tolerance (PBFT) is a blockchain consensus algorithm primarily used in consortium blockchains. It effectively addresses the problem of dishonest communication between nodes, further improving the stability and reliability of blockchain communication. However, the PBFT consensus algorithm suffers from issues such as arbitrary master node selection and excessive communication complexity. Consequently, numerous researchers have conducted research on optimizing the PBFT consensus algorithm. One paper optimized the PBFT consensus algorithm by evaluating the trustworthiness of consensus nodes using ID3 and C4.5 decision trees. However, this solution lacked a penalty mechanism for high-weight nodes that fail. Another paper proposed a Practical Byzantine Fault Tolerance (P-PBFT) algorithm for medicine based on grouping and credit voting by optimizing the consensus protocol. However, this algorithm failed to verify the identity of nodes joining the network. Another paper proposed the Me-PBFT consensus algorithm based on a dual-consensus layer, but failed to address how to control the node ratio during the consensus process. This paper addresses these issues of the PBFT consensus algorithm by employing a polychromatic set contour matrix. This not only analyzes the relationship between consensus nodes and their attributes, but also provides a formal description of the PBFT consensus protocol.

[0003] Professor Pavlov of Russia proposed the Polychromatic Set Theory (PST) architecture and related concepts between 1988 and 2002. As a mathematical tool for describing and processing complex objects, PST can use contour matrices within polychromatic sets to describe the properties, attributes, and relationships between elements of various objects. This paper uses PST to optimize the consensus protocol of the PBFT consensus algorithm and analyzes the performance of the optimized PST-PBFT consensus algorithm. Summary of the Invention

[0004] The present invention aims to provide a method for constructing a PST-PBFT consensus algorithm model and its application, in order to solve the problems of arbitrary master node selection, high communication complexity, and interference of malicious nodes in the consensus process in the existing PBFT consensus algorithm.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for constructing a PST-PBFT consensus algorithm model, comprising the following steps:

[0006] Step 1: Construct a node reputation value contour matrix based on the node's consensus completion rate, consensus time interval, communication completion rate, and malicious rate.

[0007] Step 2: Construct a node grouping contour matrix and divide the nodes into high reliability group, normal group and low reliability group according to the node reputation value contour matrix;

[0008] Step 3: Determine the master node and consensus node based on the node grouping contour matrix, and group the nodes in the pre-preparation phase to achieve inter-group and intra-group consensus.

[0009] Step 4: During the consistency protocol, different communication methods are selected according to the unified coloring value of the node to reduce communication delay and complexity.

[0010] Specifically, the construction of the node reputation value contour matrix includes: calculating the consensus completion rate of the node, that is, the ratio of the number of times the node successfully completes the entire process of the consistency protocol to the number of times it participates in the consensus; calculating the consensus time interval of the node, that is, the ratio of the start time of receiving the master node broadcast to the consensus completion time; calculating the communication completion rate of the node, that is, the ratio of the number of successful communications of the node in the group to the total number of communications; calculating the malicious rate of the node, that is, the ratio of the number of times the node commits malicious acts to the number of communications.

[0011] Specifically, the construction of the node grouping contour matrix includes the following rules: if the uniform coloring value of the node is 1, the node belongs to the high reliability group; if the uniform coloring value of the node is less than 1, the node belongs to the ordinary group; if the uniform coloring value of the node is 0, the node belongs to the low reliability group.

[0012] Specifically, during the consistency protocol process, the communication method is selected according to the unified coloring value of the node, including: for high-reliability group nodes, a one-way communication method is adopted; for ordinary group nodes, a communication method of verifying view number, sequence number, summary and unified coloring value is adopted; for low-reliability group nodes, a traditional point-to-point communication method is adopted.

[0013] Specifically, after the consensus protocol is completed, the node reputation value contour matrix is ​​dynamically adjusted according to the node's personal color to reflect the node's performance in the consensus process.

[0014] An application of the PST-PBFT consensus algorithm model, wherein the model is applied to a blockchain system, and by optimizing the consistency protocol process of the PBFT consensus algorithm, communication latency and complexity are reduced, and the stability and reliability of blockchain communication are improved.

[0015] The principle and beneficial effects of this technical solution:

[0016] The principles and beneficial effects of this technical solution can be summarized as follows:

[0017] Based on Polychromatic Sets Theory (PST), the traditional Practical Byzantine Fault Tolerance (PBFT) algorithm is optimized by constructing a node reputation contour matrix and a node grouping contour matrix. First, a node reputation contour matrix is ​​established based on metrics such as consensus completion rate, consensus time interval, communication completion rate, and malicious behavior rate. Nodes are then divided into high-reliability, standard, and low-reliability groups. During the consensus protocol, different communication methods are selected based on the characteristics of nodes in different groups. The high-reliability group uses one-way communication, the standard group uses communication that verifies view numbers, sequence numbers, digests, and uniform coloring values, and the low-reliability group uses traditional point-to-point communication. This selection of grouping and communication methods effectively reduces communication latency and complexity. After the consensus protocol is completed, the node reputation contour matrix is ​​dynamically adjusted based on the node's individual color to reflect the node's performance during the consensus process, further optimizing the node grouping and communication strategy.

[0018] The problem of arbitrary master node selection in the PBFT consensus algorithm is solved. Through the quantitative evaluation of node reputation values, the nodes in the high-reliability group are ensured to become the master nodes and consensus nodes, thereby avoiding the interference of malicious nodes in the consensus process; the communication delay and complexity are reduced. Through grouping strategies and optimized communication methods, unnecessary communication overhead between nodes is reduced. Especially in the communication process between the high-reliability group and the ordinary group, the consensus efficiency is significantly improved by reducing the number of point-to-point communications; the stability and reliability of the blockchain system are improved. The optimized PST-PBFT algorithm has stronger fault tolerance when facing malicious nodes. At the same time, it can maintain good throughput performance under different node numbers, enhancing the overall performance of the blockchain system. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is the PBFT consensus protocol process diagram;

[0020] Figure 2 This is the PST-PBFT consensus protocol process diagram;

[0021] Figure 3 This is the flow chart of the PST-PBFT consensus algorithm;

[0022] Figure 4 This is the communication overhead diagram between PST-PBFT and PBFT;

[0023] Figure 5 This is the PST-PBFT and PBFT consensus delay diagram;

[0024] Figure 6 The following is a throughput comparison chart between PST-PBFT and PBFT. DETAILED DESCRIPTION

[0025] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments:

[0026] 1 multicolor set

[0027] Traditional mathematical tools in set theory can only indicate the elements that make up a set, but cannot describe the properties of the set and its elements. Polychromatic sets, on the other hand, are based on coloring the elements of a common set A with different "colors," namely individual colors F(a). The entire set A is then colored with a uniform color F(A), using the concept of "contours" to formalize the attributes, parameters, and properties of the elements. The mathematical expression for polychromatic sets is:

[0028] PS=(A,F(A),F(a),[A×F(A)],[A×F(a)],[A×A(F)])

[0029] Where A={a1,a2,…,a n}, F(a)={f1,f2,…,f t}, F(A)={F1,F2,…,F k}, the contour matrices [A×F(A)], [A×F(a)], [A×A(F)] represent the relationship between the set A and its unified color, individual color, and aggregate, respectively.

[0030] Among them, the expression of [A×F(a)] is:

[0031]

[0032] If f j ∈F(a), then c ij =1, otherwise, c ij =0.

[0033] The expression of [F(a)×F(A)] is:

[0034]

[0035] If the uniform coloring F u Subject to personal coloring j The influence of c ju =1, otherwise, c ju = 0. Then, the uth column Boolean vector represents the influence of the uniform coloring F(A) on the individual coloring F(a), denoted by F u (A), F u The expression of (A) is:

[0036] F u (A)=(f1,f2,…,f j ,…f k )

[0037] The uniform coloring F(A) is composed of elements A, that is, the expression of the body A(Fu) is:

[0038] A(F u )=(a u1 ,a u2 ,…a ui ,…,a un )

[0039] 2 Practical Byzantine Fault Tolerance Algorithm Based on Polychromatic Set Theory (PST-PBFT)

[0040] The PBFT consensus algorithm is essentially a state machine replication algorithm. To ensure state consistency between nodes, PBFT builds a consensus protocol, a view change protocol, and a checkpoint protocol. The consensus protocol is a key protocol in the PBFT consensus algorithm, and its execution steps include five phases: request, pre-prepare, prepare, confirm, and reply.

[0041] like Figure 1 As shown in the figure, the PBFT consensus protocol process consists of the client, the master node, and three backup nodes. The vertical dotted lines represent the five processes of the consensus protocol. In the request phase, the client sends a request to the master node. In the pre-preparation phase, the master node broadcasts messages to other backup nodes. Point-to-point communication is achieved between the preparation and confirmation interpretation nodes. In the reply phase, the node responds to the client's reply.

[0042] Because point-to-point communication during the preparation and confirmation phases results in high communication latency and complexity in the PBFT consensus algorithm, this paper utilizes a polychromatic set contour matrix to construct a node reputation contour matrix. First, this solves the problem of arbitrary master node selection in the PBFT consensus algorithm. Second, by using a uniform coloring F(A) to represent node reliability, nodes are grouped during the preparation phase, achieving both inter-group and intra-group consensus, and reducing communication latency and complexity during the preparation and reply phases.

[0043] Constructing the node reputation value contour matrix: Constructing the node reputation value contour matrix based on the node's consensus completion rate, consensus time interval, communication completion rate, and malicious rate. Assume that the node set A is recorded as:

[0044] A=(a1,a2,a3,a4,a5)

[0045] The consensus completion rate (C) refers to the ratio of the number of times a node successfully completes the entire consensus protocol process (Ci) to the number of times it participates in consensus (Cs), which can be expressed as the formula:

[0046] C=C i / C s

[0047] The consensus time interval (T) refers to the ratio of the start time (Ts) of receiving the broadcast from the master node to the consensus completion time (Tc), and can be expressed as:

[0048] T = T s / T c

[0049] The communication completion rate (CM) refers to the ratio of the number of successful communications (CMc) among the nodes in the group to the total number of communications (CMs), and can be expressed as:

[0050] CM = CM c / CM s

[0051] The misbehavior rate (D) refers to the ratio of the number of misbehaviors (Dt) of a node to the number of communications (CMs), and can be expressed by the formula:

[0052] D = D t / CM s

[0053] [[ID=2-7]]The personal coloring F(a) of the node set A is denoted by the formula:

[0054] F(a) = (f1, f2, f3, f4) <00001^74>Where, if C ≥ 0.8, then f1 = 1; otherwise, f1 = 0. If T ≤ 0.3, then f2 = 1; if 0.3 < T ≤ 1, then f2 = -1; otherwise, f2 = 0. If CM = 1, then f3 = 1; if 0.6 < CM ≤ 1, then f3 = -1; otherwise, f3 = 0. If D = 0, then f4 = 1; if 0 < D ≤ 0.3, then f4 = -1; otherwise, f1 = 0

[0056] The node reputation value contour matrix can be formalized as:

[0057]

[0058] The construction of the node grouping contour matrix can be formalized as a formula:

[0059]

[0060] According to the [A × F(a)] contour matrix, the node grouping logic rules can be established:

[0061] If (f1 ∩ f2 ∩ f3 ∩ f4) = 1, then F1 = 1. The node a composed of A(F1) i Belongs to the nodes of the high-reliability group, and the master node and the consensus node are generated by the nodes within A(F1).

[0062] If (f1 + f2 + f3 + f4) < 0, then the node a composed of A(F2) j Belongs to the nodes of the ordinary group. It should be noted that there seems to be a small error in the original text where "if 0 < D ≤ 0.3, then f4 = -1, otherwise, f1 = 0" in item ID=33 might be a miswriting. I translated it as it is in the original text. If you have any other questions, please feel free to let me know.

[0063] If (f1∩f2∩f3∩f4)=0, the node a in A(F3) k Belongs to the low reliability group and may be a malicious node. However, if f4=0, A(F i ) are definitely malicious nodes.

[0064] According to the above formula, we can know that:

[0065] A(F1)=(a1,a3)A(F2)=(a2)A(F3)=(a4,a5)

[0066] Therefore, PST-PBFT can be formalized as:

[0067] PST-PBFT=((A H ,A N ,A L ),[(A H ,A N ,A L )×F(a)],

[0068] [(A H ,A N ,A L )×F(A)],[(A H ,A N ,A L )×A(F)]

[0069] The process of building a PST-PBFT consensus protocol based on reputation value

[0070] According to the node reputation value contour matrix and contour body A(F), the nodes are divided into high reliability group, normal group and low reliability group.

[0071] like Figure 2 As shown, for a high-reliability node group with F1 = 1, both the master node and the consensus node are generated from A(F1), ensuring that the nodes will not act maliciously during the consensus process. Therefore, the pre-preparation and preparation nodes only need to check the node's F1 value, and no point-to-point interaction is required. Consensus node 1 encrypts the <pre-preparation message, view number, sequence number, F1 value> and broadcasts it to the nodes in the group; it then sends the consensus result to the master node, which needs to verify the consensus node's view number, sequence number, and F1 value before responding.

[0072] For ordinary group nodes with F2<0, the preparation phase is different from that of the high-reliability group. Nodes within the group need to verify that the view number, sequence number, F2 value, and message digest are correct and then feedback to consensus node 2 before entering the confirmation and reply phase.

[0073] For the nodes in the reliable group with F3=0, point-to-point communication needs to be implemented in the preparation phase to avoid the occurrence of malicious node problems.

[0074] Because the PBFT consensus algorithm can tolerate f malicious nodes, after the communication nodes of the high-reliability group and the normal group receive replies from n-f+1 nodes, they can enter the communication with the next node.

[0075] like Figure 3 As shown, the PST-PBFT algorithm process is as follows:

[0076] Step 1: Construct the node reputation value contour matrix [A×F(a)];

[0077] Step 2: Construct node grouping contour matrices [F(A)×F(a)], [A×A(F)];

[0078] Step 3: Determine whether the node belongs to the high reliability group AH, the normal group AN, or the low reliability group AL based on the values ​​of (F1, F2, F3) in [A×A(F)].

[0079] Step 4: If a i ∈A H →Hige_Reliability(),a i ∈A N →Normal(), otherwise, execute Low_Fault().

[0080] Step 5: After the PST-PBFT consensus protocol process is completed, the node reputation contour matrix [A×F(a)] is dynamically adjusted according to the personal color fi of the node ai.

[0081] 3 Theoretical Analysis and Simulation Experiments

[0082] 3.1 Analysis of the PST-PBFT Consensus Protocol Process

[0083] PST-PBFT leverages the advantages of polychromatic set theory in modeling complex processes. Before consensus, nodes are grouped according to their individual colors, unified colors, and bodies, and divided into high-reliability groups, normal groups, and low-reliability groups.

[0084] First, the master node and consensus node are generated from a highly reliable group of nodes, preventing malicious nodes from becoming master nodes. Second, nodes with a uniform color F1 of 1 form the first group of intra-group consensus nodes. Because this group of nodes is highly reliable, during the consensus process, nodes only need to verify the value of F1. During the final confirmation phase, the master node verifies the <view number, sequence number, digest> information, reducing consensus latency. Finally, because the original PBFT requires point-to-point communication during the prepare and reply phases, which increases communication overhead, PST-PBFT selects different communication methods during the prepare and reply phases based on the value of the node's uniform color Fi. If F1 = 1, intra-group nodes communicate with the consensus node and master node in a one-way manner. If F2 < 0, the communication method is the same as when F1 = 1, but the node's <view number, sequence number, digest, and F2 value> must be verified to ensure reliable node communication. If F3 = 0, traditional PBFT communication methods are used. Due to PBFT's fault tolerance, the consensus process can be terminated early after the valid node count is reached in the first two phases.

[0085] 3.2 PST-PBFT Simulation Experiment Analysis

[0086] To verify the effectiveness of the PST-PBFT consensus algorithm, experimental simulations were conducted on an Intel(R) Core(TM) i3-10110U 2.1GHZ 8GB RAM Windows 10 system environment and PyCharm software environment. PST-PBFT was compared with PBFT in terms of consensus latency and throughput.

[0087] 3.2.1 Communication Overhead

[0088] The number of communications refers to the number of messages transmitted between nodes. The number of communications in the traditional PBFT consensus algorithm can be expressed as follows:

[0089] C=(N-1)+(N-1)*(N-1)+N*N-1=2N 2 -2N

[0090] Among them, C represents the number of communications and N represents the number of nodes

[0091] PST-PBFT has been improved in the preparation and reply phases based on the uniform coloring of nodes. The number of communications in the optimal state can be expressed by the following formula:

[0092] C=3+(N-4)+N-4+3+3+4=2N+5

[0093] The worst-case communication times can be expressed by the following formula:

[0094] C=3+(N-4)+(NK)+K 2+K+3+4=2N+K 2 +9

[0095] Where K represents the number of AL nodes. The comparison of the number of communications between PST-PBFT and PBFT is as follows: Figure 5 As shown in the figure, PST-PBFT is optimized into point-to-point communication in the preparation and submission phases, reducing communication complexity.

[0096] 3.2.2 Consensus Delay

[0097] The consensus delay comparison refers to the time delay comparison required for the consensus process of different consensus algorithms under the same operating environment. The initial node value is 10, and the step value is increased by 10 to ensure the accuracy of the experiment. The experiment is run 10 times with different numbers of nodes, and the average of the running results is taken as the final result of the experiment. The consensus delay effects of PBFT and PST-PBFT are shown in Figure (5):

[0098] Figure 4 In the figure, PBFT-1 and PST-PBFT-1 represent the consensus latency when only honest nodes participate in consensus, while PBFT-2 and PST-PBFT-2 represent the consensus latency when both honest and malicious nodes participate. Simulation results demonstrate that the improved PST-PBFT reduces communication complexity during the pre-prepare and prepare phases, thereby improving the consensus latency of PST-PBFT.

[0099] 3.2.3 Throughput

[0100] Throughput (TPS) comparison refers to the amount of data transmitted by completing transactions per unit time under the same environment (communication). It can be expressed by the following formula:

[0101] TPS = Communication / t

[0102] according to Figure 6 As can be seen, the PBFT consensus algorithm reaches peak throughput when the number of nodes is between 20 and 60. However, as the number of nodes increases, the throughput drops sharply. However, the PST-PBFT consensus algorithm maintains a relatively stable throughput, fluctuating between 0.8 transactions / ms. When the number of nodes reaches 80, the throughput of the PBFT and PST-PBFT consensus algorithms is similar. With a small number of nodes, the PBFT consensus algorithm has better throughput. As the number of nodes increases, the PST-PBFT consensus algorithm has a clear advantage over the PBFT consensus algorithm.

[0103] Example: Application of the PST-PBFT consensus algorithm model in the medical blockchain system

[0104] 1. System Architecture Design

[0105] The medical blockchain system designed in this embodiment adopts a layered architecture, which mainly includes a data layer, a network layer, a consensus layer, and an application layer. Each layer works together to achieve secure storage, efficient transmission, and reliable consensus of medical data.

[0106] 2 Data Layer

[0107] The data layer is responsible for the storage and management of medical data. Medical data (such as patient records, examination reports, and diagnostic results) is divided into multiple data blocks and stored on different nodes in the blockchain network. Each node maintains a copy of the data, ensuring redundancy and availability. Through blockchain's distributed ledger technology, data storage and access are tamper-proof and traceable, ensuring the authenticity and integrity of medical data.

[0108] 3 Network Layer

[0109] The network layer is the foundation for communication between nodes in the system. Nodes communicate via secure network protocols, transmitting encrypted data and consensus messages. During communication, encryption technology is used to ensure data security during transmission and prevent data leakage and tampering. Furthermore, the network layer supports efficient communication between nodes, supporting the rapid consensus of the consensus layer.

[0110] 4. Consensus Layer

[0111] The consensus layer is the core of the medical blockchain system and uses the PST-PBFT consensus algorithm to ensure data consistency. The specific implementation steps are as follows:

[0112] Node reputation evaluation: A node reputation contour matrix is ​​constructed based on indicators such as the node's consensus completion rate, consensus time interval, communication completion rate, and malicious rate to quantitatively evaluate the reliability of each node.

[0113] Node grouping: Based on the node reputation matrix, nodes are divided into high reliability, normal, and low reliability groups. Nodes in the high reliability group have higher reputations, nodes in the normal group have medium reputations, and nodes in the low reliability group have lower reputations and may pose a risk of malicious activity.

[0114] Masternode and consensus node selection: During the pre-preparation phase, masternodes and consensus nodes are selected from a high-reliability group. Because the nodes in this group have a high reputation, they can effectively prevent malicious nodes from interfering with the consensus process, ensuring the security and reliability of the consensus.

[0115] Consensus Process Optimization: During the consensus protocol, different communication methods are selected based on the characteristics of different groups of nodes. High-reliability group nodes use one-way communication, standard group nodes use a communication method that verifies the view number, sequence number, digest, and unified coloring value, and low-reliability group nodes use traditional point-to-point communication. This selection of grouping and communication methods effectively reduces communication latency and complexity, improving consensus efficiency.

[0116] Dynamic adjustment: After the consensus protocol is completed, the node reputation value contour matrix is ​​dynamically adjusted according to the node's performance in the consensus process, further optimizing the node grouping and communication strategies to ensure that the system remains efficient and stable during long-term operation.

[0117] 5 Application Layer

[0118] The application layer provides the user interface of the medical information system for medical staff to query, enter and update data. Specific functions include:

[0119] Data query: Medical staff can quickly query patients' medical records, examination reports and other medical data through the system interface. The system obtains the latest data in real time through the blockchain network to ensure the timeliness and accuracy of the data.

[0120] Data entry and update: Medical staff can enter new medical data or update existing data. When entering or updating data, the system triggers the PST-PBFT consensus algorithm to ensure that all nodes maintain consistent results for the same data, ensuring data consistency and integrity.

[0121] Data Sharing: Supports data sharing with other medical systems. Through blockchain technology, medical data can be shared securely and efficiently between different medical institutions, promoting the integration and coordination of medical resources and improving the quality and efficiency of medical services.

[0122] 6 Experimental Verification

[0123] To verify the effectiveness of the PST-PBFT consensus algorithm in a medical blockchain system, a simulation experiment was conducted. The experimental environment was Windows 10, and the PyCharm development tool was used for the simulation.

[0124] Communication Overhead Comparison: Experimental results show that PST-PBFT significantly reduces communication complexity by optimizing communication methods during the prepare and reply phases. Compared to traditional PBFT algorithms, PST-PBFT reduces communication times by approximately 30% to 50%, effectively reducing communication overhead.

[0125] Comparison of consensus latency: PST-PBFT significantly outperforms PBFT in terms of consensus latency at different node counts. When only honest nodes participate in consensus, PST-PBFT achieves a latency reduction of approximately 20% to 30% compared to PBFT. When both honest and malicious nodes are present, PST-PBFT achieves a latency reduction of approximately 30% to 40%, demonstrating PST-PBFT's superiority in improving consensus efficiency.

[0126] Throughput Comparison: When the number of nodes is small, the throughput of PST-PBFT and PBFT is comparable. As the number of nodes increases, PST-PBFT's throughput becomes more stable, and it has a clear advantage at high node counts. Experimental results show that when the number of nodes reaches 80, PST-PBFT's throughput remains around 0.8 messages / ms, while PBFT's throughput drops sharply, demonstrating the efficiency and stability of PST-PBFT when handling large numbers of nodes.

[0127] 7 Conclusion

[0128] This example applies the PST-PBFT consensus algorithm model to a medical blockchain system, effectively addressing issues inherent in traditional PBFT algorithms, such as arbitrary master node selection, excessive communication complexity, and malicious node interference with the consensus process. Experimental results demonstrate that PST-PBFT outperforms traditional PBFT algorithms in terms of communication overhead, consensus latency, and throughput. It provides strong support for the secure storage, efficient transmission, and reliable consensus of medical data, and holds broad application prospects.

[0129] The above is only an embodiment of the present invention, and common knowledge such as the specific technical solutions or characteristics in the solution is not described in detail here. For those skilled in the art, without departing from the technical solution of the present invention, several variations and improvements can be made, which should also be regarded as the scope of protection of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the description can be used to interpret the content of the claims.

Claims

1. A method for constructing a PST-PBFT consensus algorithm model, characterized in that: The following steps are involved: Step 1: Construct a node reputation value contour matrix based on the node's consensus completion rate, consensus time interval, communication completion rate, and malicious rate. Step 2: Construct a node grouping contour matrix and divide the nodes into high reliability group, normal group and low reliability group according to the node reputation value contour matrix; Step 3: Determine the master node and consensus node based on the node grouping contour matrix, and group the nodes in the pre-preparation phase to achieve inter-group and intra-group consensus. Step 4: During the consistency protocol, different communication methods are selected according to the unified coloring value of the node to reduce communication delay and complexity.

2. The method for constructing a PST-PBFT consensus algorithm model according to claim 1, characterized in that: The construction of the node reputation value contour matrix includes: calculating the consensus completion rate of the node, that is, the ratio of the number of times the node successfully completes the entire process of the consistency protocol to the number of times it participates in the consensus; calculating the consensus time interval of the node, that is, the ratio of the start time of receiving the master node broadcast to the consensus completion time; calculating the communication completion rate of the node, that is, the ratio of the number of successful communications of the node in the group to the total number of communications; calculating the malicious rate of the node, that is, the ratio of the number of malicious times of the node to the number of communications.

3. The method for constructing a PST-PBFT consensus algorithm model according to claim 1, characterized in that: The construction of the node grouping contour matrix includes the following rules: if the uniform coloring value of the node is 1, the node belongs to the high reliability group; if the uniform coloring value of the node is less than 1, the node belongs to the ordinary group; if the uniform coloring value of the node is 0, the node belongs to the low reliability group.

4. The method for constructing a PST-PBFT consensus algorithm model according to claim 1, characterized in that: During the consistency protocol process, the communication method is selected according to the unified coloring value of the node, including: for high-reliability group nodes, a one-way communication method is adopted; for ordinary group nodes, a communication method of verifying view number, sequence number, summary and unified coloring value is adopted; for low-reliability group nodes, a traditional point-to-point communication method is adopted.

5. The method for constructing a PST-PBFT consensus algorithm model according to claim 1, characterized in that: After the consensus protocol is completed, the node reputation value contour matrix is ​​dynamically adjusted according to the node's personal color to reflect the node's performance in the consensus process.

6. An application of the PST-PBFT consensus algorithm model according to claim 1, characterized in that: The model is applied to the blockchain system to reduce communication latency and complexity and improve the stability and reliability of blockchain communication by optimizing the consistency protocol process of the PBFT consensus algorithm.