Multi-port data stream migration method and apparatus, electronic device, storage medium, and computer program product
Patent Information
- Application Number
- CN202611096169.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-08-18
AI Technical Summary
然而,当某个逻辑端口出现异常(如误码率升高、重传失败等)时,只能在该逻辑端口内反复重传,直至该逻辑端口完全失效后才进行切换
本申请首先通过将发送端的多个物理层通道划分为多个逻辑端口,每个逻辑端口包含一组物理层通道,并构建了所述物理层通道与所述逻辑端口之间的映射关系,实现了物理层通道的灵活分组与逻辑隔离;在此基础上,将待发送的数据流映射至一个逻辑端口,并通过该逻辑端口发送,从而建立了数据流与逻辑端口的初始关联;随后,持续监测每个逻辑端口的端口状态信息,当根据所述端口状态信息检测到某一逻辑端口出现异常时,主动从其余逻辑端口中选择一个目标逻辑端口,并将异常逻辑端口上属于数据流的未确认数据包迁移至目标逻辑端口继续发送,从而避免了在原逻辑端口内反复重传导致的带宽浪费和队列堆积,有效降低了尾延迟;其次,由于异常检测基于端口状态信息,能够在端口尚未完全失效但已出现性能劣化状态时及时触发迁移,解决了现有技术中需等到端口完全失效后才切换、恢复时机过晚的问题;最后,通过动态迁移数据流至目标逻辑端口,消除了固定逻辑端口映射造成的队头阻塞,使得其他端口的空闲带宽能够被及时利用,提高局部通道造成逻辑端口异常情况下的系统可用性,降低尾延迟和队头阻塞,提升总体带宽利用率。
Smart Images

Figure CN122593716A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a multi-port data stream migration method, apparatus, electronic device, storage medium, and computer program product. Background Technology
[0002] In the high-speed I / O (input / output) interface subsystem of AI training chips, existing technologies typically map the data stream to a fixed logical port for transmission. However, when a logical port malfunctions (such as an increased bit error rate or retransmission failure), retransmissions can only be repeated within that logical port until it completely fails before switching occurs. This leads to wasted bandwidth, increased tail latency, and an inability to utilize other idle logical port resources in a timely manner, causing head-of-line congestion. Summary of the Invention
[0003] The technical problem solved by this application is to provide a multi-port data stream migration method, device, electronic device, storage medium and computer program product, which can actively migrate unacknowledged data packets to a target logical port in normal condition when a logical port is abnormal, avoid bandwidth waste and tail delay caused by repeated retransmissions in the original logical port, respond in advance to the state of port performance degradation but not complete failure, and eliminate head-of-line blocking caused by fixed logical port mapping.
[0004] According to a first aspect of the embodiments of this application, a multi-port data stream migration method is provided, applied at a sending end, including: The multiple physical layer channels of the transmitting end are divided into multiple logical ports, each logical port contains a set of physical layer channels, and a mapping relationship between the physical layer channels and the logical ports is constructed. The data stream to be sent is mapped to a logical port and sent through that logical port; The port status information of each logical port is continuously monitored; when an anomaly is detected in a logical port based on the port status information, it is determined as an abnormal logical port and a target logical port is selected from the remaining logical ports. Unacknowledged data packets belonging to the data stream on the abnormal logical port are migrated to the target logical port and continue to be sent on the target logical port.
[0005] Compared with the prior art, the beneficial effects of this application are as follows: This application first divides multiple physical layer channels at the transmitting end into multiple logical ports, each logical port containing a group of physical layer channels, and establishes a mapping relationship between the physical layer channels and the logical ports, realizing flexible grouping and logical isolation of physical layer channels. Based on this, the data stream to be sent is mapped to a logical port and sent through that logical port, thus establishing an initial association between the data stream and the logical port. Subsequently, the port status information of each logical port is continuously monitored. When an anomaly is detected in a logical port based on the port status information, a target logical port is actively selected from the remaining logical ports, and the unacknowledged data packets belonging to the data stream on the abnormal logical port are... Migrating to the target logical port for continued transmission avoids bandwidth waste and queue congestion caused by repeated retransmissions within the original logical port, effectively reducing tail latency. Secondly, since anomaly detection is based on port status information, migration can be triggered in a timely manner when the port has not completely failed but has already experienced performance degradation, solving the problem of waiting until the port is completely failed before switching and the recovery timing being too late in the existing technology. Finally, by dynamically migrating the data stream to the target logical port, head-of-line blocking caused by fixed logical port mapping is eliminated, allowing the idle bandwidth of other ports to be utilized in a timely manner, improving system availability in the event of logical port anomalies caused by local channels, reducing tail latency and head-of-line blocking, and improving overall bandwidth utilization.
[0006] In some embodiments, selecting a target logical port from the remaining logical ports includes: Obtain the port status information of each of the remaining logical ports, including health score, load, retransmission rate and average latency; The target logical port is selected according to the comprehensive scoring formula, which is: Score = a × Health - b × Load - c × RetryRate - d × Latency, where Health represents the health score, Load represents the load, RetryRate represents the retransmission rate, Latency represents the average latency, a, b, c and d are configurable weights, and score represents the comprehensive score.
[0007] In some embodiments, selecting the target logical port according to the comprehensive scoring formula includes: The logic port with the highest overall score and a health score not lower than a preset threshold is selected as the target logic port.
[0008] In some embodiments, when the port status information determines that any of the following conditions are met, it is determined that the logical port is abnormal: For the same data packet, the number of consecutive retransmission failures shall not be less than the first threshold. For the same data stream, the cumulative number of retransmission failures within a preset time window shall not be less than the second threshold. The bit error rate of the logical port shall not be lower than the third threshold; The health score of the logical port is not higher than the fourth threshold; The acknowledgment timeout rate of logical ports shall not be lower than the fifth threshold. The retransmission success rate of the logical port is not higher than the sixth threshold.
[0009] In some embodiments, migrating unacknowledged data packets belonging to the data stream on the abnormal logical port to the target logical port includes: The abnormal logical port is marked as restricted and its ability to carry new data packets is restricted. Read the unacknowledged data packets belonging to the data stream on the abnormal logical port from the sender's send buffer, and add the unacknowledged data packets to the send queue of the target logical port; Update the current logical port of the data stream in the data stream mapping table of the sending end to the target logical port.
[0010] In some embodiments, it also includes: Continuously monitor the port status information of the abnormal logical port, including health score, bit error rate, and retransmission success rate; When the bit error rate of the abnormal logical port is not higher than the first recovery threshold, the retransmission success rate is not lower than the second recovery threshold, and the health score is not lower than the third recovery threshold, and the bit error rate, the retransmission success rate, and the health score remain stable within multiple consecutive detection cycles, the state of the abnormal logical port is restored to usability so as to re-carry the data stream. Wherein, the third recovery threshold is higher than the health score threshold used to trigger the anomaly, the first recovery threshold is lower than the bit error rate threshold used to trigger the anomaly, and the second recovery threshold is higher than the retransmission success rate threshold used to trigger the anomaly.
[0011] According to a second aspect of the embodiments of this application, a multi-port data stream migration method is provided, applied at a receiving end, the method comprising: Receive data packets sent by the sending end; The sending end is configured to: divide multiple physical layer channels into multiple logical ports, each logical port containing a set of physical layer channels, and establish a mapping relationship between the physical layer channels and the logical ports; map the data stream to be sent to a logical port and send it through the logical port; continuously monitor the port status information of each logical port; when an anomaly is detected in a logical port based on the port status information, determine it as an abnormal logical port and select a target logical port from the remaining logical ports, migrate the unacknowledged data packets belonging to the data stream on the abnormal logical port to the target logical port, and continue sending on the target logical port.
[0012] Compared with the prior art, the beneficial effects of this application are as follows: This application describes a receiving end receiving data packets sent by a sending end. The sending end divides multiple physical layer channels into multiple logical ports, establishes a mapping relationship, maps data streams to a single logical port for transmission, and continuously monitors the port status information of each logical port. When an anomaly is detected in a logical port, the sending end selects a target logical port from the remaining logical ports and migrates unacknowledged data packets belonging to the data stream on the abnormal logical port to the target logical port for continued transmission. By receiving data packets from different ports, and in conjunction with the sending end's active migration mechanism, the receiving end achieves the following improvements: First, it avoids bandwidth waste and queue accumulation caused by repeated retransmissions within the original logical port, as unacknowledged data packets are migrated to ports with normal status, eliminating the need for repeated retransmissions on the original port; second, it proactively addresses the problem of delayed recovery caused by switching only after a logical port has completely failed, as the sending end triggers migration when the port experiences performance degradation, allowing the receiving end to receive the migrated data packets promptly; finally, it eliminates head-of-queue congestion caused by fixed logical port mapping, as the data stream is dynamically migrated to the target logical port, allowing the receiving end to receive data from multiple ports, thereby effectively utilizing idle bandwidth. Its technical effects include: improving system availability when logical ports malfunction due to local channels, reducing tail latency and head-of-line congestion, and improving overall bandwidth utilization.
[0013] In some embodiments, the data packet carries a flow identifier and a sequence number; the method further includes: The received data packets are deduplicated and reordered according to the flow identifier and the sequence number, and then delivered to the upper layer in sequence.
[0014] In some embodiments, the step of deduplicating and reordering the received data packets according to the flow identifier and the sequence number includes: The received data packet is determined to be a duplicate packet based on the flow identifier and the sequence number. If it is a duplicate packet, it is discarded. If the sequence number of a data packet is greater than the current expected sequence number, it is temporarily stored in the reordering cache; Once all missing sequence numbers are filled in, the data packets are delivered to the upper layer in the order of the sequence numbers.
[0015] In some embodiments, the step of deduplicating and reordering the received data packets according to the flow identifier and the sequence number further includes: Maintain the expected sequence number window to handle cross-arrival packets from the source logical port and the destination logical port; When a data packet sent by the original logical port arrives late during a port switch, and a data packet retransmitted by the target logical port arrives first, the duplicate packet is discarded based on the sequence number, out-of-order packets are buffered, and the packets are delivered to the upper layer in sequence number order after the consecutive sequence number data is complete.
[0016] In some embodiments, it also includes: For data streams with sequential dependencies, deliver them in sequence number order; For data streams that allow out-of-order delivery, deliver them directly in the order of arrival.
[0017] According to a third aspect of the embodiments of this application, a multi-port data stream migration apparatus is provided, applied at a sending end, the apparatus comprising: The logical port partitioning module is used to divide multiple physical layer channels of the transmitting end into multiple logical ports. Each logical port contains a set of physical layer channels, and constructs a mapping relationship between the physical layer channels and the logical ports. The data stream mapping module is used to map the data stream to be sent to a logical port and send it through that logical port. The port status monitoring and migration module is used to continuously monitor the port status information of each logical port. When an abnormality is detected in a logical port based on the port status information, it is determined as an abnormal logical port and a target logical port is selected from the remaining logical ports. Unacknowledged data packets belonging to the data flow on the abnormal logical port are migrated to the target logical port and continue to be sent on the target logical port.
[0018] According to a fourth aspect of the embodiments of this application, a multi-port data stream migration apparatus is provided, applied at a receiving end, the apparatus comprising: The receiving module is used to receive data packets sent by the sending end; The sending end is configured to: divide multiple physical layer channels into multiple logical ports, each logical port containing a set of physical layer channels, and establish a mapping relationship between the physical layer channels and the logical ports; map the data stream to be sent to a logical port and send it through the logical port; continuously monitor the port status information of each logical port; when an anomaly is detected in a logical port based on the port status information, determine it as an abnormal logical port and select a target logical port from the remaining logical ports, migrate the unacknowledged data packets belonging to the data stream on the abnormal logical port to the target logical port, and continue sending on the target logical port.
[0019] According to a fifth aspect of the embodiments of this application, an electronic device is provided, characterized in that it includes a memory and a processor, the memory being used to store a computer program executable by the processor; the processor being used to execute the computer program in the memory to implement a multi-port data stream migration method as described in any one of the first or second aspects.
[0020] According to a sixth aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the executable computer program in the storage medium is executed by a processor, it is capable of implementing the multi-port data stream migration method as described in any one of the first or second aspects.
[0021] According to a seventh aspect of the present application, a computer program product is provided, including a storage medium and a computer program stored in the storage medium, wherein the computer program, when executed by a processor, implements the multi-port data stream migration method as described in any one of the first or second aspects. Attached Figure Description
[0022] Figure 1 This is a flowchart illustrating a multi-port data stream migration method according to an exemplary embodiment; Figure 2 This is a flowchart illustrating a multi-port data stream migration method according to another exemplary embodiment; Figure 3 This is a schematic diagram illustrating a logical port partitioning architecture according to an exemplary embodiment; Figure 4 This is a schematic diagram illustrating a multi-port dynamic retransmission and migration process according to an exemplary embodiment; Figure 5 This is a flowchart illustrating multi-port dynamic retransmission and seamless switching according to an exemplary embodiment; Figure 6 This is a flowchart illustrating a port switching and data flow migration scenario according to an exemplary embodiment; Figure 7This is a block diagram illustrating a multi-port data stream migration apparatus according to an exemplary embodiment.
[0023] Figure 8 This is a block diagram illustrating a multi-port data stream migration apparatus according to another exemplary embodiment.
[0024] Figure 9 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0025] Unless otherwise defined, the technical or scientific terms used in this specification and claims shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. Specific embodiments of this application will be described below in conjunction with the accompanying drawings. It should be noted that, in order to provide a concise description, this specification cannot exhaustively describe all features of the actual embodiments. Without departing from the spirit and scope of this application, those skilled in the art can modify and substitute the embodiments of this application, and the resulting embodiments are also within the protection scope of this application.
[0026] In existing high-speed I / O interface subsystems for AI training chips, different data streams are fixedly mapped to their respective logical ports for parallel transmission. When a logical port malfunctions, existing solutions mainly rely on the physical layer or link layer to repeatedly perform retransmissions within that port (e.g., cyclic redundancy check, acknowledgment or negative acknowledgment feedback, timeout retransmission, etc.) until the retransmission is successful or the logical port is determined to be completely failed (e.g., the link is disconnected) before port-level switching is performed.
[0027] Based on this, this application provides a multi-port data stream migration method, apparatus, electronic device, storage medium, and computer program product. The method continuously monitors the port status information of each logical port; when an anomaly is detected in a logical port, a target logical port is selected from the remaining logical ports, and unacknowledged data packets belonging to the data stream on the abnormal logical port are migrated to the target logical port for continued transmission.
[0028] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0029] This application is applicable not only to high-speed interconnects between AI training chips, but also to GPUs (Graphics Processing Units), NPUs (Neural Processing Units), DPUs (Data Processing Units), switching chips, Network on Chip (NoC), board-level high-speed interconnects, in-package interconnects, optoelectronic hybrid interconnects, and other multi-physical-layer channel high-speed interface systems.
[0030] This application can be implemented using a hardware state machine, or it can be implemented collaboratively by firmware, drivers, runtime libraries, or application-layer communication libraries. For example, the hardware is responsible for collecting ACK (acknowledgment) / NACK (negative acknowledgment), error and retransmission statuses, the firmware is responsible for calculating health scores, the driver is responsible for configuring thresholds and reading statuses, and the application-layer communication library is responsible for adjusting the data flow mapping according to the FlowMap.
[0031] This application can be deployed in the IO controller, inter-chip interconnect controller, DMA (direct memory access) / transfer engine, communication acceleration unit, or application layer collaborative scheduling module within the AI training chip.
[0032] Please refer to Figure 1 , Figure 1 This is a multi-port data stream migration illustrated according to an exemplary embodiment. The flowchart of the method. This application's multi-port data stream migration method, applied to the sending end, includes the following steps S101~S103: S101 divides the multiple physical layer channels of the transmitting end into multiple logical ports. Each logical port contains a set of physical layer channels, and establishes a mapping relationship between physical layer channels and logical ports.
[0033] Understandably, in the I / O interface subsystem of the AI training chip, this application can divide multiple physical layer channels into multiple logical ports with a certain granularity through a channel partitioning module, and establish a mapping relationship between each channel and its corresponding logical port. For example, an AI training chip's I / O interface subsystem has a total of 128 physical layer channels (numbered L0 to L127). The system divides these channels into 8 logical ports with a granularity of 16 channels each, and each logical port contains 16 consecutive channels. The specific division is as follows: Logical port P0: includes L0 to L15; Logical port P1: includes L16 to L31; Logical port P2: includes L32 to L47; Logical port P3: includes L48 to L63; Logical port P4: includes L64 to L79; Logical port P5: includes L80 to L95; Logical port P6: includes L96 to L111; Logical port P7: includes L112 to L127. Thus, each logical port is equivalent to an independent transmission channel, with its own transmit queue, retransmission queue, and health statistics. This mapping relationship can be a fixed configuration or adjusted based on the channel health status during chip startup, link training, or operation. Its function is to provide a structural foundation for subsequent data stream allocation, port status monitoring, anomaly detection, and cross-port data stream migration. Each logical port, as an independent transmission unit, has its own sending queue, retransmission queue, and health statistics information. This enables the system to perform fault isolation, load balancing, and dynamic migration at the logical port level, avoiding the paralysis of the entire IO interface due to local channel anomalies. At the same time, it facilitates seamless and reliable transmission to upper layers (such as training frameworks, communication libraries, or business software).
[0034] S102, map the data stream to be sent to a logical port, and send it through the logical port.
[0035] Understandably, after the system completes the partitioning of channels and logical ports, the data flow management module can assign flow IDs, packet sequence numbers, priorities, current logical ports, and transmission statuses to data flows. A data flow can be a gradient synchronization flow, parameter update flow, activation data flow, control message flow, or other inter-chip communication flow. The application layer or communication library delivers the data flow to be sent (such as gradient synchronization flow, parameter update flow, control message flow, etc.) to the IO interface subsystem. The system can allocate an initial logical port (such as one of P0 to P7) for the data flow based on load balancing strategies, flow priorities, or hash strategies, and send all data packets of the data flow through the channel group corresponding to that logical port. Its function is to establish a mapping relationship between data flows and logical ports for subsequent normal transmission, enabling the system to perform port status monitoring, retransmission management, and subsequent possible cross-port migration based on this mapping relationship. At the same time, through reasonable initial mapping, load balancing is achieved among ports to avoid single-port overload, laying the foundation for efficient parallel transmission of the entire IO interface subsystem.
[0036] S103, continuously monitor the port status information of each logical port; when an abnormality is detected in a logical port based on the port status information, determine it as an abnormal logical port and select a target logical port from the remaining logical ports, migrate the unacknowledged data packets belonging to the data stream on the abnormal logical port to the target logical port, and continue to send them on the target logical port.
[0037] Understandably, the system can continuously collect status information such as load, queue depth, ACK / NACK ratio, retransmission count, and bit error rate for each logical port through the port status monitoring module. The anomaly judgment module then determines whether a port has entered an abnormal state (e.g., the number of consecutive retransmission failures exceeds a preset threshold, or the health score is lower than a preset threshold) based on preset thresholds or health scores. The port health assessment module calculates the port health score based on parameters such as the bit error rate of the port's internal channel, FEC (Forward Error Correction) strength, CRC (Cyclic Redundancy Check) failure count, link training status, consecutive retransmission failure count, and historical transmission success rate. Once an anomaly is detected in a logical port (e.g., P2), the target port selection module selects the optimal target logical port (e.g., P5) from other healthy and lightly loaded candidate ports. Subsequently, the data flow switching module retrieves unacknowledged data packets that have not yet received ACKs from the sending buffer on the abnormal port and reschedules them to the sending queue of the target logical port for transmission. Its function is to proactively migrate the affected data stream to a more reliable logical port when the logical port has not completely failed but multiple retransmission failures or link quality degradation have occurred. This avoids bandwidth waste and increased tail latency caused by repeated retransmissions within the original logical port. At the same time, the deduplication and reordering mechanism at the receiving end ensures that the data is not lost, not duplicated, and delivered in order, achieving reliable transmission that is imperceptible to the upper-layer training framework.
[0038] It should be noted that this application focuses on port-level improvements within a single physical path between chips (i.e., a high-speed interconnect link consisting of multiple channels), rather than load balancing or routing switching across multiple independent paths. For example, the physical path might be a direct connection between chip A and chip B via a parallel high-speed interconnect link consisting of 128 channels. Within this physical path, the system divides the 128 channels into 8 logical ports (i.e., 16 channels per port), with each logical port being a subset of the path. When a logical port on the path (e.g., P2) experiences a retransmission failure due to some channels malfunctioning, the system migrates the affected data stream to other logical ports on the same path (e.g., P5), rather than switching to another independent physical path or network node. Therefore, this application addresses port-level dynamic retransmission and migration within a single path, improving the allocation and dynamic scheduling of logical ports within a single chip-to-chip interconnect link, rather than load balancing or routing switching across multiple independent paths.
[0039] In summary, in steps S101 to S103 above: First, S101 divides a large number of physical layer channels into multiple logical ports, providing a structural foundation for fault isolation and dynamic migration, and preventing the entire input / output interface from being paralyzed due to local channel anomalies; second, S102 evenly maps the data stream to the initial logical ports to achieve parallel transmission; finally, S103 continuously monitors the status of the logical ports, and when a logical port experiences multiple retransmission failures, increased bit error rate, or other performance degradation, it proactively migrates unacknowledged data packets to other logical ports that are in normal condition and have a lighter load, rather than repeatedly retransmitting within the original logical port or waiting for the port to completely fail before switching, thereby avoiding bandwidth waste, tail latency, and head-of-line blocking. Simultaneously, the migration process is transparent to the upper-layer training framework, requiring no re-establishment of links or data submission. Its technical effect is that when the transmission quality has degraded before the logical port has completely failed, the system can proactively complete the cross-port migration in advance. This avoids the training iteration delay caused by invalid retransmission within the original logical port and prevents the training interruption after the logical port has completely failed. Thus, it achieves high availability and continuous transmission capability of the overall input and output subsystem in the case of local channel anomalies, and significantly improves the stability and efficiency of large-scale distributed training.
[0040] In some embodiments, selecting a target logical port from the remaining logical ports includes: Obtain the port status information of each remaining logical port, including health score, load, retransmission rate, and average latency; select the target logical port according to the comprehensive scoring formula, which is: Score = a × Health - b × Load - c × RetryRate - d × Latency, where Health represents the health score, Load represents the load, RetryRate represents the retransmission rate, Latency represents the average latency, a, b, c, and d are configurable weights, and score represents the comprehensive score.
[0041] For example, selecting the target logical port according to the comprehensive scoring formula includes: selecting the logical port with the highest comprehensive score and the health score not lower than a preset threshold as the target logical port.
[0042] Understandably, after detecting an anomaly in a logical port, the system acquires port status information from other candidate logical ports, including health score, load, retry rate, and average latency. It then calculates a score for each candidate port using the weighted comprehensive scoring formula: Score = a × Health - b × Load - c × Retry Rate - d × Latency, where a, b, c, and d are configurable weights. Finally, the logical port with the highest comprehensive score and a health score not lower than a preset threshold is selected as the target logical port for migration. This preset threshold is used in the target logical port selection phase and serves as an admission condition for choosing the migration target. In other words, a candidate port must meet the requirement of a health score not lower than this threshold to be selected as a target logical port, ensuring that the migrated port is sufficiently healthy and stable.
[0043] The Health score is a quantitative score calculated by the port health assessment module based on multiple preset parameters (such as bit error rate, retransmission success rate, CRC error count, link training status, and historical transmission success rate). This score measures the overall health of the port and reflects the overall link quality. A higher score indicates a healthier port and more reliable transmission, thus it is a positive addition in the formula (coefficient 'a' is positive). Load refers to the current service pressure on the logical port, which can be measured by indicators such as port queue depth, bandwidth utilization, number of allocated data streams, or the amount of data to be sent per unit time. A higher load indicates a busier port and less remaining available bandwidth, therefore it is a deduction in the formula (coefficient 'b' is positive) to avoid migrating data streams to already congested ports. The Retransmission Rate refers to the frequency or proportion of retransmissions on the logical port, which can be calculated as "number of retransmissions / total number of transmissions" or "number of retransmissions per unit time." This metric reflects the stability of the port link quality. A higher retransmission rate indicates poorer port transmission quality, so it is a deduction term in the formula (coefficient c is positive) to reduce the score of ports with high retransmission rates. Average latency refers to the average round-trip time of a data packet from transmission to receipt of an ACK on a logical port, including transmission latency, processing latency, and queuing latency. A higher average latency indicates a slower port response, affecting the efficiency of training iterations. Therefore, it is a deduction term in the formula (coefficient d is positive), prioritizing logical ports with lower latency. Its purpose is to avoid simply migrating data streams to fixed or overloaded logical ports. Instead, through multi-dimensional quantitative evaluation, it ensures that the target logical port has both good link health and low load and retransmission rate, thus enabling stable and efficient data flow after migration. This prevents secondary migration or performance degradation due to improper target logical port selection, achieving load balancing and fault isolation.
[0044] It should be noted that the purpose of the weighted comprehensive scoring formula adopted in this application is to comprehensively evaluate multiple dimensions such as port health score, load, retransmission rate, and average latency by introducing configurable weights. This avoids suboptimal choices that may result from simply relying on a single indicator (such as lowest load or a fixed logical port), such as migrating data streams to logical ports with low load but poor health scores or high retransmission rates. This multi-dimensional quantitative decision-making approach can accurately select target logical ports that have both good link quality and sufficient remaining bandwidth, thereby achieving a balance between load balancing and fault isolation during cross-port migration, significantly improving system reliability and bandwidth utilization in sub-health scenarios.
[0045] In some embodiments, a logical port is determined to be abnormal when any of the following conditions are met based on the port status information: for the same data packet, the number of consecutive retransmission failures is not less than a first threshold; for the same data stream, the cumulative number of retransmission failures within a preset time window is not less than a second threshold; the bit error rate of the logical port is not less than a third threshold; the health score of the logical port is not higher than a fourth threshold; the acknowledgment timeout ratio of the logical port is not less than a fifth threshold; and the retransmission success rate of the logical port is not higher than a sixth threshold.
[0046] Understandably, the anomaly detection module uses multiple triggering conditions to determine whether a logical port is abnormal. These conditions correspond to the following thresholds: "First Threshold" (number of consecutive retransmission failures), "Second Threshold" (cumulative number of retransmission failures within a time window), "Third Threshold" (bit error rate), "Fourth Threshold" (health score), "Fifth Threshold" (acknowledgment timeout rate), and "Sixth Threshold" (retransmission success rate). These thresholds are used to determine whether a port has entered an abnormal state. The fourth threshold, used in the anomaly detection phase, is the exit condition for determining whether the current port should trigger migration. Specifically, if the port's health score is not higher than this fourth threshold, the port is determined to be abnormal, and the migration process is initiated.
[0047] The consecutive retransmission failure count refers to the number of times the sender repeatedly retransmits the same data packet after receiving a NACK or timeout, but never receives an ACK. The cumulative retransmission failure count within a preset time window refers to the total number of retransmission failures for all data packets on the logical port containing the same data stream within a set time window. The bit error rate (BER) is the probability of bit errors occurring in all channels within a logical port per unit time, which can be calculated using the number of CRC check failures or the strength of FEC error correction. The health score is a quantitative score calculated by the port health assessment module based on multiple preset parameters (such as BER, retransmission success rate, CRC error count, link training status, historical transmission success rate, etc.). This score measures the overall health of the port; a lower score indicates the port is closer to an abnormal state. The acknowledgment timeout ratio refers to the proportion of times the sender fails to receive an ACK within a preset timeout period after sending a data packet, out of the total number of transmissions. It reflects port response delay or packet loss; an increased timeout ratio indicates potential link congestion, packet loss, or receiver processing delay. The retransmission success rate refers to the proportion of successful ACKs received out of all retransmission operations on a logical port. This metric is positive; a lower retransmission success rate indicates poorer port link quality and worse retransmission performance. Its function is to enable the system to flexibly and accurately identify ports in a "sub-healthy" state (i.e., not completely failed but with significantly degraded transmission quality) through multi-dimensional and multi-granular anomaly detection conditions, avoiding missed or false alarms that might occur when relying on a single metric. For example, for frequent NACKs caused by intermittent bit errors, migration can be triggered in advance by the bit error rate or acknowledgment timeout ratio; for sudden retransmission failures, a rapid response can be achieved by checking the number of consecutive retransmission failures. These conditions can be configured by chip registers, firmware, or drivers, allowing the system to proactively initiate cross-port migration before the fault escalates, thereby effectively reducing invalid retransmissions, lowering tail latency, and improving the overall reliability and bandwidth utilization of the I / O subsystem.
[0048] It should be noted that the "retransmission success rate" here differs from the "retransmission rate" in the comprehensive scoring formula mentioned above. The retransmission success rate is a positive indicator, representing the proportion of logical ports that successfully receive ACKs during retransmission operations. It is calculated as: number of successful retransmissions / total number of retransmissions. The higher this indicator, the better the port link quality. When this indicator falls below the sixth threshold, it indicates poor port retransmission performance, triggering migration. The retransmission rate, on the other hand, is a negative indicator, representing the frequency or proportion of retransmissions occurring on a logical port. It is calculated as: number of retransmissions / total number of transmissions or number of retransmissions per unit time. The higher this indicator, the worse the port link quality. Therefore, it is a deduction term in the scoring formula (coefficient c is positive) to reduce the score of ports with high retransmission rates.
[0049] In some embodiments, migrating unacknowledged data packets belonging to the data stream on the abnormal logical port to the target logical port includes: marking the abnormal logical port as a restricted state and restricting it from carrying new data packets; reading the unacknowledged data packets belonging to the data stream on the abnormal logical port from the sender's send buffer and adding the unacknowledged data packets to the send queue of the target logical port; and updating the current logical port of the data stream in the sender's data stream mapping table to the target logical port.
[0050] Understandably, in step S103 above, the specific execution steps of data flow migration include: first, marking the abnormal logical port as restricted, i.e., pausing or restricting the abnormal logical port from carrying new data packets to prevent new data from continuing to enter the abnormal logical port; then, reading the unacknowledged data packets (i.e., data packets that have not yet received ACK) belonging to the affected data flow on the abnormal logical port from the sender's send buffer, and re-adding these data packets to the send queue of the target logical port for retransmission; finally, updating the current logical port field of the data flow in the sender's data flow mapping table to the target logical port, so that subsequent new data packets can be sent directly through the target port. Its function is to ensure that data is not lost or duplicated during the migration process by restricting the abnormal port from receiving new flows, accurately retrieving unacknowledged data packets and rescheduling them to the target logical port, while updating the mapping table to ensure seamless switching of subsequent transmissions, thus remaining transparent to the upper-layer training framework and achieving a seamless switching.
[0051] In some embodiments, the method further includes: continuously monitoring the port status information of the abnormal logical port, the port status information including a health score, bit error rate, and retransmission success rate; when the bit error rate of the abnormal logical port is not higher than a first recovery threshold, the retransmission success rate is not lower than a second recovery threshold, and the health score is not lower than a third recovery threshold, and the bit error rate, the retransmission success rate, and the health score remain stable over multiple consecutive detection cycles, the state of the abnormal logical port is restored to usability to re-carry the data stream; wherein, the third recovery threshold is higher than the health score threshold used to trigger the abnormality, the first recovery threshold is lower than the bit error rate threshold used to trigger the abnormality, and the second recovery threshold is higher than the retransmission success rate threshold used to trigger the abnormality.
[0052] Understandably, the specific conditions for an abnormal logical port to recover to an available state are as follows: when the bit error rate of the abnormal logical port is not higher than the first recovery threshold, the retransmission success rate is not lower than the second recovery threshold, and the health score is not lower than the third recovery threshold, and these three indicators remain stable over multiple consecutive detection cycles, the system restores the port to an available state, allowing it to resume carrying data streams. The hysteresis mechanism refers to a strict relationship between the recovery threshold and the threshold that triggered the abnormality. Specifically, the third recovery threshold is higher than the health score threshold that triggered the abnormality (i.e., the fourth threshold mentioned above), the first recovery threshold is lower than the bit error rate threshold that triggered the abnormality (i.e., the third threshold mentioned above), and the second recovery threshold is higher than the retransmission success rate threshold that triggered the abnormality (i.e., the sixth threshold mentioned above). This setting requires a logical port to meet stricter conditions than those that triggered the abnormality to recover to an available state, thereby avoiding frequent oscillations between healthy and abnormal states, reducing unnecessary migration overhead and system jitter, and improving the overall reliability and stability of the I / O subsystem.
[0053] In summary, this application first divides the physical layer channel into multiple logical ports and establishes a mapping relationship to achieve fault isolation at the logical port level, avoiding the impact of a single port failure on the entire interface subsystem. Second, it adopts a cross-layer collaborative dynamic retransmission mechanism, combining physical layer channel health information, link layer retransmission failure information, and application layer data flow scheduling information, allowing the application layer's IO scheduling module to make cross-port migration decisions. Third, by continuously monitoring port status information (such as the number of retransmission failures, bit error rate, and health score), migration is triggered when a logical port experiences multiple retransmission failures, an increased bit error rate, or abnormal ACK / NACK states, rather than waiting for the logical port to completely fail, thus proactively avoiding tail delay and head-of-line congestion. Finally, it uses a comprehensive scoring formula (Score = a×Health - b×Load - c×RetryRate - ... The system dynamically selects healthy and lightly loaded target logical ports (d×Latency) to avoid migrating data streams to congested or low-quality logical ports, thus improving bandwidth utilization. During the handover process, it ensures no data loss, no duplication, and delivery in order as much as possible through flow ID, sequence number, sending buffer, unacknowledged packet rescheduling, and receiver deduplication and reordering mechanisms. Simultaneously, it marks abnormal logical ports as restricted, reads unacknowledged packets from the sending buffer, and re-adds them to the target logical port's sending queue, achieving cross-port migration without data loss. Furthermore, it prevents frequent port oscillations by setting hysteresis recovery conditions (i.e., recovery threshold higher than the abnormal threshold and requiring stability for multiple consecutive detection cycles). The entire migration process is transparent to the upper-layer training framework, requiring no re-establishment of connections or data submission, thereby solving the problems of bandwidth waste, coarse-grained handover, head-of-line congestion, and complex recovery due to upper-layer fault perception in existing technologies.
[0054] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating a multi-port data stream migration method according to another exemplary embodiment. The multi-port data stream migration method of this application is applied to a receiving end, and the method includes step S201: S201, Receive data packets sent by the sending end; The sending end is configured to: divide multiple physical layer channels into multiple logical ports, each logical port containing a set of physical layer channels, and establish a mapping relationship between the physical layer channels and the logical ports; map the data stream to be sent to a logical port and send it through the logical port; continuously monitor the port status information of each logical port; when an anomaly is detected in a logical port based on the port status information, determine it as an abnormal logical port and select a target logical port from the remaining logical ports, migrate the unacknowledged data packets belonging to the data stream on the abnormal logical port to the target logical port, and continue sending on the target logical port.
[0055] Understandably, the receiving end receives data packets from the sending end and restricts the pre-processing operations performed by the sending end. Specifically, the sending end needs to divide the physical layer channel into multiple logical ports, map the data stream to a specific logical port for transmission, continuously monitor the status of each port, and select a target port from other ports when an anomaly is detected. Unacknowledged data packets from the abnormal port are then migrated to the target port for continued transmission. The purpose is that the receiving end does not need to be aware of the port migration process; it only needs to receive data packets normally. Simultaneously, by restricting the sending end's operations, it ensures that the receiving end can receive data packets after the sending end completes data packet scheduling, thus achieving a seamless handover to the upper-layer application.
[0056] In some embodiments, the data packet carries a flow identifier and a sequence number; the method further includes: deduplicating and reordering the received data packets according to the flow identifier and the sequence number, and delivering them to the upper layer in sequence number order.
[0057] Understandably, the packet processing mechanism at the receiving end during port migration includes: each packet carries a flow identifier and sequence number. The receiving end performs deduplication (discarding received duplicate packets) and reordering (buffering out-of-order packets and delivering them in order after missing packets are completed) on the received packets based on the flow identifier and sequence number. Finally, the complete data is delivered to the upper layer in sequence. Its purpose is to ensure that during logical port switching, since late packets sent from the original logical port and retransmitted packets from the target logical port may arrive at the same time, the receiving end uses this mechanism to ensure that data is not lost, not duplicated, and delivered in order, thus remaining transparent to the upper-layer training framework and achieving a seamless switching.
[0058] In some embodiments, the step of deduplicating and reordering the received data packets according to the flow identifier and the sequence number includes: determining whether the received data packet is a duplicate packet according to the flow identifier and the sequence number, and discarding it if it is a duplicate packet; if the sequence number of the data packet is greater than the current expected sequence number, temporarily storing it in the reordering cache; and delivering it to the upper layer in the order of the sequence numbers after all data packets with missing sequence numbers are filled in.
[0059] Understandably, the specific implementation of packet deduplication and reordering during port migration at the receiving end includes: the receiving end determines whether the received packet is a duplicate based on the flow identifier and sequence number; if so, it is discarded directly. If the sequence number of the packet is greater than the currently expected sequence number, it is temporarily stored in the reordering buffer to wait. The currently expected sequence number refers to the sequence number of the next packet that the receiving end expects to receive when delivering data in order. After the missing packets (i.e., packets with sequence numbers equal to the expected sequence numbers) are filled in, the complete data is delivered to the upper layer in sequence. Its function is that during logical port switching, since late packets sent from the original logical port and retransmitted packets from the target logical port may arrive at the same time, the receiving end can accurately identify and discard duplicate packets, buffer out-of-order packets, and deliver them in order after the missing packets are filled in, thereby ensuring that data is not lost, not duplicated, and in the correct order. This achieves a seamless switch to the upper-layer training framework and maintains the continuity and stability of the training task.
[0060] In some embodiments, the step of deduplicating and reordering the received data packets according to the flow identifier and the sequence number further includes: maintaining a desired sequence number window to handle cross-arrival data packets from the original logical port and the target logical port; during logical port switching, if a data packet sent by the original logical port arrives late, while a data packet retransmitted by the target logical port arrives early, then the duplicate data packet is discarded according to the sequence number, out-of-order data packets are buffered, and after all data packets with consecutive sequence numbers arrive, they are delivered to the upper layer in the order of the sequence numbers.
[0061] Understandably, the specific implementation of deduplication and reordering at the receiving end also includes: the receiving end maintains an expected sequence number window for each data stream. The initial value of this window is the sequence number of the next data packet expected to be received, used to handle cross-arrival data packets from the original logical port and the target logical port. During logical port switching, when data packets sent by the original logical port may arrive late, while data packets retransmitted by the target logical port may arrive first, the receiving end determines and discards duplicate packets based on the sequence number, buffers out-of-order packets, and delivers them to the upper layer in the order of the sequence numbers after all data packets with consecutive sequence numbers have arrived. Its function is that, by introducing the expected sequence number window mechanism, the receiving end can effectively cope with the disorder of data packet arrival order during logical port switching, ensuring that data is not lost or duplicated and is ultimately delivered in order. This maintains transparency to the upper-layer training framework in complex scenarios of underlying logical port migration, ensuring the continuity of training tasks and data integrity.
[0062] For example, consider a data stream containing packets sent in sequence (1, 2, 3, ...). The receiver maintains an expected sequence number window for this data stream, with a window size of 4 (meaning a maximum of 4 out-of-order packets can be buffered). If the receiver has correctly received and delivered packets with sequence numbers 1, 2, and 3, the initial value of the expected sequence number window is 4, covering sequences 4 through 7. When a packet with sequence number 4 is received, the receiver immediately acknowledges and delivers it, updating the initial window value to 5. If a packet with sequence number 6 is received (within the window but not within the expected initial value), it is buffered until sequences 4 and 5 arrive, at which point it is delivered in order, and the initial window value is updated. If a packet with sequence number 8 is received (outside the window), it is discarded or retransmitted. In this way, the receiver can handle out-of-order packets, ensuring that data is delivered to the upper layer in order.
[0063] In some embodiments, the method further includes: for data streams with sequential dependencies, delivering them in sequence number order; and for data streams that allow out-of-order delivery, delivering them directly in arrival order.
[0064] Understandably, the specific implementation methods of deduplication and reordering at the receiving end also include: the receiving end adopts different delivery strategies based on the order requirements of the data stream: for data streams with sequential dependencies (such as gradient synchronization streams), they are delivered to the upper layer strictly in sequence number order; for data streams that allow out-of-order delivery (such as certain control message streams), they are delivered directly in the order of arrival, without waiting for out-of-order packets to be completed. Its purpose is to allow non-critical streams to reduce reordering buffer waiting time while ensuring the sequential consistency of critical data streams, thereby reducing transmission latency and improving the flexibility and efficiency of the overall IO subsystem.
[0065] In summary, this application receives data packets sent by a sender at a receiver, where the sender has implemented cross-port migration. The receiver performs deduplication and reordering based on the flow identifier and sequence number carried in the data packets. Specifically, this includes: identifying and discarding duplicate packets, temporarily storing out-of-order packets in a reordering buffer, and delivering packets in order after missing packets are filled in. It also handles the cross-arrival of late packets from the original port and retransmitted packets from the target port by maintaining a desired sequence number window, and provides differentiated processing for different data stream types (order-dependent streams delivered in order, out-of-order streams delivered directly). This solves the problems of data duplication, out-of-order delivery, and loss caused by cross-arrival of data packets during port switching in existing technologies. It ensures that the data delivered by the receiver to the upper layer is complete and orderly, thus remaining transparent to the upper-layer training framework. The upper layer does not need to be aware of underlying port anomalies or re-establish connections, effectively avoiding bandwidth waste, head-of-line blocking, and training interruptions caused by repeated retransmissions from the original port. This improves the system's continuous transmission capability and overall reliability in sub-optimal port scenarios.
[0066] The following example illustrates this: In an AI training accelerator card, chip A and chip B are interconnected at high speed via 128 channels. The system's channel partitioning module divides these channels into eight logical ports, namely ports P0 to P7, each containing 16 channels. During training, the application layer simultaneously generates multiple gradient synchronization data streams and control message streams. The data stream management module assigns stream IDs, packet sequence numbers, priorities, current logical ports, and transmission states to the application layer data streams. A data stream can be a gradient synchronization stream, a parameter update stream, an activation data stream, a control message stream, or other inter-chip communication streams. Initially, the system evenly distributes these data streams across P0 to P7.
[0067] After operating for a period of time, several channels within port P2 experienced an increase in bit errors due to temperature changes, decreased signal integrity, or transient interference. Specifically, this manifested as an increase in the number of CRC failures for data packets on port P2, with the receiver continuously returning NACKs. The sender attempted to retransmit the relevant data packets using the transmit buffer and retransmission queue module, but multiple retransmissions still failed. At this point, the port status monitoring module detected that the cumulative number of retransmission failures on port P2 within a preset time window exceeded the first threshold, and the port health score from the port health assessment module fell below the fourth threshold. Therefore, the anomaly judgment module marked port P2 as a degraded port.
[0068] Subsequently, the target port selection module checks the status of other logical ports. Assuming port P5 has a short current queue, low bandwidth utilization, normal ACK response, and the highest health score, the system selects port P5 as the migration target (i.e., the target logical port). The data stream switching module performs the following operations: switches the gradient data stream originally bound to port P2 to port P5; retrieves data packets from the transmit buffer that have not yet received ACKs on port P2 and adds them back to the transmit queue of port P5; subsequent new data packets for this data stream are also transmitted through port P5.
[0069] The receiver may simultaneously receive late data packets from port P2 and retransmitted data packets from port P5 within a short period. The receiver's deduplication and reordering module deduplicates and reorders the data packets based on the flow ID and sequence number to ensure they are delivered to the upper layer as required. For the training framework, the underlying port migration process is completely transparent, and the training task will not be interrupted due to a local channel anomaly on port P2.
[0070] Please refer to Figure 3 , Figure 3 This is a schematic diagram illustrating a logical port partitioning architecture according to an exemplary embodiment. Figure 3 The document presents the resource mapping logic and end-to-end operation mechanism of the multi-port data flow migration scheme, layer by layer, from the underlying hardware to the upper-layer scheduling. Specifically: Figure 3 The lowest layer consists of physical layer hardware resources, which include 128 high-speed serial transmission channels numbered from L0 to L127. The eight independent logical ports arranged on top of it are obtained by dividing all 128 physical layer high-speed serial channels into groups of 16, with each logical port binding to a group of 16 consecutive serial channels. Among them, ports P0, P1, P3, P4, P6, and P7 are six normal logical ports in a healthy and available state, receiving data streams to be sent; port P2 is marked as an abnormal logical port, with a record of multiple retransmission failures, which meets the preset abnormal trigger judgment rules: either the number of consecutive retransmission failures of the same data packet is not less than a preset first threshold, or the cumulative number of retransmission failures of the same data stream within a preset time window is not less than a preset second threshold. Port P2 will subsequently be marked as a restricted state and will no longer carry newly accessed data packets; port P5 is marked as a target logical port, with a light load, and has the highest score after calculation by the preset comprehensive scoring rules and meets the health status admission requirements. It can be used to receive data packets that have not yet been acknowledged on the abnormal logical port and complete the transmission task after migration.
[0071] Figure 3The two arrows pointing from the logical port layer to the underlying physical layer, labeled channel groups, illustrate the binding relationship between physical layer channels and logical ports. The logical port serves as a unified management unit for the entire group of physical layer channels, achieving a one-to-one correspondence between the upper-layer logical port and the lower-layer hardware transmission link. The port status monitoring module includes a port status table (PortStatus) for continuously collecting and storing the operational status information of all logical ports. This includes indicators such as health scores, port load, retransmission rate, and average latency required for selecting target logical ports, as well as operational parameters such as bit error rate, ACK timeout ratio, and retransmission success rate required for determining port anomalies. This provides real-time health status and load feedback to the IO scheduling and mapping module. The IO scheduling and mapping module maintains a flowmap that maps data flow identifiers to logical ports. It also synchronously maintains the binding rules between physical layer channels and logical ports. The module receives real-time status data from the port status table as the basis for scheduling and performs two types of mapping actions: First, the action marked "Initial Mapping," which maps the data flow to be allocated to any logical port that meets health access requirements after receiving the data flow submitted by the upper layer. Second, the action marked "Remapping After Anomaly," which selects a suitable target logical port from the remaining normal logical ports after identifying an abnormal port that meets the anomaly criteria, updates the association of the data flow bound to the abnormal port in the mapping table, and migrates the data flow to the target logical port for subsequent transmission. The data flow management module demonstrates two typical types of data flows to be sent: ordered data and unordered data. Among them, gradient synchronization and parameter updates are ordered data, belonging to data streams that are strongly dependent on the order of data delivery; control messages are unordered data, belonging to data streams that allow out-of-order delivery, and the data stream to be sent requests transmission resources from the IO scheduling and mapping module through the data stream submission interface. visible, Figure 3 The demonstration showcases the end-to-end operational logic, from the allocation of underlying hardware resources to full-port status monitoring, port anomaly identification, and data stream migration scheduling. Combined with the receiving end's processing logic based on flow identifiers and data sequence numbers for deduplication, reordering, and differentiated delivery, it enables seamless data stream migration and transmission even in port anomaly scenarios.
[0072] Please refer to Figure 4 , Figure 4This is a schematic diagram illustrating a multi-port dynamic retransmission and migration process according to an exemplary embodiment. Exemplarily, the IO scheduling and mapping module may include a port health assessment module, an anomaly judgment module, a target port selection module, a data stream mapping module, and a data stream switching module. The channel status acquisition module is responsible for real-time acquisition of bit error rate, CRC check results, FEC forward error correction status, and link training parameters of all underlying high-speed serial transmission paths. It outputs the acquired raw hardware status data to the port status monitoring module. Based on the reported raw parameters, the port status monitoring module aggregates and statistically analyzes all operational metrics for each logical port, including ACK confirmation status, NACK retransmission indication, transmission timeout events, and port sending queue depth. It then transmits the normalized port-level status data to the port health assessment module. The port health assessment module quantifies the received port status data and outputs four core evaluation metrics for each logical port: health score, real-time load percentage, retransmission rate, and average transmission delay. The quantitative evaluation results for all ports are sent to the anomaly judgment module. The anomaly judgment module checks each port against preset rules to determine if it meets the anomaly triggering condition of exceeding a threshold for consecutive retransmission failures. If a port does not trigger an anomaly, the original transmission link is maintained without migration. If a port is determined to have met the anomaly triggering condition, an anomaly triggering notification is output to the target port selection module. Based on the health and load scores of all non-abnormal logical ports, the block selects other logical ports (such as the port with the lightest load) whose health status meets the requirements of the comprehensive scoring formula and whose health score is not lower than a preset threshold as the target logical ports to receive the migrated data streams. The identifier of the selected target logical port is output to the data stream mapping module. The data stream mapping module updates the locally maintained mapping table of flow identifiers to logical ports according to the input identifier of the target logical port, and modifies the mapping of all data streams to be sent that were originally bound to the abnormal logical ports to the selected target logical ports. At the same time, the system retrieves all temporarily stored data packets that have not yet received ACK confirmation from the receiver from the independently deployed send buffer and retransmission queue module, and sends the updated data stream mapping table result and the retrieved unacknowledged data packets together to the data stream switching module. The data stream switching module schedules all unacknowledged data packets to the updated target logical ports to re-initiate transmission. After the data packets are delivered to the receiver, the receiver's deduplication and reordering module performs duplicate packet removal and out-of-order packet reordering based on the flow identifier and sequence number carried by the data packets, and finally completes the delivery according to the original ordering requirements of the corresponding data stream.
[0073] Please refer to Figure 5 , Figure 5 This is a flowchart illustrating multi-port dynamic retransmission and seamless handover according to an exemplary embodiment. It includes the following steps: S501 receives the data stream to be sent submitted by the application layer.
[0074] S502, query the data stream mapping table, allocate a logical port for the current data stream to be sent, and initiate transmission. The S503 continuously collects and monitors the operating status of all online logical ports, including confirmation or negative confirmation feedback, transmission timeouts, retransmission failures, and port load parameters.
[0075] S504 determines whether the currently monitored logical port has reached the retransmission exception condition.
[0076] If the currently monitored logical port does not meet the retransmission exception condition, execute S505; If the currently monitored logical port has reached the retransmission exception condition, execute S506.
[0077] S505, maintain the original logical port's transmission link unchanged, synchronously update the port status table, and then jump back to the port continuous monitoring stage in step S504.
[0078] S506 marks the abnormal logical port as restricted, limiting its ability to accept newly connected data packets.
[0079] S507 selects the target logic port based on a comprehensive scoring formula.
[0080] S508, update the current logical port of the data stream in the data stream mapping table of the sending end to the target logical port. S509 retrieves all unacknowledged data packets from the sender's local transmit buffer that have not yet received acknowledgment feedback from the receiver on the abnormal logical port, and schedules them to the target logical port to re-initiate transmission. S510: The receiving end performs duplicate packet removal and out-of-order packet reordering operations based on the flow identifier and sequence number carried in the data packet, and then executes differentiated delivery rules to the upper layer according to the attributes of the corresponding data stream.
[0081] S511 ensures that upper-layer services are unaware of the transmission link switching operation, and the original training, control, and other data stream-related service tasks continue to operate normally without being aware of it.
[0082] visible, Figure 5The demonstrated sending end completes the partitioning and binding of all physical layer channels to multiple groups of logical ports, constructs the mapping relationship between physical channels and logical ports, and between flow identifiers and logical ports, and generates the corresponding data flow mapping table (FlowMap). Upon initially receiving the data flow submitted by the application layer, it directly allocates a healthy logical port for transmission and continuously collects the operational metrics of each logical port. When any logical port meets any of the following abnormal conditions: exceeding the limit for consecutive retransmission failures, exceeding the limit for cumulative retransmission failures within a time window, exceeding the limit for bit error rate, health score below the threshold, exceeding the limit for acknowledgment timeout ratio, or excessively low retransmission success rate, the abnormal logical port is marked and will no longer accept new data flows. Subsequently, a comprehensive scoring formula is used, combined with the data flow of each port... The optimal target logical port is calculated based on health scores, real-time load, retransmission rate, and average latency. After synchronously updating the data flow mapping table, all unacknowledged data packets stuck on the abnormal logical port are transferred to the sending queue of the target logical port for retransmission. The receiving end maintains a reordering buffer with a sequence number window, which can be compatible with cross-arrival data packets from the original abnormal logical port and the new target logical port. For data flows with strong order dependencies, such as gradient synchronization and parameter updates, missing sequence numbers are filled in and the data is delivered strictly in order. For data flows that allow out-of-order delivery, such as control messages, the data is delivered directly in the order of arrival. This solves the problem of service interruption caused by data packet loss and out-of-order delivery, and realizes seamless switching of the entire link in port abnormality scenarios.
[0083] Please refer to Figure 6 , Figure 6 This is a flowchart illustrating a port switching and data flow migration scenario according to an exemplary embodiment, including the following steps: AI training chip A (sender): S601 generates the business data stream to be transmitted.
[0084] For example, the AI training service of the sending AI training chip A generates a gradient synchronization data stream (Flow-17) to be sent. This data stream is a data stream that depends on the delivery order, requiring the receiving end to deliver it to the upper layer service in strict order of sequence number.
[0085] S602 establishes the mapping relationship between data flow and logical port.
[0086] For example, the sending end writes the mapping relationship of the data stream (Flow-17) into the locally maintained data stream mapping table (FlowMap). In the initial stage, Flow-17 is bound to logical port P2, which includes 16 physical layer channels.
[0087] S603, the sender has a local cache of unacknowledged data packets.
[0088] For example, the sender's locally deployed send cache stores all unacknowledged data packets of Flow-17 that have not yet received ACK confirmation feedback from the receiver; when migration is triggered, the upper-layer business does not need to regenerate data, but can directly read the packets to be migrated from the cache, which greatly reduces the additional overhead of the migration process.
[0089] S604, logical port transmission continues to be abnormal.
[0090] For example, if logical port P2, which initially carries Flow-17, continuously retransmits data packets to be sent but fails to deliver them to the receiving end, this state meets at least one of the following abnormal judgment conditions: the number of consecutive retransmission failures of the same data packet is ≥ a first threshold, or the retransmission success rate of the logical port is ≤ a sixth threshold. After detecting this state, the sending end first marks P2 as a restricted state, prohibiting the port from carrying new data packets.
[0091] S605, filter to obtain the target logical port.
[0092] For example, the sending end collects the port status information of all other available logical ports, substitutes the health score, load, retransmission rate, and average latency of each port into the set comprehensive scoring formula Score = a × Health - b × Load - c × RetryRate - d × Latency to complete the calculation, and finally selects the logical port P5 with the highest comprehensive score and a health score higher than the preset threshold as the target logical port; this target logical port also includes 16 physical layer channels, and its current load is extremely low and its operating status is healthy. Subsequently, the sending end retrieves all unacknowledged data packets belonging to Flow-17 on P2 from the sending buffer and adds them to the sending queue of P5, while updating the current logical port field of Flow-17 in the FlowMap to P5 to complete the port switching.
[0093] S606, the abnormal logic port receives feedback of transmission abnormalities.
[0094] For example, the receiving AI training chip B returns a negative acknowledgment (NACK) to the data packet sent from the abnormal logic port P2, or triggers a reception timeout event.
[0095] S607, the target logic port receives feedback that the transmission is normal.
[0096] For example, the migration data packet is transmitted through the target logical port P5 and arrives at the receiving end AI training chip B. The receiving end returns an acknowledgment (ACK) for the migration data packet, indicating that the target logical port P5 is in a healthy operating state.
[0097] AI training chip B (receiver): S608, the receiving end completes delivery through deduplication and reordering.
[0098] For example, the receiving end sends all data packets carrying flow identifiers and sequence numbers to a local reordering buffer. The processing flow includes: First, identifying Flow-17 as a sequentially dependent data flow based on the flow identifier, and directly discarding duplicate data packets based on sequence number verification; for out-of-order data packets with sequence numbers greater than the current expected sequence number, they are temporarily stored in the reordering buffer. Simultaneously, a dynamic expected sequence number window is maintained to accommodate cross-arrival data packets from the original logical port P2 and the new logical port P5 (including data packets already sent from the original logical port P2 but arriving late). After all missing sequence numbers are filled in, they are delivered to the upper-layer AI training service in ascending order of sequence number, ensuring that there are no out-of-order, packet loss, or duplicate delivery issues.
[0099] In summary, this embodiment initially binds the gradient synchronization data stream to port P2 for transmission. After continuous monitoring and multiple retransmission failures on port P2 that meet the anomaly criteria, a weighted multi-dimensional scoring mechanism selects port P5 as the migration target, directly migrating all unacknowledged data packets from port P2 to port P5 for retransmission. The receiving end resolves the out-of-order and duplicate packet issues caused by port switching through the processing logic of stream identifiers and sequence numbers, ensuring that the upper-layer AI training services are completely unaware of the problem. Ultimately, highly reliable and uninterrupted smooth switching of multi-port data streams is achieved.
[0100] The multi-port data stream migration apparatus provided in this application is described below. The multi-port data stream migration apparatus described below can be referred to in correspondence with the multi-port data stream migration method described above.
[0101] Please refer to Figure 7 , Figure 7 This is a block diagram illustrating a multi-port data stream migration device according to an exemplary embodiment. The multi-port data stream migration device is applied at a sending end, and the device includes a logical port partitioning module 701, a data stream mapping module 702, and a port status monitoring and migration module 703.
[0102] For example, the logical port partitioning module 701 is used to partition multiple physical layer channels of the transmitting end into multiple logical ports, each logical port containing a set of physical layer channels, and to construct a mapping relationship between the physical layer channels and the logical ports.
[0103] For example, the data stream mapping module 702 is used to map the data stream to be sent to a logical port and send it through the logical port.
[0104] For example, the port status monitoring and migration module 703 is used to continuously monitor the port status information of each logical port; when an abnormality is detected in a certain logical port according to the port status information, it is determined as an abnormal logical port and a target logical port is selected from the remaining logical ports, the unacknowledged data packets belonging to the data stream on the abnormal logical port are migrated to the target logical port, and the transmission continues on the target logical port.
[0105] Specifically, the port status monitoring and migration module 703 further includes a target port selection module. This module acquires port status information for each of the remaining logical ports, including health score, load, retransmission rate, and average latency. The target logical port is selected based on a comprehensive scoring formula: Score = a × Health - b × Load - c × RetryRate - d × Latency, where Health represents the health score, Load represents the load, RetryRate represents the retransmission rate, Latency represents the average latency, and a, b, c, and d are configurable weights, with score representing the comprehensive score. The logical port with the highest comprehensive score and a health score not lower than a preset threshold is selected as the target logical port.
[0106] Specifically, the port status monitoring and migration module 703 further includes an anomaly judgment module. The anomaly judgment module is used to determine whether any of the following conditions are met when an anomaly is detected in a logical port based on the port status information: for the same data packet, the number of consecutive retransmission failures is not less than a first threshold; for the same data stream, the cumulative number of retransmission failures within a preset time window is not less than a second threshold; the bit error rate of the logical port is not less than a third threshold; the health score of the logical port is not higher than a fourth threshold; the acknowledgment timeout ratio of the logical port is not less than a fifth threshold; and the retransmission success rate of the logical port is not higher than a sixth threshold.
[0107] Specifically, the port status monitoring and migration module 703 further includes a data flow switching module, which is used to mark the abnormal logical port as a restricted state and restrict it from carrying new data packets; read unacknowledged data packets belonging to the data flow on the abnormal logical port from the sending buffer of the sending end, and add the unacknowledged data packets to the sending queue of the target logical port; and update the current logical port of the data flow in the data flow mapping table of the sending end to the target logical port.
[0108] Specifically, the port status monitoring and migration module 703 further includes a port health assessment module. This module continuously monitors the port status information of the abnormal logical port, including a health score, bit error rate (BER), and retransmission success rate. When the BER of the abnormal logical port is not higher than a first recovery threshold, the retransmission success rate is not lower than a second recovery threshold, and the health score is not lower than a third recovery threshold, and the BER, retransmission success rate, and health score remain stable over multiple consecutive detection cycles, the abnormal logical port is restored to usable status to resume carrying the data stream. The third recovery threshold is higher than the health score threshold used to trigger the anomaly, the first recovery threshold is lower than the BER threshold used to trigger the anomaly, and the second recovery threshold is higher than the retransmission success rate threshold used to trigger the anomaly.
[0109] Therefore, this application achieves seamless switching and highly reliable transmission of data streams in multi-physical-layer channel scenarios through logical port partitioning, data stream mapping, real-time status monitoring, and migration mechanisms. It solves the technical problem in existing technologies where data stream interruption, packet loss, or communication quality degradation occurs due to anomalies in a single logical port (such as continuous retransmission failures, excessively high error rates, or low health scores). Specifically: First, multiple physical layer channels are divided into logical ports and mapping relationships are established, allowing data streams to be flexibly bound to specific ports. Second, the health score, load, retransmission rate, latency, and other status information of each port are continuously monitored, and the target port with the highest comprehensive score and a health score not lower than the threshold is selected based on a comprehensive scoring formula. Third, multiple anomaly triggering conditions are set (such as the number of consecutive retransmission failures, the cumulative number of failures within a time window, the bit error rate, the health score, the acknowledgment timeout ratio, the retransmission success rate, etc.) to ensure the comprehensiveness and timeliness of anomaly detection. Fourth, when an anomaly occurs, the abnormal port is marked as restricted, unacknowledged data packets are read from the sending buffer and re-added to the target port's sending queue, and the data stream mapping table is updated to achieve lossless migration of data packets. Fifth, after the abnormal port recovers, multi-cycle stability judgments are made based on indicators such as the bit error rate, retransmission success rate, and health score, and the recovery threshold is set more strictly (such as the health score recovery threshold being higher than the anomaly trigger threshold) to ensure that the port can only resume carrying data streams after it has truly recovered and become available, avoiding frequent switching. Through the aforementioned dynamic monitoring, intelligent routing, lossless migration, and robust recovery, the continuity, reliability, and resource utilization of multi-port data stream transmission are significantly improved.
[0110] Please refer to Figure 8 , Figure 8 This is a block diagram illustrating a multi-port data stream migration apparatus according to another exemplary embodiment. The multi-port data stream migration apparatus is applied at a receiving end, and the apparatus includes a receiving module 801.
[0111] For example, the receiving module 801 is used to receive data packets sent by the sending end; wherein the sending end is used to: divide multiple physical layer channels into multiple logical ports, each logical port containing a set of physical layer channels, and construct a mapping relationship between the physical layer channels and the logical ports; map the data stream to be sent to a logical port, and send it through the logical port; continuously monitor the port status information of each logical port; when an anomaly is detected in a certain logical port according to the port status information, determine it as an abnormal logical port and select a target logical port from the remaining logical ports, migrate the unacknowledged data packets belonging to the data stream on the abnormal logical port to the target logical port, and continue to send them on the target logical port.
[0112] Specifically, the data packet carries a flow identifier and a sequence number; the device also includes a deduplication and reordering module, which is used to deduplicate and reorder the received data packets according to the flow identifier and the sequence number, and deliver them to the upper layer in sequence.
[0113] Specifically, the deduplication and reordering module includes a duplicate packet detection submodule, an out-of-order buffering submodule, and an ordered delivery submodule. The duplicate packet detection submodule is used to determine whether a received data packet is a duplicate packet based on the flow identifier and the sequence number; if it is a duplicate packet, it is discarded. The out-of-order buffering submodule is used to temporarily store a data packet in a reordering buffer if its sequence number is greater than the current expected sequence number. The ordered delivery submodule is used to deliver data packets to the upper layer in the order of their sequence numbers after all missing sequence numbers have been filled in.
[0114] Specifically, the deduplication and reordering module further includes a window maintenance submodule and a cross-processing submodule: the window maintenance submodule is used to maintain a desired sequence number window for processing cross-arriving data packets from the original logical port and the target logical port; the cross-processing submodule is used to, during logical port switching, if a data packet sent by the original logical port arrives late while a data packet retransmitted by the target logical port arrives early, determine and discard duplicate data packets according to the sequence number, buffer out-of-order data packets, and deliver them to the upper layer in the order of the sequence numbers after all data packets with consecutive sequence numbers have arrived.
[0115] Specifically, the deduplication and reordering module further includes a sequential dependency processing submodule and an out-of-order delivery processing submodule; wherein, the sequential dependency processing submodule is used to deliver data streams with sequential dependencies in sequence number order; and the out-of-order delivery processing submodule is used to deliver data streams that are allowed to be delivered out of order directly in arrival order.
[0116] Therefore, this application solves the technical problems of duplicate, out-of-order, and chaotic delivery of data packets at the receiving end caused by data stream migration at the sending end by using a stream identifier and sequence number mechanism combined with deduplication, reordering, and adaptive delivery strategies. Specifically: The receiving end receives data packets carrying flow identifiers and sequence numbers, laying the foundation for subsequent ordered processing. Second, it identifies and discards duplicate packets based on the flow identifier and sequence number. Out-of-order packets with sequence numbers greater than the expected value are temporarily stored in a reordering buffer and delivered in order after missing packets are filled, ensuring data integrity. Third, it maintains an expected sequence number window to handle cross-arrival scenarios where late-arriving packets from the original port arrive before retransmitted packets from the target port during port switching: when a data packet sent by the original port arrives late while a retransmitted packet from the target port arrives first, duplicate packets are identified and discarded based on their sequence numbers, out-of-order packets are buffered, and delivered in order after consecutive sequence numbers are complete, avoiding data loss or duplication due to switching. Fourth, it adopts differentiated delivery strategies for different data stream characteristics: data streams with sequential dependencies are delivered strictly in sequence number order, while data streams that allow out-of-order delivery are delivered directly in arrival order, improving processing efficiency while ensuring reliability. Through the above intelligent deduplication, ordered reordering, and flexible delivery, the accuracy and continuity of data transmission at the receiving end are effectively guaranteed in multi-port data stream migration scenarios.
[0117] Embodiments of this application also propose an electronic device, including a processor and a memory; the memory is used to store a computer program executable by the processor; the processor is used to execute the computer program in the memory to implement the multi-port data stream migration method described in any of the above embodiments.
[0118] Embodiments of this application also propose a computer-readable storage medium that, when an executable computer program in the storage medium is executed by a processor, enables the implementation of the multi-port data stream migration method described in any of the above embodiments.
[0119] Embodiments of this application also propose a computer program product, including a storage medium and a computer program stored in the storage medium, which, when executed by a processor, implements the multi-port data stream migration method of any of the above embodiments.
[0120] Regarding the apparatus in the above embodiments, the specific manner in which the processor performs the operations has been described in detail in the embodiments related to the method, and will not be elaborated further here.
[0121] Embodiments of this application also provide an electronic device 900, such as... Figure 9As shown, the electronic device 900 includes a memory 901 and a processor 902. The memory 901 is used to store computer programs executable by the processor 902; the processor 902 is used to execute the computer programs in the memory 901 to implement the multi-port data stream migration method provided in any of the above embodiments.
[0122] The electronic device 900 also includes a communication interface 903. The processor 902, memory 901, and communication interface 903 are connected via a communication bus and communicate with each other.
[0123] Processor 902 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the above-mentioned program.
[0124] The communication interface 903 is used to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc.
[0125] The memory 901 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions; it may also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.
[0126] In this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The term "multiple" refers to two or more unless otherwise expressly defined.
[0127] The above description of the embodiments is intended to enable those skilled in the art to understand and apply this application. It will be apparent to those skilled in the art that various modifications can be easily made to these embodiments, and the general principles described herein can be applied to other embodiments without creative effort. Therefore, this application is not limited to the embodiments described herein, and any improvements and modifications made by those skilled in the art based on the disclosure of this application without departing from the scope and spirit of this application are within the scope of this application.
Claims
1. A multi-port data stream migration method, characterized in that, Applied to the sending end, the method includes: The multiple physical layer channels of the transmitting end are divided into multiple logical ports, each logical port contains a set of physical layer channels, and a mapping relationship between the physical layer channels and the logical ports is constructed. The data stream to be sent is mapped to a logical port and sent through that logical port; The port status information of each logical port is continuously monitored; when an anomaly is detected in a logical port based on the port status information, it is determined as an abnormal logical port and a target logical port is selected from the remaining logical ports. Unacknowledged data packets belonging to the data stream on the abnormal logical port are migrated to the target logical port and continue to be sent on the target logical port.
2. The multi-port data stream migration method according to claim 1, characterized in that, Selecting a target logical port from the remaining logical ports includes: Obtain the port status information of each of the remaining logical ports, including health score, load, retransmission rate and average latency; The target logical port is selected according to the comprehensive scoring formula, which is: Score = a × Health - b × Load - c × RetryRate - d × Latency, where Health represents the health score, Load represents the load, RetryRate represents the retransmission rate, Latency represents the average latency, a, b, c and d are configurable weights, and score represents the comprehensive score.
3. The multi-port data stream migration method according to claim 2, characterized in that, The step of selecting the target logical port according to the comprehensive scoring formula includes: The logic port with the highest overall score and a health score not lower than a preset threshold is selected as the target logic port.
4. The multi-port data stream migration method according to claim 1, characterized in that, When the port status information determines that any of the following conditions are met, it is determined that the logical port is abnormal: For the same data packet, the number of consecutive retransmission failures shall not be less than the first threshold. For the same data stream, the cumulative number of retransmission failures within a preset time window shall not be less than the second threshold. The bit error rate of the logical port shall not be lower than the third threshold; The health score of the logical port is not higher than the fourth threshold; The acknowledgment timeout rate of logical ports shall not be lower than the fifth threshold. The retransmission success rate of the logical port is not higher than the sixth threshold.
5. The multi-port data stream migration method according to claim 1, characterized in that, The step of migrating unacknowledged data packets belonging to the data stream on the abnormal logical port to the target logical port includes: The abnormal logical port is marked as restricted and its ability to carry new data packets is restricted. Read the unacknowledged data packets belonging to the data stream on the abnormal logical port from the sender's send buffer, and add the unacknowledged data packets to the send queue of the target logical port; Update the current logical port of the data stream in the data stream mapping table of the sending end to the target logical port.
6. The multi-port data stream migration method according to claim 1, characterized in that, Also includes: Continuously monitor the port status information of the abnormal logical port, including health score, bit error rate, and retransmission success rate; When the bit error rate of the abnormal logical port is not higher than the first recovery threshold, the retransmission success rate is not lower than the second recovery threshold, and the health score is not lower than the third recovery threshold, and the bit error rate, the retransmission success rate, and the health score remain stable within multiple consecutive detection cycles, the state of the abnormal logical port is restored to usability so as to re-carry the data stream. Wherein, the third recovery threshold is higher than the health score threshold used to trigger the anomaly, the first recovery threshold is lower than the bit error rate threshold used to trigger the anomaly, and the second recovery threshold is higher than the retransmission success rate threshold used to trigger the anomaly.
7. A multi-port data stream migration method, characterized in that, Applied to the receiving end, the method includes: Receive data packets sent by the sending end; The sending end is configured to: divide multiple physical layer channels into multiple logical ports, each logical port containing a set of physical layer channels, and establish a mapping relationship between the physical layer channels and the logical ports; map the data stream to be sent to a logical port and send it through the logical port; continuously monitor the port status information of each logical port; when an anomaly is detected in a logical port based on the port status information, determine it as an abnormal logical port and select a target logical port from the remaining logical ports, migrate the unacknowledged data packets belonging to the data stream on the abnormal logical port to the target logical port, and continue sending on the target logical port.
8. The multi-port data stream migration method according to claim 7, characterized in that, The data packet carries a flow identifier and a sequence number; the method further includes: Based on the flow identifier and the sequence number, the received data packets are deduplicated and reordered, and delivered to the upper layer in sequence according to the sequence number.
9. The multi-port data stream migration method according to claim 8, characterized in that, The step of deduplicating and reordering the received data packets according to the flow identifier and the sequence number includes: The received data packet is determined to be a duplicate packet based on the flow identifier and the sequence number. If it is a duplicate packet, it is discarded. If the sequence number of a data packet is greater than the current expected sequence number, it is temporarily stored in the reordering cache; Once all missing sequence numbers are filled in, the data packets are delivered to the upper layer in the order of the sequence numbers.
10. The multi-port data stream migration method according to claim 8, characterized in that, The step of deduplicating and reordering the received data packets according to the flow identifier and the sequence number further includes: Maintain the expected sequence number window to handle cross-arrival packets from the source logical port and the destination logical port; During a logical port switchover, if a data packet sent by the original logical port arrives late, while a data packet resent by the target logical port arrives early, the duplicate data packet is discarded based on the sequence number, and out-of-order data packets are buffered. Once all data packets with consecutive sequence numbers have arrived, they are delivered to the upper layer in the order of the sequence numbers.
11. The multi-port data stream migration method according to claim 7, characterized in that, The method further includes: For data streams with sequential dependencies, deliver them in sequence number order; For data streams that allow out-of-order delivery, deliver them directly in the order of arrival.
12. A multi-port data stream migration device, characterized in that, The device, applied to the transmitting end, includes: The logical port partitioning module is used to divide multiple physical layer channels of the transmitting end into multiple logical ports. Each logical port contains a set of physical layer channels, and constructs a mapping relationship between the physical layer channels and the logical ports. The data stream mapping module is used to map the data stream to be sent to a logical port and send it through that logical port. The port status monitoring and migration module is used to continuously monitor the port status information of each logical port. When an abnormality is detected in a logical port based on the port status information, it is determined as an abnormal logical port and a target logical port is selected from the remaining logical ports. Unacknowledged data packets belonging to the data flow on the abnormal logical port are migrated to the target logical port and continue to be sent on the target logical port.
13. A multi-port data stream migration device, characterized in that, The device, applied at the receiving end, includes: The receiving module is used to receive data packets sent by the sending end; The sending end is configured to: divide multiple physical layer channels into multiple logical ports, each logical port containing a set of physical layer channels, and establish a mapping relationship between the physical layer channels and the logical ports; map the data stream to be sent to a logical port and send it through the logical port; continuously monitor the port status information of each logical port; when an anomaly is detected in a logical port based on the port status information, determine it as an abnormal logical port and select a target logical port from the remaining logical ports, migrate the unacknowledged data packets belonging to the data stream on the abnormal logical port to the target logical port, and continue sending on the target logical port.
14. An electronic device, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program executable by the processor; and the processor executes the computer program in the memory to implement the multi-port data stream migration method as described in any one of claims 1 to 6 or 7 to 11.
15. A computer-readable storage medium having a computer program stored thereon, wherein when the executable computer program in the storage medium is executed by a processor, it is capable of implementing the multi-port data stream migration method as described in any one of claims 1 to 6 or 7 to 11.
16. A computer program product comprising a storage medium and a computer program stored in the storage medium, characterized in that, When the computer program is executed by the processor, it implements the multi-port data stream migration method as described in any one of claims 1 to 6 or 7 to 11.