A Paxos consensus algorithm TSPaxos for industrial control TSN environment
By employing dynamic time slot calculation and implicit confirmation mechanisms in the TSN environment, the problems of uncertain consensus completion time and high communication overhead of the Paxos consensus algorithm in the TSN environment are solved, achieving deterministic and efficient industrial-grade communication.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TAIYUAN UNIVERSITY OF TECHNOLOGY
- Filing Date
- 2025-09-18
- Publication Date
- 2026-07-24
AI Technical Summary
The existing Paxos consensus algorithm fails to fully utilize high-precision time synchronization and deterministic traffic scheduling capabilities in TSN environments, resulting in uncertain consensus completion time and high communication overhead, making it difficult to meet industrial-grade real-time communication requirements.
The Paxos consensus algorithm TSPaxos, designed for industrial control TSN environments, is adopted. Through dynamic time slot calculation and allocation, implicit confirmation mechanism, and combined with the global scheduling capability of TSN network, consensus message transmission is optimized. Adaptive arbitration set pruning and time slot adjustment mechanism are introduced to ensure the determinism of consensus completion time and communication efficiency.
It achieves determinism in consensus completion time, reduces communication overhead, improves system throughput and real-time performance, and adapts to the real-time and predictability requirements of industrial scenarios.
Smart Images

Figure CN121239680B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of distributed computing, specifically a Paxos consensus algorithm TSPaxos for industrial control TSN environments. Background Technology
[0002] Current improvements to the Paxos consensus algorithm mainly focus on the following two aspects: First, by optimizing the intersection conditions of the two-phase arbitration set, the number of participating nodes in each round of consensus is reduced, thereby reducing communication overhead; Second, the traditional single-leader mode is improved by proposing multi-leader or leaderless mechanisms to enhance the concurrency performance and system throughput of the consensus algorithm.
[0003] However, the improved Paxos consensus algorithm has the following objective drawbacks:
[0004] 1. TSN environment characteristics not considered: Existing Paxos and its improved solutions are generally based on the traditional "best effort" Ethernet model, which does not take advantage of the high-precision time synchronization and deterministic traffic scheduling capabilities provided by TSN, making it difficult to meet the real-time communication needs of industrial applications.
[0005] 2. Inability to achieve consensus completion time: The existing Paxos and its improved schemes are based on a partially synchronous network model, and its message transmission delay is unpredictable, resulting in uncertainty in the consensus completion time, which cannot meet the requirements of TSN for determinism and predictability.
[0006] 3. High communication overhead, affecting system real-time performance: In the existing Paxos and its improved schemes, nodes need to send a large number of confirmation messages at each stage, resulting in high-frequency traffic during the consensus process, which in turn consumes a lot of network transmission resources. This can easily conflict with TSN time-sensitive stream transmission, reducing the real-time performance and schedulability of TSN. Summary of the Invention
[0007] To address the issues of uncertain consensus completion time and high traffic during the consensus process in Paxos and its improved schemes, this invention provides a Paxos consensus algorithm, TSPaxos, for industrial control TSN environments.
[0008] This invention is implemented using the following technical solution: a Paxos consensus algorithm, TSPaxos, for industrial control TSN environments. The two-phase consensus of TSPaxos includes a request and response process in the first and second phases. The consensus message transmission in each phase requires dynamic calculation and allocation of the corresponding time slot length by the CNC component. The time slot length calculation process is as follows: the transmission delay of a single TSPaxos consensus message in the TSN switch... In the formula, Indicates link propagation delay, Indicates the switch in the transmission link Handling delays, Indicates the switch in the transmission link Transmission delay Indicates time synchronization error. Indicates the number of switches in the transmission link.
[0009] For TSPaxos, both phases of consensus require specifying the arbitration set to be used, that is, the set of nodes participating in the consensus in this phase. The minimum secure slot length of TSPaxos during each consensus message transmission process. Need to cover collection All consensus nodes in the middle, That is, the length of this time slot needs to ensure that the arbitration set Even the consensus node with the highest end-to-end message transmission latency can receive messages. This represents the consensus node from the leader or proposer to the acceptor. End-to-end message transmission delay.
[0010] The aforementioned Paxos consensus algorithm for industrial control TSN environments, TSPaxos, defines the priority of different message types in TSPaxos based on the criticality of various consensus messages in the consensus execution process. Slot adjustment function based on message priority ,in, , The final slot length of consensus messages in TSPaxos .
[0011] The aforementioned Paxos consensus algorithm, TSPaxos, for industrial control TSN environments, implicitly confirms when a recipient consensus node agrees to a message sent by the proposer or leader consensus during the request-response time slots of the first and second phases of TSPaxos, without needing to reply with any message, thanks to the deterministic transmission of TSN. Explicit feedback is only triggered when the recipient consensus node rejects the message or needs to synchronize historical proposal information in the first phase.
[0012] The aforementioned Paxos consensus algorithm, TSPaxos, for industrial control TSN environments, introduces a dynamic arbitration set pruning and time slot adjustment mechanism to address the potential failure of arbitration set nodes in implicit acknowledgment slots. If the CUC component detects an arbitration set failure in an implicit acknowledgment slot... A node failure occurs, and the set of failed nodes is: Then the CUC component needs to select other active consensus nodes to arbitrate the set. To complete the list, assume the set of active consensus nodes that needs to be added is: Then the arbitration set for this stage is updated to ;
[0013] The CUC component needs to inform the proposer that the consensus node needs to... Resend the Prepare message, and at the same time... Instruct the CNC component to perform dynamic time slot adjustment, assuming the time slot lengths before and after adjustment are respectively... and , and The required time slot lengths are respectively and Then the CUC component will update the current time slot length to accommodate... The shortest time for message transmission and implicit acknowledgment across all nodes. .
[0014] Compared with the prior art, the present invention has the following advantages:
[0015] 1. Improved time determinism: Existing solutions are all based on partial synchronization models, which cannot provide an upper bound estimate for consensus completion time; TSPaxos achieves time deterministic planning of consensus messages through a dynamic time slot allocation mechanism combined with the global scheduling capability of the TSN network, meeting the needs of real-time performance and predictability in industrial scenarios.
[0016] 2. Reduced communication overhead: In existing solutions, all consent messages require explicit feedback, resulting in a heavy communication burden; while the implicit confirmation mechanism proposed by TSPaxos significantly reduces the number of consensus messages by omitting consent messages and only handling rejection cases, thereby improving system throughput and scalability.
[0017] 3. Better suited to TSN environment characteristics: The TSPaxos consensus algorithm is deeply integrated with the GCL scheduling and CUC / CNC configuration model in TSN, making full use of the deterministic transmission, distinguishing scheduling priorities, and high time synchronization accuracy of TSN. This enables the distributed consensus algorithm to have strong coupling with the TSN industrial environment, and has good practicality and application prospects. Attached Figure Description
[0018] Figure 1 This is a diagram illustrating the application architecture of the TSPaxos consensus algorithm.
[0019] Figure 2 This is a flowchart illustrating the message interaction and execution process of the TSPaxos consensus algorithm. Detailed Implementation
[0020] The TSPaxos consensus algorithm is applied in industrial control TSN environments. The overall architecture diagram is as follows: Figure 1 As shown. In this industrial control TSN architecture, the specific roles of each entity during the TSPaxos operation are described below:
[0021] (1) Consensus nodes: The consensus nodes of TSPaxos include virtual programmable logic controllers (vPLCs), industrial data servers and other terminal management devices.
[0022] (2) Object space: It consists of key data such as equipment status, real-time control commands and their execution order in the industrial field. These objects are kept consistent between the programmable logic controller (vPLC) and the industrial data server through the TSPaxos consensus algorithm to ensure the correctness of the industrial production process.
[0023] (3) CUC (Centralized User Controller): In TSPaxos, the CUC component is responsible for interacting with consensus nodes, collecting consensus messages at different stages and generating traffic scheduling requests for them to send to CNC; periodically checking the node running status, and running dynamic arbitration set pruning and time slot adjustment processes when an arbitration set node failure is detected.
[0024] (4) CNC (Centralized Network Controller): In TSPaxos, after receiving the consensus message traffic scheduling request submitted by CUC, CNC runs a dynamic time slot calculation and allocation algorithm based on the global network topology to dynamically calculate the optimal time slot length and scheduling path for the consensus message of TSPaxos, and sends the specific traffic scheduling and time slot configuration instructions to the TSN switches in the network.
[0025] The TSPaxos consensus algorithm achieves the goals of ensuring the consensus completion time and significantly reducing consensus communication traffic by introducing dynamic time slot calculation and allocation, as well as an implicit confirmation mechanism.
[0026] Dynamic time slot calculation and allocation
[0027] TSPaxos' two-phase consensus mechanism comprises four core message exchange processes, corresponding to the request and response flows of the first and second phases, respectively. In addition, the system can add a consensus result synchronization process as needed. To ensure the determinism of consensus completion time, the message transmission in each phase requires dynamic calculation and allocation of the corresponding time slot length by the CNC component.
[0028] The CNC component maintains network parameters such as the global network topology of the TSN, link latency, bandwidth, and switch attributes. For subsequent calculations, the TSN network parameter configuration is first defined as shown in Table 1.
[0029] Table 1 TSN Network Parameter Configuration
[0030]
[0031] Transmission latency of a single TSPaxos consensus message in TSN The calculation is shown in formula (1):
[0032]
[0033] For TSPaxos, both phases of consensus require specifying the quorum used, which is the set of nodes participating in the consensus for this phase. The minimum safe slot length of TSPaxos during each message transmission process. Need to cover collection All consensus nodes are shown in Equation (2).
[0034]
[0035] That is, the time slot length needs to ensure the arbitration set Even the consensus node with the highest end-to-end message transmission latency can receive messages.
[0036] In TSPaxos, messages at different stages have varying importance in the consensus process. Allocating all messages the same length of transmission slot would fail to effectively reflect their importance. Therefore, based on the criticality of each message type in the consensus execution process, priorities are defined for different message types in TSPaxos.
[0037] Table 2 Priority of different message types in TSPaxos
[0038]
[0039] To further optimize the resource utilization efficiency of TSPaxos in TSN, a differentiated time slot extension strategy is adopted. For consensus messages with higher priority, a more generous time slot length exceeding the minimum safe time slot needs to be allocated to them, that is, to increase their time slot redundancy, ensuring that their transmission is not interfered with by other types of traffic, thereby obtaining smaller transmission delay jitter. The time slot adjustment function based on message priority is shown in formula (3):
[0040]
[0041] in, This controls the time slot extension range for Reject and Prepare / Accept messages, respectively. Control the shortening of the commit message to save time slot resources.
[0042] In summary, the slot length calculation for different types of consensus messages in TSPaxos is shown in formula (4):
[0043]
[0044] Implicit confirmation mechanism
[0045] In the request-response time slots of the first and second phases of TSPaxos, when a recipient node agrees to a message sent by a proposer or leader, the node does not need to reply with any message to implicitly confirm, thanks to the deterministic transmission of TSN. The explicit feedback process is only triggered when the node rejects the message or needs to synchronize historical proposal information in the first phase.
[0046] To address the potential failure of arbitration set nodes within implicit acknowledgment slots, a dynamic arbitration set pruning and slot adjustment mechanism is introduced. If the CUC component detects an arbitration set failure within an implicit acknowledgment slot... A node failure occurs, and the set of failed nodes is: Then the CUC component needs to select other active nodes to arbitrate the set. Complete the list, assuming the set of active nodes that needs to be supplemented is: Then, the arbitration set update at this stage is as shown in formula (5):
[0047]
[0048] CUC needs to inform the proposer that the node needs to... Resend the Prepare message, and at the same time... Instruct the CNC component to perform dynamic time slot adjustment, assuming the time slot lengths before and after adjustment are respectively... and , and The required time slot lengths are respectively and Then the CUC will update the current time slot length to accommodate... The shortest time for message transmission and implicit acknowledgment among all nodes is shown in formula (6):
[0049]
[0050] By introducing adaptive time slot calculation and allocation, implicit acknowledgment mechanisms, and dynamic arbitration set pruning and time slot adjustment to handle node failures, TSPaxos achieves deterministic consensus completion time and reduces the number of consensus messages in a TSN environment. The overall message interaction and execution flow of the TSPaxos consensus algorithm is as follows: Figure 2 As shown.
[0051] The key point of this invention is:
[0052] 1. TSPaxos designs an adaptive consensus message slot calculation and configuration mechanism executed by a CNC component. This mechanism is based on the TSN fully centralized configuration model and combines various factors such as global network topology, link propagation delay, switch processing and forwarding delay, time synchronization error, consensus arbitration set configuration, and message priority to dynamically calculate the transmission slot length at each stage of the TSPaxos consensus algorithm execution process.
[0053] 2. TSPaxos introduces an implicit acknowledgment mechanism for TSN deterministic transmission capabilities. In this mechanism, when a receiver node receives and agrees to a legitimate consensus request, it no longer sends a "confirmation" message as in traditional Paxos. Instead, the proposer node defaults to "agreeing" after the waiting time slot ends. A rejection message is only explicitly sent when a node rejects a proposal or needs to reply with historical proposal information. This mechanism allows rejection messages to be configured as critical TSN traffic, improving the reliability of security responses while significantly reducing consensus communication traffic and lowering system load. This alleviates resource pressure on the TSN scheduling system and improves the real-time performance of critical industrial flows.
Claims
1. A Paxos consensus algorithm, TSPaxos, for industrial control TSN environments, characterized in that: TSPaxos' two-phase consensus includes a request and response process in the first and second phases. The consensus message transmission in each phase requires dynamic calculation and allocation of the corresponding time slot length by the CNC component. The time slot length calculation process is as follows: [The text then abruptly shifts to a different topic:] Transmission delay of a single TSPaxos consensus message in the TSN switch. In the formula, Indicates link propagation delay, Indicates the switch in the transmission link Handling delays, Indicates the switch in the transmission link Transmission delay This indicates the time synchronization error. Indicates the number of switches in the transmission link; For TSPaxos, both phases of consensus require specifying the arbitration set to be used, that is, the set of nodes participating in the consensus in this phase. The minimum secure slot length of TSPaxos during each consensus message transmission process. Need to cover collection All consensus nodes in the middle, That is, the length of this time slot needs to ensure that the arbitration set Even the consensus node with the highest end-to-end message transmission latency can receive messages. This represents the consensus node from the leader or proposer to the acceptor. End-to-end message transmission delay.
2. The Paxos consensus algorithm TSPaxos for industrial control TSN environments according to claim 1, characterized in that: Based on the criticality of various consensus messages in the consensus execution process, the priorities of different message types in TSPaxos are defined. Slot adjustment function based on message priority ,in, , The final slot length of consensus messages in TSPaxos .
3. The Paxos consensus algorithm TSPaxos for industrial control TSN environments according to claim 1 or 2, characterized in that: In the request-response time slots of the first and second phases of TSPaxos, when the recipient consensus node agrees to the message sent by the proposer or leader consensus, the recipient consensus node does not need to reply with any message to implicitly confirm, thanks to the deterministic transmission of TSN; the explicit feedback process is only triggered when the recipient consensus node rejects the message or needs to synchronize historical proposal information in the first phase.
4. The Paxos consensus algorithm TSPaxos for industrial control TSN environments according to claim 3, characterized in that: To address the potential failure of arbitration set nodes within implicit acknowledgment slots, a dynamic arbitration set pruning and slot adjustment mechanism is introduced. If the CUC component detects an arbitration set failure within an implicit acknowledgment slot... A node failure occurs, and the set of failed nodes is: Then the CUC component needs to select other active consensus nodes to arbitrate the set. To complete the list, assume the set of active consensus nodes that needs to be added is: Then the arbitration set for this stage is updated to ; The CUC component needs to inform the proposer that the consensus node needs to... Resend the Prepare message, and at the same time... Instruct the CNC component to perform dynamic time slot adjustment, assuming the time slot lengths before and after adjustment are respectively... and , and The required time slot lengths are respectively and Then the CUC component will update the current time slot length to accommodate... The shortest time for message transmission and implicit acknowledgment across all nodes. .