Multi-context parallel reconstruction method, apparatus, gateway and medium
By implementing a multi-context parallel reconstruction method for the CCSDS AOS receiver, the problems of limited data processing throughput and difficulty in multi-threaded parallel expansion are solved, achieving efficient data recovery and error isolation, and improving the system performance under high data rate and high packet loss conditions.
Patent Information
- Application Number
- CN202611677720.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-28
- Publication Date
- 2026-11-24
AI Technical Summary
The existing CCSDS AOS receiver suffers from limited throughput, difficulty in multi-threaded parallel expansion, and poor error isolation capabilities. In particular, under conditions of high data rate and high packet loss rate, the recovery capability after frame loss is limited.
A multi-context parallel reconstruction method is adopted. By generating frame sequence coordinates for multiple CCSDS AOS transmission frames in the same virtual channel, dividing the data packet region for parallel parsing, establishing an independent reconstruction context, and using the first packet header pointer for data packet parsing and recovery, lock-free multi-threaded cooperation and accurate error isolation are achieved.
It improves the data throughput of the receiving end, eliminates lock contention and ownership conflicts, significantly improves data recovery capability and robustness, and ensures stability and continuity under high load and frame loss conditions.
Smart Images

Figure CN123164181A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of link protocol processing technology, and in particular to a method, apparatus, gateway, and medium for multi-context parallel reconstruction. Background Technology
[0002] In the CCSDS AOS (Advanced Orbiting Systems) protocol, the packet service uses fixed-length M Protocol Data Units (M_PDUs) to carry variable-length packets. Each M_PDU consists of a 2-byte M_PDU header and an M_PDU packet area. The First Packet Header Pointer (FHP) in the header points to the first byte of the first packet in this M_PDU.
[0003] When a data packet continues from the previous frame to the current frame, the area before FHP represents the continuation of that data packet; the position pointed to by FHP is the starting point of the first new data packet in the current frame. If there is no new data packet starting point in the current frame, FHP is set to all 1s; if the data packet area contains only idle data, FHP is set to all 1s minus 1.
[0004] The typical implementation of the existing CCSDS AOS receiver is as follows: A sequential reconstruction state is maintained for each virtual channel, and the received M_PDUs are processed sequentially according to the Virtual Channel Frame Count (VCFC). The specific processing flow is as follows: The current M_PDU is parsed, and the data packets are extracted. If the data packet is complete within the current frame, it is output directly. If the data packet crosses frame boundaries and is incomplete within the current frame, the intermediate state of the data packet (including the received data content and the coordinates of the next expected frame) is saved, and the packet is reassembled after subsequent frames arrive.
[0005] The existing implementation described above has the following shortcomings: The processing flow is sequentially dependent, limiting throughput. The reconstruction state of each virtual channel is singular; if a previous data packet is not yet complete, subsequent frames, even if they have arrived, cannot begin processing the new data packets they contain. Because data packet lengths are variable and may span multiple frames, this single sequential processing mode results in a significant amount of time being spent waiting for cross-frame data packets to be completed, making it difficult to improve receiver throughput.
[0006] Multithreaded parallel scaling is difficult. Existing implementations maintain a single shared state for each virtual channel. If multiple threads are used to process multiple frames of the same virtual channel in parallel, multiple threads need to access and modify the shared state simultaneously. This requires the introduction of locking mechanisms or complex synchronization protocols, which not only increases implementation complexity but also introduces lock contention and ownership conflicts. Parallel efficiency is limited by the serialization of access in critical sections.
[0007] Poor error isolation capability. In existing implementations, all data packets in a virtual channel share the same reconstruction state. Once a cross-frame data packet cannot be recovered due to frame loss, the reconstruction state of the entire virtual channel may be inconsistent, potentially causing a series of subsequent data packets that could have been correctly recovered to be dropped as well.
[0008] Limited recovery capability after frame loss. When frame loss occurs, existing implementations typically discard all continuation data after the lost frame, as well as incomplete data packets in subsequent frames that depend on that state. Even if the FHP of a subsequent frame clearly indicates the start point of a new valid data packet, it is impossible to recover the parsing independently from that position, and it is necessary to wait for the retransmission or timeout mechanism of the upper layer protocol to intervene. Summary of the Invention
[0009] This application provides a multi-context parallel reconstruction method, apparatus, gateway, and medium. Without changing the CCSDS AOS frame format, it realizes parallel processing of multiple data packet regions in the same virtual channel, lock-free multi-threaded cooperation, precise limitation of the error impact range after frame loss, and independent recovery from the trusted FHP, thereby improving the processing performance and robustness of the receiver under complex conditions such as high data rate, high concurrency, and high packet loss rate.
[0010] Firstly, this application provides a multi-context parallel reconstruction method, including: Acquire multiple CCSDS AOS transmission frames belonging to the same virtual channel, and generate frame sequence coordinates for each transmission frame based on the virtual channel frame count; Obtain the first packet header pointer from the M_PDU header carried in each transmission frame, and divide the M_PDU data packet area into a continuous area and a parsing area with the start point of the new data packet as the anchor point according to the first packet header pointer; Parallel packet parsing is performed on multiple parsing regions, and a reconstruction context identified by the packet start coordinates is established for each packet that crosses the M_PDU boundary; Associate the continuation region with the corresponding reconstruction context; Once the corresponding data packet is complete, submit the information according to the order of the starting coordinates of the data packet.
[0011] Preferably, the method further includes: When a frame sequence gap is detected, the reconstruction context that needs to cross the frame sequence gap is terminated, and packet parsing is resumed from the position indicated by the first packet header pointer in the M_PDU packet area with a valid first packet header pointer after the gap.
[0012] Furthermore, the frame sequence coordinates include the virtual channel frame count, frame count period, and local sequence generation; when the frame count period field is not enabled, the receiver identifies the wraparound of the virtual channel frame count based on the modulus count comparison result and the rearrangement window width, and generates the local sequence generation.
[0013] Further, the step of dividing the M_PDU data packet region into a continuation region and a parsing region anchored to the start point of a new data packet based on the first packet header pointer includes: When the value of the first packet header pointer is between 0 and the length of the M_PDU data packet area minus 1, [0, first packet header pointer) is used as a continuation area, and [first packet header pointer, end of M_PDU data packet area) is used as an anchor parsing area; when the first packet header pointer is all 1s, the entire M_PDU data packet area is used as a continuation area with no new data packet starting point; when the first packet header pointer is all 1s minus 1, the entire M_PDU data packet area is identified as an idle data area.
[0014] Preferably, the parallel packet parsing of the multiple parsing regions includes: The worker thread does not wait for the processing result of the previous frame, but reads the header information of the data packets sequentially from the position indicated by the first packet header pointer; if the entire data packet is within the current frame, a complete data packet record is generated; if the data packet crosses the end of the current frame, a reconstruction context is established to wait for the continuation of the data; if the data packet header is incomplete at the end of the frame, a reconstruction context is established to wait for the complete header.
[0015] Preferably, the continuation region is generated as a continuation descriptor indexed by frame order coordinates, and the continuation descriptor does not directly guess the data packet to which it belongs, but is indexed by frame order coordinates; The establishment of the association includes: reading the next expected frame sequence coordinates of the reconstructed context, and finding the frame descriptor corresponding to the coordinates; if the frame descriptor already exists, claiming its continuation segment, otherwise registering the context in the waiting table; if the continuation descriptor arrives first but the corresponding context has not yet been created, registering the continuation descriptor in the waiting table; the context and the continuation descriptor are matched when either is published; after a successful match, an event is sent only to the thread that owns the context.
[0016] Preferably, the method further includes: when the reconstruction context is expected to be completed in a frame with a valid first header pointer, comparing the expected end offset with the position pointed to by the first header pointer of that frame; if the two are inconsistent, then the position pointed to by the first header pointer is taken as the reliable starting point of a new data packet, and the data after the first header pointer is no longer interpreted based on the length deduced from the context.
[0017] Furthermore, the submission of information according to the order of the data packet's starting coordinates includes: The submission can be either a strictly sequential submission mode or a complete-delivery mode. The strict sequential submission mode includes: after the frame local parsing is completed, a submission slot is established for the starting point of all data packets in the frame, complete data packets are written to the corresponding slot, data packets that cannot be recovered or have timed out are written to a termination flag, and the submission thread advances the submission level only after all data packets earlier than the starting coordinates corresponding to the current submission level have been completed or terminated. The "Complete and Deliver" mode includes: delivering complete data packets immediately, while carrying start coordinates and sequence status information for the upper layer to choose to reorder or accept out-of-order delivery.
[0018] Preferably, the recovery packet parsing further includes: marking the corresponding frame coordinate interval as a gap; finding the reconstruction context where the coordinates of the next expected frame fall into or cross the gap and marking it as terminated; isolating the anchorless continuation data after the gap and before the next valid header pointer; restarting packet parsing from the position pointed to by the first valid header pointer after the gap; and generating a lost or incomplete record for the terminated context to advance the submission watermark.
[0019] Preferably, the method further includes: before the receiving window times out, late frames within the window are filled with the corresponding frame sequence coordinates; duplicate frames that have been published and have the same content are directly deduplicated; frames with the same coordinates but different content are marked as conflict and enter into security policy processing; virtual channel frame count wrapback is distinguished by frame count period or local sequence generation; device reset or management reconfiguration triggers a new local sequence generation; when resources are insufficient, they are recycled in the priority order of confirmed failure context, timeout context, context crossing the confirmation gap, and the oldest context exceeding the receiving window.
[0020] Secondly, this application provides a multi-context parallel reconstruction apparatus, including: The frame sequence coordinate generation unit is used to generate frame sequence coordinates for the received CCSDS AOS transmission frames; The region partitioning unit is used to divide the M_PDU data packet region into a continuation region and an anchor parsing region according to the first packet header pointer in the M_PDU header. A parallel parsing unit is used to perform parallel data packet parsing on multiple anchored parsing regions; The multi-context management unit is used to establish and track independent reconstruction contexts identified by the packet start coordinates for packets that cross M_PDU boundaries; The continuation association unit is used to generate the continuation region as a continuation descriptor and associate the continuation descriptor with the corresponding context according to the next expected frame sequence coordinates of the reconstruction context; The re-anchoring unit is used to truncate the reconstruction context when the expected end offset of the reconstruction context is inconsistent with the position pointed to by the first packet header pointer of the frame. The gap recovery unit is used to terminate the context that must cross the gap and resume parsing from the subsequent valid first packet header pointer when a frame sequence gap is detected; The submission unit is used to submit completed or terminated data packets according to the starting coordinates of the data packet.
[0021] This application also provides a satellite ground gateway, comprising: one or more AOS frame input interfaces; a multi-core processor or a heterogeneous processor; a memory storing a program executable by the processor; and a network-side output interface; wherein when the program is executed by the processor, it implements any of the methods described above.
[0022] This application provides a computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the method described in any of the preceding claims.
[0023] Compared with existing technologies, the beneficial effects of the application include at least the following: Parallel parsing of multiple M_PDU data packet regions within the same virtual channel is performed. For data packets crossing M_PDU boundaries, independent reconstruction contexts are established, each identified by the packet's starting coordinates. This allows multiple worker threads to process multiple data packets from the same virtual channel simultaneously without waiting for the previous frame to complete. Compared to the serial processing method in existing technologies where only one sequential reconstruction state is maintained per virtual channel, this invention effectively eliminates the problem of data packets in subsequent frames being blocked due to incomplete cross-frame data packets, significantly improving the data throughput of the receiving end.
[0024] Each rebuild context has an independent owner thread, and different worker threads maintain their own independent rebuild contexts without sharing residual caches. This avoids the locking mechanisms and complex synchronization protocols required for multiple threads to concurrently modify the same shared state, eliminates lock contention and ownership conflicts, and improves the utilization efficiency of multi-core processors.
[0025] When a frame sequence gap is detected, only the context where the coordinates of the next expected frame fall into or cross the gap is marked as terminated. Data without anchor points before the next valid header pointer after the gap is isolated, and packet parsing restarts from the position pointed to by the first valid header pointer after the gap. Complete packets already independently parsed after that header pointer are retained and enter the submission slot. This limits the impact of frame loss to the individual contexts crossing the gap, and packets anchored by valid header pointers after the gap can be recovered independently, significantly improving data recovery capability and parsing continuity under channel frame loss conditions.
[0026] When the context reconstruction is expected to be completed in a frame with a valid first header pointer, the expected end offset is compared with the position pointed to by the first header pointer of that frame. If the two are inconsistent, the position pointed to by the first header pointer is taken as the reliable starting point of the new data packet. The data after the first header pointer is no longer interpreted based on the length deduced from the old context. This allows the parsing starting point to be immediately re-anchored based on the FHP as a reliable basis, even in normal processing without frame loss, once the starting point indicated by the FHP is found to be inconsistent with the expected context deduction, preventing the spread of errors caused by a single context error.
[0027] By unifying the identification of each frame through extended frame order coordinates, it supports multi-scenario management such as late frame insertion within the window, duplicate frame deduplication, safe handling of conflicting frames, VCFC wraparound identification, and device reset triggering of new generations. When resources are insufficient, they are recycled in the priority order of confirmed failure context, timeout context, context crossing the confirmation gap, and the oldest context exceeding the receiving window, ensuring stability and resource utilization efficiency under long-term operation and high load conditions. Attached Figure Description
[0028] Figure 1 The diagram shown is a schematic diagram of the multi-context parallel reconstruction method provided in an embodiment of this application; Figure 2 The diagram shows the M_PDU data packet region division under three scenarios provided in the embodiments of this application; Figure 3 The diagram shows the FHP resynchronization recovery process after a frame sequence gap occurs. Detailed Implementation
[0029] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0030] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0031] Example 1, referring to Figure 1This embodiment provides a multi-context parallel reconstruction method, applied to the CCSDS AOS scenario, including steps S1 to S5.
[0032] S1: Obtain multiple CCSDS AOS transmission frames belonging to the same virtual channel, and generate frame sequence coordinates for each transmission frame based on the virtual channel frame count.
[0033] Specifically, the receiving end obtains the AOS transmission frame, which has undergone frame synchronization, channel decoding, and verification, from the physical layer or data link layer. For each received AOS transmission frame, the receiving end extracts the Transmission Frame Version Number (TFVN), Aircraft Identifier (SCID), Virtual Channel Identifier (VCID), Virtual Channel Frame Count (VCFC), Frame Count Cycle, and First Packet Header Pointer (FHP) from the frame header. The TFVN distinguishes different transmission frame versions, the SCID and VCID jointly identify the virtual channel to which the frame belongs, the VCFC is a 24-bit sequential counter used to identify the order of frames within the same virtual channel, and the Cycle is a 4-bit frame count period used to extend the VCFC counting range.
[0034] The receiver groups the input AOS transmission frames using SCID and VCID as keywords. Frames belonging to the same (SCID, VCID) tuple are grouped into the same virtual channel, while frames belonging to different virtual channels are processed independently.
[0035] For each transmitted frame within the same virtual channel, the receiving end determines the state of each frame relative to the currently received frame sequence by comparing the modulo-count and the receiving window. This includes: new frames (VCFCs increment sequentially and as expected), late frames (VCFCs fall within the receiving window but are in a later order than the current processing position), duplicate frames (VCFCs and frame content are completely identical to the received frames), and count wraparound (VCFCs jump from the maximum value to the minimum value, indicating the end of a counting cycle).
[0036] The specific method for modulo-count comparison is as follows: Assume the Virtual Channel Frame Count (VCFC) is a 24-bit field with a modulus of M = 2^24 = 16,777,216. For two frames arriving sequentially within the same virtual channel, assuming the VCFC value of the previous frame is N_prev and the VCFC value of the current frame is N_curr, the count difference Δ between the current frame and the previous frame is calculated using the following formula: Δ=(N_curr-N_prev)mod2 24 mod is the modulo operation, Δ is N_curr - N_prev divided by 2 24The remainder obtained; the physical meaning of this formula is: the number of steps required to reach N_curr from N_prev in an increasing direction in the cyclic counting space of a 24-bit VCFC.
[0037] Based on the count difference Δ and the receiving window width W, the receiving end determines the state of the current frame according to the following rules: When Δ=1, the current frame is determined to be a new frame that arrives sequentially, that is, the VCFC of the current frame is normally increased by 1 based on the VCFC of the previous frame.
[0038] When 1 < Δ ≤ W, it is determined that there is a frame gap between the current frame and the previous frame, that is, Δ-1 frames are lost. The current frame itself arrives in sequence but there is a loss in the middle.
[0039] When Δ=0, it is determined that the VCFC of the current frame is the same as that of the previous frame, and the frame content is further compared: if the frame content is completely consistent with the received frame, it is determined to be a duplicate frame; if the frame content is different, it is determined to be a conflicting frame.
[0040] When Δ > W, the current frame is determined to be outside the receiving window range, which may be due to count wrap-around or severe out-of-order delivery. Further judgment is required by combining the Cycle field or the local sequence generation. The value of W ranges from 32 to 128, preferably 64.
[0041] For VCFC from 2 24 In the case of a jump from -1 to 0, the modulo counting formula above is used: Δ = (0 - (2^24 - 1)) mod 2 24 =1 indicates a normal count wrap-around, signifying the end of one count cycle and the beginning of a new count cycle.
[0042] Based on the above judgment, the receiving end generates extended frame sequence coordinates C_f=(D,G,C,N) for each transmission frame. Here, D is the frame sequence field, jointly determined by the interface identifier, SCID, VCID, etc., used to distinguish frame sequences from different sources or different virtual channels; G is the local sequence generation, incremented when VCFC wraparound occurs and the Cycle field is not enabled, or during device reset / management reconfiguration, used to distinguish frames between different generations; C is the frame counting period, i.e., the Cycle field value extracted from the frame header, which, together with the VCFC, constitutes the extended count; N is the 24-bit VCFC. The frame sequence coordinates C_f uniquely identify the position of an AOS transmission frame within its respective virtual channel frame sequence.
[0043] Further, the frame sequence coordinate includes a virtual channel frame count, a frame count cycle, and a local sequence generation. When the frame count cycle field is not enabled, the receiving end identifies the wrapping of the virtual channel frame count according to the modulo count comparison result and the rearrangement window width, and generates a local sequence generation. Specifically, when the frame count cycle field is not enabled in the AOS transfer frame, the receiving end determines whether the virtual channel frame count is wrapped by modulo count comparison. For example, when the virtual channel frame count of the current frame is smaller than the virtual channel frame count of the previous frame, it is determined whether wrapping occurs or the frame arrives out of order in combination with the rearrangement window width. If it is confirmed that wrapping occurs, a local sequence generation is generated for differentiation, so that the frame sequence coordinates before and after wrapping can be uniquely identified.
[0044] For an AOS transfer frame that fails the verification (e.g., a CRC verification error or a frame format error), the frame does not enter a normal parsing process, but its coordinate position (i.e., an expected frame sequence coordinate determined according to its VCFC) is recorded as a frame gap candidate event, for use in a subsequent frame gap confirmation and recovery process.
[0045] S2: obtain a first header pointer from an M_PDU header (M Protocol Data Unit (M_PDU) Header) carried in each transfer frame, and divide an M_PDU packet zone (M_PDU Packet Zone) into a continuation region and a parsing region anchored at a start point of a new data packet (Packet) according to the first header pointer.
[0046] referring to Figure 2 , when the first header pointer value is between 0 and the length of the M_PDU packet zone minus 1, [0, first header pointer) is taken as a continuation region, and [first header pointer, end of M_PDU packet zone) is taken as an anchored parsing region; when the first header pointer is all 1s, the entire M_PDU packet zone is taken as a continuation region without a start point of a new data packet; and when the first header pointer is all 1s minus 1, the entire M_PDU packet zone is identified as an idle data region.
[0047] Specifically, the length of the M_PDU packet zone is set as Z, and the first header pointer value is set as h. The receiving end performs region division according to the following rule: when the first header pointer value is between 0 and the length of the M_PDU packet zone minus 1 (i.e., 0≤h<Z), [0,h) is taken as a continuation region, and [h,Z) is taken as an anchored parsing region.
[0048] when the first header pointer is all 1s (i.e., 11-bit first header pointer is all 1s), it indicates that there is no start point of a new data packet in the current M_PDU packet zone, and the entire [0,Z) is taken as a continuation region without a start point of a new data packet.
[0049] When the header pointer is all 1s minus 1, it means that the entire M_PDU data packet area contains only idle data. The entire M_PDU data packet area is identified as an idle data area and does not contain any valid data packets.
[0050] S3: Perform parallel packet parsing on multiple parsing regions, and establish a reconstruction context for each packet that crosses the M_PDU boundary, identified by the starting coordinates of the packet.
[0051] Specifically, multiple worker threads perform parallel packet parsing on the anchor parsing regions of multiple frames. Each worker thread does not wait for the processing result of the previous frame, but directly reads the packet header information sequentially starting from the position indicated by the first packet header pointer.
[0052] After the worker thread reads the packet header from the anchor position, it sequentially determines the packet type, reads the minimum header with a defined total length, and verifies the length range. Based on the parsing results, it falls into the following three categories: If the entire data packet is within the current frame, a complete data packet record is generated directly.
[0053] If a data packet crosses the end of the current frame, a reconstruction context is established to await continuation of the data. This context includes information such as the header and part of the payload of the received data packets, the total length of the data packets, the length of the received data, and the coordinates of the next expected frame.
[0054] If the packet header is incomplete at the end of the frame, a reconstruction context is established to wait for the complete header. This context differs from a reconstruction context waiting for continuation of data in that: in the former, the packet header has been completely received within the current frame, and the receiver knows the total length of the packet; it only needs to wait for the data payload in subsequent frames to complete the splicing. In the latter, the packet header is truncated at the end of the current frame, and the receiver cannot yet know the type and total length of the packet. It needs to wait for the next frame to arrive carrying the remaining portion of the packet header before it can obtain the complete header information and determine the packet length.
[0055] For data packets crossing the M_PDU boundary, a reconstruction context is established, identified by the packet's starting coordinates. The packet's starting coordinates are the unique starting position identifier of the data packet within its virtual channel frame sequence, and are composed of the frame order coordinates of the starting frame and the intra-frame starting offset, i.e., starting coordinates = (starting frame C_f, intra-frame offset); each reconstruction context uses the packet's starting coordinates as a unique identifier for indexing and management.
[0056] An anchor region of a frame can generate at most one trailing incomplete packet context, while different frames can generate multiple independent active contexts simultaneously.
[0057] The frame local parsing results are published once to the frame descriptor table, which uses the extended frame order coordinates as the key. The frame descriptor table stores the frame order coordinates of each frame and its corresponding parsing results, including the complete data packet records and continuation descriptors that have been completed within that frame.
[0058] S4: Associate the continuation region with the corresponding reconstruction context.
[0059] Specifically, the continuation region is generated as a continuation descriptor indexed by frame sequence coordinates. The continuation descriptor is a data structure containing the frame sequence coordinates of its parent frame, the starting offset and length of the continuation region within the frame, and a reference to the data buffer of that frame. Using frame sequence coordinates as an index facilitates quick retrieval of the corresponding continuation data by subsequent context using the expected frame sequence coordinates. The continuation descriptor does not directly guess the data packet it belongs to; instead, it uses frame sequence coordinates for indexing. That is, when the continuation descriptor is generated, it only records "which interval of which frame contains the continuation data," without attempting to determine which data packet the continuation data belongs to.
[0060] The specific steps for establishing the association are as follows: Read the next expected frame sequence coordinates of the reconstruction context. These coordinates record the frame sequence coordinates of the next data segment to which the context belongs.
[0061] Locate the frame descriptor corresponding to the coordinates. If the frame descriptor already exists, it means the frame has arrived and been resolved. The context claims its continuation segment and appends the continuation data from the frame descriptor to the context's segment list. If it does not exist, register the context in the waiting table.
[0062] If a continuation descriptor arrives before its corresponding context has been created, the continuation descriptor will be registered in the wait table.
[0063] Matching is performed when either the context or the continuation descriptor is published. During the matching process, the frame order coordinates and offset range are used as the matching keys. The frame coordinates expected by the context are aligned with the frame coordinates of the continuation descriptor, and the expected receive offset of the context is aligned with the continuation region offset range of the continuation descriptor. A match is successful when the two match.
[0064] Upon successful matching, an event is sent only to the owner thread of the context to prevent multiple threads from writing to the same context simultaneously. Each reconstructed context is assigned to a worker thread as its owner thread upon creation. This thread is responsible for all subsequent data appending, status updates, and completion checks for that context. Other threads must not directly modify this context.
[0065] Furthermore, after receiving the continuation descriptor, the context owner thread checks whether the frame coordinates are equal to the next expected coordinates, checks the gap status, adds the cached reference to the segment list, updates the received length, and determines whether the data packet is complete. If not complete, the next expected coordinates are incremented to the next frame; if complete, a complete data packet record is generated.
[0066] When context reconstruction is expected to be completed in a frame with a valid header pointer, the expected end offset is compared with the position pointed to by the header pointer of that frame. If they do not match, the position pointed to by the header pointer is taken as the reliable starting point of a new data packet, and the data after the header pointer is no longer interpreted based on the length inferred from the context. The technical implication is that when the position pointed to by the header pointer is inconsistent with the expected end offset inferred from the context, it indicates a conflict between the data packet boundary previously inferred from the packet header length field and the actual boundary indicated by the header pointer of the current frame. The header pointer is filled by the sender based on the actual data packet boundary during framing; therefore, the position indicated by the header pointer is used as a reliable basis, confining the old context to the position before the header pointer, and no longer extending its data packet length assumption to after the header pointer. Data after the header pointer is considered the starting point of one or more new independent data packets, and the worker thread restarts parsing from that position. The old context can only recognize the data before the header pointer as its continuation segment.
[0067] For example, a reconstruction context calculates based on the length field in the packet header that the packet should end at offset 200 in the current frame, but the first packet header pointer of the current frame points to offset 150. In this case, offset 150, as pointed to by the first packet header pointer, is taken as the trusted starting point of the new packet. The old context can only recognize the data in the frame [0, 150) as its continuation segment, and the data after offset 150 is parsed again by the worker thread from that position.
[0068] S5: After the corresponding data packet is complete, submit the information in the order corresponding to the starting coordinates of the data packet.
[0069] Specifically, the sequence information includes the starting coordinates of the data packet and the parsing order within the same starting frame. Since sequential parsing within the anchored parsing area of the same frame may generate multiple complete data packets and an incomplete data packet at the end, the sequence information of each data packet includes the starting frame sequence coordinates, the starting offset within the frame, and the parsing sequence number within the frame. This sequence information is globally unique and can be sorted.
[0070] The submission can be either in a strict sequential submission mode or a complete delivery mode.
[0071] The strict sequential commit mode includes: after local frame parsing, commit slots are established for the starting points of all data packets within the frame. The number of commit slots is equal to the number of all data packets parsed within the anchored parsing area of the frame. Complete data packets are written to their corresponding slots, while unrecoverable or timed-out data packets are written to a termination marker. The commit thread advances the commit watermark only after all data packets earlier than the starting coordinates corresponding to the current commit watermark have been completed or terminated. The commit watermark is a globally monotonically increasing pointer, pointing to a position after the starting coordinates of the last committed data packet.
[0072] The "Complete and Deliver" mode includes: delivering complete data packets immediately, while carrying start coordinates and sequence status information, allowing the upper layer to choose to reorder or accept out-of-order delivery.
[0073] The effects of the above technical solution are as follows: Step S1 ensures that each frame within the same virtual channel has a uniquely identifiable coordinate position. Step S2 divides the data packet area of each frame into a "continuation portion that needs to be associated with the context" and an "anchor portion that can be parsed independently." Step S3 allows multiple frames within the same virtual channel to be processed simultaneously by different worker threads, and multiple data packet contexts in an incomplete state can exist simultaneously within the same virtual channel. These three steps work together to allow subsequent frames to begin parsing without waiting for the cross-frame data packets of the preceding frame to complete, effectively eliminating the blocking caused by the single-sequence reconstruction state in existing technologies and significantly improving data packet processing throughput.
[0074] By establishing an independent reconstruction context for each cross-frame data packet in S3, and by having the owner thread exclusively manage the context in S4 and sending events only to the owner thread after a successful match, each reconstruction context is accessed and modified by only one worker thread at a time. This fundamentally avoids concurrent write operations to the shared state and eliminates lock contention and ownership conflicts.
[0075] By generating frame sequence coordinates in S1, the position of each frame can be accurately tracked. By maintaining the coordinates of the next expected frame for each reconstructed context in S4, the frame sequence that each context depends on can be tracked independently. When frame loss occurs, based on the above mechanism, the receiver can accurately locate which contexts' next expected frame coordinates fall into the gap and only mark these contexts as terminated. The data packets anchored by the legitimate first packet header pointer after the gap can be recovered independently. The scope of the error is limited to the individual contexts crossing the gap, eliminating the cascading failure problem in the prior art where "the failure of a cross-frame data packet causes subsequent recoverable data packets to be discarded along with it."
[0076] By managing each data packet in an orderly manner according to its starting coordinates during the submission phase in S5, and combining the reconstruction context established in S3 with the data packet length information parsed from the data packet header, the receiving end can detect the inconsistency between the context deduction boundary and the FHP indication boundary in frames with a valid first packet header pointer. The first packet header pointer is used as a reliable basis to re-anchor the parsing starting point, so that the parsing error of a single context will not spread to the data after the first packet header pointer, thus avoiding the problem that a parsing error in the header of a data packet will cause the subsequent whole frame data to be unrecoverable.
[0077] S5 provides two submission mechanisms: a strict sequential submission mode and a complete-to-deliver mode, allowing upper-layer applications to flexibly choose according to their needs. The strict sequential submission mode uses the submission level as the benchmark for advancement, ensuring that data packets are not out of order in application scenarios requiring sequential delivery. The complete-to-deliver mode allows data packets to be delivered to the upper layer immediately after completion, avoiding the delays caused by incomplete individual data packets blocking subsequent data packets in the sequential submission mode.
[0078] By including virtual channel frame count, frame count period, and local sequence generation in the frame sequence coordinates in S1, the system can handle various abnormal scenarios such as VCFC wraparound, device reset, and management reconfiguration. By uniquely identifying each frame with the frame sequence coordinates and combining them with the receiving window, late frames, duplicate frames, and conflicting frames can be accurately identified and processed. Through multi-level resource reclamation priorities, the stability of the system is ensured under long-term operation and high load conditions.
[0079] Reference Figure 3 In one possible implementation, the method further includes step S6, frame gap confirmation and recovery: When a frame sequence gap is detected, the reconstruction context that needs to cross the frame sequence gap is terminated, and packet parsing is resumed from the position indicated by the first packet header pointer in the M_PDU packet area with a valid first packet header pointer after the gap.
[0080] Specifically, when the receive window times out or the lower layer explicitly reports a lost frame, the receiver performs the following operations: Mark the corresponding frame coordinate interval as a gap; Find the reconstruction context where the coordinates of the next expected frame fall into or cross the gap, and mark it as terminated; The unanchored continuation data after the isolation gap and before the next valid first packet header pointer, although physically present in subsequent frames, cannot be assigned to any known context because its context has been terminated by the frame gap and there is no first packet header pointer as an independently parsed anchor point before this part of the data. Therefore, it is isolated and discarded as unanchored data. Restart packet parsing from the position pointed to by the first valid header pointer after the gap; The complete data packets that have been independently parsed after the first packet header pointer continue to enter the submission slot. These complete data packets are generated independently by worker threads from the valid first packet header pointer position after the gap occurs. They do not depend on any context that crosses the gap, and are therefore unaffected by the gap. Generate missing or incomplete records for the termination context to advance the submission water level.
[0081] The effects of the above technical solution are as follows: By marking the corresponding frame coordinate interval as a gap, and only marking the reconstruction context where the coordinates of the next expected frame fall into or cross the gap as terminated, the impact of frame loss is precisely limited to individual gap-crossing contexts. This avoids the problem of subsequent data packets that could have been correctly recovered being dropped due to the loss of a single frame, and improves the system's data recovery capability and parsing continuity under channel frame loss conditions.
[0082] After a frame gap occurs, the data continues without an anchor point after the gap and before the next valid header pointer, and packet parsing restarts from the position pointed to by the first valid header pointer after the gap. This allows the data packet anchored by the valid header pointer after the gap to immediately rebuild the parsing anchor point after the gap is restored, and independently complete the parsing and submission process.
[0083] For the context of termination, a missing or incomplete record is generated and sent to the commit slot to advance the commit watermark. This avoids the situation where all subsequent fully received data packets are blocked in the commit slot and cannot be delivered due to the missing of individual data packets, thus ensuring the integrity of the data packet commit order and the system's ability to continue operating under abnormal conditions.
[0084] In summary, S6 limits the impact of frame loss errors to individual contexts that cross the gap, achieving accurate recovery after frame loss. This fundamentally solves the cascading failure problem caused by a single shared state in existing technologies, and enhances the system's robustness and continuous service capability under abnormal conditions such as channel frame loss and frame out-of-synchronization.
[0085] In one possible implementation, the method further includes: Before the receive window times out, late frames within the window are filled with the corresponding frame sequence coordinates; they then participate in subsequent continuation association and data packet submission.
[0086] Duplicate frames that have already been published (i.e., have had their frame descriptors generated and published to the frame descriptor table) and have identical content are directly deduplicated and not parsed again. The criteria for determining duplicate frames are: the frame order coordinates are the same and the frame content is consistent byte by byte.
[0087] Frames with the same coordinates but different content are marked as conflicting and are processed according to the security policy.
[0088] The security policy processing includes at least one of the following methods: Method 1: Report conflicting frames to the upper-level management entity, which then decides whether to discard the current frame, retain the existing frame, or overwrite the existing frame based on task requirements. This method is suitable for scenarios with high data integrity requirements and where manual or high-level decision-making intervention is necessary.
[0089] Method 2: Based on the pre-configured strategy of the upper-level management entity, including: discarding newly arrived frames (i.e., retaining the published frame descriptors and their parsing results), discarding published frames (i.e., replacing existing frames with newly arrived conflicting frames), or marking conflicting frames as invalid while retaining conflict records for subsequent auditing. This method is suitable for scenarios with high real-time requirements and those requiring automatic processing.
[0090] Method 3: Trigger a system alarm, record the frame sequence coordinates, arrival time, and content summary of the conflicting frame, mark the conflicting frame and its corresponding frame descriptor as "conflicting", suspend all submission operations corresponding to the frame sequence coordinates, and resume operations after confirmation by the upper-level management entity.
[0091] In a preferred embodiment of the present invention, a combination of method two and method three is adopted: the conflict is automatically handled by the "discard after frame" strategy preset by the upper-level management entity, and an alarm log is generated at the same time, so that the operation and maintenance personnel can investigate the root cause of the frame conflict afterward (such as VCFC being reused by different data sources, frame count maintenance errors, etc.).
[0092] Virtual channel frame count wrapback is distinguished by frame count period or local sequence generation. When the frame count period field is valid, the frame count period and the 24-bit virtual channel frame count together constitute the extended count, and the frame count period is incremented by 1 during wrapback; when the frame count period field is not enabled, the receiver generates a local sequence generation based on the modulo count comparison result to distinguish between them.
[0093] Device reset or management reconfiguration triggers a new local sequence generation, and frames in the new generation are distinguished from frames in the old generation through the local sequence generation.
[0094] When resources are insufficient, resources should be recycled in the following priority order: First priority: Reconstruction contexts that have been confirmed to be invalid (e.g., contexts marked as terminated due to frame gap confirmation). Second priority: Reconstruction contexts that have timed out (e.g., contexts that have not received the expected data after exceeding the maximum waiting time); preferably, the timeout duration ranges from 100 milliseconds to 1000 milliseconds. In a preferred embodiment of the present invention, the timeout duration T_timeout is 200 milliseconds; Third priority: Reconstruction context across confirmed gaps; Fourth priority: the oldest reconstruction context outside the receive window.
[0095] The effects of the above technical solution are as follows: Late frames arriving within the window can be padded with their corresponding frame sequence coordinates and participate in subsequent continuation association and packet submission. This mechanism ensures that late frames arriving within a certain time window are not directly discarded, but are incorporated into the normal processing flow, avoiding frame drop due to network jitter or transmission delay, and improving data recovery capability and processing integrity under non-ideal channel conditions.
[0096] Duplicate frames that have been published and have the same content are directly deduplicated and not parsed repeatedly, which avoids the same data packet being submitted to the upper layer multiple times and saves the computational resources consumed by repeated parsing; frames with the same coordinates but different content are marked as conflicts and enter the security policy processing, which can detect and trigger the security policy in a timely manner when data is inconsistent.
[0097] Virtual channel frame count wraparound is distinguished by frame count period or local sequence generation. This ensures that when the 24-bit virtual channel frame count wraps around, the frames before and after the wraparound can be uniquely distinguished by the frame count period or local sequence generation, avoiding frame order coordinate conflicts caused by count wraparound.
[0098] Device reset or management reconfiguration triggers a new local sequence generation. Frames in the new generation are distinguished from frames in the old generation through the local sequence generation, so that frames before and after device reset or configuration change will not be confused due to the same frame sequence coordinates. Frames after reset are assigned to the new generation and are completely isolated from the frame sequence before reset, ensuring the normal operation of the system after reset or reconfiguration without being affected by historical state.
[0099] When resources are insufficient, resources are reclaimed according to a four-level priority system. This ensures that when system resources are scarce, the most valuable (most likely to be completed) reconstruction contexts are prioritized for preservation, while invalid or timed-out contexts are prioritized for elimination. This guarantees the system's resource utilization efficiency and stability under long-term operation and high load conditions.
[0100] The complete process of the method in this embodiment is illustrated below with a specific application example.
[0101] Assuming that the length of the M_PDU data packet area is Z in the same virtual channel, the receiver receives the frame sequence in Table 1 in sequence: Table 1
[0102] The receiving end processes the data in parallel as follows: Worker thread 1 processes frame 100. The first packet header pointer of this frame is 100, therefore [0, 100) is the continuation region (no corresponding context in this frame), and [100, Z) is the anchor parsing region. Worker thread 1 reads the header of data packet A from offset 100, determines that data packet A crosses the end of frame 100 based on the header information, and establishes a reconstruction context for data packet A. The starting coordinates of this context are (frame 100, offset 100), the owner thread is worker thread 1, and the coordinates of the next expected frame are frame 101.
[0103] Worker thread 2 processes frame 101. The first packet header pointer of this frame is 300, therefore [0, 300) is the continuation region (to be claimed by the context of packet A), and [300, Z) is the anchored parsing region. Worker thread 2 does not wait for packet A to complete and starts parsing directly from offset 300. In the anchored parsing region of frame 101, worker thread 2 first parses the complete packet B at offset 300, generating a complete record of packet B; then it starts parsing packet C from the position after packet B. Since packet C crosses the end of frame 101, worker thread 2 establishes a reconstruction context for packet C. The starting coordinates of this context are (frame 101, end position of packet B), the owner thread is worker thread 2, and the coordinates of the next expected frame are frame 102.
[0104] Worker thread 3 processes frame 102. The header pointer of this frame is all 1s, indicating that there is no new data packet start point in the entire data packet area, and all data is a continuation of data packet C. Worker thread 3 generates a continuation descriptor for the entire data packet area of frame 102. This descriptor is indexed by the frame order coordinates of frame 102. It does not guess whether it belongs to data packet C, but only records "continuation data exists in the entire area of frame 102".
[0105] Worker thread 4 processes frame 103. The first packet header pointer of this frame is 80, therefore [0, 80) is the continuation region (to be claimed by the context of packet C), and [80, Z) is the anchor parsing region. Worker thread 4 does not wait for packet C to complete, but starts parsing directly from offset 80, and parses the complete packet D at offset 80, generating a complete record of packet D with its starting coordinates (frame 103, offset 80).
[0106] Subsequently, the context of data packet A (owner thread is worker thread 1) finds the frame descriptor of frame 101 by matching frame sequence coordinates, claims the continuation segment [0, 300) in frame 101, and completes the splicing of data packet A.
[0107] The context of data packet C (owner thread is worker thread 2) sequentially searches for the frame descriptors of frames 102 and 103. When matching frame 102, the continuation descriptor of frame 102, indexed by the frame order coordinates of frame 102, successfully matches the next expected frame coordinate (frame 102) in the context of data packet C. Worker thread 2 appends the entire region of frame 102 to the segment list of data packet C; then updates the next expected frame coordinate to frame 103. When matching frame 103, it claims the continuation segment [0, 80) in frame 103, completing the splicing of data packet C.
[0108] Ultimately, data packets A, B, C, and D were all submitted according to their respective starting coordinates.
[0109] If frame 102 is lost, the context of data packet C is marked as terminated because the coordinates of the next expected frame (frame 102) fall into the gap, and data packet C becomes invalid. The [0,80) region of frame 103 is unanchored continuation data (without a valid header pointer anchored thereafter) and is isolated and discarded. However, data packet D can still be independently extracted from the header pointer (offset 80) of frame 103 and submitted normally. In strict sequential submission mode, the system generates a lost termination mark for data packet C, then advances the submission watermark and submits data packet D.
[0110] The method in this embodiment can be implemented by FPGA, ASIC, SmartNIC or multi-core CPU.
[0111] In a preferred hardware implementation, the anchored parsing regions of different frames are processed in parallel by independent parsing pipelines in the FPGA, the frame descriptors and continuation descriptors are generated in hardware, and the association and submission of cross-frame contexts are implemented using hardware hash tables and latches.
[0112] In another preferred hardware implementation, the SmartNIC generates frame descriptors, and the host CPU completes cross-frame assembly and orderly submission.
[0113] The above-described hardware implementation method and the multi-core CPU software implementation method are interchangeable and both belong to the embodiments of the present invention.
[0114] Example 2: This example provides a multi-context parallel reconstruction apparatus for implementing the method described in Example 1. The apparatus includes: The frame sequence coordinate generation unit is used to generate frame sequence coordinates for the received CCSDS AOS transmission frames; The region partitioning unit is used to divide the M_PDU data packet region into a continuation region and an anchor parsing region according to the first packet header pointer in the M_PDU header. A parallel parsing unit is used to perform parallel data packet parsing on multiple anchored parsing regions; The multi-context management unit is used to establish and track independent reconstruction contexts identified by the packet start coordinates for packets that cross M_PDU boundaries; The continuation association unit is used to generate the continuation region as a continuation descriptor and associate the continuation descriptor with the corresponding context according to the next expected frame sequence coordinates of the reconstruction context; The re-anchoring unit is used to truncate the reconstruction context when the expected end offset of the reconstruction context is inconsistent with the position pointed to by the first packet header pointer of the frame. The gap recovery unit is used to terminate the context that must cross the gap and resume parsing from the subsequent valid first packet header pointer when a frame sequence gap is detected; The submission unit is used to submit completed or terminated data packets according to the starting coordinates of the data packet.
[0115] The frame sequence coordinates generated by the frame sequence coordinate generation unit include the virtual channel frame count, frame count period, and local sequence generation. The frame sequence coordinate generation unit is also used to identify the wraparound of the virtual channel frame count based on the modulus count comparison result and the rearrangement window width when the frame count period field is not enabled, and to generate the local sequence generation.
[0116] The region division unit is specifically used for: When the value of the first packet header pointer is between 0 and the length of the M_PDU data packet area minus 1, [0, first packet header pointer) is used as a continuation area, and [first packet header pointer, end of M_PDU data packet area) is used as an anchor parsing area; when the first packet header pointer is all 1s, the entire M_PDU data packet area is used as a continuation area with no new data packet starting point; when the first packet header pointer is all 1s minus 1, the entire M_PDU data packet area is identified as an idle data area.
[0117] The parallel parsing unit is specifically used for: The control worker thread does not wait for the processing result of the previous frame, and reads the data packet header information sequentially from the position indicated by the first packet header pointer; if the entire data packet is within the current frame, a complete data packet record is generated; if the data packet crosses the end of the current frame, a reconstruction context is established to wait for the continuation of the data; if the data packet header is incomplete at the end of the frame, a reconstruction context is established to wait for the complete header.
[0118] The continuation association unit generates the continuation region as a continuation descriptor indexed by frame order coordinates. The continuation descriptor does not directly guess the data packet it belongs to, but is indexed by frame order coordinates. The continuation association unit is specifically used for: reading the next expected frame sequence coordinates of the reconstructed context, and finding the frame descriptor corresponding to the coordinates; if the frame descriptor already exists, claiming its continuation segment, otherwise registering the context in the waiting table; if the continuation descriptor arrives first but the corresponding context has not yet been created, registering the continuation descriptor in the waiting table; matching is performed when either the context or the continuation descriptor is published; after a successful match, an event is sent only to the thread that owns the context.
[0119] The re-anchoring unit is also used for: When the reconstruction context is expected to be completed in a frame with a valid header pointer, the expected end offset is compared with the position pointed to by the header pointer of that frame; if the two do not match, the position pointed to by the header pointer is taken as the reliable starting point of the new data packet, and the data after the header pointer is no longer interpreted based on the length deduced from the context.
[0120] The submission unit submits either in a strict sequential submission mode or a complete-delivery mode. The strict sequential submission mode includes: after the frame local parsing is completed, a submission slot is established for the starting point of all data packets in the frame, complete data packets are written to the corresponding slot, data packets that cannot be recovered or have timed out are written to a termination flag, and the submission thread advances the submission level only after all data packets earlier than the starting coordinates corresponding to the current submission level have been completed or terminated. The "Complete and Deliver" mode includes: delivering complete data packets immediately, while carrying start coordinates and sequence status information for the upper layer to choose to reorder or accept out-of-order delivery.
[0121] The gap recovery unit is also used for: Mark the corresponding frame coordinate interval as a gap; find the reconstruction context where the coordinates of the next expected frame fall into or cross the gap and mark it as terminated; isolate the anchorless continuation data after the gap and before the next valid header pointer; restart packet parsing from the position pointed to by the first valid header pointer after the gap; generate missing or incomplete records for the terminated context to advance the submission waterline.
[0122] The system also includes a resource management unit, used for: Before the receive window times out, late frames within the window are added to the corresponding frame sequence coordinates; duplicate frames that have been published and have the same content are directly deduplicated; frames with the same coordinates but different content are marked as conflicting and processed by the security policy; virtual channel frame count wraparound is distinguished by frame count period or local sequence generation; a new local sequence generation is triggered when the device is reset or the management is reconfigured; when resources are insufficient, they are recycled in the priority order of confirmed failure context, timeout context, context that crosses the confirmation gap, and the oldest context that exceeds the receive window.
[0123] The specific implementation and beneficial effects of the above technical solution are the same as those in Embodiment 1, and will not be repeated here.
[0124] This application also provides a satellite ground gateway, comprising: one or more AOS frame input interfaces; a multi-core processor or a heterogeneous processor; a memory storing a program executable by the processor; and a network-side output interface; wherein when the program is executed by the processor, it implements the method described in claim 1.
[0125] This application also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method described in Embodiment 1.
[0126] This application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented using any method or technology. Information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer-readable storage media include, but are not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0127] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.
[0128] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Without further limitation, an element qualified by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A multi-context parallel reconstruction method, characterized in that, include: Acquire multiple CCSDS AOS transmission frames belonging to the same virtual channel, and generate frame sequence coordinates for each transmission frame based on the virtual channel frame count; Obtain the first packet header pointer from the M_PDU header carried in each transmission frame, and divide the M_PDU data packet area into a continuous area and a parsing area with the start point of the new data packet as the anchor point according to the first packet header pointer; Parallel packet parsing is performed on multiple parsing regions, and a reconstruction context identified by the packet start coordinates is established for each packet that crosses the M_PDU boundary; Associate the continuation region with the corresponding reconstruction context; Once the corresponding data packet is complete, submit the information according to the order of the starting coordinates of the data packet.
2. The method as described in claim 1, characterized in that, Also includes: When a frame sequence gap is detected, the reconstruction context that needs to cross the frame sequence gap is terminated, and packet parsing is resumed from the position indicated by the first packet header pointer in the M_PDU packet area with a valid first packet header pointer after the gap.
3. The method as described in claim 1, characterized in that, The frame sequence coordinates include the virtual channel frame count, frame count period, and local sequence generation. When the frame count period field is not enabled, the receiver identifies the wraparound of the virtual channel frame count based on the modulus count comparison result and the rearrangement window width, and generates the local sequence generation.
4. The method as described in claim 1, characterized in that, The step of dividing the M_PDU data packet region into a continuation region and a parsing region anchored to the start point of a new data packet based on the first packet header pointer includes: When the value of the first packet header pointer is between 0 and the length of the M_PDU data packet area minus 1, [0, first packet header pointer) is used as a continuation area, and [first packet header pointer, end of M_PDU data packet area) is used as an anchor parsing area; when the first packet header pointer is all 1s, the entire M_PDU data packet area is used as a continuation area with no new data packet starting point; when the first packet header pointer is all 1s minus 1, the entire M_PDU data packet area is identified as an idle data area.
5. The method as described in claim 1, characterized in that, The parallel packet parsing of multiple parsing regions includes: The worker thread does not wait for the processing result of the previous frame, but reads the header information of the data packets sequentially from the position indicated by the first packet header pointer; if the entire data packet is within the current frame, a complete data packet record is generated; if the data packet crosses the end of the current frame, a reconstruction context is established to wait for the continuation of the data; if the data packet header is incomplete at the end of the frame, a reconstruction context is established to wait for the complete header.
6. The method as described in claim 1, characterized in that, The continuation region is generated as a continuation descriptor indexed by frame order coordinates. The continuation descriptor does not directly guess the data packet it belongs to, but is indexed by frame order coordinates. The establishment of the association includes: reading the next expected frame sequence coordinates of the reconstructed context, and finding the frame descriptor corresponding to the coordinates; if the frame descriptor already exists, claiming its continuation segment, otherwise registering the context in the waiting table; if the continuation descriptor arrives first but the corresponding context has not yet been created, registering the continuation descriptor in the waiting table; the context and the continuation descriptor are matched when either is published; after a successful match, an event is sent only to the thread that owns the context.
7. The method as described in claim 1, characterized in that, Also includes: When the reconstruction context is expected to be completed in a frame with a valid first packet header pointer, the expected end offset is compared with the position pointed to by the first packet header pointer of that frame; If the two are inconsistent, the position pointed to by the first packet header pointer is taken as the reliable starting point of the new data packet, and the data after the first packet header pointer will no longer be interpreted based on the length inferred from this context.
8. The method as described in claim 1, characterized in that, The submission process, which involves following the sequential information corresponding to the starting coordinates of the data packet, includes: The submission can be either a strictly sequential submission mode or a complete-delivery mode. The strict sequential submission mode includes: after the frame local parsing is completed, a submission slot is established for the starting point of all data packets in the frame, complete data packets are written to the corresponding slot, data packets that cannot be recovered or have timed out are written to a termination flag, and the submission thread advances the submission level only after all data packets earlier than the starting coordinates corresponding to the current submission level have been completed or terminated. The "Complete and Deliver" mode includes: delivering complete data packets immediately, while carrying start coordinates and sequence status information for the upper layer to choose to reorder or accept out-of-order delivery.
9. The method as described in claim 2, characterized in that, The recovery packet parsing also includes: marking the corresponding frame coordinate interval as a gap; finding the reconstruction context where the coordinates of the next expected frame fall into or cross the gap and marking it as terminated; isolating the anchorless continuation data after the gap and before the next valid header pointer; restarting packet parsing from the position pointed to by the first valid header pointer after the gap; and generating lost or incomplete records for the terminated context to advance the submission watermark.
10. The method as described in claim 1, characterized in that, Also includes: Before the receiving window times out, late frames within the window are filled with the corresponding frame sequence coordinates; duplicate frames that have been published and have the same content are directly deduplicated. Frames with the same coordinates but different content are marked as conflicting and enter the security policy processing; virtual channel frame count wrapback is distinguished by frame count period or local sequence generation; device reset or management reconfiguration triggers a new local sequence generation; when resources are insufficient, they are reclaimed in the priority order of confirmed failure context, timeout context, context crossing the confirmation gap, and the oldest context that exceeds the receiving window.
11. A multi-context parallel reconstruction apparatus, characterized in that, include: The frame sequence coordinate generation unit is used to generate frame sequence coordinates for the received CCSDS AOS transmission frames; The region partitioning unit is used to divide the M_PDU data packet region into a continuation region and an anchor parsing region according to the first packet header pointer in the M_PDU header. A parallel parsing unit is used to perform parallel data packet parsing on multiple anchored parsing regions; The multi-context management unit is used to establish and track independent reconstruction contexts identified by the packet start coordinates for packets that cross M_PDU boundaries; The continuation association unit is used to generate the continuation region as a continuation descriptor and associate the continuation descriptor with the corresponding context according to the next expected frame sequence coordinates of the reconstruction context; The re-anchoring unit is used to truncate the reconstruction context when the expected end offset of the reconstruction context is inconsistent with the position pointed to by the first packet header pointer of the frame. The gap recovery unit is used to terminate the context that must cross the gap and resume parsing from the subsequent valid first packet header pointer when a frame sequence gap is detected; The submission unit is used to submit completed or terminated data packets according to the starting coordinates of the data packet.
12. A satellite ground gateway, characterized in that, include: One or more AOS frame input interfaces; Multi-core processors or heterogeneous processors; Memory storing programs executable by the processor; network-side output interface; When the program is executed by the processor, it implements the method according to any one of claims 1-10.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method described in any one of claims 1-10.
