Satellite data simulation generation method, system, medium and device

By describing the satellite protocol hierarchy structure in XML files and recursively generating satellite data frames using a memory protocol object tree, the problem of low efficiency in generating simulated data in satellite ground application systems is solved. This enables flexible adaptation to different satellite models and complex protocols, as well as high-fidelity data injection.

CN122204957BActive Publication Date: 2026-07-24齐鲁空天信息研究院
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
齐鲁空天信息研究院
Filing Date
2026-05-14
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing technologies are inefficient in generating simulated data in satellite ground application systems, making it difficult to quickly adapt to different satellite models or complex protocols. Furthermore, they lack effective means to support multi-layered protocol nesting, consistent updates of timecode and count fields, and injection of real payload data.

Method used

A configurable XML file is used to describe the multi-layered nested structure of satellite transmission frames. Satellite data frames are generated recursively through a memory protocol object tree. Combined with high-precision timecode conversion and external real payload stream injection algorithms, a continuous satellite simulated data stream that can be directly received by ground software and parsed by services is generated.

Benefits of technology

It enables adaptation to new models or protocols without code modification, supports timing consistency of multi-layer protocol headers and injection of real payload data, improves the flexibility and fidelity of simulation data generation, and ensures that the business logic of ground software can be realistically verified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122204957B_ABST
    Figure CN122204957B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of satellite data processing, and provides a satellite data simulation generation method, system, medium and equipment, which comprises the following steps: parsing an XML configuration file used for defining satellite transmission frames, virtual channel data units, user frames / space packets and load fields to obtain a memory protocol object tree; recursively traversing the memory protocol object tree according to an output period to generate data frames of each layer, writing a configuration value into a fixed value field, increasing a count field by a step, converting a time field into a time code specified by a satellite protocol, continuously intercepting real load data according to a file offset modulo and a tail wrap mode for an external data field, recursively assembling a nested subframe after inheriting a parent frame context, and performing length alignment, check sum output. The protocol structure, dynamic fields and real load injection rules of satellite simulation data are configured, which is different from a scheme only facing communication coding and decoding or protocol packet assembly and analysis, and can generate continuous and high-fidelity satellite simulation data streams.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of satellite data processing technology, and in particular relates to a satellite data simulation generation method, system, medium and equipment. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] In the development of satellite ground application systems and data processing software, a large amount of simulation data is usually required for functional verification. Currently, the mainstream solutions include playing back on-orbit measured data or generating simulation data by writing dedicated simulation software.

[0004] Existing technologies typically hardcode satellite data frame formats (such as transmission frames, source packets, etc.) into the source code of simulation software. When the satellite model changes or the protocol format is adjusted, developers need to manually modify the code, recompile, and deploy the simulation tool.

[0005] Existing technologies lack flexibility in supporting satellite data formats, resulting in low efficiency in generating simulated data and high development and maintenance costs when faced with different satellite models or complex multi-layered protocol nesting. Moreover, existing solutions struggle to quickly simulate dynamic fields with time-series characteristics (such as frame counts and time codes), typically requiring complex program logic to achieve field auto-increment and association, and lacking effective means to quickly inject external real payload data into simulated frames.

[0006] Furthermore, existing XML / JSON-based solutions are mainly geared towards network communication encoding and decoding or dynamic packet parsing of general protocols for satellite receiving systems, while existing satellite data platform solutions are mainly geared towards the storage, virtualization, and processing scheduling of massive amounts of data. None of these solutions are geared towards generating continuous satellite simulation data streams for satellite ground software testing scenarios, nor do they simultaneously address the issues of recursive assembly of multi-layer satellite frames, consistent updating of timecode and count fields, continuous injection of real payload data, and hardware / protocol alignment constraint coordination. Summary of the Invention

[0007] To address the technical problems described in the background, this invention provides a satellite data simulation generation method, system, medium, and device. It uses configurable Extensible Markup Language (XML) files to uniformly describe the multi-layered nested structure of satellite transmission frames, virtual channel data units, user frames / space packets, and payload data fields, forming a memory protocol object tree after parsing. The data generation engine recursively generates frame fields at each layer based on this memory protocol object tree, simultaneously performing frame / source packet count auto-increment, high-precision timecode conversion, external real payload stream slice injection by offset, length alignment, and verification output. Therefore, this invention does not merely encode or decode existing communication protocols or dynamically assemble and parse packets; instead, it generates a continuous, high-fidelity satellite simulation data stream that can be directly received and parsed by the ground software of the satellite under test.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] The first aspect of the present invention provides a satellite data simulation generation method, comprising:

[0010] Obtain the XML configuration file, which uses a tree structure to map the multi-level nested relationship of the satellite protocol, including the frame definition node corresponding to the satellite data frame, the field node corresponding to the frame header field, the payload node corresponding to the payload area, and the user frame definition node nested in the payload node. The user frame definition node uses multiple field nodes to define the application process identifier field, timestamp field, count field, and data field.

[0011] Parse the XML configuration file to obtain the memory protocol object tree and identify the type of each field;

[0012] The memory protocol object tree is recursively traversed according to a preset output cycle. For each frame of data generated, the count field in the frame header field, virtual channel field, or source packet field is updated according to a preset step size. For fields of fixed value type, the fixed value defined in the XML configuration file is directly written. For fields of time count type, the clock is obtained during framing and converted into the time code specified by the satellite protocol before injection. For fields of external data type, the contents of the external raw data file are continuously filled into the payload segment using a streaming injection algorithm based on file offset mapping. For fields of nested subframes, subframes are generated recursively. Subframes inherit the context information of the parent frame. After the subframe is generated, it is returned and assembled into the parent frame.

[0013] Update the length field based on the actual fill length, verify the integrity and correctness of the single frame data, fill the check bits, and output the satellite data frame that can be received and parsed by the ground software of the satellite under test.

[0014] Furthermore, the frame header field includes:

[0015] Synchronization code is a fixed identifier used by the receiving end to identify the start position of a frame;

[0016] Frame count, an incrementing counter, is used by the receiver to detect lost frames.

[0017] Furthermore, the streaming injection algorithm based on file offset mapping includes:

[0018] Extract the external data file path and payload segment length Lp from the memory protocol object tree, and obtain the total length L of the external data file through an auxiliary function;

[0019] When generating the nth frame of data, the starting position Sn is calculated based on the frame count n, the payload segment length Lp, and the total length L of the external data file. Lp) mod L, calculate the ending position En=Sn+Lp;

[0020] Open the external data file in binary read-only mode, move the file pointer to Sn, read data of length Lp, and temporarily store the read data as the original data;

[0021] If En>L results in the original data length being less than Lp, the file pointer is reset to the beginning of the external data file, and the remaining data length is read and appended to the original data to complete the loop wrapping.

[0022] The raw data is embedded into the payload segment of the satellite data frame.

[0023] Furthermore, if the load segment length Lp is not configured, the formula for calculating the load segment length Lp is:

[0024] ;

[0025] Among them, L file The total length of the external data file, k is the minimum alignment unit, ceil() represents the rounding up function, k=gcd(A hardware A protocol `gcd()` represents taking the greatest common divisor of the two values, and the protocol forces alignment of the unit A. protocol The underlying hardware alignment unit A is specified as a value for the protocol. hardware =W bus / 8, W bus This refers to the bit width of the data bus or processor.

[0026] Furthermore, the verification of a single frame of data employs a cyclic redundancy check check code or an accumulation sum.

[0027] A second aspect of the present invention provides a satellite data simulation generation system, comprising:

[0028] The configuration definition module is configured to: obtain an XML configuration file, which adopts a tree structure to map the multi-level nested relationship of the satellite protocol, including a frame definition node corresponding to the satellite data frame, a field node corresponding to the frame header field, a payload node corresponding to the payload area, and a user frame definition node nested in the payload node. The user frame definition node uses multiple field nodes to define an application process identifier field, a timestamp field, a count field, and a data field.

[0029] The parsing module is configured to parse the XML configuration file, obtain the memory protocol object tree, and identify the type of each field.

[0030] The data generation module is configured to: recursively traverse the memory protocol object tree according to a preset output cycle; for each data frame generated, update the count field in the frame header field, virtual channel field, or source packet field according to a preset step size; for fields of fixed value type, directly write the fixed value defined in the XML configuration file; for fields of time count type, obtain the clock during framing and convert it into the time code specified by the satellite protocol before injecting; for fields of external data type, use a streaming injection algorithm based on file offset mapping to continuously fill the contents of the external raw data file into the payload segment; for fields of nested subframes, recursively generate subframes, with each subframe inheriting the context information of the parent frame, and return and assemble the subframe into the parent frame after generation.

[0031] The verification and output module is configured to: update the length field according to the actual padding length, verify the integrity and correctness of single frame data, and after padding the check bits, output satellite data frames that can be received and parsed by the ground software of the satellite under test.

[0032] Furthermore, the frame header field includes:

[0033] Synchronization code is a fixed identifier used by the receiving end to identify the start position of a frame;

[0034] Frame count, an incrementing counter, is used by the receiver to detect lost frames.

[0035] Furthermore, the streaming injection algorithm based on file offset mapping includes:

[0036] Extract the external data file path and payload segment length Lp from the memory protocol object tree, and obtain the total length L of the external data file through an auxiliary function;

[0037] When generating the nth frame of data, the starting position Sn is calculated based on the frame count n, the payload segment length Lp, and the total length L of the external data file. Lp) mod L, calculate the ending position En=Sn+Lp;

[0038] Open the external data file in binary read-only mode, move the file pointer to Sn, read data of length Lp, and temporarily store the read data as the original data;

[0039] If the length of the original data is less than Lp, the file pointer is reset to the beginning of the external data file, and the remaining length of data is read and appended to the original data.

[0040] The raw data is embedded into the payload segment of the satellite data frame.

[0041] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a satellite data simulation generation method as described above.

[0042] A fourth aspect of the present invention provides a computer device including a computer-readable storage medium, a processor, and a computer program stored on the computer-readable storage medium and executable on the processor, wherein the processor executes the program to implement the steps of a satellite data simulation generation method as described above.

[0043] Compared with the prior art, the beneficial effects of the present invention are:

[0044] This invention describes complex satellite protocol hierarchical structures using configurable XML files, separating satellite frame formats, dynamic field generation rules, and real payload injection rules from the program code. It supports recursive generation of multi-layer structures such as transmission frames, virtual channel data units, and user frames / space packets, and can adapt to new models or new protocols without modifying the code.

[0045] This invention supports unified configuration and synchronous updates of time codes, frame counts, virtual channel frame counts, and source packet counts, and can maintain timing consistency between multi-layer protocol headers during continuous output.

[0046] This invention breaks through the limitation that traditional analog data can only be filled with random numbers or fixed values. It supports offset modulus extraction, cross-file end wrapping, and payload length alignment injection of real sensor streams. This allows the ground station software to verify its business parsing logic when receiving analog data, forming an innovative point that is different from communication encoding and decoding, general protocol packet parsing, and satellite data storage and processing platforms. Attached Figure Description

[0047] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0048] Figure 1This is an overall flowchart of a satellite data simulation generation method according to Embodiment 1 of the present invention;

[0049] Figure 2 This is a detailed flowchart of a satellite data simulation generation method according to Embodiment 1 of the present invention;

[0050] Figure 3 This is a schematic diagram of the satellite data frame structure according to Embodiment 1 of the present invention;

[0051] Figure 4 This is a schematic diagram of the structure of a computer device according to Embodiment 4 of the present invention. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0053] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0054] Example 1

[0055] This embodiment provides a method for simulating and generating satellite data.

[0056] Since relying solely on on-orbit playback data or hard-coded simulation programs is insufficient to meet diverse research and testing needs, and existing communication encoding / decoding, protocol packet parsing, or data resource pooling solutions do not directly generate satellite simulation data streams with real payloads and time-series consistency, this embodiment provides a satellite data simulation generation method. The starting point of this concept is to decouple the satellite protocol structure, dynamic field rules, and real payload injection rules from the generation engine.

[0057] The satellite data simulation generation method provided in this embodiment has the core logic of completely decoupling the "data format description" from the "data generation logic".

[0058] This embodiment provides a satellite data simulation generation method, such as... Figure 1 and Figure 2 As shown, it mainly includes:

[0059] Step 1: Configuration Definition.

[0060] This step is a prerequisite for data processing. Its core is to construct the protocol description and generation configuration of satellite data in XML format, providing a unified rule basis for subsequent processes.

[0061] Specifically, by utilizing the tree structure of XML, the multi-layered nested relationships of satellite protocols are accurately mapped (e.g., physical frame > transmission frame > space packet > payload segment), with core tags including... <framedefinition>and <userframedefinition>;in, <framedefinition>This represents the frame definition, used to describe the name, frame header, payload area, and tail check field of a complete satellite data frame. <userframedefinition>This represents the user frame definition, used to describe user frames, space packets, or virtual channel data units nested within the payload area and their internal fields.

[0062] Define two types of core configuration items, covering static format and dynamic generation rules:

[0063] Data field configuration: Specify the field type (fixed, auto-increment, nested, external data injection, etc.) and attributes (such as auto-increment step size, timestamp format);

[0064] External data injection configuration: Specify the path to the external raw data file (external_file), the payload segment length (Lp), the padding method (such as sequential slicing), etc.

[0065] like Figure 3 As shown, the configurable XML file with a multi-layered nested structure includes the mapping relationship between the Satellite Data Frame Structure and the corresponding XML Configuration File Structure.

[0066] (1) The actual hierarchical structure of a satellite transfer frame, from the outside to the inside, is as follows:

[0067] Frame Header;

[0068] Sync Marker: A fixed identifier used by the receiving end to identify the start position of a frame;

[0069] Frame Count: An auto-incrementing counter used by the receiver to detect frame loss; it corresponds to the autoIncrement type field in the XML configuration.

[0070] The payload contains nested elements:

[0071] User Frame (source packet) is the core carrier of satellite payload data;

[0072] APID (Application Process Identifier): Identifies the payload application to which this frame of data belongs; it is a fixed value or a configured value.

[0073] Timestamp: Records the high-precision time of data generation, automatically generated and converted to the CCSDS standard format;

[0074] Data Field: The actual payload data, which can be filled by an external data injection algorithm.

[0075] (2) XML configuration file structure, used to define the configuration file format of satellite data frames. It uses XML tree tags to precisely map the binary frame structure on the left, including:

[0076] The root node (FrameDefinition) corresponds to the entire satellite transmission frame and is identified as the Transfer Frame by the name attribute;

[0077] Child nodes (Fields) correspond to fields in the frame header, such as Sync Marker and Frame Count, and define the field name, type, and generation rules.

[0078] The child node (Payload) corresponds to the payload portion of the frame, and contains nested UserFrame nodes, mapping the structure of the user frame.

[0079] The nested node (UserFrame) corresponds to the user frame in the payload. Internally, it uses Field nodes to define fields such as APID, Timestamp, and Data, which realizes the configurable description of the multi-level nested protocol.

[0080] As described below, the XML configuration file for the multi-level nested protocol adopts a three-level nested structure:

[0081] The first layer: the system transfer frame, the outermost container of the entire satellite data frame, defines the basic format of the transfer frame:

[0082] Frame header fields:

[0083] SyncMarker: A synchronization code with a fixed value of 0xCF1FCF1F, used by the receiver to identify the start position of a frame;

[0084] FrameCount: An 8-bit auto-incrementing counter of type uint, which increments by 1 automatically with each frame generated, and is used to detect dropped frames;

[0085] VCID: Virtual Channel Identifier, with a fixed value of 0, used to distinguish different virtual channels.

[0086] Tail fields:

[0087] FrameCheckSequence: Uses the CRC-16-CCITT algorithm to generate a checksum, which is used to verify the integrity of the entire frame of data.

[0088] The second layer, Virtual Channel Data Unit, is the virtual channel layer in the transmission frame payload, defining the control fields for the virtual channel.

[0089] VCFrameCount: A 32-bit auto-incrementing counter used to identify the frame number within the virtual channel;

[0090] ReplayFlag: A 1-bit flag with a fixed value of 0, used to mark whether it is playback data.

[0091] The third layer: the application data packet (pacePacket), is the core of the payload and defines the final application data format.

[0092] Basic fields:

[0093] APID: An application process identifier with a fixed value of 2047, used to distinguish the data sources of different payloads;

[0094] SourceSequenceCount: A 14-bit auto-incrementing counter that identifies the sequence number of this application package;

[0095] Timestamp: A 7-byte timestamp field that is automatically generated and converted to binary format.

[0096] External data injection configuration:

[0097] PayloadData: This is the core payload data field. Through the external_file configuration item, it is specified that real sensor data is read from the file C: / data / real_sensor_data.dat to fill the data, thus implementing the "real external data injection algorithm".

[0098] Trailer check:

[0099] FrameCheckSequence: A frame check sequence that performs cyclic redundancy check on the entire transmitted frame. The receiving end can use this check value to detect whether a bit error has occurred during transmission.

[0100] Step 2, Configuration and Analysis.

[0101] Step 201: The configuration parser module loads and parses the XML configuration file: It reads the XML configuration file written / modified by the user / tester, converts the text-formatted configuration into an operable object model in memory, and provides support for the data generation engine. The specific process is as follows:

[0102] Dynamically load predefined XML configuration files and validate the validity of the configuration format (such as tag integrity and parameter validity).

[0103] Based on the mapping rules, the XML tree structure is parsed to construct the corresponding memory protocol object tree (i.e., the protocol element mapping table, which maps nested protocol relationships).

[0104] Identify the type (fixed value, time count, external data, nested subframes, etc.) and attributes of each field.

[0105] Step 202: Initialize auxiliary support components:

[0106] Counter pool: For each field of the autoIncrement="true" attribute, define a counter, maintain an independent state, and record information such as initial value and step size;

[0107] File pointer mapping table: For the external data file D specified in the configuration, it records metadata such as file path and total length L to facilitate fast subsequent reading;

[0108] A high-precision synchronous clock is used as the starting reference for timestamp generation.

[0109] Step 2 outputs the protocol object tree in memory, the initialized counter pool, and the file pointer mapping table (which are directly used as input to the data generation engine).

[0110] Step 3: Data generation.

[0111] Driven by the data generation engine and triggered by a clock signal, the system periodically traverses the memory protocol object tree to fill in data for various fields and recursively generate nested protocols, ultimately outputting the original binary data.

[0112] The data generation engine is responsible for coordinating the static field population, dynamic field calculation, and real-time interception of external data streams, thus completing the data generation process.

[0113] Step 301: Traverse the memory protocol object tree to identify tags such as FrameDefinition and UserFrame, as well as nested subframe identifiers.

[0114] Step 302: Automatic counter increment: The counter manager reads the status of the corresponding field in the counter pool. For each frame of data generated, the field value of the frame header field is updated according to the preset step size to inject the frame count or packet count, and the counter pool status is refreshed synchronously.

[0115] In this embodiment, a 32-bit auto-incrementing counter is also used to identify the frame sequence number within the virtual channel.

[0116] Step 303: For time-related fields in the satellite protocol, automatically fill them according to the preset configuration to solve the problem of manual calculation errors in dynamic fields.

[0117] (1) If the data type is fixed, write the predefined fixed value in XML directly.

[0118] (2) High-precision timestamp mapping: If the data type is time count, the time code generator obtains the high-precision clock at the moment of frame assembly and automatically converts it into the CCSDS standard CUC (segmented binary time code) or CDS (calendar segmented time code) format. The data generation engine injects the clock into the corresponding timestamp field.

[0119] (3) Real external data injection.

[0120] If the data type is external data, a streaming injection algorithm based on file offset mapping continuously fills the contents of the external raw data file D into the load segment, solving the problems of "false, empty, and disordered" load data and discontinuous output over long periods in existing simulation technologies. Specific steps are as follows:

[0121] Read configuration: Obtain the external data file path, payload segment length Lp, and padding method from the memory protocol object tree, and obtain the total length L of the external data file through an auxiliary function;

[0122] Calculate file offset: When generating the nth frame of data, calculate the starting position Sn = (n * ...then * () * (then offset is a common encoding of data and data, but the context is unclear). The original text seems to be discussing file offset calculations and the calculation of file offsets. Lp) mod L, calculate the end position En=Sn+Lp, then the extraction interval of the nth frame in the external data file is [Sn,En];

[0123] Streaming data reading: Open the specified external data file in binary read-only mode, move the file pointer to Sn, read data of length Lp, and temporarily store the read data as the original data;

[0124] Boundary wrap-around processing: If En>L, resulting in the current read length being less than Lp, the file pointer is reset to the beginning of the external original data file, and the remaining length of data is read. The supplementary data is then appended to the previous segment of original data to complete the loop wrap-around filling. At this time, the first part of the data in the nth frame has a value range of [Sn,L], and the second part has a value range of [0,Lp-(L-Sn)], thus ensuring that fixed-length and continuous load data is still output when crossing the end of the file.

[0125] Finally, the original binary data is embedded into the reserved position of the payload segment of the satellite data frame to complete the filling of the payload data of the nth frame, ensuring the authenticity and continuity of the payload data.

[0126] This embodiment uses offset modulus calculation, end-of-pipe wrap-around completion, and payload length alignment to enable the simulator to output continuous, uninterrupted, and protocol-compliant real sensor data streams even during long-term operation. The ground software of the satellite under test does not receive random numbers or fixed placeholder data, but rather real payload segments that can be entered into service links such as image decompression and spectrum analysis. This forms a high-fidelity simulated data generation capability that is different from general encoding / decoding or packet parsing schemes, solving the problems of "fake, empty, and chaotic" traditional simulated data.

[0127] (4) If the data type is nested subframe (nested container), that is, when a nested subframe identifier is encountered, the recursive assembly module recursively calls the data generation function to recursively generate subframes (i.e., enter the next layer of user frames), and inherits the context information of the parent frame for each layer of subframes (such as the current frame sequence number, global timestamp, length status and output buffer offset) to ensure that the counting, time and length logic between the multi-layer protocol headers are consistent; the initial construction of each layer of protocol headers is completed in the order from the outside to the inside (physical frame → transmission frame → space packet → payload segment), reserving space for subsequent field filling; after the subframe is generated, it returns and is assembled into the parent frame to finally form a complete binary satellite data frame.

[0128] Step 304, Dynamic Length Calculation: Real-time statistics of the actual padding length of the payload segment, automatic update of the "Length Field" in the packet header, ensuring consistency between the protocol header and payload segment length, and avoiding errors caused by manual calculation.

[0129] In this embodiment, if the load segment length Lp is not configured, the formula for calculating the load segment length Lp is:

[0130] ;

[0131] Among them, L file The total length (in bytes) of the external data file, k is the smallest alignment unit, ceil() represents the rounding up function, k=gcd(A hardware A protocol `gcd()` represents taking the greatest common divisor of the two values, and the protocol forces alignment of the unit A. protocol The underlying hardware alignment unit A is specified for the protocol. hardware =W bus / 8, W bus This refers to the bit width of the data bus or processor. The compatible alignment unit k is calculated using the greatest common divisor, ensuring that the generated payload segment length meets the dual requirements of both the underlying hardware and the upper-layer protocol. This guarantees that the data can be correctly parsed by the ground receiving station, achieving interoperability between the satellite and ground systems.

[0132] Step 4: Verification and Output.

[0133] The verification and output module performs verification and format conversion on the raw binary data, and finally outputs it in a specified manner, forming a closed loop.

[0134] Data verification: The verification calculation unit calculates the CRC (Cyclic Redundancy Check) check code or the sum to verify the integrity and correctness of a single frame of data, fills in the check bits, and if the verification fails, the frame is discarded and the retry logic is triggered.

[0135] Data Output: The data output interface will output the validated binary stream according to the method specified in the XML configuration, supporting two main methods:

[0136] Network output: Real-time network transmission via UDP / TCP protocol to the software of the satellite under test;

[0137] File output: Writes binary data to a local file for offline analysis, testing, or backup.

[0138] Finally, the output is satellite data (network stream or local file) that conforms to the satellite protocol, passes verification, and is ready for direct use.

[0139] The satellite data simulation generation method provided in this embodiment has the following advantages:

[0140] Functional scalability: Supports multi-layer user frame nesting, enabling flexible definition of various complex satellite data protocols;

[0141] Configuration efficiency: New protocols can be adapted without modifying the code, and data format switching can be achieved by modifying the XML file;

[0142] Dynamic simulation: Supports auto-incrementing configuration of timecode, frame count, and source packet count to ensure the timing authenticity of the simulated data;

[0143] High-fidelity payload data injection: It breaks through the limitation that traditional analog data can only be filled with random numbers or fixed values, and supports real sensor streams to extract modulus by offset, wrap around to the end of the file and length-aligned injection, so that the ground station software can be truly verified when receiving analog data, and its business parsing logic (such as image decompression and spectrum analysis) can be truly verified.

[0144] Example 2

[0145] This embodiment provides a satellite data simulation generation system, including: a configuration definition module, a configuration parsing module, a data generation engine (data generation module), and a verification and output module.

[0146] The configuration definition module is configured to: obtain an XML configuration file, which adopts a tree structure to map the multi-level nested relationship of the satellite protocol, including a frame definition node corresponding to the satellite data frame, a field node corresponding to the frame header field, a payload node corresponding to the payload area, and a user frame definition node nested in the payload node. The user frame definition node uses multiple field nodes to define an application process identifier field, a timestamp field, a count field, and a data field.

[0147] The parsing module is configured to parse the XML configuration file, obtain the memory protocol object tree, and identify the type of each field.

[0148] The data generation module is configured to: recursively traverse the memory protocol object tree according to a preset output cycle; for each data frame generated, update the count field in the frame header field, virtual channel field, or source packet field according to a preset step size; for fields of fixed value type, directly write the fixed value defined in the XML configuration file; for fields of time count type, obtain the clock during framing and convert it into the time code specified by the satellite protocol before injecting; for fields of external data type, use a streaming injection algorithm based on file offset mapping to continuously fill the contents of the external raw data file into the payload segment; for fields of nested subframes, recursively generate subframes, with each subframe inheriting the context information of the parent frame, and return and assemble the subframe into the parent frame after generation.

[0149] The verification and output module is configured to: update the length field according to the actual fill length, verify the integrity and correctness of single frame data, and after filling the check bits, output satellite data frames that can be received and parsed by the ground software of the satellite under test.

[0150] Furthermore, the frame header field includes:

[0151] Synchronization code is a fixed identifier used by the receiving end to identify the start position of a frame;

[0152] Frame count, an incrementing counter, is used by the receiver to detect lost frames.

[0153] Furthermore, the streaming injection algorithm based on file offset mapping includes:

[0154] Extract the external data file path and payload segment length Lp from the memory protocol object tree, and obtain the total length L of the external data file through an auxiliary function;

[0155] When generating the nth frame of data, the starting position Sn is calculated based on the frame count n, the payload segment length Lp, and the total length L of the external data file. Lp) mod L, calculate the ending position En=Sn+Lp;

[0156] Open the external data file in binary read-only mode, move the file pointer to Sn, read data of length Lp, and temporarily store the read data as the original data;

[0157] If the length of the original data is less than Lp, the file pointer is reset to the beginning of the external data file, and the remaining length of data is read and appended to the original data.

[0158] The raw data is embedded into the payload segment of the satellite data frame.

[0159] Furthermore, if the load segment length Lp is not configured, the formula for calculating the load segment length Lp is:

[0160] ;

[0161] Among them, L file The total length of the external data file, k is the minimum alignment unit, ceil() represents the rounding up function, k=gcd(A hardware A protocol `gcd()` represents taking the greatest common divisor of the two values, and the protocol forces alignment of the unit A. protocol The underlying hardware alignment unit A is specified for the protocol. hardware =W bus / 8, W bus This refers to the bit width of the data bus or processor.

[0162] Furthermore, the verification of a single frame of data employs a cyclic redundancy check check code or an accumulation sum.

[0163] It should be noted that each module in this embodiment corresponds one-to-one with each step in Embodiment 1, and their specific implementation processes are the same, so they will not be repeated here.

[0164] Example 3

[0165] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a satellite data simulation generation method as described in Embodiment 1 above.

[0166] Example 4

[0167] This embodiment provides a computer device, such as... Figure 4 As shown, the system includes a computer-readable storage medium 1003, a processor 1001, a communication interface 1002, and a computer program stored on the computer-readable storage medium 1003 and executable on the processor 1001. The processor 1001, communication interface 1002, and computer-readable storage medium 1003 can be connected via a bus or other means. The communication interface 1002 is used to receive and transmit data. When the processor 1001 executes the program, it implements the steps in the satellite data simulation generation method described in Embodiment 1 above.

[0168] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.< / userframedefinition> < / framedefinition> < / userframedefinition> < / framedefinition>

Claims

1. A method for simulating and generating satellite data, characterized in that, include: Obtain the XML configuration file, which uses a tree structure to map the multi-level nested relationship of the satellite protocol, including the frame definition node corresponding to the satellite data frame, the field node corresponding to the frame header field, the payload node corresponding to the payload area, and the user frame definition node nested in the payload node. The user frame definition node uses multiple field nodes to define the application process identifier field, timestamp field, count field, and data field. Parse the XML configuration file to obtain the memory protocol object tree and identify the type of each field; The memory protocol object tree is recursively traversed according to a preset output cycle. For each frame of data generated, the count field in the frame header field, virtual channel field, or source packet field is updated according to a preset step size. For fields of fixed value type, the fixed value defined in the XML configuration file is directly written. For fields of time count type, the clock is obtained during framing and converted into the time code specified by the satellite protocol before injection. For fields of external data type, the contents of the external raw data file are continuously filled into the payload segment using a streaming injection algorithm based on file offset mapping. For fields of nested subframes, subframes are generated recursively. Subframes inherit the context information of the parent frame. After the subframe is generated, it is returned and assembled into the parent frame. The length field is updated based on the actual fill length. The integrity and correctness of the single frame data are verified. After filling the check bits, the satellite data frame that can be received and parsed by the ground software of the satellite under test is output.

2. The satellite data simulation generation method as described in claim 1, characterized in that, The frame header fields include: Synchronization code is a fixed identifier used by the receiving end to identify the start position of a frame; Frame count, an incrementing counter, is used by the receiver to detect lost frames.

3. The satellite data simulation generation method as described in claim 1, characterized in that, The streaming injection algorithm based on file offset mapping includes: Extract the external data file path and payload segment length Lp from the memory protocol object tree, and obtain the total length L of the external data file through an auxiliary function; When generating the nth frame of data, the starting position Sn is calculated based on the frame count n, the payload segment length Lp, and the total length L of the external data file. Lp) mod L, calculate the ending position En=Sn+Lp; Open the external data file in binary read-only mode, move the file pointer to Sn, read data of length Lp, and temporarily store the read data as the original data; If En>L results in the original data length being less than Lp, the file pointer is reset to the beginning of the external data file, and the remaining data length is read and appended to the original data to complete the loop wrapping. The raw data is embedded into the payload segment of the satellite data frame.

4. The satellite data simulation generation method as described in claim 3, characterized in that, If the load segment length Lp is not configured, the formula for calculating the load segment length Lp is: ; Among them, L file The total length of the external data file, k is the minimum alignment unit, ceil() represents the rounding up function, k=gcd(A hardware A protocol `gcd()` represents taking the greatest common divisor of the two values, and the protocol forces alignment of the unit A. protocol The underlying hardware alignment unit A is specified for the protocol. hardware =W bus / 8, W bus This refers to the bit width of the data bus or processor.

5. The satellite data simulation generation method as described in claim 1, characterized in that, The verification of a single frame of data uses a cyclic redundancy check code or an accumulated sum.

6. A satellite data simulation and generation system, characterized in that, include: The configuration definition module is configured to: obtain an XML configuration file, which adopts a tree structure to map the multi-level nested relationship of the satellite protocol, including a frame definition node corresponding to the satellite data frame, a field node corresponding to the frame header field, a payload node corresponding to the payload area, and a user frame definition node nested in the payload node. The user frame definition node uses multiple field nodes to define an application process identifier field, a timestamp field, a count field, and a data field. The parsing module is configured to parse the XML configuration file, obtain the memory protocol object tree, and identify the type of each field. The data generation module is configured to: recursively traverse the memory protocol object tree according to a preset output cycle; for each data frame generated, update the count field in the frame header field, virtual channel field, or source packet field according to a preset step size; for fields of fixed value type, directly write the fixed value defined in the XML configuration file; for fields of time count type, obtain the clock during framing and convert it into the time code specified by the satellite protocol before injecting; for fields of external data type, use a streaming injection algorithm based on file offset mapping to continuously fill the contents of the external raw data file into the payload segment; for fields of nested subframes, recursively generate subframes, with each subframe inheriting the context information of the parent frame, and return and assemble the subframe into the parent frame after generation. The verification and output module is configured to: update the length field according to the actual padding length, verify the integrity and correctness of single frame data, and after padding the check bits, output satellite data frames that can be received and parsed by the ground software of the satellite under test.

7. A satellite data simulation and generation system as described in claim 6, characterized in that, The frame header fields include: Synchronization code is a fixed identifier used by the receiving end to identify the start position of a frame; Frame count, an incrementing counter, is used by the receiver to detect lost frames.

8. A satellite data simulation and generation system as described in claim 6, characterized in that, The streaming injection algorithm based on file offset mapping includes: Extract the external data file path and payload segment length Lp from the memory protocol object tree, and obtain the total length L of the external data file through an auxiliary function; When generating the nth frame of data, the starting position Sn is calculated based on the frame count n, the payload segment length Lp, and the total length L of the external data file. Lp) mod L, calculate the ending position En=Sn+Lp; Open the external data file in binary read-only mode, move the file pointer to Sn, read data of length Lp, and temporarily store the read data as the original data; If En>L results in the original data length being less than Lp, the file pointer is reset to the beginning of the external data file, and the remaining data length is read and appended to the original data to complete the loop wrapping. The raw data is embedded into the payload segment of the satellite data frame.

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 steps in the satellite data simulation generation method as described in any one of claims 1-5.

10. A computer device comprising a computer-readable storage medium, a processor, and a computer program stored on the computer-readable storage medium and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the satellite data simulation generation method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Satellite telemetry and telecontrol simulation method and system

    CN106506058A

  • Digital Satellite AOS Protocol Telemetry Source Code Artificial Intelligence Writing Method

    CN109062565A