Satellite-borne routing telemetering and remote control method based on multi-thread architecture
Through the onboard routing telemetry and remote control method with multi-threaded architecture and redundant design, the real-time, reliability and scalability problems of the existing system are solved, the high real-time and high reliability of the telemetry and remote control system are achieved, and on-orbit software updates and function expansions are supported.
Patent Information
- Application Number
- CN202511136666.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-08-14
AI Technical Summary
The existing satellite-borne routing telemetry and remote control systems lack real-time and concurrent processing capabilities, have a single fault-tolerant mechanism, limited reliability, and insufficient system scalability and maintainability, making it difficult to meet the requirements of on-orbit real-time control and high reliability.
It adopts a multi-threaded architecture, combines hardware redundancy and software redundancy design, and realizes parallel processing of telemetry, remote control, and time synchronization tasks through GPIO interrupt drive, SPI memory buffer, multi-threaded task scheduling and redundancy check. It also supports E_PDU encoding and CAN protocol multi-frame reorganization, enhancing the system's fault tolerance and scalability.
It achieves high real-time and high reliability of the telemetry and remote control system, solves the problems of response delay and system downtime, improves the scalability and maintainability of the system, and supports on-orbit software updates and function expansion.
Smart Images

Figure CN120639165A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of spacecraft electronic systems, and in particular relates to a satellite-borne routing telemetry and remote control method based on a multi-threaded architecture. Background Art
[0002] As the complexity of spacecraft electronic systems increases, onboard routing equipment, as the core communication hub of satellite platforms, must simultaneously meet the requirements of on-orbit real-time control, multi-task concurrent processing, and high reliability in extreme environments. In existing technologies, onboard routing telemetry and remote control systems generally have the following technical bottlenecks: 1. Insufficient real-time and concurrent processing capabilities: Traditional systems often employ a single-threaded, serial architecture, making it difficult to balance the real-time demands of tasks such as telemetry data acquisition, remote control command execution, and time synchronization. For example, in single-threaded mode, telemetry acquisition and command parsing must be performed sequentially, leading to system response delays. This is especially true when sudden command surges occur, which can easily lead to task backlogs and even critical command execution timeouts. Furthermore, time synchronization often relies on software polling mechanisms, making microsecond-level calibration difficult to achieve, leading to the accumulation of errors in multi-system coordination.
[0003] 2. Single fault-tolerance mechanism and limited reliability: Existing systems rely heavily on hardware redundancy (such as active / standby routing switching) to improve reliability, but lack fault-tolerance design at the software level. For example, if a single-event upset (SEV) occurs while program code is running on-orbit, causing a memory error, the lack of a checksum and automatic recovery mechanism could cause system downtime.
[0004] 3. Insufficient system scalability and maintainability: Existing telemetry and remote control systems often utilize customized hardware interfaces and closed software architectures, making it difficult to support on-orbit software updates or feature expansion. For example, adding new device interfaces or upgrading routing protocols requires re-flashing the entire system firmware, precluding the flexible configuration achieved through dynamic module loading. Furthermore, the lack of standardized processes for log downloading and system image backups complicates on-orbit maintenance operations.
[0005] To address the above issues, there is an urgent need for a satellite-borne routing telemetry and remote control system with the following characteristics: Multi-threaded architecture enables millisecond-level parallel processing of telemetry, remote control, and time synchronization tasks; A fault-tolerant mechanism that deeply integrates hardware redundancy (dual CAN links, hot switching of active and standby routers) with software redundancy (triple-mode verification, mirror backup); An efficient data transmission solution that supports E_PDU (External Protocol Data Unit) encoding and CAN (Controller Area Network) protocol multi-frame reassembly; Microsecond time synchronization accuracy; Sub-second resource monitoring and abnormal self-healing capabilities; Based on the above technical pain points, the present invention proposes a satellite-borne routing telemetry and remote control method based on a multi-threaded architecture. Through innovative designs such as GPIO (General-Purpose Input / Output) interrupt drive, SPI (Serial Peripheral Interface) memory buffer, multi-threaded task scheduling and redundancy checking, it achieves a technological breakthrough in the on-orbit real-time control and highly reliable operation of the satellite-borne routing system. Summary of the Invention
[0006] In view of the above-mentioned problems existing in the prior art, the purpose of the present invention is to provide a satellite-borne routing telemetry and remote control method based on a multi-threaded architecture, which is particularly suitable for multi-threaded real-time processing and redundant fault tolerance scenarios. It adopts a multi-threaded collaborative scheduling mechanism, combined with hardware redundancy, software fault tolerance and intelligent data reconstruction algorithm, to achieve high real-time and high reliability on-orbit operation.
[0007] To achieve the above objectives, the present invention provides a satellite-borne routing telemetry and remote control method based on a multi-threaded architecture. The method is implemented on a satellite-borne routing telemetry and remote control system based on a GPIO and SPI multi-threaded architecture. The system includes integrated electronics and a satellite-borne router. The method includes: The satellite-borne routing telemetry and remote control system starts up along with the satellite-borne router, performs a triple-module redundancy check on the telemetry and remote control program, and then starts the program. It then simultaneously starts the main working thread, telemetry acquisition thread, remote control execution thread, and time synchronization thread. The telemetry acquisition thread is used to collect system telemetry data at a cycle of one second and store the telemetry data in the memory according to the E_PDU encoding format; the remote control execution thread is used to cyclically monitor the task queue, and when there is a remote control command task in the queue, it parses and executes the command, and then feeds back the execution status to the telemetry data and stores it in the memory; the time synchronization thread is used to continuously monitor the PPS and perform microsecond calibration of the system time in combination with the received time broadcast frame; the main thread is used to monitor GPIO interrupt events in real time; When a GPIO interrupt is detected, the main thread reads a frame of CAN data from the SPI memory; and parses the frame header information of the CAN data to determine whether it is a single frame or multiple frames of data; if it is a single frame, it directly performs data verification; if it is multiple frames, it integrates multiple frames of data and performs verification calculation; if the verification fails, the error frame count is incremented; if the verification succeeds, the integrated electronics distributes the processing according to the instruction type and executes the corresponding operation.
[0008] Furthermore, performing triple modular redundancy check on the telemetry and remote control program includes: calculating MD5 values of three copies of the telemetry and remote control program in different regions; if the MD5 value of one of the copies is abnormal, overwriting it with one of the other two copies.
[0009] Furthermore, the system telemetry data includes CPU occupancy, memory occupancy, disk space status, interface packet count and temperature parameters.
[0010] Furthermore, the remote control execution includes: checking whether the remote control command parameters are correct, and directly returning the parameter abnormality state if the command parameter check is abnormal; if the command parameter check is correct, executing the command and returning the command execution result.
[0011] Furthermore, time synchronization includes: a time broadcast frame is sent once per second, containing a 32-bit UTC second count and a 16-bit microsecond precision offset; and the rising edge of the PPS signal is aligned with the UTC second count.
[0012] Furthermore, the integration of multiple frame data includes: parsing the frame sequence number and the total number of frames in the CAN data frame header; reorganizing the data in the order of the frame sequence number, discarding duplicate frames and timeout unreceived frames; and performing single-byte sum verification on the reorganized complete data.
[0013] Furthermore, performing a sum check on the integrated data includes: calculating the 8-bit sum check on the data except the last byte; if the checksum of the previous data portion is not equal to the value of the last byte, adding 1 to the error frame count; if they are equal, distributing the processing according to the instruction type.
[0014] Furthermore, performing operations according to the instruction type includes: If it is a time broadcast instruction, the time data is sent to the time synchronization thread; If it is a remote control command, the command will be added to the task queue and wait for execution; If it is a telemetry instruction, the telemetry data stored in the memory is written to the SPI memory.
[0015] To achieve the above-mentioned purpose, 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 above-mentioned satellite-borne routing telemetry and remote control method based on a multi-threaded architecture.
[0016] To achieve the above objectives, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned satellite-borne routing telemetry and remote control method based on a multi-threaded architecture.
[0017] The advantages of the present invention are: 1. The multi-threaded architecture achieves high real-time performance and concurrent processing. Through the parallel scheduling of the main working thread, telemetry acquisition thread, remote control execution thread, and time synchronization thread, it solves the response delay problem of the traditional single-threaded architecture; 2. Software redundancy design enhances reliability. Triple-module redundancy check is performed when the program starts to prevent errors caused by single-event upsets. Data verification uses a combination of sum check and E_PDU encoding to detect errors and quickly locate error frames. 3. Improved scalability and maintainability, standardized log downloading and system recovery using backup images, and support for in-orbit software updates. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive work. Figure 1 This is a CAN data packet communication link diagram in the present invention; Figure 2 This is a flow chart of telemetry and remote control CAN data packet parsing in the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. In the absence of conflict, the features in the following embodiments and implementation methods can be combined with each other.
[0020] The present invention provides a satellite-borne routing telemetry and remote control method based on a multi-threaded architecture. The method is implemented on a satellite-borne routing telemetry and remote control system based on a multi-threaded architecture. Figure 1 , the system comprising: Integrated electronics: responsible for sending remote control commands and receiving telemetry data; CAN (Controller Area Network) link: responsible for transmitting CAN data; Onboard router: used to run the SONiC (Software for Open Networking in the Cloud) operating system; CPLD (Complex Programmable Logic Device): responsible for receiving and forwarding CAN data; SONiC operating system: The operating system on the onboard router, responsible for basic routing functions; Telemetry and remote control program: responsible for collecting relevant telemetry data from the Sonic operating system and executing relevant remote control instructions.
[0021] The method includes: Step 1: The satellite-borne routing telemetry and remote control system is powered on along with the satellite-borne router. After performing a triple-modular redundancy check on the program, the program is started. The triple-modular redundancy check on the program includes calculating the MD5 (Message-Digest Algorithm 5) value of three copies of the telemetry and remote control program in different regions. If one of the MD5 values is abnormal, it is overwritten with one of the other two.
[0022] Step 2: After the satellite-borne routing telemetry and remote control system is started, the main working thread, telemetry acquisition thread, remote control execution thread, and time synchronization thread are started synchronously.
[0023] After the telemetry collection thread is started, it collects system telemetry data at a period of one second, including CPU usage, memory usage, disk space status, interface packet count and temperature parameters, and stores the collected telemetry data to the memory in the E_PDU encoding format; specific telemetry data includes: telemetry request count, correct frame count, error frame count, last remote control command code, last remote control execution status, CPU usage, memory usage, disk usage, / remaining disk space (indicating the remaining disk space of the root directory), / mnt remaining disk space (indicating the remaining disk space of the device currently mounted under / mnt), operating system running time, temperature, received packet count, sent packet count, error packet count, interface status, etc.
[0024] After the remote control execution thread is started, it cyclically monitors the task queue. When there is a remote control command task in the queue, it parses and executes the command, and feeds back the execution status to the telemetry data and stores it in the memory; the remote control execution process includes: checking whether the remote control command parameters are correct. If the command parameter check is abnormal, it directly returns the parameter abnormal status; if the command parameter check is correct, it executes the command and returns the command execution result.
[0025] After the time synchronization thread starts, it continuously monitors the PPS (Pulse Per Second) signal and uses it to calibrate the system time to the microsecond level based on the received time broadcast frames. Time synchronization involves sending a time broadcast frame once per second, containing a 32-bit UTC (Coordinated Universal Time) second counter and a 16-bit microsecond precision offset. The rising edge of the PPS signal is aligned with the UTC second counter.
[0026] After the main thread is started, it monitors GPIO interrupt events in real time.
[0027] Step 3: When the GPIO interrupt is detected, the main thread immediately reads a frame of CAN data from the SPI memory.
[0028] Step 4: The main thread parses the frame header information of the CAN data to determine whether it is single-frame or multi-frame data; if it is a single frame, directly perform data verification; if it is multi-frame, integrate the multi-frame data and perform verification; wherein, multi-frame data integration includes: parsing the frame sequence number and total number of frames in the CAN data frame header; reorganizing the data in the order of the frame sequence number, discarding duplicate frames and frames that have not been received due to timeout; performing single-byte sum verification on the reorganized complete data.
[0029] Step 5: Perform sum check calculation on the integrated data: if the check fails, increase the error frame count; if the check succeeds, distribute and process according to the instruction type; wherein, performing sum check on the integrated data includes: calculating the sum check of the data except the last byte according to the 8-bit, if the checksum of the previous data part is not equal to the value of the last byte, increase the error frame count by 1; if they are equal, distribute and process according to the instruction type through integrated electronics.
[0030] Step 6: Perform actions based on the instruction type: If it is a time broadcast instruction, the time data is sent to the time synchronization thread; If it is a remote control command, add the command to the task queue and wait for execution; If it is a telemetry command, the telemetry data stored in the memory is written to the SPI memory.
[0031] Among them, the remote control commands include: software reset, IP address configuration, clear frame count, interface switch control, VLAN (Virtual Local Area Network) interface creation, VLAN member configuration, OSPF (OpenShortest Path First) instance configuration, OSPF interface configuration, static routing configuration, static ARP (Address Resolution Protocol) configuration, SONiC system installation, SONiC system switching, obtaining the uploaded file from the intelligent computer, obtaining the uploaded file from the integrated electronic device, decompressing the uploaded file, executing the uploaded file, deleting the uploaded file, downloading and copying the log to the intelligent computer, downloading and copying the log to the integrated electronic device, uninstalling the SONiC system, obtaining the image file from the integrated electronic device, etc.
[0032] Example 1
[0033] See also Figure 1 The transmission and parsing of the remote control and telemetry data packets of the present invention are specifically implemented as follows: Step 1: CAN bus data reception and CPLD preprocessing.
[0034] The onboard router receives telemetry and remote control commands sent by the integrated electronics via the dual redundant CAN bus; the CPLD chip pre-processes the CAN bus data: Filter valid commands based on preset CAN ID (Controller Area Network Identifier) filtering rules; Write valid instructions into the SPI memory in frame format, and trigger the rising edge interrupt of GPIO_3 (GPIO pin No. 3) after each frame is written.
[0035] Step 2: Telemetry and remote control GPIO interrupt response and data reading.
[0036] The main thread monitors the GPIO_3 interrupt event and performs the following operations after the interrupt is triggered: A. Lock the SPI bus (spidev1.0) and send a 0x03 read command plus a 16-bit address pointer. B. Read 17 bytes of data frame from SPI; C. After the data frame is read, the read completion status is written to the SPI.
[0037] Step 3: Parsing and reassembling telemetry and remote control CAN data frames.
[0038] The main thread performs the following processing on the original data: a. Frame header parsing: Extract the frame control field, including frame type (2 bits), total number of frames (6 bits), frame sequence number (6 bits), and data field length (4 bits); b. Multi-frame reassembly: Create a temporary buffer area, cache multi-frame data, sort by frame sequence number, and discard duplicate frames.
[0039] Step 4: Telemetry and telecontrol data verification and error handling.
[0040] The main thread performs single-byte sum verification on the data, calculates the single-byte cumulative sum of the data part, and compares it with the check byte. If they are inconsistent, the error frame count is updated by +1.
[0041] Step 5: Classification and distribution of telemetry and remote control commands.
[0042] Parse the specific instruction type and perform corresponding operations based on the instruction type: Remote control command: insert the command into the task queue and wait for the remote control execution thread to execute; Telemetry command: reads telemetry data from memory and writes data to SPI memory; Time synchronization broadcast instruction: parse the data, calculate the real time based on the cumulative whole seconds starting from 00:00:00 UTC time on January 1, 2021, and send the time to the time synchronization thread for time synchronization.
[0043] Example 2
[0044] See also Figure 2 The program of the present invention is a multi-threaded architecture, and each thread implements data interaction through shared memory and task queue. The specific implementation steps are as follows: Step 1: Initialize and start the telemetry and remote control thread.
[0045] Main thread creation and resource allocation. After the system starts, the main thread is created and the highest priority (priority 20) is set for the process. The shared memory areas are initialized: the remote control task queue (Task Queue) and the telemetry data buffer (371 bytes). The child thread is created by the main thread. After the child thread is created, it initializes related components.
[0046] Step 2: Telemetry and remote control main thread data reading.
[0047] The telemetry and remote control main thread monitors GPIO interrupts and configures GPIO_3 to rising edge trigger mode. When a signal is detected, it reads the data at the specified address in the SPI, performs a single-byte sum check on the data, and performs data analysis.
[0048] Step 3: Telemetry collection thread operation mechanism.
[0049] After the telemetry collection thread starts, it collects telemetry data every second and writes it to memory. The collected data includes CPU usage, memory usage, disk space status, self-test status, system boot times, interface packet counts, and temperature parameters. After collection, the data is encapsulated using the E_PDU encoding.
[0050] Step 4: Remotely execute thread task processing.
[0051] The remote process polls the task queue and executes the corresponding task immediately if there is one. If no task is found, it waits for 10ms. After the task is completed, the execution status is written to the telemetry data in the shared memory.
[0052] Step 5: Time synchronization thread microsecond calibration.
[0053] The time synchronization thread receives the satellite time parsed by the main thread and performs time calibration in conjunction with the PPS interrupt signal. If the system time differs from the satellite time by more than 2 seconds, the system time of the satellite router is synchronized and calibrated.
[0054] Corresponding to the aforementioned embodiment of the satellite-borne routing telemetry and remote control method based on a multi-threaded architecture, an embodiment of the present application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned satellite-borne routing telemetry and remote control method based on a multi-threaded architecture.
[0055] Corresponding to the aforementioned embodiment of the satellite-borne routing telemetry and remote control method based on a multi-threaded architecture, an embodiment of the present invention further provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the satellite-borne routing telemetry and remote control method based on a multi-threaded architecture in the above embodiment is implemented.
[0056] The computer-readable storage medium may be an internal storage unit of any device with data processing capabilities described in any of the aforementioned embodiments, such as a hard disk or memory. The computer-readable storage medium may also be any device with data processing capabilities, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of any device with data processing capabilities and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and may also be used to temporarily store data that has been output or is to be output.
[0057] The foregoing is merely an embodiment of the present invention and is not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.
Claims
1. A satellite-borne routing telemetry and remote control method based on a multi-threaded architecture, characterized in that: The method is implemented on a satellite-borne routing telemetry and remote control system based on GPIO and SPI multi-threaded architecture, the system including integrated electronics and a satellite-borne router, and the method includes: The satellite-borne routing telemetry and remote control system starts up along with the satellite-borne router, performs a triple-module redundancy check on the telemetry and remote control program, and then starts the program. It then simultaneously starts the main working thread, telemetry acquisition thread, remote control execution thread, and time synchronization thread. The telemetry acquisition thread is used to collect system telemetry data at a cycle of one second and store the telemetry data in the memory according to the E_PDU encoding format; the remote control execution thread is used to cyclically monitor the task queue, and when there is a remote control command task in the queue, it parses and executes the command, and then feeds back the execution status to the telemetry data and stores it in the memory; the time synchronization thread is used to continuously monitor the PPS and perform microsecond calibration of the system time in combination with the received time broadcast frame; the main thread is used to monitor GPIO interrupt events in real time; When a GPIO interrupt is detected, the main thread reads a frame of CAN data from the SPI memory; and parses the frame header information of the CAN data to determine whether it is a single frame or multiple frames of data; if it is a single frame, it directly performs data verification; if it is multiple frames, it integrates multiple frames of data and performs verification calculation; if the verification fails, the error frame count is incremented; if the verification succeeds, the integrated electronics distributes the processing according to the instruction type and executes the corresponding operation.
2. The satellite-borne routing telemetry and remote control method based on multi-threaded architecture according to claim 1, characterized in that: The triple modular redundancy check of the telemetry and remote control program includes: calculating MD5 values of three telemetry and remote control programs in different regions; if the MD5 value of one of the programs is abnormal, overwriting it with one of the other two programs.
3. The satellite-borne routing telemetry and remote control method based on multi-threaded architecture according to claim 1, characterized in that: The system telemetry data includes CPU occupancy, memory occupancy, disk space status, interface packet count and temperature parameters.
4. The satellite-borne routing telemetry and remote control method based on multi-threaded architecture according to claim 1, characterized in that: Remote control execution includes: checking whether the remote control command parameters are correct. If the command parameter check is abnormal, the parameter abnormal status is directly returned; if the command parameter check is correct, the command is executed and the command execution result is returned.
5. The satellite-borne routing telemetry and remote control method based on multi-threaded architecture according to claim 1, characterized in that: Time synchronization includes: the time broadcast frame is sent once per second, containing a 32-bit UTC second count and a 16-bit microsecond precision offset; the rising edge of the PPS signal is aligned with the UTC second count.
6. The satellite-borne routing telemetry and remote control method based on multi-threaded architecture according to claim 1, characterized in that: The integration of multiple frame data includes: parsing the frame sequence number and the total number of frames in the CAN data frame header; reorganizing the data in the order of the frame sequence number, discarding duplicate frames and timeout unreceived frames; and performing single-byte sum verification on the reorganized complete data.
7. The satellite-borne routing telemetry and remote control method based on multi-threaded architecture according to claim 1, characterized in that: The sum check of the integrated data includes: calculating the 8-bit sum check of the data except the last byte. If the checksum of the previous data part is not equal to the value of the last byte, the error frame count is increased by 1; if they are equal, the processing is distributed according to the instruction type.
8. The satellite-borne routing telemetry and remote control method based on multi-threaded architecture according to claim 1, characterized in that: The operations performed according to the instruction type include: If it is a time broadcast instruction, the time data is sent to the time synchronization thread; If it is a remote control command, the command will be added to the task queue and wait for execution; If it is a telemetry instruction, the telemetry data stored in the memory is written to the SPI memory.
9. 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 satellite-borne routing telemetry and remote control method based on a multi-threaded architecture as described in any one of claims 1-8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the satellite-borne routing telemetry and remote control method based on a multi-threaded architecture as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Satellite-borne laser communication load master control system and method adopting SOC FPGA
CN118626232A
Communication control system based on satellite system driving layer
CN120223166A
Apparatus and method for verifying reception and execution status of telecommand in satellite control system
US20070111724A1
Cited By
Interaction control method and device based on SPI simulation CAN communication and medium
CN122339888A
A multi-threaded on-orbit autonomous mission planning system and method for satellites.
CN122570205A
