A spaceborne multi-node passive leader election method
By employing a passive leader election method, utilizing a static list and local persistent storage mechanism, the problems of high resource consumption and data loss in spaceborne multi-node systems are solved, achieving fast, deterministic, and data-loss-free leader switching.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG LAB
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-26
Smart Images

Figure CN121907846B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of satellite communication and edge computing technology, and particularly relates to a method for role election, gateway traffic aggregation and high-reliability data synchronization when multiple computing nodes share a single downlink in a resource-constrained onboard computing environment. Specifically, it relates to a passive leader election method for multiple onboard nodes. Background Technology
[0002] With the development of space-based computing technology, modern computing satellites typically carry multiple computing payloads (nodes) to form onboard edge computing clusters for handling complex on-orbit tasks. Due to limitations in the power consumption, size, and physical design of the satellite platform, the entire satellite cluster usually communicates with the ground station through only one main satellite-to-ground link (such as a microwave or laser link).
[0003] In existing technical solutions, to manage the external communication of multiple nodes, a leader node is typically elected to aggregate traffic and manage the satellite-to-ground link. Traditional distributed consensus algorithms (such as Raft and Paxos) are commonly used to solve this problem, but they have the following significant drawbacks in a spaceborne environment:
[0004] 1. Excessive resource consumption: Traditional algorithms require frequent broadcast heartbeats to maintain consensus, which consumes valuable intra-satellite network bandwidth and embedded processor computing resources, especially when satellite energy is limited.
[0005] 2. Uncertain convergence time: The satellite network environment may fluctuate, which may cause traditional algorithms to repeatedly split-vote or have an excessively long election cycle, resulting in long-term unavailability of satellite-to-ground communication services.
[0006] 3. Data loss risk: At the moment of Leader switchover, data sent by ordinary nodes (Agents) to the old Leader but not yet distributed to the ground is often lost due to the downtime of the old Leader, and there is a lack of effective application layer recovery mechanisms.
[0007] Therefore, there is an urgent need for an election and aggregation method that is suitable for embedded, resource-constrained environments, can achieve rapid switching without complex negotiation mechanisms, and can guarantee zero data loss during switching. Summary of the Invention
[0008] To address the technical problems of high resource consumption, slow fault switching, and easy uplink data loss during leader switching in existing spaceborne multi-node systems, the present invention aims to provide a passive leader election method for spaceborne multi-node systems.
[0009] The objective of this invention is achieved through the following technical solution: a passive leader election method for multiple nodes on a satellite, comprising the following steps:
[0010] All computing nodes within the satellite are pre-configured with an identical ordered list of nodes (nodes_list) that includes node priority and network address; each node determines its initial state as a Leader node or an Agent node based on its own priority and the index pointer of the current Leader (current_leader_index).
[0011] The Leader node establishes and maintains a satellite-to-ground communication protocol connection (such as a QUIC connection) with the ground-gateway. The Agent node encapsulates local application requests and forwards them to the current Leader node, which then prioritizes and aggregates them before sending them to the ground via the satellite-to-ground link.
[0012] If an Agent node fails to forward data, the current Leader node is determined to be invalid. A new Leader index is calculated based on a preset algorithm, and the status of each node is updated.
[0013] Each Agent node persistently stores messages, and each message is marked with an initial state and a sent state. When the Leader node is updated, all messages in the sent state are reset to the initial state and resent.
[0014] Furthermore, each node determines its initial state as a Leader node or an Agent node based on its own priority and the index pointer of the current Leader. Specifically, when each node starts up, it determines its role based on its position in the list and the index pointer of the current Leader. If its own index is consistent with the index pointer of the current Leader and higher priority nodes are unreachable, it is initialized as a Leader node; otherwise, it is initialized as an Agent node.
[0015] Furthermore, the method for determining whether a higher-priority node is unreachable is as follows: The current node (e.g., a node attempting to become the Leader) traverses the ordered node list and identifies all nodes in the ordered node list whose index value is less than its own index as a high-priority target set. Subsequently, the current node initiates a network connection establishment request or status query command to each node in the high-priority target set through the satellite network (e.g., TCP or RPC probing). If, within a preset time window (e.g., within 2 seconds), all requests initiated to the high-priority target set return connection timeout, connection rejection, or no response, then it is determined that all higher-priority nodes are in a failed or unreachable state, and the current node confirms its initialization as the Leader node.
[0016] Furthermore, the forwarding failure includes forwarding timeout or connection rejection.
[0017] Furthermore, the preset algorithm is a passive switching algorithm, as detailed below:
[0018] new_index=(current_leader_index+1)MOD N;
[0019] Where N is the total number of nodes, new_index is the new Leader index, and current_leader_index is the initial Leader index.
[0020] Furthermore, the update of the status of each node specifically involves: if the priority of the Agent node itself matches the new Leader index, the Agent node is automatically upgraded to a Leader node and attempts to establish a satellite-to-ground communication protocol connection with the ground gateway; if they do not match, the subsequent communication target is directed to the node corresponding to the new Leader index.
[0021] Furthermore, each Agent node persistently stores the messages, marking each message with an initial state and a sent state. When a Leader node update occurs, all messages in the sent state are reset to their initial state and resent, specifically as follows:
[0022] Each Agent node maintains a message lifecycle state machine locally, including the READY state and the FLIGHT_TO_LEADER state;
[0023] The Agent persists the message and initially sets its state to READY. When the message is forwarded to the Leader node, it is updated to the FLIGHT_TO_LEADER state.
[0024] When a Leader node switch occurs, each Agent node scans all messages in the FLIGHT_TO_LEADER state locally and resets (forces a rollback) to the READY state before sending them to the new Leader node.
[0025] This invention also provides a spaceborne multi-node passive leader election system, comprising:
[0026] The node initialization module is used to pre-configure an identical, ordered list of nodes containing node priority order and network address for all computing nodes within the satellite; each node determines its initial state as a Leader node or an Agent node based on its own priority and the index pointer of the current Leader.
[0027] The traffic aggregation module is used to establish and maintain a satellite-to-ground communication protocol connection with the ground gateway through the Leader node, receive uplink messages forwarded by the Agent node, prioritize and aggregate them, and send them to the ground in a unified manner through the satellite-to-ground link;
[0028] The node update module is used to encapsulate local application requests through Agent nodes and forward them to the current Leader node. If an Agent node fails to forward the request, the current Leader node is determined to be invalid. A new Leader index is calculated based on a preset algorithm, and the status of each node is updated.
[0029] The state rollback module is used to persistently store messages through the Agent node. Each message is marked with an initial state and a sent state. When the Leader node is updated, all messages in the sent state are reset to the initial state and resent, thereby realizing application-layer breakpoint resume.
[0030] The present invention also provides an electronic device, including a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the method.
[0031] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.
[0032] The beneficial effects of this invention are as follows:
[0033] 1. Extremely low overhead: It abandons the election heartbeat mechanism of algorithms such as Raft, eliminates the "heartbeat storm", greatly reduces the network load and CPU power consumption within the satellite, and is suitable for embedded environments.
[0034] 2. Deterministic fast switching: The polling switching algorithm based on a static list has a complexity of O(1). The fault response speed depends only on the RPC timeout time, and there is no problem of election deadlock or failure to converge for a long time.
[0035] 3. Zero data loss: The unique "local persistence + state rollback" mechanism ensures that even if the Leader node suddenly crashes, messages sent by the Agent node but not confirmed by the ground can be automatically retransmitted after the new Leader comes online, guaranteeing the transaction integrity of satellite-to-ground communication. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 This is a schematic diagram of the spaceborne multi-node gateway system architecture according to an embodiment of the present invention;
[0038] Figure 2 This is a flowchart of node startup and initial role determination;
[0039] Figure 3 This is a flowchart of the passive failover (Leader Election) logic for Agent nodes. Detailed Implementation
[0040] To enable those skilled in the art to better understand the technical solutions in the embodiments of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art should fall within the protection scope of the embodiments of this application.
[0041] This invention provides a passive leader election method for multiple nodes on a satellite, comprising the following steps:
[0042] S1. Role initialization based on an ordered list.
[0043] All computing nodes within the satellite are pre-configured with an identical ordered list of nodes (nodes_list) that includes node priority and network address; each node determines its initial state as Leader mode or Agent mode based on its own priority and the index pointer of the current Leader (current_leader_index).
[0044] Traffic aggregation in S2.Leader mode.
[0045] Nodes in Leader mode are responsible for establishing and maintaining satellite-to-ground communication protocol connections (such as QUIC connections) with the ground-to-gateway. Leader nodes receive uplink messages forwarded by all Agent mode nodes through the satellite network (gRPC), prioritize and aggregate local messages and received Agent messages, and send them to the ground in a unified manner through the satellite-to-ground link.
[0046] Passive failover in S3.Agent mode.
[0047] Nodes in Agent mode do not connect directly to the ground. Agent nodes intercept and encapsulate local application requests and then forward them to the current Leader node via intra-satellite RPC.
[0048] If an Agent node fails to forward data (e.g., due to timeout or connection rejection), the current Leader node is determined to be invalid. A new Leader index is calculated based on a preset algorithm, and the status of each node is updated.
[0049] S4. Data reliability assurance based on state rollback.
[0050] Each Agent node persists the messages, marking each message with an initial state and a sent state. When the Leader node is updated, all messages in the sent state are reset to the initial state and resent.
[0051] In a preferred embodiment, each node in step S1 determines its initial state as Leader mode or Agent mode based on its own priority and the index pointer of the current Leader. Figure 2 As shown, specifically: when each node starts up, it determines its role based on its position in the list and the index pointer of the current Leader. If its own index is consistent with the index pointer of the current Leader and higher priority nodes are unreachable, it is initialized as a Leader node; otherwise, it is initialized as an Agent node.
[0052] Preferably, the method for determining whether a higher-priority node is unreachable is as follows: The current node (e.g., a node attempting to become the Leader) traverses the ordered node list and identifies all nodes in the ordered node list whose index value is less than its own index as a high-priority target set. Subsequently, the current node initiates a network connection establishment request or status query command to each node in the high-priority target set through the satellite network (e.g., TCP or RPC probing). If, within a preset time window (e.g., within 2 seconds), all requests initiated to the high-priority target set return connection timeout, connection rejection, or no response, then it is determined that all higher-priority nodes are in a failed or unreachable state, and the current node confirms its initialization as the Leader node.
[0053] In a preferred embodiment, in step S3, as follows: Figure 3 As shown, the default algorithm is a passive switching algorithm, as detailed below:
[0054] new_index=(current_leader_index+1)MOD N;
[0055] Where N is the total number of nodes, new_index is the new Leader index, and current_leader_index is the initial Leader index.
[0056] If, after calculation, the priority of the Agent node matches the new Leader index new_index, the Agent node will automatically upgrade to Leader mode and attempt to establish a satellite-to-ground communication protocol connection with the ground gateway. If they do not match, subsequent communication will be directed to the node corresponding to new_index in the list.
[0057] As a preferred embodiment, such as Figure 3 As shown, step S4 specifically includes:
[0058] Each Agent node maintains a message lifecycle state machine locally, including the READY state and the FLIGHT_TO_LEADER state.
[0059] When sending: The Agent persists the message in the initial state of READY. When the message is forwarded to the Leader node, the message is updated to the FLIGHT_TO_LEADER state.
[0060] During switchover: When a Leader node switchover occurs, each Agent node scans all messages in the FLIGHT_TO_LEADER state locally and forcibly rolls back (resets) the state to READY.
[0061] During retransmission: The Agent resends the rolled-back message to the new Leader node, thereby enabling application-layer breakpoint resumption.
[0062] This invention also provides a passive leader election system for multiple nodes on a satellite, comprising:
[0063] The node initialization module is used to pre-configure an identical, ordered list of nodes containing node priority order and network address for all computing nodes within the satellite; each node determines its initial state as a Leader node or an Agent node based on its own priority and the index pointer of the current Leader.
[0064] The traffic aggregation module is used to establish and maintain a satellite-to-ground communication protocol connection with the ground gateway through the Leader node, receive uplink messages forwarded by the Agent node, prioritize and aggregate them, and send them to the ground in a unified manner through the satellite-to-ground link.
[0065] The node update module is used to encapsulate local application requests through Agent nodes and forward them to the current Leader node. If an Agent node fails to forward the request, the current Leader node is determined to be invalid. A new Leader index is calculated based on a preset algorithm, and the status of each node is updated.
[0066] The state rollback module is used to persistently store messages through the Agent node. Each message is marked with an initial state and a sent state. When the Leader node is updated, all messages in the sent state are reset to the initial state and resent.
[0067] To further illustrate the technical solution of the present invention, the present invention also provides the following three specific embodiments, assuming that a satellite carries three computing nodes, namely node A, node B and node C.
[0068] like Figure 1 The diagram illustrates the connection topology between the Leader and Agent nodes. The solid thick arrows represent the unique satellite-to-ground communication main link (held by the Leader node), while the dashed arrows represent intra-satellite communication (where the Agent node forwards traffic to the Leader). All nodes (Leader and Agent) hold the same `nodes_list` configuration.
[0069] Example 1: System Configuration and Initialization
[0070] 1. Configuration: All nodes load the same configuration file config.yaml, where nodes_list is defined as [node A, node B, node C], and the corresponding priority indices are 0, 1, and 2 respectively.
[0071] 2. Startup:
[0072] Node A starts up and reads its own Priority=0. It initializes current_leader_index=0. It checks if Priority==current_leader_index, then Node A enters Leader mode, listens on the satellite-to-ground communication port (e.g., UDP 50050), and starts the satellite RPC service (TCP 50052).
[0073] Node B starts up and reads that its Priority=1. It initializes current_leader_index=0. If a discrepancy is found, it enters Agent mode and establishes an RPC connection to node A.
[0074] Similarly, node C enters Agent mode and points to node A.
[0075] Example 2: Fault Detection and Passive Switching
[0076] Suppose node A (the current leader) suddenly loses power due to a fault:
[0077] 1. Fault Detection: An application on node B attempts to send telemetry data. The node B gateway forwards the request to node A via RPC, but due to node A's failure, the RPC call returns failure after the set timeout period (e.g., 2 seconds).
[0078] 2. Algorithm execution: Node B catches the error and determines that the Leader has failed. The algorithm is executed: current_leader_index = (0 + 1) % 3 = 1.
[0079] 3. Role Upgrade: Node B discovers a new index 1 that matches its own Priority. Node B immediately switches to Leader mode, starts the satellite-to-ground protocol stack, and attempts to establish a connection with the ground gateway.
[0080] 4. Follow-up switch: Node C also detects that Node A is unreachable and executes the same algorithm to update the index to 1. Node C finds that the index does not match its own, maintains Agent mode, but disconnects from Node A and initiates an RPC connection with Node B.
[0081] Example 3: Data Rollback and Retransmission
[0082] During the aforementioned handover process, the data protection mechanism is as follows:
[0083] 1. Before the failure: Node B's application generated an important task status message, Msg-101. Node B's gateway stored it in its local SQLite database and marked it as READY. It then forwarded it to Node A and updated the database status to FLIGHT_TO_LEADER.
[0084] 2. Fault Occurrence: Node A received Msg-101, but before it could transmit it to the ground, a power outage occurred.
[0085] 3. After the switchover: Node B has completed its role upgrade and become the new Leader. At this time, Node B's background scanning thread checks the local database and finds that Msg-101 is in the FLIGHT_TO_LEADER state, but the time since the last update has exceeded the threshold (indicating that no ACK has been received from the ground).
[0086] 4. State rollback: Node B forces Msg-101's state to be updated back to READY.
[0087] 5. Self-processing: Since node B is now the leader, it directly retrieves Msg-101 from the READY queue, encapsulates it into a satellite-to-ground protocol frame, and sends it to the ground through its own satellite-to-ground link, thus recovering the message that should have been lost.
[0088] This invention also provides an electronic device, including a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the method described in any embodiment.
[0089] This invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any of the embodiments.
[0090] The computer-readable storage medium can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be any data processing device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.
[0091] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only.
[0092] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A passive leader election method for multiple nodes on a satellite, characterized in that, Includes the following steps: All computing nodes within the satellite are pre-configured with an identical ordered list containing node priority and network address. Each node determines its initial state as a Leader node or an Agent node based on its own priority and the index pointer of the current Leader. Specifically, when each node starts up, it determines its role based on its position in the list and the index pointer of the current Leader. If its own index is consistent with the index pointer of the current Leader and higher priority nodes are unreachable, it is initialized as a Leader node; otherwise, it is initialized as an Agent node. The Leader node establishes and maintains a satellite-to-ground communication protocol connection with the ground gateway. The Agent node encapsulates local application requests and forwards them to the current Leader node, which then prioritizes and aggregates them before sending them to the ground via the satellite-to-ground link. If an Agent node fails to forward data, the current Leader node is determined to be invalid. A new Leader index is calculated based on a preset algorithm, and the status of each node is updated. Each Agent node persistently stores messages, and each message is marked with an initial state and a sent state. When the Leader node is updated, all messages in the sent state are reset to the initial state and resent.
2. The method according to claim 1, characterized in that, The method for determining that higher priority nodes are unreachable is as follows: the current node traverses the ordered node list and identifies all nodes in the ordered node list whose index value is less than its own index as a high-priority target set; the current node initiates a network connection establishment request or status query RPC command to each node in the high-priority target set through the satellite network. If, within a preset time window, all requests initiated to the set of high-priority targets return connection timeout, connection rejection, or no response, then the higher-priority node is determined to be unreachable, and the current node is confirmed to be initialized as the Leader node.
3. The method according to claim 1, characterized in that, The forwarding failure includes forwarding timeout or connection rejection.
4. The method according to claim 1, characterized in that, The preset algorithm is a passive switching algorithm, as detailed below: new_index=(current_leader_index+1)MOD N; Where N is the total number of nodes, new_index is the new Leader index, and current_leader_index is the initial Leader index.
5. The method according to claim 1, characterized in that, The specific steps for updating the status of each node are as follows: if the priority of the Agent node itself matches the new Leader index, the Agent node is automatically upgraded to a Leader node and attempts to establish a satellite-to-ground communication protocol connection with the ground gateway; if they do not match, the subsequent communication target is directed to the node corresponding to the new Leader index.
6. The method according to claim 1, characterized in that, Each Agent node persistently stores messages, marking both the initial and sent states for each message. When a Leader node update occurs, all sent messages are reset to their initial state and resent. Specifically: Each Agent node maintains a message lifecycle state machine locally, including the READY state and the FLIGHT_TO_LEADER state; The Agent persists the message in the READY state. When the message is forwarded to the Leader node, it is updated to the FLIGHT_TO_LEADER state. When a Leader node switch occurs, each Agent node scans all messages in the FLIGHT_TO_LEADER state locally and resets them to the READY state before sending them to the new Leader node.
7. A spaceborne multi-node passive leader election system, characterized in that, include: The node initialization module is used to pre-configure an ordered list of nodes, which includes node priority and network address, for all computing nodes within the satellite. Each node determines its initial state as a Leader node or an Agent node based on its own priority and the index pointer of the current Leader. Specifically, when each node starts up, it determines its role based on its position in the list and the index pointer of the current Leader. If its own index is the same as the index pointer of the current Leader and higher priority nodes are unreachable, it is initialized as a Leader node; otherwise, it is initialized as an Agent node. The traffic aggregation module is used to establish and maintain a satellite-to-ground communication protocol connection with the ground gateway through the Leader node, receive uplink messages forwarded by the Agent node, prioritize and aggregate them, and send them to the ground in a unified manner through the satellite-to-ground link; The node update module is used to encapsulate local application requests through Agent nodes and forward them to the current Leader node. If an Agent node fails to forward the request, the current Leader node is determined to be invalid. A new Leader index is calculated based on a preset algorithm, and the status of each node is updated. The state rollback module is used to persistently store messages through the Agent node. Each message is marked with an initial state and a sent state. When the Leader node is updated, all messages in the sent state are reset to the initial state and resent.
8. An electronic device comprising a memory and a processor, characterized in that, The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Low earth orbit satellite Internet of Things communication method and system based on dynamic block chain
CN119561605A
Reliable communication system based on publishing and subscribing mode in satellite-ground weak network environment
CN121077546A