Data stream transmission method, device and equipment and computer readable storage medium

By dynamically adjusting port selection based on data stream transmission information, the problem of low data stream transmission efficiency in multi-data center collaborative processing is solved, achieving load balancing and efficient computing.

CN121940466APending Publication Date: 2026-04-28HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

When multiple data centers collaborate to process computing tasks, existing technologies struggle to achieve efficient load balancing of data streams between different data centers, resulting in low transmission efficiency and becoming a bottleneck in computing task processing.

Method used

By acquiring the transmission information of the data stream in the first time period, the output port for the second time period is determined based on this information. The output port selection is dynamically adjusted to achieve load balancing. The transmission information in both time and space dimensions is considered, and the output port is flexibly selected to adapt to changes in the data stream.

Benefits of technology

It enables load-balanced transmission of data streams between different data centers, improving the efficiency of computing tasks, reducing outgoing port congestion, and enhancing transmission flexibility and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121940466A_ABST
    Figure CN121940466A_ABST
Patent Text Reader

Abstract

The invention discloses a data stream transmission method, device and equipment and a computer readable storage medium, and belongs to the technical field of computers. The method comprises the steps that transmission information of a first data stream and a second data stream in a first time period is acquired, the first data stream and the second data stream are transmitted between a first data center and a second data center, and the transmission information comprises transmission information of the first data stream and the second data stream in at least one of a time dimension and a space dimension; determining a first output port for transmitting the first data stream and a second output port for transmitting the second data stream in the second time period according to the transmission information in the first time period; and transmitting the first data stream in the second time period based on the first output port, and transmitting the second data stream in the second time period based on the second output port. The output port selected based on the real transmission condition, namely the transmission information, can also be dynamically adjusted along with the change of data stream transmission, and has adaptive equalization capability and high universality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to data stream transmission methods, apparatus, devices and computer-readable storage media. Background Technology

[0002] With the development of computer technology, the scale of computing tasks is constantly increasing, and the computing resources required for these tasks are also growing. When a single data center (DC) cannot provide the computing resources needed for a task, multiple DCs can work together to process the task. Taking the training of a large model as an example, multiple DCs can collaboratively train the large model to provide the necessary computing resources for training the large model when the computing resources of a single DC are exhausted. During the process of using multiple DCs to collaboratively process computing tasks, the data flow of the computing task will be transferred across DCs. Summary of the Invention

[0003] This application provides a data stream transmission method, apparatus, device, and computer-readable storage medium for transmitting data streams across data centers. The technical solution is as follows:

[0004] In a first aspect, a data stream transmission method is provided, the method comprising: acquiring transmission information of a first data stream and a second data stream in a first time period, the first data stream and the second data stream being transmitted between a first data center and a second data center, the transmission information including transmission information of the first data stream and the second data stream in at least one dimension in a time dimension or a spatial dimension; determining a first output port of the first data stream and a second output port of the second data stream for transmission in a second time period based on the transmission information of the first time period; transmitting the first data stream in the second time period based on the first output port, and transmitting the second data stream in the second time period based on the second output port.

[0005] This application does not limit the dimensions considered in determining the first and second output ports; they can be determined based on at least one of the time or spatial dimensions, offering high flexibility. For multiple data streams, including the first and second data streams, the output ports corresponding to each data stream in the second time period are uniformly determined, thereby achieving load balancing of multiple data streams at the output ports. Furthermore, since the transmission information reflects the actual transmission status of the first and second data streams in the first time period, the output ports selected based on the actual transmission status can also be dynamically adjusted as the data stream transmission changes, exhibiting adaptive balancing capabilities and high versatility.

[0006] In one possible implementation, determining the first egress port for transmitting the first data stream and the second egress port for transmitting the second data stream in the second time period based on transmission information from the first time period includes: determining the first egress port based on routing information from the first data center in the second time period and transmission information of the first data stream; determining the second egress port based on routing information from the first data center in the second time period and transmission information of the second data stream; the routing information from the first data center in the second time period indicates the egress port of the first data center and its port occupancy status in the second time period, where port occupancy status includes at least one of port occupancy bandwidth in the spatial dimension or port occupancy duration in the temporal dimension. In determining the first and second egress ports, in addition to referring to the transmission information of the first and second data streams, the port occupancy information of the egress ports in the first data center in the second time period is also considered. The selection of the first and second egress ports based on more information results in higher reliability and a higher degree of balance.

[0007] In one possible implementation, determining the first output port based on the routing information of the first data center in the second time period and the transmission information of the first data stream includes: selecting a first candidate port from the output ports of the first data center that connects to the destination of the first data stream; and determining the first output port from the first candidate ports based on the transmission information of the first data stream and the port occupancy status of the first candidate ports in the second time period. Firstly using routing information to filter out the first candidate ports from the output ports of the first data center, and then selecting the first output port from the filtered first candidate ports, is more efficient.

[0008] In one possible implementation, there are multiple first candidate ports. Based on the transmission information of the first data stream and the port occupancy status of the first candidate ports in the second time period, a first output port is determined from the first candidate ports. This includes: determining the start time of the first data stream transmission by the first candidate ports in the second time period based on the time-dimensional transmission information of the first data stream; determining the end time of the first data stream transmission by the first candidate ports in the second time period based on the spatial-dimensional transmission information of the first data stream, the port occupancy status of the first candidate ports in the second time period, and the start time of the first data stream transmission by the first candidate ports in the second time period; and selecting the first output port from the multiple first candidate ports based on the end time of the first data stream transmission by the first candidate ports in the second time period. Selecting the first output port based on the end time optimizes the end time of the first data stream transmission in the second time period, ensuring that the first data stream ends earlier in the second time period and that the transmission efficiency is higher.

[0009] In one possible implementation, there are multiple first candidate ports. A first output port is determined from the first candidate ports based on the transmission information of the first data stream and the port occupancy status of the first candidate ports in a second time period. This includes: determining the remaining bandwidth of the first candidate ports in the second time period based on their port occupancy bandwidth; selecting the first output port from the first candidate ports whose remaining bandwidth is greater than the transmission bandwidth of the first data stream; or, if the remaining bandwidth of multiple first candidate ports in the second time period is less than the transmission bandwidth of the first data stream, selecting the first output port from the multiple first candidate ports based on the port occupancy duration of each first candidate port in the second time period. The transmission bandwidth is obtained based on the spatial transmission information of the first data stream. Since the remaining bandwidth indicates the rate at which the first candidate port transmits the first data stream, and the port occupancy duration indicates the time when the remaining bandwidth of the first candidate port increases, i.e., the time when the first candidate port increases its transmission rate of the first data stream, the first output port selected based on the remaining bandwidth and port occupancy duration can guarantee the transmission rate of the first data stream.

[0010] This application does not limit the method of selecting the first output port from the first candidate port. It can be selected based on the end time or the remaining bandwidth, which provides high flexibility.

[0011] In one possible implementation, determining the second output port based on the routing information of the first data center in the second time period and the transmission information of the second data stream includes: selecting a second candidate port from the output ports of the first data center that connects to the destination of the second data stream; and determining the second output port from the second candidate ports based on the transmission information of the first data stream and the port occupancy status of the second candidate ports in the second time period.

[0012] In one possible implementation, there are multiple second candidate ports. The second output port is determined from the second candidate ports based on the transmission information of the second data stream and the port occupancy status of the second candidate ports in the second time period. This includes: determining the start time of the second candidate ports transmitting the second data stream in the second time period based on the transmission information of the second data stream in the time dimension; determining the end time of the second candidate ports transmitting the second data stream in the second time period based on the transmission information of the second data stream in the spatial dimension, the port occupancy status of the second candidate ports in the second time period, and the start time of the second candidate ports transmitting the second data stream in the second time period; and selecting the second output port from the multiple second candidate ports based on the end time of the second candidate ports transmitting the second data stream in the second time period.

[0013] In one possible implementation, there are multiple second candidate ports. The second output port is determined from the second candidate ports based on the transmission information of the second data stream and the port occupancy status of the second candidate ports in the second time period. This includes: determining the remaining bandwidth of the second candidate ports in the second time period based on the port occupancy bandwidth of the second candidate ports in the second time period; selecting the second output port from the second candidate ports whose remaining bandwidth is greater than the transmission bandwidth of the second data stream; or, if the remaining bandwidth of multiple second candidate ports in the second time period is less than the transmission bandwidth of the second data stream, selecting the second output port from the multiple second candidate ports based on the port occupancy duration of each second candidate port in the second time period. The transmission bandwidth is obtained based on the transmission information of the second data stream in the spatial dimension.

[0014] In one possible implementation, the time-dimensional transmission information includes at least one of transmission period, arrival time, end time, or transmission duration, and the spatial-dimensional transmission information includes at least one of stream byte count or transmission bandwidth. This application does not limit the transmission information referenced by the first and second output ports, offering high flexibility.

[0015] In one possible implementation, the first data stream includes the data stream generated during the training of the first model, and the second data stream includes the data stream generated during the training of the second model; alternatively, the first and second data streams include the data stream generated during the training of the third model. The first and second models can be large models. The data stream transmission method provided in this application is applicable to model training scenarios and can be used to transmit the data streams generated during the training of the first and second models, thus having a wide range of applications.

[0016] In one possible implementation, the first time period and the second time period correspond to different rounds of multi-round model training, and the first data stream and the second data stream include the data stream generated during model training.

[0017] In one possible implementation, the first data stream and the second data stream are transmitted through the same load-sharing output port group in the first time period; or, the first data stream and the second data stream belong to the same computing task. This application does not limit the relationship between the first data stream and the second data stream; they can be data streams belonging to the same computing task. In this case, selecting the first output port and the second output port can achieve balanced transmission of multiple data streams in the computing task, thereby improving the computing efficiency of the computing task. The first data stream and the second data stream can also be data streams that need to be transmitted using the same load-sharing output port group. By selecting the first output port and the second output port, the data streams transmitted through each output port in the load-sharing output port group can be balanced, thereby improving the transmission efficiency of the load-sharing output port group.

[0018] In one possible implementation, obtaining the transmission information of the first data stream and the second data stream in a first time period includes: collecting the transmission information of the first data stream and the second data stream in the first time period; or, receiving the transmission information of the first data stream and the second data stream sent by the training controller corresponding to the first data center, wherein the transmission information is determined based on the task configuration information for model training. This application does not limit the method for obtaining the transmission information in the first time period; it can be collected or determined based on the task configuration information, offering high flexibility.

[0019] In one possible implementation, after determining the first output port of the first data stream and the second output port of the second data stream for the second time period based on the transmission information of the first time period, the method further includes: determining the first queue of the first data stream at the first output port and the second queue of the second data stream at the second output port; reducing the flow rate of the first data stream on the first queue in the event of congestion at the first output port, and / or reducing the flow rate of the second data stream on the second queue in the event of congestion at the second output port. In the event of congestion at the output port (either the first or the second output port), flow-level backpressure can be implemented based on the queue (either the first or the second queue), reducing only the flow rate of the data stream transmitted at the output port without reducing the overall transmission rate of the output port, resulting in finer backpressure granularity and higher accuracy.

[0020] In one possible implementation, the first and second output ports are determined based on the transmission information and the fault type within a second time period. The fault type includes at least one of the following: optical path failure in the optical transmission network (OTN) interconnecting the first and second data centers, output port link failure in the first data center, or fault within the second data center. By considering the fault types that may occur during the second time period, pre-planning of fault scenarios is achieved, allowing for timely handling when a fault occurs. For example, when a fault occurs, the transmission port of the first data stream can be quickly switched to the first output port, resulting in high timeliness of fault handling. Furthermore, this application does not limit the fault type and can include one or more of the above, demonstrating broad applicability.

[0021] In one possible implementation, the transmission information of the first data stream in the first time period is also used to determine the transmission path of the first data stream within the first data center in the second time period. Besides determining the output port, the transmission information can also be used to plan the transmission path within the first data center, resulting in high utilization.

[0022] In one possible implementation, after transmitting the first data stream based on the first output port in the second time period, the method further includes: acquiring the transmission information of the first data stream in the second time period; and updating the first output port according to the transmission information of the first data stream in the second time period if the transmission information of the first data stream in the second time period differs from the transmission information of the first data stream in the first time period. If the transmission information changes in the second time period, the first output port corresponding to the first data stream can also be dynamically adjusted based on the change in transmission information. The correspondence between the first data stream and the first output port is dynamically variable, possessing adaptive balancing capabilities and high flexibility.

[0023] Secondly, a data stream transmission method is provided, the method comprising: acquiring transmission information of a first data stream in a first time period, the first data stream being transmitted between a first data center and a second data center, the transmission information including transmission information of the first data stream in at least one dimension in the time dimension or the spatial dimension; determining a first output port for transmitting the first data stream in a second time period based on the transmission information of the first time period; and transmitting the first data stream in the second time period based on the first output port.

[0024] In one possible implementation, determining the first output port for transmitting the first data stream in the second time period based on the transmission information of the first time period includes: determining the first output port based on the routing information of the first data center in the second time period and the transmission information of the first data stream, wherein the routing information of the first data center in the second time period indicates the output port of the first data center and the port occupancy status of the output port of the first data center in the second time period, and the port occupancy status includes at least one of port occupancy bandwidth in the spatial dimension or port occupancy duration in the temporal dimension.

[0025] In one possible implementation, determining the first output port based on the routing information of the first data center in the second time period and the transmission information of the first data stream includes: selecting a first candidate port connected to the destination of the first data stream from the output ports of the first data center; and determining the first output port from the first candidate ports based on the transmission information of the first data stream and the port occupancy status of the first candidate ports in the second time period.

[0026] In one possible implementation, there are multiple first candidate ports. The first output port is determined from the first candidate ports based on the transmission information of the first data stream and the port occupancy status of the first candidate ports in the second time period. This includes: determining the start time of the first candidate port's transmission of the first data stream in the second time period based on the spatial transmission information of the first data stream; determining the end time of the first candidate port's transmission of the first data stream in the second time period based on the temporal transmission information of the first data stream, the port occupancy status of the first candidate ports in the second time period, and the start time of the first candidate port's transmission of the first data stream in the second time period; and selecting the first output port from the multiple first candidate ports based on the end time of the first candidate port's transmission of the first data stream in the second time period.

[0027] In one possible implementation, there are multiple first candidate ports. The first output port is determined from the first candidate ports based on the transmission information of the first data stream and the port occupancy status of the first candidate ports in the second time period. This includes: determining the remaining bandwidth of the first candidate ports in the second time period based on the port occupancy bandwidth of the first candidate ports in the second time period; selecting the first output port from the first candidate ports whose remaining bandwidth is greater than the transmission bandwidth of the first data stream; or, if the remaining bandwidth of multiple first candidate ports in the second time period is less than the transmission bandwidth of the first data stream, selecting the first output port from the multiple first candidate ports based on the port occupancy duration of each first candidate port in the second time period. The transmission bandwidth is obtained based on the transmission information of the first data stream in the spatial dimension.

[0028] In one possible implementation, the time-dimensional transmission information includes at least one of transmission period, arrival time, end time, or transmission duration, and the spatial-dimensional transmission information includes at least one of stream byte count or transmission bandwidth.

[0029] In one possible implementation, the first data stream includes the data stream generated during the training of the first model.

[0030] In one possible implementation, the first time period and the second time period correspond to different rounds of multi-round model training, and the first data stream includes the data stream generated during model training.

[0031] In one possible implementation, obtaining the transmission information of the first data stream in the first time period includes: collecting the transmission information of the first data stream in the first time period; or, receiving the transmission information sent by the training controller corresponding to the first data center, wherein the transmission information is determined based on the task configuration information of model training.

[0032] In one possible implementation, after determining the first output port for transmitting the first data stream in the second time period based on the transmission information of the first time period, the method further includes: determining the first queue of the first data stream at the first output port; and reducing the flow rate of the first data stream in the first queue if congestion occurs at the first output port.

[0033] In one possible implementation, the first output port is determined based on transmission information and the fault type of the second time period. The fault type includes at least one of the following: OTN optical path failure interconnecting the first and second data centers, output port link failure of the first data center, or fault within the second data center.

[0034] In one possible implementation, the transmission information of the first data stream in the first time period is also used to determine the transmission path of the first data stream within the first data center in the second time period.

[0035] In one possible implementation, after transmitting the first data stream based on the first output port in the second time period, the method further includes: obtaining the transmission information of the first data stream in the second time period; and updating the first output port according to the transmission information of the first data stream in the second time period if the transmission information of the first data stream in the second time period is different from the transmission information of the first data stream in the first time period.

[0036] Thirdly, a data stream transmission apparatus is provided, comprising: a transceiver module for performing receiving and / or sending related operations in the first aspect or any possible implementation of the first aspect; and a processing module for performing other operations besides the receiving and / or sending related operations in the first aspect or any possible implementation of the first aspect; or, a transceiver module for performing receiving and / or sending related operations in the second aspect or any possible implementation of the second aspect; and a processing module for performing other operations besides the receiving and / or sending related operations in the second aspect or any possible implementation of the second aspect.

[0037] In one possible implementation, when the data stream transmission device is used to execute the data stream transmission method provided in the first aspect, the processing module is used to acquire transmission information of the first data stream and the second data stream in a first time period, the first data stream and the second data stream are transmitted between a first data center and a second data center, and the transmission information includes transmission information of the first data stream and the second data stream in at least one dimension in the time dimension or the spatial dimension; the processing module is further used to determine a first output port for transmitting the first data stream and a second output port for transmitting the second data stream in a second time period based on the transmission information in the first time period; the transceiver module is used to transmit the first data stream in the second time period based on the first output port and transmit the second data stream in the second time period based on the second output port.

[0038] In one possible implementation, the processing module is configured to determine a first output port based on the routing information of the first data center in the second time period and the transmission information of the first data stream, and to determine a second output port based on the routing information of the first data center in the second time period and the transmission information of the second data stream. The routing information of the first data center in the second time period indicates the output port of the first data center and the port occupancy status of the output port of the first data center in the second time period. The port occupancy status includes at least one of port occupancy bandwidth in the spatial dimension or port occupancy duration in the time dimension.

[0039] In one possible implementation, the processing module is configured to select a first candidate port connected to the destination of the first data stream from the output ports of the first data center; and determine a first output port from the first candidate ports based on the transmission information of the first data stream and the port occupancy status of the first candidate ports in a second time period.

[0040] In one possible implementation, there are multiple first candidate ports. The processing module is used to determine the start time of the first candidate port transmitting the first data stream in the second time period based on the transmission information of the first data stream in the time dimension; determine the end time of the first candidate port transmitting the first data stream in the second time period based on the transmission information of the first data stream in the spatial dimension, the port occupancy status of the first candidate port in the second time period, and the start time of the first candidate port transmitting the first data stream in the second time period; and select a first output port from the multiple first candidate ports based on the end time of the first candidate port transmitting the first data stream in the second time period.

[0041] In one possible implementation, there are multiple first candidate ports. The processing module is used to determine the remaining bandwidth of the first candidate ports in the second time period based on the port occupancy bandwidth of the first candidate ports in the second time period; select a first output port from the first candidate ports whose remaining bandwidth is greater than the transmission bandwidth of the first data stream; or, if the remaining bandwidth of multiple first candidate ports in the second time period is less than the transmission bandwidth of the first data stream, select a first output port from the multiple first candidate ports based on the port occupancy duration of each first candidate port in the second time period, and the transmission bandwidth is obtained based on the transmission information of the first data stream in the spatial dimension.

[0042] In one possible implementation, the time-dimensional transmission information includes at least one of transmission period, arrival time, end time, or transmission duration, and the spatial-dimensional transmission information includes at least one of stream byte count or transmission bandwidth.

[0043] In one possible implementation, the first data stream includes the data stream generated from training the first model, and the second data stream includes the data stream generated from training the second model; or, the first and second data streams include the data stream generated from training the third model.

[0044] In one possible implementation, the first time period and the second time period correspond to different rounds of multi-round model training, and the first data stream and the second data stream include the data stream generated during model training.

[0045] In one possible implementation, the first data stream and the second data stream are transmitted through the same load-sharing port group in the first time period; or, the first data stream and the second data stream belong to the same computing task.

[0046] In one possible implementation, the processing module is used to collect the transmission information of the first data stream and the second data stream in a first time period; or, to receive the transmission information of the first data stream and the second data stream sent by the training controller corresponding to the first data center, wherein the transmission information is determined based on the task configuration information of model training.

[0047] In one possible implementation, the processing module is further configured to determine a first queue of the first data stream at the first output port and a second queue of the second data stream at the second output port; the transceiver module is further configured to reduce the flow rate of the first data stream on the first queue in the event of congestion at the first output port, and / or, reduce the flow rate of the second data stream on the second queue in the event of congestion at the second output port.

[0048] In one possible implementation, the first output port and the second output port are determined based on the transmission information and the fault type of the second time period. The fault type includes at least one of the following: OTN optical path failure interconnecting the first data center and the second data center, output port link failure of the first data center, or fault within the second data center.

[0049] In one possible implementation, the transmission information of the first data stream in the first time period is also used to determine the transmission path of the first data stream within the first data center in the second time period.

[0050] In one possible implementation, the processing module is further configured to acquire transmission information of the first data stream in a second time period; and, if the transmission information of the first data stream in the second time period differs from the transmission information of the first data stream in the first time period, update the first output port according to the transmission information of the first data stream in the second time period.

[0051] In one possible implementation, when the data stream transmission device is used to execute the data stream transmission method provided in the second aspect, the processing module is used to acquire transmission information of the first data stream in a first time period, the first data stream being transmitted between a first data center and a second data center, the transmission information including transmission information of the first data stream in at least one dimension in the time dimension or spatial dimension; the processing module is further used to determine a first output port for transmitting the first data stream in a second time period based on the transmission information of the first time period; and the transceiver module is used to transmit the first data stream in the second time period based on the first output port.

[0052] In one possible implementation, the processing module is configured to determine a first output port based on the routing information of the first data center in the second time period and the transmission information of the first data stream. The routing information of the first data center in the second time period indicates the output port of the first data center and the port occupancy status of the output port of the first data center in the second time period. The port occupancy status includes at least one of port occupancy bandwidth in the spatial dimension or port occupancy duration in the time dimension.

[0053] In one possible implementation, the processing module is configured to select a first candidate port connected to the destination of the first data stream from the output ports of the first data center; and determine a first output port from the first candidate ports based on the transmission information of the first data stream and the port occupancy status of the first candidate ports in a second time period.

[0054] In one possible implementation, there are multiple first candidate ports. The processing module is used to determine the start time of the first candidate port transmitting the first data stream in the second time period based on the spatial transmission information of the first data stream; to determine the end time of the first candidate port transmitting the first data stream in the second time period based on the temporal transmission information of the first data stream, the port occupancy status of the first candidate port in the second time period, and the start time of the first candidate port transmitting the first data stream in the second time period; and to select a first output port from the multiple first candidate ports based on the end time of the first candidate port transmitting the first data stream in the second time period.

[0055] In one possible implementation, there are multiple first candidate ports. The processing module is used to determine the remaining bandwidth of the first candidate ports in the second time period based on the port occupancy bandwidth of the first candidate ports in the second time period; select a first output port from the first candidate ports whose remaining bandwidth is greater than the transmission bandwidth of the first data stream; or, if the remaining bandwidth of multiple first candidate ports in the second time period is less than the transmission bandwidth of the first data stream, select a first output port from the multiple first candidate ports based on the port occupancy duration of each first candidate port in the second time period, and the transmission bandwidth is obtained based on the transmission information of the first data stream in the spatial dimension.

[0056] In one possible implementation, the time-dimensional transmission information includes at least one of transmission period, arrival time, end time, or transmission duration, and the spatial-dimensional transmission information includes at least one of stream byte count or transmission bandwidth.

[0057] In one possible implementation, the first data stream includes the data stream generated during the training of the first model.

[0058] In one possible implementation, the first time period and the second time period correspond to different rounds of multi-round model training, and the first data stream includes the data stream generated during model training.

[0059] In one possible implementation, the processing module is used to collect transmission information of the first data stream in a first time period; or, to receive transmission information sent by the training controller corresponding to the first data center, wherein the transmission information is determined based on the task configuration information for model training.

[0060] In one possible implementation, the processing module is further configured to determine the first queue of the first data stream at the first output port; the transceiver module is further configured to reduce the flow rate of the first data stream on the first queue in the event of congestion at the first output port.

[0061] In one possible implementation, the first output port is determined based on transmission information and the fault type of the second time period. The fault type includes at least one of the following: OTN optical path failure interconnecting the first and second data centers, output port link failure of the first data center, or fault within the second data center.

[0062] In one possible implementation, the transmission information of the first data stream in the first time period is also used to determine the transmission path of the first data stream within the first data center in the second time period.

[0063] In one possible implementation, the processing module is further configured to acquire transmission information of the first data stream in a second time period; and, if the transmission information of the first data stream in the second time period differs from the transmission information of the first data stream in the first time period, update the first output port according to the transmission information of the first data stream in the second time period.

[0064] Fourthly, a data stream transmission device is provided, the device including a processor and a memory coupled to the processor, the memory storing at least one instruction, and the processor loading and executing the at least one instruction to cause the data stream transmission device to perform the method of the first aspect or any possible implementation of the first aspect, or to perform the method of the second aspect or any possible implementation of the second aspect.

[0065] Fifthly, a computer-readable storage medium is provided, wherein at least one instruction is stored in the computer-readable storage medium, the instruction being loaded and executed by a processor to implement the data stream transmission method of the first aspect or any possible implementation thereof.

[0066] In a sixth aspect, a computer program (product) is provided, comprising computer program / instructions, which are executed by a processor to enable a computer to implement the data stream transmission method of the first aspect or any possible implementation thereof.

[0067] A seventh aspect provides a communication device comprising: a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other via an internal interconnection path. The memory stores instructions, and the processor executes the instructions stored in the memory to control the transceiver to receive and transmit signals. When the processor executes the instructions stored in the memory, it causes the processor to perform the method of the first aspect or any possible implementation thereof. Optionally, the communication device may be a chip.

[0068] Optionally, there may be one or more processors and one or more memories.

[0069] Alternatively, the memory can be integrated with the processor, or the memory can be set up separately from the processor.

[0070] In the specific implementation process, the memory can be a non-transitory memory, such as read-only memory (ROM), which can be integrated with the processor on the same chip or set on different chips. This application does not limit the type of memory or the way the memory and processor are set.

[0071] Eighthly, a chip is provided, including a processor for calling and running program instructions or code stored in a memory, causing a communication device on which the chip is installed to perform the methods in the foregoing aspects.

[0072] Ninthly, another chip is provided, comprising: an input interface, an output interface, a processor, and a memory, wherein the input interface, the output interface, the processor, and the memory are connected via an internal connection path, the processor being used to execute code in the memory, and when the code is executed, the processor being used to perform the methods in the above aspects.

[0073] In a tenth aspect, a data stream transmission system is provided, the data stream transmission system including a first data center and a second data center, wherein a device on the first data center is used to perform the method in the first aspect or any possible implementation of the first aspect, or to perform the method in the second aspect or any possible implementation of the second aspect.

[0074] It should be understood that the data stream transmission device mentioned in the third aspect above can be the chip mentioned in the eighth or ninth aspect, or the data stream transmission device can also be the device mentioned in the fourth aspect. The beneficial effects achieved by the technical solutions and corresponding possible implementations of the second to tenth aspects of this application can be found in the above description of the technical effects of the first aspect and its corresponding possible implementations, and will not be repeated here. Attached Figure Description

[0075] Figure 1 A schematic diagram of a data center connection is provided as an embodiment of this application;

[0076] Figure 2 A schematic diagram of an implementation environment provided for an embodiment of this application;

[0077] Figure 3 This is a schematic diagram of another implementation environment provided for an embodiment of this application;

[0078] Figure 4 A flowchart illustrating a data stream transmission method provided in an embodiment of this application;

[0079] Figure 5 This is another data center connection diagram provided as an embodiment of the present application;

[0080] Figure 6 This application provides another data center connection diagram.

[0081] Figure 7 A schematic diagram of a programming port provided for an embodiment of this application;

[0082] Figure 8 A schematic diagram illustrating a start time and an end time provided for an embodiment of this application;

[0083] Figure 9 A schematic diagram of back pressure provided for an embodiment of this application;

[0084] Figure 10 A flowchart illustrating yet another data stream transmission method provided in this application embodiment;

[0085] Figure 11 A schematic diagram of the transmission of a first data stream provided in an embodiment of this application;

[0086] Figure 12 A flowchart of a programming port provided in an embodiment of this application;

[0087] Figure 13 A schematic diagram of an output port arrangement result provided in an embodiment of this application;

[0088] Figure 14 A schematic diagram illustrating an iterative update of the output port arrangement results provided in an embodiment of this application;

[0089] Figure 15 A schematic diagram illustrating the reception of a first data stream and a fourth data stream provided in an embodiment of this application;

[0090] Figure 16 This is a schematic diagram of the structure of a data stream transmission device provided in an embodiment of this application;

[0091] Figure 17 This application provides a schematic diagram of the structure of a network device according to an embodiment of the present application.

[0092] Figure 18 This is a schematic diagram of another network device provided in an embodiment of this application. Detailed Implementation

[0093] The terminology used in the embodiments section of this application is only for explaining specific embodiments of this application and is not intended to limit this application. To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be further described in detail below with reference to the accompanying drawings.

[0094] In the field of computer technology, data centers are used to centrally process, store, transmit, exchange, and manage data. Data centers include facilities such as servers, storage devices, switches, routers, and firewalls, providing the computing resources required for data processing. However, as the scale of data processing continues to increase, situations arise where a single data center cannot provide the necessary computing resources. Taking the data processing involved in large-scale model training as an example, with the development of generative artificial intelligence (AI) technology, the computing power demand for large-scale model training is increasing daily. If a single data center is used to train a large model, the computing resources of that single data center will be exhausted. Therefore, when a single data center cannot provide the computing resources required for data processing, multiple data centers can be used to collaboratively process the data, for example, by collaboratively training large models across data centers.

[0095] In one possible scenario, when multiple data centers collaborate to process data, even if a single data center has a high-bandwidth, non-convergent network architecture, there will still be limitations on bandwidth and propagation time between data centers. Figure 1This is a schematic diagram of a data center connection provided in an embodiment of this application. Figure 1 Two data centers are shown, DC1 and DC2. The spine indicates the spine switch, the leaf indicates the leaf switch, the router (RTR) indicates the ingress / exgress device of the data center, and the rectangles connected under the leaf indicate the compute / storage servers.

[0096] Figure 1 The G indicates gigabit per second (Gbps), and the 4 indicates 4 in 4×8×200Gbps. Figure 1 The four arrow links in the diagram indicate that each arrow link corresponds to eight physical links, and 200Gbps indicates that the bandwidth of each physical link is 200Gbps. Therefore, Figure 1 The Leaf1 switch in the diagram includes 32 ingress ports, each with a bandwidth of 200Gbps. The 2×8×400Gbps specification indicates that the Leaf1 switch has a total of 2×8 = 16 egress ports, each with a bandwidth of 400Gbps. Based on... Figure 1 As can be seen, DC1 is a non-convergent network architecture, meaning that the input and output ports of devices within DC1 have the same bandwidth. For example, the input and output ports of the leaf1 switch both have a bandwidth of 6400Gbps.

[0097] However, convergence exists between DC1 and DC2, meaning that the total bandwidth of the ingress and egress ports of the input and output devices of DC1 and DC2 are different. Taking RTR1 on DC1 as an example, RTR1 connects two links, each link indicating two physical links, and each physical link has a bandwidth of 400Gbps. Therefore, RTR1 has 2×2=4 egress ports, each with a bandwidth of 400Gbps, and the total bandwidth of the egress ports of RTR1 is 1600Gbps. The total bandwidth of the ingress ports of RTR1 is 6400Gbps, and the convergence ratio between the ingress and egress ports of RTR1 is 4:1. This convergence ratio is also the convergence ratio between DC1 and DC2.

[0098] Optionally, convergence between data centers can affect the efficiency of data flow transmission between them. Furthermore, since the efficiency of data transmission between data centers directly impacts data processing efficiency, the efficiency of data transmission between different data centers may become a bottleneck in the overall data processing efficiency. Therefore, a method for data flow transmission between different data centers is urgently needed.

[0099] In one related technology, after receiving a data stream through the inlet port, the inlet / outlet device performs a hash calculation on the data stream's identifier information to obtain a hash result. Based on the mapping relationship between the hash result and the outlet port, it selects the corresponding outlet port for each data stream and uses the selected outlet port to transmit the data stream. However, when the number of data streams is small, for example, less than one thousand data streams, the above method may result in uneven hash distribution, leading to an imbalance in the number of data streams allocated to different outlet ports.

[0100] Continue with Figure 1 Taking the data center shown as an example, RTR1, acting as an ingress / egress device, has 32 data streams to be sent to DC2 through its egress ports. Each data stream is 200 gigabit (G) in size. Through hash calculation, 20 data streams are transmitted through the left egress port, and 12 data streams are transmitted through the right egress port. This uneven distribution of data streams across different egress ports leads to an uneven distribution of data streams across the links connected to each egress port, ultimately causing congestion on the links connected to the left egress port.

[0101] This application provides a data stream transmission method. Please refer to... Figure 2 The illustration shows a schematic diagram of the implementation environment of the data stream transmission method provided in this application embodiment. The implementation environment includes a first device 01 and a second device 02. The first device 01 is configured at the entrance and exit of the first data center, and the second device 02 is configured at the entrance and exit of the second data center. The first device 01 and the second device 02 establish a communication connection through a wired or wireless network, and data stream transmission between the first data center and the second data center can be realized based on the communication connection.

[0102] The first device 01 is used to execute the data stream transmission method provided in this application embodiment, acquire transmission information of the first data stream and the second data stream in a first time period, and determine the output ports corresponding to the first data stream and the second data stream in a second time period based on the transmission information. The first data stream and the second data stream are data streams transmitted between the first data center and the second data center.

[0103] also, Figure 2 This is intended to illustrate the cross-datacenter transmission process of the first and second data streams, and is not intended to limit the number of data centers. Data centers can be... Figure 2 The two shown can also be other quantities. Figure 3 This is a schematic diagram of another implementation environment provided by an embodiment of this application. Figure 3The diagram illustrates three data centers interconnected in pairs. Each data center employs a Layer 2 spine-leaf switch network, with several compute and storage servers connected to each leaf switch. Each data center deploys two data center interconnect (DCI) routers, with each DCI router connected to an optical transmission network (OTN) device to enable interconnection between DCI routers using the OTN equipment. Any DCI router in any data center can serve as... Figure 2 The first device 01 shown executes the data stream transmission method of the embodiments of this application. Figure 3 The DCI routers in this context can be referred to as border leaf nodes (BLs), where BLs refer to network devices such as routers and switches interconnected across data centers. Furthermore, the multiple data centers involved in this application can be... Figure 2 and Figure 3 The homogeneous data center shown can also be a heterogeneous data center, and the data center can be... Figure 2 or Figure 3 The non-convergent architecture shown can also be a convergent architecture; this application does not limit this.

[0104] Optionally, the first device 01 and the second device 02 can be any device with data transmission capabilities. The first device 01 and the second device 02 are servers, such as central servers, edge servers, or local servers in a local data center. The server can be a physical server or a cloud server providing cloud computing services. In some embodiments, the first device 01 and the second device 02 can be terminal devices such as desktop computers, laptops, or smartphones. Furthermore, the first device 01 and the second device 02 can also be switches, routers, etc. For example, the first device 01 and the second device 02 are metropolitan area routers or edge switches.

[0105] The first device 01 and the second device 02 can be independent devices or components within devices, such as transceivers, processors, or chips. Furthermore, the data stream transmission method provided in this application embodiment can be executed by one first device 01 or by multiple first devices 01; in some cases, multiple first devices 01 can be referred to as a device cluster.

[0106] This application provides a data stream transmission method, which can be applied to... Figure 2 or Figure 3 The implementation environment shown, taking the method executed by the first device 01 as an example, is illustrated in the flowchart below. Figure 4 As shown, it includes S401-S403.

[0107] S401, acquire the transmission information of the first data stream and the second data stream in a first time period. The first data stream and the second data stream are transmitted between the first data center and the second data center. The transmission information includes the transmission information of the first data stream and the second data stream in at least one dimension in the time dimension or the spatial dimension.

[0108] In one possible implementation, a first device configured at the entrance / exit of the first data center is used to transmit a first data stream and a second data stream. Optionally, the first and second data streams can be data streams generated by any computing task. They can be data streams generated by model training; for example, the first data stream is generated by training a first model, and the second data stream is generated by training a second model. The first and second models can be large models or other models used for data processing. The models generating the first and second data streams can be different models or the same model; for example, the first and second data streams may include data streams generated by training a third model. The first and second data streams can also be data streams generated by other computing tasks requiring distributed computing power collaborative processing. Distributed computing power collaborative processing refers to deployment within multiple data centers, with multiple data centers collaborating across a spatial dimension of hundreds to thousands of kilometers.

[0109] Regardless of how the first and second data streams are generated, they will be transmitted between the first and second data centers, constituting cross-data center data streams, where the first and second data centers are different data centers. This application does not limit the transmission direction of the first and second data streams; they can be transmitted from the first data center to the second data center, or vice versa.

[0110] Figure 5 This is a schematic diagram of data stream transmission provided in an embodiment of this application. Figure 5 The two data centers are DC1 and DC2, and RTR1 and RTR2 are the entry and exit devices for each data center, respectively. The data flow transmission direction is... Figure 5 The arrow indicates that the data is sent from the server in DC1 to RTR1, and then from RTR1 to RTR2. (This is in contrast to the previous sentence.) Figure 5 The data flow shown is from DC1 to DC2. The first data center can be... Figure 5 As shown, DC1, the first data center, can also be... Figure 5 DC2 is shown.

[0111] Regardless of the transmission direction of the first and second data streams, the first device can receive both data streams through its ingress port within a given time period. Taking the transmission direction of the first and second data streams as from the first data center to the second data center as an example, the first device can receive the first and second data streams sent by the network devices included in the first data center through its ingress port. The ingress port of the first device is the port connecting the first device to the network devices, which are different from the first device. Continuing with... Figure 5 For example, the first device is RTR1, and the network devices are the Spine1 switch and the Spine2 switch. The ingress port of the first device is... Figure 5 The white circular RTR1 icon indicates that the first device receives the first and second data streams sent by the Spine1 and Spine2 switches through the ingress port.

[0112] Taking the transmission direction of the first and second data streams as from the second data center to the first data center as an example, the first device can receive the first and second data streams sent by the second device configured at the entrance / exit of the second data center through its ingress port within a first time period. The ingress port of the first device is the port connecting the first device and the second device. Continuing with... Figure 5 For example, in this scenario, the first device is RTR2 and the second device is RTR1. Then the ingress port of the first device is... Figure 5 The black circular identifier for RTR2 is shown. RTR2 receives the first and second data streams sent by the spine1 and spine2 switches through its ingress port.

[0113] also, Figure 5 The white and black circular markings are intended to distinguish between inlet and outlet ports, not to indicate the number of inlet ports. There can be one or more inlet ports. For example, Figure 5 The meaning of 2×8×400G in the text and Figure 1 The meaning of 2×8×400G is similar, that is, although Figure 5 The code only uses one white circular identifier for the input port, but in reality, the RTR1, as the first device, has 2 × 8 = 16 input ports. For example, Figure 5 Although there are two black circular identifiers, the input ports of RTR2 can also be one, two, or more, with more being, for example, Figure 5 There are 2×2=4 input ports.

[0114] based on Figure 5 The black and white circular markers are not used to indicate the number of inlet ports of the first device. Figure 5The connections shown are intended to illustrate the existence of a connection between the first device and the device sending the first and second data streams, and are not intended to define the connection relationship. Taking the first device as an example... Figure 5 Taking RTR1 as an example, the Spine1 and Spine2 switches that send the first and second data streams can be connected to the same one or more ingress ports of RTR1, or they can be connected to different ingress ports. Taking RTR2 as another example, the RTR1 that sends the first and second data streams can be connected as follows: Figure 5 The diagram shows two input ports on the RTR2 connected via two ports. Other numbers of ports can also be used to connect to other numbers of input ports on the RTR2.

[0115] This application embodiment does not limit the correspondence between the ports for sending the first data stream and the second data stream and the ingress ports of the first device; it can be a one-to-one relationship. Figure 5 Taking RTR2 as the first device and the transmitted data stream as the first data stream as an example, RTR1 can send the first data stream to the same input port of RTR2 through the same port. Optionally, the correspondence between the ports sending the first and second data streams and the input ports of the first device can also be many-to-one or one-to-many. Continuing with... Figure 5 Taking RTR2 as the first device as an example, RTR1 can send the first data stream to one input port of RTR2 through two ports, or RTR1 can send the first data stream to both input ports of RTR2 through one port.

[0116] Furthermore, the first device receives the first data stream and the second data stream within the same time period, such as the first time period in the above embodiment. Receiving the first data stream and the second data stream within the same time period can mean that the individual data packets in the first data stream and the individual data packets included in the second data stream arrive at the ingress port simultaneously. Receiving the first data stream and the second data stream within the same time period can also mean that the individual data packets in the first data stream and the individual data packets included in the second data stream do not arrive at the ingress port simultaneously, but the arrival times of multiple data packets in the first data stream and the arrival times of multiple data packets in the second data stream overlap. For example, the ingress port of the first device first receives the first data packet in the first data stream, then receives the first data packet in the second data stream, then receives the second data packet in the first data stream, and then receives the second data packet in the second data stream.

[0117] Optionally, after the first device receives the first data stream and the second data stream in the first time period, since the first device has not yet arranged the corresponding output ports for the first and second data streams, the first device can select the output port for transmitting the first data stream and the output port for transmitting the second data stream from the output ports. The selection method can be through equal-cost multi-path (ECMP) selection or through first fit selection.

[0118] Regardless of how the first device selects the output port corresponding to the first data stream and the output port corresponding to the second data stream, the first device can send the first data stream to the output port corresponding to the first data stream, send the second data stream to the output port corresponding to the second data stream, and then continue transmitting the first and second data streams using the output ports. Figure 5 For example, the first device is RTR1, the first data stream is the data stream sent by the Spine1 switch, and the second data stream is the data stream sent by the Spine2 switch. The first device uses the first fit method to transmit the first data stream through the left output port and the second data stream through the right output port.

[0119] In addition to transmitting the first data stream and the second data stream for the first time period, the first device also acquires transmission information of the first data stream and the second data stream for the first time period. This transmission information describes the transmission status of the first data stream and the second data stream for the first time period, including transmission information of the first data stream and the second data stream in at least one dimension, either time or space. For example, the transmission information in the time dimension includes at least one of arrival time, end time, transmission period, or transmission duration, while the transmission information in the space dimension includes at least one of stream byte count or transmission bandwidth. The meaning of each piece of transmission information will be explained below using the first data stream as an example.

[0120] For example, the arrival time of the first data stream is the moment when the first data packet in the first data stream arrives at the ingress port, the end time of the first data stream is the moment when the last data packet in the first data stream arrives at the ingress port, and the transmission duration of the first data stream is the duration during which the first data stream occupies the ingress port, that is, the duration from the first data packet of the first data stream to the last data packet of the first data stream occupying the ingress port. Furthermore, "occupying the ingress port" means receiving the first data stream through the ingress port, but during the period when the first data stream occupies the ingress port, the ingress port can also receive data packets from other data streams.

[0121] In one possible scenario, the first data stream is a periodically transmitted data stream. Taking the first data stream as an example, which is the data stream generated during the training of the first model in the above embodiment, the training of the first model includes multiple rounds of training. Since each round of training generates a first data stream, the network device used for model training will periodically send the first data stream to the first device, and the first device will also periodically transmit the first data stream. In this case, the first data stream also has a transmission period, which indicates the interval duration of the first data stream, and in some cases it can also be called the interval period.

[0122] Optionally, the number of bytes in the first data stream refers to the number of bytes included in the first data stream, used to indicate the amount of data in the first data stream. The transmission bandwidth of the first data stream refers to the transmission rate of the first data stream, that is, the number of bytes of the first data stream transmitted per second, reflecting the flow rate of the first data stream reaching the ingress port of the first device. When the transmission direction of the first data stream is from the first data center to the second data center, and the first data center is a non-convergent data center, the transmission bandwidth is equal to the rate at which the graphics processing unit (GPU) card in the source device of the first data stream emits the first data stream. Regardless of the transmission information of the first and second data streams, the first device can obtain the transmission information of the first and second data streams through methods including but not limited to the following two methods.

[0123] Method 1: Collect the transmission information of the first data stream and the second data stream in the first time period.

[0124] Since the process by which the first device acquires the transmission information of the first data stream in the first time period is similar to the process by which the first device acquires the transmission information of the second data stream in the first time period, the process of the first device acquiring transmission information will be illustrated below using the first data stream as an example. In one possible implementation, the first data stream received by the first device carries identification information, which is used to distinguish different data streams. The identification information includes, but is not limited to, the 5-tuple of the data stream or the stream identifier.

[0125] Upon receiving a data packet, the first device parses the identification information carried in the data packet and determines the data stream to which the data packet belongs based on the identification information. If the first device extracts the identification information of the first data stream from a data packet for the first time within a first time period, it determines that the data packet is the first packet of the first data stream within the first time period and counts the time when the data packet was received as the arrival time of the first data stream. Afterward, the first device continues to receive data packets and continues to determine the data packets in the first data stream based on the identification information received from the data packets, ultimately determining the last data packet in the first data stream and using the time when the last data packet was received as the end time of the first data stream.

[0126] Optionally, if the last data packet in the first data stream carries an end identifier, the first device can determine that the received data packet is the last data packet in the first data stream when it obtains the end identifier from the data packet, and take the time of receiving the data packet as the end time. If the last data packet in the first data stream does not carry an end identifier, the first device can determine that the first data stream has ended transmission if it has not received any data packets in the first data stream within a first duration, and take the time at which the first data stream has ended transmission as the end time of the first data stream. Alternatively, the device can subtract the time at which the first data stream has ended transmission from the first duration, and take the difference as the end time of the first data stream.

[0127] For example, if the last data packet in the first data stream does not carry an end marker, the first device can also record the arrival time of each data packet received from the first data stream. The recording method could be, for example, recording the arrival time of each individual data packet, or recording the arrival time of a single data packet, and updating the recorded arrival time based on the arrival time of the latest received data packet after receiving data from the first data stream. Regardless of the method used by the first device to record the arrival times of the data packets in the first data stream, it can determine that the first data stream has ended transmission if no data packets from the first data stream are received within a first time period, and determine the end time of the first data stream based on the recorded arrival times.

[0128] If the first device records the arrival time of each data packet, the first device will use the latest arrival time as the end time of the first data stream. If the first device records the arrival time of a single data packet, the first device may use the recorded arrival time as the end time of the first data stream.

[0129] The first duration can be any duration less than the transmission period, set based on experience or implementation environment. Not receiving a data packet from the first data stream within the first duration can mean that the first device does not receive any data packet within the first duration, or it can mean that the first device receives a data packet within the first duration, but the received data packet does not carry the identification information of the first data stream, that is, the received data packet does not belong to the first data stream.

[0130] After calculating the end and arrival times, the first device can subtract the arrival time from the end time to obtain the transmission duration of the first data stream. Furthermore, after determining the data packets in the first data stream, the first device will also calculate the data length of each received data packet and sum the data lengths of each data packet to obtain the number of bytes in the first data stream. For the transmission bandwidth, the first device can divide the number of bytes in the stream by the transmission duration; the quotient is the transmission bandwidth of the first data stream. Regarding the transmission period, if multiple first data streams are received, the first device can determine the transmission period of the first data stream based on the difference between the arrival or end times of the multiple first data streams.

[0131] Taking the example of a first device receiving a first data stream in three time periods, namely time period 1, time period 2, and time period 3, the first device receives the first packet of the first data stream at time 1 in time period 1, at time 2 in time period 2, and at time 3 in time period 3. The first device determines the duration 1 between time 1 and time 2, determines the duration 2 between time 2 and time 3, and calculates the average of duration 1 and duration 2 to obtain the transmission period of the first data stream.

[0132] Furthermore, the transmission period of the first data stream can also be determined based on the arrival time of the first data stream. In addition, for cases where the first device calculates the transmission period of the first data stream based on the first data stream received in different time periods, the first device can obtain the transmission period before arranging the first output port corresponding to the first data stream, and can also update the transmission period of the first data stream based on the time of receiving the first data stream when the first data stream is transmitted using the first output port in the future.

[0133] Furthermore, the transmission information in this application embodiment can be divided not only by time or space dimensions, but also by acquisition method. In the above embodiments, some transmission information can be directly obtained from the transmission status of the first data stream, while other transmission information requires further calculation based on statistical information. Therefore, the transmission information can also include statistical information and stream characteristics. Statistical information includes, for example, arrival time, end time, and stream byte count, which can be directly statistically obtained by the first device. Stream characteristics calculated based on statistical information include, for example, transmission bandwidth, transmission period, and transmission duration.

[0134] Method 2: Receive the transmission information of the first and second data streams sent by the training controller corresponding to the first data center. The transmission information is determined based on the task configuration information for model training.

[0135] For the case where the first and second data streams are data streams generated for training the model, their transmission is related to the model training process. Therefore, the transmission information of the first data stream can be determined based on the task configuration information for model training. Since the processes for obtaining the transmission information of the first and second data streams are similar, we will use the first data stream as an example to illustrate the process of obtaining its transmission information based on the task configuration information for model training.

[0136] Figure 6 See also the diagram illustrating another data center connection provided in this application embodiment. Figure 6 The DC controller for managing DC and the training controller for managing model training are integrated on the same controller, that is... Figure 6 The DC & model training controllers are configured within the data center network (DCN) controller. The DC controller may be referred to as the data center network controller (DCN) in some cases, while the training controller may be referred to as the compute task controller. The DC & model training controllers connect to DC1 and DC2 respectively, and are used to control the collaborative training of the model by the connected DC1 and DC2. In one possible implementation, the DC & model training controllers receive task configuration information input by a tenant, who is either a user or owner of the data center. If a tenant needs to call upon the data center for model training, the tenant will first input the task configuration information into the DC & model training controllers. Optionally, the tenant can write model training code, in which parameters indicate the task configuration information, thereby allowing the DC & model training controllers to obtain the task configuration information input by the tenant.

[0137] In one possible scenario, the task configuration information specifies the training task configuration. This configuration includes, but is not limited to, resource requirements such as training model type, training model structure, model parameters, training data, training duration, number of training iterations, total number of GPUs required for training, and total storage. The total number of GPUs refers to the number of GPUs required for training. After determining the model training task based on the task configuration information, the DC& model training controller will also determine the first and second data centers used for collaborative training of the first model from the connected data centers, based on the computing node capability configuration information within the connected data centers. It will also determine the training tasks undertaken by the first and second data centers. In some cases, the determined training tasks may be referred to as the parallel configuration or aggregated communication configuration of the first and second data centers in training the first model. Subsequently, the DC& model training controller can determine the communication pair relationship and traffic concurrency relationship between the first and second data centers based on the training tasks undertaken by the first and second data centers. The traffic concurrency relationship indicates the first data stream generated and transmitted during the training of the first model, and the communication pair relationship indicates the transmission direction of the first data stream, such as the source and destination devices of the first data stream.

[0138] Optionally, the DC & model training controller determines the first model to be trained by the tenant and the total number of cards for model training based on the task configuration information. Then, the DC & model training controller is responsible for card pool resource scheduling within the first and second data centers, allocating the card resources required by the tenant for the task of training the first model, thus obtaining the training tasks undertaken by the first and second data centers during the training of the first model. Based on the default or automatically optimized deployment parameters for cluster parallel training, the aggregate communication parameters are determined. Using the principle of aggregate communication algorithms, the point-to-point communication relationship and communication order between cards are confirmed according to the aggregate communication parameters, i.e., the communication pair relationship between the first and second data centers. The DC & model training controller model executes path orchestration of the first data stream within the DC based on the determined inter-card communication relationship and communication order, obtaining the traffic concurrency relationship.

[0139] Furthermore, since the first data stream is generated based on training the first model, its transmission time is related to the training time of the first model. The DC& model training controller can determine the transmission period of the first data stream based on the training rounds of the first model, determine the arrival time of the first data stream based on the start time of a training round of the first model, and determine the end time of the first data stream based on the end time of a training round of the first model, thereby obtaining the transmission information of the first data stream in the time dimension. For the transmission information in the spatial dimension, such as the number of stream bytes, the DC& model training controller can further determine the number of stream bytes of the generated first data stream based on the traffic concurrency relationship.

[0140] After determining the transmission information of the first data stream, the DC& model training controller can send the transmission information to the first device to continue... Figure 6 Taking DC1 as the first data center and RTR1 as the first device as an example, DC and the model training controller are connected to RTR1. DC and the model training controller can send determined transmission information to RTR1, and RTR1 can then obtain the transmission information of the first data stream. Alternatively, DC and the model training controller can send the traffic concurrency relationship and communication pair relationship to the first device, and the first device can learn the transmission information based on the traffic concurrency relationship and communication pair relationship.

[0141] Furthermore, the embodiments of this application do not limit the timing of determining the transmission information based on the task configuration information. It can be before transmitting the first data stream. For example, after the DC & model training controller sends the transmission information to the first device, it issues a model training task to the relevant service nodes in DC1 and DC2 to start model training. The service nodes generate a first data stream based on the model training and send the first data stream to the first device so that the first device receives the first data stream in the first time period and triggers the operation of orchestrating the first data stream based on the first data stream, and starts executing S402. Optionally, the transmission information can also be obtained after transmitting the first data stream. For example, the DC & model training controller issues the model training task first and then sends the transmission information of the first data stream to the first device.

[0142] In some cases, the first device can choose either acquisition method one or acquisition method two to obtain the transmission information of the first data stream in the first time period, or it can combine acquisition methods one and two to obtain the transmission information of the first data stream. For example, acquisition method one can collect the arrival time and number of bytes of the first data stream based on its transmission status, acquisition method two can receive the transmission period and bandwidth of the first data stream, the transmission duration of the first data stream at the ingress port can be determined based on the transmission bandwidth and number of bytes of the first data stream, and the end time for the first device to receive the first data stream can be determined based on the transmission duration and arrival time.

[0143] S402, determine the first output port of the first data stream and the second output port of the second data stream for the second time period based on the transmission information of the first time period.

[0144] In one possible implementation, since the ingress and egress ports of the first device are connected to devices located in different data centers, these different data centers could mean that the ingress port of the first device connects to a network device in the first data center, and the egress port of the first device connects to a second device in the second data center. Figure 5The RTR1 shown can be located in different data centers. Alternatively, the first device's ingress port can connect to a second device in a second data center, and the first device's egress port can connect to a network device in the first data center. For example... Figure 5 The RTR2 shown.

[0145] Furthermore, since the bandwidth varies between different data centers and within data centers—meaning the ingress and egress ports of the first device have different bandwidths—the first device needs to orchestrate the first and second data streams received at the ingress ports to make reasonable use of the egress port bandwidth. This avoids uneven distribution of data streams across different egress ports when the egress port bandwidth is less than the ingress port bandwidth, leading to congestion at the egress port, or uneven distribution of data streams across different egress ports when the egress port bandwidth is greater than the ingress port bandwidth, resulting in unused bandwidth and low bandwidth utilization at the egress port.

[0146] Therefore, the first device can determine the first output port for the transmission of the first data stream and the second output port for the transmission of the second data stream in the second time period based on the transmission information of the first time period. By pre-arranging the output ports corresponding to different data streams, the device can rationally plan the data streams transmitted at different output ports and achieve load balancing on the output ports. The second time period is the period following the first time period. In the case of training the first model in multiple rounds, the second time period and the first time period correspond to different rounds in the multiple training rounds.

[0147] Optionally, the second time period can be any time period following the first time period during which the first data stream is transmitted. For example, the second time period can be the time period after the first device receives the first data stream in the first time period, and the next time it receives the first data stream. Other time periods can also exist between the second and first time periods, during which the first device also receives and transmits the first and second data streams. For example, the process by which the first device determines the first and second output ports includes: determining the first output port based on the routing information of the first data center in the second time period and the transmission information of the first data stream; and determining the second output port based on the routing information of the first data center in the second time period and the transmission information of the second data stream.

[0148] For example, the routing information of the first data center in the second time period indicates the outgoing ports of the first data center and their port occupancy at the second time point. Port occupancy includes at least one of port occupancy bandwidth in the spatial dimension or port occupancy duration in the temporal dimension. Here, the outgoing port of the first data center refers to the outgoing port of the first device within the first data center. In one possible implementation, since the second time period is a period following the current time, the first device obtaining the port occupancy of the first data center in the second time period can be understood as the first device predicting the port occupancy of the first data center in the second time period.

[0149] Optionally, the port occupancy of the first device in the second time period is related to the third data stream transmitted by the first device in the second time period and the fault status of the first device in the second time period. The fault status affects the total bandwidth of the first device's output ports, and the third data stream transmitted by the first device in the second time period affects the used bandwidth of the first device's output ports. Regarding the fault status, the first device can assume that there is no fault in the second time period; therefore, the total bandwidth of the first device's output ports is also the port bandwidth of the first device's output ports.

[0150] In one possible scenario, the first device can also consider different fault types, including at least one of the following: OTN network interconnection between the first and second data centers, outgoing port link failure in the first data center, or a fault within the second data center. Specifically, an OTN network failure might result in the link connecting the first and second devices still operating normally, but with reduced bandwidth; the total outgoing port bandwidth of the first device will also decrease due to this reduced bandwidth. A fault in the link connecting the outgoing port of the first data center will also lead to a reduction in the total outgoing port bandwidth. If a fault occurs within the second data center, priority-based flow control (PFC) is used during data transmission between the first and second data centers, and backpressure reduction is applied in the event of congestion, thus reducing the total outgoing port bandwidth.

[0151] Optionally, the first device can determine the port occupancy status of the output port in the second time period based on the historical orchestration results. The historical orchestration results are obtained by orchestrating the transmission information of the third data stream at historical moments. The third data stream is different from the first and second data streams. The process of determining the first and second output ports based on the transmission information of the first and second data streams in step S402 during the process of obtaining the historical orchestration results based on the transmission information of the third data stream is similar and will not be repeated here.

[0152] If there is no historical orchestration result at the current moment, for example, if the first device did not orchestrate the received third data stream at a historical moment, did not determine the output port for subsequent transmission of the third data stream, or did not receive the third data stream at a historical moment, then the first device determines that the port occupancy status of each output port in the second time period is empty, that is, the third data stream, which is different from both the first and second data streams, does not occupy the output ports of the first device in the second time period.

[0153] If historical orchestration results exist at the current moment, for example, if the first device orchestrated the received third data stream at a historical moment and determined the output port for subsequent transmission of the third data stream, the first device can predict the third data streams arriving at the first data center's input port in the second time period based on the transmission cycle and arrival time of each third data stream in the historical orchestration results. Furthermore, based on the output ports corresponding to each third data stream, the first device can determine which third data streams are transmitted at each output port in the first data center during the second time period, the total bandwidth occupied, and the expected end time of each third data stream.

[0154] Figure 7 This is a schematic diagram of data stream transmission provided in an embodiment of this application. Figure 7 Time 2 is the second time period, time 1 is the historical time period before the current time, data stream 1-data stream 5 are the third data stream, and data stream 6-data stream 8 are the first and second data streams to be arranged. Figure 7 The length of the box used to identify the data stream indicates the duration of the data stream, that is, the transmission duration at the ingress port, while the width indicates the flow rate of the data stream, that is, the transmission bandwidth of the data stream.

[0155] Based on the historical end times of data streams 1-5 and their transmission cycles, the first device determines the interval period of data streams 1-5, thus obtaining the next arrival time of data streams 1-5, which falls within the second time period. Therefore, it is determined that data streams 1-5 will be transmitted during the second time period. The first device then searches the pre-arranged results of data streams 1-5 to obtain the output ports used for transmission during the second time period: data stream 1 is transmitted through output port 1, data stream 2 through output port 2, data stream 3 through output port 1, data stream 4 through output port 2, and data stream 5 through output port 1. Finally, based on the flow rate of data streams 1-5, the port occupancy status of the first device's output ports during the second time period is determined, resulting in... Figure 7 The graph shows the occupancy status of the output ports. The first row of the graph indicates the data flow transmitted by output port 1 at different times, and the second row indicates the data flow transmitted by output port 2 at different times.

[0156] Regardless of the method by which the first device obtains the port occupancy status of its output ports in the second time period, the first device can determine the first output port of the first data stream and the second output port of the second data stream based on the port occupancy status, and the output port occupancy status can be determined by... Figure 7 The statistical chart shown can also be represented by a state matrix. Since the process of determining the first output port and the second output port is similar, we will take the first output port as an example to illustrate the process of determining the output port in the second time period based on the port occupancy status.

[0157] Optionally, the first device selects a first candidate port from the output ports of the first data center to connect to the destination of the first data stream; based on the transmission information of the first data stream and the port occupancy status of the first candidate ports in a second time period, a first output port is determined from the first candidate ports. In one possible scenario, the first device may include multiple output ports connected to different devices. Figure 3 Taking the first device shown as the input / output device of DC1 as an example, the first data stream needs to be sent to DC2, and the output port of the input / output device in DC1 is connected to DC2 and also connected to DC3.

[0158] Therefore, the first device will first select the output port connected to the destination of the first data stream from multiple output ports as the first candidate port. Connecting to the destination of the first data stream means that the first device is connected to the destination device of the first data stream; the connection can be indirect, continuing with... Figure 3 For example, if the destination device of the first data stream is the server in DC2, then the ingress / egress devices of DC1 (the first device) are connected to the ingress / egress devices of DC2. The ingress / egress devices of DC2 are then connected to a Spine switch and a Leaf switch, respectively, and finally connected to the server via the Leaf switch. This connection relationship achieves an indirect connection between the ingress / egress devices of DC1 and the server in DC2. Alternatively, the connection between the outgress port and the destination device can be direct; this embodiment does not limit this approach.

[0159] After selecting the first candidate port based on whether the output port is connected to the destination, since each first candidate port can send the first data stream sequentially to the destination, but the transmission efficiency of different first candidate ports varies, the first device will also select the first output port from the first candidate ports based on the port occupancy status of the first candidate ports in the second time period to ensure the transmission efficiency of the first data stream. The following example illustrates the process of selecting the first output port from multiple first candidate ports.

[0160] Method 1: Determine the start time of the first candidate port's transmission of the first data stream in the second time period based on the transmission information of the first data stream in the time dimension; determine the end time of the first candidate port's transmission of the first data stream in the second time period based on the transmission information of the first data stream in the spatial dimension, the port occupancy status of the first candidate port in the second time period, and the start time of the first candidate port's transmission of the first data stream in the second time period; select the first output port from multiple first candidate ports based on the end time of the first candidate port's transmission of the first data stream in the second time period.

[0161] Optionally, the first device first determines the arrival time of the first data stream in the second time period based on the transmission information of the first data stream in the time dimension. Taking the second time period as the next time period after the first time period as an example, if the arrival time of the first data stream in the first time period is 10:00:00 and the transmission period of the first data stream is half an hour, then the arrival time of the first data stream in the second time period is 10:30:00.

[0162] For example, the first device can use the arrival time of the first data stream in the second time period as the start time for each first candidate port to transmit the first data stream in the second time period. For instance, when the first device receives the first data stream, it will immediately start transmitting the first data stream. If there is unused remaining bandwidth on the first candidate port, it will directly use the remaining bandwidth to transmit the first data stream. If there is no unused remaining bandwidth on the first candidate port, it will preempt a portion of the bandwidth of the first candidate port for transmitting the first data stream. The preempted bandwidth can be determined based on the number of data streams transmitted by the first candidate port. If the first candidate port transmits a third data stream, half of the bandwidth will be used to transmit the first data stream, and the other half will be used to continue transmitting the third data stream. However, regardless of the port occupancy status of the first candidate port in the second time period, the first candidate port can start transmitting immediately after the arrival of the first data stream, that is, the start time of the first candidate port to transmit the first data stream and the arrival time of the first data stream in the second time period.

[0163] In one possible implementation, the first device may also determine the start time of the first candidate port's transmission of the first data stream in the second time period by combining the port occupancy status of the first candidate port in the second time period and the arrival time of the first data stream in the second time period. In some cases, if the first candidate port has no unused remaining bandwidth at the arrival time, that is, if the bandwidth is fully used, the first device will wait until the third data stream transmitted on the first candidate port finishes occupancy before starting to transmit the first data stream.

[0164] Therefore, after determining the arrival time of the first data stream in the second time period, the first device can first compare the port bandwidth occupied by the first candidate port at the arrival time with the total bandwidth. If the port bandwidth occupied is less than the total bandwidth, it means that there is still remaining bandwidth on any first candidate port, which can be used to transmit the first data stream. The arrival time of the first data stream on the first candidate port is the start time of the first data stream. If the port bandwidth occupied is equal to the total bandwidth, it means that there is no remaining bandwidth on any first candidate port. The first device must wait for any third data stream currently being transmitted on any first candidate port to finish transmitting before it can use the first candidate port to transmit the first data stream. Therefore, the first device can select the minimum port occupation time based on the port occupation time of the third data stream transmitted on any first candidate port at the arrival time, and add the port occupation time to the arrival time to obtain the start time of the first candidate port starting to transmit the first data stream in the second time period.

[0165] by Figure 8 For example, the third data stream includes data streams 1 through 5. If the first candidate port is output port 1 in the first row, although the first data stream arrives at output port 1 when data stream 1 begins transmission, output port 1 transmits data streams 1, 3, and 5 in the second time period, occupying all the bandwidth of output port 1. If output port 1 is used to transmit the first data stream, it must wait for data streams 1, 3, and 5 to finish transmission before it can begin transmitting the first data stream at time b. Similarly, if the first candidate port is output port 2 in the second row, output port 2 will only begin transmitting the first data stream after data streams 2 and 4 have finished transmission, i.e., at time a.

[0166] After determining the start time of the first data stream at each first candidate port, the first device can determine the duration of the first data stream's occupation at the first candidate port based on the transmission information of the first data stream in the spatial dimension. Taking the transmission information in the spatial dimension as the number of stream bytes as an example, the first device calculates the duration of the first data stream's occupation at the first candidate port based on the bandwidth and the number of stream bytes of the first data stream transmitted at the first candidate port.

[0167] The process of determining the occupancy duration is as follows: compare the remaining bandwidth of the first candidate port at the beginning with the transmission bandwidth of the first data stream. If the remaining bandwidth is not less than the transmission bandwidth, the first candidate port can send the first data stream outward at the flow rate of the first data stream arriving at the ingress port. The occupancy duration of the first data stream is the same as the transmission duration of the first data stream. The transmission duration of the first data stream at the ingress port can be used as the occupancy duration of the first data stream at the first candidate port.

[0168] If the remaining bandwidth is less than the transmission bandwidth, i.e., the outgoing port transmission bandwidth < the incoming port input bandwidth, the first device will buffer the data packets that cannot be transmitted temporarily and end the transmission of the third data stream on the first candidate port. When the remaining bandwidth of the first candidate port increases, the data packets buffered by the first device will be sent at the full rate of the latest remaining bandwidth. If the buffer is cleared and the second data stream has not yet finished transmitting (i.e., the incoming port is still receiving the second data stream), the first device will continue to transmit at the transmission rate corresponding to the smaller value between the data stream inlet flow rate and the remaining bandwidth until the data stream ends. The first device calculates the duration of the first data stream based on the above transmission principle.

[0169] After determining the duration of the first data stream's occupation on the first candidate port, the first device adds the occupation duration to the start time to obtain the end time of the first data stream, and then continues with... Figure 8 For example, Figure 8 The dashed box in the image indicates the first data stream; see [link / reference]. Figure 8 When the first data stream is transmitted through output port 1, the end time of the first data stream is time c; when the first data stream is transmitted through output port 2, the end time of the first data stream is time b. Furthermore, the above examples are intended to illustrate the process of calculating the end time of the first data stream at the first candidate port at the algorithm level, and are not intended to limit the actual packet transmission process of the first device transmitting the first data stream. The process of the first device transmitting the first data stream can be the same as the above calculation process, or it can be different.

[0170] Optionally, when the first device determines the end time of the first candidate port transmitting the first data stream in the second time period, it can select the first output port based on the end time of each first candidate port. For example, the selection process may involve choosing the first candidate port with the earliest end time as the first output port. Figure 8 Port 2 in the first data stream is used as the first output port of the first data stream.

[0171] Option 2: Determine the remaining bandwidth of the first candidate port in the second time period based on the port occupancy bandwidth of the first candidate port in the second time period; select the first output port from the first candidate ports whose remaining bandwidth is greater than the transmission bandwidth of the first data stream; or, if the remaining bandwidth of multiple first candidate ports in the second time period is less than the transmission bandwidth of the first data stream, select the first output port from the first candidate ports based on the port occupancy duration of each first candidate port in the second time period, with the transmission bandwidth obtained based on the transmission information of the first data stream in the spatial dimension.

[0172] Optionally, the remaining bandwidth of the first candidate port in the second time period refers to the remaining bandwidth of the first candidate port at the moment when the first data stream arrives at the ingress port of the first device during the second time period. Taking the second time period as 11:00:00-11:05:00 and the moment when the first data stream arrives at the ingress port of the first device as 11:00:00 as an example, outgress port 1 transmits data stream 1 from 11:00:00-11:01:00, occupying a port bandwidth of 100Gbps; outgress port 1 transmits data stream 2 from 11:01:00-11:02:00, occupying a port bandwidth of 100Gbps; and outgress port 1 transmits data stream 3 from 11:02:00-11:03:00, occupying a port bandwidth of 200Gbps. The total bandwidth of outgress port 1 is 200Gbps. Based on this, the first device determines that the remaining bandwidth of outgress port 1 at 11:00:00 is 100Gbps.

[0173] After determining the remaining bandwidth of each first candidate port, the first device compares the remaining bandwidth of each first candidate port with the transmission bandwidth of the first data stream. If the remaining bandwidth of a first candidate port is greater than the transmission bandwidth, the first candidate port with the largest remaining bandwidth or the first candidate port with the lowest bandwidth utilization is selected as the first output port. If the remaining bandwidth of no first candidate port is greater than the transmission bandwidth, meaning that none of the first candidate ports can immediately transmit the first data stream at the speed at which the first data stream arrives at the first device, the first device can determine which first candidate port can expand its bandwidth for transmitting the first data stream first and transmit the first data stream at the fastest rate, thus selecting the first output port. The timing of the bandwidth expansion for the first candidate port is determined based on the port occupancy time of each first candidate port.

[0174] Taking the first candidate ports as including outgoing port 1 and outgoing port 2, with a total bandwidth of 300Gbps for both, and the first data stream arriving at the first device at 11:00:00 as an example, the transmission bandwidth of the first data stream is 200Gbps. Outgoing port 1 transmits data streams 1 and 2 at 11:00:00, with each data stream occupying 100Gbps of port bandwidth. The port usage time for data stream 1 is 1 minute, and for data stream 2 is 2 minutes. Outgoing port 2 transmits data stream 3 at 11:00:00, with a port bandwidth of 200Gbps and a port usage time of 1 minute and 30 seconds.

[0175] In this scenario, both output ports 1 and 2 have a remaining bandwidth of 100Gbps at 11:00:00. The received first data stream can only be transmitted at 100Gbps. Since 100Gbps is less than 200Gbps, meaning the first device's transmission speed is lower than its reception speed, data packets in the first data stream may be buffered and not transmitted in time. Although both output ports 1 and 2 will cause data packet buffering in the second time period, data stream 1 on output port 1 finishes its usage first. Therefore, output port 1 can use its 200Gbps bandwidth to transmit the first data stream at 11:01:00. The first device can therefore choose output port 1 as the primary output port for transmitting the first data stream in the second time period.

[0176] Optionally, in addition to combining spatial and temporal transmission information to determine the first output port of the first data stream, the first device can also determine the first output port of the first data stream using only one dimension of transmission information. Taking temporal transmission information as an example, after determining the start time of the first data stream at each first candidate port using selection method one, the first device selects the first candidate port with the earliest start time as the first output port. Alternatively, the first device can select the first candidate port with the lowest bandwidth utilization as the first output port based on the bandwidth utilization of each first candidate port at the start time.

[0177] Taking spatial dimension transmission information as an example, the first device selects the first candidate port with a remaining bandwidth greater than the transmission bandwidth of the first data stream as the first output port based on the port occupancy status of the spatial dimension, that is, the port bandwidth occupied by the third data stream at the first candidate port and the transmission bandwidth of the first data stream.

[0178] Furthermore, the first device can perform stream-by-stream orchestration based on the transmission information of each data stream, determining the first output port of the first data stream and the second output port of the second data stream in the second time period. The first device can also integrate the transmission information of multiple data streams and orchestrate them as a whole. Taking method one as an example, the first device can sequentially allocate the first and second data streams to multiple candidate output ports, determine the start and end times of the first and second data streams under different allocation methods, then determine the latest end time from the end times of the first and second data streams, and finally determine the first output port of the first data stream and the second output port of the second data stream based on the latest end time.

[0179] Taking the first candidate port of the first data stream and the second candidate port of the second data stream as both being output port 1 and output port 2, output port 1 was not used to transmit the third data stream in the second time period, while output port 2 was used to transmit the third data stream in the second time period. The port bandwidth occupied by the third data stream at output port 2 is 100Gbps. The total bandwidth of output port 1 and output port 2 is 200Gbps. The transmission bandwidth of the first data stream is 200Gbps, and the transmission bandwidth of the second data stream is 100Gbps.

[0180] The allocation methods for the first and second data streams at output ports 1 and 2 include: Allocation Method 1, where both the first and second data streams are transmitted through output port 1; Allocation Method 2, where both the first and second data streams are transmitted through output port 2; Allocation Method 3, where the first data stream is transmitted through output port 1 and the second data stream through output port 2; and Allocation Method 4, where the first data stream is transmitted through output port 2 and the second data stream through output port 1. Because in Allocation Method 3, the first and second data streams can begin transmission immediately upon arrival at the first device, and the latest end time of Allocation Method 3 is earlier than the latest end time of the other allocation methods, the first device thus determines that the first output port of the first data stream in the second time period is output port 1, and the second output port of the second data stream in the second time period is output port 2.

[0181] This application embodiment does not limit the overall arrangement of the first and second data streams; all data streams can arrive within the same time period, with the first device receiving them within the first time period. Figure 7 The three data streams shown are data streams 6 to 8. Taking this as an example, the correspondence between data streams 6 and 8 can be that the first data stream is data stream 6, and the second data stream includes data streams 7 and 8. The first device can orchestrate the output ports corresponding to each of the three data streams as a whole, obtaining... Figure 7 The output port arrangement shown is that data streams 6 and 8 are assigned to output port 2, and data stream 7 is assigned to output port 1.

[0182] Optionally, the first data stream and the second data stream can also belong to the same computing task. In one possible scenario, after acquiring the transmission information, the first device can also determine the computing task to which the first and second data streams belong based on the transmission information. Since the arrival time and transmission cycle of different data streams for the same computing task follow a pattern, the first device can group and cluster the data streams according to the differences in their first arrival time and cycle to obtain the task labels to which the streams belong. Data streams with the same task labels belong to the same computing task. Based on this, the first device can determine the first and second data streams belonging to the same computing task from the multiple received data streams, and then perform overall orchestration at the computing task level to control the transmission efficiency of the data streams in the computing task and ensure the processing efficiency of the computing task. Alternatively, the first and second data streams can be transmitted through the same load-sharing outgoing port group in the first time period, that is, the next-hop device of the first and second data streams is the same. By orchestrating the data streams belonging to the same load-sharing outgoing port group as a whole, the transmission efficiency of the load-sharing outgoing port group is effectively improved.

[0183] For example, in addition to using the above method to arrange the first output port and the second output port, the first device can also use other algorithms, such as greedy algorithms, linear programming, or other resource allocation algorithms under both time and space dimensions.

[0184] Furthermore, the above examples are intended to illustrate the process of orchestrating the first output port of the first data stream and the second output port of the second data stream based on the transmission information, and are not intended to limit the execution entity performing the orchestration. It can be the first device in the above embodiments, or other devices, such as... Figure 6 As shown, Figure 6 The control architecture consists of a three-tiered controller system: a model training controller, an intra-DC network controller, and an inter-DC Internet Protocol (IP) network controller. This system reports transmission information to... Figure 6 The illustrated wide area IP network controller enables the orchestration of the first and second outgoing ports from a global perspective. This global perspective includes, for example, flow-level cross-DC switch device mapping relationships and port mapping relationships. The end-to-end path planned using the wide area IP network controller is applicable to various scenarios, such as one-hop direct connection of data center interconnect (DCI) devices to private networks or wide area networks. The wide area IP network controller can receive transmission information sent by the first device, such as... Figure 6As shown, the DC& model training controller sends transmission information to the Spine switch, the Spine switch sends transmission information to RTR1 (the first device), RTR1 sends transmission information to the WAN IP network controller, and the WAN IP network controller can also receive transmission information sent by the DC& model training controller.

[0185] S403, transmit the first data stream based on the first output port in the second time period, and transmit the second data stream based on the second output port in the second time period.

[0186] Optionally, after determining the first output port for transmitting the first data stream and the second output port for transmitting the second data stream, the first device may, upon receiving the first data stream in the second time period, send the first data stream to the second output port to continue transmitting the first data stream through the second output port. In some cases, after determining the second output port corresponding to the first data stream, the first device may also construct a mapping relationship between the data stream and the output port to obtain the output port orchestration result. Optionally, the output port orchestration result may be represented in the form of a flow table, access control list (ACL) rules, or tunneling policy, etc. After receiving the first data stream, the first device extracts the identification information of the first data stream, searches for the identification information in the output port orchestration result, and uses the output port where the identification information matches as the first output port.

[0187] In one possible implementation, the first device also updates the output port orchestration result. Taking the first data stream as an example, the first device obtains the transmission information of the first data stream in the second time period. If the transmission information of the first data stream in the second time period differs from the transmission information of the first data stream in the first time period, the first output port is updated according to the transmission information of the first data stream in the second time period. The process of obtaining the transmission information of the first data stream in the second time period is similar to the process of obtaining the transmission information of the first data stream in the first time period, and can be found in the relevant description in S401, which will not be repeated here.

[0188] After acquiring the transmission information of the first data stream in the second time period, the first device can compare the transmission information of the second time period with the transmission information of the first time period. If the transmission information of the second time period differs from that of the first time period, the device re-executes operation S402 to determine the first output port corresponding to the first data stream in a subsequent time period, thereby updating the first output port. The transmission information referenced in re-executing operation S402 can be the transmission information of the second time period or transmission information obtained by processing the transmission information of the second and first time periods. Taking the transmission information as a transmission cycle as an example, the first device can calculate a new transmission cycle based on the arrival time of the first data stream in the second time period and the arrival time of the first data stream in the first time period. Using the new transmission cycle, the device redetermines the time period for the next arrival of the first data stream at the first device. Based on the port occupancy status of the output port in the next arrival time period, the device determines the first output port corresponding to the first device.

[0189] For example, updating the output port orchestration result can also be performed when a fourth data stream, which is different from the first and second data streams, is received. Since the fourth data stream is the first data stream to arrive, after the first device fails to find the corresponding output port based on the identification information of the fourth data stream, it first selects the output port of the fourth data stream from the output ports, then counts the transmission information based on the transmission status of the fourth data stream at the current moment, determines the third output port corresponding to the fourth data stream in the next time period based on the transmission information, and writes the mapping relationship between the fourth data stream and the third output port into the output port orchestration result.

[0190] In one possible implementation, the first device can also send the outgoing port orchestration results to the wide area IP network controllers of the first and second data centers for updates. For example... Figure 6 As shown, the wide area IP network controller performs secondary learning based on the outgoing port orchestration results and the set of computing task communication pairs and the flow concurrency relationship reported by the DC & model training controller in acquisition method two to optimize the flow learning output accuracy, obtain the optimized transmission information, and execute flow orchestration planning based on the optimized transmission information, update the outgoing port orchestration results, and send the updated outgoing port orchestration results to the first device.

[0191] Optionally, since the first device may have errors in autonomously learning transmission information such as flow rate and transmission period of the first data stream, the group labeling of the computational tasks determined based on the erroneous transmission information may also be inaccurate. Therefore, the wide area IP network controller can correct the computational task group labels of the first data stream based on the set of computational task communication pairs reported by the DC & model training controller. Based on the flow concurrency relationship reported by the DC & model training controller, the flow model established based on flow rate and transmission period is aligned using the flow concurrency relationship, reducing the impact of acquisition errors at the start and end times and transmission periods of multiple flows, thereby optimizing the accuracy of flow learning output and obtaining optimized transmission information.

[0192] In one possible scenario, after determining the first output port corresponding to the first data stream and the second output port corresponding to the second data stream, the first device can also perform other processing using the output port orchestration results. This other processing could include constructing transmission queues. For example, the first device could determine a first queue for the first data stream at the first output port and a second queue for the second data stream at the second output port; if congestion occurs at the first output port, the device could reduce the flow rate of the first data stream in the first queue, and / or, if congestion occurs at the second output port, the device could reduce the flow rate of the second data stream in the second queue.

[0193] Optionally, during the transmission of the first and second data streams, the first device may also employ a PFC (Pressure Factorization) mechanism to ensure packet loss-free network operation. For example, if congestion occurs at the outgoing port from the first device's next-hop device to the next-next-hop device, the next-hop device sends a PFC backpressure frame to the first device, notifying it to suspend data packet transmission to the next-hop device. Upon receiving the PFC backpressure frame, the first device stops transmitting data packets or reduces the data packet transmission rate at its outgoing port to prevent the next-hop device from being unable to receive and process data packets in a timely manner, thus avoiding packet loss at the next-hop device. Subsequently, after the congestion at the outgoing port from the next-hop device to the next-next-hop device is relieved, the next-hop device removes the backpressure frame, for example, by sending a release frame indicating the removal of backpressure to the first device. The first device then resumes transmitting data packets to the next-hop device or increases the data packet transmission rate to the next-hop device.

[0194] However, if the reduction in transmission rate by the first device is done at the output port level, it can easily lead to head-blocking, meaning the first device itself may also become congested. Therefore, flow and backpressure can be applied to the output ports of the first device to effectively constrain the spread of network congestion through precise flow control. For example, for each data stream transmitted on the output port, an independent transmission queue can be allocated. Then, when congestion occurs at the output port, only the transmission queue corresponding to that data stream can be backpressured, preventing the backpressure signal from propagating to the transmission queues of other data streams and causing backpressure on other data streams. This achieves precise flow-level control.

[0195] Based on this, after obtaining the outgoing port orchestration results, the first device can determine the data stream transmitted on any outgoing port according to the outgoing port orchestration results, and dynamically allocate the corresponding number of queue resources as needed according to the transmission status of the data stream on the outgoing port, thus obtaining the transmission queue corresponding to the data stream. There are at least two transmission queues on any outgoing port. The relationship between data streams and transmission queues can be one-to-one, for example, the first data stream corresponds to the first queue, and the second data stream corresponds to the second queue. The relationship between data streams and transmission queues can also be many-to-one, for example, multiple data streams correspond to one transmission queue. In some cases, the transmission queue can also be called a priority queue (pq).

[0196] By constructing a transmission queue, queue-level backpressure, which is finer than port-level backpressure, can be achieved in the event of a failure in the next-hop device connected to the output port of the first device. Figure 9 A schematic diagram of a back pressure process provided in an embodiment of this application is shown below. Figure 9 The first device performs operation S401 to realize online stream learning, and performs operation S402 to perform stream orchestration planning. Then, it can manage queue resources based on the orchestration results of the output ports. Figure 9 The device receives four data streams (q1-q4) from its two input ports. Output port 1 transmits q1 and q4, and output port 2 transmits q2 and q3. The first device allocates corresponding queue resources for each data stream transmitted on the input and output ports. Subsequently, if congestion occurs at output port 1, it applies backpressure to q1 on output port 1, reducing the transmission rate of q1 from both input and output ports. This reduction is achieved, for example, by sending backpressure information corresponding to q1 to input port 1 through the transmission queue containing q1. Based on this, input port 1 reduces the rate at which it transmits q1 to output port 1, thus achieving... Figure 9 The pq queue-level backpressure is shown.

[0197] Furthermore, the above examples are intended to illustrate the process of orchestrating ports using transmission information, rather than to limit the use of transmission information. The transmission information acquired by the first device can be used not only for orchestrating ports but also for orchestrating the transmission path of the first data stream within the first data center. For example, the first device sends the transmission information to network devices within the first data center, which then perform intra-DC routing calculations based on the transmission information of the first data stream. Alternatively, the DC & model training controller performs intra-DC routing calculations based on the transmission information and sends the routing results to the network devices within the first data center. The transmission information used by the DC & model training controller can be the transmission information determined by the DC & model training controller based on the training configuration information, or it can be the transmission information sent by the first device to the DC & model training controller.

[0198] In summary, the data stream transmission method provided in this application uniformly arranges the output ports corresponding to multiple data streams, including a first data stream and a second data stream, thereby achieving load balancing of multiple data streams at the output ports and improving the throughput between the first data center and the second data center. Furthermore, since the transmission information reflects the actual transmission status of the first and second data streams in a first time period, the output ports selected based on the actual transmission status can also be dynamically adjusted as the data stream transmission changes, exhibiting adaptive balancing capabilities and high versatility.

[0199] This application does not limit the dimensions considered in determining the first and second output ports; they can be determined based on at least one of the time or spatial dimensions, offering high flexibility. It provides a connection architecture for the training controller, wide area network controller, and data center. Under this architecture, end-to-end network communication is integrated and coordinated. The wide area network controller can optimize the orchestration results of the output ports determined by the first device, thereby resolving scheduling conflicts between data centers and within data intermediaries through global centralized adjustment and optimization, further improving network throughput. Flow-level rerouting orchestration is also implemented for potential fault scenarios to ensure rapid convergence under fault conditions.

[0200] This application provides another data stream transmission method, which can be applied to... Figure 2 or Figure 3 The implementation environment shown, taking the method executed by the first device 01 as an example, is illustrated in the flowchart below. Figure 10 As shown, it includes S1001-S1003.

[0201] S1001, Obtain the transmission information of the first data stream in the first time period. The first data stream is transmitted between the first data center and the second data center. The transmission information includes the transmission information of the first data stream in at least one dimension of the time dimension or the spatial dimension.

[0202] In one possible scenario, the first device includes a forwarding plane and a control plane. The first device receives a first data stream through the forwarding plane in a first time period and sends the first data stream to a selected output port, using the output port to continue transmitting the first data stream. The first data stream may be a data stream generated during training of a first model. The process of the forwarding plane forwarding the first data stream is similar to the process of the first device forwarding the first data stream in S401, and can be found in the relevant description, which will not be repeated here.

[0203] Optionally, in addition to forwarding the first data stream for the first time period using the forwarding plane, the first device also acquires the transmission information of the first data stream for the first time period. The transmission information in the time dimension includes at least one of transmission period, arrival time, end time, or transmission duration, and the transmission information in the spatial dimension includes at least one of stream byte count or transmission bandwidth. For a description of the transmission information, please refer to the description of transmission information in S401, which will not be repeated here.

[0204] In one possible implementation, the first device can collect transmission information of the first data stream during a first time period. For example, when the first data stream first arrives at the forwarding plane of the first device, that is, when it arrives at the forwarding plane during the first time period, a flow statistics entry for the first data stream is generated. The entry includes the identification information and statistical information of the first data stream. The identification information is, for example, five-tuple information, such as source IP address, destination IP address, source port, destination port, and protocol number. The statistical information includes the number of bytes in the stream, arrival time, and end time. See Table 1 for the flow statistics entries collected by the forwarding plane.

[0205] Table 1

[0206] Source IP address Destination IP address Source port Destination port Protocol number Stream byte count Arrival time End time 125.15.2.1 125.15.3.1 6001 6002 17 b1 t1 t1+1.75 125.15.2.2 125.15.3.2 6001 6002 17 b2 t2 t2+1.75 ……

[0207] After acquiring flow statistics entries, the forwarding plane of the first device can send these entries to the control plane. The control plane then performs online flow learning based on these entries to determine the flow features included in the transmission information, thereby obtaining the transmission information of the first data stream. The flow features learned by the control plane include ingress port, flow identifier (source-destination pair), flow rate, duration, interval period, and computational task. The flow rate corresponds to the transmission bandwidth in the above embodiments, the duration corresponds to the transmission duration in the above embodiments, and the interval period corresponds to the transmission period in the above embodiments.

[0208] In one possible implementation, the first device may also receive transmission information sent by the training controller corresponding to the first data center. This transmission information is determined based on the task configuration information for model training. For example, the training controller acquires the task configuration information and the capability configuration information of the computing nodes within the data center. Based on the task configuration information and capability configuration information, the training controller determines the parallel configuration information of the model training task. Based on the parallel configuration information, it determines the communication pair relationship and traffic concurrency relationship between the first and second data centers, obtains the transmission information of the first data stream, and notifies the first device of the transmission information to assist the first device in achieving more accurate stream learning.

[0209] S1002, determine the first output port for transmitting the first data stream in the second time period based on the transmission information of the first time period.

[0210] Regardless of how the control plane of the first device obtains the transmission information of the first data stream in the first time period, it can plan the first output port of the first data stream in the second time period based on the transmission information of the first data stream. The first and second time periods correspond to different rounds of multi-round model training. Optionally, the first device can determine the first output port based on the routing information of the first data center in the second time period and the transmission information of the first data stream. The routing information of the first data center in the second time period indicates the output port of the first data center and its port occupancy status in the second time period. The port occupancy status includes at least one of port occupancy bandwidth in the spatial dimension or port occupancy duration in the temporal dimension.

[0211] Optionally, the first device can construct a flow model of the first data stream based on the transmission information of the first data stream. The flow model indicates when the first data stream arrives at which ingress port, the duration of its occupancy at the ingress port, and the flow rate at the ingress port. The control plane of the first device can construct a flow model for each first data stream, or it can construct a flow model for multiple data streams. The multiple data streams include the first data stream. The multiple data streams can be data streams of the same computing task, or data streams transmitted through the same load-sharing outgress port group. Figure 11 This application provides a flow model for multiple data streams in a computational task, as illustrated in the embodiments of this application. (See also...) Figure 11 The computing task generates eight data streams during one round of execution, two of which arrive at the forwarding plane of the first device simultaneously.

[0212] The first device is as follows Figure 12 As shown, after determining the flow model through online flow learning, flow orchestration planning can be performed to determine the first outgoing port of the first data flow in the second time period, thus obtaining the flow table. For example, since the first device also considers the fault type of the first device in the second time period during the process of obtaining routing information, that is, the first device will perform [fault-related steps] before executing flow orchestration planning. Figure 12 The fault mode pre-learning and encoding process, as shown, involves enumerating all possible fault types for the first device and selecting k fault types from these through static fault mode analysis and pattern learning based on historical data. k can be any positive integer, and the first k fault types are called the top k. The top k fault types selected by the first device include, but are not limited to, OTN optical path faults, outgoing port faults of the first data center, and faults in the second data center (i.e., remote faults). The first device then encodes each fault type to obtain a fault mode code. The fault mode code can indicate whether a fault exists (e.g., 0 indicates no fault, 1 indicates a fault). The fault mode code can also indicate the fault type (e.g., 0 indicates an OTN optical path fault, 1 indicates an outgoing port fault, and 2 indicates a remote fault).

[0213] The embodiments of this application do not limit the execution order of fault model pre-learning and encoding, and can be as follows: Figure 12 As shown, fault model pre-learning and encoding can be performed before online stream learning, or after online stream learning. That is, the control plane of the first device first performs stream learning based on the statistical information reported by the forwarding plane to obtain the transmission information before selecting the fault type and performing fault encoding.

[0214] Regardless of whether the first device considers the impact of a fault on the routing information of the first data center, the first device can determine the first output port of the first data stream in the second time period based on the routing information of the first data center and the transmission information of the first data stream in the first time period. Optionally, the first device can select a first candidate port connected to the destination of the first data stream from the output ports of the first data center; and determine the first output port from the first candidate ports according to the transmission information of the first data stream and the port occupancy status of the first candidate ports in the second time period.

[0215] The process by which the control plane determines the first candidate port from the output ports is similar to the process in S402 where the first device determines the first candidate port from the output ports; see the relevant description for details, and will not be repeated here. After determining the first candidate port, the control plane can select one of the multiple first candidate ports as the first output port if there are multiple first candidate ports. Optionally, the selection process of the control plane includes: determining the start time of the first candidate port transmitting the first data stream in the second time period based on the transmission information of the first data stream in the time dimension; determining the end time of the first candidate port transmitting the first data stream in the second time period based on the transmission information of the first data stream in the spatial dimension, the port occupancy status of the first candidate port in the second time period, and the start time of the first candidate port transmitting the first data stream in the second time period; and selecting the first output port from the multiple first candidate ports based on the end time of the first candidate port transmitting the first data stream in the second time period. The specific selection process is similar to the selection process shown in Method 1 of S402; see the relevant description for details, and will not be repeated here.

[0216] For example, the first device may also select a first output port from the first candidate ports in the following manner: for instance, determining the remaining bandwidth of the first candidate port in the second time period based on the port occupancy bandwidth of the first candidate port in the second time period; selecting the first output port from the first candidate ports whose remaining bandwidth is greater than the transmission bandwidth of the first data stream; or, if the remaining bandwidth of multiple first candidate ports in the second time period is less than the transmission bandwidth of the first data stream, selecting the first output port from the multiple first candidate ports based on the port occupancy duration of each first candidate port in the second time period, wherein the transmission bandwidth is obtained based on the transmission information of the first data stream in the spatial dimension. The process of selecting the first output port based on the remaining bandwidth is similar to the selection process shown in Method 2 in S402, and can be found in the relevant description, which will not be repeated here.

[0217] S1003, transmit the first data stream in the second time period based on the first output port.

[0218] Optionally, after determining the first output port corresponding to the first data stream, the control plane of the first device will also generate an output port arrangement result, which includes the identification information of the data stream and the corresponding output port. Figure 13 This is a schematic diagram of an output port arrangement result provided in an embodiment of this application. Figure 13 The source IP, destination IP, source port, destination port, and protocol number in the data stream are its identification information. The orchestration result for the outgoing port is... Figure 13 The table structure shown, and the outgoing port arrangement result, can also be called the forwarding plane flow table.

[0219] The control plane of the first device sends the output port orchestration results to the forwarding plane, that is... Figure 12 In the flow table, after receiving the first data stream, the forwarding plane can search the output port arrangement results based on the five-tuple identifier information of the first data stream, identify the fault mode code according to the device fault scenario in the second time period, and thus determine the first output port corresponding to the first data stream. Taking the source IP of the first data stream as 125.15.2.1, the destination IP as 125.15.3.1, the source port as 6001, the destination port as 6002, and the protocol number as 17 as an example, if a fault occurs during the transmission of the first data stream in the second time period, that is, the fault mode code is 1, the first device determines that the first output port corresponding to the first data stream is p3. If no fault occurs during the transmission of the first data stream in the second time period, that is, the fault mode code is 0, the first device determines that the first output port corresponding to the first data stream is p1.

[0220] In one possible scenario, after forwarding the first data stream in the second time period, the forwarding plane of the first device will also acquire the transmission information of the first data stream in the second time period. If the transmission information of the first data stream in the second time period differs from the transmission information of the first data stream in the first time period, the first output port will be updated based on the transmission information of the first data stream in the second time period. The process of updating the first output port based on the transmission information in the second time period is similar to the process of the first device updating the first output port based on the transmission information in the second time period in S403, and can be found in the relevant description, which will not be repeated here.

[0221] Optionally, if the identification information of the data stream received by the forwarding plane of the first device does not match any entry in the outgoing port orchestration result, that is, if the data stream received by the forwarding plane is the fourth data stream, in this case, the forwarding plane can proceed as follows: Figure 12 The fourth data stream is forwarded using load balancing schemes such as ECMP or FirstFit, and online flow learning is performed iteratively in the current round to trigger re-orchestration of the flow and update the outgoing port orchestration results. Based on the outgoing port orchestration results, the historical orchestration results in S402 are also used to determine the outgoing port occupancy status. The first device can generate a port occupancy status matrix of the outgoing port orchestration results, so that the first device can subsequently orchestrate the third outgoing port corresponding to the fourth data stream based on the port occupancy status matrix.

[0222] Figure 14 This is an example diagram of the operation of a first device provided in an embodiment of this application. The following will be combined with... Figure 14 For an explanation of the process of updating the output port orchestration results of the first device, please refer to [link / reference]. Figure 14 After receiving the first data stream in the first time period, the first device collects stream information and performs stream learning on the collected statistical information to obtain transmission information. The first data stream collected by the first device can be found in [reference needed]. Figure 15 , Figure 15 Data streams 1 through 9 in the data streams are the first data stream.

[0223] Subsequently, the control plane of the first device performs flow planning based on the transmission information to obtain the output port orchestration result. This result is then sent to the forwarding plane of the first device. During the reception of the first and fourth data streams in the second time period, the first data stream that is matched is forwarded using the determined first output port, and the transmission information of the first data stream in the second time period is collected to obtain the updated transmission information. For the fourth data stream that is not matched, it is forwarded according to ECMP, and the transmission information of the fourth data stream in the second time period is collected. Optionally, Figure 15 The fourth data stream in the second time period is also shown, which is data stream 10.

[0224] After the forwarding plane collects the transmission information of the first data stream and the fourth data stream in the second time period, if it does not receive the data stream within the timeout period, it determines that the transmission of the data stream in the second time period has ended. If the currently collected transmission information meets the reporting conditions, it reports the updated transmission information of the first data stream and the transmission information of the fourth data stream to the control plane, and the control plane updates the port orchestration result based on the received transmission information.

[0225] In one possible implementation, the output port orchestration result obtained by the control plane of the first device can be used not only for transmitting data streams but also to determine the first queue of the first data stream at the first output port. In the event of congestion at the first output port, the flow rate of the first data stream in the first queue is reduced. The process of allocating the first queue and controlling the flow rate is similar to the process of allocating the first queue and controlling the flow rate in S403, and can be found in the relevant description, which will not be repeated here.

[0226] In summary, the data stream transmission method provided in this application pre-arranges the first output ports corresponding to the first data stream, clearly defining the data stream to be transmitted on each output port, thereby achieving load balancing of the output ports on the first data center and improving the throughput between the first and second data centers. Furthermore, since the transmission information reflects the actual transmission status of the first data stream in the first time period, the first output port selected based on the actual transmission status can also be dynamically adjusted as the transmission of the first data stream changes, exhibiting adaptive balancing capabilities and high versatility. This application does not limit the dimensions considered in determining the first output port; it can consider at least one dimension, either time or space, offering high flexibility. Flow-level rerouting orchestration is also performed for potential fault scenarios to ensure rapid convergence under fault conditions.

[0227] This application is only for the purpose of... Figure 4 and Figure 10 The two embodiments illustrate the cases of determining the output port in the second time period for two data streams and a single data stream, respectively. However, in practical applications, this data stream transmission method can be applied to scenarios with multiple data streams, for example... Figure 7 The three data streams shown, or other numbers of data streams, are not limited to the embodiments of this application.

[0228] The data stream transmission method of the present application embodiments has been described above. Corresponding to the above method, the present application embodiments also provide a data stream transmission device. Figure 16 This is a schematic diagram of the structure of a data stream transmission device provided in an embodiment of this application. Based on Figure 16 The following modules are shown. Figure 16 The data stream transmission device shown is capable of performing the above. Figure 4 or Figure 10All or part of the operations shown. It should be understood that the device may include more additional modules than those shown, or may omit some of the modules shown; this application embodiment does not impose limitations in this regard. For example... Figure 16 As shown, the device includes:

[0229] Transceiver module 1601 is used to perform... Figure 4 The processing module 1602 is used to execute the receiving and / or sending related operations in the data stream transmission method shown. Figure 4 Other operations besides the receive and / or send-related operations in the data stream transmission method shown;

[0230] Alternatively, transceiver module 1601 is used to perform... Figure 10 The processing module 1602 is used to execute the receiving and / or sending related operations in the data stream transmission method shown. Figure 10 Other operations besides the receive and / or send-related operations in the data stream transmission method shown.

[0231] In one possible implementation, the data stream transmission device is used to perform... Figure 4 In the case of the data stream transmission method shown, the processing module 1602 is used to acquire transmission information of the first data stream and the second data stream in a first time period. The first data stream and the second data stream are transmitted between the first data center and the second data center. The transmission information includes transmission information of the first data stream and the second data stream in at least one dimension in the time dimension or the spatial dimension. The processing module 1602 is also used to determine the first output port of the first data stream and the second output port of the second data stream in the second time period based on the transmission information of the first time period. The transceiver module 1601 is used to transmit the first data stream in the second time period based on the first output port and transmit the second data stream in the second time period based on the second output port.

[0232] In one possible implementation, the processing module 1602 is configured to determine a first output port based on the routing information of the first data center in the second time period and the transmission information of the first data stream, and to determine a second output port based on the routing information of the first data center in the second time period and the transmission information of the second data stream. The routing information of the first data center in the second time period indicates the output port of the first data center and the port occupancy status of the output port of the first data center in the second time period. The port occupancy status includes at least one of port occupancy bandwidth in the spatial dimension or port occupancy duration in the time dimension.

[0233] In one possible implementation, the processing module 1602 is used to select a first candidate port connected to the destination of the first data stream from the output ports of the first data center; and to determine a first output port from the first candidate ports based on the transmission information of the first data stream and the port occupancy status of the first candidate ports in the second time period.

[0234] In one possible implementation, there are multiple first candidate ports. The processing module 1602 is used to determine the start time of the first candidate port transmitting the first data stream in the second time period based on the transmission information of the first data stream in the time dimension; to determine the end time of the first candidate port transmitting the first data stream in the second time period based on the transmission information of the first data stream in the spatial dimension, the port occupancy status of the first candidate port in the second time period, and the start time of the first candidate port transmitting the first data stream in the second time period; and to select a first output port from the multiple first candidate ports based on the end time of the first candidate port transmitting the first data stream in the second time period.

[0235] In one possible implementation, there are multiple first candidate ports. The processing module 1602 is used to determine the remaining bandwidth of the first candidate ports in the second time period based on the port occupancy bandwidth of the first candidate ports in the second time period; select a first output port from the first candidate ports whose remaining bandwidth is greater than the transmission bandwidth of the first data stream; or, if the remaining bandwidth of multiple first candidate ports in the second time period is less than the transmission bandwidth of the first data stream, select a first output port from the multiple first candidate ports based on the port occupancy duration of each first candidate port in the second time period, and the transmission bandwidth is obtained based on the transmission information of the first data stream in the spatial dimension.

[0236] In one possible implementation, the time-dimensional transmission information includes at least one of transmission period, arrival time, end time, or transmission duration, and the spatial-dimensional transmission information includes at least one of stream byte count or transmission bandwidth.

[0237] In one possible implementation, the first data stream includes the data stream generated from training the first model, the second data stream includes the data stream generated from training the second model, or the first and second data streams include the data stream generated from training the third model.

[0238] In one possible implementation, the first time period and the second time period correspond to different rounds of multi-round model training, and the first data stream and the second data stream include the data stream generated during model training.

[0239] In one possible implementation, the first data stream and the second data stream are transmitted through the same load-sharing port group in the first time period; or, the first data stream and the second data stream belong to the same computing task.

[0240] In one possible implementation, the processing module 1602 is used to collect the transmission information of the first data stream and the second data stream in a first time period; or, to receive the transmission information of the first data stream and the second data stream sent by the training controller corresponding to the first data center, wherein the transmission information is determined based on the task configuration information of model training.

[0241] In one possible implementation, the processing module 1602 is further configured to determine a first queue of the first data stream at the first output port and a second queue of the second data stream at the second output port; the transceiver module 1601 is further configured to reduce the flow rate of the first data stream on the first queue in the event of congestion at the first output port, and / or, reduce the flow rate of the second data stream on the second queue in the event of congestion at the second output port.

[0242] In one possible implementation, the first output port and the second output port are determined based on the transmission information and the fault type of the second time period. The fault type includes at least one of the following: OTN optical path failure interconnecting the first data center and the second data center, output port link failure of the first data center, or fault within the second data center.

[0243] In one possible implementation, the transmission information of the first data stream in the first time period is also used to determine the transmission path of the first data stream within the first data center in the second time period.

[0244] In one possible implementation, the processing module 1602 is further configured to acquire the transmission information of the first data stream in the second time period; and, if the transmission information of the first data stream in the second time period is different from the transmission information of the first data stream in the first time period, update the first output port according to the transmission information of the first data stream in the second time period.

[0245] In one possible implementation, the data stream transmission device is used to perform... Figure 10 In the case of the data stream transmission method shown, the processing module 1602 is used to obtain the transmission information of the first data stream in a first time period. The first data stream is transmitted between the first data center and the second data center. The transmission information includes the transmission information of the first data stream in at least one dimension in the time dimension or the spatial dimension. The processing module 1602 is also used to determine the first output port for transmitting the first data stream in a second time period based on the transmission information of the first time period. The transceiver module 1601 is used to transmit the first data stream in the second time period based on the first output port.

[0246] In one possible implementation, the processing module 1602 is configured to determine a first output port based on the routing information of the first data center in the second time period and the transmission information of the first data stream. The routing information of the first data center in the second time period indicates the output port of the first data center and the port occupancy status of the output port of the first data center in the second time period. The port occupancy status includes at least one of port occupancy bandwidth in the spatial dimension or port occupancy duration in the time dimension.

[0247] In one possible implementation, the processing module 1602 is used to select a first candidate port connected to the destination of the first data stream from the output ports of the first data center; and to determine a first output port from the first candidate ports based on the transmission information of the first data stream and the port occupancy status of the first candidate ports in the second time period.

[0248] In one possible implementation, there are multiple first candidate ports. The processing module 1602 is used to determine the start time of the first candidate port transmitting the first data stream in the second time period based on the spatial transmission information of the first data stream; to determine the end time of the first candidate port transmitting the first data stream in the second time period based on the temporal transmission information of the first data stream, the port occupancy status of the first candidate port in the second time period, and the start time of the first candidate port transmitting the first data stream in the second time period; and to select a first output port from the multiple first candidate ports based on the end time of the first candidate port transmitting the first data stream in the second time period.

[0249] In one possible implementation, there are multiple first candidate ports. The processing module 1602 is used to determine the remaining bandwidth of the first candidate ports in the second time period based on the port occupancy bandwidth of the first candidate ports in the second time period; select a first output port from the first candidate ports whose remaining bandwidth is greater than the transmission bandwidth of the first data stream; or, if the remaining bandwidth of multiple first candidate ports in the second time period is less than the transmission bandwidth of the first data stream, select a first output port from the multiple first candidate ports based on the port occupancy duration of each first candidate port in the second time period, and the transmission bandwidth is obtained based on the transmission information of the first data stream in the spatial dimension.

[0250] In one possible implementation, the time-dimensional transmission information includes at least one of transmission period, arrival time, end time, or transmission duration, and the spatial-dimensional transmission information includes at least one of stream byte count or transmission bandwidth.

[0251] In one possible implementation, the first data stream includes the data stream generated during the training of the first model.

[0252] In one possible implementation, the first time period and the second time period correspond to different rounds of multi-round model training, and the first data stream includes the data stream generated during model training.

[0253] In one possible implementation, the processing module 1602 is used to collect the transmission information of the first data stream in a first time period; or, to receive the transmission information sent by the training controller corresponding to the first data center, wherein the transmission information is determined based on the task configuration information of model training.

[0254] In one possible implementation, the processing module 1602 is further configured to determine the first queue of the first data stream at the first output port; the transceiver module 1601 is further configured to reduce the flow rate of the first data stream on the first queue in the event of congestion at the first output port.

[0255] In one possible implementation, the first output port is determined based on transmission information and the fault type of the second time period. The fault type includes at least one of the following: OTN optical path failure interconnecting the first and second data centers, output port link failure of the first data center, or fault within the second data center.

[0256] In one possible implementation, the transmission information of the first data stream in the first time period is also used to determine the transmission path of the first data stream within the first data center in the second time period.

[0257] In one possible implementation, the processing module 1602 is further configured to acquire the transmission information of the first data stream in the second time period; and, if the transmission information of the first data stream in the second time period is different from the transmission information of the first data stream in the first time period, update the first output port according to the transmission information of the first data stream in the second time period.

[0258] This application does not limit the dimensions considered in determining the output port; it can be determined based on at least one of the time or spatial dimensions, offering high flexibility. Furthermore, since the transmission information reflects the actual transmission status of the data stream in the first time period, the output port selected based on the actual transmission status can be dynamically adjusted as the data stream transmission changes, exhibiting adaptive balancing capabilities and high versatility.

[0259] It should be understood that the above Figure 16 The provided device, in implementing its functions, is only illustrated by the division of the aforementioned functional modules. In practical applications, the functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, which will not be repeated here. Figure 16The provided data stream transmission device can be a chip or a communication device; for example, the data stream transmission device can be the network device described below.

[0260] See Figure 17 , Figure 17 A schematic diagram of the structure of a network device 1700 provided in an exemplary embodiment of this application is shown. Figure 17 The network device 1700 shown is used to perform the above. Figure 4 or Figure 10 The data stream transmission method shown involves the operations described. The network device 1700 is, for example, a switch, a router, etc., and can be implemented using a general bus architecture.

[0261] like Figure 17 As shown, the network device 1700 includes at least one processor 1701, a memory 1703, and at least one communication interface 1704.

[0262] Processor 1701 may be, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the embodiments of this application. For example, processor 1701 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A PLD may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof. It can implement or execute the various logic blocks, modules, and circuits described in connection with the embodiments of this application. A processor may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0263] Optionally, network device 1700 also includes a bus. The bus is used to transfer information between the components of network device 1700. The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 17 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0264] Memory 1703 may be, for example, read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions; random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions; electrically erasable programmable read-only memory (EEPROM); compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed discs, laser discs, optical discs, digital versatile 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. Memory 1703 may exist independently and be connected to processor 1701 via a bus. Memory 1703 may also be integrated with processor 1701.

[0265] Communication interface 1704 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), or Wireless Local Area Network (WLAN). Communication interface 1704 may include wired and wireless communication interfaces. Specifically, communication interface 1704 may be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a WLAN interface, a cellular network communication interface, or a combination thereof. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. In this embodiment, communication interface 1704 can be used by network device 1700 to communicate with other devices.

[0266] In a specific implementation, as one example, the processor 1701 may include one or more CPUs, such as Figure 17 The CPU0 and CPU1 shown are examples of processors. Each of these processors can be a single-core processor or a multi-core processor. A processor here can refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).

[0267] In a specific implementation, as one example, network device 1700 may include multiple processors, such as... Figure 17 The processors 1701 and 1705 are shown. Each of these processors can be a single-core processor or a multi-core processor. Here, "processor" can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).

[0268] In a specific implementation, as one embodiment, network device 1700 may further include output devices and input devices. The output device communicates with processor 1701 and can display information in various ways. For example, the output device may be a liquid crystal display (LCD), a light-emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc. The input device communicates with processor 1701 and can receive user input in various ways. For example, the input device may be a mouse, keyboard, touchscreen device, or sensing device, etc.

[0269] In some embodiments, memory 1703 stores program code 1710 for executing the solution of this application, and processor 1701 can execute the program code 1710 stored in memory 1703. That is, network device 1700 can implement the data stream transmission method provided in the method embodiment through processor 1701 and program code 1710 in memory 1703. Program code 1710 may include one or more software modules. Optionally, processor 1701 itself may also store program code or instructions for executing the solution of this application.

[0270] In specific embodiments, the network device 1700 of this application embodiment may correspond to the first device or the second device in the above-described method embodiments.

[0271] in, Figure 4 or Figure 10 Each step of the data stream transmission method shown is completed through integrated logic circuits in the hardware or software instructions in the processor of the network device 1700. The steps of the method disclosed in the embodiments of this application can be directly implemented by the hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. Since this storage medium is located in memory, the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method; to avoid repetition, these will not be described in detail here.

[0272] See Figure 18 , Figure 18 This invention provides a schematic diagram of the structure of a network device 1800 according to another exemplary embodiment of the present application. Figure 18 The network device 1800 shown is used to perform the above. Figure 4 or Figure 10The data stream transmission method shown includes all or part of the operations involved. The network device 1800 is, for example, a switch, a router, etc., and can be implemented using a general bus architecture.

[0273] like Figure 18 As shown, network device 1800 includes: main control board 1810 and interface board 1830.

[0274] The main control board, also known as the main processing unit (MPU) or route processor card, is used to control and manage the various components in the network device 1800, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 1810 includes a central processing unit 1811 and a memory 1812.

[0275] Interface board 1830 is also known as a line processing unit (LPU), linecard, or service board. Interface board 1830 provides various service interfaces and implements packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, etc., with Ethernet interfaces including, for example, Flexible Ethernet Clients (FlexE Clients). Interface board 1830 includes: a central processing unit 1831, a network processor 1832, a forwarding table entry memory 1834, and a physical interface card (PIC) 1833.

[0276] The central processing unit 1831 on the interface board 1830 is used to control and manage the interface board 1830 and communicate with the central processing unit 1811 on the main control board 1810.

[0277] The network processor 1832 is used to implement packet forwarding processing. The network processor 1832 can be in the form of a forwarding chip. The forwarding chip can be a network processor (NP). In some embodiments, the forwarding chip can be implemented using an application-specific integrated circuit (ASIC) or a field-programmable gate array (FPGA). Specifically, the network processor 1832 forwards received packets based on the forwarding table stored in the forwarding table entry memory 1834. If the destination address of the packet is the address of the network device 1800, the packet is sent to the CPU (such as the central processing unit 1831) for processing; if the destination address of the packet is not the address of the network device 1800, the next hop and outgoing interface corresponding to the destination address are looked up in the forwarding table according to the destination address, and the packet is forwarded to the outgoing interface corresponding to the destination address. Uplink packet processing may include: packet ingress interface processing, forwarding table lookup; downlink packet processing may include: forwarding table lookup, etc. In some embodiments, the central processing unit can also perform the functions of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for a forwarding chip on the interface board.

[0278] The physical interface card 1833 is used to implement physical layer interfacing functions. Raw traffic enters the interface board 1830 through this card, and processed packets are sent out from the physical interface card 1833. The physical interface card 1833, also known as a daughter card, can be installed on the interface board 1830. It is responsible for converting photoelectric signals into packets, performing validity checks on the packets, and forwarding them to the network processor 1832 for processing. In some embodiments, the central processing unit 1831 can also perform the functions of the network processor 1832, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for the network processor 1832 in the physical interface card 1833.

[0279] Optionally, network device 1800 includes multiple interface boards. For example, network device 1800 also includes interface board 1840, which includes: a central processing unit 1841, a network processor 1842, a forwarding table entry memory 1844, and a physical interface card 1843. The functions and implementation methods of each component in interface board 1840 are the same as or similar to those in interface board 1830, and will not be described again here.

[0280] Optionally, network device 1800 also includes a switching fabric board 1820. The switching fabric board 1820 can also be referred to as a switch fabric unit (SFU). When network device 1800 has multiple interface boards, the switching fabric board 1820 is used to complete data exchange between the interface boards. For example, interface boards 1830 and 1840 can communicate through the switching fabric board 1820.

[0281] The main control board 1810 and the interface boards are coupled. For example, the main control board 1810, interface boards 1830 and 1840, and the switching network board 1820 communicate with each other via a system bus connected to the system backplane. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 1810 and interface boards 1830 and 1840, and communication between the main control board 1810 and interface boards 1830 and 1840 is achieved through the IPC channel.

[0282] Logically, network device 1800 includes a control plane and a forwarding plane. The control plane includes a main control board 1810 and a central processing unit 1811, while the forwarding plane includes various components that perform forwarding, such as a forwarding table entry memory 1834, a physical interface card 1833, and a network processor 1832. The control plane performs functions such as router operation, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the status of network devices. The control plane distributes the generated forwarding tables to the forwarding plane. In the forwarding plane, the network processor 1832 forwards messages received by the physical interface card 1833 based on the forwarding tables distributed by the control plane. The forwarding tables distributed by the control plane can be stored in the forwarding table entry memory 1834. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same network device.

[0283] It's worth noting that a network device may have one or more main control boards, including a primary and a backup main control board. It may also have one or more interface boards; the more powerful the network device's data processing capabilities, the more interface boards it provides. Each interface board may also have one or more physical interface cards. A switching board may or may not exist; multiple boards can share the load and provide redundancy. In a centralized forwarding architecture, the network device may not need a switching board, as the interface boards handle the entire system's business data processing. In a distributed forwarding architecture, the network device can have at least one switching board, which enables data exchange between multiple interface boards, providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of a distributed architecture network device are greater than those of a centralized architecture network device. Alternatively, the network device can also be a single board, without a switching board. The functions of the interface board and the main control board are integrated on this one board. In this case, the central processing unit (CPU) on the interface board and the CPU on the main control board can be combined into a single CPU to perform the combined functions. This type of network device has lower data exchange and processing capabilities (e.g., low-end switches or routers). The specific architecture adopted depends on the specific network deployment scenario, and no restrictions are imposed here.

[0284] In a specific embodiment, network device 1800 corresponds to the above. Figure 16 The data stream transmission device shown. In some embodiments, Figure 16 The processing module 1602 in the data stream transmission device shown is equivalent to the central processing unit 1811 or network processor 1832 in the network device 1800.

[0285] This application embodiment also provides a communication device, which includes a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other via an internal connection path. The memory stores instructions, and the processor executes the instructions stored in the memory to control the transceiver to receive and transmit signals. When the processor executes the instructions stored in the memory, it causes the processor to perform... Figure 4 or Figure 10 The data stream transmission method shown.

[0286] It should be understood that the aforementioned processor can be a CPU, or other general-purpose processors, DSPs, ASICs, FPGAs, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting the Advanced Reduced Instruction Set Computing (RISC) machine (ARM) architecture.

[0287] Furthermore, in an alternative embodiment, the memory described above may include read-only memory and random access memory, and provide instructions and data to the processor. The memory may also include non-volatile random access memory. For example, the memory may also store device type information.

[0288] The memory can be volatile or non-volatile, or may include both. Non-volatile memory can be ROM, programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), EEPROM, or flash memory. Volatile memory can be RAM, used as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0289] This application embodiment also provides a data stream transmission device, the device including a processor and a memory, the memory being coupled to the processor, the memory being used to store at least one instruction, and the processor being used to load and execute at least one instruction, so that the data stream transmission device can perform as follows: Figure 4 or Figure 10 The data stream transmission method shown.

[0290] This application embodiment also provides a data stream transmission system, the system including a first data center and a second data center, wherein the equipment on the first data center is used to implement, for example, a data stream transmission system. Figure 4 or Figure 10 The data stream transmission method shown.

[0291] This application also provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to enable the computer to perform the following: Figure 4 or Figure 10 The data stream transmission method shown.

[0292] This application also provides a computer program (product) that, when executed by a computer, causes the processor or computer to perform the corresponding steps and / or processes in the above method embodiments.

[0293] Optionally, the computer product can be a network cloud engine (NCE) / controller product, including data center network controllers and wide area network controllers. A data center network controller is, for example, NCE-Fabric, and a wide area network controller is, for example, NCE-IP. Here, Fabric indicates a fiber optic switching network topology.

[0294] This application also provides a chip, which includes a processor for calling and executing instructions stored in a memory, causing a communication device equipped with the chip to perform actions such as... Figure 4 or Figure 10 The data stream transmission method shown.

[0295] This application embodiment also provides another chip, including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected via internal interconnection paths. The processor is used to execute code in the memory. When the code is executed, the processor is used to perform actions such as... Figure 4 or Figure 10 The data stream transmission method shown.

[0296] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive).

[0297] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the transmission information involved in this application was obtained under full authorization.

[0298] Those skilled in the art will recognize that the method steps and modules described in conjunction with the embodiments disclosed herein can be implemented in software, hardware, firmware, or any combination thereof. To clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0299] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0300] When implemented using software, it can be implemented wholly or partially as a computer program product. This computer program product includes one or more computer program instructions. As an example, the methods of this application embodiment can be described in the context of machine-executable instructions, such as program modules that execute on a device on a real or virtual processor of the target. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc., which perform specific tasks or implement specific abstract data structures. In various embodiments, the functionality of program modules can be combined or divided among the described program modules. The machine-executable instructions for the program modules can execute within a local or distributed device. In a distributed device, the program modules can reside on both local and remote storage media.

[0301] Computer program code used to implement the methods of the embodiments of this application may be written in one or more programming languages. This computer program code may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data streaming device, such that when executed by the computer or other programmable data streaming device, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a computer, partially on a computer, as a standalone software package, partially on a computer and partially on a remote computer, or entirely on a remote computer or server.

[0302] In the context of the embodiments of this application, computer program code or related data may be carried by any suitable carrier to enable a device, apparatus, or processor to perform the various processes and operations described above. Examples of carriers include signals, computer-readable media, etc.

[0303] Examples of signals may include electrical, optical, radio, sound, or other forms of propagation signals, such as carrier waves, infrared signals, etc.

[0304] A machine-readable medium can be any tangible medium that contains or stores programs for or relating to an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. More detailed examples of machine-readable storage media include electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0305] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be found in the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0306] In the embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, devices, or modules, or they may be electrical, mechanical, or other forms of connection.

[0307] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.

[0308] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0309] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0310] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items that have substantially the same function and purpose. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor does it limit the quantity or order of execution. It should also be understood that although the following description uses the terms "first," "second," etc., to describe various elements, these elements should not be limited by the terms. These terms are merely used to distinguish one element from another. For example, without departing from the various examples described, a first image can be referred to as a second image, and similarly, a second image can be referred to as a first image. Both the first image and the second image can be images, and in some cases, they can be separate and distinct images.

[0311] It should also be understood that, in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0312] In this application, the term "at least one" means one or more, and the term "multiple" means two or more. For example, multiple second messages refer to two or more second messages. The terms "system" and "network" are often used interchangeably in this document.

[0313] It should be understood that the terminology used in the description of the various examples herein is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0314] It should also be understood that the term "and / or" as used herein refers to and covers any and all possible combinations of one or more of the associated listed items. The term "and / or" describes an association between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " in this application generally indicates that the preceding and following related objects are in an "or" relationship.

[0315] It should also be understood that the term “comprising” (also referred to as “includes”, “including”, “comprises” and / or “comprising”) as used in this specification specifies the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0316] It should also be understood that the terms “if” and “if” can be interpreted as meaning “when” or “upon”, or “in response to determination” or “in response to detection”. Similarly, depending on the context, the phrases “if determination…” or “if detection [the stated condition or event]” can be interpreted as meaning “when determination…”, or “in response to determination…”, or “when detection [the stated condition or event]” or “in response to detection [the stated condition or event]”.

[0317] It should be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.

[0318] It should also be understood that the phrases "an embodiment," "an embodiment," and "a possible implementation" used throughout the specification mean that a specific feature, structure, or characteristic related to an embodiment or implementation is included in at least one embodiment of this application. Therefore, the phrases "in an embodiment," "an embodiment," or "a possible implementation" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

Claims

1. A data stream transmission method, characterized in that, The method includes: The transmission information of the first data stream and the second data stream is obtained in a first time period. The first data stream and the second data stream are transmitted between the first data center and the second data center. The transmission information includes the transmission information of the first data stream and the second data stream in at least one dimension in the time dimension or the spatial dimension. Based on the transmission information of the first time period, determine the first output port of the first data stream and the second output port of the second data stream for the second time period; The first data stream is transmitted based on the first output port during the second time period, and the second data stream is transmitted based on the second output port during the second time period.

2. The method according to claim 1, characterized in that, The step of determining the first output port for transmitting the first data stream and the second output port for transmitting the second data stream in the second time period based on the transmission information of the first time period includes: The first outgoing port is determined based on the routing information of the first data center in the second time period and the transmission information of the first data stream. The second outgoing port is determined based on the routing information of the first data center in the second time period and the transmission information of the second data stream. The routing information of the first data center in the second time period indicates the outgoing port of the first data center and the port occupancy status of the outgoing port of the first data center in the second time period. The port occupancy status includes at least one of port occupancy bandwidth in the spatial dimension or port occupancy duration in the time dimension.

3. The method according to claim 2, characterized in that, Determining the first output port based on the routing information of the first data center in the second time period and the transmission information of the first data stream includes: Select a first candidate port from the outgoing ports of the first data center that connects to the destination of the first data stream; Based on the transmission information of the first data stream and the port occupancy status of the first candidate port in the second time period, the first output port is determined from the first candidate ports.

4. The method according to claim 3, characterized in that, There are multiple first candidate ports. The step of determining the first output port from the first candidate ports based on the transmission information of the first data stream and the port occupancy status of the first candidate ports during the second time period includes: The start time of the first candidate port transmitting the first data stream in the second time period is determined based on the transmission information of the first data stream in the time dimension. Based on the spatial transmission information of the first data stream, the port occupancy status of the first candidate port in the second time period, and the start time of the first candidate port transmitting the first data stream in the second time period, the end time of the first candidate port transmitting the first data stream in the second time period is determined. The first output port is selected from multiple first candidate ports based on the end time of the transmission of the first data stream by the first candidate port in the second time period.

5. The method according to claim 3, characterized in that, There are multiple first candidate ports. The step of determining the first output port from the first candidate ports based on the transmission information of the first data stream and the port occupancy status of the first candidate ports during the second time period includes: The remaining bandwidth of the first candidate port in the second time period is determined based on the port bandwidth occupied by the first candidate port in the second time period. The first output port is selected from the first candidate ports whose remaining bandwidth is greater than the transmission bandwidth of the first data stream. Alternatively, if the remaining bandwidth of multiple first candidate ports is less than the transmission bandwidth of the first data stream in the second time period, the first output port is selected from the multiple first candidate ports according to the port occupancy duration of each first candidate port in the second time period. The transmission bandwidth is obtained based on the transmission information of the first data stream in the spatial dimension.

6. The method according to any one of claims 1-5, characterized in that, The time-dimensional transmission information includes at least one of transmission period, arrival time, end time, or transmission duration, and the spatial-dimensional transmission information includes at least one of stream byte count or transmission bandwidth.

7. The method according to any one of claims 1-6, characterized in that, The first time period and the second time period correspond to different rounds of model training, and the first data stream and the second data stream include the data stream generated during model training.

8. The method according to any one of claims 1-7, characterized in that, The first data stream includes the data stream generated during the training of the first model, and the second data stream includes the data stream generated during the training of the second model; Alternatively, the first data stream and the second data stream may include the data stream generated from training the third model.

9. The method according to any one of claims 1-8, characterized in that, The first data stream and the second data stream are transmitted through the same load-sharing outgoing port group during the first time period; Alternatively, the first data stream and the second data stream belong to the same computing task.

10. The method according to any one of claims 1-9, characterized in that, The step of obtaining the transmission information of the first data stream and the second data stream in the first time period includes: Collect the transmission information of the first data stream and the second data stream during the first time period; Alternatively, the system may receive transmission information of the first data stream and the second data stream sent by the training controller corresponding to the first data center, wherein the transmission information is determined based on the task configuration information for model training.

11. The method according to any one of claims 1-10, characterized in that, After determining the first output port of the first data stream and the second output port of the second data stream for the second time period based on the transmission information of the first time period, the method further includes: Determine the first queue of the first data stream at the first output port and the second queue of the second data stream at the second output port; In the event of congestion at the first output port, reduce the flow rate of the first data stream on the first queue, and / or, in the event of congestion at the second output port, reduce the flow rate of the second data stream on the second queue.

12. The method according to any one of claims 1-11, characterized in that, The first output port and the second output port are determined based on the transmission information and the fault type of the second time period. The fault type includes at least one of the following: optical transport network (OTN) optical path fault interconnecting the first data center and the second data center, output port link fault of the first data center, or fault within the second data center.

13. A data stream transmission method, characterized in that, The method includes: Obtain transmission information of a first data stream in a first time period. The first data stream is transmitted between a first data center and a second data center. The transmission information includes transmission information of the first data stream in at least one dimension, either in the time dimension or the spatial dimension. The first output port for transmitting the first data stream in the second time period is determined based on the transmission information of the first time period. The first data stream is transmitted based on the first output port during the second time period.

14. The method according to claim 13, characterized in that, Determining the first output port for transmitting the first data stream in the second time period based on the transmission information of the first time period includes: The first outgoing port is determined based on the routing information of the first data center in the second time period and the transmission information of the first data stream. The routing information of the first data center in the second time period indicates the outgoing port of the first data center and the port occupancy status of the outgoing port of the first data center in the second time period. The port occupancy status includes at least one of port occupancy bandwidth in the spatial dimension or port occupancy duration in the time dimension.

15. The method according to claim 14, characterized in that, Determining the first output port based on the routing information of the first data center in the second time period and the transmission information of the first data stream includes: Select a first candidate port from the outgoing ports of the first data center that connects to the destination of the first data stream; Based on the transmission information of the first data stream and the port occupancy status of the first candidate port in the second time period, the first output port is determined from the first candidate ports.

16. The method according to claim 15, characterized in that, There are multiple first candidate ports. The step of determining the first output port from the first candidate ports based on the transmission information of the first data stream and the port occupancy status of the first candidate ports during the second time period includes: The start time of the first candidate port transmitting the first data stream in the second time period is determined based on the transmission information of the first data stream in the spatial dimension. Based on the transmission information of the first data stream in the time dimension, the port occupancy status of the first candidate port in the second time period, and the start time of the first candidate port transmitting the first data stream in the second time period, the end time of the first candidate port transmitting the first data stream in the second time period is determined. The first output port is selected from multiple first candidate ports based on the end time of the transmission of the first data stream by the first candidate port in the second time period.

17. The method according to claim 15, characterized in that, There are multiple first candidate ports. The step of determining the first output port from the first candidate ports based on the transmission information of the first data stream and the port occupancy status of the first candidate ports during the second time period includes: The remaining bandwidth of the first candidate port in the second time period is determined based on the port bandwidth occupied by the first candidate port in the second time period. The first output port is selected from the first candidate ports whose remaining bandwidth is greater than the transmission bandwidth of the first data stream. Alternatively, if the remaining bandwidth of multiple first candidate ports is less than the transmission bandwidth of the first data stream in the second time period, the first output port is selected from the multiple first candidate ports according to the port occupancy duration of each first candidate port in the second time period. The transmission bandwidth is obtained based on the transmission information of the first data stream in the spatial dimension.

18. The method according to any one of claims 13-17, characterized in that, The time-dimensional transmission information includes at least one of transmission period, arrival time, end time, or transmission duration, and the spatial-dimensional transmission information includes at least one of stream byte count or transmission bandwidth.

19. The method according to any one of claims 13-18, characterized in that, The first time period and the second time period correspond to different rounds of model training, and the first data stream includes the data stream generated during model training.

20. The method according to any one of claims 13-19, characterized in that, The first data stream includes the data stream generated during the training of the first model.

21. The method according to any one of claims 13-20, characterized in that, The step of obtaining the transmission information of the first data stream in the first time period includes: Collect the transmission information of the first data stream in the first time period; Alternatively, it may receive transmission information sent by the training controller corresponding to the first data center, the transmission information being determined based on the task configuration information for model training.

22. The method according to any one of claims 13-21, characterized in that, After determining the first output port for transmitting the first data stream in the second time period based on the transmission information of the first time period, the method further includes: Determine the first queue of the first data stream at the first output port; If congestion occurs at the first output port, reduce the flow rate of the first data stream on the first queue.

23. The method according to any one of claims 13-22, characterized in that, The first output port is determined based on the transmission information and the fault type of the second time period. The fault type includes at least one of the following: optical transport network (OTN) optical path failure of the first data center and the second data center interconnection, output port link failure of the first data center, or fault within the second data center.

24. The method according to any one of claims 1-23, characterized in that, The transmission information of the first data stream in the first time period is also used to determine the transmission path of the first data stream in the first data center in the second time period.

25. The method according to any one of claims 1-24, characterized in that, After transmitting the first data stream based on the first output port in the second time period, the method further includes: Obtain the transmission information of the first data stream during the second time period; If the transmission information of the first data stream in the second time period is different from the transmission information of the first data stream in the first time period, the first output port is updated according to the transmission information of the first data stream in the second time period.

26. A data stream transmission device, characterized in that, The device includes: A transceiver module is used to perform the receiving and / or sending related operations in the method according to any one of claims 1-12, 24-25; a processing module is used to perform other operations besides the receiving and / or sending related operations in the method according to any one of claims 1-12, 24-25; or, A transceiver module is used to perform the receiving and / or sending related operations in the method according to any one of claims 13-25, and a processing module is used to perform other operations besides the receiving and / or sending related operations in the method according to any one of claims 13-25.

27. A data stream transmission system, characterized in that, The data stream transmission system includes a first data center and a second data center, wherein the devices on the first data center are used to perform the data stream transmission method as described in any one of claims 1-25.

28. A data stream transmission device, characterized in that, The device includes a processor and a memory, the memory being used to store at least one instruction, and the processor being used to load and execute the at least one instruction to enable the data stream transmission device to implement the data stream transmission method as described in any one of claims 1-25.

29. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, which is loaded and executed by a processor to implement the data stream transmission method as described in any one of claims 1-25.

30. A chip, characterized in that, The chip includes a processor for running program instructions or code that cause a device containing the chip to perform the data stream transmission method as described in any one of claims 1-25.

31. A computer program product, characterized in that, The computer program product includes a computer program / instruction that is executed by a processor to cause a computer to perform the data stream transmission method as described in any one of claims 1-25.