A spaceborne routing telemetry and remote control method based on a multi-thread architecture
By employing a multi-threaded architecture and redundant design, the real-time performance and reliability issues of the spaceborne routing telemetry and remote control system were resolved. Parallel processing and efficient data transmission of telemetry, remote control, and time synchronization were achieved, thereby improving the system's scalability and maintainability.
Patent Information
- Application Number
- CN202511136666.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-08-14
AI Technical Summary
Existing spaceborne routing telemetry and control systems suffer from insufficient real-time performance and concurrent processing capabilities, a limited fault tolerance mechanism, and inadequate system scalability and maintainability, making it difficult to achieve high reliability and flexible configuration.
It adopts a multi-threaded architecture design, combined with hardware and software redundancy fault tolerance mechanisms. Through GPIO interrupt driving, SPI memory buffer, multi-threaded task scheduling and redundancy verification, it realizes parallel processing of telemetry, remote control and time synchronization, and supports E_PDU encoding and CAN protocol multi-frame reassembly.
It achieves high real-time performance and high reliability of the telemetry and remote control system, improves the system's concurrent processing capability and on-orbit maintenance flexibility, and supports microsecond-level time synchronization and sub-second-level resource monitoring.
Smart Images

Figure CN120639165B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of spacecraft electronic systems, and particularly relates to a spaceborne routing telemetry and remote control method based on a multi-thread architecture. BACKGROUND
[0002] With the increasing complexity of spacecraft electronic systems, the spaceborne routing device, as the core communication hub of the satellite platform, needs to meet the requirements of real-time control in orbit, multi-task concurrent processing, and high reliability in extreme environments. In the prior art, the spaceborne routing telemetry and remote control system generally has the following technical bottlenecks:
[0003] I. Insufficient real-time and concurrent processing capability:
[0004] The traditional system adopts a single-thread serial architecture, which is difficult to balance the real-time requirements of tasks such as telemetry data acquisition, remote control instruction execution, and time synchronization. For example, in the single-thread mode, telemetry acquisition and instruction analysis need to be executed sequentially, which leads to system response delay, especially when there is a surge in burst instructions, which can easily cause task accumulation and even cause critical instruction execution timeout. In addition, the time synchronization function usually relies on a software polling mechanism, which is difficult to achieve microsecond-level precision calibration, leading to the accumulation of errors in multi-system cooperation.
[0005] II. Single fault-tolerant mechanism, limited reliability:
[0006] Existing systems rely on hardware redundancy (such as primary and backup routing switching) to improve reliability, but lack sufficient fault-tolerant design at the software level. For example, if a single event upset occurs during the on-orbit operation of the program code, causing memory errors, there is a lack of verification and automatic recovery mechanism, which can cause system downtime.
[0007] III. Insufficient system scalability and maintainability:
[0008] Existing telemetry and remote control systems mostly use customized hardware interfaces and closed software architectures, which are difficult to support on-orbit software updates or functional extensions. For example, when adding device interfaces or upgrading routing protocols, the entire machine firmware needs to be reprogrammed, and dynamic loading modules cannot be used for flexible configuration. In addition, the log download and system image backup functions lack standardized processes, resulting in high complexity of on-orbit maintenance operations.
[0009] In view of the above problems, there is an urgent need for a spaceborne routing telemetry and remote control system with the following characteristics:
[0010] Multi-thread architecture for millisecond-level parallel processing of telemetry, remote control, and time synchronization tasks;
[0011] Fault-tolerant mechanism with deep integration of hardware redundancy (dual CAN link, primary and backup routing hot switching) and software redundancy (three-module verification, image backup);
[0012] Support E_PDU encoding (External Protocol Data Unit, external protocol data unit encoding) and high-efficiency data transmission scheme of CAN (Controller Area Network, Controller Area Network) protocol multi-frame reorganization;
[0013] Microsecond level time synchronization accuracy;
[0014] Subsecond resource monitoring and abnormal self-healing ability;
[0015] The present application is based on the above technical problems, and proposes a kind of star-borne routing telemetry remote control method based on multi-thread architecture, through GPIO (General-Purpose Input / Output, General-Purpose Input / Output) interrupt driving, SPI (Serial Peripheral Interface, Serial Peripheral Interface) memory buffer, multi-thread task scheduling and redundancy check etc. Innovative design, realize the technical breakthrough of real-time control and high reliable operation of star-borne routing system in orbit. SUMMARY
[0016] In view of the above problems existing in the prior art, the purpose of the present application is to provide a kind of star-borne routing telemetry remote control method based on multi-thread architecture, especially suitable for multi-thread real-time processing and redundancy fault-tolerant scene, adopt multi-thread cooperative scheduling mechanism, combine hardware redundancy, software fault-tolerant and intelligent data reorganization algorithm, realize high real-time and high reliable in-orbit operation.
[0017] To achieve the above purpose, the present application provides a kind of star-borne routing telemetry remote control method based on multi-thread architecture, which is realized on the star-borne routing telemetry remote control system based on GPIO and SPI multi-thread architecture, the system includes integrated electronics and star-borne router, and the method comprises:
[0018] The star-borne routing telemetry remote control system follows star-borne router power-on, carries out three-mode redundancy check to telemetry remote control program, and then starts program;Subsequently, start working main thread, telemetry acquisition thread, remote control execution thread and time synchronization thread synchronously;
[0019] The telemetry acquisition thread is used to collect system telemetry data with every second as a period, and stores telemetry data into memory according to E_PDU encoding format;The remote control execution thread is used to loop listen task queue, when there is remote control instruction task in the queue, parse and execute the instruction, and then feedback execution status to telemetry data storage into memory;The time synchronization thread is used to continuously listen to PPS, and combine received time broadcast frame to calibrate system time at microsecond level;The main thread is used to listen to GPIO interrupt event in real time;
[0020] When the GPIO interrupt is monitored, 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 single frame or multi-frame data; if it is single frame, the data verification is directly executed; if it is multi-frame, the multi-frame data is integrated and then the sum and verification calculation is performed; if the verification fails, the error frame count is incremented; if the verification succeeds, the integrated electronic device distributes and processes according to the instruction type and performs corresponding operation.
[0021] Further, the three-mode redundant verification of the telemetry remote control program comprises: calculating MD5 values of three different areas of the telemetry remote control program, and if one of the MD5 values is abnormal, one of the other two is used to cover it.
[0022] Further, the system telemetry data comprises CPU occupancy, memory occupancy, disk space state, interface packet count and temperature parameters.
[0023] Further, the remote control execution comprises: checking whether the remote control instruction parameters are correct, if the instruction parameter check is abnormal, directly returning the parameter abnormal state; if the instruction parameter check is correct, executing the instruction and returning the instruction execution result.
[0024] Further, the time synchronization comprises: the time broadcast frame is sent once per second, containing 32-bit UTC second count and 16-bit microsecond precision offset; the PPS signal rising edge is aligned with the UTC second count.
[0025] Further, the integrated multi-frame data comprises: parsing the frame sequence number and total frame number in the CAN data frame header; reorganizing the data in the order of the frame sequence number, discarding the repeated frames and the frames not received within the timeout; performing single-byte and check sum on the reorganized complete data.
[0026] Further, the sum and verification of the integrated data comprises: calculating the 8-bit sum and verification of the data except the last byte, if the sum and verification of the previous data part is not equal to the value of the last byte, the error frame count is added by 1; if it is equal, the instruction type is distributed and processed according to the instruction type.
[0027] Further, the operation according to the instruction type comprises:
[0028] If it is a time broadcast instruction, the time data is sent to the time synchronization thread;
[0029] If it is a remote control instruction, the instruction is added to the task queue for execution;
[0030] If it is a telemetry instruction, the telemetry data stored in the memory is written into the SPI memory.
[0031] To achieve the above object, the application further provides an electronic device, comprising a memory and a processor, the memory is coupled with the processor; wherein the memory is used for storing program data, and the processor is used for executing the program data to realize the above-mentioned satellite-borne routing telemetry remote control method based on a multi-thread architecture.
[0032] To achieve the above object, the application further provides a computer readable storage medium, which stores a computer program, the program is executed by a processor to realize the above-mentioned satellite-borne routing telemetry remote control method based on a multi-thread architecture.
[0033] The application has the following advantages:
[0034] 1. The multi-thread architecture realizes high real-time performance and concurrent processing, solves the response delay problem of the traditional single-thread architecture through parallel scheduling of the working main thread, the telemetry acquisition thread, the remote control execution thread and the time synchronization thread;
[0035] 2. The software redundancy design enhances the reliability, the three-mode redundancy check is performed when the program is started, the error caused by single event upset is prevented, the data check adopts the combination of the parity check and the E_PDU encoding, which detects the error and quickly locates the error frame;
[0036] 3. The scalability and maintainability are improved, the standardized log download and the backup image recovery system process are used, and the on-orbit software update is supported. BRIEF DESCRIPTION OF DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor:
[0038] Figure 1 The figure is a CAN data packet communication link diagram in the application;
[0039] Figure 2 The figure is a flowchart of telemetry remote control CAN data packet analysis in the application. DETAILED DESCRIPTION
[0040] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application. The features in the following embodiments and implementation manners can be combined with each other without conflict.
[0041] The present application provides a spaceborne routing telemetry remote control method based on a multi-thread architecture, which is implemented on a spaceborne routing telemetry remote control system based on a multi-thread architecture, as shown in Figure 1 , the system comprises:
[0042] integrated electronics: responsible for sending remote control instructions and receiving telemetry data;
[0043] CAN (Controller Area Network) link: responsible for transmitting CAN data;
[0044] Spaceborne router: used for running a SONiC (Software for Open Networking in the Cloud) operating system;
[0045] CPLD (Complex Programmable Logic Device): responsible for receiving and forwarding CAN data;
[0046] SONiC operating system: an operating system on the spaceborne router, responsible for the basic functions of routing;
[0047] Telemetry remote control program: responsible for collecting relevant telemetry data from the Sonic operating system and executing relevant remote control instructions.
[0048] The method comprises:
[0049] Step 1: After the spaceborne routing telemetry remote control system follows the power-on booting of the spaceborne router, the program is started after three-mode redundancy verification; wherein the three-mode redundancy verification of the program comprises: MD5 (Message-Digest Algorithm 5) value calculation is performed on three different regional telemetry remote control programs, and if one of the MD5 values is abnormal, one of the other two is used to cover it.
[0050] Step 2: After the spaceborne routing telemetry remote control system is started, the working main thread, the telemetry collection thread, the remote control execution thread and the time synchronization thread are started synchronously.
[0051] After the telemetry acquisition thread is started, system telemetry data is collected periodically every second, including CPU occupancy, memory occupancy, disk space status, interface packet count, and temperature parameters, and the collected telemetry data is stored in memory according to the E_PDU encoding format; the specific telemetry data includes: telemetry request count, correct frame count, error frame count, last remote control instruction code, last remote control execution status, CPU occupancy, memory occupancy, disk occupancy, / 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 runtime, temperature, received packet count, sent packet count, error packet count, interface state, etc.
[0052] After the remote control execution thread is started, it cyclically listens to the task queue, and when there is a remote control instruction task in the queue, it parses and executes the instruction, and feeds back the execution status to the telemetry data stored in the memory; wherein the remote control execution process includes: checking whether the remote control instruction parameters are correct, if the instruction parameter checking is abnormal, directly return the parameter exception state; if the instruction parameter checking is correct, execute the instruction, and return the instruction execution result.
[0053] After the time synchronization thread is started, it continuously listens to the PPS (Pulse Per Second, second pulse signal), and combines the received time broadcast frame to calibrate the system time to the microsecond level; wherein the time synchronization includes: the time broadcast frame is sent once every second, containing 32-bit UTC (Coordinated Universal Time) second count and 16-bit microsecond precision offset; the rising edge of the PPS signal is aligned with the UTC second count.
[0054] After the main thread is started, it listens to the GPIO interrupt event in real time.
[0055] Step 3: When the GPIO interrupt is detected, the main thread immediately reads a frame of CAN data from the SPI memory.
[0056] Step 4: The main thread parses the frame header information of the CAN data, judges whether it is single frame or multi-frame data; if it is single frame, directly execute data verification; if it is multi-frame, integrate multi-frame data and then verify; wherein the multi-frame data integration includes: parsing the frame sequence number and total frame number in the CAN data frame header; reorganize the data in sequence according to the frame sequence number, discard repeated frames and timeout frames; perform single byte and checksum on the reorganized complete data.
[0057] Step 5: Perform a checksum calculation on the integrated data: If the checksum fails, increment the error frame count; if the checksum succeeds, distribute the data according to the instruction type. The checksum calculation on the integrated data includes: calculating the checksum of the data except the last byte using an 8-bit checksum. If the checksum of the preceding data is not equal to the value of the last byte, increment the error frame count by 1; if they are equal, distribute the data according to the instruction type through the integrated electronics.
[0058] Step 6: Execute the operation according to the instruction type:
[0059] If it is a time broadcast command, the time data will be sent to the time synchronization thread;
[0060] If it is a remote control command, add the command to the task queue and wait for execution;
[0061] If it is a telemetry command, the telemetry data stored in memory is written to the SPI memory.
[0062] 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 (Open Shortest Path First) instance configuration, OSPF interface configuration, static route configuration, static ARP (Address Resolution Protocol) configuration, SONiC system installation, SONiC system switching, retrieving upload files from the intelligent computing machine, retrieving upload files from the integrated electronics machine, decompressing upload files, executing upload files, deleting upload files, downloading and copying logs to the intelligent computing machine, downloading and copying logs to the integrated electronics machine, uninstalling the SONiC system, retrieving image files from the integrated electronics machine, etc.
[0063] Example 1
[0064] See Figure 1 The specific implementation steps of the remote control and telemetry data packet transmission and parsing of the present invention are as follows:
[0065] Step 1: CAN bus data reception and CPLD preprocessing.
[0066] The onboard router receives telemetry and remote control commands from the integrated electronics system via a dual-redundant CAN bus; the CPLD chip preprocesses the CAN bus data.
[0067] Valid commands are filtered according to preset CAN ID (Controller Area Network Identifier) filtering rules;
[0068] Write the effective instruction in the frame format to the SPI memory, and trigger the rising edge interrupt of GPIO_3 (GPIO pin No. 3) after each frame is written.
[0069] Step 2: Telemetry remote control GPIO interrupt response and data reading.
[0070] The main thread listens to the GPIO_3 interrupt event, and after the interrupt is triggered, the following operations are performed:
[0071] A, lock the SPI bus (spidev1.0), send 0x03 read command + 16-bit address pointer;
[0072] B, read 17 bytes of data frame from SPI;
[0073] C, after the data frame is read, write the read completion status to SPI.
[0074] Step 3: Telemetry remote control CAN data frame analysis and reorganization.
[0075] The main thread performs the following processing flow on the original data:
[0076] a, frame header analysis: extract the frame control field, including frame type (2 bits), total frame number (6 bits), frame sequence number (6 bits), and data field length (4 bits);
[0077] b, multi-frame reorganization: create a temporary buffer area, cache multi-frame data, sort by frame sequence number, and discard duplicate frames.
[0078] Step 4: Telemetry remote control data verification and error handling.
[0079] The main thread performs single-byte and check on the data, calculates the single-byte cumulative sum of the data part, and compares it with the check byte. If they are not consistent, update the error frame count + 1.
[0080] Step 5: Telemetry remote control instruction classification and distribution.
[0081] Analyze the specific instruction type and perform the corresponding operation according to the instruction type:
[0082] Remote control instruction: insert the instruction into the task queue and wait for the remote control execution thread to execute;
[0083] Telemetry instruction: read telemetry data from memory and write data to SPI memory;
[0084] Time synchronization broadcast instruction: analyze the data, calculate the real time according to the cumulative whole second starting from UTC time 2021-01-01 00:00:00, and send the time to the time synchronization thread for time synchronization.
[0085] Embodiment 2
[0086] Referring to Figure 2 The program of the present application is a multi-thread architecture, each thread realizes data interaction through a shared memory and a task queue, and the specific implementation steps are as follows:
[0087] Step 1: telemetry remote control thread initialization and start.
[0088] The main thread is created and resources are allocated, the main thread is created after the system is started, the highest priority (priority 20) is set for the process, and the shared memory area is initialized: the remote control task queue (Task Queue), the telemetry data buffer area (371 bytes);
[0089] The sub-thread is created by the main thread, and the sub-thread initializes the related components after being created.
[0090] Step 2: telemetry remote control main thread data reading.
[0091] The telemetry remote control main thread listens to the GPIO interrupt, and configures GPIO_3 as a rising edge trigger mode. When the signal is listened to, the data at the specified address in the SPI is read, the single-byte and check are performed on the data, and the data is parsed.
[0092] Step 3: telemetry acquisition thread running mechanism.
[0093] After the telemetry acquisition thread is started, the telemetry data is collected every second and written into the memory. The collected data includes: CPU occupancy, memory occupancy, disk space status, self-checking status, system startup times, interface packet count and temperature parameters. After the collection is completed, the data is encapsulated according to the encoding of E_PDU.
[0094] Step 4: remote control execution thread task processing.
[0095] The remote control process polls the task queue, and if there is a task, the corresponding task is executed immediately, and if no task is found, it waits for 10ms. After the task is executed, the execution state is written into the telemetry data of the shared memory.
[0096] Step 5: time synchronization thread microsecond level calibration.
[0097] The time synchronization thread receives the on-board time parsed by the main thread, and cooperates with the PPS interrupt signal to calibrate the time. When the system time and the on-board time error is greater than 2 seconds, the system time of the star-borne router is synchronized and calibrated.
[0098] Corresponding to the above-mentioned embodiments of the satellite routing telemetry remote control method based on a multi-thread architecture, the embodiments of the present application also provide 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 above-mentioned satellite routing telemetry remote control method based on a multi-thread architecture.
[0099] Corresponding to the above-mentioned embodiments of the satellite routing telemetry remote control method based on a multi-thread architecture, the embodiments of the present application also provide a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the above-mentioned satellite routing telemetry remote control method based on a multi-thread architecture.
[0100] The computer-readable storage medium can be an internal storage unit of any of the above-mentioned devices having data processing capability, such as a hard disk or a memory. The computer-readable storage medium can also be any device having data processing capability, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. Further, the computer-readable storage medium can include both an internal storage unit of any device having data processing capability and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the device having data processing capability, and can also be used to temporarily store data that has been output or will be output.
[0101] The above only describes the embodiments of the present application and is not intended to limit the present application. The present application can have various modifications and changes for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application shall be included in the scope of claims of the present application.
Claims
1. A spaceborne routing telemetry telecommand method based on a multi-thread architecture, characterized in that, The method is implemented on a spaceborne routing telemetry remote control system based on a GPIO and SPI multi-thread architecture, and the system comprises an integrated electronic device and a spaceborne router, and the method comprises the following steps of: The spaceborne routing telemetry remote control system is powered on, and after a three-mode redundant check on a telemetry remote control program, the program is started; subsequently, a working main thread, a telemetry acquisition thread, a remote control execution thread and a time synchronization thread are started synchronously; The telemetry acquisition thread is used for collecting system telemetry data at a period of one second, and storing the telemetry data in the memory according to an E_PDU encoding format; the remote control execution thread is used for cyclically monitoring a task queue, and when there is a remote control instruction task in the queue, the instruction is parsed and executed, and the execution state is written into the telemetry data in the memory; the time synchronization thread is used for continuously monitoring a PPS, and combining a received time broadcast frame to calibrate the system time to a microsecond level; the spaceborne router receives telemetry remote control instructions sent by the integrated electronic device through a CAN bus, wherein after each frame of valid instruction is written into an SPI memory, a GPIO interrupt is triggered, and the main thread is used for monitoring a GPIO interrupt event in real time; When the GPIO interrupt is monitored, the main thread reads a frame of CAN data from the SPI memory; and the frame header information of the CAN data is parsed to determine whether it is single-frame or multi-frame data; if it is single-frame, the data check is directly performed; if it is multi-frame, the multi-frame data is integrated and then the check calculation is performed; if the check is successful, corresponding operations are performed according to the instruction type, including: If it is a time broadcast instruction, the time data is sent to the time synchronization thread; If it is a remote control instruction, the instruction is added to the task queue for execution; If it is a telemetry instruction, the telemetry data stored in the memory is written into the SPI memory.
2. The spaceborne routing telemetry and telecommand method based on a multi-thread architecture according to claim 1, characterized in that, The three-mode redundant check on the telemetry remote control program comprises: MD5 value calculation is performed on three different regional telemetry remote control programs, and if one of the MD5 values is abnormal, one of the other two is used for coverage.
3. The space-based routing telemetry and telecommand method based on a multi-thread architecture according to claim 1, characterized in that, The system telemetry data comprises CPU occupancy, memory occupancy, disk space state, interface packet count and temperature parameter.
4. The space-based routing telemetry and telecommand method based on a multi-thread architecture according to claim 1, characterized in that, The remote control execution process comprises: checking whether the remote control instruction parameters are correct, and if the instruction parameter check is abnormal, directly returning a parameter abnormal state; if the instruction parameter check is correct, executing the instruction and returning an instruction execution result.
5. The space-based routing telemetry and telecommand method based on a multi-thread architecture according to claim 1, characterized in that, The time synchronization comprises: a time broadcast frame is sent once per second, and contains a 32-bit UTC second count and a 16-bit microsecond precision offset; a PPS signal rising edge is aligned with the UTC second count.
6. The space-based routing telemetry and telecommand method based on a multi-thread architecture according to claim 1, characterized in that, The integrated multi-frame data comprises: the frame sequence number and the total frame number in the CAN data frame header are parsed; the data is reorganized in the order of the frame sequence number, and the repeated frames and the frames not received in time are discarded; the complete data after reorganization is subjected to single-byte and check calculation.
7. The space-based routing telemetry and telecommand method based on a multi-thread architecture according to claim 1, characterized in that, The check calculation on the integrated data comprises: the data except the last byte is subjected to 8-bit check calculation, if the check sum of the previous data part is not equal to the value of the last byte, the error frame count is added by 1; if they are equal, the instruction type is distributed for processing.
8. An electronic device comprising a memory and a processor, characterized in that, The memory is coupled with the processor; wherein the memory is configured to store program data, and the processor is configured to execute the program data to implement the method for on-orbit routing telemetry and telecommand based on a multi-thread architecture according to any one of claims 1-7.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method for on-orbit routing telemetry and telecommand based on a multi-thread architecture according to any one of claims 1-7.
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