Method and system for mixed encapsulation of ethernet and tdm services in a multi-service access platform

CN122845673APending Publication Date: 2026-09-29GUANGDONG GLOBAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611272386.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0004]然而,在不具备硬件帧抢占能力的设备中,以太网帧一旦开始串行发送,通常需要等待整帧发送完成才能调度TDM分组

Benefits of technology

[0009]与现有技术相比,本发明提出一种多业务接入平台以太网与TDM业务的混合封装方法,其在多业务接入平台的封装适配层构建以太网微片段化与TDM业务主动抢占相结合的混合封装机制,对以太网数据帧进行适度切割并配置带内状态标志和滑动校验信息,当TDM业务到达时,直接挂起当前以太网微片段的发送,记录截断位置并优先插入TDM封装帧,发送完毕后从断点恢复以太网业务,由此避免长以太网帧造成的帧头阻塞,降低TDM业务的排队时延和时钟抖动,同时避免过度细分带来的封装开销,且无需依赖专用物理层抢占芯片;接收端利用业务标志、截断偏移指针及双侧边界指纹进行解复用边界识别和字节级修正,并结合时钟恢复与滑动校验完成两类业务重建,从而抑制信道噪声或定界偏移引起的业务互串和碎片缺失,兼顾低时延、高带宽利用率及解复用可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122845673A_ABST
    Figure CN122845673A_ABST
Patent Text Reader

Abstract

The application discloses a multi-service access platform Ethernet and TDM service mixed encapsulation method and system, relates to the technical field of multi-service bearing and data encapsulation, and performs micro-fragment cutting on an Ethernet data frame based on a preset byte threshold, and adds an in-band state mark and a bidirectional sliding checksum; when a TDM service arrives, the TDM service is encapsulated by a pseudo line, a high-priority interrupt is triggered to suspend Ethernet micro-fragment sending, a cutting boundary is recorded and a cutting offset pointer is written, and after TDM encapsulation frames are preferentially sent, the Ethernet micro-fragment sending is restored. The receiving end delimits and demultiplexes the mixed data stream, recovers the TDM signal through dithering buffering and a digital phase-locked loop, and completes Ethernet data frame alignment and recombination according to the cutting offset pointer and the bidirectional sliding checksum, so that frame header blocking and time delay jitter of the TDM service can be reduced, and link utilization and service recovery reliability are considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of multi-service bearer and data encapsulation technology, and more specifically, to a hybrid encapsulation method and system for Ethernet and TDM services in a multi-service access platform. Background Technology

[0002] As access networks evolve from traditional circuit switching to packet-based transmission, multi-service access platforms need to simultaneously carry Ethernet services with bursty and variable frame length characteristics, as well as TDM services with constant rate, continuous clock, and low latency requirements. Configuring separate physical channels for each would not only increase the cost of interfaces, transmission media, and equipment resources, but also make it difficult to fully utilize idle bandwidth. Therefore, it is necessary to perform mixed encapsulation and multiplexing transmission of both types of services within the same physical channel.

[0003] Existing solutions typically employ pseudowire emulation, universal framing procedures, or a unified packet frame format to encapsulate TDM time slot data into packets, sharing the transmission channel with Ethernet frames via priority queues. Some solutions use fixed fragmentation to reduce the waiting time for high-priority services, or rely on media access controllers and physical layer chips that support frame preemption to achieve transmission preemption. The receiving end typically identifies boundaries based on service type flags or pseudowire control words, extracting TDM packets and Ethernet data separately.

[0004] However, in devices lacking hardware frame preemption capabilities, once an Ethernet frame begins serial transmission, it typically waits for the entire frame to complete before scheduling TDM packets. When a long Ethernet frame occupies the physical channel, later-arriving TDM packets experience frame header blocking in the buffer queue, resulting in deterministic latency and jitter that vary with the Ethernet frame length, thus affecting the stability of the receiver's clock recovery. Dividing the entire Ethernet frame into smaller fragments increases the number of fragment headers, trailer labels, and scheduling operations, reducing link bandwidth utilization; relying on dedicated frame preemption chips increases equipment upgrade costs. Furthermore, physical channel noise or demarcation phase offsets can cause byte-level deviations in demultiplexing boundaries relying solely on one-sided flag matching, resulting in abnormal bytes being mixed into the TDM frame tail and missing Ethernet fragment headers. Therefore, existing technologies struggle to simultaneously achieve low latency for TDM services, high throughput for Ethernet services, and reliable hybrid data demultiplexing.

[0005] Therefore, an optimized hybrid encapsulation scheme for Ethernet and TDM services in a multi-service access platform is desired. Summary of the Invention

[0006] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide a method and system for hybrid encapsulation of Ethernet and TDM services in a multi-service access platform.

[0007] According to one aspect of this application, a hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform is provided, comprising: Step 1: Based on a preset byte threshold, perform micro-fragmentation and in-band annotation on the Ethernet data frame stream to obtain an Ethernet micro-fragment sequence; Step 2: When the TDM service flow reaches the encapsulation adaptation layer, pseudowire encapsulation is performed on the TDM service flow to generate TDM encapsulation frames, and a high-priority interrupt is triggered to suspend the transmission of the Ethernet micro-fragment sequence. The physical truncation boundary is recorded to generate a truncation offset pointer, and the remaining suspended micro-fragments are marked as truncation-state micro-fragment sequences. Step 3: Write the truncation offset pointer to the in-band tail label at the breakpoint of the truncated micro-fragment sequence, and insert the TDM encapsulated frame into the physical channel for transmission first. After transmission is completed, resume the subsequent transmission of the truncated micro-fragment sequence to form a physical layer hybrid data stream. Step 4: At the receiving end, perform boundary identification and demultiplexing separation on the physical layer hybrid data stream to extract the TDM encapsulated frame, truncated micro-fragment sequence, and truncated offset pointer; Step 5: Clock recovery is performed on the TDM encapsulated frame to obtain the recovered TDM signal, and the truncated state micro-fragment sequence is aligned with the truncated boundary and verified by bidirectional sliding checksum based on the truncated offset pointer to obtain the reassembled Ethernet data frame.

[0008] According to another aspect of this application, a hybrid encapsulation system for Ethernet and TDM services in a multi-service access platform is provided, comprising: The Ethernet micro-fragment generation module is used to perform micro-fragmentation and in-band annotation on the Ethernet data frame stream based on a preset byte threshold to obtain an Ethernet micro-fragment sequence. The TDM preemptive encapsulation module is used to perform pseudo-wire encapsulation on the TDM service flow when it arrives at the encapsulation adaptation layer to generate a TDM encapsulation frame, trigger a high-priority interrupt to suspend the transmission of the Ethernet micro-fragment sequence, record the physical truncation boundary to generate a truncation offset pointer, and mark the suspended remaining micro-fragments as truncation state micro-fragment sequences. The mixed service interleaving transmission module is used to write the truncation offset pointer to the in-band tail label at the breakpoint of the truncation state micro-fragment sequence and to insert the TDM encapsulated frame into the physical channel for transmission first. After the transmission is completed, the subsequent transmission of the truncation state micro-fragment sequence is resumed to form a physical layer mixed data stream. The hybrid data demultiplexing module is used at the receiving end to perform boundary identification and demultiplexing separation on the physical layer hybrid data stream to extract TDM encapsulated frames, truncated micro-fragment sequences, and truncated offset pointers; The dual-service recovery and reassembly module is used to restore the clock of TDM encapsulated frames to obtain the restored TDM signal, and to perform truncation boundary alignment and bidirectional sliding checksum verification on the truncated micro-segment sequence based on the truncation offset pointer to obtain the reassembled Ethernet data frame.

[0009] Compared with existing technologies, this invention proposes a hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform. It constructs a hybrid encapsulation mechanism combining Ethernet micro-fragmentation and TDM service active preemption at the encapsulation adaptation layer of the multi-service access platform. Ethernet data frames are appropriately segmented and configured with in-band status flags and sliding check information. When a TDM service arrives, the transmission of the current Ethernet micro-fragment is suspended, the truncation position is recorded, and a TDM encapsulated frame is preferentially inserted. After transmission is complete, the Ethernet service is resumed from the breakpoint. This avoids frame header blocking caused by long Ethernet frames, reduces queuing latency and clock jitter for TDM services, and avoids encapsulation overhead caused by excessive segmentation. Furthermore, it does not require a dedicated physical layer preemption chip. The receiving end uses service flags, truncation offset pointers, and bilateral boundary fingerprints for demultiplexing boundary identification and byte-level correction. Combined with clock recovery and sliding check, it completes the reconstruction of both types of services, thereby suppressing service crosstalk and fragmentation caused by channel noise or boundary offset, while balancing low latency, high bandwidth utilization, and demultiplexing reliability. Attached Figure Description

[0010] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0011] Figure 1 This is a flowchart illustrating a hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to an embodiment of this application. Figure 2 This is a schematic diagram of data flow in a hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to an embodiment of this application. Figure 3 This is a flowchart of step three of the hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to an embodiment of this application; Figure 4 This is a flowchart of step four of the hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to an embodiment of this application; Figure 5This is a flowchart illustrating the process of stripping high-priority services from the delimited original byte stream to obtain TDM encapsulated frames and the remaining pointer-bound mixed fragment stream based on priority flag matching in a hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to an embodiment of this application. Figure 6 This is a block diagram of a hybrid encapsulation system for Ethernet and TDM services in a multi-service access platform according to an embodiment of this application. Detailed Implementation

[0012] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.

[0013] In existing hybrid encapsulation methods, when long Ethernet frames occupy the physical channel, TDM services that arrive later can only wait for the entire frame to be sent, which can easily lead to frame header blocking and deterministic delay jitter. Excessively shrinking Ethernet fragments will increase encapsulation overhead, and using dedicated frame preemption chips will increase equipment upgrade costs. At the same time, flag bit flipping or delimitation offset caused by channel noise may lead to incorrect separation boundaries between the two types of services. To address this, the technical solution of this application proposes a hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform. This method segments Ethernet data frames at the encapsulation adaptation layer according to a preset byte threshold and configures status flags and bidirectional sliding checksums for each micro-segment. When a TDM service arrives, pseudo-wire encapsulation is implemented, triggering a high-priority interrupt, freezing the transmission of the Ethernet micro-segment, recording the truncation boundary, and writing the truncation offset pointer into the in-band tail label. Subsequently, the TDM encapsulated frame is transmitted first, and the remaining Ethernet micro-segments are transmitted from the interrupt point. The receiving end identifies the two types of services through frame delimitation, priority matching, and joint decision-making of bilateral boundary fingerprints. It performs byte-level backoff or expansion correction on the extraction boundary where an offset exists, then uses the truncation offset pointer and bidirectional sliding checksum to complete Ethernet frame alignment and reassembly, and recovers the TDM signal through jitter buffering and digital phase-locked loop, thus achieving low latency, high bandwidth utilization, low hardware modification costs, and reliable demultiplexing.

[0014] It should be noted that suspending the transmission of Ethernet micro-fragment sequences in this application refers to stopping the submission of Ethernet data at the next valid byte boundary during the process of the encapsulation adapter layer submitting payload bytes to the physical layer framer, rather than performing line-level truncation on standard Ethernet physical frames that have already completed physical layer framing and line coding. The transmission scheduler first forms a time-domain interleaved and reassembled data stream in the order of Ethernet data, truncation control information, TDM encapsulated frames, and resumed Ethernet data. Then, the physical layer framer performs unified framing, line coding, and serialization output on the time-domain interleaved and reassembled data stream. Therefore, the preemption processing in this application is completed by the encapsulation adapter layer and the transmission scheduler, without requiring the physical layer chip to provide standard Ethernet frame preemption functionality. Furthermore, the TDM encapsulated frames and Ethernet micro-fragments are only transmitted once via line serialization after physical layer framing.

[0015] Figure 1 This is a flowchart of a method for hybrid encapsulation of Ethernet and TDM services in a multi-service access platform according to an embodiment of this application. Figure 2 This is a schematic diagram illustrating the data flow of a hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to an embodiment of this application. Figure 1 and Figure 2 As shown, the hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to an embodiment of this application includes: Step 1, performing micro-segmentation and in-band labeling on the Ethernet data frame stream based on a preset byte threshold to obtain an Ethernet micro-segment sequence; Step 2, when the TDM service stream reaches the encapsulation adaptation layer, performing pseudo-wire encapsulation on the TDM service stream to generate a TDM encapsulated frame, triggering a high-priority interrupt to suspend the transmission of the Ethernet micro-segment sequence, recording the physical truncation boundary to generate a truncation offset pointer, and marking the remaining suspended micro-segments as a truncation-state micro-segment sequence; Step 3, writing the truncation offset pointer to... Step 1: Insert the in-band tail label at the breakpoint of the truncated micro-fragment sequence and preferentially insert the TDM encapsulated frame into the physical channel for transmission. After transmission is completed, resume the subsequent transmission of the truncated micro-fragment sequence to form a physical layer hybrid data stream. Step 4: At the receiving end, perform boundary identification and demultiplexing separation on the physical layer hybrid data stream to extract the TDM encapsulated frame, the truncated micro-fragment sequence, and the truncated offset pointer. Step 5: Perform clock recovery on the TDM encapsulated frame to obtain the recovered TDM signal, and perform truncated boundary alignment and bidirectional sliding checksum verification on the truncated micro-fragment sequence based on the truncated offset pointer to obtain the reassembled Ethernet data frame.

[0016] Specifically, in step one, based on a preset byte threshold, the Ethernet data frame stream is segmented into micro-fragments and annotated in-band to obtain an Ethernet micro-fragment sequence. It should be noted that the Ethernet data frame stream includes the destination address, source address, payload data, and frame check sequence, while the TDM service stream includes time slot data and a synchronization clock. It should be understood that, since multi-service access platforms need to carry Ethernet services with bursty and variable frame length characteristics, as well as TDM services with constant rate and low latency requirements, within the same physical channel, when long Ethernet data frames continuously occupy the physical channel, later-arriving TDM services will experience frame header blocking and deterministic delay jitter. Segmenting the Ethernet data frame into excessively small fragments increases the transmission overhead caused by in-band flags, check fields, and scheduling operations. Therefore, in the technical solution of this application, based on a preset byte threshold, the Ethernet data frame stream is segmented into micro-fragments and annotated in-band to obtain an Ethernet micro-fragment sequence. This limits the continuous occupancy length of a single Ethernet transmission unit and provides fragment boundaries, status indicators, and integrity verification criteria for subsequent transmission suspension, truncation offset recording, breakpoint recovery, and receiver reassembly. This allows for the reduction of TDM service latency to physical channels while controlling fragmentation overhead, thereby reducing TDM service transmission latency and jitter, and ensuring that truncated Ethernet data is accurately reassembled in the original byte order.

[0017] Specifically, in the embodiments of this application, step one includes: measuring the frame length and calculating the number of slices of the Ethernet data frame stream based on a preset byte threshold to obtain equal-length slice boundary information and Ethernet frame byte stream; truncating the Ethernet frame byte stream block by block and inserting in-band status flags based on the equal-length slice boundary information to obtain a primary labeled segment group; performing bidirectional sliding checksum calculation on the primary labeled segment group and appending it to the end of each segment to obtain an Ethernet micro-segment sequence.

[0018] More specifically, in a specific example of this application, the multi-service access platform jointly carries Ethernet services and TDM services through a 100 Mbps physical channel. The encapsulation adaptation layer sets a length threshold register, a frame length counter, a slice boundary table, a fragment processing buffer, and a first-in-first-out transmission buffer, and configures the preset byte threshold to 128 bytes. This preset byte threshold represents the maximum number of Ethernet frame bytes carried by each micro-segment, excluding subsequently inserted in-band status flags and bidirectional sliding checksums. In the specific implementation process, firstly, the encapsulation adaptation layer receives the Ethernet data frame stream according to the data validity indication and frame end indication provided by the Ethernet interface. Taking the first byte of the destination address as the counting start point of the current frame and the last byte of the frame check sequence as the counting end point, the destination address, source address, payload data, and frame check sequence are sequentially written into the continuous buffer address. At the same time, the frame length counter is incremented byte by byte, thereby converting the current frame into an Ethernet frame byte stream that maintains the original byte order. When a frame end indication is received, the frame length counter is latched, and the number of slices is calculated using integer division and remainder field judgment. Specifically, if the frame length is divisible by 128 bytes, the integer quotient is used to determine the number of slices; otherwise, the integer quotient is incremented by one to determine the number of slices. For an Ethernet frame of 1518 bytes, the number of slices is determined to be 12. The first 11 slices each carry 128 bytes, and the 12th slice carries the remaining 110 bytes. Based on this, the encapsulation adaptation layer sequentially writes the frame identifier, fragment number, start byte offset, end byte offset, and effective fragment length into the slice boundary table to obtain equal-length slice boundary information.

[0019] Next, the fragment processing buffer reads the corresponding bytes sequentially from the continuous buffer addresses of the Ethernet frame byte stream according to the start byte offset and effective fragment length in the equal-length slice boundary information. For each read data block, block-by-block truncation and in-band status flag insertion are performed. Specifically, the first data block is marked as the start of a frame fragment, the second to eleventh data blocks as the middle of a frame fragment, the twelfth data block as the end of a frame fragment, and independent data blocks that have not undergone slicing are marked as single-fragment frames. The corresponding status code is written to the header of each data block. The in-band status flag is carried using a preset number of bytes and includes a status field and a fragment sequence number field. The status field indicates the start of a frame, the middle of a frame, the end of a frame, a single-fragment frame, and the preempted resume status. The fragment sequence number field indicates the current micro-fragment's position in the corresponding Ethernet data frame. When the single-byte encoding range of the fragment sequence number field is insufficient to represent all micro-fragments, an extended sequence number field is used to carry the remaining sequence number bits. All data blocks with in-band status flag insertion are arranged according to the frame identifier and fragment sequence number, forming a primary labeled fragment group.

[0020] Then, the verification circuit independently performs bidirectional sliding checksum calculations for each segment in the primary labeled segment group. The verification circuit sets up a forward check register and a reverse check register, both using the same preset check polynomial, initial register value, and output bit width. The forward check register is updated byte-by-byte in the order of in-band status flags to valid data at the end of the segment, while the reverse check register is updated byte-by-byte in the order of valid data at the end of the segment to in-band status flags. After all bytes of the current segment have been processed, the forward and reverse check results are combined according to a preset field order to form the bidirectional sliding checksum of the segment, and appended to the end of the corresponding segment. The forward check result is used to verify the byte continuity of the segment from beginning to end, and the reverse check result is used to verify the byte continuity of the segment from end to beginning. The receiving end can use this to detect byte loss, duplication, misalignment, or abnormal splicing near the truncation boundary.

[0021] Furthermore, the encapsulation adaptation layer, according to the frame identifier and fragment sequence number, sequentially pushes the 12 micro-fragments that have completed the in-band status flag and bidirectional sliding checksum writing into the first-in-first-out (FIFO) transmission buffer, forming an Ethernet micro-fragment sequence. It then provides the buffer base address, fragment sequence number, and transmitted byte count of the currently transmitted micro-fragment to subsequent preemption processing. When TDM services reach the encapsulation adaptation layer, subsequent processing can suspend the Ethernet micro-fragment sequence based on the aforementioned transmission context, record the actual physical truncation boundary, and generate a truncation offset pointer. After the TDM encapsulated frame transmission is complete, the remaining micro-fragments continue to be transmitted from the recorded truncation position. The receiving end can then combine the in-band status flag, truncation offset pointer, and bidirectional sliding checksum to perform boundary location, order restoration, and integrity verification on the truncated micro-fragment sequence. After stripping the corresponding fragment overhead, it recovers an Ethernet data frame containing the destination address, source address, payload data, and frame check sequence.

[0022] Specifically, in step two, when the TDM service flow reaches the encapsulation adaptation layer, pseudo-wire encapsulation is performed on the TDM service flow to generate a TDM encapsulated frame. A high-priority interrupt is triggered to suspend the transmission of the Ethernet micro-fragment sequence. The physical truncation boundary is recorded, a truncation offset pointer is generated, and the remaining suspended micro-fragments are marked as truncated micro-fragment sequences. It should be understood that because the multi-service access platform alternately carries Ethernet and TDM services in the same physical channel, the Ethernet micro-fragment sequence has burst transmission characteristics, while the TDM service flow has constant rate, continuous clock, and low latency requirements. If the TDM service flow arrives and still needs to wait for the current Ethernet data frame or the current micro-fragment sequence to be completely transmitted, frame header blocking and queuing delays varying with the occupied length will occur, increasing the difficulty for the receiving end to restore the synchronization clock. Simultaneously, if only the reading of Ethernet data is stopped without recording the stop position, byte duplication or omissions are likely to occur when resuming transmission. Therefore, in the technical solution of this application, when the TDM service flow reaches the encapsulation adaptation layer, pseudowire encapsulation is performed on the TDM service flow to generate a TDM encapsulated frame. A high-priority interrupt is triggered to suspend the transmission of the Ethernet micro-fragment sequence. The physical truncation boundary is recorded to generate a truncation offset pointer, and the remaining suspended micro-fragments are marked as truncation-state micro-fragment sequences. This establishes the priority use condition of the TDM service for the physical channel and saves the transmission context of the Ethernet service at the preemption moment. This avoids the TDM service waiting for the long Ethernet data frame to finish transmitting, reducing its queuing delay and jitter, and ensuring that the Ethernet micro-fragment sequence continues transmission from the accurate breakpoint after preemption ends.

[0023] Specifically, in the embodiments of this application, step two includes: based on pre-configured packetization period parameters, performing time slot stripping and pseudo-wire control word encapsulation on the TDM service flow to obtain a TDM encapsulated frame and generating a preemption interrupt signal; in response to the preemption interrupt signal, performing unconditional freeze suspension on the Ethernet micro-segment sequence and calculating the physical truncation boundary to obtain a suspended Ethernet sequence and a truncation offset pointer; and remarking the suspended Ethernet sequence to obtain a truncation-pending state sequence.

[0024] More specifically, in a specific example of this application, the multi-service access platform carries Ethernet and TDM services through a 100 Mbps physical channel. The front-end encapsulation process has generated an Ethernet micro-segment sequence according to a preset byte threshold of 128 bytes. The encapsulation adaptation layer sets up a TDM receive buffer, a packetization period register, a pseudowire encapsulation buffer, an interrupt controller, a transmit scheduler, a transmit byte counter, and a sequence status descriptor. During implementation, firstly, the encapsulation adaptation layer receives a TDM service stream containing time slot data and a synchronization clock. It identifies the TDM frame boundaries based on the synchronization clock and continuously extracts time slot data from the TDM service stream within the corresponding period according to the pre-configured packetization period parameters. The pre-configured packetization period parameters are written to the packetization period register to control the payload accumulation time of a single TDM encapsulated frame. When accessing E1 services and the packetization period is set to 125 microseconds, the encapsulation adaptation layer extracts the corresponding time slot data according to the time slot arrangement order within each packetization period and writes it to the TDM receive buffer. For services that carry only specified time slots, the encapsulation and adaptation layer reads the corresponding time slots according to the pre-written time slot mapping table; for services that carry complete E1 frames, the encapsulation and adaptation layer reads all time slot data in time slot order, so that the extraction results maintain the same timing relationship as the original TDM service flow.

[0025] Next, the pseudowire encapsulation circuit reads the time slot data from the TDM receive buffer, writes a pseudowire control word containing service type, sequence number, payload length, clock state, and priority information before the time slot data, and writes frame delimiting information at the corresponding positions to generate a TDM encapsulated frame. The service type indicates that the current payload belongs to a TDM service; the sequence number is used by the receiver to determine the continuity of the TDM encapsulated frame; the payload length determines the decapsulation boundary; the clock state transmits the working status of the synchronization clock; and the priority information indicates that this TDM encapsulated frame has a higher transmission priority than the Ethernet micro-fragment sequence. Once the pseudowire control word and all the time slot data within the current packetization period are written to the pseudowire encapsulation buffer, the encapsulation completion state and the high-priority enable state jointly trigger the interrupt controller to generate a preemption interrupt signal, and hold the TDM encapsulated frame in the high-priority transmit buffer, waiting for subsequent priority insertion into the physical channel.

[0026] Then, the send scheduler responds to the preemption interrupt signal. Ideally, the preemption interrupt signal arrives when the Ethernet micro-fragment has been completely transmitted, at which point the physical truncation boundary coincides with the micro-fragment boundary, and the offset value of the truncation offset pointer is equal to the total number of valid data bytes in the micro-fragment. In general, the preemption interrupt signal arrives at any byte boundary within the micro-fragment. In this case, the number of bytes sent needs to be recorded through the truncation offset pointer so that the receiver can accurately restore byte continuity. After the current valid byte is committed to the downlink of the encapsulation adaptation layer, the subsequent read enable of the Ethernet send buffer is revoked, and the valid data indication of the downlink bearer interface, the receive ready indication, and the byte valid mask are used to confirm the valid Ethernet data bytes committed to the time-domain interleaving buffer. The send scheduler latches the current frame identifier, the current micro-fragment sequence number, the buffer base address of the current micro-fragment valid data area, the number of committed valid data bytes, and the address of the next valid data byte to be committed, thereby determining the physical truncation boundary. The truncation offset pointer represents the number of valid data bytes in the current micro-fragment's valid data area preceding the physical truncation boundary, excluding in-band status flags, bidirectional sliding checksums, and other encapsulation overhead. When 53 valid data bytes have been committed to the current micro-fragment, the truncation offset pointer has an offset of 53, and the next valid data byte to be committed is the 54th valid data byte of that micro-fragment. The transmission scheduler associates the truncation offset pointer with the current frame identifier and the current micro-fragment sequence number through the sequence status descriptor for subsequent transmission recovery and receiver reassembly.

[0027] Furthermore, the send scheduler merges the remaining portion of the current micro-segment retained in the send buffer after reading stops, along with subsequent micro-segments, into a suspended Ethernet sequence, maintaining the frame identifier, segment number, original byte content, and arrangement order unchanged. The sequence state controller modifies the state descriptor corresponding to the suspended Ethernet sequence from the send state to the truncated pending state, associates the truncated offset pointer with the current micro-segment number, and locks the address of the next byte to be sent as the recovery read address, thus obtaining the truncated micro-segment sequence. After the state modification is completed, the TDM encapsulated frame, the truncated offset pointer, and the truncated micro-segment sequence are synchronously provided to subsequent mixed send processing. The TDM encapsulated frame is used to prioritize occupying the physical channel, the truncated offset pointer is used to solidify recovery information at the breakpoint of the truncated micro-segment sequence, and the truncated micro-segment sequence is used to continue sending from the locked recovery read address after the TDM encapsulated frame has been sent, thereby ensuring the byte continuity of Ethernet services before and after preemption.

[0028] Specifically, in step three, the truncation offset pointer is written to the in-band tail label at the breakpoint of the truncated micro-fragment sequence, and the TDM encapsulated frame is preferentially inserted into the physical channel for transmission. After transmission is completed, the subsequent transmission of the truncated micro-fragment sequence is resumed, forming a physical layer hybrid data stream. It should be understood that when the TDM encapsulated frame preempts the physical channel, the Ethernet micro-fragment sequence may be suspended at any byte boundary within the micro-fragment. If the physical layer hybrid data stream does not carry the positioning information of the truncation boundary, the receiving end will not be able to accurately distinguish between the part transmitted before preemption and the part transmitted after preemption, which can easily lead to byte duplication, omission, or misalignment. At the same time, if the TDM encapsulated frame is not preferentially transmitted within the channel gap formed by the interruption, queuing and deterministic delay jitter will still occur. Therefore, in the technical solution of this application, the truncation offset pointer is further written into the in-band tail label at the breakpoint of the truncated micro-fragment sequence, and the TDM encapsulated frame is preferentially inserted into the physical channel for transmission. After transmission is completed, the subsequent transmission of the truncated micro-fragment sequence is resumed. This solidifies the byte boundary when the Ethernet service is preempted, establishes the transmission order between the TDM encapsulated frame and the truncated micro-fragment sequence, and provides a basis for the receiver to identify the preemption position and restore the original Ethernet data frame. In this way, the waiting time before the TDM encapsulated frame occupies the physical channel can be shortened, the transmission latency and latency jitter of the TDM service can be reduced, and the byte continuity of the Ethernet data before and after preemption can be maintained, forming a delimitable, demultiplexable, and recombinable physical layer hybrid data stream.

[0029] Figure 3 This is a flowchart of step three of the hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to an embodiment of this application. Figure 3 As shown, step three includes: S31, based on the offset value of the truncated offset pointer, overwriting and fixing the in-band tail label at the breakpoint of the truncated micro-segment sequence to obtain a pointer-trunculated Ethernet sequence; S32, using the physical channel gap generated by the interrupt, serializing and sending the TDM encapsulated frame first, and then sending the pointer-trunculated Ethernet sequence to obtain a time-domain interleaved reassembled data stream; S33, framing and serializing the time-domain interleaved reassembled data stream to obtain a physical layer hybrid data stream.

[0030] More specifically, in a specific example of this application, the multi-service access platform jointly carries Ethernet services and TDM services through a 100 Mbps physical channel. The encapsulation adaptation layer has formed an Ethernet micro-segment sequence according to a preset byte threshold of 128 bytes, and generates a TDM encapsulated frame, a truncation offset pointer, and a truncated micro-segment sequence when the TDM service stream arrives. The transmission control section sets up a breakpoint processing buffer, a high-priority transmission buffer, an Ethernet recovery buffer, a service multiplexer, a physical layer framer, and a serial transmitter. In the implementation process, firstly, the breakpoint processing buffer reads the frame identifier, micro-segment sequence number, number of bytes sent, and address of the next byte to be sent associated with the truncation offset pointer, and locates the breakpoint in the truncated micro-segment sequence according to the offset value of the truncation offset pointer. When 53 bytes of a 128-byte micro-fragment have been acknowledged by the physical channel, the breakpoint handling buffer determines the position after the 53rd transmitted byte as the breakpoint. An in-band tail label is generated at this position, and the truncation state, the current micro-fragment sequence number, and the truncation offset pointer indicating the position of the next byte to be transmitted are written into the corresponding fields of the in-band tail label. The write result is latched in a register, ensuring that the in-band tail label remains unchanged during subsequent transmission scheduling, thus obtaining a pointer-truncation state Ethernet sequence. The in-band tail label is set between the pre-preempt Ethernet data portion and the TDM encapsulated frame to indicate the position where the previous Ethernet data portion terminates within the current micro-fragment. The Ethernet recovery buffer stores the remaining 75 bytes of the micro-fragment that have not yet been transmitted, as well as subsequent micro-fragments, with its starting address consistent with the address of the next byte to be transmitted indicated by the truncation offset pointer.

[0031] Next, after the service multiplexer completes the transmission of the in-band tail label at the breakpoint, it disables the read enable of the Ethernet recovery buffer and enables the read enable of the high-priority transmission buffer, switching the TDM-encapsulated frame to the physical channel. The service multiplexer reads the frame delimiter information, pseudo-wire control word, timeslot data, and check field in the TDM-encapsulated frame byte by byte, and the serial transmitter performs priority serialization transmission according to the data bit width and transmission clock of the physical channel. During this process, the truncated micro-fragment sequence remains in the Ethernet recovery buffer, and the frame identifier, micro-fragment sequence number, remaining byte content, and recovery read address remain unchanged, thus preventing the Ethernet recovery address from drifting during the transmission of the TDM-encapsulated frame. The service multiplexer uses the frame end indication of the TDM-encapsulated frame and the transmission completion indication returned by the physical channel as the priority transmission end conditions. Only after the last byte of the TDM-encapsulated frame is confirmed to be received by the physical channel will the transmission service switch be performed.

[0032] Then, the service multiplexer deactivates the read enable of the high-priority transmit buffer, restores the read enable of the Ethernet recovery buffer, and reads the truncated micro-segment sequence from the address of the next byte to be transmitted corresponding to the truncated offset pointer. For a 128-byte micro-segment truncated after the 53rd byte, the transmit scheduler transmits the remaining 75 bytes sequentially starting from the 54th byte of the micro-segment, and then continues to transmit subsequent micro-segments according to the original segment sequence number. The first 53 bytes that have been confirmed to be received by the physical channel are not read again. The transmit scheduler simultaneously changes the truncated pending state to the continuous transmission state, and maintains the association between the in-band status flag and the bidirectional sliding checksum and the corresponding micro-segment, thereby combining the Ethernet data portion before the breakpoint, the in-band tail with the truncated offset pointer, the TDM encapsulated frame, and the Ethernet data portion after the breakpoint into a time-domain interleaved reassembled data stream in chronological order.

[0033] Furthermore, the physical layer framer receives the time-domain interleaved and reassembled data stream, adds a synchronization header, frame delimiter field, and control information required for line transmission according to the pre-configured physical frame format, and maintains the switching position between different service data at the valid byte boundary. The serial transmitter performs line encoding and parallel-to-serial conversion on the framed data, and then continuously outputs it through an optical interface or electrical interface to obtain the physical layer hybrid data stream. Thus, the physical layer hybrid data stream carries two types of services in the order of pre-preempt Ethernet data, in-band tail label, TDM encapsulated frame, and post-preempt Ethernet data. The receiving end can extract the TDM encapsulated frame based on the frame delimiter information, and perform breakpoint location and byte-level continuation of the truncated micro-segment sequence based on the truncation offset pointer in the in-band tail label, thereby ensuring the priority transmission of TDM services and the non-duplication and non-omission recovery of Ethernet services.

[0034] Specifically, in step four, the physical layer hybrid data stream is subjected to boundary identification and demultiplexing separation at the receiving end to extract the TDM encapsulated frame, truncated micro-fragment sequence, and truncated offset pointer. It should be understood that since the physical layer hybrid data stream carries two types of services in a time sequence—pre-preempt Ethernet data, in-band tail label, TDM encapsulated frame, and post-preempt Ethernet data—different services have different frame formats, transmission priorities, and subsequent recovery requirements. If the receiving end cannot accurately identify the physical frame boundaries and service switching boundaries, bytes in the TDM encapsulated frame will overlap with the truncated micro-fragment sequence, resulting in clock recovery of the time slot data and causing byte omissions, duplications, or misalignments in the Ethernet data. Therefore, in the technical solution of this application, the physical layer hybrid data stream is subjected to boundary identification and demultiplexing separation at the receiving end to extract the TDM encapsulated frame, truncated micro-fragment sequence, and truncated offset pointer. This eliminates line coding and physical framing overhead, distinguishes TDM services and Ethernet services based on priority flags, and recovers the breakpoint information when the Ethernet service was preempted. In this way, the two types of services interleaved in the physical channel can be accurately separated, providing independent and byte-continuous input data for pseudo-line decapsulation and clock recovery of TDM encapsulated frames, as well as boundary alignment and data frame reassembly of truncated micro-segment sequences.

[0035] Figure 4 This is a flowchart of step four of the hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to an embodiment of this application. Figure 4 As shown, step four includes: S41, performing frame delimiting restoration on the physical layer mixed data stream to obtain the delimited original byte stream; S42, performing high-priority service stripping on the delimited original byte stream based on priority flag matching to obtain TDM encapsulated frames and the remaining pointer-bearing mixed fragment stream; S43, performing truncation feature separation on the remaining pointer-bearing mixed fragment stream to obtain the truncation state micro-fragment sequence and truncation offset pointer.

[0036] Accordingly, in step S41, frame delimiting restoration is performed on the physical layer mixed data stream to obtain the delimited original byte stream. It should be understood that because the physical layer mixed data stream undergoes physical layer framing, serialization, and line coding, it contains not only pre-preemption Ethernet data, in-band tails carrying truncated offset pointers, TDM encapsulated frames, and post-preemption Ethernet data, but also synchronization headers, frame delimiting fields, and physical layer control information. Therefore, it cannot be directly used for the identification and separation of the two types of services. Therefore, in the technical solution of this application, frame delimiting restoration is further performed on the physical layer mixed data stream to restore the physical frame boundaries formed at the sending end, stripping line transmission overhead, and maintaining the original transmission order of the effective bytes of each service. This provides clearly defined and sequentially continuous data input for subsequent high-priority service stripping based on priority flag matching, avoiding misjudgment of service types, misalignment of extraction range, or loss of truncated information due to physical frame synchronization issues.

[0037] More specifically, in a specific example of this application, the multi-service access platform receives a physical layer mixed data stream through a 100 Mbps physical channel. The sending end has suspended the Ethernet micro-segment with a length threshold of 128 bytes after the 53rd byte and sequentially sends the in-band tail label carrying the truncated offset pointer, the TDM encapsulated frame, and the remaining 75 bytes of the current micro-segment. In the implementation process, firstly, the receiving end decodes the physical layer hybrid data stream according to the same line coding rules as the sending end, restoring the line code groups to parallel data bytes and corresponding data validity indicators. Next, the receiving end matches the synchronization header and frame delimiter field in the decoded data to determine the start position of the physical frame, and determines the end position of the physical frame based on the frame length information or frame end indicator. Then, the data between the start and end positions of the physical frame is read, and the synchronization header, frame delimiter field, and physical layer control information are stripped, retaining only the payload bytes in the physical frame. Finally, according to the original transmission order of the physical layer hybrid data stream, the first 53 bytes of the current micro-fragment, the in-band tail label carrying the truncation offset pointer, the TDM encapsulated frame, and the remaining 75 bytes of the current micro-fragment are continuously written into the receiving byte buffer, thus obtaining the delimited original byte stream. This processing does not change the content and relative position of each valid byte, enabling subsequent processing to accurately identify and strip the TDM encapsulated frame from the delimited original byte stream, while preserving the correspondence between the truncated micro-fragment sequence and the truncation offset pointer.

[0038] Accordingly, in step S42, based on priority flag matching, high-priority service stripping is performed on the delimited original byte stream to obtain TDM-encapsulated frames and the remaining mixed fragment stream with pointers. It should be understood that since the delimited original byte stream carries two types of services in the order of pre-preempt Ethernet data, in-band tails carrying truncated offset pointers, TDM-encapsulated frames, and post-preempt Ethernet data, and since TDM-encapsulated frames need to enter the pseudowire decapsulation and clock recovery link, while truncated Ethernet data needs to enter the breakpoint alignment and fragment reassembly link, if the two types of services are not stripped, subsequent recovery cannot be performed according to their respective data structures and timing requirements. Therefore, in the technical solution of this application, high-priority service stripping is further performed on the delimited original byte stream based on priority flag matching to obtain TDM-encapsulated frames and the remaining mixed fragment stream with pointers, thereby identifying the start and end boundaries of the TDM-encapsulated frames in the delimited original byte stream and allocating them and the Ethernet fragment data carrying truncated information to different processing links. In this way, the structural integrity of the TDM encapsulated frame and the original arrangement order of Ethernet fragments can be maintained, provided that the physical frame is correctly delimited and the priority flag is not disturbed, thus providing the corresponding input for subsequent TDM signal recovery and Ethernet data frame reassembly.

[0039] More specifically, in the first embodiment of this application, the receiving end of the multi-service access platform obtains a delimited raw byte stream. This delimited raw byte stream sequentially includes the first 53 bytes of the current 128-byte micro-segment, an in-band tail label carrying a truncation offset pointer, a TDM encapsulation frame, and the remaining 75 bytes of the current micro-segment. The demultiplexing engine pre-stores the field position of the priority flag bit in the TDM pseudowire control word and the target encoding. In specific implementation, firstly, the demultiplexing engine performs a unidirectional scan starting from the first byte of the delimited raw byte stream according to a preset field width, matching the byte content of each candidate position with the target encoding bit by bit. When the priority flag bit of a candidate position matches the target encoding, the demultiplexing engine determines the candidate position as the starting position for extracting the TDM encapsulation frame and stops further boundary verification of the starting position.

[0040] Next, the demultiplexing engine reads the payload length information carried by the pseudowire control word from the matching position, and determines the extraction termination position of the TDM encapsulated frame by combining the pseudowire control word length and the frame check field length. When the TDM encapsulated frame uses a fixed length, the demultiplexing engine determines the extraction termination position according to the pre-configured frame length. Then, the demultiplexing engine performs a single boundary segmentation on the bytes between the extraction start position and the extraction termination position, and continuously writes the pseudowire control word, time slot data, and check field within this byte range into the TDM receive buffer to obtain the TDM encapsulated frame, which is then provided to subsequent pseudowire decapsulation, jitter buffering, and constant bit rate clock reconstruction processing.

[0041] Subsequently, the demultiplexing engine subtracts the extracted byte length of the TDM encapsulated frame from the total effective byte length of the delimited original byte stream to determine the byte size of the remaining data. The data before the extraction start position and the data after the extraction end position are then written to the fragment buffer in their original order. The data before the extraction start position includes the first 53 bytes of the current micro-fragment and an in-band tail label carrying a truncation offset pointer. The data after the extraction end position includes the remaining 75 bytes of the current micro-fragment and the subsequent Ethernet micro-fragments. This data together constitutes the remaining pointer-based mixed fragment stream, which is then provided to subsequent truncation feature separation processing.

[0042] In particular, in the hybrid encapsulation system of Ethernet and TDM services in the multi-service access platform, the preemption mechanism of the transmitting end determines that the TDM encapsulated frame is inserted at any byte position on the physical channel by forced interruption. This means that in the physical layer hybrid data stream after time-domain interleaving, a precise byte-level logical adjacency boundary is formed between the TDM encapsulated frame and the truncated Ethernet micro-segment. The last valid byte of the TDM frame and the first valid byte of the Ethernet fragment are strictly adjacent in physical storage space, and no overlap or gap of any bytes is allowed.

[0043] However, in the priority flag parsing and TDM service stripping stages at the receiving end, the first embodiment described above determines the extraction split point solely based on unidirectional pattern matching of the priority flag bit of the pseudowire control word. Once a match is successful, a one-size-fits-all stripping operation is immediately performed, followed by a simple length subtraction to calculate the byte size of the remaining fragment stream. Throughout this process, the extracted TDM encapsulated frame and the remaining pointer-margined mixed fragment stream are treated as independent and unrelated results, and the demultiplexing engine completely ignores the inherent byte-level complementary integrity constraints between them. This mechanism defect will cause serious problems in the actual access network physical channel environment. When a single-bit flip is introduced due to noise interference, electromagnetic crosstalk, or temperature drift in the fiber optic link or copper cable interface, if a slight phase drift occurs precisely in the priority flag byte itself or during the delimitation synchronization process, the extraction split point will deviate from the true boundary by one or more bytes. The consequence at this point is bidirectional coupling: the tail of the extracted TDM encapsulated frame will be mixed with dirty bytes that originally belonged to Ethernet fragments, while the header of the remaining pointer-mixed fragment stream will lose its true starting byte. These bytes that are incorrectly assigned to the TDM frame contain key protocol information such as the in-band status flags of Ethernet micro-fragments.

[0044] Since the first embodiment does not set any feedback verification path in this stage, this offset error of the extraction boundary will propagate downstream in a silent manner: on the one hand, it causes the clock recovery phase-locked loop to produce a phase jump due to the dirty bytes at the end of the frame; on the other hand, it causes the bidirectional sliding checksum verification to fail due to the missing header bytes during Ethernet fragment reassembly, ultimately resulting in the catastrophic consequence of simultaneous bidirectional degradation of TDM services and Ethernet services.

[0045] To address the aforementioned shortcomings, a second embodiment is proposed. Specifically, in the second embodiment of this application, Figure 5 This is a flowchart illustrating the process of using priority flag matching to strip high-priority services from a delimited original byte stream to obtain a TDM encapsulated frame and a remaining pointer-based hybrid fragment stream in a multi-service access platform hybrid encapsulation method according to embodiments of this application. Figure 5 As shown, step S42 includes: S421, performing preliminary separation and simultaneous acquisition of dual-side fingerprints on the delimited original byte stream to obtain the preliminary extracted TDM encapsulated frame, the preliminary remaining fragment stream, and the boundary fingerprint pair; S422, performing joint decision on cross-service flow mutual integrity constraints and offset direction inference on the boundary fingerprint pair to obtain the boundary offset correction amount; S423, performing adaptive byte-level backoff or expansion correction on the preliminary extracted TDM encapsulated frame and the preliminary remaining fragment stream to obtain the TDM encapsulated frame and the remaining pointer-based mixed fragment stream.

[0046] In step S421, the original delimited byte stream is initially separated and simultaneously fingerprinted from both sides to obtain the initially extracted TDM encapsulated frame, the initial remaining fragment stream, and the boundary fingerprint pair. It should be understood that because the TDM encapsulated frame in the original delimited byte stream is forcibly inserted by the sender at the truncation position of the Ethernet micro-segment, the end of the TDM encapsulated frame and the header of the retransmitted Ethernet fragment form a byte-level adjacency boundary in the physical storage space. Physical channel noise, priority flag flipping, or delimited synchronization offset can cause the initial segmentation point determined based on one-sided flag matching to deviate from the actual boundary, thus mixing Ethernet fragment bytes into the initially extracted TDM encapsulated frame and causing the initial remaining fragment stream to lack corresponding bytes. Therefore, in the technical solution of this application, the original delimited byte stream is further initially separated and simultaneously fingerprinted from both sides to obtain the initially extracted TDM encapsulated frame, the initial remaining fragment stream, and the boundary fingerprint pair, thereby preserving the initial separation result and quantifying the degree of deviation of the bytes on both sides of the initial segmentation point relative to their respective protocol structures. In this way, the complementary structural features naturally formed between the TDM encapsulated frame tail and the Ethernet fragment header at the segmentation boundary can be utilized to provide quantifiable basis for subsequent joint decision-making on cross-service flow integrity constraints, offset direction inference and byte-level boundary correction, and to prevent boundary offset from being silently transmitted to the clock recovery and Ethernet data frame reassembly stages.

[0047] In a specific example of this application, the multi-service access platform receives the delimited raw byte stream through a 100 Mbps physical channel. The sending end has suspended the Ethernet micro-segment with a length threshold of 128 bytes after the 53rd valid byte, and continues to send the truncated micro-segment sequence after the TDM encapsulated frame is sent. The hardware demultiplexing engine is configured with a priority flag matching register, a pseudo-wire frame tail feature expectation table, an Ethernet in-band status flag feature expectation table, a boundary window width register, a distance weight table, and a boundary acquisition buffer. The pseudo-wire frame tail feature expectation table stores the known padding pattern and delimited bytes at the end of the TDM encapsulated frame. The Ethernet in-band status flag feature expectation table stores the fixed bit pattern corresponding to the start status code, intermediate status code, end status code, and preempted status code. The Ethernet fragment header that is resumed after truncation uses the preempted status code, so that the left and right sides of the initial segmentation point have predictable protocol structures.

[0048] In practice, the hardware demultiplexing engine first scans the priority flag bits in the pseudowire control word along the transmission direction of the delimited original byte stream. After matching a high-priority code, it determines the candidate start position of the TDM encapsulated frame and determines the candidate end position based on the payload length, control word length, and frame tail field length recorded in the pseudowire control word. The candidate end position is used as the initial segmentation point. The hardware demultiplexing engine writes the bytes between the candidate start position and the initial segmentation point into the TDM receive buffer to obtain the initial extracted TDM encapsulated frame. Simultaneously, it maps the Ethernet data before the candidate start position and the Ethernet data after the initial segmentation point to the fragment buffer according to the original transmission order to obtain the initial remaining fragment stream. The initial extracted TDM encapsulated frame and the initial remaining fragment stream are only used as verification objects and are not directly output as the final demultiplexing result.

[0049] Next, the hardware demultiplexing engine reads bytes of data with a fixed window width from the initial segmentation point towards the left side of the TDM encapsulated frame, and compares each read byte with the corresponding expected protocol feature value in the pseudo-wire frame tail feature expectation table. The left fingerprint hash value is equal to the absolute value of the difference between each actual byte in the left window and its corresponding expected protocol feature value, weighted by distance. The calculation formula is as follows:

[0050] in, The left-side fingerprint hash value is used to characterize the degree to which the actual data extracted from the tail of the TDM encapsulated frame deviates from the expected structure of the pseudo-line frame tail protocol. The fixed byte width of the boundary fingerprint acquisition window, This refers to the position number of the byte within the left window. This represents the weight coefficient for the i-th byte position in the left window, with the weight coefficient increasing the closer the byte is to the initial split point. This represents the actual value of the i-th byte in the left window. Let be the expected value of the protocol feature at the i-th position at the tail of the TDM pseudowire frame. This represents the deviation of the actual byte at that position from the expected byte at the end of the pseudo-line frame; This is to accumulate all weighted offsets within the window. In this scenario, the left window covers the padding field and delimiter bytes at the end of the TDM encapsulated frame. This reflects whether each position conforms to the pseudo-line frame tail structure. This allows bytes adjacent to the initial segmentation point to have a greater impact on the judgment result, and the accumulated result... This reflects the overall structural integrity of the initially extracted TDM encapsulated frame tail. When the initial segmentation point shifts towards the Ethernet fragment direction, the left window will contain bytes that originally belonged to the truncated micro-fragment sequence. These bytes deviate from the expected value of the pseudowire frame tail feature, thus... Increase.

[0051] Then, the hardware demultiplexing engine synchronously reads bytes of data with a fixed window width towards the right side of the Ethernet fragment at the same initial segmentation point, and compares each byte with the expected value of the corresponding position in the Ethernet in-band status flag expected value table. The right fingerprint hash value is equal to the absolute value of the difference between each actual byte in the right window and its corresponding expected value, weighted by distance, and the calculation formula is as follows:

[0052] in, The right-hand fingerprint hash value is used to characterize the degree to which the actual data in the initial remaining fragment stream header deviates from the expected structure of the Ethernet in-band status flags. This represents the weight coefficient for the i-th byte position in the right window, with the weight coefficient increasing the closer the byte is to the initial split point. This represents the actual value of the i-th byte in the right window. This represents the expected feature value at the i-th position of the Ethernet in-band status flag header. This is the deviation of the actual byte at this position from the expected byte of the in-band status flag; This is to accumulate all weighted offsets within the right-hand window. In this scenario, the right-hand window covers the Ethernet fragment header that was truncated and then retransmitted. Its header contains a preemption status code in a fixed-bit pattern and adjacent data fields. It reflects whether each position conforms to the header encoding format of the truncated micro-fragment sequence. Increase the contribution of status code bytes near the initial segmentation point to the judgment result, and accumulate the results. This reflects the structural integrity of the initial remaining fragment stream header. When the initial segmentation point shifts towards the TDM encapsulated frame direction, the right window will contain bytes that originally belonged to the tail of the TDM encapsulated frame. These bytes deviate from the expected value of the Ethernet in-band status flag characteristics, thus... Increase.

[0053] When the initial segmentation point coincides with the actual service boundary, the bytes in the left window conform to the protocol padding rules and delimitation format of the TDM encapsulated frame tail, and the bytes in the right window conform to the encoding format of Ethernet in-band status flags. Therefore, both the left and right fingerprint hash values ​​approach zero. When the initial segmentation point is offset by one or more bytes, the bytes incorrectly assigned to one side actually originate from the protocol domain of the other side, and their actual values ​​will deviate from the expected value of this side, causing the two fingerprint hash values ​​to increase accordingly. The hardware demultiplexing engine binds the left and right fingerprint hash values ​​to form a boundary fingerprint pair, and sends the boundary fingerprint pair, along with the initially extracted TDM encapsulated frame and the initial remaining fragment stream, to the subsequent processing stage. This allows the subsequent processing to combine the degree of deviation between the two sides to implement joint judgment on cross-service flow mutual integrity constraints, rather than directly confirming the extraction boundary based solely on the priority flag bit of one side.

[0054] In step S422, the boundary fingerprint pairs are subjected to joint decision-making on cross-service flow mutual integrity constraints and offset direction inference to obtain the boundary offset correction amount. It should be understood that since the tail of the initially extracted TDM encapsulated frame and the header of the initially remaining fragment stream have a natural byte-level complementary relationship at the initial segmentation point, the extra bytes extracted on one side are the missing bytes on the other side. Therefore, when any byte offset occurs at the initial segmentation point, structural feature anomalies will occur simultaneously in the tail of the TDM encapsulated frame and the header of the Ethernet fragment. At the same time, there is a blind spot for misjudgment when performing verification based solely on the fingerprint of either side. For example, the Ethernet bytes mistakenly included in the TDM encapsulated frame may have a similar expected value to the feature of the pseudo-wire frame tail padding bytes, or the pseudo-wire frame tail bytes mistakenly included in the initially remaining fragment stream may have a similar local encoding to the Ethernet in-band status flag. Therefore, in the technical solution of this application, the boundary fingerprint pairs are further subjected to joint decision-making on cross-service flow mutual integrity constraints and offset direction inference to obtain the boundary offset correction amount. This is used to comprehensively evaluate the degree of deviation of the data on both sides of the initial segmentation point relative to their respective protocol structures, and to determine the offset direction and number of offset bytes of the initial segmentation point based on the relative relationship of the degree of deviation on both sides. In this way, the accidental matching blind zone of single-sided independent verification can be eliminated, byte-level extraction errors caused by physical channel noise, priority flag bit flipping, or frame delimitation micro-offsets can be identified, and a control basis with direction and magnitude can be provided for subsequent adaptive byte-level backoff or extended correction.

[0055] In a specific example of this application, the multi-service access platform transmits TDM services and Ethernet services through a 100 Mbps physical channel. The transmitting end has inserted a TDM encapsulated frame after the 53rd valid byte of the Ethernet micro-fragment with a length threshold of 128 bytes. The receiving end obtains the preliminary extracted TDM encapsulated frame and the preliminary remaining fragment stream through preliminary separation, and obtains the boundary fingerprint pair composed of the left fingerprint hash value and the right fingerprint hash value through dual-side fingerprint synchronous acquisition. During implementation, the mutual verification decision module first receives the boundary fingerprint pair and reads the pre-configured weighted balance factor, boundary confidence threshold, and direction determination threshold. The left fingerprint hash value is used to characterize the deviation of the initial extracted TDM encapsulated frame tail from the pseudo-wire frame tail padding pattern and delimiting bytes, while the right fingerprint hash value is used to characterize the deviation of the initial remaining fragment stream header from the Ethernet in-band status flag encoding format. The mutual verification decision module binds the two fingerprint hash values, so that the initial extracted TDM encapsulated frame and the initial remaining fragment stream are no longer treated as independent verification objects, but are jointly judged according to the integrity constraint that there is no byte overlap, no byte omission, and mutual complementation at the initial split point.

[0056] Next, the mutual verification decision module calculates the joint deviation cost based on the left fingerprint hash value, the right fingerprint hash value, and the weighted balance factor. The specific calculation formula is as follows:

[0057] in, The joint deviation cost is used to comprehensively quantify the overall deviation level of the data on both sides of the initial split point relative to their respective expected protocol structures. The left fingerprint hash value is used to characterize the degree to which the actual data extracted from the tail of the TDM encapsulated frame deviates from the expected structure of the pseudo-line frame tail protocol. The right-hand fingerprint hash value is used to characterize the degree to which the actual data in the initial remaining fragment stream header deviates from the expected structure of the Ethernet in-band status flags. The weighting balancing factor takes a value between zero and one. Its value is pre-written into the decision register based on the characteristic complexity of the pseudowire frame tail protocol structure and the Ethernet in-band status flag structure. It is used to adjust the contribution ratio of the two sides in the joint decision according to the difference in the complexity of the protocol structures. This indicates the contribution of TDM encapsulated frame tail structure anomalies to the joint decision. This indicates the contribution of Ethernet fragment header structure anomalies to the joint decision. The closer the joint deviation cost is to zero, the more the actual bytes on both sides of the initial segmentation point conform to their respective protocol expected structures; the larger the joint deviation cost, the higher the probability of byte missegmentation between the initial extracted TDM encapsulated frame and the initial remaining fragment stream. The weighted balance factor ensures that the side with a more stable protocol structure and more identifiable fields contributes a higher proportion to the joint decision, thereby preventing decision imbalance caused by differences in protocol structure complexity on both sides.

[0058] Then, the mutual verification decision module compares the joint deviation cost with the system's preset boundary confidence threshold. When the joint deviation cost is lower than or equal to the boundary confidence threshold, it indicates that the bytes in the left window conform to the protocol padding rules and delimitation format of the TDM encapsulated frame tail, and the bytes in the right window conform to the encoding format of Ethernet in-band status flags. Based on this, the mutual verification decision module determines that the initial extraction boundary is correct and sets the boundary offset correction amount to zero. When the joint deviation cost exceeds the boundary confidence threshold, it indicates that there is a byte-level deviation at the initial segmentation point. The mutual verification decision module further compares the left fingerprint hash value with the right fingerprint hash value and infers the offset direction based on the relationship between the difference between the two and the direction determination threshold.

[0059] Furthermore, when the left fingerprint hash value is significantly greater than the right fingerprint hash value, it indicates that Ethernet fragment bytes that do not belong to the frame have been mixed into the tail of the initially extracted TDM encapsulated frame. That is, the initial segmentation point has shifted to the right, causing the initial TDM encapsulated frame to extract more bytes. The mutual verification decision module checks the deviation items in the left window byte by byte from the initial segmentation point to the left. The number of bytes that do not meet the expected value of the pseudo-line frame tail feature is determined as the offset amplitude, and a positive value is output as the boundary offset correction amount. A positive value indicates that the initial segmentation point is located to the right of the actual boundary. Subsequent processing requires the extraction termination position of the TDM encapsulated frame to be backed to the left by the corresponding number of bytes. When the right fingerprint hash value is significantly greater than the left fingerprint hash value, it indicates that bytes originally belonging to the tail of the TDM encapsulated frame have been mixed into the header of the initial residual fragment stream. That is, the initial segmentation point has shifted to the left, causing the initial residual fragment stream to extract more bytes. The mutual verification decision module checks the deviation items in the right window byte by byte from the initial segmentation point to the right. The number of bytes that do not meet the expected value of the Ethernet in-band status flag feature is determined as the offset magnitude, and a negative value is output as the boundary offset correction amount. The negative value indicates that the initial segmentation point is located to the left of the actual boundary, and subsequent processing needs to extend the extraction termination position of the TDM encapsulated frame to the right by the corresponding number of bytes.

[0060] In a scenario where an Ethernet micro-fragment is preempted after the 53rd valid byte, if the initial segmentation point shifts two bytes to the right due to physical channel noise, the initial extracted TDM encapsulated frame will have two header bytes of the truncated micro-fragment sequence mixed in, significantly increasing the left fingerprint hash value, while the initial remaining fragment stream will lack these two bytes. The mutual verification decision module determines the initial segmentation point to be shifted to the right based on this, and defines the number of consecutive abnormal bytes as the offset magnitude, outputting a boundary offset correction value of positive two. If the initial segmentation point shifts one byte to the left, the initial remaining fragment stream will have one tail byte of the TDM encapsulated frame mixed in, significantly increasing the right fingerprint hash value, and the mutual verification decision module will output a boundary offset correction value of negative one. Thus, the boundary offset correction value, represented by a signed integer, simultaneously characterizes the offset direction and number of offset bytes of the initial segmentation point relative to the actual boundary, and is provided together with the initially extracted TDM encapsulated frame and the initial remaining fragment stream for subsequent boundary correction processing.

[0061] In step S423, adaptive byte-level backoff or extension correction is performed on the extraction boundaries of the initially extracted TDM encapsulated frame and the initial remaining fragment stream to obtain the TDM encapsulated frame and the remaining pointer-mixed fragment stream. It should be understood that since the boundary offset correction only represents the offset direction and number of offset bytes of the initial segmentation point relative to the actual service boundary, if the byte assignment of the initially extracted TDM encapsulated frame and the initial remaining fragment stream is not adjusted accordingly, the Ethernet fragment bytes mixed into the tail of the initially extracted TDM encapsulated frame or the TDM frame tail bytes mixed into the head of the initial remaining fragment stream will still enter subsequent processing, making it impossible for the last valid byte of the TDM encapsulated frame and the first valid byte of the Ethernet fragment to satisfy the physical adjacency relationship formed by the sending end. Therefore, in the technical solution of this application, adaptive byte-level backoff or extension correction is further performed on the extraction boundaries of the initially extracted TDM encapsulated frame and the initial remaining fragment stream to redetermine the service assignment of the bytes on both sides of the initial segmentation point according to the boundary offset correction amount, and to simultaneously adjust the extraction range of the two data streams. This eliminates byte overlap or omission between the two data streams, blocks clock recovery phase jumps caused by abnormal bytes at the TDM frame tail and reassembly check failures caused by missing Ethernet fragment headers, and ensures the integrity of the data received during subsequent recovery processing of the two types of services.

[0062] In a specific example of this application, a multi-service access platform transmits TDM and Ethernet services through a 100 Mbps physical channel. The transmitting end has inserted a TDM encapsulated frame after the 53rd valid byte of an Ethernet micro-segment with a length threshold of 128 bytes. The receiving end has obtained the initially extracted TDM encapsulated frame, the initial remaining fragment stream, and the boundary offset correction amount in signed integer form. The boundary correction executor sets up a shared receive buffer, an extraction range descriptor, a fragment range descriptor, an address operation register, and a data output buffer. The bytes corresponding to the initially extracted TDM encapsulated frame and the initial remaining fragment stream are kept in the same shared receive buffer. The extraction range descriptor records the start and end addresses of the initially extracted TDM encapsulated frame, and the fragment range descriptor records the start address of the data segment adjacent to the initial segmentation point in the initial remaining fragment stream. Thus, byte attribution correction is completed by adjusting the address description information without having to repeatedly move all the data.

[0063] In practice, the boundary correction actuator first reads the boundary offset correction amount and determines whether it is zero. When the boundary offset correction amount is zero, it indicates that the joint deviation cost has not exceeded the boundary confidence threshold, and the two sides of the initial split point respectively conform to the TDM encapsulated frame tail structure and the Ethernet in-band status flag structure. The boundary correction actuator keeps the extraction range descriptor and fragment range descriptor unchanged, directly confirms the initially extracted TDM encapsulated frame as a TDM encapsulated frame, and confirms the initial remaining fragment stream as the remaining pointer-based mixed fragment stream, thereby avoiding meaningless data adjustments to the correct boundary.

[0064] Next, when the boundary offset correction is positive, it indicates that the initial segmentation point has shifted towards the Ethernet fragment direction, and the initial extracted TDM encapsulated frame has extracted too many bytes belonging to the initial remaining fragment stream. The boundary correction actuator determines the backoff direction based on the positive sign of the boundary offset correction and the number of bytes to backoff based on its absolute value. It backs the termination address of the initial extracted TDM encapsulated frame forward by the corresponding number of bytes, and simultaneously adjusts the start address of the data segment adjacent to the initial segmentation point in the initial remaining fragment stream forward by the same amount, so that the bytes mistakenly assigned to the end of the initial extracted TDM encapsulated frame are reassigned to the initial remaining fragment stream. For example, when the boundary offset correction is positive two, the boundary correction actuator backs the termination address of the initial extracted TDM encapsulated frame forward by two bytes and simultaneously moves the start address of the adjacent data segment in the initial remaining fragment stream forward by two bytes, thereby restoring the two Ethernet fragment bytes mixed into the end of the initial extracted TDM encapsulated frame to their original service side.

[0065] Then, when the boundary offset correction is negative, it indicates that the initial split point has shifted towards the TDM encapsulation frame, and the initial remaining fragment stream has extracted too many bytes that originally belonged to the tail of the TDM encapsulation frame. The boundary correction executor determines the extension direction based on the negative sign of the boundary offset correction and the number of bytes to extend based on its absolute value. It extends the termination address of the initially extracted TDM encapsulation frame by the corresponding number of bytes, and simultaneously adjusts the start address of the data segment adjacent to the initial split point in the initial remaining fragment stream by the same amount, so that the bytes that were mistakenly assigned to the beginning of the initial remaining fragment stream are reassigned to the initially extracted TDM encapsulation frame. For example, when the boundary offset correction is negative one, the boundary correction executor extends the termination address of the initially extracted TDM encapsulation frame by one byte and simultaneously moves the start address of the adjacent data segment in the initial remaining fragment stream by one byte, thereby restoring the last missing valid byte of the TDM encapsulation frame.

[0066] After each address adjustment, the boundary correction actuator checks the continuity between the corrected extraction termination address and the fragment start address to ensure that they point to adjacent byte positions in the shared receive buffer. This ensures that there are no overlapping bytes read repeatedly or missing bytes not read by any data object between the last valid byte of the TDM encapsulated frame and the first valid byte of the Ethernet fragment. It also maintains the original order of the in-band tails carrying truncation offset pointers, truncated Ethernet data, and subsequent micro-fragments in the initial remaining fragment stream. After correction, the boundary correction actuator reads the corresponding bytes according to the updated extraction range descriptor to obtain the TDM encapsulated frame, and reads the remaining bytes according to the updated fragment range descriptor and the original fragment mapping relationship to obtain the remaining pointer-based mixed fragment stream. The two data streams are then output to the pseudowire decapsulation processing and truncation feature separation processing, respectively.

[0067] In summary, by introducing a dual-boundary fingerprint mutual integrity constraint verification and adaptive correction mechanism in the demultiplexing stage, the receiver no longer relies on a one-time cut-and-conclude strategy based on unidirectional flag matching when performing the separation operation of TDM services and Ethernet fragments. Instead, it utilizes the complementary constraint relationship between the two output objects naturally formed at the extraction boundary to provide closed-loop protection for extraction accuracy. When physical channel noise causes boundary synchronization drift or flag flipping, the joint deviation cost can detect the boundary offset with a sensitivity far exceeding that of single-sided independent verification. Through directional inference and byte-level precise correction, the extraction boundary is restored to the correct position. This fundamentally blocks the two error propagation links caused by dirty bytes at the end of the TDM frame leading to phase-locked loop phase jumps and missing header bytes of Ethernet fragments leading to sliding checksum verification failures. This avoids the catastrophic consequences of simultaneous bidirectional degradation of TDM and Ethernet services at the receiver, significantly improving the robustness and service delivery quality of the multi-service access platform in hybrid encapsulation and demultiplexing under actual noisy channel environments.

[0068] Accordingly, in step S43, the remaining pointer-based mixed fragment stream is subjected to truncation feature separation to obtain a truncated micro-fragment sequence and a truncation offset pointer. It should be understood that since the remaining pointer-based mixed fragment stream is formed after the TDM encapsulated frame is stripped, it simultaneously contains Ethernet micro-fragment data sent before preemption, an in-band tail label carrying a truncation offset pointer at the breakpoint, and Ethernet micro-fragment data sent after preemption. The truncation offset pointer is control information and cannot participate in fragment reassembly as Ethernet data. The data on both sides of the breakpoint needs to be restored to their original byte relationships according to the position indicated by this pointer. If the two are not separated, the receiving end will not be able to determine the accurate splicing position of the preempted micro-fragment and may mistakenly write the control field in the in-band tail label into the reassembled Ethernet data frame. Therefore, in the technical solution of this application, the remaining pointer-based mixed fragment stream is further subjected to truncation feature separation to obtain a truncated micro-fragment sequence and a truncation offset pointer, thereby extracting control information characterizing the physical truncation boundary from the mixed fragments and restoring the Ethernet micro-fragment data on both sides of the breakpoint into a data sequence with a clear fragment state and original arrangement order. This provides an accurate positioning basis for subsequent truncation boundary alignment based on the truncation offset pointer, avoids in-band control overhead from being mixed into valid Ethernet data, and ensures that the truncation state micro-fragment sequence can complete integrity verification and Ethernet data frame reassembly by combining bidirectional sliding checksum.

[0069] More specifically, in a specific example of this application, after the TDM encapsulated frame is stripped and the tail-side extraction boundary correction is completed, the remaining pointer-based hybrid fragment stream sequentially includes the original in-band status flag of the current micro-fragment, the first 53 valid data bytes, the in-band tail label carrying the truncation offset pointer, the in-band status flag of the preempted resume state, the remaining 75 valid data bytes of the current micro-fragment, the original bidirectional sliding checksum, and subsequent micro-fragments. The truncation feature parser pre-configures the field formats of the in-band tail label and the in-band status flag of the preempted resume state, and sets the fragment receive buffer, tail label matching register, pointer output register, and micro-fragment descriptor buffer.

[0070] In implementation, firstly, the truncation feature parser scans the remaining mixed fragment stream with pointers in byte order, and confirms the in-band tail label at the breakpoint by combining the truncation status field, fragment sequence number field, and tail label checksum field. After confirmation, the truncation feature parser locks the start and end addresses of the in-band tail label and continues to match the in-band status flags of the preempted resume state located after that in-band tail label to confirm that the data segment before and after the breakpoint belongs to the same frame identifier and the same micro-fragment sequence number. Next, the truncation feature parser reads the offset value field from the in-band tail label, strips the status bits and reserved bits, writes the valid offset value into the pointer output register to obtain the truncation offset pointer, and associates the truncation offset pointer with the corresponding frame identifier and micro-fragment sequence number through the micro-fragment descriptor. If the first 53 valid data bytes of the current micro-fragment have been sent, the offset value of the truncation offset pointer is 53. Then, the truncation feature parser marks the in-band tail at the breakpoint and the in-band status flag of the preempted resume state as truncation transmission overhead, without writing them into the valid data area of ​​the micro-segment. Simultaneously, it registers the original in-band status flag, the 53 valid data bytes before the breakpoint, the 75 valid data bytes after the breakpoint, and the original bidirectional sliding checksum as components of the current truncated micro-segment, maintaining the original order of subsequent micro-segments. The resulting truncated micro-segment sequence does not contain the separated truncation offset pointer, the breakpoint in-band tail, or the in-band status flag of the preempted resume state, but retains the original in-band status flag, valid data, and bidirectional sliding checksum of the micro-segment. Furthermore, the truncation feature parser outputs the truncated micro-segment sequence and its associated truncation offset pointer, enabling subsequent reassembly processing to write the data segment before and after the breakpoint into consecutive buffer locations based on the offset value 53, and verify the reassembly result using the bidirectional sliding checksum.

[0071] Specifically, in step five, clock recovery is performed on the TDM encapsulated frame to obtain the recovered TDM signal, and the truncated micro-fragment sequence is aligned to the truncation boundary and verified by bidirectional sliding checksum based on the truncation offset pointer to obtain the reassembled Ethernet data frame. It should be understood that because the transmitting end encapsulates the TDM service flow into TDM encapsulated frames and performs priority insertion during the transmission of the Ethernet micro-fragment sequence, the time interval between the arrival of the TDM encapsulated frame at the receiving end is affected by encapsulation, preemption scheduling, and physical transmission processes, and cannot be directly output as a continuous constant bit rate signal. Simultaneously, the same Ethernet micro-fragment in the truncated micro-fragment sequence is divided into a pre-breakpoint data segment and a post-breakpoint data segment, and each micro-fragment still carries encapsulation overhead such as in-band status flags and bidirectional sliding checksums, making it impossible to directly recover into a standard Ethernet data frame. Therefore, in the technical solution of this application, clock recovery is further performed on the TDM encapsulated frame to obtain the recovered TDM signal, and the truncated micro-segment sequence is aligned to the truncation boundary and verified by bidirectional sliding checksum based on the truncation offset pointer to obtain the reassembled Ethernet data frame. This is used to recover the constant bit rate transmission timing of the TDM service and the original byte structure of the Ethernet service. In this way, the arrival jitter of the TDM service introduced by hybrid encapsulation and preemptive transmission can be eliminated, ensuring that the time slot data is continuously output according to the reconstructed synchronous clock, and byte omissions, duplications or misalignments at the truncation boundary can be detected, ensuring the byte continuity and content integrity of the reassembled Ethernet data frame.

[0072] Specifically, in the embodiments of this application, step five includes: performing pseudo-wire decapsulation and constant bit rate clock reconstruction on the TDM encapsulated frame through a digital phase-locked loop and jitter buffer to obtain the recovered TDM signal; and performing fragment reassembly and overhead stripping on the truncated micro-fragment sequence to obtain the reassembled Ethernet data frame.

[0073] More specifically, in a specific example of this application, the multi-service access platform transmits Ethernet services and TDM services through a 100 Mbps physical channel. The TDM service stream is an E1 service with a packetization period of 125 microseconds, and the preset byte threshold for Ethernet micro-segments is 128 bytes. After the receiving end completes boundary identification, demultiplexing separation, and truncation feature separation, it obtains the TDM encapsulated frame, the truncated micro-segment sequence, and a truncation offset pointer with an offset value of 53. The truncation offset pointer is associated with the corresponding frame identifier and micro-segment sequence number through the micro-segment descriptor. The truncated micro-segment sequence does not contain the breakpoint in-band tail label, the in-band status flag of the preempted resume state, or the truncation offset pointer.

[0074] In practice, firstly, the pseudo-wire decapsulation circuit reads the service type, sequence number, payload length, and clock state according to the pseudo-wire control word format. It then strips the frame header delimiter field, pseudo-wire control word, fixed tail delimiter field, and other encapsulation overhead, and writes the valid timeslot data into the jitter buffer according to the sequence number. The jitter buffer maintains the order of timeslot data in each TDM encapsulated frame and absorbs arrival interval changes caused by encapsulation, preemption scheduling, and physical transmission.

[0075] Next, the digital phase-locked loop (PLL) detects the arrival interval of the TDM-encapsulated frames and the deviation between the current fill depth and the target fill depth of the jitter buffer, and performs limited adjustment of the local recovery clock control around the E1 nominal output frequency. When the buffer fill depth is higher than the target fill depth, the recovery clock frequency is increased within the allowable frequency deviation range; when the buffer fill depth is lower than the target fill depth, the recovery clock frequency is decreased within the allowable frequency deviation range. After the PLL enters the locked state, the receiver continuously reads the time slot data according to the recovered constant bit rate clock, restores the time slot arrangement and frame synchronization relationship, and obtains the recovered TDM signal.

[0076] Then, the micro-fragment reassembly buffer determines the preempted target micro-fragment based on the frame identifier and micro-fragment sequence number associated with the truncation offset pointer, and determines the truncation boundary of the target micro-fragment based on the offset value 53. The micro-fragment reassembly buffer writes the data segment before the breakpoint to bytes 1 to 53 of the target micro-fragment's valid data area, and writes the data segment after the breakpoint continuously starting from byte 54 until the remaining 75 valid data bytes are written, thereby restoring the valid data of the micro-fragment with a length of 128 bytes.

[0077] Furthermore, the verification processing circuit adopts the same verification rules as the transmitting end, recalculating the forward and reverse sliding checksums for the target micro-fragments that have completed truncation boundary alignment, and comparing them with the original bidirectional sliding checksums retained in the truncated micro-fragment sequence. When both verification results are consistent, the byte content, arrangement order, and splicing position of the data segments before and after the breakpoint are determined to be correct; when either verification result is inconsistent, the corresponding target micro-fragment is marked as a reassembly anomaly, and writing it into the complete Ethernet frame buffer is stopped.

[0078] Finally, after the bidirectional sliding checksum verification passes, the micro-fragment reassembly buffer, based on the original in-band status flags and fragment sequence numbers of each micro-fragment, concatenates the frame start micro-fragment, frame middle micro-fragment, and frame end micro-fragment in their original order, and strips the original in-band status flags and bidirectional sliding checksums of each micro-fragment, retaining only the destination address, source address, payload data, and frame check sequence, to obtain the reassembled Ethernet data frame. Since the breakpoint in-band tail, the in-band status flag of the preempted resume state, and the truncation offset pointer have already been separated in step S43, step five does not repeat the stripping of the aforementioned truncation transmission overhead. Thus, the recovered TDM signal maintains a constant bit rate and continuous synchronization timing, and the reassembled Ethernet data frame retains the original frame structure and byte content of the sending end, enabling the two types of services to be mapped to the corresponding physical interface outputs respectively.

[0079] Specifically, the technical solution of this application further includes mapping the recovered TDM signal and the reassembled Ethernet data frame to the corresponding physical interface outputs to obtain the target delivery hybrid service stream. It should be understood that because the recovered TDM signal has a constant bit rate, synchronous clock, and timeslot structure, while the reassembled Ethernet data frame has a destination address, source address, payload data, and frame check sequence, the two types of services differ in signal timing, frame format, and physical electrical characteristics, and cannot be directly delivered to downstream devices through the same service interface. Therefore, in the technical solution of this application, by mapping the recovered TDM signal and the reassembled Ethernet data frame to the corresponding physical interface outputs to obtain the target delivery hybrid service stream, the adaptation of the two types of recovered services from the internal data format to the external interface format is completed, and the services are delivered to the corresponding service terminals. This maintains the continuous clock and timeslot relationship of the TDM service and the standard frame structure of the Ethernet service, enabling the multi-service access platform to accurately restore and deliver the two types of services through different physical interfaces after completing hybrid transmission on a shared physical channel.

[0080] More specifically, in a specific example of this application, the multi-service access platform is configured with a TDM physical interface and an Ethernet physical interface, wherein the TDM physical interface is an E1 interface and the Ethernet physical interface is a 100Mbps Ethernet interface. First, the interface adapter receives the recovered TDM signal, writes the time slot data into the E1 transmit buffer according to the frame synchronization relationship and time slot arrangement order specified by the E1 interface, and reads the time slot data at a constant bit rate under the drive of the reconstructed synchronization clock. After interface encoding and level conversion, the data is continuously output by the E1 interface, thereby maintaining the clock continuity and time slot position of the recovered TDM signal. Next, the interface adapter receives the reassembled Ethernet data frame, performs frame format checks on the destination address, source address, payload data, and frame check sequence, and writes the reassembled Ethernet data frame that passes the check into the Ethernet transmit buffer in the original byte order. Then, the Ethernet media access controller reads the reassembled Ethernet data frame, adds the preamble and frame start delimitation information required for physical interface transmission, and completes line encoding and signal output through the 100Mbps Ethernet physical interface. Furthermore, the multi-service access platform enables parallel operation of the E1 interface and the 100Mbps Ethernet interface, allowing the recovered TDM signal to be delivered to the TDM terminal via the E1 interface, and the reassembled Ethernet data frames to be delivered to the Ethernet terminal via the 100Mbps Ethernet interface. The two types of services remain independent on the platform's external interface side, jointly forming a target delivery hybrid service flow at the platform's service delivery boundary, thereby completing the closed-loop processing of Ethernet and TDM services from hybrid bearer and reception to the corresponding physical interface output.

[0081] In summary, this solution constructs a hybrid encapsulation mechanism combining Ethernet micro-fragmentation and TDM service proactive preemption at the encapsulation adaptation layer of the multi-service access platform. Ethernet data frames are appropriately segmented and configured with in-band status flags and sliding check information. When a TDM service arrives, the transmission of the current Ethernet micro-fragment is directly suspended, the truncation position is recorded, and a TDM encapsulated frame is inserted preferentially. After transmission is complete, the Ethernet service is resumed from the breakpoint. This avoids frame header blocking caused by long Ethernet frames, reduces queuing latency and clock jitter for TDM services, and avoids encapsulation overhead caused by excessive segmentation. Furthermore, it does not rely on a dedicated physical layer preemption chip. At the receiving end, service flags, truncation offset pointers, and bilateral boundary fingerprints are used for demultiplexing boundary identification and byte-level correction. Combined with clock recovery and sliding check, both types of services are reconstructed, thereby suppressing service crosstalk and fragmentation caused by channel noise or boundary offset, while balancing low latency, high bandwidth utilization, and demultiplexing reliability.

[0082] Furthermore, a hybrid encapsulation system for Ethernet and TDM services in a multi-service access platform is also provided. Figure 6 This is a block diagram of a hybrid encapsulation system for Ethernet and TDM services in a multi-service access platform according to an embodiment of this application. Figure 6As shown, the hybrid encapsulation system 100 for Ethernet and TDM services in a multi-service access platform according to an embodiment of this application includes: an Ethernet micro-fragment generation module 110, used to perform micro-fragment segmentation and in-band labeling on an Ethernet data frame stream based on a preset byte threshold to obtain an Ethernet micro-fragment sequence; a TDM preemptive encapsulation module 120, used to perform pseudo-wire encapsulation on the TDM service stream to generate a TDM encapsulated frame when the TDM service stream reaches the encapsulation adaptation layer, and trigger a high-priority interrupt to suspend the transmission of the Ethernet micro-fragment sequence, and record the physical truncation boundary to generate a truncation offset pointer and mark the suspended remaining micro-fragments as a truncation-state micro-fragment sequence; and a hybrid service interleaving transmission module 130, used to transmit the Ethernet micro-fragment sequence to the TDM service stream. The truncation offset pointer is written to the in-band tail at the breakpoint of the truncated micro-fragment sequence, and the TDM encapsulated frame is preferentially inserted into the physical channel for transmission. After transmission is completed, the subsequent transmission of the truncated micro-fragment sequence is restored to form a physical layer hybrid data stream. The hybrid data demultiplexing module 140 is used to perform boundary identification and demultiplexing separation on the physical layer hybrid data stream at the receiving end to extract the TDM encapsulated frame, the truncated micro-fragment sequence, and the truncation offset pointer. The dual-service recovery and reassembly module 150 is used to perform clock recovery on the TDM encapsulated frame to obtain the recovered TDM signal, and to perform truncation boundary alignment and bidirectional sliding checksum verification on the truncated micro-fragment sequence based on the truncation offset pointer to obtain the reassembled Ethernet data frame.

[0083] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform, characterized in that, include: Step 1: Based on a preset byte threshold, perform micro-fragmentation and in-band annotation on the Ethernet data frame stream to obtain an Ethernet micro-fragment sequence; Step 2: When the TDM service flow reaches the encapsulation adaptation layer, pseudowire encapsulation is performed on the TDM service flow to generate TDM encapsulation frames, and a high-priority interrupt is triggered to suspend the transmission of the Ethernet micro-fragment sequence. The physical truncation boundary is recorded to generate a truncation offset pointer, and the remaining suspended micro-fragments are marked as truncation-state micro-fragment sequences. Step 3: Write the truncation offset pointer to the in-band tail label at the breakpoint of the truncated micro-fragment sequence, and insert the TDM encapsulated frame into the physical channel for transmission first. After transmission is completed, resume the subsequent transmission of the truncated micro-fragment sequence to form a physical layer hybrid data stream. Step 4: At the receiving end, perform boundary identification and demultiplexing separation on the physical layer hybrid data stream to extract the TDM encapsulated frame, truncated micro-fragment sequence, and truncated offset pointer; Step 5: Clock recovery is performed on the TDM encapsulated frame to obtain the recovered TDM signal, and the truncated state micro-fragment sequence is aligned with the truncated boundary and verified by bidirectional sliding checksum based on the truncated offset pointer to obtain the reassembled Ethernet data frame.

2. The hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to claim 1, characterized in that, Ethernet data frame streams contain destination address, source address, payload data, and frame check sequence; TDM service streams contain timeslot data and synchronization clock.

3. The hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to claim 2, characterized in that, Step one includes: Based on a preset byte threshold, the frame length of the Ethernet data frame stream is measured and the number of slices is calculated to obtain equal-length slice boundary information and Ethernet frame byte stream. Based on equal-length slice boundary information, the Ethernet frame byte stream is truncated block by block and in-band status flags are inserted to obtain primary labeled segment groups. A bidirectional sliding checksum calculation is performed on the initial labeled fragment group and appended to the end of each fragment to obtain the Ethernet micro-fragment sequence.

4. The hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to claim 1, characterized in that, Step two includes: Based on pre-configured packetization period parameters, time slot stripping and pseudo-line control word encapsulation are performed on the TDM service flow to obtain TDM encapsulated frames and generate preemption interrupt signals. In response to the preemption interrupt signal, the Ethernet micro-segment sequence is unconditionally frozen and suspended, and the physical truncation boundary is calculated to obtain the suspended Ethernet sequence and the truncation offset pointer. The suspended Ethernet sequence is truncated and re-marked to obtain a truncated micro-fragment sequence.

5. The hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to claim 1, characterized in that, Step three includes: Based on the offset value of the truncated offset pointer, the in-band tail index at the breakpoint of the truncated micro-segment sequence is overwritten and fixed to obtain the pointer-trunculated Ethernet sequence. By utilizing the physical channel gap caused by the interrupt, the TDM encapsulated frame is serialized and sent first, followed by the transmission of the Ethernet sequence with pointer truncated state to obtain the time-domain interleaved and reassembled data stream. The time-domain interleaved and reassembled data stream is framed and serialized for transmission to obtain a physical layer hybrid data stream.

6. The hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to claim 1, characterized in that, Step four includes: Frame delimiting and restoration are performed on the physical layer hybrid data stream to obtain the delimited original byte stream; Based on priority flag matching, high-priority services are stripped from the delimited raw byte stream to obtain TDM encapsulated frames and the remaining mixed fragment stream with pointers; The remaining pointer-bearing mixed fragment stream is subjected to truncation feature separation to obtain the truncation state micro-fragment sequence and truncation offset pointer.

7. The hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to claim 1, characterized in that, Step five includes: The TDM encapsulated frame is pseudo-line decapsulated and reconstructed by constant bit rate clock through digital phase-locked loop and jitter buffer to obtain the recovered TDM signal; Fragment reassembly and overhead stripping are performed on truncated micro-fragment sequences to obtain reassembled Ethernet data frames.

8. The hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to claim 1, characterized in that, Also includes: The recovered TDM signal and the reassembled Ethernet data frame are mapped to the corresponding physical interface outputs to obtain the target delivery hybrid service flow.

9. The hybrid encapsulation method for Ethernet and TDM services in a multi-service access platform according to claim 6, characterized in that, Based on priority flag matching, high-priority services are stripped from the delimited raw byte stream to obtain TDM encapsulated frames and the remaining pointer-margined mixed fragment stream, including: Preliminary separation and simultaneous acquisition of bilateral fingerprints are performed on the delimited raw byte stream to obtain preliminary extracted TDM encapsulated frames, preliminary residual fragment streams, and boundary fingerprint pairs; The boundary fingerprint pairs are subjected to joint decision-making on cross-service flow mutual integrity constraints and offset direction inference to obtain the boundary offset correction amount. Adaptive byte-level backoff or expansion correction is performed on the extraction boundaries of the initially extracted TDM encapsulated frame and the initial remaining fragment stream to obtain the TDM encapsulated frame and the remaining pointer-based mixed fragment stream.

10. A hybrid encapsulation system for Ethernet and TDM services in a multi-service access platform, characterized in that, include: The Ethernet micro-fragment generation module is used to perform micro-fragmentation and in-band annotation on the Ethernet data frame stream based on a preset byte threshold to obtain an Ethernet micro-fragment sequence. The TDM preemptive encapsulation module is used to perform pseudo-wire encapsulation on the TDM service flow when it arrives at the encapsulation adaptation layer to generate a TDM encapsulation frame, trigger a high-priority interrupt to suspend the transmission of the Ethernet micro-fragment sequence, record the physical truncation boundary to generate a truncation offset pointer, and mark the suspended remaining micro-fragments as truncation state micro-fragment sequences. The mixed service interleaving transmission module is used to write the truncation offset pointer to the in-band tail label at the breakpoint of the truncation state micro-fragment sequence and to insert the TDM encapsulated frame into the physical channel for transmission first. After the transmission is completed, the subsequent transmission of the truncation state micro-fragment sequence is resumed to form a physical layer mixed data stream. The hybrid data demultiplexing module is used at the receiving end to perform boundary identification and demultiplexing separation on the physical layer hybrid data stream to extract TDM encapsulated frames, truncated micro-fragment sequences, and truncated offset pointers; The dual-service recovery and reassembly module is used to restore the clock of TDM encapsulated frames to obtain the restored TDM signal, and to perform truncation boundary alignment and bidirectional sliding checksum verification on the truncated micro-segment sequence based on the truncation offset pointer to obtain the reassembled Ethernet data frame.